Merge "Introduce InterwikiLookupAdapter on top of SiteLookup"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 28 Oct 2016 13:25:18 +0000 (13:25 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 28 Oct 2016 13:25:18 +0000 (13:25 +0000)
915 files changed:
.gitreview
.jscsrc
.travis.yml
CREDITS
FAQ
HISTORY
INSTALL
README
RELEASE-NOTES-1.28
RELEASE-NOTES-1.29 [new file with mode: 0644]
autoload.php
composer.json
docs/README
docs/extension.schema.json
docs/extension.schema.v1.json
docs/hooks.txt
includes/Block.php
includes/CategoryViewer.php
includes/DefaultSettings.php
includes/Defines.php
includes/DummyLinker.php
includes/EditPage.php
includes/FileDeleteForm.php
includes/ForkController.php
includes/GlobalFunctions.php
includes/Html.php
includes/HttpFunctions.php [deleted file]
includes/Linker.php
includes/MWGrants.php [new file with mode: 0644]
includes/MWTimestamp.php
includes/MediaWiki.php
includes/MediaWikiServices.php
includes/MergeHistory.php
includes/Message.php
includes/MimeMagic.php
includes/MovePage.php
includes/OutputPage.php
includes/PHPVersionCheck.php
includes/PageProps.php
includes/PrefixSearch.php
includes/ProxyLookup.php [new file with mode: 0644]
includes/Revision.php
includes/Sanitizer.php
includes/ServiceWiring.php
includes/Services/CannotReplaceActiveServiceException.php [deleted file]
includes/Services/ContainerDisabledException.php [deleted file]
includes/Services/DestructibleService.php [deleted file]
includes/Services/NoSuchServiceException.php [deleted file]
includes/Services/SalvageableService.php [deleted file]
includes/Services/ServiceAlreadyDefinedException.php [deleted file]
includes/Services/ServiceContainer.php [deleted file]
includes/Services/ServiceDisabledException.php [deleted file]
includes/Setup.php
includes/Status.php
includes/StreamFile.php
includes/TemplateParser.php
includes/TemplatesOnThisPageFormatter.php [new file with mode: 0644]
includes/Title.php
includes/WatchedItemQueryService.php
includes/WatchedItemStore.php
includes/WebRequest.php
includes/WebResponse.php
includes/Xml.php
includes/actions/HistoryAction.php
includes/actions/InfoAction.php
includes/api/ApiAuthManagerHelper.php
includes/api/ApiBase.php
includes/api/ApiCSPReport.php
includes/api/ApiClearHasMsg.php
includes/api/ApiContinuationManager.php
includes/api/ApiDelete.php
includes/api/ApiEditPage.php
includes/api/ApiFormatBase.php
includes/api/ApiFormatJson.php
includes/api/ApiHelp.php
includes/api/ApiHelpParamValueMessage.php
includes/api/ApiImageRotate.php
includes/api/ApiLogin.php
includes/api/ApiMain.php
includes/api/ApiPageSet.php
includes/api/ApiParse.php
includes/api/ApiPurge.php
includes/api/ApiQuery.php
includes/api/ApiQueryAllImages.php
includes/api/ApiQueryAllRevisions.php
includes/api/ApiQueryBacklinksprop.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryGeneratorBase.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQuerySearch.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiQueryTags.php
includes/api/ApiQueryUserContributions.php
includes/api/ApiResult.php
includes/api/ApiSetNotificationTimestamp.php
includes/api/ApiStashEdit.php
includes/api/SearchApi.php
includes/api/i18n/ast.json
includes/api/i18n/be-tarask.json
includes/api/i18n/bg.json
includes/api/i18n/bn.json
includes/api/i18n/cs.json
includes/api/i18n/de.json
includes/api/i18n/diq.json
includes/api/i18n/en.json
includes/api/i18n/es.json
includes/api/i18n/fr.json
includes/api/i18n/gl.json
includes/api/i18n/he.json
includes/api/i18n/hr.json [new file with mode: 0644]
includes/api/i18n/it.json
includes/api/i18n/ja.json
includes/api/i18n/ka.json [new file with mode: 0644]
includes/api/i18n/ko.json
includes/api/i18n/lb.json
includes/api/i18n/mr.json
includes/api/i18n/nso.json [new file with mode: 0644]
includes/api/i18n/pl.json
includes/api/i18n/pt.json
includes/api/i18n/qqq.json
includes/api/i18n/ru.json
includes/api/i18n/sv.json
includes/api/i18n/uk.json
includes/api/i18n/zh-hans.json
includes/api/i18n/zu.json [new file with mode: 0644]
includes/auth/AuthManager.php
includes/auth/AuthenticationResponse.php
includes/auth/ButtonAuthenticationRequest.php
includes/auth/ConfirmLinkSecondaryAuthenticationProvider.php
includes/auth/EmailNotificationSecondaryAuthenticationProvider.php
includes/auth/LocalPasswordPrimaryAuthenticationProvider.php
includes/auth/PasswordDomainAuthenticationRequest.php
includes/auth/ResetPasswordSecondaryAuthenticationProvider.php
includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php
includes/auth/ThrottlePreAuthenticationProvider.php
includes/cache/BacklinkCache.php
includes/cache/FileCacheBase.php
includes/cache/HTMLFileCache.php
includes/cache/LinkBatch.php
includes/cache/MessageCache.php
includes/changes/ChangesFeed.php
includes/changes/RecentChange.php
includes/changetags/ChangeTags.php
includes/clientpool/RedisConnectionPool.php [deleted file]
includes/collation/IcuCollation.php
includes/collation/NumericUppercaseCollation.php
includes/compat/ScopedCallback.php [new file with mode: 0644]
includes/config/HashConfig.php
includes/content/ContentHandler.php
includes/content/FileContentHandler.php [new file with mode: 0644]
includes/content/WikiTextStructure.php
includes/content/WikitextContentHandler.php
includes/context/ContextSource.php
includes/context/RequestContext.php
includes/dao/DBAccessBase.php
includes/db/ChronologyProtector.php [deleted file]
includes/db/CloneDatabase.php
includes/db/DBConnRef.php [deleted file]
includes/db/Database.php [deleted file]
includes/db/DatabaseError.php [deleted file]
includes/db/DatabaseMssql.php
includes/db/DatabaseMysql.php [deleted file]
includes/db/DatabaseMysqlBase.php [deleted file]
includes/db/DatabaseMysqli.php [deleted file]
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php [deleted file]
includes/db/DatabaseSqlite.php [deleted file]
includes/db/DatabaseUtility.php [deleted file]
includes/db/IDatabase.php [deleted file]
includes/db/MWLBFactory.php [new file with mode: 0644]
includes/db/loadbalancer/ILoadBalancer.php [deleted file]
includes/db/loadbalancer/LBFactory.php [deleted file]
includes/db/loadbalancer/LBFactoryFake.php [deleted file]
includes/db/loadbalancer/LBFactoryMulti.php [deleted file]
includes/db/loadbalancer/LBFactorySimple.php [deleted file]
includes/db/loadbalancer/LBFactorySingle.php [deleted file]
includes/db/loadbalancer/LoadBalancer.php [deleted file]
includes/debug/MWDebug.php
includes/debug/logger/LegacyLogger.php
includes/deferred/AtomicSectionUpdate.php
includes/deferred/AutoCommitUpdate.php
includes/deferred/DeferredUpdates.php
includes/deferred/LinksDeletionUpdate.php
includes/deferred/LinksUpdate.php
includes/deferred/MWCallableUpdate.php
includes/deferred/SiteStatsUpdate.php
includes/diff/DifferenceEngine.php
includes/exception/MWException.php
includes/exception/MWExceptionHandler.php
includes/exception/MWExceptionRenderer.php [new file with mode: 0644]
includes/exception/PermissionsError.php
includes/exception/TimestampException.php [deleted file]
includes/externalstore/ExternalStoreDB.php
includes/filebackend/FSFile.php [deleted file]
includes/filebackend/FSFileBackend.php [deleted file]
includes/filebackend/FileBackend.php [deleted file]
includes/filebackend/FileBackendGroup.php
includes/filebackend/FileBackendMultiWrite.php [deleted file]
includes/filebackend/FileBackendStore.php [deleted file]
includes/filebackend/FileOp.php [deleted file]
includes/filebackend/FileOpBatch.php [deleted file]
includes/filebackend/MemoryFileBackend.php [deleted file]
includes/filebackend/SwiftFileBackend.php [deleted file]
includes/filebackend/TempFSFile.php [deleted file]
includes/filebackend/filejournal/DBFileJournal.php
includes/filebackend/filejournal/FileJournal.php [deleted file]
includes/filebackend/lockmanager/DBLockManager.php [deleted file]
includes/filebackend/lockmanager/FSLockManager.php [deleted file]
includes/filebackend/lockmanager/LockManager.php [deleted file]
includes/filebackend/lockmanager/LockManagerGroup.php
includes/filebackend/lockmanager/MemcLockManager.php [deleted file]
includes/filebackend/lockmanager/MySqlLockManager.php
includes/filebackend/lockmanager/PostgreSqlLockManager.php [deleted file]
includes/filebackend/lockmanager/QuorumLockManager.php [deleted file]
includes/filebackend/lockmanager/RedisLockManager.php [deleted file]
includes/filebackend/lockmanager/ScopedLock.php [deleted file]
includes/filerepo/FSRepo.php
includes/filerepo/FileBackendDBRepoWrapper.php
includes/filerepo/FileRepo.php
includes/filerepo/ForeignAPIRepo.php
includes/filerepo/ForeignDBRepo.php
includes/filerepo/ForeignDBViaLBRepo.php
includes/filerepo/LocalRepo.php
includes/filerepo/RepoGroup.php
includes/filerepo/file/ArchivedFile.php
includes/filerepo/file/File.php
includes/filerepo/file/ForeignAPIFile.php
includes/filerepo/file/ForeignDBFile.php
includes/filerepo/file/LocalFile.php
includes/filerepo/file/OldLocalFile.php
includes/gallery/TraditionalImageGallery.php
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLFormField.php
includes/htmlform/OOUIHTMLForm.php
includes/htmlform/fields/HTMLDateTimeField.php [new file with mode: 0644]
includes/htmlform/fields/HTMLMultiSelectField.php
includes/htmlform/fields/HTMLRestrictionsField.php [new file with mode: 0644]
includes/htmlform/fields/HTMLSizeFilterField.php [new file with mode: 0644]
includes/htmlform/fields/HTMLSubmitField.php
includes/http/CurlHttpRequest.php [new file with mode: 0644]
includes/http/Http.php [new file with mode: 0644]
includes/http/MWHttpRequest.php [new file with mode: 0644]
includes/http/PhpHttpRequest.php [new file with mode: 0644]
includes/import/WikiRevision.php
includes/installer/DatabaseInstaller.php
includes/installer/DatabaseUpdater.php
includes/installer/Installer.php
includes/installer/MssqlInstaller.php
includes/installer/MssqlUpdater.php
includes/installer/MysqlInstaller.php
includes/installer/MysqlUpdater.php
includes/installer/OracleInstaller.php
includes/installer/OracleUpdater.php
includes/installer/PostgresInstaller.php
includes/installer/PostgresUpdater.php
includes/installer/SqliteInstaller.php
includes/installer/SqliteUpdater.php
includes/installer/i18n/be-tarask.json
includes/installer/i18n/bg.json
includes/installer/i18n/bn.json
includes/installer/i18n/ckb.json
includes/installer/i18n/cs.json
includes/installer/i18n/de.json
includes/installer/i18n/diq.json
includes/installer/i18n/en.json
includes/installer/i18n/es.json
includes/installer/i18n/fi.json
includes/installer/i18n/fr.json
includes/installer/i18n/gl.json
includes/installer/i18n/he.json
includes/installer/i18n/hu.json
includes/installer/i18n/inh.json
includes/installer/i18n/it.json
includes/installer/i18n/ko.json
includes/installer/i18n/lb.json
includes/installer/i18n/lt.json
includes/installer/i18n/lv.json
includes/installer/i18n/mai.json
includes/installer/i18n/mk.json
includes/installer/i18n/nb.json
includes/installer/i18n/ne.json
includes/installer/i18n/nl.json
includes/installer/i18n/nn.json
includes/installer/i18n/pl.json
includes/installer/i18n/pt.json
includes/installer/i18n/qqq.json
includes/installer/i18n/ru.json
includes/installer/i18n/sd.json
includes/installer/i18n/sl.json
includes/installer/i18n/sr-ec.json
includes/installer/i18n/sr-el.json
includes/installer/i18n/sv.json
includes/installer/i18n/uk.json
includes/installer/i18n/vi.json
includes/installer/i18n/zh-hans.json
includes/installer/i18n/zh-hant.json
includes/jobqueue/Job.php
includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueGroup.php
includes/jobqueue/JobQueueRedis.php
includes/jobqueue/JobRunner.php
includes/jobqueue/aggregator/JobQueueAggregatorRedis.php
includes/jobqueue/jobs/AssembleUploadChunksJob.php
includes/jobqueue/jobs/PublishStashedFileJob.php
includes/jobqueue/jobs/RecentChangesUpdateJob.php
includes/jobqueue/utils/PurgeJobUtils.php
includes/libs/CryptHKDF.php [new file with mode: 0644]
includes/libs/CryptRand.php [new file with mode: 0644]
includes/libs/IEContentAnalyzer.php [deleted file]
includes/libs/IP.php [new file with mode: 0644]
includes/libs/MWCryptHash.php [new file with mode: 0644]
includes/libs/MemoizedCallable.php
includes/libs/MultiHttpClient.php
includes/libs/SamplingStatsdClient.php [deleted file]
includes/libs/ScopedCallback.php [deleted file]
includes/libs/StatusValue.php
includes/libs/WaitConditionLoop.php [deleted file]
includes/libs/XmlTypeCheck.php [deleted file]
includes/libs/composer/ComposerJson.php
includes/libs/composer/ComposerLock.php
includes/libs/filebackend/FSFileBackend.php [new file with mode: 0644]
includes/libs/filebackend/FileBackend.php [new file with mode: 0644]
includes/libs/filebackend/FileBackendError.php [new file with mode: 0644]
includes/libs/filebackend/FileBackendMultiWrite.php [new file with mode: 0644]
includes/libs/filebackend/FileBackendStore.php [new file with mode: 0644]
includes/libs/filebackend/FileOpBatch.php [new file with mode: 0644]
includes/libs/filebackend/HTTPFileStreamer.php [new file with mode: 0644]
includes/libs/filebackend/MemoryFileBackend.php [new file with mode: 0644]
includes/libs/filebackend/SwiftFileBackend.php [new file with mode: 0644]
includes/libs/filebackend/filejournal/FileJournal.php [new file with mode: 0644]
includes/libs/filebackend/filejournal/NullFileJournal.php [new file with mode: 0644]
includes/libs/filebackend/fileop/CopyFileOp.php [new file with mode: 0644]
includes/libs/filebackend/fileop/CreateFileOp.php [new file with mode: 0644]
includes/libs/filebackend/fileop/DeleteFileOp.php [new file with mode: 0644]
includes/libs/filebackend/fileop/DescribeFileOp.php [new file with mode: 0644]
includes/libs/filebackend/fileop/FileOp.php [new file with mode: 0644]
includes/libs/filebackend/fileop/MoveFileOp.php [new file with mode: 0644]
includes/libs/filebackend/fileop/NullFileOp.php [new file with mode: 0644]
includes/libs/filebackend/fileop/StoreFileOp.php [new file with mode: 0644]
includes/libs/filebackend/fsfile/FSFile.php [new file with mode: 0644]
includes/libs/filebackend/fsfile/TempFSFile.php [new file with mode: 0644]
includes/libs/iterators/IteratorDecorator.php [new file with mode: 0644]
includes/libs/iterators/NotRecursiveIterator.php [new file with mode: 0644]
includes/libs/lockmanager/DBLockManager.php [new file with mode: 0644]
includes/libs/lockmanager/FSLockManager.php [new file with mode: 0644]
includes/libs/lockmanager/LockManager.php [new file with mode: 0644]
includes/libs/lockmanager/MemcLockManager.php [new file with mode: 0644]
includes/libs/lockmanager/NullLockManager.php [new file with mode: 0644]
includes/libs/lockmanager/PostgreSqlLockManager.php [new file with mode: 0644]
includes/libs/lockmanager/QuorumLockManager.php [new file with mode: 0644]
includes/libs/lockmanager/RedisLockManager.php [new file with mode: 0644]
includes/libs/lockmanager/ScopedLock.php [new file with mode: 0644]
includes/libs/mime/IEContentAnalyzer.php [new file with mode: 0644]
includes/libs/mime/MimeAnalyzer.php [new file with mode: 0644]
includes/libs/mime/XmlTypeCheck.php [new file with mode: 0644]
includes/libs/mime/defines.php [new file with mode: 0644]
includes/libs/mime/mime.info [new file with mode: 0644]
includes/libs/mime/mime.types [new file with mode: 0644]
includes/libs/objectcache/APCBagOStuff.php
includes/libs/objectcache/APCUBagOStuff.php [new file with mode: 0644]
includes/libs/objectcache/BagOStuff.php
includes/libs/objectcache/HashBagOStuff.php
includes/libs/objectcache/MemcachedBagOStuff.php
includes/libs/objectcache/RedisBagOStuff.php [new file with mode: 0644]
includes/libs/objectcache/WANObjectCache.php
includes/libs/objectcache/WinCacheBagOStuff.php
includes/libs/rdbms/ChronologyProtector.php [new file with mode: 0644]
includes/libs/rdbms/TransactionProfiler.php [new file with mode: 0644]
includes/libs/rdbms/database/DBConnRef.php [new file with mode: 0644]
includes/libs/rdbms/database/Database.php [new file with mode: 0644]
includes/libs/rdbms/database/DatabaseDomain.php [new file with mode: 0644]
includes/libs/rdbms/database/DatabaseMysql.php [new file with mode: 0644]
includes/libs/rdbms/database/DatabaseMysqlBase.php [new file with mode: 0644]
includes/libs/rdbms/database/DatabaseMysqli.php [new file with mode: 0644]
includes/libs/rdbms/database/DatabasePostgres.php [new file with mode: 0644]
includes/libs/rdbms/database/DatabaseSqlite.php [new file with mode: 0644]
includes/libs/rdbms/database/IDatabase.php [new file with mode: 0644]
includes/libs/rdbms/database/IMaintainableDatabase.php [new file with mode: 0644]
includes/libs/rdbms/database/position/DBMasterPos.php [new file with mode: 0644]
includes/libs/rdbms/database/position/MySQLMasterPos.php [new file with mode: 0644]
includes/libs/rdbms/database/resultwrapper/FakeResultWrapper.php [new file with mode: 0644]
includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php [new file with mode: 0644]
includes/libs/rdbms/database/resultwrapper/ResultWrapper.php [new file with mode: 0644]
includes/libs/rdbms/database/utils/SavepointPostgres.php [new file with mode: 0644]
includes/libs/rdbms/defines.php [new file with mode: 0644]
includes/libs/rdbms/encasing/Blob.php [new file with mode: 0644]
includes/libs/rdbms/encasing/LikeMatch.php [new file with mode: 0644]
includes/libs/rdbms/encasing/MssqlBlob.php [new file with mode: 0644]
includes/libs/rdbms/encasing/PostgresBlob.php [new file with mode: 0644]
includes/libs/rdbms/exception/DBAccessError.php [new file with mode: 0644]
includes/libs/rdbms/exception/DBConnectionError.php [new file with mode: 0644]
includes/libs/rdbms/exception/DBError.php [new file with mode: 0644]
includes/libs/rdbms/exception/DBExpectedError.php [new file with mode: 0644]
includes/libs/rdbms/exception/DBQueryError.php [new file with mode: 0644]
includes/libs/rdbms/exception/DBReadOnlyError.php [new file with mode: 0644]
includes/libs/rdbms/exception/DBReplicationWaitError.php [new file with mode: 0644]
includes/libs/rdbms/exception/DBTransactionError.php [new file with mode: 0644]
includes/libs/rdbms/exception/DBTransactionSizeError.php [new file with mode: 0644]
includes/libs/rdbms/exception/DBUnexpectedError.php [new file with mode: 0644]
includes/libs/rdbms/field/Field.php [new file with mode: 0644]
includes/libs/rdbms/field/MssqlField.php [new file with mode: 0644]
includes/libs/rdbms/field/MySQLField.php [new file with mode: 0644]
includes/libs/rdbms/field/ORAField.php [new file with mode: 0644]
includes/libs/rdbms/field/PostgresField.php [new file with mode: 0644]
includes/libs/rdbms/field/SQLiteField.php [new file with mode: 0644]
includes/libs/rdbms/lbfactory/ILBFactory.php [new file with mode: 0644]
includes/libs/rdbms/lbfactory/LBFactory.php [new file with mode: 0644]
includes/libs/rdbms/lbfactory/LBFactoryMulti.php [new file with mode: 0644]
includes/libs/rdbms/lbfactory/LBFactorySimple.php [new file with mode: 0644]
includes/libs/rdbms/lbfactory/LBFactorySingle.php [new file with mode: 0644]
includes/libs/rdbms/loadbalancer/ILoadBalancer.php [new file with mode: 0644]
includes/libs/rdbms/loadbalancer/LoadBalancer.php [new file with mode: 0644]
includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php [new file with mode: 0644]
includes/libs/rdbms/loadmonitor/ILoadMonitor.php [new file with mode: 0644]
includes/libs/rdbms/loadmonitor/LoadMonitor.php
includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php
includes/libs/rdbms/loadmonitor/LoadMonitorNull.php
includes/libs/redis/RedisConnRef.php [new file with mode: 0644]
includes/libs/redis/RedisConnectionPool.php [new file with mode: 0644]
includes/libs/stats/SamplingStatsdClient.php [new file with mode: 0644]
includes/libs/time/ConvertibleTimestamp.php [new file with mode: 0644]
includes/libs/time/TimestampException.php [new file with mode: 0644]
includes/libs/time/defines.php [new file with mode: 0644]
includes/libs/virtualrest/VirtualRESTServiceClient.php
includes/libs/xmp/XMP.php [new file with mode: 0644]
includes/libs/xmp/XMPInfo.php [new file with mode: 0644]
includes/libs/xmp/XMPValidate.php [new file with mode: 0644]
includes/logging/LogEntry.php
includes/logging/LogEventsList.php
includes/media/BMP.php
includes/media/Bitmap.php
includes/media/DjVu.php
includes/media/ExifBitmap.php
includes/media/JpegMetadataExtractor.php
includes/media/MediaHandler.php
includes/media/PNG.php
includes/media/SVG.php
includes/media/Tiff.php
includes/media/TransformationalImageHandler.php
includes/media/WebP.php
includes/media/XCF.php
includes/media/XMP.php [deleted file]
includes/media/XMPInfo.php [deleted file]
includes/media/XMPValidate.php [deleted file]
includes/mime.info [deleted file]
includes/mime.types [deleted file]
includes/objectcache/ObjectCache.php
includes/objectcache/RedisBagOStuff.php [deleted file]
includes/objectcache/SqlBagOStuff.php
includes/page/Article.php
includes/page/CategoryPage.php
includes/page/WikiPage.php
includes/parser/CoreParserFunctions.php
includes/parser/Parser.php
includes/parser/ParserOptions.php
includes/poolcounter/PoolCounterRedis.php
includes/profiler/Profiler.php
includes/profiler/SectionProfiler.php
includes/profiler/TransactionProfiler.php [deleted file]
includes/registration/ExtensionProcessor.php
includes/registration/ExtensionRegistry.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderContext.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderLanguageDataModule.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderUserCSSPrefsModule.php
includes/resourceloader/ResourceLoaderWikiModule.php
includes/revisiondelete/RevDelList.php
includes/search/AugmentPageProps.php [new file with mode: 0644]
includes/search/PerRowAugmentor.php [new file with mode: 0644]
includes/search/ResultAugmentor.php [new file with mode: 0644]
includes/search/ResultSetAugmentor.php [new file with mode: 0644]
includes/search/SearchEngine.php
includes/search/SearchEngineFactory.php
includes/search/SearchIndexField.php
includes/search/SearchNearMatchResultSet.php
includes/search/SearchResult.php
includes/search/SearchResultSet.php
includes/search/SqlSearchResultSet.php
includes/services/CannotReplaceActiveServiceException.php [new file with mode: 0644]
includes/services/ContainerDisabledException.php [new file with mode: 0644]
includes/services/DestructibleService.php [new file with mode: 0644]
includes/services/NoSuchServiceException.php [new file with mode: 0644]
includes/services/SalvageableService.php [new file with mode: 0644]
includes/services/ServiceAlreadyDefinedException.php [new file with mode: 0644]
includes/services/ServiceContainer.php [new file with mode: 0644]
includes/services/ServiceDisabledException.php [new file with mode: 0644]
includes/session/PHPSessionHandler.php
includes/session/Session.php
includes/session/SessionBackend.php
includes/session/SessionManager.php
includes/site/DBSiteStore.php
includes/skins/BaseTemplate.php
includes/skins/SkinTemplate.php
includes/specialpage/AuthManagerSpecialPage.php
includes/specialpage/FormSpecialPage.php
includes/specialpage/LoginSignupSpecialPage.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialBooksources.php
includes/specials/SpecialBotPasswords.php
includes/specials/SpecialChangeContentModel.php
includes/specials/SpecialConfirmemail.php
includes/specials/SpecialContributions.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialEmailInvalidate.php
includes/specials/SpecialImport.php
includes/specials/SpecialMIMEsearch.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialNewpages.php [changed mode: 0644->0755]
includes/specials/SpecialPreferences.php
includes/specials/SpecialRandomInCategory.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialRevisiondelete.php
includes/specials/SpecialSearch.php
includes/specials/SpecialTags.php
includes/specials/SpecialUserrights.php
includes/specials/SpecialVersion.php
includes/specials/SpecialWatchlist.php
includes/specials/pagers/NewPagesPager.php
includes/tidy/Balancer.php
includes/upload/UploadBase.php
includes/upload/UploadFromChunks.php
includes/upload/UploadFromUrl.php
includes/upload/UploadStash.php
includes/user/BotPassword.php
includes/user/User.php
includes/user/UserRightsProxy.php
includes/utils/AutoloadGenerator.php
includes/utils/BatchRowIterator.php
includes/utils/BatchRowUpdate.php
includes/utils/IP.php [deleted file]
includes/utils/MWCryptHKDF.php
includes/utils/MWCryptHash.php [deleted file]
includes/utils/MWCryptRand.php
includes/utils/MWFileProps.php [new file with mode: 0644]
includes/utils/MWGrants.php [deleted file]
includes/utils/MWRestrictions.php
includes/utils/UIDGenerator.php
includes/utils/iterators/IteratorDecorator.php [deleted file]
includes/utils/iterators/NotRecursiveIterator.php [deleted file]
includes/widget/AUTHORS.txt
includes/widget/DateTimeInputWidget.php [new file with mode: 0644]
index.php
jsduck.json
languages/Language.php
languages/LanguageConverter.php
languages/classes/LanguageIu.php
languages/classes/LanguageKm.php
languages/classes/LanguageMy.php
languages/classes/LanguageRu.php
languages/classes/LanguageShi.php
languages/classes/LanguageTr.php
languages/classes/data/grammar.ru.json [deleted file]
languages/data/Names.php
languages/data/grammarTransformations/ru.json [new file with mode: 0644]
languages/i18n/ace.json
languages/i18n/an.json
languages/i18n/ar.json
languages/i18n/as.json
languages/i18n/ast.json
languages/i18n/az.json
languages/i18n/ba.json
languages/i18n/be-tarask.json
languages/i18n/be.json
languages/i18n/bg.json
languages/i18n/bn.json
languages/i18n/bqi.json
languages/i18n/br.json
languages/i18n/bs.json
languages/i18n/ca.json
languages/i18n/cdo.json
languages/i18n/ce.json
languages/i18n/ckb.json
languages/i18n/crh-cyrl.json
languages/i18n/cs.json
languages/i18n/cy.json
languages/i18n/da.json
languages/i18n/de.json
languages/i18n/diq.json
languages/i18n/dty.json
languages/i18n/egl.json
languages/i18n/el.json
languages/i18n/en.json
languages/i18n/eo.json
languages/i18n/es.json
languages/i18n/et.json
languages/i18n/eu.json
languages/i18n/fa.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/ga.json
languages/i18n/gl.json
languages/i18n/gor.json
languages/i18n/got.json
languages/i18n/gsw.json
languages/i18n/gu.json
languages/i18n/hak.json
languages/i18n/he.json
languages/i18n/hi.json
languages/i18n/hr.json
languages/i18n/hu.json
languages/i18n/hy.json
languages/i18n/ia.json
languages/i18n/id.json
languages/i18n/ilo.json
languages/i18n/is.json
languages/i18n/it.json
languages/i18n/ja.json
languages/i18n/jv.json
languages/i18n/ka.json
languages/i18n/kiu.json
languages/i18n/kk-cyrl.json
languages/i18n/kn.json
languages/i18n/ko.json
languages/i18n/ku-latn.json
languages/i18n/la.json
languages/i18n/lb.json
languages/i18n/lez.json
languages/i18n/li.json
languages/i18n/lij.json
languages/i18n/lt.json
languages/i18n/lv.json
languages/i18n/lzz.json
languages/i18n/mai.json
languages/i18n/mhr.json
languages/i18n/mk.json
languages/i18n/ml.json
languages/i18n/mr.json
languages/i18n/my.json
languages/i18n/myv.json
languages/i18n/nah.json
languages/i18n/nan.json
languages/i18n/nap.json
languages/i18n/nb.json
languages/i18n/ne.json
languages/i18n/nl.json
languages/i18n/nn.json
languages/i18n/nso.json
languages/i18n/olo.json
languages/i18n/or.json
languages/i18n/pl.json
languages/i18n/pnb.json
languages/i18n/pt-br.json
languages/i18n/pt.json
languages/i18n/qqq.json
languages/i18n/qu.json
languages/i18n/rm.json
languages/i18n/ro.json
languages/i18n/ru.json
languages/i18n/sa.json
languages/i18n/sah.json
languages/i18n/sd.json
languages/i18n/shn.json
languages/i18n/sk.json
languages/i18n/sl.json
languages/i18n/so.json
languages/i18n/sq.json
languages/i18n/sr-ec.json
languages/i18n/sr-el.json
languages/i18n/sv.json
languages/i18n/ta.json
languages/i18n/tcy.json
languages/i18n/te.json
languages/i18n/tl.json
languages/i18n/tr.json
languages/i18n/tt-cyrl.json
languages/i18n/tyv.json
languages/i18n/udm.json
languages/i18n/uk.json
languages/i18n/ur.json
languages/i18n/uz.json
languages/i18n/vec.json
languages/i18n/vi.json
languages/i18n/vro.json
languages/i18n/yi.json
languages/i18n/yo.json
languages/i18n/yue.json
languages/i18n/zh-hans.json
languages/i18n/zh-hant.json
languages/messages/MessagesEn.php
languages/messages/MessagesKn.php
languages/messages/MessagesLzh.php
languages/messages/MessagesNn.php
languages/messages/MessagesOlo.php
load.php
maintenance/Doxyfile
maintenance/Maintenance.php
maintenance/addRFCandPMIDInterwiki.php [new file with mode: 0644]
maintenance/archives/patch-change_tag-ct_id.sql [new file with mode: 0644]
maintenance/archives/patch-rc_ip_modify.sql [new file with mode: 0644]
maintenance/archives/patch-tag_summary-ts_id.sql [new file with mode: 0644]
maintenance/archives/upgradeLogging.php
maintenance/benchmarks/bench_delete_truncate.php
maintenance/benchmarks/benchmarkParse.php
maintenance/checkComposerLockUpToDate.php
maintenance/cleanupEmptyCategories.php
maintenance/convertUserOptions.php
maintenance/deleteOrphanedRevisions.php
maintenance/dev/includes/router.php
maintenance/doMaintenance.php
maintenance/dumpIterator.php
maintenance/dumpTextPass.php
maintenance/fetchText.php
maintenance/importImages.php
maintenance/importTextFiles.php
maintenance/initEditCount.php
maintenance/interwiki.list
maintenance/interwiki.sql
maintenance/jsduck/categories.json
maintenance/jsduck/custom_tags.rb
maintenance/jsduck/external.js
maintenance/lag.php
maintenance/language/checkDupeMessages.php
maintenance/language/digit2html.php
maintenance/migrateFileRepoLayout.php
maintenance/mssql/archives/patch-change_tag-ct_id.sql [new file with mode: 0644]
maintenance/mssql/archives/patch-tag_summary-ts_id.sql [new file with mode: 0644]
maintenance/mssql/tables.sql
maintenance/namespaceDupes.php
maintenance/oracle/archives/patch-change_tag-ct_id.sql [new file with mode: 0644]
maintenance/oracle/archives/patch-tag_summary-ts_id.sql [new file with mode: 0644]
maintenance/oracle/tables.sql
maintenance/orphans.php
maintenance/patchSql.php
maintenance/populateContentModel.php
maintenance/populateRecentChangesSource.php
maintenance/postgres/tables.sql
maintenance/preprocessorFuzzTest.php
maintenance/rebuildFileCache.php
maintenance/rebuildImages.php
maintenance/rebuildrecentchanges.php
maintenance/rebuildtextindex.php
maintenance/refreshImageMetadata.php
maintenance/refreshLinks.php
maintenance/sql.php
maintenance/sqlite/archives/patch-change_tag-ct_id.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-tag_summary-ts_id.sql [new file with mode: 0644]
maintenance/storage/compressOld.php
maintenance/storage/recompressTracked.php
maintenance/tables.sql
maintenance/update.php
maintenance/updateCollation.php
maintenance/validateRegistrationFile.php
resources/Resources.php
resources/lib/oojs-ui/oojs-ui-apex.js
resources/lib/oojs-ui/oojs-ui-core-apex.css
resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
resources/lib/oojs-ui/oojs-ui-core.js
resources/lib/oojs-ui/oojs-ui-mediawiki.js
resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
resources/lib/oojs-ui/oojs-ui-toolbars.js
resources/lib/oojs-ui/oojs-ui-widgets-apex.css
resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
resources/lib/oojs-ui/oojs-ui-widgets.js
resources/lib/oojs-ui/oojs-ui-windows-apex.css
resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
resources/lib/oojs-ui/oojs-ui-windows.js
resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png [new file with mode: 0644]
resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png [new file with mode: 0644]
resources/src/jquery/images/jquery.arrowSteps.head-ltr.png [new file with mode: 0644]
resources/src/jquery/images/jquery.arrowSteps.head-rtl.png [new file with mode: 0644]
resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png [new file with mode: 0644]
resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png [new file with mode: 0644]
resources/src/jquery/jquery.arrowSteps.css [new file with mode: 0644]
resources/src/jquery/jquery.arrowSteps.js [new file with mode: 0644]
resources/src/jquery/jquery.makeCollapsible.js
resources/src/mediawiki.action/mediawiki.action.view.metadata.js
resources/src/mediawiki.language/languages/ru.js
resources/src/mediawiki.legacy/commonPrint.css
resources/src/mediawiki.legacy/images/help-question-hover.gif [deleted file]
resources/src/mediawiki.legacy/images/help-question.gif [deleted file]
resources/src/mediawiki.legacy/shared.css
resources/src/mediawiki.less/mediawiki.ui/mixins.less
resources/src/mediawiki.less/mediawiki.ui/variables.less
resources/src/mediawiki.skinning/content.css
resources/src/mediawiki.skinning/elements.css
resources/src/mediawiki.special/mediawiki.special.apisandbox.css
resources/src/mediawiki.special/mediawiki.special.apisandbox.js
resources/src/mediawiki.special/mediawiki.special.search.styles.css
resources/src/mediawiki.special/mediawiki.special.userlogin.login.css
resources/src/mediawiki.ui/components/anchors.less
resources/src/mediawiki.ui/components/buttons.less
resources/src/mediawiki.ui/components/forms.less
resources/src/mediawiki.ui/components/inputs.less
resources/src/mediawiki.ui/components/text.less
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
resources/src/mediawiki.widgets.datetime/mediawiki.widgets.datetime.definitions.less
resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.less
resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js
resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.less
resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
resources/src/mediawiki/api/upload.js
resources/src/mediawiki/htmlform/datetime.js [new file with mode: 0644]
resources/src/mediawiki/htmlform/multiselect.js
resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
resources/src/mediawiki/mediawiki.Upload.BookletLayout.css
resources/src/mediawiki/mediawiki.Upload.BookletLayout.js
resources/src/mediawiki/mediawiki.Upload.Dialog.js
resources/src/mediawiki/mediawiki.experiments.js
resources/src/mediawiki/mediawiki.feedback.js
resources/src/mediawiki/mediawiki.jqueryMsg.js
resources/src/mediawiki/mediawiki.js
resources/src/mediawiki/mediawiki.log.js
resources/src/mediawiki/mediawiki.requestIdleCallback.js
resources/src/mediawiki/mediawiki.storage.js
resources/src/mediawiki/mediawiki.toc.js
resources/src/mediawiki/mediawiki.user.js
resources/src/mediawiki/mediawiki.util.js
resources/src/mediawiki/page/gallery-slideshow.js
resources/src/mediawiki/page/gallery.css
tests/common/TestsAutoLoader.php
tests/parser/ParserTestRunner.php
tests/parser/TestFileReader.php
tests/parser/fuzzTest.php
tests/parser/parserTests.txt
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/ResourceLoaderTestCase.php
tests/phpunit/data/upload/buggynamespace-bad.svg [new file with mode: 0644]
tests/phpunit/data/upload/buggynamespace-evilhtml.svg [new file with mode: 0644]
tests/phpunit/data/upload/buggynamespace-okay.svg [new file with mode: 0644]
tests/phpunit/data/upload/buggynamespace-okay2.svg [new file with mode: 0644]
tests/phpunit/data/upload/buggynamespace-original.svg [new file with mode: 0644]
tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php
tests/phpunit/includes/HtmlTest.php
tests/phpunit/includes/MWTimestampTest.php
tests/phpunit/includes/MediaWikiServicesTest.php
tests/phpunit/includes/MimeMagicTest.php [deleted file]
tests/phpunit/includes/PrefixSearchTest.php
tests/phpunit/includes/SanitizerTest.php
tests/phpunit/includes/StatusTest.php
tests/phpunit/includes/WatchedItemQueryServiceUnitTest.php
tests/phpunit/includes/WatchedItemStoreUnitTest.php
tests/phpunit/includes/WebRequestTest.php
tests/phpunit/includes/XmlSelectTest.php
tests/phpunit/includes/api/ApiLoginTest.php
tests/phpunit/includes/api/ApiMainTest.php
tests/phpunit/includes/api/ApiOpenSearchTest.php
tests/phpunit/includes/api/ApiQueryAllPagesTest.php
tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php
tests/phpunit/includes/api/ApiResultTest.php
tests/phpunit/includes/api/RandomImageGenerator.php
tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php
tests/phpunit/includes/auth/AuthManagerTest.php
tests/phpunit/includes/auth/AuthenticationResponseTest.php
tests/phpunit/includes/auth/CheckBlocksSecondaryAuthenticationProviderTest.php
tests/phpunit/includes/auth/TemporaryPasswordPrimaryAuthenticationProviderTest.php
tests/phpunit/includes/auth/ThrottlePreAuthenticationProviderTest.php
tests/phpunit/includes/changes/RecentChangeTest.php
tests/phpunit/includes/content/FileContentHandlerTest.php [new file with mode: 0644]
tests/phpunit/includes/content/WikitextContentHandlerTest.php
tests/phpunit/includes/db/DatabaseMysqlBaseTest.php
tests/phpunit/includes/db/DatabaseSQLTest.php
tests/phpunit/includes/db/DatabaseSqliteTest.php
tests/phpunit/includes/db/DatabaseTest.php
tests/phpunit/includes/db/DatabaseTestHelper.php
tests/phpunit/includes/db/LBFactoryTest.php
tests/phpunit/includes/filebackend/FileBackendTest.php
tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
tests/phpunit/includes/htmlform/HTMLRestrictionsFieldTest.php [new file with mode: 0644]
tests/phpunit/includes/installer/DatabaseUpdaterTest.php
tests/phpunit/includes/libs/IPTest.php [new file with mode: 0644]
tests/phpunit/includes/libs/MemoizedCallableTest.php
tests/phpunit/includes/libs/WaitConditionLoopTest.php [deleted file]
tests/phpunit/includes/libs/composer/ComposerJsonTest.php
tests/phpunit/includes/libs/composer/ComposerLockTest.php
tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php [new file with mode: 0644]
tests/phpunit/includes/libs/objectcache/BagOStuffTest.php
tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseDomainTest.php [new file with mode: 0644]
tests/phpunit/includes/libs/time/ConvertibleTimestampTest.php [new file with mode: 0644]
tests/phpunit/includes/libs/xmp/XMPTest.php [new file with mode: 0644]
tests/phpunit/includes/libs/xmp/XMPValidateTest.php [new file with mode: 0644]
tests/phpunit/includes/media/MediaWikiMediaTestCase.php
tests/phpunit/includes/media/XMPTest.php [deleted file]
tests/phpunit/includes/media/XMPValidateTest.php [deleted file]
tests/phpunit/includes/page/WikiCategoryPageTest.php
tests/phpunit/includes/page/WikiPageTest.php
tests/phpunit/includes/parser/ParserIntegrationTest.php
tests/phpunit/includes/parser/PreprocessorTest.php
tests/phpunit/includes/registration/ExtensionRegistryTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php
tests/phpunit/includes/search/SearchEngineTest.php
tests/phpunit/includes/session/PHPSessionHandlerTest.php
tests/phpunit/includes/session/SessionBackendTest.php
tests/phpunit/includes/session/SessionManagerTest.php
tests/phpunit/includes/session/TestUtils.php
tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php
tests/phpunit/includes/specials/SpecialBooksourcesTest.php
tests/phpunit/includes/upload/UploadBaseTest.php
tests/phpunit/includes/user/BotPasswordTest.php
tests/phpunit/includes/user/UserTest.php
tests/phpunit/includes/utils/BatchRowUpdateTest.php
tests/phpunit/includes/utils/IPTest.php [deleted file]
tests/phpunit/includes/utils/MWCryptHKDFTest.php
tests/phpunit/languages/classes/LanguageTrTest.php
tests/phpunit/mocks/filebackend/MockFSFile.php
tests/phpunit/mocks/filerepo/MockLocalRepo.php [new file with mode: 0644]
tests/phpunit/mocks/media/MockDjVuHandler.php
tests/phpunit/structure/ExtensionJsonValidationTest.php
tests/phpunit/suites/ParserTestFileSuite.php
tests/phpunit/suites/ParserTestTopLevelSuite.php
tests/qunit/data/defineCallMwLoaderTestCallback.js
tests/qunit/data/requireCallMwLoaderTestCallback.js
tests/qunit/data/testrunner.js
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.requestIdleCallback.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js

index 0ec44b8..148be02 100644 (file)
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=mediawiki/core.git
-defaultbranch=master
+track=1
 defaultrebase=0
diff --git a/.jscsrc b/.jscsrc
index f3db218..3f7e90d 100644 (file)
--- a/.jscsrc
+++ b/.jscsrc
@@ -10,7 +10,6 @@
                        "preset": "jsduck5",
                        "extra": {
                                "context": "some",
-                               "source": "some",
                                "see": "some"
                        }
                },
index 9062194..9738605 100644 (file)
@@ -55,7 +55,6 @@ notifications:
   email: false
   irc:
     channels:
-      - "chat.freenode.net#mediawiki-core"
       - "chat.freenode.net#mediawiki-feed"
     on_success: change
     on_failure: change
diff --git a/CREDITS b/CREDITS
index dca597e..46d5c9c 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -33,6 +33,7 @@ following names for their contribution to the product.
 * David McCabe
 * Derk-Jan Hartman
 * Domas Mituzas
+* Ed Sanders
 * Emufarmers
 * Fran Rogers
 * Greg Sabino Mullane
@@ -51,6 +52,7 @@ following names for their contribution to the product.
 * John Du Hart
 * Jon Harald Søby
 * Juliano F. Ravasi
+* JuneHyeon Bae
 * Leo Koppelkamm
 * Leon Weber
 * Leslie Hoare
@@ -157,7 +159,6 @@ following names for their contribution to the product.
 * Jimmy Xu
 * John N
 * Jonathan Wiltshire
-* JuneHyeon Bae
 * Jure Kajzer
 * Karun Dambiec
 * Katie Filbert
diff --git a/FAQ b/FAQ
index cfacf14..29017bc 100644 (file)
--- a/FAQ
+++ b/FAQ
@@ -1,2 +1,2 @@
 The MediaWiki FAQ can be found at:
-https://www.mediawiki.org/wiki/Manual:FAQ
+https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ
\ No newline at end of file
diff --git a/HISTORY b/HISTORY
index 868b21a..6de7de4 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -1001,8 +1001,8 @@ This is a bug fix release of the MediaWiki 1.25 branch.
 * Added a new hook, "ContentAlterParserOutput", to allow extensions to modify the
   parser output for a content object before links update.
 * (T37785) Enhanced recent changes and extended watchlist are now default.
-  Documentation: https://meta.wikimedia.org/wiki/Help:Enhanced_recent_changes
-  and https://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions.
+  Documentation: https://meta.wikimedia.org/wiki/Special:MyLanguage/Help:Enhanced_recent_changes
+  and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgDefaultUserOptions.
 * (T69341) SVG images will no longer be base64-encoded when being embedded
   in CSS. This results in slight size increase before gzip compression (due to
   percent-encoding), but up to 20% decrease after it.
@@ -1014,7 +1014,7 @@ This is a bug fix release of the MediaWiki 1.25 branch.
   - Basic wikitext syntax: <indicator name="foo">[[File:Foo.svg|20px]]</indicator>
   - Usage instructions: https://www.mediawiki.org/wiki/Help:Page_status_indicators
   - Adjusting custom skins to support indicators:
-    https://www.mediawiki.org/wiki/Manual:Skinning#Page_status_indicators
+    https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Skinning#Page_status_indicators
 * Edit tokens may now be time-limited: passing a maximum age to
   User::matchEditToken will reject any older tokens.
 * The debug logging internals have been overhauled, and are now using the
@@ -1087,7 +1087,7 @@ This is a bug fix release of the MediaWiki 1.25 branch.
    This library provides the interfaces set by the PSR-3 standard (http://www.php-fig.org/psr/psr-3/)
    which are used by MediaWiki internally via the
    MediaWiki\Logger\LoggerFactory class.
-   See the structured logging RfC (https://www.mediawiki.org/wiki/Requests_for_comment/Structured_logging)
+   See the structured logging RfC (https://www.mediawiki.org/wiki/Special:MyLanguage/Requests_for_comment/Structured_logging)
    for more background information.
 ** cssjanus/cssjanus
    This library was formerly bundled with MediaWiki core and has been removed.
@@ -1098,7 +1098,7 @@ This is a bug fix release of the MediaWiki 1.25 branch.
 ** wikimedia/cdb
    This library was formerly a part of MediaWiki core, and has been moved into a separate library.
    It provides CDB functions which are used in the Interwiki and Localization caches.
-   More information about the library can be found at https://www.mediawiki.org/wiki/CDB.
+   More information about the library can be found at https://www.mediawiki.org/wiki/Special:MyLanguage/CDB.
 ** liuggio/statsd-php-client
    This library provides a StatsD client API for logging application metrics to a remote server.
 
diff --git a/INSTALL b/INSTALL
index 0e8eb92..90da381 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -21,7 +21,7 @@ If your PHP is configured as a CGI plug-in rather than an Apache module you may
 experience problems, as this configuration is not well tested.
 
 Support for rendering mathematical formulas requires installing the Math extension,
-see https://www.mediawiki.org/wiki/Extension:Math
+see https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:Math
 
 Don't forget to check the RELEASE-NOTES file...
 
@@ -30,7 +30,7 @@ Additional documentation is available online, which may include more detailed
 notes on particular operating systems and workarounds for difficult hosting
 environments:
 
-https://www.mediawiki.org/wiki/Manual:Installation_guide
+https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Installation_guide
 
 
 ******************* WARNING *******************
diff --git a/README b/README
index 6352e62..6d3ab80 100644 (file)
--- a/README
+++ b/README
@@ -17,15 +17,15 @@ For system requirements, installation, and upgrade details, see the files
 RELEASE-NOTES, INSTALL, and UPGRADE.
 
 * Ready to get started?
-** https://www.mediawiki.org/wiki/Download
+** https://www.mediawiki.org/wiki/Special:MyLanguage/Download
 * Looking for the technical manual?
-** https://www.mediawiki.org/wiki/Manual:Contents
+** https://www.mediawiki.org/wiki/Special:MyLangyage/Manual:Contents
 * Seeking help from a person?
-** https://www.mediawiki.org/wiki/Communication
+** https://www.mediawiki.org/wiki/Special:MyLanguage/Communication
 * Looking to file a bug report or a feature request?
 ** https://bugs.mediawiki.org/
 * Interested in helping out?
-** https://www.mediawiki.org/wiki/How_to_contribute
+** https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute
 
 MediaWiki is the result of global collaboration and cooperation. The CREDITS
 file lists technical contributors to the project. The COPYING file explains
index dfa482a..a2a986f 100644 (file)
@@ -6,6 +6,7 @@ MediaWiki 1.28 is an alpha-quality branch and is not recommended for use in
 production.
 
 === Configuration changes in 1.28 ===
+* $wgSend404Code now affects status code of action=history if the page is not there.
 * BREAKING CHANGE: $wgHTTPProxy is now *required* for all external requests
   made by MediaWiki via a proxy. Relying on the http_proxy environment
   variable is no longer supported.
@@ -26,7 +27,7 @@ production.
   https://www.mediawiki.org/beacon with basic information about the local
   MediaWiki installation. This data includes, for example, the type of system,
   PHP version, and chosen database backend. This behavior is off by default.
-* When $EditSubmitButtonLabelPublish is true, MediaWiki will label the button
+* When $wgEditSubmitButtonLabelPublish is true, MediaWiki will label the button
   to store-to-database-and-show-to-others as "Publish page"/"Publish changes";
   if false, the default, they will be "Save page"/"Save changes".
 * The 'editcontentmodel' permission is now granted to all logged-in users ('user').
@@ -60,17 +61,25 @@ production.
   on the wiki farm with a different domain, MediaWiki will instead alter the redirect
   URL to include a ?cpPosTime parameter that triggers the database synchronization when
   the URL is followed by the client. The same-domain case uses a new cpPosTime cookie.
+* Added new hooks, 'ApiQueryBaseBeforeQuery', 'ApiQueryBaseAfterQuery', and
+  'ApiQueryBaseProcessRow', to make it easier for extensions to add 'prop' and
+  'show' parameters to existing API query modules.
 
 === External library changes in 1.28 ===
 
 ==== Upgraded external libraries ====
 * Updated es5-shim from v4.1.5 to v4.5.8
+* Updated composer/semver from v1.4.1 to v1.4.2
+* Updated wikimedia/php-session-serializer from v1.0.3 to v1.0.4
 
 ==== New external libraries ====
+* Added wikimedia/scoped-callback v1.0.0
+* Added wikimedia/wait-condition-loop v1.0.1
 
 ==== Removed and replaced external libraries ====
 
 === Bug fixes in 1.28 ===
+* (T146496) action=history pages should return 404 HTTP error code if the page does not exist
 * (T137264) SECURITY: XSS in unclosed internal links
 * (T133147) SECURITY: Escape '<' and ']]>' in inline <style> blocks
 * (T133147) SECURITY: Require login to preview user CSS pages
@@ -108,12 +117,53 @@ production.
   indicated by a 'fromencoded' boolean alongside the existing 'from' parameter.
 * (T28680) action=paraminfo can now return info about all submodules of a
   module without listing them all explicitly.
+* (T146770) It is now possible to assert that the current user is a specific
+  named user, using the 'assertuser' parameter.
+* (T141963) Added a 'known' property when missing-but-known titles (e.g. from
+  the 'TitleIsAlwaysKnown' hook) are output in various modules.
 
 === Action API internal changes in 1.28 ===
 * Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
   interact with ApiParse and ApiExpandTemplates.
 * (T139565) SECURITY: API: Generate head items in the context of the given title
 * (T115333) SECURITY: Check read permission when loading page content in ApiParse
+* ApiBase::getResultData() was removed (deprecated since 1.25)
+* ApiBase::makeHelpArrayToString() was removed (deprecated since 1.25)
+* ApiBase::makeHelpMsgParameters() was removed (deprecated since 1.25)
+* ApiBase::makeHelpMsg() was removed (deprecated since 1.25)
+* ApiFormatBase::formatHTML() was removed (deprecated since 1.25)
+* ApiFormatBase::getNeedsRawData() was removed (deprecated since 1.25)
+* ApiFormatBase::getWantsHelp() was removed (deprecated since 1.25)
+* ApiFormatBase::setBufferResult() was removed (deprecated since 1.25)
+* ApiFormatBase::setHelp() was removed (deprecated since 1.25)
+* ApiFormatBase::setUnescapeAmps() was removed (deprecated since 1.25)
+* ApiMain::makeHelpMsgHeader() was removed (deprecated since 1.25)
+* ApiMain::reallyMakeHelpMsg() was removed (deprecated since 1.25)
+* ApiMain::setHelp() was removed (deprecated since 1.25)
+* ApiResult::beginContinuation() was removed (deprecated since 1.25)
+* ApiResult::cleanUpUTF8() was removed (deprecated since 1.25)
+* ApiResult::convertStatusToArray() was removed (deprecated since 1.25)
+* ApiResult::disableSizeCheck() was removed (deprecated since 1.24)
+* ApiResult::enableSizeCheck() was removed (deprecated since 1.24)
+* ApiResult::endContinuation() was removed (deprecated since 1.25)
+* ApiResult::getData() was removed (deprecated since 1.25)
+* ApiResult::getIsRawMode() was removed (deprecated since 1.25)
+* ApiResult::setContent() was removed (deprecated since 1.25)
+* ApiResult::setContinueParam() was removed (deprecated since 1.25)
+* ApiResult::setElement() was removed (deprecated since 1.25)
+* ApiResult::setGeneratorContinueParam() was removed (deprecated since 1.25)
+* ApiResult::setIndexedTagName_internal() was removed (deprecated since 1.25)
+* ApiResult::setIndexedTagName_recursive() was removed (deprecated since 1.25)
+* ApiResult::setMainForContinuation() was removed (deprecated since 1.25)
+* ApiResult::setParsedLimit() was removed (deprecated since 1.25)
+* ApiResult::setRawMode() was removed (deprecated since 1.25)
+* ApiResult::size() was removed (deprecated since 1.25)
+* Added new hooks, 'ApiQueryBaseBeforeQuery', 'ApiQueryBaseAfterQuery', and
+  'ApiQueryBaseProcessRow', to make it easier for extensions to add 'prop' and
+  'show' parameters to existing API query modules. A query module can enable
+  these hooks by passing an array for $hookData to ApiQueryBase::select() and
+  by calling ApiQueryBase->processRow() before adding a row's data to the
+  result.
 
 === Languages updated in 1.28 ===
 
@@ -125,7 +175,8 @@ changes to languages because of Phabricator reports.
   BASAbali, M. Adiputra, Naval Scene, Nemo bis, NoiX180, and 아라.
 * (T135867) shn (Shan), thanks to translators Khun Sar, Piangpha,
   Saiddzone Saimawnkham, Saosukham, and Sengwan.
-* Czech (cs) and Slovak (sk) set as reciprocal fallbacks
+* Czech (cs) and Slovak (sk) set as reciprocal fallbacks.
+* (T146744) Livvi-Karelian (olo) namespace messages created thanks to translator Ilja.mos.
 
 === Other changes in 1.28 ===
 * (T128697) Improved handling of large diffs.
@@ -144,6 +195,7 @@ changes to languages because of Phabricator reports.
   MediaWiki\Linker\LinkRenderer. In addition, the LinkBegin and LinkEnd hooks
   were replaced by HtmlPageLinkRendererBegin and HtmlPageLinkRendererEnd
   respectively. See docs/hooks.txt for the specific changes needed for those hooks.
+* Linker::formatSize() was deprecated. Use Language::formatSize() directly.
 * Aliases for Linker methods, deprecated since 1.21, were removed from Skin:
   * Skin::commentBlock() (use Linker::commentBlock() instead)
   * Skin::generateRollback() (use Linker::generateRollback() instead)
@@ -170,7 +222,17 @@ changes to languages because of Phabricator reports.
   phpunit.php: --regex and --keep-uploads. Instead of --regex, use --filter.
   Instead of --keep-uploads, use the same option to parserTests.php, but you
   must specify a directory with --upload-dir.
-* The 'jquery.arrowSteps' ResourceLoader module was removed.
+* The 'jquery.arrowSteps' ResourceLoader module is now deprecated.
+* (T62604) Core parser functions returning a number now format the number according
+  to the page content language, not wiki content language.
+* IP::isConfiguredProxy() and IP::isTrustedProxy() were removed. Callers should
+  migrate to using the same functions on a ProxyLookup instance, obtainable from
+  MediaWikiServices.
+* The ArticleAfterFetchContent, ArticleInsertComplete, ArticleSave, ArticleSaveComplete,
+  ArticleViewCustom, EditFilterMerged, EditPageGetDiffText, EditPageGetPreviewText and
+  ShowRawCssJs hooks will now emit deprecation warnings if used.
+* (T68404) CSS3 attr() function with url type is no longer allowed
+  in inline styles.
 
 == Compatibility ==
 
diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
new file mode 100644 (file)
index 0000000..6c53809
--- /dev/null
@@ -0,0 +1,98 @@
+== MediaWiki 1.29 ==
+
+THIS IS NOT A RELEASE YET
+
+MediaWiki 1.29 is an alpha-quality branch and is not recommended for use in
+production.
+
+=== Configuration changes in 1.29 ===
+
+=== New features in 1.29 ===
+
+=== External library changes in 1.29 ===
+
+==== Upgraded external libraries ====
+
+==== New external libraries ====
+
+==== Removed and replaced external libraries ====
+
+=== Bug fixes in 1.29 ===
+
+=== Action API changes in 1.29 ===
+
+=== Action API internal changes in 1.29 ===
+
+=== Languages updated in 1.29 ===
+
+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.
+
+=== Other changes in 1.29 ===
+
+== Compatibility ==
+
+MediaWiki 1.29 requires PHP 5.5.9 or later. There is experimental support for
+HHVM 3.6.5 or later.
+
+MySQL 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.0.3 or later
+* PostgreSQL 8.3 or later
+* SQLite 3.3.7 or later
+* Oracle 9.0.1 or later
+* Microsoft SQL Server 2005 (9.00.1399)
+
+== Upgrading ==
+
+1.29 has several database changes since 1.28, 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).
+
+If upgrading from before 1.11, and you are using a wiki as a commons
+repository, make sure that it is updated as well. Otherwise, errors may arise
+due to database schema changes.
+
+If upgrading from before 1.7, you may want to run refreshLinks.php to ensure
+new database fields are filled with data.
+
+If you are upgrading from MediaWiki 1.4.x or earlier, you should upgrade to
+1.5 first. The upgrade script maintenance/upgrade1_5.php has been removed
+with MediaWiki 1.21.
+
+Don't forget to always back up your database before upgrading!
+
+See the file UPGRADE for more detailed upgrade instructions.
+
+For notes on 1.28.x and older releases, see HISTORY.
+
+== 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.
index 393a01c..17e5df6 100644 (file)
@@ -5,10 +5,12 @@ global $wgAutoloadLocalClasses;
 
 $wgAutoloadLocalClasses = [
        'APCBagOStuff' => __DIR__ . '/includes/libs/objectcache/APCBagOStuff.php',
+       'APCUBagOStuff' => __DIR__ . '/includes/libs/objectcache/APCUBagOStuff.php',
        'AbstractContent' => __DIR__ . '/includes/content/AbstractContent.php',
        'Action' => __DIR__ . '/includes/actions/Action.php',
        'ActiveUsersPager' => __DIR__ . '/includes/specials/pagers/ActiveUsersPager.php',
        'ActivityUpdateJob' => __DIR__ . '/includes/jobqueue/jobs/ActivityUpdateJob.php',
+       'AddRFCAndPMIDInterwiki' => __DIR__ . '/maintenance/addRFCandPMIDInterwiki.php',
        'AjaxDispatcher' => __DIR__ . '/includes/AjaxDispatcher.php',
        'AjaxResponse' => __DIR__ . '/includes/AjaxResponse.php',
        'AllMessagesTablePager' => __DIR__ . '/includes/specials/pagers/AllMessagesTablePager.php',
@@ -153,6 +155,7 @@ $wgAutoloadLocalClasses = [
        'AtomFeed' => __DIR__ . '/includes/Feed.php',
        'AtomicSectionUpdate' => __DIR__ . '/includes/deferred/AtomicSectionUpdate.php',
        'AttachLatest' => __DIR__ . '/maintenance/attachLatest.php',
+       'AugmentPageProps' => __DIR__ . '/includes/search/AugmentPageProps.php',
        'AuthManagerSpecialPage' => __DIR__ . '/includes/specialpage/AuthManagerSpecialPage.php',
        'AuthPlugin' => __DIR__ . '/includes/AuthPlugin.php',
        'AuthPluginUser' => __DIR__ . '/includes/AuthPlugin.php',
@@ -189,7 +192,7 @@ $wgAutoloadLocalClasses = [
        'BitmapHandler' => __DIR__ . '/includes/media/Bitmap.php',
        'BitmapHandler_ClientOnly' => __DIR__ . '/includes/media/Bitmap_ClientOnly.php',
        'BitmapMetadataHandler' => __DIR__ . '/includes/media/BitmapMetadataHandler.php',
-       'Blob' => __DIR__ . '/includes/db/DatabaseUtility.php',
+       'Blob' => __DIR__ . '/includes/libs/rdbms/encasing/Blob.php',
        'Block' => __DIR__ . '/includes/Block.php',
        'BlockLevelPass' => __DIR__ . '/includes/parser/BlockLevelPass.php',
        'BlockListPager' => __DIR__ . '/includes/specials/pagers/BlockListPager.php',
@@ -241,7 +244,7 @@ $wgAutoloadLocalClasses = [
        'CheckStorage' => __DIR__ . '/maintenance/storage/checkStorage.php',
        'CheckSyntax' => __DIR__ . '/maintenance/checkSyntax.php',
        'CheckUsernames' => __DIR__ . '/maintenance/checkUsernames.php',
-       'ChronologyProtector' => __DIR__ . '/includes/db/ChronologyProtector.php',
+       'ChronologyProtector' => __DIR__ . '/includes/libs/rdbms/ChronologyProtector.php',
        'ClassCollector' => __DIR__ . '/includes/utils/AutoloadGenerator.php',
        'CleanupAncientTables' => __DIR__ . '/maintenance/cleanupAncientTables.php',
        'CleanupBlocks' => __DIR__ . '/maintenance/cleanupBlocks.php',
@@ -281,50 +284,55 @@ $wgAutoloadLocalClasses = [
        'ConvertLinks' => __DIR__ . '/maintenance/convertLinks.php',
        'ConvertUserOptions' => __DIR__ . '/maintenance/convertUserOptions.php',
        'ConverterRule' => __DIR__ . '/languages/ConverterRule.php',
+       'ConvertibleTimestamp' => __DIR__ . '/includes/libs/time/ConvertibleTimestamp.php',
        'Cookie' => __DIR__ . '/includes/libs/Cookie.php',
        'CookieJar' => __DIR__ . '/includes/libs/CookieJar.php',
        'CopyFileBackend' => __DIR__ . '/maintenance/copyFileBackend.php',
-       'CopyFileOp' => __DIR__ . '/includes/filebackend/FileOp.php',
+       'CopyFileOp' => __DIR__ . '/includes/libs/filebackend/fileop/CopyFileOp.php',
        'CopyJobQueue' => __DIR__ . '/maintenance/copyJobQueue.php',
        'CoreParserFunctions' => __DIR__ . '/includes/parser/CoreParserFunctions.php',
        'CoreTagHooks' => __DIR__ . '/includes/parser/CoreTagHooks.php',
        'CoreVersionChecker' => __DIR__ . '/includes/registration/CoreVersionChecker.php',
        'CreateAndPromote' => __DIR__ . '/maintenance/createAndPromote.php',
-       'CreateFileOp' => __DIR__ . '/includes/filebackend/FileOp.php',
+       'CreateFileOp' => __DIR__ . '/includes/libs/filebackend/fileop/CreateFileOp.php',
        'CreditsAction' => __DIR__ . '/includes/actions/CreditsAction.php',
+       'CryptHKDF' => __DIR__ . '/includes/libs/CryptHKDF.php',
+       'CryptRand' => __DIR__ . '/includes/libs/CryptRand.php',
        'CssContent' => __DIR__ . '/includes/content/CssContent.php',
        'CssContentHandler' => __DIR__ . '/includes/content/CssContentHandler.php',
        'CsvStatsOutput' => __DIR__ . '/maintenance/language/StatOutputs.php',
-       'CurlHttpRequest' => __DIR__ . '/includes/HttpFunctions.php',
+       'CurlHttpRequest' => __DIR__ . '/includes/http/CurlHttpRequest.php',
        'DBAccessBase' => __DIR__ . '/includes/dao/DBAccessBase.php',
-       'DBAccessError' => __DIR__ . '/includes/db/DatabaseError.php',
+       'DBAccessError' => __DIR__ . '/includes/libs/rdbms/exception/DBAccessError.php',
        'DBAccessObjectUtils' => __DIR__ . '/includes/dao/DBAccessObjectUtils.php',
-       'DBConnRef' => __DIR__ . '/includes/db/DBConnRef.php',
-       'DBConnectionError' => __DIR__ . '/includes/db/DatabaseError.php',
-       'DBError' => __DIR__ . '/includes/db/DatabaseError.php',
-       'DBExpectedError' => __DIR__ . '/includes/db/DatabaseError.php',
+       'DBConnRef' => __DIR__ . '/includes/libs/rdbms/database/DBConnRef.php',
+       'DBConnectionError' => __DIR__ . '/includes/libs/rdbms/exception/DBConnectionError.php',
+       'DBError' => __DIR__ . '/includes/libs/rdbms/exception/DBError.php',
+       'DBExpectedError' => __DIR__ . '/includes/libs/rdbms/exception/DBExpectedError.php',
        'DBFileJournal' => __DIR__ . '/includes/filebackend/filejournal/DBFileJournal.php',
-       'DBLockManager' => __DIR__ . '/includes/filebackend/lockmanager/DBLockManager.php',
-       'DBMasterPos' => __DIR__ . '/includes/db/DatabaseUtility.php',
-       'DBQueryError' => __DIR__ . '/includes/db/DatabaseError.php',
-       'DBReadOnlyError' => __DIR__ . '/includes/db/DatabaseError.php',
-       'DBReplicationWaitError' => __DIR__ . '/includes/db/DatabaseError.php',
+       'DBLockManager' => __DIR__ . '/includes/libs/lockmanager/DBLockManager.php',
+       'DBMasterPos' => __DIR__ . '/includes/libs/rdbms/database/position/DBMasterPos.php',
+       'DBQueryError' => __DIR__ . '/includes/libs/rdbms/exception/DBQueryError.php',
+       'DBReadOnlyError' => __DIR__ . '/includes/libs/rdbms/exception/DBReadOnlyError.php',
+       'DBReplicationWaitError' => __DIR__ . '/includes/libs/rdbms/exception/DBReplicationWaitError.php',
        'DBSiteStore' => __DIR__ . '/includes/site/DBSiteStore.php',
-       'DBTransactionError' => __DIR__ . '/includes/db/DatabaseError.php',
-       'DBUnexpectedError' => __DIR__ . '/includes/db/DatabaseError.php',
+       'DBTransactionError' => __DIR__ . '/includes/libs/rdbms/exception/DBTransactionError.php',
+       'DBTransactionSizeError' => __DIR__ . '/includes/libs/rdbms/exception/DBTransactionSizeError.php',
+       'DBUnexpectedError' => __DIR__ . '/includes/libs/rdbms/exception/DBUnexpectedError.php',
        'DataUpdate' => __DIR__ . '/includes/deferred/DataUpdate.php',
-       'Database' => __DIR__ . '/includes/db/Database.php',
-       'DatabaseBase' => __DIR__ . '/includes/db/Database.php',
+       'Database' => __DIR__ . '/includes/libs/rdbms/database/Database.php',
+       'DatabaseBase' => __DIR__ . '/includes/libs/rdbms/database/Database.php',
+       'DatabaseDomain' => __DIR__ . '/includes/libs/rdbms/database/DatabaseDomain.php',
        'DatabaseInstaller' => __DIR__ . '/includes/installer/DatabaseInstaller.php',
        'DatabaseLag' => __DIR__ . '/maintenance/lag.php',
        'DatabaseLogEntry' => __DIR__ . '/includes/logging/LogEntry.php',
        'DatabaseMssql' => __DIR__ . '/includes/db/DatabaseMssql.php',
-       'DatabaseMysql' => __DIR__ . '/includes/db/DatabaseMysql.php',
-       'DatabaseMysqlBase' => __DIR__ . '/includes/db/DatabaseMysqlBase.php',
-       'DatabaseMysqli' => __DIR__ . '/includes/db/DatabaseMysqli.php',
+       'DatabaseMysql' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMysql.php',
+       'DatabaseMysqlBase' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMysqlBase.php',
+       'DatabaseMysqli' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMysqli.php',
        'DatabaseOracle' => __DIR__ . '/includes/db/DatabaseOracle.php',
-       'DatabasePostgres' => __DIR__ . '/includes/db/DatabasePostgres.php',
-       'DatabaseSqlite' => __DIR__ . '/includes/db/DatabaseSqlite.php',
+       'DatabasePostgres' => __DIR__ . '/includes/libs/rdbms/database/DatabasePostgres.php',
+       'DatabaseSqlite' => __DIR__ . '/includes/libs/rdbms/database/DatabaseSqlite.php',
        'DatabaseUpdater' => __DIR__ . '/includes/installer/DatabaseUpdater.php',
        'DateFormats' => __DIR__ . '/maintenance/language/date-formats.php',
        'DateFormatter' => __DIR__ . '/includes/parser/DateFormatter.php',
@@ -339,7 +347,7 @@ $wgAutoloadLocalClasses = [
        'DeleteBatch' => __DIR__ . '/maintenance/deleteBatch.php',
        'DeleteDefaultMessages' => __DIR__ . '/maintenance/deleteDefaultMessages.php',
        'DeleteEqualMessages' => __DIR__ . '/maintenance/deleteEqualMessages.php',
-       'DeleteFileOp' => __DIR__ . '/includes/filebackend/FileOp.php',
+       'DeleteFileOp' => __DIR__ . '/includes/libs/filebackend/fileop/DeleteFileOp.php',
        'DeleteLinksJob' => __DIR__ . '/includes/jobqueue/jobs/DeleteLinksJob.php',
        'DeleteLogFormatter' => __DIR__ . '/includes/logging/DeleteLogFormatter.php',
        'DeleteOldRevisions' => __DIR__ . '/maintenance/deleteOldRevisions.php',
@@ -354,7 +362,7 @@ $wgAutoloadLocalClasses = [
        'DerivativeContext' => __DIR__ . '/includes/context/DerivativeContext.php',
        'DerivativeRequest' => __DIR__ . '/includes/DerivativeRequest.php',
        'DerivativeResourceLoaderContext' => __DIR__ . '/includes/resourceloader/DerivativeResourceLoaderContext.php',
-       'DescribeFileOp' => __DIR__ . '/includes/filebackend/FileOp.php',
+       'DescribeFileOp' => __DIR__ . '/includes/libs/filebackend/fileop/DescribeFileOp.php',
        'Diff' => __DIR__ . '/includes/diff/DairikiDiff.php',
        'DiffEngine' => __DIR__ . '/includes/diff/DiffEngine.php',
        'DiffFormatter' => __DIR__ . '/includes/diff/DiffFormatter.php',
@@ -428,18 +436,18 @@ $wgAutoloadLocalClasses = [
        'ExternalStoreHttp' => __DIR__ . '/includes/externalstore/ExternalStoreHttp.php',
        'ExternalStoreMedium' => __DIR__ . '/includes/externalstore/ExternalStoreMedium.php',
        'ExternalStoreMwstore' => __DIR__ . '/includes/externalstore/ExternalStoreMwstore.php',
-       'FSFile' => __DIR__ . '/includes/filebackend/FSFile.php',
-       'FSFileBackend' => __DIR__ . '/includes/filebackend/FSFileBackend.php',
-       'FSFileBackendDirList' => __DIR__ . '/includes/filebackend/FSFileBackend.php',
-       'FSFileBackendFileList' => __DIR__ . '/includes/filebackend/FSFileBackend.php',
-       'FSFileBackendList' => __DIR__ . '/includes/filebackend/FSFileBackend.php',
-       'FSFileOpHandle' => __DIR__ . '/includes/filebackend/FSFileBackend.php',
-       'FSLockManager' => __DIR__ . '/includes/filebackend/lockmanager/FSLockManager.php',
+       'FSFile' => __DIR__ . '/includes/libs/filebackend/fsfile/FSFile.php',
+       'FSFileBackend' => __DIR__ . '/includes/libs/filebackend/FSFileBackend.php',
+       'FSFileBackendDirList' => __DIR__ . '/includes/libs/filebackend/FSFileBackend.php',
+       'FSFileBackendFileList' => __DIR__ . '/includes/libs/filebackend/FSFileBackend.php',
+       'FSFileBackendList' => __DIR__ . '/includes/libs/filebackend/FSFileBackend.php',
+       'FSFileOpHandle' => __DIR__ . '/includes/libs/filebackend/FSFileBackend.php',
+       'FSLockManager' => __DIR__ . '/includes/libs/lockmanager/FSLockManager.php',
        'FSRepo' => __DIR__ . '/includes/filerepo/FSRepo.php',
        'FakeAuthTemplate' => __DIR__ . '/includes/specialpage/LoginSignupSpecialPage.php',
        'FakeConverter' => __DIR__ . '/languages/FakeConverter.php',
        'FakeMaintenance' => __DIR__ . '/maintenance/Maintenance.php',
-       'FakeResultWrapper' => __DIR__ . '/includes/db/DatabaseUtility.php',
+       'FakeResultWrapper' => __DIR__ . '/includes/libs/rdbms/database/resultwrapper/FakeResultWrapper.php',
        'FatalError' => __DIR__ . '/includes/exception/FatalError.php',
        'FauxRequest' => __DIR__ . '/includes/FauxRequest.php',
        'FauxResponse' => __DIR__ . '/includes/WebResponse.php',
@@ -447,29 +455,29 @@ $wgAutoloadLocalClasses = [
        'FeedUtils' => __DIR__ . '/includes/FeedUtils.php',
        'FetchText' => __DIR__ . '/maintenance/fetchText.php',
        'FewestrevisionsPage' => __DIR__ . '/includes/specials/SpecialFewestrevisions.php',
-       'Field' => __DIR__ . '/includes/db/DatabaseUtility.php',
+       'Field' => __DIR__ . '/includes/libs/rdbms/field/Field.php',
        'File' => __DIR__ . '/includes/filerepo/file/File.php',
        'FileAwareNodeVisitor' => __DIR__ . '/maintenance/findDeprecated.php',
-       'FileBackend' => __DIR__ . '/includes/filebackend/FileBackend.php',
+       'FileBackend' => __DIR__ . '/includes/libs/filebackend/FileBackend.php',
        'FileBackendDBRepoWrapper' => __DIR__ . '/includes/filerepo/FileBackendDBRepoWrapper.php',
-       'FileBackendError' => __DIR__ . '/includes/filebackend/FileBackend.php',
-       'FileBackendException' => __DIR__ . '/includes/filebackend/FileBackend.php',
+       'FileBackendError' => __DIR__ . '/includes/libs/filebackend/FileBackendError.php',
        'FileBackendGroup' => __DIR__ . '/includes/filebackend/FileBackendGroup.php',
-       'FileBackendMultiWrite' => __DIR__ . '/includes/filebackend/FileBackendMultiWrite.php',
-       'FileBackendStore' => __DIR__ . '/includes/filebackend/FileBackendStore.php',
-       'FileBackendStoreOpHandle' => __DIR__ . '/includes/filebackend/FileBackendStore.php',
-       'FileBackendStoreShardDirIterator' => __DIR__ . '/includes/filebackend/FileBackendStore.php',
-       'FileBackendStoreShardFileIterator' => __DIR__ . '/includes/filebackend/FileBackendStore.php',
-       'FileBackendStoreShardListIterator' => __DIR__ . '/includes/filebackend/FileBackendStore.php',
+       'FileBackendMultiWrite' => __DIR__ . '/includes/libs/filebackend/FileBackendMultiWrite.php',
+       'FileBackendStore' => __DIR__ . '/includes/libs/filebackend/FileBackendStore.php',
+       'FileBackendStoreOpHandle' => __DIR__ . '/includes/libs/filebackend/FileBackendStore.php',
+       'FileBackendStoreShardDirIterator' => __DIR__ . '/includes/libs/filebackend/FileBackendStore.php',
+       'FileBackendStoreShardFileIterator' => __DIR__ . '/includes/libs/filebackend/FileBackendStore.php',
+       'FileBackendStoreShardListIterator' => __DIR__ . '/includes/libs/filebackend/FileBackendStore.php',
        'FileBasedSiteLookup' => __DIR__ . '/includes/site/FileBasedSiteLookup.php',
        'FileCacheBase' => __DIR__ . '/includes/cache/FileCacheBase.php',
+       'FileContentHandler' => __DIR__ . '/includes/content/FileContentHandler.php',
        'FileContentsHasher' => __DIR__ . '/includes/utils/FileContentsHasher.php',
        'FileDeleteForm' => __DIR__ . '/includes/FileDeleteForm.php',
        'FileDependency' => __DIR__ . '/includes/cache/CacheDependency.php',
        'FileDuplicateSearchPage' => __DIR__ . '/includes/specials/SpecialFileDuplicateSearch.php',
-       'FileJournal' => __DIR__ . '/includes/filebackend/filejournal/FileJournal.php',
-       'FileOp' => __DIR__ . '/includes/filebackend/FileOp.php',
-       'FileOpBatch' => __DIR__ . '/includes/filebackend/FileOpBatch.php',
+       'FileJournal' => __DIR__ . '/includes/libs/filebackend/filejournal/FileJournal.php',
+       'FileOp' => __DIR__ . '/includes/libs/filebackend/fileop/FileOp.php',
+       'FileOpBatch' => __DIR__ . '/includes/libs/filebackend/FileOpBatch.php',
        'FileRepo' => __DIR__ . '/includes/filerepo/FileRepo.php',
        'FileRepoStatus' => __DIR__ . '/includes/filerepo/FileRepoStatus.php',
        'FindDeprecated' => __DIR__ . '/maintenance/findDeprecated.php',
@@ -523,6 +531,7 @@ $wgAutoloadLocalClasses = [
        'HTMLCheckField' => __DIR__ . '/includes/htmlform/fields/HTMLCheckField.php',
        'HTMLCheckMatrix' => __DIR__ . '/includes/htmlform/fields/HTMLCheckMatrix.php',
        'HTMLComboboxField' => __DIR__ . '/includes/htmlform/fields/HTMLComboboxField.php',
+       'HTMLDateTimeField' => __DIR__ . '/includes/htmlform/fields/HTMLDateTimeField.php',
        'HTMLEditTools' => __DIR__ . '/includes/htmlform/fields/HTMLEditTools.php',
        'HTMLFileCache' => __DIR__ . '/includes/cache/HTMLFileCache.php',
        'HTMLFloatField' => __DIR__ . '/includes/htmlform/fields/HTMLFloatField.php',
@@ -540,12 +549,14 @@ $wgAutoloadLocalClasses = [
        'HTMLMultiSelectField' => __DIR__ . '/includes/htmlform/fields/HTMLMultiSelectField.php',
        'HTMLNestedFilterable' => __DIR__ . '/includes/htmlform/HTMLNestedFilterable.php',
        'HTMLRadioField' => __DIR__ . '/includes/htmlform/fields/HTMLRadioField.php',
+       'HTMLRestrictionsField' => __DIR__ . '/includes/htmlform/fields/HTMLRestrictionsField.php',
        'HTMLSelectAndOtherField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectAndOtherField.php',
        'HTMLSelectField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectField.php',
        'HTMLSelectLimitField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectLimitField.php',
        'HTMLSelectNamespace' => __DIR__ . '/includes/htmlform/fields/HTMLSelectNamespace.php',
        'HTMLSelectNamespaceWithButton' => __DIR__ . '/includes/htmlform/fields/HTMLSelectNamespaceWithButton.php',
        'HTMLSelectOrOtherField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectOrOtherField.php',
+       'HTMLSizeFilterField' => __DIR__ . '/includes/htmlform/fields/HTMLSizeFilterField.php',
        'HTMLSubmitField' => __DIR__ . '/includes/htmlform/fields/HTMLSubmitField.php',
        'HTMLTagFilter' => __DIR__ . '/includes/htmlform/fields/HTMLTagFilter.php',
        'HTMLTextAreaField' => __DIR__ . '/includes/htmlform/fields/HTMLTextAreaField.php',
@@ -553,6 +564,7 @@ $wgAutoloadLocalClasses = [
        'HTMLTextFieldWithButton' => __DIR__ . '/includes/htmlform/fields/HTMLTextFieldWithButton.php',
        'HTMLTitleTextField' => __DIR__ . '/includes/htmlform/fields/HTMLTitleTextField.php',
        'HTMLUserTextField' => __DIR__ . '/includes/htmlform/fields/HTMLUserTextField.php',
+       'HTTPFileStreamer' => __DIR__ . '/includes/libs/filebackend/HTTPFileStreamer.php',
        'HWLDFWordAccumulator' => __DIR__ . '/includes/diff/DairikiDiff.php',
        'HashBagOStuff' => __DIR__ . '/includes/libs/objectcache/HashBagOStuff.php',
        'HashConfig' => __DIR__ . '/includes/config/HashConfig.php',
@@ -568,20 +580,23 @@ $wgAutoloadLocalClasses = [
        'Html' => __DIR__ . '/includes/Html.php',
        'HtmlArmor' => __DIR__ . '/includes/libs/HtmlArmor.php',
        'HtmlFormatter' => __DIR__ . '/includes/HtmlFormatter.php',
-       'Http' => __DIR__ . '/includes/HttpFunctions.php',
+       'Http' => __DIR__ . '/includes/http/Http.php',
        'HttpError' => __DIR__ . '/includes/exception/HttpError.php',
        'HttpStatus' => __DIR__ . '/includes/libs/HttpStatus.php',
        'IApiMessage' => __DIR__ . '/includes/api/ApiMessage.php',
        'ICacheHelper' => __DIR__ . '/includes/cache/CacheHelper.php',
        'IContextSource' => __DIR__ . '/includes/context/IContextSource.php',
        'IDBAccessObject' => __DIR__ . '/includes/dao/IDBAccessObject.php',
-       'IDatabase' => __DIR__ . '/includes/db/IDatabase.php',
-       'IEContentAnalyzer' => __DIR__ . '/includes/libs/IEContentAnalyzer.php',
+       'IDatabase' => __DIR__ . '/includes/libs/rdbms/database/IDatabase.php',
+       'IEContentAnalyzer' => __DIR__ . '/includes/libs/mime/IEContentAnalyzer.php',
        'IEUrlExtension' => __DIR__ . '/includes/libs/IEUrlExtension.php',
        'IExpiringStore' => __DIR__ . '/includes/libs/objectcache/IExpiringStore.php',
        'IJobSpecification' => __DIR__ . '/includes/jobqueue/JobSpecification.php',
-       'ILoadBalancer' => __DIR__ . '/includes/db/loadbalancer/ILoadBalancer.php',
-       'IP' => __DIR__ . '/includes/utils/IP.php',
+       'ILBFactory' => __DIR__ . '/includes/libs/rdbms/lbfactory/ILBFactory.php',
+       'ILoadBalancer' => __DIR__ . '/includes/libs/rdbms/loadbalancer/ILoadBalancer.php',
+       'ILoadMonitor' => __DIR__ . '/includes/libs/rdbms/loadmonitor/ILoadMonitor.php',
+       'IMaintainableDatabase' => __DIR__ . '/includes/libs/rdbms/database/IMaintainableDatabase.php',
+       'IP' => __DIR__ . '/includes/libs/IP.php',
        'IPSet' => __DIR__ . '/includes/compat/IPSetCompat.php',
        'IPTC' => __DIR__ . '/includes/media/IPTC.php',
        'IRCColourfulRCFeedFormatter' => __DIR__ . '/includes/rcfeed/IRCColourfulRCFeedFormatter.php',
@@ -618,7 +633,7 @@ $wgAutoloadLocalClasses = [
        'Interwiki' => __DIR__ . '/includes/interwiki/Interwiki.php',
        'InvalidPassword' => __DIR__ . '/includes/password/InvalidPassword.php',
        'InvalidateUserSesssions' => __DIR__ . '/maintenance/invalidateUserSessions.php',
-       'IteratorDecorator' => __DIR__ . '/includes/utils/iterators/IteratorDecorator.php',
+       'IteratorDecorator' => __DIR__ . '/includes/libs/iterators/IteratorDecorator.php',
        'IuConverter' => __DIR__ . '/languages/classes/LanguageIu.php',
        'JSCompilerContext' => __DIR__ . '/includes/libs/jsminplus.php',
        'JSMinPlus' => __DIR__ . '/includes/libs/jsminplus.php',
@@ -652,11 +667,10 @@ $wgAutoloadLocalClasses = [
        'JsonContentHandler' => __DIR__ . '/includes/content/JsonContentHandler.php',
        'KkConverter' => __DIR__ . '/languages/classes/LanguageKk.php',
        'KuConverter' => __DIR__ . '/languages/classes/LanguageKu.php',
-       'LBFactory' => __DIR__ . '/includes/db/loadbalancer/LBFactory.php',
-       'LBFactoryFake' => __DIR__ . '/includes/db/loadbalancer/LBFactoryFake.php',
-       'LBFactoryMulti' => __DIR__ . '/includes/db/loadbalancer/LBFactoryMulti.php',
-       'LBFactorySimple' => __DIR__ . '/includes/db/loadbalancer/LBFactorySimple.php',
-       'LBFactorySingle' => __DIR__ . '/includes/db/loadbalancer/LBFactorySingle.php',
+       'LBFactory' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactory.php',
+       'LBFactoryMulti' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactoryMulti.php',
+       'LBFactorySimple' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactorySimple.php',
+       'LBFactorySingle' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactorySingle.php',
        'LCStore' => __DIR__ . '/includes/cache/localisation/LCStore.php',
        'LCStoreCDB' => __DIR__ . '/includes/cache/localisation/LCStoreCDB.php',
        'LCStoreDB' => __DIR__ . '/includes/cache/localisation/LCStoreDB.php',
@@ -714,7 +728,7 @@ $wgAutoloadLocalClasses = [
        'LegacyLogFormatter' => __DIR__ . '/includes/logging/LogFormatter.php',
        'License' => __DIR__ . '/includes/Licenses.php',
        'Licenses' => __DIR__ . '/includes/Licenses.php',
-       'LikeMatch' => __DIR__ . '/includes/db/DatabaseUtility.php',
+       'LikeMatch' => __DIR__ . '/includes/libs/rdbms/encasing/LikeMatch.php',
        'LinkBatch' => __DIR__ . '/includes/cache/LinkBatch.php',
        'LinkCache' => __DIR__ . '/includes/cache/LinkCache.php',
        'LinkFilter' => __DIR__ . '/includes/LinkFilter.php',
@@ -727,8 +741,8 @@ $wgAutoloadLocalClasses = [
        'ListToggle' => __DIR__ . '/includes/ListToggle.php',
        'ListVariants' => __DIR__ . '/maintenance/language/listVariants.php',
        'ListredirectsPage' => __DIR__ . '/includes/specials/SpecialListredirects.php',
-       'LoadBalancer' => __DIR__ . '/includes/db/loadbalancer/LoadBalancer.php',
-       'LoadBalancerSingle' => __DIR__ . '/includes/db/loadbalancer/LBFactorySingle.php',
+       'LoadBalancer' => __DIR__ . '/includes/libs/rdbms/loadbalancer/LoadBalancer.php',
+       'LoadBalancerSingle' => __DIR__ . '/includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php',
        'LoadMonitor' => __DIR__ . '/includes/libs/rdbms/loadmonitor/LoadMonitor.php',
        'LoadMonitorMySQL' => __DIR__ . '/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php',
        'LoadMonitorNull' => __DIR__ . '/includes/libs/rdbms/loadmonitor/LoadMonitorNull.php',
@@ -742,7 +756,7 @@ $wgAutoloadLocalClasses = [
        'LocalSettingsGenerator' => __DIR__ . '/includes/installer/LocalSettingsGenerator.php',
        'LocalisationCache' => __DIR__ . '/includes/cache/localisation/LocalisationCache.php',
        'LocalisationCacheBulkLoad' => __DIR__ . '/includes/cache/localisation/LocalisationCacheBulkLoad.php',
-       'LockManager' => __DIR__ . '/includes/filebackend/lockmanager/LockManager.php',
+       'LockManager' => __DIR__ . '/includes/libs/lockmanager/LockManager.php',
        'LockManagerGroup' => __DIR__ . '/includes/filebackend/lockmanager/LockManagerGroup.php',
        'LogEntry' => __DIR__ . '/includes/logging/LogEntry.php',
        'LogEntryBase' => __DIR__ . '/includes/logging/LogEntry.php',
@@ -761,14 +775,17 @@ $wgAutoloadLocalClasses = [
        'MWCallableUpdate' => __DIR__ . '/includes/deferred/MWCallableUpdate.php',
        'MWContentSerializationException' => __DIR__ . '/includes/content/ContentHandler.php',
        'MWCryptHKDF' => __DIR__ . '/includes/utils/MWCryptHKDF.php',
-       'MWCryptHash' => __DIR__ . '/includes/utils/MWCryptHash.php',
+       'MWCryptHash' => __DIR__ . '/includes/libs/MWCryptHash.php',
        'MWCryptRand' => __DIR__ . '/includes/utils/MWCryptRand.php',
        'MWDebug' => __DIR__ . '/includes/debug/MWDebug.php',
        'MWDocGen' => __DIR__ . '/maintenance/mwdocgen.php',
        'MWException' => __DIR__ . '/includes/exception/MWException.php',
        'MWExceptionHandler' => __DIR__ . '/includes/exception/MWExceptionHandler.php',
-       'MWGrants' => __DIR__ . '/includes/utils/MWGrants.php',
-       'MWHttpRequest' => __DIR__ . '/includes/HttpFunctions.php',
+       'MWExceptionRenderer' => __DIR__ . '/includes/exception/MWExceptionRenderer.php',
+       'MWFileProps' => __DIR__ . '/includes/utils/MWFileProps.php',
+       'MWGrants' => __DIR__ . '/includes/MWGrants.php',
+       'MWHttpRequest' => __DIR__ . '/includes/http/MWHttpRequest.php',
+       'MWLBFactory' => __DIR__ . '/includes/db/MWLBFactory.php',
        'MWMemcached' => __DIR__ . '/includes/compat/MemcachedClientCompat.php',
        'MWMessagePack' => __DIR__ . '/includes/libs/MWMessagePack.php',
        'MWNamespace' => __DIR__ . '/includes/MWNamespace.php',
@@ -864,14 +881,14 @@ $wgAutoloadLocalClasses = [
        'MediaWiki\\Logger\\Spi' => __DIR__ . '/includes/debug/logger/Spi.php',
        'MediaWiki\\MediaWikiServices' => __DIR__ . '/includes/MediaWikiServices.php',
        'MediaWiki\\Search\\ParserOutputSearchDataExtractor' => __DIR__ . '/includes/search/ParserOutputSearchDataExtractor.php',
-       'MediaWiki\\Services\\CannotReplaceActiveServiceException' => __DIR__ . '/includes/Services/CannotReplaceActiveServiceException.php',
-       'MediaWiki\\Services\\ContainerDisabledException' => __DIR__ . '/includes/Services/ContainerDisabledException.php',
-       'MediaWiki\\Services\\DestructibleService' => __DIR__ . '/includes/Services/DestructibleService.php',
-       'MediaWiki\\Services\\NoSuchServiceException' => __DIR__ . '/includes/Services/NoSuchServiceException.php',
-       'MediaWiki\\Services\\SalvageableService' => __DIR__ . '/includes/Services/SalvageableService.php',
-       'MediaWiki\\Services\\ServiceAlreadyDefinedException' => __DIR__ . '/includes/Services/ServiceAlreadyDefinedException.php',
-       'MediaWiki\\Services\\ServiceContainer' => __DIR__ . '/includes/Services/ServiceContainer.php',
-       'MediaWiki\\Services\\ServiceDisabledException' => __DIR__ . '/includes/Services/ServiceDisabledException.php',
+       'MediaWiki\\Services\\CannotReplaceActiveServiceException' => __DIR__ . '/includes/services/CannotReplaceActiveServiceException.php',
+       'MediaWiki\\Services\\ContainerDisabledException' => __DIR__ . '/includes/services/ContainerDisabledException.php',
+       'MediaWiki\\Services\\DestructibleService' => __DIR__ . '/includes/services/DestructibleService.php',
+       'MediaWiki\\Services\\NoSuchServiceException' => __DIR__ . '/includes/services/NoSuchServiceException.php',
+       'MediaWiki\\Services\\SalvageableService' => __DIR__ . '/includes/services/SalvageableService.php',
+       'MediaWiki\\Services\\ServiceAlreadyDefinedException' => __DIR__ . '/includes/services/ServiceAlreadyDefinedException.php',
+       'MediaWiki\\Services\\ServiceContainer' => __DIR__ . '/includes/services/ServiceContainer.php',
+       'MediaWiki\\Services\\ServiceDisabledException' => __DIR__ . '/includes/services/ServiceDisabledException.php',
        'MediaWiki\\Session\\BotPasswordSessionProvider' => __DIR__ . '/includes/session/BotPasswordSessionProvider.php',
        'MediaWiki\\Session\\CookieSessionProvider' => __DIR__ . '/includes/session/CookieSessionProvider.php',
        'MediaWiki\\Session\\ImmutableSessionProviderWithCookie' => __DIR__ . '/includes/session/ImmutableSessionProviderWithCookie.php',
@@ -904,18 +921,19 @@ $wgAutoloadLocalClasses = [
        'MediaWiki\\Tidy\\TidyDriverBase' => __DIR__ . '/includes/tidy/TidyDriverBase.php',
        'MediaWiki\\Widget\\ComplexNamespaceInputWidget' => __DIR__ . '/includes/widget/ComplexNamespaceInputWidget.php',
        'MediaWiki\\Widget\\ComplexTitleInputWidget' => __DIR__ . '/includes/widget/ComplexTitleInputWidget.php',
+       'MediaWiki\\Widget\\DateTimeInputWidget' => __DIR__ . '/includes/widget/DateTimeInputWidget.php',
        'MediaWiki\\Widget\\NamespaceInputWidget' => __DIR__ . '/includes/widget/NamespaceInputWidget.php',
        'MediaWiki\\Widget\\SearchInputWidget' => __DIR__ . '/includes/widget/SearchInputWidget.php',
        'MediaWiki\\Widget\\TitleInputWidget' => __DIR__ . '/includes/widget/TitleInputWidget.php',
        'MediaWiki\\Widget\\UserInputWidget' => __DIR__ . '/includes/widget/UserInputWidget.php',
        'MemCachedClientforWiki' => __DIR__ . '/includes/compat/MemcachedClientCompat.php',
-       'MemcLockManager' => __DIR__ . '/includes/filebackend/lockmanager/MemcLockManager.php',
+       'MemcLockManager' => __DIR__ . '/includes/libs/lockmanager/MemcLockManager.php',
        'MemcachedBagOStuff' => __DIR__ . '/includes/libs/objectcache/MemcachedBagOStuff.php',
        'MemcachedClient' => __DIR__ . '/includes/libs/objectcache/MemcachedClient.php',
        'MemcachedPeclBagOStuff' => __DIR__ . '/includes/libs/objectcache/MemcachedPeclBagOStuff.php',
        'MemcachedPhpBagOStuff' => __DIR__ . '/includes/libs/objectcache/MemcachedPhpBagOStuff.php',
        'MemoizedCallable' => __DIR__ . '/includes/libs/MemoizedCallable.php',
-       'MemoryFileBackend' => __DIR__ . '/includes/filebackend/MemoryFileBackend.php',
+       'MemoryFileBackend' => __DIR__ . '/includes/libs/filebackend/MemoryFileBackend.php',
        'MergeHistory' => __DIR__ . '/includes/MergeHistory.php',
        'MergeHistoryPager' => __DIR__ . '/includes/specials/pagers/MergeHistoryPager.php',
        'MergeLogFormatter' => __DIR__ . '/includes/logging/MergeLogFormatter.php',
@@ -928,6 +946,7 @@ $wgAutoloadLocalClasses = [
        'MessageSpecifier' => __DIR__ . '/includes/libs/MessageSpecifier.php',
        'MigrateFileRepoLayout' => __DIR__ . '/maintenance/migrateFileRepoLayout.php',
        'MigrateUserGroup' => __DIR__ . '/maintenance/migrateUserGroup.php',
+       'MimeAnalyzer' => __DIR__ . '/includes/libs/mime/MimeAnalyzer.php',
        'MimeMagic' => __DIR__ . '/includes/MimeMagic.php',
        'MinifyScript' => __DIR__ . '/maintenance/minify.php',
        'MostcategoriesPage' => __DIR__ . '/includes/specials/SpecialMostcategories.php',
@@ -938,14 +957,14 @@ $wgAutoloadLocalClasses = [
        'MostlinkedTemplatesPage' => __DIR__ . '/includes/specials/SpecialMostlinkedtemplates.php',
        'MostrevisionsPage' => __DIR__ . '/includes/specials/SpecialMostrevisions.php',
        'MoveBatch' => __DIR__ . '/maintenance/moveBatch.php',
-       'MoveFileOp' => __DIR__ . '/includes/filebackend/FileOp.php',
+       'MoveFileOp' => __DIR__ . '/includes/libs/filebackend/fileop/MoveFileOp.php',
        'MoveLogFormatter' => __DIR__ . '/includes/logging/MoveLogFormatter.php',
        'MovePage' => __DIR__ . '/includes/MovePage.php',
        'MovePageForm' => __DIR__ . '/includes/specials/SpecialMovepage.php',
-       'MssqlBlob' => __DIR__ . '/includes/db/DatabaseMssql.php',
-       'MssqlField' => __DIR__ . '/includes/db/DatabaseMssql.php',
+       'MssqlBlob' => __DIR__ . '/includes/libs/rdbms/encasing/MssqlBlob.php',
+       'MssqlField' => __DIR__ . '/includes/libs/rdbms/field/MssqlField.php',
        'MssqlInstaller' => __DIR__ . '/includes/installer/MssqlInstaller.php',
-       'MssqlResultWrapper' => __DIR__ . '/includes/db/DatabaseMssql.php',
+       'MssqlResultWrapper' => __DIR__ . '/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php',
        'MssqlUpdater' => __DIR__ . '/includes/installer/MssqlUpdater.php',
        'MultiConfig' => __DIR__ . '/includes/config/MultiConfig.php',
        'MultiHttpClient' => __DIR__ . '/includes/libs/MultiHttpClient.php',
@@ -953,8 +972,8 @@ $wgAutoloadLocalClasses = [
        'MutableConfig' => __DIR__ . '/includes/config/MutableConfig.php',
        'MutableContext' => __DIR__ . '/includes/context/MutableContext.php',
        'MwSql' => __DIR__ . '/maintenance/sql.php',
-       'MySQLField' => __DIR__ . '/includes/db/DatabaseMysqlBase.php',
-       'MySQLMasterPos' => __DIR__ . '/includes/db/DatabaseMysqlBase.php',
+       'MySQLField' => __DIR__ . '/includes/libs/rdbms/field/MySQLField.php',
+       'MySQLMasterPos' => __DIR__ . '/includes/libs/rdbms/database/position/MySQLMasterPos.php',
        'MySqlLockManager' => __DIR__ . '/includes/filebackend/lockmanager/MySqlLockManager.php',
        'MysqlInstaller' => __DIR__ . '/includes/installer/MysqlInstaller.php',
        'MysqlUpdater' => __DIR__ . '/includes/installer/MysqlUpdater.php',
@@ -967,19 +986,19 @@ $wgAutoloadLocalClasses = [
        'NewPagesPager' => __DIR__ . '/includes/specials/pagers/NewPagesPager.php',
        'NewUsersLogFormatter' => __DIR__ . '/includes/logging/NewUsersLogFormatter.php',
        'NolinesImageGallery' => __DIR__ . '/includes/gallery/NolinesImageGallery.php',
-       'NotRecursiveIterator' => __DIR__ . '/includes/utils/iterators/NotRecursiveIterator.php',
+       'NotRecursiveIterator' => __DIR__ . '/includes/libs/iterators/NotRecursiveIterator.php',
        'NukeNS' => __DIR__ . '/maintenance/nukeNS.php',
        'NukePage' => __DIR__ . '/maintenance/nukePage.php',
-       'NullFileJournal' => __DIR__ . '/includes/filebackend/filejournal/FileJournal.php',
-       'NullFileOp' => __DIR__ . '/includes/filebackend/FileOp.php',
+       'NullFileJournal' => __DIR__ . '/includes/libs/filebackend/filejournal/NullFileJournal.php',
+       'NullFileOp' => __DIR__ . '/includes/libs/filebackend/fileop/NullFileOp.php',
        'NullIndexField' => __DIR__ . '/includes/search/NullIndexField.php',
        'NullJob' => __DIR__ . '/includes/jobqueue/jobs/NullJob.php',
-       'NullLockManager' => __DIR__ . '/includes/filebackend/lockmanager/LockManager.php',
+       'NullLockManager' => __DIR__ . '/includes/libs/lockmanager/NullLockManager.php',
        'NullRepo' => __DIR__ . '/includes/filerepo/NullRepo.php',
        'NullStatsdDataFactory' => __DIR__ . '/includes/libs/stats/NullStatsdDataFactory.php',
        'NumericUppercaseCollation' => __DIR__ . '/includes/collation/NumericUppercaseCollation.php',
        'OOUIHTMLForm' => __DIR__ . '/includes/htmlform/OOUIHTMLForm.php',
-       'ORAField' => __DIR__ . '/includes/db/DatabaseOracle.php',
+       'ORAField' => __DIR__ . '/includes/libs/rdbms/field/ORAField.php',
        'ORAResult' => __DIR__ . '/includes/db/DatabaseOracle.php',
        'ObjectCache' => __DIR__ . '/includes/objectcache/ObjectCache.php',
        'ObjectFactory' => __DIR__ . '/includes/libs/ObjectFactory.php',
@@ -1042,8 +1061,9 @@ $wgAutoloadLocalClasses = [
        'PatrolLog' => __DIR__ . '/includes/logging/PatrolLog.php',
        'PatrolLogFormatter' => __DIR__ . '/includes/logging/PatrolLogFormatter.php',
        'Pbkdf2Password' => __DIR__ . '/includes/password/Pbkdf2Password.php',
+       'PerRowAugmentor' => __DIR__ . '/includes/search/PerRowAugmentor.php',
        'PermissionsError' => __DIR__ . '/includes/exception/PermissionsError.php',
-       'PhpHttpRequest' => __DIR__ . '/includes/HttpFunctions.php',
+       'PhpHttpRequest' => __DIR__ . '/includes/http/PhpHttpRequest.php',
        'PhpXmlBugTester' => __DIR__ . '/includes/installer/PhpBugTests.php',
        'Pingback' => __DIR__ . '/includes/Pingback.php',
        'PoolCounter' => __DIR__ . '/includes/poolcounter/PoolCounter.php',
@@ -1063,9 +1083,9 @@ $wgAutoloadLocalClasses = [
        'PopulateRecentChangesSource' => __DIR__ . '/maintenance/populateRecentChangesSource.php',
        'PopulateRevisionLength' => __DIR__ . '/maintenance/populateRevisionLength.php',
        'PopulateRevisionSha1' => __DIR__ . '/maintenance/populateRevisionSha1.php',
-       'PostgreSqlLockManager' => __DIR__ . '/includes/filebackend/lockmanager/PostgreSqlLockManager.php',
-       'PostgresBlob' => __DIR__ . '/includes/db/DatabasePostgres.php',
-       'PostgresField' => __DIR__ . '/includes/db/DatabasePostgres.php',
+       'PostgreSqlLockManager' => __DIR__ . '/includes/libs/lockmanager/PostgreSqlLockManager.php',
+       'PostgresBlob' => __DIR__ . '/includes/libs/rdbms/encasing/PostgresBlob.php',
+       'PostgresField' => __DIR__ . '/includes/libs/rdbms/field/PostgresField.php',
        'PostgresInstaller' => __DIR__ . '/includes/installer/PostgresInstaller.php',
        'PostgresUpdater' => __DIR__ . '/includes/installer/PostgresUpdater.php',
        'Preferences' => __DIR__ . '/includes/Preferences.php',
@@ -1093,6 +1113,7 @@ $wgAutoloadLocalClasses = [
        'ProtectedPagesPager' => __DIR__ . '/includes/specials/SpecialProtectedpages.php',
        'ProtectedTitlesPager' => __DIR__ . '/includes/specials/pagers/ProtectedTitlesPager.php',
        'ProtectionForm' => __DIR__ . '/includes/ProtectionForm.php',
+       'ProxyLookup' => __DIR__ . '/includes/ProxyLookup.php',
        'PruneFileCache' => __DIR__ . '/maintenance/pruneFileCache.php',
        'PublishStashedFileJob' => __DIR__ . '/includes/jobqueue/jobs/PublishStashedFileJob.php',
        'PurgeAction' => __DIR__ . '/includes/actions/PurgeAction.php',
@@ -1104,7 +1125,7 @@ $wgAutoloadLocalClasses = [
        'PurgeParserCache' => __DIR__ . '/maintenance/purgeParserCache.php',
        'QueryPage' => __DIR__ . '/includes/specialpage/QueryPage.php',
        'QuickTemplate' => __DIR__ . '/includes/skins/QuickTemplate.php',
-       'QuorumLockManager' => __DIR__ . '/includes/filebackend/lockmanager/QuorumLockManager.php',
+       'QuorumLockManager' => __DIR__ . '/includes/libs/lockmanager/QuorumLockManager.php',
        'RCCacheEntry' => __DIR__ . '/includes/changes/RCCacheEntry.php',
        'RCCacheEntryFactory' => __DIR__ . '/includes/changes/RCCacheEntryFactory.php',
        'RCDatabaseLogEntry' => __DIR__ . '/includes/logging/LogEntry.php',
@@ -1130,10 +1151,10 @@ $wgAutoloadLocalClasses = [
        'RecompressTracked' => __DIR__ . '/maintenance/storage/recompressTracked.php',
        'RedirectSpecialArticle' => __DIR__ . '/includes/specialpage/RedirectSpecialPage.php',
        'RedirectSpecialPage' => __DIR__ . '/includes/specialpage/RedirectSpecialPage.php',
-       'RedisBagOStuff' => __DIR__ . '/includes/objectcache/RedisBagOStuff.php',
-       'RedisConnRef' => __DIR__ . '/includes/clientpool/RedisConnectionPool.php',
-       'RedisConnectionPool' => __DIR__ . '/includes/clientpool/RedisConnectionPool.php',
-       'RedisLockManager' => __DIR__ . '/includes/filebackend/lockmanager/RedisLockManager.php',
+       'RedisBagOStuff' => __DIR__ . '/includes/libs/objectcache/RedisBagOStuff.php',
+       'RedisConnRef' => __DIR__ . '/includes/libs/redis/RedisConnRef.php',
+       'RedisConnectionPool' => __DIR__ . '/includes/libs/redis/RedisConnectionPool.php',
+       'RedisLockManager' => __DIR__ . '/includes/libs/lockmanager/RedisLockManager.php',
        'RedisPubSubFeedEngine' => __DIR__ . '/includes/rcfeed/RedisPubSubFeedEngine.php',
        'RefreshFileHeaders' => __DIR__ . '/maintenance/refreshFileHeaders.php',
        'RefreshImageMetadata' => __DIR__ . '/maintenance/refreshImageMetadata.php',
@@ -1181,7 +1202,9 @@ $wgAutoloadLocalClasses = [
        'ResourceLoaderUserTokensModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderUserTokensModule.php',
        'ResourceLoaderWikiModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderWikiModule.php',
        'RestbaseVirtualRESTService' => __DIR__ . '/includes/libs/virtualrest/RestbaseVirtualRESTService.php',
-       'ResultWrapper' => __DIR__ . '/includes/db/DatabaseUtility.php',
+       'ResultAugmentor' => __DIR__ . '/includes/search/ResultAugmentor.php',
+       'ResultSetAugmentor' => __DIR__ . '/includes/search/ResultSetAugmentor.php',
+       'ResultWrapper' => __DIR__ . '/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php',
        'RevDelArchiveItem' => __DIR__ . '/includes/revisiondelete/RevDelArchiveItem.php',
        'RevDelArchiveList' => __DIR__ . '/includes/revisiondelete/RevDelArchiveList.php',
        'RevDelArchivedFileItem' => __DIR__ . '/includes/revisiondelete/RevDelArchivedFileItem.php',
@@ -1213,14 +1236,14 @@ $wgAutoloadLocalClasses = [
        'RowUpdateGenerator' => __DIR__ . '/includes/utils/RowUpdateGenerator.php',
        'RunJobs' => __DIR__ . '/maintenance/runJobs.php',
        'RunningStat' => __DIR__ . '/includes/compat/RunningStatCompat.php',
-       'SQLiteField' => __DIR__ . '/includes/db/DatabaseSqlite.php',
+       'SQLiteField' => __DIR__ . '/includes/libs/rdbms/field/SQLiteField.php',
        'SVGMetadataExtractor' => __DIR__ . '/includes/media/SVGMetadataExtractor.php',
        'SVGReader' => __DIR__ . '/includes/media/SVGMetadataExtractor.php',
-       'SamplingStatsdClient' => __DIR__ . '/includes/libs/SamplingStatsdClient.php',
+       'SamplingStatsdClient' => __DIR__ . '/includes/libs/stats/SamplingStatsdClient.php',
        'Sanitizer' => __DIR__ . '/includes/Sanitizer.php',
-       'SavepointPostgres' => __DIR__ . '/includes/db/DatabasePostgres.php',
-       'ScopedCallback' => __DIR__ . '/includes/libs/ScopedCallback.php',
-       'ScopedLock' => __DIR__ . '/includes/filebackend/lockmanager/ScopedLock.php',
+       'SavepointPostgres' => __DIR__ . '/includes/libs/rdbms/database/utils/SavepointPostgres.php',
+       'ScopedCallback' => __DIR__ . '/includes/compat/ScopedCallback.php',
+       'ScopedLock' => __DIR__ . '/includes/libs/lockmanager/ScopedLock.php',
        'SearchApi' => __DIR__ . '/includes/api/SearchApi.php',
        'SearchDatabase' => __DIR__ . '/includes/search/SearchDatabase.php',
        'SearchDump' => __DIR__ . '/maintenance/dumpIterator.php',
@@ -1373,7 +1396,7 @@ $wgAutoloadLocalClasses = [
        'Status' => __DIR__ . '/includes/Status.php',
        'StatusValue' => __DIR__ . '/includes/libs/StatusValue.php',
        'StorageTypeStats' => __DIR__ . '/maintenance/storage/storageTypeStats.php',
-       'StoreFileOp' => __DIR__ . '/includes/filebackend/FileOp.php',
+       'StoreFileOp' => __DIR__ . '/includes/libs/filebackend/fileop/StoreFileOp.php',
        'StreamFile' => __DIR__ . '/includes/StreamFile.php',
        'StringPrefixSearch' => __DIR__ . '/includes/PrefixSearch.php',
        'StringUtils' => __DIR__ . '/includes/libs/StringUtils.php',
@@ -1383,20 +1406,21 @@ $wgAutoloadLocalClasses = [
        'SubmitAction' => __DIR__ . '/includes/actions/SubmitAction.php',
        'SubpageImportTitleFactory' => __DIR__ . '/includes/title/SubpageImportTitleFactory.php',
        'SvgHandler' => __DIR__ . '/includes/media/SVG.php',
-       'SwiftFileBackend' => __DIR__ . '/includes/filebackend/SwiftFileBackend.php',
-       'SwiftFileBackendDirList' => __DIR__ . '/includes/filebackend/SwiftFileBackend.php',
-       'SwiftFileBackendFileList' => __DIR__ . '/includes/filebackend/SwiftFileBackend.php',
-       'SwiftFileBackendList' => __DIR__ . '/includes/filebackend/SwiftFileBackend.php',
-       'SwiftFileOpHandle' => __DIR__ . '/includes/filebackend/SwiftFileBackend.php',
+       'SwiftFileBackend' => __DIR__ . '/includes/libs/filebackend/SwiftFileBackend.php',
+       'SwiftFileBackendDirList' => __DIR__ . '/includes/libs/filebackend/SwiftFileBackend.php',
+       'SwiftFileBackendFileList' => __DIR__ . '/includes/libs/filebackend/SwiftFileBackend.php',
+       'SwiftFileBackendList' => __DIR__ . '/includes/libs/filebackend/SwiftFileBackend.php',
+       'SwiftFileOpHandle' => __DIR__ . '/includes/libs/filebackend/SwiftFileBackend.php',
        'SwiftVirtualRESTService' => __DIR__ . '/includes/libs/virtualrest/SwiftVirtualRESTService.php',
        'SyncFileBackend' => __DIR__ . '/maintenance/syncFileBackend.php',
        'TableCleanup' => __DIR__ . '/maintenance/cleanupTable.inc',
        'TableDiffFormatter' => __DIR__ . '/includes/diff/TableDiffFormatter.php',
        'TablePager' => __DIR__ . '/includes/pager/TablePager.php',
        'TagLogFormatter' => __DIR__ . '/includes/logging/TagLogFormatter.php',
-       'TempFSFile' => __DIR__ . '/includes/filebackend/TempFSFile.php',
+       'TempFSFile' => __DIR__ . '/includes/libs/filebackend/fsfile/TempFSFile.php',
        'TempFileRepo' => __DIR__ . '/includes/filerepo/FileRepo.php',
        'TemplateParser' => __DIR__ . '/includes/TemplateParser.php',
+       'TemplatesOnThisPageFormatter' => __DIR__ . '/includes/TemplatesOnThisPageFormatter.php',
        'TestFileOpPerformance' => __DIR__ . '/maintenance/fileOpPerfTest.php',
        'TextContent' => __DIR__ . '/includes/content/TextContent.php',
        'TextContentHandler' => __DIR__ . '/includes/content/TextContentHandler.php',
@@ -1408,7 +1432,7 @@ $wgAutoloadLocalClasses = [
        'ThumbnailRenderJob' => __DIR__ . '/includes/jobqueue/jobs/ThumbnailRenderJob.php',
        'TidyUpBug37714' => __DIR__ . '/maintenance/tidyUpBug37714.php',
        'TiffHandler' => __DIR__ . '/includes/media/Tiff.php',
-       'TimestampException' => __DIR__ . '/includes/exception/TimestampException.php',
+       'TimestampException' => __DIR__ . '/includes/libs/time/TimestampException.php',
        'Timing' => __DIR__ . '/includes/libs/Timing.php',
        'Title' => __DIR__ . '/includes/Title.php',
        'TitleArray' => __DIR__ . '/includes/TitleArray.php',
@@ -1420,7 +1444,7 @@ $wgAutoloadLocalClasses = [
        'TitleValue' => __DIR__ . '/includes/title/TitleValue.php',
        'TrackBlobs' => __DIR__ . '/maintenance/storage/trackBlobs.php',
        'TraditionalImageGallery' => __DIR__ . '/includes/gallery/TraditionalImageGallery.php',
-       'TransactionProfiler' => __DIR__ . '/includes/profiler/TransactionProfiler.php',
+       'TransactionProfiler' => __DIR__ . '/includes/libs/rdbms/TransactionProfiler.php',
        'TransformParameterError' => __DIR__ . '/includes/media/MediaTransformOutput.php',
        'TransformTooBigImageAreaError' => __DIR__ . '/includes/media/MediaTransformOutput.php',
        'TransformationalImageHandler' => __DIR__ . '/includes/media/TransformationalImageHandler.php',
@@ -1499,7 +1523,6 @@ $wgAutoloadLocalClasses = [
        'VirtualRESTService' => __DIR__ . '/includes/libs/virtualrest/VirtualRESTService.php',
        'VirtualRESTServiceClient' => __DIR__ . '/includes/libs/virtualrest/VirtualRESTServiceClient.php',
        'WANObjectCache' => __DIR__ . '/includes/libs/objectcache/WANObjectCache.php',
-       'WaitConditionLoop' => __DIR__ . '/includes/libs/WaitConditionLoop.php',
        'WantedCategoriesPage' => __DIR__ . '/includes/specials/SpecialWantedcategories.php',
        'WantedFilesPage' => __DIR__ . '/includes/specials/SpecialWantedfiles.php',
        'WantedPagesPage' => __DIR__ . '/includes/specials/SpecialWantedpages.php',
@@ -1552,16 +1575,16 @@ $wgAutoloadLocalClasses = [
        'XCFHandler' => __DIR__ . '/includes/media/XCF.php',
        'XCacheBagOStuff' => __DIR__ . '/includes/libs/objectcache/XCacheBagOStuff.php',
        'XMLRCFeedFormatter' => __DIR__ . '/includes/rcfeed/XMLRCFeedFormatter.php',
-       'XMPInfo' => __DIR__ . '/includes/media/XMPInfo.php',
-       'XMPReader' => __DIR__ . '/includes/media/XMP.php',
-       'XMPValidate' => __DIR__ . '/includes/media/XMPValidate.php',
+       'XMPInfo' => __DIR__ . '/includes/libs/xmp/XMPInfo.php',
+       'XMPReader' => __DIR__ . '/includes/libs/xmp/XMP.php',
+       'XMPValidate' => __DIR__ . '/includes/libs/xmp/XMPValidate.php',
        'Xhprof' => __DIR__ . '/includes/libs/Xhprof.php',
        'XhprofData' => __DIR__ . '/includes/libs/XhprofData.php',
        'Xml' => __DIR__ . '/includes/Xml.php',
        'XmlDumpWriter' => __DIR__ . '/includes/export/XmlDumpWriter.php',
        'XmlJsCode' => __DIR__ . '/includes/Xml.php',
        'XmlSelect' => __DIR__ . '/includes/XmlSelect.php',
-       'XmlTypeCheck' => __DIR__ . '/includes/libs/XmlTypeCheck.php',
+       'XmlTypeCheck' => __DIR__ . '/includes/libs/mime/XmlTypeCheck.php',
        'ZhConverter' => __DIR__ . '/languages/classes/LanguageZh.php',
        'ZipDirectoryReader' => __DIR__ . '/includes/utils/ZipDirectoryReader.php',
        'ZipDirectoryReaderError' => __DIR__ . '/includes/utils/ZipDirectoryReader.php',
index eedaa4e..fdbd0cd 100644 (file)
@@ -16,7 +16,7 @@
                "wiki": "https://www.mediawiki.org/"
        },
        "require": {
-               "composer/semver": "1.4.1",
+               "composer/semver": "1.4.2",
                "cssjanus/cssjanus": "1.1.2",
                "ext-ctype": "*",
                "ext-iconv": "*",
@@ -25,7 +25,7 @@
                "ext-xml": "*",
                "liuggio/statsd-php-client": "1.0.18",
                "mediawiki/at-ease": "1.1.0",
-               "oojs/oojs-ui": "0.17.9",
+               "oojs/oojs-ui": "0.17.10",
                "oyejorge/less.php": "1.7.0.10",
                "php": ">=5.5.9",
                "psr/log": "1.0.0",
                "wikimedia/composer-merge-plugin": "1.3.1",
                "wikimedia/html-formatter": "1.0.1",
                "wikimedia/ip-set": "1.1.0",
-               "wikimedia/php-session-serializer": "1.0.3",
+               "wikimedia/php-session-serializer": "1.0.4",
                "wikimedia/relpath": "1.0.3",
                "wikimedia/running-stat": "1.1.0",
-               "wikimedia/utfnormal": "1.0.3",
+               "wikimedia/scoped-callback": "1.0.0",
+               "wikimedia/utfnormal": "1.1.0",
+               "wikimedia/wait-condition-loop": "1.0.1",
                "wikimedia/wrappedstring": "2.2.0",
                "zordius/lightncandy": "0.23"
        },
        "require-dev": {
+               "composer/spdx-licenses": "1.1.4",
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "justinrainbow/json-schema": "~3.0",
                "mediawiki/mediawiki-codesniffer": "0.7.2",
index 6f3da97..2d82270 100644 (file)
@@ -4,8 +4,8 @@
 The 'docs' directory contain various text files that should help you understand
 the most important parts of the code of MediaWiki. More in-depth documentation
 can be found at:
-  https://www.mediawiki.org/wiki/Manual:Code
-  https://www.mediawiki.org/wiki/Developer_hub
+  https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Code
+  https://www.mediawiki.org/wiki/Special:MyLanguage/Developer_hub
 API documentation is automatically generated and updated daily at:
   https://doc.wikimedia.org/mediawiki-core/master/php/html/
 
@@ -14,6 +14,6 @@ You can get a fresh version using 'make doc' or mwdocgen.php in the
 
 
 For end users, most of the documentation is located online at:
-  https://www.mediawiki.org/wiki/Help:Contents
+  https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents
 Documentation for MediaWiki site administrators is at:
-  https://www.mediawiki.org/wiki/Manual:Contents
+  https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents
index c010014..2cf5fe1 100644 (file)
                },
                "license-name": {
                        "type": "string",
-                       "description": "Short identifier for the license under which the extension is released.",
-                       "enum": [
-                               "AFL-1.1",
-                               "AFL-1.2",
-                               "AFL-2.0",
-                               "AFL-2.1",
-                               "AFL-3.0",
-                               "APL-1.0",
-                               "Aladdin",
-                               "ANTLR-PD",
-                               "Apache-1.0",
-                               "Apache-1.1",
-                               "Apache-2.0",
-                               "APSL-1.0",
-                               "APSL-1.1",
-                               "APSL-1.2",
-                               "APSL-2.0",
-                               "Artistic-1.0",
-                               "Artistic-1.0-cl8",
-                               "Artistic-1.0-Perl",
-                               "Artistic-2.0",
-                               "AAL",
-                               "BitTorrent-1.0",
-                               "BitTorrent-1.1",
-                               "BSL-1.0",
-                               "BSD-2-Clause",
-                               "BSD-2-Clause-FreeBSD",
-                               "BSD-2-Clause-NetBSD",
-                               "BSD-3-Clause",
-                               "BSD-3-Clause-Clear",
-                               "BSD-4-Clause",
-                               "BSD-4-Clause-UC",
-                               "CECILL-1.0",
-                               "CECILL-1.1",
-                               "CECILL-2.0",
-                               "CECILL-B",
-                               "CECILL-C",
-                               "ClArtistic",
-                               "CNRI-Python",
-                               "CNRI-Python-GPL-Compatible",
-                               "CPOL-1.02",
-                               "CDDL-1.0",
-                               "CDDL-1.1",
-                               "CPAL-1.0",
-                               "CPL-1.0",
-                               "CATOSL-1.1",
-                               "Condor-1.1",
-                               "CC-BY-1.0",
-                               "CC-BY-2.0",
-                               "CC-BY-2.5",
-                               "CC-BY-3.0",
-                               "CC-BY-ND-1.0",
-                               "CC-BY-ND-2.0",
-                               "CC-BY-ND-2.5",
-                               "CC-BY-ND-3.0",
-                               "CC-BY-NC-1.0",
-                               "CC-BY-NC-2.0",
-                               "CC-BY-NC-2.5",
-                               "CC-BY-NC-3.0",
-                               "CC-BY-NC-ND-1.0",
-                               "CC-BY-NC-ND-2.0",
-                               "CC-BY-NC-ND-2.5",
-                               "CC-BY-NC-ND-3.0",
-                               "CC-BY-NC-SA-1.0",
-                               "CC-BY-NC-SA-2.0",
-                               "CC-BY-NC-SA-2.5",
-                               "CC-BY-NC-SA-3.0",
-                               "CC-BY-SA-1.0",
-                               "CC-BY-SA-2.0",
-                               "CC-BY-SA-2.5",
-                               "CC-BY-SA-3.0",
-                               "CC0-1.0",
-                               "CUA-OPL-1.0",
-                               "D-FSL-1.0",
-                               "WTFPL",
-                               "EPL-1.0",
-                               "eCos-2.0",
-                               "ECL-1.0",
-                               "ECL-2.0",
-                               "EFL-1.0",
-                               "EFL-2.0",
-                               "Entessa",
-                               "ErlPL-1.1",
-                               "EUDatagrid",
-                               "EUPL-1.0",
-                               "EUPL-1.1",
-                               "Fair",
-                               "Frameworx-1.0",
-                               "FTL",
-                               "AGPL-1.0",
-                               "AGPL-3.0",
-                               "GFDL-1.1",
-                               "GFDL-1.2",
-                               "GFDL-1.3",
-                               "GPL-1.0",
-                               "GPL-1.0+",
-                               "GPL-2.0",
-                               "GPL-2.0+",
-                               "GPL-2.0-with-autoconf-exception",
-                               "GPL-2.0-with-bison-exception",
-                               "GPL-2.0-with-classpath-exception",
-                               "GPL-2.0-with-font-exception",
-                               "GPL-2.0-with-GCC-exception",
-                               "GPL-3.0",
-                               "GPL-3.0+",
-                               "GPL-3.0-with-autoconf-exception",
-                               "GPL-3.0-with-GCC-exception",
-                               "LGPL-2.1",
-                               "LGPL-2.1+",
-                               "LGPL-3.0",
-                               "LGPL-3.0+",
-                               "LGPL-2.0",
-                               "LGPL-2.0+",
-                               "gSOAP-1.3b",
-                               "HPND",
-                               "IBM-pibs",
-                               "IPL-1.0",
-                               "Imlib2",
-                               "IJG",
-                               "Intel",
-                               "IPA",
-                               "ISC",
-                               "JSON",
-                               "LPPL-1.3a",
-                               "LPPL-1.0",
-                               "LPPL-1.1",
-                               "LPPL-1.2",
-                               "LPPL-1.3c",
-                               "Libpng",
-                               "LPL-1.02",
-                               "LPL-1.0",
-                               "MS-PL",
-                               "MS-RL",
-                               "MirOS",
-                               "MIT",
-                               "Motosoto",
-                               "MPL-1.0",
-                               "MPL-1.1",
-                               "MPL-2.0",
-                               "MPL-2.0-no-copyleft-exception",
-                               "Multics",
-                               "NASA-1.3",
-                               "Naumen",
-                               "NBPL-1.0",
-                               "NGPL",
-                               "NOSL",
-                               "NPL-1.0",
-                               "NPL-1.1",
-                               "Nokia",
-                               "NPOSL-3.0",
-                               "NTP",
-                               "OCLC-2.0",
-                               "ODbL-1.0",
-                               "PDDL-1.0",
-                               "OGTSL",
-                               "OLDAP-2.2.2",
-                               "OLDAP-1.1",
-                               "OLDAP-1.2",
-                               "OLDAP-1.3",
-                               "OLDAP-1.4",
-                               "OLDAP-2.0",
-                               "OLDAP-2.0.1",
-                               "OLDAP-2.1",
-                               "OLDAP-2.2",
-                               "OLDAP-2.2.1",
-                               "OLDAP-2.3",
-                               "OLDAP-2.4",
-                               "OLDAP-2.5",
-                               "OLDAP-2.6",
-                               "OLDAP-2.7",
-                               "OPL-1.0",
-                               "OSL-1.0",
-                               "OSL-2.0",
-                               "OSL-2.1",
-                               "OSL-3.0",
-                               "OLDAP-2.8",
-                               "OpenSSL",
-                               "PHP-3.0",
-                               "PHP-3.01",
-                               "PostgreSQL",
-                               "Python-2.0",
-                               "QPL-1.0",
-                               "RPSL-1.0",
-                               "RPL-1.1",
-                               "RPL-1.5",
-                               "RHeCos-1.1",
-                               "RSCPL",
-                               "Ruby",
-                               "SAX-PD",
-                               "SGI-B-1.0",
-                               "SGI-B-1.1",
-                               "SGI-B-2.0",
-                               "OFL-1.0",
-                               "OFL-1.1",
-                               "SimPL-2.0",
-                               "Sleepycat",
-                               "SMLNJ",
-                               "SugarCRM-1.1.3",
-                               "SISSL",
-                               "SISSL-1.2",
-                               "SPL-1.0",
-                               "Watcom-1.0",
-                               "NCSA",
-                               "VSL-1.0",
-                               "W3C",
-                               "WXwindows",
-                               "Xnet",
-                               "X11",
-                               "XFree86-1.1",
-                               "YPL-1.0",
-                               "YPL-1.1",
-                               "Zimbra-1.3",
-                               "Zlib",
-                               "ZPL-1.1",
-                               "ZPL-2.0",
-                               "ZPL-2.1",
-                               "Unlicense"
-                       ]
+                       "description": "SPDX identifier for the license under which the extension is released."
                },
                "requires": {
                        "type": "object",
                                                                        "items": {
                                                                                "type": "string"
                                                                        }
+                                                               },
+                                                               "noflip": {
+                                                                       "type": "boolean",
+                                                                       "description": "Whether to skip CSSJanus LTR-to-RTL flipping for this module. Recommended for styles imported from libraries that already properly handle their RTL styles. Default is false, meaning CSSJanus will be applied on RTL-mode output."
                                                                }
                                                        }
                                                },
                                                        "type": "string",
                                                        "enum": [
                                                                "array_merge_recursive",
+                                                               "array_replace_recursive",
                                                                "array_plus_2d",
                                                                "array_plus",
                                                                "array_merge"
                        "type": "array",
                        "description": "Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
                },
+               "ServiceWiringFiles": {
+                       "type": "array",
+                       "description": "List of service wiring files to be loaded by the default instance of MediaWikiServices"
+               },
                "load_composer_autoloader": {
                        "type": "boolean",
                        "description": "Load the composer autoloader for this extension, if one is present"
index d707864..8659dff 100644 (file)
                },
                "license-name": {
                        "type": "string",
-                       "description": "Short identifier for the license under which the extension is released.",
-                       "enum": [
-                               "AFL-1.1",
-                               "AFL-1.2",
-                               "AFL-2.0",
-                               "AFL-2.1",
-                               "AFL-3.0",
-                               "APL-1.0",
-                               "Aladdin",
-                               "ANTLR-PD",
-                               "Apache-1.0",
-                               "Apache-1.1",
-                               "Apache-2.0",
-                               "APSL-1.0",
-                               "APSL-1.1",
-                               "APSL-1.2",
-                               "APSL-2.0",
-                               "Artistic-1.0",
-                               "Artistic-1.0-cl8",
-                               "Artistic-1.0-Perl",
-                               "Artistic-2.0",
-                               "AAL",
-                               "BitTorrent-1.0",
-                               "BitTorrent-1.1",
-                               "BSL-1.0",
-                               "BSD-2-Clause",
-                               "BSD-2-Clause-FreeBSD",
-                               "BSD-2-Clause-NetBSD",
-                               "BSD-3-Clause",
-                               "BSD-3-Clause-Clear",
-                               "BSD-4-Clause",
-                               "BSD-4-Clause-UC",
-                               "CECILL-1.0",
-                               "CECILL-1.1",
-                               "CECILL-2.0",
-                               "CECILL-B",
-                               "CECILL-C",
-                               "ClArtistic",
-                               "CNRI-Python",
-                               "CNRI-Python-GPL-Compatible",
-                               "CPOL-1.02",
-                               "CDDL-1.0",
-                               "CDDL-1.1",
-                               "CPAL-1.0",
-                               "CPL-1.0",
-                               "CATOSL-1.1",
-                               "Condor-1.1",
-                               "CC-BY-1.0",
-                               "CC-BY-2.0",
-                               "CC-BY-2.5",
-                               "CC-BY-3.0",
-                               "CC-BY-ND-1.0",
-                               "CC-BY-ND-2.0",
-                               "CC-BY-ND-2.5",
-                               "CC-BY-ND-3.0",
-                               "CC-BY-NC-1.0",
-                               "CC-BY-NC-2.0",
-                               "CC-BY-NC-2.5",
-                               "CC-BY-NC-3.0",
-                               "CC-BY-NC-ND-1.0",
-                               "CC-BY-NC-ND-2.0",
-                               "CC-BY-NC-ND-2.5",
-                               "CC-BY-NC-ND-3.0",
-                               "CC-BY-NC-SA-1.0",
-                               "CC-BY-NC-SA-2.0",
-                               "CC-BY-NC-SA-2.5",
-                               "CC-BY-NC-SA-3.0",
-                               "CC-BY-SA-1.0",
-                               "CC-BY-SA-2.0",
-                               "CC-BY-SA-2.5",
-                               "CC-BY-SA-3.0",
-                               "CC0-1.0",
-                               "CUA-OPL-1.0",
-                               "D-FSL-1.0",
-                               "WTFPL",
-                               "EPL-1.0",
-                               "eCos-2.0",
-                               "ECL-1.0",
-                               "ECL-2.0",
-                               "EFL-1.0",
-                               "EFL-2.0",
-                               "Entessa",
-                               "ErlPL-1.1",
-                               "EUDatagrid",
-                               "EUPL-1.0",
-                               "EUPL-1.1",
-                               "Fair",
-                               "Frameworx-1.0",
-                               "FTL",
-                               "AGPL-1.0",
-                               "AGPL-3.0",
-                               "GFDL-1.1",
-                               "GFDL-1.2",
-                               "GFDL-1.3",
-                               "GPL-1.0",
-                               "GPL-1.0+",
-                               "GPL-2.0",
-                               "GPL-2.0+",
-                               "GPL-2.0-with-autoconf-exception",
-                               "GPL-2.0-with-bison-exception",
-                               "GPL-2.0-with-classpath-exception",
-                               "GPL-2.0-with-font-exception",
-                               "GPL-2.0-with-GCC-exception",
-                               "GPL-3.0",
-                               "GPL-3.0+",
-                               "GPL-3.0-with-autoconf-exception",
-                               "GPL-3.0-with-GCC-exception",
-                               "LGPL-2.1",
-                               "LGPL-2.1+",
-                               "LGPL-3.0",
-                               "LGPL-3.0+",
-                               "LGPL-2.0",
-                               "LGPL-2.0+",
-                               "gSOAP-1.3b",
-                               "HPND",
-                               "IBM-pibs",
-                               "IPL-1.0",
-                               "Imlib2",
-                               "IJG",
-                               "Intel",
-                               "IPA",
-                               "ISC",
-                               "JSON",
-                               "LPPL-1.3a",
-                               "LPPL-1.0",
-                               "LPPL-1.1",
-                               "LPPL-1.2",
-                               "LPPL-1.3c",
-                               "Libpng",
-                               "LPL-1.02",
-                               "LPL-1.0",
-                               "MS-PL",
-                               "MS-RL",
-                               "MirOS",
-                               "MIT",
-                               "Motosoto",
-                               "MPL-1.0",
-                               "MPL-1.1",
-                               "MPL-2.0",
-                               "MPL-2.0-no-copyleft-exception",
-                               "Multics",
-                               "NASA-1.3",
-                               "Naumen",
-                               "NBPL-1.0",
-                               "NGPL",
-                               "NOSL",
-                               "NPL-1.0",
-                               "NPL-1.1",
-                               "Nokia",
-                               "NPOSL-3.0",
-                               "NTP",
-                               "OCLC-2.0",
-                               "ODbL-1.0",
-                               "PDDL-1.0",
-                               "OGTSL",
-                               "OLDAP-2.2.2",
-                               "OLDAP-1.1",
-                               "OLDAP-1.2",
-                               "OLDAP-1.3",
-                               "OLDAP-1.4",
-                               "OLDAP-2.0",
-                               "OLDAP-2.0.1",
-                               "OLDAP-2.1",
-                               "OLDAP-2.2",
-                               "OLDAP-2.2.1",
-                               "OLDAP-2.3",
-                               "OLDAP-2.4",
-                               "OLDAP-2.5",
-                               "OLDAP-2.6",
-                               "OLDAP-2.7",
-                               "OPL-1.0",
-                               "OSL-1.0",
-                               "OSL-2.0",
-                               "OSL-2.1",
-                               "OSL-3.0",
-                               "OLDAP-2.8",
-                               "OpenSSL",
-                               "PHP-3.0",
-                               "PHP-3.01",
-                               "PostgreSQL",
-                               "Python-2.0",
-                               "QPL-1.0",
-                               "RPSL-1.0",
-                               "RPL-1.1",
-                               "RPL-1.5",
-                               "RHeCos-1.1",
-                               "RSCPL",
-                               "Ruby",
-                               "SAX-PD",
-                               "SGI-B-1.0",
-                               "SGI-B-1.1",
-                               "SGI-B-2.0",
-                               "OFL-1.0",
-                               "OFL-1.1",
-                               "SimPL-2.0",
-                               "Sleepycat",
-                               "SMLNJ",
-                               "SugarCRM-1.1.3",
-                               "SISSL",
-                               "SISSL-1.2",
-                               "SPL-1.0",
-                               "Watcom-1.0",
-                               "NCSA",
-                               "VSL-1.0",
-                               "W3C",
-                               "WXwindows",
-                               "Xnet",
-                               "X11",
-                               "XFree86-1.1",
-                               "YPL-1.0",
-                               "YPL-1.1",
-                               "Zimbra-1.3",
-                               "Zlib",
-                               "ZPL-1.1",
-                               "ZPL-2.0",
-                               "ZPL-2.1",
-                               "Unlicense"
-                       ]
+                       "description": "SPDX identifier for the license under which the extension is released."
                },
                "requires": {
                        "type": "object",
                                                                        "items": {
                                                                                "type": "string"
                                                                        }
+                                                               },
+                                                               "noflip": {
+                                                                       "type": "boolean",
+                                                                       "description": "Whether to skip CSSJanus LTR-to-RTL flipping for this module. Recommended for styles imported from libraries that already properly handle their RTL styles. Default is false, meaning CSSJanus will be applied on RTL-mode output."
                                                                }
                                                        }
                                                },
                                                        "type": "string",
                                                        "enum": [
                                                                "array_merge_recursive",
+                                                               "array_replace_recursive",
                                                                "array_plus_2d",
                                                                "array_plus",
                                                                "array_merge"
                        "type": "array",
                        "description": "Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
                },
+               "ServiceWiringFiles": {
+                       "type": "array",
+                       "description": "List of service wiring files to be loaded by the default instance of MediaWikiServices"
+               },
                "load_composer_autoloader": {
                        "type": "boolean",
                        "description": "Load the composer autoloader for this extension, if one is present"
index a7fb873..562d7b4 100644 (file)
@@ -464,6 +464,41 @@ $moduleManager: ApiModuleManager Module manager instance
 action=query submodule. Use this to extend core API modules.
 &$module: Module object
 
+'ApiQueryBaseAfterQuery': Called for (some) API query modules after the
+database query has returned. An API query module wanting to use this hook
+should see the ApiQueryBase::select() and ApiQueryBase::processRow()
+documentation.
+$module: ApiQueryBase module in question
+$result: ResultWrapper|bool returned from the IDatabase::select()
+&$hookData: array that was passed to the 'ApiQueryBaseBeforeQuery' hook and
+ will be passed to the 'ApiQueryBaseProcessRow' hook, intended for inter-hook
+ communication.
+
+'ApiQueryBaseBeforeQuery': Called for (some) API query modules before a
+database query is made. WARNING: It would be very easy to misuse this hook and
+break the module! Any joins added *must* join on a unique key of the target
+table unless you really know what you're doing. An API query module wanting to
+use this hook should see the ApiQueryBase::select() and
+ApiQueryBase::processRow() documentation.
+$module: ApiQueryBase module in question
+&$tables: array of tables to be queried
+&$fields: array of columns to select
+&$conds: array of WHERE conditionals for query
+&$query_options: array of options for the database request
+&$join_conds: join conditions for the tables
+&$hookData: array that will be passed to the 'ApiQueryBaseAfterQuery' and
+ 'ApiQueryBaseProcessRow' hooks, intended for inter-hook communication.
+
+'ApiQueryBaseProcessRow': Called for (some) API query modules as each row of
+the database result is processed. Return false to stop processing the result
+set. An API query module wanting to use this hook should see the
+ApiQueryBase::select() and ApiQueryBase::processRow() documentation.
+$module: ApiQueryBase module in question
+$row: stdClass Database result row
+&$data: array to be included in the ApiResult.
+&$hookData: array that was be passed to the 'ApiQueryBaseBeforeQuery' and
+ 'ApiQueryBaseAfterQuery' hooks, intended for inter-hook communication.
+
 'APIQueryGeneratorAfterExecute': After calling the executeGenerator() method of
 an action=query submodule. Use this to extend core API modules.
 &$module: Module object
@@ -1019,6 +1054,18 @@ $user: user initiating the action
 uses are in active use.
 &$tags: list of all active tags. Append to this array.
 
+'ChangeTagsAfterUpdateTags': Called after tags have been updated with the
+ChangeTags::updateTags function. Params:
+$addedTags: tags effectively added in the update
+$removedTags: tags effectively removed in the update
+$prevTags: tags that were present prior to the update
+$rc_id: recentchanges table id
+$rev_id: revision table id
+$log_id: logging table id
+$params: tag params
+$rc: RecentChange being tagged when the tagging accompanies the action or null
+$user: User who performed the tagging when the tagging is subsequent to the action or null
+
 'Collation::factory': Called if $wgCategoryCollation is an unknown collation.
 $collationName: Name of the collation in question
 &$collationObject: Null. Replace with a subclass of the Collation class that
@@ -1196,7 +1243,7 @@ $out: OutputPage object
 $parserOutput: ParserOutput object
 $wikiPage: WikiPage object
 
-DifferenceEngineRenderRevisionShowFinalPatrolLink': An extension can hook into this hook
+'DifferenceEngineRenderRevisionShowFinalPatrolLink': An extension can hook into this hook
 point and return false to not show the final "mark as patrolled" link on the bottom
 of a page.
 This hook has no arguments.
@@ -1974,6 +2021,7 @@ $insertions: an array of links to insert
 'LinksUpdateComplete': At the end of LinksUpdate::doUpdate() when updating,
 including delete and insert, has completed for all link tables
 &$linksUpdate: the LinksUpdate object
+$ticket: prior result of LBFactory::getEmptyTransactionTicket()
 
 'LinksUpdateConstructed': At the end of LinksUpdate() is construction.
 &$linksUpdate: the LinksUpdate object
@@ -2699,6 +2747,13 @@ $page: WikiPage that is being indexed
 $output: ParserOutput that is produced from the page
 $engine: SearchEngine for which the indexing is intended
 
+'SearchResultsAugment': Allows extension to add its code to the list of search
+result augmentors.
+&$setAugmentors: List of whole-set augmentor objects, must implement ResultSetAugmentor
+&$rowAugmentors: List of per-row augmentor objects, must implement ResultAugmentor.
+Note that lists should be in the format name => object and the names in both lists should
+be distinct.
+
 'SecondaryDataUpdates': Allows modification of the list of DataUpdates to
 perform when page content is modified. Currently called by
 AbstractContent::getSecondaryDataUpdates.
@@ -3736,6 +3791,10 @@ $content: the Content to generate updates for (or null, if the Content could not
 due to an error)
 &$updates: the array of DataUpdate objects. Hook function may want to add to it.
 
+'WikiPageFactory': Override WikiPage class used for a title
+$title: Title of the page
+&$page: Variable to set the created WikiPage to.
+
 'XmlDumpWriterOpenPage': Called at the end of XmlDumpWriter::openPage, to allow
 extra metadata to be added.
 $obj: The XmlDumpWriter object.
index 19ba0a2..a11ba26 100644 (file)
@@ -19,6 +19,9 @@
  *
  * @file
  */
+
+use MediaWiki\MediaWikiServices;
+
 class Block {
        /** @var string */
        public $mReason;
@@ -689,11 +692,13 @@ class Block {
        public static function isWhitelistedFromAutoblocks( $ip ) {
                // Try to get the autoblock_whitelist from the cache, as it's faster
                // than getting the msg raw and explode()'ing it.
-               $cache = ObjectCache::getMainWANInstance();
+               $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
                $lines = $cache->getWithSetCallback(
                        wfMemcKey( 'ipb', 'autoblock', 'whitelist' ),
                        $cache::TTL_DAY,
-                       function () {
+                       function ( $curValue, &$ttl, array &$setOpts ) {
+                               $setOpts += Database::getCacheSetOptions( wfGetDB( DB_REPLICA ) );
+
                                return explode( "\n",
                                        wfMessage( 'autoblock_whitelist' )->inContentLanguage()->plain() );
                        }
@@ -1120,6 +1125,7 @@ class Block {
                }
 
                $conds = [];
+               $proxyLookup = MediaWikiServices::getInstance()->getProxyLookup();
                foreach ( array_unique( $ipChain ) as $ipaddr ) {
                        # Discard invalid IP addresses. Since XFF can be spoofed and we do not
                        # necessarily trust the header given to us, make sure that we are only
@@ -1130,7 +1136,7 @@ class Block {
                                continue;
                        }
                        # Don't check trusted IPs (includes local squids which will be in every request)
-                       if ( IP::isTrustedProxy( $ipaddr ) ) {
+                       if ( $proxyLookup->isTrustedProxy( $ipaddr ) ) {
                                continue;
                        }
                        # Check both the original IP (to check against single blocks), as well as build
index a8e988f..c858dd7 100644 (file)
@@ -19,6 +19,7 @@
  *
  * @file
  */
+use MediaWiki\MediaWikiServices;
 
 class CategoryViewer extends ContextSource {
        /** @var int */
@@ -317,10 +318,21 @@ class CategoryViewer extends ContextSource {
 
                        $res = $dbr->select(
                                [ 'page', 'categorylinks', 'category' ],
-                               [ 'page_id', 'page_title', 'page_namespace', 'page_len',
-                                       'page_is_redirect', 'cl_sortkey', 'cat_id', 'cat_title',
-                                       'cat_subcats', 'cat_pages', 'cat_files',
-                                       'cl_sortkey_prefix', 'cl_collation' ],
+                               array_merge(
+                                       LinkCache::getSelectFields(),
+                                       [
+                                               'page_namespace',
+                                               'page_title',
+                                               'cl_sortkey',
+                                               'cat_id',
+                                               'cat_title',
+                                               'cat_subcats',
+                                               'cat_pages',
+                                               'cat_files',
+                                               'cl_sortkey_prefix',
+                                               'cl_collation'
+                                       ]
+                               ),
                                array_merge( [ 'cl_to' => $this->title->getDBkey() ], $extraConds ),
                                __METHOD__,
                                [
@@ -338,10 +350,13 @@ class CategoryViewer extends ContextSource {
                        );
 
                        Hooks::run( 'CategoryViewer::doCategoryQuery', [ $type, $res ] );
+                       $linkCache = MediaWikiServices::getInstance()->getLinkCache();
 
                        $count = 0;
                        foreach ( $res as $row ) {
                                $title = Title::newFromRow( $row );
+                               $linkCache->addGoodLinkObjFromRow( $title, $row );
+
                                if ( $row->cl_collation === '' ) {
                                        // Hack to make sure that while updating from 1.16 schema
                                        // and db is inconsistent, that the sky doesn't fall.
index 3ab8829..0b0016c 100644 (file)
@@ -75,7 +75,7 @@ $wgConfigRegistry = [
  * MediaWiki version number
  * @since 1.2
  */
-$wgVersion = '1.28.0-alpha';
+$wgVersion = '1.29.0-alpha';
 
 /**
  * Name of the site. It must be changed in LocalSettings.php
@@ -616,6 +616,11 @@ $wgUploadDialog = [
  * Additional parameters are specific to the file backend class used.
  * These settings should be global to all wikis when possible.
  *
+ * FileBackendMultiWrite::__construct() is augmented with a 'template' option that
+ * can be used in any of the values of the 'backends' array. Its value is the name of
+ * another backend in $wgFileBackends. When set, it pre-fills the array with all of the
+ * configuration of the named backend. Explicitly set values in the array take precedence.
+ *
  * There are two particularly important aspects about each backend:
  *   - a) Whether it is fully qualified or wiki-relative.
  *        By default, the paths of files are relative to the current wiki,
@@ -644,6 +649,10 @@ $wgFileBackends = [];
  * See LockManager::__construct() for more details.
  * Additional parameters are specific to the lock manager class used.
  * These settings should be global to all wikis.
+ *
+ * When using DBLockManager, the 'dbsByBucket' map can reference 'localDBMaster' as
+ * a peer database in each bucket. This will result in an extra connection to the domain
+ * that the LockManager services, which must also be a valid wiki ID.
  */
 $wgLockManagers = [];
 
@@ -1835,13 +1844,6 @@ $wgDBmwschema = null;
  */
 $wgSQLiteDataDir = '';
 
-/**
- * Make all database connections secretly go to localhost. Fool the load balancer
- * thinking there is an arbitrarily large cluster of servers to connect to.
- * Useful for debugging.
- */
-$wgAllDBsAreLocalhost = false;
-
 /**
  * Shared database for multiple wikis. Commonly used for storing a user table
  * for single sign-on. The server for this database must be the same as for the
@@ -2092,7 +2094,7 @@ $wgExternalStores = [];
  * Create a cluster named 'cluster1' containing three servers:
  * @code
  * $wgExternalServers = [
- *     'cluster1' => [ 'srv28', 'srv29', 'srv30' ]
+ *     'cluster1' => <array in the same format as $wgDBservers>
  * ];
  * @endcode
  *
@@ -2209,7 +2211,7 @@ $wgCacheDirectory = false;
  *   - CACHE_NONE:       Do not cache
  *   - CACHE_DB:         Store cache objects in the DB
  *   - CACHE_MEMCACHED:  MemCached, must specify servers in $wgMemCachedServers
- *   - CACHE_ACCEL:      APC, XCache or WinCache
+ *   - CACHE_ACCEL:      APC, APCU, XCache or WinCache
  *   - (other):          A string may be used which identifies a cache
  *                       configuration in $wgObjectCaches.
  *
@@ -2286,6 +2288,7 @@ $wgObjectCaches = [
        ],
 
        'apc' => [ 'class' => 'APCBagOStuff', 'reportDupes' => false ],
+       'apcu' => [ 'class' => 'APCUBagOStuff', 'reportDupes' => false ],
        'xcache' => [ 'class' => 'XCacheBagOStuff', 'reportDupes' => false ],
        'wincache' => [ 'class' => 'WinCacheBagOStuff', 'reportDupes' => false ],
        'memcached-php' => [ 'class' => 'MemcachedPhpBagOStuff', 'loggroup' => 'memcached' ],
@@ -5434,11 +5437,30 @@ $wgDeleteRevisionsLimit = 0;
 $wgHideUserContribLimit = 1000;
 
 /**
- * Number of accounts each IP address may create, 0 to disable.
+ * Number of accounts each IP address may create per specified period(s).
+ *
+ * @par Example:
+ * @code
+ * $wgAccountCreationThrottle = [
+ *  // no more than 100 per month
+ *  [
+ *   'count' => 100,
+ *   'seconds' => 30*86400,
+ *  ],
+ *  // no more than 10 per day
+ *  [
+ *   'count' => 10,
+ *   'seconds' => 86400,
+ *  ],
+ * ];
+ * @endcode
  *
  * @warning Requires $wgMainCacheType to be enabled
  */
-$wgAccountCreationThrottle = 0;
+$wgAccountCreationThrottle = [ [
+       'count' => 0,
+       'seconds' => 86400,
+] ];
 
 /**
  * Edits matching these regular expressions in body text
@@ -5511,13 +5533,7 @@ $wgApplyIpBlocksToXff = false;
  * elapses.
  *
  * @par Example:
- * To set a generic maximum of 4 hits in 60 seconds:
- * @code
- *     $wgRateLimits = [ 4, 60 ];
- * @endcode
- *
- * @par Example:
- * You could also limit per action and then type of users.
+ * Limits per configured per action and then type of users.
  * @code
  *     $wgRateLimits = [
  *         'edit' => [
@@ -5526,8 +5542,20 @@ $wgApplyIpBlocksToXff = false;
  *             'newbie' => [ x, y ], // each new autoconfirmed accounts; overrides 'user'
  *             'ip' => [ x, y ], // each anon and recent account
  *             'subnet' => [ x, y ], // ... within a /24 subnet in IPv4 or /64 in IPv6
+ *             'groupName' => [ x, y ], // by group membership
  *         ]
- *     ]
+ *     ];
+ * @endcode
+ *
+ * @par Normally, the 'noratelimit' right allows a user to bypass any rate
+ * limit checks. This can be disabled on a per-action basis by setting the
+ * special '&can-bypass' key to false in that action's configuration.
+ * @code
+ *     $wgRateLimits = [
+ *         'some-action' => [
+ *             '&can-bypass' => false,
+ *             'user' => [ x, y ],
+ *     ];
  * @endcode
  *
  * @warning Requires that $wgMainCacheType is set to something persistent
@@ -5719,6 +5747,8 @@ $wgGrantPermissions['viewdeleted']['browsearchive'] = true;
 $wgGrantPermissions['viewdeleted']['deletedhistory'] = true;
 $wgGrantPermissions['viewdeleted']['deletedtext'] = true;
 
+$wgGrantPermissions['viewrestrictedlogs']['suppressionlog'] = true;
+
 $wgGrantPermissions['delete'] = $wgGrantPermissions['editpage'] +
        $wgGrantPermissions['viewdeleted'];
 $wgGrantPermissions['delete']['delete'] = true;
@@ -5769,6 +5799,7 @@ $wgGrantPermissionGroups = [
        'blockusers'          => 'administration',
        'delete'              => 'administration',
        'viewdeleted'         => 'administration',
+       'viewrestrictedlogs'  => 'administration',
        'protect'             => 'administration',
        'createaccount'       => 'administration',
 
@@ -6001,7 +6032,7 @@ $wgTrxProfilerLimits = [
        'JobRunner' => [
                'readQueryTime' => 30,
                'writeQueryTime' => 5,
-               'maxAffected' => 1000
+               'maxAffected' => 500 // ballpark of $wgUpdateRowsPerQuery
        ],
        // Command-line scripts
        'Maintenance' => [
index ab02a8e..0616898 100644 (file)
  * @defgroup Constants MediaWiki constants
  */
 
-/**@{
- * Database related constants
- */
-define( 'DBO_DEBUG', 1 );
-define( 'DBO_NOBUFFER', 2 );
-define( 'DBO_IGNORE', 4 );
-define( 'DBO_TRX', 8 ); // automatically start transaction on first query
-define( 'DBO_DEFAULT', 16 );
-define( 'DBO_PERSISTENT', 32 );
-define( 'DBO_SYSDBA', 64 ); // for oracle maintenance
-define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle
-define( 'DBO_SSL', 256 );
-define( 'DBO_COMPRESS', 512 );
-/**@}*/
+# Obsolete aliases
+define( 'DB_SLAVE', -1 );
 
 /**@{
- * Valid database indexes
- * Operation-based indexes
+ * Obsolete IDatabase::makeList() constants
+ * These are also available as Database class constants
  */
-define( 'DB_REPLICA', -1 );     # Read from a replica (or only server)
-define( 'DB_MASTER', -2 );    # Write to master (or only server)
+define( 'LIST_COMMA', IDatabase::LIST_COMMA );
+define( 'LIST_AND', IDatabase::LIST_AND );
+define( 'LIST_SET', IDatabase::LIST_SET );
+define( 'LIST_NAMES', IDatabase::LIST_NAMES );
+define( 'LIST_OR', IDatabase::LIST_OR );
 /**@}*/
 
-# Obsolete aliases
-define( 'DB_SLAVE', -1 );
-
 /**@{
  * Virtual namespaces; don't appear in the page database
  */
@@ -89,8 +77,13 @@ define( 'NS_CATEGORY_TALK', 15 );
  * When writing code that should be compatible with older MediaWiki
  * versions, either stick to the old names or define the new constants
  * yourself, if they're not defined already.
+ *
+ * @deprecated since 1.14
  */
 define( 'NS_IMAGE', NS_FILE );
+/**
+ * @deprecated since 1.14
+ */
 define( 'NS_IMAGE_TALK', NS_FILE_TALK );
 /**@}*/
 
@@ -104,32 +97,7 @@ define( 'CACHE_MEMCACHED', 2 );  // MemCached, must specify servers in $wgMemCac
 define( 'CACHE_ACCEL', 3 );      // APC, XCache or WinCache
 /**@}*/
 
-/**@{
- * Media types.
- * This defines constants for the value returned by File::getMediaType()
- */
-// unknown format
-define( 'MEDIATYPE_UNKNOWN', 'UNKNOWN' );
-// some bitmap image or image source (like psd, etc). Can't scale up.
-define( 'MEDIATYPE_BITMAP', 'BITMAP' );
-// some vector drawing (SVG, WMF, PS, ...) or image source (oo-draw, etc). Can scale up.
-define( 'MEDIATYPE_DRAWING', 'DRAWING' );
-// simple audio file (ogg, mp3, wav, midi, whatever)
-define( 'MEDIATYPE_AUDIO', 'AUDIO' );
-// simple video file (ogg, mpg, etc;
-// no not include formats here that may contain executable sections or scripts!)
-define( 'MEDIATYPE_VIDEO', 'VIDEO' );
-// Scriptable Multimedia (flash, advanced video container formats, etc)
-define( 'MEDIATYPE_MULTIMEDIA', 'MULTIMEDIA' );
-// Office Documents, Spreadsheets (office formats possibly containing apples, scripts, etc)
-define( 'MEDIATYPE_OFFICE', 'OFFICE' );
-// Plain text (possibly containing program code or scripts)
-define( 'MEDIATYPE_TEXT', 'TEXT' );
-// binary executable
-define( 'MEDIATYPE_EXECUTABLE', 'EXECUTABLE' );
-// archive file (zip, tar, etc)
-define( 'MEDIATYPE_ARCHIVE', 'ARCHIVE' );
-/**@}*/
+require_once __DIR__ . '/libs/mime/defines.php';
 
 /**@{
  * Antivirus result codes, for use in $wgAntivirusSetup.
@@ -185,16 +153,10 @@ define( 'EDIT_AUTOSUMMARY', 64 );
 define( 'EDIT_INTERNAL', 128 );
 /**@}*/
 
-/**@{
- * Flags for Database::makeList()
- * These are also available as Database class constants
+/**
+ * Database related
  */
-define( 'LIST_COMMA', 0 );
-define( 'LIST_AND', 1 );
-define( 'LIST_SET', 2 );
-define( 'LIST_NAMES', 3 );
-define( 'LIST_OR', 4 );
-/**@}*/
+require_once __DIR__ . '/libs/rdbms/defines.php';
 
 /**
  * Unicode and normalisation related
index ba24799..fc94a63 100644 (file)
@@ -453,12 +453,17 @@ class DummyLinker {
                );
        }
 
+       /**
+        * @deprecated since 1.28, use TemplatesOnThisPageFormatter directly
+        */
        public function formatTemplates(
                $templates,
                $preview = false,
                $section = false,
                $more = null
        ) {
+               wfDeprecated( __METHOD__, '1.28' );
+
                return Linker::formatTemplates(
                        $templates,
                        $preview,
@@ -471,7 +476,12 @@ class DummyLinker {
                return Linker::formatHiddenCategories( $hiddencats );
        }
 
+       /**
+        * @deprecated since 1.28, use Language::formatSize() directly
+        */
        public function formatSize( $size ) {
+               wfDeprecated( __METHOD__, '1.28' );
+
                return Linker::formatSize( $size );
        }
 
index 140cd72..4aa87d6 100644 (file)
@@ -21,6 +21,8 @@
  */
 
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
+use Wikimedia\ScopedCallback;
 
 /**
  * The edit page/HTML interface (split from Article)
@@ -406,6 +408,11 @@ class EditPage {
         */
        protected $context;
 
+       /**
+        * @var bool Whether an old revision is edited
+        */
+       private $isOldRev = false;
+
        /**
         * @param Article $article
         */
@@ -577,7 +584,7 @@ class EditPage {
                        ) {
                                $this->displayViewSourcePage(
                                        $this->getContentObject(),
-                                       wfMessage(
+                                       $this->context->msg(
                                                'contentmodelediterror',
                                                $revision->getContentModel(),
                                                $this->contentModel
@@ -714,7 +721,7 @@ class EditPage {
                Hooks::run( 'EditPage::showReadOnlyForm:initial', [ $this, &$wgOut ] );
 
                $wgOut->setRobotPolicy( 'noindex,nofollow' );
-               $wgOut->setPageTitle( wfMessage(
+               $wgOut->setPageTitle( $this->context->msg(
                        'viewsource-title',
                        $this->getContextTitle()->getPrefixedText()
                ) );
@@ -747,8 +754,7 @@ class EditPage {
                $this->showTextbox( $text, 'wpTextbox1', [ 'readonly' ] );
                $wgOut->addHTML( $this->editFormTextAfterContent );
 
-               $wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 'templatesUsed' ],
-                       Linker::formatTemplates( $this->getTemplates() ) ) );
+               $wgOut->addHTML( $this->makeTemplatesOnThisPageList( $this->getTemplates() ) );
 
                $wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' );
 
@@ -1178,12 +1184,12 @@ class EditPage {
                                                                if ( $firstrev && $firstrev->getId() == $undo ) {
                                                                        $userText = $undorev->getUserText();
                                                                        if ( $userText === '' ) {
-                                                                               $undoSummary = wfMessage(
+                                                                               $undoSummary = $this->context->msg(
                                                                                        'undo-summary-username-hidden',
                                                                                        $undo
                                                                                )->inContentLanguage()->text();
                                                                        } else {
-                                                                               $undoSummary = wfMessage(
+                                                                               $undoSummary = $this->context->msg(
                                                                                        'undo-summary',
                                                                                        $undo,
                                                                                        $userText
@@ -1192,7 +1198,7 @@ class EditPage {
                                                                        if ( $this->summary === '' ) {
                                                                                $this->summary = $undoSummary;
                                                                        } else {
-                                                                               $this->summary = $undoSummary . wfMessage( 'colon-separator' )
+                                                                               $this->summary = $undoSummary . $this->context->msg( 'colon-separator' )
                                                                                        ->inContentLanguage()->text() . $this->summary;
                                                                        }
                                                                        $this->undidRev = $undo;
@@ -1210,7 +1216,7 @@ class EditPage {
                                        // Messages: undo-success, undo-failure, undo-norev, undo-nochange
                                        $class = ( $undoMsg == 'success' ? '' : 'error ' ) . "mw-undo-{$undoMsg}";
                                        $this->editFormPageTop .= $wgOut->parse( "<div class=\"{$class}\">" .
-                                               wfMessage( 'undo-' . $undoMsg )->plain() . '</div>', true, /* interface */true );
+                                               $this->context->msg( 'undo-' . $undoMsg )->plain() . '</div>', true, /* interface */true );
                                }
 
                                if ( $content === false ) {
@@ -1613,8 +1619,9 @@ class EditPage {
        protected function runPostMergeFilters( Content $content, Status $status, User $user ) {
                // Run old style post-section-merge edit filter
                if ( !ContentHandler::runLegacyHooks( 'EditFilterMerged',
-                       [ $this, $content, &$this->hookError, $this->summary ] )
-               ) {
+                       [ $this, $content, &$this->hookError, $this->summary ],
+                       '1.21'
+               ) ) {
                        # Error messages etc. could be handled within the hook...
                        $status->fatal( 'hookaborted' );
                        $status->value = self::AS_HOOK_ERROR;
@@ -1639,7 +1646,7 @@ class EditPage {
                                // being set. This is used by ConfirmEdit to display a captcha
                                // without any error message cruft.
                        } else {
-                               $this->hookError = $status->getWikiText();
+                               $this->hookError = $this->formatStatusErrors( $status );
                        }
                        // Use the existing $status->value if the hook set it
                        if ( !$status->value ) {
@@ -1649,7 +1656,7 @@ class EditPage {
                } elseif ( !$status->isOK() ) {
                        # ...or the hook could be expecting us to produce an error
                        // FIXME this sucks, we should just use the Status object throughout
-                       $this->hookError = $status->getWikiText();
+                       $this->hookError = $this->formatStatusErrors( $status );
                        $status->fatal( 'hookaborted' );
                        $status->value = self::AS_HOOK_ERROR_EXPECTED;
                        return false;
@@ -1658,6 +1665,26 @@ class EditPage {
                return true;
        }
 
+       /**
+        * Wrap status errors in an errorbox for increased visiblity
+        *
+        * @param Status $status
+        * @return string
+        */
+       private function formatStatusErrors( Status $status ) {
+               $errmsg = $status->getHTML(
+                       'edit-error-short',
+                       'edit-error-long',
+                       $this->context->getLanguage()
+               );
+               return <<<ERROR
+<div class="errorbox">
+{$errmsg}
+</div>
+<br clear="all" />
+ERROR;
+       }
+
        /**
         * Return the summary to be used for a new section.
         *
@@ -1674,7 +1701,7 @@ class EditPage {
                        // passed.
                        if ( $this->summary === '' ) {
                                $cleanSectionTitle = $wgParser->stripSectionName( $this->sectiontitle );
-                               return wfMessage( 'newsectionsummary' )
+                               return $this->context->msg( 'newsectionsummary' )
                                        ->rawParams( $cleanSectionTitle )->inContentLanguage()->text();
                        }
                } elseif ( $this->summary !== '' ) {
@@ -1682,7 +1709,7 @@ class EditPage {
                        # This is a new section, so create a link to the new section
                        # in the revision summary.
                        $cleanSummary = $wgParser->stripSectionName( $this->summary );
-                       return wfMessage( 'newsectionsummary' )
+                       return $this->context->msg( 'newsectionsummary' )
                                ->rawParams( $cleanSummary )->inContentLanguage()->text();
                }
                return $this->summary;
@@ -1846,8 +1873,17 @@ class EditPage {
                        } elseif ( !$wgUser->isAllowed( 'editcontentmodel' ) ) {
                                $status->setResult( false, self::AS_NO_CHANGE_CONTENT_MODEL );
                                return $status;
-
                        }
+                       // Make sure the user can edit the page under the new content model too
+                       $titleWithNewContentModel = clone $this->mTitle;
+                       $titleWithNewContentModel->setContentModel( $this->contentModel );
+                       if ( !$titleWithNewContentModel->userCan( 'editcontentmodel', $wgUser )
+                               || !$titleWithNewContentModel->userCan( 'edit', $wgUser )
+                       ) {
+                               $status->setResult( false, self::AS_NO_CHANGE_CONTENT_MODEL );
+                               return $status;
+                       }
+
                        $changingContentModel = true;
                        $oldContentModel = $this->mTitle->getContentModel();
                }
@@ -2357,7 +2393,7 @@ class EditPage {
                if ( $displayTitle === false ) {
                        $displayTitle = $contextTitle->getPrefixedText();
                }
-               $wgOut->setPageTitle( wfMessage( $msg, $displayTitle ) );
+               $wgOut->setPageTitle( $this->context->msg( $msg, $displayTitle ) );
                # Transmit the name of the message to JavaScript for live preview
                # Keep Resources.php/mediawiki.action.edit.preview in sync with the possible keys
                $wgOut->addJsConfigVars( [
@@ -2442,7 +2478,7 @@ class EditPage {
                # Try to add a custom edit intro, or use the standard one if this is not possible.
                if ( !$this->showCustomIntro() && !$this->mTitle->exists() ) {
                        $helpLink = wfExpandUrl( Skin::makeInternalOrExternalUrl(
-                               wfMessage( 'helppage' )->inContentLanguage()->text()
+                               $this->context->msg( 'helppage' )->inContentLanguage()->text()
                        ) );
                        if ( $wgUser->isLoggedIn() ) {
                                $wgOut->wrapWikiMsg(
@@ -2632,7 +2668,7 @@ class EditPage {
                        . Html::rawElement(
                                'label',
                                [ 'for' => 'wpAntispam' ],
-                               wfMessage( 'simpleantispam-label' )->parse()
+                               $this->context->msg( 'simpleantispam-label' )->parse()
                        )
                        . Xml::element(
                                'input',
@@ -2662,8 +2698,8 @@ class EditPage {
                                : 'confirmrecreate';
                        $wgOut->addHTML(
                                '<div class="mw-confirm-recreate">' .
-                                       wfMessage( $key, $username, "<nowiki>$comment</nowiki>" )->parse() .
-                               Xml::checkLabel( wfMessage( 'recreate' )->text(), 'wpRecreate', 'wpRecreate', false,
+                                       $this->context->msg( $key, $username, "<nowiki>$comment</nowiki>" )->parse() .
+                               Xml::checkLabel( $this->context->msg( 'recreate' )->text(), 'wpRecreate', 'wpRecreate', false,
                                        [ 'title' => Linker::titleAttrib( 'recreate' ), 'tabindex' => 1, 'id' => 'wpRecreate' ]
                                ) .
                                '</div>'
@@ -2752,15 +2788,13 @@ class EditPage {
 
                $wgOut->addHTML( $this->editFormTextAfterTools . "\n" );
 
-               $wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 'templatesUsed' ],
-                       Linker::formatTemplates( $this->getTemplates(), $this->preview, $this->section != '' ) ) );
+               $wgOut->addHTML( $this->makeTemplatesOnThisPageList( $this->getTemplates() ) );
 
                $wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 'hiddencats' ],
                        Linker::formatHiddenCategories( $this->page->getHiddenCategories() ) ) );
 
-               if ( $this->mParserOutput ) {
-                       $wgOut->setLimitReportData( $this->mParserOutput->getLimitReportData() );
-               }
+               $wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 'limitreport' ],
+                       self::getPreviewLimitReport( $this->mParserOutput ) ) );
 
                $wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' );
 
@@ -2769,7 +2803,7 @@ class EditPage {
                                $this->showConflict();
                        } catch ( MWContentSerializationException $ex ) {
                                // this can't really happen, but be nice if it does.
-                               $msg = wfMessage(
+                               $msg = $this->context->msg(
                                        'content-failed-to-parse',
                                        $this->contentModel,
                                        $this->contentFormat,
@@ -2802,6 +2836,32 @@ class EditPage {
 
        }
 
+       /**
+        * Wrapper around TemplatesOnThisPageFormatter to make
+        * a "templates on this page" list.
+        *
+        * @param Title[] $templates
+        * @return string HTML
+        */
+       protected function makeTemplatesOnThisPageList( array $templates ) {
+               $templateListFormatter = new TemplatesOnThisPageFormatter(
+                       $this->context, MediaWikiServices::getInstance()->getLinkRenderer()
+               );
+
+               // preview if preview, else section if section, else false
+               $type = false;
+               if ( $this->preview ) {
+                       $type = 'preview';
+               } elseif ( $this->section != '' ) {
+                       $type = 'section';
+               }
+
+               return Html::rawElement( 'div', [ 'class' => 'templatesUsed' ],
+                       $templateListFormatter->format( $templates, $type )
+               );
+
+       }
+
        /**
         * Extract the section title from current section text, if any.
         *
@@ -2825,24 +2885,9 @@ class EditPage {
                global $wgOut, $wgUser, $wgMaxArticleSize, $wgLang;
                global $wgAllowUserCss, $wgAllowUserJs;
 
-               if ( $this->mTitle->isTalkPage() ) {
-                       $wgOut->addWikiMsg( 'talkpagetext' );
-               }
+               $this->addTalkPageText();
 
-               // Add edit notices
-               $editNotices = $this->mTitle->getEditNotices( $this->oldid );
-               if ( count( $editNotices ) ) {
-                       $wgOut->addHTML( implode( "\n", $editNotices ) );
-               } else {
-                       $msg = wfMessage( 'editnotice-notext' );
-                       if ( !$msg->isDisabled() ) {
-                               $wgOut->addHTML(
-                                       '<div class="mw-editnotice-notext">'
-                                       . $msg->parseAsBlock()
-                                       . '</div>'
-                               );
-                       }
-               }
+               $this->addEditNotices();
 
                if ( $this->isConflict ) {
                        $wgOut->wrapWikiMsg( "<div class='mw-explainconflict'>\n$1\n</div>", 'explainconflict' );
@@ -2913,6 +2958,7 @@ class EditPage {
                                        if ( !$revision->isCurrent() ) {
                                                $this->mArticle->setOldSubtitle( $revision->getId() );
                                                $wgOut->addWikiMsg( 'editingold' );
+                                               $this->isOldRev = true;
                                        }
                                } elseif ( $this->mTitle->exists() ) {
                                        // Something went wrong
@@ -3029,7 +3075,7 @@ class EditPage {
                                ]
                        );
                } else {
-                       if ( !wfMessage( 'longpage-hint' )->isDisabled() ) {
+                       if ( !$this->context->msg( 'longpage-hint' )->isDisabled() ) {
                                $wgOut->wrapWikiMsg( "<div id='mw-edit-longpage-hint'>\n$1\n</div>",
                                        [
                                                'longpage-hint',
@@ -3110,7 +3156,7 @@ class EditPage {
                                return;
                        }
                }
-               $labelText = wfMessage( $isSubjectPreview ? 'subject' : 'summary' )->parse();
+               $labelText = $this->context->msg( $isSubjectPreview ? 'subject' : 'summary' )->parse();
                list( $label, $input ) = $this->getSummaryInput(
                        $summary,
                        $labelText,
@@ -3137,13 +3183,14 @@ class EditPage {
                global $wgParser;
 
                if ( $isSubjectPreview ) {
-                       $summary = wfMessage( 'newsectionsummary' )->rawParams( $wgParser->stripSectionName( $summary ) )
+                       $summary = $this->context->msg( 'newsectionsummary' )
+                               ->rawParams( $wgParser->stripSectionName( $summary ) )
                                ->inContentLanguage()->text();
                }
 
                $message = $isSubjectPreview ? 'subject-preview' : 'summary-preview';
 
-               $summary = wfMessage( $message )->parse()
+               $summary = $this->context->msg( $message )->parse()
                        . Linker::commentBlock( $summary, $this->mTitle, $isSubjectPreview );
                return Xml::tags( 'div', [ 'class' => 'mw-summary-preview' ], $summary );
        }
@@ -3222,6 +3269,10 @@ HTML
                                        $classes[] = 'mw-textarea-cprotected';
                                }
                        }
+                       # Is an old revision being edited?
+                       if ( $this->isOldRev ) {
+                               $classes[] = 'mw-textarea-oldrev';
+                       }
 
                        $attribs = [ 'tabindex' => 1 ];
 
@@ -3270,6 +3321,23 @@ HTML
                        'style' => ''
                ];
 
+               // The following classes can be used here:
+               // * mw-editfont-default
+               // * mw-editfont-monospace
+               // * mw-editfont-sans-serif
+               // * mw-editfont-serif
+               $class = 'mw-editfont-' . $wgUser->getOption( 'editfont' );
+
+               if ( isset( $attribs['class'] ) ) {
+                       if ( is_string( $attribs['class'] ) ) {
+                               $attribs['class'] .= ' ' . $class;
+                       } elseif ( is_array( $attribs['class'] ) ) {
+                               $attribs['class'][] = $class;
+                       }
+               } else {
+                       $attribs['class'] = $class;
+               }
+
                $pageLang = $this->mTitle->getPageLanguage();
                $attribs['lang'] = $pageLang->getHtmlCode();
                $attribs['dir'] = $pageLang->getDir();
@@ -3308,7 +3376,7 @@ HTML
                        try {
                                $this->showDiff();
                        } catch ( MWContentSerializationException $ex ) {
-                               $msg = wfMessage(
+                               $msg = $this->context->msg(
                                        'content-failed-to-parse',
                                        $this->contentModel,
                                        $this->contentFormat,
@@ -3375,7 +3443,7 @@ HTML
                }
 
                if ( $newContent ) {
-                       ContentHandler::runLegacyHooks( 'EditPageGetDiffText', [ $this, &$newContent ] );
+                       ContentHandler::runLegacyHooks( 'EditPageGetDiffText', [ $this, &$newContent ], '1.21' );
                        Hooks::run( 'EditPageGetDiffContent', [ $this, &$newContent ] );
 
                        $popts = ParserOptions::newFromUserAndLang( $wgUser, $wgContLang );
@@ -3383,8 +3451,8 @@ HTML
                }
 
                if ( ( $oldContent && !$oldContent->isEmpty() ) || ( $newContent && !$newContent->isEmpty() ) ) {
-                       $oldtitle = wfMessage( $oldtitlemsg )->parse();
-                       $newtitle = wfMessage( 'yourtext' )->parse();
+                       $oldtitle = $this->context->msg( $oldtitlemsg )->parse();
+                       $newtitle = $this->context->msg( 'yourtext' )->parse();
 
                        if ( !$oldContent ) {
                                $oldContent = $newContent->getContentHandler()->makeEmptyContent();
@@ -3411,7 +3479,7 @@ HTML
         */
        protected function showHeaderCopyrightWarning() {
                $msg = 'editpage-head-copy-warn';
-               if ( !wfMessage( $msg )->isDisabled() ) {
+               if ( !$this->context->msg( $msg )->isDisabled() ) {
                        global $wgOut;
                        $wgOut->wrapWikiMsg( "<div class='editpage-head-copywarn'>\n$1\n</div>",
                                'editpage-head-copy-warn' );
@@ -3429,7 +3497,7 @@ HTML
        protected function showTosSummary() {
                $msg = 'editpage-tos-summary';
                Hooks::run( 'EditPageTosSummary', [ $this->mTitle, &$msg ] );
-               if ( !wfMessage( $msg )->isDisabled() ) {
+               if ( !$this->context->msg( $msg )->isDisabled() ) {
                        global $wgOut;
                        $wgOut->addHTML( '<div class="mw-tos-summary">' );
                        $wgOut->addWikiMsg( $msg );
@@ -3440,7 +3508,7 @@ HTML
        protected function showEditTools() {
                global $wgOut;
                $wgOut->addHTML( '<div class="mw-editTools">' .
-                       wfMessage( 'edittools' )->inContentLanguage()->parse() .
+                       $this->context->msg( 'edittools' )->inContentLanguage()->parse() .
                        '</div>' );
        }
 
@@ -3461,7 +3529,7 @@ HTML
         * @param string $format Output format, valid values are any function of a Message object
         * @return string
         */
-       public static function getCopyrightWarning( $title, $format = 'plain' ) {
+       public static function getCopyrightWarning( $title, $format = 'plain', $langcode = null ) {
                global $wgRightsText;
                if ( $wgRightsText ) {
                        $copywarnMsg = [ 'copyrightwarning',
@@ -3474,8 +3542,12 @@ HTML
                // Allow for site and per-namespace customization of contribution/copyright notice.
                Hooks::run( 'EditPageCopyrightWarning', [ $title, &$copywarnMsg ] );
 
+               $msg = call_user_func_array( 'wfMessage', $copywarnMsg )->title( $title );
+               if ( $langcode ) {
+                       $msg->inLanguage( $langcode );
+               }
                return "<div id=\"editpage-copywarn\">\n" .
-                       call_user_func_array( 'wfMessage', $copywarnMsg )->$format() . "\n</div>";
+                       $msg->$format() . "\n</div>";
        }
 
        /**
@@ -3490,12 +3562,47 @@ HTML
                        return '';
                }
 
-               return ResourceLoader::makeInlineScript(
-                       ResourceLoader::makeConfigSetScript(
-                               [ 'wgPageParseReport' => $output->getLimitReportData() ],
-                               true
-                       )
+               $limitReport = Html::rawElement( 'div', [ 'class' => 'mw-limitReportExplanation' ],
+                       wfMessage( 'limitreport-title' )->parseAsBlock()
                );
+
+               // Show/hide animation doesn't work correctly on a table, so wrap it in a div.
+               $limitReport .= Html::openElement( 'div', [ 'class' => 'preview-limit-report-wrapper' ] );
+
+               $limitReport .= Html::openElement( 'table', [
+                       'class' => 'preview-limit-report wikitable'
+               ] ) .
+                       Html::openElement( 'tbody' );
+
+               foreach ( $output->getLimitReportData()['limitreport'] as $key => $value ) {
+                       if ( Hooks::run( 'ParserLimitReportFormat',
+                               [ $key, &$value, &$limitReport, true, true ]
+                       ) ) {
+                               $keyMsg = wfMessage( "limitreport-$key" );
+                               $valueMsg = wfMessage(
+                                       [ "limitreport-$key-value-html", "limitreport-$key-value" ]
+                               );
+                               if ( !$valueMsg->exists() ) {
+                                       $valueMsg = new RawMessage( '$1' );
+                               }
+                               if ( !$keyMsg->isDisabled() && !$valueMsg->isDisabled() ) {
+                                       // If it's a value/limit array, convert it for $1/$2
+                                       if ( is_array( $value ) && isset( $value['value'] ) ) {
+                                               $value = [ $value['value'], $value['limit'] ];
+                                       }
+                                       $limitReport .= Html::openElement( 'tr' ) .
+                                               Html::rawElement( 'th', null, $keyMsg->parse() ) .
+                                               Html::rawElement( 'td', null, $valueMsg->params( $value )->parse() ) .
+                                               Html::closeElement( 'tr' );
+                               }
+                       }
+               }
+
+               $limitReport .= Html::closeElement( 'tbody' ) .
+                       Html::closeElement( 'table' ) .
+                       Html::closeElement( 'div' );
+
+               return $limitReport;
        }
 
        protected function showStandardInputs( &$tabindex = 2 ) {
@@ -3522,19 +3629,19 @@ HTML
                if ( $cancel !== '' ) {
                        $cancel .= Html::element( 'span',
                                [ 'class' => 'mw-editButtons-pipe-separator' ],
-                               wfMessage( 'pipe-separator' )->text() );
+                               $this->context->msg( 'pipe-separator' )->text() );
                }
 
-               $message = wfMessage( 'edithelppage' )->inContentLanguage()->text();
+               $message = $this->context->msg( 'edithelppage' )->inContentLanguage()->text();
                $edithelpurl = Skin::makeInternalOrExternalUrl( $message );
                $attrs = [
                        'target' => 'helpwindow',
                        'href' => $edithelpurl,
                ];
-               $edithelp = Html::linkButton( wfMessage( 'edithelp' )->text(),
+               $edithelp = Html::linkButton( $this->context->msg( 'edithelp' )->text(),
                        $attrs, [ 'mw-ui-quiet' ] ) .
-                       wfMessage( 'word-separator' )->escaped() .
-                       wfMessage( 'newwindow' )->parse();
+                       $this->context->msg( 'word-separator' )->escaped() .
+                       $this->context->msg( 'newwindow' )->parse();
 
                $wgOut->addHTML( "      <span class='cancelLink'>{$cancel}</span>\n" );
                $wgOut->addHTML( "      <span class='editHelp'>{$edithelp}</span>\n" );
@@ -3572,8 +3679,8 @@ HTML
                        $de = $handler->createDifferenceEngine( $this->mArticle->getContext() );
                        $de->setContent( $content2, $content1 );
                        $de->showDiff(
-                               wfMessage( 'yourtext' )->parse(),
-                               wfMessage( 'storedversion' )->text()
+                               $this->context->msg( 'yourtext' )->parse(),
+                               $this->context->msg( 'storedversion' )->text()
                        );
 
                        $wgOut->wrapWikiMsg( '<h2>$1</h2>', "yourtext" );
@@ -3595,7 +3702,7 @@ HTML
 
                return Linker::linkKnown(
                        $this->getContextTitle(),
-                       wfMessage( 'cancel' )->parse(),
+                       $this->context->msg( 'cancel' )->parse(),
                        Html::buttonAttributes( $attrs, [ 'mw-ui-quiet' ] ),
                        $cancelParams
                );
@@ -3672,11 +3779,11 @@ HTML
                // Quick paranoid permission checks...
                if ( is_object( $data ) ) {
                        if ( $data->log_deleted & LogPage::DELETED_USER ) {
-                               $data->user_name = wfMessage( 'rev-deleted-user' )->escaped();
+                               $data->user_name = $this->context->msg( 'rev-deleted-user' )->escaped();
                        }
 
                        if ( $data->log_deleted & LogPage::DELETED_COMMENT ) {
-                               $data->log_comment = wfMessage( 'rev-deleted-comment' )->escaped();
+                               $data->log_comment = $this->context->msg( 'rev-deleted-comment' )->escaped();
                        }
                }
 
@@ -3703,7 +3810,8 @@ HTML
                                // string, which happens when you initially edit
                                // a category page, due to automatic preview-on-open.
                                $parsedNote = $wgOut->parse( "<div class='previewnote'>" .
-                                       wfMessage( 'session_fail_preview_html' )->text() . "</div>", true, /* interface */true );
+                                       $this->context->msg( 'session_fail_preview_html' )->text() . "</div>",
+                                       true, /* interface */true );
                        }
                        $stats->increment( 'edit.failures.session_loss' );
                        return $parsedNote;
@@ -3725,22 +3833,22 @@ HTML
                        # provide a anchor link to the editform
                        $continueEditing = '<span class="mw-continue-editing">' .
                                '[[#' . self::EDITFORM_ID . '|' . $wgLang->getArrow() . ' ' .
-                               wfMessage( 'continue-editing' )->text() . ']]</span>';
+                               $this->context->msg( 'continue-editing' )->text() . ']]</span>';
                        if ( $this->mTriedSave && !$this->mTokenOk ) {
                                if ( $this->mTokenOkExceptSuffix ) {
-                                       $note = wfMessage( 'token_suffix_mismatch' )->plain();
+                                       $note = $this->context->msg( 'token_suffix_mismatch' )->plain();
                                        $stats->increment( 'edit.failures.bad_token' );
                                } else {
-                                       $note = wfMessage( 'session_fail_preview' )->plain();
+                                       $note = $this->context->msg( 'session_fail_preview' )->plain();
                                        $stats->increment( 'edit.failures.session_loss' );
                                }
                        } elseif ( $this->incompleteForm ) {
-                               $note = wfMessage( 'edit_form_incomplete' )->plain();
+                               $note = $this->context->msg( 'edit_form_incomplete' )->plain();
                                if ( $this->mTriedSave ) {
                                        $stats->increment( 'edit.failures.incomplete_form' );
                                }
                        } else {
-                               $note = wfMessage( 'previewnote' )->plain() . ' ' . $continueEditing;
+                               $note = $this->context->msg( 'previewnote' )->plain() . ' ' . $continueEditing;
                        }
 
                        # don't parse non-wikitext pages, show message about preview
@@ -3771,7 +3879,7 @@ HTML
                                # Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview
                                if ( $level && $format ) {
                                        $note = "<div id='mw-{$level}{$format}preview'>" .
-                                               wfMessage( "{$level}{$format}preview" )->text() .
+                                               $this->context->msg( "{$level}{$format}preview" )->text() .
                                                ' ' . $continueEditing . "</div>";
                                }
                        }
@@ -3783,7 +3891,7 @@ HTML
                        }
 
                        $hook_args = [ $this, &$content ];
-                       ContentHandler::runLegacyHooks( 'EditPageGetPreviewText', $hook_args );
+                       ContentHandler::runLegacyHooks( 'EditPageGetPreviewText', $hook_args, '1.25' );
                        Hooks::run( 'EditPageGetPreviewContent', $hook_args );
 
                        $parserResult = $this->doPreviewParse( $content );
@@ -3797,7 +3905,7 @@ HTML
                        }
 
                } catch ( MWContentSerializationException $ex ) {
-                       $m = wfMessage(
+                       $m = $this->context->msg(
                                'content-failed-to-parse',
                                $this->contentModel,
                                $this->contentFormat,
@@ -3809,13 +3917,13 @@ HTML
 
                if ( $this->isConflict ) {
                        $conflict = '<h2 id="mw-previewconflict">'
-                               . wfMessage( 'previewconflict' )->escaped() . "</h2>\n";
+                               . $this->context->msg( 'previewconflict' )->escaped() . "</h2>\n";
                } else {
                        $conflict = '<hr />';
                }
 
                $previewhead = "<div class='previewnote'>\n" .
-                       '<h2 id="mw-previewheader">' . wfMessage( 'preview' )->escaped() . "</h2>" .
+                       '<h2 id="mw-previewheader">' . $this->context->msg( 'preview' )->escaped() . "</h2>" .
                        $wgOut->parse( $note, true, /* interface */true ) . $conflict . "</div>\n";
 
                $pageViewLang = $this->mTitle->getPageViewLanguage();
@@ -4035,11 +4143,11 @@ HTML
                // don't show the minor edit checkbox if it's a new page or section
                if ( !$this->isNew ) {
                        $checkboxes['minor'] = '';
-                       $minorLabel = wfMessage( 'minoredit' )->parse();
+                       $minorLabel = $this->context->msg( 'minoredit' )->parse();
                        if ( $wgUser->isAllowed( 'minoredit' ) ) {
                                $attribs = [
                                        'tabindex' => ++$tabindex,
-                                       'accesskey' => wfMessage( 'accesskey-minoredit' )->text(),
+                                       'accesskey' => $this->context->msg( 'accesskey-minoredit' )->text(),
                                        'id' => 'wpMinoredit',
                                ];
                                $minorEditHtml =
@@ -4058,12 +4166,12 @@ HTML
                        }
                }
 
-               $watchLabel = wfMessage( 'watchthis' )->parse();
+               $watchLabel = $this->context->msg( 'watchthis' )->parse();
                $checkboxes['watch'] = '';
                if ( $wgUser->isLoggedIn() ) {
                        $attribs = [
                                'tabindex' => ++$tabindex,
-                               'accesskey' => wfMessage( 'accesskey-watch' )->text(),
+                               'accesskey' => $this->context->msg( 'accesskey-watch' )->text(),
                                'id' => 'wpWatchthis',
                        ];
                        $watchThisHtml =
@@ -4103,13 +4211,13 @@ HTML
                } else {
                        $buttonLabelKey = !$this->mTitle->exists() ? 'savearticle' : 'savechanges';
                }
-               $buttonLabel = wfMessage( $buttonLabelKey )->text();
+               $buttonLabel = $this->context->msg( $buttonLabelKey )->text();
                $attribs = [
                        'id' => 'wpSave',
                        'name' => 'wpSave',
                        'tabindex' => ++$tabindex,
                ] + Linker::tooltipAndAccesskeyAttribs( 'save' );
-               $buttons['save'] = Html::submitButton( $buttonLabel, $attribs, [ 'mw-ui-constructive' ] );
+               $buttons['save'] = Html::submitButton( $buttonLabel, $attribs, [ 'mw-ui-progressive' ] );
 
                ++$tabindex; // use the same for preview and live preview
                $attribs = [
@@ -4117,7 +4225,7 @@ HTML
                        'name' => 'wpPreview',
                        'tabindex' => $tabindex,
                ] + Linker::tooltipAndAccesskeyAttribs( 'preview' );
-               $buttons['preview'] = Html::submitButton( wfMessage( 'showpreview' )->text(),
+               $buttons['preview'] = Html::submitButton( $this->context->msg( 'showpreview' )->text(),
                        $attribs );
                $buttons['live'] = '';
 
@@ -4126,7 +4234,7 @@ HTML
                        'name' => 'wpDiff',
                        'tabindex' => ++$tabindex,
                ] + Linker::tooltipAndAccesskeyAttribs( 'diff' );
-               $buttons['diff'] = Html::submitButton( wfMessage( 'showdiff' )->text(),
+               $buttons['diff'] = Html::submitButton( $this->context->msg( 'showdiff' )->text(),
                        $attribs );
 
                Hooks::run( 'EditPageBeforeEditButtons', [ &$this, &$buttons, &$tabindex ] );
@@ -4140,9 +4248,9 @@ HTML
        function noSuchSectionPage() {
                global $wgOut;
 
-               $wgOut->prepareErrorPage( wfMessage( 'nosuchsectiontitle' ) );
+               $wgOut->prepareErrorPage( $this->context->msg( 'nosuchsectiontitle' ) );
 
-               $res = wfMessage( 'nosuchsectiontext', $this->section )->parseAsBlock();
+               $res = $this->context->msg( 'nosuchsectiontext', $this->section )->parseAsBlock();
                Hooks::run( 'EditPageNoSuchSection', [ &$this, &$res ] );
                $wgOut->addHTML( $res );
 
@@ -4161,7 +4269,7 @@ HTML
                if ( is_array( $match ) ) {
                        $match = $wgLang->listToText( $match );
                }
-               $wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) );
+               $wgOut->prepareErrorPage( $this->context->msg( 'spamprotectiontitle' ) );
 
                $wgOut->addHTML( '<div id="spamprotected">' );
                $wgOut->addWikiMsg( 'spamprotectiontext' );
@@ -4227,7 +4335,7 @@ HTML
        protected function safeUnicodeOutput( $text ) {
                return $this->checkUnicodeCompliantBrowser()
                        ? $text
-                       : $this->makesafe( $text );
+                       : $this->makeSafe( $text );
        }
 
        /**
@@ -4312,4 +4420,30 @@ HTML
                // reverse the transform that we made for reversibility reasons.
                return strtr( $result, [ "&#x0" => "&#x" ] );
        }
+
+       protected function addEditNotices() {
+               global $wgOut;
+
+               $editNotices = $this->mTitle->getEditNotices( $this->oldid );
+               if ( count( $editNotices ) ) {
+                       $wgOut->addHTML( implode( "\n", $editNotices ) );
+               } else {
+                       $msg = $this->context->msg( 'editnotice-notext' );
+                       if ( !$msg->isDisabled() ) {
+                               $wgOut->addHTML(
+                                       '<div class="mw-editnotice-notext">'
+                                       . $msg->parseAsBlock()
+                                       . '</div>'
+                               );
+                       }
+               }
+       }
+
+       protected function addTalkPageText() {
+               global $wgOut;
+
+               if ( $this->mTitle->isTalkPage() ) {
+                       $wgOut->addWikiMsg( 'talkpagetext' );
+               }
+       }
 }
index 65638f2..e6223e8 100644 (file)
@@ -125,7 +125,7 @@ class FileDeleteForm {
                                        $status->getWikiText( 'filedeleteerror-short', 'filedeleteerror-long' )
                                        . '</div>' );
                        }
-                       if ( $status->ok ) {
+                       if ( $status->isOK() ) {
                                $wgOut->setPageTitle( wfMessage( 'actioncomplete' ) );
                                $wgOut->addHTML( $this->prepareMessage( 'filedelete-success' ) );
                                // Return to the main page if we just deleted all versions of the
@@ -150,11 +150,12 @@ class FileDeleteForm {
         * @param string $reason Reason of the deletion
         * @param bool $suppress Whether to mark all deleted versions as restricted
         * @param User $user User object performing the request
+        * @param array $tags Tags to apply to the deletion action
         * @throws MWException
         * @return bool|Status
         */
        public static function doDelete( &$title, &$file, &$oldimage, $reason,
-               $suppress, User $user = null
+               $suppress, User $user = null, $tags = []
        ) {
                if ( $user === null ) {
                        global $wgUser;
@@ -178,6 +179,7 @@ class FileDeleteForm {
                                $logEntry->setPerformer( $user );
                                $logEntry->setTarget( $title );
                                $logEntry->setComment( $logComment );
+                               $logEntry->setTags( $tags );
                                $logid = $logEntry->insert();
                                $logEntry->publish( $logid );
 
@@ -192,7 +194,8 @@ class FileDeleteForm {
                        $dbw->startAtomic( __METHOD__ );
                        // delete the associated article first
                        $error = '';
-                       $deleteStatus = $page->doDeleteArticleReal( $reason, $suppress, 0, false, $error, $user );
+                       $deleteStatus = $page->doDeleteArticleReal( $reason, $suppress, 0, false, $error,
+                               $user, $tags );
                        // doDeleteArticleReal() returns a non-fatal error status if the page
                        // or revision is missing, so check for isOK() rather than isGood()
                        if ( $deleteStatus->isOK() ) {
index 2725753..2dde17b 100644 (file)
@@ -19,6 +19,7 @@
  *
  * @file
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Class for managing forking command line scripts.
@@ -150,7 +151,7 @@ class ForkController {
        protected function prepareEnvironment() {
                global $wgMemc;
                // Don't share DB, storage, or memcached connections
-               wfGetLBFactory()->destroyInstance();
+               MediaWikiServices::resetChildProcessServices();
                FileBackendGroup::destroySingleton();
                LockManagerGroup::destroySingletons();
                JobQueueGroup::destroySingletons();
index 0e59653..bae9c77 100644 (file)
@@ -27,6 +27,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 use Liuggio\StatsdClient\Sender\SocketSender;
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\Session\SessionManager;
+use Wikimedia\ScopedCallback;
 
 // Hide compatibility functions from Doxygen
 /// @cond
@@ -1624,11 +1625,13 @@ function wfShowingResults( $offset, $limit ) {
 }
 
 /**
- * @todo document
- * @todo FIXME: We may want to blacklist some broken browsers
+ * Whether the client accept gzip encoding
  *
- * @param bool $force
- * @return bool Whereas client accept gzip compression
+ * Uses the Accept-Encoding header to check if the client supports gzip encoding.
+ * Use this when considering to send a gzip-encoded response to the client.
+ *
+ * @param bool $force Forces another check even if we already have a cached result.
+ * @return bool
  */
 function wfClientAcceptsGzip( $force = false ) {
        static $result = null;
@@ -1992,56 +1995,7 @@ function wfRestoreWarnings() {
 
 # Autodetect, convert and provide timestamps of various types
 
-/**
- * Unix time - the number of seconds since 1970-01-01 00:00:00 UTC
- */
-define( 'TS_UNIX', 0 );
-
-/**
- * MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS)
- */
-define( 'TS_MW', 1 );
-
-/**
- * MySQL DATETIME (YYYY-MM-DD HH:MM:SS)
- */
-define( 'TS_DB', 2 );
-
-/**
- * RFC 2822 format, for E-mail and HTTP headers
- */
-define( 'TS_RFC2822', 3 );
-
-/**
- * ISO 8601 format with no timezone: 1986-02-09T20:00:00Z
- *
- * This is used by Special:Export
- */
-define( 'TS_ISO_8601', 4 );
-
-/**
- * An Exif timestamp (YYYY:MM:DD HH:MM:SS)
- *
- * @see http://exif.org/Exif2-2.PDF The Exif 2.2 spec, see page 28 for the
- *       DateTime tag and page 36 for the DateTimeOriginal and
- *       DateTimeDigitized tags.
- */
-define( 'TS_EXIF', 5 );
-
-/**
- * Oracle format time.
- */
-define( 'TS_ORACLE', 6 );
-
-/**
- * Postgres format time.
- */
-define( 'TS_POSTGRES', 7 );
-
-/**
- * ISO 8601 basic format with no timezone: 19860209T200000Z.  This is used by ResourceLoader
- */
-define( 'TS_ISO_8601_BASIC', 9 );
+require_once __DIR__ . '/libs/time/defines.php';
 
 /**
  * Get a timestamp string in one of various formats
@@ -2052,13 +2006,11 @@ define( 'TS_ISO_8601_BASIC', 9 );
  * @return string|bool String / false The same date in the format specified in $outputtype or false
  */
 function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) {
-       try {
-               $timestamp = new MWTimestamp( $ts );
-               return $timestamp->getTimestamp( $outputtype );
-       } catch ( TimestampException $e ) {
+       $ret = MWTimestamp::convert( $outputtype, $ts );
+       if ( $ret === false ) {
                wfDebug( "wfTimestamp() fed bogus time value: TYPE=$outputtype; VALUE=$ts\n" );
-               return false;
        }
+       return $ret;
 }
 
 /**
@@ -2084,7 +2036,7 @@ function wfTimestampOrNull( $outputtype = TS_UNIX, $ts = null ) {
  */
 function wfTimestampNow() {
        # return NOW
-       return wfTimestamp( TS_MW, time() );
+       return MWTimestamp::now( TS_MW );
 }
 
 /**
@@ -2127,35 +2079,7 @@ function wfTempDir() {
                return $wgTmpDirectory;
        }
 
-       $tmpDir = array_map( "getenv", [ 'TMPDIR', 'TMP', 'TEMP' ] );
-       $tmpDir[] = sys_get_temp_dir();
-       $tmpDir[] = ini_get( 'upload_tmp_dir' );
-
-       foreach ( $tmpDir as $tmp ) {
-               if ( $tmp && file_exists( $tmp ) && is_dir( $tmp ) && is_writable( $tmp ) ) {
-                       return $tmp;
-               }
-       }
-
-       /**
-        * PHP on Windows will detect C:\Windows\Temp as not writable even though PHP can write to it
-        * so create a directory within that called 'mwtmp' with a suffix of the user running the
-        * current process.
-        * The user is included as if various scripts are run by different users they will likely
-        * not be able to access each others temporary files.
-        */
-       if ( wfIsWindows() ) {
-               $tmp = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'mwtmp' . '-' . get_current_user();
-               if ( !file_exists( $tmp ) ) {
-                       mkdir( $tmp );
-               }
-               if ( file_exists( $tmp ) && is_dir( $tmp ) && is_writable( $tmp ) ) {
-                       return $tmp;
-               }
-       }
-
-       throw new MWException( 'No writable temporary directory could be found. ' .
-               'Please set $wgTmpDirectory to a writable directory.' );
+       return TempFSFile::getUsableTempDirectory();
 }
 
 /**
@@ -2273,12 +2197,11 @@ function wfIniGetBool( $setting ) {
 }
 
 /**
- * Windows-compatible version of escapeshellarg()
- * Windows doesn't recognise single-quotes in the shell, but the escapeshellarg()
- * function puts single quotes in regardless of OS.
+ * Version of escapeshellarg() that works better on Windows.
  *
- * Also fixes the locale problems on Linux in PHP 5.2.6+ (bug backported to
- * earlier distro releases of PHP)
+ * Originally, this fixed the incorrect use of single quotes on Windows
+ * (https://bugs.php.net/bug.php?id=26285) and the locale problems on Linux in
+ * PHP 5.2.6+ (bug backported to earlier distro releases of PHP).
  *
  * @param string ... strings to escape and glue together, or a single array of strings parameter
  * @return string
@@ -3146,7 +3069,7 @@ function wfSplitWikiID( $wiki ) {
  * @todo Replace calls to wfGetDB with calls to LoadBalancer::getConnection()
  *       on an injected instance of LoadBalancer.
  *
- * @return DatabaseBase
+ * @return Database
  */
 function wfGetDB( $db, $groups = [], $wiki = false ) {
        return wfGetLB( $wiki )->getConnection( $db, $groups, $wiki );
index 8c01448..48b30c7 100644 (file)
  * @since 1.16
  */
 class Html {
-       // List of void elements from HTML5, section 8.1.2 as of 2011-08-12
+       // List of void elements from HTML5, section 8.1.2 as of 2016-09-19
        private static $voidElements = [
                'area',
                'base',
                'br',
                'col',
-               'command',
                'embed',
                'hr',
                'img',
@@ -156,8 +155,8 @@ class Html {
         *
         * @param string $contents The raw HTML contents of the element: *not*
         *   escaped!
-        * @param array $attrs Associative array of attributes, e.g., array(
-        *   'href' => 'http://www.mediawiki.org/' ). See expandAttributes() for
+        * @param array $attrs Associative array of attributes, e.g., [
+        *   'href' => 'http://www.mediawiki.org/' ]. See expandAttributes() for
         *   further documentation.
         * @param string[] $modifiers classes to add to the button
         * @see http://tools.wmflabs.org/styleguide/desktop/index.html for guidance on available modifiers
@@ -176,8 +175,8 @@ class Html {
         *
         * @param string $contents The raw HTML contents of the element: *not*
         *   escaped!
-        * @param array $attrs Associative array of attributes, e.g., array(
-        *   'href' => 'http://www.mediawiki.org/' ). See expandAttributes() for
+        * @param array $attrs Associative array of attributes, e.g., [
+        *   'href' => 'http://www.mediawiki.org/' ]. See expandAttributes() for
         *   further documentation.
         * @param string[] $modifiers classes to add to the button
         * @see http://tools.wmflabs.org/styleguide/desktop/index.html for guidance on available modifiers
@@ -200,8 +199,8 @@ class Html {
         * content model.
         *
         * @param string $element The element's name, e.g., 'a'
-        * @param array $attribs Associative array of attributes, e.g., array(
-        *   'href' => 'http://www.mediawiki.org/' ). See expandAttributes() for
+        * @param array $attribs Associative array of attributes, e.g., [
+        *   'href' => 'http://www.mediawiki.org/' ]. See expandAttributes() for
         *   further documentation.
         * @param string $contents The raw HTML contents of the element: *not*
         *   escaped!
@@ -321,8 +320,8 @@ class Html {
         * to the input array (currently per the HTML 5 draft as of 2009-09-06).
         *
         * @param string $element Name of the element, e.g., 'a'
-        * @param array $attribs Associative array of attributes, e.g., array(
-        *   'href' => 'http://www.mediawiki.org/' ).  See expandAttributes() for
+        * @param array $attribs Associative array of attributes, e.g., [
+        *   'href' => 'http://www.mediawiki.org/' ].  See expandAttributes() for
         *   further documentation.
         * @return array An array of attributes functionally identical to $attribs
         */
@@ -339,7 +338,6 @@ class Html {
                                'height' => '150',
                                'width' => '300',
                        ],
-                       'command' => [ 'type' => 'command' ],
                        'form' => [
                                'action' => 'GET',
                                'autocomplete' => 'on',
@@ -432,8 +430,8 @@ class Html {
 
        /**
         * Given an associative array of element attributes, generate a string
-        * to stick after the element name in HTML output.  Like array( 'href' =>
-        * 'http://www.mediawiki.org/' ) becomes something like
+        * to stick after the element name in HTML output.  Like [ 'href' =>
+        * 'http://www.mediawiki.org/' ] becomes something like
         * ' href="http://www.mediawiki.org"'.  Again, this is like
         * Xml::expandAttributes(), but it implements some HTML-specific logic.
         *
@@ -445,25 +443,25 @@ class Html {
         *
         * @par Numerical array
         * @code
-        *     Html::element( 'em', array(
-        *         'class' => array( 'foo', 'bar' )
-        *     ) );
+        *     Html::element( 'em', [
+        *         'class' => [ 'foo', 'bar' ]
+        *     ] );
         *     // gives '<em class="foo bar"></em>'
         * @endcode
         *
         * @par Associative array
         * @code
-        *     Html::element( 'em', array(
-        *         'class' => array( 'foo', 'bar', 'foo' => false, 'quux' => true )
-        *     ) );
+        *     Html::element( 'em', [
+        *         'class' => [ 'foo', 'bar', 'foo' => false, 'quux' => true ]
+        *     ] );
         *     // gives '<em class="bar quux"></em>'
         * @endcode
         *
-        * @param array $attribs Associative array of attributes, e.g., array(
-        *   'href' => 'http://www.mediawiki.org/' ).  Values will be HTML-escaped.
+        * @param array $attribs Associative array of attributes, e.g., [
+        *   'href' => 'http://www.mediawiki.org/' ].  Values will be HTML-escaped.
         *   A value of false means to omit the attribute.  For boolean attributes,
-        *   you can omit the key, e.g., array( 'checked' ) instead of
-        *   array( 'checked' => 'checked' ) or such.
+        *   you can omit the key, e.g., [ 'checked' ] instead of
+        *   [ 'checked' => 'checked' ] or such.
         *
         * @throws MWException If an attribute that doesn't allow lists is set to an array
         * @return string HTML fragment that goes between element name and '>'
@@ -472,13 +470,13 @@ class Html {
        public static function expandAttributes( array $attribs ) {
                $ret = '';
                foreach ( $attribs as $key => $value ) {
-                       // Support intuitive array( 'checked' => true/false ) form
+                       // Support intuitive [ 'checked' => true/false ] form
                        if ( $value === false || is_null( $value ) ) {
                                continue;
                        }
 
-                       // For boolean attributes, support array( 'foo' ) instead of
-                       // requiring array( 'foo' => 'meaningless' ).
+                       // For boolean attributes, support [ 'foo' ] instead of
+                       // requiring [ 'foo' => 'meaningless' ].
                        if ( is_int( $key ) && in_array( strtolower( $value ), self::$boolAttribs ) ) {
                                $key = $value;
                        }
@@ -535,7 +533,7 @@ class Html {
                                                        }
                                                } elseif ( $v ) {
                                                        // If the value is truthy but not a string this is likely
-                                                       // an array( 'foo' => true ), falsy values don't add strings
+                                                       // an [ 'foo' => true ], falsy values don't add strings
                                                        $newValue[] = $k;
                                                }
                                        }
@@ -1011,11 +1009,11 @@ class Html {
         *
         * @par Example:
         * @code
-        *     Html::srcSet( array(
+        *     Html::srcSet( [
         *         '1x'   => 'standard.jpeg',
         *         '1.5x' => 'large.jpeg',
         *         '3x'   => 'extra-large.jpeg',
-        *     ) );
+        *     ] );
         *     // gives 'standard.jpeg 1x, large.jpeg 1.5x, extra-large.jpeg 2x'
         * @endcode
         *
diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php
deleted file mode 100644 (file)
index 2ca5e1b..0000000
+++ /dev/null
@@ -1,1122 +0,0 @@
-<?php
-/**
- * Various HTTP related functions.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup HTTP
- */
-
-/**
- * @defgroup HTTP HTTP
- */
-
-use MediaWiki\Logger\LoggerFactory;
-
-/**
- * Various HTTP related functions
- * @ingroup HTTP
- */
-class Http {
-       static public $httpEngine = false;
-
-       /**
-        * Perform an HTTP request
-        *
-        * @param string $method HTTP method. Usually GET/POST
-        * @param string $url Full URL to act on. If protocol-relative, will be expanded to an http:// URL
-        * @param array $options Options to pass to MWHttpRequest object.
-        *      Possible keys for the array:
-        *    - timeout             Timeout length in seconds
-        *    - connectTimeout      Timeout for connection, in seconds (curl only)
-        *    - postData            An array of key-value pairs or a url-encoded form data
-        *    - proxy               The proxy to use.
-        *                          Otherwise it will use $wgHTTPProxy (if set)
-        *                          Otherwise it will use the environment variable "http_proxy" (if set)
-        *    - noProxy             Don't use any proxy at all. Takes precedence over proxy value(s).
-        *    - sslVerifyHost       Verify hostname against certificate
-        *    - sslVerifyCert       Verify SSL certificate
-        *    - caInfo              Provide CA information
-        *    - maxRedirects        Maximum number of redirects to follow (defaults to 5)
-        *    - followRedirects     Whether to follow redirects (defaults to false).
-        *                                  Note: this should only be used when the target URL is trusted,
-        *                                  to avoid attacks on intranet services accessible by HTTP.
-        *    - userAgent           A user agent, if you want to override the default
-        *                          MediaWiki/$wgVersion
-        * @param string $caller The method making this request, for profiling
-        * @return string|bool (bool)false on failure or a string on success
-        */
-       public static function request( $method, $url, $options = [], $caller = __METHOD__ ) {
-               wfDebug( "HTTP: $method: $url\n" );
-
-               $options['method'] = strtoupper( $method );
-
-               if ( !isset( $options['timeout'] ) ) {
-                       $options['timeout'] = 'default';
-               }
-               if ( !isset( $options['connectTimeout'] ) ) {
-                       $options['connectTimeout'] = 'default';
-               }
-
-               $req = MWHttpRequest::factory( $url, $options, $caller );
-               $status = $req->execute();
-
-               if ( $status->isOK() ) {
-                       return $req->getContent();
-               } else {
-                       $errors = $status->getErrorsByType( 'error' );
-                       $logger = LoggerFactory::getInstance( 'http' );
-                       $logger->warning( $status->getWikiText( false, false, 'en' ),
-                               [ 'error' => $errors, 'caller' => $caller, 'content' => $req->getContent() ] );
-                       return false;
-               }
-       }
-
-       /**
-        * Simple wrapper for Http::request( 'GET' )
-        * @see Http::request()
-        * @since 1.25 Second parameter $timeout removed. Second parameter
-        * is now $options which can be given a 'timeout'
-        *
-        * @param string $url
-        * @param array $options
-        * @param string $caller The method making this request, for profiling
-        * @return string|bool false on error
-        */
-       public static function get( $url, $options = [], $caller = __METHOD__ ) {
-               $args = func_get_args();
-               if ( isset( $args[1] ) && ( is_string( $args[1] ) || is_numeric( $args[1] ) ) ) {
-                       // Second was used to be the timeout
-                       // And third parameter used to be $options
-                       wfWarn( "Second parameter should not be a timeout.", 2 );
-                       $options = isset( $args[2] ) && is_array( $args[2] ) ?
-                               $args[2] : [];
-                       $options['timeout'] = $args[1];
-                       $caller = __METHOD__;
-               }
-               return Http::request( 'GET', $url, $options, $caller );
-       }
-
-       /**
-        * Simple wrapper for Http::request( 'POST' )
-        * @see Http::request()
-        *
-        * @param string $url
-        * @param array $options
-        * @param string $caller The method making this request, for profiling
-        * @return string|bool false on error
-        */
-       public static function post( $url, $options = [], $caller = __METHOD__ ) {
-               return Http::request( 'POST', $url, $options, $caller );
-       }
-
-       /**
-        * A standard user-agent we can use for external requests.
-        * @return string
-        */
-       public static function userAgent() {
-               global $wgVersion;
-               return "MediaWiki/$wgVersion";
-       }
-
-       /**
-        * Checks that the given URI is a valid one. Hardcoding the
-        * protocols, because we only want protocols that both cURL
-        * and php support.
-        *
-        * file:// should not be allowed here for security purpose (r67684)
-        *
-        * @todo FIXME this is wildly inaccurate and fails to actually check most stuff
-        *
-        * @param string $uri URI to check for validity
-        * @return bool
-        */
-       public static function isValidURI( $uri ) {
-               return preg_match(
-                       '/^https?:\/\/[^\/\s]\S*$/D',
-                       $uri
-               );
-       }
-
-       /**
-        * Gets the relevant proxy from $wgHTTPProxy
-        *
-        * @return mixed The proxy address or an empty string if not set.
-        */
-       public static function getProxy() {
-               global $wgHTTPProxy;
-
-               if ( $wgHTTPProxy ) {
-                       return $wgHTTPProxy;
-               }
-
-               return "";
-       }
-}
-
-/**
- * This wrapper class will call out to curl (if available) or fallback
- * to regular PHP if necessary for handling internal HTTP requests.
- *
- * Renamed from HttpRequest to MWHttpRequest to avoid conflict with
- * PHP's HTTP extension.
- */
-class MWHttpRequest {
-       const SUPPORTS_FILE_POSTS = false;
-
-       protected $content;
-       protected $timeout = 'default';
-       protected $headersOnly = null;
-       protected $postData = null;
-       protected $proxy = null;
-       protected $noProxy = false;
-       protected $sslVerifyHost = true;
-       protected $sslVerifyCert = true;
-       protected $caInfo = null;
-       protected $method = "GET";
-       protected $reqHeaders = [];
-       protected $url;
-       protected $parsedUrl;
-       protected $callback;
-       protected $maxRedirects = 5;
-       protected $followRedirects = false;
-
-       /**
-        * @var CookieJar
-        */
-       protected $cookieJar;
-
-       protected $headerList = [];
-       protected $respVersion = "0.9";
-       protected $respStatus = "200 Ok";
-       protected $respHeaders = [];
-
-       public $status;
-
-       /**
-        * @var Profiler
-        */
-       protected $profiler;
-
-       /**
-        * @var string
-        */
-       protected $profileName;
-
-       /**
-        * @param string $url Url to use. If protocol-relative, will be expanded to an http:// URL
-        * @param array $options (optional) extra params to pass (see Http::request())
-        * @param string $caller The method making this request, for profiling
-        * @param Profiler $profiler An instance of the profiler for profiling, or null
-        */
-       protected function __construct(
-               $url, $options = [], $caller = __METHOD__, $profiler = null
-       ) {
-               global $wgHTTPTimeout, $wgHTTPConnectTimeout;
-
-               $this->url = wfExpandUrl( $url, PROTO_HTTP );
-               $this->parsedUrl = wfParseUrl( $this->url );
-
-               if ( !$this->parsedUrl || !Http::isValidURI( $this->url ) ) {
-                       $this->status = Status::newFatal( 'http-invalid-url', $url );
-               } else {
-                       $this->status = Status::newGood( 100 ); // continue
-               }
-
-               if ( isset( $options['timeout'] ) && $options['timeout'] != 'default' ) {
-                       $this->timeout = $options['timeout'];
-               } else {
-                       $this->timeout = $wgHTTPTimeout;
-               }
-               if ( isset( $options['connectTimeout'] ) && $options['connectTimeout'] != 'default' ) {
-                       $this->connectTimeout = $options['connectTimeout'];
-               } else {
-                       $this->connectTimeout = $wgHTTPConnectTimeout;
-               }
-               if ( isset( $options['userAgent'] ) ) {
-                       $this->setUserAgent( $options['userAgent'] );
-               }
-
-               $members = [ "postData", "proxy", "noProxy", "sslVerifyHost", "caInfo",
-                               "method", "followRedirects", "maxRedirects", "sslVerifyCert", "callback" ];
-
-               foreach ( $members as $o ) {
-                       if ( isset( $options[$o] ) ) {
-                               // ensure that MWHttpRequest::method is always
-                               // uppercased. Bug 36137
-                               if ( $o == 'method' ) {
-                                       $options[$o] = strtoupper( $options[$o] );
-                               }
-                               $this->$o = $options[$o];
-                       }
-               }
-
-               if ( $this->noProxy ) {
-                       $this->proxy = ''; // noProxy takes precedence
-               }
-
-               // Profile based on what's calling us
-               $this->profiler = $profiler;
-               $this->profileName = $caller;
-       }
-
-       /**
-        * Simple function to test if we can make any sort of requests at all, using
-        * cURL or fopen()
-        * @return bool
-        */
-       public static function canMakeRequests() {
-               return function_exists( 'curl_init' ) || wfIniGetBool( 'allow_url_fopen' );
-       }
-
-       /**
-        * Generate a new request object
-        * @param string $url Url to use
-        * @param array $options (optional) extra params to pass (see Http::request())
-        * @param string $caller The method making this request, for profiling
-        * @throws MWException
-        * @return CurlHttpRequest|PhpHttpRequest
-        * @see MWHttpRequest::__construct
-        */
-       public static function factory( $url, $options = null, $caller = __METHOD__ ) {
-               if ( !Http::$httpEngine ) {
-                       Http::$httpEngine = function_exists( 'curl_init' ) ? 'curl' : 'php';
-               } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) {
-                       throw new MWException( __METHOD__ . ': curl (http://php.net/curl) is not installed, but' .
-                               ' Http::$httpEngine is set to "curl"' );
-               }
-
-               switch ( Http::$httpEngine ) {
-                       case 'curl':
-                               return new CurlHttpRequest( $url, $options, $caller, Profiler::instance() );
-                       case 'php':
-                               if ( !wfIniGetBool( 'allow_url_fopen' ) ) {
-                                       throw new MWException( __METHOD__ . ': allow_url_fopen ' .
-                                               'needs to be enabled for pure PHP http requests to ' .
-                                               'work. If possible, curl should be used instead. See ' .
-                                               'http://php.net/curl.'
-                                       );
-                               }
-                               return new PhpHttpRequest( $url, $options, $caller, Profiler::instance() );
-                       default:
-                               throw new MWException( __METHOD__ . ': The setting of Http::$httpEngine is not valid.' );
-               }
-       }
-
-       /**
-        * Get the body, or content, of the response to the request
-        *
-        * @return string
-        */
-       public function getContent() {
-               return $this->content;
-       }
-
-       /**
-        * Set the parameters of the request
-        *
-        * @param array $args
-        * @todo overload the args param
-        */
-       public function setData( $args ) {
-               $this->postData = $args;
-       }
-
-       /**
-        * Take care of setting up the proxy (do nothing if "noProxy" is set)
-        *
-        * @return void
-        */
-       public function proxySetup() {
-               // If there is an explicit proxy set and proxies are not disabled, then use it
-               if ( $this->proxy && !$this->noProxy ) {
-                       return;
-               }
-
-               // Otherwise, fallback to $wgHTTPProxy if this is not a machine
-               // local URL and proxies are not disabled
-               if ( self::isLocalURL( $this->url ) || $this->noProxy ) {
-                       $this->proxy = '';
-               } else {
-                       $this->proxy = Http::getProxy();
-               }
-       }
-
-       /**
-        * Check if the URL can be served by localhost
-        *
-        * @param string $url Full url to check
-        * @return bool
-        */
-       private static function isLocalURL( $url ) {
-               global $wgCommandLineMode, $wgLocalVirtualHosts;
-
-               if ( $wgCommandLineMode ) {
-                       return false;
-               }
-
-               // Extract host part
-               $matches = [];
-               if ( preg_match( '!^https?://([\w.-]+)[/:].*$!', $url, $matches ) ) {
-                       $host = $matches[1];
-                       // Split up dotwise
-                       $domainParts = explode( '.', $host );
-                       // Check if this domain or any superdomain is listed as a local virtual host
-                       $domainParts = array_reverse( $domainParts );
-
-                       $domain = '';
-                       $countParts = count( $domainParts );
-                       for ( $i = 0; $i < $countParts; $i++ ) {
-                               $domainPart = $domainParts[$i];
-                               if ( $i == 0 ) {
-                                       $domain = $domainPart;
-                               } else {
-                                       $domain = $domainPart . '.' . $domain;
-                               }
-
-                               if ( in_array( $domain, $wgLocalVirtualHosts ) ) {
-                                       return true;
-                               }
-                       }
-               }
-
-               return false;
-       }
-
-       /**
-        * Set the user agent
-        * @param string $UA
-        */
-       public function setUserAgent( $UA ) {
-               $this->setHeader( 'User-Agent', $UA );
-       }
-
-       /**
-        * Set an arbitrary header
-        * @param string $name
-        * @param string $value
-        */
-       public function setHeader( $name, $value ) {
-               // I feel like I should normalize the case here...
-               $this->reqHeaders[$name] = $value;
-       }
-
-       /**
-        * Get an array of the headers
-        * @return array
-        */
-       public function getHeaderList() {
-               $list = [];
-
-               if ( $this->cookieJar ) {
-                       $this->reqHeaders['Cookie'] =
-                               $this->cookieJar->serializeToHttpRequest(
-                                       $this->parsedUrl['path'],
-                                       $this->parsedUrl['host']
-                               );
-               }
-
-               foreach ( $this->reqHeaders as $name => $value ) {
-                       $list[] = "$name: $value";
-               }
-
-               return $list;
-       }
-
-       /**
-        * Set a read callback to accept data read from the HTTP request.
-        * By default, data is appended to an internal buffer which can be
-        * retrieved through $req->getContent().
-        *
-        * To handle data as it comes in -- especially for large files that
-        * would not fit in memory -- you can instead set your own callback,
-        * in the form function($resource, $buffer) where the first parameter
-        * is the low-level resource being read (implementation specific),
-        * and the second parameter is the data buffer.
-        *
-        * You MUST return the number of bytes handled in the buffer; if fewer
-        * bytes are reported handled than were passed to you, the HTTP fetch
-        * will be aborted.
-        *
-        * @param callable $callback
-        * @throws MWException
-        */
-       public function setCallback( $callback ) {
-               if ( !is_callable( $callback ) ) {
-                       throw new MWException( 'Invalid MwHttpRequest callback' );
-               }
-               $this->callback = $callback;
-       }
-
-       /**
-        * A generic callback to read the body of the response from a remote
-        * server.
-        *
-        * @param resource $fh
-        * @param string $content
-        * @return int
-        */
-       public function read( $fh, $content ) {
-               $this->content .= $content;
-               return strlen( $content );
-       }
-
-       /**
-        * Take care of whatever is necessary to perform the URI request.
-        *
-        * @return Status
-        */
-       public function execute() {
-
-               $this->content = "";
-
-               if ( strtoupper( $this->method ) == "HEAD" ) {
-                       $this->headersOnly = true;
-               }
-
-               $this->proxySetup(); // set up any proxy as needed
-
-               if ( !$this->callback ) {
-                       $this->setCallback( [ $this, 'read' ] );
-               }
-
-               if ( !isset( $this->reqHeaders['User-Agent'] ) ) {
-                       $this->setUserAgent( Http::userAgent() );
-               }
-
-       }
-
-       /**
-        * Parses the headers, including the HTTP status code and any
-        * Set-Cookie headers.  This function expects the headers to be
-        * found in an array in the member variable headerList.
-        */
-       protected function parseHeader() {
-
-               $lastname = "";
-
-               foreach ( $this->headerList as $header ) {
-                       if ( preg_match( "#^HTTP/([0-9.]+) (.*)#", $header, $match ) ) {
-                               $this->respVersion = $match[1];
-                               $this->respStatus = $match[2];
-                       } elseif ( preg_match( "#^[ \t]#", $header ) ) {
-                               $last = count( $this->respHeaders[$lastname] ) - 1;
-                               $this->respHeaders[$lastname][$last] .= "\r\n$header";
-                       } elseif ( preg_match( "#^([^:]*):[\t ]*(.*)#", $header, $match ) ) {
-                               $this->respHeaders[strtolower( $match[1] )][] = $match[2];
-                               $lastname = strtolower( $match[1] );
-                       }
-               }
-
-               $this->parseCookies();
-
-       }
-
-       /**
-        * Sets HTTPRequest status member to a fatal value with the error
-        * message if the returned integer value of the status code was
-        * not successful (< 300) or a redirect (>=300 and < 400).  (see
-        * RFC2616, section 10,
-        * http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for a
-        * list of status codes.)
-        */
-       protected function setStatus() {
-               if ( !$this->respHeaders ) {
-                       $this->parseHeader();
-               }
-
-               if ( (int)$this->respStatus > 399 ) {
-                       list( $code, $message ) = explode( " ", $this->respStatus, 2 );
-                       $this->status->fatal( "http-bad-status", $code, $message );
-               }
-       }
-
-       /**
-        * Get the integer value of the HTTP status code (e.g. 200 for "200 Ok")
-        * (see RFC2616, section 10, http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
-        * for a list of status codes.)
-        *
-        * @return int
-        */
-       public function getStatus() {
-               if ( !$this->respHeaders ) {
-                       $this->parseHeader();
-               }
-
-               return (int)$this->respStatus;
-       }
-
-       /**
-        * Returns true if the last status code was a redirect.
-        *
-        * @return bool
-        */
-       public function isRedirect() {
-               if ( !$this->respHeaders ) {
-                       $this->parseHeader();
-               }
-
-               $status = (int)$this->respStatus;
-
-               if ( $status >= 300 && $status <= 303 ) {
-                       return true;
-               }
-
-               return false;
-       }
-
-       /**
-        * Returns an associative array of response headers after the
-        * request has been executed.  Because some headers
-        * (e.g. Set-Cookie) can appear more than once the, each value of
-        * the associative array is an array of the values given.
-        *
-        * @return array
-        */
-       public function getResponseHeaders() {
-               if ( !$this->respHeaders ) {
-                       $this->parseHeader();
-               }
-
-               return $this->respHeaders;
-       }
-
-       /**
-        * Returns the value of the given response header.
-        *
-        * @param string $header
-        * @return string|null
-        */
-       public function getResponseHeader( $header ) {
-               if ( !$this->respHeaders ) {
-                       $this->parseHeader();
-               }
-
-               if ( isset( $this->respHeaders[strtolower( $header )] ) ) {
-                       $v = $this->respHeaders[strtolower( $header )];
-                       return $v[count( $v ) - 1];
-               }
-
-               return null;
-       }
-
-       /**
-        * Tells the MWHttpRequest object to use this pre-loaded CookieJar.
-        *
-        * @param CookieJar $jar
-        */
-       public function setCookieJar( $jar ) {
-               $this->cookieJar = $jar;
-       }
-
-       /**
-        * Returns the cookie jar in use.
-        *
-        * @return CookieJar
-        */
-       public function getCookieJar() {
-               if ( !$this->respHeaders ) {
-                       $this->parseHeader();
-               }
-
-               return $this->cookieJar;
-       }
-
-       /**
-        * Sets a cookie. Used before a request to set up any individual
-        * cookies. Used internally after a request to parse the
-        * Set-Cookie headers.
-        * @see Cookie::set
-        * @param string $name
-        * @param mixed $value
-        * @param array $attr
-        */
-       public function setCookie( $name, $value = null, $attr = null ) {
-               if ( !$this->cookieJar ) {
-                       $this->cookieJar = new CookieJar;
-               }
-
-               $this->cookieJar->setCookie( $name, $value, $attr );
-       }
-
-       /**
-        * Parse the cookies in the response headers and store them in the cookie jar.
-        */
-       protected function parseCookies() {
-
-               if ( !$this->cookieJar ) {
-                       $this->cookieJar = new CookieJar;
-               }
-
-               if ( isset( $this->respHeaders['set-cookie'] ) ) {
-                       $url = parse_url( $this->getFinalUrl() );
-                       foreach ( $this->respHeaders['set-cookie'] as $cookie ) {
-                               $this->cookieJar->parseCookieResponseHeader( $cookie, $url['host'] );
-                       }
-               }
-
-       }
-
-       /**
-        * Returns the final URL after all redirections.
-        *
-        * Relative values of the "Location" header are incorrect as
-        * stated in RFC, however they do happen and modern browsers
-        * support them.  This function loops backwards through all
-        * locations in order to build the proper absolute URI - Marooned
-        * at wikia-inc.com
-        *
-        * Note that the multiple Location: headers are an artifact of
-        * CURL -- they shouldn't actually get returned this way. Rewrite
-        * this when bug 29232 is taken care of (high-level redirect
-        * handling rewrite).
-        *
-        * @return string
-        */
-       public function getFinalUrl() {
-               $headers = $this->getResponseHeaders();
-
-               // return full url (fix for incorrect but handled relative location)
-               if ( isset( $headers['location'] ) ) {
-                       $locations = $headers['location'];
-                       $domain = '';
-                       $foundRelativeURI = false;
-                       $countLocations = count( $locations );
-
-                       for ( $i = $countLocations - 1; $i >= 0; $i-- ) {
-                               $url = parse_url( $locations[$i] );
-
-                               if ( isset( $url['host'] ) ) {
-                                       $domain = $url['scheme'] . '://' . $url['host'];
-                                       break; // found correct URI (with host)
-                               } else {
-                                       $foundRelativeURI = true;
-                               }
-                       }
-
-                       if ( $foundRelativeURI ) {
-                               if ( $domain ) {
-                                       return $domain . $locations[$countLocations - 1];
-                               } else {
-                                       $url = parse_url( $this->url );
-                                       if ( isset( $url['host'] ) ) {
-                                               return $url['scheme'] . '://' . $url['host'] .
-                                                       $locations[$countLocations - 1];
-                                       }
-                               }
-                       } else {
-                               return $locations[$countLocations - 1];
-                       }
-               }
-
-               return $this->url;
-       }
-
-       /**
-        * Returns true if the backend can follow redirects. Overridden by the
-        * child classes.
-        * @return bool
-        */
-       public function canFollowRedirects() {
-               return true;
-       }
-}
-
-/**
- * MWHttpRequest implemented using internal curl compiled into PHP
- */
-class CurlHttpRequest extends MWHttpRequest {
-       const SUPPORTS_FILE_POSTS = true;
-
-       protected $curlOptions = [];
-       protected $headerText = "";
-
-       /**
-        * @param resource $fh
-        * @param string $content
-        * @return int
-        */
-       protected function readHeader( $fh, $content ) {
-               $this->headerText .= $content;
-               return strlen( $content );
-       }
-
-       public function execute() {
-
-               parent::execute();
-
-               if ( !$this->status->isOK() ) {
-                       return $this->status;
-               }
-
-               $this->curlOptions[CURLOPT_PROXY] = $this->proxy;
-               $this->curlOptions[CURLOPT_TIMEOUT] = $this->timeout;
-
-               // Only supported in curl >= 7.16.2
-               if ( defined( 'CURLOPT_CONNECTTIMEOUT_MS' ) ) {
-                       $this->curlOptions[CURLOPT_CONNECTTIMEOUT_MS] = $this->connectTimeout * 1000;
-               }
-
-               $this->curlOptions[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;
-               $this->curlOptions[CURLOPT_WRITEFUNCTION] = $this->callback;
-               $this->curlOptions[CURLOPT_HEADERFUNCTION] = [ $this, "readHeader" ];
-               $this->curlOptions[CURLOPT_MAXREDIRS] = $this->maxRedirects;
-               $this->curlOptions[CURLOPT_ENCODING] = ""; # Enable compression
-
-               $this->curlOptions[CURLOPT_USERAGENT] = $this->reqHeaders['User-Agent'];
-
-               $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = $this->sslVerifyHost ? 2 : 0;
-               $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = $this->sslVerifyCert;
-
-               if ( $this->caInfo ) {
-                       $this->curlOptions[CURLOPT_CAINFO] = $this->caInfo;
-               }
-
-               if ( $this->headersOnly ) {
-                       $this->curlOptions[CURLOPT_NOBODY] = true;
-                       $this->curlOptions[CURLOPT_HEADER] = true;
-               } elseif ( $this->method == 'POST' ) {
-                       $this->curlOptions[CURLOPT_POST] = true;
-                       $postData = $this->postData;
-                       // Don't interpret POST parameters starting with '@' as file uploads, because this
-                       // makes it impossible to POST plain values starting with '@' (and causes security
-                       // issues potentially exposing the contents of local files).
-                       // The PHP manual says this option was introduced in PHP 5.5 defaults to true in PHP 5.6,
-                       // but we support lower versions, and the option doesn't exist in HHVM 5.6.99.
-                       if ( defined( 'CURLOPT_SAFE_UPLOAD' ) ) {
-                               $this->curlOptions[CURLOPT_SAFE_UPLOAD] = true;
-                       } elseif ( is_array( $postData ) ) {
-                               // In PHP 5.2 and later, '@' is interpreted as a file upload if POSTFIELDS
-                               // is an array, but not if it's a string. So convert $req['body'] to a string
-                               // for safety.
-                               $postData = wfArrayToCgi( $postData );
-                       }
-                       $this->curlOptions[CURLOPT_POSTFIELDS] = $postData;
-
-                       // Suppress 'Expect: 100-continue' header, as some servers
-                       // will reject it with a 417 and Curl won't auto retry
-                       // with HTTP 1.0 fallback
-                       $this->reqHeaders['Expect'] = '';
-               } else {
-                       $this->curlOptions[CURLOPT_CUSTOMREQUEST] = $this->method;
-               }
-
-               $this->curlOptions[CURLOPT_HTTPHEADER] = $this->getHeaderList();
-
-               $curlHandle = curl_init( $this->url );
-
-               if ( !curl_setopt_array( $curlHandle, $this->curlOptions ) ) {
-                       throw new MWException( "Error setting curl options." );
-               }
-
-               if ( $this->followRedirects && $this->canFollowRedirects() ) {
-                       MediaWiki\suppressWarnings();
-                       if ( !curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, true ) ) {
-                               wfDebug( __METHOD__ . ": Couldn't set CURLOPT_FOLLOWLOCATION. " .
-                                       "Probably open_basedir is set.\n" );
-                               // Continue the processing. If it were in curl_setopt_array,
-                               // processing would have halted on its entry
-                       }
-                       MediaWiki\restoreWarnings();
-               }
-
-               if ( $this->profiler ) {
-                       $profileSection = $this->profiler->scopedProfileIn(
-                               __METHOD__ . '-' . $this->profileName
-                       );
-               }
-
-               $curlRes = curl_exec( $curlHandle );
-               if ( curl_errno( $curlHandle ) == CURLE_OPERATION_TIMEOUTED ) {
-                       $this->status->fatal( 'http-timed-out', $this->url );
-               } elseif ( $curlRes === false ) {
-                       $this->status->fatal( 'http-curl-error', curl_error( $curlHandle ) );
-               } else {
-                       $this->headerList = explode( "\r\n", $this->headerText );
-               }
-
-               curl_close( $curlHandle );
-
-               if ( $this->profiler ) {
-                       $this->profiler->scopedProfileOut( $profileSection );
-               }
-
-               $this->parseHeader();
-               $this->setStatus();
-
-               return $this->status;
-       }
-
-       /**
-        * @return bool
-        */
-       public function canFollowRedirects() {
-               $curlVersionInfo = curl_version();
-               if ( $curlVersionInfo['version_number'] < 0x071304 ) {
-                       wfDebug( "Cannot follow redirects with libcurl < 7.19.4 due to CVE-2009-0037\n" );
-                       return false;
-               }
-
-               if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
-                       if ( strval( ini_get( 'open_basedir' ) ) !== '' ) {
-                               wfDebug( "Cannot follow redirects when open_basedir is set\n" );
-                               return false;
-                       }
-               }
-
-               return true;
-       }
-}
-
-class PhpHttpRequest extends MWHttpRequest {
-
-       private $fopenErrors = [];
-
-       /**
-        * @param string $url
-        * @return string
-        */
-       protected function urlToTcp( $url ) {
-               $parsedUrl = parse_url( $url );
-
-               return 'tcp://' . $parsedUrl['host'] . ':' . $parsedUrl['port'];
-       }
-
-       /**
-        * Returns an array with a 'capath' or 'cafile' key
-        * that is suitable to be merged into the 'ssl' sub-array of
-        * a stream context options array.
-        * Uses the 'caInfo' option of the class if it is provided, otherwise uses the system
-        * default CA bundle if PHP supports that, or searches a few standard locations.
-        * @return array
-        * @throws DomainException
-        */
-       protected function getCertOptions() {
-               $certOptions = [];
-               $certLocations = [];
-               if ( $this->caInfo ) {
-                       $certLocations = [ 'manual' => $this->caInfo ];
-               } elseif ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
-                       // @codingStandardsIgnoreStart Generic.Files.LineLength
-                       // Default locations, based on
-                       // https://www.happyassassin.net/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/
-                       // PHP 5.5 and older doesn't have any defaults, so we try to guess ourselves.
-                       // PHP 5.6+ gets the CA location from OpenSSL as long as it is not set manually,
-                       // so we should leave capath/cafile empty there.
-                       // @codingStandardsIgnoreEnd
-                       $certLocations = array_filter( [
-                               getenv( 'SSL_CERT_DIR' ),
-                               getenv( 'SSL_CERT_PATH' ),
-                               '/etc/pki/tls/certs/ca-bundle.crt', # Fedora et al
-                               '/etc/ssl/certs',  # Debian et al
-                               '/etc/pki/tls/certs/ca-bundle.trust.crt',
-                               '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem',
-                               '/System/Library/OpenSSL', # OSX
-                       ] );
-               }
-
-               foreach ( $certLocations as $key => $cert ) {
-                       if ( is_dir( $cert ) ) {
-                               $certOptions['capath'] = $cert;
-                               break;
-                       } elseif ( is_file( $cert ) ) {
-                               $certOptions['cafile'] = $cert;
-                               break;
-                       } elseif ( $key === 'manual' ) {
-                               // fail more loudly if a cert path was manually configured and it is not valid
-                               throw new DomainException( "Invalid CA info passed: $cert" );
-                       }
-               }
-
-               return $certOptions;
-       }
-
-       /**
-        * Custom error handler for dealing with fopen() errors.
-        * fopen() tends to fire multiple errors in succession, and the last one
-        * is completely useless (something like "fopen: failed to open stream")
-        * so normal methods of handling errors programmatically
-        * like get_last_error() don't work.
-        */
-       public function errorHandler( $errno, $errstr ) {
-               $n = count( $this->fopenErrors ) + 1;
-               $this->fopenErrors += [ "errno$n" => $errno, "errstr$n" => $errstr ];
-       }
-
-       public function execute() {
-
-               parent::execute();
-
-               if ( is_array( $this->postData ) ) {
-                       $this->postData = wfArrayToCgi( $this->postData );
-               }
-
-               if ( $this->parsedUrl['scheme'] != 'http'
-                       && $this->parsedUrl['scheme'] != 'https' ) {
-                       $this->status->fatal( 'http-invalid-scheme', $this->parsedUrl['scheme'] );
-               }
-
-               $this->reqHeaders['Accept'] = "*/*";
-               $this->reqHeaders['Connection'] = 'Close';
-               if ( $this->method == 'POST' ) {
-                       // Required for HTTP 1.0 POSTs
-                       $this->reqHeaders['Content-Length'] = strlen( $this->postData );
-                       if ( !isset( $this->reqHeaders['Content-Type'] ) ) {
-                               $this->reqHeaders['Content-Type'] = "application/x-www-form-urlencoded";
-                       }
-               }
-
-               // Set up PHP stream context
-               $options = [
-                       'http' => [
-                               'method' => $this->method,
-                               'header' => implode( "\r\n", $this->getHeaderList() ),
-                               'protocol_version' => '1.1',
-                               'max_redirects' => $this->followRedirects ? $this->maxRedirects : 0,
-                               'ignore_errors' => true,
-                               'timeout' => $this->timeout,
-                               // Curl options in case curlwrappers are installed
-                               'curl_verify_ssl_host' => $this->sslVerifyHost ? 2 : 0,
-                               'curl_verify_ssl_peer' => $this->sslVerifyCert,
-                       ],
-                       'ssl' => [
-                               'verify_peer' => $this->sslVerifyCert,
-                               'SNI_enabled' => true,
-                               'ciphers' => 'HIGH:!SSLv2:!SSLv3:-ADH:-kDH:-kECDH:-DSS',
-                               'disable_compression' => true,
-                       ],
-               ];
-
-               if ( $this->proxy ) {
-                       $options['http']['proxy'] = $this->urlToTcp( $this->proxy );
-                       $options['http']['request_fulluri'] = true;
-               }
-
-               if ( $this->postData ) {
-                       $options['http']['content'] = $this->postData;
-               }
-
-               if ( $this->sslVerifyHost ) {
-                       // PHP 5.6.0 deprecates CN_match, in favour of peer_name which
-                       // actually checks SubjectAltName properly.
-                       if ( version_compare( PHP_VERSION, '5.6.0', '>=' ) ) {
-                               $options['ssl']['peer_name'] = $this->parsedUrl['host'];
-                       } else {
-                               $options['ssl']['CN_match'] = $this->parsedUrl['host'];
-                       }
-               }
-
-               $options['ssl'] += $this->getCertOptions();
-
-               $context = stream_context_create( $options );
-
-               $this->headerList = [];
-               $reqCount = 0;
-               $url = $this->url;
-
-               $result = [];
-
-               if ( $this->profiler ) {
-                       $profileSection = $this->profiler->scopedProfileIn(
-                               __METHOD__ . '-' . $this->profileName
-                       );
-               }
-               do {
-                       $reqCount++;
-                       $this->fopenErrors = [];
-                       set_error_handler( [ $this, 'errorHandler' ] );
-                       $fh = fopen( $url, "r", false, $context );
-                       restore_error_handler();
-
-                       if ( !$fh ) {
-                               // HACK for instant commons.
-                               // If we are contacting (commons|upload).wikimedia.org
-                               // try again with CN_match for en.wikipedia.org
-                               // as php does not handle SubjectAltName properly
-                               // prior to "peer_name" option in php 5.6
-                               if ( isset( $options['ssl']['CN_match'] )
-                                       && ( $options['ssl']['CN_match'] === 'commons.wikimedia.org'
-                                               || $options['ssl']['CN_match'] === 'upload.wikimedia.org' )
-                               ) {
-                                       $options['ssl']['CN_match'] = 'en.wikipedia.org';
-                                       $context = stream_context_create( $options );
-                                       continue;
-                               }
-                               break;
-                       }
-
-                       $result = stream_get_meta_data( $fh );
-                       $this->headerList = $result['wrapper_data'];
-                       $this->parseHeader();
-
-                       if ( !$this->followRedirects ) {
-                               break;
-                       }
-
-                       # Handle manual redirection
-                       if ( !$this->isRedirect() || $reqCount > $this->maxRedirects ) {
-                               break;
-                       }
-                       # Check security of URL
-                       $url = $this->getResponseHeader( "Location" );
-
-                       if ( !Http::isValidURI( $url ) ) {
-                               wfDebug( __METHOD__ . ": insecure redirection\n" );
-                               break;
-                       }
-               } while ( true );
-               if ( $this->profiler ) {
-                       $this->profiler->scopedProfileOut( $profileSection );
-               }
-
-               $this->setStatus();
-
-               if ( $fh === false ) {
-                       if ( $this->fopenErrors ) {
-                               LoggerFactory::getInstance( 'http' )->warning( __CLASS__
-                                       . ': error opening connection: {errstr1}', $this->fopenErrors );
-                       }
-                       $this->status->fatal( 'http-request-error' );
-                       return $this->status;
-               }
-
-               if ( $result['timed_out'] ) {
-                       $this->status->fatal( 'http-timed-out', $this->url );
-                       return $this->status;
-               }
-
-               // If everything went OK, or we received some error code
-               // get the response body content.
-               if ( $this->status->isOK() || (int)$this->respStatus >= 300 ) {
-                       while ( !feof( $fh ) ) {
-                               $buf = fread( $fh, 8192 );
-
-                               if ( $buf === false ) {
-                                       $this->status->fatal( 'http-read-error' );
-                                       break;
-                               }
-
-                               if ( strlen( $buf ) ) {
-                                       call_user_func( $this->callback, $fh, $buf );
-                               }
-                       }
-               }
-               fclose( $fh );
-
-               return $this->status;
-       }
-}
index bcc348e..d3d1f38 100644 (file)
@@ -319,7 +319,7 @@ class Linker {
         * @return LinkTarget
         */
        public static function normaliseSpecialPage( LinkTarget $target ) {
-               if ( $target->getNamespace() == NS_SPECIAL ) {
+               if ( $target->getNamespace() == NS_SPECIAL && !$target->isExternal() ) {
                        list( $name, $subpage ) = SpecialPageFactory::resolveAlias( $target->getDBkey() );
                        if ( !$name ) {
                                return $target;
@@ -1311,10 +1311,10 @@ class Linker {
                                :? # ignore optional leading colon
                                ([^\]|]+) # 1. link target; page names cannot include ] or |
                                (?:\|
-                                       # 2. a pipe-separated substring; only the last is captured
-                                       # Stop matching at | and ]] without relying on backtracking.
-                                       ((?:]?[^\]|])*+)
-                               )*
+                                       # 2. link text
+                                       # Stop matching at ]] without relying on backtracking.
+                                       ((?:]?[^\]])*+)
+                               )?
                                \]\]
                                ([^[]*) # 3. link trail (the text up until the next link)
                        /x',
@@ -1919,6 +1919,8 @@ class Linker {
        }
 
        /**
+        * @deprecated since 1.28, use TemplatesOnThisPageFormatter directly
+        *
         * Returns HTML for the "templates used on this page" list.
         *
         * Make an HTML list of templates, and then add a "More..." link at
@@ -1937,87 +1939,24 @@ class Linker {
        public static function formatTemplates( $templates, $preview = false,
                $section = false, $more = null
        ) {
-               global $wgLang;
-
-               $outText = '';
-               if ( count( $templates ) > 0 ) {
-                       # Do a batch existence check
-                       $batch = new LinkBatch;
-                       foreach ( $templates as $title ) {
-                               $batch->addObj( $title );
-                       }
-                       $batch->execute();
-
-                       # Construct the HTML
-                       $outText = '<div class="mw-templatesUsedExplanation">';
-                       if ( $preview ) {
-                               $outText .= wfMessage( 'templatesusedpreview' )->numParams( count( $templates ) )
-                                       ->parseAsBlock();
-                       } elseif ( $section ) {
-                               $outText .= wfMessage( 'templatesusedsection' )->numParams( count( $templates ) )
-                                       ->parseAsBlock();
-                       } else {
-                               $outText .= wfMessage( 'templatesused' )->numParams( count( $templates ) )
-                                       ->parseAsBlock();
-                       }
-                       $outText .= "</div><ul>\n";
-
-                       usort( $templates, 'Title::compare' );
-                       foreach ( $templates as $titleObj ) {
-                               $protected = '';
-                               $restrictions = $titleObj->getRestrictions( 'edit' );
-                               if ( $restrictions ) {
-                                       // Check backwards-compatible messages
-                                       $msg = null;
-                                       if ( $restrictions === [ 'sysop' ] ) {
-                                               $msg = wfMessage( 'template-protected' );
-                                       } elseif ( $restrictions === [ 'autoconfirmed' ] ) {
-                                               $msg = wfMessage( 'template-semiprotected' );
-                                       }
-                                       if ( $msg && !$msg->isDisabled() ) {
-                                               $protected = $msg->parse();
-                                       } else {
-                                               // Construct the message from restriction-level-*
-                                               // e.g. restriction-level-sysop, restriction-level-autoconfirmed
-                                               $msgs = [];
-                                               foreach ( $restrictions as $r ) {
-                                                       $msgs[] = wfMessage( "restriction-level-$r" )->parse();
-                                               }
-                                               $protected = wfMessage( 'parentheses' )
-                                                       ->rawParams( $wgLang->commaList( $msgs ) )->escaped();
-                                       }
-                               }
-                               if ( $titleObj->quickUserCan( 'edit' ) ) {
-                                       $editLink = self::link(
-                                               $titleObj,
-                                               wfMessage( 'editlink' )->escaped(),
-                                               [],
-                                               [ 'action' => 'edit' ]
-                                       );
-                               } else {
-                                       $editLink = self::link(
-                                               $titleObj,
-                                               wfMessage( 'viewsourcelink' )->escaped(),
-                                               [],
-                                               [ 'action' => 'edit' ]
-                                       );
-                               }
-                               $outText .= '<li>' . self::link( $titleObj )
-                                       . wfMessage( 'word-separator' )->escaped()
-                                       . wfMessage( 'parentheses' )->rawParams( $editLink )->escaped()
-                                       . wfMessage( 'word-separator' )->escaped()
-                                       . $protected . '</li>';
-                       }
+               wfDeprecated( __METHOD__, '1.28' );
 
-                       if ( $more instanceof Title ) {
-                               $outText .= '<li>' . self::link( $more, wfMessage( 'moredotdotdot' ) ) . '</li>';
-                       } elseif ( $more ) {
-                               $outText .= "<li>$more</li>";
-                       }
+               $type = false;
+               if ( $preview ) {
+                       $type = 'preview';
+               } elseif ( $section ) {
+                       $type = 'section';
+               }
 
-                       $outText .= '</ul>';
+               if ( $more instanceof Message ) {
+                       $more = $more->toString();
                }
-               return $outText;
+
+               $formatter = new TemplatesOnThisPageFormatter(
+                       RequestContext::getMain(),
+                       MediaWikiServices::getInstance()->getLinkRenderer()
+               );
+               return $formatter->format( $templates, $type, $more );
        }
 
        /**
@@ -2049,6 +1988,8 @@ class Linker {
        }
 
        /**
+        * @deprecated since 1.28, use Language::formatSize() directly
+        *
         * Format a size in bytes for output, using an appropriate
         * unit (B, KB, MB or GB) according to the magnitude in question
         *
@@ -2057,6 +1998,8 @@ class Linker {
         * @return string
         */
        public static function formatSize( $size ) {
+               wfDeprecated( __METHOD__, '1.28' );
+
                global $wgLang;
                return htmlspecialchars( $wgLang->formatSize( $size ) );
        }
diff --git a/includes/MWGrants.php b/includes/MWGrants.php
new file mode 100644 (file)
index 0000000..58efdc7
--- /dev/null
@@ -0,0 +1,214 @@
+<?php
+/**
+ * Functions and constants to deal with grants
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/**
+ * A collection of public static functions to deal with grants.
+ */
+class MWGrants {
+
+       /**
+        * List all known grants.
+        * @return array
+        */
+       public static function getValidGrants() {
+               global $wgGrantPermissions;
+
+               return array_keys( $wgGrantPermissions );
+       }
+
+       /**
+        * Map all grants to corresponding user rights.
+        * @return array grant => array of rights
+        */
+       public static function getRightsByGrant() {
+               global $wgGrantPermissions;
+
+               $res = [];
+               foreach ( $wgGrantPermissions as $grant => $rights ) {
+                       $res[$grant] = array_keys( array_filter( $rights ) );
+               }
+               return $res;
+       }
+
+       /**
+        * Fetch the display name of the grant
+        * @param string $grant
+        * @param Language|string|null $lang
+        * @return string Grant description
+        */
+       public static function grantName( $grant, $lang = null ) {
+               // Give grep a chance to find the usages:
+               // grant-blockusers, grant-createeditmovepage, grant-delete,
+               // grant-editinterface, grant-editmycssjs, grant-editmywatchlist,
+               // grant-editpage, grant-editprotected, grant-highvolume,
+               // grant-oversight, grant-patrol, grant-protect, grant-rollback,
+               // grant-sendemail, grant-uploadeditmovefile, grant-uploadfile,
+               // grant-basic, grant-viewdeleted, grant-viewmywatchlist,
+               // grant-createaccount
+               $msg = wfMessage( "grant-$grant" );
+               if ( $lang !== null ) {
+                       if ( is_string( $lang ) ) {
+                               $lang = Language::factory( $lang );
+                       }
+                       $msg->inLanguage( $lang );
+               }
+               if ( !$msg->exists() ) {
+                       $msg = wfMessage( 'grant-generic', $grant );
+                       if ( $lang ) {
+                               $msg->inLanguage( $lang );
+                       }
+               }
+               return $msg->text();
+       }
+
+       /**
+        * Fetch the display names for the grants.
+        * @param string[] $grants
+        * @param Language|string|null $lang
+        * @return string[] Corresponding grant descriptions
+        */
+       public static function grantNames( array $grants, $lang = null ) {
+               if ( $lang !== null ) {
+                       if ( is_string( $lang ) ) {
+                               $lang = Language::factory( $lang );
+                       }
+               }
+
+               $ret = [];
+               foreach ( $grants as $grant ) {
+                       $ret[] = self::grantName( $grant, $lang );
+               }
+               return $ret;
+       }
+
+       /**
+        * Fetch the rights allowed by a set of grants.
+        * @param string[]|string $grants
+        * @return string[]
+        */
+       public static function getGrantRights( $grants ) {
+               global $wgGrantPermissions;
+
+               $rights = [];
+               foreach ( (array)$grants as $grant ) {
+                       if ( isset( $wgGrantPermissions[$grant] ) ) {
+                               $rights = array_merge( $rights, array_keys( array_filter( $wgGrantPermissions[$grant] ) ) );
+                       }
+               }
+               return array_unique( $rights );
+       }
+
+       /**
+        * Test that all grants in the list are known.
+        * @param string[] $grants
+        * @return bool
+        */
+       public static function grantsAreValid( array $grants ) {
+               return array_diff( $grants, self::getValidGrants() ) === [];
+       }
+
+       /**
+        * Divide the grants into groups.
+        * @param string[]|null $grantsFilter
+        * @return array Map of (group => (grant list))
+        */
+       public static function getGrantGroups( $grantsFilter = null ) {
+               global $wgGrantPermissions, $wgGrantPermissionGroups;
+
+               if ( is_array( $grantsFilter ) ) {
+                       $grantsFilter = array_flip( $grantsFilter );
+               }
+
+               $groups = [];
+               foreach ( $wgGrantPermissions as $grant => $rights ) {
+                       if ( $grantsFilter !== null && !isset( $grantsFilter[$grant] ) ) {
+                               continue;
+                       }
+                       if ( isset( $wgGrantPermissionGroups[$grant] ) ) {
+                               $groups[$wgGrantPermissionGroups[$grant]][] = $grant;
+                       } else {
+                               $groups['other'][] = $grant;
+                       }
+               }
+
+               return $groups;
+       }
+
+       /**
+        * Get the list of grants that are hidden and should always be granted
+        * @return string[]
+        */
+       public static function getHiddenGrants() {
+               global $wgGrantPermissionGroups;
+
+               $grants = [];
+               foreach ( $wgGrantPermissionGroups as $grant => $group ) {
+                       if ( $group === 'hidden' ) {
+                               $grants[] = $grant;
+                       }
+               }
+               return $grants;
+       }
+
+       /**
+        * Generate a link to Special:ListGrants for a particular grant name.
+        *
+        * This should be used to link end users to a full description of what
+        * rights they are giving when they authorize a grant.
+        *
+        * @param string $grant the grant name
+        * @param Language|string|null $lang
+        * @return string (proto-relative) HTML link
+        */
+       public static function getGrantsLink( $grant, $lang = null ) {
+               return \Linker::linkKnown(
+                       \SpecialPage::getTitleFor( 'Listgrants', false, $grant ),
+                       htmlspecialchars( self::grantName( $grant, $lang ) )
+               );
+       }
+
+       /**
+        * Generate wikitext to display a list of grants
+        * @param string[]|null $grantsFilter If non-null, only display these grants.
+        * @param Language|string|null $lang
+        * @return string Wikitext
+        */
+       public static function getGrantsWikiText( $grantsFilter, $lang = null ) {
+               global $wgContLang;
+
+               if ( is_string( $lang ) ) {
+                       $lang = Language::factory( $lang );
+               } elseif ( $lang === null ) {
+                       $lang = $wgContLang;
+               }
+
+               $s = '';
+               foreach ( self::getGrantGroups( $grantsFilter ) as $group => $grants ) {
+                       if ( $group === 'hidden' ) {
+                               continue; // implicitly granted
+                       }
+                       $s .= "*<span class=\"mw-grantgroup\">" .
+                               wfMessage( "grant-group-$group" )->inLanguage( $lang )->text() . "</span>\n";
+                       $s .= ":" . $lang->semicolonList( self::grantNames( $grants, $lang ) ) . "\n";
+               }
+               return "$s\n";
+       }
+
+}
index defdc96..c1e5cc4 100644 (file)
  *
  * @since 1.20
  */
-class MWTimestamp {
+class MWTimestamp extends ConvertibleTimestamp {
        /**
-        * Standard gmdate() formats for the different timestamp types.
-        */
-       private static $formats = [
-               TS_UNIX => 'U',
-               TS_MW => 'YmdHis',
-               TS_DB => 'Y-m-d H:i:s',
-               TS_ISO_8601 => 'Y-m-d\TH:i:s\Z',
-               TS_ISO_8601_BASIC => 'Ymd\THis\Z',
-               TS_EXIF => 'Y:m:d H:i:s', // This shouldn't ever be used, but is included for completeness
-               TS_RFC2822 => 'D, d M Y H:i:s',
-               TS_ORACLE => 'd-m-Y H:i:s.000000', // Was 'd-M-y h.i.s A' . ' +00:00' before r51500
-               TS_POSTGRES => 'Y-m-d H:i:s',
-       ];
-
-       /**
-        * The actual timestamp being wrapped (DateTime object).
-        * @var DateTime
-        */
-       public $timestamp;
-
-       /**
-        * Make a new timestamp and set it to the specified time,
-        * or the current time if unspecified.
-        *
-        * @since 1.20
-        *
-        * @param bool|string|int|float|DateTime $timestamp Timestamp to set, or false for current time
-        */
-       public function __construct( $timestamp = false ) {
-               if ( $timestamp instanceof DateTime ) {
-                       $this->timestamp = $timestamp;
-               } else {
-                       $this->setTimestamp( $timestamp );
-               }
-       }
-
-       /**
-        * Set the timestamp to the specified time, or the current time if unspecified.
-        *
-        * Parse the given timestamp into either a DateTime object or a Unix timestamp,
-        * and then store it.
-        *
-        * @since 1.20
-        *
-        * @param string|bool $ts Timestamp to store, or false for now
-        * @throws TimestampException
-        */
-       public function setTimestamp( $ts = false ) {
-               $m = [];
-               $da = [];
-               $strtime = '';
-
-               // We want to catch 0, '', null... but not date strings starting with a letter.
-               if ( !$ts || $ts === "\0\0\0\0\0\0\0\0\0\0\0\0\0\0" ) {
-                       $uts = time();
-                       $strtime = "@$uts";
-               } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {
-                       # TS_DB
-               } elseif ( preg_match( '/^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {
-                       # TS_EXIF
-               } elseif ( preg_match( '/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/D', $ts, $da ) ) {
-                       # TS_MW
-               } elseif ( preg_match( '/^(-?\d{1,13})(\.\d+)?$/D', $ts, $m ) ) {
-                       # TS_UNIX
-                       $strtime = "@{$m[1]}"; // http://php.net/manual/en/datetime.formats.compound.php
-               } elseif ( preg_match( '/^\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}.\d{6}$/', $ts ) ) {
-                       # TS_ORACLE // session altered to DD-MM-YYYY HH24:MI:SS.FF6
-                       $strtime = preg_replace( '/(\d\d)\.(\d\d)\.(\d\d)(\.(\d+))?/', "$1:$2:$3",
-                                       str_replace( '+00:00', 'UTC', $ts ) );
-               } elseif ( preg_match(
-                       '/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.*\d*)?Z?$/',
-                       $ts,
-                       $da
-               ) ) {
-                       # TS_ISO_8601
-               } elseif ( preg_match(
-                       '/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(?:\.*\d*)?Z?$/',
-                       $ts,
-                       $da
-               ) ) {
-                       # TS_ISO_8601_BASIC
-               } elseif ( preg_match(
-                       '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d*[\+\- ](\d\d)$/',
-                       $ts,
-                       $da
-               ) ) {
-                       # TS_POSTGRES
-               } elseif ( preg_match(
-                       '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d* GMT$/',
-                       $ts,
-                       $da
-               ) ) {
-                       # TS_POSTGRES
-               } elseif ( preg_match(
-                       # Day of week
-                       '/^[ \t\r\n]*([A-Z][a-z]{2},[ \t\r\n]*)?' .
-                       # dd Mon yyyy
-                       '\d\d?[ \t\r\n]*[A-Z][a-z]{2}[ \t\r\n]*\d{2}(?:\d{2})?' .
-                       # hh:mm:ss
-                       '[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d/S',
-                       $ts
-               ) ) {
-                       # TS_RFC2822, accepting a trailing comment.
-                       # See http://www.squid-cache.org/mail-archive/squid-users/200307/0122.html / r77171
-                       # The regex is a superset of rfc2822 for readability
-                       $strtime = strtok( $ts, ';' );
-               } elseif ( preg_match( '/^[A-Z][a-z]{5,8}, \d\d-[A-Z][a-z]{2}-\d{2} \d\d:\d\d:\d\d/', $ts ) ) {
-                       # TS_RFC850
-                       $strtime = $ts;
-               } elseif ( preg_match( '/^[A-Z][a-z]{2} [A-Z][a-z]{2} +\d{1,2} \d\d:\d\d:\d\d \d{4}/', $ts ) ) {
-                       # asctime
-                       $strtime = $ts;
-               } else {
-                       throw new TimestampException( __METHOD__ . ": Invalid timestamp - $ts" );
-               }
-
-               if ( !$strtime ) {
-                       $da = array_map( 'intval', $da );
-                       $da[0] = "%04d-%02d-%02dT%02d:%02d:%02d.00+00:00";
-                       $strtime = call_user_func_array( "sprintf", $da );
-               }
-
-               try {
-                       $final = new DateTime( $strtime, new DateTimeZone( 'GMT' ) );
-               } catch ( Exception $e ) {
-                       throw new TimestampException( __METHOD__ . ': Invalid timestamp format.', $e->getCode(), $e );
-               }
-
-               if ( $final === false ) {
-                       throw new TimestampException( __METHOD__ . ': Invalid timestamp format.' );
-               }
-               $this->timestamp = $final;
-       }
-
-       /**
-        * Get the timestamp represented by this object in a certain form.
-        *
-        * Convert the internal timestamp to the specified format and then
-        * return it.
-        *
-        * @since 1.20
+        * Get a timestamp instance in GMT
         *
-        * @param int $style Constant Output format for timestamp
-        * @throws TimestampException
-        * @return string The formatted timestamp
+        * @param bool|string $ts Timestamp to set, or false for current time
+        * @return MWTimestamp The instance
         */
-       public function getTimestamp( $style = TS_UNIX ) {
-               if ( !isset( self::$formats[$style] ) ) {
-                       throw new TimestampException( __METHOD__ . ': Illegal timestamp output type.' );
-               }
-
-               $output = $this->timestamp->format( self::$formats[$style] );
-
-               if ( ( $style == TS_RFC2822 ) || ( $style == TS_POSTGRES ) ) {
-                       $output .= ' GMT';
-               }
-
-               if ( $style == TS_MW && strlen( $output ) !== 14 ) {
-                       throw new TimestampException( __METHOD__ . ': The timestamp cannot be represented in ' .
-                               'the specified format' );
-               }
-
-               return $output;
+       public static function getInstance( $ts = false ) {
+               return new static( $ts );
        }
 
        /**
@@ -329,52 +173,6 @@ class MWTimestamp {
                return $ts;
        }
 
-       /**
-        * @since 1.20
-        *
-        * @return string
-        */
-       public function __toString() {
-               return $this->getTimestamp();
-       }
-
-       /**
-        * Calculate the difference between two MWTimestamp objects.
-        *
-        * @since 1.22
-        * @param MWTimestamp $relativeTo Base time to calculate difference from
-        * @return DateInterval|bool The DateInterval object representing the
-        *   difference between the two dates or false on failure
-        */
-       public function diff( MWTimestamp $relativeTo ) {
-               return $this->timestamp->diff( $relativeTo->timestamp );
-       }
-
-       /**
-        * Set the timezone of this timestamp to the specified timezone.
-        *
-        * @since 1.22
-        * @param string $timezone Timezone to set
-        * @throws TimestampException
-        */
-       public function setTimezone( $timezone ) {
-               try {
-                       $this->timestamp->setTimezone( new DateTimeZone( $timezone ) );
-               } catch ( Exception $e ) {
-                       throw new TimestampException( __METHOD__ . ': Invalid timezone.', $e->getCode(), $e );
-               }
-       }
-
-       /**
-        * Get the timezone of this timestamp.
-        *
-        * @since 1.22
-        * @return DateTimeZone The timezone
-        */
-       public function getTimezone() {
-               return $this->timestamp->getTimezone();
-       }
-
        /**
         * Get the localized timezone message, if available.
         *
@@ -395,17 +193,6 @@ class MWTimestamp {
                }
        }
 
-       /**
-        * Format the timestamp in a given format.
-        *
-        * @since 1.22
-        * @param string $format Pattern to format in
-        * @return string The formatted timestamp
-        */
-       public function format( $format ) {
-               return $this->timestamp->format( $format );
-       }
-
        /**
         * Get a timestamp instance in the server local timezone ($wgLocaltimezone)
         *
@@ -419,15 +206,4 @@ class MWTimestamp {
                $timestamp->setTimezone( $wgLocaltimezone );
                return $timestamp;
        }
-
-       /**
-        * Get a timestamp instance in GMT
-        *
-        * @since 1.22
-        * @param bool|string $ts Timestamp to set, or false for current time
-        * @return MWTimestamp The instance
-        */
-       public static function getInstance( $ts = false ) {
-               return new self( $ts );
-       }
 }
index 9bbbd35..f21128e 100644 (file)
@@ -517,6 +517,7 @@ class MediaWiki {
         */
        public function run() {
                try {
+                       $this->setDBProfilingAgent();
                        try {
                                $this->main();
                        } catch ( ErrorPageError $e ) {
@@ -527,12 +528,40 @@ class MediaWiki {
                                $e->report(); // display the GUI error
                        }
                } catch ( Exception $e ) {
+                       $context = $this->context;
+                       $action = $context->getRequest()->getVal( 'action', 'view' );
+                       if (
+                               $e instanceof DBConnectionError &&
+                               $context->hasTitle() &&
+                               $context->getTitle()->canExist() &&
+                               in_array( $action, [ 'view', 'history' ], true ) &&
+                               HTMLFileCache::useFileCache( $this->context, HTMLFileCache::MODE_OUTAGE )
+                       ) {
+                               // Try to use any (even stale) file during outages...
+                               $cache = new HTMLFileCache( $context->getTitle(), 'view' );
+                               if ( $cache->isCached() ) {
+                                       $cache->loadFromFileCache( $context, HTMLFileCache::MODE_OUTAGE );
+                                       print MWExceptionRenderer::getHTML( $e );
+                                       exit;
+                               }
+
+                       }
+
                        MWExceptionHandler::handleException( $e );
                }
 
                $this->doPostOutputShutdown( 'normal' );
        }
 
+       private function setDBProfilingAgent() {
+               $services = MediaWikiServices::getInstance();
+               // Add a comment for easy SHOW PROCESSLIST interpretation
+               $name = $this->context->getUser()->getName();
+               $services->getDBLoadBalancerFactory()->setAgentName(
+                       mb_strlen( $name ) > 15 ? mb_substr( $name, 0, 15 ) . '...' : $name
+               );
+       }
+
        /**
         * @see MediaWiki::preOutputCommit()
         * @param callable $postCommitWork [default: null]
@@ -649,7 +678,7 @@ class MediaWiki {
         * @param IContextSource $context
         * @return string|bool Either "local" or "remote" if in the farm, false otherwise
         */
-       private function getUrlDomainDistance( $url, IContextSource $context ) {
+       private static function getUrlDomainDistance( $url, IContextSource $context ) {
                static $relevantKeys = [ 'host' => true, 'port' => true ];
 
                $infoCandidate = wfParseUrl( $url );
@@ -809,24 +838,22 @@ class MediaWiki {
                        }
                }
 
-               if ( $this->config->get( 'UseFileCache' ) && $title->getNamespace() >= 0 ) {
-                       if ( HTMLFileCache::useFileCache( $this->context ) ) {
-                               // Try low-level file cache hit
-                               $cache = new HTMLFileCache( $title, $action );
-                               if ( $cache->isCacheGood( /* Assume up to date */ ) ) {
-                                       // Check incoming headers to see if client has this cached
-                                       $timestamp = $cache->cacheTimestamp();
-                                       if ( !$output->checkLastModified( $timestamp ) ) {
-                                               $cache->loadFromFileCache( $this->context );
-                                       }
-                                       // Do any stats increment/watchlist stuff
-                                       // Assume we're viewing the latest revision (this should always be the case with file cache)
-                                       $this->context->getWikiPage()->doViewUpdates( $this->context->getUser() );
-                                       // Tell OutputPage that output is taken care of
-                                       $output->disable();
-
-                                       return;
+               if ( $title->canExist() && HTMLFileCache::useFileCache( $this->context ) ) {
+                       // Try low-level file cache hit
+                       $cache = new HTMLFileCache( $title, $action );
+                       if ( $cache->isCacheGood( /* Assume up to date */ ) ) {
+                               // Check incoming headers to see if client has this cached
+                               $timestamp = $cache->cacheTimestamp();
+                               if ( !$output->checkLastModified( $timestamp ) ) {
+                                       $cache->loadFromFileCache( $this->context );
                                }
+                               // Do any stats increment/watchlist stuff, assuming user is viewing the
+                               // latest revision (which should always be the case for file cache)
+                               $this->context->getWikiPage()->doViewUpdates( $this->context->getUser() );
+                               // Tell OutputPage that output is taken care of
+                               $output->disable();
+
+                               return;
                        }
                }
 
@@ -872,6 +899,7 @@ class MediaWiki {
 
                // Do any deferred jobs
                DeferredUpdates::doUpdates( 'enqueue' );
+               DeferredUpdates::setImmediateMode( true );
 
                // Make sure any lazy jobs are pushed
                JobQueueGroup::pushLazyJobs();
index f621867..ba8b71b 100644 (file)
@@ -3,6 +3,8 @@ namespace MediaWiki;
 
 use Config;
 use ConfigFactory;
+use CryptHKDF;
+use CryptRand;
 use EventRelayerGroup;
 use GenderCache;
 use GlobalVarConfig;
@@ -18,7 +20,9 @@ use MediaWiki\Services\SalvageableService;
 use MediaWiki\Services\ServiceContainer;
 use MediaWiki\Services\NoSuchServiceException;
 use MWException;
+use MimeAnalyzer;
 use ObjectCache;
+use ProxyLookup;
 use SearchEngine;
 use SearchEngineConfig;
 use SearchEngineFactory;
@@ -179,7 +183,7 @@ class MediaWikiServices extends ServiceContainer {
 
                $oldInstance = self::$instance;
 
-               self::$instance = self::newInstance( $bootstrapConfig );
+               self::$instance = self::newInstance( $bootstrapConfig, 'load' );
                self::$instance->importWiring( $oldInstance, [ 'BootstrapConfig' ] );
 
                if ( $quick === 'quick' ) {
@@ -521,6 +525,22 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'WatchedItemQueryService' );
        }
 
+       /**
+        * @since 1.28
+        * @return CryptRand
+        */
+       public function getCryptRand() {
+               return $this->getService( 'CryptRand' );
+       }
+
+       /**
+        * @since 1.28
+        * @return CryptHKDF
+        */
+       public function getCryptHKDF() {
+               return $this->getService( 'CryptHKDF' );
+       }
+
        /**
         * @since 1.28
         * @return MediaHandlerFactory
@@ -529,6 +549,22 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'MediaHandlerFactory' );
        }
 
+       /**
+        * @since 1.28
+        * @return MimeAnalyzer
+        */
+       public function getMimeAnalyzer() {
+               return $this->getService( 'MimeAnalyzer' );
+       }
+
+       /**
+        * @since 1.28
+        * @return ProxyLookup
+        */
+       public function getProxyLookup() {
+               return $this->getService( 'ProxyLookup' );
+       }
+
        /**
         * @since 1.28
         * @return GenderCache
@@ -580,6 +616,30 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'TitleParser' );
        }
 
+       /**
+        * @since 1.28
+        * @return \BagOStuff
+        */
+       public function getMainObjectStash() {
+               return $this->getService( 'MainObjectStash' );
+       }
+
+       /**
+        * @since 1.28
+        * @return \WANObjectCache
+        */
+       public function getMainWANObjectCache() {
+               return $this->getService( 'MainWANObjectCache' );
+       }
+
+       /**
+        * @since 1.28
+        * @return \BagOStuff
+        */
+       public function getLocalServerObjectCache() {
+               return $this->getService( 'LocalServerObjectCache' );
+       }
+
        /**
         * @since 1.28
         * @return VirtualRESTServiceClient
index dd1fd37..f797fe3 100644 (file)
@@ -42,7 +42,7 @@ class MergeHistory {
        /** @var Title Page to which history will be merged */
        protected $dest;
 
-       /** @var DatabaseBase Database that we are using */
+       /** @var IDatabase Database that we are using */
        protected $dbw;
 
        /** @var MWTimestamp Maximum timestamp that we can use (oldest timestamp of dest) */
index c2c954a..c1a12aa 100644 (file)
@@ -852,6 +852,12 @@ class Message implements MessageSpecifier, Serializable {
         * @return string
         */
        public function __toString() {
+               if ( $this->format !== 'parse' ) {
+                       $ex = new LogicException( __METHOD__ . ' using implicit format: ' . $this->format );
+                       \MediaWiki\Logger\LoggerFactory::getInstance( 'message-format' )->warning(
+                               $ex->getMessage(), [ 'exception' => $ex, 'format' => $this->format, 'key' => $this->key ] );
+               }
+
                // PHP doesn't allow __toString to throw exceptions and will
                // trigger a fatal error if it does. So, catch any exceptions.
 
index a432d44..c03bce7 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * Module defining helper functions for detecting and dealing with MIME types.
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  *
  * @file
  */
+use MediaWiki\MediaWikiServices;
+use MediaWiki\Logger\LoggerFactory;
 
-/**
- * Defines a set of well known MIME types
- * This is used as a fallback to mime.types files.
- * An extensive list of well known MIME types is provided by
- * the file mime.types in the includes directory.
- *
- * This list concatenated with mime.types is used to create a MIME <-> ext
- * map. Each line contains a MIME type followed by a space separated list of
- * extensions. If multiple extensions for a single MIME type exist or if
- * multiple MIME types exist for a single extension then in most cases
- * MediaWiki assumes that the first extension following the MIME type is the
- * canonical extension, and the first time a MIME type appears for a certain
- * extension is considered the canonical MIME type.
- *
- * (Note that appending $wgMimeTypeFile to the end of MM_WELL_KNOWN_MIME_TYPES
- * sucks because you can't redefine canonical types. This could be fixed by
- * appending MM_WELL_KNOWN_MIME_TYPES behind $wgMimeTypeFile, but who knows
- * what will break? In practice this probably isn't a problem anyway -- Bryan)
- */
-define( 'MM_WELL_KNOWN_MIME_TYPES', <<<END_STRING
-application/ogg ogx ogg ogm ogv oga spx
-application/pdf pdf
-application/vnd.oasis.opendocument.chart odc
-application/vnd.oasis.opendocument.chart-template otc
-application/vnd.oasis.opendocument.database odb
-application/vnd.oasis.opendocument.formula odf
-application/vnd.oasis.opendocument.formula-template otf
-application/vnd.oasis.opendocument.graphics odg
-application/vnd.oasis.opendocument.graphics-template otg
-application/vnd.oasis.opendocument.image odi
-application/vnd.oasis.opendocument.image-template oti
-application/vnd.oasis.opendocument.presentation odp
-application/vnd.oasis.opendocument.presentation-template otp
-application/vnd.oasis.opendocument.spreadsheet ods
-application/vnd.oasis.opendocument.spreadsheet-template ots
-application/vnd.oasis.opendocument.text odt
-application/vnd.oasis.opendocument.text-master otm
-application/vnd.oasis.opendocument.text-template ott
-application/vnd.oasis.opendocument.text-web oth
-application/javascript js
-application/x-shockwave-flash swf
-audio/midi mid midi kar
-audio/mpeg mpga mpa mp2 mp3
-audio/x-aiff aif aiff aifc
-audio/x-wav wav
-audio/ogg oga spx ogg
-image/x-bmp bmp
-image/gif gif
-image/jpeg jpeg jpg jpe
-image/png png
-image/svg+xml svg
-image/svg svg
-image/tiff tiff tif
-image/vnd.djvu djvu
-image/x.djvu djvu
-image/x-djvu djvu
-image/x-portable-pixmap ppm
-image/x-xcf xcf
-text/plain txt
-text/html html htm
-video/ogg ogv ogm ogg
-video/mpeg mpg mpeg
-END_STRING
-);
-
-/**
- * Defines a set of well known MIME info entries
- * This is used as a fallback to mime.info files.
- * An extensive list of well known MIME types is provided by
- * the file mime.info in the includes directory.
- */
-define( 'MM_WELL_KNOWN_MIME_INFO', <<<END_STRING
-application/pdf [OFFICE]
-application/vnd.oasis.opendocument.chart [OFFICE]
-application/vnd.oasis.opendocument.chart-template [OFFICE]
-application/vnd.oasis.opendocument.database [OFFICE]
-application/vnd.oasis.opendocument.formula [OFFICE]
-application/vnd.oasis.opendocument.formula-template [OFFICE]
-application/vnd.oasis.opendocument.graphics [OFFICE]
-application/vnd.oasis.opendocument.graphics-template [OFFICE]
-application/vnd.oasis.opendocument.image [OFFICE]
-application/vnd.oasis.opendocument.image-template [OFFICE]
-application/vnd.oasis.opendocument.presentation [OFFICE]
-application/vnd.oasis.opendocument.presentation-template [OFFICE]
-application/vnd.oasis.opendocument.spreadsheet [OFFICE]
-application/vnd.oasis.opendocument.spreadsheet-template [OFFICE]
-application/vnd.oasis.opendocument.text [OFFICE]
-application/vnd.oasis.opendocument.text-template [OFFICE]
-application/vnd.oasis.opendocument.text-master [OFFICE]
-application/vnd.oasis.opendocument.text-web [OFFICE]
-application/javascript text/javascript application/x-javascript [EXECUTABLE]
-application/x-shockwave-flash [MULTIMEDIA]
-audio/midi [AUDIO]
-audio/x-aiff [AUDIO]
-audio/x-wav [AUDIO]
-audio/mp3 audio/mpeg [AUDIO]
-application/ogg audio/ogg video/ogg [MULTIMEDIA]
-image/x-bmp image/x-ms-bmp image/bmp [BITMAP]
-image/gif [BITMAP]
-image/jpeg [BITMAP]
-image/png [BITMAP]
-image/svg+xml [DRAWING]
-image/tiff [BITMAP]
-image/vnd.djvu [BITMAP]
-image/x-xcf [BITMAP]
-image/x-portable-pixmap [BITMAP]
-text/plain [TEXT]
-text/html [TEXT]
-video/ogg [VIDEO]
-video/mpeg [VIDEO]
-unknown/unknown application/octet-stream application/x-empty [UNKNOWN]
-END_STRING
-);
-
-/**
- * Implements functions related to MIME types such as detection and mapping to
- * file extension.
- *
- * Instances of this class are stateless, there only needs to be one global instance
- * of MimeMagic. Please use MimeMagic::singleton() to get that instance.
- */
-class MimeMagic {
-       /**
-        * @var array Mapping of media types to arrays of MIME types.
-        * This is used by findMediaType and getMediaType, respectively
-        */
-       protected $mMediaTypes = null;
-
-       /** @var array Map of MIME type aliases
-        */
-       protected $mMimeTypeAliases = null;
-
-       /** @var array Map of MIME types to file extensions (as a space separated list)
-        */
-       protected $mMimeToExt = null;
-
-       /** @var array Map of file extensions types to MIME types (as a space separated list)
-        */
-       public $mExtToMime = null;
-
-       /** @var IEContentAnalyzer
-        */
-       protected $mIEAnalyzer;
-
-       /** @var string Extra MIME types, set for example by media handling extensions
-        */
-       private $mExtraTypes = '';
-
-       /** @var string Extra MIME info, set for example by media handling extensions
-        */
-       private $mExtraInfo = '';
-
-       /** @var Config */
-       private $mConfig;
-
-       /** @var MimeMagic The singleton instance
-        */
-       private static $instance = null;
-
-       /** Initializes the MimeMagic object. This is called by MimeMagic::singleton().
-        *
-        * This constructor parses the mime.types and mime.info files and build internal mappings.
-        *
-        * @todo Make this constructor private once everything uses the singleton instance
-        * @param Config $config
-        */
-       function __construct( Config $config = null ) {
-               if ( !$config ) {
-                       wfDebug( __METHOD__ . ' called with no Config instance passed to it' );
-                       $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
-               }
-               $this->mConfig = $config;
-
-               /**
-                *   --- load mime.types ---
-                */
-
-               global $IP;
-
-               # Allow media handling extensions adding MIME-types and MIME-info
-               Hooks::run( 'MimeMagicInit', [ $this ] );
-
-               $types = MM_WELL_KNOWN_MIME_TYPES;
-
-               $mimeTypeFile = $this->mConfig->get( 'MimeTypeFile' );
-               if ( $mimeTypeFile == 'includes/mime.types' ) {
-                       $mimeTypeFile = "$IP/$mimeTypeFile";
-               }
-
-               if ( $mimeTypeFile ) {
-                       if ( is_file( $mimeTypeFile ) && is_readable( $mimeTypeFile ) ) {
-                               wfDebug( __METHOD__ . ": loading mime types from $mimeTypeFile\n" );
-                               $types .= "\n";
-                               $types .= file_get_contents( $mimeTypeFile );
-                       } else {
-                               wfDebug( __METHOD__ . ": can't load mime types from $mimeTypeFile\n" );
-                       }
-               } else {
-                       wfDebug( __METHOD__ . ": no mime types file defined, using built-ins only.\n" );
-               }
-
-               $types .= "\n" . $this->mExtraTypes;
-
-               $types = str_replace( [ "\r\n", "\n\r", "\n\n", "\r\r", "\r" ], "\n", $types );
-               $types = str_replace( "\t", " ", $types );
-
-               $this->mMimeToExt = [];
-               $this->mExtToMime = [];
-
-               $lines = explode( "\n", $types );
-               foreach ( $lines as $s ) {
-                       $s = trim( $s );
-                       if ( empty( $s ) ) {
-                               continue;
-                       }
-                       if ( strpos( $s, '#' ) === 0 ) {
-                               continue;
-                       }
-
-                       $s = strtolower( $s );
-                       $i = strpos( $s, ' ' );
-
-                       if ( $i === false ) {
-                               continue;
-                       }
-
-                       $mime = substr( $s, 0, $i );
-                       $ext = trim( substr( $s, $i + 1 ) );
-
-                       if ( empty( $ext ) ) {
-                               continue;
-                       }
-
-                       if ( !empty( $this->mMimeToExt[$mime] ) ) {
-                               $this->mMimeToExt[$mime] .= ' ' . $ext;
-                       } else {
-                               $this->mMimeToExt[$mime] = $ext;
-                       }
-
-                       $extensions = explode( ' ', $ext );
-
-                       foreach ( $extensions as $e ) {
-                               $e = trim( $e );
-                               if ( empty( $e ) ) {
-                                       continue;
-                               }
-
-                               if ( !empty( $this->mExtToMime[$e] ) ) {
-                                       $this->mExtToMime[$e] .= ' ' . $mime;
-                               } else {
-                                       $this->mExtToMime[$e] = $mime;
-                               }
-                       }
-               }
-
-               /**
-                *   --- load mime.info ---
-                */
-
-               $mimeInfoFile = $this->mConfig->get( 'MimeInfoFile' );
-               if ( $mimeInfoFile == 'includes/mime.info' ) {
-                       $mimeInfoFile = "$IP/$mimeInfoFile";
-               }
-
-               $info = MM_WELL_KNOWN_MIME_INFO;
-
-               if ( $mimeInfoFile ) {
-                       if ( is_file( $mimeInfoFile ) && is_readable( $mimeInfoFile ) ) {
-                               wfDebug( __METHOD__ . ": loading mime info from $mimeInfoFile\n" );
-                               $info .= "\n";
-                               $info .= file_get_contents( $mimeInfoFile );
-                       } else {
-                               wfDebug( __METHOD__ . ": can't load mime info from $mimeInfoFile\n" );
-                       }
-               } else {
-                       wfDebug( __METHOD__ . ": no mime info file defined, using built-ins only.\n" );
-               }
-
-               $info .= "\n" . $this->mExtraInfo;
-
-               $info = str_replace( [ "\r\n", "\n\r", "\n\n", "\r\r", "\r" ], "\n", $info );
-               $info = str_replace( "\t", " ", $info );
-
-               $this->mMimeTypeAliases = [];
-               $this->mMediaTypes = [];
-
-               $lines = explode( "\n", $info );
-               foreach ( $lines as $s ) {
-                       $s = trim( $s );
-                       if ( empty( $s ) ) {
-                               continue;
-                       }
-                       if ( strpos( $s, '#' ) === 0 ) {
-                               continue;
-                       }
-
-                       $s = strtolower( $s );
-                       $i = strpos( $s, ' ' );
-
-                       if ( $i === false ) {
-                               continue;
-                       }
-
-                       # print "processing MIME INFO line $s<br>";
-
-                       $match = [];
-                       if ( preg_match( '!\[\s*(\w+)\s*\]!', $s, $match ) ) {
-                               $s = preg_replace( '!\[\s*(\w+)\s*\]!', '', $s );
-                               $mtype = trim( strtoupper( $match[1] ) );
-                       } else {
-                               $mtype = MEDIATYPE_UNKNOWN;
-                       }
-
-                       $m = explode( ' ', $s );
-
-                       if ( !isset( $this->mMediaTypes[$mtype] ) ) {
-                               $this->mMediaTypes[$mtype] = [];
-                       }
-
-                       foreach ( $m as $mime ) {
-                               $mime = trim( $mime );
-                               if ( empty( $mime ) ) {
-                                       continue;
-                               }
-
-                               $this->mMediaTypes[$mtype][] = $mime;
-                       }
-
-                       if ( count( $m ) > 1 ) {
-                               $main = $m[0];
-                               $mCount = count( $m );
-                               for ( $i = 1; $i < $mCount; $i += 1 ) {
-                                       $mime = $m[$i];
-                                       $this->mMimeTypeAliases[$mime] = $main;
-                               }
-                       }
-               }
-       }
-
+class MimeMagic extends MimeAnalyzer {
        /**
         * Get an instance of this class
         * @return MimeMagic
+        * @deprecated since 1.28
         */
        public static function singleton() {
-               if ( self::$instance === null ) {
-                       self::$instance = new MimeMagic(
-                               ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
-                       );
-               }
-               return self::$instance;
-       }
-
-       /**
-        * Adds to the list mapping MIME to file extensions.
-        * As an extension author, you are encouraged to submit patches to
-        * MediaWiki's core to add new MIME types to mime.types.
-        * @param string $types
-        */
-       public function addExtraTypes( $types ) {
-               $this->mExtraTypes .= "\n" . $types;
-       }
-
-       /**
-        * Adds to the list mapping MIME to media type.
-        * As an extension author, you are encouraged to submit patches to
-        * MediaWiki's core to add new MIME info to mime.info.
-        * @param string $info
-        */
-       public function addExtraInfo( $info ) {
-               $this->mExtraInfo .= "\n" . $info;
-       }
-
-       /**
-        * Returns a list of file extensions for a given MIME type as a space
-        * separated string or null if the MIME type was unrecognized. Resolves
-        * MIME type aliases.
-        *
-        * @param string $mime
-        * @return string|null
-        */
-       public function getExtensionsForType( $mime ) {
-               $mime = strtolower( $mime );
-
-               // Check the mime-to-ext map
-               if ( isset( $this->mMimeToExt[$mime] ) ) {
-                       return $this->mMimeToExt[$mime];
-               }
-
-               // Resolve the MIME type to the canonical type
-               if ( isset( $this->mMimeTypeAliases[$mime] ) ) {
-                       $mime = $this->mMimeTypeAliases[$mime];
-                       if ( isset( $this->mMimeToExt[$mime] ) ) {
-                               return $this->mMimeToExt[$mime];
-                       }
-               }
-
-               return null;
+               return MediaWikiServices::getInstance()->getMIMEAnalyzer();
        }
 
        /**
-        * Returns a list of MIME types for a given file extension as a space
-        * separated string or null if the extension was unrecognized.
-        *
-        * @param string $ext
-        * @return string|null
-        */
-       public function getTypesForExtension( $ext ) {
-               $ext = strtolower( $ext );
-
-               $r = isset( $this->mExtToMime[$ext] ) ? $this->mExtToMime[$ext] : null;
-               return $r;
-       }
-
-       /**
-        * Returns a single MIME type for a given file extension or null if unknown.
-        * This is always the first type from the list returned by getTypesForExtension($ext).
-        *
-        * @param string $ext
-        * @return string|null
-        */
-       public function guessTypesForExtension( $ext ) {
-               $m = $this->getTypesForExtension( $ext );
-               if ( is_null( $m ) ) {
-                       return null;
-               }
-
-               // TODO: Check if this is needed; strtok( $m, ' ' ) should be sufficient
-               $m = trim( $m );
-               $m = preg_replace( '/\s.*$/', '', $m );
-
-               return $m;
-       }
-
-       /**
-        * Tests if the extension matches the given MIME type. Returns true if a
-        * match was found, null if the MIME type is unknown, and false if the
-        * MIME type is known but no matches where found.
-        *
-        * @param string $extension
-        * @param string $mime
-        * @return bool|null
-        */
-       public function isMatchingExtension( $extension, $mime ) {
-               $ext = $this->getExtensionsForType( $mime );
-
-               if ( !$ext ) {
-                       return null; // Unknown MIME type
-               }
-
-               $ext = explode( ' ', $ext );
-
-               $extension = strtolower( $extension );
-               return in_array( $extension, $ext );
-       }
-
-       /**
-        * Returns true if the MIME type is known to represent an image format
-        * supported by the PHP GD library.
-        *
-        * @param string $mime
-        *
-        * @return bool
-        */
-       public function isPHPImageType( $mime ) {
-               // As defined by imagegetsize and image_type_to_mime
-               static $types = [
-                       'image/gif', 'image/jpeg', 'image/png',
-                       'image/x-bmp', 'image/xbm', 'image/tiff',
-                       'image/jp2', 'image/jpeg2000', 'image/iff',
-                       'image/xbm', 'image/x-xbitmap',
-                       'image/vnd.wap.wbmp', 'image/vnd.xiff',
-                       'image/x-photoshop',
-                       'application/x-shockwave-flash',
-               ];
-
-               return in_array( $mime, $types );
-       }
-
-       /**
-        * Returns true if the extension represents a type which can
-        * be reliably detected from its content. Use this to determine
-        * whether strict content checks should be applied to reject
-        * invalid uploads; if we can't identify the type we won't
-        * be able to say if it's invalid.
-        *
-        * @todo Be more accurate when using fancy MIME detector plugins;
-        *       right now this is the bare minimum getimagesize() list.
-        * @param string $extension
-        * @return bool
-        */
-       function isRecognizableExtension( $extension ) {
-               static $types = [
-                       // Types recognized by getimagesize()
-                       'gif', 'jpeg', 'jpg', 'png', 'swf', 'psd',
-                       'bmp', 'tiff', 'tif', 'jpc', 'jp2',
-                       'jpx', 'jb2', 'swc', 'iff', 'wbmp',
-                       'xbm',
-
-                       // Formats we recognize magic numbers for
-                       'djvu', 'ogx', 'ogg', 'ogv', 'oga', 'spx',
-                       'mid', 'pdf', 'wmf', 'xcf', 'webm', 'mkv', 'mka',
-                       'webp',
-
-                       // XML formats we sure hope we recognize reliably
-                       'svg',
-               ];
-               return in_array( strtolower( $extension ), $types );
-       }
-
-       /**
-        * Improves a MIME type using the file extension. Some file formats are very generic,
-        * so their MIME type is not very meaningful. A more useful MIME type can be derived
-        * by looking at the file extension. Typically, this method would be called on the
-        * result of guessMimeType().
-        *
-        * @param string $mime The MIME type, typically guessed from a file's content.
-        * @param string $ext The file extension, as taken from the file name
-        *
-        * @return string The MIME type
-        */
-       public function improveTypeFromExtension( $mime, $ext ) {
-               if ( $mime === 'unknown/unknown' ) {
-                       if ( $this->isRecognizableExtension( $ext ) ) {
-                               wfDebug( __METHOD__ . ': refusing to guess mime type for .' .
-                                       "$ext file, we should have recognized it\n" );
-                       } else {
-                               // Not something we can detect, so simply
-                               // trust the file extension
-                               $mime = $this->guessTypesForExtension( $ext );
-                       }
-               } elseif ( $mime === 'application/x-opc+zip' ) {
-                       if ( $this->isMatchingExtension( $ext, $mime ) ) {
-                               // A known file extension for an OPC file,
-                               // find the proper MIME type for that file extension
-                               $mime = $this->guessTypesForExtension( $ext );
-                       } else {
-                               wfDebug( __METHOD__ . ": refusing to guess better type for $mime file, " .
-                                       ".$ext is not a known OPC extension.\n" );
-                               $mime = 'application/zip';
-                       }
-               } elseif ( $mime === 'text/plain' && $this->findMediaType( ".$ext" ) === MEDIATYPE_TEXT ) {
-                       // Textual types are sometimes not recognized properly.
-                       // If detected as text/plain, and has an extension which is textual
-                       // improve to the extension's type. For example, csv and json are often
-                       // misdetected as text/plain.
-                       $mime = $this->guessTypesForExtension( $ext );
-               }
-
-               # Media handling extensions can improve the MIME detected
-               Hooks::run( 'MimeMagicImproveFromExtension', [ $this, $ext, &$mime ] );
-
-               if ( isset( $this->mMimeTypeAliases[$mime] ) ) {
-                       $mime = $this->mMimeTypeAliases[$mime];
-               }
-
-               wfDebug( __METHOD__ . ": improved mime type for .$ext: $mime\n" );
-               return $mime;
-       }
-
-       /**
-        * MIME type detection. This uses detectMimeType to detect the MIME type
-        * of the file, but applies additional checks to determine some well known
-        * file formats that may be missed or misinterpreted by the default MIME
-        * detection (namely XML based formats like XHTML or SVG, as well as ZIP
-        * based formats like OPC/ODF files).
-        *
-        * @param string $file The file to check
-        * @param string|bool $ext The file extension, or true (default) to extract it from the filename.
-        *   Set it to false to ignore the extension. DEPRECATED! Set to false, use
-        *   improveTypeFromExtension($mime, $ext) later to improve MIME type.
-        *
-        * @return string The MIME type of $file
-        */
-       public function guessMimeType( $file, $ext = true ) {
-               if ( $ext ) { // TODO: make $ext default to false. Or better, remove it.
-                       wfDebug( __METHOD__ . ": WARNING: use of the \$ext parameter is deprecated. " .
-                               "Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
-               }
-
-               $mime = $this->doGuessMimeType( $file, $ext );
-
-               if ( !$mime ) {
-                       wfDebug( __METHOD__ . ": internal type detection failed for $file (.$ext)...\n" );
-                       $mime = $this->detectMimeType( $file, $ext );
-               }
-
-               if ( isset( $this->mMimeTypeAliases[$mime] ) ) {
-                       $mime = $this->mMimeTypeAliases[$mime];
-               }
-
-               wfDebug( __METHOD__ . ": guessed mime type of $file: $mime\n" );
-               return $mime;
-       }
-
-       /**
-        * Guess the MIME type from the file contents.
-        *
-        * @todo Remove $ext param
-        *
-        * @param string $file
-        * @param mixed $ext
-        * @return bool|string
-        * @throws MWException
+        * @param array $params
+        * @param Config $mainConfig
+        * @return array
         */
-       private function doGuessMimeType( $file, $ext ) {
-               // Read a chunk of the file
-               MediaWiki\suppressWarnings();
-               $f = fopen( $file, 'rb' );
-               MediaWiki\restoreWarnings();
-
-               if ( !$f ) {
-                       return 'unknown/unknown';
-               }
-
-               $fsize = filesize( $file );
-               if ( $fsize === false ) {
-                       return 'unknown/unknown';
-               }
-
-               $head = fread( $f, 1024 );
-               $tailLength = min( 65558, $fsize ); // 65558 = maximum size of a zip EOCDR
-               if ( fseek( $f, -1 * $tailLength, SEEK_END ) === -1 ) {
-                       throw new MWException(
-                               "Seeking $tailLength bytes from EOF failed in " . __METHOD__ );
-               }
-               $tail = $tailLength ? fread( $f, $tailLength ) : '';
-               fclose( $f );
-
-               wfDebug( __METHOD__ . ": analyzing head and tail of $file for magic numbers.\n" );
-
-               // Hardcode a few magic number checks...
-               $headers = [
-                       // Multimedia...
-                       'MThd'             => 'audio/midi',
-                       'OggS'             => 'application/ogg',
-
-                       // Image formats...
-                       // Note that WMF may have a bare header, no magic number.
-                       "\x01\x00\x09\x00" => 'application/x-msmetafile', // Possibly prone to false positives?
-                       "\xd7\xcd\xc6\x9a" => 'application/x-msmetafile',
-                       '%PDF'             => 'application/pdf',
-                       'gimp xcf'         => 'image/x-xcf',
-
-                       // Some forbidden fruit...
-                       'MZ'               => 'application/octet-stream', // DOS/Windows executable
-                       "\xca\xfe\xba\xbe" => 'application/octet-stream', // Mach-O binary
-                       "\x7fELF"          => 'application/octet-stream', // ELF binary
-               ];
-
-               foreach ( $headers as $magic => $candidate ) {
-                       if ( strncmp( $head, $magic, strlen( $magic ) ) == 0 ) {
-                               wfDebug( __METHOD__ . ": magic header in $file recognized as $candidate\n" );
-                               return $candidate;
-                       }
-               }
-
-               /* Look for WebM and Matroska files */
-               if ( strncmp( $head, pack( "C4", 0x1a, 0x45, 0xdf, 0xa3 ), 4 ) == 0 ) {
-                       $doctype = strpos( $head, "\x42\x82" );
-                       if ( $doctype ) {
-                               // Next byte is datasize, then data (sizes larger than 1 byte are very stupid muxers)
-                               $data = substr( $head, $doctype + 3, 8 );
-                               if ( strncmp( $data, "matroska", 8 ) == 0 ) {
-                                       wfDebug( __METHOD__ . ": recognized file as video/x-matroska\n" );
-                                       return "video/x-matroska";
-                               } elseif ( strncmp( $data, "webm", 4 ) == 0 ) {
-                                       wfDebug( __METHOD__ . ": recognized file as video/webm\n" );
-                                       return "video/webm";
-                               }
-                       }
-                       wfDebug( __METHOD__ . ": unknown EBML file\n" );
-                       return "unknown/unknown";
-               }
-
-               /* Look for WebP */
-               if ( strncmp( $head, "RIFF", 4 ) == 0 && strncmp( substr( $head, 8, 7 ), "WEBPVP8", 7 ) == 0 ) {
-                       wfDebug( __METHOD__ . ": recognized file as image/webp\n" );
-                       return "image/webp";
-               }
-
-               /**
-                * Look for PHP.  Check for this before HTML/XML...  Warning: this is a
-                * heuristic, and won't match a file with a lot of non-PHP before.  It
-                * will also match text files which could be PHP. :)
-                *
-                * @todo FIXME: For this reason, the check is probably useless -- an attacker
-                * could almost certainly just pad the file with a lot of nonsense to
-                * circumvent the check in any case where it would be a security
-                * problem.  On the other hand, it causes harmful false positives (bug
-                * 16583).  The heuristic has been cut down to exclude three-character
-                * strings like "<? ", but should it be axed completely?
-                */
-               if ( ( strpos( $head, '<?php' ) !== false ) ||
-                       ( strpos( $head, "<\x00?\x00p\x00h\x00p" ) !== false ) ||
-                       ( strpos( $head, "<\x00?\x00 " ) !== false ) ||
-                       ( strpos( $head, "<\x00?\x00\n" ) !== false ) ||
-                       ( strpos( $head, "<\x00?\x00\t" ) !== false ) ||
-                       ( strpos( $head, "<\x00?\x00=" ) !== false ) ) {
-
-                       wfDebug( __METHOD__ . ": recognized $file as application/x-php\n" );
-                       return 'application/x-php';
-               }
-
-               /**
-                * look for XML formats (XHTML and SVG)
-                */
-               $xml = new XmlTypeCheck( $file );
-               if ( $xml->wellFormed ) {
-                       $xmlMimeTypes = $this->mConfig->get( 'XMLMimeTypes' );
-                       if ( isset( $xmlMimeTypes[$xml->getRootElement()] ) ) {
-                               return $xmlMimeTypes[$xml->getRootElement()];
-                       } else {
-                               return 'application/xml';
-                       }
-               }
-
-               /**
-                * look for shell scripts
-                */
-               $script_type = null;
-
-               # detect by shebang
-               if ( substr( $head, 0, 2 ) == "#!" ) {
-                       $script_type = "ASCII";
-               } elseif ( substr( $head, 0, 5 ) == "\xef\xbb\xbf#!" ) {
-                       $script_type = "UTF-8";
-               } elseif ( substr( $head, 0, 7 ) == "\xfe\xff\x00#\x00!" ) {
-                       $script_type = "UTF-16BE";
-               } elseif ( substr( $head, 0, 7 ) == "\xff\xfe#\x00!" ) {
-                       $script_type = "UTF-16LE";
-               }
-
-               if ( $script_type ) {
-                       if ( $script_type !== "UTF-8" && $script_type !== "ASCII" ) {
-                               // Quick and dirty fold down to ASCII!
-                               $pack = [ 'UTF-16BE' => 'n*', 'UTF-16LE' => 'v*' ];
-                               $chars = unpack( $pack[$script_type], substr( $head, 2 ) );
-                               $head = '';
-                               foreach ( $chars as $codepoint ) {
-                                       if ( $codepoint < 128 ) {
-                                               $head .= chr( $codepoint );
-                                       } else {
-                                               $head .= '?';
+       public static function applyDefaultParameters( array $params, Config $mainConfig ) {
+               $logger = LoggerFactory::getInstance( 'Mime' );
+               $params += [
+                       'typeFile' => $mainConfig->get( 'MimeTypeFile' ),
+                       'infoFile' => $mainConfig->get( 'MimeInfoFile' ),
+                       'xmlTypes' => $mainConfig->get( 'XMLMimeTypes' ),
+                       'guessCallback' =>
+                               function ( $mimeAnalyzer, &$head, &$tail, $file, &$mime ) use ( $logger ) {
+                                       // Also test DjVu
+                                       $deja = new DjVuImage( $file );
+                                       if ( $deja->isValid() ) {
+                                               $logger->info( __METHOD__ . ": detected $file as image/vnd.djvu\n" );
+                                               $mime = 'image/vnd.djvu';
+
+                                               return;
                                        }
-                               }
-                       }
-
-                       $match = [];
-
-                       if ( preg_match( '%/?([^\s]+/)(\w+)%', $head, $match ) ) {
-                               $mime = "application/x-{$match[2]}";
-                               wfDebug( __METHOD__ . ": shell script recognized as $mime\n" );
-                               return $mime;
-                       }
-               }
-
-               // Check for ZIP variants (before getimagesize)
-               if ( strpos( $tail, "PK\x05\x06" ) !== false ) {
-                       wfDebug( __METHOD__ . ": ZIP header present in $file\n" );
-                       return $this->detectZipType( $head, $tail, $ext );
-               }
-
-               MediaWiki\suppressWarnings();
-               $gis = getimagesize( $file );
-               MediaWiki\restoreWarnings();
-
-               if ( $gis && isset( $gis['mime'] ) ) {
-                       $mime = $gis['mime'];
-                       wfDebug( __METHOD__ . ": getimagesize detected $file as $mime\n" );
-                       return $mime;
-               }
-
-               // Also test DjVu
-               $deja = new DjVuImage( $file );
-               if ( $deja->isValid() ) {
-                       wfDebug( __METHOD__ . ": detected $file as image/vnd.djvu\n" );
-                       return 'image/vnd.djvu';
-               }
-
-               # Media handling extensions can guess the MIME by content
-               # It's intentionally here so that if core is wrong about a type (false positive),
-               # people will hopefully nag and submit patches :)
-               $mime = false;
-               # Some strings by reference for performance - assuming well-behaved hooks
-               Hooks::run(
-                       'MimeMagicGuessFromContent',
-                       [ $this, &$head, &$tail, $file, &$mime ]
-               );
-
-               return $mime;
-       }
-
-       /**
-        * Detect application-specific file type of a given ZIP file from its
-        * header data.  Currently works for OpenDocument and OpenXML types...
-        * If can't tell, returns 'application/zip'.
-        *
-        * @param string $header Some reasonably-sized chunk of file header
-        * @param string|null $tail The tail of the file
-        * @param string|bool $ext The file extension, or true to extract it from the filename.
-        *   Set it to false (default) to ignore the extension. DEPRECATED! Set to false,
-        *   use improveTypeFromExtension($mime, $ext) later to improve MIME type.
-        *
-        * @return string
-        */
-       function detectZipType( $header, $tail = null, $ext = false ) {
-               if ( $ext ) { # TODO: remove $ext param
-                       wfDebug( __METHOD__ . ": WARNING: use of the \$ext parameter is deprecated. " .
-                               "Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
-               }
-
-               $mime = 'application/zip';
-               $opendocTypes = [
-                       'chart-template',
-                       'chart',
-                       'formula-template',
-                       'formula',
-                       'graphics-template',
-                       'graphics',
-                       'image-template',
-                       'image',
-                       'presentation-template',
-                       'presentation',
-                       'spreadsheet-template',
-                       'spreadsheet',
-                       'text-template',
-                       'text-master',
-                       'text-web',
-                       'text' ];
-
-               // http://lists.oasis-open.org/archives/office/200505/msg00006.html
-               $types = '(?:' . implode( '|', $opendocTypes ) . ')';
-               $opendocRegex = "/^mimetype(application\/vnd\.oasis\.opendocument\.$types)/";
-
-               $openxmlRegex = "/^\[Content_Types\].xml/";
-
-               if ( preg_match( $opendocRegex, substr( $header, 30 ), $matches ) ) {
-                       $mime = $matches[1];
-                       wfDebug( __METHOD__ . ": detected $mime from ZIP archive\n" );
-               } elseif ( preg_match( $openxmlRegex, substr( $header, 30 ) ) ) {
-                       $mime = "application/x-opc+zip";
-                       # TODO: remove the block below, as soon as improveTypeFromExtension is used everywhere
-                       if ( $ext !== true && $ext !== false ) {
-                               /** This is the mode used by getPropsFromPath
-                                * These MIME's are stored in the database, where we don't really want
-                                * x-opc+zip, because we use it only for internal purposes
-                                */
-                               if ( $this->isMatchingExtension( $ext, $mime ) ) {
-                                       /* A known file extension for an OPC file,
-                                        * find the proper mime type for that file extension
-                                        */
-                                       $mime = $this->guessTypesForExtension( $ext );
-                               } else {
-                                       $mime = "application/zip";
-                               }
-                       }
-                       wfDebug( __METHOD__ . ": detected an Open Packaging Conventions archive: $mime\n" );
-               } elseif ( substr( $header, 0, 8 ) == "\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" &&
-                               ( $headerpos = strpos( $tail, "PK\x03\x04" ) ) !== false &&
-                               preg_match( $openxmlRegex, substr( $tail, $headerpos + 30 ) ) ) {
-                       if ( substr( $header, 512, 4 ) == "\xEC\xA5\xC1\x00" ) {
-                               $mime = "application/msword";
-                       }
-                       switch ( substr( $header, 512, 6 ) ) {
-                               case "\xEC\xA5\xC1\x00\x0E\x00":
-                               case "\xEC\xA5\xC1\x00\x1C\x00":
-                               case "\xEC\xA5\xC1\x00\x43\x00":
-                                       $mime = "application/vnd.ms-powerpoint";
-                                       break;
-                               case "\xFD\xFF\xFF\xFF\x10\x00":
-                               case "\xFD\xFF\xFF\xFF\x1F\x00":
-                               case "\xFD\xFF\xFF\xFF\x22\x00":
-                               case "\xFD\xFF\xFF\xFF\x23\x00":
-                               case "\xFD\xFF\xFF\xFF\x28\x00":
-                               case "\xFD\xFF\xFF\xFF\x29\x00":
-                               case "\xFD\xFF\xFF\xFF\x10\x02":
-                               case "\xFD\xFF\xFF\xFF\x1F\x02":
-                               case "\xFD\xFF\xFF\xFF\x22\x02":
-                               case "\xFD\xFF\xFF\xFF\x23\x02":
-                               case "\xFD\xFF\xFF\xFF\x28\x02":
-                               case "\xFD\xFF\xFF\xFF\x29\x02":
-                                       $mime = "application/vnd.msexcel";
-                                       break;
-                       }
-
-                       wfDebug( __METHOD__ . ": detected a MS Office document with OPC trailer\n" );
-               } else {
-                       wfDebug( __METHOD__ . ": unable to identify type of ZIP archive\n" );
-               }
-               return $mime;
-       }
-
-       /**
-        * Internal MIME type detection. Detection is done using an external
-        * program, if $wgMimeDetectorCommand is set. Otherwise, the fileinfo
-        * extension is tried if it is available. If detection fails and $ext
-        * is not false, the MIME type is guessed from the file extension,
-        * using guessTypesForExtension.
-        *
-        * If the MIME type is still unknown, getimagesize is used to detect the
-        * MIME type if the file is an image. If no MIME type can be determined,
-        * this function returns 'unknown/unknown'.
-        *
-        * @param string $file The file to check
-        * @param string|bool $ext The file extension, or true (default) to extract it from the filename.
-        *   Set it to false to ignore the extension. DEPRECATED! Set to false, use
-        *   improveTypeFromExtension($mime, $ext) later to improve MIME type.
-        *
-        * @return string The MIME type of $file
-        */
-       private function detectMimeType( $file, $ext = true ) {
-               /** @todo Make $ext default to false. Or better, remove it. */
-               if ( $ext ) {
-                       wfDebug( __METHOD__ . ": WARNING: use of the \$ext parameter is deprecated. "
-                               . "Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
-               }
-
-               $mimeDetectorCommand = $this->mConfig->get( 'MimeDetectorCommand' );
-               $m = null;
-               if ( $mimeDetectorCommand ) {
-                       $args = wfEscapeShellArg( $file );
-                       $m = wfShellExec( "$mimeDetectorCommand $args" );
-               } elseif ( function_exists( "finfo_open" ) && function_exists( "finfo_file" ) ) {
-                       $mime_magic_resource = finfo_open( FILEINFO_MIME );
-
-                       if ( $mime_magic_resource ) {
-                               $m = finfo_file( $mime_magic_resource, $file );
-                               finfo_close( $mime_magic_resource );
-                       } else {
-                               wfDebug( __METHOD__ . ": finfo_open failed on " . FILEINFO_MIME . "!\n" );
-                       }
-               } else {
-                       wfDebug( __METHOD__ . ": no magic mime detector found!\n" );
-               }
-
-               if ( $m ) {
-                       # normalize
-                       $m = preg_replace( '![;, ].*$!', '', $m ); # strip charset, etc
-                       $m = trim( $m );
-                       $m = strtolower( $m );
-
-                       if ( strpos( $m, 'unknown' ) !== false ) {
-                               $m = null;
-                       } else {
-                               wfDebug( __METHOD__ . ": magic mime type of $file: $m\n" );
-                               return $m;
-                       }
-               }
-
-               // If desired, look at extension as a fallback.
-               if ( $ext === true ) {
-                       $i = strrpos( $file, '.' );
-                       $ext = strtolower( $i ? substr( $file, $i + 1 ) : '' );
-               }
-               if ( $ext ) {
-                       if ( $this->isRecognizableExtension( $ext ) ) {
-                               wfDebug( __METHOD__ . ": refusing to guess mime type for .$ext file, "
-                                       . "we should have recognized it\n" );
-                       } else {
-                               $m = $this->guessTypesForExtension( $ext );
-                               if ( $m ) {
-                                       wfDebug( __METHOD__ . ": extension mime type of $file: $m\n" );
-                                       return $m;
-                               }
-                       }
-               }
-
-               // Unknown type
-               wfDebug( __METHOD__ . ": failed to guess mime type for $file!\n" );
-               return 'unknown/unknown';
-       }
-
-       /**
-        * Determine the media type code for a file, using its MIME type, name and
-        * possibly its contents.
-        *
-        * This function relies on the findMediaType(), mapping extensions and MIME
-        * types to media types.
-        *
-        * @todo analyse file if need be
-        * @todo look at multiple extension, separately and together.
-        *
-        * @param string $path Full path to the image file, in case we have to look at the contents
-        *        (if null, only the MIME type is used to determine the media type code).
-        * @param string $mime MIME type. If null it will be guessed using guessMimeType.
-        *
-        * @return string A value to be used with the MEDIATYPE_xxx constants.
-        */
-       function getMediaType( $path = null, $mime = null ) {
-               if ( !$mime && !$path ) {
-                       return MEDIATYPE_UNKNOWN;
-               }
-
-               // If MIME type is unknown, guess it
-               if ( !$mime ) {
-                       $mime = $this->guessMimeType( $path, false );
-               }
-
-               // Special code for ogg - detect if it's video (theora),
-               // else label it as sound.
-               if ( $mime == 'application/ogg' && file_exists( $path ) ) {
-
-                       // Read a chunk of the file
-                       $f = fopen( $path, "rt" );
-                       if ( !$f ) {
-                               return MEDIATYPE_UNKNOWN;
-                       }
-                       $head = fread( $f, 256 );
-                       fclose( $f );
-
-                       $head = str_replace( 'ffmpeg2theora', '', strtolower( $head ) );
-
-                       // This is an UGLY HACK, file should be parsed correctly
-                       if ( strpos( $head, 'theora' ) !== false ) {
-                               return MEDIATYPE_VIDEO;
-                       } elseif ( strpos( $head, 'vorbis' ) !== false ) {
-                               return MEDIATYPE_AUDIO;
-                       } elseif ( strpos( $head, 'flac' ) !== false ) {
-                               return MEDIATYPE_AUDIO;
-                       } elseif ( strpos( $head, 'speex' ) !== false ) {
-                               return MEDIATYPE_AUDIO;
-                       } else {
-                               return MEDIATYPE_MULTIMEDIA;
-                       }
-               }
-
-               // Check for entry for full MIME type
-               if ( $mime ) {
-                       $type = $this->findMediaType( $mime );
-                       if ( $type !== MEDIATYPE_UNKNOWN ) {
-                               return $type;
-                       }
-               }
-
-               // Check for entry for file extension
-               if ( $path ) {
-                       $i = strrpos( $path, '.' );
-                       $e = strtolower( $i ? substr( $path, $i + 1 ) : '' );
-
-                       // TODO: look at multi-extension if this fails, parse from full path
-                       $type = $this->findMediaType( '.' . $e );
-                       if ( $type !== MEDIATYPE_UNKNOWN ) {
-                               return $type;
-                       }
-               }
-
-               // Check major MIME type
-               if ( $mime ) {
-                       $i = strpos( $mime, '/' );
-                       if ( $i !== false ) {
-                               $major = substr( $mime, 0, $i );
-                               $type = $this->findMediaType( $major );
-                               if ( $type !== MEDIATYPE_UNKNOWN ) {
-                                       return $type;
-                               }
-                       }
-               }
+                                       // Some strings by reference for performance - assuming well-behaved hooks
+                                       Hooks::run(
+                                               'MimeMagicGuessFromContent',
+                                               [ $mimeAnalyzer, &$head, &$tail, $file, &$mime ]
+                                       );
+                               },
+                       'extCallback' => function ( $mimeAnalyzer, $ext, &$mime ) {
+                               // Media handling extensions can improve the MIME detected
+                               Hooks::run( 'MimeMagicImproveFromExtension', [ $mimeAnalyzer, $ext, &$mime ] );
+                       },
+                       'initCallback' => function ( $mimeAnalyzer ) {
+                               // Allow media handling extensions adding MIME-types and MIME-info
+                               Hooks::run( 'MimeMagicInit', [ $mimeAnalyzer ] );
+                       },
+                       'logger' => $logger
+               ];
 
-               if ( !$type ) {
-                       $type = MEDIATYPE_UNKNOWN;
+               if ( $params['infoFile'] === 'includes/mime.info' ) {
+                       $params['infoFile'] = __DIR__ . "/libs/mime/mime.info";
                }
 
-               return $type;
-       }
-
-       /**
-        * Returns a media code matching the given MIME type or file extension.
-        * File extensions are represented by a string starting with a dot (.) to
-        * distinguish them from MIME types.
-        *
-        * This function relies on the mapping defined by $this->mMediaTypes
-        * @access private
-        * @param string $extMime
-        * @return int|string
-        */
-       function findMediaType( $extMime ) {
-               if ( strpos( $extMime, '.' ) === 0 ) {
-                       // If it's an extension, look up the MIME types
-                       $m = $this->getTypesForExtension( substr( $extMime, 1 ) );
-                       if ( !$m ) {
-                               return MEDIATYPE_UNKNOWN;
-                       }
-
-                       $m = explode( ' ', $m );
-               } else {
-                       // Normalize MIME type
-                       if ( isset( $this->mMimeTypeAliases[$extMime] ) ) {
-                               $extMime = $this->mMimeTypeAliases[$extMime];
-                       }
-
-                       $m = [ $extMime ];
+               if ( $params['typeFile'] === 'includes/mime.types' ) {
+                       $params['typeFile'] = __DIR__ . "/libs/mime/mime.types";
                }
 
-               foreach ( $m as $mime ) {
-                       foreach ( $this->mMediaTypes as $type => $codes ) {
-                               if ( in_array( $mime, $codes, true ) ) {
-                                       return $type;
-                               }
-                       }
+               $detectorCmd = $mainConfig->get( 'MimeDetectorCommand' );
+               if ( $detectorCmd ) {
+                       $params['detectCallback'] = function ( $file ) use ( $detectorCmd ) {
+                               return wfShellExec( "$detectorCmd " . wfEscapeShellArg( $file ) );
+                       };
                }
 
-               return MEDIATYPE_UNKNOWN;
-       }
-
-       /**
-        * Get the MIME types that various versions of Internet Explorer would
-        * detect from a chunk of the content.
-        *
-        * @param string $fileName The file name (unused at present)
-        * @param string $chunk The first 256 bytes of the file
-        * @param string $proposed The MIME type proposed by the server
-        * @return array
-        */
-       public function getIEMimeTypes( $fileName, $chunk, $proposed ) {
-               $ca = $this->getIEContentAnalyzer();
-               return $ca->getRealMimesFromData( $fileName, $chunk, $proposed );
-       }
-
-       /**
-        * Get a cached instance of IEContentAnalyzer
-        *
-        * @return IEContentAnalyzer
-        */
-       protected function getIEContentAnalyzer() {
-               if ( is_null( $this->mIEAnalyzer ) ) {
-                       $this->mIEAnalyzer = new IEContentAnalyzer;
-               }
-               return $this->mIEAnalyzer;
+               return $params;
        }
 }
index d17f234..a8f6f8e 100644 (file)
@@ -131,6 +131,14 @@ class MovePage {
                                ContentHandler::getLocalizedName( $this->oldTitle->getContentModel() ),
                                ContentHandler::getLocalizedName( $this->newTitle->getContentModel() )
                        );
+               } elseif (
+                       !ContentHandler::getForTitle( $this->oldTitle )->canBeUsedOn( $this->newTitle )
+               ) {
+                       $status->fatal(
+                               'content-not-allowed-here',
+                               ContentHandler::getLocalizedName( $this->oldTitle->getContentModel() ),
+                               $this->newTitle->getPrefixedText()
+                       );
                }
 
                // Image-specific checks
@@ -446,7 +454,7 @@ class MovePage {
                        $status = $newpage->doDeleteArticleReal(
                                $overwriteMessage,
                                /* $suppress */ false,
-                               $nt->getArticleId(),
+                               $nt->getArticleID(),
                                /* $commit */ false,
                                $errs,
                                $user
@@ -531,8 +539,8 @@ class MovePage {
                        __METHOD__
                );
 
-               // clean up the old title before reset article id - bug 45348
                if ( !$redirectContent ) {
+                       // Clean up the old title *before* reset article id - bug 45348
                        WikiPage::onArticleDelete( $this->oldTitle );
                }
 
index d9230b0..863a426 100644 (file)
@@ -67,13 +67,6 @@ class OutputPage extends ContextSource {
         */
        public $mBodytext = '';
 
-       /**
-        * Holds the debug lines that will be output as comments in page source if
-        * $wgDebugComments is enabled. See also $wgShowDebug.
-        * @deprecated since 1.20; use MWDebug class instead.
-        */
-       public $mDebugtext = '';
-
        /** @var string Stores contents of "<title>" tag */
        private $mHTMLtitle = '';
 
@@ -1789,7 +1782,9 @@ class OutputPage extends ContextSource {
                }
 
                // Include profiling data
-               $this->setLimitReportData( $parserOutput->getLimitReportData() );
+               if ( !$this->limitReportData ) {
+                       $this->setLimitReportData( $parserOutput->getLimitReportData() );
+               }
 
                // Link flags are ignored for now, but may in the future be
                // used to mark individual language links.
@@ -1938,6 +1933,36 @@ class OutputPage extends ContextSource {
                $this->setCdnMaxage( $this->mCdnMaxage );
        }
 
+       /**
+        * Get TTL in [$minTTL,$maxTTL] in pass it to lowerCdnMaxage()
+        *
+        * This sets and returns $minTTL if $mtime is false or null. Otherwise,
+        * the TTL is higher the older the $mtime timestamp is. Essentially, the
+        * TTL is 90% of the age of the object, subject to the min and max.
+        *
+        * @param string|integer|float|bool|null $mtime Last-Modified timestamp
+        * @param integer $minTTL Mimimum TTL in seconds [default: 1 minute]
+        * @param integer $maxTTL Maximum TTL in seconds [default: $wgSquidMaxage]
+        * @return integer TTL in seconds
+        * @since 1.28
+        */
+       public function adaptCdnTTL( $mtime, $minTTL = 0, $maxTTL = 0 ) {
+               $minTTL = $minTTL ?: IExpiringStore::TTL_MINUTE;
+               $maxTTL = $maxTTL ?: $this->getConfig()->get( 'SquidMaxage' );
+
+               if ( $mtime === null || $mtime === false ) {
+                       return $minTTL; // entity does not exist
+               }
+
+               $age = time() - wfTimestamp( TS_UNIX, $mtime );
+               $adaptiveTTL = max( .9 * $age, $minTTL );
+               $adaptiveTTL = min( $adaptiveTTL, $maxTTL );
+
+               $this->lowerCdnMaxage( (int)$adaptiveTTL );
+
+               return $adaptiveTTL;
+       }
+
        /**
         * Use enableClientCache(false) to force it to send nocache headers
         *
@@ -2222,6 +2247,8 @@ class OutputPage extends ContextSource {
         * @throws MWException
         */
        public function output( $return = false ) {
+               global $wgContLang;
+
                if ( $this->mDoNothing ) {
                        return $return ? '' : null;
                }
@@ -2268,7 +2295,7 @@ class OutputPage extends ContextSource {
                ob_start();
 
                $response->header( 'Content-type: ' . $config->get( 'MimeType' ) . '; charset=UTF-8' );
-               $response->header( 'Content-language: ' . $config->get( 'LanguageCode' ) );
+               $response->header( 'Content-language: ' . $wgContLang->getHtmlCode() );
 
                // Avoid Internet Explorer "compatibility view" in IE 8-10, so that
                // jQuery etc. can work correctly.
@@ -2363,7 +2390,7 @@ class OutputPage extends ContextSource {
         * Output a standard error page
         *
         * showErrorPage( 'titlemsg', 'pagetextmsg' );
-        * showErrorPage( 'titlemsg', 'pagetextmsg', array( 'param1', 'param2' ) );
+        * showErrorPage( 'titlemsg', 'pagetextmsg', [ 'param1', 'param2' ] );
         * showErrorPage( 'titlemsg', $messageObject );
         * showErrorPage( $titleMessageObject, $messageObject );
         *
@@ -2395,10 +2422,14 @@ class OutputPage extends ContextSource {
        /**
         * Output a standard permission error page
         *
-        * @param array $errors Error message keys
+        * @param array $errors Error message keys or [key, param...] arrays
         * @param string $action Action that was denied or null if unknown
         */
        public function showPermissionsErrorPage( array $errors, $action = null ) {
+               foreach ( $errors as $key => $error ) {
+                       $errors[$key] = (array)$error;
+               }
+
                // For some action (read, edit, create and upload), display a "login to do this action"
                // error if all of the following conditions are met:
                // 1. the user is not logged in
@@ -2691,15 +2722,13 @@ class OutputPage extends ContextSource {
                        $exemptStates = [];
                        $moduleStyles = $this->getModuleStyles( /*filter*/ true );
 
-                       // Batch preload getTitleInfo for isKnownEmpty() calls below
-                       $exemptModules = array_filter( $moduleStyles,
-                               function ( $name ) use ( $rl, &$exemptGroups ) {
-                                       $module = $rl->getModule( $name );
-                                       return $module && isset( $exemptGroups[ $module->getGroup() ] );
-                               }
-                       );
-                       ResourceLoaderWikiModule::preloadTitleInfo(
-                               $context, wfGetDB( DB_REPLICA ), $exemptModules );
+                       // Preload getTitleInfo for isKnownEmpty calls below and in ResourceLoaderClientHtml
+                       // Separate user-specific batch for improved cache-hit ratio.
+                       $userBatch = [ 'user.styles', 'user' ];
+                       $siteBatch = array_diff( $moduleStyles, $userBatch );
+                       $dbr = wfGetDB( DB_REPLICA );
+                       ResourceLoaderWikiModule::preloadTitleInfo( $context, $dbr, $siteBatch );
+                       ResourceLoaderWikiModule::preloadTitleInfo( $context, $dbr, $userBatch );
 
                        // Filter out modules handled by buildExemptModules()
                        $moduleStyles = array_filter( $moduleStyles,
@@ -2726,12 +2755,17 @@ class OutputPage extends ContextSource {
                        );
                        $this->rlExemptStyleModules = $exemptGroups;
 
-                       // Manually handled by getBottomScripts()
-                       $userModule = $rl->getModule( 'user' );
-                       $userState = $userModule->isKnownEmpty( $context ) && !$this->isUserJsPreview()
-                               ? 'ready'
-                               : 'loading';
-                       $this->rlUserModuleState = $exemptStates['user'] = $userState;
+                       $isUserModuleFiltered = !$this->filterModules( [ 'user' ] );
+                       // If this page filters out 'user', makeResourceLoaderLink will drop it.
+                       // Avoid indefinite "loading" state or untrue "ready" state (T145368).
+                       if ( !$isUserModuleFiltered ) {
+                               // Manually handled by getBottomScripts()
+                               $userModule = $rl->getModule( 'user' );
+                               $userState = $userModule->isKnownEmpty( $context ) && !$this->isUserJsPreview()
+                                       ? 'ready'
+                                       : 'loading';
+                               $this->rlUserModuleState = $exemptStates['user'] = $userState;
+                       }
 
                        $rlClient = new ResourceLoaderClientHtml( $context, $this->getTarget() );
                        $rlClient->setConfig( $this->getJSVars() );
@@ -2929,12 +2963,14 @@ class OutputPage extends ContextSource {
                        }
                }
 
-               $chunks[] = ResourceLoader::makeInlineScript(
-                       ResourceLoader::makeConfigSetScript(
-                               [ 'wgPageParseReport' => $this->limitReportData ],
-                               true
-                       )
-               );
+               if ( $this->limitReportData ) {
+                       $chunks[] = ResourceLoader::makeInlineScript(
+                               ResourceLoader::makeConfigSetScript(
+                                       [ 'wgPageParseReport' => $this->limitReportData ],
+                                       true
+                               )
+                       );
+               }
 
                return self::combineWrappedStrings( $chunks );
        }
@@ -3052,8 +3088,8 @@ class OutputPage extends ContextSource {
                if ( $user->isLoggedIn() ) {
                        $vars['wgUserId'] = $user->getId();
                        $vars['wgUserEditCount'] = $user->getEditCount();
-                       $userReg = wfTimestampOrNull( TS_UNIX, $user->getRegistration() );
-                       $vars['wgUserRegistration'] = $userReg !== null ? ( $userReg * 1000 ) : null;
+                       $userReg = $user->getRegistration();
+                       $vars['wgUserRegistration'] = $userReg ? wfTimestamp( TS_UNIX, $userReg ) * 1000 : null;
                        // Get the revision ID of the oldest new message on the user's talk
                        // page. This can be used for constructing new message alerts on
                        // the client side.
index 018c6f8..656ba43 100644 (file)
@@ -30,7 +30,7 @@
  * version are hardcoded here
  */
 function wfEntryPointCheck( $entryPoint ) {
-       $mwVersion = '1.28';
+       $mwVersion = '1.29';
        $minimumVersionPHP = '5.5.9';
        $phpVersion = PHP_VERSION;
 
index ed06935..d09e1fb 100644 (file)
@@ -19,6 +19,7 @@
  *
  * @file
  */
+use Wikimedia\ScopedCallback;
 
 /**
  * Gives access to properties of a page.
index 49e596d..f6c4147 100644 (file)
@@ -57,35 +57,55 @@ abstract class PrefixSearch {
                if ( $search == '' ) {
                        return []; // Return empty result
                }
-               $namespaces = $this->validateNamespaces( $namespaces );
-
-               // Find a Title which is not an interwiki and is in NS_MAIN
-               $title = Title::newFromText( $search );
-               if ( $title && !$title->isExternal() ) {
-                       $ns = [ $title->getNamespace() ];
-                       $search = $title->getText();
-                       if ( $ns[0] == NS_MAIN ) {
-                               $ns = $namespaces; // no explicit prefix, use default namespaces
-                               Hooks::run( 'PrefixSearchExtractNamespace', [ &$ns, &$search ] );
-                       }
-                       return $this->searchBackend( $ns, $search, $limit, $offset );
-               }
 
-               // Is this a namespace prefix?
-               $title = Title::newFromText( $search . 'Dummy' );
-               if ( $title && $title->getText() == 'Dummy'
-                       && $title->getNamespace() != NS_MAIN
-                       && !$title->isExternal() )
-               {
-                       $namespaces = [ $title->getNamespace() ];
-                       $search = '';
+               $hasNamespace = $this->extractNamespace( $search );
+               if ( $hasNamespace ) {
+                       list( $namespace, $search ) = $hasNamespace;
+                       $namespaces = [ $namespace ];
                } else {
+                       $namespaces = $this->validateNamespaces( $namespaces );
                        Hooks::run( 'PrefixSearchExtractNamespace', [ &$namespaces, &$search ] );
                }
 
                return $this->searchBackend( $namespaces, $search, $limit, $offset );
        }
 
+       /**
+        * Figure out if given input contains an explicit namespace.
+        *
+        * @param string $input
+        * @return false|array Array of namespace and remaining text, or false if no namespace given.
+        */
+       protected function extractNamespace( $input ) {
+               if ( strpos( $input, ':' ) === false ) {
+                       return false;
+               }
+
+               // Namespace prefix only
+               $title = Title::newFromText( $input . 'Dummy' );
+               if (
+                       $title &&
+                       $title->getText() === 'Dummy' &&
+                       !$title->inNamespace( NS_MAIN ) &&
+                       !$title->isExternal()
+               ) {
+                       return [ $title->getNamespace(), '' ];
+               }
+
+               // Namespace prefix with additional input
+               $title = Title::newFromText( $input );
+               if (
+                       $title &&
+                       !$title->inNamespace( NS_MAIN ) &&
+                       !$title->isExternal()
+               ) {
+                       // getText provides correct capitalization
+                       return [ $title->getNamespace(), $title->getText() ];
+               }
+
+               return false;
+       }
+
        /**
         * Do a prefix search for all possible variants of the prefix
         * @param string $search
@@ -162,12 +182,20 @@ abstract class PrefixSearch {
                ) ) {
                        return $this->titles( $this->defaultSearchBackend( $namespaces, $search, $limit, $offset ) );
                }
-               return $this->strings( $this->handleResultFromHook( $srchres, $namespaces, $search, $limit ) );
+               return $this->strings(
+                       $this->handleResultFromHook( $srchres, $namespaces, $search, $limit, $offset ) );
        }
 
-       private function handleResultFromHook( $srchres, $namespaces, $search, $limit ) {
-               $rescorer = new SearchExactMatchRescorer();
-               return $rescorer->rescore( $search, $namespaces, $srchres, $limit );
+       private function handleResultFromHook( $srchres, $namespaces, $search, $limit, $offset ) {
+               if ( $offset === 0 ) {
+                       // Only perform exact db match if offset === 0
+                       // This is still far from perfect but at least we avoid returning the
+                       // same title afain and again when the user is scrolling with a query
+                       // that matches a title in the db.
+                       $rescorer = new SearchExactMatchRescorer();
+                       $srchres = $rescorer->rescore( $search, $namespaces, $srchres, $limit );
+               }
+               return $srchres;
        }
 
        /**
@@ -254,43 +282,60 @@ abstract class PrefixSearch {
         * be automatically capitalized by Title::secureAndSpit()
         * later on depending on $wgCapitalLinks)
         *
-        * @param array $namespaces Namespaces to search in
+        * @param array|null $namespaces Namespaces to search in
         * @param string $search Term
         * @param int $limit Max number of items to return
         * @param int $offset Number of items to skip
-        * @return array Array of Title objects
+        * @return Title[] Array of Title objects
         */
        public function defaultSearchBackend( $namespaces, $search, $limit, $offset ) {
-               $ns = array_shift( $namespaces ); // support only one namespace
-               if ( is_null( $ns ) || in_array( NS_MAIN, $namespaces ) ) {
-                       $ns = NS_MAIN; // if searching on many always default to main
+               // Backwards compatability with old code. Default to NS_MAIN if no namespaces provided.
+               if ( $namespaces === null ) {
+                       $namespaces = [];
                }
+               if ( !$namespaces ) {
+                       $namespaces[] = NS_MAIN;
+               }
+
+               // Construct suitable prefix for each namespace. They differ in cases where
+               // some namespaces always capitalize and some don't.
+               $prefixes = [];
+               foreach ( $namespaces as $namespace ) {
+                       // For now, if special is included, ignore the other namespaces
+                       if ( $namespace == NS_SPECIAL ) {
+                               return $this->specialSearch( $search, $limit, $offset );
+                       }
 
-               if ( $ns == NS_SPECIAL ) {
-                       return $this->specialSearch( $search, $limit, $offset );
+                       $title = Title::makeTitleSafe( $namespace, $search );
+                       // Why does the prefix default to empty?
+                       $prefix = $title ? $title->getDBkey() : '';
+                       $prefixes[$prefix][] = $namespace;
                }
 
-               $t = Title::newFromText( $search, $ns );
-               $prefix = $t ? $t->getDBkey() : '';
                $dbr = wfGetDB( DB_REPLICA );
-               $res = $dbr->select( 'page',
-                       [ 'page_id', 'page_namespace', 'page_title' ],
-                       [
-                               'page_namespace' => $ns,
-                               'page_title ' . $dbr->buildLike( $prefix, $dbr->anyString() )
-                       ],
-                       __METHOD__,
-                       [
-                               'LIMIT' => $limit,
-                               'ORDER BY' => 'page_title',
-                               'OFFSET' => $offset
-                       ]
-               );
-               $srchres = [];
-               foreach ( $res as $row ) {
-                       $srchres[] = Title::newFromRow( $row );
+               // Often there is only one prefix that applies to all requested namespaces,
+               // but sometimes there are two if some namespaces do not always capitalize.
+               $conds = [];
+               foreach ( $prefixes as $prefix => $namespaces ) {
+                       $condition = [
+                               'page_namespace' => $namespaces,
+                               'page_title' . $dbr->buildLike( $prefix, $dbr->anyString() ),
+                       ];
+                       $conds[] = $dbr->makeList( $condition, LIST_AND );
                }
-               return $srchres;
+
+               $table = 'page';
+               $fields = [ 'page_id', 'page_namespace', 'page_title' ];
+               $conds = $dbr->makeList( $conds, LIST_OR );
+               $options = [
+                       'LIMIT' => $limit,
+                       'ORDER BY' => [ 'page_title', 'page_namespace' ],
+                       'OFFSET' => $offset
+               ];
+
+               $res = $dbr->select( $table, $fields, $conds, __METHOD__, $options );
+
+               return iterator_to_array( TitleArray::newFromResult( $res ) );
        }
 
        /**
diff --git a/includes/ProxyLookup.php b/includes/ProxyLookup.php
new file mode 100644 (file)
index 0000000..3a3243a
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+use IPSet\IPSet;
+
+/**
+ * @since 1.28
+ */
+class ProxyLookup {
+
+       /**
+        * @var string[]
+        */
+       private $proxyServers;
+
+       /**
+        * @var string[]
+        */
+       private $proxyServersComplex;
+
+       /**
+        * @var IPSet|null
+        */
+       private $proxyIPSet;
+
+       /**
+        * @param string[] $proxyServers Simple list of IPs
+        * @param string[] $proxyServersComplex Complex list of IPs/ranges
+        */
+       public function __construct( $proxyServers, $proxyServersComplex ) {
+               $this->proxyServers = $proxyServers;
+               $this->proxyServersComplex = $proxyServersComplex;
+       }
+
+       /**
+        * Checks if an IP matches a proxy we've configured
+        *
+        * @param string $ip
+        * @return bool
+        */
+       public function isConfiguredProxy( $ip ) {
+               // Quick check of known singular proxy servers
+               if ( in_array( $ip, $this->proxyServers ) ) {
+                       return true;
+               }
+
+               // Check against addresses and CIDR nets in the complex list
+               if ( !$this->proxyIPSet ) {
+                       $this->proxyIPSet = new IPSet( $this->proxyServersComplex );
+               }
+               return $this->proxyIPSet->match( $ip );
+       }
+
+       /**
+        * Checks if an IP is a trusted proxy provider.
+        * Useful to tell if X-Forwarded-For data is possibly bogus.
+        * CDN cache servers for the site are whitelisted.
+        *
+        * @param string $ip
+        * @return bool
+        */
+       public function isTrustedProxy( $ip ) {
+               $trusted = $this->isConfiguredProxy( $ip );
+               Hooks::run( 'IsTrustedProxy', [ &$ip, &$trusted ] );
+               return $trusted;
+       }
+}
index 6acc528..b812191 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  */
 use MediaWiki\Linker\LinkTarget;
+use MediaWiki\MediaWikiServices;
 
 /**
  * @todo document
@@ -86,6 +87,7 @@ class Revision implements IDBAccessObject {
        const DELETED_USER = 4;
        const DELETED_RESTRICTED = 8;
        const SUPPRESSED_USER = 12; // convenience
+       const SUPPRESSED_ALL = 15; // convenience
 
        // Audience options for accessors
        const FOR_PUBLIC = 1;
@@ -1046,11 +1048,10 @@ class Revision implements IDBAccessObject {
         *   to the $audience parameter
         *
         * @deprecated since 1.21, use getContent() instead
-        * @todo Replace usage in core
         * @return string
         */
        public function getText( $audience = self::FOR_PUBLIC, User $user = null ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
 
                $content = $this->getContent( $audience, $user );
                return ContentHandler::getContentText( $content ); # returns the raw content text, if applicable
@@ -1396,6 +1397,11 @@ class Revision implements IDBAccessObject {
        public function insertOn( $dbw ) {
                global $wgDefaultExternalStore, $wgContentHandlerUseDB;
 
+               // We're inserting a new revision, so we have to use master anyway.
+               // If it's a null revision, it may have references to rows that
+               // are not in the replica yet (the text row).
+               $this->mQueryFlags |= self::READ_LATEST;
+
                // Not allowed to have rev_page equal to 0, false, etc.
                if ( !$this->mPage ) {
                        $title = $this->getTitle();
@@ -1898,7 +1904,7 @@ class Revision implements IDBAccessObject {
         * @since 1.28
         */
        public static function newKnownCurrent( IDatabase $db, $pageId, $revId ) {
-               $cache = ObjectCache::getMainWANInstance();
+               $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
                return $cache->getWithSetCallback(
                        // Page/rev IDs passed in from DB to reflect history merges
                        $cache->makeGlobalKey( 'revision', $db->getWikiID(), $pageId, $revId ),
index 8f1fc99..4069658 100644 (file)
@@ -1015,6 +1015,7 @@ class Sanitizer {
                                | url\s*\(
                                | image\s*\(
                                | image-set\s*\(
+                               | attr\s*\([^)]+[\s,]+url
                        !ix', $value ) ) {
                        return '/* insecure input */';
                }
@@ -1867,7 +1868,7 @@ class Sanitizer {
                        list( /* $whole */, $protocol, $host, $rest ) = $matches;
 
                        // Characters that will be ignored in IDNs.
-                       // http://tools.ietf.org/html/3454#section-3.1
+                       // https://tools.ietf.org/html/rfc3454#section-3.1
                        // Strip them before further processing so blacklists and such work.
                        $strip = "/
                                \\s|          # general whitespace
index 8734bd6..a071ff7 100644 (file)
 
 use MediaWiki\Interwiki\ClassicInterwikiLookup;
 use MediaWiki\Linker\LinkRendererFactory;
+use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
 
 return [
        'DBLoadBalancerFactory' => function( MediaWikiServices $services ) {
-               $config = $services->getMainConfig()->get( 'LBFactoryConf' );
+               $mainConfig = $services->getMainConfig();
 
-               $class = LBFactory::getLBFactoryClass( $config );
-               if ( !isset( $config['readOnlyReason'] ) ) {
-                       // TODO: replace the global wfConfiguredReadOnlyReason() with a service.
-                       $config['readOnlyReason'] = wfConfiguredReadOnlyReason();
-               }
+               $lbConf = MWLBFactory::applyDefaultConfig(
+                       $mainConfig->get( 'LBFactoryConf' ),
+                       $mainConfig
+               );
+               $class = MWLBFactory::getLBFactoryClass( $lbConf );
 
-               return new $class( $config );
+               return new $class( $lbConf );
        },
 
        'DBLoadBalancer' => function( MediaWikiServices $services ) {
@@ -158,12 +159,77 @@ return [
                return new WatchedItemQueryService( $services->getDBLoadBalancer() );
        },
 
+       'CryptRand' => function( MediaWikiServices $services ) {
+               $secretKey = $services->getMainConfig()->get( 'SecretKey' );
+               return new CryptRand(
+                       [
+                               // To try vary the system information of the state a bit more
+                               // by including the system's hostname into the state
+                               'wfHostname',
+                               // It's mostly worthless but throw the wiki's id into the data
+                               // for a little more variance
+                               'wfWikiID',
+                               // If we have a secret key set then throw it into the state as well
+                               function() use ( $secretKey ) {
+                                       return $secretKey ?: '';
+                               }
+                       ],
+                       // The config file is likely the most often edited file we know should
+                       // be around so include its stat info into the state.
+                       // The constant with its location will almost always be defined, as
+                       // WebStart.php defines MW_CONFIG_FILE to $IP/LocalSettings.php unless
+                       // being configured with MW_CONFIG_CALLBACK (e.g. the installer).
+                       defined( 'MW_CONFIG_FILE' ) ? [ MW_CONFIG_FILE ] : [],
+                       LoggerFactory::getInstance( 'CryptRand' )
+               );
+       },
+
+       'CryptHKDF' => function( MediaWikiServices $services ) {
+               $config = $services->getMainConfig();
+
+               $secret = $config->get( 'HKDFSecret' ) ?: $config->get( 'SecretKey' );
+               if ( !$secret ) {
+                       throw new RuntimeException( "Cannot use MWCryptHKDF without a secret." );
+               }
+
+               // In HKDF, the context can be known to the attacker, but this will
+               // keep simultaneous runs from producing the same output.
+               $context = [ microtime(), getmypid(), gethostname() ];
+
+               // Setup salt cache. Use APC, or fallback to the main cache if it isn't setup
+               $cache = $services->getLocalServerObjectCache();
+               if ( $cache instanceof EmptyBagOStuff ) {
+                       $cache = ObjectCache::getLocalClusterInstance();
+               }
+
+               return new CryptHKDF( $secret, $config->get( 'HKDFAlgorithm' ),
+                       $cache, $context, $services->getCryptRand()
+               );
+       },
+
        'MediaHandlerFactory' => function( MediaWikiServices $services ) {
                return new MediaHandlerFactory(
                        $services->getMainConfig()->get( 'MediaHandlers' )
                );
        },
 
+       'MimeAnalyzer' => function( MediaWikiServices $services ) {
+               return new MimeMagic(
+                       MimeMagic::applyDefaultParameters(
+                               [],
+                               $services->getMainConfig()
+                       )
+               );
+       },
+
+       'ProxyLookup' => function( MediaWikiServices $services ) {
+               $mainConfig = $services->getMainConfig();
+               return new ProxyLookup(
+                       $mainConfig->get( 'SquidServers' ),
+                       $mainConfig->get( 'SquidServersNoPurge' )
+               );
+       },
+
        'LinkCache' => function( MediaWikiServices $services ) {
                return new LinkCache(
                        $services->getTitleFormatter(),
@@ -210,6 +276,61 @@ return [
                return $services->getService( '_MediaWikiTitleCodec' );
        },
 
+       'MainObjectStash' => function( MediaWikiServices $services ) {
+               $mainConfig = $services->getMainConfig();
+
+               $id = $mainConfig->get( 'MainStash' );
+               if ( !isset( $mainConfig->get( 'ObjectCaches' )[$id] ) ) {
+                       throw new UnexpectedValueException(
+                               "Cache type \"$id\" is not present in \$wgObjectCaches." );
+               }
+
+               return \ObjectCache::newFromParams( $mainConfig->get( 'ObjectCaches' )[$id] );
+       },
+
+       'MainWANObjectCache' => function( MediaWikiServices $services ) {
+               $mainConfig = $services->getMainConfig();
+
+               $id = $mainConfig->get( 'MainWANCache' );
+               if ( !isset( $mainConfig->get( 'WANObjectCaches' )[$id] ) ) {
+                       throw new UnexpectedValueException(
+                               "WAN cache type \"$id\" is not present in \$wgWANObjectCaches." );
+               }
+
+               $params = $mainConfig->get( 'WANObjectCaches' )[$id];
+               $objectCacheId = $params['cacheId'];
+               if ( !isset( $mainConfig->get( 'ObjectCaches' )[$objectCacheId] ) ) {
+                       throw new UnexpectedValueException(
+                               "Cache type \"$objectCacheId\" is not present in \$wgObjectCaches." );
+               }
+               $params['store'] = $mainConfig->get( 'ObjectCaches' )[$objectCacheId];
+
+               return \ObjectCache::newWANCacheFromParams( $params );
+       },
+
+       'LocalServerObjectCache' => function( MediaWikiServices $services ) {
+               $mainConfig = $services->getMainConfig();
+
+               if ( function_exists( 'apc_fetch' ) ) {
+                       $id = 'apc';
+               } elseif ( function_exists( 'apcu_fetch' ) ) {
+                       $id = 'apcu';
+               } elseif ( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) {
+                       $id = 'xcache';
+               } elseif ( function_exists( 'wincache_ucache_get' ) ) {
+                       $id = 'wincache';
+               } else {
+                       $id = CACHE_NONE;
+               }
+
+               if ( !isset( $mainConfig->get( 'ObjectCaches' )[$id] ) ) {
+                       throw new UnexpectedValueException(
+                               "Cache type \"$id\" is not present in \$wgObjectCaches." );
+               }
+
+               return \ObjectCache::newFromParams( $mainConfig->get( 'ObjectCaches' )[$id] );
+       },
+
        'VirtualRESTServiceClient' => function( MediaWikiServices $services ) {
                $config = $services->getMainConfig()->get( 'VirtualRestConfig' );
 
diff --git a/includes/Services/CannotReplaceActiveServiceException.php b/includes/Services/CannotReplaceActiveServiceException.php
deleted file mode 100644 (file)
index 4993073..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-namespace MediaWiki\Services;
-
-use Exception;
-use RuntimeException;
-
-/**
- * Exception thrown when trying to replace an already active service.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- *
- * @since 1.27
- */
-
-/**
- * Exception thrown when trying to replace an already active service.
- */
-class CannotReplaceActiveServiceException extends RuntimeException {
-
-       /**
-        * @param string $serviceName
-        * @param Exception|null $previous
-        */
-       public function __construct( $serviceName, Exception $previous = null ) {
-               parent::__construct( "Cannot replace an active service: $serviceName", 0, $previous );
-       }
-
-}
diff --git a/includes/Services/ContainerDisabledException.php b/includes/Services/ContainerDisabledException.php
deleted file mode 100644 (file)
index ede076d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-namespace MediaWiki\Services;
-
-use Exception;
-use RuntimeException;
-
-/**
- * Exception thrown when trying to access a service on a disabled container or factory.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- *
- * @since 1.27
- */
-
-/**
- * Exception thrown when trying to access a service on a disabled container or factory.
- */
-class ContainerDisabledException extends RuntimeException {
-
-       /**
-        * @param Exception|null $previous
-        */
-       public function __construct( Exception $previous = null ) {
-               parent::__construct( 'Container disabled!', 0, $previous );
-       }
-
-}
diff --git a/includes/Services/DestructibleService.php b/includes/Services/DestructibleService.php
deleted file mode 100644 (file)
index 6ce9af2..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-namespace MediaWiki\Services;
-
-/**
- * Interface for destructible services.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- *
- * @since 1.27
- */
-
-/**
- * DestructibleService defines a standard interface for shutting down a service instance.
- * The intended use is for a service container to be able to shut down services that should
- * no longer be used, and allow such services to release any system resources.
- *
- * @note There is no expectation that services will be destroyed when the process (or web request)
- * terminates.
- */
-interface DestructibleService {
-
-       /**
-        * Notifies the service object that it should expect to no longer be used, and should release
-        * any system resources it may own. The behavior of all service methods becomes undefined after
-        * destroy() has been called. It is recommended that implementing classes should throw an
-        * exception when service methods are accessed after destroy() has been called.
-        */
-       public function destroy();
-
-}
diff --git a/includes/Services/NoSuchServiceException.php b/includes/Services/NoSuchServiceException.php
deleted file mode 100644 (file)
index 36e50d2..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-namespace MediaWiki\Services;
-
-use Exception;
-use RuntimeException;
-
-/**
- * Exception thrown when the requested service is not known.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- *
- * @since 1.27
- */
-
-/**
- * Exception thrown when the requested service is not known.
- */
-class NoSuchServiceException extends RuntimeException {
-
-       /**
-        * @param string $serviceName
-        * @param Exception|null $previous
-        */
-       public function __construct( $serviceName, Exception $previous = null ) {
-               parent::__construct( "No such service: $serviceName", 0, $previous );
-       }
-
-}
diff --git a/includes/Services/SalvageableService.php b/includes/Services/SalvageableService.php
deleted file mode 100644 (file)
index a613050..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-namespace MediaWiki\Services;
-
-/**
- * Interface for salvageable services.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- *
- * @since 1.28
- */
-
-/**
- * SalvageableService defines an interface for services that are able to salvage state from a
- * previous instance of the same class. The intent is to allow new service instances to re-use
- * resources that would be expensive to re-create, such as cached data or network connections.
- *
- * @note There is no expectation that services will be destroyed when the process (or web request)
- * terminates.
- */
-interface SalvageableService {
-
-       /**
-        * Re-uses state from $other. $other must not be used after being passed to salvage(),
-        * and should be considered to be destroyed.
-        *
-        * @note Implementations are responsible for determining what parts of $other can be re-used
-        * safely. In particular, implementations should check that the relevant configuration of
-        * $other is the same as in $this before re-using resources from $other.
-        *
-        * @note Implementations must take care to detach any re-used resources from the original
-        * service instance. If $other is destroyed later, resources that are now used by the
-        * new service instance must not be affected.
-        *
-        * @note If $other is a DestructibleService, implementations should make sure that $other
-        * is in destroyed state after salvage finished. This may be done by calling $other->destroy()
-        * after carefully detaching all relevant resources.
-        *
-        * @param SalvageableService $other The object to salvage state from. $other must have the
-        * exact same type as $this.
-        */
-       public function salvage( SalvageableService $other );
-
-}
diff --git a/includes/Services/ServiceAlreadyDefinedException.php b/includes/Services/ServiceAlreadyDefinedException.php
deleted file mode 100644 (file)
index c6344d3..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-namespace MediaWiki\Services;
-
-use Exception;
-use RuntimeException;
-
-/**
- * Exception thrown when a service was already defined, but the
- * caller expected it to not exist.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- *
- * @since 1.27
- */
-
-/**
- * Exception thrown when a service was already defined, but the
- * caller expected it to not exist.
- */
-class ServiceAlreadyDefinedException extends RuntimeException {
-
-       /**
-        * @param string $serviceName
-        * @param Exception|null $previous
-        */
-       public function __construct( $serviceName, Exception $previous = null ) {
-               parent::__construct( "Service already defined: $serviceName", 0, $previous );
-       }
-
-}
diff --git a/includes/Services/ServiceContainer.php b/includes/Services/ServiceContainer.php
deleted file mode 100644 (file)
index bad0ef9..0000000
+++ /dev/null
@@ -1,378 +0,0 @@
-<?php
-namespace MediaWiki\Services;
-
-use InvalidArgumentException;
-use RuntimeException;
-use Wikimedia\Assert\Assert;
-
-/**
- * Generic service container.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- *
- * @since 1.27
- */
-
-/**
- * ServiceContainer provides a generic service to manage named services using
- * lazy instantiation based on instantiator callback functions.
- *
- * Services managed by an instance of ServiceContainer may or may not implement
- * a common interface.
- *
- * @note When using ServiceContainer to manage a set of services, consider
- * creating a wrapper or a subclass that provides access to the services via
- * getter methods with more meaningful names and more specific return type
- * declarations.
- *
- * @see docs/injection.txt for an overview of using dependency injection in the
- *      MediaWiki code base.
- */
-class ServiceContainer implements DestructibleService {
-
-       /**
-        * @var object[]
-        */
-       private $services = [];
-
-       /**
-        * @var callable[]
-        */
-       private $serviceInstantiators = [];
-
-       /**
-        * @var boolean[] disabled status, per service name
-        */
-       private $disabled = [];
-
-       /**
-        * @var array
-        */
-       private $extraInstantiationParams;
-
-       /**
-        * @var boolean
-        */
-       private $destroyed = false;
-
-       /**
-        * @param array $extraInstantiationParams Any additional parameters to be passed to the
-        * instantiator function when creating a service. This is typically used to provide
-        * access to additional ServiceContainers or Config objects.
-        */
-       public function __construct( array $extraInstantiationParams = [] ) {
-               $this->extraInstantiationParams = $extraInstantiationParams;
-       }
-
-       /**
-        * Destroys all contained service instances that implement the DestructibleService
-        * interface. This will render all services obtained from this MediaWikiServices
-        * instance unusable. In particular, this will disable access to the storage backend
-        * via any of these services. Any future call to getService() will throw an exception.
-        *
-        * @see resetGlobalInstance()
-        */
-       public function destroy() {
-               foreach ( $this->getServiceNames() as $name ) {
-                       $service = $this->peekService( $name );
-                       if ( $service !== null && $service instanceof DestructibleService ) {
-                               $service->destroy();
-                       }
-               }
-
-               $this->destroyed = true;
-       }
-
-       /**
-        * @param array $wiringFiles A list of PHP files to load wiring information from.
-        * Each file is loaded using PHP's include mechanism. Each file is expected to
-        * return an associative array that maps service names to instantiator functions.
-        */
-       public function loadWiringFiles( array $wiringFiles ) {
-               foreach ( $wiringFiles as $file ) {
-                       // the wiring file is required to return an array of instantiators.
-                       $wiring = require $file;
-
-                       Assert::postcondition(
-                               is_array( $wiring ),
-                               "Wiring file $file is expected to return an array!"
-                       );
-
-                       $this->applyWiring( $wiring );
-               }
-       }
-
-       /**
-        * Registers multiple services (aka a "wiring").
-        *
-        * @param array $serviceInstantiators An associative array mapping service names to
-        *        instantiator functions.
-        */
-       public function applyWiring( array $serviceInstantiators ) {
-               Assert::parameterElementType( 'callable', $serviceInstantiators, '$serviceInstantiators' );
-
-               foreach ( $serviceInstantiators as $name => $instantiator ) {
-                       $this->defineService( $name, $instantiator );
-               }
-       }
-
-       /**
-        * Imports all wiring defined in $container. Wiring defined in $container
-        * will override any wiring already defined locally. However, already
-        * existing service instances will be preserved.
-        *
-        * @since 1.28
-        *
-        * @param ServiceContainer $container
-        * @param string[] $skip A list of service names to skip during import
-        */
-       public function importWiring( ServiceContainer $container, $skip = [] ) {
-               $newInstantiators = array_diff_key(
-                       $container->serviceInstantiators,
-                       array_flip( $skip )
-               );
-
-               $this->serviceInstantiators = array_merge(
-                       $this->serviceInstantiators,
-                       $newInstantiators
-               );
-       }
-
-       /**
-        * Returns true if a service is defined for $name, that is, if a call to getService( $name )
-        * would return a service instance.
-        *
-        * @param string $name
-        *
-        * @return bool
-        */
-       public function hasService( $name ) {
-               return isset( $this->serviceInstantiators[$name] );
-       }
-
-       /**
-        * Returns the service instance for $name only if that service has already been instantiated.
-        * This is intended for situations where services get destroyed/cleaned up, so we can
-        * avoid creating a service just to destroy it again.
-        *
-        * @note This is intended for internal use and for test fixtures.
-        * Application logic should use getService() instead.
-        *
-        * @see getService().
-        *
-        * @param string $name
-        *
-        * @return object|null The service instance, or null if the service has not yet been instantiated.
-        * @throws RuntimeException if $name does not refer to a known service.
-        */
-       public function peekService( $name ) {
-               if ( !$this->hasService( $name ) ) {
-                       throw new NoSuchServiceException( $name );
-               }
-
-               return isset( $this->services[$name] ) ? $this->services[$name] : null;
-       }
-
-       /**
-        * @return string[]
-        */
-       public function getServiceNames() {
-               return array_keys( $this->serviceInstantiators );
-       }
-
-       /**
-        * Define a new service. The service must not be known already.
-        *
-        * @see getService().
-        * @see replaceService().
-        *
-        * @param string $name The name of the service to register, for use with getService().
-        * @param callable $instantiator Callback that returns a service instance.
-        *        Will be called with this MediaWikiServices instance as the only parameter.
-        *        Any extra instantiation parameters provided to the constructor will be
-        *        passed as subsequent parameters when invoking the instantiator.
-        *
-        * @throws RuntimeException if there is already a service registered as $name.
-        */
-       public function defineService( $name, callable $instantiator ) {
-               Assert::parameterType( 'string', $name, '$name' );
-
-               if ( $this->hasService( $name ) ) {
-                       throw new ServiceAlreadyDefinedException( $name );
-               }
-
-               $this->serviceInstantiators[$name] = $instantiator;
-       }
-
-       /**
-        * Replace an already defined service.
-        *
-        * @see defineService().
-        *
-        * @note This causes any previously instantiated instance of the service to be discarded.
-        *
-        * @param string $name The name of the service to register.
-        * @param callable $instantiator Callback function that returns a service instance.
-        *        Will be called with this MediaWikiServices instance as the only parameter.
-        *        The instantiator must return a service compatible with the originally defined service.
-        *        Any extra instantiation parameters provided to the constructor will be
-        *        passed as subsequent parameters when invoking the instantiator.
-        *
-        * @throws RuntimeException if $name is not a known service.
-        */
-       public function redefineService( $name, callable $instantiator ) {
-               Assert::parameterType( 'string', $name, '$name' );
-
-               if ( !$this->hasService( $name ) ) {
-                       throw new NoSuchServiceException( $name );
-               }
-
-               if ( isset( $this->services[$name] ) ) {
-                       throw new CannotReplaceActiveServiceException( $name );
-               }
-
-               $this->serviceInstantiators[$name] = $instantiator;
-               unset( $this->disabled[$name] );
-       }
-
-       /**
-        * Disables a service.
-        *
-        * @note Attempts to call getService() for a disabled service will result
-        * in a DisabledServiceException. Calling peekService for a disabled service will
-        * return null. Disabled services are listed by getServiceNames(). A disabled service
-        * can be enabled again using redefineService().
-        *
-        * @note If the service was already active (that is, instantiated) when getting disabled,
-        * and the service instance implements DestructibleService, destroy() is called on the
-        * service instance.
-        *
-        * @see redefineService()
-        * @see resetService()
-        *
-        * @param string $name The name of the service to disable.
-        *
-        * @throws RuntimeException if $name is not a known service.
-        */
-       public function disableService( $name ) {
-               $this->resetService( $name );
-
-               $this->disabled[$name] = true;
-       }
-
-       /**
-        * Resets a service by dropping the service instance.
-        * If the service instances implements DestructibleService, destroy()
-        * is called on the service instance.
-        *
-        * @warning This is generally unsafe! Other services may still retain references
-        * to the stale service instance, leading to failures and inconsistencies. Subclasses
-        * may use this method to reset specific services under specific instances, but
-        * it should not be exposed to application logic.
-        *
-        * @note This is declared final so subclasses can not interfere with the expectations
-        * disableService() has when calling resetService().
-        *
-        * @see redefineService()
-        * @see disableService().
-        *
-        * @param string $name The name of the service to reset.
-        * @param bool $destroy Whether the service instance should be destroyed if it exists.
-        *        When set to false, any existing service instance will effectively be detached
-        *        from the container.
-        *
-        * @throws RuntimeException if $name is not a known service.
-        */
-       final protected function resetService( $name, $destroy = true ) {
-               Assert::parameterType( 'string', $name, '$name' );
-
-               $instance = $this->peekService( $name );
-
-               if ( $destroy && $instance instanceof DestructibleService )  {
-                       $instance->destroy();
-               }
-
-               unset( $this->services[$name] );
-               unset( $this->disabled[$name] );
-       }
-
-       /**
-        * Returns a service object of the kind associated with $name.
-        * Services instances are instantiated lazily, on demand.
-        * This method may or may not return the same service instance
-        * when called multiple times with the same $name.
-        *
-        * @note Rather than calling this method directly, it is recommended to provide
-        * getters with more meaningful names and more specific return types, using
-        * a subclass or wrapper.
-        *
-        * @see redefineService().
-        *
-        * @param string $name The service name
-        *
-        * @throws NoSuchServiceException if $name is not a known service.
-        * @throws ContainerDisabledException if this container has already been destroyed.
-        * @throws ServiceDisabledException if the requested service has been disabled.
-        *
-        * @return object The service instance
-        */
-       public function getService( $name ) {
-               if ( $this->destroyed ) {
-                       throw new ContainerDisabledException();
-               }
-
-               if ( isset( $this->disabled[$name] ) ) {
-                       throw new ServiceDisabledException( $name );
-               }
-
-               if ( !isset( $this->services[$name] ) ) {
-                       $this->services[$name] = $this->createService( $name );
-               }
-
-               return $this->services[$name];
-       }
-
-       /**
-        * @param string $name
-        *
-        * @throws InvalidArgumentException if $name is not a known service.
-        * @return object
-        */
-       private function createService( $name ) {
-               if ( isset( $this->serviceInstantiators[$name] ) ) {
-                       $service = call_user_func_array(
-                               $this->serviceInstantiators[$name],
-                               array_merge( [ $this ], $this->extraInstantiationParams )
-                       );
-                       // NOTE: when adding more wiring logic here, make sure copyWiring() is kept in sync!
-               } else {
-                       throw new NoSuchServiceException( $name );
-               }
-
-               return $service;
-       }
-
-       /**
-        * @param string $name
-        * @return bool Whether the service is disabled
-        * @since 1.28
-        */
-       public function isServiceDisabled( $name ) {
-               return isset( $this->disabled[$name] );
-       }
-}
diff --git a/includes/Services/ServiceDisabledException.php b/includes/Services/ServiceDisabledException.php
deleted file mode 100644 (file)
index ae15b7c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-namespace MediaWiki\Services;
-
-use Exception;
-use RuntimeException;
-
-/**
- * Exception thrown when trying to access a disabled service.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- *
- * @since 1.27
- */
-
-/**
- * Exception thrown when trying to access a disabled service.
- */
-class ServiceDisabledException extends RuntimeException {
-
-       /**
-        * @param string $serviceName
-        * @param Exception|null $previous
-        */
-       public function __construct( $serviceName, Exception $previous = null ) {
-               parent::__construct( "Service disabled: $serviceName", 0, $previous );
-       }
-
-}
index 2f462b8..7cda14c 100644 (file)
@@ -505,6 +505,20 @@ if ( !class_exists( 'AutoLoader' ) ) {
 // re-created while taking into account any custom settings and extensions.
 MediaWikiServices::resetGlobalInstance( new GlobalVarConfig(), 'quick' );
 
+if ( $wgSharedDB && $wgSharedTables ) {
+       // Apply $wgSharedDB table aliases for the local LB (all non-foreign DB connections)
+       MediaWikiServices::getInstance()->getDBLoadBalancer()->setTableAliases(
+               array_fill_keys(
+                       $wgSharedTables,
+                       [
+                               'dbname' => $wgSharedDB,
+                               'schema' => $wgSharedSchema,
+                               'prefix' => $wgSharedPrefix
+                       ]
+               )
+       );
+}
+
 // Define a constant that indicates that the bootstrapping of the service locator
 // is complete.
 define( 'MW_SERVICE_BOOTSTRAP_COMPLETE', 1 );
@@ -648,6 +662,12 @@ if ( !$wgDBerrorLogTZ ) {
 
 // initialize the request object in $wgRequest
 $wgRequest = RequestContext::getMain()->getRequest(); // BackCompat
+// Set user IP/agent information for causal consistency purposes
+MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->setRequestInfo( [
+       'IPAddress' => $wgRequest->getIP(),
+       'UserAgent' => $wgRequest->getHeader( 'User-Agent' ),
+       'ChronologyProtection' => $wgRequest->getHeader( 'ChronologyProtection' )
+] );
 
 // Useful debug output
 if ( $wgCommandLineMode ) {
index e578873..a35af6e 100644 (file)
  * developer of the calling code is reminded that the function can fail, and
  * so that a lack of error-handling will be explicit.
  */
-class Status {
-       /** @var StatusValue */
-       protected $sv;
-
-       /** @var mixed */
-       public $value;
-       /** @var array Map of (key => bool) to indicate success of each part of batch operations */
-       public $success = [];
-       /** @var int Counter for batch operations */
-       public $successCount = 0;
-       /** @var int Counter for batch operations */
-       public $failCount = 0;
-
+class Status extends StatusValue {
        /** @var callable */
        public $cleanCallback = false;
 
-       /**
-        * @param StatusValue $sv [optional]
-        */
-       public function __construct( StatusValue $sv = null ) {
-               $this->sv = ( $sv === null ) ? new StatusValue() : $sv;
-               // B/C field aliases
-               $this->value =& $this->sv->value;
-               $this->successCount =& $this->sv->successCount;
-               $this->failCount =& $this->sv->failCount;
-               $this->success =& $this->sv->success;
-       }
-
        /**
         * Succinct helper method to wrap a StatusValue
         *
@@ -77,99 +53,83 @@ class Status {
         * @return Status
         */
        public static function wrap( $sv ) {
-               return $sv instanceof Status ? $sv : new self( $sv );
-       }
+               if ( $sv instanceof static ) {
+                       return $sv;
+               }
 
-       /**
-        * Factory function for fatal errors
-        *
-        * @param string|Message $message Message name or object
-        * @return Status
-        */
-       public static function newFatal( $message /*, parameters...*/ ) {
-               return new self( call_user_func_array(
-                       [ 'StatusValue', 'newFatal' ], func_get_args()
-               ) );
+               $result = new static();
+               $result->ok =& $sv->ok;
+               $result->errors =& $sv->errors;
+               $result->value =& $sv->value;
+               $result->successCount =& $sv->successCount;
+               $result->failCount =& $sv->failCount;
+               $result->success =& $sv->success;
+
+               return $result;
        }
 
        /**
-        * Factory function for good results
+        * Backwards compatibility logic
         *
-        * @param mixed $value
-        * @return Status
+        * @param string $name
+        * @return mixed
+        * @throws RuntimeException
         */
-       public static function newGood( $value = null ) {
-               $sv = new StatusValue();
-               $sv->value = $value;
+       function __get( $name ) {
+               if ( $name === 'ok' ) {
+                       return $this->isOK();
+               } elseif ( $name === 'errors' ) {
+                       return $this->getErrors();
+               }
 
-               return new self( $sv );
+               throw new RuntimeException( "Cannot get '$name' property." );
        }
 
        /**
         * Change operation result
+        * Backwards compatibility logic
         *
-        * @param bool $ok Whether the operation completed
+        * @param string $name
         * @param mixed $value
+        * @throws RuntimeException
         */
-       public function setResult( $ok, $value = null ) {
-               $this->sv->setResult( $ok, $value );
-       }
-
-       /**
-        * Returns the wrapped StatusValue object
-        * @return StatusValue
-        * @since 1.27
-        */
-       public function getStatusValue() {
-               return $this->sv;
-       }
-
-       /**
-        * Returns whether the operation completed and didn't have any error or
-        * warnings
-        *
-        * @return bool
-        */
-       public function isGood() {
-               return $this->sv->isGood();
-       }
-
-       /**
-        * Returns whether the operation completed
-        *
-        * @return bool
-        */
-       public function isOK() {
-               return $this->sv->isOK();
+       function __set( $name, $value ) {
+               if ( $name === 'ok' ) {
+                       $this->setOK( $value );
+               } elseif ( !property_exists( $this, $name ) ) {
+                       // Caller is using undeclared ad-hoc properties
+                       $this->$name = $value;
+               } else {
+                       throw new RuntimeException( "Cannot set '$name' property." );
+               }
        }
 
        /**
-        * Add a new warning
+        * Splits this Status object into two new Status objects, one which contains only
+        * the error messages, and one that contains the warnings, only. The returned array is
+        * defined as:
+        * [
+        *     0 => object(Status) # the Status with error messages, only
+        *     1 => object(Status) # The Status with warning messages, only
+        * ]
         *
-        * @param string|Message $message Message name or object
+        * @return Status[]
         */
-       public function warning( $message /*, parameters... */ ) {
-               call_user_func_array( [ $this->sv, 'warning' ], func_get_args() );
-       }
+       public function splitByErrorType() {
+               list( $errorsOnlyStatus, $warningsOnlyStatus ) = parent::splitByErrorType();
+               $errorsOnlyStatus->cleanCallback =
+                       $warningsOnlyStatus->cleanCallback = $this->cleanCallback;
 
-       /**
-        * Add an error, do not set fatal flag
-        * This can be used for non-fatal errors
-        *
-        * @param string|Message $message Message name or object
-        */
-       public function error( $message /*, parameters... */ ) {
-               call_user_func_array( [ $this->sv, 'error' ], func_get_args() );
+               return [ $errorsOnlyStatus, $warningsOnlyStatus ];
        }
 
        /**
-        * Add an error and set OK to false, indicating that the operation
-        * as a whole was fatal
-        *
-        * @param string|Message $message Message name or object
+        * Returns the wrapped StatusValue object
+        * @return StatusValue
+        * @since 1.27
         */
-       public function fatal( $message /*, parameters... */ ) {
-               call_user_func_array( [ $this->sv, 'fatal' ], func_get_args() );
+       public function getStatusValue() {
+               return $this;
        }
 
        /**
@@ -217,16 +177,16 @@ class Status {
        public function getWikiText( $shortContext = false, $longContext = false, $lang = null ) {
                $lang = $this->languageFromParam( $lang );
 
-               $rawErrors = $this->sv->getErrors();
+               $rawErrors = $this->getErrors();
                if ( count( $rawErrors ) == 0 ) {
-                       if ( $this->sv->isOK() ) {
-                               $this->sv->fatal( 'internalerror_info',
+                       if ( $this->isOK() ) {
+                               $this->fatal( 'internalerror_info',
                                        __METHOD__ . " called for a good result, this is incorrect\n" );
                        } else {
-                               $this->sv->fatal( 'internalerror_info',
+                               $this->fatal( 'internalerror_info',
                                        __METHOD__ . ": Invalid result object: no error text but not OK\n" );
                        }
-                       $rawErrors = $this->sv->getErrors(); // just added a fatal
+                       $rawErrors = $this->getErrors(); // just added a fatal
                }
                if ( count( $rawErrors ) == 1 ) {
                        $s = $this->getErrorMessage( $rawErrors[0], $lang )->plain();
@@ -265,24 +225,24 @@ class Status {
         *
         * If both parameters are missing, and there is only one error, no bullet will be added.
         *
-        * @param string|string[] $shortContext A message name or an array of message names.
-        * @param string|string[] $longContext A message name or an array of message names.
+        * @param string|string[]|bool $shortContext A message name or an array of message names.
+        * @param string|string[]|bool $longContext A message name or an array of message names.
         * @param string|Language $lang Language to use for processing messages
         * @return Message
         */
        public function getMessage( $shortContext = false, $longContext = false, $lang = null ) {
                $lang = $this->languageFromParam( $lang );
 
-               $rawErrors = $this->sv->getErrors();
+               $rawErrors = $this->getErrors();
                if ( count( $rawErrors ) == 0 ) {
-                       if ( $this->sv->isOK() ) {
-                               $this->sv->fatal( 'internalerror_info',
+                       if ( $this->isOK() ) {
+                               $this->fatal( 'internalerror_info',
                                        __METHOD__ . " called for a good result, this is incorrect\n" );
                        } else {
-                               $this->sv->fatal( 'internalerror_info',
+                               $this->fatal( 'internalerror_info',
                                        __METHOD__ . ": Invalid result object: no error text but not OK\n" );
                        }
-                       $rawErrors = $this->sv->getErrors(); // just added a fatal
+                       $rawErrors = $this->getErrors(); // just added a fatal
                }
                if ( count( $rawErrors ) == 1 ) {
                        $s = $this->getErrorMessage( $rawErrors[0], $lang );
@@ -313,11 +273,12 @@ class Status {
        }
 
        /**
-        * Return the message for a single error.
-        * @param mixed $error With an array & two values keyed by
-        * 'message' and 'params', use those keys-value pairs.
-        * Otherwise, if its an array, just use the first value as the
-        * message and the remaining items as the params.
+        * Return the message for a single error
+        *
+        * The code string can be used a message key with per-language versions.
+        * If $error is an array, the "params" field is a list of parameters for the message.
+        *
+        * @param array|string $error Code string or (key: code string, params: string[]) map
         * @param string|Language $lang Language to use for processing messages
         * @return Message
         */
@@ -333,8 +294,10 @@ class Status {
                                $msg = wfMessage( $msgName,
                                        array_map( 'wfEscapeWikiText', $this->cleanParams( $error ) ) );
                        }
-               } else {
+               } elseif ( is_string( $error ) ) {
                        $msg = wfMessage( $error );
+               } else {
+                       throw new UnexpectedValueException( "Got " . get_class( $error ) . " for key." );
                }
 
                $msg->inLanguage( $this->languageFromParam( $lang ) );
@@ -342,12 +305,11 @@ class Status {
        }
 
        /**
-        * Get the error message as HTML. This is done by parsing the wikitext error
-        * message.
-        * @param string $shortContext A short enclosing context message name, to
+        * Get the error message as HTML. This is done by parsing the wikitext error message
+        * @param string|bool $shortContext A short enclosing context message name, to
         *        be used when there is a single error
-        * @param string $longContext A long enclosing context message name, for a list
-        * @param string|Language $lang Language to use for processing messages
+        * @param string|bool $longContext A long enclosing context message name, for a list
+        * @param string|Language|null $lang Language to use for processing messages
         * @return string
         */
        public function getHTML( $shortContext = false, $longContext = false, $lang = null ) {
@@ -370,16 +332,6 @@ class Status {
                }, $errors );
        }
 
-       /**
-        * Merge another status object into this one
-        *
-        * @param Status $other Other Status object
-        * @param bool $overwriteValue Whether to override the "value" member
-        */
-       public function merge( $other, $overwriteValue = false ) {
-               $this->sv->merge( $other->sv, $overwriteValue );
-       }
-
        /**
         * Get the list of errors (but not warnings)
         *
@@ -413,7 +365,7 @@ class Status {
        protected function getStatusArray( $type = false ) {
                $result = [];
 
-               foreach ( $this->sv->getErrors() as $error ) {
+               foreach ( $this->getErrors() as $error ) {
                        if ( $type === false || $error['type'] === $type ) {
                                if ( $error['message'] instanceof MessageSpecifier ) {
                                        $result[] = array_merge(
@@ -431,92 +383,6 @@ class Status {
                return $result;
        }
 
-       /**
-        * Returns a list of status messages of the given type, with message and
-        * params left untouched, like a sane version of getStatusArray
-        *
-        * Each entry is a map of:
-        *   - message: string message key or MessageSpecifier
-        *   - params: array list of parameters
-        *
-        * @param string $type
-        * @return array
-        */
-       public function getErrorsByType( $type ) {
-               return $this->sv->getErrorsByType( $type );
-       }
-
-       /**
-        * Returns true if the specified message is present as a warning or error
-        *
-        * @param string|Message $message Message key or object to search for
-        *
-        * @return bool
-        */
-       public function hasMessage( $message ) {
-               return $this->sv->hasMessage( $message );
-       }
-
-       /**
-        * If the specified source message exists, replace it with the specified
-        * destination message, but keep the same parameters as in the original error.
-        *
-        * Note, due to the lack of tools for comparing Message objects, this
-        * function will not work when using a Message object as the search parameter.
-        *
-        * @param Message|string $source Message key or object to search for
-        * @param Message|string $dest Replacement message key or object
-        * @return bool Return true if the replacement was done, false otherwise.
-        */
-       public function replaceMessage( $source, $dest ) {
-               return $this->sv->replaceMessage( $source, $dest );
-       }
-
-       /**
-        * @return mixed
-        */
-       public function getValue() {
-               return $this->sv->getValue();
-       }
-
-       /**
-        * Backwards compatibility logic
-        *
-        * @param string $name
-        */
-       function __get( $name ) {
-               if ( $name === 'ok' ) {
-                       return $this->sv->isOK();
-               } elseif ( $name === 'errors' ) {
-                       return $this->sv->getErrors();
-               }
-               throw new Exception( "Cannot get '$name' property." );
-       }
-
-       /**
-        * Backwards compatibility logic
-        *
-        * @param string $name
-        * @param mixed $value
-        */
-       function __set( $name, $value ) {
-               if ( $name === 'ok' ) {
-                       $this->sv->setOK( $value );
-               } elseif ( !property_exists( $this, $name ) ) {
-                       // Caller is using undeclared ad-hoc properties
-                       $this->$name = $value;
-               } else {
-                       throw new Exception( "Cannot set '$name' property." );
-               }
-       }
-
-       /**
-        * @return string
-        */
-       public function __toString() {
-               return $this->sv->__toString();
-       }
-
        /**
         * Don't save the callback when serializing, because Closures can't be
         * serialized and we're going to clear it in __wakeup anyway.
index 0fc7980..cce3fc4 100644 (file)
@@ -25,9 +25,9 @@
  */
 class StreamFile {
        // Do not send any HTTP headers unless requested by caller (e.g. body only)
-       const STREAM_HEADLESS = 1;
+       const STREAM_HEADLESS = HTTPFileStreamer::STREAM_HEADLESS;
        // Do not try to tear down any PHP output buffers
-       const STREAM_ALLOW_OB = 2;
+       const STREAM_ALLOW_OB = HTTPFileStreamer::STREAM_ALLOW_OB;
 
        /**
         * Stream a file to the browser, adding all the headings and fun stuff.
@@ -45,115 +45,19 @@ class StreamFile {
        public static function stream(
                $fname, $headers = [], $sendErrors = true, $optHeaders = [], $flags = 0
        ) {
-               $section = new ProfileSection( __METHOD__ );
-
                if ( FileBackend::isStoragePath( $fname ) ) { // sanity
-                       throw new MWException( __FUNCTION__ . " given storage path '$fname'." );
-               }
-
-               // Don't stream it out as text/html if there was a PHP error
-               if ( ( ( $flags & self::STREAM_HEADLESS ) == 0 || $headers ) && headers_sent() ) {
-                       echo "Headers already sent, terminating.\n";
-                       return false;
-               }
-
-               $headerFunc = ( $flags & self::STREAM_HEADLESS )
-                       ? function ( $header ) {
-                                // no-op
-                       }
-                       : function ( $header ) {
-                               is_int( $header ) ? HttpStatus::header( $header ) : header( $header );
-                       };
-
-               MediaWiki\suppressWarnings();
-               $info = stat( $fname );
-               MediaWiki\restoreWarnings();
-
-               if ( !is_array( $info ) ) {
-                       if ( $sendErrors ) {
-                               self::send404Message( $fname, $flags );
-                       }
-                       return false;
-               }
-
-               // Send Last-Modified HTTP header for client-side caching
-               $headerFunc( 'Last-Modified: ' . wfTimestamp( TS_RFC2822, $info['mtime'] ) );
-
-               if ( ( $flags & self::STREAM_ALLOW_OB ) == 0 ) {
-                       // Cancel output buffering and gzipping if set
-                       wfResetOutputBuffers();
-               }
-
-               $type = self::contentTypeFromPath( $fname );
-               if ( $type && $type != 'unknown/unknown' ) {
-                       $headerFunc( "Content-type: $type" );
-               } else {
-                       // Send a content type which is not known to Internet Explorer, to
-                       // avoid triggering IE's content type detection. Sending a standard
-                       // unknown content type here essentially gives IE license to apply
-                       // whatever content type it likes.
-                       $headerFunc( 'Content-type: application/x-wiki' );
+                       throw new InvalidArgumentException( __FUNCTION__ . " given storage path '$fname'." );
                }
 
-               // Don't send if client has up to date cache
-               if ( isset( $optHeaders['if-modified-since'] ) ) {
-                       $modsince = preg_replace( '/;.*$/', '', $optHeaders['if-modified-since'] );
-                       if ( wfTimestamp( TS_UNIX, $info['mtime'] ) <= strtotime( $modsince ) ) {
-                               ini_set( 'zlib.output_compression', 0 );
-                               $headerFunc( 304 );
-                               return true; // ok
-                       }
-               }
-
-               // Send additional headers
-               foreach ( $headers as $header ) {
-                       header( $header ); // always use header(); specifically requested
-               }
-
-               if ( isset( $optHeaders['range'] ) ) {
-                       $range = self::parseRange( $optHeaders['range'], $info['size'] );
-                       if ( is_array( $range ) ) {
-                               $headerFunc( 206 );
-                               $headerFunc( 'Content-Length: ' . $range[2] );
-                               $headerFunc( "Content-Range: bytes {$range[0]}-{$range[1]}/{$info['size']}" );
-                       } elseif ( $range === 'invalid' ) {
-                               if ( $sendErrors ) {
-                                       $headerFunc( 416 );
-                                       $headerFunc( 'Cache-Control: no-cache' );
-                                       $headerFunc( 'Content-Type: text/html; charset=utf-8' );
-                                       $headerFunc( 'Content-Range: bytes */' . $info['size'] );
-                               }
-                               return false;
-                       } else { // unsupported Range request (e.g. multiple ranges)
-                               $range = null;
-                               $headerFunc( 'Content-Length: ' . $info['size'] );
-                       }
-               } else {
-                       $range = null;
-                       $headerFunc( 'Content-Length: ' . $info['size'] );
-               }
+               $streamer = new HTTPFileStreamer(
+                       $fname,
+                       [
+                               'obResetFunc' => 'wfResetOutputBuffers',
+                               'streamMimeFunc' => [ __CLASS__, 'contentTypeFromPath' ]
+                       ]
+               );
 
-               if ( is_array( $range ) ) {
-                       $handle = fopen( $fname, 'rb' );
-                       if ( $handle ) {
-                               $ok = true;
-                               fseek( $handle, $range[0] );
-                               $remaining = $range[2];
-                               while ( $remaining > 0 && $ok ) {
-                                       $bytes = min( $remaining, 8 * 1024 );
-                                       $data = fread( $handle, $bytes );
-                                       $remaining -= $bytes;
-                                       $ok = ( $data !== false );
-                                       print $data;
-                               }
-                       } else {
-                               return false;
-                       }
-               } else {
-                       return readfile( $fname ) !== false; // faster
-               }
-
-               return true;
+               return $streamer->stream( $headers, $sendErrors, $optHeaders, $flags );
        }
 
        /**
@@ -164,19 +68,7 @@ class StreamFile {
         * @since 1.24
         */
        public static function send404Message( $fname, $flags = 0 ) {
-               if ( ( $flags & self::STREAM_HEADLESS ) == 0 ) {
-                       HttpStatus::header( 404 );
-                       header( 'Cache-Control: no-cache' );
-                       header( 'Content-Type: text/html; charset=utf-8' );
-               }
-               $encFile = htmlspecialchars( $fname );
-               $encScript = htmlspecialchars( $_SERVER['SCRIPT_NAME'] );
-               echo "<!DOCTYPE html><html><body>
-                       <h1>File not found</h1>
-                       <p>Although this PHP script ($encScript) exists, the file requested for output
-                       ($encFile) does not.</p>
-                       </body></html>
-                       ";
+               HTTPFileStreamer::send404Message( $fname, $flags );
        }
 
        /**
@@ -188,30 +80,7 @@ class StreamFile {
         * @since 1.24
         */
        public static function parseRange( $range, $size ) {
-               $m = [];
-               if ( preg_match( '#^bytes=(\d*)-(\d*)$#', $range, $m ) ) {
-                       list( , $start, $end ) = $m;
-                       if ( $start === '' && $end === '' ) {
-                               $absRange = [ 0, $size - 1 ];
-                       } elseif ( $start === '' ) {
-                               $absRange = [ $size - $end, $size - 1 ];
-                       } elseif ( $end === '' ) {
-                               $absRange = [ $start, $size - 1 ];
-                       } else {
-                               $absRange = [ $start, $end ];
-                       }
-                       if ( $absRange[0] >= 0 && $absRange[1] >= $absRange[0] ) {
-                               if ( $absRange[0] < $size ) {
-                                       $absRange[1] = min( $absRange[1], $size - 1 ); // stop at EOF
-                                       $absRange[2] = $absRange[1] - $absRange[0] + 1;
-                                       return $absRange;
-                               } elseif ( $absRange[0] == 0 && $size == 0 ) {
-                                       return 'unrecognized'; // the whole file should just be sent
-                               }
-                       }
-                       return 'invalid';
-               }
-               return 'unrecognized';
+               return HTTPFileStreamer::parseRange( $range, $size );
        }
 
        /**
index 20142a7..a1e6d5b 100644 (file)
@@ -186,10 +186,10 @@ class TemplateParser {
         * @code
         *     echo $templateParser->processTemplate(
         *         'ExampleTemplate',
-        *         array(
+        *         [
         *             'username' => $user->getName(),
         *             'message' => 'Hello!'
-        *         )
+        *         ]
         *     );
         * @endcode
         * @param string $templateName The name of the template
diff --git a/includes/TemplatesOnThisPageFormatter.php b/includes/TemplatesOnThisPageFormatter.php
new file mode 100644 (file)
index 0000000..494c7bf
--- /dev/null
@@ -0,0 +1,183 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+use MediaWiki\Linker\LinkRenderer;
+use MediaWiki\Linker\LinkTarget;
+
+/**
+ * Handles formatting for the "templates used on this page"
+ * lists. Formerly known as Linker::formatTemplates()
+ *
+ * @since 1.28
+ */
+class TemplatesOnThisPageFormatter {
+
+       /**
+        * @var IContextSource
+        */
+       private $context;
+
+       /**
+        * @var LinkRenderer
+        */
+       private $linkRenderer;
+
+       /**
+        * @param IContextSource $context
+        * @param LinkRenderer $linkRenderer
+        */
+       public function __construct( IContextSource $context, LinkRenderer $linkRenderer ) {
+               $this->context = $context;
+               $this->linkRenderer = $linkRenderer;
+       }
+
+       /**
+        * Make an HTML list of templates, and then add a "More..." link at
+        * the bottom. If $more is null, do not add a "More..." link. If $more
+        * is a LinkTarget, make a link to that title and use it. If $more is a string,
+        * directly paste it in as the link (escaping needs to be done manually).
+        *
+        * @param LinkTarget[] $templates
+        * @param string|bool $type 'preview' if a preview, 'section' if a section edit, false if neither
+        * @param LinkTarget|string|null $more An escaped link for "More..." of the templates
+        * @return string HTML output
+        */
+       public function format( array $templates, $type = false, $more = null ) {
+               if ( !$templates ) {
+                       // No templates
+                       return '';
+               }
+
+               # Do a batch existence check
+               $batch = new LinkBatch;
+               foreach ( $templates as $title ) {
+                       $batch->addObj( $title );
+               }
+               $batch->execute();
+
+               # Construct the HTML
+               $outText = '<div class="mw-templatesUsedExplanation">';
+               $count = count( $templates );
+               if ( $type === 'preview' ) {
+                       $outText .= $this->context->msg( 'templatesusedpreview' )->numParams( $count )
+                               ->parseAsBlock();
+               } elseif ( $type === 'section' ) {
+                       $outText .= $this->context->msg( 'templatesusedsection' )->numParams( $count )
+                               ->parseAsBlock();
+               } else {
+                       $outText .= $this->context->msg( 'templatesused' )->numParams( $count )
+                               ->parseAsBlock();
+               }
+               $outText .= "</div><ul>\n";
+
+               usort( $templates, 'Title::compare' );
+               foreach ( $templates as $template ) {
+                       $outText .= $this->formatTemplate( $template );
+               }
+
+               if ( $more instanceof LinkTarget ) {
+                       $outText .= Html::rawElement( 'li', [], $this->linkRenderer->makeLink(
+                               $more, $this->context->msg( 'moredotdotdot' )->text() ) );
+               } elseif ( $more ) {
+                       // Documented as should already be escaped
+                       $outText .= Html::rawElement( 'li', [], $more );
+               }
+
+               $outText .= '</ul>';
+               return $outText;
+       }
+
+       /**
+        * Builds an <li> item for an individual template
+        *
+        * @param LinkTarget $target
+        * @return string
+        */
+       private function formatTemplate( LinkTarget $target ) {
+               // TODO Would be nice if we didn't have to use Title here
+               $titleObj = Title::newFromLinkTarget( $target );
+               $protected = $this->getRestrictionsText( $titleObj->getRestrictions( 'edit' ) );
+               $editLink = $this->buildEditLink( $titleObj );
+               return '<li>' . $this->linkRenderer->makeLink( $target )
+                       . $this->context->msg( 'word-separator' )->escaped()
+                       . $this->context->msg( 'parentheses' )->rawParams( $editLink )->escaped()
+                       . $this->context->msg( 'word-separator' )->escaped()
+                       . $protected . '</li>';
+       }
+
+       /**
+        * If the page is protected, get the relevant text
+        * for those restrictions
+        *
+        * @param array $restrictions
+        * @return string
+        */
+       private function getRestrictionsText( array $restrictions ) {
+               $protected = '';
+               if ( !$restrictions ) {
+                       return $protected;
+               }
+
+               // Check backwards-compatible messages
+               $msg = null;
+               if ( $restrictions === [ 'sysop' ] ) {
+                       $msg = $this->context->msg( 'template-protected' );
+               } elseif ( $restrictions === [ 'autoconfirmed' ] ) {
+                       $msg = $this->context->msg( 'template-semiprotected' );
+               }
+               if ( $msg && !$msg->isDisabled() ) {
+                       $protected = $msg->parse();
+               } else {
+                       // Construct the message from restriction-level-*
+                       // e.g. restriction-level-sysop, restriction-level-autoconfirmed
+                       $msgs = [];
+                       foreach ( $restrictions as $r ) {
+                               $msgs[] = $this->context->msg( "restriction-level-$r" )->parse();
+                       }
+                       $protected = $this->context->msg( 'parentheses' )
+                               ->rawParams( $this->context->getLanguage()->commaList( $msgs ) )->escaped();
+               }
+
+               return $protected;
+       }
+
+       /**
+        * Return a link to the edit page, with the text
+        * saying "view source" if the user can't edit the page
+        *
+        * @param Title $titleObj
+        * @return string
+        */
+       private function buildEditLink( Title $titleObj ) {
+               if ( $titleObj->quickUserCan( 'edit', $this->context->getUser() ) ) {
+                       $linkMsg = 'editlink';
+               } else {
+                       $linkMsg = 'viewsourcelink';
+               }
+
+               return $this->linkRenderer->makeLink(
+                       $titleObj,
+                       $this->context->msg( $linkMsg )->text(),
+                       [],
+                       [ 'action' => 'edit' ]
+               );
+       }
+
+}
index 3475b26..213572b 100644 (file)
@@ -91,7 +91,13 @@ class Title implements LinkTarget {
         * @var bool|string ID of the page's content model, i.e. one of the
         *   CONTENT_MODEL_XXX constants
         */
-       public $mContentModel = false;
+       private $mContentModel = false;
+
+       /**
+        * @var bool If a content model was forced via setContentModel()
+        *   this will be true to avoid having other code paths reset it
+        */
+       private $mForcedContentModel = false;
 
        /** @var int Estimated number of revisions; null of not loaded */
        private $mEstimateRevisions;
@@ -467,9 +473,9 @@ class Title implements LinkTarget {
                        if ( isset( $row->page_latest ) ) {
                                $this->mLatestID = (int)$row->page_latest;
                        }
-                       if ( isset( $row->page_content_model ) ) {
+                       if ( !$this->mForcedContentModel && isset( $row->page_content_model ) ) {
                                $this->mContentModel = strval( $row->page_content_model );
-                       } else {
+                       } elseif ( !$this->mForcedContentModel ) {
                                $this->mContentModel = false; # initialized lazily in getContentModel()
                        }
                        if ( isset( $row->page_lang ) ) {
@@ -483,7 +489,9 @@ class Title implements LinkTarget {
                        $this->mLength = 0;
                        $this->mRedirect = false;
                        $this->mLatestID = 0;
-                       $this->mContentModel = false; # initialized lazily in getContentModel()
+                       if ( !$this->mForcedContentModel ) {
+                               $this->mContentModel = false; # initialized lazily in getContentModel()
+                       }
                }
        }
 
@@ -921,8 +929,9 @@ class Title implements LinkTarget {
         * @return string Content model id
         */
        public function getContentModel( $flags = 0 ) {
-               if ( ( !$this->mContentModel || $flags === Title::GAID_FOR_UPDATE ) &&
-                       $this->getArticleID( $flags )
+               if ( !$this->mForcedContentModel
+                       && ( !$this->mContentModel || $flags === Title::GAID_FOR_UPDATE )
+                       && $this->getArticleID( $flags )
                ) {
                        $linkCache = LinkCache::singleton();
                        $linkCache->addLinkObj( $this ); # in case we already had an article ID
@@ -946,6 +955,22 @@ class Title implements LinkTarget {
                return $this->getContentModel() == $id;
        }
 
+       /**
+        * Set a proposed content model for the page for permissions
+        * checking. This does not actually change the content model
+        * of a title!
+        *
+        * Additionally, you should make sure you've checked
+        * ContentHandler::canBeUsedOn() first.
+        *
+        * @since 1.28
+        * @param string $model CONTENT_MODEL_XXX constant
+        */
+       public function setContentModel( $model ) {
+               $this->mContentModel = $model;
+               $this->mForcedContentModel = true;
+       }
+
        /**
         * Get the namespace text
         *
@@ -1079,7 +1104,7 @@ class Title implements LinkTarget {
        /**
         * Returns true if the title is inside one of the specified namespaces.
         *
-        * @param int $namespaces,... The namespaces to check for
+        * @param int|int[] $namespaces,... The namespaces to check for
         * @return bool
         * @since 1.19
         */
@@ -2848,23 +2873,6 @@ class Title implements LinkTarget {
                return $this->mCascadeRestriction;
        }
 
-       /**
-        * Loads a string into mRestrictions array
-        *
-        * @param ResultWrapper $res Resource restrictions as an SQL result.
-        * @param string $oldFashionedRestrictions Comma-separated list of page
-        *        restrictions from page table (pre 1.10)
-        */
-       private function loadRestrictionsFromResultWrapper( $res, $oldFashionedRestrictions = null ) {
-               $rows = [];
-
-               foreach ( $res as $row ) {
-                       $rows[] = $row;
-               }
-
-               $this->loadRestrictionsFromRows( $rows, $oldFashionedRestrictions );
-       }
-
        /**
         * Compiles list of active page restrictions from both page table (pre 1.10)
         * and page_restrictions table for this existing page.
@@ -2948,36 +2956,53 @@ class Title implements LinkTarget {
         *   restrictions from page table (pre 1.10)
         */
        public function loadRestrictions( $oldFashionedRestrictions = null ) {
-               if ( !$this->mRestrictionsLoaded ) {
-                       $dbr = wfGetDB( DB_REPLICA );
-                       if ( $this->exists() ) {
-                               $res = $dbr->select(
-                                       'page_restrictions',
-                                       [ 'pr_type', 'pr_expiry', 'pr_level', 'pr_cascade' ],
-                                       [ 'pr_page' => $this->getArticleID() ],
-                                       __METHOD__
-                               );
+               if ( $this->mRestrictionsLoaded ) {
+                       return;
+               }
 
-                               $this->loadRestrictionsFromResultWrapper( $res, $oldFashionedRestrictions );
-                       } else {
-                               $title_protection = $this->getTitleProtection();
-
-                               if ( $title_protection ) {
-                                       $now = wfTimestampNow();
-                                       $expiry = $dbr->decodeExpiry( $title_protection['expiry'] );
-
-                                       if ( !$expiry || $expiry > $now ) {
-                                               // Apply the restrictions
-                                               $this->mRestrictionsExpiry['create'] = $expiry;
-                                               $this->mRestrictions['create'] = explode( ',', trim( $title_protection['permission'] ) );
-                                       } else { // Get rid of the old restrictions
-                                               $this->mTitleProtection = false;
-                                       }
-                               } else {
-                                       $this->mRestrictionsExpiry['create'] = 'infinity';
+               $id = $this->getArticleID();
+               if ( $id ) {
+                       $cache = ObjectCache::getMainWANInstance();
+                       $rows = $cache->getWithSetCallback(
+                               // Page protections always leave a new null revision
+                               $cache->makeKey( 'page-restrictions', $id, $this->getLatestRevID() ),
+                               $cache::TTL_DAY,
+                               function ( $curValue, &$ttl, array &$setOpts ) {
+                                       $dbr = wfGetDB( DB_REPLICA );
+
+                                       $setOpts += Database::getCacheSetOptions( $dbr );
+
+                                       return iterator_to_array(
+                                               $dbr->select(
+                                                       'page_restrictions',
+                                                       [ 'pr_type', 'pr_expiry', 'pr_level', 'pr_cascade' ],
+                                                       [ 'pr_page' => $this->getArticleID() ],
+                                                       __METHOD__
+                                               )
+                                       );
+                               }
+                       );
+
+                       $this->loadRestrictionsFromRows( $rows, $oldFashionedRestrictions );
+               } else {
+                       $title_protection = $this->getTitleProtection();
+
+                       if ( $title_protection ) {
+                               $now = wfTimestampNow();
+                               $expiry = wfGetDB( DB_REPLICA )->decodeExpiry( $title_protection['expiry'] );
+
+                               if ( !$expiry || $expiry > $now ) {
+                                       // Apply the restrictions
+                                       $this->mRestrictionsExpiry['create'] = $expiry;
+                                       $this->mRestrictions['create'] =
+                                               explode( ',', trim( $title_protection['permission'] ) );
+                               } else { // Get rid of the old restrictions
+                                       $this->mTitleProtection = false;
                                }
-                               $this->mRestrictionsLoaded = true;
+                       } else {
+                               $this->mRestrictionsExpiry['create'] = 'infinity';
                        }
+                       $this->mRestrictionsLoaded = true;
                }
        }
 
@@ -3258,7 +3283,7 @@ class Title implements LinkTarget {
         * This clears some fields in this object, and clears any associated
         * keys in the "bad links" section of the link cache.
         *
-        * - This is called from WikiPage::doEdit() and WikiPage::insertOn() to allow
+        * - This is called from WikiPage::doEditContent() and WikiPage::insertOn() to allow
         * loading of the new page_id. It's also called from
         * WikiPage::doDeleteArticleReal()
         *
@@ -4366,16 +4391,19 @@ class Title implements LinkTarget {
        public function invalidateCache( $purgeTime = null ) {
                if ( wfReadOnly() ) {
                        return false;
-               }
-
-               if ( $this->mArticleID === 0 ) {
+               } elseif ( $this->mArticleID === 0 ) {
                        return true; // avoid gap locking if we know it's not there
                }
 
+               $dbw = wfGetDB( DB_MASTER );
+               $dbw->onTransactionPreCommitOrIdle( function () {
+                       ResourceLoaderWikiModule::invalidateModuleCache( $this, null, null, wfWikiID() );
+               } );
+
                $conds = $this->pageCond();
                DeferredUpdates::addUpdate(
                        new AutoCommitUpdate(
-                               wfGetDB( DB_MASTER ),
+                               $dbw,
                                __METHOD__,
                                function ( IDatabase $dbw, $fname ) use ( $conds, $purgeTime ) {
                                        $dbTimestamp = $dbw->timestamp( $purgeTime ?: time() );
index 4ac4dea..8497224 100644 (file)
@@ -55,19 +55,11 @@ class WatchedItemQueryService {
        }
 
        /**
-        * @return DatabaseBase
+        * @return IDatabase
         * @throws MWException
         */
        private function getConnection() {
-               return $this->loadBalancer->getConnection( DB_REPLICA, [ 'watchlist' ] );
-       }
-
-       /**
-        * @param DatabaseBase $connection
-        * @throws MWException
-        */
-       private function reuseConnection( DatabaseBase $connection ) {
-               $this->loadBalancer->reuseConnection( $connection );
+               return $this->loadBalancer->getConnectionRef( DB_REPLICA, [ 'watchlist' ] );
        }
 
        /**
@@ -181,8 +173,6 @@ class WatchedItemQueryService {
                        $joinConds
                );
 
-               $this->reuseConnection( $db );
-
                $items = [];
                foreach ( $res as $row ) {
                        $items[] = [
@@ -258,8 +248,6 @@ class WatchedItemQueryService {
                        $dbOptions
                );
 
-               $this->reuseConnection( $db );
-
                $watchedItems = [];
                foreach ( $res as $row ) {
                        // todo these could all be cached at some point?
@@ -337,7 +325,7 @@ class WatchedItemQueryService {
        }
 
        private function getWatchedItemsWithRCInfoQueryConds(
-               DatabaseBase $db,
+               IDatabase $db,
                User $user,
                array $options
        ) {
@@ -445,7 +433,7 @@ class WatchedItemQueryService {
                return $conds;
        }
 
-       private function getStartEndConds( DatabaseBase $db, array $options ) {
+       private function getStartEndConds( IDatabase $db, array $options ) {
                if ( !isset( $options['start'] ) && ! isset( $options['end'] ) ) {
                        return [];
                }
@@ -464,7 +452,7 @@ class WatchedItemQueryService {
                return $conds;
        }
 
-       private function getUserRelatedConds( DatabaseBase $db, User $user, array $options ) {
+       private function getUserRelatedConds( IDatabase $db, User $user, array $options ) {
                if ( !array_key_exists( 'onlyByUser', $options ) && !array_key_exists( 'notByUser', $options ) ) {
                        return [];
                }
@@ -491,7 +479,7 @@ class WatchedItemQueryService {
                return $conds;
        }
 
-       private function getExtraDeletedPageLogEntryRelatedCond( DatabaseBase $db, User $user ) {
+       private function getExtraDeletedPageLogEntryRelatedCond( IDatabase $db, User $user ) {
                // LogPage::DELETED_ACTION hides the affected page, too. So hide those
                // entirely from the watchlist, or someone could guess the title.
                $bitmask = 0;
@@ -509,7 +497,7 @@ class WatchedItemQueryService {
                return '';
        }
 
-       private function getStartFromConds( DatabaseBase $db, array $options ) {
+       private function getStartFromConds( IDatabase $db, array $options ) {
                $op = $options['dir'] === self::DIR_OLDER ? '<' : '>';
                list( $rcTimestamp, $rcId ) = $options['startFrom'];
                $rcTimestamp = $db->addQuotes( $db->timestamp( $rcTimestamp ) );
@@ -529,7 +517,7 @@ class WatchedItemQueryService {
                );
        }
 
-       private function getWatchedItemsForUserQueryConds( DatabaseBase $db, User $user, array $options ) {
+       private function getWatchedItemsForUserQueryConds( IDatabase $db, User $user, array $options ) {
                $conds = [ 'wl_user' => $user->getId() ];
                if ( $options['namespaceIds'] ) {
                        $conds['wl_namespace'] = array_map( 'intval', $options['namespaceIds'] );
@@ -563,12 +551,12 @@ class WatchedItemQueryService {
         * Creates a query condition part for getting only items before or after the given link target
         * (while ordering using $sort mode)
         *
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         * @param LinkTarget $target
         * @param string $op comparison operator to use in the conditions
         * @return string
         */
-       private function getFromUntilTargetConds( DatabaseBase $db, LinkTarget $target, $op ) {
+       private function getFromUntilTargetConds( IDatabase $db, LinkTarget $target, $op ) {
                return $db->makeList(
                        [
                                "wl_namespace $op " . $target->getNamespace(),
index 9a74401..6c47cae 100644 (file)
@@ -3,6 +3,7 @@
 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
 use MediaWiki\Linker\LinkTarget;
 use Wikimedia\Assert\Assert;
+use Wikimedia\ScopedCallback;
 
 /**
  * Storage layer class for WatchedItems.
@@ -192,20 +193,11 @@ class WatchedItemStore implements StatsdAwareInterface {
        /**
         * @param int $dbIndex DB_MASTER or DB_REPLICA
         *
-        * @return DatabaseBase
+        * @return IDatabase
         * @throws MWException
         */
-       private function getConnection( $dbIndex ) {
-               return $this->loadBalancer->getConnection( $dbIndex, [ 'watchlist' ] );
-       }
-
-       /**
-        * @param DatabaseBase $connection
-        *
-        * @throws MWException
-        */
-       private function reuseConnection( $connection ) {
-               $this->loadBalancer->reuseConnection( $connection );
+       private function getConnectionRef( $dbIndex ) {
+               return $this->loadBalancer->getConnectionRef( $dbIndex, [ 'watchlist' ] );
        }
 
        /**
@@ -217,7 +209,7 @@ class WatchedItemStore implements StatsdAwareInterface {
         * @return int
         */
        public function countWatchedItems( User $user ) {
-               $dbr = $this->getConnection( DB_REPLICA );
+               $dbr = $this->getConnectionRef( DB_REPLICA );
                $return = (int)$dbr->selectField(
                        'watchlist',
                        'COUNT(*)',
@@ -226,7 +218,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        ],
                        __METHOD__
                );
-               $this->reuseConnection( $dbr );
 
                return $return;
        }
@@ -237,7 +228,7 @@ class WatchedItemStore implements StatsdAwareInterface {
         * @return int
         */
        public function countWatchers( LinkTarget $target ) {
-               $dbr = $this->getConnection( DB_REPLICA );
+               $dbr = $this->getConnectionRef( DB_REPLICA );
                $return = (int)$dbr->selectField(
                        'watchlist',
                        'COUNT(*)',
@@ -247,7 +238,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        ],
                        __METHOD__
                );
-               $this->reuseConnection( $dbr );
 
                return $return;
        }
@@ -263,7 +253,7 @@ class WatchedItemStore implements StatsdAwareInterface {
         * @throws MWException
         */
        public function countVisitingWatchers( LinkTarget $target, $threshold ) {
-               $dbr = $this->getConnection( DB_REPLICA );
+               $dbr = $this->getConnectionRef( DB_REPLICA );
                $visitingWatchers = (int)$dbr->selectField(
                        'watchlist',
                        'COUNT(*)',
@@ -276,7 +266,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        ],
                        __METHOD__
                );
-               $this->reuseConnection( $dbr );
 
                return $visitingWatchers;
        }
@@ -293,7 +282,7 @@ class WatchedItemStore implements StatsdAwareInterface {
        public function countWatchersMultiple( array $targets, array $options = [] ) {
                $dbOptions = [ 'GROUP BY' => [ 'wl_namespace', 'wl_title' ] ];
 
-               $dbr = $this->getConnection( DB_REPLICA );
+               $dbr = $this->getConnectionRef( DB_REPLICA );
 
                if ( array_key_exists( 'minimumWatchers', $options ) ) {
                        $dbOptions['HAVING'] = 'COUNT(*) >= ' . (int)$options['minimumWatchers'];
@@ -308,8 +297,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        $dbOptions
                );
 
-               $this->reuseConnection( $dbr );
-
                $watchCounts = [];
                foreach ( $targets as $linkTarget ) {
                        $watchCounts[$linkTarget->getNamespace()][$linkTarget->getDBkey()] = 0;
@@ -341,7 +328,7 @@ class WatchedItemStore implements StatsdAwareInterface {
                array $targetsWithVisitThresholds,
                $minimumWatchers = null
        ) {
-               $dbr = $this->getConnection( DB_REPLICA );
+               $dbr = $this->getConnectionRef( DB_REPLICA );
 
                $conds = $this->getVisitingWatchersCondition( $dbr, $targetsWithVisitThresholds );
 
@@ -357,8 +344,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        $dbOptions
                );
 
-               $this->reuseConnection( $dbr );
-
                $watcherCounts = [];
                foreach ( $targetsWithVisitThresholds as list( $target ) ) {
                        /* @var LinkTarget $target */
@@ -452,14 +437,13 @@ class WatchedItemStore implements StatsdAwareInterface {
                        return false;
                }
 
-               $dbr = $this->getConnection( DB_REPLICA );
+               $dbr = $this->getConnectionRef( DB_REPLICA );
                $row = $dbr->selectRow(
                        'watchlist',
                        'wl_notificationtimestamp',
                        $this->dbCond( $user, $target ),
                        __METHOD__
                );
-               $this->reuseConnection( $dbr );
 
                if ( !$row ) {
                        return false;
@@ -499,7 +483,7 @@ class WatchedItemStore implements StatsdAwareInterface {
                                "wl_title {$options['sort']}"
                        ];
                }
-               $db = $this->getConnection( $options['forWrite'] ? DB_MASTER : DB_REPLICA );
+               $db = $this->getConnectionRef( $options['forWrite'] ? DB_MASTER : DB_REPLICA );
 
                $res = $db->select(
                        'watchlist',
@@ -508,7 +492,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        __METHOD__,
                        $dbOptions
                );
-               $this->reuseConnection( $db );
 
                $watchedItems = [];
                foreach ( $res as $row ) {
@@ -569,7 +552,7 @@ class WatchedItemStore implements StatsdAwareInterface {
                        return $timestamps;
                }
 
-               $dbr = $this->getConnection( DB_REPLICA );
+               $dbr = $this->getConnectionRef( DB_REPLICA );
 
                $lb = new LinkBatch( $targetsToLoad );
                $res = $dbr->select(
@@ -581,7 +564,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        ],
                        __METHOD__
                );
-               $this->reuseConnection( $dbr );
 
                foreach ( $res as $row ) {
                        $timestamps[$row->wl_namespace][$row->wl_title] = $row->wl_notificationtimestamp;
@@ -630,13 +612,12 @@ class WatchedItemStore implements StatsdAwareInterface {
                        $this->uncache( $user, $target );
                }
 
-               $dbw = $this->getConnection( DB_MASTER );
+               $dbw = $this->getConnectionRef( DB_MASTER );
                foreach ( array_chunk( $rows, 100 ) as $toInsert ) {
                        // Use INSERT IGNORE to avoid overwriting the notification timestamp
                        // if there's already an entry for this page
                        $dbw->insert( 'watchlist', $toInsert, __METHOD__, 'IGNORE' );
                }
-               $this->reuseConnection( $dbw );
 
                return true;
        }
@@ -660,7 +641,7 @@ class WatchedItemStore implements StatsdAwareInterface {
 
                $this->uncache( $user, $target );
 
-               $dbw = $this->getConnection( DB_MASTER );
+               $dbw = $this->getConnectionRef( DB_MASTER );
                $dbw->delete( 'watchlist',
                        [
                                'wl_user' => $user->getId(),
@@ -669,7 +650,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        ], __METHOD__
                );
                $success = (bool)$dbw->affectedRows();
-               $this->reuseConnection( $dbw );
 
                return $success;
        }
@@ -687,7 +667,7 @@ class WatchedItemStore implements StatsdAwareInterface {
                        return false;
                }
 
-               $dbw = $this->getConnection( DB_MASTER );
+               $dbw = $this->getConnectionRef( DB_MASTER );
 
                $conds = [ 'wl_user' => $user->getId() ];
                if ( $targets ) {
@@ -702,8 +682,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        __METHOD__
                );
 
-               $this->reuseConnection( $dbw );
-
                $this->uncacheUser( $user );
 
                return $success;
@@ -718,7 +696,7 @@ class WatchedItemStore implements StatsdAwareInterface {
         * @return int[] Array of user IDs the timestamp has been updated for
         */
        public function updateNotificationTimestamp( User $editor, LinkTarget $target, $timestamp ) {
-               $dbw = $this->getConnection( DB_MASTER );
+               $dbw = $this->getConnectionRef( DB_MASTER );
                $uids = $dbw->selectFieldValues(
                        'watchlist',
                        'wl_user',
@@ -730,7 +708,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        ],
                        __METHOD__
                );
-               $this->reuseConnection( $dbw );
 
                $watchers = array_map( 'intval', $uids );
                if ( $watchers ) {
@@ -740,7 +717,7 @@ class WatchedItemStore implements StatsdAwareInterface {
                                function () use ( $timestamp, $watchers, $target, $fname ) {
                                        global $wgUpdateRowsPerQuery;
 
-                                       $dbw = $this->getConnection( DB_MASTER );
+                                       $dbw = $this->getConnectionRef( DB_MASTER );
                                        $factory = wfGetLBFactory();
                                        $ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
 
@@ -762,8 +739,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                                                }
                                        }
                                        $this->uncacheLinkTarget( $target );
-
-                                       $this->reuseConnection( $dbw );
                                },
                                DeferredUpdates::POSTSEND,
                                $dbw
@@ -885,7 +860,7 @@ class WatchedItemStore implements StatsdAwareInterface {
                        $queryOptions['LIMIT'] = $unreadLimit;
                }
 
-               $dbr = $this->getConnection( DB_REPLICA );
+               $dbr = $this->getConnectionRef( DB_REPLICA );
                $rowCount = $dbr->selectRowCount(
                        'watchlist',
                        '1',
@@ -896,7 +871,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                        __METHOD__,
                        $queryOptions
                );
-               $this->reuseConnection( $dbr );
 
                if ( !isset( $unreadLimit ) ) {
                        return $rowCount;
@@ -937,7 +911,7 @@ class WatchedItemStore implements StatsdAwareInterface {
         * @param LinkTarget $newTarget
         */
        public function duplicateEntry( LinkTarget $oldTarget, LinkTarget $newTarget ) {
-               $dbw = $this->getConnection( DB_MASTER );
+               $dbw = $this->getConnectionRef( DB_MASTER );
 
                $result = $dbw->select(
                        'watchlist',
@@ -975,8 +949,6 @@ class WatchedItemStore implements StatsdAwareInterface {
                                __METHOD__
                        );
                }
-
-               $this->reuseConnection( $dbw );
        }
 
 }
index a5ae461..0065135 100644 (file)
@@ -23,6 +23,7 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
 use MediaWiki\Session\Session;
 use MediaWiki\Session\SessionId;
 use MediaWiki\Session\SessionManager;
@@ -1222,7 +1223,8 @@ HTML;
                # Append XFF
                $forwardedFor = $this->getHeader( 'X-Forwarded-For' );
                if ( $forwardedFor !== false ) {
-                       $isConfigured = IP::isConfiguredProxy( $ip );
+                       $proxyLookup = MediaWikiServices::getInstance()->getProxyLookup();
+                       $isConfigured = $proxyLookup->isConfiguredProxy( $ip );
                        $ipchain = array_map( 'trim', explode( ',', $forwardedFor ) );
                        $ipchain = array_reverse( $ipchain );
                        array_unshift( $ipchain, $ip );
@@ -1235,14 +1237,14 @@ HTML;
                        foreach ( $ipchain as $i => $curIP ) {
                                $curIP = IP::sanitizeIP( IP::canonicalize( $curIP ) );
                                if ( !$curIP || !isset( $ipchain[$i + 1] ) || $ipchain[$i + 1] === 'unknown'
-                                       || !IP::isTrustedProxy( $curIP )
+                                       || !$proxyLookup->isTrustedProxy( $curIP )
                                ) {
                                        break; // IP is not valid/trusted or does not point to anything
                                }
                                if (
                                        IP::isPublic( $ipchain[$i + 1] ) ||
                                        $wgUsePrivateIPs ||
-                                       IP::isConfiguredProxy( $curIP ) // bug 48919; treat IP as sane
+                                       $proxyLookup->isConfiguredProxy( $curIP ) // bug 48919; treat IP as sane
                                ) {
                                        // Follow the next IP according to the proxy
                                        $nextIP = IP::canonicalize( $ipchain[$i + 1] );
index 90b76e3..339b2e3 100644 (file)
@@ -39,7 +39,11 @@ class WebResponse {
         * @param null|int $http_response_code Forces the HTTP response code to the specified value.
         */
        public function header( $string, $replace = true, $http_response_code = null ) {
-               header( $string, $replace, $http_response_code );
+               if ( $http_response_code ) {
+                       header( $string, $replace, $http_response_code );
+               } else {
+                       header( $string, $replace );
+               }
        }
 
        /**
index 43f7217..b1bd098 100644 (file)
@@ -452,7 +452,7 @@ class Xml {
 
        /**
         * Convenience function to build an HTML submit button
-        * When $wgUseMediaWikiUIEverywhere is true it will default to a constructive button
+        * When $wgUseMediaWikiUIEverywhere is true it will default to a progressive button
         * @param string $value Label text for the button
         * @param array $attribs Optional custom attributes
         * @return string HTML
@@ -467,7 +467,7 @@ class Xml {
                // some submit forms
                // might need to be mw-ui-destructive (e.g. delete a page)
                if ( $wgUseMediaWikiUIEverywhere ) {
-                       $baseAttrs['class'] = 'mw-ui-button mw-ui-constructive';
+                       $baseAttrs['class'] = 'mw-ui-button mw-ui-progressive';
                }
                // Any custom attributes will take precendence of anything in baseAttrs e.g. override the class
                $attribs = $attribs + $baseAttrs;
index 41378fb..1e1bb39 100644 (file)
@@ -105,8 +105,7 @@ class HistoryAction extends FormlessAction {
                $config = $this->context->getConfig();
 
                # Fill in the file cache if not set already
-               $useFileCache = $config->get( 'UseFileCache' );
-               if ( $useFileCache && HTMLFileCache::useFileCache( $this->getContext() ) ) {
+               if ( HTMLFileCache::useFileCache( $this->getContext() ) ) {
                        $cache = new HTMLFileCache( $this->getTitle(), 'history' );
                        if ( !$cache->isCacheGood( /* Assume up to date */ ) ) {
                                ob_start( [ &$cache, 'saveToFileCache' ] );
@@ -140,6 +139,10 @@ class HistoryAction extends FormlessAction {
 
                // Fail nicely if article doesn't exist.
                if ( !$this->page->exists() ) {
+                       global $wgSend404Code;
+                       if ( $wgSend404Code ) {
+                               $out->setStatusCode( 404 );
+                       }
                        $out->addWikiMsg( 'nohistory' );
                        # show deletion/move log if there is an entry
                        LogEventsList::showLogExtract(
index abc7cb2..be3be85 100644 (file)
@@ -294,6 +294,16 @@ class InfoAction extends FormlessAction {
                        $modelHtml
                ];
 
+               if ( $title->inNamespace( NS_USER ) ) {
+                       $pageUser = User::newFromName( $title->getRootText() );
+                       if ( $pageUser && $pageUser->getId() && !$pageUser->isHidden() ) {
+                               $pageInfo['header-basic'][] = [
+                                       $this->msg( 'pageinfo-user-id' ),
+                                       $pageUser->getId()
+                               ];
+                       }
+               }
+
                // Search engine status
                $pOutput = new ParserOutput();
                if ( isset( $pageProperties['noindex'] ) ) {
@@ -631,14 +641,15 @@ class InfoAction extends FormlessAction {
                                        $more = null;
                                }
 
+                               $templateListFormatter = new TemplatesOnThisPageFormatter(
+                                       $this->getContext(),
+                                       $linkRenderer
+                               );
+
                                $pageInfo['header-properties'][] = [
                                        $this->msg( 'pageinfo-templates' )
                                                ->numParams( $pageCounts['transclusion']['from'] ),
-                                       Linker::formatTemplates(
-                                               $transcludedTemplates,
-                                               false,
-                                               false,
-                                               $more )
+                                       $templateListFormatter->format( $transcludedTemplates, false, $more )
                                ];
                        }
 
@@ -654,14 +665,15 @@ class InfoAction extends FormlessAction {
                                        $more = null;
                                }
 
+                               $templateListFormatter = new TemplatesOnThisPageFormatter(
+                                       $this->getContext(),
+                                       $linkRenderer
+                               );
+
                                $pageInfo['header-properties'][] = [
                                        $this->msg( 'pageinfo-transclusions' )
                                                ->numParams( $pageCounts['transclusion']['to'] ),
-                                       Linker::formatTemplates(
-                                               $transcludedTargets,
-                                               false,
-                                               false,
-                                               $more )
+                                       $templateListFormatter->format( $transcludedTargets, false, $more )
                                ];
                        }
                }
@@ -688,7 +700,6 @@ class InfoAction extends FormlessAction {
 
                                $dbr = wfGetDB( DB_REPLICA );
                                $dbrWatchlist = wfGetDB( DB_REPLICA, 'watchlist' );
-
                                $setOpts += Database::getCacheSetOptions( $dbr, $dbrWatchlist );
 
                                $watchedItemStore = MediaWikiServices::getInstance()->getWatchedItemStore();
index 8e57f93..1a42ccc 100644 (file)
@@ -191,8 +191,6 @@ class ApiAuthManagerHelper {
         * @return array
         */
        public function formatAuthenticationResponse( AuthenticationResponse $res ) {
-               $params = $this->module->extractRequestParams();
-
                $ret = [
                        'status' => $res->status,
                ];
index f763e45..506ff73 100644 (file)
@@ -600,7 +600,7 @@ abstract class ApiBase extends ContextSource {
 
        /**
         * Gets a default replica DB connection object
-        * @return DatabaseBase
+        * @return Database
         */
        protected function getDB() {
                if ( !isset( $this->mSlaveDB ) ) {
@@ -2680,275 +2680,6 @@ abstract class ApiBase extends ContextSource {
                return false;
        }
 
-       /**
-        * Generates help message for this module, or false if there is no description
-        * @deprecated since 1.25
-        * @return string|bool
-        */
-       public function makeHelpMsg() {
-               wfDeprecated( __METHOD__, '1.25' );
-               static $lnPrfx = "\n  ";
-
-               $msg = $this->getFinalDescription();
-
-               if ( $msg !== false ) {
-
-                       if ( !is_array( $msg ) ) {
-                               $msg = [
-                                       $msg
-                               ];
-                       }
-                       $msg = $lnPrfx . implode( $lnPrfx, $msg ) . "\n";
-
-                       $msg .= $this->makeHelpArrayToString( $lnPrfx, false, $this->getHelpUrls() );
-
-                       if ( $this->isReadMode() ) {
-                               $msg .= "\nThis module requires read rights";
-                       }
-                       if ( $this->isWriteMode() ) {
-                               $msg .= "\nThis module requires write rights";
-                       }
-                       if ( $this->mustBePosted() ) {
-                               $msg .= "\nThis module only accepts POST requests";
-                       }
-                       if ( $this->isReadMode() || $this->isWriteMode() ||
-                               $this->mustBePosted()
-                       ) {
-                               $msg .= "\n";
-                       }
-
-                       // Parameters
-                       $paramsMsg = $this->makeHelpMsgParameters();
-                       if ( $paramsMsg !== false ) {
-                               $msg .= "Parameters:\n$paramsMsg";
-                       }
-
-                       $examples = $this->getExamples();
-                       if ( $examples ) {
-                               if ( !is_array( $examples ) ) {
-                                       $examples = [
-                                               $examples
-                                       ];
-                               }
-                               $msg .= 'Example' . ( count( $examples ) > 1 ? 's' : '' ) . ":\n";
-                               foreach ( $examples as $k => $v ) {
-                                       if ( is_numeric( $k ) ) {
-                                               $msg .= "  $v\n";
-                                       } else {
-                                               if ( is_array( $v ) ) {
-                                                       $msgExample = implode( "\n", array_map( [ $this, 'indentExampleText' ], $v ) );
-                                               } else {
-                                                       $msgExample = "  $v";
-                                               }
-                                               $msgExample .= ':';
-                                               $msg .= wordwrap( $msgExample, 100, "\n" ) . "\n    $k\n";
-                                       }
-                               }
-                       }
-               }
-
-               return $msg;
-       }
-
-       /**
-        * @deprecated since 1.25
-        * @param string $item
-        * @return string
-        */
-       private function indentExampleText( $item ) {
-               return '  ' . $item;
-       }
-
-       /**
-        * @deprecated since 1.25
-        * @param string $prefix Text to split output items
-        * @param string $title What is being output
-        * @param string|array $input
-        * @return string
-        */
-       protected function makeHelpArrayToString( $prefix, $title, $input ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               if ( $input === false ) {
-                       return '';
-               }
-               if ( !is_array( $input ) ) {
-                       $input = [ $input ];
-               }
-
-               if ( count( $input ) > 0 ) {
-                       if ( $title ) {
-                               $msg = $title . ( count( $input ) > 1 ? 's' : '' ) . ":\n  ";
-                       } else {
-                               $msg = '  ';
-                       }
-                       $msg .= implode( $prefix, $input ) . "\n";
-
-                       return $msg;
-               }
-
-               return '';
-       }
-
-       /**
-        * Generates the parameter descriptions for this module, to be displayed in the
-        * module's help.
-        * @deprecated since 1.25
-        * @return string|bool
-        */
-       public function makeHelpMsgParameters() {
-               wfDeprecated( __METHOD__, '1.25' );
-               $params = $this->getFinalParams( ApiBase::GET_VALUES_FOR_HELP );
-               if ( $params ) {
-                       $paramsDescription = $this->getFinalParamDescription();
-                       $msg = '';
-                       $paramPrefix = "\n" . str_repeat( ' ', 24 );
-                       $descWordwrap = "\n" . str_repeat( ' ', 28 );
-                       foreach ( $params as $paramName => $paramSettings ) {
-                               $desc = isset( $paramsDescription[$paramName] ) ? $paramsDescription[$paramName] : '';
-                               if ( is_array( $desc ) ) {
-                                       $desc = implode( $paramPrefix, $desc );
-                               }
-
-                               // handle shorthand
-                               if ( !is_array( $paramSettings ) ) {
-                                       $paramSettings = [
-                                               self::PARAM_DFLT => $paramSettings,
-                                       ];
-                               }
-
-                               // handle missing type
-                               if ( !isset( $paramSettings[ApiBase::PARAM_TYPE] ) ) {
-                                       $dflt = isset( $paramSettings[ApiBase::PARAM_DFLT] )
-                                               ? $paramSettings[ApiBase::PARAM_DFLT]
-                                               : null;
-                                       if ( is_bool( $dflt ) ) {
-                                               $paramSettings[ApiBase::PARAM_TYPE] = 'boolean';
-                                       } elseif ( is_string( $dflt ) || is_null( $dflt ) ) {
-                                               $paramSettings[ApiBase::PARAM_TYPE] = 'string';
-                                       } elseif ( is_int( $dflt ) ) {
-                                               $paramSettings[ApiBase::PARAM_TYPE] = 'integer';
-                                       }
-                               }
-
-                               if ( isset( $paramSettings[self::PARAM_DEPRECATED] )
-                                       && $paramSettings[self::PARAM_DEPRECATED]
-                               ) {
-                                       $desc = "DEPRECATED! $desc";
-                               }
-
-                               if ( isset( $paramSettings[self::PARAM_REQUIRED] )
-                                       && $paramSettings[self::PARAM_REQUIRED]
-                               ) {
-                                       $desc .= $paramPrefix . 'This parameter is required';
-                               }
-
-                               $type = isset( $paramSettings[self::PARAM_TYPE] )
-                                       ? $paramSettings[self::PARAM_TYPE]
-                                       : null;
-                               if ( isset( $type ) ) {
-                                       $hintPipeSeparated = true;
-                                       $multi = isset( $paramSettings[self::PARAM_ISMULTI] )
-                                               ? $paramSettings[self::PARAM_ISMULTI]
-                                               : false;
-                                       if ( $multi ) {
-                                               $prompt = 'Values (separate with \'|\'): ';
-                                       } else {
-                                               $prompt = 'One value: ';
-                                       }
-
-                                       if ( $type === 'submodule' ) {
-                                               if ( isset( $paramSettings[self::PARAM_SUBMODULE_MAP] ) ) {
-                                                       $type = array_keys( $paramSettings[self::PARAM_SUBMODULE_MAP] );
-                                               } else {
-                                                       $type = $this->getModuleManager()->getNames( $paramName );
-                                               }
-                                               sort( $type );
-                                       }
-                                       if ( is_array( $type ) ) {
-                                               $choices = [];
-                                               $nothingPrompt = '';
-                                               foreach ( $type as $t ) {
-                                                       if ( $t === '' ) {
-                                                               $nothingPrompt = 'Can be empty, or ';
-                                                       } else {
-                                                               $choices[] = $t;
-                                                       }
-                                               }
-                                               $desc .= $paramPrefix . $nothingPrompt . $prompt;
-                                               $choicesstring = implode( ', ', $choices );
-                                               $desc .= wordwrap( $choicesstring, 100, $descWordwrap );
-                                               $hintPipeSeparated = false;
-                                       } else {
-                                               switch ( $type ) {
-                                                       case 'namespace':
-                                                               // Special handling because namespaces are
-                                                               // type-limited, yet they are not given
-                                                               $desc .= $paramPrefix . $prompt;
-                                                               $desc .= wordwrap( implode( ', ', MWNamespace::getValidNamespaces() ),
-                                                                       100, $descWordwrap );
-                                                               $hintPipeSeparated = false;
-                                                               break;
-                                                       case 'limit':
-                                                               $desc .= $paramPrefix . "No more than {$paramSettings[self::PARAM_MAX]}";
-                                                               if ( isset( $paramSettings[self::PARAM_MAX2] ) ) {
-                                                                       $desc .= " ({$paramSettings[self::PARAM_MAX2]} for bots)";
-                                                               }
-                                                               $desc .= ' allowed';
-                                                               break;
-                                                       case 'integer':
-                                                               $s = $multi ? 's' : '';
-                                                               $hasMin = isset( $paramSettings[self::PARAM_MIN] );
-                                                               $hasMax = isset( $paramSettings[self::PARAM_MAX] );
-                                                               if ( $hasMin || $hasMax ) {
-                                                                       if ( !$hasMax ) {
-                                                                               $intRangeStr = "The value$s must be no less than " .
-                                                                                       "{$paramSettings[self::PARAM_MIN]}";
-                                                                       } elseif ( !$hasMin ) {
-                                                                               $intRangeStr = "The value$s must be no more than " .
-                                                                                       "{$paramSettings[self::PARAM_MAX]}";
-                                                                       } else {
-                                                                               $intRangeStr = "The value$s must be between " .
-                                                                                       "{$paramSettings[self::PARAM_MIN]} and {$paramSettings[self::PARAM_MAX]}";
-                                                                       }
-
-                                                                       $desc .= $paramPrefix . $intRangeStr;
-                                                               }
-                                                               break;
-                                                       case 'upload':
-                                                               $desc .= $paramPrefix . 'Must be posted as a file upload using multipart/form-data';
-                                                               break;
-                                               }
-                                       }
-
-                                       if ( $multi ) {
-                                               if ( $hintPipeSeparated ) {
-                                                       $desc .= $paramPrefix . "Separate values with '|'";
-                                               }
-
-                                               $isArray = is_array( $type );
-                                               if ( !$isArray
-                                                       || $isArray && count( $type ) > self::LIMIT_SML1
-                                               ) {
-                                                       $desc .= $paramPrefix . 'Maximum number of values ' .
-                                                               self::LIMIT_SML1 . ' (' . self::LIMIT_SML2 . ' for bots)';
-                                               }
-                                       }
-                               }
-
-                               $default = isset( $paramSettings[self::PARAM_DFLT] ) ? $paramSettings[self::PARAM_DFLT] : null;
-                               if ( !is_null( $default ) && $default !== false ) {
-                                       $desc .= $paramPrefix . "Default: $default";
-                               }
-
-                               $msg .= sprintf( "  %-19s - %s\n", $this->encodeParamName( $paramName ), $desc );
-                       }
-
-                       return $msg;
-               }
-
-               return false;
-       }
-
        /**
         * @deprecated since 1.25, always returns empty string
         * @param IDatabase|bool $db
@@ -3014,16 +2745,6 @@ abstract class ApiBase extends ContextSource {
                return 0;
        }
 
-       /**
-        * Get the result data array (read-only)
-        * @deprecated since 1.25, use $this->getResult() methods instead
-        * @return array
-        */
-       public function getResultData() {
-               wfDeprecated( __METHOD__, '1.25' );
-               return $this->getResult()->getData();
-       }
-
        /**
         * Call wfTransactionalTimeLimit() if this request was POSTed
         * @since 1.26
index 407ae71..5a0edfc 100644 (file)
@@ -85,7 +85,6 @@ class ApiCSPReport extends ApiBase {
         */
        private function getFlags( $report ) {
                $reportOnly = $this->getParameter( 'reportonly' );
-               $userAgent = $this->getRequest()->getHeader( 'user-agent' );
                $source = $this->getParameter( 'source' );
                $falsePositives = $this->getConfig()->get( 'CSPFalsePositiveUrls' );
 
index 4ddbd04..13b3577 100644 (file)
 class ApiClearHasMsg extends ApiBase {
        public function execute() {
                $user = $this->getUser();
-               $user->setNewtalk( false );
+               if ( $this->getRequest()->wasPosted() ) {
+                       $user->setNewtalk( false );
+               } else {
+                       DeferredUpdates::addCallableUpdate( function () use ( $user ) {
+                               $user->setNewtalk( false );
+                       } );
+               }
                $this->getResult()->addValue( null, $this->getModuleName(), 'success' );
        }
 
index 6601fb7..19e2453 100644 (file)
@@ -31,6 +31,7 @@ class ApiContinuationManager {
 
        private $continuationData = [];
        private $generatorContinuationData = [];
+       private $generatorNonContinuationData = [];
 
        private $generatorParams = [];
        private $generatorDone = false;
@@ -142,6 +143,26 @@ class ApiContinuationManager {
                $this->continuationData[$name][$paramName] = $paramValue;
        }
 
+       /**
+        * Set the non-continuation parameter for the generator module
+        *
+        * In case the generator isn't going to be continued, this sets the fields
+        * to return.
+        *
+        * @since 1.28
+        * @param ApiBase $module
+        * @param string $paramName
+        * @param string|array $paramValue
+        */
+       public function addGeneratorNonContinueParam( ApiBase $module, $paramName, $paramValue ) {
+               $name = $module->getModuleName();
+               $paramName = $module->encodeParamName( $paramName );
+               if ( is_array( $paramValue ) ) {
+                       $paramValue = implode( '|', $paramValue );
+               }
+               $this->generatorNonContinuationData[$name][$paramName] = $paramValue;
+       }
+
        /**
         * Set the continuation parameter for the generator module
         * @param ApiBase $module
@@ -165,6 +186,15 @@ class ApiContinuationManager {
                return array_merge_recursive( $this->continuationData, $this->generatorContinuationData );
        }
 
+       /**
+        * Fetch raw non-continuation data
+        * @since 1.28
+        * @return array
+        */
+       public function getRawNonContinuation() {
+               return $this->generatorNonContinuationData;
+       }
+
        /**
         * Fetch continuation result data
         * @return array [ (array)$data, (bool)$batchcomplete ]
@@ -192,8 +222,13 @@ class ApiContinuationManager {
                        foreach ( $continuationData as $module => $kvp ) {
                                $data += $kvp;
                        }
-                       $data += $this->generatorParams;
-                       $generatorKeys = implode( '|', array_keys( $this->generatorParams ) );
+                       $generatorParams = [];
+                       foreach ( $this->generatorNonContinuationData as $kvp ) {
+                               $generatorParams += $kvp;
+                       }
+                       $generatorParams += $this->generatorParams;
+                       $data += $generatorParams;
+                       $generatorKeys = implode( '|', array_keys( $generatorParams ) );
                } elseif ( $this->generatorContinuationData ) {
                        // All the generator-using modules are complete, but the
                        // generator isn't. Continue the generator and restart the
index 77911b0..993c23e 100644 (file)
@@ -73,10 +73,11 @@ class ApiDelete extends ApiBase {
                                $user,
                                $params['oldimage'],
                                $reason,
-                               false
+                               false,
+                               $params['tags']
                        );
                } else {
-                       $status = self::delete( $pageObj, $user, $reason );
+                       $status = self::delete( $pageObj, $user, $reason, $params['tags'] );
                }
 
                if ( is_array( $status ) ) {
@@ -96,11 +97,6 @@ class ApiDelete extends ApiBase {
                }
                $this->setWatch( $watch, $titleObj, 'watchdeletion' );
 
-               // Apply change tags to the log entry, if requested
-               if ( count( $params['tags'] ) ) {
-                       ChangeTags::addTags( $params['tags'], null, null, $status->value, null );
-               }
-
                $r = [
                        'title' => $titleObj->getPrefixedText(),
                        'reason' => $reason,
@@ -115,9 +111,10 @@ class ApiDelete extends ApiBase {
         * @param Page|WikiPage $page Page or WikiPage object to work on
         * @param User $user User doing the action
         * @param string|null $reason Reason for the deletion. Autogenerated if null
+        * @param array $tags Tags to tag the deletion with
         * @return Status|array
         */
-       protected static function delete( Page $page, User $user, &$reason = null ) {
+       protected static function delete( Page $page, User $user, &$reason = null, $tags = [] ) {
                $title = $page->getTitle();
 
                // Auto-generate a summary, if necessary
@@ -134,7 +131,7 @@ class ApiDelete extends ApiBase {
                $error = '';
 
                // Luckily, Article.php provides a reusable delete function that does the hard work for us
-               return $page->doDeleteArticleReal( $reason, false, 0, true, $error, $user );
+               return $page->doDeleteArticleReal( $reason, false, 0, true, $error, $user, $tags );
        }
 
        /**
@@ -143,16 +140,17 @@ class ApiDelete extends ApiBase {
         * @param string $oldimage Archive name
         * @param string $reason Reason for the deletion. Autogenerated if null.
         * @param bool $suppress Whether to mark all deleted versions as restricted
+        * @param array $tags Tags to tag the deletion with
         * @return Status|array
         */
        protected static function deleteFile( Page $page, User $user, $oldimage,
-               &$reason = null, $suppress = false
+               &$reason = null, $suppress = false, $tags = []
        ) {
                $title = $page->getTitle();
 
                $file = $page->getFile();
                if ( !$file->exists() || !$file->isLocal() || $file->getRedirected() ) {
-                       return self::delete( $page, $user, $reason );
+                       return self::delete( $page, $user, $reason, $tags );
                }
 
                if ( $oldimage ) {
@@ -169,7 +167,7 @@ class ApiDelete extends ApiBase {
                        $reason = '';
                }
 
-               return FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, $suppress, $user );
+               return FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, $suppress, $user, $tags );
        }
 
        public function mustBePosted() {
index ee9150c..d6de834 100644 (file)
@@ -532,7 +532,7 @@ class ApiEditPage extends ApiBase {
 
                        case EditPage::AS_END:
                        default:
-                               // $status came from WikiPage::doEdit()
+                               // $status came from WikiPage::doEditContent()
                                $errors = $status->getErrorsArray();
                                $this->dieUsageMsg( $errors[0] ); // TODO: Add new errors to message map
                                break;
index c826bba..4c406a7 100644 (file)
@@ -231,6 +231,7 @@ abstract class ApiFormatBase extends ApiBase {
                                                        $out->getModuleScripts(),
                                                        $out->getModuleStyles()
                                                ) ) ),
+                                               'continue' => $this->getResult()->getResultData( 'continue' ),
                                                'time' => round( $time * 1000 ),
                                        ],
                                        false, FormatJson::ALL_OK
@@ -300,144 +301,6 @@ abstract class ApiFormatBase extends ApiBase {
                return 'https://www.mediawiki.org/wiki/API:Data_formats';
        }
 
-       /************************************************************************//**
-        * @name   Deprecated
-        * @{
-        */
-
-       /**
-        * Specify whether or not sequences like &amp;quot; should be unescaped
-        * to &quot; . This should only be set to true for the help message
-        * when rendered in the default (xmlfm) format. This is a temporary
-        * special-case fix that should be removed once the help has been
-        * reworked to use a fully HTML interface.
-        *
-        * @deprecated since 1.25
-        * @param bool $b Whether or not ampersands should be escaped.
-        */
-       public function setUnescapeAmps( $b ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               $this->mUnescapeAmps = $b;
-       }
-
-       /**
-        * Whether this formatter can format the help message in a nice way.
-        * By default, this returns the same as getIsHtml().
-        * When action=help is set explicitly, the help will always be shown
-        * @deprecated since 1.25
-        * @return bool
-        */
-       public function getWantsHelp() {
-               wfDeprecated( __METHOD__, '1.25' );
-               return $this->getIsHtml();
-       }
-
-       /**
-        * Sets whether the pretty-printer should format *bold*
-        * @deprecated since 1.25
-        * @param bool $help
-        */
-       public function setHelp( $help = true ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               $this->mHelp = $help;
-       }
-
-       /**
-        * Pretty-print various elements in HTML format, such as xml tags and
-        * URLs. This method also escapes characters like <
-        * @deprecated since 1.25
-        * @param string $text
-        * @return string
-        */
-       protected function formatHTML( $text ) {
-               wfDeprecated( __METHOD__, '1.25' );
-
-               // Escape everything first for full coverage
-               $text = htmlspecialchars( $text );
-
-               if ( $this->mFormat === 'XML' ) {
-                       // encode all comments or tags as safe blue strings
-                       $text = str_replace( '&lt;', '<span style="color:blue;">&lt;', $text );
-                       $text = str_replace( '&gt;', '&gt;</span>', $text );
-               }
-
-               // identify requests to api.php
-               $text = preg_replace( '#^(\s*)(api\.php\?[^ <\n\t]+)$#m', '\1<a href="\2">\2</a>', $text );
-               if ( $this->mHelp ) {
-                       // make lines inside * bold
-                       $text = preg_replace( '#^(\s*)(\*[^<>\n]+\*)(\s*)$#m', '$1<b>$2</b>$3', $text );
-               }
-
-               // Armor links (bug 61362)
-               $masked = [];
-               $text = preg_replace_callback( '#<a .*?</a>#', function ( $matches ) use ( &$masked ) {
-                       $sha = sha1( $matches[0] );
-                       $masked[$sha] = $matches[0];
-                       return "<$sha>";
-               }, $text );
-
-               // identify URLs
-               $protos = wfUrlProtocolsWithoutProtRel();
-               // This regex hacks around bug 13218 (&quot; included in the URL)
-               $text = preg_replace(
-                       "#(((?i)$protos).*?)(&quot;)?([ \\'\"<>\n]|&lt;|&gt;|&quot;)#",
-                       '<a href="\\1">\\1</a>\\3\\4',
-                       $text
-               );
-
-               // Unarmor links
-               $text = preg_replace_callback( '#<([0-9a-f]{40})>#', function ( $matches ) use ( &$masked ) {
-                       $sha = $matches[1];
-                       return isset( $masked[$sha] ) ? $masked[$sha] : $matches[0];
-               }, $text );
-
-               /**
-                * Temporary fix for bad links in help messages. As a special case,
-                * XML-escaped metachars are de-escaped one level in the help message
-                * for legibility. Should be removed once we have completed a fully-HTML
-                * version of the help message.
-                */
-               if ( $this->mUnescapeAmps ) {
-                       $text = preg_replace( '/&amp;(amp|quot|lt|gt);/', '&\1;', $text );
-               }
-
-               return $text;
-       }
-
-       /**
-        * @see ApiBase::getDescription
-        * @deprecated since 1.25
-        */
-       public function getDescription() {
-               return $this->getIsHtml() ? ' (pretty-print in HTML)' : '';
-       }
-
-       /**
-        * Set the flag to buffer the result instead of printing it.
-        * @deprecated since 1.25, output is always buffered
-        * @param bool $value
-        */
-       public function setBufferResult( $value ) {
-       }
-
-       /**
-        * Formerly indicated whether the formatter needed metadata from ApiResult.
-        *
-        * ApiResult previously (indirectly) used this to decide whether to add
-        * metadata or to ignore calls to metadata-setting methods, which
-        * unfortunately made several methods that should have been static have to
-        * be dynamic instead. Now ApiResult always stores metadata and formatters
-        * are required to ignore it or filter it out.
-        *
-        * @deprecated since 1.25
-        * @return bool Always true
-        */
-       public function getNeedsRawData() {
-               wfDeprecated( __METHOD__, '1.25' );
-               return true;
-       }
-
-       /**@}*/
 }
 
 /**
index 814450e..2e917e1 100644 (file)
@@ -56,15 +56,6 @@ class ApiFormatJson extends ApiFormatBase {
                return 'application/json';
        }
 
-       /**
-        * @deprecated since 1.25
-        */
-       public function getWantsHelp() {
-               wfDeprecated( __METHOD__, '1.25' );
-               // Help is always ugly in JSON
-               return false;
-       }
-
        public function execute() {
                $params = $this->extractRequestParams();
 
index a3bb6a2..02efd7b 100644 (file)
@@ -311,11 +311,11 @@ class ApiHelp extends ApiBase {
                                if ( count( $modules ) === 1 && $m === $modules[0] &&
                                        !( !empty( $options['submodules'] ) && $m->getModuleManager() )
                                ) {
-                                       $link = Html::element( 'b', null, $name );
+                                       $link = Html::element( 'b', [ 'dir' => 'ltr', 'lang' => 'en' ], $name );
                                } else {
                                        $link = SpecialPage::getTitleFor( 'ApiHelp', $m->getModulePath() )->getLocalURL();
                                        $link = Html::element( 'a',
-                                               [ 'href' => $link, 'class' => 'apihelp-linktrail' ],
+                                               [ 'href' => $link, 'class' => 'apihelp-linktrail', 'dir' => 'ltr', 'lang' => 'en' ],
                                                $name
                                        );
                                        $any = true;
@@ -350,7 +350,8 @@ class ApiHelp extends ApiBase {
                                if ( isset( $sourceInfo['namemsg'] ) ) {
                                        $extname = $context->msg( $sourceInfo['namemsg'] )->text();
                                } else {
-                                       $extname = $sourceInfo['name'];
+                                       // Probably English, so wrap it.
+                                       $extname = Html::element( 'span', [ 'dir' => 'ltr', 'lang' => 'en' ], $sourceInfo['name'] );
                                }
                                $help['flags'] .= Html::rawElement( 'li', null,
                                        self::wrap(
@@ -361,7 +362,9 @@ class ApiHelp extends ApiBase {
 
                                $link = SpecialPage::getTitleFor( 'Version', 'License/' . $sourceInfo['name'] );
                                if ( isset( $sourceInfo['license-name'] ) ) {
-                                       $msg = $context->msg( 'api-help-license', $link, $sourceInfo['license-name'] );
+                                       $msg = $context->msg( 'api-help-license', $link,
+                                               Html::element( 'span', [ 'dir' => 'ltr', 'lang' => 'en' ], $sourceInfo['license-name'] )
+                                       );
                                } elseif ( SpecialVersion::getExtLicenseFileName( dirname( $sourceInfo['path'] ) ) ) {
                                        $msg = $context->msg( 'api-help-license-noname', $link );
                                } else {
@@ -403,7 +406,7 @@ class ApiHelp extends ApiBase {
                                $help['help-urls'] .= Html::openElement( 'ul' );
                                foreach ( $urls as $url ) {
                                        $help['help-urls'] .= Html::rawElement( 'li', null,
-                                               Html::element( 'a', [ 'href' => $url ], $url )
+                                               Html::element( 'a', [ 'href' => $url, 'dir' => 'ltr' ], $url )
                                        );
                                }
                                $help['help-urls'] .= Html::closeElement( 'ul' );
@@ -432,8 +435,9 @@ class ApiHelp extends ApiBase {
                                                $settings = [ ApiBase::PARAM_DFLT => $settings ];
                                        }
 
-                                       $help['parameters'] .= Html::element( 'dt', null,
-                                               $module->encodeParamName( $name ) );
+                                       $help['parameters'] .= Html::rawElement( 'dt', null,
+                                               Html::element( 'span', [ 'dir' => 'ltr', 'lang' => 'en' ], $module->encodeParamName( $name ) )
+                                       );
 
                                        // Add description
                                        $description = [];
@@ -488,8 +492,9 @@ class ApiHelp extends ApiBase {
                                                        $links = isset( $settings[ApiBase::PARAM_VALUE_LINKS] )
                                                                ? $settings[ApiBase::PARAM_VALUE_LINKS]
                                                                : [];
-                                                       $type = array_map( function ( $v ) use ( $links ) {
-                                                               $ret = wfEscapeWikiText( $v );
+                                                       $values = array_map( function ( $v ) use ( $links ) {
+                                                               // We can't know whether this contains LTR or RTL text.
+                                                               $ret = $v === '' ? $v : Html::element( 'span', [ 'dir' => 'auto' ], $v );
                                                                if ( isset( $links[$v] ) ) {
                                                                        $ret = "[[{$links[$v]}|$ret]]";
                                                                }
@@ -497,17 +502,17 @@ class ApiHelp extends ApiBase {
                                                        }, $type );
                                                        $i = array_search( '', $type, true );
                                                        if ( $i === false ) {
-                                                               $type = $context->getLanguage()->commaList( $type );
+                                                               $values = $context->getLanguage()->commaList( $values );
                                                        } else {
-                                                               unset( $type[$i] );
-                                                               $type = $context->msg( 'api-help-param-list-can-be-empty' )
-                                                                       ->numParams( count( $type ) )
-                                                                       ->params( $context->getLanguage()->commaList( $type ) )
+                                                               unset( $values[$i] );
+                                                               $values = $context->msg( 'api-help-param-list-can-be-empty' )
+                                                                       ->numParams( count( $values ) )
+                                                                       ->params( $context->getLanguage()->commaList( $values ) )
                                                                        ->parse();
                                                        }
                                                        $info[] = $context->msg( 'api-help-param-list' )
                                                                ->params( $multi ? 2 : 1 )
-                                                               ->params( $type )
+                                                               ->params( $values )
                                                                ->parse();
                                                        $hintPipeSeparated = false;
                                                } else {
@@ -527,7 +532,8 @@ class ApiHelp extends ApiBase {
                                                                                $prefix = $module->isMain()
                                                                                        ? '' : ( $module->getModulePath() . '+' );
                                                                                $submodules = array_map( function ( $name ) use ( $prefix ) {
-                                                                                       return "[[Special:ApiHelp/{$prefix}{$name}|{$name}]]";
+                                                                                       $text = Html::element( 'span', [ 'dir' => 'ltr', 'lang' => 'en' ], $name );
+                                                                                       return "[[Special:ApiHelp/{$prefix}{$name}|{$text}]]";
                                                                                }, $submodules );
                                                                        }
                                                                        $count = count( $submodules );
@@ -650,8 +656,9 @@ class ApiHelp extends ApiBase {
                                                $info[] = $context->msg( 'api-help-param-default-empty' )
                                                        ->parse();
                                        } elseif ( $default !== null && $default !== false ) {
+                                               // We can't know whether this contains LTR or RTL text.
                                                $info[] = $context->msg( 'api-help-param-default' )
-                                                       ->params( wfEscapeWikiText( $default ) )
+                                                       ->params( Html::element( 'span', [ 'dir' => 'auto' ], $default ) )
                                                        ->parse();
                                        }
 
@@ -723,7 +730,7 @@ class ApiHelp extends ApiBase {
                                        $sandbox = SpecialPage::getTitleFor( 'ApiSandbox' )->getLocalURL() . '#' . $qs;
                                        $help['examples'] .= Html::rawElement( 'dt', null, $msg->parse() );
                                        $help['examples'] .= Html::rawElement( 'dd', null,
-                                               Html::element( 'a', [ 'href' => $link ], "api.php?$qs" ) . ' ' .
+                                               Html::element( 'a', [ 'href' => $link, 'dir' => 'ltr' ], "api.php?$qs" ) . ' ' .
                                                Html::rawElement( 'a', [ 'href' => $sandbox ],
                                                        $context->msg( 'api-help-open-in-apisandbox' )->parse() )
                                        );
index 573524a..45378ee 100644 (file)
@@ -64,7 +64,8 @@ class ApiHelpParamValueMessage extends Message {
         */
        public function fetchMessage() {
                if ( $this->message === null ) {
-                       $this->message = ";{$this->paramValue}:" . parent::fetchMessage();
+                       $this->message = ";<span dir=\"ltr\" lang=\"en\">{$this->paramValue}</span>:"
+                               . parent::fetchMessage();
                }
                return $this->message;
        }
index 2b99353..37cb80a 100644 (file)
 class ApiImageRotate extends ApiBase {
        private $mPageSet = null;
 
-       /**
-        * Add all items from $values into the result
-        * @param array $result Output
-        * @param array $values Values to add
-        * @param string $flag The name of the boolean flag to mark this element
-        * @param string $name If given, name of the value
-        */
-       private static function addValues( array &$result, $values, $flag = null, $name = null ) {
-               foreach ( $values as $val ) {
-                       if ( $val instanceof Title ) {
-                               $v = [];
-                               ApiQueryBase::addTitleInfo( $v, $val );
-                       } elseif ( $name !== null ) {
-                               $v = [ $name => $val ];
-                       } else {
-                               $v = $val;
-                       }
-                       if ( $flag !== null ) {
-                               $v[$flag] = true;
-                       }
-                       $result[] = $v;
-               }
-       }
-
        public function execute() {
                $this->useTransactionalTimeLimit();
 
@@ -62,11 +38,9 @@ class ApiImageRotate extends ApiBase {
 
                $result = [];
 
-               self::addValues( $result, $pageSet->getInvalidTitlesAndReasons(), 'invalid' );
-               self::addValues( $result, $pageSet->getSpecialTitles(), 'special', 'title' );
-               self::addValues( $result, $pageSet->getMissingPageIDs(), 'missing', 'pageid' );
-               self::addValues( $result, $pageSet->getMissingRevisionIDs(), 'missing', 'revid' );
-               self::addValues( $result, $pageSet->getInterwikiTitlesAsResult() );
+               $result = $pageSet->getInvalidTitlesAndRevisions( [
+                       'invalidTitles', 'special', 'missingIds', 'missingRevIds', 'interwikiTitles',
+               ] );
 
                foreach ( $pageSet->getTitles() as $title ) {
                        $r = [];
@@ -74,6 +48,9 @@ class ApiImageRotate extends ApiBase {
                        ApiQueryBase::addTitleInfo( $r, $title );
                        if ( !$title->exists() ) {
                                $r['missing'] = true;
+                               if ( $title->isKnown() ) {
+                                       $r['known'] = true;
+                               }
                        }
 
                        $file = wfFindFile( $title, [ 'latest' => true ] );
@@ -108,7 +85,7 @@ class ApiImageRotate extends ApiBase {
                                continue;
                        }
                        $ext = strtolower( pathinfo( "$srcPath", PATHINFO_EXTENSION ) );
-                       $tmpFile = TempFSFile::factory( 'rotate_', $ext );
+                       $tmpFile = TempFSFile::factory( 'rotate_', $ext, wfTempDir() );
                        $dstPath = $tmpFile->getPath();
                        $err = $handler->rotate( $file, [
                                'srcPath' => $srcPath,
index 55edd99..6ac261d 100644 (file)
@@ -190,15 +190,6 @@ class ApiLogin extends ApiBase {
 
                                $result['lguserid'] = intval( $user->getId() );
                                $result['lgusername'] = $user->getName();
-
-                               // @todo: These are deprecated, and should be removed at some
-                               // point (1.28 at the earliest, and see T121527). They were ok
-                               // when the core cookie-based login was the only thing, but
-                               // CentralAuth broke that a while back and
-                               // SessionManager/AuthManager *really* break it.
-                               $result['lgtoken'] = $user->getToken();
-                               $result['cookieprefix'] = $this->getConfig()->get( 'CookiePrefix' );
-                               $result['sessionid'] = $session->getId();
                                break;
 
                        case 'NeedToken':
@@ -206,10 +197,6 @@ class ApiLogin extends ApiBase {
                                $this->setWarning( 'Fetching a token via action=login is deprecated. ' .
                                   'Use action=query&meta=tokens&type=login instead.' );
                                $this->logFeatureUsage( 'action=login&!lgtoken' );
-
-                               // @todo: See above about deprecation
-                               $result['cookieprefix'] = $this->getConfig()->get( 'CookiePrefix' );
-                               $result['sessionid'] = $session->getId();
                                break;
 
                        case 'WrongToken':
index 1f3c76a..c8f4460 100644 (file)
@@ -258,7 +258,6 @@ class ApiMain extends ApiBase {
                $this->mResult = new ApiResult( $this->getConfig()->get( 'APIMaxResultSize' ) );
                $this->mErrorFormatter = new ApiErrorFormatter_BackCompat( $this->mResult );
                $this->mResult->setErrorFormatter( $this->mErrorFormatter );
-               $this->mResult->setMainForContinuation( $this );
                $this->mContinuationManager = null;
                $this->mEnableWrite = $enableWrite;
 
@@ -1299,7 +1298,7 @@ class ApiMain extends ApiBase {
                }
 
                if ( $module->isWriteMode()
-                       && in_array( 'bot', $this->getUser()->getGroups() )
+                       && $this->getUser()->isBot()
                        && wfGetLB()->getServerCount() > 1
                ) {
                        $this->checkBotReadOnly();
@@ -1362,6 +1361,15 @@ class ApiMain extends ApiBase {
                                        break;
                        }
                }
+               if ( isset( $params['assertuser'] ) ) {
+                       $assertUser = User::newFromName( $params['assertuser'], false );
+                       if ( !$assertUser || !$this->getUser()->equals( $assertUser ) ) {
+                               $this->dieUsage(
+                                       'Assertion that the user is "' . $params['assertuser'] . '" failed',
+                                       'assertnameduserfailed'
+                               );
+                       }
+               }
        }
 
        /**
@@ -1662,6 +1670,9 @@ class ApiMain extends ApiBase {
                        'assert' => [
                                ApiBase::PARAM_TYPE => [ 'user', 'bot' ]
                        ],
+                       'assertuser' => [
+                               ApiBase::PARAM_TYPE => 'user',
+                       ],
                        'requestid' => null,
                        'servedby' => false,
                        'curtimestamp' => false,
@@ -1816,119 +1827,6 @@ class ApiMain extends ApiBase {
                        $this->getRequest()->getHeader( 'User-agent' )
                );
        }
-
-       /************************************************************************//**
-        * @name   Deprecated
-        * @{
-        */
-
-       /**
-        * Sets whether the pretty-printer should format *bold* and $italics$
-        *
-        * @deprecated since 1.25
-        * @param bool $help
-        */
-       public function setHelp( $help = true ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               $this->mPrinter->setHelp( $help );
-       }
-
-       /**
-        * Override the parent to generate help messages for all available modules.
-        *
-        * @deprecated since 1.25
-        * @return string
-        */
-       public function makeHelpMsg() {
-               wfDeprecated( __METHOD__, '1.25' );
-
-               $this->setHelp();
-               $cacheHelpTimeout = $this->getConfig()->get( 'APICacheHelpTimeout' );
-
-               return ObjectCache::getMainWANInstance()->getWithSetCallback(
-                       wfMemcKey(
-                               'apihelp',
-                               $this->getModuleName(),
-                               str_replace( ' ', '_', SpecialVersion::getVersion( 'nodb' ) )
-                       ),
-                       $cacheHelpTimeout > 0 ? $cacheHelpTimeout : WANObjectCache::TTL_UNCACHEABLE,
-                       [ $this, 'reallyMakeHelpMsg' ]
-               );
-       }
-
-       /**
-        * @deprecated since 1.25
-        * @return mixed|string
-        */
-       public function reallyMakeHelpMsg() {
-               wfDeprecated( __METHOD__, '1.25' );
-               $this->setHelp();
-
-               // Use parent to make default message for the main module
-               $msg = parent::makeHelpMsg();
-
-               $asterisks = str_repeat( '*** ', 14 );
-               $msg .= "\n\n$asterisks Modules  $asterisks\n\n";
-
-               foreach ( $this->mModuleMgr->getNames( 'action' ) as $name ) {
-                       $module = $this->mModuleMgr->getModule( $name );
-                       $msg .= self::makeHelpMsgHeader( $module, 'action' );
-
-                       $msg2 = $module->makeHelpMsg();
-                       if ( $msg2 !== false ) {
-                               $msg .= $msg2;
-                       }
-                       $msg .= "\n";
-               }
-
-               $msg .= "\n$asterisks Permissions $asterisks\n\n";
-               foreach ( self::$mRights as $right => $rightMsg ) {
-                       $rightsMsg = $this->msg( $rightMsg['msg'], $rightMsg['params'] )
-                               ->useDatabase( false )
-                               ->inLanguage( 'en' )
-                               ->text();
-                       $groups = User::getGroupsWithPermission( $right );
-                       $msg .= '* ' . $right . " *\n  $rightsMsg" .
-                               "\nGranted to:\n  " . str_replace( '*', 'all', implode( ', ', $groups ) ) . "\n\n";
-               }
-
-               $msg .= "\n$asterisks Formats  $asterisks\n\n";
-               foreach ( $this->mModuleMgr->getNames( 'format' ) as $name ) {
-                       $module = $this->mModuleMgr->getModule( $name );
-                       $msg .= self::makeHelpMsgHeader( $module, 'format' );
-                       $msg2 = $module->makeHelpMsg();
-                       if ( $msg2 !== false ) {
-                               $msg .= $msg2;
-                       }
-                       $msg .= "\n";
-               }
-
-               $credits = $this->msg( 'api-credits' )->useDatabase( 'false' )->inLanguage( 'en' )->text();
-               $credits = str_replace( "\n", "\n   ", $credits );
-               $msg .= "\n*** Credits: ***\n   $credits\n";
-
-               return $msg;
-       }
-
-       /**
-        * @deprecated since 1.25
-        * @param ApiBase $module
-        * @param string $paramName What type of request is this? e.g. action,
-        *    query, list, prop, meta, format
-        * @return string
-        */
-       public static function makeHelpMsgHeader( $module, $paramName ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               $modulePrefix = $module->getModulePrefix();
-               if ( strval( $modulePrefix ) !== '' ) {
-                       $modulePrefix = "($modulePrefix) ";
-               }
-
-               return "* $paramName={$module->getModuleName()} $modulePrefix*";
-       }
-
-       /**@}*/
-
 }
 
 /**
index ed229cb..46c57b8 100644 (file)
@@ -86,10 +86,10 @@ class ApiPageSet extends ApiBase {
         * Add all items from $values into the result
         * @param array $result Output
         * @param array $values Values to add
-        * @param string $flag The name of the boolean flag to mark this element
+        * @param string[] $flags The names of boolean flags to mark this element
         * @param string $name If given, name of the value
         */
-       private static function addValues( array &$result, $values, $flag = null, $name = null ) {
+       private static function addValues( array &$result, $values, $flags = [], $name = null ) {
                foreach ( $values as $val ) {
                        if ( $val instanceof Title ) {
                                $v = [];
@@ -99,7 +99,7 @@ class ApiPageSet extends ApiBase {
                        } else {
                                $v = $val;
                        }
-                       if ( $flag !== null ) {
+                       foreach ( $flags as $flag ) {
                                $v[$flag] = true;
                        }
                        $result[] = $v;
@@ -309,8 +309,9 @@ class ApiPageSet extends ApiBase {
                        $pageFlds['page_lang'] = null;
                }
 
-               // only store non-default fields
-               $this->mRequestedPageFields = array_diff_key( $this->mRequestedPageFields, $pageFlds );
+               foreach ( LinkCache::getSelectFields() as $field ) {
+                       $pageFlds[$field] = null;
+               }
 
                $pageFlds = array_merge( $pageFlds, $this->mRequestedPageFields );
 
@@ -600,19 +601,39 @@ class ApiPageSet extends ApiBase {
        ) {
                $result = [];
                if ( in_array( 'invalidTitles', $invalidChecks ) ) {
-                       self::addValues( $result, $this->getInvalidTitlesAndReasons(), 'invalid' );
+                       self::addValues( $result, $this->getInvalidTitlesAndReasons(), [ 'invalid' ] );
                }
                if ( in_array( 'special', $invalidChecks ) ) {
-                       self::addValues( $result, $this->getSpecialTitles(), 'special', 'title' );
+                       $known = [];
+                       $unknown = [];
+                       foreach ( $this->getSpecialTitles() as $title ) {
+                               if ( $title->isKnown() ) {
+                                       $known[] = $title;
+                               } else {
+                                       $unknown[] = $title;
+                               }
+                       }
+                       self::addValues( $result, $unknown, [ 'special', 'missing' ] );
+                       self::addValues( $result, $known, [ 'special' ] );
                }
                if ( in_array( 'missingIds', $invalidChecks ) ) {
-                       self::addValues( $result, $this->getMissingPageIDs(), 'missing', 'pageid' );
+                       self::addValues( $result, $this->getMissingPageIDs(), [ 'missing' ], 'pageid' );
                }
                if ( in_array( 'missingRevIds', $invalidChecks ) ) {
-                       self::addValues( $result, $this->getMissingRevisionIDs(), 'missing', 'revid' );
+                       self::addValues( $result, $this->getMissingRevisionIDs(), [ 'missing' ], 'revid' );
                }
                if ( in_array( 'missingTitles', $invalidChecks ) ) {
-                       self::addValues( $result, $this->getMissingTitles(), 'missing' );
+                       $known = [];
+                       $unknown = [];
+                       foreach ( $this->getMissingTitles() as $title ) {
+                               if ( $title->isKnown() ) {
+                                       $known[] = $title;
+                               } else {
+                                       $unknown[] = $title;
+                               }
+                       }
+                       self::addValues( $result, $unknown, [ 'missing' ] );
+                       self::addValues( $result, $known, [ 'missing', 'known' ] );
                }
                if ( in_array( 'interwikiTitles', $invalidChecks ) ) {
                        self::addValues( $result, $this->getInterwikiTitlesAsResult() );
@@ -734,6 +755,8 @@ class ApiPageSet extends ApiBase {
                // Store Title object in various data structures
                $title = Title::newFromRow( $row );
 
+               LinkCache::singleton()->addGoodLinkObjFromRow( $title, $row );
+
                $pageId = intval( $row->page_id );
                $this->mAllPages[$row->page_namespace][$row->page_title] = $pageId;
                $this->mTitles[] = $title;
@@ -863,9 +886,11 @@ class ApiPageSet extends ApiBase {
                        // Any items left in the $remaining list are added as missing
                        if ( $processTitles ) {
                                // The remaining titles in $remaining are non-existent pages
+                               $linkCache = LinkCache::singleton();
                                foreach ( $remaining as $ns => $dbkeys ) {
                                        foreach ( array_keys( $dbkeys ) as $dbkey ) {
                                                $title = Title::makeTitle( $ns, $dbkey );
+                                               $linkCache->addBadLinkObj( $title );
                                                $this->mAllPages[$ns][$dbkey] = $this->mFakePageId;
                                                $this->mMissingPages[$ns][$dbkey] = $this->mFakePageId;
                                                $this->mGoodAndMissingPages[$ns][$dbkey] = $this->mFakePageId;
@@ -1330,7 +1355,7 @@ class ApiPageSet extends ApiBase {
 
        /**
         * Get the database connection (read-only)
-        * @return DatabaseBase
+        * @return Database
         */
        protected function getDB() {
                return $this->mDbSource->getDB();
index 83b5d93..0cad5de 100644 (file)
@@ -641,6 +641,8 @@ class ApiParse extends ApiBase {
                        $hiddencats[$row->page_title] = isset( $row->pp_propname );
                }
 
+               $linkCache = LinkCache::singleton();
+
                foreach ( $links as $link => $sortkey ) {
                        $entry = [];
                        $entry['sortkey'] = $sortkey;
@@ -648,6 +650,14 @@ class ApiParse extends ApiBase {
                        ApiResult::setContentValue( $entry, 'category', (string)$link );
                        if ( !isset( $hiddencats[$link] ) ) {
                                $entry['missing'] = true;
+
+                               // We already know the link doesn't exist in the database, so
+                               // tell LinkCache that before calling $title->isKnown().
+                               $title = Title::makeTitle( NS_CATEGORY, $link );
+                               $linkCache->addBadLinkObj( $title );
+                               if ( $title->isKnown() ) {
+                                       $entry['known'] = true;
+                               }
                        } elseif ( $hiddencats[$link] ) {
                                $entry['hidden'] = true;
                        }
index 5d1352c..8bbd88d 100644 (file)
@@ -37,6 +37,12 @@ class ApiPurge extends ApiBase {
         * Purges the cache of a page
         */
        public function execute() {
+               $main = $this->getMain();
+               if ( !$main->isInternalMode() && !$main->getRequest()->wasPosted() ) {
+                       $this->logFeatureUsage( 'purge-via-GET' );
+                       $this->setWarning( 'Use of action=purge via GET is deprecated. Use POST instead.' );
+               }
+
                $params = $this->extractRequestParams();
 
                $continuationManager = new ApiContinuationManager( $this, [], [] );
@@ -158,6 +164,18 @@ class ApiPurge extends ApiBase {
                return !$this->getUser()->isAllowed( 'purge' );
        }
 
+       protected function getHelpFlags() {
+               $flags = parent::getHelpFlags();
+
+               // Claim that we must be posted for the purposes of help and paraminfo.
+               // @todo Remove this when self::mustBePosted() is updated for T145649
+               if ( !in_array( 'mustbeposted', $flags, true ) ) {
+                       $flags[] = 'mustbeposted';
+               }
+
+               return $flags;
+       }
+
        public function getAllowedParams( $flags = 0 ) {
                $result = [
                        'forcelinkupdate' => false,
index 5eb86ab..16bd725 100644 (file)
@@ -168,7 +168,7 @@ class ApiQuery extends ApiBase {
         * @param string $name Name to assign to the database connection
         * @param int $db One of the DB_* constants
         * @param array $groups Query groups
-        * @return DatabaseBase
+        * @return Database
         */
        public function getNamedDB( $name, $db, $groups ) {
                if ( !array_key_exists( $name, $this->mNamedDB ) ) {
@@ -258,6 +258,11 @@ class ApiQuery extends ApiBase {
                // Write the continuation data into the result
                $this->setContinuationManager( null );
                if ( $this->mParams['rawcontinue'] ) {
+                       $data = $continuationManager->getRawNonContinuation();
+                       if ( $data ) {
+                               $this->getResult()->addValue( null, 'query-noncontinue', $data,
+                                       ApiResult::ADD_ON_TOP | ApiResult::NO_SIZE_CHECK );
+                       }
                        $data = $continuationManager->getRawContinuation();
                        if ( $data ) {
                                $this->getResult()->addValue( null, 'query-continue', $data,
@@ -357,6 +362,9 @@ class ApiQuery extends ApiBase {
                        $vals = [];
                        ApiQueryBase::addTitleInfo( $vals, $title );
                        $vals['missing'] = true;
+                       if ( $title->isKnown() ) {
+                               $vals['known'] = true;
+                       }
                        $pages[$fakeId] = $vals;
                }
                // Report any invalid titles
@@ -367,7 +375,7 @@ class ApiQuery extends ApiBase {
                foreach ( $pageSet->getMissingPageIDs() as $pageid ) {
                        $pages[$pageid] = [
                                'pageid' => $pageid,
-                               'missing' => true
+                               'missing' => true,
                        ];
                }
                // Report special pages
@@ -376,13 +384,7 @@ class ApiQuery extends ApiBase {
                        $vals = [];
                        ApiQueryBase::addTitleInfo( $vals, $title );
                        $vals['special'] = true;
-                       if ( $title->isSpecialPage() &&
-                               !SpecialPageFactory::exists( $title->getDBkey() )
-                       ) {
-                               $vals['missing'] = true;
-                       } elseif ( $title->getNamespace() == NS_MEDIA &&
-                               !wfFindFile( $title )
-                       ) {
+                       if ( !$title->isKnown() ) {
                                $vals['missing'] = true;
                        }
                        $pages[$fakeId] = $vals;
@@ -495,61 +497,6 @@ class ApiQuery extends ApiBase {
                return $result;
        }
 
-       /**
-        * Override the parent to generate help messages for all available query modules.
-        * @deprecated since 1.25
-        * @return string
-        */
-       public function makeHelpMsg() {
-               wfDeprecated( __METHOD__, '1.25' );
-
-               // Use parent to make default message for the query module
-               $msg = parent::makeHelpMsg();
-
-               $querySeparator = str_repeat( '--- ', 12 );
-               $moduleSeparator = str_repeat( '*** ', 14 );
-               $msg .= "\n$querySeparator Query: Prop  $querySeparator\n\n";
-               $msg .= $this->makeHelpMsgHelper( 'prop' );
-               $msg .= "\n$querySeparator Query: List  $querySeparator\n\n";
-               $msg .= $this->makeHelpMsgHelper( 'list' );
-               $msg .= "\n$querySeparator Query: Meta  $querySeparator\n\n";
-               $msg .= $this->makeHelpMsgHelper( 'meta' );
-               $msg .= "\n\n$moduleSeparator Modules: continuation  $moduleSeparator\n\n";
-
-               return $msg;
-       }
-
-       /**
-        * For all modules of a given group, generate help messages and join them together
-        * @deprecated since 1.25
-        * @param string $group Module group
-        * @return string
-        */
-       private function makeHelpMsgHelper( $group ) {
-               $moduleDescriptions = [];
-
-               $moduleNames = $this->mModuleMgr->getNames( $group );
-               sort( $moduleNames );
-               foreach ( $moduleNames as $name ) {
-                       /**
-                        * @var $module ApiQueryBase
-                        */
-                       $module = $this->mModuleMgr->getModule( $name );
-
-                       $msg = ApiMain::makeHelpMsgHeader( $module, $group );
-                       $msg2 = $module->makeHelpMsg();
-                       if ( $msg2 !== false ) {
-                               $msg .= $msg2;
-                       }
-                       if ( $module instanceof ApiQueryGeneratorBase ) {
-                               $msg .= "Generator:\n  This module may be used as a generator\n";
-                       }
-                       $moduleDescriptions[] = $msg;
-               }
-
-               return implode( "\n", $moduleDescriptions );
-       }
-
        public function isReadMode() {
                // We need to make an exception for certain meta modules that should be
                // accessible even without the 'read' right. Restrict the exception as
index 6aeee68..553995c 100644 (file)
@@ -44,7 +44,7 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
         * which may not necessarily be the same as the local DB.
         *
         * TODO: allow querying non-local repos.
-        * @return DatabaseBase
+        * @return Database
         */
        protected function getDB() {
                return $this->mRepo->getSlaveDB();
index 060e3e1..b64b2c8 100644 (file)
@@ -166,12 +166,20 @@ class ApiQueryAllRevisions extends ApiQueryRevisionsBase {
                $orderby[] = "rev_id $sort";
                $this->addOption( 'ORDER BY', $orderby );
 
-               $res = $this->select( __METHOD__ );
+               $hookData = [];
+               $res = $this->select( __METHOD__, [], $hookData );
                $pageMap = []; // Maps rev_page to array index
                $count = 0;
                $nextIndex = 0;
                $generated = [];
                foreach ( $res as $row ) {
+                       if ( $count === 0 && $resultPageSet !== null ) {
+                               // Set the non-continue since the list of all revisions is
+                               // prone to having entries added at the start frequently.
+                               $this->getContinuationManager()->addGeneratorNonContinueParam(
+                                       $this, 'continue', "$row->rev_timestamp|$row->rev_id"
+                               );
+                       }
                        if ( ++$count > $this->limit ) {
                                // We've had enough
                                $this->setContinueEnumParameter( 'continue', "$row->rev_timestamp|$row->rev_id" );
@@ -203,12 +211,12 @@ class ApiQueryAllRevisions extends ApiQueryRevisionsBase {
                                        ];
                                        ApiResult::setIndexedTagName( $a['revisions'], 'rev' );
                                        ApiQueryBase::addTitleInfo( $a, $title );
-                                       $fit = $result->addValue( [ 'query', $this->getModuleName() ], $index, $a );
+                                       $fit = $this->processRow( $row, $a['revisions'][0], $hookData ) &&
+                                               $result->addValue( [ 'query', $this->getModuleName() ], $index, $a );
                                } else {
                                        $index = $pageMap[$row->rev_page];
-                                       $fit = $result->addValue(
-                                               [ 'query', $this->getModuleName(), $index, 'revisions' ],
-                                               null, $rev );
+                                       $fit = $this->processRow( $row, $rev, $hookData ) &&
+                                               $result->addValue( [ 'query', $this->getModuleName(), $index, 'revisions' ], null, $rev );
                                }
                                if ( !$fit ) {
                                        $this->setContinueEnumParameter( 'continue', "$row->rev_timestamp|$row->rev_id" );
index 236fb9e..8e89c32 100644 (file)
@@ -264,6 +264,12 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase {
                        }
                }
 
+               // MySQL (or at least 5.5.5-10.0.23-MariaDB) chooses a really bad query
+               // plan if it thinks there will be more matching rows in the linktable
+               // than are in page. Use STRAIGHT_JOIN here to force it to use the
+               // intended, fast plan. See T145079 for details.
+               $this->addOption( 'STRAIGHT_JOIN' );
+
                $this->addOption( 'LIMIT', $params['limit'] + 1 );
 
                $res = $this->select( __METHOD__ );
index b35eec2..bba5375 100644 (file)
@@ -103,7 +103,7 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Get the Query database connection (read-only)
-        * @return DatabaseBase
+        * @return Database
         */
        protected function getDB() {
                if ( is_null( $this->mDb ) ) {
@@ -119,7 +119,7 @@ abstract class ApiQueryBase extends ApiBase {
         * @param string $name Name to assign to the database connection
         * @param int $db One of the DB_* constants
         * @param array $groups Query groups
-        * @return DatabaseBase
+        * @return Database
         */
        public function selectNamedDB( $name, $db, $groups ) {
                $this->mDb = $this->getQuery()->getNamedDB( $name, $db, $groups );
@@ -347,9 +347,12 @@ abstract class ApiQueryBase extends ApiBase {
         *    'options' => ...,
         *    'join_conds' => ...
         *  ]
+        * @param array|null &$hookData If set, the ApiQueryBaseBeforeQuery and
+        *  ApiQueryBaseAfterQuery hooks will be called, and the
+        *  ApiQueryBaseProcessRow hook will be expected.
         * @return ResultWrapper
         */
-       protected function select( $method, $extraQuery = [] ) {
+       protected function select( $method, $extraQuery = [], array &$hookData = null ) {
 
                $tables = array_merge(
                        $this->tables,
@@ -372,11 +375,38 @@ abstract class ApiQueryBase extends ApiBase {
                        isset( $extraQuery['join_conds'] ) ? (array)$extraQuery['join_conds'] : []
                );
 
+               if ( $hookData !== null ) {
+                       Hooks::run( 'ApiQueryBaseBeforeQuery',
+                               [ $this, &$tables, &$fields, &$where, &$options, &$join_conds, &$hookData ]
+                       );
+               }
+
                $res = $this->getDB()->select( $tables, $fields, $where, $method, $options, $join_conds );
 
+               if ( $hookData !== null ) {
+                       Hooks::run( 'ApiQueryBaseAfterQuery', [ $this, $res, &$hookData ] );
+               }
+
                return $res;
        }
 
+       /**
+        * Call the ApiQueryBaseProcessRow hook
+        *
+        * Generally, a module that passed $hookData to self::select() will call
+        * this just before calling ApiResult::addValue(), and treat a false return
+        * here in the same way it treats a false return from addValue().
+        *
+        * @since 1.28
+        * @param object $row Database row
+        * @param array &$data Data to be added to the result
+        * @param array &$hookData Hook data from ApiQueryBase::select()
+        * @return bool Return false if row processing should end with continuation
+        */
+       protected function processRow( $row, array &$data, array &$hookData ) {
+               return Hooks::run( 'ApiQueryBaseProcessRow', [ $this, $row, &$data, &$hookData ] );
+       }
+
        /**
         * @param string $query
         * @param string $protocol
index 67fe0d6..f7b94c7 100644 (file)
@@ -45,6 +45,15 @@ abstract class ApiQueryGeneratorBase extends ApiQueryBase {
                $this->mGeneratorPageSet = $generatorPageSet;
        }
 
+       /**
+        * Indicate whether the module is in generator mode
+        * @since 1.28
+        * @return bool
+        */
+       public function isInGeneratorMode() {
+               return $this->mGeneratorPageSet !== null;
+       }
+
        /**
         * Get the PageSet object to work on.
         * If this module is generator, the pageSet object is different from other module's
index cc3ca60..8b11dc2 100644 (file)
@@ -361,9 +361,10 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                $this->token = $params['token'];
                $this->addOption( 'LIMIT', $params['limit'] + 1 );
 
+               $hookData = [];
                $count = 0;
                /* Perform the actual query. */
-               $res = $this->select( __METHOD__ );
+               $res = $this->select( __METHOD__, [], $hookData );
 
                $revids = [];
                $titles = [];
@@ -372,6 +373,13 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
 
                /* Iterate through the rows, adding data extracted from them to our query result. */
                foreach ( $res as $row ) {
+                       if ( $count === 0 && $resultPageSet !== null ) {
+                               // Set the non-continue since the list of recentchanges is
+                               // prone to having entries added at the start frequently.
+                               $this->getContinuationManager()->addGeneratorNonContinueParam(
+                                       $this, 'continue', "$row->rc_timestamp|$row->rc_id"
+                               );
+                       }
                        if ( ++$count > $params['limit'] ) {
                                // We've reached the one extra which shows that there are
                                // additional pages to be had. Stop here...
@@ -384,7 +392,8 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                                $vals = $this->extractRowInfo( $row );
 
                                /* Add that row's data to our final output. */
-                               $fit = $result->addValue( [ 'query', $this->getModuleName() ], null, $vals );
+                               $fit = $this->processRow( $row, $vals, $hookData ) &&
+                                       $result->addValue( [ 'query', $this->getModuleName() ], null, $vals );
                                if ( !$fit ) {
                                        $this->setContinueEnumParameter( 'continue', "$row->rc_timestamp|$row->rc_id" );
                                        break;
index b816f43..3259927 100644 (file)
@@ -313,7 +313,8 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase {
 
                $count = 0;
                $generated = [];
-               $res = $this->select( __METHOD__ );
+               $hookData = [];
+               $res = $this->select( __METHOD__, [], $hookData );
 
                foreach ( $res as $row ) {
                        if ( ++$count > $this->limit ) {
@@ -350,7 +351,8 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase {
                                        }
                                }
 
-                               $fit = $this->addPageSubItem( $row->rev_page, $rev, 'rev' );
+                               $fit = $this->processRow( $row, $rev, $hookData ) &&
+                                       $this->addPageSubItem( $row->rev_page, $rev, 'rev' );
                                if ( !$fit ) {
                                        if ( $enumRevMode ) {
                                                $this->setContinueEnumParameter( 'continue',
index f46b5d2..6be5198 100644 (file)
@@ -24,8 +24,6 @@
  * @file
  */
 
-use MediaWiki\MediaWikiServices;
-
 /**
  * Query module to perform full text search within wiki titles and content
  *
@@ -77,6 +75,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                // Create search engine instance and set options
                $search = $this->buildSearchEngine( $params );
                $search->setFeatureData( 'rewrite', (bool)$params['enablerewrites'] );
+               $search->setFeatureData( 'interwiki', (bool)$interwiki );
 
                $query = $search->transformSearchTerm( $query );
                $query = $search->replacePrefixes( $query );
@@ -235,7 +234,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                                                $vals = [
                                                        'namespace' => $result->getInterwikiNamespaceText(),
                                                        'title' => $title->getText(),
-                                                       'url' => $title->getFullUrl(),
+                                                       'url' => $title->getFullURL(),
                                                ];
 
                                                // Add item to results and see whether it fits
index 5d32497..99f722d 100644 (file)
@@ -275,6 +275,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $data['allcentralidlookupproviders'] = $providerIds;
 
                $data['interwikimagic'] = (bool)$config->get( 'InterwikiMagic' );
+               $data['magiclinks'] = $config->get( 'EnableMagicLinks' );
 
                Hooks::run( 'APIQuerySiteInfoGeneralInfo', [ $this, &$data ] );
 
index 7a14aac..43eb7e8 100644 (file)
@@ -93,7 +93,7 @@ class ApiQueryTags extends ApiQueryBase {
                        $tag['name'] = $tagName;
 
                        if ( $fld_displayname ) {
-                               $tag['displayname'] = ChangeTags::tagDescription( $tagName );
+                               $tag['displayname'] = ChangeTags::tagDescription( $tagName, $this );
                        }
 
                        if ( $fld_description ) {
index f92a916..b85bec4 100644 (file)
@@ -111,8 +111,9 @@ class ApiQueryContributions extends ApiQueryBase {
 
                $this->prepareQuery();
 
+               $hookData = [];
                // Do the actual query.
-               $res = $this->select( __METHOD__ );
+               $res = $this->select( __METHOD__, [], $hookData );
 
                if ( $this->fld_sizediff ) {
                        $revIds = [];
@@ -139,7 +140,8 @@ class ApiQueryContributions extends ApiQueryBase {
                        }
 
                        $vals = $this->extractRowInfo( $row );
-                       $fit = $this->getResult()->addValue( [ 'query', $this->getModuleName() ], null, $vals );
+                       $fit = $this->processRow( $row, $vals, $hookData ) &&
+                               $this->getResult()->addValue( [ 'query', $this->getModuleName() ], null, $vals );
                        if ( !$fit ) {
                                $this->setContinueEnumParameter( 'continue', $this->continueStr( $row ) );
                                break;
index e308ba4..6e27fc8 100644 (file)
@@ -406,12 +406,12 @@ class ApiResult implements ApiSerializable {
                $arr = &$this->path( $path, ( $flags & ApiResult::ADD_ON_TOP ) ? 'prepend' : 'append' );
 
                if ( $this->checkingSize && !( $flags & ApiResult::NO_SIZE_CHECK ) ) {
-                       // self::valueSize needs the validated value. Then flag
+                       // self::size needs the validated value. Then flag
                        // to not re-validate later.
                        $value = self::validateValue( $value );
                        $flags |= ApiResult::NO_VALIDATE;
 
-                       $newsize = $this->size + self::valueSize( $value );
+                       $newsize = $this->size + self::size( $value );
                        if ( $this->maxSize !== false && $newsize > $this->maxSize ) {
                                /// @todo Add i18n message when replacing calls to ->setWarning()
                                $msg = new ApiRawMessage( 'This result was truncated because it would otherwise ' .
@@ -462,7 +462,7 @@ class ApiResult implements ApiSerializable {
                }
                $ret = self::unsetValue( $this->path( $path, 'dummy' ), $name );
                if ( $this->checkingSize && !( $flags & ApiResult::NO_SIZE_CHECK ) ) {
-                       $newsize = $this->size - self::valueSize( $ret );
+                       $newsize = $this->size - self::size( $ret );
                        $this->size = max( $newsize, 0 );
                }
                return $ret;
@@ -1085,17 +1085,15 @@ class ApiResult implements ApiSerializable {
        /**
         * Get the 'real' size of a result item. This means the strlen() of the item,
         * or the sum of the strlen()s of the elements if the item is an array.
-        * @note Once the deprecated public self::size is removed, we can rename
-        *       this back to a less awkward name.
         * @param mixed $value Validated value (see self::validateValue())
         * @return int
         */
-       private static function valueSize( $value ) {
+       private static function size( $value ) {
                $s = 0;
                if ( is_array( $value ) ) {
                        foreach ( $value as $k => $v ) {
                                if ( !self::isMetadataKey( $k ) ) {
-                                       $s += self::valueSize( $v );
+                                       $s += self::size( $v );
                                }
                        }
                } elseif ( is_scalar( $value ) ) {
@@ -1202,310 +1200,6 @@ class ApiResult implements ApiSerializable {
 
        /**@}*/
 
-       /************************************************************************//**
-        * @name   Deprecated
-        * @{
-        */
-
-       /**
-        * Formerly used to enable/disable "raw mode".
-        * @deprecated since 1.25, you shouldn't have been using it in the first place
-        * @since 1.23 $flag parameter added
-        * @param bool $flag Set the raw mode flag to this state
-        */
-       public function setRawMode( $flag = true ) {
-               wfDeprecated( __METHOD__, '1.25' );
-       }
-
-       /**
-        * Returns true, the equivalent of "raw mode" is always enabled now
-        * @deprecated since 1.25, you shouldn't have been using it in the first place
-        * @return bool
-        */
-       public function getIsRawMode() {
-               wfDeprecated( __METHOD__, '1.25' );
-               return true;
-       }
-
-       /**
-        * Get the result's internal data array (read-only)
-        * @deprecated since 1.25, use $this->getResultData() instead
-        * @return array
-        */
-       public function getData() {
-               wfDeprecated( __METHOD__, '1.25' );
-               return $this->getResultData( null, [
-                       'BC' => [],
-                       'Types' => [],
-                       'Strip' => 'all',
-               ] );
-       }
-
-       /**
-        * Disable size checking in addValue(). Don't use this unless you
-        * REALLY know what you're doing. Values added while size checking
-        * was disabled will not be counted (ever)
-        * @deprecated since 1.24, use ApiResult::NO_SIZE_CHECK
-        */
-       public function disableSizeCheck() {
-               wfDeprecated( __METHOD__, '1.24' );
-               $this->checkingSize = false;
-       }
-
-       /**
-        * Re-enable size checking in addValue()
-        * @deprecated since 1.24, use ApiResult::NO_SIZE_CHECK
-        */
-       public function enableSizeCheck() {
-               wfDeprecated( __METHOD__, '1.24' );
-               $this->checkingSize = true;
-       }
-
-       /**
-        * Alias for self::setValue()
-        *
-        * @since 1.21 int $flags replaced boolean $override
-        * @deprecated since 1.25, use self::setValue() instead
-        * @param array $arr To add $value to
-        * @param string $name Index of $arr to add $value at
-        * @param mixed $value
-        * @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP.
-        *    This parameter used to be boolean, and the value of OVERRIDE=1 was
-        *    specifically chosen so that it would be backwards compatible with the
-        *    new method signature.
-        */
-       public static function setElement( &$arr, $name, $value, $flags = 0 ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               self::setValue( $arr, $name, $value, $flags );
-       }
-
-       /**
-        * Adds a content element to an array.
-        * Use this function instead of hardcoding the '*' element.
-        * @deprecated since 1.25, use self::setContentValue() instead
-        * @param array $arr To add the content element to
-        * @param mixed $value
-        * @param string $subElemName When present, content element is created
-        *  as a sub item of $arr. Use this parameter to create elements in
-        *  format "<elem>text</elem>" without attributes.
-        */
-       public static function setContent( &$arr, $value, $subElemName = null ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               if ( is_array( $value ) ) {
-                       throw new InvalidArgumentException( __METHOD__ . ': Bad parameter' );
-               }
-               if ( is_null( $subElemName ) ) {
-                       self::setContentValue( $arr, 'content', $value );
-               } else {
-                       if ( !isset( $arr[$subElemName] ) ) {
-                               $arr[$subElemName] = [];
-                       }
-                       self::setContentValue( $arr[$subElemName], 'content', $value );
-               }
-       }
-
-       /**
-        * Set indexed tag name on all subarrays of $arr
-        *
-        * Does not set the tag name for $arr itself.
-        *
-        * @deprecated since 1.25, use self::setIndexedTagNameRecursive() instead
-        * @param array $arr
-        * @param string $tag Tag name
-        */
-       public function setIndexedTagName_recursive( &$arr, $tag ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               if ( !is_array( $arr ) ) {
-                       return;
-               }
-               if ( !is_string( $tag ) ) {
-                       throw new InvalidArgumentException( 'Bad tag name' );
-               }
-               foreach ( $arr as $k => &$v ) {
-                       if ( !self::isMetadataKey( $k ) && is_array( $v ) ) {
-                               $v[self::META_INDEXED_TAG_NAME] = $tag;
-                               $this->setIndexedTagName_recursive( $v, $tag );
-                       }
-               }
-       }
-
-       /**
-        * Alias for self::addIndexedTagName()
-        * @deprecated since 1.25, use $this->addIndexedTagName() instead
-        * @param array $path Path to the array, like addValue()'s $path
-        * @param string $tag
-        */
-       public function setIndexedTagName_internal( $path, $tag ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               $this->addIndexedTagName( $path, $tag );
-       }
-
-       /**
-        * Alias for self::addParsedLimit()
-        * @deprecated since 1.25, use $this->addParsedLimit() instead
-        * @param string $moduleName
-        * @param int $limit
-        */
-       public function setParsedLimit( $moduleName, $limit ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               $this->addParsedLimit( $moduleName, $limit );
-       }
-
-       /**
-        * Set the ApiMain for use by $this->beginContinuation()
-        * @since 1.25
-        * @deprecated for backwards compatibility only, do not use
-        * @param ApiMain $main
-        */
-       public function setMainForContinuation( ApiMain $main ) {
-               $this->mainForContinuation = $main;
-       }
-
-       /**
-        * Parse a 'continue' parameter and return status information.
-        *
-        * This must be balanced by a call to endContinuation().
-        *
-        * @since 1.24
-        * @deprecated since 1.25, use ApiContinuationManager instead
-        * @param string|null $continue
-        * @param ApiBase[] $allModules
-        * @param array $generatedModules
-        * @return array
-        */
-       public function beginContinuation(
-               $continue, array $allModules = [], array $generatedModules = []
-       ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               if ( $this->mainForContinuation->getContinuationManager() ) {
-                       throw new UnexpectedValueException(
-                               __METHOD__ . ': Continuation already in progress from ' .
-                               $this->mainForContinuation->getContinuationManager()->getSource()
-                       );
-               }
-
-               // Ugh. If $continue doesn't match that in the request, temporarily
-               // replace the request when creating the ApiContinuationManager.
-               if ( $continue === null ) {
-                       $continue = '';
-               }
-               if ( $this->mainForContinuation->getVal( 'continue', '' ) !== $continue ) {
-                       $oldCtx = $this->mainForContinuation->getContext();
-                       $newCtx = new DerivativeContext( $oldCtx );
-                       $newCtx->setRequest( new DerivativeRequest(
-                               $oldCtx->getRequest(),
-                               [ 'continue' => $continue ] + $oldCtx->getRequest()->getValues(),
-                               $oldCtx->getRequest()->wasPosted()
-                       ) );
-                       $this->mainForContinuation->setContext( $newCtx );
-                       $reset = new ScopedCallback(
-                               [ $this->mainForContinuation, 'setContext' ],
-                               [ $oldCtx ]
-                       );
-               }
-               $manager = new ApiContinuationManager(
-                       $this->mainForContinuation, $allModules, $generatedModules
-               );
-               $reset = null;
-
-               $this->mainForContinuation->setContinuationManager( $manager );
-
-               return [
-                       $manager->isGeneratorDone(),
-                       $manager->getRunModules(),
-               ];
-       }
-
-       /**
-        * @since 1.24
-        * @deprecated since 1.25, use ApiContinuationManager instead
-        * @param ApiBase $module
-        * @param string $paramName
-        * @param string|array $paramValue
-        */
-       public function setContinueParam( ApiBase $module, $paramName, $paramValue ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               if ( $this->mainForContinuation->getContinuationManager() ) {
-                       $this->mainForContinuation->getContinuationManager()->addContinueParam(
-                               $module, $paramName, $paramValue
-                       );
-               }
-       }
-
-       /**
-        * @since 1.24
-        * @deprecated since 1.25, use ApiContinuationManager instead
-        * @param ApiBase $module
-        * @param string $paramName
-        * @param string|array $paramValue
-        */
-       public function setGeneratorContinueParam( ApiBase $module, $paramName, $paramValue ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               if ( $this->mainForContinuation->getContinuationManager() ) {
-                       $this->mainForContinuation->getContinuationManager()->addGeneratorContinueParam(
-                               $module, $paramName, $paramValue
-                       );
-               }
-       }
-
-       /**
-        * Close continuation, writing the data into the result
-        * @since 1.24
-        * @deprecated since 1.25, use ApiContinuationManager instead
-        * @param string $style 'standard' for the new style since 1.21, 'raw' for
-        *   the style used in 1.20 and earlier.
-        */
-       public function endContinuation( $style = 'standard' ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               if ( !$this->mainForContinuation->getContinuationManager() ) {
-                       return;
-               }
-
-               if ( $style === 'raw' ) {
-                       $data = $this->mainForContinuation->getContinuationManager()->getRawContinuation();
-                       if ( $data ) {
-                               $this->addValue( null, 'query-continue', $data, self::ADD_ON_TOP | self::NO_SIZE_CHECK );
-                       }
-               } else {
-                       $this->mainForContinuation->getContinuationManager()->setContinuationIntoResult( $this );
-               }
-       }
-
-       /**
-        * No-op, this is now checked on insert.
-        * @deprecated since 1.25
-        */
-       public function cleanUpUTF8() {
-               wfDeprecated( __METHOD__, '1.25' );
-       }
-
-       /**
-        * Get the 'real' size of a result item. This means the strlen() of the item,
-        * or the sum of the strlen()s of the elements if the item is an array.
-        * @deprecated since 1.25, no external users known and there doesn't seem
-        *  to be any case for such use over just checking the return value from the
-        *  add/set methods.
-        * @param mixed $value
-        * @return int
-        */
-       public static function size( $value ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               return self::valueSize( self::validateValue( $value ) );
-       }
-
-       /**
-        * Converts a Status object to an array suitable for addValue
-        * @deprecated since 1.25, use ApiErrorFormatter::arrayFromStatus()
-        * @param Status $status
-        * @param string $errorType
-        * @return array
-        */
-       public function convertStatusToArray( $status, $errorType = 'error' ) {
-               wfDeprecated( __METHOD__, '1.25' );
-               return $this->errorFormatter->arrayFromStatus( $status, $errorType );
-       }
-
-       /**@}*/
 }
 
 /**
index f335682..3412f38 100644 (file)
@@ -158,6 +158,9 @@ class ApiSetNotificationTimestamp extends ApiBase {
                                        ];
                                        if ( !$title->exists() ) {
                                                $r['missing'] = true;
+                                               if ( $title->isKnown() ) {
+                                                       $r['known'] = true;
+                                               }
                                        }
                                        if ( isset( $timestamps[$ns] ) && array_key_exists( $dbkey, $timestamps[$ns] ) ) {
                                                $r['notificationtimestamp'] = '';
index 5a2492d..92cbe90 100644 (file)
@@ -21,6 +21,7 @@
 
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
+use Wikimedia\ScopedCallback;
 
 /**
  * Prepare an edit in shared cache so that it can be reused on edit
index 8ae1192..fb9c4e6 100644 (file)
@@ -104,7 +104,8 @@ trait SearchApi {
                $searchEngine = MediaWikiServices::getInstance()->newSearchEngine();
                $params = [];
                foreach ( $configs as $paramName => $paramConfig ) {
-                       $profiles = $searchEngine->getProfiles( $paramConfig['profile-type'] );
+                       $profiles = $searchEngine->getProfiles( $paramConfig['profile-type'],
+                               $this->getContext()->getUser() );
                        if ( !$profiles ) {
                                continue;
                        }
@@ -188,4 +189,9 @@ trait SearchApi {
         *  containing 'help-message' and 'profile-type' keys.
         */
        abstract public function getSearchProfileParams();
+
+       /**
+        * @return IContextSource
+        */
+       abstract public function getContext();
 }
index 0d19545..d28165d 100644 (file)
@@ -8,6 +8,8 @@
        "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|Documentación]]\n* [[mw:API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Llista d'alderique]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Anuncios de la API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Fallos y solicitúes]\n</div>\n<strong>Estau:</strong> Toles carauterístiques qu'apaecen nesta páxina tendríen de funcionar, pero la API inda ta en desendolcu activu, y puede camudar en cualquier momentu. Suscríbete a la [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ llista de corréu mediawiki-api-announce] p'avisos sobro anovamientos.\n\n<strong>Solicitúes incorreutes:</strong> Cuando s'unvíen solicitúes incorreutes a la API, unvíase una cabecera HTTP cola clave \"MediaWiki-API-Error\" y, darréu, tanto'l valor de la cabecera como'l códigu d'error devueltu pondránse al mesmu valor. Pa más información, consulta [[mw:API:Errors_and_warnings|API: Errores y avisos]].\n\n<strong>Pruebes:</strong> Pa facilitar les pruebes de solicitúes API, consulta [[Special:ApiSandbox]].",
        "apihelp-main-param-action": "Qué aición facer.",
        "apihelp-main-param-format": "El formatu de la salida.",
+       "apihelp-main-param-servedby": "Incluyir el nome del host que sirvió la solicitú nes resultancies.",
+       "apihelp-main-param-curtimestamp": "Incluyir la marca de tiempu actual na resultancia.",
        "apihelp-block-description": "Bloquiar a un usuariu.",
        "apihelp-block-param-user": "El nome d'usuariu, dirección IP o intervalu d'IP que quies bloquiar.",
        "apihelp-block-param-expiry": "Fecha de caducidá. Puede ser relativa (por casu, <kbd>5 meses</kbd> o <kbd>2 selmanes</kbd>) o absoluta (por casu, 2016-01-16T12:34:56Z). Si s'establez a <kbd>infinitu</kbd>, <kbd>indefiníu</kbd>, o <kbd>nunca</kbd>, el bloquéu nun caducará nunca.",
        "apihelp-block-param-autoblock": "Bloquiar automáticamente la última dirección IP usada y les siguientes direcciones IP de les que traten d'aniciar sesión darréu.",
        "apihelp-block-param-noemail": "Torgar que l'usuariu unvie corréu al traviés de la wiki (Rique'l permisu <code>blockemail</code>).",
        "apihelp-block-param-hidename": "Despintar el nome d'usuariu del rexistru de bloquéu (Rique'l permisu <code>hideuser</code>).",
+       "apihelp-block-param-reblock": "Si la cuenta yá ta bloquiada, sobrescribir el bloquéu esistente.",
+       "apihelp-block-param-watchuser": "Vixilar les páxines d'usuariu y d'alderique del usuariu o de la dirección IP.",
+       "apihelp-block-example-ip-simple": "Bloquiar la dirección IP <kbd>192.0.2.5</kbd> mientres 3 díes col motivu <kbd>Primer avisu</kbd>.",
+       "apihelp-block-example-user-complex": "Bloquiar al usuariu <kbd>Vandal</kbd> indefinidamente col motivu <kbd>Vandalismu</kbd> y torgar que cree nueves cuentes o unvie correos.",
+       "apihelp-changeauthenticationdata-description": "Camudar los datos d'identificación del usuariu actual.",
+       "apihelp-changeauthenticationdata-example-password": "Intentar camudar la contraseña del usuariu actual a <kbd>ContraseñaExemplu</kbd>.",
        "apihelp-createaccount-param-name": "Nome d'usuariu.",
        "apihelp-createaccount-param-language": "Códigu de llingua p'afitar como predetermináu al usuariu (opcional, predetermina la llingua del conteníu).",
        "apihelp-disabled-description": "Esti módulu deshabilitóse."
index c7bfb23..3818ce9 100644 (file)
@@ -53,6 +53,7 @@
        "apihelp-createaccount-param-language": "Моўны код, які будзе выстаўлены ўдзельніку па змоўчаньні (неабавязкова, па змоўчаньні мова зьместу).",
        "apihelp-createaccount-example-pass": "Стварэньне ўдзельніка <kbd>testuser</kbd> з паролем <kbd>test123</kbd>.",
        "apihelp-createaccount-example-mail": "Стварэньне ўдзельніка <kbd>testmailuser</kbd> і адпраўка выпадковага паролю электроннай поштай.",
+       "apihelp-edit-param-text": "Зьмест старонкі.",
        "apihelp-query+transcludedin-paramvalue-prop-title": "Назва кожнай старонкі.",
        "apihelp-query+transcludedin-param-limit": "Колькі вяртаць.",
        "apihelp-query+userinfo-paramvalue-prop-acceptlang": "Дублюе загаловак <code>Accept-Language</code>, адасланы кліентам у структураваным фармаце."
index 4678504..29c0605 100644 (file)
@@ -2,7 +2,8 @@
        "@metadata": {
                "authors": [
                        "Vodnokon4e",
-                       "StanProg"
+                       "StanProg",
+                       "Spas.Z.Spasov"
                ]
        },
        "apihelp-main-param-action": "Кое действие да се извърши.",
        "apihelp-emailuser-param-text": "Съдържание на писмото.",
        "apihelp-emailuser-param-ccme": "Изпращане на копие от това писмо до мен.",
        "apihelp-expandtemplates-param-title": "Заглавие на страница.",
+       "apihelp-feedcontributions-param-year": "От година (и по-рано).",
+       "apihelp-feedcontributions-param-month": "От месец (и по-рано).",
+       "apihelp-feedcontributions-param-tagfilter": "Филтриране на приноси, които имат тези етикети.",
+       "apihelp-feedcontributions-param-deletedonly": "Покажи само изтритите приноси.",
+       "apihelp-feedcontributions-param-newonly": "Показване само на редакции за създаване на страници.",
        "apihelp-feedcontributions-param-hideminor": "Скриване на малки промени.",
+       "apihelp-feedcontributions-param-showsizediff": "Показване на размера на разликите между версиите.",
        "apihelp-feedrecentchanges-param-hideminor": "Скриване на малки промени.",
        "apihelp-feedrecentchanges-param-hidebots": "Скриване на промени, направени от ботове.",
        "apihelp-feedrecentchanges-param-hideanons": "Скриване на промени, направени от анонимни потребители.",
@@ -39,6 +46,7 @@
        "apihelp-feedrecentchanges-example-30days": "Показване на последните промени в рамките на 30 дни.",
        "apihelp-login-param-name": "Потребителско име.",
        "apihelp-login-param-password": "Парола.",
+       "apihelp-login-param-domain": "Домейн (по избор).",
        "apihelp-move-description": "Преместване на страница.",
        "apihelp-move-param-reason": "Причина за преименуването.",
        "apihelp-move-param-movetalk": "Преименуване на беседата, ако има такава.",
        "apihelp-move-param-noredirect": "Не създавай пренасочване.",
        "apihelp-move-param-ignorewarnings": "Пренебрегване на всякакви предупреждения.",
        "apihelp-protect-example-protect": "Защита на страница.",
+       "apihelp-query+allusers-param-prefix": "Търсене за всички потребители, които започват с тази стойност.",
+       "apihelp-query+allusers-param-dir": "Посока на сортиране.",
+       "apihelp-query+allusers-param-group": "Включва само потребители от определените групи.",
+       "apihelp-query+allusers-param-excludegroup": "Изключване на потребители от определените групи.",
+       "apihelp-query+allusers-param-prop": "Каква информация да включва:",
+       "apihelp-query+allusers-paramvalue-prop-blockinfo": "Добавя информация за текущото блокиране на потребителя.",
        "apihelp-query+langlinks-paramvalue-prop-url": "Добавя пълният URL-адрес.",
        "apihelp-query+linkshere-paramvalue-prop-title": "Заглавие на всяка страница.",
        "apihelp-query+watchlist-paramvalue-type-log": "Записи в дневника."
index c93d8ba..fde631c 100644 (file)
@@ -2,13 +2,24 @@
        "@metadata": {
                "authors": [
                        "Aftabuzzaman",
-                       "Bodhisattwa"
+                       "Bodhisattwa",
+                       "আজিজ"
                ]
        },
+       "apihelp-main-param-format": "আউটপুটের বিন্যাস",
+       "apihelp-main-param-requestid": "এখানে প্রদত্ত যেকোন মান প্রতিক্রিয়ায় অন্তর্ভুক্ত করা হবে। অনুরোধের পার্থক্য করতে ব্যবহার করা যেতে পারে।",
        "apihelp-block-description": "ব্যবহারকারীকে বাধা দিন।",
+       "apihelp-block-param-reason": "বাধার দানের কারণ।",
+       "apihelp-createaccount-description": "নতুন ব্যবহারকারীর অ্যাকাউন্ট তৈরি করুন",
        "apihelp-createaccount-param-name": "ব্যবহারকারী নাম।",
        "apihelp-delete-description": "একটি পাতা মুছে ফেলুন।",
        "apihelp-delete-example-simple": "<kbd>প্রধান পাতা</kbd> মুছে ফেলুন।",
+       "apihelp-edit-param-text": "পাতার বিষয়বস্তু।",
        "apihelp-edit-param-minor": "অনুল্লেখ্য সম্পাদনা।",
+       "apihelp-edit-param-bot": "এই সম্পাদনাটি একটি বট সম্পাদনা হিসাবে চিহ্নিত করে।",
+       "apihelp-edit-param-createonly": "পাতাটি আগেই বিদ্যমান থাকলে সম্পদনা করবেন না।",
+       "apihelp-edit-param-contentmodel": "নতুন বিষয়বস্তুর, বিষয়বস্তু-মডেল।",
+       "apihelp-edit-example-edit": "একটি পাতা সম্পাদনা করুন",
+       "apihelp-edit-example-prepend": "একটি পৃষ্ঠার পূর্বে <kbd>_&#95;NOTOC_&#95;</kbd> লিখুন।",
        "apihelp-login-example-login": "প্রবেশ"
 }
index 7cc2db3..2396f69 100644 (file)
        "api-help-param-deprecated": "Zastaralý.",
        "api-help-param-required": "Tento parametr je povinný.",
        "api-help-datatypes-header": "Datové typy",
-       "api-help-datatypes": "Některé typy parametrů v API potřebují bližší vysvětlení:\n;boolean\n:Booleovské parametry fungují jako zaškrtávací políčka v HTML: pokud je parametr uveden, bez ohledu na hodnotu, je považován za pravdivý. Pro nepravdivou hodnotu parametr zcela vynechte.\n;časová značka\n:Časové značky lze uvádět v několika formátech. Doporučuje se datum a čas podle ISO 8601. Všechny časy jsou v UTC a obsažené časové pásmo je ignorováno.\n:* Datum a čas podle ISO 8601, <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>Z</kbd> (interpunkce a <kbd>Z</kbd> jsou nepovinné)\n:* Datum a čas podle ISO 8601 s (ignorovaným) zlomkem sekundy, <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>.<var>00001</var>Z</kbd> (pomlčky, dvojtečky a <kbd>Z</kbd> jsou nepovinné)\n:* Formát MediaWiki, <kbd><var>2001</var><var>01</var><var>15</var><var>14</var><var>56</var><var>00</var></kbd>\n:* Obecný číselný formát, <kbd><var>2001</var>-<var>01</var>-<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd> (nepovinné časové pásmo <kbd>GMT</kbd>, <kbd>+<var>##</var></kbd> nebo <kbd>-<var>##</var></kbd> se ignoruje)\n:* Formát EXIF, <kbd><var>2001</var>:<var>01</var>:<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* Formát podle RFC 2822 (časové pásmo lze vynechat), <kbd><var>Mon</var>, <var>15</var> <var>Jan</var> <var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* Formát podle RFC 850 (časové pásmo lze vynechat), <kbd><var>Monday</var>, <var>15</var>-<var>Jan</var>-<var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* Formát podle céčkové funkce ctime, <kbd><var>Mon</var> <var>Jan</var> <var>15</var> <var>14</var>:<var>56</var>:<var>00</var> <var>2001</var></kbd>\n:* Sekundy od 1970-01-01T00:00:00Z jako celé číslo o 1–13 číslicích (s výjimkou <kbd>0</kbd>)\n:* Řetězec <kbd>now</kbd>",
+       "api-help-datatypes": "Vstupem do MediaWiki by mělo být UTF-8 normalizované do NFC. Jiný vstup se MediaWiki může pokusit převést, ale tím se může stát, že některé operace (např. [[Special:ApiHelp/edit|editace]] s kontrolou MD5) selžou.\n\nNěkteré typy parametrů v API potřebují bližší vysvětlení:\n;boolean\n:Booleovské parametry fungují jako zaškrtávací políčka v HTML: pokud je parametr uveden, bez ohledu na hodnotu, je považován za pravdivý. Pro nepravdivou hodnotu parametr zcela vynechte.\n;časová značka\n:Časové značky lze uvádět v několika formátech. Doporučuje se datum a čas podle ISO 8601. Všechny časy jsou v UTC a obsažené časové pásmo je ignorováno.\n:* Datum a čas podle ISO 8601, <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>Z</kbd> (interpunkce a <kbd>Z</kbd> jsou nepovinné)\n:* Datum a čas podle ISO 8601 s (ignorovaným) zlomkem sekundy, <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>.<var>00001</var>Z</kbd> (pomlčky, dvojtečky a <kbd>Z</kbd> jsou nepovinné)\n:* Formát MediaWiki, <kbd><var>2001</var><var>01</var><var>15</var><var>14</var><var>56</var><var>00</var></kbd>\n:* Obecný číselný formát, <kbd><var>2001</var>-<var>01</var>-<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd> (nepovinné časové pásmo <kbd>GMT</kbd>, <kbd>+<var>##</var></kbd> nebo <kbd>-<var>##</var></kbd> se ignoruje)\n:* Formát EXIF, <kbd><var>2001</var>:<var>01</var>:<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* Formát podle RFC 2822 (časové pásmo lze vynechat), <kbd><var>Mon</var>, <var>15</var> <var>Jan</var> <var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* Formát podle RFC 850 (časové pásmo lze vynechat), <kbd><var>Monday</var>, <var>15</var>-<var>Jan</var>-<var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* Formát podle céčkové funkce ctime, <kbd><var>Mon</var> <var>Jan</var> <var>15</var> <var>14</var>:<var>56</var>:<var>00</var> <var>2001</var></kbd>\n:* Sekundy od 1970-01-01T00:00:00Z jako celé číslo o 1–13 číslicích (s výjimkou <kbd>0</kbd>)\n:* Řetězec <kbd>now</kbd>\n;alternativní oddělovač vícenásobných hodnot\n:Parametry, které přijímají několik hodnot, se zpravidla předávají s hodnotami oddělenými svislítkem, např. <kbd>param=hodnota1|hodnota2</kbd> nebo <kbd>param=hodnota1%7Chodnota2</kbd>. Pokud musí hodnota obsahovat svislítko, použijte jako oddělovač znak U+001F (Unit Separator) ''a'' před hodnotu přidejte U+001F, např. <kbd>param=%1Fhodnota1%1Fhodnota2</kbd>.",
        "api-help-param-type-integer": "Typ: {{PLURAL:$1|1=celé číslo|2=seznam celých čísel}}",
        "api-help-param-type-boolean": "Typ: boolean ([[Special:ApiHelp/main#main/datatypes|podrobnosti]])",
-       "api-help-param-list": "{{PLURAL:$1|1=Jedna z následujících hodnot|2=Hodnoty (oddělené <kbd>{{!}}</kbd>)}}: $2",
+       "api-help-param-list": "{{PLURAL:$1|1=Jedna z následujících hodnot|2=Hodnoty (oddělené <kbd>{{!}}</kbd> nebo [[Special:ApiHelp/main#main/datatypes|alternativou]].)}}: $2",
        "api-help-param-list-can-be-empty": "{{PLURAL:$1|0=Musí být prázdné|Může být prázdné nebo $2}}",
        "api-help-param-limit": "Není dovoleno více než $1.",
        "api-help-param-limit2": "Není dovoleno více než $1 ($2 pro boty).",
        "api-help-param-integer-max": "{{PLURAL:$1|1=Hodnota nesmí|2=Hodnoty nesmějí}} být vyšší než $3.",
        "api-help-param-integer-minmax": "{{PLURAL:$1|1=Hodnota|2=Hodnoty}} musí ležet mezi $2 a $3.",
        "api-help-param-upload": "Musí se odeslat POST požadavkem jako načítaný soubor pomocí multipart/form-data.",
-       "api-help-param-multi-separate": "Hodnoty oddělujte pomocí <kbd>|</kbd>.",
+       "api-help-param-multi-separate": "Hodnoty oddělujte pomocí <kbd>|</kbd> nebo [[Special:ApiHelp/main#main/datatypes|alternativou]].",
        "api-help-param-multi-max": "Maximální počet hodnot je {{PLURAL:$1|$1}} (pro boty {{PLURAL:$2|$2}}).",
        "api-help-param-default": "Implicitní hodnota: $1",
        "api-help-param-default-empty": "Implicitní hodnota: <span class=\"apihelp-empty\">(prázdné)</span>",
        "api-help-permissions": "{{PLURAL:$1|Oprávnění}}:",
        "api-help-permissions-granted-to": "Uděleno {{PLURAL:$1|skupině|skupinám}}: $2",
        "api-help-right-apihighlimits": "Používání vyšších limitů v API dotazech (pomalé dotazy: $1, rychlé dotazy: $2). Limity pro pomalé dotazy se vztahují i na vícehodnotové parametry.",
+       "api-help-open-in-apisandbox": "<small>[otevřít v pískovišti]</small>",
        "api-credits-header": "Zásluhy",
        "api-credits": "Vývojáři API:\n* Roan Kattouw (hlavní vývojář září 2007–2009)\n* Viktor Vasiljev\n* Bryan Tong Minh\n* Sam Reed\n* Jurij Astrachan (tvůrce, hlavní vývojář září 2006–září 2007)\n* Brad Jorsch (hlavní vývojář od 2013)\n\nSvé komentáře, návrhy či dotazy posílejte na mediawiki-api@lists.wikimedia.org\nnebo založte chybové hlášení na https://phabricator.wikimedia.org/."
 }
index 41f1ff9..a0668c9 100644 (file)
        "apihelp-emailuser-param-text": "E-Mail-Inhalt.",
        "apihelp-emailuser-param-ccme": "Eine Kopie dieser E-Mail an mich senden.",
        "apihelp-emailuser-example-email": "Eine E-Mail an den Benutzer <kbd>WikiSysop</kbd> mit dem Text <kbd>Content</kbd> senden.",
-       "apihelp-expandtemplates-description": "Alle Vorlagen im Wikitext expandieren.",
+       "apihelp-expandtemplates-description": "Alle Vorlagen innerhalb des Wikitextes expandieren.",
        "apihelp-expandtemplates-param-title": "Titel der Seite.",
        "apihelp-expandtemplates-param-text": "Zu konvertierender Wikitext.",
        "apihelp-expandtemplates-param-revid": "Versionsnummer, die für die Anzeige von <nowiki>{{REVISIONID}}</nowiki> und ähnlichen Variablen verwendet wird.",
        "apihelp-options-description": "Die Voreinstellungen des gegenwärtigen Benutzers ändern.",
        "apihelp-options-param-reset": "Setzt die Einstellungen auf Websitestandards zurück.",
        "apihelp-options-param-resetkinds": "Liste von zurückzusetzenden Optionstypen, wenn die <var>$1reset</var>-Option ausgewählt ist.",
-       "apihelp-options-param-change": "Liste von Änderungen, die mit Name=Wert formatiert sind (z.B. skin=vector). Wert darf keine Verkettungszeichen enthalten. Falls kein Wert angegeben wurde (nichtmal ein Gleichheitszeichen), z.B.: optionname|otheroption|..., wird die Option auf ihren Vorgabewert zurückgesetzt.",
-       "apihelp-options-param-optionvalue": "Der Wert für die Option, die durch <var>$1optionname</var> angegeben ist, kann Verkettungszeichen enthalten.",
+       "apihelp-options-param-change": "Liste von Änderungen, die mit name=wert formatiert sind (z.&nbsp;B. skin=vector). Falls kein Wert angegeben wurde (ohne einem Gleichheitszeichen), z.&nbsp;B. Optionname|AndereOption|…, wird die Option auf ihren Standardwert zurückgesetzt. Falls ein übergebener Wert ein Trennzeichen enthält (<kbd>|</kbd>), verwende den [[Special:ApiHelp/main#main/datatypes|alternativen Mehrfachwerttrenner]] zur korrekten Bedienung.",
+       "apihelp-options-param-optionvalue": "Der Wert für die Option, die durch <var>$1optionname</var> angegeben ist.",
        "apihelp-options-example-reset": "Alle Einstellungen zurücksetzen",
        "apihelp-options-example-change": "Ändert die Einstellungen <kbd>skin</kbd> und <kbd>hideminor</kbd>.",
        "apihelp-options-example-complex": "Setzt alle Einstellungen zurück, dann <kbd>skin</kbd> und <kbd>nickname</kbd> festlegen.",
index 0b86f10..b5179bb 100644 (file)
@@ -3,7 +3,8 @@
                "authors": [
                        "Gorizon",
                        "Mirzali",
-                       "Kumkumuk"
+                       "Kumkumuk",
+                       "Asmen"
                ]
        },
        "apihelp-main-param-action": "Performansa kamci aksiyon",
@@ -20,7 +21,7 @@
        "apihelp-disabled-description": "Eno modul aktiv niyo.",
        "apihelp-edit-description": "Vıraze û pelan bıvurne.",
        "apihelp-edit-param-text": "Zerreki pele",
-       "apihelp-edit-param-minor": "Vurnayışo qıckek.",
+       "apihelp-edit-param-minor": "Vurriyayışê werdiy",
        "apihelp-edit-param-notminor": "Vurnayışo qıckek niyo.",
        "apihelp-edit-param-bot": "Nê vurnayışi zey boti nişan ke.",
        "apihelp-edit-example-edit": "Şeker bıvurne",
@@ -35,7 +36,7 @@
        "apihelp-feedcontributions-param-feedformat": "Formata warikerdışi",
        "apihelp-feedcontributions-param-hideminor": "Vuryayışanê werdiyan bınımne",
        "apihelp-feedcontributions-param-showsizediff": "Goreyê ebati ferqê versiyoni bıasne.",
-       "apihelp-feedrecentchanges-param-hideminor": "Vurnayışanê qıckekan bınımne.",
+       "apihelp-feedrecentchanges-param-hideminor": "Vurriyayışanê werdiyan bınımne.",
        "apihelp-feedrecentchanges-param-hidebots": "Vurnayışanê botan bınımne.",
        "apihelp-feedrecentchanges-param-hideanons": "Vurnayışanê karberanê anoniman bınımne.",
        "apihelp-feedrecentchanges-param-hideliu": "Vurnayışanê karberanê qeydınan bınımne.",
index 40388f9..fe73a56 100644 (file)
@@ -13,6 +13,7 @@
        "apihelp-main-param-smaxage": "Set the <code>s-maxage</code> HTTP cache control header to this many seconds. Errors are never cached.",
        "apihelp-main-param-maxage": "Set the <code>max-age</code> HTTP cache control header to this many seconds. Errors are never cached.",
        "apihelp-main-param-assert": "Verify the user is logged in if set to <kbd>user</kbd>, or has the bot user right if <kbd>bot</kbd>.",
+       "apihelp-main-param-assertuser": "Verify the current user is the named user.",
        "apihelp-main-param-requestid": "Any value given here will be included in the response. May be used to distinguish requests.",
        "apihelp-main-param-servedby": "Include the hostname that served the request in the results.",
        "apihelp-main-param-curtimestamp": "Include the current timestamp in the result.",
        "apihelp-edit-param-tags": "Change tags to apply to the revision.",
        "apihelp-edit-param-minor": "Minor edit.",
        "apihelp-edit-param-notminor": "Non-minor edit.",
-       "apihelp-edit-param-bot": "Mark this edit as bot.",
+       "apihelp-edit-param-bot": "Mark this edit as a bot edit.",
        "apihelp-edit-param-basetimestamp": "Timestamp of the base revision, used to detect edit conflicts. May be obtained through [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "Timestamp when the editing process began, used to detect edit conflicts. An appropriate value may be obtained using <var>[[Special:ApiHelp/main|curtimestamp]]</var> when beginning the edit process (e.g. when loading the page content to edit).",
        "apihelp-edit-param-recreate": "Override any errors about the page having been deleted in the meantime.",
        "apihelp-emailuser-param-ccme": "Send a copy of this mail to me.",
        "apihelp-emailuser-example-email": "Send an email to user <kbd>WikiSysop</kbd> with the text <kbd>Content</kbd>.",
 
-       "apihelp-expandtemplates-description": "Expands all templates in wikitext.",
+       "apihelp-expandtemplates-description": "Expands all templates within wikitext.",
        "apihelp-expandtemplates-param-title": "Title of page.",
        "apihelp-expandtemplates-param-text": "Wikitext to convert.",
        "apihelp-expandtemplates-param-revid": "Revision ID, for <nowiki>{{REVISIONID}}</nowiki> and similar variables.",
        "apihelp-feedcontributions-param-month": "From month (and earlier).",
        "apihelp-feedcontributions-param-tagfilter": "Filter contributions that have these tags.",
        "apihelp-feedcontributions-param-deletedonly": "Show only deleted contributions.",
-       "apihelp-feedcontributions-param-toponly": "Only show edits that are latest revisions.",
+       "apihelp-feedcontributions-param-toponly": "Only show edits that are the latest revisions.",
        "apihelp-feedcontributions-param-newonly": "Only show edits that are page creations.",
        "apihelp-feedcontributions-param-hideminor": "Hide minor edits.",
        "apihelp-feedcontributions-param-showsizediff": "Show the size difference between revisions.",
        "apihelp-options-description": "Change preferences of the current user.\n\nOnly options which are registered in core or in one of installed extensions, or options with keys prefixed with <code>userjs-</code> (intended to be used by user scripts), can be set.",
        "apihelp-options-param-reset": "Resets preferences to the site defaults.",
        "apihelp-options-param-resetkinds": "List of types of options to reset when the <var>$1reset</var> option is set.",
-       "apihelp-options-param-change": "List of changes, formatted name=value (e.g. skin=vector). Value cannot contain pipe characters. If no value is given (not even an equals sign), e.g., optionname|otheroption|..., the option will be reset to its default value.",
+       "apihelp-options-param-change": "List of changes, formatted name=value (e.g. skin=vector). If no value is given (not even an equals sign), e.g., optionname|otheroption|..., the option will be reset to its default value. If any value passed contains the pipe character (<kbd>|</kbd>), use the [[Special:ApiHelp/main#main/datatypes|alternative multiple-value separator]] for correct operation.",
        "apihelp-options-param-optionname": "The name of the option that should be set to the value given by <var>$1optionvalue</var>.",
-       "apihelp-options-param-optionvalue": "The value for the option specified by <var>$1optionname</var>, can contain pipe characters.",
+       "apihelp-options-param-optionvalue": "The value for the option specified by <var>$1optionname</var>.",
        "apihelp-options-example-reset": "Reset all preferences.",
        "apihelp-options-example-change": "Change <kbd>skin</kbd> and <kbd>hideminor</kbd> preferences.",
        "apihelp-options-example-complex": "Reset all preferences, then set <kbd>skin</kbd> and <kbd>nickname</kbd>.",
index 7baf811..27cf257 100644 (file)
                        "Rubentl134",
                        "2axterix2",
                        "Dgstranz",
-                       "Copper12"
+                       "Copper12",
+                       "Irus"
                ]
        },
-       "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|Documentación]]\n* [[mw:API:FAQ|Preguntas frecuentes]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista de correos]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API de anuncios]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Errores y peticiones]\n</div>\n<strong>Estado:</strong> Todas las características que se muestran en esta página debería funcionar, pero la API aún está en desarrollo activo y puede cambiar en cualquier momento. Suscríbete a [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ la lista de correo de mediawiki-api-announce] para estar al día de las actualizaciones.\n\n<strong>Solicitudes erróneas:</strong> Cuando se envían solicitudes erróneas a la API, se envía un encabezado HTTP con la clave \"MediaWiki-API-Error\" y ambos valores, del encabezado y el código de error, se establecerán en el mismo valor. Para más información, véase [[mw:API:Errors_and_warnings|API: Errores y advertencias]].\n\n<strong>Pruebas:</strong> para facilitar las pruebas de solicitudes a la API, consulta [[Special:ApiSandbox]].",
+       "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|Documentación]]\n* [[mw:API:FAQ|Preguntas frecuentes]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista de correo]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Anuncios de la API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Errores y peticiones]\n</div>\n<strong>Estado:</strong> Todas las características que se muestran en esta página deberían funcionar, pero la API aún se encuentra en desarrollo activo y puede cambiar en cualquier momento. Suscríbete a [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ la lista de correo de mediawiki-api-announce] para estar al día de las actualizaciones.\n\n<strong>Solicitudes erróneas:</strong> Cuando se envían solicitudes erróneas a la API, se envía una cabecera HTTP con la clave \"MediaWiki-API-Error\". El valor de la cabecera y el código de error devuelto tomarán el mismo valor. Para más información, véase [[mw:API:Errors_and_warnings|API: Errores y advertencias]].\n\n<strong>Pruebas:</strong> para facilitar las pruebas de solicitudes a la API, consulta [[Special:ApiSandbox]].",
        "apihelp-main-param-action": "Qué acción se realizará.",
        "apihelp-main-param-format": "El formato de la salida.",
-       "apihelp-main-param-maxlag": "El máximo retraso puede ser utilizado cuando MediaWiki está instalado en una base de datos replicada clúster. Para guardar las acciones que causan más de replicación de sitios de retraso, este parámetro puede hacer que el cliente espere hasta que el retraso de la replicación es menor que el valor especificado. En caso de exceso de lag, código de error <samp>maxlag</samp> se devuelve con un mensaje parecido a <samp>la Espera de $host: $lag segundos quedado</samp>.<br />Véase [[mw:Manual:Maxlag_parameter|Manual: Maxlag parámetro]] para más información.",
+       "apihelp-main-param-maxlag": "El retraso (lag) máximo puede ser utilizado cuando MediaWiki está instalado en un conjunto de bases de datos replicadas. Para evitar cualquier acción que pudiera causar un retraso aún mayor en la replicación del sitio, este parámetro puede causar que el cliente espere hasta que el retraso de replicación sea menor que el valor especificado. En caso de exceso de retraso, se devuelve un código de error <samp>maxlag</samp> con un mensaje similar a <samp>Esperando a $host: $lag segundos de retraso</samp>.<br />Véase [[mw:Manual:Maxlag_parameter|Manual:Parámetro maxlag]] para más información.",
        "apihelp-main-param-smaxage": "Establece el encabezado HTTP <code>s-maxage</code> de control de caché a esta cantidad de segundos. Los errores nunca se almacenan en caché.",
        "apihelp-main-param-maxage": "Establece el encabezado HTTP <code>max-age</code> de control de caché a esta cantidad de segundos. Los errores nunca se almacenan en caché.",
        "apihelp-main-param-assert": "Comprobar que el usuario haya iniciado sesión si el valor es <kbd>user</kbd> o si tiene el permiso de bot si es <kbd>bot</kbd>.",
+       "apihelp-main-param-assertuser": "Verificar el usuario actual es el usuario nombrado.",
        "apihelp-main-param-requestid": "Cualquier valor dado aquí se incluirá en la respuesta. Se puede utilizar para distinguir solicitudes.",
        "apihelp-main-param-servedby": "Incluir el nombre del host que ha servido la solicitud en los resultados.",
        "apihelp-main-param-curtimestamp": "Incluir la marca de tiempo actual en el resultado.",
-       "apihelp-main-param-origin": "Cuando se accede a la API usando una petición AJAX de distinto dominio (CORS), se establece este valor al dominio de origen. Debe ser incluido en cualquier petición pre-vuelo, y por lo tanto debe ser parte de la URI de la petición (no del cuerpo POST). Debe coincidir exactamente con uno de los orígenes de la cabecera <code>Origin</code>, por lo que debería ser algo como <kbd>https://en.wikipedia.org</kbd> o <kbd>https://meta.wikimedia.org</kbd>. Si este parámetro no coincide con la cabecera <code>Origin</code>, se devolverá una respuesta 403.\nSi este parámetro coincide con la cabecera <code>Origin</code> y el origen está en lista blanca, se creará una cabecera <code>Access-Control-Allow-Origin</code>.",
-       "apihelp-main-param-uselang": "El idioma que se usará para las traducciones de mensajes. <kbd>[[Special:ApiHelp/query+siteinfo|action=query&meta=siteinfo]]</kbd> con <kbd>siprop=languages</kbd> devuelve una lista de códigos de idiomas, o especifica <kbd>user</kbd> para usar la preferencia de idioma del usuario actual, o especifica <kbd>content</kbd> para usar el idioma de contenido de este wiki.",
+       "apihelp-main-param-origin": "Cuando se accede a la API usando una petición AJAX de distinto dominio (CORS), se establece este valor al dominio de origen. Debe ser incluido en cualquier petición pre-vuelo, y por lo tanto debe ser parte de la URI de la petición (no del cuerpo POST).\n\nEn las peticiones con autenticación, debe coincidir exactamente con uno de los orígenes de la cabecera <code>Origin</code>, por lo que debería ser algo como <kbd>https://en.wikipedia.org</kbd> o <kbd>https://meta.wikimedia.org</kbd>. Si este parámetro no coincide con la cabecera <code>Origin</code>, se devolverá una respuesta 403. Si este parámetro coincide con la cabecera <code>Origin</code> y el origen está en la lista blanca, se creará una cabecera <code>Access-Control-Allow-Origin</code>.\n\nEn las peticiones sin autenticación, introduce el valor <kbd>*</kbd>. Esto creará una cabecera <code>Access-Control-Allow-Origin</code>, pero el valor de <code>Access-Control-Allow-Credentials</code> será <code>false</code> y todos los datos que dependan del usuario estarán restringidos.",
+       "apihelp-main-param-uselang": "El idioma que se utilizará para las traducciones de mensajes. <kbd>[[Special:ApiHelp/query+siteinfo|action=query&meta=siteinfo]]</kbd> con <kbd>siprop=languages</kbd> devuelve una lista de códigos de idiomas. También puedes introducir <kbd>user</kbd> para usar la preferencia de idioma del usuario actual, o <kbd>content</kbd> para usar el idioma de contenido de este wiki.",
        "apihelp-block-description": "Bloquear a un usuario.",
        "apihelp-block-param-user": "El nombre de usuario, dirección IP o intervalo de IP que quieres bloquear.",
        "apihelp-block-param-expiry": "Fecha de expiración. Puede ser relativa (por ejemplo, <kbd>5 months</kbd> o <kbd>2 weeks</kbd>) o absoluta (por ejemplo, <kbd>2014-09-18T12:34:56Z</kbd>). Si se establece en <kbd>infinite</kbd>, <kbd>indefinite</kbd>, o <kbd>never</kbd>, el bloqueo será permanente.",
        "apihelp-options-param-resetkinds": "Lista de tipos de opciones a restablecer cuando la opción <var>$1reset</var> esté establecida.",
        "apihelp-options-param-change": "Lista de cambios con el formato name=value (por ejemplo: skin=vector). El valor no puede contener caracteres de barras verticales. Si no se da ningún valor (ni siquiera un signo de igual), por ejemplo: optionname|otheroption|..., la opción se restablecerá a sus valores predeterminados.",
        "apihelp-options-param-optionname": "El nombre de la opción que debe establecerse en el valor dado por <var>$1optionvalue</var>.",
-       "apihelp-options-param-optionvalue": "El valor de la opción especificada por <var>$1optionname</var>, puede contener barras verticales.",
+       "apihelp-options-param-optionvalue": "El valor de la opción especificada por <var>$1optionname</var>.",
        "apihelp-options-example-reset": "Restablecer todas las preferencias",
        "apihelp-options-example-change": "Cambiar las preferencias <kbd>skin</kbd> y <kbd>hideminor</kbd>.",
        "apihelp-options-example-complex": "Restablecer todas las preferencias y establecer <kbd>skin</kbd> y <kbd>nickname</kbd>.",
        "apihelp-query+alltransclusions-param-prefix": "Buscar todos los títulos transcluidos que comiencen con este valor.",
        "apihelp-query+alltransclusions-param-prop": "Qué piezas de información incluir:",
        "apihelp-query+alltransclusions-paramvalue-prop-title": "Añade el título de la transclusión.",
+       "apihelp-query+alltransclusions-param-namespace": "El espacio de nombres que enumerar.",
        "apihelp-query+alltransclusions-param-limit": "Número de elementos que se desea obtener.",
        "apihelp-query+alltransclusions-example-unique": "Listar títulos transcluidos de forma única.",
        "apihelp-query+alltransclusions-example-unique-generator": "Obtiene todos los títulos transcluidos, marcando los que faltan.",
        "apihelp-query+allusers-description": "Enumerar todos los usuarios registrados.",
        "apihelp-query+allusers-param-prefix": "Buscar todos los usuarios que empiecen con este valor.",
        "apihelp-query+allusers-param-group": "Incluir solo usuarios en los grupos dados.",
+       "apihelp-query+allusers-param-excludegroup": "Excluir a los usuarios en estos grupos",
+       "apihelp-query+allusers-param-rights": "Sólo se incluyen a los usuarios con los derechos cedidos. No incluye los derechos concedidos por la implícita o auto-promoverse grupos como *, usuario, o autoconfirmed.",
        "apihelp-query+allusers-param-prop": "Qué piezas de información incluir:",
        "apihelp-query+allusers-paramvalue-prop-blockinfo": "Añade información sobre un bloque actual al usuario.",
        "apihelp-query+allusers-paramvalue-prop-groups": "Lista los grupos a los que el usuario pertenece. Esto utiliza más recursos del servidor y puede devolver menos resultados que el límite.",
+       "apihelp-query+allusers-paramvalue-prop-implicitgroups": "Lista todos los grupos el usuario es automáticamente en.",
        "apihelp-query+allusers-paramvalue-prop-rights": "Lista los permisos que tiene el usuario.",
        "apihelp-query+allusers-paramvalue-prop-editcount": "Añade el número de ediciones del usuario.",
        "apihelp-query+allusers-paramvalue-prop-registration": "Añade la marca de tiempo del momento en que el usuario se registró, si está disponible (puede estar en blanco).",
+       "apihelp-query+allusers-paramvalue-prop-centralids": "Añade el central IDs y estado de anexo para el usuario.",
        "apihelp-query+allusers-param-limit": "Cuántos nombres de usuario se devolverán.",
+       "apihelp-query+allusers-param-witheditsonly": "Mostrar solo los usuarios que han realizado ediciones.",
        "apihelp-query+allusers-param-activeusers": "Solo listar usuarios activos en {{PLURAL:$1|el último día|los $1 últimos días}}.",
+       "apihelp-query+allusers-param-attachedwiki": "Con <kbd>$1prop=centralids</kbd>, indicar también si el usuario está conectado con el wiki identificado por el ID.",
        "apihelp-query+allusers-example-Y": "Listar usuarios que empiecen por <kbd>Y</kbd>.",
        "apihelp-query+authmanagerinfo-example-login": "Captura de las solicitudes que puede ser utilizadas al comienzo de inicio de sesión.",
        "apihelp-query+backlinks-description": "Encuentra todas las páginas que enlazan a la página dada.",
        "apihelp-query+backlinks-param-pageid": "Identificador de página que buscar. No puede usarse junto con <var>$1title</var>",
+       "apihelp-query+backlinks-param-namespace": "El espacio de nombres que enumerar.",
        "apihelp-query+backlinks-param-filterredir": "Cómo filtrar redirecciones. Si se establece a <kbd>nonredirects</kbd> cuando está activo <var>$1redirect</var>, esto sólo se aplica al segundo nivel.",
        "apihelp-query+backlinks-param-limit": "Cuántas páginas en total se devolverán. Si está activo <var>$1redirect</var>, el límite aplica a cada nivel por separado (lo que significa que se pueden devolver hasta 2 * <var>$1limit</var> resultados).",
        "apihelp-query+backlinks-example-simple": "Mostrar enlaces a <kbd>Main page</kbd>.",
        "apihelp-query+backlinks-example-generator": "Obtener información acerca de las páginas enlazadas a <kbd>Main page</kbd>.",
        "apihelp-query+blocks-description": "Listar todos los usuarios y direcciones IP bloqueadas.",
+       "apihelp-query+blocks-param-start": "El sello de tiempo para comenzar la enumeración",
+       "apihelp-query+blocks-param-end": "El sello de tiempo para detener la enumeración",
+       "apihelp-query+blocks-param-ids": "Lista de bloquear IDs para listar (opcional).",
        "apihelp-query+blocks-param-users": "Lista de usuarios a buscar (opcional).",
        "apihelp-query+blocks-param-ip": "Obtiene todos los bloqueos que se aplican a esta dirección IP o intervalo CIDR, incluyendo bloqueos de intervalos. No se puede usar en conjunto con <var>$3users</var>. No se aceptan intervalos CIDR mayores que IPv4/$1 o IPv6/$2.",
+       "apihelp-query+blocks-param-limit": "El número máximo de filtros a listar.",
        "apihelp-query+blocks-param-prop": "Qué propiedades se obtendrán:",
+       "apihelp-query+blocks-paramvalue-prop-id": "Agrega el ID del bloque.",
+       "apihelp-query+blocks-paramvalue-prop-user": "Añade el nombre de usuario del usuario bloqueado.",
        "apihelp-query+blocks-paramvalue-prop-userid": "Añade el identificador del usuario bloqueado.",
+       "apihelp-query+blocks-paramvalue-prop-by": "Añade el nombre de usuario del bloqueo de usuario.",
+       "apihelp-query+blocks-paramvalue-prop-byid": "Añade el usuario ID del usuario bloqueador.",
        "apihelp-query+blocks-paramvalue-prop-timestamp": "Añade la fecha y hora de cuando se aplicó el bloque.",
+       "apihelp-query+blocks-paramvalue-prop-expiry": "Añade la marca de tiempo correspondiente a la expiración del bloqueo.",
        "apihelp-query+blocks-paramvalue-prop-reason": "Añade la razón dada para el bloqueo.",
+       "apihelp-query+blocks-paramvalue-prop-range": "Añade la gama de direcciones de IP afectó por el bloque.",
+       "apihelp-query+blocks-paramvalue-prop-flags": "Etiquetas la prohibición con (autoblock, anononly, etc.).",
        "apihelp-query+blocks-example-simple": "Listar bloques.",
        "apihelp-query+categories-param-prop": "Qué propiedades adicionales obtener para cada categoría:",
        "apihelp-query+categories-paramvalue-prop-timestamp": "Añade la marca de tiempo del momento en que se añadió la categoría.",
        "apihelp-query+exturlusage-param-prop": "Qué piezas de información incluir:",
        "apihelp-query+exturlusage-paramvalue-prop-ids": "Añade el identificado de la página.",
        "apihelp-query+exturlusage-paramvalue-prop-title": "Agrega el título y el identificador del espacio de nombres de la página.",
+       "apihelp-query+exturlusage-paramvalue-prop-url": "Añade el URL utilizado en la página.",
        "apihelp-query+exturlusage-param-protocol": "Protocolo del URL. Si está vacío y se establece <var>$1query</var>, el protocolo es <kbd>http</kbd>. Deja vacío esto y <var>$1query</var> para listar todos los enlaces externos.",
        "apihelp-query+exturlusage-param-limit": "Cuántas páginas se devolverán.",
        "apihelp-query+exturlusage-example-simple": "Mostrar páginas que enlacen con <kbd>http://www.mediawiki.org</kbd>.",
        "apihelp-watch-example-watch": "Vigilar la página <kbd>Main Page</kbd>.",
        "apihelp-watch-example-unwatch": "Dejar de vigilar la <kbd>Main Page</kbd>.",
        "apihelp-format-example-generic": "Devolver el resultado de la consulta en formato $1.",
+       "apihelp-json-description": "Extraer los datos de salida en formato JSON.",
+       "apihelp-json-param-callback": "Si se especifica, envuelve la salida dentro de una llamada a una función dada. Por motivos de seguridad, cualquier dato específico del usuario estará restringido.",
+       "apihelp-json-param-utf8": "Si se especifica, codifica la mayoría (pero no todos) de los caracteres no pertenecientes a ASCII como UTF-8 en lugar de reemplazarlos por secuencias de escape hexadecimal. Toma el comportamiento por defecto si <var>formatversion</var> no es <kbd>1</kbd>.",
+       "apihelp-json-param-ascii": "Si se especifica, codifica todos los caracteres no pertenecientes a ASCII mediante secuencias de escape hexadecimal. Toma el comportamiento por defecto si <var>formatversion</var> no es <kbd>1</kbd>.",
+       "apihelp-json-param-formatversion": "Formato de salida:\n;1: Formato retrocompatible (booleanos con estilo XML, claves <samp>*</samp> para nodos de contenido, etc.).\n;2: Formato moderno experimental. ¡Atención, las especificaciones pueden cambiar!\n;latest: Utiliza el último formato (actualmente <kbd>2</kbd>). Puede cambiar sin aviso.",
+       "apihelp-none-description": "No extraer nada.",
+       "apihelp-php-description": "Extraer los datos de salida en formato serializado PHP.",
+       "apihelp-rawfm-description": "Extraer los datos de salida, incluidos los elementos de depuración, en formato JSON (embellecido en HTML).",
+       "apihelp-xml-param-xslt": "Si se especifica, añade la página nombrada como una hoja de estilo XSL. El valor debe ser un título en el espacio de nombres {{ns:mediawiki}} que termine en <code>.xsl</code>.",
+       "apihelp-xml-param-includexmlnamespace": "Si se especifica, añade un espacio de nombres XML.",
        "api-help-main-header": "Módulo principal",
        "api-help-flag-deprecated": "Este módulo está en desuso.",
        "api-help-flag-readrights": "Este módulo requiere permisos de lectura.",
index ef9d7d1..6843c90 100644 (file)
@@ -37,6 +37,7 @@
        "apihelp-main-param-smaxage": "Fixer l’entête HTTP de contrôle de cache <code>s-maxage</code> à ce nombre de secondes. Les erreurs ne sont jamais mises en cache.",
        "apihelp-main-param-maxage": "Fixer l’entête HTTP de contrôle de cache <code>max-age</code> à ce nombre de secondes. Les erreurs ne sont jamais mises en cache.",
        "apihelp-main-param-assert": "Vérifier si l’utilisateur est connecté si positionné à <kbd>user</kbd>, ou s'il a le droit d'un utilisateur robot si positionné à <kbd>bot</kbd>.",
+       "apihelp-main-param-assertuser": "Vérifier que l’utilisateur actuel est l’utilisateur nommé.",
        "apihelp-main-param-requestid": "Toute valeur fournie ici sera incluse dans la réponse. Peut être utilisé pour distinguer des demandes.",
        "apihelp-main-param-servedby": "Inclure le nom d’hôte qui a renvoyé la requête dans les résultats.",
        "apihelp-main-param-curtimestamp": "Inclure l’horodatage actuel dans le résultat.",
@@ -49,7 +50,7 @@
        "apihelp-block-param-anononly": "Bloquer uniquement les utilisateurs anonymes (c’est-à-dire désactiver les modifications anonymes pour cette adresse IP).",
        "apihelp-block-param-nocreate": "Empêcher la création de compte.",
        "apihelp-block-param-autoblock": "Bloquer automatiquement la dernière adresse IP utilisée, et toute les adresses IP subséquentes depuis lesquelles ils ont essayé de se connecter.",
-       "apihelp-block-param-noemail": "Empêcher l’utilisateur d’envoyer des courriels via le wiki (nécessite le doit <code>blockemail</code>).",
+       "apihelp-block-param-noemail": "Empêcher l’utilisateur d’envoyer des courriels via le wiki (nécessite le droit <code>blockemail</code>).",
        "apihelp-block-param-hidename": "Masque le nom de l’utilisateur dans le journal des blocages (nécessite le droit <code>hideuser</code>).",
        "apihelp-block-param-allowusertalk": "Autoriser les utilisateurs à modifier leur propre page de discussion (dépend de <var>[[mw:Manual:$wgBlockAllowsUTEdit|$wgBlockAllowsUTEdit]]</var>).",
        "apihelp-block-param-reblock": "Si l’utilisateur est déjà bloqué, écraser le blocage existant.",
        "apihelp-edit-param-tags": "Modifier les balises à appliquer à la version.",
        "apihelp-edit-param-minor": "Modification mineure.",
        "apihelp-edit-param-notminor": "Modification non mineure.",
-       "apihelp-edit-param-bot": "Marquer cette modification comme robot.",
+       "apihelp-edit-param-bot": "Marquer cette modification comme effectuée par un robot.",
        "apihelp-edit-param-basetimestamp": "Horodatage de la révision de base, utilisé pour détecter les conflits de modification. Peut être obtenu via [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "L'horodatage, lorsque le processus d'édition est démarré, est utilisé pour détecter les conflits de modification. Une valeur appropriée peut être obtenue en utilisant <var>[[Special:ApiHelp/main|curtimestamp]]</var> lors du démarrage du processus d'édition (par ex. en chargeant le contenu de la page à modifier).",
        "apihelp-edit-param-recreate": "Ignorer toutes les erreurs concernant la page \nqui a été supprimée entre-temps.",
        "apihelp-emailuser-param-text": "Corps du courriel.",
        "apihelp-emailuser-param-ccme": "M’envoyer une copie de ce courriel.",
        "apihelp-emailuser-example-email": "Envoyer un courriel à l’utilisateur <kbd>WikiSysop</kbd> avec le texte <kbd>Content</kbd>.",
-       "apihelp-expandtemplates-description": "Développe tous les modèles en wikitexte.",
+       "apihelp-expandtemplates-description": "Développe tous les modèles avec du wikitexte.",
        "apihelp-expandtemplates-param-title": "Titre de la page.",
        "apihelp-expandtemplates-param-text": "Wikitexte à convertir.",
        "apihelp-expandtemplates-param-revid": "ID de révision, pour <nowiki>{{REVISIONID}}</nowiki> et les variables semblables.",
        "apihelp-options-description": "Modifier les préférences de l’utilisateur courant.\n\nSeules les options enregistrées dans le cœur ou dans l’une des extensions installées, ou les options avec des clés préfixées par <code>userjs-</code> (devant être utilisées dans les scripts utilisateur), peuvent être définies.",
        "apihelp-options-param-reset": "Réinitialise les préférences aux valeurs par défaut du site.",
        "apihelp-options-param-resetkinds": "Liste des types d’option à réinitialiser quand l’option <var>$1reset</var> est définie.",
-       "apihelp-options-param-change": "Liste des modifications, au format nom=valeur (par ex. skin=vector). La valeur ne peut pas contenir de caractère barre verticale. Si aucune valeur n’est fournie (pas même un signe égal), par ex., nomoption|autreoption|…, l’option sera réinitialisée à sa valeur par défaut.",
+       "apihelp-options-param-change": "Liste des modifications, au format nom=valeur (par ex. skin=vector). Si aucune valeur n’est fournie (pas même un signe égal), par ex., nomoption|autreoption|…, l’option sera réinitialisée à sa valeur par défaut. Pour toute valeur passée contenant une barre verticale (<kbd>|</kbd>), utiliser le [[Special:ApiHelp/main#main/datatypes|séparateur alternatif de valeur multiple]] pour que l'opération soit correcte.",
        "apihelp-options-param-optionname": "Un nom d’option qui doit être fixé à la valeur fournie par <var>$1optionvalue</var>.",
-       "apihelp-options-param-optionvalue": "La valeur d’une option spécifiée par <var>$1optionname</var> peut contenir des caractères barre verticale.",
+       "apihelp-options-param-optionvalue": "La valeur de l'option spécifiée par <var>$1optionname</var>.",
        "apihelp-options-example-reset": "Réinitialiser toutes les préférences",
        "apihelp-options-example-change": "Modifier les préférences <kbd>skin</kbd> et <kbd>hideminor</kbd>.",
        "apihelp-options-example-complex": "Réinitialiser toutes les préférences, puis définir <kbd>skin</kbd> et <kbd>nickname</kbd>.",
index 79e36cf..6d90fb5 100644 (file)
@@ -20,6 +20,7 @@
        "apihelp-main-param-smaxage": "Fixar a cabeceira HTTP de control de caché <code>s-maxage</code> a esos segundos. Os erros nunca se gardan na caché.",
        "apihelp-main-param-maxage": "Fixar a cabeceira HTTP de control de caché <code>max-age</code> a esos segundos. Os erros nunca se gardan na caché.",
        "apihelp-main-param-assert": "Verificar se o usuario está conectado como <kbd>usuario</kbd> ou ten a marca de <kbd>bot</kbd>.",
+       "apihelp-main-param-assertuser": "Verificar que o usuario actual é o usuario nomeado.",
        "apihelp-main-param-requestid": "Calquera valor dado aquí será incluído na resposta. Pode usarse para distingir peticións.",
        "apihelp-main-param-servedby": "Inclúa o nome do servidor que servía a solicitude nos resultados.",
        "apihelp-main-param-curtimestamp": "Incluir a marca de tempo actual no resultado.",
        "apihelp-emailuser-param-text": "Corpo do correo.",
        "apihelp-emailuser-param-ccme": "Enviarme unha copia deste correo.",
        "apihelp-emailuser-example-email": "Enviar un correo electrónico ó usuario <kbd>WikiSysop</kbd> co texto <kbd>Content</kbd>.",
-       "apihelp-expandtemplates-description": "Expandir tódolos modelos en wikitexto.",
+       "apihelp-expandtemplates-description": "Expandir tódolos modelos dentro do wikitexto.",
        "apihelp-expandtemplates-param-title": "Título da páxina.",
        "apihelp-expandtemplates-param-text": "Sintaxis wiki a converter.",
        "apihelp-expandtemplates-param-revid": "ID de revisión, para <nowiki>{{REVISIONID}}</nowiki> e variables similares.",
        "apihelp-options-description": "Cambiar as preferencias do usuario actual.\n\nSó se poden cambiar opcións que estean rexistradas no núcleo ou nunha das extensións instaladas, ou aquelas opcións con claves prefixadas con <code>userjs-</code> (previstas para ser usadas por escrituras de usuario).",
        "apihelp-options-param-reset": "Reinicia as preferencias ás iniciais do sitio.",
        "apihelp-options-param-resetkinds": "Lista de tipos de opcións a reinicializar cando a opción <var>$1reset</var> está definida.",
-       "apihelp-options-param-change": "Lista de cambios, con formato nome=valor (p. ex. skin=vector). O valor non pode ter caracteres de barra vertical. Se non se indica un valor (sen u signo igual), p. ex. nomeopcion|outraopcion|..., a opción será gardada co seu valor por defecto.",
+       "apihelp-options-param-change": "Lista de cambios, con formato nome=valor (p. ex. skin=vector). Se non se da un valor (sen un símbolo de igual), p.ex. optionname|otheroption|..., a opción pasará ó valor por defecto. Para calquera valor que conteña o carácter (<kbd>|</kbd>), use o [[Special:ApiHelp/main#main/datatypes|separador alternativo para valores múltiples]] para unha operación correcta.",
        "apihelp-options-param-optionname": "O nome da opción que debe fixarse no valor dado por <var>$1optionvalue</var>.",
-       "apihelp-options-param-optionvalue": "O valor para a opción especificada por <var>$1optionname</var>. Pode conter barras verticais.",
+       "apihelp-options-param-optionvalue": "O valor para a opción especificada por <var>$1optionname</var>, pode conter barras verticais.",
        "apihelp-options-example-reset": "Restablecer todas as preferencias.",
        "apihelp-options-example-change": "Cambiar as preferencias <kbd>skin</kbd> and <kbd>hideminor</kbd>.",
        "apihelp-options-example-complex": "Restaurar todas as preferencias, logo fixar <kbd>skin</kbd> e <kbd>nickname</kbd>.",
index dd0d07b..16e6d8a 100644 (file)
@@ -21,6 +21,7 @@
        "apihelp-main-param-smaxage": "הגדרת כותרת בקרת מטמון HTTP‏ <code>s-maxage</code> למספר כזה של שניות.",
        "apihelp-main-param-maxage": "הגדרת כותרת בקרת מטמון HTTP‏ <code>max-age</code> למספר כזה של שניות.",
        "apihelp-main-param-assert": "לוודא שהמשתמש נכנס אם זה מוגדר ל־<kbd>user</kbd>, או שיש לו הרשאת בוט אם זה <kbd>bot</kbd>.",
+       "apihelp-main-param-assertuser": "לוודא שהמשתמש הנוכחי הוא המשתמש ששמו ניתן.",
        "apihelp-main-param-requestid": "כל ערך שיינתן כאן ייכלל בתשובה. אפשר להשתמש בזה כדי להבדיל בין בקשות.",
        "apihelp-main-param-servedby": "לכלול את שם המארח ששירת את הבקשה בתוצאות.",
        "apihelp-main-param-curtimestamp": "הכללת חותם־הזמן הנוכחי בתוצאה.",
        "apihelp-edit-param-tags": "אילו תגי שינוי להחיל על הגרסה.",
        "apihelp-edit-param-minor": "עריכה משנית.",
        "apihelp-edit-param-notminor": "שינוי לא משני.",
-       "apihelp-edit-param-bot": "סימון עריכה זו כבוט.",
+       "apihelp-edit-param-bot": "ס×\99×\9e×\95×\9f ×¢×¨×\99×\9b×\94 ×\96×\95 ×\9bער×\99×\9bת ×\91×\95×\98.",
        "apihelp-edit-param-basetimestamp": "חותם־זמן של גרסת הבסיס, משמש לזיהוי התנגשויות עריכה. אפשר לקבל אותו באמצעות [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "חותם־הזמן של תחילת תהליך העריכה, משמש לזיהוי התנגשויות. אפשר לקבל ערך מתאים באמצעות <var>[[Special:ApiHelp/main|curtimestamp]]</var> בעת תחילת תהליך העריכה (למשל בזמן טעינת תוכן הדף לעריכה).",
        "apihelp-edit-param-recreate": "לעקוב את כל הטעויות על כך שהדף נמחק בינתיים.",
        "apihelp-emailuser-param-text": "גוף הדואר.",
        "apihelp-emailuser-param-ccme": "שליחת עותק של הדואר הזה אליי.",
        "apihelp-emailuser-example-email": "שליחת דוא\"ל למשתמש <kbd>WikiSysop</kbd> עם הטקסט <kbd>Content</kbd>.",
-       "apihelp-expandtemplates-description": "הרחבת כל התבניות בקוד הוויקי.",
+       "apihelp-expandtemplates-description": "×\94ר×\97×\91ת ×\9b×\9c ×\94ת×\91× ×\99×\95ת ×\91ת×\95×\9a ×§×\95×\93 ×\94×\95×\95×\99ק×\99.",
        "apihelp-expandtemplates-param-title": "כותרת הדף.",
        "apihelp-expandtemplates-param-text": "איזה קוד ויקי להמיר.",
        "apihelp-expandtemplates-param-revid": "מזהה גרסה, עבור <nowiki>{{REVISIONID}}</nowiki> ומשתנים דומים.",
        "apihelp-options-description": "שינוי העדפות של המשתמש הנוכחי.\n\nרק אפשרויות שמוגדרות בליבה או באחת מההרחבות המותקנות, או אפשרויות עם מפתחות עם התחילית \"<code dir=\"ltr\">userjs-</code>\" (שמיועדות לשימוש תסריטי משתמשים) יכולות להיות מוגדרות.",
        "apihelp-options-param-reset": "אתחול ההעדפות לבררות המחדל של האתר.",
        "apihelp-options-param-resetkinds": "רשימת סוגי אפשרויות לאתחל כאשר מוגדרת האפשרות <var>$1reset</var>.",
-       "apihelp-options-param-change": "רש×\99×\9eת ×©×\99× ×\95×\99×\99×\9d, ×\91תס×\93×\99ר name=value (×\9c×\9eש×\9c skin=vector). ×\94ער×\9a ×\90×\99× ×\95 ×\99×\9b×\95×\9c ×\9c×\94×\9b×\99×\9c ×ª×\95×\95×\99 ×\9eק×\9c (|). ×\90×\9d ×\9c×\90 × ×\99ת×\9f ×¢×¨×\9a, ×\90פ×\99×\9c×\95 ×\9c×\90 ×¡×\99×\9e×\9f ×©×\95×\95×\94, ×\9c×\9eש×\9c optionname|otheroption|...â\80\8e, ×\94×\90פשר×\95ת ×ª×\90×\95פס ×\9cער×\9a ×\91ררת ×\94×\9e×\97×\93×\9c ×©×\9cה.",
+       "apihelp-options-param-change": "רש×\99×\9eת ×©×\99× ×\95×\99×\99×\9d, ×\91תס×\93×\99ר name=value (×\9c×\9eש×\9c skin=vector). ×\90×\9d ×\9c×\90 × ×\99ת×\9f ×¢×¨×\9a, ×\90פ×\99×\9c×\95 ×\9c×\90 ×¡×\99×\9e×\9f ×©×\95×\95×\94, ×\9c×\9eש×\9c optionname|otheroption|...â\80\8e, ×\94×\90פשר×\95ת ×ª×\90×\95פס ×\9cער×\9a ×\91ררת ×\94×\9e×\97×\93×\9c ×©×\9c×\94. ×\90×\9d ×¢×¨×\9a ×\9e×\95×¢×\91ר ×\9b×\9cש×\94×\95 ×\9e×\9b×\99×\9c ×\90ת ×ª×\95 ×\94×\9eק×\9c (<kbd>|</kbd>), ×\99ש ×\9c×\94שת×\9eש ×\91[[Special:ApiHelp/main#main/datatypes|×\9eפר×\99×\93 ×¢×¨×\9b×\99×\9d ×\9eר×\95×\91×\99×\9d ×\97×\9c×\95פ×\99]] ×\91ש×\91×\99×\9c ×¤×¢×\95×\9c×\94 × ×\9b×\95× ה.",
        "apihelp-options-param-optionname": "שם האפשרות שצריך להגדיר לערך שניתן ב־<var>$1optionvalue</var>.",
-       "apihelp-options-param-optionvalue": "ערך האפשרות שצוין ב־<var>$1optionname</var>, יכול להכיל תווי מקל.",
+       "apihelp-options-param-optionvalue": "ערך האפשרות שצוין ב־<var>$1optionname</var>.",
        "apihelp-options-example-reset": "אתחול כל ההעדפות.",
        "apihelp-options-example-change": "לשנות את ההעדפות <kbd>skin</kbd> ו־<kbd>hideminor</kbd>.",
        "apihelp-options-example-complex": "לאתחל את כל ההעדפות ואז להגדיר את <kbd>skin</kbd> ואת <kbd>nickname</kbd>.",
diff --git a/includes/api/i18n/hr.json b/includes/api/i18n/hr.json
new file mode 100644 (file)
index 0000000..5f46e73
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Ex13"
+               ]
+       },
+       "apihelp-block-description": "Blokiraj suradnika.",
+       "apihelp-block-param-user": "Suradničko ime, IP adresa ili opseg koje želite blokirati."
+}
index 9786543..48521a1 100644 (file)
@@ -90,7 +90,7 @@
        "apihelp-edit-param-tags": "Cambia i tag da applicare alla revisione.",
        "apihelp-edit-param-minor": "Modifica minore.",
        "apihelp-edit-param-notminor": "Modifica non minore.",
-       "apihelp-edit-param-bot": "Contrassegna questa modifica come bot.",
+       "apihelp-edit-param-bot": "Contrassegna questa modifica come eseguita da un bot.",
        "apihelp-edit-param-createonly": "Non modificare la pagina se già esiste.",
        "apihelp-edit-param-nocreate": "Genera un errore se la pagina non esiste.",
        "apihelp-edit-param-watch": "Aggiunge la pagina agli osservati speciali dell'utente attuale.",
        "apihelp-emailuser-param-text": "Testo dell'e-mail.",
        "apihelp-emailuser-param-ccme": "Mandami una copia di questa mail.",
        "apihelp-emailuser-example-email": "Manda una e-mail all'utente <kbd>WikiSysop</kbd> con il testo <kbd>Content</kbd>.",
-       "apihelp-expandtemplates-description": "Espandi tutti i template nel wikitesto.",
+       "apihelp-expandtemplates-description": "Espande tutti i template all'interno del wikitesto.",
        "apihelp-expandtemplates-param-title": "Titolo della pagina.",
        "apihelp-expandtemplates-param-text": "Wikitesto da convertire.",
        "apihelp-expandtemplates-param-prop": "Quale informazione ottenere.\n\nNota che se non è selezionato alcun valore, il risultato conterrà il codice wiki, ma l'output sarà in un formato obsoleto.",
        "apihelp-opensearch-param-suggest": "Non fare nulla se <var>[[mw:Manual:$wgEnableOpenSearchSuggest|$wgEnableOpenSearchSuggest]]</var> è falso.",
        "apihelp-opensearch-param-format": "Il formato dell'output.",
        "apihelp-opensearch-example-te": "Trova le pagine che iniziano con <kbd>Te</kbd>.",
+       "apihelp-options-param-optionvalue": "Il valore per l'opzione specificata da <var>$1optionname</var>.",
        "apihelp-options-example-reset": "Reimposta tutte le preferenze.",
        "apihelp-paraminfo-description": "Ottieni informazioni sui moduli API.",
        "apihelp-paraminfo-param-helpformat": "Formato delle stringhe di aiuto.",
index f3beff6..3985dc1 100644 (file)
@@ -9,7 +9,8 @@
                        "Otokoume",
                        "Sujiniku",
                        "Macofe",
-                       "Suchichi02"
+                       "Suchichi02",
+                       "Kkairri"
                ]
        },
        "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|説明文書]]\n* [[mw:API:FAQ|よくある質問]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api メーリングリスト]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API 告知]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R バグの報告とリクエスト]\n</div>\n<strong>状態:</strong> このページに表示されている機能は全て動作するはずですが、この API は未だ活発に開発されており、変更される可能性があります。アップデートの通知を受け取るには、[https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ the mediawiki-api-announce メーリングリスト]に参加してください。\n\n<strong>誤ったリクエスト:</strong> 誤ったリクエストが API に送られた場合、\"MediaWiki-API-Error\" HTTP ヘッダーが送信され、そのヘッダーの値と送り返されるエラーコードは同じ値にセットされます。より詳しい情報は [[mw:API:Errors_and_warnings|API: Errors and warnings]] を参照してください。\n\n<strong>テスト:</strong> API のリクエストのテストは、[[Special:ApiSandbox]]で簡単に行えます。",
@@ -85,7 +86,7 @@
        "apihelp-edit-param-tags": "この版に適用する変更タグ。",
        "apihelp-edit-param-minor": "細部の編集",
        "apihelp-edit-param-notminor": "細部の編集ではない。",
-       "apihelp-edit-param-bot": "この編集をボットとしてマークする。",
+       "apihelp-edit-param-bot": "ã\81\93ã\81®ç·¨é\9b\86ã\82\92ã\83\9cã\83\83ã\83\88ã\81®ç·¨é\9b\86ã\81¨ã\81\97ã\81¦ã\83\9eã\83¼ã\82¯ã\81\99ã\82\8bã\80\82",
        "apihelp-edit-param-basetimestamp": "編集前の版のタイムスタンプ。編集競合を検出するために使用されます。\n[[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]] で取得できます。",
        "apihelp-edit-param-starttimestamp": "編集作業を開始したときのタイムスタンプ。編集競合を検出するために使用されます。適切な値は <var>[[Special:ApiHelp/main|curtimestamp]]</var> を使用して編集作業を開始するとき (たとえば、編集するページの本文を読み込んだとき) に取得できます。",
        "apihelp-edit-param-createonly": "すでにそのページが存在する場合は編集を行いません。",
        "apihelp-protect-description": "ページの保護レベルを変更します。",
        "apihelp-protect-param-title": "保護(解除)するページ名です。$1pageid とは同時に使用できません。",
        "apihelp-protect-param-pageid": "保護(解除)するページIDです。$1title とは同時に使用できません。",
-       "apihelp-protect-param-protections": "<kbd>action=level</kbd> の形式 (例えば、<kbd>edit=sysop</kbd>) で整形された、保護レベルの一覧。\n\n<strong>注意: </strong> ここに列挙されなかった操作の制限は解除されます。",
+       "apihelp-protect-param-protections": "<kbd>action=level</kbd> の形式 (例えば、<kbd>edit=sysop</kbd>) で整形された、保護レベルの一覧。レベル <kbd>all</kbd> は誰もが操作できる、言い換えると制限が掛かっていないことを意味します。\n\n<strong>注意: </strong> ここに列挙されなかった操作の制限は解除されます。",
        "apihelp-protect-param-expiry": "有効期限です。タイムスタンプがひとつだけ指定された場合は、それがすべての保護に適用されます。無期限の保護を行う場合は<kbd>infinite</kbd>, <kbd>indefinite</kbd>, <kbd>infinity</kbd>, または <kbd>never</kbd> を指定します。",
        "apihelp-protect-param-reason": "保護(解除)の理由。",
        "apihelp-protect-param-tags": "保護記録の項目に適用する変更タグ。",
        "apihelp-query+siteinfo-paramvalue-prop-general": "システム全体の情報。",
        "apihelp-query+siteinfo-paramvalue-prop-specialpagealiases": "特別ページの別名の一覧。",
        "apihelp-query+siteinfo-paramvalue-prop-magicwords": "マジックワードとこれらの別名の一覧。",
+       "apihelp-query+siteinfo-param-numberingroup": "利用者グループに属する利用者の数を一覧表示します。",
        "apihelp-query+siteinfo-example-simple": "サイト情報を取得する。",
        "apihelp-query+tags-description": "変更タグを一覧表示します。",
        "apihelp-query+tags-param-limit": "一覧表示するタグの最大数。",
        "apihelp-query+usercontribs-param-tag": "このタグが付与された版のみを一覧表示する。",
        "apihelp-query+usercontribs-param-toponly": "最新の版である変更のみを一覧表示する。",
        "apihelp-query+usercontribs-example-user": "利用者 <kbd>Example</kbd> の投稿記録を表示する。",
+       "apihelp-query+usercontribs-example-ipprefix": "<kbd>192.0.2.</kbd> から始まるすべてのIPアドレスからの投稿記録を表示する。",
+       "apihelp-query+userinfo-description": "現在の利用者に関する情報を取得します。",
        "apihelp-query+userinfo-param-prop": "どの情報を結果に含めるか:",
        "apihelp-query+userinfo-paramvalue-prop-realname": "利用者の本名を追加します。",
        "apihelp-query+userinfo-example-simple": "現在の利用者に関する情報を取得します。",
diff --git a/includes/api/i18n/ka.json b/includes/api/i18n/ka.json
new file mode 100644 (file)
index 0000000..a9bc686
--- /dev/null
@@ -0,0 +1,11 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Irus"
+               ]
+       },
+       "apihelp-login-param-name": "მომხმარებლის სახელი",
+       "apihelp-login-param-password": "პაროლი",
+       "apihelp-login-param-domain": "ელ-ფოსტა (არასავალდებულო)",
+       "apihelp-login-example-login": "შესვლა"
+}
index 5ae6c87..f15bec1 100644 (file)
@@ -88,7 +88,7 @@
        "apihelp-edit-param-tags": "이 판에 적용할 태그를 변경합니다.",
        "apihelp-edit-param-minor": "사소한 편집.",
        "apihelp-edit-param-notminor": "사소하지 않은 편집.",
-       "apihelp-edit-param-bot": "이 편집을 봇으로 표시.",
+       "apihelp-edit-param-bot": "이 편집을 봇 편집으로 표시.",
        "apihelp-edit-param-createonly": "이 페이지가 이미 존재하면 편집하지 않습니다.",
        "apihelp-edit-param-nocreate": "페이지가 존재하지 않으면 오류를 출력합니다.",
        "apihelp-edit-param-watch": "문서를 현재 사용자의 주시문서 목록에 추가합니다.",
        "apihelp-emailuser-param-text": "메일 본문.",
        "apihelp-emailuser-param-ccme": "자신에게 메일의 복사본을 보냅니다.",
        "apihelp-emailuser-example-email": "<kbd>WikiSysop</kbd> 사용자에게 텍스트 <kbd>Content</kbd>로 이메일을 보냅니다.",
-       "apihelp-expandtemplates-description": "모든 틀을 위키텍스트로 확장.",
+       "apihelp-expandtemplates-description": "위키텍스트 안에 모든 틀을 확장합니다.",
        "apihelp-expandtemplates-param-title": "문서 제목",
        "apihelp-expandtemplates-param-text": "변환할 위키텍스트.",
        "apihelp-expandtemplates-paramvalue-prop-wikitext": "확장된 위키텍스트.",
        "apihelp-query+revisions+base-paramvalue-prop-contentmodel": "판의 콘텐츠 모델 ID.",
        "apihelp-query+revisions+base-paramvalue-prop-content": "판의 텍스트.",
        "apihelp-query+revisions+base-paramvalue-prop-tags": "판의 태그.",
+       "apihelp-query+search-description": "전문 검색을 수행합니다.",
        "apihelp-query+search-param-qiprofile": "쿼리 독립적인 프로파일 사용(순위 알고리즘에 영향있음)",
        "apihelp-query+search-paramvalue-prop-size": "바이트 단위로 문서의 크기를 추가합니다.",
        "apihelp-query+search-paramvalue-prop-wordcount": "문서의 낱말 수를 추가합니다.",
index 041203e..47b79ab 100644 (file)
@@ -5,6 +5,7 @@
                        "Macofe"
                ]
        },
+       "apihelp-main-param-assertuser": "Iwwerpréifen ob den aktuelle Benotzer de Benotzer mat deem Numm ass.",
        "apihelp-main-param-curtimestamp": "Den aktuellen Zäitstempel an d'Resultat integréieren.",
        "apihelp-block-description": "E Benotzer spären.",
        "apihelp-block-param-user": "Benotzernumm, IP-Adress oder IP-Beräich deen Dir späre wëllt.",
@@ -30,7 +31,7 @@
        "apihelp-edit-param-text": "Säiteninhalt.",
        "apihelp-edit-param-minor": "Kleng Ännerung.",
        "apihelp-edit-param-notminor": "Keng kleng Ännerung",
-       "apihelp-edit-param-bot": "Dës Ännerung als Bot-Ännerung markéieren.",
+       "apihelp-edit-param-bot": "Dës Ännerung als eng Bot-Ännerung markéieren.",
        "apihelp-edit-param-createonly": "D'Säit net ännere wann et se scho gëtt.",
        "apihelp-edit-param-watch": "D'Säit op dem aktuelle Benotzer seng Iwwerwaachungslëscht dobäisetzen.",
        "apihelp-edit-example-edit": "Eng Säit änneren",
index 03cb2b5..1580fcf 100644 (file)
        "apihelp-delete-description": "पान वगळा",
        "apihelp-edit-param-minor": "छोटे संपादन",
        "apihelp-edit-param-notminor": "छोटे नसलेले संपादन",
+       "apihelp-edit-param-bot": "या संपादनावर सांगकाम्याचे संपादन म्हणून खूण करा.",
        "apihelp-edit-example-edit": "पान संपादा",
+       "apihelp-expandtemplates-description": "विकिमजकूरात सर्व साच्यांचा विस्तार करा.",
+       "apihelp-feedcontributions-param-toponly": "केवळ नवीनतम आवर्तने असलेलीच संपादने दाखवा.",
        "apihelp-feedrecentchanges-param-categories": "या सर्व वर्गात असलेल्या पानांमधील बदलच फक्त  दाखवा.",
        "apihelp-feedrecentchanges-param-categories_any": "त्यापेक्षा,या कोणत्याही वर्गांमधील,पानांना झालेले बदलच फक्त दाखवा.",
        "apihelp-login-param-name": "सदस्य नाव.",
diff --git a/includes/api/i18n/nso.json b/includes/api/i18n/nso.json
new file mode 100644 (file)
index 0000000..42b30bb
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Mohau"
+               ]
+       },
+       "apihelp-createaccount-param-name": "Leina la mošomši.",
+       "apihelp-login-example-login": "Tsena."
+}
index 0dfd5f5..7fae7ae 100644 (file)
                        "Darellur",
                        "The Polish",
                        "Matma Rex",
-                       "Sethakill"
+                       "Sethakill",
+                       "Woytecr"
                ]
        },
+       "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|Dokumentacja]]\n* [[mw:API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista dyskusyjna]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Ogłoszenia dotyczące API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Błędy i propozycje]\n</div>\n<strong>Stan:</strong> Wszystkie funkcje opisane na tej stronie powinny działać, ale API nadal jest aktywnie rozwijane i mogą się zmienić w dowolnym czasie. Subskrybuj [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ listę dyskusyjną mediawiki-api-announce], aby móc na bieżąco dowiadywać się o aktualizacjach.\n\n<strong>Błędne żądania:</strong> Gdy zostanie wysłane błędne żądanie do API, zostanie wysłany w odpowiedzi nagłówek HTTP z kluczem \"MediaWiki-API-Error\" i zarówno jego wartość jak i wartość kodu błędu wysłanego w odpowiedzi będą miały taką samą wartość. Aby uzyskać więcej informacji, zobacz [[mw:API:Errors_and_warnings|API: Błędy i ostrzeżenia]].\n\n<strong>Testowanie:</strong> Aby łatwo testować żądania API, zobacz [[Special:ApiSandbox]].",
        "apihelp-main-param-action": "Wybierz akcję do wykonania.",
        "apihelp-main-param-format": "Format danych wyjściowych.",
        "apihelp-main-param-maxlag": "Maksymalne opóźnienie mogą być używane kiedy MediaWiki jest zainstalowana w klastrze zreplikowanej bazy danych. By zapisać działania powodujące większe opóźnienie replikacji, ten parametr może wymusić czekanie u klienta, dopóki opóźnienie replikacji jest mniejsze niż określona wartość. W przypadku nadmiernego opóźnienia, kod błędu <samp>maxlag</samp> jest zwracany z wiadomością jak <samp>Oczekiwanie na $host: $lag sekund opóźnienia</samp>.<br />Zobacz [[mw:Manual:Maxlag_parameter|Podręcznik:Parametr Maxlag]] by uzyskać więcej informacji.",
+       "apihelp-main-param-smaxage": "Ustaw nagłówek HTTP kontrolujący pamięć podręczną <code>s-maxage</code> na taką ilość sekund. Błędy nie będą nigdy przechowywane w pamięci podręcznej.",
+       "apihelp-main-param-maxage": "Ustaw nagłówek HTTP kontrolujący pamięć podręczną <code>maxage</code> na taką ilość sekund. Błędy nie będą nigdy przechowywane w pamięci podręcznej.",
        "apihelp-main-param-assert": "Zweryfikuj, czy użytkownik jest zalogowany, jeżeli wybrano <kbd>user</kbd>, lub czy ma uprawnienia bota, jeżeli wybrano <kbd>bot</kbd>.",
+       "apihelp-main-param-assertuser": "Sprawdź, czy bieżący użytkownik posiada nazwę.",
+       "apihelp-main-param-requestid": "Każda wartość tu podana będzie dołączana do odpowiedzi. Może być użyta do rozróżniania żądań.",
+       "apihelp-main-param-servedby": "Dołącz do odpowiedzi nazwę hosta, który obsłużył żądanie.",
        "apihelp-main-param-curtimestamp": "Dołącz obecny znacznik czasu do wyniku.",
+       "apihelp-main-param-uselang": "Język, w którym mają być pokazywane tłumaczenia wiadomości. <kbd>[[Special:ApiHelp/query+siteinfo|action=query&meta=siteinfo]]</kbd> z <kbd>siprop=languages</kbd> zwróci listę języków lub ustaw jako <kbd>user</kbd>, aby pobrać z preferencji zalogowanego użytkownika lub <kbd>content</kbd>, aby wykorzystać język zawartości tej wiki.",
        "apihelp-block-description": "Zablokuj użytkownika.",
        "apihelp-block-param-user": "Nazwa użytkownika, adres IP lub zakres adresów IP, które chcesz zablokować.",
        "apihelp-block-param-expiry": "Czas trwania. Może być względny (np. <kbd>5 months</kbd> or <kbd>2 weeks</kbd>) lub konkretny (np. <kbd>2014-09-18T12:34:56Z</kbd>). Jeśli jest ustawiony na <kbd>infinite</kbd>, <kbd>indefinite</kbd>, lub <kbd>never</kbd>, blokada nigdy nie wygaśnie.",
        "apihelp-block-param-allowusertalk": "Pozwala użytkownikowi edytować własną stronę dyskusji (zależy od <var>[[mw:Manual:$wgBlockAllowsUTEdit|$wgBlockAllowsUTEdit]]</var>).",
        "apihelp-block-param-reblock": "Jeżeli ten użytkownik jest już zablokowany, nadpisz blokadę.",
        "apihelp-block-param-watchuser": "Obserwuj stronę użytkownika i jego IP oraz ich strony dyskusji.",
-       "apihelp-block-example-ip-simple": "Zablokuj IP <kbd>192.0.2.5</kbd> na 3 dni za <kbd>Pierwszy atak</kbd>.",
-       "apihelp-block-example-user-complex": "Zablokuj użytkownika <kbd>Vandal</kbd> na zawsze za <kbd>Vandalism</kbd> i uniemożliwij utworzenie nowego konta oraz wysyłanie emaili.",
+       "apihelp-block-example-ip-simple": "Zablokuj IP <kbd>192.0.2.5</kbd> na 3 dni z powodem <kbd>First strike</kbd>.",
+       "apihelp-block-example-user-complex": "Zablokuj użytkownika <kbd>Vandal</kbd> na zawsze z powodem <kbd>Vandalism</kbd> i uniemożliw utworzenie nowego konta oraz wysyłanie emaili.",
+       "apihelp-changeauthenticationdata-description": "Zmień dane logowania bieżącego użytkownika.",
+       "apihelp-changeauthenticationdata-example-password": "Spróbuj zmienić hasło bieżącego użytkownika na <kbd>ExamplePassword</kbd>.",
+       "apihelp-checktoken-description": "Sprawdź poprawność tokenu z <kbd>[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]</kbd>.",
        "apihelp-checktoken-param-type": "Typ tokenu do przetestowania.",
        "apihelp-checktoken-param-token": "Token do przetestowania.",
        "apihelp-checktoken-param-maxtokenage": "Maksymalny wiek tokenu, w sekundach.",
+       "apihelp-checktoken-example-simple": "Sprawdź poprawność tokenu <kbd>csrf</kbd>.",
+       "apihelp-clearhasmsg-description": "Czyści flagę <code>hasmsg</code> dla bieżącego użytkownika.",
+       "apihelp-clearhasmsg-example-1": "Wyczyść flagę <code>hasmsg</code> dla bieżącego użytkownika.",
        "apihelp-compare-param-fromtitle": "Pierwszy tytuł do porównania.",
        "apihelp-compare-param-fromid": "ID pierwszej strony do porównania.",
        "apihelp-compare-param-fromrev": "Pierwsza wersja do porównania.",
        "apihelp-delete-example-reason": "Usuń <kbd>Main Page</kbd> z powodem <kbd>Preparing for move</kbd>.",
        "apihelp-disabled-description": "Ten moduł został wyłączony.",
        "apihelp-edit-description": "Twórz i edytuj strony.",
+       "apihelp-edit-param-title": "Tytuł strony do edycji. Nie może być użyty równocześnie z <var>$1pageid</var>.",
+       "apihelp-edit-param-pageid": "ID strony do edycji. Nie może być używany równocześnie z <var>$1title</var>.",
        "apihelp-edit-param-section": "Numer sekcji. <kbd>0</kbd> dla górnej sekcji, <kbd>new</kbd> dla nowej sekcji.",
        "apihelp-edit-param-sectiontitle": "Tytuł nowej sekcji.",
        "apihelp-edit-param-text": "Zawartość strony.",
-       "apihelp-edit-param-tags": "Zmień tagi do przypisania do tej edycji.",
+       "apihelp-edit-param-summary": "Opis edycji. Także tytuł sekcji gdy użyto $1section=new, a nie ustawiono $1sectiontitle.",
+       "apihelp-edit-param-tags": "Znaczniki zmian do zastosowania w tej edycji.",
        "apihelp-edit-param-minor": "Drobna zmiana.",
-       "apihelp-edit-param-notminor": "Nie drobna zmiana.",
+       "apihelp-edit-param-notminor": "Nie oznaczaj tej zmiany jako drobną.",
        "apihelp-edit-param-bot": "Oznacz tę edycję jako edycję bota.",
+       "apihelp-edit-param-basetimestamp": "Czas wersji, która jest edytowana. Służy do wykrywania konfliktów edycji. Można pobrać poprzez [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
+       "apihelp-edit-param-starttimestamp": "Czas rozpoczęcia procesu edycji. Służy do wykrywania konfliktów edycji. Odpowiednia wartość może być pobrana za pomocą <var>[[Special:ApiHelp/main|curtimestamp]]</var> podczas rozpoczynania procesu edycji (np. podczas ładowania zawartości strony do edycji).",
+       "apihelp-edit-param-recreate": "Ignoruj błędy o usunięciu strony w międzyczasie.",
        "apihelp-edit-param-createonly": "Nie edytuj strony, jesli już istnieje.",
        "apihelp-edit-param-nocreate": "Zwróć błąd, jeśli strona nie istnieje.",
-       "apihelp-edit-param-watch": "Dodaj stronę do aktualnej listy obserwacji użytkownika.",
-       "apihelp-edit-param-unwatch": "Usuń stronę z aktualnej listy obserwacji użytkownika.",
+       "apihelp-edit-param-watch": "Dodaj stronę do listy obserwowanych bieżącego użytkownika.",
+       "apihelp-edit-param-unwatch": "Usuń stronę z listy obserwowanych bieżącego użytkownika.",
+       "apihelp-edit-param-md5": "Hash MD5 parametru $1text lub złączonych parametrów $1prependtext i $1appendtext. Jeżeli ustawiony, edycja nie zostanie zapisana dopóki hash nie będzie się zgadzać.",
+       "apihelp-edit-param-prependtext": "Tekst do dodania na początku strony. Zastępuje $1text.",
+       "apihelp-edit-param-appendtext": "Tekst do dodania na końcu strony. Zastępuje $1text.\n\nUżyj $1section=new zamiast tego parametru aby dodać nową sekcję.",
+       "apihelp-edit-param-undo": "Wycofaj tę wersję. Zastępuje $1text, $1prependtext i $1appendtext.",
+       "apihelp-edit-param-undoafter": "Wycofaj wszystkie wersje od $1undo do tej. Jeżeli nie ustawiono, wycofaj tylko jedną wersję.",
        "apihelp-edit-param-redirect": "Automatycznie rozwiązuj przekierowania.",
-       "apihelp-edit-example-edit": "Edytuj stronę",
+       "apihelp-edit-param-contentformat": "Format serializacji zawartości wprowadzonego tekstu.",
+       "apihelp-edit-param-contentmodel": "Model zawartości nowego tekstu.",
+       "apihelp-edit-param-token": "Token powinien być wysyłany jako ostatni parametr albo przynajmniej po parametrze $1text.",
+       "apihelp-edit-example-edit": "Edytuj stronę.",
+       "apihelp-edit-example-prepend": "Dopisz <kbd>_&#95;NOTOC_&#95;</kbd> na początku strony.",
        "apihelp-emailuser-description": "Wyślij e‐mail do użytkownika.",
        "apihelp-emailuser-param-target": "Użytkownik, do którego wysyłany jest e-mail.",
        "apihelp-emailuser-param-subject": "Nagłówek tematu.",
        "apihelp-mergehistory-description": "Łączenie historii edycji.",
        "apihelp-mergehistory-param-reason": "Powód łączenia historii.",
        "apihelp-move-description": "Przenieś stronę.",
+       "apihelp-move-param-to": "Tytuł na jaki zmienić nazwę strony.",
        "apihelp-move-param-reason": "Powód zmiany nazwy.",
        "apihelp-move-param-movetalk": "Zmień nazwę strony dyskusji, jeśli istnieje.",
        "apihelp-move-param-movesubpages": "Zmień nazwy podstron, jeśli możliwe.",
        "apihelp-move-param-noredirect": "Nie twórz przekierowania.",
+       "apihelp-move-param-watch": "Dodaj stronę i przekierowanie do listy obserwowanych bieżącego użytkownika.",
+       "apihelp-move-param-unwatch": "Usuń stronę i przekierowanie z listy obserwowanych bieżącego użytkownika.",
        "apihelp-move-param-ignorewarnings": "Ignoruj wszystkie ostrzeżenia.",
+       "apihelp-move-example-move": "Przenieś <kbd>Badtitle</kbd> na <kbd>Goodtitle</kbd> bez pozostawienia przekierowania.",
+       "apihelp-opensearch-description": "Przeszukaj wiki przy użyciu protokołu OpenSearch.",
        "apihelp-opensearch-param-search": "Wyszukaj tekst.",
        "apihelp-opensearch-param-limit": "Maksymalna liczba zwracanych wyników.",
        "apihelp-opensearch-param-namespace": "Przestrzenie nazw do przeszukania.",
+       "apihelp-opensearch-param-suggest": "Nie działa jeżeli <var>[[mw:Manual:$wgEnableOpenSearchSuggest|$wgEnableOpenSearchSuggest]]</var> ustawiono na false.",
+       "apihelp-opensearch-param-redirects": "Jak obsługiwać przekierowania:\n;return:Zwróć samo przekierowanie.\n;resolve:Zwróć stronę docelową. Może zwrócić mniej niż wyników określonych w $1limit.\nZ powodów historycznych, domyślnie jest to \"return\" dla $1format=json, a \"resolve\" dla innych formatów.",
        "apihelp-opensearch-param-format": "Format danych wyjściowych.",
+       "apihelp-opensearch-param-warningsaserror": "Jeżeli pojawią się ostrzeżenia związane z <kbd>format=json</kbd>, zwróć błąd API zamiast ignorowania ich.",
        "apihelp-opensearch-example-te": "Znajdź strony zaczynające się od <kbd>Te</kbd>.",
+       "apihelp-options-description": "Zmienia preferencje bieżącego użytkownika.\n\nMożna ustawiać tylko opcje zarejestrowane w rdzeniu, w zainstalowanych rozszerzeniach lub z kluczami o prefiksie <code>userjs-</code> (do wykorzystywania przez skrypty użytkowników).",
        "apihelp-options-param-reset": "Resetuj preferencje do domyślnych.",
+       "apihelp-options-param-resetkinds": "Lista typów opcji do zresetowania, jeżeli ustawiono opcję <var>$1reset</var>.",
+       "apihelp-options-param-change": "Lista zmian, w formacie nazwa=wartość (np. skin=vector). Wartość nie może zawierać znaku pionowej kreski. Jeżeli nie zostanie podana wartość (a nawet znak równości), np., optionname|otheroption|..., to opcja zostanie zresetowana do jej wartości domyślnej.",
        "apihelp-options-param-optionname": "Nazwa opcji, która powinna być ustawiona na wartość <var>$1optionvalue</var>.",
-       "apihelp-options-param-optionvalue": "Wartość opcji, określona w <var>$1optionname</var>, może zawierać znaki pionowej kreski.",
+       "apihelp-options-param-optionvalue": "Wartość opcji, określona w <var>$1optionname</var>.",
        "apihelp-options-example-reset": "Resetuj wszystkie preferencje.",
+       "apihelp-options-example-change": "Zmień preferencje <kbd>skin</kbd> (skórka) i <kbd>hideminor</kbd> (ukryj drobne edycje).",
+       "apihelp-options-example-complex": "Zresetuj wszystkie preferencje, a następnie ustaw <kbd>skin</kbd> i <kbd>nickname</kbd>.",
        "apihelp-paraminfo-description": "Zdobądź informacje o modułach API.",
+       "apihelp-paraminfo-param-modules": "Lista nazw modułów (wartości parametrów <var>action</var> i <var>format</var> lub <kbd>main</kbd>). Można określić podmoduły za pomocą <kbd>+</kbd> lub wszystkie podmoduły, wpisując <kbd>+*</kbd>, lub wszystkie podmoduły rekursywnie <kbd>+**</kbd>.",
        "apihelp-paraminfo-param-helpformat": "Format tekstów pomocnicznych.",
+       "apihelp-paraminfo-param-querymodules": "Lista nazw modułów zapytań (wartość parametrów <var>prop</var>, <var>meta</var> lub <var>list</var>). Użyj <kbd>$1modules=query+foo</kbd> zamiast <kbd>$1querymodules=foo</kbd>.",
        "apihelp-parse-param-summary": "Powód do analizy.",
+       "apihelp-parse-param-prop": "Jakie porcje informacji otrzymać:",
+       "apihelp-parse-paramvalue-prop-text": "Przetworzony tekst z wikitekstu.",
+       "apihelp-parse-paramvalue-prop-langlinks": "Linki językowe z przetworzonego wikitekstu.",
+       "apihelp-parse-paramvalue-prop-categories": "Kategorie z przetworzonego wikitekstu.",
+       "apihelp-parse-paramvalue-prop-categorieshtml": "Wersja HTML listy kategorii.",
+       "apihelp-parse-paramvalue-prop-links": "Linki wewnętrzne z przetworzonego wikitekstu.",
+       "apihelp-parse-paramvalue-prop-templates": "Szablony z przetworzonego wikitekstu.",
+       "apihelp-parse-paramvalue-prop-images": "Zdjęcia z przetworzonego wikitekstu.",
+       "apihelp-parse-paramvalue-prop-externallinks": "Linki zewnętrzne z przetworzonego wikitekstu.",
+       "apihelp-parse-paramvalue-prop-sections": "Sekcje z przetworzonego wikitekstu.",
        "apihelp-parse-paramvalue-prop-wikitext": "Zwróć oryginalny wikitext, który został przeanalizowany.",
        "apihelp-parse-param-preview": "Analizuj w trybie podglądu.",
        "apihelp-parse-param-disabletoc": "Pomiń spis treści na wyjściu.",
        "apihelp-protect-example-protect": "Zabezpiecz stronę",
        "apihelp-protect-example-unprotect": "Odbezpiecz stronę ustawiając ograniczenia na <kbd>all</kbd> (czyli każdy może wykonać działanie).",
        "apihelp-protect-example-unprotect2": "Odbezpiecz stronę ustawiając brak ograniczeń.",
+       "apihelp-purge-description": "Wyczyść pamięć podręczną dla stron o podanych tytułach.\n\nWymaga wysłania jako żądanie POST jeżeli użytkownik jest niezalogowany.",
        "apihelp-purge-param-forcelinkupdate": "Uaktualnij tabele linków.",
+       "apihelp-purge-param-forcerecursivelinkupdate": "Uaktualnij tabele linków włącznie z linkami dotyczącymi każdej strony wykorzystywanej jako szablon na tej stronie.",
+       "apihelp-purge-example-simple": "Wyczyść strony <kbd>Main Page</kbd> i <kbd>API</kbd>.",
        "apihelp-purge-example-generator": "Przeczyść pierwsze 10 stron w przestrzeni głównej.",
        "apihelp-query+allcategories-description": "Emuluj wszystkie kategorie.",
        "apihelp-query+allcategories-param-dir": "Kierunek sortowania.",
        "apihelp-query+allcategories-param-limit": "Liczba kategorii do zwórcenia.",
+       "apihelp-query+allcategories-param-prop": "Jakie właściwości otrzymać:",
+       "apihelp-query+allcategories-paramvalue-prop-size": "Dodaje liczbę stron w kategorii.",
+       "apihelp-query+allcategories-paramvalue-prop-hidden": "Oznacza kategorie ukryte za pomocą <code>_&#95;HIDDENCAT_&#95;</code>.",
+       "apihelp-query+allcategories-example-size": "Wymień kategorie z informacjami o liczbie stron w każdej z nich.",
+       "apihelp-query+alldeletedrevisions-description": "Wymień wszystkie usunięte wersje użytkownika lub z przestrzeni nazw.",
        "apihelp-query+alldeletedrevisions-paraminfo-useronly": "Może być użyte tylko z <var>$3user</var>.",
        "apihelp-query+alldeletedrevisions-paraminfo-nonuseronly": "Nie może być używane z <var>$3user</var>.",
        "apihelp-query+alldeletedrevisions-param-from": "Zacznij nasłuchiwanie na tym tytule.",
        "apihelp-query+alldeletedrevisions-param-to": "Skończ nasłuchiwanie na tym tytule.",
+       "apihelp-query+alldeletedrevisions-param-prefix": "Szukaj tytułów stron zaczynających się na tę wartość.",
        "apihelp-query+alldeletedrevisions-param-tag": "Pokazuj tylko zmiany oznaczone tym znacznikiem.",
        "apihelp-query+alldeletedrevisions-param-user": "Pokazuj tylko zmiany dokonane przez tego użytkownika.",
        "apihelp-query+alldeletedrevisions-param-excludeuser": "Nie pokazuj zmian dokonanych przez tego użytkownika.",
        "apihelp-query+alldeletedrevisions-param-namespace": "Listuj tylko strony z tej przestrzeni nazw.",
+       "apihelp-query+alldeletedrevisions-example-user": "Wymień ostatnie 50 usuniętych edycji przez użytkownika <kbd>Example</kbd>.",
+       "apihelp-query+alldeletedrevisions-example-ns-main": "Wymień ostatnie 50 usuniętych edycji z przestrzeni głównej.",
+       "apihelp-query+allfileusages-description": "Lista wykorzystania pliku, także dla nieistniejących.",
+       "apihelp-query+allfileusages-param-prop": "Jakie informacje dołączyć:",
+       "apihelp-query+allfileusages-paramvalue-prop-title": "Dodaje tytuł pliku.",
        "apihelp-query+allfileusages-param-limit": "Łączna liczba obiektów do zwrócenia.",
        "apihelp-query+allfileusages-example-unique": "Lista unikatowych tytułów plików.",
        "apihelp-query+allimages-param-sort": "Sortowanie według właściwości.",
        "apihelp-query+allimages-example-recent": "Pokaż listę ostatnio przesłanych plików, podobnie do [[Special:NewFiles]].",
        "apihelp-query+allimages-example-mimetypes": "Pokaż listę plików z typem MIME <kbd>image/png</kbd> lub <kbd>image/gif</kbd>",
+       "apihelp-query+alllinks-param-prop": "Jakie informacje dołączyć:",
+       "apihelp-query+alllinks-paramvalue-prop-title": "Dodaje tytuł linku.",
        "apihelp-query+alllinks-param-namespace": "Przestrzeń nazw do emulacji.",
        "apihelp-query+alllinks-param-limit": "Łączna liczba obiektów do zwrócenia.",
        "apihelp-query+alllinks-example-unique": "Lista unikatowych tytułów plików.",
        "apihelp-query+allpages-param-limit": "Liczba stron do zwrócenia.",
        "apihelp-query+allpages-example-B": "Pokaż listę stron rozpoczynających się na literę <kbd>B</kbd>.",
        "apihelp-query+allredirects-description": "Lista wszystkich przekierowań do przestrzeni nazw.",
+       "apihelp-query+allredirects-param-prop": "Jakie informacje dołączyć:",
+       "apihelp-query+allredirects-paramvalue-prop-title": "Dodaje tytuł przekierowania.",
        "apihelp-query+allredirects-param-namespace": "Przestrzeń nazw do emulacji.",
        "apihelp-query+allredirects-param-limit": "Łączna liczba obiektów do zwrócenia.",
        "apihelp-query+allrevisions-description": "Wyświetl wszystkie wersje.",
        "apihelp-query+allrevisions-param-excludeuser": "Nie wyświetlaj wersji tego użytkownika.",
        "apihelp-query+allrevisions-param-namespace": "Wyświetl tylko strony w przestrzeni głównej.",
        "apihelp-query+allrevisions-example-ns-main": "Wyświetl pierwsze 50 wersji w przestrzeni głównej.",
+       "apihelp-query+mystashedfiles-param-limit": "Liczba plików do pobrania.",
+       "apihelp-query+alltransclusions-param-prop": "Jakie informacje dołączyć:",
        "apihelp-query+alltransclusions-param-namespace": "Przestrzeń nazw do emulacji.",
+       "apihelp-query+alltransclusions-param-limit": "Łączna liczba elementów do zwrócenia.",
+       "apihelp-query+allusers-param-dir": "Kierunek sortowania.",
+       "apihelp-query+allusers-param-prop": "Jakie informacje dołączyć:",
+       "apihelp-query+allusers-param-limit": "Łączna liczba nazw użytkowników do zwrócenia.",
        "apihelp-query+allusers-param-witheditsonly": "Tylko użytkownicy, którzy edytowali.",
+       "apihelp-query+backlinks-description": "Znajdź wszystkie strony, które linkują do danej strony.",
        "apihelp-query+backlinks-param-namespace": "Przestrzeń nazw do emulacji.",
        "apihelp-query+backlinks-example-simple": "Pokazuj linki do <kbd>Main page</kbd>.",
        "apihelp-query+blocks-param-ids": "Lista zablokowanych ID do wylistowania (opcjonalne).",
        "apihelp-query+blocks-param-users": "Lista użytkowników do wyszukania (opcjonalne).",
        "apihelp-query+blocks-param-limit": "Maksymalna liczba blokad do wylistowania.",
+       "apihelp-query+blocks-paramvalue-prop-reason": "Dodaje powód zablokowania.",
        "apihelp-query+blocks-example-simple": "Listuj blokady.",
        "apihelp-query+categories-param-limit": "Liczba kategorii do zwrócenia.",
        "apihelp-query+categorymembers-description": "Wszystkie strony w danej kategorii.",
+       "apihelp-query+categorymembers-param-title": "Kategoria, której zawartość wymienić (wymagane). Musi zawierać prefiks <kbd>{{ns:category}}:</kbd>. Nie może być używany równocześnie z <var>$1pageid</var>.",
+       "apihelp-query+categorymembers-param-pageid": "ID strony kategorii, z której wymienić strony. Nie może być użyty równocześnie z <var>$1title</var>.",
+       "apihelp-query+categorymembers-param-prop": "Jakie informacje dołączyć:",
+       "apihelp-query+categorymembers-paramvalue-prop-ids": "Doda ID strony.",
+       "apihelp-query+categorymembers-paramvalue-prop-title": "Doda tytuł i identyfikator przestrzeni nazw strony.",
+       "apihelp-query+categorymembers-paramvalue-prop-sortkey": "Doda klucz sortowania obowiązujący w danej kategorii (ciąg szesnastkowy).",
+       "apihelp-query+categorymembers-paramvalue-prop-sortkeyprefix": "Doda klucz sortowania obowiązujący w danej kategorii (czytelna przez człowieka część klucza sortowania).",
+       "apihelp-query+categorymembers-paramvalue-prop-type": "Doda informacje o typie strony w kategorii (<samp>page</samp> (strona), <samp>subcat</samp> (podkategoria) lub <samp>file</samp> (plik)).",
        "apihelp-query+categorymembers-param-limit": "Maksymalna liczba zwracanych wyników.",
        "apihelp-query+categorymembers-param-sort": "Sortowanie według właściwości.",
+       "apihelp-query+categorymembers-param-dir": "W jakim kierunku sortować.",
        "apihelp-query+deletedrevisions-param-tag": "Pokazuj tylko zmiany oznaczone tym tagiem.",
        "apihelp-query+deletedrevisions-param-user": "Pokazuj tylko zmiany dokonane przez tego użytkownika.",
        "apihelp-query+deletedrevisions-param-excludeuser": "Nie pokazuj zmian dokonanych przez tego użytkownika.",
        "apihelp-query+deletedrevs-param-limit": "Maksymalna liczba zmian do wylistowania.",
        "apihelp-query+duplicatefiles-example-generated": "Szukaj duplikatów wszystkich plików.",
        "apihelp-query+embeddedin-param-filterredir": "Jaki filtrować przekierowania.",
+       "apihelp-query+embeddedin-param-limit": "Łączna liczba stron do zwrócenia.",
        "apihelp-query+extlinks-param-limit": "Liczba linków do zwrócenia.",
+       "apihelp-query+exturlusage-param-prop": "Jakie informacje dołączyć:",
+       "apihelp-query+exturlusage-paramvalue-prop-ids": "Dodaje ID strony.",
+       "apihelp-query+exturlusage-paramvalue-prop-url": "Dodaje adres URL, używany na stronie.",
        "apihelp-query+exturlusage-param-limit": "Liczba stron do zwrócenia.",
        "apihelp-query+filearchive-paramvalue-prop-dimensions": "Alias rozmiaru.",
        "apihelp-query+filearchive-example-simple": "Pokaż listę wszystkich usuniętych plików.",
        "apihelp-query+filerepoinfo-example-simple": "Uzyskaj informacje na temat repozytoriów plików.",
        "apihelp-query+fileusage-paramvalue-prop-title": "Nazwa każdej strony.",
        "apihelp-query+fileusage-param-limit": "Ilość do zwrócenia.",
+       "apihelp-query+imageinfo-description": "Zwraca informacje o pliku i historię przesyłania.",
        "apihelp-query+imageinfo-paramvalue-prop-canonicaltitle": "Dodaje kanoniczny tytuł pliku.",
        "apihelp-query+imageinfo-paramvalue-prop-dimensions": "Alias rozmiaru.",
        "apihelp-query+imageinfo-paramvalue-prop-sha1": "Dodaj sumę kontrolną SHA-1 dla tego pliku.",
        "apihelp-query+info-paramvalue-prop-readable": "Czy użytkownik może przeczytać tę stronę.",
        "apihelp-query+iwbacklinks-param-prefix": "Prefix interwiki.",
        "apihelp-query+iwbacklinks-param-limit": "Łączna liczba stron do zwrócenia.",
+       "apihelp-query+iwbacklinks-paramvalue-prop-iwprefix": "Dodaje prefiks interwiki.",
+       "apihelp-query+iwbacklinks-paramvalue-prop-iwtitle": "Dodaje tytuł interwiki.",
        "apihelp-query+iwlinks-paramvalue-prop-url": "Dodaje pełny adres URL.",
+       "apihelp-query+iwlinks-param-limit": "Łączna liczba linków interwiki do zwrócenia.",
+       "apihelp-query+langbacklinks-param-limit": "Łączna liczba stron do zwrócenia.",
+       "apihelp-query+langbacklinks-paramvalue-prop-lllang": "Dodaje kod języka linku językowego.",
+       "apihelp-query+langbacklinks-paramvalue-prop-lltitle": "Dodaje tytuł linku językowego.",
+       "apihelp-query+langlinks-paramvalue-prop-url": "Dodaje pełny adres URL.",
        "apihelp-query+links-param-limit": "Liczba linków do zwrócenia.",
+       "apihelp-query+linkshere-description": "Znajdź wszystkie strony, które linkują do danych stron.",
        "apihelp-query+linkshere-paramvalue-prop-title": "Nazwa każdej strony.",
+       "apihelp-query+linkshere-paramvalue-prop-redirect": "Oznacz, jeśli strona jest przekierowaniem.",
        "apihelp-query+linkshere-param-limit": "Liczba do zwrócenia.",
        "apihelp-query+logevents-description": "Pobierz eventy z logu.",
        "apihelp-query+logevents-example-simple": "Lista ostatnich zarejestrowanych zdarzeń.",
+       "apihelp-query+pageswithprop-param-prop": "Jakie informacje dołączyć:",
+       "apihelp-query+pageswithprop-paramvalue-prop-ids": "Doda ID strony.",
        "apihelp-query+pageswithprop-example-generator": "Pobierz dodatkowe informacje o pierwszych 10 stronach wykorzystując <code>_&#95;NOTOC_&#95;</code>.",
        "apihelp-query+prefixsearch-param-search": "Wyszukaj tekst.",
        "apihelp-query+prefixsearch-param-namespace": "Przestrzenie nazw do przeszukania.",
        "apihelp-query+protectedtitles-param-namespace": "Listuj tylko strony z tych przestrzeni nazw.",
        "apihelp-query+protectedtitles-param-limit": "Łączna liczba stron do zwrócenia.",
        "apihelp-query+protectedtitles-example-simple": "Lista chronionych nagłówków",
+       "apihelp-query+querypage-param-limit": "Liczba zwracanych wyników.",
        "apihelp-query+recentchanges-param-user": "Listuj tylko zmiany dokonane przez tego użytkownika.",
        "apihelp-query+recentchanges-param-excludeuser": "Nie listuj zmian dokonanych przez tego użytkownika.",
        "apihelp-query+recentchanges-param-tag": "Pokazuj tylko zmiany oznaczone tym tagiem.",
        "apihelp-query+recentchanges-example-simple": "Lista ostatnich zmian.",
+       "apihelp-query+redirects-description": "Zwraca wszystkie przekierowania do danej strony.",
        "apihelp-query+redirects-paramvalue-prop-title": "Nazwa każdego przekierowania.",
        "apihelp-query+redirects-param-limit": "Ile przekierowań zwrócić.",
        "apihelp-query+revisions+base-paramvalue-prop-ids": "Identyfikator wersji.",
        "apihelp-query+revisions+base-paramvalue-prop-flags": "Znaczniki wersji (drobne).",
        "apihelp-query+revisions+base-paramvalue-prop-timestamp": "Znacznik czasu wersji.",
+       "apihelp-query+revisions+base-paramvalue-prop-size": "Długość wersji (w bajtach).",
        "apihelp-query+revisions+base-paramvalue-prop-sha1": "SHA-1 (base 16) wersji.",
        "apihelp-query+revisions+base-paramvalue-prop-content": "Tekst wersji.",
        "apihelp-query+revisions+base-paramvalue-prop-tags": "Znaczniki wersji.",
        "apihelp-query+revisions+base-param-limit": "Ograniczenie na liczbę wersji, które będą zwrócone.",
        "apihelp-query+search-description": "Wykonaj wyszukiwanie pełnotekstowe.",
        "apihelp-query+search-param-info": "Które metadane zwrócić.",
+       "apihelp-query+search-paramvalue-prop-size": "Dodaje rozmiar strony w bajtach.",
+       "apihelp-query+search-paramvalue-prop-wordcount": "Dodaje liczbę słów na stronie.",
+       "apihelp-query+search-paramvalue-prop-redirecttitle": "Dodaje tytuł pasującego przekierowania.",
        "apihelp-query+search-param-limit": "Łączna liczba stron do zwrócenia.",
        "apihelp-query+search-param-interwiki": "Dołączaj wyniki wyszukiwań interwiki w wyszukiwarce, jeśli możliwe.",
        "apihelp-query+search-example-simple": "Szukaj <kbd>meaning</kbd>.",
+       "apihelp-query+siteinfo-paramvalue-prop-general": "Ogólne informacje o systemie.",
        "apihelp-query+siteinfo-paramvalue-prop-namespaces": "Lista zarejestrowanych przestrzeni nazw i ich nazwy kanoniczne.",
        "apihelp-query+siteinfo-paramvalue-prop-namespacealiases": "Lista zarejestrowanych aliasów przestrzeni nazw.",
        "apihelp-query+siteinfo-example-simple": "Pobierz informacje o stronie.",
+       "apihelp-query+stashimageinfo-param-sessionkey": "Alias dla $1filekey, dla kompatybilności wstecznej.",
        "apihelp-query+tags-description": "Lista zmian tagów.",
        "apihelp-query+tags-param-limit": "Maksymalna liczba tagów do wyświetlenia.",
+       "apihelp-query+tags-paramvalue-prop-name": "Dodaje nazwę znacznika.",
+       "apihelp-query+tags-paramvalue-prop-displayname": "Dodaje komunikat systemowy dla znacznika.",
+       "apihelp-query+tags-paramvalue-prop-description": "Dodaje opis znacznika.",
+       "apihelp-query+tags-paramvalue-prop-active": "Czy znacznik jest nadal stosowany.",
        "apihelp-query+tags-example-simple": "Lista dostęnych tagów.",
+       "apihelp-query+templates-description": "Zwraca wszystkie strony osadzone w danych stronach.",
        "apihelp-query+templates-param-limit": "Ile szablonów zwrócić?",
+       "apihelp-query+transcludedin-paramvalue-prop-title": "Nazwa każdej strony.",
+       "apihelp-query+transcludedin-paramvalue-prop-redirect": "Oznacz, jeśli strona jest przekierowaniem.",
        "apihelp-query+transcludedin-param-limit": "Ile zwrócić.",
+       "apihelp-query+userinfo-description": "Pobierz informacje o aktualnym użytkowniku.",
+       "apihelp-query+userinfo-paramvalue-prop-registrationdate": "Dodaje datę rejestracji użytkownika.",
+       "apihelp-query+userinfo-example-simple": "Pobierz informacje o aktualnym użytkowniku.",
+       "apihelp-query+userinfo-example-data": "Pobierz dodatkowe informacje o aktualnym użytkowniku.",
+       "apihelp-query+users-description": "Pobierz informacje o liście użytkowników.",
+       "apihelp-query+users-param-prop": "Jakie informacje dołączyć:",
+       "apihelp-query+users-param-users": "Lista użytkowników, o których chcesz pobrać informacje.",
        "apihelp-query+watchlist-param-excludeuser": "Nie wyświetlaj zmian wykonanych przez tego użytkownika.",
        "apihelp-query+watchlist-paramvalue-prop-title": "Dodaje tytuł strony.",
        "apihelp-query+watchlist-paramvalue-prop-user": "Dodaje użytkownika, który wykonał edycję.",
        "apihelp-query+watchlist-paramvalue-prop-comment": "Dodaje komentarz do edycji.",
        "apihelp-query+watchlist-paramvalue-prop-timestamp": "Dodaje znacznik czasu edycji.",
        "apihelp-query+watchlist-paramvalue-prop-sizes": "Dodaje starą i nową długość strony.",
+       "apihelp-query+watchlist-paramvalue-type-external": "Zmiany zewnętrzne.",
        "apihelp-resetpassword-description": "Wyślij użytkownikowi e-mail do resetowania hasła.",
        "apihelp-resetpassword-example-email": "Wyślij e-mail do resetowania hasła do wszystkich użytkowników posiadających adres <kbd>user@example.com</kbd>.",
        "apihelp-stashedit-param-title": "Tytuł edytowanej strony.",
        "apihelp-stashedit-param-sectiontitle": "Tytuł nowej sekcji.",
        "apihelp-stashedit-param-text": "Zawartość strony.",
        "apihelp-tag-param-reason": "Powód zmiany.",
+       "apihelp-unblock-description": "Odblokuj użytkownika.",
        "apihelp-unblock-param-reason": "Powód odblokowania.",
        "apihelp-undelete-param-reason": "Powód przywracania.",
        "apihelp-upload-param-filename": "Nazwa pliku docelowego.",
+       "apihelp-upload-param-watch": "Obserwuj stronę.",
+       "apihelp-upload-param-ignorewarnings": "Ignoruj wszystkie ostrzeżenia.",
+       "apihelp-upload-param-file": "Zawartość pliku.",
        "apihelp-userrights-param-user": "Nazwa użytkownika.",
+       "apihelp-userrights-param-add": "Dodaj użytkownika do tych grup.",
        "apihelp-userrights-param-reason": "Powód zmiany.",
        "apihelp-json-description": "Dane wyjściowe w formacie JSON.",
        "apihelp-jsonfm-description": "Dane wyjściowe w formacie JSON (prawidłowo wyświetlane w HTML).",
        "apihelp-xml-param-xslt": "Jeśli określony, dodaje podaną stronę jako arkusz styli XSL. Powinna to być strona wiki w przestrzeni nazw MediaWiki, której nazwa kończy się na <code>.xsl</code>.",
        "apihelp-xmlfm-description": "Dane wyjściowe w formacie XML (prawidłowo wyświetlane w HTML).",
        "api-format-title": "Wynik MediaWiki API",
+       "api-pageset-param-titles": "Lista tytułów, z którymi pracować.",
+       "api-pageset-param-pageids": "Lista identyfikatorów stron, z którymi pracować.",
+       "api-pageset-param-revids": "Lista identyfikatorów wersji, z którymi pracować.",
+       "api-pageset-param-generator": "Pobierz listę stron, z którymi pracować poprzez wykonanie określonego modułu zapytań.\n\n<strong>Uwaga:</strong> Nazwy parametrów generatora musi poprzedzać prefiks „g”. Zobacz przykłady.",
+       "api-pageset-param-redirects-generator": "Automatycznie rozwiązuj przekierowania ze stron podanych w <var>$1titles</var>, <var>$1pageids</var>, oraz <var>$1revids</var>, a także ze stron zwróconych przez <var>$1generator</var>.",
+       "api-pageset-param-converttitles": "Konwertuj tytuły do innych wariantów, jeżeli trzeba. Będzie działać tylko wtedy, gdy język zawartości wiki będzie wspierał konwersje wariantów. Języki, które wspierają konwersję wariantów to m.in. $1.",
        "api-help-title": "Pomoc MediaWiki API",
        "api-help-lead": "To jest automatycznie wygenerowana strona dokumentacji MediaWiki API.\nDokumentacja i przykłady: https://www.mediawiki.org/wiki/API",
        "api-help-main-header": "Moduł główny",
        "api-help-param-deprecated": "Przestarzałe.",
        "api-help-param-required": "Ten parametr jest wymagany.",
        "api-help-datatypes-header": "Typy danych",
+       "api-help-param-type-integer": "Typ: {{PLURAL:$1|1=liczba całkowita|2=lista liczb całkowitych}}",
        "api-help-param-type-boolean": "Typ: wartość logiczna ([[Special:ApiHelp/main#main/datatypes|szczegóły]])",
        "api-help-param-type-timestamp": "Typ: {{PLURAL:$1|1=znacznik czasu|2=lista znaczników czasu}} ([[Special:ApiHelp/main#main/datatypes|dozwolone formaty]])",
        "api-help-param-type-user": "Typ: {{PLURAL:$1|1=nazwa użytkownika|2=lista nazw uzytkowników}}",
-       "api-help-param-list": "{{PLURAL:$1|1=Jedna z następujących wartość|2=Wartości (oddziel za pomocą <kbd>{{!}}</kbd>)}}: $2",
+       "api-help-param-list": "{{PLURAL:$1|1=Jedna z następujących wartości|2=Wartości (oddziel za pomocą <kbd>{{!}}</kbd> lub [[Special:ApiHelp/main#main/datatypes|alternatywy]])}}: $2",
        "api-help-param-limit": "Nie więcej niż $1 dozwolone.",
        "api-help-param-limit2": "Nie więcej niż $1 ($2 dla botów) dozwolone.",
        "api-help-param-integer-min": "{{PLURAL:$1|1=Wartość musi być nie mniejsza|2=Wartości muszą być nie mniejsze}} niż $2.",
        "api-help-param-integer-max": "{{PLURAL:$1|1=Wartość musi być nie większa|2=Wartości muszą być nie większe}} niż $3.",
        "api-help-param-integer-minmax": "{{PLURAL:$1|1=Wartość musi|2=Wartości muszą}} być pomiędzy $2 a $3.",
-       "api-help-param-multi-separate": "Oddziel wartości za pomocą <kbd>|</kbd>.",
+       "api-help-param-multi-separate": "Oddziel wartości za pomocą <kbd>|</kbd> lub [[Special:ApiHelp/main#main/datatypes|alternatywy]].",
        "api-help-param-multi-max": "Maksymalna liczba wartości to {{PLURAL:$1|$1}} ({{PLURAL:$2|$2}} dla botów).",
        "api-help-param-default": "Domyślnie: $1",
        "api-help-param-default-empty": "Domyślnie: <span class=\"apihelp-empty\">(puste)</span>",
        "api-help-param-token": "Token \"$1\" zdobyty z [[Special:ApiHelp/query+tokens|action=query&meta=tokens]]",
+       "api-help-param-continue": "Gdy będzie dostępnych więcej wyników, użyj tego do kontynuowania.",
        "api-help-param-no-description": "<span class=\"apihelp-empty\">(bez opisu)</span>",
        "api-help-examples": "{{PLURAL:$1|Przykład|Przykłady}}:",
        "api-help-permissions": "{{PLURAL:$2|Uprawnienie|Uprawnienia}}:",
        "api-help-permissions-granted-to": "{{PLURAL:$1|Przydzielone dla}}: $2",
+       "api-help-right-apihighlimits": "Użyj wyższych limitów w zapytaniach API (dla zapytań powolnych: $1; dla zapytań szbkich: $2). Limity zapytań powolnych są także stosowane dla parametrów z podanymi wieloma wartościami.",
+       "api-help-open-in-apisandbox": "<small>[otwórz w brudnopisie]</small>",
        "api-credits-header": "Twórcy",
        "api-credits": "Deweloperzy API:\n* Roan Kattouw (główny programista wrzesień 2007–2009)\n* Victor Vasiliev\n* Bryan Tong Minh\n* Sam Reed\n* Yuri Astrakhan (twórca, główny programista wrzesień 2006–wrzesień 2007)\n* Brad Jorsch (główny programista 2013–obecnie)\n\nProsimy wysyłać komentarze, sugestie i pytania do mediawiki-api@lists.wikimedia.org\nlub zgłoś błąd na https://phabricator.wikimedia.org/."
 }
index 40d5786..4e14f82 100644 (file)
@@ -4,20 +4,59 @@
                        "Vitorvicentevalente",
                        "Fúlvio",
                        "Macofe",
-                       "Jkb8"
+                       "Jkb8",
+                       "Hamilton Abreu"
                ]
        },
-       "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|Documentação]]\n* [[mw:API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista de discussão]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Anúncios da API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Erros e solicitações]\n</div>\n<strong>Estado:</strong> Todas as funcionalidades mostradas nesta página deveriam estar a funcionar, mas a API ainda está em activo desenvolvimento, e pode ser alterada a qualquer momento. Inscreva-se na [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ lista de discussão mediawiki-api-announce] para ser informado acerca das actualizações.\n\n<strong>Solicitações erradas:</strong> Quando solicitações erradas são enviadas à API, um cabeçalho em HTTP será enviado com a chave \"MediaWiki-API-Error\" e, em seguida, tanto o valor do cabeçalho quanto o código de erro retornado serão definidos com o mesmo valor. Para mais informação, consulte [[mw:API:Errors_and_warnings|API: Errors and warnings]].\n\n<strong>Testes:</strong> Para facilitar os testes de solicitações à API, consulte [[Special:ApiSandbox]].",
+       "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|Documentação]]\n* [[mw:API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista de discussão]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Anúncios da API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Erros e solicitações]\n</div>\n<strong>Estado:</strong> Todas as funcionalidades mostradas nesta página deveriam estar a funcionar, mas a API ainda está em desenvolvimento ativo, e pode ser alterada a qualquer momento. Inscreva-se na [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ lista de discussão mediawiki-api-announce] para ser informado acerca das atualizações.\n\n<strong>Pedidos incorretos:</strong> Quando são enviados pedidos incorretos à API, um cabeçalho de HTTP será enviado com a chave \"MediaWiki-API-Error\" e, em seguida, tanto o valor do cabeçalho quanto o código de erro retornado serão definidos com o mesmo valor. Para mais informação, consulte [[mw:API:Errors_and_warnings|API: Errors and warnings]].\n\n<strong>Testes:</strong> Para facilitar os testes de pedidos à API, consulte [[Special:ApiSandbox]].",
        "apihelp-main-param-action": "Qual acção a executar.",
        "apihelp-main-param-format": "O formato de saída.",
+       "apihelp-main-param-maxlag": "O atraso máximo pode ser usado quando o MediaWiki é instalado num <i>cluster</i> de bases de dados replicadas. Para impedir que as operações causem ainda mais atrasos de replicação do <i>site</i>, este parâmetro pode fazer o cliente aguardar até que o atraso de replicação seja inferior ao valor especificado. Caso o atraso atual exceda esse valor, o código de erro <samp>maxlag</samp> é devolvido com uma mensagem como <samp>À espera do servidor $host: $lag segundos de atraso</samp>.<br />Consulte [[mw:Manual:Maxlag_parameter|Manual: Parâmetro maxlag]] para mais informações.",
+       "apihelp-main-param-smaxage": "Definir no cabeçalho HTTP <code>s-maxage</code> de controlo da <i>cache</i> este número de segundos. Os erros nunca são armazenados na <i>cache</i>.",
+       "apihelp-main-param-maxage": "Definir no cabeçalho HTTP <code>max-age</code> de controlo da <i>cache</i> este número de segundos. Os erros nunca são armazenados na <i>cache</i>.",
+       "apihelp-main-param-assertuser": "Verificar que o utilizador atual é o utilizador nomeado.",
+       "apihelp-main-param-requestid": "Qualquer valor fornecido aqui será incluído na resposta. Pode ser usado para distinguir pedidos.",
+       "apihelp-main-param-servedby": "Incluir o nome do servidor que serviu o pedido nos resultados.",
+       "apihelp-main-param-curtimestamp": "Incluir a data e hora atuais no resultado.",
+       "apihelp-main-param-origin": "Ao aceder à API usando um pedido AJAX entre domínios (CORS), coloque aqui o domínio de origem. Isto tem de ser incluído em todas as verificações prévias e, portanto, tem de fazer parte do URI do pedido (e não do conteúdo do POST).\n\nPara pedidos autenticados, este valor tem de corresponder de forma exata a um dos cabeçalhos <code>Origin</code>, portanto tem de ser algo como <kbd>https://en.wikipedia.org</kbd> ou <kbd>https://meta.wikimedia.org</kbd>. Se este parâmetro não for igual ao cabeçalho <code>Origin</code>, será devolvida a resposta 403. Se este parâmetro for igual ao cabeçalho <code>Origin</code> e a origem for permitida (<i>white-listed</i>) os cabeçalhos <code>Access-Control-Allow-Origin</code> e <code>Access-Control-Allow-Credentials</code> serão preenchidos.\n\nPara pedidos não autenticados, especifique o valor <kbd>*</kbd>. Isto fará com que o cabeçalho <code>Access-Control-Allow-Origin</code>\nseja preenchido, mas <code>Access-Control-Allow-Credentials</code> terá o valor <code>false</code> e todos os dados específicos do utilizador serão restringidos.",
+       "apihelp-main-param-uselang": "Língua a usar nas traduções de mensagens. <kbd>[[Special:ApiHelp/query+siteinfo|action=query&meta=siteinfo]]</kbd> com <kbd>siprop=languages</kbd> devolve uma lista de códigos de língua, ou especifique <kbd>user</kbd> para usar a língua nas preferências do utilizador atual, ou especifique <kbd>content</kbd> para usar a língua de conteúdo desta wiki.",
        "apihelp-block-description": "Bloquear um utilizador.",
        "apihelp-block-param-user": "Nome de utilizador(a), endereço ou gama de IP que pretende bloquear.",
+       "apihelp-block-param-expiry": "O período de expiração. Pode ser relativo (p. ex. <kbd>5 meses</kbd> ou <kbd>2 semanas</kbd>) ou absoluto (p. ex. <kbd>2014-09-18T12:34:56Z</kbd>). Se definido como <kbd>infinite</kbd>, <kbd>indefinite</kbd> ou <kbd>never</kbd>, o bloqueio nunca expirará.",
        "apihelp-block-param-reason": "Motivo do bloqueio.",
+       "apihelp-block-param-anononly": "Bloquear só utilizadores anónimos (isto é, impedir edições anónimas a partir deste endereço IP)",
        "apihelp-block-param-nocreate": "Impedir criação de contas.",
+       "apihelp-block-param-autoblock": "Bloquear automaticamente o último endereço IP usado e quaisquer outros endereços IP subsequentes a partir do quais o utilizador tente iniciar uma sessão.",
+       "apihelp-block-param-noemail": "Impedir o utilizador de enviar correio eletrónico através da wiki. (Requer o privilégio <code>blockemail</code>).",
+       "apihelp-block-param-hidename": "Ocultar o nome do utilizador do registo de bloqueios. (Requer o privilégio <code>hideuser</code>).",
+       "apihelp-block-param-allowusertalk": "Permitir que o utilizador edite a sua própria página de discussão (depende de <var>[[mw:Manual:$wgBlockAllowsUTEdit|$wgBlockAllowsUTEdit]]</var>).",
+       "apihelp-block-param-reblock": "Se o utilizador já está bloqueado, sobrescrever o bloco existente.",
+       "apihelp-block-param-watchuser": "Vigiar as páginas de utilizador e de discussão, do utilizador ou do endereço IP.",
+       "apihelp-block-example-ip-simple": "Bloquear o endereço IP <kbd>192.0.2.5</kbd> por três dias com o motivo <kbd>First strike</kbd>.",
+       "apihelp-block-example-user-complex": "Bloquear o utilizador <kbd>Vandal</kbd> indefinidamente com o motivo <kbd>Vandalism</kbd>, e impedir a criação de nova conta e o envio de correio eletrónico.",
+       "apihelp-changeauthenticationdata-description": "Alterar os dados de autenticação do utilizador atual.",
+       "apihelp-checktoken-description": "Verificar a validade de uma chave a partir de <kbd>[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]</kbd>.",
+       "apihelp-checktoken-param-type": "Tipo de chave que está a ser testado.",
+       "apihelp-checktoken-param-token": "Chave a testar.",
+       "apihelp-checktoken-param-maxtokenage": "Validade máxima da chave, em segundos.",
+       "apihelp-checktoken-example-simple": "Testar a validade de uma chave <kbd>csrf</kbd>.",
+       "apihelp-compare-param-fromtitle": "Primeiro título a comparar.",
+       "apihelp-compare-param-fromid": "Primeiro identificador de página a comparar.",
+       "apihelp-compare-param-fromrev": "Primeira revisão a comparar.",
+       "apihelp-compare-param-totitle": "Segundo título a comparar.",
+       "apihelp-compare-param-toid": "Segundo identificador de página a comparar.",
+       "apihelp-compare-param-torev": "Segunda revisão a comparar.",
+       "apihelp-compare-example-1": "Criar uma lista de diferenças entre as revisões 1 e 2.",
        "apihelp-createaccount-description": "Criar uma nova conta.",
        "apihelp-createaccount-param-name": "Nome de utilizador(a).",
+       "apihelp-createaccount-param-password": "Palavra-passe (ignorada se <var>$1mailpassword</var> está definida).",
+       "apihelp-createaccount-param-domain": "Domínio para autenticação externa (opcional).",
+       "apihelp-createaccount-param-token": "Chave de criação de conta obtida no primeiro pedido.",
        "apihelp-createaccount-param-email": "Endereço de correio eletrónico do utilizador (opcional).",
        "apihelp-createaccount-param-realname": "Nome verdadeiro do utilizador (opcional).",
+       "apihelp-createaccount-param-mailpassword": "Se qualquer valor estiver definido, uma palavra-passe aleatória será enviada por correio eletrónico ao utilizador.",
+       "apihelp-createaccount-param-reason": "Motivo opcional de criação da conta, para ser colocado nos registos.",
+       "apihelp-createaccount-param-language": "Código de língua a definir como padrão para o utilizador (opcional, por omissão é a língua de conteúdo).",
        "apihelp-delete-description": "Eliminar uma página.",
        "apihelp-delete-param-watch": "Adicionar a página à lista de vigiadas do utilizador atual.",
        "apihelp-delete-param-unwatch": "Remover a página da lista de vigiadas do utilizador atual.",
        "apihelp-edit-param-text": "Conteúdo da página.",
        "apihelp-edit-param-minor": "Edição menor.",
        "apihelp-edit-param-bot": "Marcar esta edição como robô.",
+       "apihelp-edit-param-token": "A chave deve ser sempre enviada como último parâmetro, ou pelo menos após o parâmetro $1text.",
        "apihelp-edit-example-edit": "Editar uma página",
        "apihelp-emailuser-description": "Enviar correio eletrónico a utilizador.",
        "apihelp-emailuser-param-subject": "Assunto.",
        "apihelp-emailuser-param-text": "Texto.",
+       "apihelp-emailuser-param-ccme": "Enviar-me uma cópia desta mensagem de correio eletrónico.",
+       "apihelp-expandtemplates-description": "Expande todas as predefinições incluídas na notação wiki.",
        "apihelp-expandtemplates-param-title": "Título da página.",
+       "apihelp-expandtemplates-paramvalue-prop-ttl": "O período máximo a partir do qual devem ser invalidados os armazenamentos na <i>cache</i> do resultado.",
+       "apihelp-expandtemplates-example-simple": "Expandir a notação wiki <kbd><nowiki>{{Project:Sandbox}}</nowiki></kbd>.",
        "apihelp-feedcontributions-param-feedformat": "O formato do feed.",
        "apihelp-feedcontributions-param-deletedonly": "Mostrar apenas contribuições eliminadas.",
+       "apihelp-feedcontributions-param-toponly": "Mostrar apenas as edições mais recentes.",
        "apihelp-feedcontributions-param-hideminor": "Ocultar edições menores.",
        "apihelp-feedcontributions-param-showsizediff": "Mostrar diferença de tamanho entre edições.",
        "apihelp-feedrecentchanges-param-feedformat": "O formato do feed.",
        "apihelp-feedrecentchanges-example-simple": "Mostrar mudanças recentes",
        "apihelp-help-example-main": "Ajuda para o módulo principal",
        "apihelp-help-example-recursive": "Toda a ajuda numa página",
+       "apihelp-login-description": "Entrar e obter <i>cookies</i> de autenticação.\n\nEsta operação só deve ser usada em combinação com [[Special:BotPasswords]]; a sua utilização para entrar com a conta principal é obsoleta e poderá falhar sem aviso. Para entrar com a conta principal de forma segura, use <kbd>[[Special:ApiHelp/clientlogin|action=clientlogin]]</kbd>.",
        "apihelp-login-param-name": "Nome de utilizador(a).",
        "apihelp-login-param-password": "Palavra-passe.",
        "apihelp-login-param-domain": "Domínio (opcional).",
+       "apihelp-login-param-token": "Chave de início de sessão obtida no primeiro pedido.",
+       "apihelp-login-example-gettoken": "Obter uma chave de início de sessão.",
        "apihelp-login-example-login": "Entrar",
        "apihelp-logout-description": "Terminar e limpar dados de sessão.",
        "apihelp-managetags-description": "Executar tarefas de gestão relacionadas com alteração de etiquetas.",
        "apihelp-patrol-description": "Patrulhar uma página ou edição.",
        "apihelp-patrol-example-rcid": "Patrulhar uma mudança recente",
        "apihelp-patrol-example-revid": "Patrulhar uma edição",
+       "apihelp-protect-param-expiry": "Datas e horas de expiração. Se só uma data e hora for definida, será usada para todas as proteções. Use <kbd>infinite</kbd>, <kbd>indefinite</kbd>, <kbd>infinity</kbd> ou <kbd>never</kbd>, para proteção sem expiração.",
        "apihelp-protect-example-protect": "Proteger uma página",
+       "apihelp-purge-description": "Limpar a <i>cache</i> para os títulos especificados.\n\nRequer um pedido POST se o utilizador não tiver iniciado uma sessão.",
+       "apihelp-query-description": "Obter dados do MediaWiki e acerca dele.\n\nTodas as modificações de dados têm primeiro de usar um pedido para adquirir uma chave, de forma a impedir ações abusivas de <i>sites</i> maliciosos.",
+       "apihelp-query-param-prop": "Que propriedades obter para as páginas consultadas.",
+       "apihelp-query-param-iwurl": "Obter, ou não, o URL completo se o título for um <i>link</i> interwikis.",
        "apihelp-query+allcategories-description": "Enumerar todas as categorias.",
+       "apihelp-query+allcategories-param-prop": "Que propriedades obter:",
        "apihelp-query+alldeletedrevisions-example-user": "Lista das últimas 50 contribuições eliminadas pelo utilizador <kbd>Example</kbd>.",
+       "apihelp-query+allmessages-param-prop": "Que propriedades obter.",
+       "apihelp-query+allmessages-example-ipb": "Mostrar mensagens que começam por <kbd>ipb-</kbd>.",
        "apihelp-query+allpages-param-prefix": "Pesquisa para todos os títulos de páginas que comecem com este valor.",
+       "apihelp-query+allpages-param-prexpiry": "Por qual tipo de expiração filtrar a página:\n;indefinite:Obter só páginas com um período de expiração indefinido.\n;definite:Obter só páginas com um período de expiração definido (específico).\n;all:Obter páginas com qualquer período de expiração.",
        "apihelp-query+allpages-example-generator": "Mostrar informação sobre 4 páginas que comecem com a letra <kbd>T</kbd>.",
+       "apihelp-query+mystashedfiles-param-prop": "Que propriedades obter para os ficheiros.",
        "apihelp-query+allusers-example-Y": "Lista de utilizadores que comecem com <kbd>Y</kbd>.",
+       "apihelp-query+authmanagerinfo-description": "Obter informação sobre o atual estado de autenticação.",
+       "apihelp-query+authmanagerinfo-param-requestsfor": "Obter informação sobre os pedidos de autenticação que são necessários para a operação de autenticação especificada.",
+       "apihelp-query+authmanagerinfo-example-securitysensitiveoperation": "Testar se a autenticação é suficiente para a operação <kbd>foo</kbd>.",
        "apihelp-query+backlinks-example-simple": "Mostrar ligações para <kbd>Main page</kbd>.",
        "apihelp-query+backlinks-example-generator": "Obter informações sobre as páginas com ligação para <kbd>Main page</kbd>.",
+       "apihelp-query+blocks-description": "Listar todos os utilizadores e endereços IP bloqueados.",
+       "apihelp-query+blocks-param-ip": "Obter todos os bloqueios aplicáveis a este endereço IP ou intervalo CIDR, incluindo bloqueios de intervalos. Não pode ser usado em conjunto com <var>$3users</var>. Não são aceites intervalos CIDR maiores que IPv4/$1 ou IPv6/$2.",
        "apihelp-query+blocks-param-limit": "O número máximo de bloqueios a listar.",
+       "apihelp-query+blocks-param-prop": "Que propriedades obter:",
+       "apihelp-query+blocks-paramvalue-prop-range": "Adiciona o intervalo de endereços IP afetado pelo bloqueio.",
+       "apihelp-query+blocks-param-show": "Mostrar só os bloqueios que preenchem estes critérios.\nPor exemplo, para ver só bloqueios indefinidos de endereços IP, defina <kbd>$1show=ip|!temp</kbd>.",
        "apihelp-query+categorymembers-description": "Lista de todas as páginas numa categoria fornecida.",
        "apihelp-query+deletedrevs-paraminfo-modes": "{{PLURAL:$1|Modo|Modos}}: $2",
        "apihelp-query+deletedrevs-param-excludeuser": "Não listar edições deste utilizador.",
        "apihelp-query+deletedrevs-param-namespace": "Listar apenas as páginas neste domínio.",
+       "apihelp-query+deletedrevs-param-prop": "Que propriedades obter:\n;revid:Adiciona o identificador de revisão da revisão eliminada.\n;parentid:Adiciona o identificador de revisão da revisão anterior da página.\n;user:Adiciona o utilizador que fez a revisão.\n;userid:Adiciona o identificador do utilizador que fez a revisão.\n;comment:Adiciona o comentário da revisão.\n;parsedcomment:Adiciona o comentário da revisão após passagem pelo analisador sintático.\n;minor:Etiqueta a revisão como uma revisão menor.\n;len:Adiciona o comprimento (em bytes) da revisão.\n;sha1:Adiciona o SHA-1 (base 16) da revisão.\n;content:Adiciona o conteúdo da revisão.\n;token:<span class=\"apihelp-deprecated\">Obsoleto.</span> Fornece a chave da edição.\n;tags:Etiquetas da revisão.",
+       "apihelp-query+extlinks-description": "Devolve todos os URL externos (que não sejam interwikis) das páginas especificadas.",
+       "apihelp-query+extlinks-param-protocol": "Protocolo do URL. Se vazio e <var>$1query</var> está definido, o protocolo é <kbd>http</kbd>. Deixe isto e  <var>$1query</var> vazios para listar todos os <i>links</i> externos.",
+       "apihelp-query+extlinks-param-query": "Texto de pesquisa sem protocolo. Útil para verificar se uma determinada página contém um determinado URL externo.",
        "apihelp-query+extlinks-example-simple": "Obtenha uma lista de ligações externas na <kbd>Main Page</kbd>.",
+       "apihelp-query+exturlusage-description": "Enumerar as páginas que contêm um determinado URL.",
+       "apihelp-query+exturlusage-paramvalue-prop-url": "Adiciona o URL usado na página.",
+       "apihelp-query+exturlusage-param-protocol": "Protocolo do URL. Se vazio e <var>$1query</var> está definido, o protocolo é <kbd>http</kbd>. Deixe isto e  <var>$1query</var> vazios para listar todos os <i>links</i> externos.",
+       "apihelp-query+exturlusage-param-expandurl": "Expandir URL relativos a protocolos com o protocolo canónico.",
        "apihelp-query+filearchive-example-simple": "Mostrar lista de todos os ficheiros eliminados",
+       "apihelp-query+filerepoinfo-param-prop": "Propriedades do repositório a obter (em algumas wikis poderão haver mais disponíveis):\n;apiurl:URL para a API do repositório - útil para obter informação de imagens do servidor.\n;name:A chave para o repositório - usada, por exemplo, em <var>[[mw:Manual:$wgForeignFileRepos|$wgForeignFileRepos]]</var> e nos valores de retorno de [[Special:ApiHelp/query+imageinfo|imageinfo]].\n;displayname:O nome legível da wiki repositório.\n;rooturl:URL de raiz para endereços de imagens.\n;local:Se o repositório é o local ou não.",
+       "apihelp-query+fileusage-param-prop": "Que propriedades obter:",
+       "apihelp-query+imageinfo-paramvalue-prop-url": "Devolve URL para o ficheiro e página de descrição.",
+       "apihelp-query+imageinfo-paramvalue-prop-thumbmime": "Adiciona o tipo MIME da miniatura (requer URL e o parâmetro $1urlwidth).",
+       "apihelp-query+imageinfo-param-urlwidth": "Se $2prop=url está definido, será devolvido um URL para uma imagem redimensionada com este comprimento.\nPor razões de desempenho, se esta opção for usada não serão devolvidas mais de $1 imagens redimensionadas.",
        "apihelp-query+info-description": "Obter informação básica da página.",
+       "apihelp-query+info-paramvalue-prop-url": "Fornece um URL completo, um URL de edição e o URL canónico, para cada página.",
+       "apihelp-query+info-param-token": "Em substituição, usar [[Special:ApiHelp/query+tokens|action=query&meta=tokens]].",
+       "apihelp-query+iwbacklinks-param-prop": "Que propriedades obter:",
+       "apihelp-query+iwlinks-param-url": "Obter, ou não, o URL completo (não pode ser usado com $1prop).",
+       "apihelp-query+iwlinks-paramvalue-prop-url": "Adiciona o URL completo.",
+       "apihelp-query+langbacklinks-param-prop": "Que propriedades obter:",
+       "apihelp-query+langlinks-param-url": "Obter, ou não, o URL completo (não pode ser usado com $1prop).",
+       "apihelp-query+langlinks-paramvalue-prop-url": "Adiciona o URL completo.",
+       "apihelp-query+linkshere-param-prop": "Que propriedades obter:",
+       "apihelp-query+logevents-param-prop": "Que propriedades obter:",
+       "apihelp-query+protectedtitles-param-prop": "Que propriedades obter:",
+       "apihelp-query+recentchanges-paramvalue-prop-user": "Adiciona o utilizador responsável pela edição e marca se o utilizador é um endereço IP.",
+       "apihelp-query+recentchanges-param-token": "Em substituição, usar <kbd>[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]</kbd>.",
        "apihelp-query+recentchanges-example-simple": "Lista de mudanças recentes",
-       "apihelp-query+search-param-enablerewrites": "Habilitar rescrever a pesquisa interna. Alguns motores de busca podem rescrever a consulta para outra que acha dará melhores resultados, como a corrigir erros de ortografia.",
+       "apihelp-query+redirects-param-prop": "Que propriedades obter:",
+       "apihelp-query+revisions-param-token": "Que chaves obter para cada revisão.",
+       "apihelp-query+revisions+base-param-prop": "Que propriedades obter para cada revisão:",
+       "apihelp-query+search-param-prop": "Que propriedades devolver:",
+       "apihelp-query+search-param-enablerewrites": "Ativar reescrita da consulta interna. Alguns motores de busca podem reescrever a consulta, substituindo-a por outra que consideram que dará melhores resultados, como acontece na correção de erros de ortografia.",
+       "apihelp-query+siteinfo-paramvalue-prop-dbrepllag": "Devolve o servidor da base de dados com o maior atraso de replicação.",
+       "apihelp-query+siteinfo-param-showalldb": "Listar todos os servidores da base de dados, não só aquele que tem maior atraso.",
+       "apihelp-query+siteinfo-example-replag": "Verificar o atraso de replicação atual.",
+       "apihelp-query+tags-param-prop": "Que propriedades obter:",
+       "apihelp-query+tokens-description": "Obtém chaves para operações de modificação de dados.",
+       "apihelp-query+tokens-param-type": "Tipos de chave a pedir.",
+       "apihelp-query+tokens-example-simple": "Obter uma chave csfr (padrão).",
+       "apihelp-query+tokens-example-types": "Obter uma chave de vigilância e uma chave de patrulha.",
+       "apihelp-query+transcludedin-param-prop": "Que propriedades obter:",
+       "apihelp-query+usercontribs-example-ipprefix": "Mostrar as contribuições de todos os endereços IP com o prefixo <kbd>192.0.2.</kbd>.",
+       "apihelp-query+userinfo-paramvalue-prop-preferencestoken": "<span class=\"apihelp-deprecated\">Obsoleto.</span> Obter uma chave para alterar as preferências do utilizador atual.",
+       "apihelp-query+userinfo-paramvalue-prop-email": "Adicionar o correio eletrónico do utilizador e a data de autenticação do correio eletrónico.",
+       "apihelp-query+users-param-token": "Em substituição, usar <kbd>[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]</kbd>.",
+       "apihelp-query+watchlist-param-owner": "Usado com $1token para aceder à lista de páginas vigiadas de outro utilizador.",
+       "apihelp-query+watchlist-param-token": "Uma chave de segurança (disponível nas [[Special:Preferences#mw-prefsection-watchlist|preferências]] do utilizador) para permitir acesso à lista de páginas vigiadas de outro utilizador.",
+       "apihelp-query+watchlistraw-param-owner": "Usado com $1token para aceder à lista de páginas vigiadas de outro utilizador.",
+       "apihelp-query+watchlistraw-param-token": "Uma chave de segurança (disponível nas [[Special:Preferences#mw-prefsection-watchlist|preferências]] do utilizador) para permitir acesso à lista de páginas vigiadas de outro utilizador.",
+       "apihelp-removeauthenticationdata-description": "Remover os dados de autenticação do utilizador atual.",
+       "apihelp-rollback-example-summary": "Reverter as últimas edições da página <kbd>Main Page</kbd> pelo utilizador IP <kbd>192.0.2.5</kbd> com o resumo <kbd>Reverting vandalism</kbd>, e marcar essas edições e a reversão como edições de robôs.",
+       "apihelp-stashedit-description": "Preparar uma edição na <i>cache</i> partilhada.\n\nIsto destina-se a ser usado via AJAX a partir do formulário de edição, para melhorar o desempenho da gravação da página.",
+       "apihelp-tokens-description": "Obter chaves para operações de modificação de dados.\n\nEste módulo é obsoleto e foi substituído por [[Special:ApiHelp/query+tokens|action=query&meta=tokens]].",
+       "apihelp-tokens-param-type": "Tipos de chave a pedir.",
+       "apihelp-tokens-example-edit": "Obter uma chave de edição (padrão).",
+       "apihelp-tokens-example-emailmove": "Obter uma chave de correio eletrónico e uma chave de movimentação.",
        "apihelp-unblock-description": "Desbloquear um utilizador.",
+       "apihelp-unblock-param-user": "Nome de utilizador, endereço IP ou gama de endereços IP a desbloquear. Não pode ser usado em conjunto com <var>$1id</var>.",
        "apihelp-unblock-param-reason": "Motivo para o desbloqueio.",
        "apihelp-undelete-param-title": "Título da página a restaurar.",
        "apihelp-upload-param-watch": "Vigiar página.",
        "apihelp-upload-param-ignorewarnings": "Ignorar todos os avisos.",
+       "apihelp-upload-param-url": "URL de onde obter o ficheiro.",
+       "apihelp-upload-example-url": "Carregar de um URL.",
        "apihelp-userrights-param-user": "Nome de utilizador(a).",
        "apihelp-userrights-param-userid": "ID de utilizador.",
        "apihelp-userrights-param-add": "Adicionar o utilizador a estes grupos.",
        "api-help-param-deprecated": "Obsoleto.",
        "api-help-param-required": "Este parâmetro é obrigatório.",
        "api-help-datatypes-header": "Tipo de dados",
-       "api-help-datatypes": "Alguns tipos de parâmetro na API necessitam de mais explicações:\n;boolean\n:Os parâmetros booleanos funcionam como as caixas de seleção HTML: se o parâmetro for especificado, independentemente do valor, é considerado verdadeiro. Para um valor falso, omitir o parâmetro completo.\n;timestamp\n:Timestamps podem ser especificados em vários formatos. Formato de data e hora ISO 8601 é recomendado. Todos os horários estão em UTC, qualquer inclusão de fuso horário é ignorado.\n:* Data e hora ISO 8601, <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>Z</kbd> (pontuação e <kbd>Z</kbd> são opcionais)\n:* Data e hora ISO 8601 com segundos fracionários (ignorado), <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>.<var>00001</var>Z</kbd> (traços, dois pontos e <kbd>Z</kbd> são opcionais)\n:* Formato do MediaWiki, <kbd><var>2001</var><var>01</var><var>15</var><var>14</var><var>56</var><var>00</var></kbd>\n:* Formato numérico genérico, <kbd><var>2001</var>-<var>01</var>-<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd> (fuso horário opcional do <kbd>GMT</kbd>, <kbd>+<var>##</var></kbd>, or <kbd>-<var>##</var></kbd> são ignorados)\n:* Formato EXIF, <kbd><var>2001</var>:<var>01</var>:<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:*Formato RFC 2822 (o fuso horário pode ser omitido), <kbd><var>Mon</var>, <var>15</var> <var>Jan</var> <var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* Formato RFC 850 (o fuso horário pode ser omitido), <kbd><var>Monday</var>, <var>15</var>-<var>Jan</var>-<var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* Formato C ctime, <kbd><var>Mon</var> <var>Jan</var> <var>15</var> <var>14</var>:<var>56</var>:<var>00</var> <var>2001</var></kbd>\n:* Segundos desde 1970-01-01T00:00:00Z como um inteiro de 1 a 13 dígitos (excluindo <kbd>0</kbd>)\n:* A string <kbd>now</kbd>",
+       "api-help-datatypes": "O <i>input</i> para o MediaWiki de ser UTF-8 normalizado de acordo com a norma NFC. O MediaWiki pode converter outros tipos de entrada, mas isto pode causar que algumas operações (tais como [[Special:ApiHelp/edit|edições]] com verificações MD5) falhem.\n\nAlguns tipos de parâmetro nos pedidos à API necessitam de mais explicações:\n;boolean\n:Os parâmetros booleanos funcionam como as caixas de seleção HTML: se o parâmetro for especificado, independentemente do valor, é considerado verdadeiro. Para um valor falso, omitir o parâmetro completo.\n;timestamp\n:As datas e horas podem ser especificados em vários formatos. O formato de data e hora ISO 8601 é recomendado. Todas as horas estão em UTC, qualquer inclusão de fuso horário é ignorada.\n:* Data e hora ISO 8601, <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>Z</kbd> (pontuação e <kbd>Z</kbd> são opcionais)\n:* Data e hora ISO 8601 com segundos fracionários (ignorado), <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>.<var>00001</var>Z</kbd> (traços, dois pontos e <kbd>Z</kbd> são opcionais)\n:* Formato do MediaWiki, <kbd><var>2001</var><var>01</var><var>15</var><var>14</var><var>56</var><var>00</var></kbd>\n:* Formato numérico genérico, <kbd><var>2001</var>-<var>01</var>-<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd> (fuso horário opcional de <kbd>GMT</kbd>, <kbd>+<var>##</var></kbd>, ou <kbd>-<var>##</var></kbd> são ignorados)\n:* Formato EXIF, <kbd><var>2001</var>:<var>01</var>:<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:*Formato RFC 2822 (o fuso horário pode ser omitido), <kbd><var>Mon</var>, <var>15</var> <var>Jan</var> <var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* Formato RFC 850 (o fuso horário pode ser omitido), <kbd><var>Monday</var>, <var>15</var>-<var>Jan</var>-<var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* Formato C ctime, <kbd><var>Mon</var> <var>Jan</var> <var>15</var> <var>14</var>:<var>56</var>:<var>00</var> <var>2001</var></kbd>\n:* Segundos desde 1970-01-01T00:00:00Z como um inteiro de 1 a 13 dígitos (excluindo <kbd>0</kbd>)\n:* O texto <kbd>now</kbd>\n;separador alternativo de valores múltiplos\n:Os parâmetros que aceitam vários valores são normalmente fornecidos com os valores separados por uma barra vertical (<i>pipe</i>), por exemplo <kbd>parâmetro=valor1|valor2</kbd> ou <kbd>parâmetro=valor1%7Cvalor2</kbd>. Se um valor contém a barra vertical, use U+001F (Separador de Unidades) como separador ''e'' prefixe o valor com U+001F, isto é, <kbd>parâmetro=%1Fvalor1%1Fvalor2</kbd>.",
        "api-help-param-type-limit": "Tipo: inteiro ou <kbd>max</kbd>",
        "api-help-param-type-boolean": "Tipo: boolean ([[Special:ApiHelp/main#main/datatypes|detalhes]])",
        "api-help-param-type-user": "Tipo: {{PLURAL:$1|1=nome de utilizador|2=lista de nomes de utilizadores}}",
        "api-help-param-multi-max": "O número máximo de valores é {{PLURAL:$1|$1}} ({{PLURAL:$2|$2}} para robôs).",
        "api-help-param-default": "Padrão: $1",
        "api-help-param-default-empty": "Padrão: <span class=\"apihelp-empty\">(vazio)</span>",
+       "api-help-param-token": "Uma chave \"$1\" obtida de [[Special:ApiHelp/query+tokens|action=query&meta=tokens]]",
+       "api-help-param-token-webui": "Para efeitos de compatibilidade, a chave usada na interface <i>web</i> também é aceite.",
        "api-help-param-no-description": "<span class=\"apihelp-empty\">(sem descrição)</span>",
        "api-help-examples": "{{PLURAL:$1|Exemplo|Exemplos}}:",
        "api-help-permissions": "{{PLURAL:$1|Permissão|Permissiões}}:",
        "api-help-permissions-granted-to": "{{PLURAL:$1|Concedida a|Concedidas a}}: $2",
        "api-help-open-in-apisandbox": "<small>[abrir na página de testes]</small>",
+       "api-help-authmanager-general-usage": "O procedimento geral para usar este módulo é:\n# Obtenha os campos disponíveis em <kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd> com <kbd>amirequestsfor=$4</kbd> e uma chave <kbd>$5</kbd> de <kbd>[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]</kbd>.\n# Apresente os campos ao utilizador e obtenha os dados fornecidos por este.\n# Publique-os para este módulo, fornecendo <var>$1returnurl</var> e quaisquer campos relevantes.\n# Verifique o <samp>status</samp> na resposta.\n#* Se recebeu <samp>PASS</samp> ou <samp>FAIL</samp>, terminou. A operação terá tido sucesso ou falhado.\n#* Se recebeu <samp>UI</samp>, apresente os novos campos ao utilizador e obtenha os dados fornecidos por este. Depois publique-os para este módulo com <var>$1continue</var> e os campos relevantes preenchidos, e repita o passo 4.\n#* Se recebeu <samp>REDIRECT</samp>, encaminhe o utilizador para <samp>redirecttarget</samp> e aguarde o retorno para o URL <var>$1returnurl</var>. Depois publique para este módulo com <var>$1continue</var> e quaisquer campos que tenham sido passados ao URL de retorno, e repita o passo 4.\n#* Se recebeu <samp>RESTART</samp>, isso significa que a autenticação funcionou mas não temos uma conta de utilizador associada. Pode tratá-lo como <samp>UI</samp> ou como <samp>FAIL</samp>.",
+       "api-help-authmanagerhelper-request": "Usar este pedido de autenticação, com o <samp>id</samp> devolvido por <kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd> com <kbd>amirequestsfor=$1</kbd>.",
+       "api-help-authmanagerhelper-mergerequestfields": "Combinar a informação de todos os pedidos de autenticação numa única matriz.",
+       "api-help-authmanagerhelper-returnurl": "O URL de retorno para fluxos de autenticação por terceiros tem de ser absoluto. É obrigatório fornecer este URL ou <var>$1continue</var>.\n\nTipicamente, após receber uma resposta <samp>REDIRECT</samp>, abrirá um <i>browser</i> ou uma <i>web view</i> para o URL <samp>redirecttarget</samp> especificado, para dar lugar ao fluxo de autenticação por terceiros. Quando o fluxo terminar, a terceira entidade enviará o <i>browser</i> ou a <i>web view</i> para este URL. Deve extrair do URL quaisquer parâmetros de consulta ou de POST, e passá-los como um pedido <var>$1continue</var> a este módulo da API.",
+       "api-help-authmanagerhelper-additional-params": "Este módulo aceita parâmetros adicionais, dependendo dos pedidos de autenticação disponíveis. Use <kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd> com <kbd>amirequestsfor=$1</kbd> (ou uma resposta anterior deste módulo, se aplicável) para determinar os pedidos disponíveis e os campos que estes utilizam.",
        "api-credits-header": "Créditos",
        "api-credits": "Programadores API:\n* Roan Kattouw (programador principal Set 2007–2009)\n* Victor Vasiliev\n* Bryan Tong Minh\n* Sam Reed\n* Yuri Astrakhan (criador, programador-líder Set 2006–Set 2007)\n* Brad Jorsch (programador-líder 2013–presente)\n\nPor favor, envie os seus comentários, sugestões e perguntas para mediawiki-api@lists.wikimedia.org ou reporte um erro técnico em https://phabricator.wikimedia.org/."
 }
index caa89b5..8deda75 100644 (file)
@@ -22,6 +22,7 @@
        "apihelp-main-param-smaxage": "{{doc-apihelp-param|main|smaxage}}",
        "apihelp-main-param-maxage": "{{doc-apihelp-param|main|maxage}}",
        "apihelp-main-param-assert": "{{doc-apihelp-param|main|assert}}",
+       "apihelp-main-param-assertuser": "{{doc-apihelp-param|main|assertuser}}",
        "apihelp-main-param-requestid": "{{doc-apihelp-param|main|requestid}}",
        "apihelp-main-param-servedby": "{{doc-apihelp-param|main|servedby}}",
        "apihelp-main-param-curtimestamp": "{{doc-apihelp-param|main|curtimestamp}}",
index aa0d99a..6abd59f 100644 (file)
                        "Лилиә",
                        "Айсар",
                        "Гизатуллина",
-                       "MaxSem"
+                       "MaxSem",
+                       "Irus"
                ]
        },
        "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|Документация]]\n* [[mw:API:FAQ|ЧаВО]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Почтовая рассылка]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Новости API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Ошибки и запросы]\n</div>\n<strong>Статус:</strong> Все отображаемые на этой странице функции должны работать, однако API находится в статусе активной разработки и может измениться в любой момент. Подпишитесь на [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ почтовую рассылку mediawiki-api-announce], чтобы быть в курсе обновлений.\n\n<strong>Ошибочные запросы:</strong> Если API получает запрос с ошибкой, вернётся заголовок HTTP с ключом «MediaWiki-API-Error», после чего значение заголовка и код ошибки будут отправлены обратно и установлены в то же значение. Более подробную информацию см. [[mw:API:Errors_and_warnings|API: Ошибки и предупреждения]].\n\n<strong>Тестирование:</strong> для удобства тестирования API-запросов, см. [[Special:ApiSandbox]].",
        "apihelp-main-param-action": "Действие, которое следует выполнить.",
        "apihelp-main-param-format": "Формат вывода.",
+       "apihelp-main-param-maxlag": "Максимальное отставание может быть использован, когда Медиавики устанавливается на реплицируемой базы данных кластера. Чтобы спасти действий, способных причинить больше отставать репликации сайта, этот параметр может заставлять клиента ждать до задержки репликации меньше указанного значения. В случае чрезмерной задержки, код ошибки <samp>maxlag</samp> возвращается с сообщением <samp>ждет $ведущий: $отставать секунд отстала</samp>.<br />См. [[mw:Manual:Maxlag_parameter|Maxlag параметр]] для получения дополнительной информации.",
        "apihelp-main-param-smaxage": "Устанавливает значение HTTP-заголовка Cache-Control <code>s-maxage</code> в заданное число секунд. Ошибки никогда не кэшируются.",
        "apihelp-main-param-maxage": "Устанавливает значение HTTP-заголовка Cache-Control <code>s-maxage</code> в заданное число секунд. Ошибки никогда не кэшируются.",
        "apihelp-main-param-assert": "Удостовериться, что пользователь авторизован, если задано <kbd>user</kbd>, или что имеет права бота, если задано <kbd>bot</kbd>.",
+       "apihelp-main-param-assertuser": "Убедитесь, что текущий пользователь является именем пользователя.",
        "apihelp-main-param-requestid": "Любое заданное здесь значение будет включено в ответ. Может быть использовано для различения запросов.",
        "apihelp-main-param-servedby": "Включить в результаты имя хоста, обработавшего запрос.",
        "apihelp-main-param-curtimestamp": "Включить в результаты временную метку.",
        "apihelp-main-param-origin": "При обращении к API, используя кросс-доменный AJAX-запрос (CORS), задайте параметру значение исходного домена. Он должен быть включён в любой предварительный запрос и таким образом должен быть частью URI-запроса (не тела POST).\n\nДля аутентифицированных запросов он должен точно соответствовать одному из источников в заголовке <code>Origin</code>, так что он должен быть задан наподобие <kbd>https://ru.wikipedia.org</kbd> или <kbd>https://meta.wikimedia.org</kbd>. Если параметр не соответствует заголовку <code>Origin</code>, будет возвращён ответ с кодом ошибки 403. Если параметр соответствует заголовку <code>Origin</code>, и источник находится в белом списке, будут установлены заголовки <code>Access-Control-Allow-Origin</code> и <code>Access-Control-Allow-Credentials</code>.\n\nДля неаутентифицированных запросов укажите значение <kbd>*</kbd>. Это приведёт к установке заголовка <code>Access-Control-Allow-Origin</code> заголовка должен быть установлен, но <code>Access-Control-Allow-Credentials</code> примет значение <code>false</code> и все пользовательские данные будут ограничены.",
+       "apihelp-main-param-uselang": "Язык, используемый для перевода Сообщений. <kbd>[[Special:ApiHelp/query+siteinfo|action=query&meta=siteinfo]]</kbd> с <kbd>siprop=языки</kbd> возвращает список кодов языков, или указать <kbd>пользователей</kbd> , чтобы использовать текущий язык пользователя предпочтения, или указать <kbd>контента</kbd> для использования этой Вики содержание язык.",
        "apihelp-block-description": "Блокировка участника.",
        "apihelp-block-param-user": "Имя участника, IP-адрес или диапазон IP-адресов, которые вы хотите заблокировать.",
        "apihelp-block-param-reason": "Причина блокировки.",
@@ -41,6 +45,8 @@
        "apihelp-block-param-allowusertalk": "Позволяет участникам редактировать их собственные страницы обсуждения (зависит от <var>[[mw:Manual:$wgBlockAllowsUTEdit|$wgBlockAllowsUTEdit]]</var>).",
        "apihelp-block-param-reblock": "Если участник уже заблокирован, перезаписать существующую блокировку.",
        "apihelp-block-param-watchuser": "Следить за страницей пользователя или IP-участника и страницей обсуждения.",
+       "apihelp-changeauthenticationdata-description": "Изменить данные проверки подлинности для текущего пользователя.",
+       "apihelp-changeauthenticationdata-example-password": "Попытка изменить текущий пароль пользователя в <kbd>ExamplePassword</kbd>.",
        "apihelp-checktoken-param-type": "Тип маркера проходит тестирование.",
        "apihelp-checktoken-param-token": "токен для проверки",
        "apihelp-checktoken-param-maxtokenage": "Максимально допустимый возраст токена (в секундах).",
        "apihelp-edit-param-text": "Содержание страницы.",
        "apihelp-edit-param-minor": "Незначительное изменение (малая правка).",
        "apihelp-edit-param-notminor": "Значительное изменение (обычная, не «малая», правка).",
-       "apihelp-edit-param-bot": "Пометить правку как сделанную ботом.",
+       "apihelp-edit-param-bot": "Пометьте этот редактировать как изменить скрипт.",
+       "apihelp-edit-param-recreate": "Возвращает сообщение об ошибке не, если страница тем временем был удален.",
        "apihelp-edit-param-createonly": "Не редактировать страницу, если она уже существует.",
        "apihelp-edit-param-nocreate": "Выбрасывать ошибку, если страницы не существует.",
        "apihelp-edit-param-watch": "Добавить страницу к текущему списку наблюдения пользователя.",
        "apihelp-edit-param-unwatch": "Удалить страницу из списка наблюдения текущего пользователя.",
+       "apihelp-edit-param-watchlist": "Безоговорочно добавить или удалить страницы из списка наблюдения текущего пользователя, используйте предпочтения или не менять часы.",
+       "apihelp-edit-param-md5": "MD5-хеша $1текстовый параметр, или $1prependtext и $1appendtext параметры объединяются. Если установлен, то изменение не будет сделано, если хэш является правильным.",
+       "apihelp-edit-param-prependtext": "Добавьте этот текст в начале страницы. Переопределяет $1текст.",
+       "apihelp-edit-param-appendtext": "Добавьте этот текст внизу страницы. Переопределяет $1текст.\n\nИспользуйте вместо этого параметра $1раздел = new, чтобы добавить новый раздел.",
+       "apihelp-edit-param-undo": "Отменить это изменение. Переопределяет $1текст, $1prependtext и $1appendtext.",
        "apihelp-edit-param-redirect": "Автоматически разрешать редиректы.",
        "apihelp-edit-param-contentformat": "Формат сериализации содержимого, используемый для ввода текста.",
+       "apihelp-edit-param-contentmodel": "Модель содержимого нового содержимого.",
+       "apihelp-edit-param-token": "Маркер всегда должен быть послан в качестве последнего параметра, или, по крайней мере, после $1текстовый параметр.",
        "apihelp-edit-example-edit": "Редактировать страницу",
        "apihelp-edit-example-prepend": "Добавить магическое слово <kbd>_&#95;NOTOC_&#95;</kbd> в начало страницы.",
        "apihelp-edit-example-undo": "Отменить изменения с 13579 по 13585 с добавлением автоматического описания правки.",
        "apihelp-emailuser-param-text": "Содержание письма",
        "apihelp-emailuser-param-ccme": "Отправить копию этого сообщения мне.",
        "apihelp-emailuser-example-email": "Отправить письмо пользователю <kbd>WikiSysop</kbd> с текстом <kbd>Content</kbd>.",
-       "apihelp-expandtemplates-description": "Разворачивает все шаблоны в wikitext.",
+       "apihelp-expandtemplates-description": "Расширяет все шаблоны в тексте.",
        "apihelp-expandtemplates-param-title": "Заголовок страницы.",
        "apihelp-expandtemplates-param-text": "Викитекст для конвертирования",
        "apihelp-expandtemplates-paramvalue-prop-wikitext": "Расширенный викитекст",
        "apihelp-filerevert-description": "Файлды иҫке версияға ҡайтарырға.",
        "apihelp-filerevert-param-filename": "Целевое имя файла без префикса File:.",
        "apihelp-filerevert-param-comment": "Загрузить комментарий.",
+       "apihelp-filerevert-example-revert": "<kbd>Wiki.png</kbd>на версии <kbd>2011-03-05T15:27:40Z</kbd> сброса.",
        "apihelp-help-param-helpformat": "Белешмә яҙыу форматы.",
        "apihelp-help-example-main": "Помощь по главному модулю.",
        "apihelp-help-example-recursive": "Вся справка в одном разделе.",
        "apihelp-options-example-reset": "Сбросить все настройки.",
        "apihelp-paraminfo-description": "Получить информацию о модулях API.",
        "apihelp-paraminfo-param-helpformat": "Формат строк справки.",
+       "apihelp-parse-param-prop": "Какие части информации получить:",
+       "apihelp-parse-paramvalue-prop-text": "Дает разобранного текста в тексте.",
+       "apihelp-parse-paramvalue-prop-langlinks": "Возвращает язык ссылки в анализируемой wikitext.",
+       "apihelp-parse-paramvalue-prop-categorieshtml": "Возвращает HTML-версию категорий.",
        "apihelp-parse-param-disablepp": "Урынына <var>$1disablelimitreport</var> ҡулланырға.",
        "apihelp-parse-param-preview": "Алдан ҡарау режимында синтаксик анализ",
        "apihelp-parse-param-disabletoc": "Не включать в вывод таблицу содержания.",
        "apihelp-protect-example-unprotect2": "Бер ниндәй сикләүҙәр ҡуймай биттән һаҡлауҙы алырға.",
        "apihelp-purge-param-forcelinkupdate": "Обновление связей таблиц.",
        "apihelp-purge-param-forcerecursivelinkupdate": "Һылтанманы һәм таблицаны яңыртығыҙ һәм был битте шаблон итеп ҡулланған башҡа биттәр өсөн һылтанмаларҙы ла яңыртығыҙ.",
+       "apihelp-purge-example-generator": "Продувка первые 10 страниц в основном пространстве имен.",
        "apihelp-query-param-list": "Какие списки использовать",
        "apihelp-query-param-meta": "Какие метаданные использовать",
        "apihelp-query+allcategories-description": "Перечислить все категории.",
        "apihelp-query+allmessages-description": "Был сайттан хәбәр ҡайтарыу.",
        "apihelp-query+allmessages-param-prop": "Ниндәй үҙенсәлектәрҙе ҡайтарырға.",
        "apihelp-query+allmessages-param-args": "Аргументтар Хәбәрҙәрҙә биреләсәк.",
+       "apihelp-query+allmessages-param-lang": "Вернуть сообщения на этом языке.",
        "apihelp-query+blocks-example-simple": "Список блоков.",
        "apihelp-query+categories-param-limit": "Сколько категорий на возврат.",
        "apihelp-query+categorymembers-param-sort": "Свойство для сортировки.",
index 35389b0..e409591 100644 (file)
@@ -89,7 +89,7 @@
        "apihelp-edit-param-tags": "Ändra taggar till att gälla för revideringen.",
        "apihelp-edit-param-minor": "Mindre redigering.",
        "apihelp-edit-param-notminor": "Icke-mindre redigering.",
-       "apihelp-edit-param-bot": "Markera denna redigering som robotredigering.",
+       "apihelp-edit-param-bot": "Markera denna redigering som en robotredigering.",
        "apihelp-edit-param-basetimestamp": "Tidsstämpel för grundversionen, används för att upptäcka redigeringskonflikter. Kan erhållas genom [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "Tidsstämpel för när redigeringsprocessen började, används för att upptäcka redigeringskonflikter. Ett lämpligt värde kan erhållas via  <var>[[Special:ApiHelp/main|curtimestamp]]</var> när redigeringsprocessen startas (t.ex. när sidans innehåll laddas för redigering).",
        "apihelp-edit-param-recreate": "Ignorera felmeddelande om sidan har blivit raderad under tiden.",
        "apihelp-emailuser-param-text": "E-postmeddelandets innehåll.",
        "apihelp-emailuser-param-ccme": "Skicka en kopia av detta e-postmeddelande till mig.",
        "apihelp-emailuser-example-email": "Skicka ett e-postmeddelande till användaren <kbd>WikiSysop</kbd> med texten <kbd>Content</kbd>.",
-       "apihelp-expandtemplates-description": "Expanderar alla mallar i wikitext.",
+       "apihelp-expandtemplates-description": "Expanderar alla mallar inom wikitext.",
        "apihelp-expandtemplates-param-title": "Sidans rubrik.",
        "apihelp-expandtemplates-param-text": "Wikitext att konvertera.",
        "apihelp-expandtemplates-param-revid": "Revision ID, för <nowiki>{{REVISIONID}}</nowiki> och liknande variabler.",
index 1a079df..8b53c02 100644 (file)
@@ -21,6 +21,7 @@
        "apihelp-main-param-smaxage": "Встановити <code>s-maxage</code> HTTP кеш-контроль заголовок на стільки секунд. Помилки ніколи не кешуються.",
        "apihelp-main-param-maxage": "Встановити <code>max-age</code> HTTP кеш-контроль заголовок на стільки секунд. Помилки ніколи не кешуються.",
        "apihelp-main-param-assert": "Перевірити, що користувач увійшов у систему, якщо задано <kbd>user</kbd>, або має права бота, якщо задано <kbd>bot</kbd>.",
+       "apihelp-main-param-assertuser": "Перевірити, чи поточний користувач є найменованим користувачем.",
        "apihelp-main-param-requestid": "Будь-яке значення, вказане тут, буде включене у відповідь. Може використовуватися, щоб відрізняти запити.",
        "apihelp-main-param-servedby": "Включити в результати ім'я хоста, який обробив запит.",
        "apihelp-main-param-curtimestamp": "Включити в результат поточну мітку часу.",
        "apihelp-edit-param-tags": "Змінити теги для версії.",
        "apihelp-edit-param-minor": "Незначне редагування.",
        "apihelp-edit-param-notminor": "Не «незначне» редагування.",
-       "apihelp-edit-param-bot": "Ð\9fомÑ\96Ñ\82ити редагування як зроблене ботом.",
+       "apihelp-edit-param-bot": "Ð\9fознаÑ\87ити редагування як зроблене ботом.",
        "apihelp-edit-param-basetimestamp": "Мітка часу для основної версії, використовується для виявлення конфлікту редагувань. Може бути отримана через [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "Мітка часу, з якого почався процес редагування, використовується для виявлення конфліктів редагувань. Відповідне значення можна отримати з допомогою <var>[[Special:ApiHelp/main|curtimestamp]]</var> на початку процесу редагування (напр., коли завантажується вміст сторінки для редагування).",
        "apihelp-edit-param-recreate": "Відкинути будь-які помилки щодо цієї сторінки, вилучені нещодавно.",
        "apihelp-emailuser-param-text": "Тіло листа.",
        "apihelp-emailuser-param-ccme": "Надіслати копію цього повідомлення мені.",
        "apihelp-emailuser-example-email": "Відправити листа користувачу <kbd>WikiSysop</kbd> з текстом <kbd>Content</kbd>.",
-       "apihelp-expandtemplates-description": "Розгортає усі шаблони у вікітекст.",
+       "apihelp-expandtemplates-description": "Розгортає усі шаблони в межах вікірозмітки.",
        "apihelp-expandtemplates-param-title": "Заголовок сторінки.",
        "apihelp-expandtemplates-param-text": "Вікітекст для перетворення.",
        "apihelp-expandtemplates-param-revid": "ID версії, для <nowiki>{{REVISIONID}}</nowiki> і подібних змінних.",
index 573748d..105639a 100644 (file)
@@ -21,7 +21,8 @@
                        "PhiLiP",
                        "Arthur2e5",
                        "損齋",
-                       "Myy730"
+                       "Myy730",
+                       "D41D8CD98F"
                ]
        },
        "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|文档]]\n* [[mw:API:FAQ|常见问题]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api 邮件列表]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API公告]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R 程序错误与功能请求]\n</div>\n<strong>状态信息:</strong>本页所展示的所有特性都应正常工作,但是API仍在开发当中,将会随时变化。请订阅[https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ mediawiki-api-announce 邮件列表]以便获得更新通知。\n\n<strong>错误请求:</strong>当API收到错误请求时,HTTP header将会返回一个包含\"MediaWiki-API-Error\"的值,随后header的值与error code将会送回并设置为相同的值。详细信息请参阅[[mw:API:Errors_and_warnings|API: 错误与警告]]。\n\n<strong>测试中:</strong>测试API请求的易用性,请参见[[Special:ApiSandbox]]。",
@@ -31,6 +32,7 @@
        "apihelp-main-param-smaxage": "设置<code>s-maxage</code> HTTP缓存控制头至这些秒。错误不会缓存。",
        "apihelp-main-param-maxage": "设置<code>max-age</code> HTTP缓存控制头至这些秒。错误不会缓存。",
        "apihelp-main-param-assert": "如果设置为<kbd>user</kbd>就验证用户是否登录,或如果设置为<kbd>bot</kbd>就验证是否有机器人用户权限。",
+       "apihelp-main-param-assertuser": "验证当前用户是命名用户。",
        "apihelp-main-param-requestid": "任何在此提供的值将包含在响应中。可能可以用以区别请求。",
        "apihelp-main-param-servedby": "包含保存结果请求的主机名。",
        "apihelp-main-param-curtimestamp": "在结果中包括当前时间戳。",
        "apihelp-options-description": "更改当前用户的偏好设置。\n\n只有注册在核心或者已安装扩展中的选项,或者具有<code>userjs-</code>键值前缀(旨在被用户脚本使用)的选项可被设置。",
        "apihelp-options-param-reset": "将参数设置重置为网站默认值。",
        "apihelp-options-param-resetkinds": "当<var>$1reset</var>选项被设置时,要重置的选项类型列表。",
-       "apihelp-options-param-change": "æ\9b´æ\94¹å\88\97表ï¼\8c以name=valueæ ¼å¼\8få\8c\96ï¼\88ä¾\8bå¦\82skin=vectorï¼\89ã\80\82å\80¼ä¸\8dè\83½å\8c\85å\90«ç®¡é\81\93å­\97符ã\80\82å¦\82æ\9e\9c没æ\8f\90ä¾\9bå\80¼ï¼\88ç\94\9aè\87³æ²¡æ\9c\89ç­\89å\8f·ï¼\89ï¼\8cä¾\8bå¦\82optionname|otheroption|...ï¼\8cé\80\89项å°\86é\87\8d置为é»\98认å\80¼。",
+       "apihelp-options-param-change": "æ\9b´æ\94¹å\88\97表ï¼\8c以name=valueæ ¼å¼\8få\8c\96ï¼\88ä¾\8bå¦\82skin=vectorï¼\89ã\80\82å¦\82æ\9e\9c没æ\8f\90ä¾\9bå\80¼ï¼\88ç\94\9aè\87³æ²¡æ\9c\89ç­\89å\8f·ï¼\89ï¼\8cä¾\8bå¦\82optionname|otheroption|...ï¼\8cé\80\89项å°\86é\87\8d置为é»\98认å\80¼ã\80\82å¦\82æ\9e\9cä»»ä½\95é\80\9aè¿\87ç\9a\84å\80¼å\8c\85å\90«ç®¡é\81\93å­\97符ï¼\88<kbd>|</kbd>ï¼\89ï¼\8c请æ\94¹ç\94¨[[Special:ApiHelp/main#main/datatypes|æ\9b¿ä»£å¤\9aå\80¼å\88\86é\9a\94符]]以正确æ\93\8dä½\9c。",
        "apihelp-options-param-optionname": "应设置为由<var>$1optionvalue</var>提供值的选项名称。",
-       "apihelp-options-param-optionvalue": "用于由<var>$1optionname</var>指定的选项的值,可以包含管道字符。",
+       "apihelp-options-param-optionvalue": "用于由<var>$1optionname</var>指定的选项的值。",
        "apihelp-options-example-reset": "重置所有用户设置。",
        "apihelp-options-example-change": "更改<kbd>skin</kbd>和<kbd>hideminor</kbd>设置。",
        "apihelp-options-example-complex": "重置所有设置,然后设置<kbd>skin</kbd>和<kbd>nickname</kbd>。",
        "apihelp-query+logevents-paramvalue-prop-ids": "添加日志活动的ID。",
        "apihelp-query+logevents-paramvalue-prop-title": "为日志事件添加页面标题。",
        "apihelp-query+logevents-paramvalue-prop-type": "添加日志活动的类型。",
-       "apihelp-query+logevents-paramvalue-prop-user": "为日志事件添加用户责任。",
-       "apihelp-query+logevents-paramvalue-prop-userid": "为日志事件添加对此负责的用户ID。",
+       "apihelp-query+logevents-paramvalue-prop-user": "添加对此日志事件负责的用户。",
+       "apihelp-query+logevents-paramvalue-prop-userid": "添加对此日志事件负责的用户的ID。",
        "apihelp-query+logevents-paramvalue-prop-timestamp": "为日志活动添加时间戳。",
        "apihelp-query+logevents-paramvalue-prop-comment": "添加日志活动的摘要。",
        "apihelp-query+logevents-paramvalue-prop-parsedcomment": "添加被解析的日志活动的摘要。",
        "apihelp-query+recentchanges-param-excludeuser": "不要列出此用户的更改。",
        "apihelp-query+recentchanges-param-tag": "只列出带此标签的更改。",
        "apihelp-query+recentchanges-param-prop": "包含的额外信息束:",
-       "apihelp-query+recentchanges-paramvalue-prop-user": "为编辑和标签添加用户责任,如果它们是IP的话。",
+       "apihelp-query+recentchanges-paramvalue-prop-user": "添加造成编辑的用户,并标出它们是否是IP。",
        "apihelp-query+recentchanges-paramvalue-prop-userid": "为编辑添加用户ID责任。",
        "apihelp-query+recentchanges-paramvalue-prop-comment": "为编辑添加摘要。",
        "apihelp-query+recentchanges-paramvalue-prop-parsedcomment": "为编辑添加解析的摘要。",
        "api-help-permissions-granted-to": "{{PLURAL:$1|授予}}:$2",
        "api-help-right-apihighlimits": "在API查询中使用更高的上限(慢查询:$1;快查询:$2)。慢查询的限制也适用于多值参数。",
        "api-help-open-in-apisandbox": "<small>[在沙盒中打开]</small>",
-       "api-help-authmanager-general-usage": "使用此模块的一般程序是:\n# 通过<kbd>amirequestsfor=$4</kbd>取得来自<kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd>的可用字段,和来自<kbd>[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]</kbd>的<kbd>$5</kbd>令牌。\n# 向用户显示字段,并获得其提交内容。\n# 发送至此模块,提供<var>$1returnurl</var>及任何相关字段。\n# 在响应中检查<samp>status</samp>。\n#* 如果您收到了<samp>PASS</samp>或<samp>FAIL</samp>,您已经完成。The operation either succeeded or it didn't.\n#* 如果您收到了<samp>UI</samp>,present the new fields to the user and obtain their submission. Then post to this module with <var>$1continue</var> and the relevant fields set, and repeat step 4.\n#* 如果您收到了<samp>REDIRECT</samp>,direct the user to the <samp>redirecttarget</samp> and wait for the return to <var>$1returnurl</var>. Then post to this module with <var>$1continue</var> and any fields passed to the return URL, and repeat step 4.\n#* 如果您收到了<samp>RESTART</samp>,that means the authentication worked but we don't have a linked user account. You might treat this as <samp>UI</samp> or as <samp>FAIL</samp>.",
+       "api-help-authmanager-general-usage": "使用此模块的一般程序是:\n# 通过<kbd>amirequestsfor=$4</kbd>取得来自<kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd>的可用字段,和来自<kbd>[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]</kbd>的<kbd>$5</kbd>令牌。\n# 向用户显示字段,并获得其提交内容。\n# 发送至此模块,提供<var>$1returnurl</var>及任何相关字段。\n# 在响应中检查<samp>status</samp>。\n#* 如果您收到了<samp>PASS</samp>或<samp>FAIL</samp>,您已经完成。操作要么成功,要么不成功。\n#* 如果您收到了<samp>UI</samp>,present the new fields to the user and obtain their submission. Then post to this module with <var>$1continue</var> and the relevant fields set, and repeat step 4.\n#* 如果您收到了<samp>REDIRECT</samp>,direct the user to the <samp>redirecttarget</samp> and wait for the return to <var>$1returnurl</var>. Then post to this module with <var>$1continue</var> and any fields passed to the return URL, and repeat step 4.\n#* 如果您收到了<samp>RESTART</samp>,that means the authentication worked but we don't have a linked user account. You might treat this as <samp>UI</samp> or as <samp>FAIL</samp>.",
+       "api-help-authmanagerhelper-requests": "只使用这些身份验证请求,通过返回自<kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd>的<samp>id</samp>与<kbd>amirequestsfor=$1</kbd>,或来自此模块之前的响应。",
        "api-help-authmanagerhelper-request": "使用此身份验证请求,通过返回自<kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd>的<samp>id</samp>与<kbd>amirequestsfor=$1</kbd>。",
        "api-help-authmanagerhelper-messageformat": "返回消息使用的格式。",
        "api-help-authmanagerhelper-mergerequestfields": "合并用于所有身份验证请求的字段信息至一个数组中。",
diff --git a/includes/api/i18n/zu.json b/includes/api/i18n/zu.json
new file mode 100644 (file)
index 0000000..f9a5eb6
--- /dev/null
@@ -0,0 +1,10 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Irus"
+               ]
+       },
+       "apihelp-block-description": "Vimbela umsebenzisi",
+       "apihelp-block-param-user": "Igama lomsebenzisi, ikheli le-IP, noma ikheli le-IP uhla ukuvimba.",
+       "apihelp-block-param-reblock": "Uma umsebenzisi usevele ivinjiwe, isula block ekhona."
+}
index 51efe56..d88a5b2 100644 (file)
@@ -1678,7 +1678,7 @@ class AuthManager implements LoggerAwareInterface {
 
                // Ignore warnings about master connections/writes...hard to avoid here
                $trxProfiler = \Profiler::instance()->getTransactionProfiler();
-               $trxProfiler->setSilenced( true );
+               $old = $trxProfiler->setSilenced( true );
                try {
                        $status = $user->addToDatabase();
                        if ( !$status->isOK() ) {
@@ -1694,9 +1694,9 @@ class AuthManager implements LoggerAwareInterface {
                                        $status = Status::newGood();
                                        $status->warning( 'userexists' );
                                } else {
-                                       $this->logger->error( __METHOD__ . ': {username} failed with message {message}', [
+                                       $this->logger->error( __METHOD__ . ': {username} failed with message {msg}', [
                                                'username' => $username,
-                                               'message' => $status->getWikiText( null, null, 'en' )
+                                               'msg' => $status->getWikiText( null, null, 'en' )
                                        ] );
                                        $user->setId( 0 );
                                        $user->loadFromId();
@@ -1704,7 +1704,7 @@ class AuthManager implements LoggerAwareInterface {
                                return $status;
                        }
                } catch ( \Exception $ex ) {
-                       $trxProfiler->setSilenced( false );
+                       $trxProfiler->setSilenced( $old );
                        $this->logger->error( __METHOD__ . ': {username} failed with exception {exception}', [
                                'username' => $username,
                                'exception' => $ex,
@@ -1743,7 +1743,7 @@ class AuthManager implements LoggerAwareInterface {
                        $logEntry->insert();
                }
 
-               $trxProfiler->setSilenced( false );
+               $trxProfiler->setSilenced( $old );
 
                if ( $login ) {
                        $this->setSessionDataForUser( $user );
@@ -2382,7 +2382,7 @@ class AuthManager implements LoggerAwareInterface {
                $session->set( 'AuthManager:lastAuthTimestamp', time() );
                $session->persist();
 
-               \ScopedCallback::consume( $delay );
+               \Wikimedia\ScopedCallback::consume( $delay );
 
                \Hooks::run( 'UserLoggedIn', [ $user ] );
        }
index 0339e45..6684fb9 100644 (file)
@@ -81,6 +81,9 @@ class AuthenticationResponse {
        /** @var Message|null I18n message to display in case of UI or FAIL */
        public $message = null;
 
+       /** @var string Whether the $message is an error or warning message, for styling reasons */
+       public $messageType = 'warning';
+
        /**
         * @var string|null Local user name from authentication.
         * May be null if the authentication passed but no local user is known.
@@ -144,6 +147,7 @@ class AuthenticationResponse {
                $ret = new AuthenticationResponse;
                $ret->status = AuthenticationResponse::FAIL;
                $ret->message = $msg;
+               $ret->messageType = 'error';
                return $ret;
        }
 
@@ -172,18 +176,23 @@ class AuthenticationResponse {
        /**
         * @param AuthenticationRequest[] $reqs AuthenticationRequests needed to continue
         * @param Message $msg
+        * @param string $msgtype
         * @return AuthenticationResponse
         * @see AuthenticationResponse::UI
         */
-       public static function newUI( array $reqs, Message $msg ) {
+       public static function newUI( array $reqs, Message $msg, $msgtype = 'warning' ) {
                if ( !$reqs ) {
                        throw new \InvalidArgumentException( '$reqs may not be empty' );
                }
+               if ( $msgtype !== 'warning' && $msgtype !== 'error' ) {
+                       throw new \InvalidArgumentException( $msgtype . ' is not a valid message type.' );
+               }
 
                $ret = new AuthenticationResponse;
                $ret->status = AuthenticationResponse::UI;
                $ret->neededRequests = $reqs;
                $ret->message = $msg;
+               $ret->messageType = $msgtype;
                return $ret;
        }
 
index 055d7ea..d274e18 100644 (file)
@@ -81,6 +81,8 @@ class ButtonAuthenticationRequest extends AuthenticationRequest {
 
        /**
         * @codeCoverageIgnore
+        * @param array $data
+        * @return AuthenticationRequest|static
         */
        public static function __set_state( $data ) {
                if ( !isset( $data['label'] ) ) {
index beb11f4..7f121cd 100644 (file)
@@ -64,7 +64,8 @@ class ConfirmLinkSecondaryAuthenticationProvider extends AbstractSecondaryAuthen
                $req = new ConfirmLinkAuthenticationRequest( $maybeLink );
                return AuthenticationResponse::newUI(
                        [ $req ],
-                       wfMessage( 'authprovider-confirmlink-message' )
+                       wfMessage( 'authprovider-confirmlink-message' ),
+                       'warning'
                );
        }
 
@@ -150,7 +151,8 @@ class ConfirmLinkSecondaryAuthenticationProvider extends AbstractSecondaryAuthen
                                        'linkOk', wfMessage( 'ok' ), wfMessage( 'authprovider-confirmlink-ok-help' )
                                )
                        ],
-                       $combinedStatus->getMessage( 'authprovider-confirmlink-failed' )
+                       $combinedStatus->getMessage( 'authprovider-confirmlink-failed' ),
+                       'error'
                );
        }
 }
index a82f018..a485531 100644 (file)
@@ -51,15 +51,18 @@ class EmailNotificationSecondaryAuthenticationProvider
                        && !$this->manager->getAuthenticationSessionData( 'no-email' )
                ) {
                        // TODO show 'confirmemail_oncreate'/'confirmemail_sendfailed' message
-                       wfGetDB( DB_MASTER )->onTransactionIdle( function () use ( $user ) {
-                               $user = $user->getInstanceForUpdate();
-                               $status = $user->sendConfirmationMail();
-                               $user->saveSettings();
-                               if ( !$status->isGood() ) {
-                                       $this->logger->warning( 'Could not send confirmation email: ' .
-                                               $status->getWikiText( false, false, 'en' ) );
-                               }
-                       } );
+                       wfGetDB( DB_MASTER )->onTransactionIdle(
+                               function () use ( $user ) {
+                                       $user = $user->getInstanceForUpdate();
+                                       $status = $user->sendConfirmationMail();
+                                       $user->saveSettings();
+                                       if ( !$status->isGood() ) {
+                                               $this->logger->warning( 'Could not send confirmation email: ' .
+                                                       $status->getWikiText( false, false, 'en' ) );
+                                       }
+                               },
+                               __METHOD__
+                       );
                }
 
                return AuthenticationResponse::newPass();
index bbc6e8d..88df68d 100644 (file)
@@ -88,8 +88,8 @@ class LocalPasswordPrimaryAuthenticationProvider
                        'user_id', 'user_password', 'user_password_expires',
                ];
 
-               $dbw = wfGetDB( DB_MASTER );
-               $row = $dbw->selectRow(
+               $dbr = wfGetDB( DB_REPLICA );
+               $row = $dbr->selectRow(
                        'user',
                        $fields,
                        [ 'user_name' => $username ],
@@ -99,6 +99,7 @@ class LocalPasswordPrimaryAuthenticationProvider
                        return AuthenticationResponse::newAbstain();
                }
 
+               $oldRow = clone $row;
                // Check for *really* old password hashes that don't even have a type
                // The old hash format was just an md5 hex hash, with no type information
                if ( preg_match( '/^[0-9a-f]{32}$/', $row->user_password ) ) {
@@ -132,12 +133,18 @@ class LocalPasswordPrimaryAuthenticationProvider
                // @codeCoverageIgnoreStart
                if ( $this->getPasswordFactory()->needsUpdate( $pwhash ) ) {
                        $pwhash = $this->getPasswordFactory()->newFromPlaintext( $req->password );
-                       $dbw->update(
-                               'user',
-                               [ 'user_password' => $pwhash->toString() ],
-                               [ 'user_id' => $row->user_id ],
-                               __METHOD__
-                       );
+                       \DeferredUpdates::addCallableUpdate( function () use ( $pwhash, $oldRow ) {
+                               $dbw = wfGetDB( DB_MASTER );
+                               $dbw->update(
+                                       'user',
+                                       [ 'user_password' => $pwhash->toString() ],
+                                       [
+                                               'user_id' => $oldRow->user_id,
+                                               'user_password' => $oldRow->user_password
+                                       ],
+                                       __METHOD__
+                               );
+                       } );
                }
                // @codeCoverageIgnoreEnd
 
@@ -152,8 +159,8 @@ class LocalPasswordPrimaryAuthenticationProvider
                        return false;
                }
 
-               $dbw = wfGetDB( DB_MASTER );
-               $row = $dbw->selectRow(
+               $dbr = wfGetDB( DB_REPLICA );
+               $row = $dbr->selectRow(
                        'user',
                        [ 'user_password' ],
                        [ 'user_name' => $username ],
index ddad54b..3db7e21 100644 (file)
@@ -70,6 +70,8 @@ class PasswordDomainAuthenticationRequest extends PasswordAuthenticationRequest
 
        /**
         * @codeCoverageIgnore
+        * @param array $data
+        * @return AuthenticationRequest|static
         */
        public static function __set_state( $data ) {
                $ret = new static( $data['domainList'] );
index dd97830..45ac3aa 100644 (file)
@@ -58,6 +58,7 @@ class ResetPasswordSecondaryAuthenticationProvider extends AbstractSecondaryAuth
 
        /**
         * Try to reset the password
+        * @param \User $user
         * @param AuthenticationRequest[] $reqs
         * @return AuthenticationResponse
         */
@@ -112,17 +113,17 @@ class ResetPasswordSecondaryAuthenticationProvider extends AbstractSecondaryAuth
 
                $req = AuthenticationRequest::getRequestByClass( $reqs, get_class( $needReq ) );
                if ( !$req || !array_key_exists( 'retype', $req->getFieldInfo() ) ) {
-                       return AuthenticationResponse::newUI( $needReqs, $data->msg );
+                       return AuthenticationResponse::newUI( $needReqs, $data->msg, 'warning' );
                }
 
                if ( $req->password !== $req->retype ) {
-                       return AuthenticationResponse::newUI( $needReqs, new \Message( 'badretype' ) );
+                       return AuthenticationResponse::newUI( $needReqs, new \Message( 'badretype' ), 'error' );
                }
 
                $req->username = $user->getName();
                $status = $this->manager->allowsAuthenticationDataChange( $req );
                if ( !$status->isGood() ) {
-                       return AuthenticationResponse::newUI( $needReqs, $status->getMessage() );
+                       return AuthenticationResponse::newUI( $needReqs, $status->getMessage(), 'error' );
                }
                $this->manager->changeAuthenticationData( $req );
 
index f5571c7..9962fa3 100644 (file)
@@ -140,7 +140,7 @@ class TemporaryPasswordPrimaryAuthenticationProvider
                }
 
                $status = $this->checkPasswordValidity( $username, $req->password );
-               if ( !$status->isOk() ) {
+               if ( !$status->isOK() ) {
                        // Fatal, can't log in
                        return AuthenticationResponse::newFail( $status->getMessage() );
                }
@@ -304,10 +304,13 @@ class TemporaryPasswordPrimaryAuthenticationProvider
 
                if ( $sendMail ) {
                        // Send email after DB commit
-                       $dbw->onTransactionIdle( function () use ( $req ) {
-                               /** @var TemporaryPasswordAuthenticationRequest $req */
-                               $this->sendPasswordResetEmail( $req );
-                       } );
+                       $dbw->onTransactionIdle(
+                               function () use ( $req ) {
+                                       /** @var TemporaryPasswordAuthenticationRequest $req */
+                                       $this->sendPasswordResetEmail( $req );
+                               },
+                               __METHOD__
+                       );
                }
        }
 
@@ -375,9 +378,12 @@ class TemporaryPasswordPrimaryAuthenticationProvider
 
                if ( $mailpassword ) {
                        // Send email after DB commit
-                       wfGetDB( DB_MASTER )->onTransactionIdle( function () use ( $user, $creator, $req ) {
-                               $this->sendNewAccountEmail( $user, $creator, $req->password );
-                       } );
+                       wfGetDB( DB_MASTER )->onTransactionIdle(
+                               function () use ( $user, $creator, $req ) {
+                                       $this->sendNewAccountEmail( $user, $creator, $req->password );
+                               },
+                               __METHOD__
+                       );
                }
 
                return $mailpassword ? 'byemail' : null;
index e2123ef..3f6a47d 100644 (file)
@@ -65,13 +65,19 @@ class ThrottlePreAuthenticationProvider extends AbstractPreAuthenticationProvide
        public function setConfig( Config $config ) {
                parent::setConfig( $config );
 
+               $accountCreationThrottle = $this->config->get( 'AccountCreationThrottle' );
+               // Handle old $wgAccountCreationThrottle format (number of attempts per 24 hours)
+               if ( !is_array( $accountCreationThrottle ) ) {
+                       $accountCreationThrottle = [ [
+                               'count' => $accountCreationThrottle,
+                               'seconds' => 86400,
+                       ] ];
+               }
+
                // @codeCoverageIgnoreStart
                $this->throttleSettings += [
                // @codeCoverageIgnoreEnd
-                       'accountCreationThrottle' => [ [
-                               'count' => $this->config->get( 'AccountCreationThrottle' ),
-                               'seconds' => 86400,
-                       ] ],
+                       'accountCreationThrottle' => $accountCreationThrottle,
                        'passwordAttemptThrottle' => $this->config->get( 'PasswordAttemptThrottle' ),
                ];
 
@@ -107,7 +113,9 @@ class ThrottlePreAuthenticationProvider extends AbstractPreAuthenticationProvide
 
                $result = $this->accountCreationThrottle->increase( null, $ip, __METHOD__ );
                if ( $result ) {
-                       return \StatusValue::newFatal( 'acct_creation_throttle_hit', $result['count'] );
+                       $message = wfMessage( 'acct_creation_throttle_hit' )->params( $result['count'] )
+                               ->durationParams( $result['wait'] );
+                       return \StatusValue::newFatal( $message );
                }
 
                return \StatusValue::newGood();
index 9dfabfd..9e6cf1e 100644 (file)
@@ -139,7 +139,7 @@ class BacklinkCache {
        /**
         * Get the replica DB connection to the database
         * When non existing, will initialize the connection.
-        * @return DatabaseBase
+        * @return Database
         */
        protected function getDB() {
                if ( !isset( $this->db ) ) {
index 360420b..e25f882 100644 (file)
@@ -157,12 +157,6 @@ abstract class FileCacheBase {
         * @return string Compressed text
         */
        public function saveText( $text ) {
-               global $wgUseFileCache;
-
-               if ( !$wgUseFileCache ) {
-                       return false;
-               }
-
                if ( $this->useGzip() ) {
                        $text = gzencode( $text );
                }
index 1bab0f5..ae8efa9 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Cache
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Page view caching in the file system.
  * The only cacheable actions are "view" and "history". Also special pages
  * @ingroup Cache
  */
 class HTMLFileCache extends FileCacheBase {
+       const MODE_NORMAL = 0; // normal cache mode
+       const MODE_OUTAGE = 1; // fallback cache for DB outages
+       const MODE_REBUILD = 2; // background cache rebuild mode
+
        /**
         * Construct an HTMLFileCache object from a Title and an action
         *
@@ -49,6 +55,7 @@ class HTMLFileCache extends FileCacheBase {
         */
        public function __construct( $title, $action ) {
                parent::__construct();
+
                $allowedTypes = self::cacheablePageActions();
                if ( !in_array( $action, $allowedTypes ) ) {
                        throw new MWException( 'Invalid file cache type given.' );
@@ -93,14 +100,15 @@ class HTMLFileCache extends FileCacheBase {
        /**
         * Check if pages can be cached for this request/user
         * @param IContextSource $context
+        * @param integer $mode One of the HTMLFileCache::MODE_* constants (since 1.28)
         * @return bool
         */
-       public static function useFileCache( IContextSource $context ) {
-               global $wgUseFileCache, $wgDebugToolbar, $wgContLang;
-               if ( !$wgUseFileCache ) {
+       public static function useFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) {
+               $config = MediaWikiServices::getInstance()->getMainConfig();
+
+               if ( !$config->get( 'UseFileCache' ) && $mode !== self::MODE_REBUILD ) {
                        return false;
-               }
-               if ( $wgDebugToolbar ) {
+               } elseif ( $config->get( 'DebugToolbar' ) ) {
                        wfDebug( "HTML file cache skipped. \$wgDebugToolbar on\n" );
 
                        return false;
@@ -121,15 +129,23 @@ class HTMLFileCache extends FileCacheBase {
 
                        return false;
                }
+
                $user = $context->getUser();
                // Check for non-standard user language; this covers uselang,
                // and extensions for auto-detecting user language.
                $ulang = $context->getLanguage();
 
                // Check that there are no other sources of variation
-               if ( $user->getId() || $user->getNewtalk() || !$ulang->equals( $wgContLang ) ) {
+               if ( $user->getId() || $ulang->getCode() !== $config->get( 'LanguageCode' ) ) {
                        return false;
                }
+
+               if ( $mode === self::MODE_NORMAL ) {
+                       if ( $user->getNewtalk() ) {
+                               return false;
+                       }
+               }
+
                // Allow extensions to disable caching
                return Hooks::run( 'HTMLFileCache::useFileCache', [ $context ] );
        }
@@ -137,17 +153,24 @@ class HTMLFileCache extends FileCacheBase {
        /**
         * Read from cache to context output
         * @param IContextSource $context
+        * @param integer $mode One of the HTMLFileCache::MODE_* constants
         * @return void
         */
-       public function loadFromFileCache( IContextSource $context ) {
-               global $wgMimeType, $wgLanguageCode;
+       public function loadFromFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) {
+               global $wgContLang;
+               $config = MediaWikiServices::getInstance()->getMainConfig();
 
                wfDebug( __METHOD__ . "()\n" );
                $filename = $this->cachePath();
 
+               if ( $mode === self::MODE_OUTAGE ) {
+                       // Avoid DB errors for queries in sendCacheControl()
+                       $context->getTitle()->resetArticleID( 0 );
+               }
+
                $context->getOutput()->sendCacheControl();
-               header( "Content-Type: $wgMimeType; charset=UTF-8" );
-               header( "Content-Language: $wgLanguageCode" );
+               header( "Content-Type: {$config->get( 'MimeType' )}; charset=UTF-8" );
+               header( "Content-Language: {$wgContLang->getHtmlCode()}" );
                if ( $this->useGzip() ) {
                        if ( wfClientAcceptsGzip() ) {
                                header( 'Content-Encoding: gzip' );
@@ -160,19 +183,24 @@ class HTMLFileCache extends FileCacheBase {
                } else {
                        readfile( $filename );
                }
+
                $context->getOutput()->disable(); // tell $wgOut that output is taken care of
        }
 
        /**
         * Save this cache object with the given text.
         * Use this as an ob_start() handler.
+        *
+        * Normally this is only registed as a handler if $wgUseFileCache is on.
+        * If can be explicitly called by rebuildFileCache.php when it takes over
+        * handling file caching itself, disabling any automatic handling the the
+        * process.
+        *
         * @param string $text
-        * @return bool Whether $wgUseFileCache is enabled
+        * @return string|bool The annotated $text or false on error
         */
        public function saveToFileCache( $text ) {
-               global $wgUseFileCache;
-
-               if ( !$wgUseFileCache || strlen( $text ) < 512 ) {
+               if ( strlen( $text ) < 512 ) {
                        // Disabled or empty/broken output (OOM and PHP errors)
                        return $text;
                }
@@ -215,9 +243,9 @@ class HTMLFileCache extends FileCacheBase {
         * @return bool Whether $wgUseFileCache is enabled
         */
        public static function clearFileCache( Title $title ) {
-               global $wgUseFileCache;
+               $config = MediaWikiServices::getInstance()->getMainConfig();
 
-               if ( !$wgUseFileCache ) {
+               if ( !$config->get( 'UseFileCache' ) ) {
                        return false;
                }
 
index 8a4d061..d773fff 100644 (file)
@@ -236,7 +236,7 @@ class LinkBatch {
         * Construct a WHERE clause which will match all the given titles.
         *
         * @param string $prefix The appropriate table's field name prefix ('page', 'pl', etc)
-        * @param IDatabase $db DatabaseBase object to use
+        * @param IDatabase $db DB object to use
         * @return string|bool String with SQL where clause fragment, or false if no items.
         */
        public function constructSet( $prefix, $db ) {
index d254d3d..dc8c589 100644 (file)
@@ -20,6 +20,8 @@
  * @file
  * @ingroup Cache
  */
+use MediaWiki\MediaWikiServices;
+use Wikimedia\ScopedCallback;
 
 /**
  * MediaWiki message cache structure version.
@@ -154,9 +156,9 @@ class MessageCache {
                $this->mExpiry = $expiry;
 
                if ( $wgUseLocalMessageCache ) {
-                       $this->localCache = ObjectCache::getLocalServerInstance( CACHE_NONE );
+                       $this->localCache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
                } else {
-                       $this->localCache = wfGetCache( CACHE_NONE );
+                       $this->localCache = new EmptyBagOStuff();
                }
 
                $this->wanCache = ObjectCache::getMainWANInstance();
@@ -226,17 +228,14 @@ class MessageCache {
         * or false if populating empty cache fails. Also returns true if MessageCache
         * is disabled.
         *
-        * @param bool|string $code Language to which load messages
-        * @param integer $mode Use MessageCache::FOR_UPDATE to skip process cache
+        * @param string $code Language to which load messages
+        * @param integer $mode Use MessageCache::FOR_UPDATE to skip process cache [optional]
         * @throws MWException
         * @return bool
         */
-       function load( $code = false, $mode = null ) {
+       protected function load( $code, $mode = null ) {
                if ( !is_string( $code ) ) {
-                       # This isn't really nice, so at least make a note about it and try to
-                       # fall back
-                       wfDebug( __METHOD__ . " called without providing a language code\n" );
-                       $code = 'en';
+                       throw new InvalidArgumentException( "Missing language code" );
                }
 
                # Don't do double loading...
@@ -630,11 +629,11 @@ class MessageCache {
                if ( $dest === 'all' ) {
                        $cacheKey = wfMemcKey( 'messages', $code );
                        $success = $this->mMemc->set( $cacheKey, $cache );
+                       $this->setValidationHash( $code, $cache );
                } else {
                        $success = true;
                }
 
-               $this->setValidationHash( $code, $cache );
                $this->saveToLocalCache( $code, $cache );
 
                return $success;
@@ -863,6 +862,8 @@ class MessageCache {
                                }
                                $alreadyTried[ $langcode ] = true;
                        }
+               } else {
+                       $uckey = null;
                }
 
                // Check the CDB cache
@@ -880,7 +881,8 @@ class MessageCache {
                                        continue;
                                }
 
-                               $message = $this->getMsgFromNamespace( $this->getMessagePageName( $code, $uckey ), $code );
+                               $message = $this->getMsgFromNamespace(
+                                       $this->getMessagePageName( $code, $uckey ), $code );
 
                                if ( $message !== false ) {
                                        return $message;
@@ -945,28 +947,47 @@ class MessageCache {
                        return false;
                }
 
-               # Try the individual message cache
+               // Try the individual message cache
                $titleKey = wfMemcKey( 'messages', 'individual', $title );
-               $entry = $this->wanCache->get( $titleKey );
+
+               $curTTL = null;
+               $entry = $this->wanCache->get(
+                       $titleKey,
+                       $curTTL,
+                       [ wfMemcKey( 'messages', $code ) ]
+               );
+               $entry = ( $curTTL >= 0 ) ? $entry : false;
+
                if ( $entry ) {
                        if ( substr( $entry, 0, 1 ) === ' ' ) {
                                $this->mCache[$code][$title] = $entry;
-
-                               // The message exists, so make sure a string
-                               // is returned.
+                               // The message exists, so make sure a string is returned
                                return (string)substr( $entry, 1 );
                        } elseif ( $entry === '!NONEXISTENT' ) {
                                $this->mCache[$code][$title] = '!NONEXISTENT';
 
                                return false;
                        } else {
-                               # Corrupt/obsolete entry, delete it
+                               // Corrupt/obsolete entry, delete it
                                $this->wanCache->delete( $titleKey );
                        }
                }
 
-               # Try loading it from the database
-               $revision = Revision::newFromTitle( Title::makeTitle( NS_MEDIAWIKI, $title ) );
+               // Try loading it from the database
+               $dbr = wfGetDB( DB_REPLICA );
+               $cacheOpts = Database::getCacheSetOptions( $dbr );
+               // Use newKnownCurrent() to avoid querying revision/user tables
+               $titleObj = Title::makeTitle( NS_MEDIAWIKI, $title );
+               if ( $titleObj->getLatestRevID() ) {
+                       $revision = Revision::newKnownCurrent(
+                               $dbr,
+                               $titleObj->getArticleID(),
+                               $titleObj->getLatestRevID()
+                       );
+               } else {
+                       $revision = false;
+               }
+
                if ( $revision ) {
                        $content = $revision->getContent();
                        if ( !$content ) {
@@ -993,7 +1014,7 @@ class MessageCache {
                                        $message = false; // negative caching
                                } else {
                                        $this->mCache[$code][$title] = ' ' . $message;
-                                       $this->wanCache->set( $titleKey, ' ' . $message, $this->mExpiry );
+                                       $this->wanCache->set( $titleKey, ' ' . $message, $this->mExpiry, $cacheOpts );
                                }
                        }
                } else {
@@ -1002,7 +1023,7 @@ class MessageCache {
 
                if ( $message === false ) { // negative caching
                        $this->mCache[$code][$title] = '!NONEXISTENT';
-                       $this->wanCache->set( $titleKey, '!NONEXISTENT', $this->mExpiry );
+                       $this->wanCache->set( $titleKey, '!NONEXISTENT', $this->mExpiry, $cacheOpts );
                }
 
                return $message;
@@ -1089,7 +1110,7 @@ class MessageCache {
                if ( !$title || !$title instanceof Title ) {
                        global $wgTitle;
                        wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' .
-                               wfGetAllCallers( 5 ) . ' with no title set.' );
+                               wfGetAllCallers( 6 ) . ' with no title set.' );
                        $title = $wgTitle;
                }
                // Sometimes $wgTitle isn't set either...
index ca6ba48..15a00c7 100644 (file)
@@ -164,7 +164,7 @@ class ChangesFeed {
 
        /**
         * Generate the feed items given a row from the database, printing the feed.
-        * @param object $rows DatabaseBase resource with recentchanges rows
+        * @param object $rows IDatabase resource with recentchanges rows
         * @param ChannelFeed $feed
         */
        public static function generateFeed( $rows, &$feed ) {
@@ -178,7 +178,7 @@ class ChangesFeed {
 
        /**
         * Generate the feed items given a row from the database.
-        * @param object $rows DatabaseBase resource with recentchanges rows
+        * @param object $rows IDatabase resource with recentchanges rows
         * @return array
         */
        public static function buildItems( $rows ) {
index 8e74674..1262f2c 100644 (file)
@@ -90,6 +90,11 @@ class RecentChange {
         */
        public $counter = -1;
 
+       /**
+        * @var array List of tags to apply
+        */
+       private $tags = [];
+
        /**
         * @var array Array of change types
         */
@@ -297,7 +302,8 @@ class RecentChange {
                }
 
                # If our database is strict about IP addresses, use NULL instead of an empty string
-               if ( $dbw->strictIPs() && $this->mAttribs['rc_ip'] == '' ) {
+               $strictIPs = in_array( $dbw->getType(), [ 'oracle', 'postgres' ] ); // legacy
+               if ( $strictIPs && $this->mAttribs['rc_ip'] == '' ) {
                        unset( $this->mAttribs['rc_ip'] );
                }
 
@@ -312,7 +318,7 @@ class RecentChange {
                $this->mAttribs['rc_id'] = $dbw->nextSequenceValue( 'recentchanges_rc_id_seq' );
 
                # # If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL
-               if ( $dbw->cascadingDeletes() && $this->mAttribs['rc_cur_id'] == 0 ) {
+               if ( $this->mAttribs['rc_cur_id'] == 0 ) {
                        unset( $this->mAttribs['rc_cur_id'] );
                }
 
@@ -325,6 +331,11 @@ class RecentChange {
                # Notify extensions
                Hooks::run( 'RecentChange_save', [ &$this ] );
 
+               if ( count( $this->tags ) ) {
+                       ChangeTags::addTags( $this->tags, $this->mAttribs['rc_id'],
+                               $this->mAttribs['rc_this_oldid'], $this->mAttribs['rc_logid'], null, $this );
+               }
+
                # Notify external application via UDP
                if ( !$noudp ) {
                        $this->notifyRCFeeds();
@@ -342,18 +353,21 @@ class RecentChange {
                        ) {
                                // @FIXME: This would be better as an extension hook
                                // Send emails or email jobs once this row is safely committed
-                               $dbw->onTransactionIdle( function () use ( $editor, $title ) {
-                                       $enotif = new EmailNotification();
-                                       $enotif->notifyOnPageChange(
-                                               $editor,
-                                               $title,
-                                               $this->mAttribs['rc_timestamp'],
-                                               $this->mAttribs['rc_comment'],
-                                               $this->mAttribs['rc_minor'],
-                                               $this->mAttribs['rc_last_oldid'],
-                                               $this->mExtra['pageStatus']
-                                       );
-                               } );
+                               $dbw->onTransactionIdle(
+                                       function () use ( $editor, $title ) {
+                                               $enotif = new EmailNotification();
+                                               $enotif->notifyOnPageChange(
+                                                       $editor,
+                                                       $title,
+                                                       $this->mAttribs['rc_timestamp'],
+                                                       $this->mAttribs['rc_comment'],
+                                                       $this->mAttribs['rc_minor'],
+                                                       $this->mAttribs['rc_last_oldid'],
+                                                       $this->mExtra['pageStatus']
+                                               );
+                                       },
+                                       __METHOD__
+                               );
                        }
                }
 
@@ -606,14 +620,11 @@ class RecentChange {
 
                DeferredUpdates::addCallableUpdate(
                        function () use ( $rc, $tags ) {
+                               $rc->addTags( $tags );
                                $rc->save();
                                if ( $rc->mAttribs['rc_patrolled'] ) {
                                        PatrolLog::record( $rc, true, $rc->getPerformer() );
                                }
-                               if ( count( $tags ) ) {
-                                       ChangeTags::addTags( $tags, $rc->mAttribs['rc_id'],
-                                               $rc->mAttribs['rc_this_oldid'], null, null );
-                               }
                        },
                        DeferredUpdates::POSTSEND,
                        wfGetDB( DB_MASTER )
@@ -682,14 +693,11 @@ class RecentChange {
 
                DeferredUpdates::addCallableUpdate(
                        function () use ( $rc, $tags ) {
+                               $rc->addTags( $tags );
                                $rc->save();
                                if ( $rc->mAttribs['rc_patrolled'] ) {
                                        PatrolLog::record( $rc, true, $rc->getPerformer() );
                                }
-                               if ( count( $tags ) ) {
-                                       ChangeTags::addTags( $tags, $rc->mAttribs['rc_id'],
-                                               $rc->mAttribs['rc_this_oldid'], null, null );
-                               }
                        },
                        DeferredUpdates::POSTSEND,
                        wfGetDB( DB_MASTER )
@@ -1022,4 +1030,20 @@ class RecentChange {
 
                return $unserializedParams;
        }
+
+       /**
+        * Tags to append to the recent change,
+        * and associated revision/log
+        *
+        * @since 1.28
+        *
+        * @param string|array $tags
+        */
+       public function addTags( $tags ) {
+               if ( is_string( $tags ) ) {
+                       $this->tags[] = $tags;
+               } else {
+                       $this->tags = array_merge( $tags, $this->tags );
+               }
+       }
 }
index 3ef9641..993f0b7 100644 (file)
@@ -63,7 +63,7 @@ class ChangeTags {
                        if ( !$tag ) {
                                continue;
                        }
-                       $description = self::tagDescription( $tag );
+                       $description = self::tagDescription( $tag, $context );
                        if ( $description === false ) {
                                continue;
                        }
@@ -98,11 +98,12 @@ class ChangeTags {
         * we consider the tag hidden, and return false.
         *
         * @param string $tag Tag
+        * @param IContextSource $context
         * @return string|bool Tag description or false if tag is to be hidden.
         * @since 1.25 Returns false if tag is to be hidden.
         */
-       public static function tagDescription( $tag ) {
-               $msg = wfMessage( "tag-$tag" );
+       public static function tagDescription( $tag, IContextSource $context ) {
+               $msg = $context->msg( "tag-$tag" );
                if ( !$msg->exists() ) {
                        // No such message, so return the HTML-escaped tag name.
                        return htmlspecialchars( $tag );
@@ -124,14 +125,16 @@ class ChangeTags {
         * @param int|null $rev_id The rev_id of the change to add the tags to
         * @param int|null $log_id The log_id of the change to add the tags to
         * @param string $params Params to put in the ct_params field of table 'change_tag'
+        * @param RecentChange|null $rc Recent change, in case the tagging accompanies the action
+        * (this should normally be the case)
         *
         * @throws MWException
         * @return bool False if no changes are made, otherwise true
         */
        public static function addTags( $tags, $rc_id = null, $rev_id = null,
-               $log_id = null, $params = null
+               $log_id = null, $params = null, RecentChange $rc = null
        ) {
-               $result = self::updateTags( $tags, null, $rc_id, $rev_id, $log_id, $params );
+               $result = self::updateTags( $tags, null, $rc_id, $rev_id, $log_id, $params, $rc );
                return (bool)$result[0];
        }
 
@@ -154,6 +157,9 @@ class ChangeTags {
         * Pass a variable whose value is null if the log_id is not relevant or unknown.
         * @param string $params Params to put in the ct_params field of table
         * 'change_tag' when adding tags
+        * @param RecentChange|null $rc Recent change being tagged, in case the tagging accompanies
+        * the action
+        * @param User|null $user Tagging user, in case the tagging is subsequent to the tagged action
         *
         * @throws MWException When $rc_id, $rev_id and $log_id are all null
         * @return array Index 0 is an array of tags actually added, index 1 is an
@@ -162,9 +168,9 @@ class ChangeTags {
         *
         * @since 1.25
         */
-       public static function updateTags(
-               $tagsToAdd, $tagsToRemove,
-               &$rc_id = null, &$rev_id = null, &$log_id = null, $params = null
+       public static function updateTags( $tagsToAdd, $tagsToRemove, &$rc_id = null,
+               &$rev_id = null, &$log_id = null, $params = null, RecentChange $rc = null,
+               User $user = null
        ) {
 
                $tagsToAdd = array_filter( (array)$tagsToAdd ); // Make sure we're submitting all tags...
@@ -284,6 +290,10 @@ class ChangeTags {
                }
 
                self::purgeTagUsageCache();
+
+               Hooks::run( 'ChangeTagsAfterUpdateTags', [ $tagsToAdd, $tagsToRemove, $prevTags,
+                       $rc_id, $rev_id, $log_id, $params, $rc, $user ] );
+
                return [ $tagsToAdd, $tagsToRemove, $prevTags ];
        }
 
@@ -546,7 +556,7 @@ class ChangeTags {
 
                // do it!
                list( $tagsAdded, $tagsRemoved, $initialTags ) = self::updateTags( $tagsToAdd,
-                       $tagsToRemove, $rc_id, $rev_id, $log_id, $params );
+                       $tagsToRemove, $rc_id, $rev_id, $log_id, $params, null, $user );
                if ( !$tagsAdded && !$tagsRemoved ) {
                        // no-op, don't log it
                        return Status::newGood( (object)[
@@ -571,7 +581,7 @@ class ChangeTags {
                        // This function is from revision deletion logic and has nothing to do with
                        // change tags, but it appears to be the only other place in core where we
                        // perform logged actions on log items.
-                       $logEntry->setTarget( RevDelLogList::suggestTarget( 0, [ $log_id ] ) );
+                       $logEntry->setTarget( RevDelLogList::suggestTarget( null, [ $log_id ] ) );
                }
 
                if ( !$logEntry->getTarget() ) {
@@ -608,10 +618,10 @@ class ChangeTags {
         * Handles selecting tags, and filtering.
         * Needs $tables to be set up properly, so we can figure out which join conditions to use.
         *
-        * @param string|array $tables Table names, see DatabaseBase::select
-        * @param string|array $fields Fields used in query, see DatabaseBase::select
-        * @param string|array $conds Conditions used in query, see DatabaseBase::select
-        * @param array $join_conds Join conditions, see DatabaseBase::select
+        * @param string|array $tables Table names, see Database::select
+        * @param string|array $fields Fields used in query, see Database::select
+        * @param string|array $conds Conditions used in query, see Database::select
+        * @param array $join_conds Join conditions, see Database::select
         * @param array $options Options, see Database::select
         * @param bool|string $filter_tag Tag to select on
         *
@@ -656,21 +666,15 @@ class ChangeTags {
         * Build a text box to select a change tag
         *
         * @param string $selected Tag to select by default
-        * @param bool $fullForm Affects return value, see below
-        * @param Title $title Title object to send the form to. Used only if $fullForm is true.
         * @param bool $ooui Use an OOUI TextInputWidget as selector instead of a non-OOUI input field
         *        You need to call OutputPage::enableOOUI() yourself.
-        * @return string|array
-        *        - if $fullForm is false: an array of (label, selector).
-        *        - if $fullForm is true: HTML of entire form built around the selector.
+        * @return array an array of (label, selector)
         */
-       public static function buildTagFilterSelector( $selected = '',
-               $fullForm = false, Title $title = null, $ooui = false
-       ) {
+       public static function buildTagFilterSelector( $selected = '', $ooui = false ) {
                global $wgUseTagFilter;
 
                if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) {
-                       return $fullForm ? '' : [];
+                       return [];
                }
 
                $data = [
@@ -697,24 +701,7 @@ class ChangeTags {
                        );
                }
 
-               if ( !$fullForm ) {
-                       return $data;
-               }
-
-               $html = implode( '&#160;', $data );
-               $html .= "\n" .
-                       Xml::element(
-                               'input',
-                               [ 'type' => 'submit', 'value' => wfMessage( 'tag-filter-submit' )->text() ]
-                       );
-               $html .= "\n" . Html::hidden( 'title', $title->getPrefixedText() );
-               $html = Xml::tags(
-                       'form',
-                       [ 'action' => $title->getLocalURL(), 'class' => 'mw-tagfilter-form', 'method' => 'get' ],
-                       $html
-               );
-
-               return $html;
+               return $data;
        }
 
        /**
@@ -1038,7 +1025,7 @@ class ChangeTags {
                // let's not allow error results, as the actual tag deletion succeeded
                if ( !$status->isOK() ) {
                        wfDebug( 'ChangeTagAfterDelete error condition downgraded to warning' );
-                       $status->ok = true;
+                       $status->setOK( true );
                }
 
                // clear the memcache of defined tags
diff --git a/includes/clientpool/RedisConnectionPool.php b/includes/clientpool/RedisConnectionPool.php
deleted file mode 100644 (file)
index a9bc593..0000000
+++ /dev/null
@@ -1,581 +0,0 @@
-<?php
-/**
- * Redis client connection pooling manager.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @defgroup Redis Redis
- * @author Aaron Schulz
- */
-
-use MediaWiki\Logger\LoggerFactory;
-use Psr\Log\LoggerAwareInterface;
-use Psr\Log\LoggerInterface;
-
-/**
- * Helper class to manage Redis connections.
- *
- * This can be used to get handle wrappers that free the handle when the wrapper
- * leaves scope. The maximum number of free handles (connections) is configurable.
- * This provides an easy way to cache connection handles that may also have state,
- * such as a handle does between multi() and exec(), and without hoarding connections.
- * The wrappers use PHP magic methods so that calling functions on them calls the
- * function of the actual Redis object handle.
- *
- * @ingroup Redis
- * @since 1.21
- */
-class RedisConnectionPool implements LoggerAwareInterface {
-       /**
-        * @name Pool settings.
-        * Settings there are shared for any connection made in this pool.
-        * See the singleton() method documentation for more details.
-        * @{
-        */
-       /** @var string Connection timeout in seconds */
-       protected $connectTimeout;
-       /** @var string Read timeout in seconds */
-       protected $readTimeout;
-       /** @var string Plaintext auth password */
-       protected $password;
-       /** @var bool Whether connections persist */
-       protected $persistent;
-       /** @var int Serializer to use (Redis::SERIALIZER_*) */
-       protected $serializer;
-       /** @} */
-
-       /** @var int Current idle pool size */
-       protected $idlePoolSize = 0;
-
-       /** @var array (server name => ((connection info array),...) */
-       protected $connections = [];
-       /** @var array (server name => UNIX timestamp) */
-       protected $downServers = [];
-
-       /** @var array (pool ID => RedisConnectionPool) */
-       protected static $instances = [];
-
-       /** integer; seconds to cache servers as "down". */
-       const SERVER_DOWN_TTL = 30;
-
-       /**
-        * @var LoggerInterface
-        */
-       protected $logger;
-
-       /**
-        * @param array $options
-        * @throws Exception
-        */
-       protected function __construct( array $options ) {
-               if ( !class_exists( 'Redis' ) ) {
-                       throw new Exception( __CLASS__ . ' requires a Redis client library. ' .
-                               'See https://www.mediawiki.org/wiki/Redis#Setup' );
-               }
-               if ( isset( $options['logger'] ) ) {
-                       $this->setLogger( $options['logger'] );
-               } else {
-                       $this->setLogger( LoggerFactory::getInstance( 'redis' ) );
-               }
-               $this->connectTimeout = $options['connectTimeout'];
-               $this->readTimeout = $options['readTimeout'];
-               $this->persistent = $options['persistent'];
-               $this->password = $options['password'];
-               if ( !isset( $options['serializer'] ) || $options['serializer'] === 'php' ) {
-                       $this->serializer = Redis::SERIALIZER_PHP;
-               } elseif ( $options['serializer'] === 'igbinary' ) {
-                       $this->serializer = Redis::SERIALIZER_IGBINARY;
-               } elseif ( $options['serializer'] === 'none' ) {
-                       $this->serializer = Redis::SERIALIZER_NONE;
-               } else {
-                       throw new InvalidArgumentException( "Invalid serializer specified." );
-               }
-       }
-
-       /**
-        * @param LoggerInterface $logger
-        * @return null
-        */
-       public function setLogger( LoggerInterface $logger ) {
-               $this->logger = $logger;
-       }
-
-       /**
-        * @param array $options
-        * @return array
-        */
-       protected static function applyDefaultConfig( array $options ) {
-               if ( !isset( $options['connectTimeout'] ) ) {
-                       $options['connectTimeout'] = 1;
-               }
-               if ( !isset( $options['readTimeout'] ) ) {
-                       $options['readTimeout'] = 1;
-               }
-               if ( !isset( $options['persistent'] ) ) {
-                       $options['persistent'] = false;
-               }
-               if ( !isset( $options['password'] ) ) {
-                       $options['password'] = null;
-               }
-
-               return $options;
-       }
-
-       /**
-        * @param array $options
-        * $options include:
-        *   - connectTimeout : The timeout for new connections, in seconds.
-        *                      Optional, default is 1 second.
-        *   - readTimeout    : The timeout for operation reads, in seconds.
-        *                      Commands like BLPOP can fail if told to wait longer than this.
-        *                      Optional, default is 1 second.
-        *   - persistent     : Set this to true to allow connections to persist across
-        *                      multiple web requests. False by default.
-        *   - password       : The authentication password, will be sent to Redis in clear text.
-        *                      Optional, if it is unspecified, no AUTH command will be sent.
-        *   - serializer     : Set to "php", "igbinary", or "none". Default is "php".
-        * @return RedisConnectionPool
-        */
-       public static function singleton( array $options ) {
-               $options = self::applyDefaultConfig( $options );
-               // Map the options to a unique hash...
-               ksort( $options ); // normalize to avoid pool fragmentation
-               $id = sha1( serialize( $options ) );
-               // Initialize the object at the hash as needed...
-               if ( !isset( self::$instances[$id] ) ) {
-                       self::$instances[$id] = new self( $options );
-                       LoggerFactory::getInstance( 'redis' )->debug(
-                               "Creating a new " . __CLASS__ . " instance with id $id."
-                       );
-               }
-
-               return self::$instances[$id];
-       }
-
-       /**
-        * Destroy all singleton() instances
-        * @since 1.27
-        */
-       public static function destroySingletons() {
-               self::$instances = [];
-       }
-
-       /**
-        * Get a connection to a redis server. Based on code in RedisBagOStuff.php.
-        *
-        * @param string $server A hostname/port combination or the absolute path of a UNIX socket.
-        *                       If a hostname is specified but no port, port 6379 will be used.
-        * @return RedisConnRef|bool Returns false on failure
-        * @throws MWException
-        */
-       public function getConnection( $server ) {
-               // Check the listing "dead" servers which have had a connection errors.
-               // Servers are marked dead for a limited period of time, to
-               // avoid excessive overhead from repeated connection timeouts.
-               if ( isset( $this->downServers[$server] ) ) {
-                       $now = time();
-                       if ( $now > $this->downServers[$server] ) {
-                               // Dead time expired
-                               unset( $this->downServers[$server] );
-                       } else {
-                               // Server is dead
-                               $this->logger->debug(
-                                       'Server "{redis_server}" is marked down for another ' .
-                                       ( $this->downServers[$server] - $now ) . 'seconds',
-                                       [ 'redis_server' => $server ]
-                               );
-
-                               return false;
-                       }
-               }
-
-               // Check if a connection is already free for use
-               if ( isset( $this->connections[$server] ) ) {
-                       foreach ( $this->connections[$server] as &$connection ) {
-                               if ( $connection['free'] ) {
-                                       $connection['free'] = false;
-                                       --$this->idlePoolSize;
-
-                                       return new RedisConnRef(
-                                               $this, $server, $connection['conn'], $this->logger
-                                       );
-                               }
-                       }
-               }
-
-               if ( substr( $server, 0, 1 ) === '/' ) {
-                       // UNIX domain socket
-                       // These are required by the redis extension to start with a slash, but
-                       // we still need to set the port to a special value to make it work.
-                       $host = $server;
-                       $port = 0;
-               } else {
-                       // TCP connection
-                       $hostPort = IP::splitHostAndPort( $server );
-                       if ( !$server || !$hostPort ) {
-                               throw new InvalidArgumentException(
-                                       __CLASS__ . ": invalid configured server \"$server\""
-                               );
-                       }
-                       list( $host, $port ) = $hostPort;
-                       if ( $port === false ) {
-                               $port = 6379;
-                       }
-               }
-
-               $conn = new Redis();
-               try {
-                       if ( $this->persistent ) {
-                               $result = $conn->pconnect( $host, $port, $this->connectTimeout );
-                       } else {
-                               $result = $conn->connect( $host, $port, $this->connectTimeout );
-                       }
-                       if ( !$result ) {
-                               $this->logger->error(
-                                       'Could not connect to server "{redis_server}"',
-                                       [ 'redis_server' => $server ]
-                               );
-                               // Mark server down for some time to avoid further timeouts
-                               $this->downServers[$server] = time() + self::SERVER_DOWN_TTL;
-
-                               return false;
-                       }
-                       if ( $this->password !== null ) {
-                               if ( !$conn->auth( $this->password ) ) {
-                                       $this->logger->error(
-                                               'Authentication error connecting to "{redis_server}"',
-                                               [ 'redis_server' => $server ]
-                                       );
-                               }
-                       }
-               } catch ( RedisException $e ) {
-                       $this->downServers[$server] = time() + self::SERVER_DOWN_TTL;
-                       $this->logger->error(
-                               'Redis exception connecting to "{redis_server}"',
-                               [
-                                       'redis_server' => $server,
-                                       'exception' => $e,
-                               ]
-                       );
-
-                       return false;
-               }
-
-               if ( $conn ) {
-                       $conn->setOption( Redis::OPT_READ_TIMEOUT, $this->readTimeout );
-                       $conn->setOption( Redis::OPT_SERIALIZER, $this->serializer );
-                       $this->connections[$server][] = [ 'conn' => $conn, 'free' => false ];
-
-                       return new RedisConnRef( $this, $server, $conn, $this->logger );
-               } else {
-                       return false;
-               }
-       }
-
-       /**
-        * Mark a connection to a server as free to return to the pool
-        *
-        * @param string $server
-        * @param Redis $conn
-        * @return bool
-        */
-       public function freeConnection( $server, Redis $conn ) {
-               $found = false;
-
-               foreach ( $this->connections[$server] as &$connection ) {
-                       if ( $connection['conn'] === $conn && !$connection['free'] ) {
-                               $connection['free'] = true;
-                               ++$this->idlePoolSize;
-                               break;
-                       }
-               }
-
-               $this->closeExcessIdleConections();
-
-               return $found;
-       }
-
-       /**
-        * Close any extra idle connections if there are more than the limit
-        */
-       protected function closeExcessIdleConections() {
-               if ( $this->idlePoolSize <= count( $this->connections ) ) {
-                       return; // nothing to do (no more connections than servers)
-               }
-
-               foreach ( $this->connections as &$serverConnections ) {
-                       foreach ( $serverConnections as $key => &$connection ) {
-                               if ( $connection['free'] ) {
-                                       unset( $serverConnections[$key] );
-                                       if ( --$this->idlePoolSize <= count( $this->connections ) ) {
-                                               return; // done (no more connections than servers)
-                                       }
-                               }
-                       }
-               }
-       }
-
-       /**
-        * The redis extension throws an exception in response to various read, write
-        * and protocol errors. Sometimes it also closes the connection, sometimes
-        * not. The safest response for us is to explicitly destroy the connection
-        * object and let it be reopened during the next request.
-        *
-        * @param string $server
-        * @param RedisConnRef $cref
-        * @param RedisException $e
-        * @deprecated since 1.23
-        */
-       public function handleException( $server, RedisConnRef $cref, RedisException $e ) {
-               $this->handleError( $cref, $e );
-       }
-
-       /**
-        * The redis extension throws an exception in response to various read, write
-        * and protocol errors. Sometimes it also closes the connection, sometimes
-        * not. The safest response for us is to explicitly destroy the connection
-        * object and let it be reopened during the next request.
-        *
-        * @param RedisConnRef $cref
-        * @param RedisException $e
-        */
-       public function handleError( RedisConnRef $cref, RedisException $e ) {
-               $server = $cref->getServer();
-               $this->logger->error(
-                       'Redis exception on server "{redis_server}"',
-                       [
-                               'redis_server' => $server,
-                               'exception' => $e,
-                       ]
-               );
-               foreach ( $this->connections[$server] as $key => $connection ) {
-                       if ( $cref->isConnIdentical( $connection['conn'] ) ) {
-                               $this->idlePoolSize -= $connection['free'] ? 1 : 0;
-                               unset( $this->connections[$server][$key] );
-                               break;
-                       }
-               }
-       }
-
-       /**
-        * Re-send an AUTH request to the redis server (useful after disconnects).
-        *
-        * This works around an upstream bug in phpredis. phpredis hides disconnects by transparently
-        * reconnecting, but it neglects to re-authenticate the new connection. To the user of the
-        * phpredis client API this manifests as a seemingly random tendency of connections to lose
-        * their authentication status.
-        *
-        * This method is for internal use only.
-        *
-        * @see https://github.com/nicolasff/phpredis/issues/403
-        *
-        * @param string $server
-        * @param Redis $conn
-        * @return bool Success
-        */
-       public function reauthenticateConnection( $server, Redis $conn ) {
-               if ( $this->password !== null ) {
-                       if ( !$conn->auth( $this->password ) ) {
-                               $this->logger->error(
-                                       'Authentication error connecting to "{redis_server}"',
-                                       [ 'redis_server' => $server ]
-                               );
-
-                               return false;
-                       }
-               }
-
-               return true;
-       }
-
-       /**
-        * Adjust or reset the connection handle read timeout value
-        *
-        * @param Redis $conn
-        * @param int $timeout Optional
-        */
-       public function resetTimeout( Redis $conn, $timeout = null ) {
-               $conn->setOption( Redis::OPT_READ_TIMEOUT, $timeout ?: $this->readTimeout );
-       }
-
-       /**
-        * Make sure connections are closed for sanity
-        */
-       function __destruct() {
-               foreach ( $this->connections as $server => &$serverConnections ) {
-                       foreach ( $serverConnections as $key => &$connection ) {
-                               $connection['conn']->close();
-                       }
-               }
-       }
-}
-
-/**
- * Helper class to handle automatically marking connectons as reusable (via RAII pattern)
- *
- * This class simply wraps the Redis class and can be used the same way
- *
- * @ingroup Redis
- * @since 1.21
- */
-class RedisConnRef {
-       /** @var RedisConnectionPool */
-       protected $pool;
-       /** @var Redis */
-       protected $conn;
-
-       protected $server; // string
-       protected $lastError; // string
-
-       /**
-        * @var LoggerInterface
-        */
-       protected $logger;
-
-       /**
-        * @param RedisConnectionPool $pool
-        * @param string $server
-        * @param Redis $conn
-        * @param LoggerInterface $logger
-        */
-       public function __construct(
-               RedisConnectionPool $pool, $server, Redis $conn, LoggerInterface $logger
-       ) {
-               $this->pool = $pool;
-               $this->server = $server;
-               $this->conn = $conn;
-               $this->logger = $logger;
-       }
-
-       /**
-        * @return string
-        * @since 1.23
-        */
-       public function getServer() {
-               return $this->server;
-       }
-
-       public function getLastError() {
-               return $this->lastError;
-       }
-
-       public function clearLastError() {
-               $this->lastError = null;
-       }
-
-       public function __call( $name, $arguments ) {
-               $conn = $this->conn; // convenience
-
-               // Work around https://github.com/nicolasff/phpredis/issues/70
-               $lname = strtolower( $name );
-               if ( ( $lname === 'blpop' || $lname == 'brpop' )
-                       && is_array( $arguments[0] ) && isset( $arguments[1] )
-               ) {
-                       $this->pool->resetTimeout( $conn, $arguments[1] + 1 );
-               } elseif ( $lname === 'brpoplpush' && isset( $arguments[2] ) ) {
-                       $this->pool->resetTimeout( $conn, $arguments[2] + 1 );
-               }
-
-               $conn->clearLastError();
-               try {
-                       $res = call_user_func_array( [ $conn, $name ], $arguments );
-                       if ( preg_match( '/^ERR operation not permitted\b/', $conn->getLastError() ) ) {
-                               $this->pool->reauthenticateConnection( $this->server, $conn );
-                               $conn->clearLastError();
-                               $res = call_user_func_array( [ $conn, $name ], $arguments );
-                               $this->logger->info(
-                                       "Used automatic re-authentication for method '$name'.",
-                                       [ 'redis_server' => $this->server ]
-                               );
-                       }
-               } catch ( RedisException $e ) {
-                       $this->pool->resetTimeout( $conn ); // restore
-                       throw $e;
-               }
-
-               $this->lastError = $conn->getLastError() ?: $this->lastError;
-
-               $this->pool->resetTimeout( $conn ); // restore
-
-               return $res;
-       }
-
-       /**
-        * @param string $script
-        * @param array $params
-        * @param int $numKeys
-        * @return mixed
-        * @throws RedisException
-        */
-       public function luaEval( $script, array $params, $numKeys ) {
-               $sha1 = sha1( $script ); // 40 char hex
-               $conn = $this->conn; // convenience
-               $server = $this->server; // convenience
-
-               // Try to run the server-side cached copy of the script
-               $conn->clearLastError();
-               $res = $conn->evalSha( $sha1, $params, $numKeys );
-               // If we got a permission error reply that means that (a) we are not in
-               // multi()/pipeline() and (b) some connection problem likely occurred. If
-               // the password the client gave was just wrong, an exception should have
-               // been thrown back in getConnection() previously.
-               if ( preg_match( '/^ERR operation not permitted\b/', $conn->getLastError() ) ) {
-                       $this->pool->reauthenticateConnection( $server, $conn );
-                       $conn->clearLastError();
-                       $res = $conn->eval( $script, $params, $numKeys );
-                       $this->logger->info(
-                               "Used automatic re-authentication for Lua script '$sha1'.",
-                               [ 'redis_server' => $server ]
-                       );
-               }
-               // If the script is not in cache, use eval() to retry and cache it
-               if ( preg_match( '/^NOSCRIPT/', $conn->getLastError() ) ) {
-                       $conn->clearLastError();
-                       $res = $conn->eval( $script, $params, $numKeys );
-                       $this->logger->info(
-                               "Used eval() for Lua script '$sha1'.",
-                               [ 'redis_server' => $server ]
-                       );
-               }
-
-               if ( $conn->getLastError() ) { // script bug?
-                       $this->logger->error(
-                               'Lua script error on server "{redis_server}": {lua_error}',
-                               [
-                                       'redis_server' => $server,
-                                       'lua_error' => $conn->getLastError()
-                               ]
-                       );
-               }
-
-               $this->lastError = $conn->getLastError() ?: $this->lastError;
-
-               return $res;
-       }
-
-       /**
-        * @param Redis $conn
-        * @return bool
-        */
-       public function isConnIdentical( Redis $conn ) {
-               return $this->conn === $conn;
-       }
-
-       function __destruct() {
-               $this->pool->freeConnection( $this->server, $this->conn );
-       }
-}
index 530fc76..9c0b96e 100644 (file)
@@ -94,10 +94,12 @@ class IcuCollation extends Collation {
                // Verified by native speakers
                'be' => [ "Ё" ],
                'be-tarask' => [ "Ё" ],
+               'bs' => [ "Č", "Ć", "Dž", "Đ", "Lj", "Nj", "Š", "Ž" ],
+               'cs' => [ "Č", "Ch", "Ř", "Š", "Ž" ],
                'cy' => [ "Ch", "Dd", "Ff", "Ng", "Ll", "Ph", "Rh", "Th" ],
                'en' => [],
-               // RTL, let's put each letter on a new line
                'fa' => [
+                       // RTL, let's put each letter on a new line
                        "آ",
                        "ء",
                        "ه",
@@ -106,15 +108,27 @@ class IcuCollation extends Collation {
                ],
                'fi' => [ "Å", "Ä", "Ö" ],
                'fr' => [],
+               'hr' => [ "Č", "Ć", "Dž", "Đ", "Lj", "Nj", "Š", "Ž" ],
+               'hsb' => [ "Č", "Dź", "Ě", "Ch", "Ł", "Ń", "Ř", "Š", "Ć", "Ž" ],
                'hu' => [ "Cs", "Dz", "Dzs", "Gy", "Ly", "Ny", "Ö", "Sz", "Ty", "Ü", "Zs" ],
                'is' => [ "Á", "Ð", "É", "Í", "Ó", "Ú", "Ý", "Þ", "Æ", "Ö", "Å" ],
                'it' => [],
+               'lt' => [ "Č", "Š", "Ž" ],
                'lv' => [ "Č", "Ģ", "Ķ", "Ļ", "Ņ", "Š", "Ž" ],
+               'mk' => [ "Ѓ", "Ќ" ],
+               'nl' => [],
                'pl' => [ "Ą", "Ć", "Ę", "Ł", "Ń", "Ó", "Ś", "Ź", "Ż" ],
                'pt' => [],
                'ru' => [],
+               'sk' => [ "Ä", "Č", "Ch", "Ô", "Š", "Ž" ],
+               'sr' => [],
                'sv' => [ "Å", "Ä", "Ö" ],
                'sv@collation=standard' => [ "Å", "Ä", "Ö" ],
+               'ta' => [
+                       "\xE0\xAE\x82", "ஃ", "க்ஷ", "க்", "ங்", "ச்", "ஞ்", "ட்", "ண்", "த்", "ந்",
+                       "ப்", "ம்", "ய்", "ர்", "ல்", "வ்", "ழ்", "ள்", "ற்", "ன்", "ஜ்", "ஶ்", "ஷ்",
+                       "ஸ்", "ஹ்", "க்ஷ்"
+               ],
                'uk' => [ "Ґ", "Ь" ],
                'vi' => [ "Ă", "Â", "Đ", "Ê", "Ô", "Ơ", "Ư" ],
                // Not verified, but likely correct
@@ -123,10 +137,8 @@ class IcuCollation extends Collation {
                'az' => [ "Ç", "Ə", "Ğ", "İ", "Ö", "Ş", "Ü" ],
                'bg' => [],
                'br' => [ "Ch", "C'h" ],
-               'bs' => [ "Č", "Ć", "Dž", "Đ", "Lj", "Nj", "Š", "Ž" ],
                'ca' => [],
                'co' => [],
-               'cs' => [ "Č", "Ch", "Ř", "Š", "Ž" ],
                'da' => [ "Æ", "Ø", "Å" ],
                'de' => [],
                'dsb' => [ "Č", "Ć", "Dź", "Ě", "Ch", "Ł", "Ń", "Ŕ", "Š", "Ś", "Ž", "Ź" ],
@@ -141,35 +153,23 @@ class IcuCollation extends Collation {
                'ga' => [],
                'gd' => [],
                'gl' => [ "Ch", "Ll", "Ñ" ],
-               'hr' => [ "Č", "Ć", "Dž", "Đ", "Lj", "Nj", "Š", "Ž" ],
-               'hsb' => [ "Č", "Dź", "Ě", "Ch", "Ł", "Ń", "Ř", "Š", "Ć", "Ž" ],
                'kk' => [ "Ү", "І" ],
                'kl' => [ "Æ", "Ø", "Å" ],
                'ku' => [ "Ç", "Ê", "Î", "Ş", "Û" ],
                'ky' => [ "Ё" ],
                'la' => [],
                'lb' => [],
-               'lt' => [ "Č", "Š", "Ž" ],
-               'mk' => [ "Ѓ", "Ќ" ],
                'mo' => [ "Ă", "Â", "Î", "Ş", "Ţ" ],
                'mt' => [ "Ċ", "Ġ", "Għ", "Ħ", "Ż" ],
-               'nl' => [],
                'no' => [ "Æ", "Ø", "Å" ],
                'oc' => [],
                'rm' => [],
                'ro' => [ "Ă", "Â", "Î", "Ş", "Ţ" ],
                'rup' => [ "Ă", "Â", "Î", "Ľ", "Ń", "Ş", "Ţ" ],
                'sco' => [],
-               'sk' => [ "Ä", "Č", "Ch", "Ô", "Š", "Ž" ],
                'sl' => [ "Č", "Š", "Ž" ],
                'smn' => [ "Á", "Č", "Đ", "Ŋ", "Š", "Ŧ", "Ž", "Æ", "Ø", "Å", "Ä", "Ö" ],
                'sq' => [ "Ç", "Dh", "Ë", "Gj", "Ll", "Nj", "Rr", "Sh", "Th", "Xh", "Zh" ],
-               'sr' => [],
-               'ta' => [
-                       "\xE0\xAE\x82", "ஃ", "க்ஷ", "க்", "ங்", "ச்", "ஞ்", "ட்", "ண்", "த்", "ந்",
-                       "ப்", "ம்", "ய்", "ர்", "ல்", "வ்", "ழ்", "ள்", "ற்", "ன்", "ஜ்", "ஶ்", "ஷ்",
-                       "ஸ்", "ஹ்", "க்ஷ்"
-               ],
                'tk' => [ "Ç", "Ä", "Ž", "Ň", "Ö", "Ş", "Ü", "Ý" ],
                'tl' => [ "Ñ", "Ng" ],
                'tr' => [ "Ç", "Ğ", "İ", "Ö", "Ş", "Ü" ],
index 4bf2f73..d15daec 100644 (file)
@@ -36,11 +36,13 @@ class NumericUppercaseCollation extends UppercaseCollation {
                // shorter numbers before longer ones; if identical, then the characters will be compared, which
                // generates the correct results for numbers of equal length.
                $sortkey = preg_replace_callback( '/\d+/', function ( $matches ) {
-                       $len = strlen( $matches[0] );
+                       // Strip any leading zeros
+                       $number = ltrim( $matches[0], '0' );
+                       $len = strlen( $number );
                        // This allows sequences of up to 65536 numeric characters to be handled correctly. One byte
                        // would allow only for 256, which doesn't feel future-proof.
                        $prefix = chr( floor( $len / 256 ) ) . chr( $len % 256 );
-                       return '0' . $prefix . $matches[0];
+                       return '0' . $prefix . $number;
                }, $sortkey );
 
                return $sortkey;
diff --git a/includes/compat/ScopedCallback.php b/includes/compat/ScopedCallback.php
new file mode 100644 (file)
index 0000000..4fd4bc7
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Compatibility class for pre-namespace, pre-library class name
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @deprecated since 1.28 use Wikimedia\ScopedCallback
+ *
+ * @since 1.21
+ */
+class ScopedCallback extends Wikimedia\ScopedCallback {
+}
index feef87d..4d6c68c 100644 (file)
@@ -67,7 +67,7 @@ class HashConfig implements Config, MutableConfig {
        }
 
        /**
-        * @see Config::set
+        * @see MutableConfig::set
         */
        public function set( $name, $value ) {
                $this->settings[$name] = $value;
index 4e50c8e..3389a00 100644 (file)
@@ -82,15 +82,6 @@ class MWUnknownContentModelException extends MWException {
  * @ingroup Content
  */
 abstract class ContentHandler {
-       /**
-        * Switch for enabling deprecation warnings. Used by ContentHandler::deprecated()
-        * and ContentHandler::runLegacyHooks().
-        *
-        * Once the ContentHandler code has settled in a bit, this should be set to true to
-        * make extensions etc. show warnings when using deprecated functions and hooks.
-        */
-       protected static $enableDeprecationWarnings = false;
-
        /**
         * Convenience function for getting flat text from a Content object. This
         * should only be used in the context of backwards compatibility with code
@@ -243,7 +234,7 @@ abstract class ContentHandler {
                }
 
                // Hook can force JS/CSS
-               Hooks::run( 'TitleIsCssOrJsPage', [ $title, &$isCodePage ], '1.25' );
+               Hooks::run( 'TitleIsCssOrJsPage', [ $title, &$isCodePage ], '1.21' );
 
                // Is this a user subpage containing code?
                $isCodeSubpage = NS_USER == $ns
@@ -258,7 +249,7 @@ abstract class ContentHandler {
                $isWikitext = $isWikitext && !$isCodePage && !$isCodeSubpage;
 
                // Hook can override $isWikitext
-               Hooks::run( 'TitleIsWikitextPage', [ $title, &$isWikitext ], '1.25' );
+               Hooks::run( 'TitleIsWikitextPage', [ $title, &$isWikitext ], '1.21' );
 
                if ( !$isWikitext ) {
                        switch ( $ext ) {
@@ -706,7 +697,7 @@ abstract class ContentHandler {
                if ( $title->getNamespace() == NS_MEDIAWIKI ) {
                        // Parse mediawiki messages with correct target language
                        list( /* $unused */, $lang ) = MessageCache::singleton()->figureMessage( $title->getText() );
-                       $pageLang = wfGetLangObj( $lang );
+                       $pageLang = Language::factory( $lang );
                }
 
                Hooks::run( 'PageContentLanguage', [ $title, &$pageLang, $wgLang ] );
@@ -1139,25 +1130,6 @@ abstract class ContentHandler {
                return $this->supportsDirectEditing();
        }
 
-       /**
-        * Logs a deprecation warning, visible if $wgDevelopmentWarnings, but only if
-        * self::$enableDeprecationWarnings is set to true.
-        *
-        * @param string $func The name of the deprecated function
-        * @param string $version The version since the method is deprecated. Usually 1.21
-        *   for ContentHandler related stuff.
-        * @param string|bool $component : Component to which the function belongs.
-        *   If false, it is assumed the function is in MediaWiki core.
-        *
-        * @see ContentHandler::$enableDeprecationWarnings
-        * @see wfDeprecated
-        */
-       public static function deprecated( $func, $version, $component = false ) {
-               if ( self::$enableDeprecationWarnings ) {
-                       wfDeprecated( $func, $version, $component, 3 );
-               }
-       }
-
        /**
         * Call a legacy hook that uses text instead of Content objects.
         * Will log a warning when a matching hook function is registered.
diff --git a/includes/content/FileContentHandler.php b/includes/content/FileContentHandler.php
new file mode 100644 (file)
index 0000000..26f1190
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ * Content handler for File: files
+ * TODO: this handler s not used directly now,
+ * but instead manually called by WikitextHandler.
+ * This should be fixed in the future.
+ */
+class FileContentHandler extends WikitextContentHandler  {
+
+       public function getFieldsForSearchIndex( SearchEngine $engine ) {
+               $fields['file_media_type'] =
+                       $engine->makeSearchFieldMapping( 'file_media_type', SearchIndexField::INDEX_TYPE_KEYWORD );
+               $fields['file_media_type']->setFlag( SearchIndexField::FLAG_CASEFOLD );
+               $fields['file_mime'] =
+                       $engine->makeSearchFieldMapping( 'file_mime', SearchIndexField::INDEX_TYPE_SHORT_TEXT );
+               $fields['file_mime']->setFlag( SearchIndexField::FLAG_CASEFOLD );
+               $fields['file_size'] =
+                       $engine->makeSearchFieldMapping( 'file_size', SearchIndexField::INDEX_TYPE_INTEGER );
+               $fields['file_width'] =
+                       $engine->makeSearchFieldMapping( 'file_width', SearchIndexField::INDEX_TYPE_INTEGER );
+               $fields['file_height'] =
+                       $engine->makeSearchFieldMapping( 'file_height', SearchIndexField::INDEX_TYPE_INTEGER );
+               $fields['file_bits'] =
+                       $engine->makeSearchFieldMapping( 'file_bits', SearchIndexField::INDEX_TYPE_INTEGER );
+               $fields['file_resolution'] =
+                       $engine->makeSearchFieldMapping( 'file_resolution', SearchIndexField::INDEX_TYPE_INTEGER );
+               $fields['file_text'] =
+                       $engine->makeSearchFieldMapping( 'file_text', SearchIndexField::INDEX_TYPE_TEXT );
+               return $fields;
+       }
+
+       public function getDataForSearchIndex( WikiPage $page, ParserOutput $parserOutput,
+                                              SearchEngine $engine ) {
+               $fields = [];
+
+               $title = $page->getTitle();
+               if ( NS_FILE != $title->getNamespace() ) {
+                       return [];
+               }
+               $file = wfLocalFile( $title );
+               if ( !$file || !$file->exists() ) {
+                       return [];
+               }
+
+               $handler = $file->getHandler();
+               if ( $handler ) {
+                       $fields['file_text'] = $handler->getEntireText( $file );
+               }
+               $fields['file_media_type'] = $file->getMediaType();
+               $fields['file_mime'] = $file->getMimeType();
+               $fields['file_size'] = $file->getSize();
+               $fields['file_width'] = $file->getWidth();
+               $fields['file_height'] = $file->getHeight();
+               $fields['file_bits'] = $file->getBitDepth();
+               $fields['file_resolution'] =
+                       (int)floor( sqrt( $fields['file_width'] * $fields['file_height'] ) );
+
+               return $fields;
+       }
+
+}
index 55c4ad5..f4a6dc6 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
 use HtmlFormatter\HtmlFormatter;
-use MediaWiki\Logger\LoggerFactory;
 
 /**
  * Class allowing to explore structure of parsed wikitext.
@@ -78,7 +77,7 @@ class WikiTextStructure {
                        $heading = $heading[ 'line' ];
 
                        // Some wikis wrap the brackets in a span:
-                       // http://en.wikipedia.org/wiki/MediaWiki:Cite_reference_link
+                       // https://en.wikipedia.org/wiki/MediaWiki:Cite_reference_link
                        $heading = preg_replace( '/<\/?span>/', '', $heading );
                        // Normalize [] so the following regexp would work.
                        $heading = preg_replace( [ '/&#91;/', '/&#93;/' ], [ '[', ']' ], $heading );
index 978ac44..74b2f1a 100644 (file)
@@ -108,6 +108,14 @@ class WikitextContentHandler extends TextContentHandler {
                return true;
        }
 
+       /**
+        * Get file handler
+        * @return FileContentHandler
+        */
+       protected function getFileHandler() {
+               return new FileContentHandler();
+       }
+
        public function getFieldsForSearchIndex( SearchEngine $engine ) {
                $fields = parent::getFieldsForSearchIndex( $engine );
 
@@ -122,34 +130,12 @@ class WikitextContentHandler extends TextContentHandler {
                        $engine->makeSearchFieldMapping( 'opening_text', SearchIndexField::INDEX_TYPE_TEXT );
                $fields['opening_text']->setFlag( SearchIndexField::FLAG_SCORING |
                                                  SearchIndexField::FLAG_NO_HIGHLIGHT );
-
-               // FIXME: this really belongs in separate file handler but files
-               // do not have separate handler. Sadness.
-               $fields['file_text'] =
-                       $engine->makeSearchFieldMapping( 'file_text', SearchIndexField::INDEX_TYPE_TEXT );
+               // Until we have full first-class content handler for files, we invoke it explicitly here
+               $fields = array_merge( $fields, $this->getFileHandler()->getFieldsForSearchIndex( $engine ) );
 
                return $fields;
        }
 
-       /**
-        * Extract text of the file
-        * TODO: probably should go to file handler?
-        * @param Title $title
-        * @return string|null
-        */
-       protected function getFileText( Title $title ) {
-               $file = wfLocalFile( $title );
-               if ( $file && $file->exists() ) {
-                       $handler = $file->getHandler();
-                       if ( !$handler ) {
-                               return null;
-                       }
-                       return $handler->getEntireText( $file );
-               }
-
-               return null;
-       }
-
        public function getDataForSearchIndex( WikiPage $page, ParserOutput $parserOutput,
                                               SearchEngine $engine ) {
                $fields = parent::getDataForSearchIndex( $page, $parserOutput, $engine );
@@ -162,12 +148,10 @@ class WikitextContentHandler extends TextContentHandler {
                $fields['auxiliary_text'] = $structure->getAuxiliaryText();
                $fields['defaultsort'] = $structure->getDefaultSort();
 
-               $title = $page->getTitle();
-               if ( NS_FILE == $title->getNamespace() ) {
-                       $fileText = $this->getFileText( $title );
-                       if ( $fileText ) {
-                               $fields['file_text'] = $fileText;
-                       }
+               // Until we have full first-class content handler for files, we invoke it explicitly here
+               if ( NS_FILE == $page->getTitle()->getNamespace() ) {
+                       $fields = array_merge( $fields,
+                                       $this->getFileHandler()->getDataForSearchIndex( $page, $parserOutput, $engine ) );
                }
                return $fields;
        }
index b617871..829dd73 100644 (file)
@@ -19,7 +19,6 @@
  * @file
  */
 use Liuggio\StatsdClient\Factory\StatsdDataFactory;
-use MediaWiki\MediaWikiServices;
 
 /**
  * The simplest way of implementing IContextSource is to hold a RequestContext as a
index c87798e..ebedb7e 100644 (file)
@@ -25,6 +25,7 @@
 use Liuggio\StatsdClient\Factory\StatsdDataFactory;
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
+use Wikimedia\ScopedCallback;
 
 /**
  * Group all the pieces relevant to the context of a request into one instance
@@ -160,7 +161,7 @@ class RequestContext implements IContextSource, MutableContext {
        /**
         * Set the Title object
         *
-        * @param Title $title
+        * @param Title|null $title
         */
        public function setTitle( Title $title = null ) {
                $this->title = $title;
index 01814c1..6a1bbd6 100644 (file)
@@ -53,7 +53,7 @@ abstract class DBAccessBase implements IDBAccessObject {
         * @param int $id Which connection to use
         * @param array $groups Query groups
         *
-        * @return DatabaseBase
+        * @return Database
         */
        protected function getConnection( $id, $groups = [] ) {
                $loadBalancer = wfGetLB( $this->wiki );
@@ -68,9 +68,9 @@ abstract class DBAccessBase implements IDBAccessObject {
         *
         * @since 1.21
         *
-        * @param DatabaseBase $db The database connection to release.
+        * @param Database $db The database connection to release.
         */
-       protected function releaseConnection( DatabaseBase $db ) {
+       protected function releaseConnection( Database $db ) {
                if ( $this->wiki !== false ) {
                        $loadBalancer = $this->getLoadBalancer();
                        $loadBalancer->reuseConnection( $db );
diff --git a/includes/db/ChronologyProtector.php b/includes/db/ChronologyProtector.php
deleted file mode 100644 (file)
index 4d03bc6..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-<?php
-/**
- * Generator of database load balancing objects.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-use Psr\Log\LoggerAwareInterface;
-use Psr\Log\LoggerInterface;
-use MediaWiki\Logger\LoggerFactory;
-
-/**
- * Class for ensuring a consistent ordering of events as seen by the user, despite replication.
- * Kind of like Hawking's [[Chronology Protection Agency]].
- */
-class ChronologyProtector implements LoggerAwareInterface{
-       /** @var BagOStuff */
-       protected $store;
-       /** @var LoggerInterface */
-       protected $logger;
-
-       /** @var string Storage key name */
-       protected $key;
-       /** @var string Hash of client parameters */
-       protected $clientId;
-       /** @var float|null Minimum UNIX timestamp of 1+ expected startup positions */
-       protected $waitForPosTime;
-       /** @var int Max seconds to wait on positions to appear */
-       protected $waitForPosTimeout = self::POS_WAIT_TIMEOUT;
-       /** @var bool Whether to no-op all method calls */
-       protected $enabled = true;
-       /** @var bool Whether to check and wait on positions */
-       protected $wait = true;
-
-       /** @var bool Whether the client data was loaded */
-       protected $initialized = false;
-       /** @var DBMasterPos[] Map of (DB master name => position) */
-       protected $startupPositions = [];
-       /** @var DBMasterPos[] Map of (DB master name => position) */
-       protected $shutdownPositions = [];
-       /** @var float[] Map of (DB master name => 1) */
-       protected $shutdownTouchDBs = [];
-
-       /** @var integer Seconds to store positions */
-       const POSITION_TTL = 60;
-       /** @var integer Max time to wait for positions to appear */
-       const POS_WAIT_TIMEOUT = 5;
-
-       /**
-        * @param BagOStuff $store
-        * @param array $client Map of (ip: <IP>, agent: <user-agent>)
-        * @param float $posTime UNIX timestamp
-        * @since 1.27
-        */
-       public function __construct( BagOStuff $store, array $client, $posTime = null ) {
-               $this->store = $store;
-               $this->clientId = md5( $client['ip'] . "\n" . $client['agent'] );
-               $this->key = $store->makeGlobalKey( __CLASS__, $this->clientId );
-               $this->waitForPosTime = $posTime;
-               $this->logger = LoggerFactory::getInstance( 'DBReplication' );
-       }
-
-       public function setLogger( LoggerInterface $logger ) {
-               $this->logger = $logger;
-       }
-
-       /**
-        * @param bool $enabled Whether to no-op all method calls
-        * @since 1.27
-        */
-       public function setEnabled( $enabled ) {
-               $this->enabled = $enabled;
-       }
-
-       /**
-        * @param bool $enabled Whether to check and wait on positions
-        * @since 1.27
-        */
-       public function setWaitEnabled( $enabled ) {
-               $this->wait = $enabled;
-       }
-
-       /**
-        * Initialise a LoadBalancer to give it appropriate chronology protection.
-        *
-        * If the stash has a previous master position recorded, this will try to
-        * make sure that the next query to a replica DB of that master will see changes up
-        * to that position by delaying execution. The delay may timeout and allow stale
-        * data if no non-lagged replica DBs are available.
-        *
-        * @param LoadBalancer $lb
-        * @return void
-        */
-       public function initLB( LoadBalancer $lb ) {
-               if ( !$this->enabled || $lb->getServerCount() <= 1 ) {
-                       return; // non-replicated setup or disabled
-               }
-
-               $this->initPositions();
-
-               $masterName = $lb->getServerName( $lb->getWriterIndex() );
-               if ( !empty( $this->startupPositions[$masterName] ) ) {
-                       $pos = $this->startupPositions[$masterName];
-                       $this->logger->info( __METHOD__ . ": LB for '$masterName' set to pos $pos\n" );
-                       $lb->waitFor( $pos );
-               }
-       }
-
-       /**
-        * Notify the ChronologyProtector that the LoadBalancer is about to shut
-        * down. Saves replication positions.
-        *
-        * @param LoadBalancer $lb
-        * @return void
-        */
-       public function shutdownLB( LoadBalancer $lb ) {
-               if ( !$this->enabled ) {
-                       return; // not enabled
-               } elseif ( !$lb->hasOrMadeRecentMasterChanges( INF ) ) {
-                       // Only save the position if writes have been done on the connection
-                       return;
-               }
-
-               $masterName = $lb->getServerName( $lb->getWriterIndex() );
-               if ( $lb->getServerCount() > 1 ) {
-                       $pos = $lb->getMasterPos();
-                       $this->logger->info( __METHOD__ . ": LB for '$masterName' has pos $pos\n" );
-                       $this->shutdownPositions[$masterName] = $pos;
-               } else {
-                       $this->logger->info( __METHOD__ . ": DB '$masterName' touched\n" );
-               }
-               $this->shutdownTouchDBs[$masterName] = 1;
-       }
-
-       /**
-        * Notify the ChronologyProtector that the LBFactory is done calling shutdownLB() for now.
-        * May commit chronology data to persistent storage.
-        *
-        * @param callable|null $workCallback Work to do instead of waiting on syncing positions
-        * @param string $mode One of (sync, async); whether to wait on remote datacenters
-        * @return DBMasterPos[] Empty on success; returns the (db name => position) map on failure
-        */
-       public function shutdown( callable $workCallback = null, $mode = 'sync' ) {
-               if ( !$this->enabled ) {
-                       return [];
-               }
-
-               $store = $this->store;
-               // Some callers might want to know if a user recently touched a DB.
-               // These writes do not need to block on all datacenters receiving them.
-               foreach ( $this->shutdownTouchDBs as $dbName => $unused ) {
-                       $store->set(
-                               $this->getTouchedKey( $this->store, $dbName ),
-                               microtime( true ),
-                               $store::TTL_DAY
-                       );
-               }
-
-               if ( !count( $this->shutdownPositions ) ) {
-                       return []; // nothing to save
-               }
-
-               $this->logger->info( __METHOD__ . ": saving master pos for " .
-                       implode( ', ', array_keys( $this->shutdownPositions ) ) . "\n"
-               );
-
-               // CP-protected writes should overwhemingly go to the master datacenter, so get DC-local
-               // lock to merge the values. Use a DC-local get() and a synchronous all-DC set(). This
-               // makes it possible for the BagOStuff class to write in parallel to all DCs with one RTT.
-               if ( $store->lock( $this->key, 3 ) ) {
-                       if ( $workCallback ) {
-                               // Let the store run the work before blocking on a replication sync barrier. By the
-                               // time it's done with the work, the barrier should be fast if replication caught up.
-                               $store->addBusyCallback( $workCallback );
-                       }
-                       $ok = $store->set(
-                               $this->key,
-                               self::mergePositions( $store->get( $this->key ), $this->shutdownPositions ),
-                               self::POSITION_TTL,
-                               ( $mode === 'sync' ) ? $store::WRITE_SYNC : 0
-                       );
-                       $store->unlock( $this->key );
-               } else {
-                       $ok = false;
-               }
-
-               if ( !$ok ) {
-                       $bouncedPositions = $this->shutdownPositions;
-                       // Raced out too many times or stash is down
-                       $this->logger->warning( __METHOD__ . ": failed to save master pos for " .
-                               implode( ', ', array_keys( $this->shutdownPositions ) ) . "\n"
-                       );
-               } elseif ( $mode === 'sync' &&
-                       $store->getQoS( $store::ATTR_SYNCWRITES ) < $store::QOS_SYNCWRITES_BE
-               ) {
-                       // Positions may not be in all datacenters, force LBFactory to play it safe
-                       $this->logger->info( __METHOD__ . ": store may not support synchronous writes." );
-                       $bouncedPositions = $this->shutdownPositions;
-               } else {
-                       $bouncedPositions = [];
-               }
-
-               return $bouncedPositions;
-       }
-
-       /**
-        * @param string $dbName DB master name (e.g. "db1052")
-        * @return float|bool UNIX timestamp when client last touched the DB; false if not on record
-        * @since 1.28
-        */
-       public function getTouched( $dbName ) {
-               return $this->store->get( $this->getTouchedKey( $this->store, $dbName ) );
-       }
-
-       /**
-        * @param BagOStuff $store
-        * @param string $dbName
-        * @return string
-        */
-       private function getTouchedKey( BagOStuff $store, $dbName ) {
-               return $store->makeGlobalKey( __CLASS__, 'mtime', $this->clientId, $dbName );
-       }
-
-       /**
-        * Load in previous master positions for the client
-        */
-       protected function initPositions() {
-               if ( $this->initialized ) {
-                       return;
-               }
-
-               $this->initialized = true;
-               if ( $this->wait ) {
-                       // If there is an expectation to see master positions with a certain min
-                       // timestamp, then block until they appear, or until a timeout is reached.
-                       if ( $this->waitForPosTime > 0.0 ) {
-                               $data = null;
-                               $loop = new WaitConditionLoop(
-                                       function () use ( &$data ) {
-                                               $data = $this->store->get( $this->key );
-
-                                               return ( self::minPosTime( $data ) >= $this->waitForPosTime )
-                                                       ? WaitConditionLoop::CONDITION_REACHED
-                                                       : WaitConditionLoop::CONDITION_CONTINUE;
-                                       },
-                                       $this->waitForPosTimeout
-                               );
-                               $result = $loop->invoke();
-                               $waitedMs = $loop->getLastWaitTime() * 1e3;
-
-                               if ( $result == $loop::CONDITION_REACHED ) {
-                                       $msg = "expected and found pos time {$this->waitForPosTime} ({$waitedMs}ms)";
-                               } else {
-                                       $msg = "expected but missed pos time {$this->waitForPosTime} ({$waitedMs}ms)";
-                               }
-                               wfDebugLog( 'replication', $msg );
-                       } else {
-                               $data = $this->store->get( $this->key );
-                       }
-
-                       $this->startupPositions = $data ? $data['positions'] : [];
-                       $this->logger->info( __METHOD__ . ": key is {$this->key} (read)\n" );
-               } else {
-                       $this->startupPositions = [];
-                       $this->logger->info( __METHOD__ . ": key is {$this->key} (unread)\n" );
-               }
-       }
-
-       /**
-        * @param array|bool $data
-        * @return float|null
-        */
-       private static function minPosTime( $data ) {
-               if ( !isset( $data['positions'] ) ) {
-                       return null;
-               }
-
-               $min = null;
-               foreach ( $data['positions'] as $pos ) {
-                       /** @var DBMasterPos $pos */
-                       $min = $min ? min( $pos->asOfTime(), $min ) : $pos->asOfTime();
-               }
-
-               return $min;
-       }
-
-       /**
-        * @param array|bool $curValue
-        * @param DBMasterPos[] $shutdownPositions
-        * @return array
-        */
-       private static function mergePositions( $curValue, array $shutdownPositions ) {
-               /** @var $curPositions DBMasterPos[] */
-               if ( $curValue === false ) {
-                       $curPositions = $shutdownPositions;
-               } else {
-                       $curPositions = $curValue['positions'];
-                       // Use the newest positions for each DB master
-                       foreach ( $shutdownPositions as $db => $pos ) {
-                               if ( !isset( $curPositions[$db] )
-                                       || $pos->asOfTime() > $curPositions[$db]->asOfTime()
-                               ) {
-                                       $curPositions[$db] = $pos;
-                               }
-                       }
-               }
-
-               return [ 'positions' => $curPositions ];
-       }
-}
index 97d59d8..f1ccd2a 100644 (file)
@@ -23,6 +23,7 @@
  * @file
  * @ingroup Database
  */
+use MediaWiki\MediaWikiServices;
 
 class CloneDatabase {
        /** @var string Table prefix for cloning */
@@ -40,16 +41,19 @@ class CloneDatabase {
        /** @var bool Whether to use temporary tables or not */
        private $useTemporaryTables = true;
 
+       /** @var Database */
+       private $db;
+
        /**
         * Constructor
         *
-        * @param DatabaseBase $db A database subclass
+        * @param Database $db A database subclass
         * @param array $tablesToClone An array of tables to clone, unprefixed
         * @param string $newTablePrefix Prefix to assign to the tables
         * @param string $oldTablePrefix Prefix on current tables, if not $wgDBprefix
         * @param bool $dropCurrentTables
         */
-       public function __construct( DatabaseBase $db, array $tablesToClone,
+       public function __construct( Database $db, array $tablesToClone,
                $newTablePrefix, $oldTablePrefix = '', $dropCurrentTables = true
        ) {
                $this->db = $db;
@@ -129,12 +133,9 @@ class CloneDatabase {
         */
        public static function changePrefix( $prefix ) {
                global $wgDBprefix;
-               wfGetLBFactory()->forEachLB( function( LoadBalancer $lb ) use ( $prefix ) {
-                       $lb->setDomainPrefix( $prefix );
-                       $lb->forEachOpenConnection( function ( DatabaseBase $db ) use ( $prefix ) {
-                               $db->tablePrefix( $prefix );
-                       } );
-               } );
+
+               $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+               $lbFactory->setDomainPrefix( $prefix );
                $wgDBprefix = $prefix;
        }
 }
diff --git a/includes/db/DBConnRef.php b/includes/db/DBConnRef.php
deleted file mode 100644 (file)
index 8604295..0000000
+++ /dev/null
@@ -1,581 +0,0 @@
-<?php
-/**
- * Helper class to handle automatically marking connections as reusable (via RAII pattern)
- * as well handling deferring the actual network connection until the handle is used
- *
- * @note: proxy methods are defined explicity to avoid interface errors
- * @ingroup Database
- * @since 1.22
- */
-class DBConnRef implements IDatabase {
-       /** @var LoadBalancer */
-       private $lb;
-
-       /** @var DatabaseBase|null */
-       private $conn;
-
-       /** @var array|null */
-       private $params;
-
-       const FLD_INDEX = 0;
-       const FLD_GROUP = 1;
-       const FLD_WIKI = 2;
-
-       /**
-        * @param LoadBalancer $lb
-        * @param DatabaseBase|array $conn Connection or (server index, group, wiki ID)
-        */
-       public function __construct( LoadBalancer $lb, $conn ) {
-               $this->lb = $lb;
-               if ( $conn instanceof DatabaseBase ) {
-                       $this->conn = $conn;
-               } elseif ( count( $conn ) >= 3 && $conn[self::FLD_WIKI] !== false ) {
-                       $this->params = $conn;
-               } else {
-                       throw new InvalidArgumentException( "Missing lazy connection arguments." );
-               }
-       }
-
-       function __call( $name, array $arguments ) {
-               if ( $this->conn === null ) {
-                       list( $db, $groups, $wiki ) = $this->params;
-                       $this->conn = $this->lb->getConnection( $db, $groups, $wiki );
-               }
-
-               return call_user_func_array( [ $this->conn, $name ], $arguments );
-       }
-
-       public function getServerInfo() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function bufferResults( $buffer = null ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function trxLevel() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function trxTimestamp() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function explicitTrxActive() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function tablePrefix( $prefix = null ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function dbSchema( $schema = null ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getLBInfo( $name = null ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function setLBInfo( $name, $value = null ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function implicitGroupby() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function implicitOrderby() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function lastQuery() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function doneWrites() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function lastDoneWrites() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function writesPending() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function writesOrCallbacksPending() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function pendingWriteCallers() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function isOpen() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function setFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function restoreFlags( $state = self::RESTORE_PRIOR ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getFlag( $flag ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getProperty( $name ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getWikiID() {
-               if ( $this->conn === null ) {
-                       // Avoid triggering a connection
-                       return $this->params[self::FLD_WIKI];
-               }
-
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getType() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function open( $server, $user, $password, $dbName ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function fetchObject( $res ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function fetchRow( $res ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function numRows( $res ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function numFields( $res ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function fieldName( $res, $n ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function insertId() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function dataSeek( $res, $row ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function lastErrno() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function lastError() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function fieldInfo( $table, $field ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function affectedRows() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getSoftwareLink() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getServerVersion() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function close() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function reportConnectionError( $error = 'Unknown error' ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function query( $sql, $fname = __METHOD__, $tempIgnore = false ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function freeResult( $res ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function selectField(
-               $table, $var, $cond = '', $fname = __METHOD__, $options = []
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function selectFieldValues(
-               $table, $var, $cond = '', $fname = __METHOD__, $options = []
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function select(
-               $table, $vars, $conds = '', $fname = __METHOD__,
-               $options = [], $join_conds = []
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function selectSQLText(
-               $table, $vars, $conds = '', $fname = __METHOD__,
-               $options = [], $join_conds = []
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function selectRow(
-               $table, $vars, $conds, $fname = __METHOD__,
-               $options = [], $join_conds = []
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function estimateRowCount(
-               $table, $vars = '*', $conds = '', $fname = __METHOD__, $options = []
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function selectRowCount(
-               $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function fieldExists( $table, $field, $fname = __METHOD__ ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function indexExists( $table, $index, $fname = __METHOD__ ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function tableExists( $table, $fname = __METHOD__ ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function indexUnique( $table, $index ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function insert( $table, $a, $fname = __METHOD__, $options = [] ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function update( $table, $values, $conds, $fname = __METHOD__, $options = [] ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function makeList( $a, $mode = LIST_COMMA ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function makeWhereFrom2d( $data, $baseKey, $subKey ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function bitNot( $field ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function bitAnd( $fieldLeft, $fieldRight ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function bitOr( $fieldLeft, $fieldRight ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function buildConcat( $stringList ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function buildGroupConcatField(
-               $delim, $table, $field, $conds = '', $join_conds = []
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function selectDB( $db ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getDBname() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getServer() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function addQuotes( $s ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function buildLike() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function anyChar() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function anyString() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function nextSequenceValue( $seqName ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function upsert(
-               $table, array $rows, array $uniqueIndexes, array $set, $fname = __METHOD__
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function deleteJoin(
-               $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = __METHOD__
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function delete( $table, $conds, $fname = __METHOD__ ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function insertSelect(
-               $destTable, $srcTable, $varMap, $conds,
-               $fname = __METHOD__, $insertOptions = [], $selectOptions = []
-       ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function unionSupportsOrderAndLimit() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function unionQueries( $sqls, $all ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function conditional( $cond, $trueVal, $falseVal ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function strreplace( $orig, $old, $new ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getServerUptime() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function wasDeadlock() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function wasLockTimeout() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function wasErrorReissuable() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function wasReadOnlyError() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function masterPosWait( DBMasterPos $pos, $timeout ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getSlavePos() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getMasterPos() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function serverIsReadOnly() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function onTransactionResolution( callable $callback ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function onTransactionIdle( callable $callback ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function onTransactionPreCommitOrIdle( callable $callback ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function setTransactionListener( $name, callable $callback = null ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function startAtomic( $fname = __METHOD__ ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function endAtomic( $fname = __METHOD__ ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function doAtomicSection( $fname, callable $callback ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function begin( $fname = __METHOD__, $mode = IDatabase::TRANSACTION_EXPLICIT ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function commit( $fname = __METHOD__, $flush = '' ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function rollback( $fname = __METHOD__, $flush = '' ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function flushSnapshot( $fname = __METHOD__ ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function listTables( $prefix = null, $fname = __METHOD__ ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function timestamp( $ts = 0 ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function timestampOrNull( $ts = null ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function ping( &$rtt = null ) {
-               return func_num_args()
-                       ? $this->__call( __FUNCTION__, [ &$rtt ] )
-                       : $this->__call( __FUNCTION__, [] ); // method cares about null vs missing
-       }
-
-       public function getLag() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getSessionLagStatus() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function maxListLen() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function encodeBlob( $b ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function decodeBlob( $b ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function setSessionOptions( array $options ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function setSchemaVars( $vars ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function lockIsFree( $lockName, $method ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function lock( $lockName, $method, $timeout = 5 ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function unlock( $lockName, $method ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getScopedLockAndFlush( $lockKey, $fname, $timeout ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function namedLocksEnqueue() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function getInfinity() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function encodeExpiry( $expiry ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function decodeExpiry( $expiry, $format = TS_MW ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function setBigSelects( $value = true ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       public function isReadOnly() {
-               return $this->__call( __FUNCTION__, func_get_args() );
-       }
-
-       /**
-        * Clean up the connection when out of scope
-        */
-       function __destruct() {
-               if ( $this->conn !== null ) {
-                       $this->lb->reuseConnection( $this->conn );
-               }
-       }
-}
diff --git a/includes/db/Database.php b/includes/db/Database.php
deleted file mode 100644 (file)
index 109dbfe..0000000
+++ /dev/null
@@ -1,3747 +0,0 @@
-<?php
-/**
- * @defgroup Database Database
- *
- * This file deals with database interface functions
- * and query specifics/optimisations.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-use Psr\Log\LoggerAwareInterface;
-use Psr\Log\LoggerInterface;
-
-/**
- * Database abstraction object
- * @ingroup Database
- */
-abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
-       /** Number of times to re-try an operation in case of deadlock */
-       const DEADLOCK_TRIES = 4;
-       /** Minimum time to wait before retry, in microseconds */
-       const DEADLOCK_DELAY_MIN = 500000;
-       /** Maximum time to wait before retry */
-       const DEADLOCK_DELAY_MAX = 1500000;
-
-       /** How long before it is worth doing a dummy query to test the connection */
-       const PING_TTL = 1.0;
-       const PING_QUERY = 'SELECT 1 AS ping';
-
-       const TINY_WRITE_SEC = .010;
-       const SLOW_WRITE_SEC = .500;
-       const SMALL_WRITE_ROWS = 100;
-
-       /** @var string SQL query */
-       protected $mLastQuery = '';
-       /** @var bool */
-       protected $mDoneWrites = false;
-       /** @var string|bool */
-       protected $mPHPError = false;
-       /** @var string */
-       protected $mServer;
-       /** @var string */
-       protected $mUser;
-       /** @var string */
-       protected $mPassword;
-       /** @var string */
-       protected $mDBname;
-       /** @var bool */
-       protected $cliMode;
-
-       /** @var BagOStuff APC cache */
-       protected $srvCache;
-       /** @var LoggerInterface */
-       protected $connLogger;
-       /** @var LoggerInterface */
-       protected $queryLogger;
-
-       /** @var resource Database connection */
-       protected $mConn = null;
-       /** @var bool */
-       protected $mOpened = false;
-
-       /** @var array[] List of (callable, method name) */
-       protected $mTrxIdleCallbacks = [];
-       /** @var array[] List of (callable, method name) */
-       protected $mTrxPreCommitCallbacks = [];
-       /** @var array[] List of (callable, method name) */
-       protected $mTrxEndCallbacks = [];
-       /** @var array[] Map of (name => (callable, method name)) */
-       protected $mTrxRecurringCallbacks = [];
-       /** @var bool Whether to suppress triggering of transaction end callbacks */
-       protected $mTrxEndCallbacksSuppressed = false;
-
-       /** @var string */
-       protected $mTablePrefix;
-       /** @var string */
-       protected $mSchema;
-       /** @var integer */
-       protected $mFlags;
-       /** @var bool */
-       protected $mForeign;
-       /** @var array */
-       protected $mLBInfo = [];
-       /** @var bool|null */
-       protected $mDefaultBigSelects = null;
-       /** @var array|bool */
-       protected $mSchemaVars = false;
-       /** @var array */
-       protected $mSessionVars = [];
-       /** @var array|null */
-       protected $preparedArgs;
-       /** @var string|bool|null Stashed value of html_errors INI setting */
-       protected $htmlErrors;
-       /** @var string */
-       protected $delimiter = ';';
-
-       /**
-        * Either 1 if a transaction is active or 0 otherwise.
-        * The other Trx fields may not be meaningfull if this is 0.
-        *
-        * @var int
-        */
-       protected $mTrxLevel = 0;
-       /**
-        * Either a short hexidecimal string if a transaction is active or ""
-        *
-        * @var string
-        * @see DatabaseBase::mTrxLevel
-        */
-       protected $mTrxShortId = '';
-       /**
-        * The UNIX time that the transaction started. Callers can assume that if
-        * snapshot isolation is used, then the data is *at least* up to date to that
-        * point (possibly more up-to-date since the first SELECT defines the snapshot).
-        *
-        * @var float|null
-        * @see DatabaseBase::mTrxLevel
-        */
-       private $mTrxTimestamp = null;
-       /** @var float Lag estimate at the time of BEGIN */
-       private $mTrxReplicaLag = null;
-       /**
-        * Remembers the function name given for starting the most recent transaction via begin().
-        * Used to provide additional context for error reporting.
-        *
-        * @var string
-        * @see DatabaseBase::mTrxLevel
-        */
-       private $mTrxFname = null;
-       /**
-        * Record if possible write queries were done in the last transaction started
-        *
-        * @var bool
-        * @see DatabaseBase::mTrxLevel
-        */
-       private $mTrxDoneWrites = false;
-       /**
-        * Record if the current transaction was started implicitly due to DBO_TRX being set.
-        *
-        * @var bool
-        * @see DatabaseBase::mTrxLevel
-        */
-       private $mTrxAutomatic = false;
-       /**
-        * Array of levels of atomicity within transactions
-        *
-        * @var array
-        */
-       private $mTrxAtomicLevels = [];
-       /**
-        * Record if the current transaction was started implicitly by DatabaseBase::startAtomic
-        *
-        * @var bool
-        */
-       private $mTrxAutomaticAtomic = false;
-       /**
-        * Track the write query callers of the current transaction
-        *
-        * @var string[]
-        */
-       private $mTrxWriteCallers = [];
-       /**
-        * @var float Seconds spent in write queries for the current transaction
-        */
-       private $mTrxWriteDuration = 0.0;
-       /**
-        * @var integer Number of write queries for the current transaction
-        */
-       private $mTrxWriteQueryCount = 0;
-       /**
-        * @var float Like mTrxWriteQueryCount but excludes lock-bound, easy to replicate, queries
-        */
-       private $mTrxWriteAdjDuration = 0.0;
-       /**
-        * @var integer Number of write queries counted in mTrxWriteAdjDuration
-        */
-       private $mTrxWriteAdjQueryCount = 0;
-       /**
-        * @var float RTT time estimate
-        */
-       private $mRTTEstimate = 0.0;
-
-       /** @var array Map of (name => 1) for locks obtained via lock() */
-       private $mNamedLocksHeld = [];
-
-       /** @var IDatabase|null Lazy handle to the master DB this server replicates from */
-       private $lazyMasterHandle;
-
-       /**
-        * @since 1.21
-        * @var resource File handle for upgrade
-        */
-       protected $fileHandle = null;
-
-       /**
-        * @since 1.22
-        * @var string[] Process cache of VIEWs names in the database
-        */
-       protected $allViews = null;
-
-       /** @var float UNIX timestamp */
-       protected $lastPing = 0.0;
-
-       /** @var int[] Prior mFlags values */
-       private $priorFlags = [];
-
-       /** @var Profiler */
-       protected $profiler;
-       /** @var TransactionProfiler */
-       protected $trxProfiler;
-
-       /**
-        * Constructor.
-        *
-        * FIXME: It is possible to construct a Database object with no associated
-        * connection object, by specifying no parameters to __construct(). This
-        * feature is deprecated and should be removed.
-        *
-        * DatabaseBase subclasses should not be constructed directly in external
-        * code. DatabaseBase::factory() should be used instead.
-        *
-        * @param array $params Parameters passed from DatabaseBase::factory()
-        */
-       function __construct( array $params ) {
-               global $wgDBprefix, $wgDBmwschema;
-
-               $this->srvCache = ObjectCache::getLocalServerInstance( 'hash' );
-
-               $server = $params['host'];
-               $user = $params['user'];
-               $password = $params['password'];
-               $dbName = $params['dbname'];
-               $flags = $params['flags'];
-               $tablePrefix = $params['tablePrefix'];
-               $schema = $params['schema'];
-               $foreign = $params['foreign'];
-
-               $this->cliMode = isset( $params['cliMode'] )
-                       ? $params['cliMode']
-                       : ( PHP_SAPI === 'cli' );
-
-               $this->mFlags = $flags;
-               if ( $this->mFlags & DBO_DEFAULT ) {
-                       if ( $this->cliMode ) {
-                               $this->mFlags &= ~DBO_TRX;
-                       } else {
-                               $this->mFlags |= DBO_TRX;
-                       }
-               }
-
-               $this->mSessionVars = $params['variables'];
-
-               /** Get the default table prefix*/
-               if ( $tablePrefix === 'get from global' ) {
-                       $this->mTablePrefix = $wgDBprefix;
-               } else {
-                       $this->mTablePrefix = $tablePrefix;
-               }
-
-               /** Get the database schema*/
-               if ( $schema === 'get from global' ) {
-                       $this->mSchema = $wgDBmwschema;
-               } else {
-                       $this->mSchema = $schema;
-               }
-
-               $this->mForeign = $foreign;
-
-               $this->profiler = isset( $params['profiler'] )
-                       ? $params['profiler']
-                       : Profiler::instance(); // @TODO: remove global state
-               $this->trxProfiler = isset( $params['trxProfiler'] )
-                       ? $params['trxProfiler']
-                       : new TransactionProfiler();
-               $this->connLogger = isset( $params['connLogger'] )
-                       ? $params['connLogger']
-                       : new \Psr\Log\NullLogger();
-               $this->queryLogger = isset( $params['queryLogger'] )
-                       ? $params['queryLogger']
-                       : new \Psr\Log\NullLogger();
-
-               if ( $user ) {
-                       $this->open( $server, $user, $password, $dbName );
-               }
-       }
-
-       /**
-        * Given a DB type, construct the name of the appropriate child class of
-        * DatabaseBase. This is designed to replace all of the manual stuff like:
-        *    $class = 'Database' . ucfirst( strtolower( $dbType ) );
-        * as well as validate against the canonical list of DB types we have
-        *
-        * This factory function is mostly useful for when you need to connect to a
-        * database other than the MediaWiki default (such as for external auth,
-        * an extension, et cetera). Do not use this to connect to the MediaWiki
-        * database. Example uses in core:
-        * @see LoadBalancer::reallyOpenConnection()
-        * @see ForeignDBRepo::getMasterDB()
-        * @see WebInstallerDBConnect::execute()
-        *
-        * @since 1.18
-        *
-        * @param string $dbType A possible DB type
-        * @param array $p An array of options to pass to the constructor.
-        *    Valid options are: host, user, password, dbname, flags, tablePrefix, schema, driver
-        * @throws MWException If the database driver or extension cannot be found
-        * @return DatabaseBase|null DatabaseBase subclass or null
-        */
-       final public static function factory( $dbType, $p = [] ) {
-               global $wgCommandLineMode;
-
-               $canonicalDBTypes = [
-                       'mysql' => [ 'mysqli', 'mysql' ],
-                       'postgres' => [],
-                       'sqlite' => [],
-                       'oracle' => [],
-                       'mssql' => [],
-               ];
-
-               $driver = false;
-               $dbType = strtolower( $dbType );
-               if ( isset( $canonicalDBTypes[$dbType] ) && $canonicalDBTypes[$dbType] ) {
-                       $possibleDrivers = $canonicalDBTypes[$dbType];
-                       if ( !empty( $p['driver'] ) ) {
-                               if ( in_array( $p['driver'], $possibleDrivers ) ) {
-                                       $driver = $p['driver'];
-                               } else {
-                                       throw new InvalidArgumentException( __METHOD__ .
-                                               " type '$dbType' does not support driver '{$p['driver']}'" );
-                               }
-                       } else {
-                               foreach ( $possibleDrivers as $posDriver ) {
-                                       if ( extension_loaded( $posDriver ) ) {
-                                               $driver = $posDriver;
-                                               break;
-                                       }
-                               }
-                       }
-               } else {
-                       $driver = $dbType;
-               }
-               if ( $driver === false ) {
-                       throw new MWException( __METHOD__ .
-                               " no viable database extension found for type '$dbType'" );
-               }
-
-               // Determine schema defaults. Currently Microsoft SQL Server uses $wgDBmwschema,
-               // and everything else doesn't use a schema (e.g. null)
-               // Although postgres and oracle support schemas, we don't use them (yet)
-               // to maintain backwards compatibility
-               $defaultSchemas = [
-                       'mssql' => 'get from global',
-               ];
-
-               $class = 'Database' . ucfirst( $driver );
-               if ( class_exists( $class ) && is_subclass_of( $class, 'DatabaseBase' ) ) {
-                       // Resolve some defaults for b/c
-                       $p['host'] = isset( $p['host'] ) ? $p['host'] : false;
-                       $p['user'] = isset( $p['user'] ) ? $p['user'] : false;
-                       $p['password'] = isset( $p['password'] ) ? $p['password'] : false;
-                       $p['dbname'] = isset( $p['dbname'] ) ? $p['dbname'] : false;
-                       $p['flags'] = isset( $p['flags'] ) ? $p['flags'] : 0;
-                       $p['variables'] = isset( $p['variables'] ) ? $p['variables'] : [];
-                       $p['tablePrefix'] = isset( $p['tablePrefix'] ) ? $p['tablePrefix'] : 'get from global';
-                       if ( !isset( $p['schema'] ) ) {
-                               $p['schema'] = isset( $defaultSchemas[$dbType] ) ? $defaultSchemas[$dbType] : null;
-                       }
-                       $p['foreign'] = isset( $p['foreign'] ) ? $p['foreign'] : false;
-                       $p['cliMode'] = $wgCommandLineMode;
-
-                       $conn = new $class( $p );
-                       if ( isset( $p['connLogger'] ) ) {
-                               $conn->connLogger = $p['connLogger'];
-                       }
-                       if ( isset( $p['queryLogger'] ) ) {
-                               $conn->queryLogger = $p['queryLogger'];
-                       }
-               } else {
-                       $conn = null;
-               }
-
-               return $conn;
-       }
-
-       public function setLogger( LoggerInterface $logger ) {
-               $this->quertLogger = $logger;
-       }
-
-       public function getServerInfo() {
-               return $this->getServerVersion();
-       }
-
-       /**
-        * @return string Command delimiter used by this database engine
-        */
-       public function getDelimiter() {
-               return $this->delimiter;
-       }
-
-       /**
-        * Boolean, controls output of large amounts of debug information.
-        * @param bool|null $debug
-        *   - true to enable debugging
-        *   - false to disable debugging
-        *   - omitted or null to do nothing
-        *
-        * @return bool|null Previous value of the flag
-        */
-       public function debug( $debug = null ) {
-               return wfSetBit( $this->mFlags, DBO_DEBUG, $debug );
-       }
-
-       public function bufferResults( $buffer = null ) {
-               if ( is_null( $buffer ) ) {
-                       return !(bool)( $this->mFlags & DBO_NOBUFFER );
-               } else {
-                       return !wfSetBit( $this->mFlags, DBO_NOBUFFER, !$buffer );
-               }
-       }
-
-       /**
-        * Turns on (false) or off (true) the automatic generation and sending
-        * of a "we're sorry, but there has been a database error" page on
-        * database errors. Default is on (false). When turned off, the
-        * code should use lastErrno() and lastError() to handle the
-        * situation as appropriate.
-        *
-        * Do not use this function outside of the Database classes.
-        *
-        * @param null|bool $ignoreErrors
-        * @return bool The previous value of the flag.
-        */
-       protected function ignoreErrors( $ignoreErrors = null ) {
-               return wfSetBit( $this->mFlags, DBO_IGNORE, $ignoreErrors );
-       }
-
-       public function trxLevel() {
-               return $this->mTrxLevel;
-       }
-
-       public function trxTimestamp() {
-               return $this->mTrxLevel ? $this->mTrxTimestamp : null;
-       }
-
-       public function tablePrefix( $prefix = null ) {
-               return wfSetVar( $this->mTablePrefix, $prefix );
-       }
-
-       public function dbSchema( $schema = null ) {
-               return wfSetVar( $this->mSchema, $schema );
-       }
-
-       /**
-        * Set the filehandle to copy write statements to.
-        *
-        * @param resource $fh File handle
-        */
-       public function setFileHandle( $fh ) {
-               $this->fileHandle = $fh;
-       }
-
-       public function getLBInfo( $name = null ) {
-               if ( is_null( $name ) ) {
-                       return $this->mLBInfo;
-               } else {
-                       if ( array_key_exists( $name, $this->mLBInfo ) ) {
-                               return $this->mLBInfo[$name];
-                       } else {
-                               return null;
-                       }
-               }
-       }
-
-       public function setLBInfo( $name, $value = null ) {
-               if ( is_null( $value ) ) {
-                       $this->mLBInfo = $name;
-               } else {
-                       $this->mLBInfo[$name] = $value;
-               }
-       }
-
-       /**
-        * Set a lazy-connecting DB handle to the master DB (for replication status purposes)
-        *
-        * @param IDatabase $conn
-        * @since 1.27
-        */
-       public function setLazyMasterHandle( IDatabase $conn ) {
-               $this->lazyMasterHandle = $conn;
-       }
-
-       /**
-        * @return IDatabase|null
-        * @see setLazyMasterHandle()
-        * @since 1.27
-        */
-       public function getLazyMasterHandle() {
-               return $this->lazyMasterHandle;
-       }
-
-       /**
-        * @param TransactionProfiler $profiler
-        * @since 1.27
-        */
-       public function setTransactionProfiler( TransactionProfiler $profiler ) {
-               $this->trxProfiler = $profiler;
-       }
-
-       /**
-        * Returns true if this database supports (and uses) cascading deletes
-        *
-        * @return bool
-        */
-       public function cascadingDeletes() {
-               return false;
-       }
-
-       /**
-        * Returns true if this database supports (and uses) triggers (e.g. on the page table)
-        *
-        * @return bool
-        */
-       public function cleanupTriggers() {
-               return false;
-       }
-
-       /**
-        * Returns true if this database is strict about what can be put into an IP field.
-        * Specifically, it uses a NULL value instead of an empty string.
-        *
-        * @return bool
-        */
-       public function strictIPs() {
-               return false;
-       }
-
-       /**
-        * Returns true if this database uses timestamps rather than integers
-        *
-        * @return bool
-        */
-       public function realTimestamps() {
-               return false;
-       }
-
-       public function implicitGroupby() {
-               return true;
-       }
-
-       public function implicitOrderby() {
-               return true;
-       }
-
-       /**
-        * Returns true if this database can do a native search on IP columns
-        * e.g. this works as expected: .. WHERE rc_ip = '127.42.12.102/32';
-        *
-        * @return bool
-        */
-       public function searchableIPs() {
-               return false;
-       }
-
-       /**
-        * Returns true if this database can use functional indexes
-        *
-        * @return bool
-        */
-       public function functionalIndexes() {
-               return false;
-       }
-
-       public function lastQuery() {
-               return $this->mLastQuery;
-       }
-
-       public function doneWrites() {
-               return (bool)$this->mDoneWrites;
-       }
-
-       public function lastDoneWrites() {
-               return $this->mDoneWrites ?: false;
-       }
-
-       public function writesPending() {
-               return $this->mTrxLevel && $this->mTrxDoneWrites;
-       }
-
-       public function writesOrCallbacksPending() {
-               return $this->mTrxLevel && (
-                       $this->mTrxDoneWrites || $this->mTrxIdleCallbacks || $this->mTrxPreCommitCallbacks
-               );
-       }
-
-       public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL ) {
-               if ( !$this->mTrxLevel ) {
-                       return false;
-               } elseif ( !$this->mTrxDoneWrites ) {
-                       return 0.0;
-               }
-
-               switch ( $type ) {
-                       case self::ESTIMATE_DB_APPLY:
-                               $this->ping( $rtt );
-                               $rttAdjTotal = $this->mTrxWriteAdjQueryCount * $rtt;
-                               $applyTime = max( $this->mTrxWriteAdjDuration - $rttAdjTotal, 0 );
-                               // For omitted queries, make them count as something at least
-                               $omitted = $this->mTrxWriteQueryCount - $this->mTrxWriteAdjQueryCount;
-                               $applyTime += self::TINY_WRITE_SEC * $omitted;
-
-                               return $applyTime;
-                       default: // everything
-                               return $this->mTrxWriteDuration;
-               }
-       }
-
-       public function pendingWriteCallers() {
-               return $this->mTrxLevel ? $this->mTrxWriteCallers : [];
-       }
-
-       public function isOpen() {
-               return $this->mOpened;
-       }
-
-       public function setFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
-               if ( $remember === self::REMEMBER_PRIOR ) {
-                       array_push( $this->priorFlags, $this->mFlags );
-               }
-               $this->mFlags |= $flag;
-       }
-
-       public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
-               if ( $remember === self::REMEMBER_PRIOR ) {
-                       array_push( $this->priorFlags, $this->mFlags );
-               }
-               $this->mFlags &= ~$flag;
-       }
-
-       public function restoreFlags( $state = self::RESTORE_PRIOR ) {
-               if ( !$this->priorFlags ) {
-                       return;
-               }
-
-               if ( $state === self::RESTORE_INITIAL ) {
-                       $this->mFlags = reset( $this->priorFlags );
-                       $this->priorFlags = [];
-               } else {
-                       $this->mFlags = array_pop( $this->priorFlags );
-               }
-       }
-
-       public function getFlag( $flag ) {
-               return !!( $this->mFlags & $flag );
-       }
-
-       public function getProperty( $name ) {
-               return $this->$name;
-       }
-
-       public function getWikiID() {
-               if ( $this->mTablePrefix ) {
-                       return "{$this->mDBname}-{$this->mTablePrefix}";
-               } else {
-                       return $this->mDBname;
-               }
-       }
-
-       /**
-        * Return a path to the DBMS-specific SQL file if it exists,
-        * otherwise default SQL file
-        *
-        * @param string $filename
-        * @return string
-        */
-       private function getSqlFilePath( $filename ) {
-               global $IP;
-               $dbmsSpecificFilePath = "$IP/maintenance/" . $this->getType() . "/$filename";
-               if ( file_exists( $dbmsSpecificFilePath ) ) {
-                       return $dbmsSpecificFilePath;
-               } else {
-                       return "$IP/maintenance/$filename";
-               }
-       }
-
-       /**
-        * Return a path to the DBMS-specific schema file,
-        * otherwise default to tables.sql
-        *
-        * @return string
-        */
-       public function getSchemaPath() {
-               return $this->getSqlFilePath( 'tables.sql' );
-       }
-
-       /**
-        * Return a path to the DBMS-specific update key file,
-        * otherwise default to update-keys.sql
-        *
-        * @return string
-        */
-       public function getUpdateKeysPath() {
-               return $this->getSqlFilePath( 'update-keys.sql' );
-       }
-
-       /**
-        * Get information about an index into an object
-        * @param string $table Table name
-        * @param string $index Index name
-        * @param string $fname Calling function name
-        * @return mixed Database-specific index description class or false if the index does not exist
-        */
-       abstract function indexInfo( $table, $index, $fname = __METHOD__ );
-
-       /**
-        * Wrapper for addslashes()
-        *
-        * @param string $s String to be slashed.
-        * @return string Slashed string.
-        */
-       abstract function strencode( $s );
-
-       /**
-        * Called by serialize. Throw an exception when DB connection is serialized.
-        * This causes problems on some database engines because the connection is
-        * not restored on unserialize.
-        */
-       public function __sleep() {
-               throw new RuntimeException( 'Database serialization may cause problems, since ' .
-                       'the connection is not restored on wakeup.' );
-       }
-
-       protected function installErrorHandler() {
-               $this->mPHPError = false;
-               $this->htmlErrors = ini_set( 'html_errors', '0' );
-               set_error_handler( [ $this, 'connectionErrorHandler' ] );
-       }
-
-       /**
-        * @return bool|string
-        */
-       protected function restoreErrorHandler() {
-               restore_error_handler();
-               if ( $this->htmlErrors !== false ) {
-                       ini_set( 'html_errors', $this->htmlErrors );
-               }
-               if ( $this->mPHPError ) {
-                       $error = preg_replace( '!\[<a.*</a>\]!', '', $this->mPHPError );
-                       $error = preg_replace( '!^.*?:\s?(.*)$!', '$1', $error );
-
-                       return $error;
-               } else {
-                       return false;
-               }
-       }
-
-       /**
-        * @param int $errno
-        * @param string $errstr
-        */
-       public function connectionErrorHandler( $errno, $errstr ) {
-               $this->mPHPError = $errstr;
-       }
-
-       /**
-        * Create a log context to pass to wfLogDBError or other logging functions.
-        *
-        * @param array $extras Additional data to add to context
-        * @return array
-        */
-       protected function getLogContext( array $extras = [] ) {
-               return array_merge(
-                       [
-                               'db_server' => $this->mServer,
-                               'db_name' => $this->mDBname,
-                               'db_user' => $this->mUser,
-                       ],
-                       $extras
-               );
-       }
-
-       public function close() {
-               if ( $this->mConn ) {
-                       if ( $this->trxLevel() ) {
-                               if ( !$this->mTrxAutomatic ) {
-                                       wfWarn( "Transaction still in progress (from {$this->mTrxFname}), " .
-                                               " performing implicit commit before closing connection!" );
-                               }
-
-                               $this->commit( __METHOD__, self::FLUSHING_INTERNAL );
-                       }
-
-                       $closed = $this->closeConnection();
-                       $this->mConn = false;
-               } elseif ( $this->mTrxIdleCallbacks || $this->mTrxEndCallbacks ) { // sanity
-                       throw new RuntimeException( "Transaction callbacks still pending." );
-               } else {
-                       $closed = true;
-               }
-               $this->mOpened = false;
-
-               return $closed;
-       }
-
-       /**
-        * Make sure isOpen() returns true as a sanity check
-        *
-        * @throws DBUnexpectedError
-        */
-       protected function assertOpen() {
-               if ( !$this->isOpen() ) {
-                       throw new DBUnexpectedError( $this, "DB connection was already closed." );
-               }
-       }
-
-       /**
-        * Closes underlying database connection
-        * @since 1.20
-        * @return bool Whether connection was closed successfully
-        */
-       abstract protected function closeConnection();
-
-       function reportConnectionError( $error = 'Unknown error' ) {
-               $myError = $this->lastError();
-               if ( $myError ) {
-                       $error = $myError;
-               }
-
-               # New method
-               throw new DBConnectionError( $this, $error );
-       }
-
-       /**
-        * The DBMS-dependent part of query()
-        *
-        * @param string $sql SQL query.
-        * @return ResultWrapper|bool Result object to feed to fetchObject,
-        *   fetchRow, ...; or false on failure
-        */
-       abstract protected function doQuery( $sql );
-
-       /**
-        * Determine whether a query writes to the DB.
-        * Should return true if unsure.
-        *
-        * @param string $sql
-        * @return bool
-        */
-       protected function isWriteQuery( $sql ) {
-               return !preg_match(
-                       '/^(?:SELECT|BEGIN|ROLLBACK|COMMIT|SET|SHOW|EXPLAIN|\(SELECT)\b/i', $sql );
-       }
-
-       /**
-        * @param $sql
-        * @return string|null
-        */
-       protected function getQueryVerb( $sql ) {
-               return preg_match( '/^\s*([a-z]+)/i', $sql, $m ) ? strtoupper( $m[1] ) : null;
-       }
-
-       /**
-        * Determine whether a SQL statement is sensitive to isolation level.
-        * A SQL statement is considered transactable if its result could vary
-        * depending on the transaction isolation level. Operational commands
-        * such as 'SET' and 'SHOW' are not considered to be transactable.
-        *
-        * @param string $sql
-        * @return bool
-        */
-       protected function isTransactableQuery( $sql ) {
-               $verb = $this->getQueryVerb( $sql );
-               return !in_array( $verb, [ 'BEGIN', 'COMMIT', 'ROLLBACK', 'SHOW', 'SET' ], true );
-       }
-
-       public function query( $sql, $fname = __METHOD__, $tempIgnore = false ) {
-               global $wgUser;
-
-               $priorWritesPending = $this->writesOrCallbacksPending();
-               $this->mLastQuery = $sql;
-
-               $isWrite = $this->isWriteQuery( $sql );
-               if ( $isWrite ) {
-                       $reason = $this->getReadOnlyReason();
-                       if ( $reason !== false ) {
-                               throw new DBReadOnlyError( $this, "Database is read-only: $reason" );
-                       }
-                       # Set a flag indicating that writes have been done
-                       $this->mDoneWrites = microtime( true );
-               }
-
-               # Add a comment for easy SHOW PROCESSLIST interpretation
-               if ( is_object( $wgUser ) && $wgUser->isItemLoaded( 'name' ) ) {
-                       $userName = $wgUser->getName();
-                       if ( mb_strlen( $userName ) > 15 ) {
-                               $userName = mb_substr( $userName, 0, 15 ) . '...';
-                       }
-                       $userName = str_replace( '/', '', $userName );
-               } else {
-                       $userName = '';
-               }
-
-               // Add trace comment to the begin of the sql string, right after the operator.
-               // Or, for one-word queries (like "BEGIN" or COMMIT") add it to the end (bug 42598)
-               $commentedSql = preg_replace( '/\s|$/', " /* $fname $userName */ ", $sql, 1 );
-
-               # Start implicit transactions that wrap the request if DBO_TRX is enabled
-               if ( !$this->mTrxLevel && $this->getFlag( DBO_TRX )
-                       && $this->isTransactableQuery( $sql )
-               ) {
-                       $this->begin( __METHOD__ . " ($fname)", self::TRANSACTION_INTERNAL );
-                       $this->mTrxAutomatic = true;
-               }
-
-               # Keep track of whether the transaction has write queries pending
-               if ( $this->mTrxLevel && !$this->mTrxDoneWrites && $isWrite ) {
-                       $this->mTrxDoneWrites = true;
-                       $this->trxProfiler->transactionWritingIn(
-                               $this->mServer, $this->mDBname, $this->mTrxShortId );
-               }
-
-               if ( $this->debug() ) {
-                       $this->queryLogger->debug( "{$this->mDBname} {$commentedSql}" );
-               }
-
-               # Avoid fatals if close() was called
-               $this->assertOpen();
-
-               # Send the query to the server
-               $ret = $this->doProfiledQuery( $sql, $commentedSql, $isWrite, $fname );
-
-               # Try reconnecting if the connection was lost
-               if ( false === $ret && $this->wasErrorReissuable() ) {
-                       $recoverable = $this->canRecoverFromDisconnect( $sql, $priorWritesPending );
-                       # Stash the last error values before anything might clear them
-                       $lastError = $this->lastError();
-                       $lastErrno = $this->lastErrno();
-                       # Update state tracking to reflect transaction loss due to disconnection
-                       $this->handleTransactionLoss();
-                       if ( $this->reconnect() ) {
-                               $msg = __METHOD__ . ": lost connection to {$this->getServer()}; reconnected";
-                               $this->connLogger->warning( $msg );
-                               $this->queryLogger->warning( "$msg:\n" . wfBacktrace( true ) );
-
-                               if ( !$recoverable ) {
-                                       # Callers may catch the exception and continue to use the DB
-                                       $this->reportQueryError( $lastError, $lastErrno, $sql, $fname );
-                               } else {
-                                       # Should be safe to silently retry the query
-                                       $ret = $this->doProfiledQuery( $sql, $commentedSql, $isWrite, $fname );
-                               }
-                       } else {
-                               $msg = __METHOD__ . ": lost connection to {$this->getServer()} permanently";
-                               $this->connLogger->error( $msg );
-                       }
-               }
-
-               if ( false === $ret ) {
-                       # Deadlocks cause the entire transaction to abort, not just the statement.
-                       # http://dev.mysql.com/doc/refman/5.7/en/innodb-error-handling.html
-                       # https://www.postgresql.org/docs/9.1/static/explicit-locking.html
-                       if ( $this->wasDeadlock() ) {
-                               if ( $this->explicitTrxActive() || $priorWritesPending ) {
-                                       $tempIgnore = false; // not recoverable
-                               }
-                               # Update state tracking to reflect transaction loss
-                               $this->handleTransactionLoss();
-                       }
-
-                       $this->reportQueryError(
-                               $this->lastError(), $this->lastErrno(), $sql, $fname, $tempIgnore );
-               }
-
-               $res = $this->resultObject( $ret );
-
-               return $res;
-       }
-
-       private function doProfiledQuery( $sql, $commentedSql, $isWrite, $fname ) {
-               $isMaster = !is_null( $this->getLBInfo( 'master' ) );
-               # generalizeSQL() will probably cut down the query to reasonable
-               # logging size most of the time. The substr is really just a sanity check.
-               if ( $isMaster ) {
-                       $queryProf = 'query-m: ' . substr( DatabaseBase::generalizeSQL( $sql ), 0, 255 );
-               } else {
-                       $queryProf = 'query: ' . substr( DatabaseBase::generalizeSQL( $sql ), 0, 255 );
-               }
-
-               # Include query transaction state
-               $queryProf .= $this->mTrxShortId ? " [TRX#{$this->mTrxShortId}]" : "";
-
-               $startTime = microtime( true );
-               $this->profiler->profileIn( $queryProf );
-               $ret = $this->doQuery( $commentedSql );
-               $this->profiler->profileOut( $queryProf );
-               $queryRuntime = max( microtime( true ) - $startTime, 0.0 );
-
-               unset( $queryProfSection ); // profile out (if set)
-
-               if ( $ret !== false ) {
-                       $this->lastPing = $startTime;
-                       if ( $isWrite && $this->mTrxLevel ) {
-                               $this->updateTrxWriteQueryTime( $sql, $queryRuntime );
-                               $this->mTrxWriteCallers[] = $fname;
-                       }
-               }
-
-               if ( $sql === self::PING_QUERY ) {
-                       $this->mRTTEstimate = $queryRuntime;
-               }
-
-               $this->trxProfiler->recordQueryCompletion(
-                       $queryProf, $startTime, $isWrite, $this->affectedRows()
-               );
-               MWDebug::query( $sql, $fname, $isMaster, $queryRuntime );
-
-               return $ret;
-       }
-
-       /**
-        * Update the estimated run-time of a query, not counting large row lock times
-        *
-        * LoadBalancer can be set to rollback transactions that will create huge replication
-        * lag. It bases this estimate off of pendingWriteQueryDuration(). Certain simple
-        * queries, like inserting a row can take a long time due to row locking. This method
-        * uses some simple heuristics to discount those cases.
-        *
-        * @param string $sql A SQL write query
-        * @param float $runtime Total runtime, including RTT
-        */
-       private function updateTrxWriteQueryTime( $sql, $runtime ) {
-               // Whether this is indicative of replica DB runtime (except for RBR or ws_repl)
-               $indicativeOfReplicaRuntime = true;
-               if ( $runtime > self::SLOW_WRITE_SEC ) {
-                       $verb = $this->getQueryVerb( $sql );
-                       // insert(), upsert(), replace() are fast unless bulky in size or blocked on locks
-                       if ( $verb === 'INSERT' ) {
-                               $indicativeOfReplicaRuntime = $this->affectedRows() > self::SMALL_WRITE_ROWS;
-                       } elseif ( $verb === 'REPLACE' ) {
-                               $indicativeOfReplicaRuntime = $this->affectedRows() > self::SMALL_WRITE_ROWS / 2;
-                       }
-               }
-
-               $this->mTrxWriteDuration += $runtime;
-               $this->mTrxWriteQueryCount += 1;
-               if ( $indicativeOfReplicaRuntime ) {
-                       $this->mTrxWriteAdjDuration += $runtime;
-                       $this->mTrxWriteAdjQueryCount += 1;
-               }
-       }
-
-       private function canRecoverFromDisconnect( $sql, $priorWritesPending ) {
-               # Transaction dropped; this can mean lost writes, or REPEATABLE-READ snapshots.
-               # Dropped connections also mean that named locks are automatically released.
-               # Only allow error suppression in autocommit mode or when the lost transaction
-               # didn't matter anyway (aside from DBO_TRX snapshot loss).
-               if ( $this->mNamedLocksHeld ) {
-                       return false; // possible critical section violation
-               } elseif ( $sql === 'COMMIT' ) {
-                       return !$priorWritesPending; // nothing written anyway? (T127428)
-               } elseif ( $sql === 'ROLLBACK' ) {
-                       return true; // transaction lost...which is also what was requested :)
-               } elseif ( $this->explicitTrxActive() ) {
-                       return false; // don't drop atomocity
-               } elseif ( $priorWritesPending ) {
-                       return false; // prior writes lost from implicit transaction
-               }
-
-               return true;
-       }
-
-       private function handleTransactionLoss() {
-               $this->mTrxLevel = 0;
-               $this->mTrxIdleCallbacks = []; // bug 65263
-               $this->mTrxPreCommitCallbacks = []; // bug 65263
-               try {
-                       // Handle callbacks in mTrxEndCallbacks
-                       $this->runOnTransactionIdleCallbacks( self::TRIGGER_ROLLBACK );
-                       $this->runTransactionListenerCallbacks( self::TRIGGER_ROLLBACK );
-                       return null;
-               } catch ( Exception $e ) {
-                       // Already logged; move on...
-                       return $e;
-               }
-       }
-
-       public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
-               if ( $this->ignoreErrors() || $tempIgnore ) {
-                       $this->queryLogger->debug( "SQL ERROR (ignored): $error\n" );
-               } else {
-                       $sql1line = mb_substr( str_replace( "\n", "\\n", $sql ), 0, 5 * 1024 );
-                       wfLogDBError(
-                               "{fname}\t{db_server}\t{errno}\t{error}\t{sql1line}",
-                               $this->getLogContext( [
-                                       'method' => __METHOD__,
-                                       'errno' => $errno,
-                                       'error' => $error,
-                                       'sql1line' => $sql1line,
-                                       'fname' => $fname,
-                               ] )
-                       );
-                       $this->queryLogger->debug( "SQL ERROR: " . $error . "\n" );
-                       throw new DBQueryError( $this, $error, $errno, $sql, $fname );
-               }
-       }
-
-       /**
-        * Intended to be compatible with the PEAR::DB wrapper functions.
-        * http://pear.php.net/manual/en/package.database.db.intro-execute.php
-        *
-        * ? = scalar value, quoted as necessary
-        * ! = raw SQL bit (a function for instance)
-        * & = filename; reads the file and inserts as a blob
-        *     (we don't use this though...)
-        *
-        * @param string $sql
-        * @param string $func
-        *
-        * @return array
-        */
-       protected function prepare( $sql, $func = 'DatabaseBase::prepare' ) {
-               /* MySQL doesn't support prepared statements (yet), so just
-                * pack up the query for reference. We'll manually replace
-                * the bits later.
-                */
-               return [ 'query' => $sql, 'func' => $func ];
-       }
-
-       /**
-        * Free a prepared query, generated by prepare().
-        * @param string $prepared
-        */
-       protected function freePrepared( $prepared ) {
-               /* No-op by default */
-       }
-
-       /**
-        * Execute a prepared query with the various arguments
-        * @param string $prepared The prepared sql
-        * @param mixed $args Either an array here, or put scalars as varargs
-        *
-        * @return ResultWrapper
-        */
-       public function execute( $prepared, $args = null ) {
-               if ( !is_array( $args ) ) {
-                       # Pull the var args
-                       $args = func_get_args();
-                       array_shift( $args );
-               }
-
-               $sql = $this->fillPrepared( $prepared['query'], $args );
-
-               return $this->query( $sql, $prepared['func'] );
-       }
-
-       /**
-        * For faking prepared SQL statements on DBs that don't support it directly.
-        *
-        * @param string $preparedQuery A 'preparable' SQL statement
-        * @param array $args Array of Arguments to fill it with
-        * @return string Executable SQL
-        */
-       public function fillPrepared( $preparedQuery, $args ) {
-               reset( $args );
-               $this->preparedArgs =& $args;
-
-               return preg_replace_callback( '/(\\\\[?!&]|[?!&])/',
-                       [ &$this, 'fillPreparedArg' ], $preparedQuery );
-       }
-
-       /**
-        * preg_callback func for fillPrepared()
-        * The arguments should be in $this->preparedArgs and must not be touched
-        * while we're doing this.
-        *
-        * @param array $matches
-        * @throws DBUnexpectedError
-        * @return string
-        */
-       protected function fillPreparedArg( $matches ) {
-               switch ( $matches[1] ) {
-                       case '\\?':
-                               return '?';
-                       case '\\!':
-                               return '!';
-                       case '\\&':
-                               return '&';
-               }
-
-               list( /* $n */, $arg ) = each( $this->preparedArgs );
-
-               switch ( $matches[1] ) {
-                       case '?':
-                               return $this->addQuotes( $arg );
-                       case '!':
-                               return $arg;
-                       case '&':
-                               # return $this->addQuotes( file_get_contents( $arg ) );
-                               throw new DBUnexpectedError(
-                                       $this,
-                                       '& mode is not implemented. If it\'s really needed, uncomment the line above.'
-                               );
-                       default:
-                               throw new DBUnexpectedError(
-                                       $this,
-                                       'Received invalid match. This should never happen!'
-                               );
-               }
-       }
-
-       public function freeResult( $res ) {
-       }
-
-       public function selectField(
-               $table, $var, $cond = '', $fname = __METHOD__, $options = []
-       ) {
-               if ( $var === '*' ) { // sanity
-                       throw new DBUnexpectedError( $this, "Cannot use a * field: got '$var'" );
-               }
-
-               if ( !is_array( $options ) ) {
-                       $options = [ $options ];
-               }
-
-               $options['LIMIT'] = 1;
-
-               $res = $this->select( $table, $var, $cond, $fname, $options );
-               if ( $res === false || !$this->numRows( $res ) ) {
-                       return false;
-               }
-
-               $row = $this->fetchRow( $res );
-
-               if ( $row !== false ) {
-                       return reset( $row );
-               } else {
-                       return false;
-               }
-       }
-
-       public function selectFieldValues(
-               $table, $var, $cond = '', $fname = __METHOD__, $options = [], $join_conds = []
-       ) {
-               if ( $var === '*' ) { // sanity
-                       throw new DBUnexpectedError( $this, "Cannot use a * field" );
-               } elseif ( !is_string( $var ) ) { // sanity
-                       throw new DBUnexpectedError( $this, "Cannot use an array of fields" );
-               }
-
-               if ( !is_array( $options ) ) {
-                       $options = [ $options ];
-               }
-
-               $res = $this->select( $table, $var, $cond, $fname, $options, $join_conds );
-               if ( $res === false ) {
-                       return false;
-               }
-
-               $values = [];
-               foreach ( $res as $row ) {
-                       $values[] = $row->$var;
-               }
-
-               return $values;
-       }
-
-       /**
-        * Returns an optional USE INDEX clause to go after the table, and a
-        * string to go at the end of the query.
-        *
-        * @param array $options Associative array of options to be turned into
-        *   an SQL query, valid keys are listed in the function.
-        * @return array
-        * @see DatabaseBase::select()
-        */
-       public function makeSelectOptions( $options ) {
-               $preLimitTail = $postLimitTail = '';
-               $startOpts = '';
-
-               $noKeyOptions = [];
-
-               foreach ( $options as $key => $option ) {
-                       if ( is_numeric( $key ) ) {
-                               $noKeyOptions[$option] = true;
-                       }
-               }
-
-               $preLimitTail .= $this->makeGroupByWithHaving( $options );
-
-               $preLimitTail .= $this->makeOrderBy( $options );
-
-               // if (isset($options['LIMIT'])) {
-               //      $tailOpts .= $this->limitResult('', $options['LIMIT'],
-               //              isset($options['OFFSET']) ? $options['OFFSET']
-               //              : false);
-               // }
-
-               if ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
-                       $postLimitTail .= ' FOR UPDATE';
-               }
-
-               if ( isset( $noKeyOptions['LOCK IN SHARE MODE'] ) ) {
-                       $postLimitTail .= ' LOCK IN SHARE MODE';
-               }
-
-               if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) {
-                       $startOpts .= 'DISTINCT';
-               }
-
-               # Various MySQL extensions
-               if ( isset( $noKeyOptions['STRAIGHT_JOIN'] ) ) {
-                       $startOpts .= ' /*! STRAIGHT_JOIN */';
-               }
-
-               if ( isset( $noKeyOptions['HIGH_PRIORITY'] ) ) {
-                       $startOpts .= ' HIGH_PRIORITY';
-               }
-
-               if ( isset( $noKeyOptions['SQL_BIG_RESULT'] ) ) {
-                       $startOpts .= ' SQL_BIG_RESULT';
-               }
-
-               if ( isset( $noKeyOptions['SQL_BUFFER_RESULT'] ) ) {
-                       $startOpts .= ' SQL_BUFFER_RESULT';
-               }
-
-               if ( isset( $noKeyOptions['SQL_SMALL_RESULT'] ) ) {
-                       $startOpts .= ' SQL_SMALL_RESULT';
-               }
-
-               if ( isset( $noKeyOptions['SQL_CALC_FOUND_ROWS'] ) ) {
-                       $startOpts .= ' SQL_CALC_FOUND_ROWS';
-               }
-
-               if ( isset( $noKeyOptions['SQL_CACHE'] ) ) {
-                       $startOpts .= ' SQL_CACHE';
-               }
-
-               if ( isset( $noKeyOptions['SQL_NO_CACHE'] ) ) {
-                       $startOpts .= ' SQL_NO_CACHE';
-               }
-
-               if ( isset( $options['USE INDEX'] ) && is_string( $options['USE INDEX'] ) ) {
-                       $useIndex = $this->useIndexClause( $options['USE INDEX'] );
-               } else {
-                       $useIndex = '';
-               }
-               if ( isset( $options['IGNORE INDEX'] ) && is_string( $options['IGNORE INDEX'] ) ) {
-                       $ignoreIndex = $this->ignoreIndexClause( $options['IGNORE INDEX'] );
-               } else {
-                       $ignoreIndex = '';
-               }
-
-               return [ $startOpts, $useIndex, $preLimitTail, $postLimitTail, $ignoreIndex ];
-       }
-
-       /**
-        * Returns an optional GROUP BY with an optional HAVING
-        *
-        * @param array $options Associative array of options
-        * @return string
-        * @see DatabaseBase::select()
-        * @since 1.21
-        */
-       public function makeGroupByWithHaving( $options ) {
-               $sql = '';
-               if ( isset( $options['GROUP BY'] ) ) {
-                       $gb = is_array( $options['GROUP BY'] )
-                               ? implode( ',', $options['GROUP BY'] )
-                               : $options['GROUP BY'];
-                       $sql .= ' GROUP BY ' . $gb;
-               }
-               if ( isset( $options['HAVING'] ) ) {
-                       $having = is_array( $options['HAVING'] )
-                               ? $this->makeList( $options['HAVING'], LIST_AND )
-                               : $options['HAVING'];
-                       $sql .= ' HAVING ' . $having;
-               }
-
-               return $sql;
-       }
-
-       /**
-        * Returns an optional ORDER BY
-        *
-        * @param array $options Associative array of options
-        * @return string
-        * @see DatabaseBase::select()
-        * @since 1.21
-        */
-       public function makeOrderBy( $options ) {
-               if ( isset( $options['ORDER BY'] ) ) {
-                       $ob = is_array( $options['ORDER BY'] )
-                               ? implode( ',', $options['ORDER BY'] )
-                               : $options['ORDER BY'];
-
-                       return ' ORDER BY ' . $ob;
-               }
-
-               return '';
-       }
-
-       // See IDatabase::select for the docs for this function
-       public function select( $table, $vars, $conds = '', $fname = __METHOD__,
-               $options = [], $join_conds = [] ) {
-               $sql = $this->selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds );
-
-               return $this->query( $sql, $fname );
-       }
-
-       public function selectSQLText( $table, $vars, $conds = '', $fname = __METHOD__,
-               $options = [], $join_conds = []
-       ) {
-               if ( is_array( $vars ) ) {
-                       $vars = implode( ',', $this->fieldNamesWithAlias( $vars ) );
-               }
-
-               $options = (array)$options;
-               $useIndexes = ( isset( $options['USE INDEX'] ) && is_array( $options['USE INDEX'] ) )
-                       ? $options['USE INDEX']
-                       : [];
-               $ignoreIndexes = ( isset( $options['IGNORE INDEX'] ) && is_array( $options['IGNORE INDEX'] ) )
-                       ? $options['IGNORE INDEX']
-                       : [];
-
-               if ( is_array( $table ) ) {
-                       $from = ' FROM ' .
-                               $this->tableNamesWithIndexClauseOrJOIN( $table, $useIndexes, $ignoreIndexes, $join_conds );
-               } elseif ( $table != '' ) {
-                       if ( $table[0] == ' ' ) {
-                               $from = ' FROM ' . $table;
-                       } else {
-                               $from = ' FROM ' .
-                                       $this->tableNamesWithIndexClauseOrJOIN( [ $table ], $useIndexes, $ignoreIndexes, [] );
-                       }
-               } else {
-                       $from = '';
-               }
-
-               list( $startOpts, $useIndex, $preLimitTail, $postLimitTail, $ignoreIndex ) =
-                       $this->makeSelectOptions( $options );
-
-               if ( !empty( $conds ) ) {
-                       if ( is_array( $conds ) ) {
-                               $conds = $this->makeList( $conds, LIST_AND );
-                       }
-                       $sql = "SELECT $startOpts $vars $from $useIndex $ignoreIndex WHERE $conds $preLimitTail";
-               } else {
-                       $sql = "SELECT $startOpts $vars $from $useIndex $ignoreIndex $preLimitTail";
-               }
-
-               if ( isset( $options['LIMIT'] ) ) {
-                       $sql = $this->limitResult( $sql, $options['LIMIT'],
-                               isset( $options['OFFSET'] ) ? $options['OFFSET'] : false );
-               }
-               $sql = "$sql $postLimitTail";
-
-               if ( isset( $options['EXPLAIN'] ) ) {
-                       $sql = 'EXPLAIN ' . $sql;
-               }
-
-               return $sql;
-       }
-
-       public function selectRow( $table, $vars, $conds, $fname = __METHOD__,
-               $options = [], $join_conds = []
-       ) {
-               $options = (array)$options;
-               $options['LIMIT'] = 1;
-               $res = $this->select( $table, $vars, $conds, $fname, $options, $join_conds );
-
-               if ( $res === false ) {
-                       return false;
-               }
-
-               if ( !$this->numRows( $res ) ) {
-                       return false;
-               }
-
-               $obj = $this->fetchObject( $res );
-
-               return $obj;
-       }
-
-       public function estimateRowCount(
-               $table, $vars = '*', $conds = '', $fname = __METHOD__, $options = []
-       ) {
-               $rows = 0;
-               $res = $this->select( $table, [ 'rowcount' => 'COUNT(*)' ], $conds, $fname, $options );
-
-               if ( $res ) {
-                       $row = $this->fetchRow( $res );
-                       $rows = ( isset( $row['rowcount'] ) ) ? (int)$row['rowcount'] : 0;
-               }
-
-               return $rows;
-       }
-
-       public function selectRowCount(
-               $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
-       ) {
-               $rows = 0;
-               $sql = $this->selectSQLText( $tables, '1', $conds, $fname, $options, $join_conds );
-               $res = $this->query( "SELECT COUNT(*) AS rowcount FROM ($sql) tmp_count", $fname );
-
-               if ( $res ) {
-                       $row = $this->fetchRow( $res );
-                       $rows = ( isset( $row['rowcount'] ) ) ? (int)$row['rowcount'] : 0;
-               }
-
-               return $rows;
-       }
-
-       /**
-        * Removes most variables from an SQL query and replaces them with X or N for numbers.
-        * It's only slightly flawed. Don't use for anything important.
-        *
-        * @param string $sql A SQL Query
-        *
-        * @return string
-        */
-       protected static function generalizeSQL( $sql ) {
-               # This does the same as the regexp below would do, but in such a way
-               # as to avoid crashing php on some large strings.
-               # $sql = preg_replace( "/'([^\\\\']|\\\\.)*'|\"([^\\\\\"]|\\\\.)*\"/", "'X'", $sql );
-
-               $sql = str_replace( "\\\\", '', $sql );
-               $sql = str_replace( "\\'", '', $sql );
-               $sql = str_replace( "\\\"", '', $sql );
-               $sql = preg_replace( "/'.*'/s", "'X'", $sql );
-               $sql = preg_replace( '/".*"/s', "'X'", $sql );
-
-               # All newlines, tabs, etc replaced by single space
-               $sql = preg_replace( '/\s+/', ' ', $sql );
-
-               # All numbers => N,
-               # except the ones surrounded by characters, e.g. l10n
-               $sql = preg_replace( '/-?\d+(,-?\d+)+/s', 'N,...,N', $sql );
-               $sql = preg_replace( '/(?<![a-zA-Z])-?\d+(?![a-zA-Z])/s', 'N', $sql );
-
-               return $sql;
-       }
-
-       public function fieldExists( $table, $field, $fname = __METHOD__ ) {
-               $info = $this->fieldInfo( $table, $field );
-
-               return (bool)$info;
-       }
-
-       public function indexExists( $table, $index, $fname = __METHOD__ ) {
-               if ( !$this->tableExists( $table ) ) {
-                       return null;
-               }
-
-               $info = $this->indexInfo( $table, $index, $fname );
-               if ( is_null( $info ) ) {
-                       return null;
-               } else {
-                       return $info !== false;
-               }
-       }
-
-       public function tableExists( $table, $fname = __METHOD__ ) {
-               $table = $this->tableName( $table );
-               $old = $this->ignoreErrors( true );
-               $res = $this->query( "SELECT 1 FROM $table LIMIT 1", $fname );
-               $this->ignoreErrors( $old );
-
-               return (bool)$res;
-       }
-
-       public function indexUnique( $table, $index ) {
-               $indexInfo = $this->indexInfo( $table, $index );
-
-               if ( !$indexInfo ) {
-                       return null;
-               }
-
-               return !$indexInfo[0]->Non_unique;
-       }
-
-       /**
-        * Helper for DatabaseBase::insert().
-        *
-        * @param array $options
-        * @return string
-        */
-       protected function makeInsertOptions( $options ) {
-               return implode( ' ', $options );
-       }
-
-       public function insert( $table, $a, $fname = __METHOD__, $options = [] ) {
-               # No rows to insert, easy just return now
-               if ( !count( $a ) ) {
-                       return true;
-               }
-
-               $table = $this->tableName( $table );
-
-               if ( !is_array( $options ) ) {
-                       $options = [ $options ];
-               }
-
-               $fh = null;
-               if ( isset( $options['fileHandle'] ) ) {
-                       $fh = $options['fileHandle'];
-               }
-               $options = $this->makeInsertOptions( $options );
-
-               if ( isset( $a[0] ) && is_array( $a[0] ) ) {
-                       $multi = true;
-                       $keys = array_keys( $a[0] );
-               } else {
-                       $multi = false;
-                       $keys = array_keys( $a );
-               }
-
-               $sql = 'INSERT ' . $options .
-                       " INTO $table (" . implode( ',', $keys ) . ') VALUES ';
-
-               if ( $multi ) {
-                       $first = true;
-                       foreach ( $a as $row ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $sql .= ',';
-                               }
-                               $sql .= '(' . $this->makeList( $row ) . ')';
-                       }
-               } else {
-                       $sql .= '(' . $this->makeList( $a ) . ')';
-               }
-
-               if ( $fh !== null && false === fwrite( $fh, $sql ) ) {
-                       return false;
-               } elseif ( $fh !== null ) {
-                       return true;
-               }
-
-               return (bool)$this->query( $sql, $fname );
-       }
-
-       /**
-        * Make UPDATE options array for DatabaseBase::makeUpdateOptions
-        *
-        * @param array $options
-        * @return array
-        */
-       protected function makeUpdateOptionsArray( $options ) {
-               if ( !is_array( $options ) ) {
-                       $options = [ $options ];
-               }
-
-               $opts = [];
-
-               if ( in_array( 'LOW_PRIORITY', $options ) ) {
-                       $opts[] = $this->lowPriorityOption();
-               }
-
-               if ( in_array( 'IGNORE', $options ) ) {
-                       $opts[] = 'IGNORE';
-               }
-
-               return $opts;
-       }
-
-       /**
-        * Make UPDATE options for the DatabaseBase::update function
-        *
-        * @param array $options The options passed to DatabaseBase::update
-        * @return string
-        */
-       protected function makeUpdateOptions( $options ) {
-               $opts = $this->makeUpdateOptionsArray( $options );
-
-               return implode( ' ', $opts );
-       }
-
-       function update( $table, $values, $conds, $fname = __METHOD__, $options = [] ) {
-               $table = $this->tableName( $table );
-               $opts = $this->makeUpdateOptions( $options );
-               $sql = "UPDATE $opts $table SET " . $this->makeList( $values, LIST_SET );
-
-               if ( $conds !== [] && $conds !== '*' ) {
-                       $sql .= " WHERE " . $this->makeList( $conds, LIST_AND );
-               }
-
-               return $this->query( $sql, $fname );
-       }
-
-       public function makeList( $a, $mode = LIST_COMMA ) {
-               if ( !is_array( $a ) ) {
-                       throw new DBUnexpectedError( $this, 'DatabaseBase::makeList called with incorrect parameters' );
-               }
-
-               $first = true;
-               $list = '';
-
-               foreach ( $a as $field => $value ) {
-                       if ( !$first ) {
-                               if ( $mode == LIST_AND ) {
-                                       $list .= ' AND ';
-                               } elseif ( $mode == LIST_OR ) {
-                                       $list .= ' OR ';
-                               } else {
-                                       $list .= ',';
-                               }
-                       } else {
-                               $first = false;
-                       }
-
-                       if ( ( $mode == LIST_AND || $mode == LIST_OR ) && is_numeric( $field ) ) {
-                               $list .= "($value)";
-                       } elseif ( ( $mode == LIST_SET ) && is_numeric( $field ) ) {
-                               $list .= "$value";
-                       } elseif ( ( $mode == LIST_AND || $mode == LIST_OR ) && is_array( $value ) ) {
-                               // Remove null from array to be handled separately if found
-                               $includeNull = false;
-                               foreach ( array_keys( $value, null, true ) as $nullKey ) {
-                                       $includeNull = true;
-                                       unset( $value[$nullKey] );
-                               }
-                               if ( count( $value ) == 0 && !$includeNull ) {
-                                       throw new InvalidArgumentException( __METHOD__ . ": empty input for field $field" );
-                               } elseif ( count( $value ) == 0 ) {
-                                       // only check if $field is null
-                                       $list .= "$field IS NULL";
-                               } else {
-                                       // IN clause contains at least one valid element
-                                       if ( $includeNull ) {
-                                               // Group subconditions to ensure correct precedence
-                                               $list .= '(';
-                                       }
-                                       if ( count( $value ) == 1 ) {
-                                               // Special-case single values, as IN isn't terribly efficient
-                                               // Don't necessarily assume the single key is 0; we don't
-                                               // enforce linear numeric ordering on other arrays here.
-                                               $value = array_values( $value )[0];
-                                               $list .= $field . " = " . $this->addQuotes( $value );
-                                       } else {
-                                               $list .= $field . " IN (" . $this->makeList( $value ) . ") ";
-                                       }
-                                       // if null present in array, append IS NULL
-                                       if ( $includeNull ) {
-                                               $list .= " OR $field IS NULL)";
-                                       }
-                               }
-                       } elseif ( $value === null ) {
-                               if ( $mode == LIST_AND || $mode == LIST_OR ) {
-                                       $list .= "$field IS ";
-                               } elseif ( $mode == LIST_SET ) {
-                                       $list .= "$field = ";
-                               }
-                               $list .= 'NULL';
-                       } else {
-                               if ( $mode == LIST_AND || $mode == LIST_OR || $mode == LIST_SET ) {
-                                       $list .= "$field = ";
-                               }
-                               $list .= $mode == LIST_NAMES ? $value : $this->addQuotes( $value );
-                       }
-               }
-
-               return $list;
-       }
-
-       public function makeWhereFrom2d( $data, $baseKey, $subKey ) {
-               $conds = [];
-
-               foreach ( $data as $base => $sub ) {
-                       if ( count( $sub ) ) {
-                               $conds[] = $this->makeList(
-                                       [ $baseKey => $base, $subKey => array_keys( $sub ) ],
-                                       LIST_AND );
-                       }
-               }
-
-               if ( $conds ) {
-                       return $this->makeList( $conds, LIST_OR );
-               } else {
-                       // Nothing to search for...
-                       return false;
-               }
-       }
-
-       /**
-        * Return aggregated value alias
-        *
-        * @param array $valuedata
-        * @param string $valuename
-        *
-        * @return string
-        */
-       public function aggregateValue( $valuedata, $valuename = 'value' ) {
-               return $valuename;
-       }
-
-       public function bitNot( $field ) {
-               return "(~$field)";
-       }
-
-       public function bitAnd( $fieldLeft, $fieldRight ) {
-               return "($fieldLeft & $fieldRight)";
-       }
-
-       public function bitOr( $fieldLeft, $fieldRight ) {
-               return "($fieldLeft | $fieldRight)";
-       }
-
-       public function buildConcat( $stringList ) {
-               return 'CONCAT(' . implode( ',', $stringList ) . ')';
-       }
-
-       public function buildGroupConcatField(
-               $delim, $table, $field, $conds = '', $join_conds = []
-       ) {
-               $fld = "GROUP_CONCAT($field SEPARATOR " . $this->addQuotes( $delim ) . ')';
-
-               return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
-       }
-
-       /**
-        * @param string $field Field or column to cast
-        * @return string
-        * @since 1.28
-        */
-       public function buildStringCast( $field ) {
-               return $field;
-       }
-
-       public function selectDB( $db ) {
-               # Stub. Shouldn't cause serious problems if it's not overridden, but
-               # if your database engine supports a concept similar to MySQL's
-               # databases you may as well.
-               $this->mDBname = $db;
-
-               return true;
-       }
-
-       public function getDBname() {
-               return $this->mDBname;
-       }
-
-       public function getServer() {
-               return $this->mServer;
-       }
-
-       /**
-        * Format a table name ready for use in constructing an SQL query
-        *
-        * This does two important things: it quotes the table names to clean them up,
-        * and it adds a table prefix if only given a table name with no quotes.
-        *
-        * All functions of this object which require a table name call this function
-        * themselves. Pass the canonical name to such functions. This is only needed
-        * when calling query() directly.
-        *
-        * @note This function does not sanitize user input. It is not safe to use
-        *   this function to escape user input.
-        * @param string $name Database table name
-        * @param string $format One of:
-        *   quoted - Automatically pass the table name through addIdentifierQuotes()
-        *            so that it can be used in a query.
-        *   raw - Do not add identifier quotes to the table name
-        * @return string Full database name
-        */
-       public function tableName( $name, $format = 'quoted' ) {
-               global $wgSharedDB, $wgSharedPrefix, $wgSharedTables, $wgSharedSchema;
-               # Skip the entire process when we have a string quoted on both ends.
-               # Note that we check the end so that we will still quote any use of
-               # use of `database`.table. But won't break things if someone wants
-               # to query a database table with a dot in the name.
-               if ( $this->isQuotedIdentifier( $name ) ) {
-                       return $name;
-               }
-
-               # Lets test for any bits of text that should never show up in a table
-               # name. Basically anything like JOIN or ON which are actually part of
-               # SQL queries, but may end up inside of the table value to combine
-               # sql. Such as how the API is doing.
-               # Note that we use a whitespace test rather than a \b test to avoid
-               # any remote case where a word like on may be inside of a table name
-               # surrounded by symbols which may be considered word breaks.
-               if ( preg_match( '/(^|\s)(DISTINCT|JOIN|ON|AS)(\s|$)/i', $name ) !== 0 ) {
-                       return $name;
-               }
-
-               # Split database and table into proper variables.
-               # We reverse the explode so that database.table and table both output
-               # the correct table.
-               $dbDetails = explode( '.', $name, 3 );
-               if ( count( $dbDetails ) == 3 ) {
-                       list( $database, $schema, $table ) = $dbDetails;
-                       # We don't want any prefix added in this case
-                       $prefix = '';
-               } elseif ( count( $dbDetails ) == 2 ) {
-                       list( $database, $table ) = $dbDetails;
-                       # We don't want any prefix added in this case
-                       # In dbs that support it, $database may actually be the schema
-                       # but that doesn't affect any of the functionality here
-                       $prefix = '';
-                       $schema = null;
-               } else {
-                       list( $table ) = $dbDetails;
-                       if ( $wgSharedDB !== null # We have a shared database
-                               && $this->mForeign == false # We're not working on a foreign database
-                               && !$this->isQuotedIdentifier( $table ) # Prevent shared tables listing '`table`'
-                               && in_array( $table, $wgSharedTables ) # A shared table is selected
-                       ) {
-                               $database = $wgSharedDB;
-                               $schema = $wgSharedSchema === null ? $this->mSchema : $wgSharedSchema;
-                               $prefix = $wgSharedPrefix === null ? $this->mTablePrefix : $wgSharedPrefix;
-                       } else {
-                               $database = null;
-                               $schema = $this->mSchema; # Default schema
-                               $prefix = $this->mTablePrefix; # Default prefix
-                       }
-               }
-
-               # Quote $table and apply the prefix if not quoted.
-               # $tableName might be empty if this is called from Database::replaceVars()
-               $tableName = "{$prefix}{$table}";
-               if ( $format == 'quoted' && !$this->isQuotedIdentifier( $tableName ) && $tableName !== '' ) {
-                       $tableName = $this->addIdentifierQuotes( $tableName );
-               }
-
-               # Quote $schema and merge it with the table name if needed
-               if ( strlen( $schema ) ) {
-                       if ( $format == 'quoted' && !$this->isQuotedIdentifier( $schema ) ) {
-                               $schema = $this->addIdentifierQuotes( $schema );
-                       }
-                       $tableName = $schema . '.' . $tableName;
-               }
-
-               # Quote $database and merge it with the table name if needed
-               if ( $database !== null ) {
-                       if ( $format == 'quoted' && !$this->isQuotedIdentifier( $database ) ) {
-                               $database = $this->addIdentifierQuotes( $database );
-                       }
-                       $tableName = $database . '.' . $tableName;
-               }
-
-               return $tableName;
-       }
-
-       /**
-        * Fetch a number of table names into an array
-        * This is handy when you need to construct SQL for joins
-        *
-        * Example:
-        * extract( $dbr->tableNames( 'user', 'watchlist' ) );
-        * $sql = "SELECT wl_namespace,wl_title FROM $watchlist,$user
-        *         WHERE wl_user=user_id AND wl_user=$nameWithQuotes";
-        *
-        * @return array
-        */
-       public function tableNames() {
-               $inArray = func_get_args();
-               $retVal = [];
-
-               foreach ( $inArray as $name ) {
-                       $retVal[$name] = $this->tableName( $name );
-               }
-
-               return $retVal;
-       }
-
-       /**
-        * Fetch a number of table names into an zero-indexed numerical array
-        * This is handy when you need to construct SQL for joins
-        *
-        * Example:
-        * list( $user, $watchlist ) = $dbr->tableNamesN( 'user', 'watchlist' );
-        * $sql = "SELECT wl_namespace,wl_title FROM $watchlist,$user
-        *         WHERE wl_user=user_id AND wl_user=$nameWithQuotes";
-        *
-        * @return array
-        */
-       public function tableNamesN() {
-               $inArray = func_get_args();
-               $retVal = [];
-
-               foreach ( $inArray as $name ) {
-                       $retVal[] = $this->tableName( $name );
-               }
-
-               return $retVal;
-       }
-
-       /**
-        * Get an aliased table name
-        * e.g. tableName AS newTableName
-        *
-        * @param string $name Table name, see tableName()
-        * @param string|bool $alias Alias (optional)
-        * @return string SQL name for aliased table. Will not alias a table to its own name
-        */
-       public function tableNameWithAlias( $name, $alias = false ) {
-               if ( !$alias || $alias == $name ) {
-                       return $this->tableName( $name );
-               } else {
-                       return $this->tableName( $name ) . ' ' . $this->addIdentifierQuotes( $alias );
-               }
-       }
-
-       /**
-        * Gets an array of aliased table names
-        *
-        * @param array $tables [ [alias] => table ]
-        * @return string[] See tableNameWithAlias()
-        */
-       public function tableNamesWithAlias( $tables ) {
-               $retval = [];
-               foreach ( $tables as $alias => $table ) {
-                       if ( is_numeric( $alias ) ) {
-                               $alias = $table;
-                       }
-                       $retval[] = $this->tableNameWithAlias( $table, $alias );
-               }
-
-               return $retval;
-       }
-
-       /**
-        * Get an aliased field name
-        * e.g. fieldName AS newFieldName
-        *
-        * @param string $name Field name
-        * @param string|bool $alias Alias (optional)
-        * @return string SQL name for aliased field. Will not alias a field to its own name
-        */
-       public function fieldNameWithAlias( $name, $alias = false ) {
-               if ( !$alias || (string)$alias === (string)$name ) {
-                       return $name;
-               } else {
-                       return $name . ' AS ' . $this->addIdentifierQuotes( $alias ); // PostgreSQL needs AS
-               }
-       }
-
-       /**
-        * Gets an array of aliased field names
-        *
-        * @param array $fields [ [alias] => field ]
-        * @return string[] See fieldNameWithAlias()
-        */
-       public function fieldNamesWithAlias( $fields ) {
-               $retval = [];
-               foreach ( $fields as $alias => $field ) {
-                       if ( is_numeric( $alias ) ) {
-                               $alias = $field;
-                       }
-                       $retval[] = $this->fieldNameWithAlias( $field, $alias );
-               }
-
-               return $retval;
-       }
-
-       /**
-        * Get the aliased table name clause for a FROM clause
-        * which might have a JOIN and/or USE INDEX or IGNORE INDEX clause
-        *
-        * @param array $tables ( [alias] => table )
-        * @param array $use_index Same as for select()
-        * @param array $ignore_index Same as for select()
-        * @param array $join_conds Same as for select()
-        * @return string
-        */
-       protected function tableNamesWithIndexClauseOrJOIN(
-               $tables, $use_index = [], $ignore_index = [], $join_conds = []
-       ) {
-               $ret = [];
-               $retJOIN = [];
-               $use_index = (array)$use_index;
-               $ignore_index = (array)$ignore_index;
-               $join_conds = (array)$join_conds;
-
-               foreach ( $tables as $alias => $table ) {
-                       if ( !is_string( $alias ) ) {
-                               // No alias? Set it equal to the table name
-                               $alias = $table;
-                       }
-                       // Is there a JOIN clause for this table?
-                       if ( isset( $join_conds[$alias] ) ) {
-                               list( $joinType, $conds ) = $join_conds[$alias];
-                               $tableClause = $joinType;
-                               $tableClause .= ' ' . $this->tableNameWithAlias( $table, $alias );
-                               if ( isset( $use_index[$alias] ) ) { // has USE INDEX?
-                                       $use = $this->useIndexClause( implode( ',', (array)$use_index[$alias] ) );
-                                       if ( $use != '' ) {
-                                               $tableClause .= ' ' . $use;
-                                       }
-                               }
-                               if ( isset( $ignore_index[$alias] ) ) { // has IGNORE INDEX?
-                                       $ignore = $this->ignoreIndexClause( implode( ',', (array)$ignore_index[$alias] ) );
-                                       if ( $ignore != '' ) {
-                                               $tableClause .= ' ' . $ignore;
-                                       }
-                               }
-                               $on = $this->makeList( (array)$conds, LIST_AND );
-                               if ( $on != '' ) {
-                                       $tableClause .= ' ON (' . $on . ')';
-                               }
-
-                               $retJOIN[] = $tableClause;
-                       } elseif ( isset( $use_index[$alias] ) ) {
-                               // Is there an INDEX clause for this table?
-                               $tableClause = $this->tableNameWithAlias( $table, $alias );
-                               $tableClause .= ' ' . $this->useIndexClause(
-                                       implode( ',', (array)$use_index[$alias] )
-                               );
-
-                               $ret[] = $tableClause;
-                       } elseif ( isset( $ignore_index[$alias] ) ) {
-                               // Is there an INDEX clause for this table?
-                               $tableClause = $this->tableNameWithAlias( $table, $alias );
-                               $tableClause .= ' ' . $this->ignoreIndexClause(
-                                       implode( ',', (array)$ignore_index[$alias] )
-                               );
-
-                               $ret[] = $tableClause;
-                       } else {
-                               $tableClause = $this->tableNameWithAlias( $table, $alias );
-
-                               $ret[] = $tableClause;
-                       }
-               }
-
-               // We can't separate explicit JOIN clauses with ',', use ' ' for those
-               $implicitJoins = !empty( $ret ) ? implode( ',', $ret ) : "";
-               $explicitJoins = !empty( $retJOIN ) ? implode( ' ', $retJOIN ) : "";
-
-               // Compile our final table clause
-               return implode( ' ', [ $implicitJoins, $explicitJoins ] );
-       }
-
-       /**
-        * Get the name of an index in a given table.
-        *
-        * @param string $index
-        * @return string
-        */
-       protected function indexName( $index ) {
-               // Backwards-compatibility hack
-               $renamed = [
-                       'ar_usertext_timestamp' => 'usertext_timestamp',
-                       'un_user_id' => 'user_id',
-                       'un_user_ip' => 'user_ip',
-               ];
-
-               if ( isset( $renamed[$index] ) ) {
-                       return $renamed[$index];
-               } else {
-                       return $index;
-               }
-       }
-
-       public function addQuotes( $s ) {
-               if ( $s instanceof Blob ) {
-                       $s = $s->fetch();
-               }
-               if ( $s === null ) {
-                       return 'NULL';
-               } else {
-                       # This will also quote numeric values. This should be harmless,
-                       # and protects against weird problems that occur when they really
-                       # _are_ strings such as article titles and string->number->string
-                       # conversion is not 1:1.
-                       return "'" . $this->strencode( $s ) . "'";
-               }
-       }
-
-       /**
-        * Quotes an identifier using `backticks` or "double quotes" depending on the database type.
-        * MySQL uses `backticks` while basically everything else uses double quotes.
-        * Since MySQL is the odd one out here the double quotes are our generic
-        * and we implement backticks in DatabaseMysql.
-        *
-        * @param string $s
-        * @return string
-        */
-       public function addIdentifierQuotes( $s ) {
-               return '"' . str_replace( '"', '""', $s ) . '"';
-       }
-
-       /**
-        * Returns if the given identifier looks quoted or not according to
-        * the database convention for quoting identifiers .
-        *
-        * @note Do not use this to determine if untrusted input is safe.
-        *   A malicious user can trick this function.
-        * @param string $name
-        * @return bool
-        */
-       public function isQuotedIdentifier( $name ) {
-               return $name[0] == '"' && substr( $name, -1, 1 ) == '"';
-       }
-
-       /**
-        * @param string $s
-        * @return string
-        */
-       protected function escapeLikeInternal( $s ) {
-               return addcslashes( $s, '\%_' );
-       }
-
-       public function buildLike() {
-               $params = func_get_args();
-
-               if ( count( $params ) > 0 && is_array( $params[0] ) ) {
-                       $params = $params[0];
-               }
-
-               $s = '';
-
-               foreach ( $params as $value ) {
-                       if ( $value instanceof LikeMatch ) {
-                               $s .= $value->toString();
-                       } else {
-                               $s .= $this->escapeLikeInternal( $value );
-                       }
-               }
-
-               return " LIKE {$this->addQuotes( $s )} ";
-       }
-
-       public function anyChar() {
-               return new LikeMatch( '_' );
-       }
-
-       public function anyString() {
-               return new LikeMatch( '%' );
-       }
-
-       public function nextSequenceValue( $seqName ) {
-               return null;
-       }
-
-       /**
-        * USE INDEX clause. Unlikely to be useful for anything but MySQL. This
-        * is only needed because a) MySQL must be as efficient as possible due to
-        * its use on Wikipedia, and b) MySQL 4.0 is kind of dumb sometimes about
-        * which index to pick. Anyway, other databases might have different
-        * indexes on a given table. So don't bother overriding this unless you're
-        * MySQL.
-        * @param string $index
-        * @return string
-        */
-       public function useIndexClause( $index ) {
-               return '';
-       }
-
-       /**
-        * IGNORE INDEX clause. Unlikely to be useful for anything but MySQL. This
-        * is only needed because a) MySQL must be as efficient as possible due to
-        * its use on Wikipedia, and b) MySQL 4.0 is kind of dumb sometimes about
-        * which index to pick. Anyway, other databases might have different
-        * indexes on a given table. So don't bother overriding this unless you're
-        * MySQL.
-        * @param string $index
-        * @return string
-        */
-       public function ignoreIndexClause( $index ) {
-               return '';
-       }
-
-       public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
-               $quotedTable = $this->tableName( $table );
-
-               if ( count( $rows ) == 0 ) {
-                       return;
-               }
-
-               # Single row case
-               if ( !is_array( reset( $rows ) ) ) {
-                       $rows = [ $rows ];
-               }
-
-               // @FXIME: this is not atomic, but a trx would break affectedRows()
-               foreach ( $rows as $row ) {
-                       # Delete rows which collide
-                       if ( $uniqueIndexes ) {
-                               $sql = "DELETE FROM $quotedTable WHERE ";
-                               $first = true;
-                               foreach ( $uniqueIndexes as $index ) {
-                                       if ( $first ) {
-                                               $first = false;
-                                               $sql .= '( ';
-                                       } else {
-                                               $sql .= ' ) OR ( ';
-                                       }
-                                       if ( is_array( $index ) ) {
-                                               $first2 = true;
-                                               foreach ( $index as $col ) {
-                                                       if ( $first2 ) {
-                                                               $first2 = false;
-                                                       } else {
-                                                               $sql .= ' AND ';
-                                                       }
-                                                       $sql .= $col . '=' . $this->addQuotes( $row[$col] );
-                                               }
-                                       } else {
-                                               $sql .= $index . '=' . $this->addQuotes( $row[$index] );
-                                       }
-                               }
-                               $sql .= ' )';
-                               $this->query( $sql, $fname );
-                       }
-
-                       # Now insert the row
-                       $this->insert( $table, $row, $fname );
-               }
-       }
-
-       /**
-        * REPLACE query wrapper for MySQL and SQLite, which have a native REPLACE
-        * statement.
-        *
-        * @param string $table Table name
-        * @param array|string $rows Row(s) to insert
-        * @param string $fname Caller function name
-        *
-        * @return ResultWrapper
-        */
-       protected function nativeReplace( $table, $rows, $fname ) {
-               $table = $this->tableName( $table );
-
-               # Single row case
-               if ( !is_array( reset( $rows ) ) ) {
-                       $rows = [ $rows ];
-               }
-
-               $sql = "REPLACE INTO $table (" . implode( ',', array_keys( $rows[0] ) ) . ') VALUES ';
-               $first = true;
-
-               foreach ( $rows as $row ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $sql .= ',';
-                       }
-
-                       $sql .= '(' . $this->makeList( $row ) . ')';
-               }
-
-               return $this->query( $sql, $fname );
-       }
-
-       public function upsert( $table, array $rows, array $uniqueIndexes, array $set,
-               $fname = __METHOD__
-       ) {
-               if ( !count( $rows ) ) {
-                       return true; // nothing to do
-               }
-
-               if ( !is_array( reset( $rows ) ) ) {
-                       $rows = [ $rows ];
-               }
-
-               if ( count( $uniqueIndexes ) ) {
-                       $clauses = []; // list WHERE clauses that each identify a single row
-                       foreach ( $rows as $row ) {
-                               foreach ( $uniqueIndexes as $index ) {
-                                       $index = is_array( $index ) ? $index : [ $index ]; // columns
-                                       $rowKey = []; // unique key to this row
-                                       foreach ( $index as $column ) {
-                                               $rowKey[$column] = $row[$column];
-                                       }
-                                       $clauses[] = $this->makeList( $rowKey, LIST_AND );
-                               }
-                       }
-                       $where = [ $this->makeList( $clauses, LIST_OR ) ];
-               } else {
-                       $where = false;
-               }
-
-               $useTrx = !$this->mTrxLevel;
-               if ( $useTrx ) {
-                       $this->begin( $fname, self::TRANSACTION_INTERNAL );
-               }
-               try {
-                       # Update any existing conflicting row(s)
-                       if ( $where !== false ) {
-                               $ok = $this->update( $table, $set, $where, $fname );
-                       } else {
-                               $ok = true;
-                       }
-                       # Now insert any non-conflicting row(s)
-                       $ok = $this->insert( $table, $rows, $fname, [ 'IGNORE' ] ) && $ok;
-               } catch ( Exception $e ) {
-                       if ( $useTrx ) {
-                               $this->rollback( $fname, self::FLUSHING_INTERNAL );
-                       }
-                       throw $e;
-               }
-               if ( $useTrx ) {
-                       $this->commit( $fname, self::FLUSHING_INTERNAL );
-               }
-
-               return $ok;
-       }
-
-       public function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds,
-               $fname = __METHOD__
-       ) {
-               if ( !$conds ) {
-                       throw new DBUnexpectedError( $this,
-                               'DatabaseBase::deleteJoin() called with empty $conds' );
-               }
-
-               $delTable = $this->tableName( $delTable );
-               $joinTable = $this->tableName( $joinTable );
-               $sql = "DELETE FROM $delTable WHERE $delVar IN (SELECT $joinVar FROM $joinTable ";
-               if ( $conds != '*' ) {
-                       $sql .= 'WHERE ' . $this->makeList( $conds, LIST_AND );
-               }
-               $sql .= ')';
-
-               $this->query( $sql, $fname );
-       }
-
-       /**
-        * Returns the size of a text field, or -1 for "unlimited"
-        *
-        * @param string $table
-        * @param string $field
-        * @return int
-        */
-       public function textFieldSize( $table, $field ) {
-               $table = $this->tableName( $table );
-               $sql = "SHOW COLUMNS FROM $table LIKE \"$field\";";
-               $res = $this->query( $sql, 'DatabaseBase::textFieldSize' );
-               $row = $this->fetchObject( $res );
-
-               $m = [];
-
-               if ( preg_match( '/\((.*)\)/', $row->Type, $m ) ) {
-                       $size = $m[1];
-               } else {
-                       $size = -1;
-               }
-
-               return $size;
-       }
-
-       /**
-        * A string to insert into queries to show that they're low-priority, like
-        * MySQL's LOW_PRIORITY. If no such feature exists, return an empty
-        * string and nothing bad should happen.
-        *
-        * @return string Returns the text of the low priority option if it is
-        *   supported, or a blank string otherwise
-        */
-       public function lowPriorityOption() {
-               return '';
-       }
-
-       public function delete( $table, $conds, $fname = __METHOD__ ) {
-               if ( !$conds ) {
-                       throw new DBUnexpectedError( $this, 'DatabaseBase::delete() called with no conditions' );
-               }
-
-               $table = $this->tableName( $table );
-               $sql = "DELETE FROM $table";
-
-               if ( $conds != '*' ) {
-                       if ( is_array( $conds ) ) {
-                               $conds = $this->makeList( $conds, LIST_AND );
-                       }
-                       $sql .= ' WHERE ' . $conds;
-               }
-
-               return $this->query( $sql, $fname );
-       }
-
-       public function insertSelect(
-               $destTable, $srcTable, $varMap, $conds,
-               $fname = __METHOD__, $insertOptions = [], $selectOptions = []
-       ) {
-               if ( $this->cliMode ) {
-                       // For massive migrations with downtime, we don't want to select everything
-                       // into memory and OOM, so do all this native on the server side if possible.
-                       return $this->nativeInsertSelect(
-                               $destTable,
-                               $srcTable,
-                               $varMap,
-                               $conds,
-                               $fname,
-                               $insertOptions,
-                               $selectOptions
-                       );
-               }
-
-               // For web requests, do a locking SELECT and then INSERT. This puts the SELECT burden
-               // on only the master (without needing row-based-replication). It also makes it easy to
-               // know how big the INSERT is going to be.
-               $fields = [];
-               foreach ( $varMap as $dstColumn => $sourceColumnOrSql ) {
-                       $fields[] = $this->fieldNameWithAlias( $sourceColumnOrSql, $dstColumn );
-               }
-               $selectOptions[] = 'FOR UPDATE';
-               $res = $this->select( $srcTable, implode( ',', $fields ), $conds, $fname, $selectOptions );
-               if ( !$res ) {
-                       return false;
-               }
-
-               $rows = [];
-               foreach ( $res as $row ) {
-                       $rows[] = (array)$row;
-               }
-
-               return $this->insert( $destTable, $rows, $fname, $insertOptions );
-       }
-
-       public function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds,
-               $fname = __METHOD__,
-               $insertOptions = [], $selectOptions = []
-       ) {
-               $destTable = $this->tableName( $destTable );
-
-               if ( !is_array( $insertOptions ) ) {
-                       $insertOptions = [ $insertOptions ];
-               }
-
-               $insertOptions = $this->makeInsertOptions( $insertOptions );
-
-               if ( !is_array( $selectOptions ) ) {
-                       $selectOptions = [ $selectOptions ];
-               }
-
-               list( $startOpts, $useIndex, $tailOpts, $ignoreIndex ) = $this->makeSelectOptions(
-                       $selectOptions );
-
-               if ( is_array( $srcTable ) ) {
-                       $srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
-               } else {
-                       $srcTable = $this->tableName( $srcTable );
-               }
-
-               $sql = "INSERT $insertOptions INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ')' .
-                       " SELECT $startOpts " . implode( ',', $varMap ) .
-                       " FROM $srcTable $useIndex $ignoreIndex ";
-
-               if ( $conds != '*' ) {
-                       if ( is_array( $conds ) ) {
-                               $conds = $this->makeList( $conds, LIST_AND );
-                       }
-                       $sql .= " WHERE $conds";
-               }
-
-               $sql .= " $tailOpts";
-
-               return $this->query( $sql, $fname );
-       }
-
-       /**
-        * Construct a LIMIT query with optional offset. This is used for query
-        * pages. The SQL should be adjusted so that only the first $limit rows
-        * are returned. If $offset is provided as well, then the first $offset
-        * rows should be discarded, and the next $limit rows should be returned.
-        * If the result of the query is not ordered, then the rows to be returned
-        * are theoretically arbitrary.
-        *
-        * $sql is expected to be a SELECT, if that makes a difference.
-        *
-        * The version provided by default works in MySQL and SQLite. It will very
-        * likely need to be overridden for most other DBMSes.
-        *
-        * @param string $sql SQL query we will append the limit too
-        * @param int $limit The SQL limit
-        * @param int|bool $offset The SQL offset (default false)
-        * @throws DBUnexpectedError
-        * @return string
-        */
-       public function limitResult( $sql, $limit, $offset = false ) {
-               if ( !is_numeric( $limit ) ) {
-                       throw new DBUnexpectedError( $this, "Invalid non-numeric limit passed to limitResult()\n" );
-               }
-
-               return "$sql LIMIT "
-                       . ( ( is_numeric( $offset ) && $offset != 0 ) ? "{$offset}," : "" )
-                       . "{$limit} ";
-       }
-
-       public function unionSupportsOrderAndLimit() {
-               return true; // True for almost every DB supported
-       }
-
-       public function unionQueries( $sqls, $all ) {
-               $glue = $all ? ') UNION ALL (' : ') UNION (';
-
-               return '(' . implode( $glue, $sqls ) . ')';
-       }
-
-       public function conditional( $cond, $trueVal, $falseVal ) {
-               if ( is_array( $cond ) ) {
-                       $cond = $this->makeList( $cond, LIST_AND );
-               }
-
-               return " (CASE WHEN $cond THEN $trueVal ELSE $falseVal END) ";
-       }
-
-       public function strreplace( $orig, $old, $new ) {
-               return "REPLACE({$orig}, {$old}, {$new})";
-       }
-
-       public function getServerUptime() {
-               return 0;
-       }
-
-       public function wasDeadlock() {
-               return false;
-       }
-
-       public function wasLockTimeout() {
-               return false;
-       }
-
-       public function wasErrorReissuable() {
-               return false;
-       }
-
-       public function wasReadOnlyError() {
-               return false;
-       }
-
-       /**
-        * Determines if the given query error was a connection drop
-        * STUB
-        *
-        * @param integer|string $errno
-        * @return bool
-        */
-       public function wasConnectionError( $errno ) {
-               return false;
-       }
-
-       /**
-        * Perform a deadlock-prone transaction.
-        *
-        * This function invokes a callback function to perform a set of write
-        * queries. If a deadlock occurs during the processing, the transaction
-        * will be rolled back and the callback function will be called again.
-        *
-        * Avoid using this method outside of Job or Maintenance classes.
-        *
-        * Usage:
-        *   $dbw->deadlockLoop( callback, ... );
-        *
-        * Extra arguments are passed through to the specified callback function.
-        * This method requires that no transactions are already active to avoid
-        * causing premature commits or exceptions.
-        *
-        * Returns whatever the callback function returned on its successful,
-        * iteration, or false on error, for example if the retry limit was
-        * reached.
-        *
-        * @return mixed
-        * @throws DBUnexpectedError
-        * @throws Exception
-        */
-       public function deadlockLoop() {
-               $args = func_get_args();
-               $function = array_shift( $args );
-               $tries = self::DEADLOCK_TRIES;
-
-               $this->begin( __METHOD__ );
-
-               $retVal = null;
-               /** @var Exception $e */
-               $e = null;
-               do {
-                       try {
-                               $retVal = call_user_func_array( $function, $args );
-                               break;
-                       } catch ( DBQueryError $e ) {
-                               if ( $this->wasDeadlock() ) {
-                                       // Retry after a randomized delay
-                                       usleep( mt_rand( self::DEADLOCK_DELAY_MIN, self::DEADLOCK_DELAY_MAX ) );
-                               } else {
-                                       // Throw the error back up
-                                       throw $e;
-                               }
-                       }
-               } while ( --$tries > 0 );
-
-               if ( $tries <= 0 ) {
-                       // Too many deadlocks; give up
-                       $this->rollback( __METHOD__ );
-                       throw $e;
-               } else {
-                       $this->commit( __METHOD__ );
-
-                       return $retVal;
-               }
-       }
-
-       public function masterPosWait( DBMasterPos $pos, $timeout ) {
-               # Real waits are implemented in the subclass.
-               return 0;
-       }
-
-       public function getSlavePos() {
-               # Stub
-               return false;
-       }
-
-       public function getMasterPos() {
-               # Stub
-               return false;
-       }
-
-       public function serverIsReadOnly() {
-               return false;
-       }
-
-       final public function onTransactionResolution( callable $callback ) {
-               if ( !$this->mTrxLevel ) {
-                       throw new DBUnexpectedError( $this, "No transaction is active." );
-               }
-               $this->mTrxEndCallbacks[] = [ $callback, wfGetCaller() ];
-       }
-
-       final public function onTransactionIdle( callable $callback ) {
-               $this->mTrxIdleCallbacks[] = [ $callback, wfGetCaller() ];
-               if ( !$this->mTrxLevel ) {
-                       $this->runOnTransactionIdleCallbacks( self::TRIGGER_IDLE );
-               }
-       }
-
-       final public function onTransactionPreCommitOrIdle( callable $callback ) {
-               if ( $this->mTrxLevel ) {
-                       $this->mTrxPreCommitCallbacks[] = [ $callback, wfGetCaller() ];
-               } else {
-                       // If no transaction is active, then make one for this callback
-                       $this->startAtomic( __METHOD__ );
-                       try {
-                               call_user_func( $callback );
-                               $this->endAtomic( __METHOD__ );
-                       } catch ( Exception $e ) {
-                               $this->rollback( __METHOD__, self::FLUSHING_INTERNAL );
-                               throw $e;
-                       }
-               }
-       }
-
-       final public function setTransactionListener( $name, callable $callback = null ) {
-               if ( $callback ) {
-                       $this->mTrxRecurringCallbacks[$name] = [ $callback, wfGetCaller() ];
-               } else {
-                       unset( $this->mTrxRecurringCallbacks[$name] );
-               }
-       }
-
-       /**
-        * Whether to disable running of post-COMMIT/ROLLBACK callbacks
-        *
-        * This method should not be used outside of Database/LoadBalancer
-        *
-        * @param bool $suppress
-        * @since 1.28
-        */
-       final public function setTrxEndCallbackSuppression( $suppress ) {
-               $this->mTrxEndCallbacksSuppressed = $suppress;
-       }
-
-       /**
-        * Actually run and consume any "on transaction idle/resolution" callbacks.
-        *
-        * This method should not be used outside of Database/LoadBalancer
-        *
-        * @param integer $trigger IDatabase::TRIGGER_* constant
-        * @since 1.20
-        * @throws Exception
-        */
-       public function runOnTransactionIdleCallbacks( $trigger ) {
-               if ( $this->mTrxEndCallbacksSuppressed ) {
-                       return;
-               }
-
-               $autoTrx = $this->getFlag( DBO_TRX ); // automatic begin() enabled?
-               /** @var Exception $e */
-               $e = null; // first exception
-               do { // callbacks may add callbacks :)
-                       $callbacks = array_merge(
-                               $this->mTrxIdleCallbacks,
-                               $this->mTrxEndCallbacks // include "transaction resolution" callbacks
-                       );
-                       $this->mTrxIdleCallbacks = []; // consumed (and recursion guard)
-                       $this->mTrxEndCallbacks = []; // consumed (recursion guard)
-                       foreach ( $callbacks as $callback ) {
-                               try {
-                                       list( $phpCallback ) = $callback;
-                                       $this->clearFlag( DBO_TRX ); // make each query its own transaction
-                                       call_user_func_array( $phpCallback, [ $trigger ] );
-                                       if ( $autoTrx ) {
-                                               $this->setFlag( DBO_TRX ); // restore automatic begin()
-                                       } else {
-                                               $this->clearFlag( DBO_TRX ); // restore auto-commit
-                                       }
-                               } catch ( Exception $ex ) {
-                                       MWExceptionHandler::logException( $ex );
-                                       $e = $e ?: $ex;
-                                       // Some callbacks may use startAtomic/endAtomic, so make sure
-                                       // their transactions are ended so other callbacks don't fail
-                                       if ( $this->trxLevel() ) {
-                                               $this->rollback( __METHOD__, self::FLUSHING_INTERNAL );
-                                       }
-                               }
-                       }
-               } while ( count( $this->mTrxIdleCallbacks ) );
-
-               if ( $e instanceof Exception ) {
-                       throw $e; // re-throw any first exception
-               }
-       }
-
-       /**
-        * Actually run and consume any "on transaction pre-commit" callbacks.
-        *
-        * This method should not be used outside of Database/LoadBalancer
-        *
-        * @since 1.22
-        * @throws Exception
-        */
-       public function runOnTransactionPreCommitCallbacks() {
-               $e = null; // first exception
-               do { // callbacks may add callbacks :)
-                       $callbacks = $this->mTrxPreCommitCallbacks;
-                       $this->mTrxPreCommitCallbacks = []; // consumed (and recursion guard)
-                       foreach ( $callbacks as $callback ) {
-                               try {
-                                       list( $phpCallback ) = $callback;
-                                       call_user_func( $phpCallback );
-                               } catch ( Exception $ex ) {
-                                       MWExceptionHandler::logException( $ex );
-                                       $e = $e ?: $ex;
-                               }
-                       }
-               } while ( count( $this->mTrxPreCommitCallbacks ) );
-
-               if ( $e instanceof Exception ) {
-                       throw $e; // re-throw any first exception
-               }
-       }
-
-       /**
-        * Actually run any "transaction listener" callbacks.
-        *
-        * This method should not be used outside of Database/LoadBalancer
-        *
-        * @param integer $trigger IDatabase::TRIGGER_* constant
-        * @throws Exception
-        * @since 1.20
-        */
-       public function runTransactionListenerCallbacks( $trigger ) {
-               if ( $this->mTrxEndCallbacksSuppressed ) {
-                       return;
-               }
-
-               /** @var Exception $e */
-               $e = null; // first exception
-
-               foreach ( $this->mTrxRecurringCallbacks as $callback ) {
-                       try {
-                               list( $phpCallback ) = $callback;
-                               $phpCallback( $trigger, $this );
-                       } catch ( Exception $ex ) {
-                               MWExceptionHandler::logException( $ex );
-                               $e = $e ?: $ex;
-                       }
-               }
-
-               if ( $e instanceof Exception ) {
-                       throw $e; // re-throw any first exception
-               }
-       }
-
-       final public function startAtomic( $fname = __METHOD__ ) {
-               if ( !$this->mTrxLevel ) {
-                       $this->begin( $fname, self::TRANSACTION_INTERNAL );
-                       // If DBO_TRX is set, a series of startAtomic/endAtomic pairs will result
-                       // in all changes being in one transaction to keep requests transactional.
-                       if ( !$this->getFlag( DBO_TRX ) ) {
-                               $this->mTrxAutomaticAtomic = true;
-                       }
-               }
-
-               $this->mTrxAtomicLevels[] = $fname;
-       }
-
-       final public function endAtomic( $fname = __METHOD__ ) {
-               if ( !$this->mTrxLevel ) {
-                       throw new DBUnexpectedError( $this, "No atomic transaction is open (got $fname)." );
-               }
-               if ( !$this->mTrxAtomicLevels ||
-                       array_pop( $this->mTrxAtomicLevels ) !== $fname
-               ) {
-                       throw new DBUnexpectedError( $this, "Invalid atomic section ended (got $fname)." );
-               }
-
-               if ( !$this->mTrxAtomicLevels && $this->mTrxAutomaticAtomic ) {
-                       $this->commit( $fname, self::FLUSHING_INTERNAL );
-               }
-       }
-
-       final public function doAtomicSection( $fname, callable $callback ) {
-               $this->startAtomic( $fname );
-               try {
-                       $res = call_user_func_array( $callback, [ $this, $fname ] );
-               } catch ( Exception $e ) {
-                       $this->rollback( $fname, self::FLUSHING_INTERNAL );
-                       throw $e;
-               }
-               $this->endAtomic( $fname );
-
-               return $res;
-       }
-
-       final public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT ) {
-               // Protect against mismatched atomic section, transaction nesting, and snapshot loss
-               if ( $this->mTrxLevel ) {
-                       if ( $this->mTrxAtomicLevels ) {
-                               $levels = implode( ', ', $this->mTrxAtomicLevels );
-                               $msg = "$fname: Got explicit BEGIN while atomic section(s) $levels are open.";
-                               throw new DBUnexpectedError( $this, $msg );
-                       } elseif ( !$this->mTrxAutomatic ) {
-                               $msg = "$fname: Explicit transaction already active (from {$this->mTrxFname}).";
-                               throw new DBUnexpectedError( $this, $msg );
-                       } else {
-                               // @TODO: make this an exception at some point
-                               $msg = "$fname: Implicit transaction already active (from {$this->mTrxFname}).";
-                               wfLogDBError( $msg );
-                               wfWarn( $msg );
-                               return; // join the main transaction set
-                       }
-               } elseif ( $this->getFlag( DBO_TRX ) && $mode !== self::TRANSACTION_INTERNAL ) {
-                       // @TODO: make this an exception at some point
-                       $msg = "$fname: Implicit transaction expected (DBO_TRX set).";
-                       wfLogDBError( $msg );
-                       wfWarn( $msg );
-                       return; // let any writes be in the main transaction
-               }
-
-               // Avoid fatals if close() was called
-               $this->assertOpen();
-
-               $this->doBegin( $fname );
-               $this->mTrxTimestamp = microtime( true );
-               $this->mTrxFname = $fname;
-               $this->mTrxDoneWrites = false;
-               $this->mTrxAutomatic = ( $mode === self::TRANSACTION_INTERNAL );
-               $this->mTrxAutomaticAtomic = false;
-               $this->mTrxAtomicLevels = [];
-               $this->mTrxShortId = wfRandomString( 12 );
-               $this->mTrxWriteDuration = 0.0;
-               $this->mTrxWriteQueryCount = 0;
-               $this->mTrxWriteAdjDuration = 0.0;
-               $this->mTrxWriteAdjQueryCount = 0;
-               $this->mTrxWriteCallers = [];
-               // First SELECT after BEGIN will establish the snapshot in REPEATABLE-READ.
-               // Get an estimate of the replica DB lag before then, treating estimate staleness
-               // as lag itself just to be safe
-               $status = $this->getApproximateLagStatus();
-               $this->mTrxReplicaLag = $status['lag'] + ( microtime( true ) - $status['since'] );
-       }
-
-       /**
-        * Issues the BEGIN command to the database server.
-        *
-        * @see DatabaseBase::begin()
-        * @param string $fname
-        */
-       protected function doBegin( $fname ) {
-               $this->query( 'BEGIN', $fname );
-               $this->mTrxLevel = 1;
-       }
-
-       final public function commit( $fname = __METHOD__, $flush = '' ) {
-               if ( $this->mTrxLevel && $this->mTrxAtomicLevels ) {
-                       // There are still atomic sections open. This cannot be ignored
-                       $levels = implode( ', ', $this->mTrxAtomicLevels );
-                       throw new DBUnexpectedError(
-                               $this,
-                               "$fname: Got COMMIT while atomic sections $levels are still open."
-                       );
-               }
-
-               if ( $flush === self::FLUSHING_INTERNAL || $flush === self::FLUSHING_ALL_PEERS ) {
-                       if ( !$this->mTrxLevel ) {
-                               return; // nothing to do
-                       } elseif ( !$this->mTrxAutomatic ) {
-                               throw new DBUnexpectedError(
-                                       $this,
-                                       "$fname: Flushing an explicit transaction, getting out of sync."
-                               );
-                       }
-               } else {
-                       if ( !$this->mTrxLevel ) {
-                               wfWarn( "$fname: No transaction to commit, something got out of sync." );
-                               return; // nothing to do
-                       } elseif ( $this->mTrxAutomatic ) {
-                               // @TODO: make this an exception at some point
-                               $msg = "$fname: Explicit commit of implicit transaction.";
-                               wfLogDBError( $msg );
-                               wfWarn( $msg );
-                               return; // wait for the main transaction set commit round
-                       }
-               }
-
-               // Avoid fatals if close() was called
-               $this->assertOpen();
-
-               $this->runOnTransactionPreCommitCallbacks();
-               $writeTime = $this->pendingWriteQueryDuration( self::ESTIMATE_DB_APPLY );
-               $this->doCommit( $fname );
-               if ( $this->mTrxDoneWrites ) {
-                       $this->mDoneWrites = microtime( true );
-                       $this->trxProfiler->transactionWritingOut(
-                               $this->mServer, $this->mDBname, $this->mTrxShortId, $writeTime );
-               }
-
-               $this->runOnTransactionIdleCallbacks( self::TRIGGER_COMMIT );
-               $this->runTransactionListenerCallbacks( self::TRIGGER_COMMIT );
-       }
-
-       /**
-        * Issues the COMMIT command to the database server.
-        *
-        * @see DatabaseBase::commit()
-        * @param string $fname
-        */
-       protected function doCommit( $fname ) {
-               if ( $this->mTrxLevel ) {
-                       $this->query( 'COMMIT', $fname );
-                       $this->mTrxLevel = 0;
-               }
-       }
-
-       final public function rollback( $fname = __METHOD__, $flush = '' ) {
-               if ( $flush === self::FLUSHING_INTERNAL || $flush === self::FLUSHING_ALL_PEERS ) {
-                       if ( !$this->mTrxLevel ) {
-                               return; // nothing to do
-                       }
-               } else {
-                       if ( !$this->mTrxLevel ) {
-                               wfWarn( "$fname: No transaction to rollback, something got out of sync." );
-                               return; // nothing to do
-                       } elseif ( $this->getFlag( DBO_TRX ) ) {
-                               throw new DBUnexpectedError(
-                                       $this,
-                                       "$fname: Expected mass rollback of all peer databases (DBO_TRX set)."
-                               );
-                       }
-               }
-
-               // Avoid fatals if close() was called
-               $this->assertOpen();
-
-               $this->doRollback( $fname );
-               $this->mTrxAtomicLevels = [];
-               if ( $this->mTrxDoneWrites ) {
-                       $this->trxProfiler->transactionWritingOut(
-                               $this->mServer, $this->mDBname, $this->mTrxShortId );
-               }
-
-               $this->mTrxIdleCallbacks = []; // clear
-               $this->mTrxPreCommitCallbacks = []; // clear
-               $this->runOnTransactionIdleCallbacks( self::TRIGGER_ROLLBACK );
-               $this->runTransactionListenerCallbacks( self::TRIGGER_ROLLBACK );
-       }
-
-       /**
-        * Issues the ROLLBACK command to the database server.
-        *
-        * @see DatabaseBase::rollback()
-        * @param string $fname
-        */
-       protected function doRollback( $fname ) {
-               if ( $this->mTrxLevel ) {
-                       # Disconnects cause rollback anyway, so ignore those errors
-                       $ignoreErrors = true;
-                       $this->query( 'ROLLBACK', $fname, $ignoreErrors );
-                       $this->mTrxLevel = 0;
-               }
-       }
-
-       public function flushSnapshot( $fname = __METHOD__ ) {
-               if ( $this->writesOrCallbacksPending() || $this->explicitTrxActive() ) {
-                       // This only flushes transactions to clear snapshots, not to write data
-                       throw new DBUnexpectedError(
-                               $this,
-                               "$fname: Cannot COMMIT to clear snapshot because writes are pending."
-                       );
-               }
-
-               $this->commit( $fname, self::FLUSHING_INTERNAL );
-       }
-
-       public function explicitTrxActive() {
-               return $this->mTrxLevel && ( $this->mTrxAtomicLevels || !$this->mTrxAutomatic );
-       }
-
-       /**
-        * Creates a new table with structure copied from existing table
-        * Note that unlike most database abstraction functions, this function does not
-        * automatically append database prefix, because it works at a lower
-        * abstraction level.
-        * The table names passed to this function shall not be quoted (this
-        * function calls addIdentifierQuotes when needed).
-        *
-        * @param string $oldName Name of table whose structure should be copied
-        * @param string $newName Name of table to be created
-        * @param bool $temporary Whether the new table should be temporary
-        * @param string $fname Calling function name
-        * @throws MWException
-        * @return bool True if operation was successful
-        */
-       public function duplicateTableStructure( $oldName, $newName, $temporary = false,
-               $fname = __METHOD__
-       ) {
-               throw new RuntimeException(
-                       'DatabaseBase::duplicateTableStructure is not implemented in descendant class' );
-       }
-
-       function listTables( $prefix = null, $fname = __METHOD__ ) {
-               throw new RuntimeException( 'DatabaseBase::listTables is not implemented in descendant class' );
-       }
-
-       /**
-        * Reset the views process cache set by listViews()
-        * @since 1.22
-        */
-       final public function clearViewsCache() {
-               $this->allViews = null;
-       }
-
-       /**
-        * Lists all the VIEWs in the database
-        *
-        * For caching purposes the list of all views should be stored in
-        * $this->allViews. The process cache can be cleared with clearViewsCache()
-        *
-        * @param string $prefix Only show VIEWs with this prefix, eg. unit_test_
-        * @param string $fname Name of calling function
-        * @throws MWException
-        * @return array
-        * @since 1.22
-        */
-       public function listViews( $prefix = null, $fname = __METHOD__ ) {
-               throw new RuntimeException( 'DatabaseBase::listViews is not implemented in descendant class' );
-       }
-
-       /**
-        * Differentiates between a TABLE and a VIEW
-        *
-        * @param string $name Name of the database-structure to test.
-        * @throws MWException
-        * @return bool
-        * @since 1.22
-        */
-       public function isView( $name ) {
-               throw new RuntimeException( 'DatabaseBase::isView is not implemented in descendant class' );
-       }
-
-       public function timestamp( $ts = 0 ) {
-               return wfTimestamp( TS_MW, $ts );
-       }
-
-       public function timestampOrNull( $ts = null ) {
-               if ( is_null( $ts ) ) {
-                       return null;
-               } else {
-                       return $this->timestamp( $ts );
-               }
-       }
-
-       /**
-        * Take the result from a query, and wrap it in a ResultWrapper if
-        * necessary. Boolean values are passed through as is, to indicate success
-        * of write queries or failure.
-        *
-        * Once upon a time, DatabaseBase::query() returned a bare MySQL result
-        * resource, and it was necessary to call this function to convert it to
-        * a wrapper. Nowadays, raw database objects are never exposed to external
-        * callers, so this is unnecessary in external code.
-        *
-        * @param bool|ResultWrapper|resource|object $result
-        * @return bool|ResultWrapper
-        */
-       protected function resultObject( $result ) {
-               if ( !$result ) {
-                       return false;
-               } elseif ( $result instanceof ResultWrapper ) {
-                       return $result;
-               } elseif ( $result === true ) {
-                       // Successful write query
-                       return $result;
-               } else {
-                       return new ResultWrapper( $this, $result );
-               }
-       }
-
-       public function ping( &$rtt = null ) {
-               // Avoid hitting the server if it was hit recently
-               if ( $this->isOpen() && ( microtime( true ) - $this->lastPing ) < self::PING_TTL ) {
-                       if ( !func_num_args() || $this->mRTTEstimate > 0 ) {
-                               $rtt = $this->mRTTEstimate;
-                               return true; // don't care about $rtt
-                       }
-               }
-
-               // This will reconnect if possible or return false if not
-               $this->clearFlag( DBO_TRX, self::REMEMBER_PRIOR );
-               $ok = ( $this->query( self::PING_QUERY, __METHOD__, true ) !== false );
-               $this->restoreFlags( self::RESTORE_PRIOR );
-
-               if ( $ok ) {
-                       $rtt = $this->mRTTEstimate;
-               }
-
-               return $ok;
-       }
-
-       /**
-        * @return bool
-        */
-       protected function reconnect() {
-               $this->closeConnection();
-               $this->mOpened = false;
-               $this->mConn = false;
-               try {
-                       $this->open( $this->mServer, $this->mUser, $this->mPassword, $this->mDBname );
-                       $this->lastPing = microtime( true );
-                       $ok = true;
-               } catch ( DBConnectionError $e ) {
-                       $ok = false;
-               }
-
-               return $ok;
-       }
-
-       public function getSessionLagStatus() {
-               return $this->getTransactionLagStatus() ?: $this->getApproximateLagStatus();
-       }
-
-       /**
-        * Get the replica DB lag when the current transaction started
-        *
-        * This is useful when transactions might use snapshot isolation
-        * (e.g. REPEATABLE-READ in innodb), so the "real" lag of that data
-        * is this lag plus transaction duration. If they don't, it is still
-        * safe to be pessimistic. This returns null if there is no transaction.
-        *
-        * @return array|null ('lag': seconds or false on error, 'since': UNIX timestamp of BEGIN)
-        * @since 1.27
-        */
-       public function getTransactionLagStatus() {
-               return $this->mTrxLevel
-                       ? [ 'lag' => $this->mTrxReplicaLag, 'since' => $this->trxTimestamp() ]
-                       : null;
-       }
-
-       /**
-        * Get a replica DB lag estimate for this server
-        *
-        * @return array ('lag': seconds or false on error, 'since': UNIX timestamp of estimate)
-        * @since 1.27
-        */
-       public function getApproximateLagStatus() {
-               return [
-                       'lag'   => $this->getLBInfo( 'replica' ) ? $this->getLag() : 0,
-                       'since' => microtime( true )
-               ];
-       }
-
-       /**
-        * Merge the result of getSessionLagStatus() for several DBs
-        * using the most pessimistic values to estimate the lag of
-        * any data derived from them in combination
-        *
-        * This is information is useful for caching modules
-        *
-        * @see WANObjectCache::set()
-        * @see WANObjectCache::getWithSetCallback()
-        *
-        * @param IDatabase $db1
-        * @param IDatabase ...
-        * @return array Map of values:
-        *   - lag: highest lag of any of the DBs or false on error (e.g. replication stopped)
-        *   - since: oldest UNIX timestamp of any of the DB lag estimates
-        *   - pending: whether any of the DBs have uncommitted changes
-        * @since 1.27
-        */
-       public static function getCacheSetOptions( IDatabase $db1 ) {
-               $res = [ 'lag' => 0, 'since' => INF, 'pending' => false ];
-               foreach ( func_get_args() as $db ) {
-                       /** @var IDatabase $db */
-                       $status = $db->getSessionLagStatus();
-                       if ( $status['lag'] === false ) {
-                               $res['lag'] = false;
-                       } elseif ( $res['lag'] !== false ) {
-                               $res['lag'] = max( $res['lag'], $status['lag'] );
-                       }
-                       $res['since'] = min( $res['since'], $status['since'] );
-                       $res['pending'] = $res['pending'] ?: $db->writesPending();
-               }
-
-               return $res;
-       }
-
-       public function getLag() {
-               return 0;
-       }
-
-       function maxListLen() {
-               return 0;
-       }
-
-       public function encodeBlob( $b ) {
-               return $b;
-       }
-
-       public function decodeBlob( $b ) {
-               if ( $b instanceof Blob ) {
-                       $b = $b->fetch();
-               }
-               return $b;
-       }
-
-       public function setSessionOptions( array $options ) {
-       }
-
-       /**
-        * Read and execute SQL commands from a file.
-        *
-        * Returns true on success, error string or exception on failure (depending
-        * on object's error ignore settings).
-        *
-        * @param string $filename File name to open
-        * @param bool|callable $lineCallback Optional function called before reading each line
-        * @param bool|callable $resultCallback Optional function called for each MySQL result
-        * @param bool|string $fname Calling function name or false if name should be
-        *   generated dynamically using $filename
-        * @param bool|callable $inputCallback Optional function called for each
-        *   complete line sent
-        * @throws Exception|MWException
-        * @return bool|string
-        */
-       public function sourceFile(
-               $filename, $lineCallback = false, $resultCallback = false, $fname = false, $inputCallback = false
-       ) {
-               MediaWiki\suppressWarnings();
-               $fp = fopen( $filename, 'r' );
-               MediaWiki\restoreWarnings();
-
-               if ( false === $fp ) {
-                       throw new RuntimeException( "Could not open \"{$filename}\".\n" );
-               }
-
-               if ( !$fname ) {
-                       $fname = __METHOD__ . "( $filename )";
-               }
-
-               try {
-                       $error = $this->sourceStream( $fp, $lineCallback, $resultCallback, $fname, $inputCallback );
-               } catch ( Exception $e ) {
-                       fclose( $fp );
-                       throw $e;
-               }
-
-               fclose( $fp );
-
-               return $error;
-       }
-
-       /**
-        * Get the full path of a patch file. Originally based on archive()
-        * from updaters.inc. Keep in mind this always returns a patch, as
-        * it fails back to MySQL if no DB-specific patch can be found
-        *
-        * @param string $patch The name of the patch, like patch-something.sql
-        * @return string Full path to patch file
-        */
-       public function patchPath( $patch ) {
-               global $IP;
-
-               $dbType = $this->getType();
-               if ( file_exists( "$IP/maintenance/$dbType/archives/$patch" ) ) {
-                       return "$IP/maintenance/$dbType/archives/$patch";
-               } else {
-                       return "$IP/maintenance/archives/$patch";
-               }
-       }
-
-       public function setSchemaVars( $vars ) {
-               $this->mSchemaVars = $vars;
-       }
-
-       /**
-        * Read and execute commands from an open file handle.
-        *
-        * Returns true on success, error string or exception on failure (depending
-        * on object's error ignore settings).
-        *
-        * @param resource $fp File handle
-        * @param bool|callable $lineCallback Optional function called before reading each query
-        * @param bool|callable $resultCallback Optional function called for each MySQL result
-        * @param string $fname Calling function name
-        * @param bool|callable $inputCallback Optional function called for each complete query sent
-        * @return bool|string
-        */
-       public function sourceStream( $fp, $lineCallback = false, $resultCallback = false,
-               $fname = __METHOD__, $inputCallback = false
-       ) {
-               $cmd = '';
-
-               while ( !feof( $fp ) ) {
-                       if ( $lineCallback ) {
-                               call_user_func( $lineCallback );
-                       }
-
-                       $line = trim( fgets( $fp ) );
-
-                       if ( $line == '' ) {
-                               continue;
-                       }
-
-                       if ( '-' == $line[0] && '-' == $line[1] ) {
-                               continue;
-                       }
-
-                       if ( $cmd != '' ) {
-                               $cmd .= ' ';
-                       }
-
-                       $done = $this->streamStatementEnd( $cmd, $line );
-
-                       $cmd .= "$line\n";
-
-                       if ( $done || feof( $fp ) ) {
-                               $cmd = $this->replaceVars( $cmd );
-
-                               if ( ( $inputCallback && call_user_func( $inputCallback, $cmd ) ) || !$inputCallback ) {
-                                       $res = $this->query( $cmd, $fname );
-
-                                       if ( $resultCallback ) {
-                                               call_user_func( $resultCallback, $res, $this );
-                                       }
-
-                                       if ( false === $res ) {
-                                               $err = $this->lastError();
-
-                                               return "Query \"{$cmd}\" failed with error code \"$err\".\n";
-                                       }
-                               }
-                               $cmd = '';
-                       }
-               }
-
-               return true;
-       }
-
-       /**
-        * Called by sourceStream() to check if we've reached a statement end
-        *
-        * @param string $sql SQL assembled so far
-        * @param string $newLine New line about to be added to $sql
-        * @return bool Whether $newLine contains end of the statement
-        */
-       public function streamStatementEnd( &$sql, &$newLine ) {
-               if ( $this->delimiter ) {
-                       $prev = $newLine;
-                       $newLine = preg_replace( '/' . preg_quote( $this->delimiter, '/' ) . '$/', '', $newLine );
-                       if ( $newLine != $prev ) {
-                               return true;
-                       }
-               }
-
-               return false;
-       }
-
-       /**
-        * Database independent variable replacement. Replaces a set of variables
-        * in an SQL statement with their contents as given by $this->getSchemaVars().
-        *
-        * Supports '{$var}' `{$var}` and / *$var* / (without the spaces) style variables.
-        *
-        * - '{$var}' should be used for text and is passed through the database's
-        *   addQuotes method.
-        * - `{$var}` should be used for identifiers (e.g. table and database names).
-        *   It is passed through the database's addIdentifierQuotes method which
-        *   can be overridden if the database uses something other than backticks.
-        * - / *_* / or / *$wgDBprefix* / passes the name that follows through the
-        *   database's tableName method.
-        * - / *i* / passes the name that follows through the database's indexName method.
-        * - In all other cases, / *$var* / is left unencoded. Except for table options,
-        *   its use should be avoided. In 1.24 and older, string encoding was applied.
-        *
-        * @param string $ins SQL statement to replace variables in
-        * @return string The new SQL statement with variables replaced
-        */
-       protected function replaceVars( $ins ) {
-               $vars = $this->getSchemaVars();
-               return preg_replace_callback(
-                       '!
-                               /\* (\$wgDBprefix|[_i]) \*/ (\w*) | # 1-2. tableName, indexName
-                               \'\{\$ (\w+) }\'                  | # 3. addQuotes
-                               `\{\$ (\w+) }`                    | # 4. addIdentifierQuotes
-                               /\*\$ (\w+) \*/                     # 5. leave unencoded
-                       !x',
-                       function ( $m ) use ( $vars ) {
-                               // Note: Because of <https://bugs.php.net/bug.php?id=51881>,
-                               // check for both nonexistent keys *and* the empty string.
-                               if ( isset( $m[1] ) && $m[1] !== '' ) {
-                                       if ( $m[1] === 'i' ) {
-                                               return $this->indexName( $m[2] );
-                                       } else {
-                                               return $this->tableName( $m[2] );
-                                       }
-                               } elseif ( isset( $m[3] ) && $m[3] !== '' && array_key_exists( $m[3], $vars ) ) {
-                                       return $this->addQuotes( $vars[$m[3]] );
-                               } elseif ( isset( $m[4] ) && $m[4] !== '' && array_key_exists( $m[4], $vars ) ) {
-                                       return $this->addIdentifierQuotes( $vars[$m[4]] );
-                               } elseif ( isset( $m[5] ) && $m[5] !== '' && array_key_exists( $m[5], $vars ) ) {
-                                       return $vars[$m[5]];
-                               } else {
-                                       return $m[0];
-                               }
-                       },
-                       $ins
-               );
-       }
-
-       /**
-        * Get schema variables. If none have been set via setSchemaVars(), then
-        * use some defaults from the current object.
-        *
-        * @return array
-        */
-       protected function getSchemaVars() {
-               if ( $this->mSchemaVars ) {
-                       return $this->mSchemaVars;
-               } else {
-                       return $this->getDefaultSchemaVars();
-               }
-       }
-
-       /**
-        * Get schema variables to use if none have been set via setSchemaVars().
-        *
-        * Override this in derived classes to provide variables for tables.sql
-        * and SQL patch files.
-        *
-        * @return array
-        */
-       protected function getDefaultSchemaVars() {
-               return [];
-       }
-
-       public function lockIsFree( $lockName, $method ) {
-               return true;
-       }
-
-       public function lock( $lockName, $method, $timeout = 5 ) {
-               $this->mNamedLocksHeld[$lockName] = 1;
-
-               return true;
-       }
-
-       public function unlock( $lockName, $method ) {
-               unset( $this->mNamedLocksHeld[$lockName] );
-
-               return true;
-       }
-
-       public function getScopedLockAndFlush( $lockKey, $fname, $timeout ) {
-               if ( $this->writesOrCallbacksPending() ) {
-                       // This only flushes transactions to clear snapshots, not to write data
-                       throw new DBUnexpectedError(
-                               $this,
-                               "$fname: Cannot COMMIT to clear snapshot because writes are pending."
-                       );
-               }
-
-               if ( !$this->lock( $lockKey, $fname, $timeout ) ) {
-                       return null;
-               }
-
-               $unlocker = new ScopedCallback( function () use ( $lockKey, $fname ) {
-                       if ( $this->trxLevel() ) {
-                               // There is a good chance an exception was thrown, causing any early return
-                               // from the caller. Let any error handler get a chance to issue rollback().
-                               // If there isn't one, let the error bubble up and trigger server-side rollback.
-                               $this->onTransactionResolution( function () use ( $lockKey, $fname ) {
-                                       $this->unlock( $lockKey, $fname );
-                               } );
-                       } else {
-                               $this->unlock( $lockKey, $fname );
-                       }
-               } );
-
-               $this->commit( __METHOD__, self::FLUSHING_INTERNAL );
-
-               return $unlocker;
-       }
-
-       public function namedLocksEnqueue() {
-               return false;
-       }
-
-       /**
-        * Lock specific tables
-        *
-        * @param array $read Array of tables to lock for read access
-        * @param array $write Array of tables to lock for write access
-        * @param string $method Name of caller
-        * @param bool $lowPriority Whether to indicate writes to be LOW PRIORITY
-        * @return bool
-        */
-       public function lockTables( $read, $write, $method, $lowPriority = true ) {
-               return true;
-       }
-
-       /**
-        * Unlock specific tables
-        *
-        * @param string $method The caller
-        * @return bool
-        */
-       public function unlockTables( $method ) {
-               return true;
-       }
-
-       /**
-        * Delete a table
-        * @param string $tableName
-        * @param string $fName
-        * @return bool|ResultWrapper
-        * @since 1.18
-        */
-       public function dropTable( $tableName, $fName = __METHOD__ ) {
-               if ( !$this->tableExists( $tableName, $fName ) ) {
-                       return false;
-               }
-               $sql = "DROP TABLE " . $this->tableName( $tableName );
-               if ( $this->cascadingDeletes() ) {
-                       $sql .= " CASCADE";
-               }
-
-               return $this->query( $sql, $fName );
-       }
-
-       /**
-        * Get search engine class. All subclasses of this need to implement this
-        * if they wish to use searching.
-        *
-        * @return string
-        */
-       public function getSearchEngine() {
-               return 'SearchEngineDummy';
-       }
-
-       public function getInfinity() {
-               return 'infinity';
-       }
-
-       public function encodeExpiry( $expiry ) {
-               return ( $expiry == '' || $expiry == 'infinity' || $expiry == $this->getInfinity() )
-                       ? $this->getInfinity()
-                       : $this->timestamp( $expiry );
-       }
-
-       public function decodeExpiry( $expiry, $format = TS_MW ) {
-               return ( $expiry == '' || $expiry == 'infinity' || $expiry == $this->getInfinity() )
-                       ? 'infinity'
-                       : wfTimestamp( $format, $expiry );
-       }
-
-       public function setBigSelects( $value = true ) {
-               // no-op
-       }
-
-       public function isReadOnly() {
-               return ( $this->getReadOnlyReason() !== false );
-       }
-
-       /**
-        * @return string|bool Reason this DB is read-only or false if it is not
-        */
-       protected function getReadOnlyReason() {
-               $reason = $this->getLBInfo( 'readOnlyReason' );
-
-               return is_string( $reason ) ? $reason : false;
-       }
-
-       /**
-        * @since 1.19
-        * @return string
-        */
-       public function __toString() {
-               return (string)$this->mConn;
-       }
-
-       /**
-        * Run a few simple sanity checks
-        */
-       public function __destruct() {
-               if ( $this->mTrxLevel && $this->mTrxDoneWrites ) {
-                       trigger_error( "Uncommitted DB writes (transaction from {$this->mTrxFname})." );
-               }
-               $danglingCallbacks = array_merge(
-                       $this->mTrxIdleCallbacks,
-                       $this->mTrxPreCommitCallbacks,
-                       $this->mTrxEndCallbacks
-               );
-               if ( $danglingCallbacks ) {
-                       $callers = [];
-                       foreach ( $danglingCallbacks as $callbackInfo ) {
-                               $callers[] = $callbackInfo[1];
-                       }
-                       $callers = implode( ', ', $callers );
-                       trigger_error( "DB transaction callbacks still pending (from $callers)." );
-               }
-       }
-}
-
-/**
- * @since 1.27
- */
-abstract class Database extends DatabaseBase {
-       // B/C until nothing type hints for DatabaseBase
-       // @TODO: finish renaming DatabaseBase => Database
-}
diff --git a/includes/db/DatabaseError.php b/includes/db/DatabaseError.php
deleted file mode 100644 (file)
index cfae74f..0000000
+++ /dev/null
@@ -1,490 +0,0 @@
-<?php
-/**
- * This file contains database error classes.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * Database error base class
- * @ingroup Database
- */
-class DBError extends MWException {
-       /** @var DatabaseBase */
-       public $db;
-
-       /**
-        * Construct a database error
-        * @param DatabaseBase $db Object which threw the error
-        * @param string $error A simple error message to be used for debugging
-        */
-       function __construct( DatabaseBase $db = null, $error ) {
-               $this->db = $db;
-               parent::__construct( $error );
-       }
-}
-
-/**
- * Base class for the more common types of database errors. These are known to occur
- * frequently, so we try to give friendly error messages for them.
- *
- * @ingroup Database
- * @since 1.23
- */
-class DBExpectedError extends DBError {
-       /**
-        * @return string
-        */
-       function getText() {
-               global $wgShowDBErrorBacktrace;
-
-               $s = $this->getTextContent() . "\n";
-
-               if ( $wgShowDBErrorBacktrace ) {
-                       $s .= "Backtrace:\n" . $this->getTraceAsString() . "\n";
-               }
-
-               return $s;
-       }
-
-       /**
-        * @return string
-        */
-       function getHTML() {
-               global $wgShowDBErrorBacktrace;
-
-               $s = $this->getHTMLContent();
-
-               if ( $wgShowDBErrorBacktrace ) {
-                       $s .= '<p>Backtrace:</p><pre>' . htmlspecialchars( $this->getTraceAsString() ) . '</pre>';
-               }
-
-               return $s;
-       }
-
-       function getPageTitle() {
-               return $this->msg( 'databaseerror', 'Database error' );
-       }
-
-       /**
-        * @return string
-        */
-       protected function getTextContent() {
-               return $this->getMessage();
-       }
-
-       /**
-        * @return string
-        */
-       protected function getHTMLContent() {
-               return '<p>' . nl2br( htmlspecialchars( $this->getTextContent() ) ) . '</p>';
-       }
-}
-
-/**
- * @ingroup Database
- */
-class DBConnectionError extends DBExpectedError {
-       /** @var string Error text */
-       public $error;
-
-       /**
-        * @param DatabaseBase $db Object throwing the error
-        * @param string $error Error text
-        */
-       function __construct( DatabaseBase $db = null, $error = 'unknown error' ) {
-               $msg = 'DB connection error';
-
-               if ( trim( $error ) != '' ) {
-                       $msg .= ": $error";
-               } elseif ( $db ) {
-                       $error = $this->db->getServer();
-               }
-
-               parent::__construct( $db, $msg );
-               $this->error = $error;
-       }
-
-       /**
-        * @return bool
-        */
-       function useOutputPage() {
-               // Not likely to work
-               return false;
-       }
-
-       /**
-        * @param string $key
-        * @param string $fallback Unescaped alternative error text in case the
-        *   message cache cannot be used. Can contain parameters as in regular
-        *   messages, that should be passed as additional parameters.
-        * @return string Unprocessed plain error text with parameters replaced
-        */
-       function msg( $key, $fallback /*[, params...] */ ) {
-               $args = array_slice( func_get_args(), 2 );
-
-               if ( $this->useMessageCache() ) {
-                       return wfMessage( $key, $args )->useDatabase( false )->text();
-               } else {
-                       return wfMsgReplaceArgs( $fallback, $args );
-               }
-       }
-
-       /**
-        * @return bool
-        */
-       function isLoggable() {
-               // Don't send to the exception log, already in dberror log
-               return false;
-       }
-
-       /**
-        * @return string Safe HTML
-        */
-       function getHTML() {
-               global $wgShowDBErrorBacktrace, $wgShowHostnames, $wgShowSQLErrors;
-
-               $sorry = htmlspecialchars( $this->msg(
-                       'dberr-problems',
-                       'Sorry! This site is experiencing technical difficulties.'
-               ) );
-               $again = htmlspecialchars( $this->msg(
-                       'dberr-again',
-                       'Try waiting a few minutes and reloading.'
-               ) );
-
-               if ( $wgShowHostnames || $wgShowSQLErrors ) {
-                       $info = str_replace(
-                               '$1', Html::element( 'span', [ 'dir' => 'ltr' ], $this->error ),
-                               htmlspecialchars( $this->msg( 'dberr-info', '(Cannot access the database: $1)' ) )
-                       );
-               } else {
-                       $info = htmlspecialchars( $this->msg(
-                               'dberr-info-hidden',
-                               '(Cannot access the database)'
-                       ) );
-               }
-
-               # No database access
-               MessageCache::singleton()->disable();
-
-               $html = "<h1>$sorry</h1><p>$again</p><p><small>$info</small></p>";
-
-               if ( $wgShowDBErrorBacktrace ) {
-                       $html .= '<p>Backtrace:</p><pre>' . htmlspecialchars( $this->getTraceAsString() ) . '</pre>';
-               }
-
-               $html .= '<hr />';
-               $html .= $this->searchForm();
-
-               return $html;
-       }
-
-       protected function getTextContent() {
-               global $wgShowHostnames, $wgShowSQLErrors;
-
-               if ( $wgShowHostnames || $wgShowSQLErrors ) {
-                       return $this->getMessage();
-               } else {
-                       return 'DB connection error';
-               }
-       }
-
-       /**
-        * Output the exception report using HTML.
-        *
-        * @return void
-        */
-       public function reportHTML() {
-               global $wgUseFileCache;
-
-               // Check whether we can serve a file-cached copy of the page with the error underneath
-               if ( $wgUseFileCache ) {
-                       try {
-                               $cache = $this->fileCachedPage();
-                               // Cached version on file system?
-                               if ( $cache !== null ) {
-                                       // Hack: extend the body for error messages
-                                       $cache = str_replace( [ '</html>', '</body>' ], '', $cache );
-                                       // Add cache notice...
-                                       $cache .= '<div style="border:1px solid #ffd0d0;padding:1em;">' .
-                                               htmlspecialchars( $this->msg( 'dberr-cachederror',
-                                                       'This is a cached copy of the requested page, and may not be up to date.' ) ) .
-                                               '</div>';
-
-                                       // Output cached page with notices on bottom and re-close body
-                                       echo "{$cache}<hr />{$this->getHTML()}</body></html>";
-
-                                       return;
-                               }
-                       } catch ( Exception $e ) {
-                               // Do nothing, just use the default page
-                       }
-               }
-
-               // We can't, cough and die in the usual fashion
-               parent::reportHTML();
-       }
-
-       /**
-        * @return string
-        */
-       function searchForm() {
-               global $wgSitename, $wgCanonicalServer, $wgRequest;
-
-               $usegoogle = htmlspecialchars( $this->msg(
-                       'dberr-usegoogle',
-                       'You can try searching via Google in the meantime.'
-               ) );
-               $outofdate = htmlspecialchars( $this->msg(
-                       'dberr-outofdate',
-                       'Note that their indexes of our content may be out of date.'
-               ) );
-               $googlesearch = htmlspecialchars( $this->msg( 'searchbutton', 'Search' ) );
-
-               $search = htmlspecialchars( $wgRequest->getVal( 'search' ) );
-
-               $server = htmlspecialchars( $wgCanonicalServer );
-               $sitename = htmlspecialchars( $wgSitename );
-
-               $trygoogle = <<<EOT
-<div style="margin: 1.5em">$usegoogle<br />
-<small>$outofdate</small>
-</div>
-<form method="get" action="//www.google.com/search" id="googlesearch">
-       <input type="hidden" name="domains" value="$server" />
-       <input type="hidden" name="num" value="50" />
-       <input type="hidden" name="ie" value="UTF-8" />
-       <input type="hidden" name="oe" value="UTF-8" />
-
-       <input type="text" name="q" size="31" maxlength="255" value="$search" />
-       <input type="submit" name="btnG" value="$googlesearch" />
-       <p>
-               <label><input type="radio" name="sitesearch" value="$server" checked="checked" />$sitename</label>
-               <label><input type="radio" name="sitesearch" value="" />WWW</label>
-       </p>
-</form>
-EOT;
-
-               return $trygoogle;
-       }
-
-       /**
-        * @return string
-        */
-       private function fileCachedPage() {
-               $context = RequestContext::getMain();
-
-               if ( $context->getOutput()->isDisabled() ) {
-                       // Done already?
-                       return '';
-               }
-
-               if ( $context->getTitle() ) {
-                       // Use the main context's title if we managed to set it
-                       $t = $context->getTitle()->getPrefixedDBkey();
-               } else {
-                       // Fallback to the raw title URL param. We can't use the Title
-                       // class is it may hit the interwiki table and give a DB error.
-                       // We may get a cache miss due to not sanitizing the title though.
-                       $t = str_replace( ' ', '_', $context->getRequest()->getVal( 'title' ) );
-                       if ( $t == '' ) { // fallback to main page
-                               $t = Title::newFromText(
-                                       $this->msg( 'mainpage', 'Main Page' ) )->getPrefixedDBkey();
-                       }
-               }
-
-               $cache = new HTMLFileCache( $t, 'view' );
-               if ( $cache->isCached() ) {
-                       return $cache->fetchText();
-               } else {
-                       return '';
-               }
-       }
-}
-
-/**
- * @ingroup Database
- */
-class DBQueryError extends DBExpectedError {
-       public $error, $errno, $sql, $fname;
-
-       /**
-        * @param DatabaseBase $db
-        * @param string $error
-        * @param int|string $errno
-        * @param string $sql
-        * @param string $fname
-        */
-       function __construct( DatabaseBase $db, $error, $errno, $sql, $fname ) {
-               if ( $db->wasConnectionError( $errno ) ) {
-                       $message = "A connection error occured. \n" .
-                               "Query: $sql\n" .
-                               "Function: $fname\n" .
-                               "Error: $errno $error\n";
-               } else {
-                       $message = "A database error has occurred. Did you forget to run " .
-                               "maintenance/update.php after upgrading?  See: " .
-                               "https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script\n" .
-                               "Query: $sql\n" .
-                               "Function: $fname\n" .
-                               "Error: $errno $error\n";
-               }
-               parent::__construct( $db, $message );
-
-               $this->error = $error;
-               $this->errno = $errno;
-               $this->sql = $sql;
-               $this->fname = $fname;
-       }
-
-       /**
-        * @return string
-        */
-       function getPageTitle() {
-               return $this->msg( 'databaseerror', 'Database error' );
-       }
-
-       /**
-        * @return string
-        */
-       protected function getHTMLContent() {
-               $key = 'databaseerror-text';
-               $s = Html::element( 'p', [], $this->msg( $key, $this->getFallbackMessage( $key ) ) );
-
-               $details = $this->getTechnicalDetails();
-               if ( $details ) {
-                       $s .= '<ul>';
-                       foreach ( $details as $key => $detail ) {
-                               $s .= str_replace(
-                                       '$1', call_user_func_array( 'Html::element', $detail ),
-                                       Html::element( 'li', [],
-                                               $this->msg( $key, $this->getFallbackMessage( $key ) )
-                                       )
-                               );
-                       }
-                       $s .= '</ul>';
-               }
-
-               return $s;
-       }
-
-       /**
-        * @return string
-        */
-       protected function getTextContent() {
-               $key = 'databaseerror-textcl';
-               $s = $this->msg( $key, $this->getFallbackMessage( $key ) ) . "\n";
-
-               foreach ( $this->getTechnicalDetails() as $key => $detail ) {
-                       $s .= $this->msg( $key, $this->getFallbackMessage( $key ), $detail[2] ) . "\n";
-               }
-
-               return $s;
-       }
-
-       /**
-        * Make a list of technical details that can be shown to the user. This information can
-        * aid in debugging yet may be useful to an attacker trying to exploit a security weakness
-        * in the software or server configuration.
-        *
-        * Thus no such details are shown by default, though if $wgShowHostnames is true, only the
-        * full SQL query is hidden; in fact, the error message often does contain a hostname, and
-        * sites using this option probably don't care much about "security by obscurity". Of course,
-        * if $wgShowSQLErrors is true, the SQL query *is* shown.
-        *
-        * @return array Keys are message keys; values are arrays of arguments for Html::element().
-        *   Array will be empty if users are not allowed to see any of these details at all.
-        */
-       protected function getTechnicalDetails() {
-               global $wgShowHostnames, $wgShowSQLErrors;
-
-               $attribs = [ 'dir' => 'ltr' ];
-               $details = [];
-
-               if ( $wgShowSQLErrors ) {
-                       $details['databaseerror-query'] = [
-                               'div', [ 'class' => 'mw-code' ] + $attribs, $this->sql ];
-               }
-
-               if ( $wgShowHostnames || $wgShowSQLErrors ) {
-                       $errorMessage = $this->errno . ' ' . $this->error;
-                       $details['databaseerror-function'] = [ 'code', $attribs, $this->fname ];
-                       $details['databaseerror-error'] = [ 'samp', $attribs, $errorMessage ];
-               }
-
-               return $details;
-       }
-
-       /**
-        * @param string $key Message key
-        * @return string English message text
-        */
-       private function getFallbackMessage( $key ) {
-               $messages = [
-                       'databaseerror-text' => 'A database query error has occurred.
-This may indicate a bug in the software.',
-                       'databaseerror-textcl' => 'A database query error has occurred.',
-                       'databaseerror-query' => 'Query: $1',
-                       'databaseerror-function' => 'Function: $1',
-                       'databaseerror-error' => 'Error: $1',
-               ];
-
-               return $messages[$key];
-       }
-}
-
-/**
- * @ingroup Database
- */
-class DBUnexpectedError extends DBError {
-}
-
-/**
- * @ingroup Database
- */
-class DBReadOnlyError extends DBExpectedError {
-       function getPageTitle() {
-               return $this->msg( 'readonly', 'Database is locked' );
-       }
-}
-
-/**
- * @ingroup Database
- */
-class DBTransactionError extends DBExpectedError {
-}
-
-/**
- * Exception class for attempted DB access
- * @ingroup Database
- */
-class DBAccessError extends DBUnexpectedError {
-       public function __construct() {
-               parent::__construct( "Mediawiki tried to access the database via wfGetDB(). " .
-                       "This is not allowed, because database access has been disabled." );
-       }
-}
-
-/**
- * Exception class for replica DB wait timeouts
- * @ingroup Database
- */
-class DBReplicationWaitError extends DBUnexpectedError {
-}
index 269a248..6d07216 100644 (file)
@@ -28,7 +28,7 @@
 /**
  * @ingroup Database
  */
-class DatabaseMssql extends Database {
+class DatabaseMssql extends DatabaseBase {
        protected $mInsertId = null;
        protected $mLastResult = null;
        protected $mAffectedRows = null;
@@ -42,22 +42,6 @@ class DatabaseMssql extends Database {
 
        protected $mPort;
 
-       public function cascadingDeletes() {
-               return true;
-       }
-
-       public function cleanupTriggers() {
-               return false;
-       }
-
-       public function strictIPs() {
-               return false;
-       }
-
-       public function realTimestamps() {
-               return false;
-       }
-
        public function implicitGroupby() {
                return false;
        }
@@ -66,10 +50,6 @@ class DatabaseMssql extends Database {
                return false;
        }
 
-       public function functionalIndexes() {
-               return true;
-       }
-
        public function unionSupportsOrderAndLimit() {
                return false;
        }
@@ -81,7 +61,7 @@ class DatabaseMssql extends Database {
         * @param string $password
         * @param string $dbName
         * @throws DBConnectionError
-        * @return bool|DatabaseBase|null
+        * @return bool|resource|null
         */
        public function open( $server, $user, $password, $dbName ) {
                # Test for driver support, to avoid suppressed fatal error
@@ -165,7 +145,7 @@ class DatabaseMssql extends Database {
         * @throws DBUnexpectedError
         */
        protected function doQuery( $sql ) {
-               if ( $this->debug() ) {
+               if ( $this->getFlag( DBO_DEBUG ) ) {
                        wfDebug( "SQL: [$sql]\n" );
                }
                $this->offset = 0;
@@ -757,15 +737,15 @@ class DatabaseMssql extends Database {
         * UPDATE wrapper. Takes a condition array and a SET array.
         *
         * @param string $table Name of the table to UPDATE. This will be passed through
-        *                DatabaseBase::tableName().
+        *                Database::tableName().
         *
         * @param array $values An array of values to SET. For each array element,
         *                the key gives the field name, and the value gives the data
         *                to set that field to. The data will be quoted by
-        *                DatabaseBase::addQuotes().
+        *                Database::addQuotes().
         *
         * @param array $conds An array of conditions (WHERE). See
-        *                DatabaseBase::select() for the details of the format of
+        *                Database::select() for the details of the format of
         *                condition arrays. Use '*' to update all rows.
         *
         * @param string $fname The function name of the caller (from __METHOD__),
@@ -777,7 +757,6 @@ class DatabaseMssql extends Database {
         * @return bool
         * @throws DBUnexpectedError
         * @throws Exception
-        * @throws MWException
         */
        function update( $table, $values, $conds, $fname = __METHOD__, $options = [] ) {
                $table = $this->tableName( $table );
@@ -792,7 +771,7 @@ class DatabaseMssql extends Database {
 
                $this->mScrollableCursor = false;
                try {
-                       $ret = $this->query( $sql );
+                       $this->query( $sql );
                } catch ( Exception $e ) {
                        $this->mScrollableCursor = true;
                        throw $e;
@@ -807,20 +786,19 @@ class DatabaseMssql extends Database {
         * @param int $mode Constant
         *      - LIST_COMMA:          comma separated, no field names
         *      - LIST_AND:            ANDed WHERE clause (without the WHERE). See
-        *        the documentation for $conds in DatabaseBase::select().
+        *        the documentation for $conds in Database::select().
         *      - LIST_OR:             ORed WHERE clause (without the WHERE)
         *      - LIST_SET:            comma separated with field names, like a SET clause
         *      - LIST_NAMES:          comma separated field names
         * @param array $binaryColumns Contains a list of column names that are binary types
         *      This is a custom parameter only present for MS SQL.
         *
-        * @throws MWException|DBUnexpectedError
+        * @throws DBUnexpectedError
         * @return string
         */
        public function makeList( $a, $mode = LIST_COMMA, $binaryColumns = [] ) {
                if ( !is_array( $a ) ) {
-                       throw new DBUnexpectedError( $this,
-                               'DatabaseBase::makeList called with incorrect parameters' );
+                       throw new DBUnexpectedError( $this, __METHOD__ . ' called with incorrect parameters' );
                }
 
                if ( $mode != LIST_NAMES ) {
@@ -1075,7 +1053,7 @@ class DatabaseMssql extends Database {
         * Throws an exception if it is invalid.
         * Reference: http://msdn.microsoft.com/en-us/library/aa224033%28v=SQL.80%29.aspx
         * @param string $identifier
-        * @throws MWException
+        * @throws InvalidArgumentException
         * @return string
         */
        private function escapeIdentifier( $identifier ) {
@@ -1107,8 +1085,8 @@ class DatabaseMssql extends Database {
        }
 
        /**
-        * @param string|Blob $s
-        * @return string
+        * @param string|int|null|bool|Blob $s
+        * @return string|int
         */
        public function addQuotes( $s ) {
                if ( $s instanceof MssqlBlob ) {
@@ -1267,13 +1245,6 @@ class DatabaseMssql extends Database {
                return $sql;
        }
 
-       /**
-        * @return string
-        */
-       public function getSearchEngine() {
-               return "SearchMssql";
-       }
-
        /**
         * Returns an associative array for fields that are of type varbinary, binary, or image
         * $table can be either a raw table name or passed through tableName() first
@@ -1411,148 +1382,3 @@ class DatabaseMssql extends Database {
                return wfSetVar( $this->mIgnoreErrors, $value );
        }
 } // end DatabaseMssql class
-
-/**
- * Utility class.
- *
- * @ingroup Database
- */
-class MssqlField implements Field {
-       private $name, $tableName, $default, $max_length, $nullable, $type;
-
-       function __construct( $info ) {
-               $this->name = $info['COLUMN_NAME'];
-               $this->tableName = $info['TABLE_NAME'];
-               $this->default = $info['COLUMN_DEFAULT'];
-               $this->max_length = $info['CHARACTER_MAXIMUM_LENGTH'];
-               $this->nullable = !( strtolower( $info['IS_NULLABLE'] ) == 'no' );
-               $this->type = $info['DATA_TYPE'];
-       }
-
-       function name() {
-               return $this->name;
-       }
-
-       function tableName() {
-               return $this->tableName;
-       }
-
-       function defaultValue() {
-               return $this->default;
-       }
-
-       function maxLength() {
-               return $this->max_length;
-       }
-
-       function isNullable() {
-               return $this->nullable;
-       }
-
-       function type() {
-               return $this->type;
-       }
-}
-
-class MssqlBlob extends Blob {
-       public function __construct( $data ) {
-               if ( $data instanceof MssqlBlob ) {
-                       return $data;
-               } elseif ( $data instanceof Blob ) {
-                       $this->mData = $data->fetch();
-               } elseif ( is_array( $data ) && is_object( $data ) ) {
-                       $this->mData = serialize( $data );
-               } else {
-                       $this->mData = $data;
-               }
-       }
-
-       /**
-        * Returns an unquoted hex representation of a binary string
-        * for insertion into varbinary-type fields
-        * @return string
-        */
-       public function fetch() {
-               if ( $this->mData === null ) {
-                       return 'null';
-               }
-
-               $ret = '0x';
-               $dataLength = strlen( $this->mData );
-               for ( $i = 0; $i < $dataLength; $i++ ) {
-                       $ret .= bin2hex( pack( 'C', ord( $this->mData[$i] ) ) );
-               }
-
-               return $ret;
-       }
-}
-
-class MssqlResultWrapper extends ResultWrapper {
-       private $mSeekTo = null;
-
-       /**
-        * @return stdClass|bool
-        */
-       public function fetchObject() {
-               $res = $this->result;
-
-               if ( $this->mSeekTo !== null ) {
-                       $result = sqlsrv_fetch_object( $res, 'stdClass', [],
-                               SQLSRV_SCROLL_ABSOLUTE, $this->mSeekTo );
-                       $this->mSeekTo = null;
-               } else {
-                       $result = sqlsrv_fetch_object( $res );
-               }
-
-               // MediaWiki expects us to return boolean false when there are no more rows instead of null
-               if ( $result === null ) {
-                       return false;
-               }
-
-               return $result;
-       }
-
-       /**
-        * @return array|bool
-        */
-       public function fetchRow() {
-               $res = $this->result;
-
-               if ( $this->mSeekTo !== null ) {
-                       $result = sqlsrv_fetch_array( $res, SQLSRV_FETCH_BOTH,
-                               SQLSRV_SCROLL_ABSOLUTE, $this->mSeekTo );
-                       $this->mSeekTo = null;
-               } else {
-                       $result = sqlsrv_fetch_array( $res );
-               }
-
-               // MediaWiki expects us to return boolean false when there are no more rows instead of null
-               if ( $result === null ) {
-                       return false;
-               }
-
-               return $result;
-       }
-
-       /**
-        * @param int $row
-        * @return bool
-        */
-       public function seek( $row ) {
-               $res = $this->result;
-
-               // check bounds
-               $numRows = $this->db->numRows( $res );
-               $row = intval( $row );
-
-               if ( $numRows === 0 ) {
-                       return false;
-               } elseif ( $row < 0 || $row > $numRows - 1 ) {
-                       return false;
-               }
-
-               // Unlike MySQL, the seek actually happens on the next access
-               $this->mSeekTo = $row;
-               return true;
-       }
-}
diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php
deleted file mode 100644 (file)
index 87330b0..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-<?php
-/**
- * This is the MySQL database abstraction layer.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * Database abstraction object for PHP extension mysql.
- *
- * @ingroup Database
- * @see Database
- */
-class DatabaseMysql extends DatabaseMysqlBase {
-       /**
-        * @param string $sql
-        * @return resource False on error
-        */
-       protected function doQuery( $sql ) {
-               $conn = $this->getBindingHandle();
-
-               if ( $this->bufferResults() ) {
-                       $ret = mysql_query( $sql, $conn );
-               } else {
-                       $ret = mysql_unbuffered_query( $sql, $conn );
-               }
-
-               return $ret;
-       }
-
-       /**
-        * @param string $realServer
-        * @return bool|resource MySQL Database connection or false on failure to connect
-        * @throws DBConnectionError
-        */
-       protected function mysqlConnect( $realServer ) {
-               # Avoid a suppressed fatal error, which is very hard to track down
-               if ( !extension_loaded( 'mysql' ) ) {
-                       throw new DBConnectionError(
-                               $this,
-                               "MySQL functions missing, have you compiled PHP with the --with-mysql option?\n"
-                       );
-               }
-
-               $connFlags = 0;
-               if ( $this->mFlags & DBO_SSL ) {
-                       $connFlags |= MYSQL_CLIENT_SSL;
-               }
-               if ( $this->mFlags & DBO_COMPRESS ) {
-                       $connFlags |= MYSQL_CLIENT_COMPRESS;
-               }
-
-               if ( ini_get( 'mysql.connect_timeout' ) <= 3 ) {
-                       $numAttempts = 2;
-               } else {
-                       $numAttempts = 1;
-               }
-
-               $conn = false;
-
-               # The kernel's default SYN retransmission period is far too slow for us,
-               # so we use a short timeout plus a manual retry. Retrying means that a small
-               # but finite rate of SYN packet loss won't cause user-visible errors.
-               for ( $i = 0; $i < $numAttempts && !$conn; $i++ ) {
-                       if ( $i > 1 ) {
-                               usleep( 1000 );
-                       }
-                       if ( $this->mFlags & DBO_PERSISTENT ) {
-                               $conn = mysql_pconnect( $realServer, $this->mUser, $this->mPassword, $connFlags );
-                       } else {
-                               # Create a new connection...
-                               $conn = mysql_connect( $realServer, $this->mUser, $this->mPassword, true, $connFlags );
-                       }
-               }
-
-               return $conn;
-       }
-
-       /**
-        * @param string $charset
-        * @return bool
-        */
-       protected function mysqlSetCharset( $charset ) {
-               $conn = $this->getBindingHandle();
-
-               if ( function_exists( 'mysql_set_charset' ) ) {
-                       return mysql_set_charset( $charset, $conn );
-               } else {
-                       return $this->query( 'SET NAMES ' . $charset, __METHOD__ );
-               }
-       }
-
-       /**
-        * @return bool
-        */
-       protected function closeConnection() {
-               $conn = $this->getBindingHandle();
-
-               return mysql_close( $conn );
-       }
-
-       /**
-        * @return int
-        */
-       function insertId() {
-               $conn = $this->getBindingHandle();
-
-               return mysql_insert_id( $conn );
-       }
-
-       /**
-        * @return int
-        */
-       function lastErrno() {
-               if ( $this->mConn ) {
-                       return mysql_errno( $this->mConn );
-               } else {
-                       return mysql_errno();
-               }
-       }
-
-       /**
-        * @return int
-        */
-       function affectedRows() {
-               $conn = $this->getBindingHandle();
-
-               return mysql_affected_rows( $conn );
-       }
-
-       /**
-        * @param string $db
-        * @return bool
-        */
-       function selectDB( $db ) {
-               $conn = $this->getBindingHandle();
-
-               $this->mDBname = $db;
-
-               return mysql_select_db( $db, $conn );
-       }
-
-       protected function mysqlFreeResult( $res ) {
-               return mysql_free_result( $res );
-       }
-
-       protected function mysqlFetchObject( $res ) {
-               return mysql_fetch_object( $res );
-       }
-
-       protected function mysqlFetchArray( $res ) {
-               return mysql_fetch_array( $res );
-       }
-
-       protected function mysqlNumRows( $res ) {
-               return mysql_num_rows( $res );
-       }
-
-       protected function mysqlNumFields( $res ) {
-               return mysql_num_fields( $res );
-       }
-
-       protected function mysqlFetchField( $res, $n ) {
-               return mysql_fetch_field( $res, $n );
-       }
-
-       protected function mysqlFieldName( $res, $n ) {
-               return mysql_field_name( $res, $n );
-       }
-
-       protected function mysqlFieldType( $res, $n ) {
-               return mysql_field_type( $res, $n );
-       }
-
-       protected function mysqlDataSeek( $res, $row ) {
-               return mysql_data_seek( $res, $row );
-       }
-
-       protected function mysqlError( $conn = null ) {
-               return ( $conn !== null ) ? mysql_error( $conn ) : mysql_error(); // avoid warning
-       }
-
-       protected function mysqlRealEscapeString( $s ) {
-               $conn = $this->getBindingHandle();
-
-               return mysql_real_escape_string( $s, $conn );
-       }
-}
diff --git a/includes/db/DatabaseMysqlBase.php b/includes/db/DatabaseMysqlBase.php
deleted file mode 100644 (file)
index 1b60ea1..0000000
+++ /dev/null
@@ -1,1593 +0,0 @@
-<?php
-/**
- * This is the MySQL database abstraction layer.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * Database abstraction object for MySQL.
- * Defines methods independent on used MySQL extension.
- *
- * @ingroup Database
- * @since 1.22
- * @see Database
- */
-abstract class DatabaseMysqlBase extends Database {
-       /** @var MysqlMasterPos */
-       protected $lastKnownReplicaPos;
-       /** @var string Method to detect replica DB lag */
-       protected $lagDetectionMethod;
-       /** @var array Method to detect replica DB lag */
-       protected $lagDetectionOptions = [];
-       /** @var bool bool Whether to use GTID methods */
-       protected $useGTIDs = false;
-       /** @var string|null */
-       protected $sslKeyPath;
-       /** @var string|null */
-       protected $sslCertPath;
-       /** @var string|null */
-       protected $sslCAPath;
-       /** @var string[]|null */
-       protected $sslCiphers;
-       /** @var string|null */
-       private $serverVersion = null;
-
-       /**
-        * Additional $params include:
-        *   - lagDetectionMethod : set to one of (Seconds_Behind_Master,pt-heartbeat).
-        *       pt-heartbeat assumes the table is at heartbeat.heartbeat
-        *       and uses UTC timestamps in the heartbeat.ts column.
-        *       (https://www.percona.com/doc/percona-toolkit/2.2/pt-heartbeat.html)
-        *   - lagDetectionOptions : if using pt-heartbeat, this can be set to an array map to change
-        *       the default behavior. Normally, the heartbeat row with the server
-        *       ID of this server's master will be used. Set the "conds" field to
-        *       override the query conditions, e.g. ['shard' => 's1'].
-        *   - useGTIDs : use GTID methods like MASTER_GTID_WAIT() when possible.
-        *   - sslKeyPath : path to key file [default: null]
-        *   - sslCertPath : path to certificate file [default: null]
-        *   - sslCAPath : parth to certificate authority PEM files [default: null]
-        *   - sslCiphers : array list of allowable ciphers [default: null]
-        * @param array $params
-        */
-       function __construct( array $params ) {
-               parent::__construct( $params );
-
-               $this->lagDetectionMethod = isset( $params['lagDetectionMethod'] )
-                       ? $params['lagDetectionMethod']
-                       : 'Seconds_Behind_Master';
-               $this->lagDetectionOptions = isset( $params['lagDetectionOptions'] )
-                       ? $params['lagDetectionOptions']
-                       : [];
-               $this->useGTIDs = !empty( $params['useGTIDs' ] );
-               foreach ( [ 'KeyPath', 'CertPath', 'CAPath', 'Ciphers' ] as $name ) {
-                       $var = "ssl{$name}";
-                       if ( isset( $params[$var] ) ) {
-                               $this->$var = $params[$var];
-                       }
-               }
-       }
-
-       /**
-        * @return string
-        */
-       function getType() {
-               return 'mysql';
-       }
-
-       /**
-        * @param string $server
-        * @param string $user
-        * @param string $password
-        * @param string $dbName
-        * @throws Exception|DBConnectionError
-        * @return bool
-        */
-       function open( $server, $user, $password, $dbName ) {
-               global $wgAllDBsAreLocalhost, $wgSQLMode;
-
-               # Close/unset connection handle
-               $this->close();
-
-               # Debugging hack -- fake cluster
-               $realServer = $wgAllDBsAreLocalhost ? 'localhost' : $server;
-               $this->mServer = $server;
-               $this->mUser = $user;
-               $this->mPassword = $password;
-               $this->mDBname = $dbName;
-
-               $this->installErrorHandler();
-               try {
-                       $this->mConn = $this->mysqlConnect( $realServer );
-               } catch ( Exception $ex ) {
-                       $this->restoreErrorHandler();
-                       throw $ex;
-               }
-               $error = $this->restoreErrorHandler();
-
-               # Always log connection errors
-               if ( !$this->mConn ) {
-                       if ( !$error ) {
-                               $error = $this->lastError();
-                       }
-                       wfLogDBError(
-                               "Error connecting to {db_server}: {error}",
-                               $this->getLogContext( [
-                                       'method' => __METHOD__,
-                                       'error' => $error,
-                               ] )
-                       );
-                       wfDebug( "DB connection error\n" .
-                               "Server: $server, User: $user, Password: " .
-                               substr( $password, 0, 3 ) . "..., error: " . $error . "\n" );
-
-                       $this->reportConnectionError( $error );
-               }
-
-               if ( $dbName != '' ) {
-                       MediaWiki\suppressWarnings();
-                       $success = $this->selectDB( $dbName );
-                       MediaWiki\restoreWarnings();
-                       if ( !$success ) {
-                               wfLogDBError(
-                                       "Error selecting database {db_name} on server {db_server}",
-                                       $this->getLogContext( [
-                                               'method' => __METHOD__,
-                                       ] )
-                               );
-                               wfDebug( "Error selecting database $dbName on server {$this->mServer} " .
-                                       "from client host " . wfHostname() . "\n" );
-
-                               $this->reportConnectionError( "Error selecting database $dbName" );
-                       }
-               }
-
-               // Tell the server what we're communicating with
-               if ( !$this->connectInitCharset() ) {
-                       $this->reportConnectionError( "Error setting character set" );
-               }
-
-               // Abstract over any insane MySQL defaults
-               $set = [ 'group_concat_max_len = 262144' ];
-               // Set SQL mode, default is turning them all off, can be overridden or skipped with null
-               if ( is_string( $wgSQLMode ) ) {
-                       $set[] = 'sql_mode = ' . $this->addQuotes( $wgSQLMode );
-               }
-               // Set any custom settings defined by site config
-               // (e.g. https://dev.mysql.com/doc/refman/4.1/en/innodb-parameters.html)
-               foreach ( $this->mSessionVars as $var => $val ) {
-                       // Escape strings but not numbers to avoid MySQL complaining
-                       if ( !is_int( $val ) && !is_float( $val ) ) {
-                               $val = $this->addQuotes( $val );
-                       }
-                       $set[] = $this->addIdentifierQuotes( $var ) . ' = ' . $val;
-               }
-
-               if ( $set ) {
-                       // Use doQuery() to avoid opening implicit transactions (DBO_TRX)
-                       $success = $this->doQuery( 'SET ' . implode( ', ', $set ) );
-                       if ( !$success ) {
-                               wfLogDBError(
-                                       'Error setting MySQL variables on server {db_server} (check $wgSQLMode)',
-                                       $this->getLogContext( [
-                                               'method' => __METHOD__,
-                                       ] )
-                               );
-                               $this->reportConnectionError(
-                                       'Error setting MySQL variables on server {db_server} (check $wgSQLMode)' );
-                       }
-               }
-
-               $this->mOpened = true;
-
-               return true;
-       }
-
-       /**
-        * Set the character set information right after connection
-        * @return bool
-        */
-       protected function connectInitCharset() {
-               global $wgDBmysql5;
-
-               if ( $wgDBmysql5 ) {
-                       // Tell the server we're communicating with it in UTF-8.
-                       // This may engage various charset conversions.
-                       return $this->mysqlSetCharset( 'utf8' );
-               } else {
-                       return $this->mysqlSetCharset( 'binary' );
-               }
-       }
-
-       /**
-        * Open a connection to a MySQL server
-        *
-        * @param string $realServer
-        * @return mixed Raw connection
-        * @throws DBConnectionError
-        */
-       abstract protected function mysqlConnect( $realServer );
-
-       /**
-        * Set the character set of the MySQL link
-        *
-        * @param string $charset
-        * @return bool
-        */
-       abstract protected function mysqlSetCharset( $charset );
-
-       /**
-        * @param ResultWrapper|resource $res
-        * @throws DBUnexpectedError
-        */
-       function freeResult( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-               MediaWiki\suppressWarnings();
-               $ok = $this->mysqlFreeResult( $res );
-               MediaWiki\restoreWarnings();
-               if ( !$ok ) {
-                       throw new DBUnexpectedError( $this, "Unable to free MySQL result" );
-               }
-       }
-
-       /**
-        * Free result memory
-        *
-        * @param resource $res Raw result
-        * @return bool
-        */
-       abstract protected function mysqlFreeResult( $res );
-
-       /**
-        * @param ResultWrapper|resource $res
-        * @return stdClass|bool
-        * @throws DBUnexpectedError
-        */
-       function fetchObject( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-               MediaWiki\suppressWarnings();
-               $row = $this->mysqlFetchObject( $res );
-               MediaWiki\restoreWarnings();
-
-               $errno = $this->lastErrno();
-               // Unfortunately, mysql_fetch_object does not reset the last errno.
-               // Only check for CR_SERVER_LOST and CR_UNKNOWN_ERROR, as
-               // these are the only errors mysql_fetch_object can cause.
-               // See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
-               if ( $errno == 2000 || $errno == 2013 ) {
-                       throw new DBUnexpectedError(
-                               $this,
-                               'Error in fetchObject(): ' . htmlspecialchars( $this->lastError() )
-                       );
-               }
-
-               return $row;
-       }
-
-       /**
-        * Fetch a result row as an object
-        *
-        * @param resource $res Raw result
-        * @return stdClass
-        */
-       abstract protected function mysqlFetchObject( $res );
-
-       /**
-        * @param ResultWrapper|resource $res
-        * @return array|bool
-        * @throws DBUnexpectedError
-        */
-       function fetchRow( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-               MediaWiki\suppressWarnings();
-               $row = $this->mysqlFetchArray( $res );
-               MediaWiki\restoreWarnings();
-
-               $errno = $this->lastErrno();
-               // Unfortunately, mysql_fetch_array does not reset the last errno.
-               // Only check for CR_SERVER_LOST and CR_UNKNOWN_ERROR, as
-               // these are the only errors mysql_fetch_array can cause.
-               // See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
-               if ( $errno == 2000 || $errno == 2013 ) {
-                       throw new DBUnexpectedError(
-                               $this,
-                               'Error in fetchRow(): ' . htmlspecialchars( $this->lastError() )
-                       );
-               }
-
-               return $row;
-       }
-
-       /**
-        * Fetch a result row as an associative and numeric array
-        *
-        * @param resource $res Raw result
-        * @return array
-        */
-       abstract protected function mysqlFetchArray( $res );
-
-       /**
-        * @throws DBUnexpectedError
-        * @param ResultWrapper|resource $res
-        * @return int
-        */
-       function numRows( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-               MediaWiki\suppressWarnings();
-               $n = $this->mysqlNumRows( $res );
-               MediaWiki\restoreWarnings();
-
-               // Unfortunately, mysql_num_rows does not reset the last errno.
-               // We are not checking for any errors here, since
-               // these are no errors mysql_num_rows can cause.
-               // See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
-               // See https://phabricator.wikimedia.org/T44430
-               return $n;
-       }
-
-       /**
-        * Get number of rows in result
-        *
-        * @param resource $res Raw result
-        * @return int
-        */
-       abstract protected function mysqlNumRows( $res );
-
-       /**
-        * @param ResultWrapper|resource $res
-        * @return int
-        */
-       function numFields( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-
-               return $this->mysqlNumFields( $res );
-       }
-
-       /**
-        * Get number of fields in result
-        *
-        * @param resource $res Raw result
-        * @return int
-        */
-       abstract protected function mysqlNumFields( $res );
-
-       /**
-        * @param ResultWrapper|resource $res
-        * @param int $n
-        * @return string
-        */
-       function fieldName( $res, $n ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-
-               return $this->mysqlFieldName( $res, $n );
-       }
-
-       /**
-        * Get the name of the specified field in a result
-        *
-        * @param ResultWrapper|resource $res
-        * @param int $n
-        * @return string
-        */
-       abstract protected function mysqlFieldName( $res, $n );
-
-       /**
-        * mysql_field_type() wrapper
-        * @param ResultWrapper|resource $res
-        * @param int $n
-        * @return string
-        */
-       public function fieldType( $res, $n ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-
-               return $this->mysqlFieldType( $res, $n );
-       }
-
-       /**
-        * Get the type of the specified field in a result
-        *
-        * @param ResultWrapper|resource $res
-        * @param int $n
-        * @return string
-        */
-       abstract protected function mysqlFieldType( $res, $n );
-
-       /**
-        * @param ResultWrapper|resource $res
-        * @param int $row
-        * @return bool
-        */
-       function dataSeek( $res, $row ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-
-               return $this->mysqlDataSeek( $res, $row );
-       }
-
-       /**
-        * Move internal result pointer
-        *
-        * @param ResultWrapper|resource $res
-        * @param int $row
-        * @return bool
-        */
-       abstract protected function mysqlDataSeek( $res, $row );
-
-       /**
-        * @return string
-        */
-       function lastError() {
-               if ( $this->mConn ) {
-                       # Even if it's non-zero, it can still be invalid
-                       MediaWiki\suppressWarnings();
-                       $error = $this->mysqlError( $this->mConn );
-                       if ( !$error ) {
-                               $error = $this->mysqlError();
-                       }
-                       MediaWiki\restoreWarnings();
-               } else {
-                       $error = $this->mysqlError();
-               }
-               if ( $error ) {
-                       $error .= ' (' . $this->mServer . ')';
-               }
-
-               return $error;
-       }
-
-       /**
-        * Returns the text of the error message from previous MySQL operation
-        *
-        * @param resource $conn Raw connection
-        * @return string
-        */
-       abstract protected function mysqlError( $conn = null );
-
-       /**
-        * @param string $table
-        * @param array $uniqueIndexes
-        * @param array $rows
-        * @param string $fname
-        * @return ResultWrapper
-        */
-       function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
-               return $this->nativeReplace( $table, $rows, $fname );
-       }
-
-       /**
-        * Estimate rows in dataset
-        * Returns estimated count, based on EXPLAIN output
-        * Takes same arguments as Database::select()
-        *
-        * @param string|array $table
-        * @param string|array $vars
-        * @param string|array $conds
-        * @param string $fname
-        * @param string|array $options
-        * @return bool|int
-        */
-       public function estimateRowCount( $table, $vars = '*', $conds = '',
-               $fname = __METHOD__, $options = []
-       ) {
-               $options['EXPLAIN'] = true;
-               $res = $this->select( $table, $vars, $conds, $fname, $options );
-               if ( $res === false ) {
-                       return false;
-               }
-               if ( !$this->numRows( $res ) ) {
-                       return 0;
-               }
-
-               $rows = 1;
-               foreach ( $res as $plan ) {
-                       $rows *= $plan->rows > 0 ? $plan->rows : 1; // avoid resetting to zero
-               }
-
-               return (int)$rows;
-       }
-
-       /**
-        * @param string $table
-        * @param string $field
-        * @return bool|MySQLField
-        */
-       function fieldInfo( $table, $field ) {
-               $table = $this->tableName( $table );
-               $res = $this->query( "SELECT * FROM $table LIMIT 1", __METHOD__, true );
-               if ( !$res ) {
-                       return false;
-               }
-               $n = $this->mysqlNumFields( $res->result );
-               for ( $i = 0; $i < $n; $i++ ) {
-                       $meta = $this->mysqlFetchField( $res->result, $i );
-                       if ( $field == $meta->name ) {
-                               return new MySQLField( $meta );
-                       }
-               }
-
-               return false;
-       }
-
-       /**
-        * Get column information from a result
-        *
-        * @param resource $res Raw result
-        * @param int $n
-        * @return stdClass
-        */
-       abstract protected function mysqlFetchField( $res, $n );
-
-       /**
-        * Get information about an index into an object
-        * Returns false if the index does not exist
-        *
-        * @param string $table
-        * @param string $index
-        * @param string $fname
-        * @return bool|array|null False or null on failure
-        */
-       function indexInfo( $table, $index, $fname = __METHOD__ ) {
-               # SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not.
-               # SHOW INDEX should work for 3.x and up:
-               # http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html
-               $table = $this->tableName( $table );
-               $index = $this->indexName( $index );
-
-               $sql = 'SHOW INDEX FROM ' . $table;
-               $res = $this->query( $sql, $fname );
-
-               if ( !$res ) {
-                       return null;
-               }
-
-               $result = [];
-
-               foreach ( $res as $row ) {
-                       if ( $row->Key_name == $index ) {
-                               $result[] = $row;
-                       }
-               }
-
-               return empty( $result ) ? false : $result;
-       }
-
-       /**
-        * @param string $s
-        * @return string
-        */
-       function strencode( $s ) {
-               return $this->mysqlRealEscapeString( $s );
-       }
-
-       /**
-        * @param string $s
-        * @return mixed
-        */
-       abstract protected function mysqlRealEscapeString( $s );
-
-       /**
-        * MySQL uses `backticks` for identifier quoting instead of the sql standard "double quotes".
-        *
-        * @param string $s
-        * @return string
-        */
-       public function addIdentifierQuotes( $s ) {
-               // Characters in the range \u0001-\uFFFF are valid in a quoted identifier
-               // Remove NUL bytes and escape backticks by doubling
-               return '`' . str_replace( [ "\0", '`' ], [ '', '``' ], $s ) . '`';
-       }
-
-       /**
-        * @param string $name
-        * @return bool
-        */
-       public function isQuotedIdentifier( $name ) {
-               return strlen( $name ) && $name[0] == '`' && substr( $name, -1, 1 ) == '`';
-       }
-
-       function getLag() {
-               if ( $this->getLagDetectionMethod() === 'pt-heartbeat' ) {
-                       return $this->getLagFromPtHeartbeat();
-               } else {
-                       return $this->getLagFromSlaveStatus();
-               }
-       }
-
-       /**
-        * @return string
-        */
-       protected function getLagDetectionMethod() {
-               return $this->lagDetectionMethod;
-       }
-
-       /**
-        * @return bool|int
-        */
-       protected function getLagFromSlaveStatus() {
-               $res = $this->query( 'SHOW SLAVE STATUS', __METHOD__ );
-               $row = $res ? $res->fetchObject() : false;
-               if ( $row && strval( $row->Seconds_Behind_Master ) !== '' ) {
-                       return intval( $row->Seconds_Behind_Master );
-               }
-
-               return false;
-       }
-
-       /**
-        * @return bool|float
-        */
-       protected function getLagFromPtHeartbeat() {
-               $options = $this->lagDetectionOptions;
-
-               if ( isset( $options['conds'] ) ) {
-                       // Best method for multi-DC setups: use logical channel names
-                       $data = $this->getHeartbeatData( $options['conds'] );
-               } else {
-                       // Standard method: use master server ID (works with stock pt-heartbeat)
-                       $masterInfo = $this->getMasterServerInfo();
-                       if ( !$masterInfo ) {
-                               wfLogDBError(
-                                       "Unable to query master of {db_server} for server ID",
-                                       $this->getLogContext( [
-                                               'method' => __METHOD__
-                                       ] )
-                               );
-
-                               return false; // could not get master server ID
-                       }
-
-                       $conds = [ 'server_id' => intval( $masterInfo['serverId'] ) ];
-                       $data = $this->getHeartbeatData( $conds );
-               }
-
-               list( $time, $nowUnix ) = $data;
-               if ( $time !== null ) {
-                       // @time is in ISO format like "2015-09-25T16:48:10.000510"
-                       $dateTime = new DateTime( $time, new DateTimeZone( 'UTC' ) );
-                       $timeUnix = (int)$dateTime->format( 'U' ) + $dateTime->format( 'u' ) / 1e6;
-
-                       return max( $nowUnix - $timeUnix, 0.0 );
-               }
-
-               wfLogDBError(
-                       "Unable to find pt-heartbeat row for {db_server}",
-                       $this->getLogContext( [
-                               'method' => __METHOD__
-                       ] )
-               );
-
-               return false;
-       }
-
-       protected function getMasterServerInfo() {
-               $cache = $this->srvCache;
-               $key = $cache->makeGlobalKey(
-                       'mysql',
-                       'master-info',
-                       // Using one key for all cluster replica DBs is preferable
-                       $this->getLBInfo( 'clusterMasterHost' ) ?: $this->getServer()
-               );
-
-               return $cache->getWithSetCallback(
-                       $key,
-                       $cache::TTL_INDEFINITE,
-                       function () use ( $cache, $key ) {
-                               // Get and leave a lock key in place for a short period
-                               if ( !$cache->lock( $key, 0, 10 ) ) {
-                                       return false; // avoid master connection spike slams
-                               }
-
-                               $conn = $this->getLazyMasterHandle();
-                               if ( !$conn ) {
-                                       return false; // something is misconfigured
-                               }
-
-                               // Connect to and query the master; catch errors to avoid outages
-                               try {
-                                       $res = $conn->query( 'SELECT @@server_id AS id', __METHOD__ );
-                                       $row = $res ? $res->fetchObject() : false;
-                                       $id = $row ? (int)$row->id : 0;
-                               } catch ( DBError $e ) {
-                                       $id = 0;
-                               }
-
-                               // Cache the ID if it was retrieved
-                               return $id ? [ 'serverId' => $id, 'asOf' => time() ] : false;
-                       }
-               );
-       }
-
-       /**
-        * @param array $conds WHERE clause conditions to find a row
-        * @return array (heartbeat `ts` column value or null, UNIX timestamp) for the newest beat
-        * @see https://www.percona.com/doc/percona-toolkit/2.1/pt-heartbeat.html
-        */
-       protected function getHeartbeatData( array $conds ) {
-               $whereSQL = $this->makeList( $conds, LIST_AND );
-               // Use ORDER BY for channel based queries since that field might not be UNIQUE.
-               // Note: this would use "TIMESTAMPDIFF(MICROSECOND,ts,UTC_TIMESTAMP(6))" but the
-               // percision field is not supported in MySQL <= 5.5.
-               $res = $this->query(
-                       "SELECT ts FROM heartbeat.heartbeat WHERE $whereSQL ORDER BY ts DESC LIMIT 1"
-               );
-               $row = $res ? $res->fetchObject() : false;
-
-               return [ $row ? $row->ts : null, microtime( true ) ];
-       }
-
-       public function getApproximateLagStatus() {
-               if ( $this->getLagDetectionMethod() === 'pt-heartbeat' ) {
-                       // Disable caching since this is fast enough and we don't wan't
-                       // to be *too* pessimistic by having both the cache TTL and the
-                       // pt-heartbeat interval count as lag in getSessionLagStatus()
-                       return parent::getApproximateLagStatus();
-               }
-
-               $key = $this->srvCache->makeGlobalKey( 'mysql-lag', $this->getServer() );
-               $approxLag = $this->srvCache->get( $key );
-               if ( !$approxLag ) {
-                       $approxLag = parent::getApproximateLagStatus();
-                       $this->srvCache->set( $key, $approxLag, 1 );
-               }
-
-               return $approxLag;
-       }
-
-       function masterPosWait( DBMasterPos $pos, $timeout ) {
-               if ( !( $pos instanceof MySQLMasterPos ) ) {
-                       throw new InvalidArgumentException( "Position not an instance of MySQLMasterPos" );
-               }
-
-               if ( $this->getLBInfo( 'is static' ) === true ) {
-                       return 0; // this is a copy of a read-only dataset with no master DB
-               } elseif ( $this->lastKnownReplicaPos && $this->lastKnownReplicaPos->hasReached( $pos ) ) {
-                       return 0; // already reached this point for sure
-               }
-
-               // Call doQuery() directly, to avoid opening a transaction if DBO_TRX is set
-               if ( $this->useGTIDs && $pos->gtids ) {
-                       // Wait on the GTID set (MariaDB only)
-                       $gtidArg = $this->addQuotes( implode( ',', $pos->gtids ) );
-                       $res = $this->doQuery( "SELECT MASTER_GTID_WAIT($gtidArg, $timeout)" );
-               } else {
-                       // Wait on the binlog coordinates
-                       $encFile = $this->addQuotes( $pos->file );
-                       $encPos = intval( $pos->pos );
-                       $res = $this->doQuery( "SELECT MASTER_POS_WAIT($encFile, $encPos, $timeout)" );
-               }
-
-               $row = $res ? $this->fetchRow( $res ) : false;
-               if ( !$row ) {
-                       throw new DBExpectedError( $this, "Failed to query MASTER_POS_WAIT()" );
-               }
-
-               // Result can be NULL (error), -1 (timeout), or 0+ per the MySQL manual
-               $status = ( $row[0] !== null ) ? intval( $row[0] ) : null;
-               if ( $status === null ) {
-                       // T126436: jobs programmed to wait on master positions might be referencing binlogs
-                       // with an old master hostname. Such calls make MASTER_POS_WAIT() return null. Try
-                       // to detect this and treat the replica DB as having reached the position; a proper master
-                       // switchover already requires that the new master be caught up before the switch.
-                       $replicationPos = $this->getSlavePos();
-                       if ( $replicationPos && !$replicationPos->channelsMatch( $pos ) ) {
-                               $this->lastKnownReplicaPos = $replicationPos;
-                               $status = 0;
-                       }
-               } elseif ( $status >= 0 ) {
-                       // Remember that this position was reached to save queries next time
-                       $this->lastKnownReplicaPos = $pos;
-               }
-
-               return $status;
-       }
-
-       /**
-        * Get the position of the master from SHOW SLAVE STATUS
-        *
-        * @return MySQLMasterPos|bool
-        */
-       function getSlavePos() {
-               $res = $this->query( 'SHOW SLAVE STATUS', __METHOD__ );
-               $row = $this->fetchObject( $res );
-
-               if ( $row ) {
-                       $pos = isset( $row->Exec_master_log_pos )
-                               ? $row->Exec_master_log_pos
-                               : $row->Exec_Master_Log_Pos;
-                       // Also fetch the last-applied GTID set (MariaDB)
-                       if ( $this->useGTIDs ) {
-                               $res = $this->query( "SHOW GLOBAL VARIABLES LIKE 'gtid_slave_pos'", __METHOD__ );
-                               $gtidRow = $this->fetchObject( $res );
-                               $gtidSet = $gtidRow ? $gtidRow->Value : '';
-                       } else {
-                               $gtidSet = '';
-                       }
-
-                       return new MySQLMasterPos( $row->Relay_Master_Log_File, $pos, $gtidSet );
-               } else {
-                       return false;
-               }
-       }
-
-       /**
-        * Get the position of the master from SHOW MASTER STATUS
-        *
-        * @return MySQLMasterPos|bool
-        */
-       function getMasterPos() {
-               $res = $this->query( 'SHOW MASTER STATUS', __METHOD__ );
-               $row = $this->fetchObject( $res );
-
-               if ( $row ) {
-                       // Also fetch the last-written GTID set (MariaDB)
-                       if ( $this->useGTIDs ) {
-                               $res = $this->query( "SHOW GLOBAL VARIABLES LIKE 'gtid_binlog_pos'", __METHOD__ );
-                               $gtidRow = $this->fetchObject( $res );
-                               $gtidSet = $gtidRow ? $gtidRow->Value : '';
-                       } else {
-                               $gtidSet = '';
-                       }
-
-                       return new MySQLMasterPos( $row->File, $row->Position, $gtidSet );
-               } else {
-                       return false;
-               }
-       }
-
-       public function serverIsReadOnly() {
-               $res = $this->query( "SHOW GLOBAL VARIABLES LIKE 'read_only'", __METHOD__ );
-               $row = $this->fetchObject( $res );
-
-               return $row ? ( strtolower( $row->Value ) === 'on' ) : false;
-       }
-
-       /**
-        * @param string $index
-        * @return string
-        */
-       function useIndexClause( $index ) {
-               return "FORCE INDEX (" . $this->indexName( $index ) . ")";
-       }
-
-       /**
-        * @param string $index
-        * @return string
-        */
-       function ignoreIndexClause( $index ) {
-               return "IGNORE INDEX (" . $this->indexName( $index ) . ")";
-       }
-
-       /**
-        * @return string
-        */
-       function lowPriorityOption() {
-               return 'LOW_PRIORITY';
-       }
-
-       /**
-        * @return string
-        */
-       public function getSoftwareLink() {
-               // MariaDB includes its name in its version string; this is how MariaDB's version of
-               // the mysql command-line client identifies MariaDB servers (see mariadb_connection()
-               // in libmysql/libmysql.c).
-               $version = $this->getServerVersion();
-               if ( strpos( $version, 'MariaDB' ) !== false || strpos( $version, '-maria-' ) !== false ) {
-                       return '[{{int:version-db-mariadb-url}} MariaDB]';
-               }
-
-               // Percona Server's version suffix is not very distinctive, and @@version_comment
-               // doesn't give the necessary info for source builds, so assume the server is MySQL.
-               // (Even Percona's version of mysql doesn't try to make the distinction.)
-               return '[{{int:version-db-mysql-url}} MySQL]';
-       }
-
-       /**
-        * @return string
-        */
-       public function getServerVersion() {
-               // Not using mysql_get_server_info() or similar for consistency: in the handshake,
-               // MariaDB 10 adds the prefix "5.5.5-", and only some newer client libraries strip
-               // it off (see RPL_VERSION_HACK in include/mysql_com.h).
-               if ( $this->serverVersion === null ) {
-                       $this->serverVersion = $this->selectField( '', 'VERSION()', '', __METHOD__ );
-               }
-               return $this->serverVersion;
-       }
-
-       /**
-        * @param array $options
-        */
-       public function setSessionOptions( array $options ) {
-               if ( isset( $options['connTimeout'] ) ) {
-                       $timeout = (int)$options['connTimeout'];
-                       $this->query( "SET net_read_timeout=$timeout" );
-                       $this->query( "SET net_write_timeout=$timeout" );
-               }
-       }
-
-       /**
-        * @param string $sql
-        * @param string $newLine
-        * @return bool
-        */
-       public function streamStatementEnd( &$sql, &$newLine ) {
-               if ( strtoupper( substr( $newLine, 0, 9 ) ) == 'DELIMITER' ) {
-                       preg_match( '/^DELIMITER\s+(\S+)/', $newLine, $m );
-                       $this->delimiter = $m[1];
-                       $newLine = '';
-               }
-
-               return parent::streamStatementEnd( $sql, $newLine );
-       }
-
-       /**
-        * Check to see if a named lock is available. This is non-blocking.
-        *
-        * @param string $lockName Name of lock to poll
-        * @param string $method Name of method calling us
-        * @return bool
-        * @since 1.20
-        */
-       public function lockIsFree( $lockName, $method ) {
-               $lockName = $this->addQuotes( $this->makeLockName( $lockName ) );
-               $result = $this->query( "SELECT IS_FREE_LOCK($lockName) AS lockstatus", $method );
-               $row = $this->fetchObject( $result );
-
-               return ( $row->lockstatus == 1 );
-       }
-
-       /**
-        * @param string $lockName
-        * @param string $method
-        * @param int $timeout
-        * @return bool
-        */
-       public function lock( $lockName, $method, $timeout = 5 ) {
-               $lockName = $this->addQuotes( $this->makeLockName( $lockName ) );
-               $result = $this->query( "SELECT GET_LOCK($lockName, $timeout) AS lockstatus", $method );
-               $row = $this->fetchObject( $result );
-
-               if ( $row->lockstatus == 1 ) {
-                       parent::lock( $lockName, $method, $timeout ); // record
-                       return true;
-               }
-
-               wfDebug( __METHOD__ . " failed to acquire lock\n" );
-
-               return false;
-       }
-
-       /**
-        * FROM MYSQL DOCS:
-        * http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_release-lock
-        * @param string $lockName
-        * @param string $method
-        * @return bool
-        */
-       public function unlock( $lockName, $method ) {
-               $lockName = $this->addQuotes( $this->makeLockName( $lockName ) );
-               $result = $this->query( "SELECT RELEASE_LOCK($lockName) as lockstatus", $method );
-               $row = $this->fetchObject( $result );
-
-               if ( $row->lockstatus == 1 ) {
-                       parent::unlock( $lockName, $method ); // record
-                       return true;
-               }
-
-               wfDebug( __METHOD__ . " failed to release lock\n" );
-
-               return false;
-       }
-
-       private function makeLockName( $lockName ) {
-               // http://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock
-               // Newer version enforce a 64 char length limit.
-               return ( strlen( $lockName ) > 64 ) ? sha1( $lockName ) : $lockName;
-       }
-
-       public function namedLocksEnqueue() {
-               return true;
-       }
-
-       /**
-        * @param array $read
-        * @param array $write
-        * @param string $method
-        * @param bool $lowPriority
-        * @return bool
-        */
-       public function lockTables( $read, $write, $method, $lowPriority = true ) {
-               $items = [];
-
-               foreach ( $write as $table ) {
-                       $tbl = $this->tableName( $table ) .
-                               ( $lowPriority ? ' LOW_PRIORITY' : '' ) .
-                               ' WRITE';
-                       $items[] = $tbl;
-               }
-               foreach ( $read as $table ) {
-                       $items[] = $this->tableName( $table ) . ' READ';
-               }
-               $sql = "LOCK TABLES " . implode( ',', $items );
-               $this->query( $sql, $method );
-
-               return true;
-       }
-
-       /**
-        * @param string $method
-        * @return bool
-        */
-       public function unlockTables( $method ) {
-               $this->query( "UNLOCK TABLES", $method );
-
-               return true;
-       }
-
-       /**
-        * Get search engine class. All subclasses of this
-        * need to implement this if they wish to use searching.
-        *
-        * @return string
-        */
-       public function getSearchEngine() {
-               return 'SearchMySQL';
-       }
-
-       /**
-        * @param bool $value
-        */
-       public function setBigSelects( $value = true ) {
-               if ( $value === 'default' ) {
-                       if ( $this->mDefaultBigSelects === null ) {
-                               # Function hasn't been called before so it must already be set to the default
-                               return;
-                       } else {
-                               $value = $this->mDefaultBigSelects;
-                       }
-               } elseif ( $this->mDefaultBigSelects === null ) {
-                       $this->mDefaultBigSelects =
-                               (bool)$this->selectField( false, '@@sql_big_selects', '', __METHOD__ );
-               }
-               $encValue = $value ? '1' : '0';
-               $this->query( "SET sql_big_selects=$encValue", __METHOD__ );
-       }
-
-       /**
-        * DELETE where the condition is a join. MySql uses multi-table deletes.
-        * @param string $delTable
-        * @param string $joinTable
-        * @param string $delVar
-        * @param string $joinVar
-        * @param array|string $conds
-        * @param bool|string $fname
-        * @throws DBUnexpectedError
-        * @return bool|ResultWrapper
-        */
-       function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = __METHOD__ ) {
-               if ( !$conds ) {
-                       throw new DBUnexpectedError( $this, 'DatabaseBase::deleteJoin() called with empty $conds' );
-               }
-
-               $delTable = $this->tableName( $delTable );
-               $joinTable = $this->tableName( $joinTable );
-               $sql = "DELETE $delTable FROM $delTable, $joinTable WHERE $delVar=$joinVar ";
-
-               if ( $conds != '*' ) {
-                       $sql .= ' AND ' . $this->makeList( $conds, LIST_AND );
-               }
-
-               return $this->query( $sql, $fname );
-       }
-
-       /**
-        * @param string $table
-        * @param array $rows
-        * @param array $uniqueIndexes
-        * @param array $set
-        * @param string $fname
-        * @return bool
-        */
-       public function upsert( $table, array $rows, array $uniqueIndexes,
-               array $set, $fname = __METHOD__
-       ) {
-               if ( !count( $rows ) ) {
-                       return true; // nothing to do
-               }
-
-               if ( !is_array( reset( $rows ) ) ) {
-                       $rows = [ $rows ];
-               }
-
-               $table = $this->tableName( $table );
-               $columns = array_keys( $rows[0] );
-
-               $sql = "INSERT INTO $table (" . implode( ',', $columns ) . ') VALUES ';
-               $rowTuples = [];
-               foreach ( $rows as $row ) {
-                       $rowTuples[] = '(' . $this->makeList( $row ) . ')';
-               }
-               $sql .= implode( ',', $rowTuples );
-               $sql .= " ON DUPLICATE KEY UPDATE " . $this->makeList( $set, LIST_SET );
-
-               return (bool)$this->query( $sql, $fname );
-       }
-
-       /**
-        * Determines how long the server has been up
-        *
-        * @return int
-        */
-       function getServerUptime() {
-               $vars = $this->getMysqlStatus( 'Uptime' );
-
-               return (int)$vars['Uptime'];
-       }
-
-       /**
-        * Determines if the last failure was due to a deadlock
-        *
-        * @return bool
-        */
-       function wasDeadlock() {
-               return $this->lastErrno() == 1213;
-       }
-
-       /**
-        * Determines if the last failure was due to a lock timeout
-        *
-        * @return bool
-        */
-       function wasLockTimeout() {
-               return $this->lastErrno() == 1205;
-       }
-
-       function wasErrorReissuable() {
-               return $this->lastErrno() == 2013 || $this->lastErrno() == 2006;
-       }
-
-       /**
-        * Determines if the last failure was due to the database being read-only.
-        *
-        * @return bool
-        */
-       function wasReadOnlyError() {
-               return $this->lastErrno() == 1223 ||
-                       ( $this->lastErrno() == 1290 && strpos( $this->lastError(), '--read-only' ) !== false );
-       }
-
-       function wasConnectionError( $errno ) {
-               return $errno == 2013 || $errno == 2006;
-       }
-
-       /**
-        * Get the underlying binding handle, mConn
-        *
-        * Makes sure that mConn is set (disconnects and ping() failure can unset it).
-        * This catches broken callers than catch and ignore disconnection exceptions.
-        * Unlike checking isOpen(), this is safe to call inside of open().
-        *
-        * @return resource|object
-        * @throws DBUnexpectedError
-        * @since 1.26
-        */
-       protected function getBindingHandle() {
-               if ( !$this->mConn ) {
-                       throw new DBUnexpectedError(
-                               $this,
-                               'DB connection was already closed or the connection dropped.'
-                       );
-               }
-
-               return $this->mConn;
-       }
-
-       /**
-        * @param string $oldName
-        * @param string $newName
-        * @param bool $temporary
-        * @param string $fname
-        * @return bool
-        */
-       function duplicateTableStructure( $oldName, $newName, $temporary = false, $fname = __METHOD__ ) {
-               $tmp = $temporary ? 'TEMPORARY ' : '';
-               $newName = $this->addIdentifierQuotes( $newName );
-               $oldName = $this->addIdentifierQuotes( $oldName );
-               $query = "CREATE $tmp TABLE $newName (LIKE $oldName)";
-
-               return $this->query( $query, $fname );
-       }
-
-       /**
-        * List all tables on the database
-        *
-        * @param string $prefix Only show tables with this prefix, e.g. mw_
-        * @param string $fname Calling function name
-        * @return array
-        */
-       function listTables( $prefix = null, $fname = __METHOD__ ) {
-               $result = $this->query( "SHOW TABLES", $fname );
-
-               $endArray = [];
-
-               foreach ( $result as $table ) {
-                       $vars = get_object_vars( $table );
-                       $table = array_pop( $vars );
-
-                       if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
-                               $endArray[] = $table;
-                       }
-               }
-
-               return $endArray;
-       }
-
-       /**
-        * @param string $tableName
-        * @param string $fName
-        * @return bool|ResultWrapper
-        */
-       public function dropTable( $tableName, $fName = __METHOD__ ) {
-               if ( !$this->tableExists( $tableName, $fName ) ) {
-                       return false;
-               }
-
-               return $this->query( "DROP TABLE IF EXISTS " . $this->tableName( $tableName ), $fName );
-       }
-
-       /**
-        * @return array
-        */
-       protected function getDefaultSchemaVars() {
-               $vars = parent::getDefaultSchemaVars();
-               $vars['wgDBTableOptions'] = str_replace( 'TYPE', 'ENGINE', $GLOBALS['wgDBTableOptions'] );
-               $vars['wgDBTableOptions'] = str_replace(
-                       'CHARSET=mysql4',
-                       'CHARSET=binary',
-                       $vars['wgDBTableOptions']
-               );
-
-               return $vars;
-       }
-
-       /**
-        * Get status information from SHOW STATUS in an associative array
-        *
-        * @param string $which
-        * @return array
-        */
-       function getMysqlStatus( $which = "%" ) {
-               $res = $this->query( "SHOW STATUS LIKE '{$which}'" );
-               $status = [];
-
-               foreach ( $res as $row ) {
-                       $status[$row->Variable_name] = $row->Value;
-               }
-
-               return $status;
-       }
-
-       /**
-        * Lists VIEWs in the database
-        *
-        * @param string $prefix Only show VIEWs with this prefix, eg.
-        * unit_test_, or $wgDBprefix. Default: null, would return all views.
-        * @param string $fname Name of calling function
-        * @return array
-        * @since 1.22
-        */
-       public function listViews( $prefix = null, $fname = __METHOD__ ) {
-
-               if ( !isset( $this->allViews ) ) {
-
-                       // The name of the column containing the name of the VIEW
-                       $propertyName = 'Tables_in_' . $this->mDBname;
-
-                       // Query for the VIEWS
-                       $result = $this->query( 'SHOW FULL TABLES WHERE TABLE_TYPE = "VIEW"' );
-                       $this->allViews = [];
-                       while ( ( $row = $this->fetchRow( $result ) ) !== false ) {
-                               array_push( $this->allViews, $row[$propertyName] );
-                       }
-               }
-
-               if ( is_null( $prefix ) || $prefix === '' ) {
-                       return $this->allViews;
-               }
-
-               $filteredViews = [];
-               foreach ( $this->allViews as $viewName ) {
-                       // Does the name of this VIEW start with the table-prefix?
-                       if ( strpos( $viewName, $prefix ) === 0 ) {
-                               array_push( $filteredViews, $viewName );
-                       }
-               }
-
-               return $filteredViews;
-       }
-
-       /**
-        * Differentiates between a TABLE and a VIEW.
-        *
-        * @param string $name Name of the TABLE/VIEW to test
-        * @param string $prefix
-        * @return bool
-        * @since 1.22
-        */
-       public function isView( $name, $prefix = null ) {
-               return in_array( $name, $this->listViews( $prefix ) );
-       }
-}
-
-/**
- * Utility class.
- * @ingroup Database
- */
-class MySQLField implements Field {
-       private $name, $tablename, $default, $max_length, $nullable,
-               $is_pk, $is_unique, $is_multiple, $is_key, $type, $binary,
-               $is_numeric, $is_blob, $is_unsigned, $is_zerofill;
-
-       function __construct( $info ) {
-               $this->name = $info->name;
-               $this->tablename = $info->table;
-               $this->default = $info->def;
-               $this->max_length = $info->max_length;
-               $this->nullable = !$info->not_null;
-               $this->is_pk = $info->primary_key;
-               $this->is_unique = $info->unique_key;
-               $this->is_multiple = $info->multiple_key;
-               $this->is_key = ( $this->is_pk || $this->is_unique || $this->is_multiple );
-               $this->type = $info->type;
-               $this->binary = isset( $info->binary ) ? $info->binary : false;
-               $this->is_numeric = isset( $info->numeric ) ? $info->numeric : false;
-               $this->is_blob = isset( $info->blob ) ? $info->blob : false;
-               $this->is_unsigned = isset( $info->unsigned ) ? $info->unsigned : false;
-               $this->is_zerofill = isset( $info->zerofill ) ? $info->zerofill : false;
-       }
-
-       /**
-        * @return string
-        */
-       function name() {
-               return $this->name;
-       }
-
-       /**
-        * @return string
-        */
-       function tableName() {
-               return $this->tablename;
-       }
-
-       /**
-        * @return string
-        */
-       function type() {
-               return $this->type;
-       }
-
-       /**
-        * @return bool
-        */
-       function isNullable() {
-               return $this->nullable;
-       }
-
-       function defaultValue() {
-               return $this->default;
-       }
-
-       /**
-        * @return bool
-        */
-       function isKey() {
-               return $this->is_key;
-       }
-
-       /**
-        * @return bool
-        */
-       function isMultipleKey() {
-               return $this->is_multiple;
-       }
-
-       /**
-        * @return bool
-        */
-       function isBinary() {
-               return $this->binary;
-       }
-
-       /**
-        * @return bool
-        */
-       function isNumeric() {
-               return $this->is_numeric;
-       }
-
-       /**
-        * @return bool
-        */
-       function isBlob() {
-               return $this->is_blob;
-       }
-
-       /**
-        * @return bool
-        */
-       function isUnsigned() {
-               return $this->is_unsigned;
-       }
-
-       /**
-        * @return bool
-        */
-       function isZerofill() {
-               return $this->is_zerofill;
-       }
-}
-
-/**
- * DBMasterPos class for MySQL/MariaDB
- *
- * Note that master positions and sync logic here make some assumptions:
- *  - Binlog-based usage assumes single-source replication and non-hierarchical replication.
- *  - GTID-based usage allows getting/syncing with multi-source replication. It is assumed
- *    that GTID sets are complete (e.g. include all domains on the server).
- */
-class MySQLMasterPos implements DBMasterPos {
-       /** @var string Binlog file */
-       public $file;
-       /** @var int Binglog file position */
-       public $pos;
-       /** @var string[] GTID list */
-       public $gtids = [];
-       /** @var float UNIX timestamp */
-       public $asOfTime = 0.0;
-
-       /**
-        * @param string $file Binlog file name
-        * @param integer $pos Binlog position
-        * @param string $gtid Comma separated GTID set [optional]
-        */
-       function __construct( $file, $pos, $gtid = '' ) {
-               $this->file = $file;
-               $this->pos = $pos;
-               $this->gtids = array_map( 'trim', explode( ',', $gtid ) );
-               $this->asOfTime = microtime( true );
-       }
-
-       /**
-        * @return string <binlog file>/<position>, e.g db1034-bin.000976/843431247
-        */
-       function __toString() {
-               return "{$this->file}/{$this->pos}";
-       }
-
-       function asOfTime() {
-               return $this->asOfTime;
-       }
-
-       function hasReached( DBMasterPos $pos ) {
-               if ( !( $pos instanceof self ) ) {
-                       throw new InvalidArgumentException( "Position not an instance of " . __CLASS__ );
-               }
-
-               // Prefer GTID comparisons, which work with multi-tier replication
-               $thisPosByDomain = $this->getGtidCoordinates();
-               $thatPosByDomain = $pos->getGtidCoordinates();
-               if ( $thisPosByDomain && $thatPosByDomain ) {
-                       $reached = true;
-                       // Check that this has positions GTE all of those in $pos for all domains in $pos
-                       foreach ( $thatPosByDomain as $domain => $thatPos ) {
-                               $thisPos = isset( $thisPosByDomain[$domain] ) ? $thisPosByDomain[$domain] : -1;
-                               $reached = $reached && ( $thatPos <= $thisPos );
-                       }
-
-                       return $reached;
-               }
-
-               // Fallback to the binlog file comparisons
-               $thisBinPos = $this->getBinlogCoordinates();
-               $thatBinPos = $pos->getBinlogCoordinates();
-               if ( $thisBinPos && $thatBinPos && $thisBinPos['binlog'] === $thatBinPos['binlog'] ) {
-                       return ( $thisBinPos['pos'] >= $thatBinPos['pos'] );
-               }
-
-               // Comparing totally different binlogs does not make sense
-               return false;
-       }
-
-       function channelsMatch( DBMasterPos $pos ) {
-               if ( !( $pos instanceof self ) ) {
-                       throw new InvalidArgumentException( "Position not an instance of " . __CLASS__ );
-               }
-
-               // Prefer GTID comparisons, which work with multi-tier replication
-               $thisPosDomains = array_keys( $this->getGtidCoordinates() );
-               $thatPosDomains = array_keys( $pos->getGtidCoordinates() );
-               if ( $thisPosDomains && $thatPosDomains ) {
-                       // Check that this has GTIDs for all domains in $pos
-                       return !array_diff( $thatPosDomains, $thisPosDomains );
-               }
-
-               // Fallback to the binlog file comparisons
-               $thisBinPos = $this->getBinlogCoordinates();
-               $thatBinPos = $pos->getBinlogCoordinates();
-
-               return ( $thisBinPos && $thatBinPos && $thisBinPos['binlog'] === $thatBinPos['binlog'] );
-       }
-
-       /**
-        * @note: this returns false for multi-source replication GTID sets
-        * @see https://mariadb.com/kb/en/mariadb/gtid
-        * @see https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-concepts.html
-        * @return array Map of (domain => integer position) or false
-        */
-       protected function getGtidCoordinates() {
-               $gtidInfos = [];
-               foreach ( $this->gtids as $gtid ) {
-                       $m = [];
-                       // MariaDB style: <domain>-<server id>-<sequence number>
-                       if ( preg_match( '!^(\d+)-\d+-(\d+)$!', $gtid, $m ) ) {
-                               $gtidInfos[(int)$m[1]] = (int)$m[2];
-                       // MySQL style: <UUID domain>:<sequence number>
-                       } elseif ( preg_match( '!^(\w{8}-\w{4}-\w{4}-\w{4}-\w{12}):(\d+)$!', $gtid, $m ) ) {
-                               $gtidInfos[$m[1]] = (int)$m[2];
-                       } else {
-                               $gtidInfos = [];
-                               break; // unrecognized GTID
-                       }
-
-               }
-
-               return $gtidInfos;
-       }
-
-       /**
-        * @see http://dev.mysql.com/doc/refman/5.7/en/show-master-status.html
-        * @see http://dev.mysql.com/doc/refman/5.7/en/show-slave-status.html
-        * @return array|bool (binlog, (integer file number, integer position)) or false
-        */
-       protected function getBinlogCoordinates() {
-               $m = [];
-               if ( preg_match( '!^(.+)\.(\d+)/(\d+)$!', (string)$this, $m ) ) {
-                       return [ 'binlog' => $m[1], 'pos' => [ (int)$m[2], (int)$m[3] ] ];
-               }
-
-               return false;
-       }
-}
diff --git a/includes/db/DatabaseMysqli.php b/includes/db/DatabaseMysqli.php
deleted file mode 100644 (file)
index e468601..0000000
+++ /dev/null
@@ -1,334 +0,0 @@
-<?php
-/**
- * This is the MySQLi database abstraction layer.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * Database abstraction object for PHP extension mysqli.
- *
- * @ingroup Database
- * @since 1.22
- * @see Database
- */
-class DatabaseMysqli extends DatabaseMysqlBase {
-       /** @var mysqli */
-       protected $mConn;
-
-       /**
-        * @param string $sql
-        * @return resource
-        */
-       protected function doQuery( $sql ) {
-               $conn = $this->getBindingHandle();
-
-               if ( $this->bufferResults() ) {
-                       $ret = $conn->query( $sql );
-               } else {
-                       $ret = $conn->query( $sql, MYSQLI_USE_RESULT );
-               }
-
-               return $ret;
-       }
-
-       /**
-        * @param string $realServer
-        * @return bool|mysqli
-        * @throws DBConnectionError
-        */
-       protected function mysqlConnect( $realServer ) {
-               global $wgDBmysql5;
-
-               # Avoid suppressed fatal error, which is very hard to track down
-               if ( !function_exists( 'mysqli_init' ) ) {
-                       throw new DBConnectionError( $this, "MySQLi functions missing,"
-                               . " have you compiled PHP with the --with-mysqli option?\n" );
-               }
-
-               // Other than mysql_connect, mysqli_real_connect expects an explicit port
-               // and socket parameters. So we need to parse the port and socket out of
-               // $realServer
-               $port = null;
-               $socket = null;
-               $hostAndPort = IP::splitHostAndPort( $realServer );
-               if ( $hostAndPort ) {
-                       $realServer = $hostAndPort[0];
-                       if ( $hostAndPort[1] ) {
-                               $port = $hostAndPort[1];
-                       }
-               } elseif ( substr_count( $realServer, ':' ) == 1 ) {
-                       // If we have a colon and something that's not a port number
-                       // inside the hostname, assume it's the socket location
-                       $hostAndSocket = explode( ':', $realServer );
-                       $realServer = $hostAndSocket[0];
-                       $socket = $hostAndSocket[1];
-               }
-
-               $mysqli = mysqli_init();
-
-               $connFlags = 0;
-               if ( $this->mFlags & DBO_SSL ) {
-                       $connFlags |= MYSQLI_CLIENT_SSL;
-                       $mysqli->ssl_set(
-                               $this->sslKeyPath,
-                               $this->sslCertPath,
-                               null,
-                               $this->sslCAPath,
-                               $this->sslCiphers
-                       );
-               }
-               if ( $this->mFlags & DBO_COMPRESS ) {
-                       $connFlags |= MYSQLI_CLIENT_COMPRESS;
-               }
-               if ( $this->mFlags & DBO_PERSISTENT ) {
-                       $realServer = 'p:' . $realServer;
-               }
-
-               if ( $wgDBmysql5 ) {
-                       // Tell the server we're communicating with it in UTF-8.
-                       // This may engage various charset conversions.
-                       $mysqli->options( MYSQLI_SET_CHARSET_NAME, 'utf8' );
-               } else {
-                       $mysqli->options( MYSQLI_SET_CHARSET_NAME, 'binary' );
-               }
-               $mysqli->options( MYSQLI_OPT_CONNECT_TIMEOUT, 3 );
-
-               if ( $mysqli->real_connect( $realServer, $this->mUser,
-                       $this->mPassword, $this->mDBname, $port, $socket, $connFlags )
-               ) {
-                       return $mysqli;
-               }
-
-               return false;
-       }
-
-       protected function connectInitCharset() {
-               // already done in mysqlConnect()
-               return true;
-       }
-
-       /**
-        * @param string $charset
-        * @return bool
-        */
-       protected function mysqlSetCharset( $charset ) {
-               $conn = $this->getBindingHandle();
-
-               if ( method_exists( $conn, 'set_charset' ) ) {
-                       return $conn->set_charset( $charset );
-               } else {
-                       return $this->query( 'SET NAMES ' . $charset, __METHOD__ );
-               }
-       }
-
-       /**
-        * @return bool
-        */
-       protected function closeConnection() {
-               $conn = $this->getBindingHandle();
-
-               return $conn->close();
-       }
-
-       /**
-        * @return int
-        */
-       function insertId() {
-               $conn = $this->getBindingHandle();
-
-               return (int)$conn->insert_id;
-       }
-
-       /**
-        * @return int
-        */
-       function lastErrno() {
-               if ( $this->mConn ) {
-                       return $this->mConn->errno;
-               } else {
-                       return mysqli_connect_errno();
-               }
-       }
-
-       /**
-        * @return int
-        */
-       function affectedRows() {
-               $conn = $this->getBindingHandle();
-
-               return $conn->affected_rows;
-       }
-
-       /**
-        * @param string $db
-        * @return bool
-        */
-       function selectDB( $db ) {
-               $conn = $this->getBindingHandle();
-
-               $this->mDBname = $db;
-
-               return $conn->select_db( $db );
-       }
-
-       /**
-        * @param mysqli $res
-        * @return bool
-        */
-       protected function mysqlFreeResult( $res ) {
-               $res->free_result();
-
-               return true;
-       }
-
-       /**
-        * @param mysqli $res
-        * @return bool
-        */
-       protected function mysqlFetchObject( $res ) {
-               $object = $res->fetch_object();
-               if ( $object === null ) {
-                       return false;
-               }
-
-               return $object;
-       }
-
-       /**
-        * @param mysqli $res
-        * @return bool
-        */
-       protected function mysqlFetchArray( $res ) {
-               $array = $res->fetch_array();
-               if ( $array === null ) {
-                       return false;
-               }
-
-               return $array;
-       }
-
-       /**
-        * @param mysqli $res
-        * @return mixed
-        */
-       protected function mysqlNumRows( $res ) {
-               return $res->num_rows;
-       }
-
-       /**
-        * @param mysqli $res
-        * @return mixed
-        */
-       protected function mysqlNumFields( $res ) {
-               return $res->field_count;
-       }
-
-       /**
-        * @param mysqli $res
-        * @param int $n
-        * @return mixed
-        */
-       protected function mysqlFetchField( $res, $n ) {
-               $field = $res->fetch_field_direct( $n );
-
-               // Add missing properties to result (using flags property)
-               // which will be part of function mysql-fetch-field for backward compatibility
-               $field->not_null = $field->flags & MYSQLI_NOT_NULL_FLAG;
-               $field->primary_key = $field->flags & MYSQLI_PRI_KEY_FLAG;
-               $field->unique_key = $field->flags & MYSQLI_UNIQUE_KEY_FLAG;
-               $field->multiple_key = $field->flags & MYSQLI_MULTIPLE_KEY_FLAG;
-               $field->binary = $field->flags & MYSQLI_BINARY_FLAG;
-               $field->numeric = $field->flags & MYSQLI_NUM_FLAG;
-               $field->blob = $field->flags & MYSQLI_BLOB_FLAG;
-               $field->unsigned = $field->flags & MYSQLI_UNSIGNED_FLAG;
-               $field->zerofill = $field->flags & MYSQLI_ZEROFILL_FLAG;
-
-               return $field;
-       }
-
-       /**
-        * @param resource|ResultWrapper $res
-        * @param int $n
-        * @return mixed
-        */
-       protected function mysqlFieldName( $res, $n ) {
-               $field = $res->fetch_field_direct( $n );
-
-               return $field->name;
-       }
-
-       /**
-        * @param resource|ResultWrapper $res
-        * @param int $n
-        * @return mixed
-        */
-       protected function mysqlFieldType( $res, $n ) {
-               $field = $res->fetch_field_direct( $n );
-
-               return $field->type;
-       }
-
-       /**
-        * @param resource|ResultWrapper $res
-        * @param int $row
-        * @return mixed
-        */
-       protected function mysqlDataSeek( $res, $row ) {
-               return $res->data_seek( $row );
-       }
-
-       /**
-        * @param mysqli $conn Optional connection object
-        * @return string
-        */
-       protected function mysqlError( $conn = null ) {
-               if ( $conn === null ) {
-                       return mysqli_connect_error();
-               } else {
-                       return $conn->error;
-               }
-       }
-
-       /**
-        * Escapes special characters in a string for use in an SQL statement
-        * @param string $s
-        * @return string
-        */
-       protected function mysqlRealEscapeString( $s ) {
-               $conn = $this->getBindingHandle();
-
-               return $conn->real_escape_string( $s );
-       }
-
-       /**
-        * Give an id for the connection
-        *
-        * mysql driver used resource id, but mysqli objects cannot be cast to string.
-        * @return string
-        */
-       public function __toString() {
-               if ( $this->mConn instanceof mysqli ) {
-                       return (string)$this->mConn->thread_id;
-               } else {
-                       // mConn might be false or something.
-                       return (string)$this->mConn;
-               }
-       }
-}
index f401058..561dadb 100644 (file)
@@ -50,7 +50,7 @@ class ORAResult {
        }
 
        /**
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         * @param resource $stmt A valid OCI statement identifier
         * @param bool $unique
         */
@@ -129,63 +129,9 @@ class ORAResult {
 }
 
 /**
- * Utility class.
  * @ingroup Database
  */
-class ORAField implements Field {
-       private $name, $tablename, $default, $max_length, $nullable,
-               $is_pk, $is_unique, $is_multiple, $is_key, $type;
-
-       function __construct( $info ) {
-               $this->name = $info['column_name'];
-               $this->tablename = $info['table_name'];
-               $this->default = $info['data_default'];
-               $this->max_length = $info['data_length'];
-               $this->nullable = $info['not_null'];
-               $this->is_pk = isset( $info['prim'] ) && $info['prim'] == 1 ? 1 : 0;
-               $this->is_unique = isset( $info['uniq'] ) && $info['uniq'] == 1 ? 1 : 0;
-               $this->is_multiple = isset( $info['nonuniq'] ) && $info['nonuniq'] == 1 ? 1 : 0;
-               $this->is_key = ( $this->is_pk || $this->is_unique || $this->is_multiple );
-               $this->type = $info['data_type'];
-       }
-
-       function name() {
-               return $this->name;
-       }
-
-       function tableName() {
-               return $this->tablename;
-       }
-
-       function defaultValue() {
-               return $this->default;
-       }
-
-       function maxLength() {
-               return $this->max_length;
-       }
-
-       function isNullable() {
-               return $this->nullable;
-       }
-
-       function isKey() {
-               return $this->is_key;
-       }
-
-       function isMultipleKey() {
-               return $this->is_multiple;
-       }
-
-       function type() {
-               return $this->type;
-       }
-}
-
-/**
- * @ingroup Database
- */
-class DatabaseOracle extends Database {
+class DatabaseOracle extends DatabaseBase {
        /** @var resource */
        protected $mLastResult = null;
 
@@ -230,22 +176,6 @@ class DatabaseOracle extends Database {
                return 'oracle';
        }
 
-       function cascadingDeletes() {
-               return true;
-       }
-
-       function cleanupTriggers() {
-               return true;
-       }
-
-       function strictIPs() {
-               return true;
-       }
-
-       function realTimestamps() {
-               return true;
-       }
-
        function implicitGroupby() {
                return false;
        }
@@ -254,10 +184,6 @@ class DatabaseOracle extends Database {
                return false;
        }
 
-       function searchableIPs() {
-               return true;
-       }
-
        /**
         * Usually aborts on failure
         * @param string $server
@@ -265,7 +191,7 @@ class DatabaseOracle extends Database {
         * @param string $password
         * @param string $dbName
         * @throws DBConnectionError
-        * @return DatabaseBase|null
+        * @return resource|null
         */
        function open( $server, $user, $password, $dbName ) {
                global $wgDBOracleDRCP;
@@ -1571,10 +1497,6 @@ class DatabaseOracle extends Database {
                return 'CAST ( ' . $field . ' AS VARCHAR2 )';
        }
 
-       public function getSearchEngine() {
-               return 'SearchOracle';
-       }
-
        public function getInfinity() {
                return '31-12-2030 12:00:00.000000';
        }
diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php
deleted file mode 100644 (file)
index 22445c0..0000000
+++ /dev/null
@@ -1,1641 +0,0 @@
-<?php
-/**
- * This is the Postgres database abstraction layer.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-class PostgresField implements Field {
-       private $name, $tablename, $type, $nullable, $max_length, $deferred, $deferrable, $conname,
-               $has_default, $default;
-
-       /**
-        * @param DatabaseBase $db
-        * @param string $table
-        * @param string $field
-        * @return null|PostgresField
-        */
-       static function fromText( $db, $table, $field ) {
-               $q = <<<SQL
-SELECT
- attnotnull, attlen, conname AS conname,
- atthasdef,
- adsrc,
- COALESCE(condeferred, 'f') AS deferred,
- COALESCE(condeferrable, 'f') AS deferrable,
- CASE WHEN typname = 'int2' THEN 'smallint'
-  WHEN typname = 'int4' THEN 'integer'
-  WHEN typname = 'int8' THEN 'bigint'
-  WHEN typname = 'bpchar' THEN 'char'
- ELSE typname END AS typname
-FROM pg_class c
-JOIN pg_namespace n ON (n.oid = c.relnamespace)
-JOIN pg_attribute a ON (a.attrelid = c.oid)
-JOIN pg_type t ON (t.oid = a.atttypid)
-LEFT JOIN pg_constraint o ON (o.conrelid = c.oid AND a.attnum = ANY(o.conkey) AND o.contype = 'f')
-LEFT JOIN pg_attrdef d on c.oid=d.adrelid and a.attnum=d.adnum
-WHERE relkind = 'r'
-AND nspname=%s
-AND relname=%s
-AND attname=%s;
-SQL;
-
-               $table = $db->tableName( $table, 'raw' );
-               $res = $db->query(
-                       sprintf( $q,
-                               $db->addQuotes( $db->getCoreSchema() ),
-                               $db->addQuotes( $table ),
-                               $db->addQuotes( $field )
-                       )
-               );
-               $row = $db->fetchObject( $res );
-               if ( !$row ) {
-                       return null;
-               }
-               $n = new PostgresField;
-               $n->type = $row->typname;
-               $n->nullable = ( $row->attnotnull == 'f' );
-               $n->name = $field;
-               $n->tablename = $table;
-               $n->max_length = $row->attlen;
-               $n->deferrable = ( $row->deferrable == 't' );
-               $n->deferred = ( $row->deferred == 't' );
-               $n->conname = $row->conname;
-               $n->has_default = ( $row->atthasdef === 't' );
-               $n->default = $row->adsrc;
-
-               return $n;
-       }
-
-       function name() {
-               return $this->name;
-       }
-
-       function tableName() {
-               return $this->tablename;
-       }
-
-       function type() {
-               return $this->type;
-       }
-
-       function isNullable() {
-               return $this->nullable;
-       }
-
-       function maxLength() {
-               return $this->max_length;
-       }
-
-       function is_deferrable() {
-               return $this->deferrable;
-       }
-
-       function is_deferred() {
-               return $this->deferred;
-       }
-
-       function conname() {
-               return $this->conname;
-       }
-
-       /**
-        * @since 1.19
-        * @return bool|mixed
-        */
-       function defaultValue() {
-               if ( $this->has_default ) {
-                       return $this->default;
-               } else {
-                       return false;
-               }
-       }
-}
-
-/**
- * Manage savepoints within a transaction
- * @ingroup Database
- * @since 1.19
- */
-class SavepointPostgres {
-       /** @var DatabasePostgres Establish a savepoint within a transaction */
-       protected $dbw;
-       protected $id;
-       protected $didbegin;
-
-       /**
-        * @param DatabaseBase $dbw
-        * @param int $id
-        */
-       public function __construct( $dbw, $id ) {
-               $this->dbw = $dbw;
-               $this->id = $id;
-               $this->didbegin = false;
-               /* If we are not in a transaction, we need to be for savepoint trickery */
-               if ( !$dbw->trxLevel() ) {
-                       $dbw->begin( "FOR SAVEPOINT", DatabasePostgres::TRANSACTION_INTERNAL );
-                       $this->didbegin = true;
-               }
-       }
-
-       public function __destruct() {
-               if ( $this->didbegin ) {
-                       $this->dbw->rollback();
-                       $this->didbegin = false;
-               }
-       }
-
-       public function commit() {
-               if ( $this->didbegin ) {
-                       $this->dbw->commit();
-                       $this->didbegin = false;
-               }
-       }
-
-       protected function query( $keyword, $msg_ok, $msg_failed ) {
-               if ( $this->dbw->doQuery( $keyword . " " . $this->id ) !== false ) {
-               } else {
-                       wfDebug( sprintf( $msg_failed, $this->id ) );
-               }
-       }
-
-       public function savepoint() {
-               $this->query( "SAVEPOINT",
-                       "Transaction state: savepoint \"%s\" established.\n",
-                       "Transaction state: establishment of savepoint \"%s\" FAILED.\n"
-               );
-       }
-
-       public function release() {
-               $this->query( "RELEASE",
-                       "Transaction state: savepoint \"%s\" released.\n",
-                       "Transaction state: release of savepoint \"%s\" FAILED.\n"
-               );
-       }
-
-       public function rollback() {
-               $this->query( "ROLLBACK TO",
-                       "Transaction state: savepoint \"%s\" rolled back.\n",
-                       "Transaction state: rollback of savepoint \"%s\" FAILED.\n"
-               );
-       }
-
-       public function __toString() {
-               return (string)$this->id;
-       }
-}
-
-/**
- * @ingroup Database
- */
-class DatabasePostgres extends Database {
-       /** @var resource */
-       protected $mLastResult = null;
-
-       /** @var int The number of rows affected as an integer */
-       protected $mAffectedRows = null;
-
-       /** @var int */
-       private $mInsertId = null;
-
-       /** @var float|string */
-       private $numericVersion = null;
-
-       /** @var string Connect string to open a PostgreSQL connection */
-       private $connectString;
-
-       /** @var string */
-       private $mCoreSchema;
-
-       function getType() {
-               return 'postgres';
-       }
-
-       function cascadingDeletes() {
-               return true;
-       }
-
-       function cleanupTriggers() {
-               return true;
-       }
-
-       function strictIPs() {
-               return true;
-       }
-
-       function realTimestamps() {
-               return true;
-       }
-
-       function implicitGroupby() {
-               return false;
-       }
-
-       function implicitOrderby() {
-               return false;
-       }
-
-       function searchableIPs() {
-               return true;
-       }
-
-       function functionalIndexes() {
-               return true;
-       }
-
-       function hasConstraint( $name ) {
-               $sql = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n " .
-                       "WHERE c.connamespace = n.oid AND conname = '" .
-                       pg_escape_string( $this->mConn, $name ) . "' AND n.nspname = '" .
-                       pg_escape_string( $this->mConn, $this->getCoreSchema() ) . "'";
-               $res = $this->doQuery( $sql );
-
-               return $this->numRows( $res );
-       }
-
-       /**
-        * Usually aborts on failure
-        * @param string $server
-        * @param string $user
-        * @param string $password
-        * @param string $dbName
-        * @throws DBConnectionError|Exception
-        * @return DatabaseBase|null
-        */
-       function open( $server, $user, $password, $dbName ) {
-               # Test for Postgres support, to avoid suppressed fatal error
-               if ( !function_exists( 'pg_connect' ) ) {
-                       throw new DBConnectionError(
-                               $this,
-                               "Postgres functions missing, have you compiled PHP with the --with-pgsql\n" .
-                               "option? (Note: if you recently installed PHP, you may need to restart your\n" .
-                               "webserver and database)\n"
-                       );
-               }
-
-               global $wgDBport;
-
-               if ( !strlen( $user ) ) { # e.g. the class is being loaded
-                       return null;
-               }
-
-               $this->mServer = $server;
-               $port = $wgDBport;
-               $this->mUser = $user;
-               $this->mPassword = $password;
-               $this->mDBname = $dbName;
-
-               $connectVars = [
-                       'dbname' => $dbName,
-                       'user' => $user,
-                       'password' => $password
-               ];
-               if ( $server != false && $server != '' ) {
-                       $connectVars['host'] = $server;
-               }
-               if ( $port != false && $port != '' ) {
-                       $connectVars['port'] = $port;
-               }
-               if ( $this->mFlags & DBO_SSL ) {
-                       $connectVars['sslmode'] = 1;
-               }
-
-               $this->connectString = $this->makeConnectionString( $connectVars, PGSQL_CONNECT_FORCE_NEW );
-               $this->close();
-               $this->installErrorHandler();
-
-               try {
-                       $this->mConn = pg_connect( $this->connectString );
-               } catch ( Exception $ex ) {
-                       $this->restoreErrorHandler();
-                       throw $ex;
-               }
-
-               $phpError = $this->restoreErrorHandler();
-
-               if ( !$this->mConn ) {
-                       wfDebug( "DB connection error\n" );
-                       wfDebug( "Server: $server, Database: $dbName, User: $user, Password: " .
-                               substr( $password, 0, 3 ) . "...\n" );
-                       wfDebug( $this->lastError() . "\n" );
-                       throw new DBConnectionError( $this, str_replace( "\n", ' ', $phpError ) );
-               }
-
-               $this->mOpened = true;
-
-               global $wgCommandLineMode;
-               # If called from the command-line (e.g. importDump), only show errors
-               if ( $wgCommandLineMode ) {
-                       $this->doQuery( "SET client_min_messages = 'ERROR'" );
-               }
-
-               $this->query( "SET client_encoding='UTF8'", __METHOD__ );
-               $this->query( "SET datestyle = 'ISO, YMD'", __METHOD__ );
-               $this->query( "SET timezone = 'GMT'", __METHOD__ );
-               $this->query( "SET standard_conforming_strings = on", __METHOD__ );
-               if ( $this->getServerVersion() >= 9.0 ) {
-                       $this->query( "SET bytea_output = 'escape'", __METHOD__ ); // PHP bug 53127
-               }
-
-               global $wgDBmwschema;
-               $this->determineCoreSchema( $wgDBmwschema );
-
-               return $this->mConn;
-       }
-
-       /**
-        * Postgres doesn't support selectDB in the same way MySQL does. So if the
-        * DB name doesn't match the open connection, open a new one
-        * @param string $db
-        * @return bool
-        */
-       function selectDB( $db ) {
-               if ( $this->mDBname !== $db ) {
-                       return (bool)$this->open( $this->mServer, $this->mUser, $this->mPassword, $db );
-               } else {
-                       return true;
-               }
-       }
-
-       function makeConnectionString( $vars ) {
-               $s = '';
-               foreach ( $vars as $name => $value ) {
-                       $s .= "$name='" . str_replace( "'", "\\'", $value ) . "' ";
-               }
-
-               return $s;
-       }
-
-       /**
-        * Closes a database connection, if it is open
-        * Returns success, true if already closed
-        * @return bool
-        */
-       protected function closeConnection() {
-               return pg_close( $this->mConn );
-       }
-
-       public function doQuery( $sql ) {
-               $sql = mb_convert_encoding( $sql, 'UTF-8' );
-               // Clear previously left over PQresult
-               while ( $res = pg_get_result( $this->mConn ) ) {
-                       pg_free_result( $res );
-               }
-               if ( pg_send_query( $this->mConn, $sql ) === false ) {
-                       throw new DBUnexpectedError( $this, "Unable to post new query to PostgreSQL\n" );
-               }
-               $this->mLastResult = pg_get_result( $this->mConn );
-               $this->mAffectedRows = null;
-               if ( pg_result_error( $this->mLastResult ) ) {
-                       return false;
-               }
-
-               return $this->mLastResult;
-       }
-
-       protected function dumpError() {
-               $diags = [
-                       PGSQL_DIAG_SEVERITY,
-                       PGSQL_DIAG_SQLSTATE,
-                       PGSQL_DIAG_MESSAGE_PRIMARY,
-                       PGSQL_DIAG_MESSAGE_DETAIL,
-                       PGSQL_DIAG_MESSAGE_HINT,
-                       PGSQL_DIAG_STATEMENT_POSITION,
-                       PGSQL_DIAG_INTERNAL_POSITION,
-                       PGSQL_DIAG_INTERNAL_QUERY,
-                       PGSQL_DIAG_CONTEXT,
-                       PGSQL_DIAG_SOURCE_FILE,
-                       PGSQL_DIAG_SOURCE_LINE,
-                       PGSQL_DIAG_SOURCE_FUNCTION
-               ];
-               foreach ( $diags as $d ) {
-                       wfDebug( sprintf( "PgSQL ERROR(%d): %s\n",
-                               $d, pg_result_error_field( $this->mLastResult, $d ) ) );
-               }
-       }
-
-       function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
-               if ( $tempIgnore ) {
-                       /* Check for constraint violation */
-                       if ( $errno === '23505' ) {
-                               parent::reportQueryError( $error, $errno, $sql, $fname, $tempIgnore );
-
-                               return;
-                       }
-               }
-               /* Transaction stays in the ERROR state until rolled back */
-               if ( $this->mTrxLevel ) {
-                       $ignore = $this->ignoreErrors( true );
-                       $this->rollback( __METHOD__ );
-                       $this->ignoreErrors( $ignore );
-               }
-               parent::reportQueryError( $error, $errno, $sql, $fname, false );
-       }
-
-       function queryIgnore( $sql, $fname = __METHOD__ ) {
-               return $this->query( $sql, $fname, true );
-       }
-
-       /**
-        * @param stdClass|ResultWrapper $res
-        * @throws DBUnexpectedError
-        */
-       function freeResult( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-               MediaWiki\suppressWarnings();
-               $ok = pg_free_result( $res );
-               MediaWiki\restoreWarnings();
-               if ( !$ok ) {
-                       throw new DBUnexpectedError( $this, "Unable to free Postgres result\n" );
-               }
-       }
-
-       /**
-        * @param ResultWrapper|stdClass $res
-        * @return stdClass
-        * @throws DBUnexpectedError
-        */
-       function fetchObject( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-               MediaWiki\suppressWarnings();
-               $row = pg_fetch_object( $res );
-               MediaWiki\restoreWarnings();
-               # @todo FIXME: HACK HACK HACK HACK debug
-
-               # @todo hashar: not sure if the following test really trigger if the object
-               #          fetching failed.
-               if ( pg_last_error( $this->mConn ) ) {
-                       throw new DBUnexpectedError(
-                               $this,
-                               'SQL error: ' . htmlspecialchars( pg_last_error( $this->mConn ) )
-                       );
-               }
-
-               return $row;
-       }
-
-       function fetchRow( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-               MediaWiki\suppressWarnings();
-               $row = pg_fetch_array( $res );
-               MediaWiki\restoreWarnings();
-               if ( pg_last_error( $this->mConn ) ) {
-                       throw new DBUnexpectedError(
-                               $this,
-                               'SQL error: ' . htmlspecialchars( pg_last_error( $this->mConn ) )
-                       );
-               }
-
-               return $row;
-       }
-
-       function numRows( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-               MediaWiki\suppressWarnings();
-               $n = pg_num_rows( $res );
-               MediaWiki\restoreWarnings();
-               if ( pg_last_error( $this->mConn ) ) {
-                       throw new DBUnexpectedError(
-                               $this,
-                               'SQL error: ' . htmlspecialchars( pg_last_error( $this->mConn ) )
-                       );
-               }
-
-               return $n;
-       }
-
-       function numFields( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-
-               return pg_num_fields( $res );
-       }
-
-       function fieldName( $res, $n ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-
-               return pg_field_name( $res, $n );
-       }
-
-       /**
-        * Return the result of the last call to nextSequenceValue();
-        * This must be called after nextSequenceValue().
-        *
-        * @return int|null
-        */
-       function insertId() {
-               return $this->mInsertId;
-       }
-
-       /**
-        * @param mixed $res
-        * @param int $row
-        * @return bool
-        */
-       function dataSeek( $res, $row ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-
-               return pg_result_seek( $res, $row );
-       }
-
-       function lastError() {
-               if ( $this->mConn ) {
-                       if ( $this->mLastResult ) {
-                               return pg_result_error( $this->mLastResult );
-                       } else {
-                               return pg_last_error();
-                       }
-               } else {
-                       return 'No database connection';
-               }
-       }
-
-       function lastErrno() {
-               if ( $this->mLastResult ) {
-                       return pg_result_error_field( $this->mLastResult, PGSQL_DIAG_SQLSTATE );
-               } else {
-                       return false;
-               }
-       }
-
-       function affectedRows() {
-               if ( !is_null( $this->mAffectedRows ) ) {
-                       // Forced result for simulated queries
-                       return $this->mAffectedRows;
-               }
-               if ( empty( $this->mLastResult ) ) {
-                       return 0;
-               }
-
-               return pg_affected_rows( $this->mLastResult );
-       }
-
-       /**
-        * Estimate rows in dataset
-        * Returns estimated count, based on EXPLAIN output
-        * This is not necessarily an accurate estimate, so use sparingly
-        * Returns -1 if count cannot be found
-        * Takes same arguments as Database::select()
-        *
-        * @param string $table
-        * @param string $vars
-        * @param string $conds
-        * @param string $fname
-        * @param array $options
-        * @return int
-        */
-       function estimateRowCount( $table, $vars = '*', $conds = '',
-               $fname = __METHOD__, $options = []
-       ) {
-               $options['EXPLAIN'] = true;
-               $res = $this->select( $table, $vars, $conds, $fname, $options );
-               $rows = -1;
-               if ( $res ) {
-                       $row = $this->fetchRow( $res );
-                       $count = [];
-                       if ( preg_match( '/rows=(\d+)/', $row[0], $count ) ) {
-                               $rows = (int)$count[1];
-                       }
-               }
-
-               return $rows;
-       }
-
-       /**
-        * Returns information about an index
-        * If errors are explicitly ignored, returns NULL on failure
-        *
-        * @param string $table
-        * @param string $index
-        * @param string $fname
-        * @return bool|null
-        */
-       function indexInfo( $table, $index, $fname = __METHOD__ ) {
-               $sql = "SELECT indexname FROM pg_indexes WHERE tablename='$table'";
-               $res = $this->query( $sql, $fname );
-               if ( !$res ) {
-                       return null;
-               }
-               foreach ( $res as $row ) {
-                       if ( $row->indexname == $this->indexName( $index ) ) {
-                               return $row;
-                       }
-               }
-
-               return false;
-       }
-
-       /**
-        * Returns is of attributes used in index
-        *
-        * @since 1.19
-        * @param string $index
-        * @param bool|string $schema
-        * @return array
-        */
-       function indexAttributes( $index, $schema = false ) {
-               if ( $schema === false ) {
-                       $schema = $this->getCoreSchema();
-               }
-               /*
-                * A subquery would be not needed if we didn't care about the order
-                * of attributes, but we do
-                */
-               $sql = <<<__INDEXATTR__
-
-                       SELECT opcname,
-                               attname,
-                               i.indoption[s.g] as option,
-                               pg_am.amname
-                       FROM
-                               (SELECT generate_series(array_lower(isub.indkey,1), array_upper(isub.indkey,1)) AS g
-                                       FROM
-                                               pg_index isub
-                                       JOIN pg_class cis
-                                               ON cis.oid=isub.indexrelid
-                                       JOIN pg_namespace ns
-                                               ON cis.relnamespace = ns.oid
-                                       WHERE cis.relname='$index' AND ns.nspname='$schema') AS s,
-                               pg_attribute,
-                               pg_opclass opcls,
-                               pg_am,
-                               pg_class ci
-                               JOIN pg_index i
-                                       ON ci.oid=i.indexrelid
-                               JOIN pg_class ct
-                                       ON ct.oid = i.indrelid
-                               JOIN pg_namespace n
-                                       ON ci.relnamespace = n.oid
-                               WHERE
-                                       ci.relname='$index' AND n.nspname='$schema'
-                                       AND     attrelid = ct.oid
-                                       AND     i.indkey[s.g] = attnum
-                                       AND     i.indclass[s.g] = opcls.oid
-                                       AND     pg_am.oid = opcls.opcmethod
-__INDEXATTR__;
-               $res = $this->query( $sql, __METHOD__ );
-               $a = [];
-               if ( $res ) {
-                       foreach ( $res as $row ) {
-                               $a[] = [
-                                       $row->attname,
-                                       $row->opcname,
-                                       $row->amname,
-                                       $row->option ];
-                       }
-               } else {
-                       return null;
-               }
-
-               return $a;
-       }
-
-       function indexUnique( $table, $index, $fname = __METHOD__ ) {
-               $sql = "SELECT indexname FROM pg_indexes WHERE tablename='{$table}'" .
-                       " AND indexdef LIKE 'CREATE UNIQUE%(" .
-                       $this->strencode( $this->indexName( $index ) ) .
-                       ")'";
-               $res = $this->query( $sql, $fname );
-               if ( !$res ) {
-                       return null;
-               }
-
-               return $res->numRows() > 0;
-       }
-
-       /**
-        * Change the FOR UPDATE option as necessary based on the join conditions. Then pass
-        * to the parent function to get the actual SQL text.
-        *
-        * In Postgres when using FOR UPDATE, only the main table and tables that are inner joined
-        * can be locked. That means tables in an outer join cannot be FOR UPDATE locked. Trying to do
-        * so causes a DB error. This wrapper checks which tables can be locked and adjusts it accordingly.
-        *
-        * MySQL uses "ORDER BY NULL" as an optimization hint, but that syntax is illegal in PostgreSQL.
-        * @see DatabaseBase::selectSQLText
-        */
-       function selectSQLText( $table, $vars, $conds = '', $fname = __METHOD__,
-               $options = [], $join_conds = []
-       ) {
-               if ( is_array( $options ) ) {
-                       $forUpdateKey = array_search( 'FOR UPDATE', $options, true );
-                       if ( $forUpdateKey !== false && $join_conds ) {
-                               unset( $options[$forUpdateKey] );
-
-                               foreach ( $join_conds as $table_cond => $join_cond ) {
-                                       if ( 0 === preg_match( '/^(?:LEFT|RIGHT|FULL)(?: OUTER)? JOIN$/i', $join_cond[0] ) ) {
-                                               $options['FOR UPDATE'][] = $table_cond;
-                                       }
-                               }
-                       }
-
-                       if ( isset( $options['ORDER BY'] ) && $options['ORDER BY'] == 'NULL' ) {
-                               unset( $options['ORDER BY'] );
-                       }
-               }
-
-               return parent::selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds );
-       }
-
-       /**
-        * INSERT wrapper, inserts an array into a table
-        *
-        * $args may be a single associative array, or an array of these with numeric keys,
-        * for multi-row insert (Postgres version 8.2 and above only).
-        *
-        * @param string $table Name of the table to insert to.
-        * @param array $args Items to insert into the table.
-        * @param string $fname Name of the function, for profiling
-        * @param array|string $options String or array. Valid options: IGNORE
-        * @return bool Success of insert operation. IGNORE always returns true.
-        */
-       function insert( $table, $args, $fname = __METHOD__, $options = [] ) {
-               if ( !count( $args ) ) {
-                       return true;
-               }
-
-               $table = $this->tableName( $table );
-               if ( !isset( $this->numericVersion ) ) {
-                       $this->getServerVersion();
-               }
-
-               if ( !is_array( $options ) ) {
-                       $options = [ $options ];
-               }
-
-               if ( isset( $args[0] ) && is_array( $args[0] ) ) {
-                       $multi = true;
-                       $keys = array_keys( $args[0] );
-               } else {
-                       $multi = false;
-                       $keys = array_keys( $args );
-               }
-
-               // If IGNORE is set, we use savepoints to emulate mysql's behavior
-               $savepoint = null;
-               if ( in_array( 'IGNORE', $options ) ) {
-                       $savepoint = new SavepointPostgres( $this, 'mw' );
-                       $olde = error_reporting( 0 );
-                       // For future use, we may want to track the number of actual inserts
-                       // Right now, insert (all writes) simply return true/false
-                       $numrowsinserted = 0;
-               }
-
-               $sql = "INSERT INTO $table (" . implode( ',', $keys ) . ') VALUES ';
-
-               if ( $multi ) {
-                       if ( $this->numericVersion >= 8.2 && !$savepoint ) {
-                               $first = true;
-                               foreach ( $args as $row ) {
-                                       if ( $first ) {
-                                               $first = false;
-                                       } else {
-                                               $sql .= ',';
-                                       }
-                                       $sql .= '(' . $this->makeList( $row ) . ')';
-                               }
-                               $res = (bool)$this->query( $sql, $fname, $savepoint );
-                       } else {
-                               $res = true;
-                               $origsql = $sql;
-                               foreach ( $args as $row ) {
-                                       $tempsql = $origsql;
-                                       $tempsql .= '(' . $this->makeList( $row ) . ')';
-
-                                       if ( $savepoint ) {
-                                               $savepoint->savepoint();
-                                       }
-
-                                       $tempres = (bool)$this->query( $tempsql, $fname, $savepoint );
-
-                                       if ( $savepoint ) {
-                                               $bar = pg_result_error( $this->mLastResult );
-                                               if ( $bar != false ) {
-                                                       $savepoint->rollback();
-                                               } else {
-                                                       $savepoint->release();
-                                                       $numrowsinserted++;
-                                               }
-                                       }
-
-                                       // If any of them fail, we fail overall for this function call
-                                       // Note that this will be ignored if IGNORE is set
-                                       if ( !$tempres ) {
-                                               $res = false;
-                                       }
-                               }
-                       }
-               } else {
-                       // Not multi, just a lone insert
-                       if ( $savepoint ) {
-                               $savepoint->savepoint();
-                       }
-
-                       $sql .= '(' . $this->makeList( $args ) . ')';
-                       $res = (bool)$this->query( $sql, $fname, $savepoint );
-                       if ( $savepoint ) {
-                               $bar = pg_result_error( $this->mLastResult );
-                               if ( $bar != false ) {
-                                       $savepoint->rollback();
-                               } else {
-                                       $savepoint->release();
-                                       $numrowsinserted++;
-                               }
-                       }
-               }
-               if ( $savepoint ) {
-                       error_reporting( $olde );
-                       $savepoint->commit();
-
-                       // Set the affected row count for the whole operation
-                       $this->mAffectedRows = $numrowsinserted;
-
-                       // IGNORE always returns true
-                       return true;
-               }
-
-               return $res;
-       }
-
-       /**
-        * INSERT SELECT wrapper
-        * $varMap must be an associative array of the form [ 'dest1' => 'source1', ... ]
-        * Source items may be literals rather then field names, but strings should
-        * be quoted with Database::addQuotes()
-        * $conds may be "*" to copy the whole table
-        * srcTable may be an array of tables.
-        * @todo FIXME: Implement this a little better (seperate select/insert)?
-        *
-        * @param string $destTable
-        * @param array|string $srcTable
-        * @param array $varMap
-        * @param array $conds
-        * @param string $fname
-        * @param array $insertOptions
-        * @param array $selectOptions
-        * @return bool
-        */
-       function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds, $fname = __METHOD__,
-               $insertOptions = [], $selectOptions = [] ) {
-               $destTable = $this->tableName( $destTable );
-
-               if ( !is_array( $insertOptions ) ) {
-                       $insertOptions = [ $insertOptions ];
-               }
-
-               /*
-                * If IGNORE is set, we use savepoints to emulate mysql's behavior
-                * Ignore LOW PRIORITY option, since it is MySQL-specific
-                */
-               $savepoint = null;
-               if ( in_array( 'IGNORE', $insertOptions ) ) {
-                       $savepoint = new SavepointPostgres( $this, 'mw' );
-                       $olde = error_reporting( 0 );
-                       $numrowsinserted = 0;
-                       $savepoint->savepoint();
-               }
-
-               if ( !is_array( $selectOptions ) ) {
-                       $selectOptions = [ $selectOptions ];
-               }
-               list( $startOpts, $useIndex, $tailOpts, $ignoreIndex ) =
-                       $this->makeSelectOptions( $selectOptions );
-               if ( is_array( $srcTable ) ) {
-                       $srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
-               } else {
-                       $srcTable = $this->tableName( $srcTable );
-               }
-
-               $sql = "INSERT INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ')' .
-                       " SELECT $startOpts " . implode( ',', $varMap ) .
-                       " FROM $srcTable $useIndex $ignoreIndex ";
-
-               if ( $conds != '*' ) {
-                       $sql .= ' WHERE ' . $this->makeList( $conds, LIST_AND );
-               }
-
-               $sql .= " $tailOpts";
-
-               $res = (bool)$this->query( $sql, $fname, $savepoint );
-               if ( $savepoint ) {
-                       $bar = pg_result_error( $this->mLastResult );
-                       if ( $bar != false ) {
-                               $savepoint->rollback();
-                       } else {
-                               $savepoint->release();
-                               $numrowsinserted++;
-                       }
-                       error_reporting( $olde );
-                       $savepoint->commit();
-
-                       // Set the affected row count for the whole operation
-                       $this->mAffectedRows = $numrowsinserted;
-
-                       // IGNORE always returns true
-                       return true;
-               }
-
-               return $res;
-       }
-
-       function tableName( $name, $format = 'quoted' ) {
-               # Replace reserved words with better ones
-               switch ( $name ) {
-                       case 'user':
-                               return $this->realTableName( 'mwuser', $format );
-                       case 'text':
-                               return $this->realTableName( 'pagecontent', $format );
-                       default:
-                               return $this->realTableName( $name, $format );
-               }
-       }
-
-       /* Don't cheat on installer */
-       function realTableName( $name, $format = 'quoted' ) {
-               return parent::tableName( $name, $format );
-       }
-
-       /**
-        * Return the next in a sequence, save the value for retrieval via insertId()
-        *
-        * @param string $seqName
-        * @return int|null
-        */
-       function nextSequenceValue( $seqName ) {
-               $safeseq = str_replace( "'", "''", $seqName );
-               $res = $this->query( "SELECT nextval('$safeseq')" );
-               $row = $this->fetchRow( $res );
-               $this->mInsertId = $row[0];
-
-               return $this->mInsertId;
-       }
-
-       /**
-        * Return the current value of a sequence. Assumes it has been nextval'ed in this session.
-        *
-        * @param string $seqName
-        * @return int
-        */
-       function currentSequenceValue( $seqName ) {
-               $safeseq = str_replace( "'", "''", $seqName );
-               $res = $this->query( "SELECT currval('$safeseq')" );
-               $row = $this->fetchRow( $res );
-               $currval = $row[0];
-
-               return $currval;
-       }
-
-       # Returns the size of a text field, or -1 for "unlimited"
-       function textFieldSize( $table, $field ) {
-               $table = $this->tableName( $table );
-               $sql = "SELECT t.typname as ftype,a.atttypmod as size
-                       FROM pg_class c, pg_attribute a, pg_type t
-                       WHERE relname='$table' AND a.attrelid=c.oid AND
-                               a.atttypid=t.oid and a.attname='$field'";
-               $res = $this->query( $sql );
-               $row = $this->fetchObject( $res );
-               if ( $row->ftype == 'varchar' ) {
-                       $size = $row->size - 4;
-               } else {
-                       $size = $row->size;
-               }
-
-               return $size;
-       }
-
-       function limitResult( $sql, $limit, $offset = false ) {
-               return "$sql LIMIT $limit " . ( is_numeric( $offset ) ? " OFFSET {$offset} " : '' );
-       }
-
-       function wasDeadlock() {
-               return $this->lastErrno() == '40P01';
-       }
-
-       function duplicateTableStructure( $oldName, $newName, $temporary = false, $fname = __METHOD__ ) {
-               $newName = $this->addIdentifierQuotes( $newName );
-               $oldName = $this->addIdentifierQuotes( $oldName );
-
-               return $this->query( 'CREATE ' . ( $temporary ? 'TEMPORARY ' : '' ) . " TABLE $newName " .
-                       "(LIKE $oldName INCLUDING DEFAULTS)", $fname );
-       }
-
-       function listTables( $prefix = null, $fname = __METHOD__ ) {
-               $eschema = $this->addQuotes( $this->getCoreSchema() );
-               $result = $this->query( "SELECT tablename FROM pg_tables WHERE schemaname = $eschema", $fname );
-               $endArray = [];
-
-               foreach ( $result as $table ) {
-                       $vars = get_object_vars( $table );
-                       $table = array_pop( $vars );
-                       if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
-                               $endArray[] = $table;
-                       }
-               }
-
-               return $endArray;
-       }
-
-       function timestamp( $ts = 0 ) {
-               return wfTimestamp( TS_POSTGRES, $ts );
-       }
-
-       /**
-        * Posted by cc[plus]php[at]c2se[dot]com on 25-Mar-2009 09:12
-        * to http://www.php.net/manual/en/ref.pgsql.php
-        *
-        * Parsing a postgres array can be a tricky problem, he's my
-        * take on this, it handles multi-dimensional arrays plus
-        * escaping using a nasty regexp to determine the limits of each
-        * data-item.
-        *
-        * This should really be handled by PHP PostgreSQL module
-        *
-        * @since 1.19
-        * @param string $text Postgreql array returned in a text form like {a,b}
-        * @param string $output
-        * @param int $limit
-        * @param int $offset
-        * @return string
-        */
-       function pg_array_parse( $text, &$output, $limit = false, $offset = 1 ) {
-               if ( false === $limit ) {
-                       $limit = strlen( $text ) - 1;
-                       $output = [];
-               }
-               if ( '{}' == $text ) {
-                       return $output;
-               }
-               do {
-                       if ( '{' != $text[$offset] ) {
-                               preg_match( "/(\\{?\"([^\"\\\\]|\\\\.)*\"|[^,{}]+)+([,}]+)/",
-                                       $text, $match, 0, $offset );
-                               $offset += strlen( $match[0] );
-                               $output[] = ( '"' != $match[1][0]
-                                       ? $match[1]
-                                       : stripcslashes( substr( $match[1], 1, -1 ) ) );
-                               if ( '},' == $match[3] ) {
-                                       return $output;
-                               }
-                       } else {
-                               $offset = $this->pg_array_parse( $text, $output, $limit, $offset + 1 );
-                       }
-               } while ( $limit > $offset );
-
-               return $output;
-       }
-
-       /**
-        * Return aggregated value function call
-        * @param array $valuedata
-        * @param string $valuename
-        * @return array
-        */
-       public function aggregateValue( $valuedata, $valuename = 'value' ) {
-               return $valuedata;
-       }
-
-       /**
-        * @return string Wikitext of a link to the server software's web site
-        */
-       public function getSoftwareLink() {
-               return '[{{int:version-db-postgres-url}} PostgreSQL]';
-       }
-
-       /**
-        * Return current schema (executes SELECT current_schema())
-        * Needs transaction
-        *
-        * @since 1.19
-        * @return string Default schema for the current session
-        */
-       function getCurrentSchema() {
-               $res = $this->query( "SELECT current_schema()", __METHOD__ );
-               $row = $this->fetchRow( $res );
-
-               return $row[0];
-       }
-
-       /**
-        * Return list of schemas which are accessible without schema name
-        * This is list does not contain magic keywords like "$user"
-        * Needs transaction
-        *
-        * @see getSearchPath()
-        * @see setSearchPath()
-        * @since 1.19
-        * @return array List of actual schemas for the current sesson
-        */
-       function getSchemas() {
-               $res = $this->query( "SELECT current_schemas(false)", __METHOD__ );
-               $row = $this->fetchRow( $res );
-               $schemas = [];
-
-               /* PHP pgsql support does not support array type, "{a,b}" string is returned */
-
-               return $this->pg_array_parse( $row[0], $schemas );
-       }
-
-       /**
-        * Return search patch for schemas
-        * This is different from getSchemas() since it contain magic keywords
-        * (like "$user").
-        * Needs transaction
-        *
-        * @since 1.19
-        * @return array How to search for table names schemas for the current user
-        */
-       function getSearchPath() {
-               $res = $this->query( "SHOW search_path", __METHOD__ );
-               $row = $this->fetchRow( $res );
-
-               /* PostgreSQL returns SHOW values as strings */
-
-               return explode( ",", $row[0] );
-       }
-
-       /**
-        * Update search_path, values should already be sanitized
-        * Values may contain magic keywords like "$user"
-        * @since 1.19
-        *
-        * @param array $search_path List of schemas to be searched by default
-        */
-       function setSearchPath( $search_path ) {
-               $this->query( "SET search_path = " . implode( ", ", $search_path ) );
-       }
-
-       /**
-        * Determine default schema for MediaWiki core
-        * Adjust this session schema search path if desired schema exists
-        * and is not alread there.
-        *
-        * We need to have name of the core schema stored to be able
-        * to query database metadata.
-        *
-        * This will be also called by the installer after the schema is created
-        *
-        * @since 1.19
-        *
-        * @param string $desiredSchema
-        */
-       function determineCoreSchema( $desiredSchema ) {
-               $this->begin( __METHOD__, self::TRANSACTION_INTERNAL );
-               if ( $this->schemaExists( $desiredSchema ) ) {
-                       if ( in_array( $desiredSchema, $this->getSchemas() ) ) {
-                               $this->mCoreSchema = $desiredSchema;
-                               wfDebug( "Schema \"" . $desiredSchema . "\" already in the search path\n" );
-                       } else {
-                               /**
-                                * Prepend our schema (e.g. 'mediawiki') in front
-                                * of the search path
-                                * Fixes bug 15816
-                                */
-                               $search_path = $this->getSearchPath();
-                               array_unshift( $search_path,
-                                       $this->addIdentifierQuotes( $desiredSchema ) );
-                               $this->setSearchPath( $search_path );
-                               $this->mCoreSchema = $desiredSchema;
-                               wfDebug( "Schema \"" . $desiredSchema . "\" added to the search path\n" );
-                       }
-               } else {
-                       $this->mCoreSchema = $this->getCurrentSchema();
-                       wfDebug( "Schema \"" . $desiredSchema . "\" not found, using current \"" .
-                               $this->mCoreSchema . "\"\n" );
-               }
-               /* Commit SET otherwise it will be rollbacked on error or IGNORE SELECT */
-               $this->commit( __METHOD__ );
-       }
-
-       /**
-        * Return schema name fore core MediaWiki tables
-        *
-        * @since 1.19
-        * @return string Core schema name
-        */
-       function getCoreSchema() {
-               return $this->mCoreSchema;
-       }
-
-       /**
-        * @return string Version information from the database
-        */
-       function getServerVersion() {
-               if ( !isset( $this->numericVersion ) ) {
-                       $versionInfo = pg_version( $this->mConn );
-                       if ( version_compare( $versionInfo['client'], '7.4.0', 'lt' ) ) {
-                               // Old client, abort install
-                               $this->numericVersion = '7.3 or earlier';
-                       } elseif ( isset( $versionInfo['server'] ) ) {
-                               // Normal client
-                               $this->numericVersion = $versionInfo['server'];
-                       } else {
-                               // Bug 16937: broken pgsql extension from PHP<5.3
-                               $this->numericVersion = pg_parameter_status( $this->mConn, 'server_version' );
-                       }
-               }
-
-               return $this->numericVersion;
-       }
-
-       /**
-        * Query whether a given relation exists (in the given schema, or the
-        * default mw one if not given)
-        * @param string $table
-        * @param array|string $types
-        * @param bool|string $schema
-        * @return bool
-        */
-       function relationExists( $table, $types, $schema = false ) {
-               if ( !is_array( $types ) ) {
-                       $types = [ $types ];
-               }
-               if ( !$schema ) {
-                       $schema = $this->getCoreSchema();
-               }
-               $table = $this->realTableName( $table, 'raw' );
-               $etable = $this->addQuotes( $table );
-               $eschema = $this->addQuotes( $schema );
-               $sql = "SELECT 1 FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n "
-                       . "WHERE c.relnamespace = n.oid AND c.relname = $etable AND n.nspname = $eschema "
-                       . "AND c.relkind IN ('" . implode( "','", $types ) . "')";
-               $res = $this->query( $sql );
-               $count = $res ? $res->numRows() : 0;
-
-               return (bool)$count;
-       }
-
-       /**
-        * For backward compatibility, this function checks both tables and
-        * views.
-        * @param string $table
-        * @param string $fname
-        * @param bool|string $schema
-        * @return bool
-        */
-       function tableExists( $table, $fname = __METHOD__, $schema = false ) {
-               return $this->relationExists( $table, [ 'r', 'v' ], $schema );
-       }
-
-       function sequenceExists( $sequence, $schema = false ) {
-               return $this->relationExists( $sequence, 'S', $schema );
-       }
-
-       function triggerExists( $table, $trigger ) {
-               $q = <<<SQL
-       SELECT 1 FROM pg_class, pg_namespace, pg_trigger
-               WHERE relnamespace=pg_namespace.oid AND relkind='r'
-                         AND tgrelid=pg_class.oid
-                         AND nspname=%s AND relname=%s AND tgname=%s
-SQL;
-               $res = $this->query(
-                       sprintf(
-                               $q,
-                               $this->addQuotes( $this->getCoreSchema() ),
-                               $this->addQuotes( $table ),
-                               $this->addQuotes( $trigger )
-                       )
-               );
-               if ( !$res ) {
-                       return null;
-               }
-               $rows = $res->numRows();
-
-               return $rows;
-       }
-
-       function ruleExists( $table, $rule ) {
-               $exists = $this->selectField( 'pg_rules', 'rulename',
-                       [
-                               'rulename' => $rule,
-                               'tablename' => $table,
-                               'schemaname' => $this->getCoreSchema()
-                       ]
-               );
-
-               return $exists === $rule;
-       }
-
-       function constraintExists( $table, $constraint ) {
-               $sql = sprintf( "SELECT 1 FROM information_schema.table_constraints " .
-                       "WHERE constraint_schema = %s AND table_name = %s AND constraint_name = %s",
-                       $this->addQuotes( $this->getCoreSchema() ),
-                       $this->addQuotes( $table ),
-                       $this->addQuotes( $constraint )
-               );
-               $res = $this->query( $sql );
-               if ( !$res ) {
-                       return null;
-               }
-               $rows = $res->numRows();
-
-               return $rows;
-       }
-
-       /**
-        * Query whether a given schema exists. Returns true if it does, false if it doesn't.
-        * @param string $schema
-        * @return bool
-        */
-       function schemaExists( $schema ) {
-               $exists = $this->selectField( '"pg_catalog"."pg_namespace"', 1,
-                       [ 'nspname' => $schema ], __METHOD__ );
-
-               return (bool)$exists;
-       }
-
-       /**
-        * Returns true if a given role (i.e. user) exists, false otherwise.
-        * @param string $roleName
-        * @return bool
-        */
-       function roleExists( $roleName ) {
-               $exists = $this->selectField( '"pg_catalog"."pg_roles"', 1,
-                       [ 'rolname' => $roleName ], __METHOD__ );
-
-               return (bool)$exists;
-       }
-
-       /**
-        * @var string $table
-        * @var string $field
-        * @return PostgresField|null
-        */
-       function fieldInfo( $table, $field ) {
-               return PostgresField::fromText( $this, $table, $field );
-       }
-
-       /**
-        * pg_field_type() wrapper
-        * @param ResultWrapper|resource $res ResultWrapper or PostgreSQL query result resource
-        * @param int $index Field number, starting from 0
-        * @return string
-        */
-       function fieldType( $res, $index ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res = $res->result;
-               }
-
-               return pg_field_type( $res, $index );
-       }
-
-       /**
-        * @param string $b
-        * @return Blob
-        */
-       function encodeBlob( $b ) {
-               return new PostgresBlob( pg_escape_bytea( $b ) );
-       }
-
-       function decodeBlob( $b ) {
-               if ( $b instanceof PostgresBlob ) {
-                       $b = $b->fetch();
-               } elseif ( $b instanceof Blob ) {
-                       return $b->fetch();
-               }
-
-               return pg_unescape_bytea( $b );
-       }
-
-       function strencode( $s ) {
-               // Should not be called by us
-
-               return pg_escape_string( $this->mConn, $s );
-       }
-
-       /**
-        * @param null|bool|Blob $s
-        * @return int|string
-        */
-       function addQuotes( $s ) {
-               if ( is_null( $s ) ) {
-                       return 'NULL';
-               } elseif ( is_bool( $s ) ) {
-                       return intval( $s );
-               } elseif ( $s instanceof Blob ) {
-                       if ( $s instanceof PostgresBlob ) {
-                               $s = $s->fetch();
-                       } else {
-                               $s = pg_escape_bytea( $this->mConn, $s->fetch() );
-                       }
-                       return "'$s'";
-               }
-
-               return "'" . pg_escape_string( $this->mConn, $s ) . "'";
-       }
-
-       /**
-        * Postgres specific version of replaceVars.
-        * Calls the parent version in Database.php
-        *
-        * @param string $ins SQL string, read from a stream (usually tables.sql)
-        * @return string SQL string
-        */
-       protected function replaceVars( $ins ) {
-               $ins = parent::replaceVars( $ins );
-
-               if ( $this->numericVersion >= 8.3 ) {
-                       // Thanks for not providing backwards-compatibility, 8.3
-                       $ins = preg_replace( "/to_tsvector\s*\(\s*'default'\s*,/", 'to_tsvector(', $ins );
-               }
-
-               if ( $this->numericVersion <= 8.1 ) { // Our minimum version
-                       $ins = str_replace( 'USING gin', 'USING gist', $ins );
-               }
-
-               return $ins;
-       }
-
-       /**
-        * Various select options
-        *
-        * @param array $options An associative array of options to be turned into
-        *   an SQL query, valid keys are listed in the function.
-        * @return array
-        */
-       function makeSelectOptions( $options ) {
-               $preLimitTail = $postLimitTail = '';
-               $startOpts = $useIndex = $ignoreIndex = '';
-
-               $noKeyOptions = [];
-               foreach ( $options as $key => $option ) {
-                       if ( is_numeric( $key ) ) {
-                               $noKeyOptions[$option] = true;
-                       }
-               }
-
-               $preLimitTail .= $this->makeGroupByWithHaving( $options );
-
-               $preLimitTail .= $this->makeOrderBy( $options );
-
-               // if ( isset( $options['LIMIT'] ) ) {
-               //      $tailOpts .= $this->limitResult( '', $options['LIMIT'],
-               //              isset( $options['OFFSET'] ) ? $options['OFFSET']
-               //              : false );
-               // }
-
-               if ( isset( $options['FOR UPDATE'] ) ) {
-                       $postLimitTail .= ' FOR UPDATE OF ' .
-                               implode( ', ', array_map( [ &$this, 'tableName' ], $options['FOR UPDATE'] ) );
-               } elseif ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
-                       $postLimitTail .= ' FOR UPDATE';
-               }
-
-               if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) {
-                       $startOpts .= 'DISTINCT';
-               }
-
-               return [ $startOpts, $useIndex, $preLimitTail, $postLimitTail, $ignoreIndex ];
-       }
-
-       function getDBname() {
-               return $this->mDBname;
-       }
-
-       function getServer() {
-               return $this->mServer;
-       }
-
-       function buildConcat( $stringList ) {
-               return implode( ' || ', $stringList );
-       }
-
-       public function buildGroupConcatField(
-               $delimiter, $table, $field, $conds = '', $options = [], $join_conds = []
-       ) {
-               $fld = "array_to_string(array_agg($field)," . $this->addQuotes( $delimiter ) . ')';
-
-               return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
-       }
-
-       /**
-        * @param string $field Field or column to cast
-        * @return string
-        * @since 1.28
-        */
-       public function buildStringCast( $field ) {
-               return $field . '::text';
-       }
-
-       public function getSearchEngine() {
-               return 'SearchPostgres';
-       }
-
-       public function streamStatementEnd( &$sql, &$newLine ) {
-               # Allow dollar quoting for function declarations
-               if ( substr( $newLine, 0, 4 ) == '$mw$' ) {
-                       if ( $this->delimiter ) {
-                               $this->delimiter = false;
-                       } else {
-                               $this->delimiter = ';';
-                       }
-               }
-
-               return parent::streamStatementEnd( $sql, $newLine );
-       }
-
-       /**
-        * Check to see if a named lock is available. This is non-blocking.
-        * See http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS
-        *
-        * @param string $lockName Name of lock to poll
-        * @param string $method Name of method calling us
-        * @return bool
-        * @since 1.20
-        */
-       public function lockIsFree( $lockName, $method ) {
-               $key = $this->addQuotes( $this->bigintFromLockName( $lockName ) );
-               $result = $this->query( "SELECT (CASE(pg_try_advisory_lock($key))
-                       WHEN 'f' THEN 'f' ELSE pg_advisory_unlock($key) END) AS lockstatus", $method );
-               $row = $this->fetchObject( $result );
-
-               return ( $row->lockstatus === 't' );
-       }
-
-       /**
-        * See http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS
-        * @param string $lockName
-        * @param string $method
-        * @param int $timeout
-        * @return bool
-        */
-       public function lock( $lockName, $method, $timeout = 5 ) {
-               $key = $this->addQuotes( $this->bigintFromLockName( $lockName ) );
-               $loop = new WaitConditionLoop(
-                       function () use ( $lockName, $key, $timeout, $method ) {
-                               $res = $this->query( "SELECT pg_try_advisory_lock($key) AS lockstatus", $method );
-                               $row = $this->fetchObject( $res );
-                               if ( $row->lockstatus === 't' ) {
-                                       parent::lock( $lockName, $method, $timeout ); // record
-                                       return true;
-                               }
-
-                               return WaitConditionLoop::CONDITION_CONTINUE;
-                       },
-                       $timeout
-               );
-
-               return ( $loop->invoke() === $loop::CONDITION_REACHED );
-       }
-
-       /**
-        * See http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKSFROM
-        * PG DOCS: http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS
-        * @param string $lockName
-        * @param string $method
-        * @return bool
-        */
-       public function unlock( $lockName, $method ) {
-               $key = $this->addQuotes( $this->bigintFromLockName( $lockName ) );
-               $result = $this->query( "SELECT pg_advisory_unlock($key) as lockstatus", $method );
-               $row = $this->fetchObject( $result );
-
-               if ( $row->lockstatus === 't' ) {
-                       parent::unlock( $lockName, $method ); // record
-                       return true;
-               }
-
-               wfDebug( __METHOD__ . " failed to release lock\n" );
-
-               return false;
-       }
-
-       /**
-        * @param string $lockName
-        * @return string Integer
-        */
-       private function bigintFromLockName( $lockName ) {
-               return Wikimedia\base_convert( substr( sha1( $lockName ), 0, 15 ), 16, 10 );
-       }
-} // end DatabasePostgres class
-
-class PostgresBlob extends Blob {
-}
diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php
deleted file mode 100644 (file)
index ef08ab0..0000000
+++ /dev/null
@@ -1,1094 +0,0 @@
-<?php
-/**
- * This is the SQLite database abstraction layer.
- * See maintenance/sqlite/README for development notes and other specific information
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * @ingroup Database
- */
-class DatabaseSqlite extends Database {
-       /** @var bool Whether full text is enabled */
-       private static $fulltextEnabled = null;
-
-       /** @var string Directory */
-       protected $dbDir;
-
-       /** @var string File name for SQLite database file */
-       protected $dbPath;
-
-       /** @var string Transaction mode */
-       protected $trxMode;
-
-       /** @var int The number of rows affected as an integer */
-       protected $mAffectedRows;
-
-       /** @var resource */
-       protected $mLastResult;
-
-       /** @var PDO */
-       protected $mConn;
-
-       /** @var FSLockManager (hopefully on the same server as the DB) */
-       protected $lockMgr;
-
-       /**
-        * Additional params include:
-        *   - dbDirectory : directory containing the DB and the lock file directory
-        *                   [defaults to $wgSQLiteDataDir]
-        *   - dbFilePath  : use this to force the path of the DB file
-        *   - trxMode     : one of (deferred, immediate, exclusive)
-        * @param array $p
-        */
-       function __construct( array $p ) {
-               global $wgSharedDB, $wgSQLiteDataDir;
-
-               $this->dbDir = isset( $p['dbDirectory'] ) ? $p['dbDirectory'] : $wgSQLiteDataDir;
-
-               if ( isset( $p['dbFilePath'] ) ) {
-                       parent::__construct( $p );
-                       // Standalone .sqlite file mode.
-                       // Super doesn't open when $user is false, but we can work with $dbName,
-                       // which is derived from the file path in this case.
-                       $this->openFile( $p['dbFilePath'] );
-               } else {
-                       $this->mDBname = $p['dbname'];
-                       // Stock wiki mode using standard file names per DB.
-                       parent::__construct( $p );
-                       // Super doesn't open when $user is false, but we can work with $dbName
-                       if ( $p['dbname'] && !$this->isOpen() ) {
-                               if ( $this->open( $p['host'], $p['user'], $p['password'], $p['dbname'] ) ) {
-                                       if ( $wgSharedDB ) {
-                                               $this->attachDatabase( $wgSharedDB );
-                                       }
-                               }
-                       }
-               }
-
-               $this->trxMode = isset( $p['trxMode'] ) ? strtoupper( $p['trxMode'] ) : null;
-               if ( $this->trxMode &&
-                       !in_array( $this->trxMode, [ 'DEFERRED', 'IMMEDIATE', 'EXCLUSIVE' ] )
-               ) {
-                       $this->trxMode = null;
-                       wfWarn( "Invalid SQLite transaction mode provided." );
-               }
-
-               $this->lockMgr = new FSLockManager( [ 'lockDirectory' => "{$this->dbDir}/locks" ] );
-       }
-
-       /**
-        * @param string $filename
-        * @param array $p Options map; supports:
-        *   - flags       : (same as __construct counterpart)
-        *   - trxMode     : (same as __construct counterpart)
-        *   - dbDirectory : (same as __construct counterpart)
-        * @return DatabaseSqlite
-        * @since 1.25
-        */
-       public static function newStandaloneInstance( $filename, array $p = [] ) {
-               $p['dbFilePath'] = $filename;
-               $p['schema'] = false;
-               $p['tablePrefix'] = '';
-
-               return DatabaseBase::factory( 'sqlite', $p );
-       }
-
-       /**
-        * @return string
-        */
-       function getType() {
-               return 'sqlite';
-       }
-
-       /**
-        * @todo Check if it should be true like parent class
-        *
-        * @return bool
-        */
-       function implicitGroupby() {
-               return false;
-       }
-
-       /** Open an SQLite database and return a resource handle to it
-        *  NOTE: only $dbName is used, the other parameters are irrelevant for SQLite databases
-        *
-        * @param string $server
-        * @param string $user
-        * @param string $pass
-        * @param string $dbName
-        *
-        * @throws DBConnectionError
-        * @return PDO
-        */
-       function open( $server, $user, $pass, $dbName ) {
-               $this->close();
-               $fileName = self::generateFileName( $this->dbDir, $dbName );
-               if ( !is_readable( $fileName ) ) {
-                       $this->mConn = false;
-                       throw new DBConnectionError( $this, "SQLite database not accessible" );
-               }
-               $this->openFile( $fileName );
-
-               return $this->mConn;
-       }
-
-       /**
-        * Opens a database file
-        *
-        * @param string $fileName
-        * @throws DBConnectionError
-        * @return PDO|bool SQL connection or false if failed
-        */
-       protected function openFile( $fileName ) {
-               $err = false;
-
-               $this->dbPath = $fileName;
-               try {
-                       if ( $this->mFlags & DBO_PERSISTENT ) {
-                               $this->mConn = new PDO( "sqlite:$fileName", '', '',
-                                       [ PDO::ATTR_PERSISTENT => true ] );
-                       } else {
-                               $this->mConn = new PDO( "sqlite:$fileName", '', '' );
-                       }
-               } catch ( PDOException $e ) {
-                       $err = $e->getMessage();
-               }
-
-               if ( !$this->mConn ) {
-                       wfDebug( "DB connection error: $err\n" );
-                       throw new DBConnectionError( $this, $err );
-               }
-
-               $this->mOpened = !!$this->mConn;
-               if ( $this->mOpened ) {
-                       # Set error codes only, don't raise exceptions
-                       $this->mConn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT );
-                       # Enforce LIKE to be case sensitive, just like MySQL
-                       $this->query( 'PRAGMA case_sensitive_like = 1' );
-
-                       return $this->mConn;
-               }
-
-               return false;
-       }
-
-       /**
-        * @return string SQLite DB file path
-        * @since 1.25
-        */
-       public function getDbFilePath() {
-               return $this->dbPath;
-       }
-
-       /**
-        * Does not actually close the connection, just destroys the reference for GC to do its work
-        * @return bool
-        */
-       protected function closeConnection() {
-               $this->mConn = null;
-
-               return true;
-       }
-
-       /**
-        * Generates a database file name. Explicitly public for installer.
-        * @param string $dir Directory where database resides
-        * @param string $dbName Database name
-        * @return string
-        */
-       public static function generateFileName( $dir, $dbName ) {
-               return "$dir/$dbName.sqlite";
-       }
-
-       /**
-        * Check if the searchindext table is FTS enabled.
-        * @return bool False if not enabled.
-        */
-       function checkForEnabledSearch() {
-               if ( self::$fulltextEnabled === null ) {
-                       self::$fulltextEnabled = false;
-                       $table = $this->tableName( 'searchindex' );
-                       $res = $this->query( "SELECT sql FROM sqlite_master WHERE tbl_name = '$table'", __METHOD__ );
-                       if ( $res ) {
-                               $row = $res->fetchRow();
-                               self::$fulltextEnabled = stristr( $row['sql'], 'fts' ) !== false;
-                       }
-               }
-
-               return self::$fulltextEnabled;
-       }
-
-       /**
-        * Returns version of currently supported SQLite fulltext search module or false if none present.
-        * @return string
-        */
-       static function getFulltextSearchModule() {
-               static $cachedResult = null;
-               if ( $cachedResult !== null ) {
-                       return $cachedResult;
-               }
-               $cachedResult = false;
-               $table = 'dummy_search_test';
-
-               $db = self::newStandaloneInstance( ':memory:' );
-               if ( $db->query( "CREATE VIRTUAL TABLE $table USING FTS3(dummy_field)", __METHOD__, true ) ) {
-                       $cachedResult = 'FTS3';
-               }
-               $db->close();
-
-               return $cachedResult;
-       }
-
-       /**
-        * Attaches external database to our connection, see http://sqlite.org/lang_attach.html
-        * for details.
-        *
-        * @param string $name Database name to be used in queries like
-        *   SELECT foo FROM dbname.table
-        * @param bool|string $file Database file name. If omitted, will be generated
-        *   using $name and configured data directory
-        * @param string $fname Calling function name
-        * @return ResultWrapper
-        */
-       function attachDatabase( $name, $file = false, $fname = __METHOD__ ) {
-               if ( !$file ) {
-                       $file = self::generateFileName( $this->dbDir, $name );
-               }
-               $file = $this->addQuotes( $file );
-
-               return $this->query( "ATTACH DATABASE $file AS $name", $fname );
-       }
-
-       /**
-        * @see DatabaseBase::isWriteQuery()
-        *
-        * @param string $sql
-        * @return bool
-        */
-       function isWriteQuery( $sql ) {
-               return parent::isWriteQuery( $sql ) && !preg_match( '/^(ATTACH|PRAGMA)\b/i', $sql );
-       }
-
-       /**
-        * SQLite doesn't allow buffered results or data seeking etc, so we'll use fetchAll as the result
-        *
-        * @param string $sql
-        * @return bool|ResultWrapper
-        */
-       protected function doQuery( $sql ) {
-               $res = $this->mConn->query( $sql );
-               if ( $res === false ) {
-                       return false;
-               } else {
-                       $r = $res instanceof ResultWrapper ? $res->result : $res;
-                       $this->mAffectedRows = $r->rowCount();
-                       $res = new ResultWrapper( $this, $r->fetchAll() );
-               }
-
-               return $res;
-       }
-
-       /**
-        * @param ResultWrapper|mixed $res
-        */
-       function freeResult( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $res->result = null;
-               } else {
-                       $res = null;
-               }
-       }
-
-       /**
-        * @param ResultWrapper|array $res
-        * @return stdClass|bool
-        */
-       function fetchObject( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $r =& $res->result;
-               } else {
-                       $r =& $res;
-               }
-
-               $cur = current( $r );
-               if ( is_array( $cur ) ) {
-                       next( $r );
-                       $obj = new stdClass;
-                       foreach ( $cur as $k => $v ) {
-                               if ( !is_numeric( $k ) ) {
-                                       $obj->$k = $v;
-                               }
-                       }
-
-                       return $obj;
-               }
-
-               return false;
-       }
-
-       /**
-        * @param ResultWrapper|mixed $res
-        * @return array|bool
-        */
-       function fetchRow( $res ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $r =& $res->result;
-               } else {
-                       $r =& $res;
-               }
-               $cur = current( $r );
-               if ( is_array( $cur ) ) {
-                       next( $r );
-
-                       return $cur;
-               }
-
-               return false;
-       }
-
-       /**
-        * The PDO::Statement class implements the array interface so count() will work
-        *
-        * @param ResultWrapper|array $res
-        * @return int
-        */
-       function numRows( $res ) {
-               $r = $res instanceof ResultWrapper ? $res->result : $res;
-
-               return count( $r );
-       }
-
-       /**
-        * @param ResultWrapper $res
-        * @return int
-        */
-       function numFields( $res ) {
-               $r = $res instanceof ResultWrapper ? $res->result : $res;
-               if ( is_array( $r ) && count( $r ) > 0 ) {
-                       // The size of the result array is twice the number of fields. (Bug: 65578)
-                       return count( $r[0] ) / 2;
-               } else {
-                       // If the result is empty return 0
-                       return 0;
-               }
-       }
-
-       /**
-        * @param ResultWrapper $res
-        * @param int $n
-        * @return bool
-        */
-       function fieldName( $res, $n ) {
-               $r = $res instanceof ResultWrapper ? $res->result : $res;
-               if ( is_array( $r ) ) {
-                       $keys = array_keys( $r[0] );
-
-                       return $keys[$n];
-               }
-
-               return false;
-       }
-
-       /**
-        * Use MySQL's naming (accounts for prefix etc) but remove surrounding backticks
-        *
-        * @param string $name
-        * @param string $format
-        * @return string
-        */
-       function tableName( $name, $format = 'quoted' ) {
-               // table names starting with sqlite_ are reserved
-               if ( strpos( $name, 'sqlite_' ) === 0 ) {
-                       return $name;
-               }
-
-               return str_replace( '"', '', parent::tableName( $name, $format ) );
-       }
-
-       /**
-        * Index names have DB scope
-        *
-        * @param string $index
-        * @return string
-        */
-       protected function indexName( $index ) {
-               return $index;
-       }
-
-       /**
-        * This must be called after nextSequenceVal
-        *
-        * @return int
-        */
-       function insertId() {
-               // PDO::lastInsertId yields a string :(
-               return intval( $this->mConn->lastInsertId() );
-       }
-
-       /**
-        * @param ResultWrapper|array $res
-        * @param int $row
-        */
-       function dataSeek( $res, $row ) {
-               if ( $res instanceof ResultWrapper ) {
-                       $r =& $res->result;
-               } else {
-                       $r =& $res;
-               }
-               reset( $r );
-               if ( $row > 0 ) {
-                       for ( $i = 0; $i < $row; $i++ ) {
-                               next( $r );
-                       }
-               }
-       }
-
-       /**
-        * @return string
-        */
-       function lastError() {
-               if ( !is_object( $this->mConn ) ) {
-                       return "Cannot return last error, no db connection";
-               }
-               $e = $this->mConn->errorInfo();
-
-               return isset( $e[2] ) ? $e[2] : '';
-       }
-
-       /**
-        * @return string
-        */
-       function lastErrno() {
-               if ( !is_object( $this->mConn ) ) {
-                       return "Cannot return last error, no db connection";
-               } else {
-                       $info = $this->mConn->errorInfo();
-
-                       return $info[1];
-               }
-       }
-
-       /**
-        * @return int
-        */
-       function affectedRows() {
-               return $this->mAffectedRows;
-       }
-
-       /**
-        * Returns information about an index
-        * Returns false if the index does not exist
-        * - if errors are explicitly ignored, returns NULL on failure
-        *
-        * @param string $table
-        * @param string $index
-        * @param string $fname
-        * @return array
-        */
-       function indexInfo( $table, $index, $fname = __METHOD__ ) {
-               $sql = 'PRAGMA index_info(' . $this->addQuotes( $this->indexName( $index ) ) . ')';
-               $res = $this->query( $sql, $fname );
-               if ( !$res ) {
-                       return null;
-               }
-               if ( $res->numRows() == 0 ) {
-                       return false;
-               }
-               $info = [];
-               foreach ( $res as $row ) {
-                       $info[] = $row->name;
-               }
-
-               return $info;
-       }
-
-       /**
-        * @param string $table
-        * @param string $index
-        * @param string $fname
-        * @return bool|null
-        */
-       function indexUnique( $table, $index, $fname = __METHOD__ ) {
-               $row = $this->selectRow( 'sqlite_master', '*',
-                       [
-                               'type' => 'index',
-                               'name' => $this->indexName( $index ),
-                       ], $fname );
-               if ( !$row || !isset( $row->sql ) ) {
-                       return null;
-               }
-
-               // $row->sql will be of the form CREATE [UNIQUE] INDEX ...
-               $indexPos = strpos( $row->sql, 'INDEX' );
-               if ( $indexPos === false ) {
-                       return null;
-               }
-               $firstPart = substr( $row->sql, 0, $indexPos );
-               $options = explode( ' ', $firstPart );
-
-               return in_array( 'UNIQUE', $options );
-       }
-
-       /**
-        * Filter the options used in SELECT statements
-        *
-        * @param array $options
-        * @return array
-        */
-       function makeSelectOptions( $options ) {
-               foreach ( $options as $k => $v ) {
-                       if ( is_numeric( $k ) && ( $v == 'FOR UPDATE' || $v == 'LOCK IN SHARE MODE' ) ) {
-                               $options[$k] = '';
-                       }
-               }
-
-               return parent::makeSelectOptions( $options );
-       }
-
-       /**
-        * @param array $options
-        * @return string
-        */
-       protected function makeUpdateOptionsArray( $options ) {
-               $options = parent::makeUpdateOptionsArray( $options );
-               $options = self::fixIgnore( $options );
-
-               return $options;
-       }
-
-       /**
-        * @param array $options
-        * @return array
-        */
-       static function fixIgnore( $options ) {
-               # SQLite uses OR IGNORE not just IGNORE
-               foreach ( $options as $k => $v ) {
-                       if ( $v == 'IGNORE' ) {
-                               $options[$k] = 'OR IGNORE';
-                       }
-               }
-
-               return $options;
-       }
-
-       /**
-        * @param array $options
-        * @return string
-        */
-       function makeInsertOptions( $options ) {
-               $options = self::fixIgnore( $options );
-
-               return parent::makeInsertOptions( $options );
-       }
-
-       /**
-        * Based on generic method (parent) with some prior SQLite-sepcific adjustments
-        * @param string $table
-        * @param array $a
-        * @param string $fname
-        * @param array $options
-        * @return bool
-        */
-       function insert( $table, $a, $fname = __METHOD__, $options = [] ) {
-               if ( !count( $a ) ) {
-                       return true;
-               }
-
-               # SQLite can't handle multi-row inserts, so divide up into multiple single-row inserts
-               if ( isset( $a[0] ) && is_array( $a[0] ) ) {
-                       $ret = true;
-                       foreach ( $a as $v ) {
-                               if ( !parent::insert( $table, $v, "$fname/multi-row", $options ) ) {
-                                       $ret = false;
-                               }
-                       }
-               } else {
-                       $ret = parent::insert( $table, $a, "$fname/single-row", $options );
-               }
-
-               return $ret;
-       }
-
-       /**
-        * @param string $table
-        * @param array $uniqueIndexes Unused
-        * @param string|array $rows
-        * @param string $fname
-        * @return bool|ResultWrapper
-        */
-       function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
-               if ( !count( $rows ) ) {
-                       return true;
-               }
-
-               # SQLite can't handle multi-row replaces, so divide up into multiple single-row queries
-               if ( isset( $rows[0] ) && is_array( $rows[0] ) ) {
-                       $ret = true;
-                       foreach ( $rows as $v ) {
-                               if ( !$this->nativeReplace( $table, $v, "$fname/multi-row" ) ) {
-                                       $ret = false;
-                               }
-                       }
-               } else {
-                       $ret = $this->nativeReplace( $table, $rows, "$fname/single-row" );
-               }
-
-               return $ret;
-       }
-
-       /**
-        * Returns the size of a text field, or -1 for "unlimited"
-        * In SQLite this is SQLITE_MAX_LENGTH, by default 1GB. No way to query it though.
-        *
-        * @param string $table
-        * @param string $field
-        * @return int
-        */
-       function textFieldSize( $table, $field ) {
-               return -1;
-       }
-
-       /**
-        * @return bool
-        */
-       function unionSupportsOrderAndLimit() {
-               return false;
-       }
-
-       /**
-        * @param string $sqls
-        * @param bool $all Whether to "UNION ALL" or not
-        * @return string
-        */
-       function unionQueries( $sqls, $all ) {
-               $glue = $all ? ' UNION ALL ' : ' UNION ';
-
-               return implode( $glue, $sqls );
-       }
-
-       /**
-        * @return bool
-        */
-       function wasDeadlock() {
-               return $this->lastErrno() == 5; // SQLITE_BUSY
-       }
-
-       /**
-        * @return bool
-        */
-       function wasErrorReissuable() {
-               return $this->lastErrno() == 17; // SQLITE_SCHEMA;
-       }
-
-       /**
-        * @return bool
-        */
-       function wasReadOnlyError() {
-               return $this->lastErrno() == 8; // SQLITE_READONLY;
-       }
-
-       /**
-        * @return string Wikitext of a link to the server software's web site
-        */
-       public function getSoftwareLink() {
-               return "[{{int:version-db-sqlite-url}} SQLite]";
-       }
-
-       /**
-        * @return string Version information from the database
-        */
-       function getServerVersion() {
-               $ver = $this->mConn->getAttribute( PDO::ATTR_SERVER_VERSION );
-
-               return $ver;
-       }
-
-       /**
-        * @return string User-friendly database information
-        */
-       public function getServerInfo() {
-               return wfMessage( self::getFulltextSearchModule()
-                       ? 'sqlite-has-fts'
-                       : 'sqlite-no-fts', $this->getServerVersion() )->text();
-       }
-
-       /**
-        * Get information about a given field
-        * Returns false if the field does not exist.
-        *
-        * @param string $table
-        * @param string $field
-        * @return SQLiteField|bool False on failure
-        */
-       function fieldInfo( $table, $field ) {
-               $tableName = $this->tableName( $table );
-               $sql = 'PRAGMA table_info(' . $this->addQuotes( $tableName ) . ')';
-               $res = $this->query( $sql, __METHOD__ );
-               foreach ( $res as $row ) {
-                       if ( $row->name == $field ) {
-                               return new SQLiteField( $row, $tableName );
-                       }
-               }
-
-               return false;
-       }
-
-       protected function doBegin( $fname = '' ) {
-               if ( $this->trxMode ) {
-                       $this->query( "BEGIN {$this->trxMode}", $fname );
-               } else {
-                       $this->query( 'BEGIN', $fname );
-               }
-               $this->mTrxLevel = 1;
-       }
-
-       /**
-        * @param string $s
-        * @return string
-        */
-       function strencode( $s ) {
-               return substr( $this->addQuotes( $s ), 1, -1 );
-       }
-
-       /**
-        * @param string $b
-        * @return Blob
-        */
-       function encodeBlob( $b ) {
-               return new Blob( $b );
-       }
-
-       /**
-        * @param Blob|string $b
-        * @return string
-        */
-       function decodeBlob( $b ) {
-               if ( $b instanceof Blob ) {
-                       $b = $b->fetch();
-               }
-
-               return $b;
-       }
-
-       /**
-        * @param Blob|string $s
-        * @return string
-        */
-       function addQuotes( $s ) {
-               if ( $s instanceof Blob ) {
-                       return "x'" . bin2hex( $s->fetch() ) . "'";
-               } elseif ( is_bool( $s ) ) {
-                       return (int)$s;
-               } elseif ( strpos( $s, "\0" ) !== false ) {
-                       // SQLite doesn't support \0 in strings, so use the hex representation as a workaround.
-                       // This is a known limitation of SQLite's mprintf function which PDO
-                       // should work around, but doesn't. I have reported this to php.net as bug #63419:
-                       // https://bugs.php.net/bug.php?id=63419
-                       // There was already a similar report for SQLite3::escapeString, bug #62361:
-                       // https://bugs.php.net/bug.php?id=62361
-                       // There is an additional bug regarding sorting this data after insert
-                       // on older versions of sqlite shipped with ubuntu 12.04
-                       // https://phabricator.wikimedia.org/T74367
-                       wfDebugLog(
-                               __CLASS__,
-                               __FUNCTION__ .
-                                       ': Quoting value containing null byte. ' .
-                                       'For consistency all binary data should have been ' .
-                                       'first processed with self::encodeBlob()'
-                       );
-                       return "x'" . bin2hex( $s ) . "'";
-               } else {
-                       return $this->mConn->quote( $s );
-               }
-       }
-
-       /**
-        * @return string
-        */
-       function buildLike() {
-               $params = func_get_args();
-               if ( count( $params ) > 0 && is_array( $params[0] ) ) {
-                       $params = $params[0];
-               }
-
-               return parent::buildLike( $params ) . "ESCAPE '\' ";
-       }
-
-       /**
-        * @param string $field Field or column to cast
-        * @return string
-        * @since 1.28
-        */
-       public function buildStringCast( $field ) {
-               return 'CAST ( ' . $field . ' AS TEXT )';
-       }
-
-       /**
-        * @return string
-        */
-       public function getSearchEngine() {
-               return "SearchSqlite";
-       }
-
-       /**
-        * No-op version of deadlockLoop
-        *
-        * @return mixed
-        */
-       public function deadlockLoop( /*...*/ ) {
-               $args = func_get_args();
-               $function = array_shift( $args );
-
-               return call_user_func_array( $function, $args );
-       }
-
-       /**
-        * @param string $s
-        * @return string
-        */
-       protected function replaceVars( $s ) {
-               $s = parent::replaceVars( $s );
-               if ( preg_match( '/^\s*(CREATE|ALTER) TABLE/i', $s ) ) {
-                       // CREATE TABLE hacks to allow schema file sharing with MySQL
-
-                       // binary/varbinary column type -> blob
-                       $s = preg_replace( '/\b(var)?binary(\(\d+\))/i', 'BLOB', $s );
-                       // no such thing as unsigned
-                       $s = preg_replace( '/\b(un)?signed\b/i', '', $s );
-                       // INT -> INTEGER
-                       $s = preg_replace( '/\b(tiny|small|medium|big|)int(\s*\(\s*\d+\s*\)|\b)/i', 'INTEGER', $s );
-                       // floating point types -> REAL
-                       $s = preg_replace(
-                               '/\b(float|double(\s+precision)?)(\s*\(\s*\d+\s*(,\s*\d+\s*)?\)|\b)/i',
-                               'REAL',
-                               $s
-                       );
-                       // varchar -> TEXT
-                       $s = preg_replace( '/\b(var)?char\s*\(.*?\)/i', 'TEXT', $s );
-                       // TEXT normalization
-                       $s = preg_replace( '/\b(tiny|medium|long)text\b/i', 'TEXT', $s );
-                       // BLOB normalization
-                       $s = preg_replace( '/\b(tiny|small|medium|long|)blob\b/i', 'BLOB', $s );
-                       // BOOL -> INTEGER
-                       $s = preg_replace( '/\bbool(ean)?\b/i', 'INTEGER', $s );
-                       // DATETIME -> TEXT
-                       $s = preg_replace( '/\b(datetime|timestamp)\b/i', 'TEXT', $s );
-                       // No ENUM type
-                       $s = preg_replace( '/\benum\s*\([^)]*\)/i', 'TEXT', $s );
-                       // binary collation type -> nothing
-                       $s = preg_replace( '/\bbinary\b/i', '', $s );
-                       // auto_increment -> autoincrement
-                       $s = preg_replace( '/\bauto_increment\b/i', 'AUTOINCREMENT', $s );
-                       // No explicit options
-                       $s = preg_replace( '/\)[^);]*(;?)\s*$/', ')\1', $s );
-                       // AUTOINCREMENT should immedidately follow PRIMARY KEY
-                       $s = preg_replace( '/primary key (.*?) autoincrement/i', 'PRIMARY KEY AUTOINCREMENT $1', $s );
-               } elseif ( preg_match( '/^\s*CREATE (\s*(?:UNIQUE|FULLTEXT)\s+)?INDEX/i', $s ) ) {
-                       // No truncated indexes
-                       $s = preg_replace( '/\(\d+\)/', '', $s );
-                       // No FULLTEXT
-                       $s = preg_replace( '/\bfulltext\b/i', '', $s );
-               } elseif ( preg_match( '/^\s*DROP INDEX/i', $s ) ) {
-                       // DROP INDEX is database-wide, not table-specific, so no ON <table> clause.
-                       $s = preg_replace( '/\sON\s+[^\s]*/i', '', $s );
-               } elseif ( preg_match( '/^\s*INSERT IGNORE\b/i', $s ) ) {
-                       // INSERT IGNORE --> INSERT OR IGNORE
-                       $s = preg_replace( '/^\s*INSERT IGNORE\b/i', 'INSERT OR IGNORE', $s );
-               }
-
-               return $s;
-       }
-
-       public function lock( $lockName, $method, $timeout = 5 ) {
-               if ( !is_dir( "{$this->dbDir}/locks" ) ) { // create dir as needed
-                       if ( !is_writable( $this->dbDir ) || !mkdir( "{$this->dbDir}/locks" ) ) {
-                               throw new DBError( $this, "Cannot create directory \"{$this->dbDir}/locks\"." );
-                       }
-               }
-
-               return $this->lockMgr->lock( [ $lockName ], LockManager::LOCK_EX, $timeout )->isOK();
-       }
-
-       public function unlock( $lockName, $method ) {
-               return $this->lockMgr->unlock( [ $lockName ], LockManager::LOCK_EX )->isOK();
-       }
-
-       /**
-        * Build a concatenation list to feed into a SQL query
-        *
-        * @param string[] $stringList
-        * @return string
-        */
-       function buildConcat( $stringList ) {
-               return '(' . implode( ') || (', $stringList ) . ')';
-       }
-
-       public function buildGroupConcatField(
-               $delim, $table, $field, $conds = '', $join_conds = []
-       ) {
-               $fld = "group_concat($field," . $this->addQuotes( $delim ) . ')';
-
-               return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
-       }
-
-       /**
-        * @throws MWException
-        * @param string $oldName
-        * @param string $newName
-        * @param bool $temporary
-        * @param string $fname
-        * @return bool|ResultWrapper
-        */
-       function duplicateTableStructure( $oldName, $newName, $temporary = false, $fname = __METHOD__ ) {
-               $res = $this->query( "SELECT sql FROM sqlite_master WHERE tbl_name=" .
-                       $this->addQuotes( $oldName ) . " AND type='table'", $fname );
-               $obj = $this->fetchObject( $res );
-               if ( !$obj ) {
-                       throw new RuntimeException( "Couldn't retrieve structure for table $oldName" );
-               }
-               $sql = $obj->sql;
-               $sql = preg_replace(
-                       '/(?<=\W)"?' . preg_quote( trim( $this->addIdentifierQuotes( $oldName ), '"' ) ) . '"?(?=\W)/',
-                       $this->addIdentifierQuotes( $newName ),
-                       $sql,
-                       1
-               );
-               if ( $temporary ) {
-                       if ( preg_match( '/^\\s*CREATE\\s+VIRTUAL\\s+TABLE\b/i', $sql ) ) {
-                               wfDebug( "Table $oldName is virtual, can't create a temporary duplicate.\n" );
-                       } else {
-                               $sql = str_replace( 'CREATE TABLE', 'CREATE TEMPORARY TABLE', $sql );
-                       }
-               }
-
-               $res = $this->query( $sql, $fname );
-
-               // Take over indexes
-               $indexList = $this->query( 'PRAGMA INDEX_LIST(' . $this->addQuotes( $oldName ) . ')' );
-               foreach ( $indexList as $index ) {
-                       if ( strpos( $index->name, 'sqlite_autoindex' ) === 0 ) {
-                               continue;
-                       }
-
-                       if ( $index->unique ) {
-                               $sql = 'CREATE UNIQUE INDEX';
-                       } else {
-                               $sql = 'CREATE INDEX';
-                       }
-                       // Try to come up with a new index name, given indexes have database scope in SQLite
-                       $indexName = $newName . '_' . $index->name;
-                       $sql .= ' ' . $indexName . ' ON ' . $newName;
-
-                       $indexInfo = $this->query( 'PRAGMA INDEX_INFO(' . $this->addQuotes( $index->name ) . ')' );
-                       $fields = [];
-                       foreach ( $indexInfo as $indexInfoRow ) {
-                               $fields[$indexInfoRow->seqno] = $indexInfoRow->name;
-                       }
-
-                       $sql .= '(' . implode( ',', $fields ) . ')';
-
-                       $this->query( $sql );
-               }
-
-               return $res;
-       }
-
-       /**
-        * List all tables on the database
-        *
-        * @param string $prefix Only show tables with this prefix, e.g. mw_
-        * @param string $fname Calling function name
-        *
-        * @return array
-        */
-       function listTables( $prefix = null, $fname = __METHOD__ ) {
-               $result = $this->select(
-                       'sqlite_master',
-                       'name',
-                       "type='table'"
-               );
-
-               $endArray = [];
-
-               foreach ( $result as $table ) {
-                       $vars = get_object_vars( $table );
-                       $table = array_pop( $vars );
-
-                       if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
-                               if ( strpos( $table, 'sqlite_' ) !== 0 ) {
-                                       $endArray[] = $table;
-                               }
-                       }
-               }
-
-               return $endArray;
-       }
-
-       /**
-        * @return string
-        */
-       public function __toString() {
-               return 'SQLite ' . (string)$this->mConn->getAttribute( PDO::ATTR_SERVER_VERSION );
-       }
-
-} // end DatabaseSqlite class
-
-/**
- * @ingroup Database
- */
-class SQLiteField implements Field {
-       private $info, $tableName;
-
-       function __construct( $info, $tableName ) {
-               $this->info = $info;
-               $this->tableName = $tableName;
-       }
-
-       function name() {
-               return $this->info->name;
-       }
-
-       function tableName() {
-               return $this->tableName;
-       }
-
-       function defaultValue() {
-               if ( is_string( $this->info->dflt_value ) ) {
-                       // Typically quoted
-                       if ( preg_match( '/^\'(.*)\'$', $this->info->dflt_value ) ) {
-                               return str_replace( "''", "'", $this->info->dflt_value );
-                       }
-               }
-
-               return $this->info->dflt_value;
-       }
-
-       /**
-        * @return bool
-        */
-       function isNullable() {
-               return !$this->info->notnull;
-       }
-
-       function type() {
-               return $this->info->type;
-       }
-} // end SQLiteField
diff --git a/includes/db/DatabaseUtility.php b/includes/db/DatabaseUtility.php
deleted file mode 100644 (file)
index aeaa27f..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-<?php
-/**
- * This file contains database-related utility classes.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * Utility class
- * @ingroup Database
- *
- * This allows us to distinguish a blob from a normal string and an array of strings
- */
-class Blob {
-       /** @var string */
-       protected $mData;
-
-       function __construct( $data ) {
-               $this->mData = $data;
-       }
-
-       function fetch() {
-               return $this->mData;
-       }
-}
-
-/**
- * Base for all database-specific classes representing information about database fields
- * @ingroup Database
- */
-interface Field {
-       /**
-        * Field name
-        * @return string
-        */
-       function name();
-
-       /**
-        * Name of table this field belongs to
-        * @return string
-        */
-       function tableName();
-
-       /**
-        * Database type
-        * @return string
-        */
-       function type();
-
-       /**
-        * Whether this field can store NULL values
-        * @return bool
-        */
-       function isNullable();
-}
-
-/**
- * Result wrapper for grabbing data queried by someone else
- * @ingroup Database
- */
-class ResultWrapper implements Iterator {
-       /** @var resource */
-       public $result;
-
-       /** @var DatabaseBase */
-       protected $db;
-
-       /** @var int */
-       protected $pos = 0;
-
-       /** @var object|null */
-       protected $currentRow = null;
-
-       /**
-        * Create a new result object from a result resource and a Database object
-        *
-        * @param DatabaseBase $database
-        * @param resource|ResultWrapper $result
-        */
-       function __construct( $database, $result ) {
-               $this->db = $database;
-
-               if ( $result instanceof ResultWrapper ) {
-                       $this->result = $result->result;
-               } else {
-                       $this->result = $result;
-               }
-       }
-
-       /**
-        * Get the number of rows in a result object
-        *
-        * @return int
-        */
-       function numRows() {
-               return $this->db->numRows( $this );
-       }
-
-       /**
-        * Fetch the next row from the given result object, in object form. Fields can be retrieved with
-        * $row->fieldname, with fields acting like member variables. If no more rows are available,
-        * false is returned.
-        *
-        * @return stdClass|bool
-        * @throws DBUnexpectedError Thrown if the database returns an error
-        */
-       function fetchObject() {
-               return $this->db->fetchObject( $this );
-       }
-
-       /**
-        * Fetch the next row from the given result object, in associative array form. Fields are
-        * retrieved with $row['fieldname']. If no more rows are available, false is returned.
-        *
-        * @return array|bool
-        * @throws DBUnexpectedError Thrown if the database returns an error
-        */
-       function fetchRow() {
-               return $this->db->fetchRow( $this );
-       }
-
-       /**
-        * Free a result object
-        */
-       function free() {
-               $this->db->freeResult( $this );
-               unset( $this->result );
-               unset( $this->db );
-       }
-
-       /**
-        * Change the position of the cursor in a result object.
-        * See mysql_data_seek()
-        *
-        * @param int $row
-        */
-       function seek( $row ) {
-               $this->db->dataSeek( $this, $row );
-       }
-
-       /*
-        * ======= Iterator functions =======
-        * Note that using these in combination with the non-iterator functions
-        * above may cause rows to be skipped or repeated.
-        */
-
-       function rewind() {
-               if ( $this->numRows() ) {
-                       $this->db->dataSeek( $this, 0 );
-               }
-               $this->pos = 0;
-               $this->currentRow = null;
-       }
-
-       /**
-        * @return stdClass|array|bool
-        */
-       function current() {
-               if ( is_null( $this->currentRow ) ) {
-                       $this->next();
-               }
-
-               return $this->currentRow;
-       }
-
-       /**
-        * @return int
-        */
-       function key() {
-               return $this->pos;
-       }
-
-       /**
-        * @return stdClass
-        */
-       function next() {
-               $this->pos++;
-               $this->currentRow = $this->fetchObject();
-
-               return $this->currentRow;
-       }
-
-       /**
-        * @return bool
-        */
-       function valid() {
-               return $this->current() !== false;
-       }
-}
-
-/**
- * Overloads the relevant methods of the real ResultsWrapper so it
- * doesn't go anywhere near an actual database.
- */
-class FakeResultWrapper extends ResultWrapper {
-       /** @var array */
-       public $result = [];
-
-       /** @var null And it's going to stay that way :D */
-       protected $db = null;
-
-       /** @var int */
-       protected $pos = 0;
-
-       /** @var array|stdClass|bool */
-       protected $currentRow = null;
-
-       /**
-        * @param array $array
-        */
-       function __construct( $array ) {
-               $this->result = $array;
-       }
-
-       /**
-        * @return int
-        */
-       function numRows() {
-               return count( $this->result );
-       }
-
-       /**
-        * @return array|bool
-        */
-       function fetchRow() {
-               if ( $this->pos < count( $this->result ) ) {
-                       $this->currentRow = $this->result[$this->pos];
-               } else {
-                       $this->currentRow = false;
-               }
-               $this->pos++;
-               if ( is_object( $this->currentRow ) ) {
-                       return get_object_vars( $this->currentRow );
-               } else {
-                       return $this->currentRow;
-               }
-       }
-
-       function seek( $row ) {
-               $this->pos = $row;
-       }
-
-       function free() {
-       }
-
-       /**
-        * Callers want to be able to access fields with $this->fieldName
-        * @return bool|stdClass
-        */
-       function fetchObject() {
-               $this->fetchRow();
-               if ( $this->currentRow ) {
-                       return (object)$this->currentRow;
-               } else {
-                       return false;
-               }
-       }
-
-       function rewind() {
-               $this->pos = 0;
-               $this->currentRow = null;
-       }
-
-       /**
-        * @return bool|stdClass
-        */
-       function next() {
-               return $this->fetchObject();
-       }
-}
-
-/**
- * Used by DatabaseBase::buildLike() to represent characters that have special
- * meaning in SQL LIKE clauses and thus need no escaping. Don't instantiate it
- * manually, use DatabaseBase::anyChar() and anyString() instead.
- */
-class LikeMatch {
-       /** @var string */
-       private $str;
-
-       /**
-        * Store a string into a LikeMatch marker object.
-        *
-        * @param string $s
-        */
-       public function __construct( $s ) {
-               $this->str = $s;
-       }
-
-       /**
-        * Return the original stored string.
-        *
-        * @return string
-        */
-       public function toString() {
-               return $this->str;
-       }
-}
-
-/**
- * An object representing a master or replica DB position in a replicated setup.
- *
- * The implementation details of this opaque type are up to the database subclass.
- */
-interface DBMasterPos {
-       /**
-        * @return float UNIX timestamp
-        * @since 1.25
-        */
-       public function asOfTime();
-
-       /**
-        * @param DBMasterPos $pos
-        * @return bool Whether this position is at or higher than $pos
-        * @since 1.27
-        */
-       public function hasReached( DBMasterPos $pos );
-
-       /**
-        * @param DBMasterPos $pos
-        * @return bool Whether this position appears to be for the same channel as another
-        * @since 1.27
-        */
-       public function channelsMatch( DBMasterPos $pos );
-
-       /**
-        * @return string
-        * @since 1.27
-        */
-       public function __toString();
-}
diff --git a/includes/db/IDatabase.php b/includes/db/IDatabase.php
deleted file mode 100644 (file)
index f312357..0000000
+++ /dev/null
@@ -1,1715 +0,0 @@
-<?php
-
-/**
- * @defgroup Database Database
- *
- * This file deals with database interface functions
- * and query specifics/optimisations.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * Basic database interface for live and lazy-loaded DB handles
- *
- * @todo: loosen up DB classes from MWException
- * @note: IDatabase and DBConnRef should be updated to reflect any changes
- * @ingroup Database
- */
-interface IDatabase {
-       /** @var int Callback triggered immediately due to no active transaction */
-       const TRIGGER_IDLE = 1;
-       /** @var int Callback triggered by COMMIT */
-       const TRIGGER_COMMIT = 2;
-       /** @var int Callback triggered by ROLLBACK */
-       const TRIGGER_ROLLBACK = 3;
-
-       /** @var string Transaction is requested by regular caller outside of the DB layer */
-       const TRANSACTION_EXPLICIT = '';
-       /** @var string Transaction is requested internally via DBO_TRX/startAtomic() */
-       const TRANSACTION_INTERNAL = 'implicit';
-
-       /** @var string Transaction operation comes from service managing all DBs */
-       const FLUSHING_ALL_PEERS = 'flush';
-       /** @var string Transaction operation comes from the database class internally */
-       const FLUSHING_INTERNAL = 'flush';
-
-       /** @var string Do not remember the prior flags */
-       const REMEMBER_NOTHING = '';
-       /** @var string Remember the prior flags */
-       const REMEMBER_PRIOR = 'remember';
-       /** @var string Restore to the prior flag state */
-       const RESTORE_PRIOR = 'prior';
-       /** @var string Restore to the initial flag state */
-       const RESTORE_INITIAL = 'initial';
-
-       /** @var string Estimate total time (RTT, scanning, waiting on locks, applying) */
-       const ESTIMATE_TOTAL = 'total';
-       /** @var string Estimate time to apply (scanning, applying) */
-       const ESTIMATE_DB_APPLY = 'apply';
-
-       /**
-        * A string describing the current software version, and possibly
-        * other details in a user-friendly way. Will be listed on Special:Version, etc.
-        * Use getServerVersion() to get machine-friendly information.
-        *
-        * @return string Version information from the database server
-        */
-       public function getServerInfo();
-
-       /**
-        * Turns buffering of SQL result sets on (true) or off (false). Default is
-        * "on".
-        *
-        * Unbuffered queries are very troublesome in MySQL:
-        *
-        *   - If another query is executed while the first query is being read
-        *     out, the first query is killed. This means you can't call normal
-        *     MediaWiki functions while you are reading an unbuffered query result
-        *     from a normal wfGetDB() connection.
-        *
-        *   - Unbuffered queries cause the MySQL server to use large amounts of
-        *     memory and to hold broad locks which block other queries.
-        *
-        * If you want to limit client-side memory, it's almost always better to
-        * split up queries into batches using a LIMIT clause than to switch off
-        * buffering.
-        *
-        * @param null|bool $buffer
-        * @return null|bool The previous value of the flag
-        */
-       public function bufferResults( $buffer = null );
-
-       /**
-        * Gets the current transaction level.
-        *
-        * Historically, transactions were allowed to be "nested". This is no
-        * longer supported, so this function really only returns a boolean.
-        *
-        * @return int The previous value
-        */
-       public function trxLevel();
-
-       /**
-        * Get the UNIX timestamp of the time that the transaction was established
-        *
-        * This can be used to reason about the staleness of SELECT data
-        * in REPEATABLE-READ transaction isolation level.
-        *
-        * @return float|null Returns null if there is not active transaction
-        * @since 1.25
-        */
-       public function trxTimestamp();
-
-       /**
-        * @return bool Whether an explicit transaction or atomic sections are still open
-        * @since 1.28
-        */
-       public function explicitTrxActive();
-
-       /**
-        * Get/set the table prefix.
-        * @param string $prefix The table prefix to set, or omitted to leave it unchanged.
-        * @return string The previous table prefix.
-        */
-       public function tablePrefix( $prefix = null );
-
-       /**
-        * Get/set the db schema.
-        * @param string $schema The database schema to set, or omitted to leave it unchanged.
-        * @return string The previous db schema.
-        */
-       public function dbSchema( $schema = null );
-
-       /**
-        * Get properties passed down from the server info array of the load
-        * balancer.
-        *
-        * @param string $name The entry of the info array to get, or null to get the
-        *   whole array
-        *
-        * @return array|mixed|null
-        */
-       public function getLBInfo( $name = null );
-
-       /**
-        * Set the LB info array, or a member of it. If called with one parameter,
-        * the LB info array is set to that parameter. If it is called with two
-        * parameters, the member with the given name is set to the given value.
-        *
-        * @param string $name
-        * @param array $value
-        */
-       public function setLBInfo( $name, $value = null );
-
-       /**
-        * Returns true if this database does an implicit sort when doing GROUP BY
-        *
-        * @return bool
-        */
-       public function implicitGroupby();
-
-       /**
-        * Returns true if this database does an implicit order by when the column has an index
-        * For example: SELECT page_title FROM page LIMIT 1
-        *
-        * @return bool
-        */
-       public function implicitOrderby();
-
-       /**
-        * Return the last query that went through IDatabase::query()
-        * @return string
-        */
-       public function lastQuery();
-
-       /**
-        * Returns true if the connection may have been used for write queries.
-        * Should return true if unsure.
-        *
-        * @return bool
-        */
-       public function doneWrites();
-
-       /**
-        * Returns the last time the connection may have been used for write queries.
-        * Should return a timestamp if unsure.
-        *
-        * @return int|float UNIX timestamp or false
-        * @since 1.24
-        */
-       public function lastDoneWrites();
-
-       /**
-        * @return bool Whether there is a transaction open with possible write queries
-        * @since 1.27
-        */
-       public function writesPending();
-
-       /**
-        * Returns true if there is a transaction open with possible write
-        * queries or transaction pre-commit/idle callbacks waiting on it to finish.
-        * This does *not* count recurring callbacks, e.g. from setTransactionListener().
-        *
-        * @return bool
-        */
-       public function writesOrCallbacksPending();
-
-       /**
-        * Get the time spend running write queries for this transaction
-        *
-        * High times could be due to scanning, updates, locking, and such
-        *
-        * @param string $type IDatabase::ESTIMATE_* constant [default: ESTIMATE_ALL]
-        * @return float|bool Returns false if not transaction is active
-        * @since 1.26
-        */
-       public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL );
-
-       /**
-        * Get the list of method names that did write queries for this transaction
-        *
-        * @return array
-        * @since 1.27
-        */
-       public function pendingWriteCallers();
-
-       /**
-        * Is a connection to the database open?
-        * @return bool
-        */
-       public function isOpen();
-
-       /**
-        * Set a flag for this connection
-        *
-        * @param int $flag DBO_* constants from Defines.php:
-        *   - DBO_DEBUG: output some debug info (same as debug())
-        *   - DBO_NOBUFFER: don't buffer results (inverse of bufferResults())
-        *   - DBO_TRX: automatically start transactions
-        *   - DBO_DEFAULT: automatically sets DBO_TRX if not in command line mode
-        *       and removes it in command line mode
-        *   - DBO_PERSISTENT: use persistant database connection
-        * @param string $remember IDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING]
-        */
-       public function setFlag( $flag, $remember = self::REMEMBER_NOTHING );
-
-       /**
-        * Clear a flag for this connection
-        *
-        * @param int $flag DBO_* constants from Defines.php:
-        *   - DBO_DEBUG: output some debug info (same as debug())
-        *   - DBO_NOBUFFER: don't buffer results (inverse of bufferResults())
-        *   - DBO_TRX: automatically start transactions
-        *   - DBO_DEFAULT: automatically sets DBO_TRX if not in command line mode
-        *       and removes it in command line mode
-        *   - DBO_PERSISTENT: use persistant database connection
-        * @param string $remember IDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING]
-        */
-       public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING );
-
-       /**
-        * Restore the flags to their prior state before the last setFlag/clearFlag call
-        *
-        * @param string $state IDatabase::RESTORE_* constant. [default: RESTORE_PRIOR]
-        * @since 1.28
-        */
-       public function restoreFlags( $state = self::RESTORE_PRIOR );
-
-       /**
-        * Returns a boolean whether the flag $flag is set for this connection
-        *
-        * @param int $flag DBO_* constants from Defines.php:
-        *   - DBO_DEBUG: output some debug info (same as debug())
-        *   - DBO_NOBUFFER: don't buffer results (inverse of bufferResults())
-        *   - DBO_TRX: automatically start transactions
-        *   - DBO_PERSISTENT: use persistant database connection
-        * @return bool
-        */
-       public function getFlag( $flag );
-
-       /**
-        * General read-only accessor
-        *
-        * @param string $name
-        * @return string
-        */
-       public function getProperty( $name );
-
-       /**
-        * @return string
-        */
-       public function getWikiID();
-
-       /**
-        * Get the type of the DBMS, as it appears in $wgDBtype.
-        *
-        * @return string
-        */
-       public function getType();
-
-       /**
-        * Open a connection to the database. Usually aborts on failure
-        *
-        * @param string $server Database server host
-        * @param string $user Database user name
-        * @param string $password Database user password
-        * @param string $dbName Database name
-        * @return bool
-        * @throws DBConnectionError
-        */
-       public function open( $server, $user, $password, $dbName );
-
-       /**
-        * Fetch the next row from the given result object, in object form.
-        * Fields can be retrieved with $row->fieldname, with fields acting like
-        * member variables.
-        * If no more rows are available, false is returned.
-        *
-        * @param ResultWrapper|stdClass $res Object as returned from IDatabase::query(), etc.
-        * @return stdClass|bool
-        * @throws DBUnexpectedError Thrown if the database returns an error
-        */
-       public function fetchObject( $res );
-
-       /**
-        * Fetch the next row from the given result object, in associative array
-        * form. Fields are retrieved with $row['fieldname'].
-        * If no more rows are available, false is returned.
-        *
-        * @param ResultWrapper $res Result object as returned from IDatabase::query(), etc.
-        * @return array|bool
-        * @throws DBUnexpectedError Thrown if the database returns an error
-        */
-       public function fetchRow( $res );
-
-       /**
-        * Get the number of rows in a result object
-        *
-        * @param mixed $res A SQL result
-        * @return int
-        */
-       public function numRows( $res );
-
-       /**
-        * Get the number of fields in a result object
-        * @see http://www.php.net/mysql_num_fields
-        *
-        * @param mixed $res A SQL result
-        * @return int
-        */
-       public function numFields( $res );
-
-       /**
-        * Get a field name in a result object
-        * @see http://www.php.net/mysql_field_name
-        *
-        * @param mixed $res A SQL result
-        * @param int $n
-        * @return string
-        */
-       public function fieldName( $res, $n );
-
-       /**
-        * Get the inserted value of an auto-increment row
-        *
-        * The value inserted should be fetched from nextSequenceValue()
-        *
-        * Example:
-        * $id = $dbw->nextSequenceValue( 'page_page_id_seq' );
-        * $dbw->insert( 'page', [ 'page_id' => $id ] );
-        * $id = $dbw->insertId();
-        *
-        * @return int
-        */
-       public function insertId();
-
-       /**
-        * Change the position of the cursor in a result object
-        * @see http://www.php.net/mysql_data_seek
-        *
-        * @param mixed $res A SQL result
-        * @param int $row
-        */
-       public function dataSeek( $res, $row );
-
-       /**
-        * Get the last error number
-        * @see http://www.php.net/mysql_errno
-        *
-        * @return int
-        */
-       public function lastErrno();
-
-       /**
-        * Get a description of the last error
-        * @see http://www.php.net/mysql_error
-        *
-        * @return string
-        */
-       public function lastError();
-
-       /**
-        * mysql_fetch_field() wrapper
-        * Returns false if the field doesn't exist
-        *
-        * @param string $table Table name
-        * @param string $field Field name
-        *
-        * @return Field
-        */
-       public function fieldInfo( $table, $field );
-
-       /**
-        * Get the number of rows affected by the last write query
-        * @see http://www.php.net/mysql_affected_rows
-        *
-        * @return int
-        */
-       public function affectedRows();
-
-       /**
-        * Returns a wikitext link to the DB's website, e.g.,
-        *   return "[http://www.mysql.com/ MySQL]";
-        * Should at least contain plain text, if for some reason
-        * your database has no website.
-        *
-        * @return string Wikitext of a link to the server software's web site
-        */
-       public function getSoftwareLink();
-
-       /**
-        * A string describing the current software version, like from
-        * mysql_get_server_info().
-        *
-        * @return string Version information from the database server.
-        */
-       public function getServerVersion();
-
-       /**
-        * Closes a database connection.
-        * if it is open : commits any open transactions
-        *
-        * @throws MWException
-        * @return bool Operation success. true if already closed.
-        */
-       public function close();
-
-       /**
-        * @param string $error Fallback error message, used if none is given by DB
-        * @throws DBConnectionError
-        */
-       public function reportConnectionError( $error = 'Unknown error' );
-
-       /**
-        * Run an SQL query and return the result. Normally throws a DBQueryError
-        * on failure. If errors are ignored, returns false instead.
-        *
-        * In new code, the query wrappers select(), insert(), update(), delete(),
-        * etc. should be used where possible, since they give much better DBMS
-        * independence and automatically quote or validate user input in a variety
-        * of contexts. This function is generally only useful for queries which are
-        * explicitly DBMS-dependent and are unsupported by the query wrappers, such
-        * as CREATE TABLE.
-        *
-        * However, the query wrappers themselves should call this function.
-        *
-        * @param string $sql SQL query
-        * @param string $fname Name of the calling function, for profiling/SHOW PROCESSLIST
-        *     comment (you can use __METHOD__ or add some extra info)
-        * @param bool $tempIgnore Whether to avoid throwing an exception on errors...
-        *     maybe best to catch the exception instead?
-        * @throws MWException
-        * @return bool|ResultWrapper True for a successful write query, ResultWrapper object
-        *     for a successful read query, or false on failure if $tempIgnore set
-        */
-       public function query( $sql, $fname = __METHOD__, $tempIgnore = false );
-
-       /**
-        * Report a query error. Log the error, and if neither the object ignore
-        * flag nor the $tempIgnore flag is set, throw a DBQueryError.
-        *
-        * @param string $error
-        * @param int $errno
-        * @param string $sql
-        * @param string $fname
-        * @param bool $tempIgnore
-        * @throws DBQueryError
-        */
-       public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false );
-
-       /**
-        * Free a result object returned by query() or select(). It's usually not
-        * necessary to call this, just use unset() or let the variable holding
-        * the result object go out of scope.
-        *
-        * @param mixed $res A SQL result
-        */
-       public function freeResult( $res );
-
-       /**
-        * A SELECT wrapper which returns a single field from a single result row.
-        *
-        * Usually throws a DBQueryError on failure. If errors are explicitly
-        * ignored, returns false on failure.
-        *
-        * If no result rows are returned from the query, false is returned.
-        *
-        * @param string|array $table Table name. See IDatabase::select() for details.
-        * @param string $var The field name to select. This must be a valid SQL
-        *   fragment: do not use unvalidated user input.
-        * @param string|array $cond The condition array. See IDatabase::select() for details.
-        * @param string $fname The function name of the caller.
-        * @param string|array $options The query options. See IDatabase::select() for details.
-        *
-        * @return bool|mixed The value from the field, or false on failure.
-        */
-       public function selectField(
-               $table, $var, $cond = '', $fname = __METHOD__, $options = []
-       );
-
-       /**
-        * A SELECT wrapper which returns a list of single field values from result rows.
-        *
-        * Usually throws a DBQueryError on failure. If errors are explicitly
-        * ignored, returns false on failure.
-        *
-        * If no result rows are returned from the query, false is returned.
-        *
-        * @param string|array $table Table name. See IDatabase::select() for details.
-        * @param string $var The field name to select. This must be a valid SQL
-        *   fragment: do not use unvalidated user input.
-        * @param string|array $cond The condition array. See IDatabase::select() for details.
-        * @param string $fname The function name of the caller.
-        * @param string|array $options The query options. See IDatabase::select() for details.
-        *
-        * @return bool|array The values from the field, or false on failure
-        * @since 1.25
-        */
-       public function selectFieldValues(
-               $table, $var, $cond = '', $fname = __METHOD__, $options = []
-       );
-
-       /**
-        * Execute a SELECT query constructed using the various parameters provided.
-        * See below for full details of the parameters.
-        *
-        * @param string|array $table Table name
-        * @param string|array $vars Field names
-        * @param string|array $conds Conditions
-        * @param string $fname Caller function name
-        * @param array $options Query options
-        * @param array $join_conds Join conditions
-        *
-        *
-        * @param string|array $table
-        *
-        * May be either an array of table names, or a single string holding a table
-        * name. If an array is given, table aliases can be specified, for example:
-        *
-        *    [ 'a' => 'user' ]
-        *
-        * This includes the user table in the query, with the alias "a" available
-        * for use in field names (e.g. a.user_name).
-        *
-        * All of the table names given here are automatically run through
-        * DatabaseBase::tableName(), which causes the table prefix (if any) to be
-        * added, and various other table name mappings to be performed.
-        *
-        * Do not use untrusted user input as a table name. Alias names should
-        * not have characters outside of the Basic multilingual plane.
-        *
-        * @param string|array $vars
-        *
-        * May be either a field name or an array of field names. The field names
-        * can be complete fragments of SQL, for direct inclusion into the SELECT
-        * query. If an array is given, field aliases can be specified, for example:
-        *
-        *   [ 'maxrev' => 'MAX(rev_id)' ]
-        *
-        * This includes an expression with the alias "maxrev" in the query.
-        *
-        * If an expression is given, care must be taken to ensure that it is
-        * DBMS-independent.
-        *
-        * Untrusted user input must not be passed to this parameter.
-        *
-        * @param string|array $conds
-        *
-        * May be either a string containing a single condition, or an array of
-        * conditions. If an array is given, the conditions constructed from each
-        * element are combined with AND.
-        *
-        * Array elements may take one of two forms:
-        *
-        *   - Elements with a numeric key are interpreted as raw SQL fragments.
-        *   - Elements with a string key are interpreted as equality conditions,
-        *     where the key is the field name.
-        *     - If the value of such an array element is a scalar (such as a
-        *       string), it will be treated as data and thus quoted appropriately.
-        *       If it is null, an IS NULL clause will be added.
-        *     - If the value is an array, an IN (...) clause will be constructed
-        *       from its non-null elements, and an IS NULL clause will be added
-        *       if null is present, such that the field may match any of the
-        *       elements in the array. The non-null elements will be quoted.
-        *
-        * Note that expressions are often DBMS-dependent in their syntax.
-        * DBMS-independent wrappers are provided for constructing several types of
-        * expression commonly used in condition queries. See:
-        *    - IDatabase::buildLike()
-        *    - IDatabase::conditional()
-        *
-        * Untrusted user input is safe in the values of string keys, however untrusted
-        * input must not be used in the array key names or in the values of numeric keys.
-        * Escaping of untrusted input used in values of numeric keys should be done via
-        * IDatabase::addQuotes()
-        *
-        * @param string|array $options
-        *
-        * Optional: Array of query options. Boolean options are specified by
-        * including them in the array as a string value with a numeric key, for
-        * example:
-        *
-        *    [ 'FOR UPDATE' ]
-        *
-        * The supported options are:
-        *
-        *   - OFFSET: Skip this many rows at the start of the result set. OFFSET
-        *     with LIMIT can theoretically be used for paging through a result set,
-        *     but this is discouraged in MediaWiki for performance reasons.
-        *
-        *   - LIMIT: Integer: return at most this many rows. The rows are sorted
-        *     and then the first rows are taken until the limit is reached. LIMIT
-        *     is applied to a result set after OFFSET.
-        *
-        *   - FOR UPDATE: Boolean: lock the returned rows so that they can't be
-        *     changed until the next COMMIT.
-        *
-        *   - DISTINCT: Boolean: return only unique result rows.
-        *
-        *   - GROUP BY: May be either an SQL fragment string naming a field or
-        *     expression to group by, or an array of such SQL fragments.
-        *
-        *   - HAVING: May be either an string containing a HAVING clause or an array of
-        *     conditions building the HAVING clause. If an array is given, the conditions
-        *     constructed from each element are combined with AND.
-        *
-        *   - ORDER BY: May be either an SQL fragment giving a field name or
-        *     expression to order by, or an array of such SQL fragments.
-        *
-        *   - USE INDEX: This may be either a string giving the index name to use
-        *     for the query, or an array. If it is an associative array, each key
-        *     gives the table name (or alias), each value gives the index name to
-        *     use for that table. All strings are SQL fragments and so should be
-        *     validated by the caller.
-        *
-        *   - EXPLAIN: In MySQL, this causes an EXPLAIN SELECT query to be run,
-        *     instead of SELECT.
-        *
-        * And also the following boolean MySQL extensions, see the MySQL manual
-        * for documentation:
-        *
-        *    - LOCK IN SHARE MODE
-        *    - STRAIGHT_JOIN
-        *    - HIGH_PRIORITY
-        *    - SQL_BIG_RESULT
-        *    - SQL_BUFFER_RESULT
-        *    - SQL_SMALL_RESULT
-        *    - SQL_CALC_FOUND_ROWS
-        *    - SQL_CACHE
-        *    - SQL_NO_CACHE
-        *
-        *
-        * @param string|array $join_conds
-        *
-        * Optional associative array of table-specific join conditions. In the
-        * most common case, this is unnecessary, since the join condition can be
-        * in $conds. However, it is useful for doing a LEFT JOIN.
-        *
-        * The key of the array contains the table name or alias. The value is an
-        * array with two elements, numbered 0 and 1. The first gives the type of
-        * join, the second is the same as the $conds parameter. Thus it can be
-        * an SQL fragment, or an array where the string keys are equality and the
-        * numeric keys are SQL fragments all AND'd together. For example:
-        *
-        *    [ 'page' => [ 'LEFT JOIN', 'page_latest=rev_id' ] ]
-        *
-        * @return ResultWrapper|bool If the query returned no rows, a ResultWrapper
-        *   with no rows in it will be returned. If there was a query error, a
-        *   DBQueryError exception will be thrown, except if the "ignore errors"
-        *   option was set, in which case false will be returned.
-        */
-       public function select(
-               $table, $vars, $conds = '', $fname = __METHOD__,
-               $options = [], $join_conds = []
-       );
-
-       /**
-        * The equivalent of IDatabase::select() except that the constructed SQL
-        * is returned, instead of being immediately executed. This can be useful for
-        * doing UNION queries, where the SQL text of each query is needed. In general,
-        * however, callers outside of Database classes should just use select().
-        *
-        * @param string|array $table Table name
-        * @param string|array $vars Field names
-        * @param string|array $conds Conditions
-        * @param string $fname Caller function name
-        * @param string|array $options Query options
-        * @param string|array $join_conds Join conditions
-        *
-        * @return string SQL query string.
-        * @see IDatabase::select()
-        */
-       public function selectSQLText(
-               $table, $vars, $conds = '', $fname = __METHOD__,
-               $options = [], $join_conds = []
-       );
-
-       /**
-        * Single row SELECT wrapper. Equivalent to IDatabase::select(), except
-        * that a single row object is returned. If the query returns no rows,
-        * false is returned.
-        *
-        * @param string|array $table Table name
-        * @param string|array $vars Field names
-        * @param array $conds Conditions
-        * @param string $fname Caller function name
-        * @param string|array $options Query options
-        * @param array|string $join_conds Join conditions
-        *
-        * @return stdClass|bool
-        */
-       public function selectRow( $table, $vars, $conds, $fname = __METHOD__,
-               $options = [], $join_conds = []
-       );
-
-       /**
-        * Estimate the number of rows in dataset
-        *
-        * MySQL allows you to estimate the number of rows that would be returned
-        * by a SELECT query, using EXPLAIN SELECT. The estimate is provided using
-        * index cardinality statistics, and is notoriously inaccurate, especially
-        * when large numbers of rows have recently been added or deleted.
-        *
-        * For DBMSs that don't support fast result size estimation, this function
-        * will actually perform the SELECT COUNT(*).
-        *
-        * Takes the same arguments as IDatabase::select().
-        *
-        * @param string $table Table name
-        * @param string $vars Unused
-        * @param array|string $conds Filters on the table
-        * @param string $fname Function name for profiling
-        * @param array $options Options for select
-        * @return int Row count
-        */
-       public function estimateRowCount(
-               $table, $vars = '*', $conds = '', $fname = __METHOD__, $options = []
-       );
-
-       /**
-        * Get the number of rows in dataset
-        *
-        * This is useful when trying to do COUNT(*) but with a LIMIT for performance.
-        *
-        * Takes the same arguments as IDatabase::select().
-        *
-        * @since 1.27 Added $join_conds parameter
-        *
-        * @param array|string $tables Table names
-        * @param string $vars Unused
-        * @param array|string $conds Filters on the table
-        * @param string $fname Function name for profiling
-        * @param array $options Options for select
-        * @param array $join_conds Join conditions (since 1.27)
-        * @return int Row count
-        */
-       public function selectRowCount(
-               $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
-       );
-
-       /**
-        * Determines whether a field exists in a table
-        *
-        * @param string $table Table name
-        * @param string $field Filed to check on that table
-        * @param string $fname Calling function name (optional)
-        * @return bool Whether $table has filed $field
-        */
-       public function fieldExists( $table, $field, $fname = __METHOD__ );
-
-       /**
-        * Determines whether an index exists
-        * Usually throws a DBQueryError on failure
-        * If errors are explicitly ignored, returns NULL on failure
-        *
-        * @param string $table
-        * @param string $index
-        * @param string $fname
-        * @return bool|null
-        */
-       public function indexExists( $table, $index, $fname = __METHOD__ );
-
-       /**
-        * Query whether a given table exists
-        *
-        * @param string $table
-        * @param string $fname
-        * @return bool
-        */
-       public function tableExists( $table, $fname = __METHOD__ );
-
-       /**
-        * Determines if a given index is unique
-        *
-        * @param string $table
-        * @param string $index
-        *
-        * @return bool
-        */
-       public function indexUnique( $table, $index );
-
-       /**
-        * INSERT wrapper, inserts an array into a table.
-        *
-        * $a may be either:
-        *
-        *   - A single associative array. The array keys are the field names, and
-        *     the values are the values to insert. The values are treated as data
-        *     and will be quoted appropriately. If NULL is inserted, this will be
-        *     converted to a database NULL.
-        *   - An array with numeric keys, holding a list of associative arrays.
-        *     This causes a multi-row INSERT on DBMSs that support it. The keys in
-        *     each subarray must be identical to each other, and in the same order.
-        *
-        * Usually throws a DBQueryError on failure. If errors are explicitly ignored,
-        * returns success.
-        *
-        * $options is an array of options, with boolean options encoded as values
-        * with numeric keys, in the same style as $options in
-        * IDatabase::select(). Supported options are:
-        *
-        *   - IGNORE: Boolean: if present, duplicate key errors are ignored, and
-        *     any rows which cause duplicate key errors are not inserted. It's
-        *     possible to determine how many rows were successfully inserted using
-        *     IDatabase::affectedRows().
-        *
-        * @param string $table Table name. This will be passed through
-        *   DatabaseBase::tableName().
-        * @param array $a Array of rows to insert
-        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
-        * @param array $options Array of options
-        *
-        * @return bool
-        */
-       public function insert( $table, $a, $fname = __METHOD__, $options = [] );
-
-       /**
-        * UPDATE wrapper. Takes a condition array and a SET array.
-        *
-        * @param string $table Name of the table to UPDATE. This will be passed through
-        *   DatabaseBase::tableName().
-        * @param array $values An array of values to SET. For each array element,
-        *   the key gives the field name, and the value gives the data to set
-        *   that field to. The data will be quoted by IDatabase::addQuotes().
-        * @param array $conds An array of conditions (WHERE). See
-        *   IDatabase::select() for the details of the format of condition
-        *   arrays. Use '*' to update all rows.
-        * @param string $fname The function name of the caller (from __METHOD__),
-        *   for logging and profiling.
-        * @param array $options An array of UPDATE options, can be:
-        *   - IGNORE: Ignore unique key conflicts
-        *   - LOW_PRIORITY: MySQL-specific, see MySQL manual.
-        * @return bool
-        */
-       public function update( $table, $values, $conds, $fname = __METHOD__, $options = [] );
-
-       /**
-        * Makes an encoded list of strings from an array
-        *
-        * @param array $a Containing the data
-        * @param int $mode Constant
-        *    - LIST_COMMA: Comma separated, no field names
-        *    - LIST_AND:   ANDed WHERE clause (without the WHERE). See the
-        *      documentation for $conds in IDatabase::select().
-        *    - LIST_OR:    ORed WHERE clause (without the WHERE)
-        *    - LIST_SET:   Comma separated with field names, like a SET clause
-        *    - LIST_NAMES: Comma separated field names
-        * @throws MWException|DBUnexpectedError
-        * @return string
-        */
-       public function makeList( $a, $mode = LIST_COMMA );
-
-       /**
-        * Build a partial where clause from a 2-d array such as used for LinkBatch.
-        * The keys on each level may be either integers or strings.
-        *
-        * @param array $data Organized as 2-d
-        *    [ baseKeyVal => [ subKeyVal => [ignored], ... ], ... ]
-        * @param string $baseKey Field name to match the base-level keys to (eg 'pl_namespace')
-        * @param string $subKey Field name to match the sub-level keys to (eg 'pl_title')
-        * @return string|bool SQL fragment, or false if no items in array
-        */
-       public function makeWhereFrom2d( $data, $baseKey, $subKey );
-
-       /**
-        * @param string $field
-        * @return string
-        */
-       public function bitNot( $field );
-
-       /**
-        * @param string $fieldLeft
-        * @param string $fieldRight
-        * @return string
-        */
-       public function bitAnd( $fieldLeft, $fieldRight );
-
-       /**
-        * @param string $fieldLeft
-        * @param string $fieldRight
-        * @return string
-        */
-       public function bitOr( $fieldLeft, $fieldRight );
-
-       /**
-        * Build a concatenation list to feed into a SQL query
-        * @param array $stringList List of raw SQL expressions; caller is
-        *   responsible for any quoting
-        * @return string
-        */
-       public function buildConcat( $stringList );
-
-       /**
-        * Build a GROUP_CONCAT or equivalent statement for a query.
-        *
-        * This is useful for combining a field for several rows into a single string.
-        * NULL values will not appear in the output, duplicated values will appear,
-        * and the resulting delimiter-separated values have no defined sort order.
-        * Code using the results may need to use the PHP unique() or sort() methods.
-        *
-        * @param string $delim Glue to bind the results together
-        * @param string|array $table Table name
-        * @param string $field Field name
-        * @param string|array $conds Conditions
-        * @param string|array $join_conds Join conditions
-        * @return string SQL text
-        * @since 1.23
-        */
-       public function buildGroupConcatField(
-               $delim, $table, $field, $conds = '', $join_conds = []
-       );
-
-       /**
-        * Change the current database
-        *
-        * @param string $db
-        * @return bool Success or failure
-        */
-       public function selectDB( $db );
-
-       /**
-        * Get the current DB name
-        * @return string
-        */
-       public function getDBname();
-
-       /**
-        * Get the server hostname or IP address
-        * @return string
-        */
-       public function getServer();
-
-       /**
-        * Adds quotes and backslashes.
-        *
-        * @param string|Blob $s
-        * @return string
-        */
-       public function addQuotes( $s );
-
-       /**
-        * LIKE statement wrapper, receives a variable-length argument list with
-        * parts of pattern to match containing either string literals that will be
-        * escaped or tokens returned by anyChar() or anyString(). Alternatively,
-        * the function could be provided with an array of aforementioned
-        * parameters.
-        *
-        * Example: $dbr->buildLike( 'My_page_title/', $dbr->anyString() ) returns
-        * a LIKE clause that searches for subpages of 'My page title'.
-        * Alternatively:
-        *   $pattern = [ 'My_page_title/', $dbr->anyString() ];
-        *   $query .= $dbr->buildLike( $pattern );
-        *
-        * @since 1.16
-        * @return string Fully built LIKE statement
-        */
-       public function buildLike();
-
-       /**
-        * Returns a token for buildLike() that denotes a '_' to be used in a LIKE query
-        *
-        * @return LikeMatch
-        */
-       public function anyChar();
-
-       /**
-        * Returns a token for buildLike() that denotes a '%' to be used in a LIKE query
-        *
-        * @return LikeMatch
-        */
-       public function anyString();
-
-       /**
-        * Returns an appropriately quoted sequence value for inserting a new row.
-        * MySQL has autoincrement fields, so this is just NULL. But the PostgreSQL
-        * subclass will return an integer, and save the value for insertId()
-        *
-        * Any implementation of this function should *not* involve reusing
-        * sequence numbers created for rolled-back transactions.
-        * See http://bugs.mysql.com/bug.php?id=30767 for details.
-        * @param string $seqName
-        * @return null|int
-        */
-       public function nextSequenceValue( $seqName );
-
-       /**
-        * REPLACE query wrapper.
-        *
-        * REPLACE is a very handy MySQL extension, which functions like an INSERT
-        * except that when there is a duplicate key error, the old row is deleted
-        * and the new row is inserted in its place.
-        *
-        * We simulate this with standard SQL with a DELETE followed by INSERT. To
-        * perform the delete, we need to know what the unique indexes are so that
-        * we know how to find the conflicting rows.
-        *
-        * It may be more efficient to leave off unique indexes which are unlikely
-        * to collide. However if you do this, you run the risk of encountering
-        * errors which wouldn't have occurred in MySQL.
-        *
-        * @param string $table The table to replace the row(s) in.
-        * @param array $uniqueIndexes Is an array of indexes. Each element may be either
-        *    a field name or an array of field names
-        * @param array $rows Can be either a single row to insert, or multiple rows,
-        *    in the same format as for IDatabase::insert()
-        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
-        */
-       public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ );
-
-       /**
-        * INSERT ON DUPLICATE KEY UPDATE wrapper, upserts an array into a table.
-        *
-        * This updates any conflicting rows (according to the unique indexes) using
-        * the provided SET clause and inserts any remaining (non-conflicted) rows.
-        *
-        * $rows may be either:
-        *   - A single associative array. The array keys are the field names, and
-        *     the values are the values to insert. The values are treated as data
-        *     and will be quoted appropriately. If NULL is inserted, this will be
-        *     converted to a database NULL.
-        *   - An array with numeric keys, holding a list of associative arrays.
-        *     This causes a multi-row INSERT on DBMSs that support it. The keys in
-        *     each subarray must be identical to each other, and in the same order.
-        *
-        * It may be more efficient to leave off unique indexes which are unlikely
-        * to collide. However if you do this, you run the risk of encountering
-        * errors which wouldn't have occurred in MySQL.
-        *
-        * Usually throws a DBQueryError on failure. If errors are explicitly ignored,
-        * returns success.
-        *
-        * @since 1.22
-        *
-        * @param string $table Table name. This will be passed through DatabaseBase::tableName().
-        * @param array $rows A single row or list of rows to insert
-        * @param array $uniqueIndexes List of single field names or field name tuples
-        * @param array $set An array of values to SET. For each array element, the
-        *   key gives the field name, and the value gives the data to set that
-        *   field to. The data will be quoted by IDatabase::addQuotes().
-        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
-        * @throws Exception
-        * @return bool
-        */
-       public function upsert(
-               $table, array $rows, array $uniqueIndexes, array $set, $fname = __METHOD__
-       );
-
-       /**
-        * DELETE where the condition is a join.
-        *
-        * MySQL overrides this to use a multi-table DELETE syntax, in other databases
-        * we use sub-selects
-        *
-        * For safety, an empty $conds will not delete everything. If you want to
-        * delete all rows where the join condition matches, set $conds='*'.
-        *
-        * DO NOT put the join condition in $conds.
-        *
-        * @param string $delTable The table to delete from.
-        * @param string $joinTable The other table.
-        * @param string $delVar The variable to join on, in the first table.
-        * @param string $joinVar The variable to join on, in the second table.
-        * @param array $conds Condition array of field names mapped to variables,
-        *   ANDed together in the WHERE clause
-        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
-        * @throws DBUnexpectedError
-        */
-       public function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds,
-               $fname = __METHOD__
-       );
-
-       /**
-        * DELETE query wrapper.
-        *
-        * @param array $table Table name
-        * @param string|array $conds Array of conditions. See $conds in IDatabase::select()
-        *   for the format. Use $conds == "*" to delete all rows
-        * @param string $fname Name of the calling function
-        * @throws DBUnexpectedError
-        * @return bool|ResultWrapper
-        */
-       public function delete( $table, $conds, $fname = __METHOD__ );
-
-       /**
-        * INSERT SELECT wrapper. Takes data from a SELECT query and inserts it
-        * into another table.
-        *
-        * @param string $destTable The table name to insert into
-        * @param string|array $srcTable May be either a table name, or an array of table names
-        *    to include in a join.
-        *
-        * @param array $varMap Must be an associative array of the form
-        *    [ 'dest1' => 'source1', ... ]. Source items may be literals
-        *    rather than field names, but strings should be quoted with
-        *    IDatabase::addQuotes()
-        *
-        * @param array $conds Condition array. See $conds in IDatabase::select() for
-        *    the details of the format of condition arrays. May be "*" to copy the
-        *    whole table.
-        *
-        * @param string $fname The function name of the caller, from __METHOD__
-        *
-        * @param array $insertOptions Options for the INSERT part of the query, see
-        *    IDatabase::insert() for details.
-        * @param array $selectOptions Options for the SELECT part of the query, see
-        *    IDatabase::select() for details.
-        *
-        * @return ResultWrapper
-        */
-       public function insertSelect( $destTable, $srcTable, $varMap, $conds,
-               $fname = __METHOD__,
-               $insertOptions = [], $selectOptions = []
-       );
-
-       /**
-        * Returns true if current database backend supports ORDER BY or LIMIT for separate subqueries
-        * within the UNION construct.
-        * @return bool
-        */
-       public function unionSupportsOrderAndLimit();
-
-       /**
-        * Construct a UNION query
-        * This is used for providing overload point for other DB abstractions
-        * not compatible with the MySQL syntax.
-        * @param array $sqls SQL statements to combine
-        * @param bool $all Use UNION ALL
-        * @return string SQL fragment
-        */
-       public function unionQueries( $sqls, $all );
-
-       /**
-        * Returns an SQL expression for a simple conditional. This doesn't need
-        * to be overridden unless CASE isn't supported in your DBMS.
-        *
-        * @param string|array $cond SQL expression which will result in a boolean value
-        * @param string $trueVal SQL expression to return if true
-        * @param string $falseVal SQL expression to return if false
-        * @return string SQL fragment
-        */
-       public function conditional( $cond, $trueVal, $falseVal );
-
-       /**
-        * Returns a comand for str_replace function in SQL query.
-        * Uses REPLACE() in MySQL
-        *
-        * @param string $orig Column to modify
-        * @param string $old Column to seek
-        * @param string $new Column to replace with
-        *
-        * @return string
-        */
-       public function strreplace( $orig, $old, $new );
-
-       /**
-        * Determines how long the server has been up
-        *
-        * @return int
-        */
-       public function getServerUptime();
-
-       /**
-        * Determines if the last failure was due to a deadlock
-        *
-        * @return bool
-        */
-       public function wasDeadlock();
-
-       /**
-        * Determines if the last failure was due to a lock timeout
-        *
-        * @return bool
-        */
-       public function wasLockTimeout();
-
-       /**
-        * Determines if the last query error was due to a dropped connection and should
-        * be dealt with by pinging the connection and reissuing the query.
-        *
-        * @return bool
-        */
-       public function wasErrorReissuable();
-
-       /**
-        * Determines if the last failure was due to the database being read-only.
-        *
-        * @return bool
-        */
-       public function wasReadOnlyError();
-
-       /**
-        * Wait for the replica DB to catch up to a given master position
-        *
-        * @param DBMasterPos $pos
-        * @param int $timeout The maximum number of seconds to wait for synchronisation
-        * @return int|null Zero if the replica DB was past that position already,
-        *   greater than zero if we waited for some period of time, less than
-        *   zero if it timed out, and null on error
-        */
-       public function masterPosWait( DBMasterPos $pos, $timeout );
-
-       /**
-        * Get the replication position of this replica DB
-        *
-        * @return DBMasterPos|bool False if this is not a replica DB.
-        */
-       public function getSlavePos();
-
-       /**
-        * Get the position of this master
-        *
-        * @return DBMasterPos|bool False if this is not a master
-        */
-       public function getMasterPos();
-
-       /**
-        * @return bool Whether the DB is marked as read-only server-side
-        * @since 1.28
-        */
-       public function serverIsReadOnly();
-
-       /**
-        * Run a callback as soon as the current transaction commits or rolls back.
-        * An error is thrown if no transaction is pending. Queries in the function will run in
-        * AUTO-COMMIT mode unless there are begin() calls. Callbacks must commit any transactions
-        * that they begin.
-        *
-        * This is useful for combining cooperative locks and DB transactions.
-        *
-        * The callback takes one argument:
-        *   - How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_ROLLBACK)
-        *
-        * @param callable $callback
-        * @return mixed
-        * @since 1.28
-        */
-       public function onTransactionResolution( callable $callback );
-
-       /**
-        * Run a callback as soon as there is no transaction pending.
-        * If there is a transaction and it is rolled back, then the callback is cancelled.
-        * Queries in the function will run in AUTO-COMMIT mode unless there are begin() calls.
-        * Callbacks must commit any transactions that they begin.
-        *
-        * This is useful for updates to different systems or when separate transactions are needed.
-        * For example, one might want to enqueue jobs into a system outside the database, but only
-        * after the database is updated so that the jobs will see the data when they actually run.
-        * It can also be used for updates that easily cause deadlocks if locks are held too long.
-        *
-        * Updates will execute in the order they were enqueued.
-        *
-        * The callback takes one argument:
-        *   - How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_IDLE)
-        *
-        * @param callable $callback
-        * @since 1.20
-        */
-       public function onTransactionIdle( callable $callback );
-
-       /**
-        * Run a callback before the current transaction commits or now if there is none.
-        * If there is a transaction and it is rolled back, then the callback is cancelled.
-        * Callbacks must not start nor commit any transactions. If no transaction is active,
-        * then a transaction will wrap the callback.
-        *
-        * This is useful for updates that easily cause deadlocks if locks are held too long
-        * but where atomicity is strongly desired for these updates and some related updates.
-        *
-        * Updates will execute in the order they were enqueued.
-        *
-        * @param callable $callback
-        * @since 1.22
-        */
-       public function onTransactionPreCommitOrIdle( callable $callback );
-
-       /**
-        * Run a callback each time any transaction commits or rolls back
-        *
-        * The callback takes two arguments:
-        *   - IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_ROLLBACK
-        *   - This IDatabase object
-        * Callbacks must commit any transactions that they begin.
-        *
-        * Registering a callback here will not affect writesOrCallbacks() pending
-        *
-        * @param string $name Callback name
-        * @param callable|null $callback Use null to unset a listener
-        * @return mixed
-        * @since 1.28
-        */
-       public function setTransactionListener( $name, callable $callback = null );
-
-       /**
-        * Begin an atomic section of statements
-        *
-        * If a transaction has been started already, just keep track of the given
-        * section name to make sure the transaction is not committed pre-maturely.
-        * This function can be used in layers (with sub-sections), so use a stack
-        * to keep track of the different atomic sections. If there is no transaction,
-        * start one implicitly.
-        *
-        * The goal of this function is to create an atomic section of SQL queries
-        * without having to start a new transaction if it already exists.
-        *
-        * Atomic sections are more strict than transactions. With transactions,
-        * attempting to begin a new transaction when one is already running results
-        * in MediaWiki issuing a brief warning and doing an implicit commit. All
-        * atomic levels *must* be explicitly closed using IDatabase::endAtomic(),
-        * and any database transactions cannot be began or committed until all atomic
-        * levels are closed. There is no such thing as implicitly opening or closing
-        * an atomic section.
-        *
-        * @since 1.23
-        * @param string $fname
-        * @throws DBError
-        */
-       public function startAtomic( $fname = __METHOD__ );
-
-       /**
-        * Ends an atomic section of SQL statements
-        *
-        * Ends the next section of atomic SQL statements and commits the transaction
-        * if necessary.
-        *
-        * @since 1.23
-        * @see IDatabase::startAtomic
-        * @param string $fname
-        * @throws DBError
-        */
-       public function endAtomic( $fname = __METHOD__ );
-
-       /**
-        * Run a callback to do an atomic set of updates for this database
-        *
-        * The $callback takes the following arguments:
-        *   - This database object
-        *   - The value of $fname
-        *
-        * If any exception occurs in the callback, then rollback() will be called and the error will
-        * be re-thrown. It may also be that the rollback itself fails with an exception before then.
-        * In any case, such errors are expected to terminate the request, without any outside caller
-        * attempting to catch errors and commit anyway. Note that any rollback undoes all prior
-        * atomic section and uncommitted updates, which trashes the current request, requiring an
-        * error to be displayed.
-        *
-        * This can be an alternative to explicit startAtomic()/endAtomic() calls.
-        *
-        * @see DatabaseBase::startAtomic
-        * @see DatabaseBase::endAtomic
-        *
-        * @param string $fname Caller name (usually __METHOD__)
-        * @param callable $callback Callback that issues DB updates
-        * @return mixed $res Result of the callback (since 1.28)
-        * @throws DBError
-        * @throws RuntimeException
-        * @throws UnexpectedValueException
-        * @since 1.27
-        */
-       public function doAtomicSection( $fname, callable $callback );
-
-       /**
-        * Begin a transaction. If a transaction is already in progress,
-        * that transaction will be committed before the new transaction is started.
-        *
-        * Only call this from code with outer transcation scope.
-        * See https://www.mediawiki.org/wiki/Database_transactions for details.
-        * Nesting of transactions is not supported.
-        *
-        * Note that when the DBO_TRX flag is set (which is usually the case for web
-        * requests, but not for maintenance scripts), any previous database query
-        * will have started a transaction automatically.
-        *
-        * Nesting of transactions is not supported. Attempts to nest transactions
-        * will cause a warning, unless the current transaction was started
-        * automatically because of the DBO_TRX flag.
-        *
-        * @param string $fname Calling function name
-        * @param string $mode A situationally valid IDatabase::TRANSACTION_* constant [optional]
-        * @throws DBError
-        */
-       public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT );
-
-       /**
-        * Commits a transaction previously started using begin().
-        * If no transaction is in progress, a warning is issued.
-        *
-        * Only call this from code with outer transcation scope.
-        * See https://www.mediawiki.org/wiki/Database_transactions for details.
-        * Nesting of transactions is not supported.
-        *
-        * @param string $fname
-        * @param string $flush Flush flag, set to situationally valid IDatabase::FLUSHING_*
-        *   constant to disable warnings about explicitly committing implicit transactions,
-        *   or calling commit when no transaction is in progress.
-        *
-        *   This will trigger an exception if there is an ongoing explicit transaction.
-        *
-        *   Only set the flush flag if you are sure that these warnings are not applicable,
-        *   and no explicit transactions are open.
-        *
-        * @throws DBUnexpectedError
-        */
-       public function commit( $fname = __METHOD__, $flush = '' );
-
-       /**
-        * Rollback a transaction previously started using begin().
-        * If no transaction is in progress, a warning is issued.
-        *
-        * Only call this from code with outer transcation scope.
-        * See https://www.mediawiki.org/wiki/Database_transactions for details.
-        * Nesting of transactions is not supported. If a serious unexpected error occurs,
-        * throwing an Exception is preferrable, using a pre-installed error handler to trigger
-        * rollback (in any case, failure to issue COMMIT will cause rollback server-side).
-        *
-        * @param string $fname Calling function name
-        * @param string $flush Flush flag, set to a situationally valid IDatabase::FLUSHING_*
-        *   constant to disable warnings about calling rollback when no transaction is in
-        *   progress. This will silently break any ongoing explicit transaction. Only set the
-        *   flush flag if you are sure that it is safe to ignore these warnings in your context.
-        * @throws DBUnexpectedError
-        * @since 1.23 Added $flush parameter
-        */
-       public function rollback( $fname = __METHOD__, $flush = '' );
-
-       /**
-        * Commit any transaction but error out if writes or callbacks are pending
-        *
-        * This is intended for clearing out REPEATABLE-READ snapshots so that callers can
-        * see a new point-in-time of the database. This is useful when one of many transaction
-        * rounds finished and significant time will pass in the script's lifetime. It is also
-        * useful to call on a replica DB after waiting on replication to catch up to the master.
-        *
-        * @param string $fname Calling function name
-        * @throws DBUnexpectedError
-        * @since 1.28
-        */
-       public function flushSnapshot( $fname = __METHOD__ );
-
-       /**
-        * List all tables on the database
-        *
-        * @param string $prefix Only show tables with this prefix, e.g. mw_
-        * @param string $fname Calling function name
-        * @throws MWException
-        * @return array
-        */
-       public function listTables( $prefix = null, $fname = __METHOD__ );
-
-       /**
-        * Convert a timestamp in one of the formats accepted by wfTimestamp()
-        * to the format used for inserting into timestamp fields in this DBMS.
-        *
-        * The result is unquoted, and needs to be passed through addQuotes()
-        * before it can be included in raw SQL.
-        *
-        * @param string|int $ts
-        *
-        * @return string
-        */
-       public function timestamp( $ts = 0 );
-
-       /**
-        * Convert a timestamp in one of the formats accepted by wfTimestamp()
-        * to the format used for inserting into timestamp fields in this DBMS. If
-        * NULL is input, it is passed through, allowing NULL values to be inserted
-        * into timestamp fields.
-        *
-        * The result is unquoted, and needs to be passed through addQuotes()
-        * before it can be included in raw SQL.
-        *
-        * @param string|int $ts
-        *
-        * @return string
-        */
-       public function timestampOrNull( $ts = null );
-
-       /**
-        * Ping the server and try to reconnect if it there is no connection
-        *
-        * @param float|null &$rtt Value to store the estimated RTT [optional]
-        * @return bool Success or failure
-        */
-       public function ping( &$rtt = null );
-
-       /**
-        * Get replica DB lag. Currently supported only by MySQL.
-        *
-        * Note that this function will generate a fatal error on many
-        * installations. Most callers should use LoadBalancer::safeGetLag()
-        * instead.
-        *
-        * @return int|bool Database replication lag in seconds or false on error
-        */
-       public function getLag();
-
-       /**
-        * Get the replica DB lag when the current transaction started
-        * or a general lag estimate if not transaction is active
-        *
-        * This is useful when transactions might use snapshot isolation
-        * (e.g. REPEATABLE-READ in innodb), so the "real" lag of that data
-        * is this lag plus transaction duration. If they don't, it is still
-        * safe to be pessimistic. In AUTO-COMMIT mode, this still gives an
-        * indication of the staleness of subsequent reads.
-        *
-        * @return array ('lag': seconds or false on error, 'since': UNIX timestamp of BEGIN)
-        * @since 1.27
-        */
-       public function getSessionLagStatus();
-
-       /**
-        * Return the maximum number of items allowed in a list, or 0 for unlimited.
-        *
-        * @return int
-        */
-       public function maxListLen();
-
-       /**
-        * Some DBMSs have a special format for inserting into blob fields, they
-        * don't allow simple quoted strings to be inserted. To insert into such
-        * a field, pass the data through this function before passing it to
-        * IDatabase::insert().
-        *
-        * @param string $b
-        * @return string
-        */
-       public function encodeBlob( $b );
-
-       /**
-        * Some DBMSs return a special placeholder object representing blob fields
-        * in result objects. Pass the object through this function to return the
-        * original string.
-        *
-        * @param string|Blob $b
-        * @return string
-        */
-       public function decodeBlob( $b );
-
-       /**
-        * Override database's default behavior. $options include:
-        *     'connTimeout' : Set the connection timeout value in seconds.
-        *                     May be useful for very long batch queries such as
-        *                     full-wiki dumps, where a single query reads out over
-        *                     hours or days.
-        *
-        * @param array $options
-        * @return void
-        */
-       public function setSessionOptions( array $options );
-
-       /**
-        * Set variables to be used in sourceFile/sourceStream, in preference to the
-        * ones in $GLOBALS. If an array is set here, $GLOBALS will not be used at
-        * all. If it's set to false, $GLOBALS will be used.
-        *
-        * @param bool|array $vars Mapping variable name to value.
-        */
-       public function setSchemaVars( $vars );
-
-       /**
-        * Check to see if a named lock is available (non-blocking)
-        *
-        * @param string $lockName Name of lock to poll
-        * @param string $method Name of method calling us
-        * @return bool
-        * @since 1.20
-        */
-       public function lockIsFree( $lockName, $method );
-
-       /**
-        * Acquire a named lock
-        *
-        * Named locks are not related to transactions
-        *
-        * @param string $lockName Name of lock to aquire
-        * @param string $method Name of the calling method
-        * @param int $timeout Acquisition timeout in seconds
-        * @return bool
-        */
-       public function lock( $lockName, $method, $timeout = 5 );
-
-       /**
-        * Release a lock
-        *
-        * Named locks are not related to transactions
-        *
-        * @param string $lockName Name of lock to release
-        * @param string $method Name of the calling method
-        *
-        * @return int Returns 1 if the lock was released, 0 if the lock was not established
-        * by this thread (in which case the lock is not released), and NULL if the named
-        * lock did not exist
-        */
-       public function unlock( $lockName, $method );
-
-       /**
-        * Acquire a named lock, flush any transaction, and return an RAII style unlocker object
-        *
-        * Only call this from outer transcation scope and when only one DB will be affected.
-        * See https://www.mediawiki.org/wiki/Database_transactions for details.
-        *
-        * This is suitiable for transactions that need to be serialized using cooperative locks,
-        * where each transaction can see each others' changes. Any transaction is flushed to clear
-        * out stale REPEATABLE-READ snapshot data. Once the returned object falls out of PHP scope,
-        * the lock will be released unless a transaction is active. If one is active, then the lock
-        * will be released when it either commits or rolls back.
-        *
-        * If the lock acquisition failed, then no transaction flush happens, and null is returned.
-        *
-        * @param string $lockKey Name of lock to release
-        * @param string $fname Name of the calling method
-        * @param int $timeout Acquisition timeout in seconds
-        * @return ScopedCallback|null
-        * @throws DBUnexpectedError
-        * @since 1.27
-        */
-       public function getScopedLockAndFlush( $lockKey, $fname, $timeout );
-
-       /**
-        * Check to see if a named lock used by lock() use blocking queues
-        *
-        * @return bool
-        * @since 1.26
-        */
-       public function namedLocksEnqueue();
-
-       /**
-        * Find out when 'infinity' is. Most DBMSes support this. This is a special
-        * keyword for timestamps in PostgreSQL, and works with CHAR(14) as well
-        * because "i" sorts after all numbers.
-        *
-        * @return string
-        */
-       public function getInfinity();
-
-       /**
-        * Encode an expiry time into the DBMS dependent format
-        *
-        * @param string $expiry Timestamp for expiry, or the 'infinity' string
-        * @return string
-        */
-       public function encodeExpiry( $expiry );
-
-       /**
-        * Decode an expiry time into a DBMS independent format
-        *
-        * @param string $expiry DB timestamp field value for expiry
-        * @param int $format TS_* constant, defaults to TS_MW
-        * @return string
-        */
-       public function decodeExpiry( $expiry, $format = TS_MW );
-
-       /**
-        * Allow or deny "big selects" for this session only. This is done by setting
-        * the sql_big_selects session variable.
-        *
-        * This is a MySQL-specific feature.
-        *
-        * @param bool|string $value True for allow, false for deny, or "default" to
-        *   restore the initial value
-        */
-       public function setBigSelects( $value = true );
-
-       /**
-        * @return bool Whether this DB is read-only
-        * @since 1.27
-        */
-       public function isReadOnly();
-}
diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php
new file mode 100644 (file)
index 0000000..bfdce39
--- /dev/null
@@ -0,0 +1,159 @@
+<?php
+/**
+ * Generator of database load balancing objects.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
+
+/**
+ * MediaWiki-specific class for generating database load balancers
+ * @ingroup Database
+ */
+abstract class MWLBFactory {
+       /**
+        * @param array $lbConf Config for LBFactory::__construct()
+        * @param Config $mainConfig Main config object from MediaWikiServices
+        * @return array
+        */
+       public static function applyDefaultConfig( array $lbConf, Config $mainConfig ) {
+               global $wgCommandLineMode;
+
+               $lbConf += [
+                       'localDomain' => new DatabaseDomain(
+                               $mainConfig->get( 'DBname' ),
+                               null,
+                               $mainConfig->get( 'DBprefix' )
+                       ),
+                       'profiler' => Profiler::instance(),
+                       'trxProfiler' => Profiler::instance()->getTransactionProfiler(),
+                       'replLogger' => LoggerFactory::getInstance( 'DBReplication' ),
+                       'queryLogger' => LoggerFactory::getInstance( 'DBQuery' ),
+                       'connLogger' => LoggerFactory::getInstance( 'DBConnection' ),
+                       'perfLogger' => LoggerFactory::getInstance( 'DBPerformance' ),
+                       'errorLogger' => [ MWExceptionHandler::class, 'logException' ],
+                       'cliMode' => $wgCommandLineMode,
+                       'hostname' => wfHostname(),
+                       // TODO: replace the global wfConfiguredReadOnlyReason() with a service.
+                       'readOnlyReason' => wfConfiguredReadOnlyReason(),
+               ];
+
+               if ( $lbConf['class'] === 'LBFactorySimple' ) {
+                       if ( isset( $lbConf['servers'] ) ) {
+                               // Server array is already explicitly configured; leave alone
+                       } elseif ( is_array( $mainConfig->get( 'DBservers' ) ) ) {
+                               foreach ( $mainConfig->get( 'DBservers' ) as $i => $server ) {
+                                       if ( $server['type'] === 'sqlite' ) {
+                                               $server += [ 'dbDirectory' => $mainConfig->get( 'SQLiteDataDir' ) ];
+                                       } elseif ( $server['type'] === 'postgres' ) {
+                                               $server += [ 'port' => $mainConfig->get( 'DBport' ) ];
+                                       }
+                                       $lbConf['servers'][$i] = $server + [
+                                               'schema' => $mainConfig->get( 'DBmwschema' ),
+                                               'tablePrefix' => $mainConfig->get( 'DBprefix' ),
+                                               'flags' => DBO_DEFAULT,
+                                               'sqlMode' => $mainConfig->get( 'SQLMode' ),
+                                               'utf8Mode' => $mainConfig->get( 'DBmysql5' )
+                                       ];
+                               }
+                       } 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' ),
+                                       'schema' => $mainConfig->get( 'DBmwschema' ),
+                                       'tablePrefix' => $mainConfig->get( 'DBprefix' ),
+                                       'type' => $mainConfig->get( 'DBtype' ),
+                                       'load' => 1,
+                                       'flags' => $flags,
+                                       'sqlMode' => $mainConfig->get( 'SQLMode' ),
+                                       'utf8Mode' => $mainConfig->get( 'DBmysql5' )
+                               ];
+                               if ( $server['type'] === 'sqlite' ) {
+                                       $server[ 'dbDirectory'] = $mainConfig->get( 'SQLiteDataDir' );
+                               } elseif ( $server['type'] === 'postgres' ) {
+                                       $server['port'] = $mainConfig->get( 'DBport' );
+                               }
+                               $lbConf['servers'] = [ $server ];
+                       }
+                       if ( !isset( $lbConf['externalClusters'] ) ) {
+                               $lbConf['externalClusters'] = $mainConfig->get( 'ExternalServers' );
+                       }
+               } elseif ( $lbConf['class'] === 'LBFactoryMulti' ) {
+                       if ( isset( $lbConf['serverTemplate'] ) ) {
+                               $lbConf['serverTemplate']['schema'] = $mainConfig->get( 'DBmwschema' );
+                               $lbConf['serverTemplate']['sqlMode'] = $mainConfig->get( 'SQLMode' );
+                               $lbConf['serverTemplate']['utf8Mode'] = $mainConfig->get( 'DBmysql5' );
+                       }
+               }
+
+               // Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804)
+               $sCache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
+               if ( $sCache->getQoS( $sCache::ATTR_EMULATION ) > $sCache::QOS_EMULATION_SQL ) {
+                       $lbConf['srvCache'] = $sCache;
+               }
+               $cCache = ObjectCache::getLocalClusterInstance();
+               if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) {
+                       $lbConf['memCache'] = $cCache;
+               }
+               $wCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+               if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) {
+                       $lbConf['wanCache'] = $wCache;
+               }
+
+               return $lbConf;
+       }
+
+       /**
+        * Returns the LBFactory class to use and the load balancer configuration.
+        *
+        * @todo instead of this, use a ServiceContainer for managing the different implementations.
+        *
+        * @param array $config (e.g. $wgLBFactoryConf)
+        * @return string Class name
+        */
+       public static function getLBFactoryClass( array $config ) {
+               // For configuration backward compatibility after removing
+               // underscores from class names in MediaWiki 1.23.
+               $bcClasses = [
+                       'LBFactory_Simple' => 'LBFactorySimple',
+                       'LBFactory_Single' => 'LBFactorySingle',
+                       'LBFactory_Multi' => 'LBFactoryMulti'
+               ];
+
+               $class = $config['class'];
+
+               if ( isset( $bcClasses[$class] ) ) {
+                       $class = $bcClasses[$class];
+                       wfDeprecated(
+                               '$wgLBFactoryConf must be updated. See RELEASE-NOTES for details',
+                               '1.23'
+                       );
+               }
+
+               return $class;
+       }
+}
diff --git a/includes/db/loadbalancer/ILoadBalancer.php b/includes/db/loadbalancer/ILoadBalancer.php
deleted file mode 100644 (file)
index 9313ccd..0000000
+++ /dev/null
@@ -1,473 +0,0 @@
-<?php
-/**
- * Database load balancing interface
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- * @author Aaron Schulz
- */
-
-/**
- * Interface for database load balancing object that manages IDatabase handles
- *
- * @todo: loosen up DB classes from MWException
- * @since 1.28
- * @ingroup Database
- */
-interface ILoadBalancer {
-       /**
-        * @param array $params Array with keys:
-        *  - servers : Required. Array of server info structures.
-        *  - loadMonitor : Name of a class used to fetch server lag and load.
-        *  - readOnlyReason : Reason the master DB is read-only if so [optional]
-        *  - waitTimeout : Maximum time to wait for replicas for consistency [optional]
-        *  - srvCache : BagOStuff object [optional]
-        *  - wanCache : WANObjectCache object [optional]
-        * @throws MWException
-        */
-       public function __construct( array $params );
-
-       /**
-        * Get the index of the reader connection, which may be a replica DB
-        * This takes into account load ratios and lag times. It should
-        * always return a consistent index during a given invocation
-        *
-        * Side effect: opens connections to databases
-        * @param string|bool $group Query group, or false for the generic reader
-        * @param string|bool $wiki Wiki ID, or false for the current wiki
-        * @throws MWException
-        * @return bool|int|string
-        */
-       public function getReaderIndex( $group = false, $wiki = false );
-
-       /**
-        * Set the master wait position
-        * If a DB_REPLICA connection has been opened already, waits
-        * Otherwise sets a variable telling it to wait if such a connection is opened
-        * @param DBMasterPos $pos
-        */
-       public function waitFor( $pos );
-
-       /**
-        * Set the master wait position and wait for a "generic" replica DB to catch up to it
-        *
-        * This can be used a faster proxy for waitForAll()
-        *
-        * @param DBMasterPos $pos
-        * @param int $timeout Max seconds to wait; default is mWaitTimeout
-        * @return bool Success (able to connect and no timeouts reached)
-        */
-       public function waitForOne( $pos, $timeout = null );
-
-       /**
-        * Set the master wait position and wait for ALL replica DBs to catch up to it
-        * @param DBMasterPos $pos
-        * @param int $timeout Max seconds to wait; default is mWaitTimeout
-        * @return bool Success (able to connect and no timeouts reached)
-        */
-       public function waitForAll( $pos, $timeout = null );
-
-       /**
-        * Get any open connection to a given server index, local or foreign
-        * Returns false if there is no connection open
-        *
-        * @param int $i Server index
-        * @return IDatabase|bool False on failure
-        */
-       public function getAnyOpenConnection( $i );
-
-       /**
-        * Get a connection by index
-        * This is the main entry point for this class.
-        *
-        * @param int $i Server index
-        * @param array|string|bool $groups Query group(s), or false for the generic reader
-        * @param string|bool $wiki Wiki ID, or false for the current wiki
-        *
-        * @throws MWException
-        * @return IDatabase
-        */
-       public function getConnection( $i, $groups = [], $wiki = false );
-
-       /**
-        * Mark a foreign connection as being available for reuse under a different
-        * DB name or prefix. This mechanism is reference-counted, and must be called
-        * the same number of times as getConnection() to work.
-        *
-        * @param IDatabase $conn
-        * @throws MWException
-        */
-       public function reuseConnection( $conn );
-
-       /**
-        * Get a database connection handle reference
-        *
-        * The handle's methods wrap simply wrap those of a IDatabase handle
-        *
-        * @see LoadBalancer::getConnection() for parameter information
-        *
-        * @param int $db
-        * @param array|string|bool $groups Query group(s), or false for the generic reader
-        * @param string|bool $wiki Wiki ID, or false for the current wiki
-        * @return DBConnRef
-        */
-       public function getConnectionRef( $db, $groups = [], $wiki = false );
-
-       /**
-        * Get a database connection handle reference without connecting yet
-        *
-        * The handle's methods wrap simply wrap those of a IDatabase handle
-        *
-        * @see LoadBalancer::getConnection() for parameter information
-        *
-        * @param int $db
-        * @param array|string|bool $groups Query group(s), or false for the generic reader
-        * @param string|bool $wiki Wiki ID, or false for the current wiki
-        * @return DBConnRef
-        */
-       public function getLazyConnectionRef( $db, $groups = [], $wiki = false );
-
-       /**
-        * Open a connection to the server given by the specified index
-        * Index must be an actual index into the array.
-        * If the server is already open, returns it.
-        *
-        * On error, returns false, and the connection which caused the
-        * error will be available via $this->mErrorConnection.
-        *
-        * @note If disable() was called on this LoadBalancer, this method will throw a DBAccessError.
-        *
-        * @param int $i Server index
-        * @param string|bool $wiki Wiki ID, or false for the current wiki
-        * @return IDatabase|bool Returns false on errors
-        */
-       public function openConnection( $i, $wiki = false );
-
-       /**
-        * @return int
-        */
-       public function getWriterIndex();
-
-       /**
-        * Returns true if the specified index is a valid server index
-        *
-        * @param string $i
-        * @return bool
-        */
-       public function haveIndex( $i );
-
-       /**
-        * Returns true if the specified index is valid and has non-zero load
-        *
-        * @param string $i
-        * @return bool
-        */
-       public function isNonZeroLoad( $i );
-
-       /**
-        * Get the number of defined servers (not the number of open connections)
-        *
-        * @return int
-        */
-       public function getServerCount();
-
-       /**
-        * Get the host name or IP address of the server with the specified index
-        * Prefer a readable name if available.
-        * @param string $i
-        * @return string
-        */
-       public function getServerName( $i );
-
-       /**
-        * Return the server info structure for a given index, or false if the index is invalid.
-        * @param int $i
-        * @return array|bool
-        */
-       public function getServerInfo( $i );
-
-       /**
-        * Sets the server info structure for the given index. Entry at index $i
-        * is created if it doesn't exist
-        * @param int $i
-        * @param array $serverInfo
-        */
-       public function setServerInfo( $i, array $serverInfo );
-
-       /**
-        * Get the current master position for chronology control purposes
-        * @return DBMasterPos|bool Returns false if not applicable
-        */
-       public function getMasterPos();
-
-       /**
-        * Disable this load balancer. All connections are closed, and any attempt to
-        * open a new connection will result in a DBAccessError.
-        */
-       public function disable();
-
-       /**
-        * Close all open connections
-        */
-       public function closeAll();
-
-       /**
-        * Close a connection
-        *
-        * Using this function makes sure the LoadBalancer knows the connection is closed.
-        * If you use $conn->close() directly, the load balancer won't update its state.
-        *
-        * @param IDatabase $conn
-        */
-       public function closeConnection( IDatabase $conn );
-
-       /**
-        * Commit transactions on all open connections
-        * @param string $fname Caller name
-        * @throws DBExpectedError
-        */
-       public function commitAll( $fname = __METHOD__ );
-
-       /**
-        * Perform all pre-commit callbacks that remain part of the atomic transactions
-        * and disable any post-commit callbacks until runMasterPostTrxCallbacks()
-        *
-        * Use this only for mutli-database commits
-        */
-       public function finalizeMasterChanges();
-
-       /**
-        * Perform all pre-commit checks for things like replication safety
-        *
-        * Use this only for mutli-database commits
-        *
-        * @param array $options Includes:
-        *   - maxWriteDuration : max write query duration time in seconds
-        * @throws DBTransactionError
-        */
-       public function approveMasterChanges( array $options );
-
-       /**
-        * Flush any master transaction snapshots and set DBO_TRX (if DBO_DEFAULT is set)
-        *
-        * The DBO_TRX setting will be reverted to the default in each of these methods:
-        *   - commitMasterChanges()
-        *   - rollbackMasterChanges()
-        *   - commitAll()
-        * This allows for custom transaction rounds from any outer transaction scope.
-        *
-        * @param string $fname
-        * @throws DBExpectedError
-        */
-       public function beginMasterChanges( $fname = __METHOD__ );
-
-       /**
-        * Issue COMMIT on all master connections where writes where done
-        * @param string $fname Caller name
-        * @throws DBExpectedError
-        */
-       public function commitMasterChanges( $fname = __METHOD__ );
-
-       /**
-        * Issue all pending post-COMMIT/ROLLBACK callbacks
-        *
-        * Use this only for mutli-database commits
-        *
-        * @param integer $type IDatabase::TRIGGER_* constant
-        * @return Exception|null The first exception or null if there were none
-        */
-       public function runMasterPostTrxCallbacks( $type );
-
-       /**
-        * Issue ROLLBACK only on master, only if queries were done on connection
-        * @param string $fname Caller name
-        * @throws DBExpectedError
-        */
-       public function rollbackMasterChanges( $fname = __METHOD__ );
-
-       /**
-        * Suppress all pending post-COMMIT/ROLLBACK callbacks
-        *
-        * Use this only for mutli-database commits
-        *
-        * @return Exception|null The first exception or null if there were none
-        */
-       public function suppressTransactionEndCallbacks();
-
-       /**
-        * Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshot
-        *
-        * @param string $fname Caller name
-        */
-       public function flushReplicaSnapshots( $fname = __METHOD__ );
-
-       /**
-        * @return bool Whether a master connection is already open
-        */
-       public function hasMasterConnection();
-
-       /**
-        * Determine if there are pending changes in a transaction by this thread
-        * @return bool
-        */
-       public function hasMasterChanges();
-
-       /**
-        * Get the timestamp of the latest write query done by this thread
-        * @return float|bool UNIX timestamp or false
-        */
-       public function lastMasterChangeTimestamp();
-
-       /**
-        * Check if this load balancer object had any recent or still
-        * pending writes issued against it by this PHP thread
-        *
-        * @param float $age How many seconds ago is "recent" [defaults to mWaitTimeout]
-        * @return bool
-        */
-       public function hasOrMadeRecentMasterChanges( $age = null );
-
-       /**
-        * Get the list of callers that have pending master changes
-        *
-        * @return string[] List of method names
-        */
-       public function pendingMasterChangeCallers();
-
-       /**
-        * @note This method will trigger a DB connection if not yet done
-        * @param string|bool $wiki Wiki ID, or false for the current wiki
-        * @return bool Whether the generic connection for reads is highly "lagged"
-        */
-       public function getLaggedReplicaMode( $wiki = false );
-
-       /**
-        * @note This method will never cause a new DB connection
-        * @return bool Whether any generic connection used for reads was highly "lagged"
-        */
-       public function laggedReplicaUsed();
-
-       /**
-        * @note This method may trigger a DB connection if not yet done
-        * @param string|bool $wiki Wiki ID, or false for the current wiki
-        * @param IDatabase|null DB master connection; used to avoid loops [optional]
-        * @return string|bool Reason the master is read-only or false if it is not
-        */
-       public function getReadOnlyReason( $wiki = false, IDatabase $conn = null );
-
-       /**
-        * Disables/enables lag checks
-        * @param null|bool $mode
-        * @return bool
-        */
-       public function allowLagged( $mode = null );
-
-       /**
-        * @return bool
-        */
-       public function pingAll();
-
-       /**
-        * Call a function with each open connection object
-        * @param callable $callback
-        * @param array $params
-        */
-       public function forEachOpenConnection( $callback, array $params = [] );
-
-       /**
-        * Call a function with each open connection object to a master
-        * @param callable $callback
-        * @param array $params
-        */
-       public function forEachOpenMasterConnection( $callback, array $params = [] );
-
-       /**
-        * Call a function with each open replica DB connection object
-        * @param callable $callback
-        * @param array $params
-        */
-       public function forEachOpenReplicaConnection( $callback, array $params = [] );
-
-       /**
-        * Get the hostname and lag time of the most-lagged replica DB
-        *
-        * This is useful for maintenance scripts that need to throttle their updates.
-        * May attempt to open connections to replica DBs on the default DB. If there is
-        * no lag, the maximum lag will be reported as -1.
-        *
-        * @param bool|string $wiki Wiki ID, or false for the default database
-        * @return array ( host, max lag, index of max lagged host )
-        */
-       public function getMaxLag( $wiki = false );
-
-       /**
-        * Get an estimate of replication lag (in seconds) for each server
-        *
-        * Results are cached for a short time in memcached/process cache
-        *
-        * Values may be "false" if replication is too broken to estimate
-        *
-        * @param string|bool $wiki
-        * @return int[] Map of (server index => float|int|bool)
-        */
-       public function getLagTimes( $wiki = false );
-
-       /**
-        * Get the lag in seconds for a given connection, or zero if this load
-        * balancer does not have replication enabled.
-        *
-        * This should be used in preference to Database::getLag() in cases where
-        * replication may not be in use, since there is no way to determine if
-        * replication is in use at the connection level without running
-        * potentially restricted queries such as SHOW SLAVE STATUS. Using this
-        * function instead of Database::getLag() avoids a fatal error in this
-        * case on many installations.
-        *
-        * @param IDatabase $conn
-        * @return int|bool Returns false on error
-        */
-       public function safeGetLag( IDatabase $conn );
-
-       /**
-        * Wait for a replica DB to reach a specified master position
-        *
-        * This will connect to the master to get an accurate position if $pos is not given
-        *
-        * @param IDatabase $conn Replica DB
-        * @param DBMasterPos|bool $pos Master position; default: current position
-        * @param integer|null $timeout Timeout in seconds [optional]
-        * @return bool Success
-        */
-       public function safeWaitForMasterPos( IDatabase $conn, $pos = false, $timeout = null );
-
-       /**
-        * Clear the cache for slag lag delay times
-        *
-        * This is only used for testing
-        */
-       public function clearLagTimeCache();
-
-       /**
-        * Set a callback via IDatabase::setTransactionListener() on
-        * all current and future master connections of this load balancer
-        *
-        * @param string $name Callback name
-        * @param callable|null $callback
-        */
-       public function setTransactionListener( $name, callable $callback = null );
-}
diff --git a/includes/db/loadbalancer/LBFactory.php b/includes/db/loadbalancer/LBFactory.php
deleted file mode 100644 (file)
index 5115fbe..0000000
+++ /dev/null
@@ -1,715 +0,0 @@
-<?php
-/**
- * Generator of database load balancing objects.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-use Psr\Log\LoggerInterface;
-use MediaWiki\MediaWikiServices;
-use MediaWiki\Services\DestructibleService;
-use MediaWiki\Logger\LoggerFactory;
-
-/**
- * An interface for generating database load balancers
- * @ingroup Database
- */
-abstract class LBFactory implements DestructibleService {
-       /** @var ChronologyProtector */
-       protected $chronProt;
-       /** @var TransactionProfiler */
-       protected $trxProfiler;
-       /** @var LoggerInterface */
-       protected $trxLogger;
-       /** @var LoggerInterface */
-       protected $replLogger;
-       /** @var BagOStuff */
-       protected $srvCache;
-       /** @var BagOStuff */
-       protected $memCache;
-       /** @var WANObjectCache */
-       protected $wanCache;
-
-       /** @var mixed */
-       protected $ticket;
-       /** @var string|bool String if a requested DBO_TRX transaction round is active */
-       protected $trxRoundId = false;
-       /** @var string|bool Reason all LBs are read-only or false if not */
-       protected $readOnlyReason = false;
-       /** @var callable[] */
-       protected $replicationWaitCallbacks = [];
-
-       const SHUTDOWN_NO_CHRONPROT = 0; // don't save DB positions at all
-       const SHUTDOWN_CHRONPROT_ASYNC = 1; // save DB positions, but don't wait on remote DCs
-       const SHUTDOWN_CHRONPROT_SYNC = 2; // save DB positions, waiting on all DCs
-
-       /**
-        * Construct a factory based on a configuration array (typically from $wgLBFactoryConf)
-        * @param array $conf
-        * @TODO: inject objects via dependency framework
-        */
-       public function __construct( array $conf ) {
-               if ( isset( $conf['readOnlyReason'] ) && is_string( $conf['readOnlyReason'] ) ) {
-                       $this->readOnlyReason = $conf['readOnlyReason'];
-               }
-               $this->chronProt = $this->newChronologyProtector();
-               $this->trxProfiler = Profiler::instance()->getTransactionProfiler();
-               // Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804)
-               $sCache = ObjectCache::getLocalServerInstance();
-               if ( $sCache->getQoS( $sCache::ATTR_EMULATION ) > $sCache::QOS_EMULATION_SQL ) {
-                       $this->srvCache = $sCache;
-               } else {
-                       $this->srvCache = new EmptyBagOStuff();
-               }
-               $cCache = ObjectCache::getLocalClusterInstance();
-               if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) {
-                       $this->memCache = $cCache;
-               } else {
-                       $this->memCache = new EmptyBagOStuff();
-               }
-               $wCache = ObjectCache::getMainWANInstance();
-               if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) {
-                       $this->wanCache = $wCache;
-               } else {
-                       $this->wanCache = WANObjectCache::newEmpty();
-               }
-               $this->trxLogger = LoggerFactory::getInstance( 'DBTransaction' );
-               $this->replLogger = LoggerFactory::getInstance( 'DBReplication' );
-               $this->ticket = mt_rand();
-       }
-
-       /**
-        * Disables all load balancers. All connections are closed, and any attempt to
-        * open a new connection will result in a DBAccessError.
-        * @see LoadBalancer::disable()
-        */
-       public function destroy() {
-               $this->shutdown( self::SHUTDOWN_NO_CHRONPROT );
-               $this->forEachLBCallMethod( 'disable' );
-       }
-
-       /**
-        * Disables all access to the load balancer, will cause all database access
-        * to throw a DBAccessError
-        */
-       public static function disableBackend() {
-               MediaWikiServices::disableStorageBackend();
-       }
-
-       /**
-        * Get an LBFactory instance
-        *
-        * @deprecated since 1.27, use MediaWikiServices::getDBLoadBalancerFactory() instead.
-        *
-        * @return LBFactory
-        */
-       public static function singleton() {
-               return MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-       }
-
-       /**
-        * Returns the LBFactory class to use and the load balancer configuration.
-        *
-        * @todo instead of this, use a ServiceContainer for managing the different implementations.
-        *
-        * @param array $config (e.g. $wgLBFactoryConf)
-        * @return string Class name
-        */
-       public static function getLBFactoryClass( array $config ) {
-               // For configuration backward compatibility after removing
-               // underscores from class names in MediaWiki 1.23.
-               $bcClasses = [
-                       'LBFactory_Simple' => 'LBFactorySimple',
-                       'LBFactory_Single' => 'LBFactorySingle',
-                       'LBFactory_Multi' => 'LBFactoryMulti',
-                       'LBFactory_Fake' => 'LBFactoryFake',
-               ];
-
-               $class = $config['class'];
-
-               if ( isset( $bcClasses[$class] ) ) {
-                       $class = $bcClasses[$class];
-                       wfDeprecated(
-                               '$wgLBFactoryConf must be updated. See RELEASE-NOTES for details',
-                               '1.23'
-                       );
-               }
-
-               return $class;
-       }
-
-       /**
-        * Shut down, close connections and destroy the cached instance.
-        *
-        * @deprecated since 1.27, use LBFactory::destroy()
-        */
-       public static function destroyInstance() {
-               MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->destroy();
-       }
-
-       /**
-        * Create a new load balancer object. The resulting object will be untracked,
-        * not chronology-protected, and the caller is responsible for cleaning it up.
-        *
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancer
-        */
-       abstract public function newMainLB( $wiki = false );
-
-       /**
-        * Get a cached (tracked) load balancer object.
-        *
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancer
-        */
-       abstract public function getMainLB( $wiki = false );
-
-       /**
-        * Create a new load balancer for external storage. The resulting object will be
-        * untracked, not chronology-protected, and the caller is responsible for
-        * cleaning it up.
-        *
-        * @param string $cluster External storage cluster, or false for core
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancer
-        */
-       abstract protected function newExternalLB( $cluster, $wiki = false );
-
-       /**
-        * Get a cached (tracked) load balancer for external storage
-        *
-        * @param string $cluster External storage cluster, or false for core
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancer
-        */
-       abstract public function getExternalLB( $cluster, $wiki = false );
-
-       /**
-        * Execute a function for each tracked load balancer
-        * The callback is called with the load balancer as the first parameter,
-        * and $params passed as the subsequent parameters.
-        *
-        * @param callable $callback
-        * @param array $params
-        */
-       abstract public function forEachLB( $callback, array $params = [] );
-
-       /**
-        * Prepare all tracked load balancers for shutdown
-        * @param integer $mode One of the class SHUTDOWN_* constants
-        * @param callable|null $workCallback Work to mask ChronologyProtector writes
-        */
-       public function shutdown(
-               $mode = self::SHUTDOWN_CHRONPROT_SYNC, callable $workCallback = null
-       ) {
-               if ( $mode === self::SHUTDOWN_CHRONPROT_SYNC ) {
-                       $this->shutdownChronologyProtector( $this->chronProt, $workCallback, 'sync' );
-               } elseif ( $mode === self::SHUTDOWN_CHRONPROT_ASYNC ) {
-                       $this->shutdownChronologyProtector( $this->chronProt, null, 'async' );
-               }
-
-               $this->commitMasterChanges( __METHOD__ ); // sanity
-       }
-
-       /**
-        * Call a method of each tracked load balancer
-        *
-        * @param string $methodName
-        * @param array $args
-        */
-       private function forEachLBCallMethod( $methodName, array $args = [] ) {
-               $this->forEachLB(
-                       function ( LoadBalancer $loadBalancer, $methodName, array $args ) {
-                               call_user_func_array( [ $loadBalancer, $methodName ], $args );
-                       },
-                       [ $methodName, $args ]
-               );
-       }
-
-       /**
-        * Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshot
-        *
-        * @param string $fname Caller name
-        * @since 1.28
-        */
-       public function flushReplicaSnapshots( $fname = __METHOD__ ) {
-               $this->forEachLBCallMethod( 'flushReplicaSnapshots', [ $fname ] );
-       }
-
-       /**
-        * Commit on all connections. Done for two reasons:
-        * 1. To commit changes to the masters.
-        * 2. To release the snapshot on all connections, master and replica DB.
-        * @param string $fname Caller name
-        * @param array $options Options map:
-        *   - maxWriteDuration: abort if more than this much time was spent in write queries
-        */
-       public function commitAll( $fname = __METHOD__, array $options = [] ) {
-               $this->commitMasterChanges( $fname, $options );
-               $this->forEachLBCallMethod( 'commitAll', [ $fname ] );
-       }
-
-       /**
-        * Flush any master transaction snapshots and set DBO_TRX (if DBO_DEFAULT is set)
-        *
-        * The DBO_TRX setting will be reverted to the default in each of these methods:
-        *   - commitMasterChanges()
-        *   - rollbackMasterChanges()
-        *   - commitAll()
-        *
-        * This allows for custom transaction rounds from any outer transaction scope.
-        *
-        * @param string $fname
-        * @throws DBTransactionError
-        * @since 1.28
-        */
-       public function beginMasterChanges( $fname = __METHOD__ ) {
-               if ( $this->trxRoundId !== false ) {
-                       throw new DBTransactionError(
-                               null,
-                               "$fname: transaction round '{$this->trxRoundId}' already started."
-                       );
-               }
-               $this->trxRoundId = $fname;
-               // Set DBO_TRX flags on all appropriate DBs
-               $this->forEachLBCallMethod( 'beginMasterChanges', [ $fname ] );
-       }
-
-       /**
-        * Commit changes on all master connections
-        * @param string $fname Caller name
-        * @param array $options Options map:
-        *   - maxWriteDuration: abort if more than this much time was spent in write queries
-        * @throws Exception
-        */
-       public function commitMasterChanges( $fname = __METHOD__, array $options = [] ) {
-               if ( $this->trxRoundId !== false && $this->trxRoundId !== $fname ) {
-                       throw new DBTransactionError(
-                               null,
-                               "$fname: transaction round '{$this->trxRoundId}' still running."
-                       );
-               }
-               // Run pre-commit callbacks and suppress post-commit callbacks, aborting on failure
-               $this->forEachLBCallMethod( 'finalizeMasterChanges' );
-               $this->trxRoundId = false;
-               // Perform pre-commit checks, aborting on failure
-               $this->forEachLBCallMethod( 'approveMasterChanges', [ $options ] );
-               // Log the DBs and methods involved in multi-DB transactions
-               $this->logIfMultiDbTransaction();
-               // Actually perform the commit on all master DB connections and revert DBO_TRX
-               $this->forEachLBCallMethod( 'commitMasterChanges', [ $fname ] );
-               // Run all post-commit callbacks
-               /** @var Exception $e */
-               $e = null; // first callback exception
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$e ) {
-                       $ex = $lb->runMasterPostTrxCallbacks( IDatabase::TRIGGER_COMMIT );
-                       $e = $e ?: $ex;
-               } );
-               // Commit any dangling DBO_TRX transactions from callbacks on one DB to another DB
-               $this->forEachLBCallMethod( 'commitMasterChanges', [ $fname ] );
-               // Throw any last post-commit callback error
-               if ( $e instanceof Exception ) {
-                       throw $e;
-               }
-       }
-
-       /**
-        * Rollback changes on all master connections
-        * @param string $fname Caller name
-        * @since 1.23
-        */
-       public function rollbackMasterChanges( $fname = __METHOD__ ) {
-               $this->trxRoundId = false;
-               $this->forEachLBCallMethod( 'suppressTransactionEndCallbacks' );
-               $this->forEachLBCallMethod( 'rollbackMasterChanges', [ $fname ] );
-               // Run all post-rollback callbacks
-               $this->forEachLB( function ( LoadBalancer $lb ) {
-                       $lb->runMasterPostTrxCallbacks( IDatabase::TRIGGER_ROLLBACK );
-               } );
-       }
-
-       /**
-        * Log query info if multi DB transactions are going to be committed now
-        */
-       private function logIfMultiDbTransaction() {
-               $callersByDB = [];
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$callersByDB ) {
-                       $masterName = $lb->getServerName( $lb->getWriterIndex() );
-                       $callers = $lb->pendingMasterChangeCallers();
-                       if ( $callers ) {
-                               $callersByDB[$masterName] = $callers;
-                       }
-               } );
-
-               if ( count( $callersByDB ) >= 2 ) {
-                       $dbs = implode( ', ', array_keys( $callersByDB ) );
-                       $msg = "Multi-DB transaction [{$dbs}]:\n";
-                       foreach ( $callersByDB as $db => $callers ) {
-                               $msg .= "$db: " . implode( '; ', $callers ) . "\n";
-                       }
-                       $this->trxLogger->info( $msg );
-               }
-       }
-
-       /**
-        * Determine if any master connection has pending changes
-        * @return bool
-        * @since 1.23
-        */
-       public function hasMasterChanges() {
-               $ret = false;
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$ret ) {
-                       $ret = $ret || $lb->hasMasterChanges();
-               } );
-
-               return $ret;
-       }
-
-       /**
-        * Detemine if any lagged replica DB connection was used
-        * @return bool
-        * @since 1.28
-        */
-       public function laggedReplicaUsed() {
-               $ret = false;
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$ret ) {
-                       $ret = $ret || $lb->laggedReplicaUsed();
-               } );
-
-               return $ret;
-       }
-
-       /**
-        * @return bool
-        * @since 1.27
-        * @deprecated Since 1.28; use laggedReplicaUsed()
-        */
-       public function laggedSlaveUsed() {
-               return $this->laggedReplicaUsed();
-       }
-
-       /**
-        * Determine if any master connection has pending/written changes from this request
-        * @param float $age How many seconds ago is "recent" [defaults to LB lag wait timeout]
-        * @return bool
-        * @since 1.27
-        */
-       public function hasOrMadeRecentMasterChanges( $age = null ) {
-               $ret = false;
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( $age, &$ret ) {
-                       $ret = $ret || $lb->hasOrMadeRecentMasterChanges( $age );
-               } );
-               return $ret;
-       }
-
-       /**
-        * Waits for the replica DBs to catch up to the current master position
-        *
-        * Use this when updating very large numbers of rows, as in maintenance scripts,
-        * to avoid causing too much lag. Of course, this is a no-op if there are no replica DBs.
-        *
-        * By default this waits on all DB clusters actually used in this request.
-        * This makes sense when lag being waiting on is caused by the code that does this check.
-        * In that case, setting "ifWritesSince" can avoid the overhead of waiting for clusters
-        * that were not changed since the last wait check. To forcefully wait on a specific cluster
-        * for a given wiki, use the 'wiki' parameter. To forcefully wait on an "external" cluster,
-        * use the "cluster" parameter.
-        *
-        * Never call this function after a large DB write that is *still* in a transaction.
-        * It only makes sense to call this after the possible lag inducing changes were committed.
-        *
-        * @param array $opts Optional fields that include:
-        *   - wiki : wait on the load balancer DBs that handles the given wiki
-        *   - cluster : wait on the given external load balancer DBs
-        *   - timeout : Max wait time. Default: ~60 seconds
-        *   - ifWritesSince: Only wait if writes were done since this UNIX timestamp
-        * @throws DBReplicationWaitError If a timeout or error occured waiting on a DB cluster
-        * @since 1.27
-        */
-       public function waitForReplication( array $opts = [] ) {
-               $opts += [
-                       'wiki' => false,
-                       'cluster' => false,
-                       'timeout' => 60,
-                       'ifWritesSince' => null
-               ];
-
-               // Figure out which clusters need to be checked
-               /** @var LoadBalancer[] $lbs */
-               $lbs = [];
-               if ( $opts['cluster'] !== false ) {
-                       $lbs[] = $this->getExternalLB( $opts['cluster'] );
-               } elseif ( $opts['wiki'] !== false ) {
-                       $lbs[] = $this->getMainLB( $opts['wiki'] );
-               } else {
-                       $this->forEachLB( function ( LoadBalancer $lb ) use ( &$lbs ) {
-                               $lbs[] = $lb;
-                       } );
-                       if ( !$lbs ) {
-                               return; // nothing actually used
-                       }
-               }
-
-               // Get all the master positions of applicable DBs right now.
-               // This can be faster since waiting on one cluster reduces the
-               // time needed to wait on the next clusters.
-               $masterPositions = array_fill( 0, count( $lbs ), false );
-               foreach ( $lbs as $i => $lb ) {
-                       if ( $lb->getServerCount() <= 1 ) {
-                               // Bug 27975 - Don't try to wait for replica DBs if there are none
-                               // Prevents permission error when getting master position
-                               continue;
-                       } elseif ( $opts['ifWritesSince']
-                               && $lb->lastMasterChangeTimestamp() < $opts['ifWritesSince']
-                       ) {
-                               continue; // no writes since the last wait
-                       }
-                       $masterPositions[$i] = $lb->getMasterPos();
-               }
-
-               // Run any listener callbacks *after* getting the DB positions. The more
-               // time spent in the callbacks, the less time is spent in waitForAll().
-               foreach ( $this->replicationWaitCallbacks as $callback ) {
-                       $callback();
-               }
-
-               $failed = [];
-               foreach ( $lbs as $i => $lb ) {
-                       if ( $masterPositions[$i] ) {
-                               // The DBMS may not support getMasterPos() or the whole
-                               // load balancer might be fake (e.g. $wgAllDBsAreLocalhost).
-                               if ( !$lb->waitForAll( $masterPositions[$i], $opts['timeout'] ) ) {
-                                       $failed[] = $lb->getServerName( $lb->getWriterIndex() );
-                               }
-                       }
-               }
-
-               if ( $failed ) {
-                       throw new DBReplicationWaitError(
-                               "Could not wait for replica DBs to catch up to " .
-                               implode( ', ', $failed )
-                       );
-               }
-       }
-
-       /**
-        * Add a callback to be run in every call to waitForReplication() before waiting
-        *
-        * Callbacks must clear any transactions that they start
-        *
-        * @param string $name Callback name
-        * @param callable|null $callback Use null to unset a callback
-        * @since 1.28
-        */
-       public function setWaitForReplicationListener( $name, callable $callback = null ) {
-               if ( $callback ) {
-                       $this->replicationWaitCallbacks[$name] = $callback;
-               } else {
-                       unset( $this->replicationWaitCallbacks[$name] );
-               }
-       }
-
-       /**
-        * Get a token asserting that no transaction writes are active
-        *
-        * @param string $fname Caller name (e.g. __METHOD__)
-        * @return mixed A value to pass to commitAndWaitForReplication()
-        * @since 1.28
-        */
-       public function getEmptyTransactionTicket( $fname ) {
-               if ( $this->hasMasterChanges() ) {
-                       $this->trxLogger->error( __METHOD__ . ": $fname does not have outer scope." );
-                       return null;
-               }
-
-               return $this->ticket;
-       }
-
-       /**
-        * Convenience method for safely running commitMasterChanges()/waitForReplication()
-        *
-        * This will commit and wait unless $ticket indicates it is unsafe to do so
-        *
-        * @param string $fname Caller name (e.g. __METHOD__)
-        * @param mixed $ticket Result of getEmptyTransactionTicket()
-        * @param array $opts Options to waitForReplication()
-        * @throws DBReplicationWaitError
-        * @since 1.28
-        */
-       public function commitAndWaitForReplication( $fname, $ticket, array $opts = [] ) {
-               if ( $ticket !== $this->ticket ) {
-                       $logger = LoggerFactory::getInstance( 'DBPerformance' );
-                       $logger->error( __METHOD__ . ": cannot commit; $fname does not have outer scope." );
-                       return;
-               }
-
-               // The transaction owner and any caller with the empty transaction ticket can commit
-               // so that getEmptyTransactionTicket() callers don't risk seeing DBTransactionError.
-               if ( $this->trxRoundId !== false && $fname !== $this->trxRoundId ) {
-                       $this->trxLogger->info( "$fname: committing on behalf of {$this->trxRoundId}." );
-                       $fnameEffective = $this->trxRoundId;
-               } else {
-                       $fnameEffective = $fname;
-               }
-
-               $this->commitMasterChanges( $fnameEffective );
-               $this->waitForReplication( $opts );
-               // If a nested caller committed on behalf of $fname, start another empty $fname
-               // transaction, leaving the caller with the same empty transaction state as before.
-               if ( $fnameEffective !== $fname ) {
-                       $this->beginMasterChanges( $fnameEffective );
-               }
-       }
-
-       /**
-        * @param string $dbName DB master name (e.g. "db1052")
-        * @return float|bool UNIX timestamp when client last touched the DB or false if not recent
-        * @since 1.28
-        */
-       public function getChronologyProtectorTouched( $dbName ) {
-               return $this->chronProt->getTouched( $dbName );
-       }
-
-       /**
-        * Disable the ChronologyProtector for all load balancers
-        *
-        * This can be called at the start of special API entry points
-        *
-        * @since 1.27
-        */
-       public function disableChronologyProtection() {
-               $this->chronProt->setEnabled( false );
-       }
-
-       /**
-        * @return ChronologyProtector
-        */
-       protected function newChronologyProtector() {
-               $request = RequestContext::getMain()->getRequest();
-               $chronProt = new ChronologyProtector(
-                       ObjectCache::getMainStashInstance(),
-                       [
-                               'ip' => $request->getIP(),
-                               'agent' => $request->getHeader( 'User-Agent' ),
-                       ],
-                       $request->getFloat( 'cpPosTime', $request->getCookie( 'cpPosTime', '' ) )
-               );
-               if ( PHP_SAPI === 'cli' ) {
-                       $chronProt->setEnabled( false );
-               } elseif ( $request->getHeader( 'ChronologyProtection' ) === 'false' ) {
-                       // Request opted out of using position wait logic. This is useful for requests
-                       // done by the job queue or background ETL that do not have a meaningful session.
-                       $chronProt->setWaitEnabled( false );
-               }
-
-               return $chronProt;
-       }
-
-       /**
-        * Get and record all of the staged DB positions into persistent memory storage
-        *
-        * @param ChronologyProtector $cp
-        * @param callable|null $workCallback Work to do instead of waiting on syncing positions
-        * @param string $mode One of (sync, async); whether to wait on remote datacenters
-        */
-       protected function shutdownChronologyProtector(
-               ChronologyProtector $cp, $workCallback, $mode
-       ) {
-               // Record all the master positions needed
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( $cp ) {
-                       $cp->shutdownLB( $lb );
-               } );
-               // Write them to the persistent stash. Try to do something useful by running $work
-               // while ChronologyProtector waits for the stash write to replicate to all DCs.
-               $unsavedPositions = $cp->shutdown( $workCallback, $mode );
-               if ( $unsavedPositions && $workCallback ) {
-                       // Invoke callback in case it did not cache the result yet
-                       $workCallback(); // work now to block for less time in waitForAll()
-               }
-               // If the positions failed to write to the stash, at least wait on local datacenter
-               // replica DBs to catch up before responding. Even if there are several DCs, this increases
-               // the chance that the user will see their own changes immediately afterwards. As long
-               // as the sticky DC cookie applies (same domain), this is not even an issue.
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( $unsavedPositions ) {
-                       $masterName = $lb->getServerName( $lb->getWriterIndex() );
-                       if ( isset( $unsavedPositions[$masterName] ) ) {
-                               $lb->waitForAll( $unsavedPositions[$masterName] );
-                       }
-               } );
-       }
-
-       /**
-        * Base parameters to LoadBalancer::__construct()
-        * @return array
-        */
-       final protected function baseLoadBalancerParams() {
-               return [
-                       'localDomain' => wfWikiID(),
-                       'readOnlyReason' => $this->readOnlyReason,
-                       'srvCache' => $this->srvCache,
-                       'memCache' => $this->memCache,
-                       'wanCache' => $this->wanCache,
-                       'trxProfiler' => $this->trxProfiler,
-                       'queryLogger' => LoggerFactory::getInstance( 'DBQuery' ),
-                       'connLogger' => LoggerFactory::getInstance( 'DBConnection' ),
-                       'replLogger' => LoggerFactory::getInstance( 'DBReplication' ),
-                       'errorLogger' => [ MWExceptionHandler::class, 'logException' ]
-               ];
-       }
-
-       /**
-        * @param LoadBalancer $lb
-        */
-       protected function initLoadBalancer( LoadBalancer $lb ) {
-               if ( $this->trxRoundId !== false ) {
-                       $lb->beginMasterChanges( $this->trxRoundId ); // set DBO_TRX
-               }
-       }
-
-       /**
-        * Append ?cpPosTime parameter to a URL for ChronologyProtector purposes if needed
-        *
-        * Note that unlike cookies, this works accross domains
-        *
-        * @param string $url
-        * @param float $time UNIX timestamp just before shutdown() was called
-        * @return string
-        * @since 1.28
-        */
-       public function appendPreShutdownTimeAsQuery( $url, $time ) {
-               $usedCluster = 0;
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$usedCluster ) {
-                       $usedCluster |= ( $lb->getServerCount() > 1 );
-               } );
-
-               if ( !$usedCluster ) {
-                       return $url; // no master/replica clusters touched
-               }
-
-               return wfAppendQuery( $url, [ 'cpPosTime' => $time ] );
-       }
-
-       /**
-        * Close all open database connections on all open load balancers.
-        * @since 1.28
-        */
-       public function closeAll() {
-               $this->forEachLBCallMethod( 'closeAll', [] );
-       }
-}
diff --git a/includes/db/loadbalancer/LBFactoryFake.php b/includes/db/loadbalancer/LBFactoryFake.php
deleted file mode 100644 (file)
index 5cd1d4b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/**
- * Generator of database load balancing objects.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * LBFactory class that throws an error on any attempt to use it.
- * This will typically be done via wfGetDB().
- * Call LBFactory::disableBackend() to start using this, and
- * LBFactory::enableBackend() to return to normal behavior
- */
-class LBFactoryFake extends LBFactory {
-       public function newMainLB( $wiki = false ) {
-               throw new DBAccessError;
-       }
-
-       public function getMainLB( $wiki = false ) {
-               throw new DBAccessError;
-       }
-
-       protected function newExternalLB( $cluster, $wiki = false ) {
-               throw new DBAccessError;
-       }
-
-       public function getExternalLB( $cluster, $wiki = false ) {
-               throw new DBAccessError;
-       }
-
-       public function forEachLB( $callback, array $params = [] ) {
-       }
-}
diff --git a/includes/db/loadbalancer/LBFactoryMulti.php b/includes/db/loadbalancer/LBFactoryMulti.php
deleted file mode 100644 (file)
index dd7737b..0000000
+++ /dev/null
@@ -1,422 +0,0 @@
-<?php
-/**
- * Advanced generator of database load balancing objects for wiki farms.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * A multi-wiki, multi-master factory for Wikimedia and similar installations.
- * Ignores the old configuration globals.
- *
- * Template override precedence (highest => lowest):
- *   - templateOverridesByServer
- *   - masterTemplateOverrides
- *   - templateOverridesBySection/templateOverridesByCluster
- *   - externalTemplateOverrides
- *   - serverTemplate
- * Overrides only work on top level keys (so nested values will not be merged).
- *
- * Configuration:
- *     sectionsByDB                A map of database names to section names.
- *
- *     sectionLoads                A 2-d map. For each section, gives a map of server names to
- *                                 load ratios. For example:
- *                                 [
- *                                     'section1' => [
- *                                         'db1' => 100,
- *                                         'db2' => 100
- *                                     ]
- *                                 ]
- *
- *     serverTemplate              A server info associative array as documented for $wgDBservers.
- *                                 The host, hostName and load entries will be overridden.
- *
- *     groupLoadsBySection         A 3-d map giving server load ratios for each section and group.
- *                                 For example:
- *                                 [
- *                                     'section1' => [
- *                                         'group1' => [
- *                                             'db1' => 100,
- *                                             'db2' => 100
- *                                         ]
- *                                     ]
- *                                 ]
- *
- *     groupLoadsByDB              A 3-d map giving server load ratios by DB name.
- *
- *     hostsByName                 A map of hostname to IP address.
- *
- *     externalLoads               A map of external storage cluster name to server load map.
- *
- *     externalTemplateOverrides   A set of server info keys overriding serverTemplate for external
- *                                 storage.
- *
- *     templateOverridesByServer   A 2-d map overriding serverTemplate and
- *                                 externalTemplateOverrides on a server-by-server basis. Applies
- *                                 to both core and external storage.
- *     templateOverridesBySection  A 2-d map overriding the server info by section.
- *     templateOverridesByCluster  A 2-d map overriding the server info by external storage cluster.
- *
- *     masterTemplateOverrides     An override array for all master servers.
- *
- *     loadMonitorClass            Name of the LoadMonitor class to always use.
- *
- *     readOnlyBySection           A map of section name to read-only message.
- *                                 Missing or false for read/write.
- *
- * @ingroup Database
- */
-class LBFactoryMulti extends LBFactory {
-       /** @var array A map of database names to section names */
-       private $sectionsByDB;
-
-       /**
-        * @var array A 2-d map. For each section, gives a map of server names to
-        * load ratios
-        */
-       private $sectionLoads;
-
-       /**
-        * @var array A server info associative array as documented for
-        * $wgDBservers. The host, hostName and load entries will be
-        * overridden
-        */
-       private $serverTemplate;
-
-       // Optional settings
-
-       /** @var array A 3-d map giving server load ratios for each section and group */
-       private $groupLoadsBySection = [];
-
-       /** @var array A 3-d map giving server load ratios by DB name */
-       private $groupLoadsByDB = [];
-
-       /** @var array A map of hostname to IP address */
-       private $hostsByName = [];
-
-       /** @var array A map of external storage cluster name to server load map */
-       private $externalLoads = [];
-
-       /**
-        * @var array A set of server info keys overriding serverTemplate for
-        * external storage
-        */
-       private $externalTemplateOverrides;
-
-       /**
-        * @var array A 2-d map overriding serverTemplate and
-        * externalTemplateOverrides on a server-by-server basis. Applies to both
-        * core and external storage
-        */
-       private $templateOverridesByServer;
-
-       /** @var array A 2-d map overriding the server info by section */
-       private $templateOverridesBySection;
-
-       /** @var array A 2-d map overriding the server info by external storage cluster */
-       private $templateOverridesByCluster;
-
-       /** @var array An override array for all master servers */
-       private $masterTemplateOverrides;
-
-       /**
-        * @var array|bool A map of section name to read-only message. Missing or
-        * false for read/write
-        */
-       private $readOnlyBySection = [];
-
-       // Other stuff
-
-       /** @var array Load balancer factory configuration */
-       private $conf;
-
-       /** @var LoadBalancer[] */
-       private $mainLBs = [];
-
-       /** @var LoadBalancer[] */
-       private $extLBs = [];
-
-       /** @var string */
-       private $loadMonitorClass;
-
-       /** @var string */
-       private $lastWiki;
-
-       /** @var string */
-       private $lastSection;
-
-       /**
-        * @param array $conf
-        * @throws MWException
-        */
-       public function __construct( array $conf ) {
-               parent::__construct( $conf );
-
-               $this->conf = $conf;
-               $required = [ 'sectionsByDB', 'sectionLoads', 'serverTemplate' ];
-               $optional = [ 'groupLoadsBySection', 'groupLoadsByDB', 'hostsByName',
-                       'externalLoads', 'externalTemplateOverrides', 'templateOverridesByServer',
-                       'templateOverridesByCluster', 'templateOverridesBySection', 'masterTemplateOverrides',
-                       'readOnlyBySection', 'loadMonitorClass' ];
-
-               foreach ( $required as $key ) {
-                       if ( !isset( $conf[$key] ) ) {
-                               throw new InvalidArgumentException( __CLASS__ . ": $key is required in configuration" );
-                       }
-                       $this->$key = $conf[$key];
-               }
-
-               foreach ( $optional as $key ) {
-                       if ( isset( $conf[$key] ) ) {
-                               $this->$key = $conf[$key];
-                       }
-               }
-       }
-
-       /**
-        * @param bool|string $wiki
-        * @return string
-        */
-       private function getSectionForWiki( $wiki = false ) {
-               if ( $this->lastWiki === $wiki ) {
-                       return $this->lastSection;
-               }
-               list( $dbName, ) = $this->getDBNameAndPrefix( $wiki );
-               if ( isset( $this->sectionsByDB[$dbName] ) ) {
-                       $section = $this->sectionsByDB[$dbName];
-               } else {
-                       $section = 'DEFAULT';
-               }
-               $this->lastSection = $section;
-               $this->lastWiki = $wiki;
-
-               return $section;
-       }
-
-       /**
-        * @param bool|string $wiki
-        * @return LoadBalancer
-        */
-       public function newMainLB( $wiki = false ) {
-               list( $dbName, ) = $this->getDBNameAndPrefix( $wiki );
-               $section = $this->getSectionForWiki( $wiki );
-               if ( isset( $this->groupLoadsByDB[$dbName] ) ) {
-                       $groupLoads = $this->groupLoadsByDB[$dbName];
-               } else {
-                       $groupLoads = [];
-               }
-
-               if ( isset( $this->groupLoadsBySection[$section] ) ) {
-                       $groupLoads = array_merge_recursive( $groupLoads, $this->groupLoadsBySection[$section] );
-               }
-
-               $readOnlyReason = $this->readOnlyReason;
-               // Use the LB-specific read-only reason if everything isn't already read-only
-               if ( $readOnlyReason === false && isset( $this->readOnlyBySection[$section] ) ) {
-                       $readOnlyReason = $this->readOnlyBySection[$section];
-               }
-
-               $template = $this->serverTemplate;
-               if ( isset( $this->templateOverridesBySection[$section] ) ) {
-                       $template = $this->templateOverridesBySection[$section] + $template;
-               }
-
-               return $this->newLoadBalancer(
-                       $template,
-                       $this->sectionLoads[$section],
-                       $groupLoads,
-                       $readOnlyReason
-               );
-       }
-
-       /**
-        * @param bool|string $wiki
-        * @return LoadBalancer
-        */
-       public function getMainLB( $wiki = false ) {
-               $section = $this->getSectionForWiki( $wiki );
-               if ( !isset( $this->mainLBs[$section] ) ) {
-                       $lb = $this->newMainLB( $wiki );
-                       $this->chronProt->initLB( $lb );
-                       $this->mainLBs[$section] = $lb;
-               }
-
-               return $this->mainLBs[$section];
-       }
-
-       /**
-        * @param string $cluster
-        * @param bool|string $wiki
-        * @throws MWException
-        * @return LoadBalancer
-        */
-       protected function newExternalLB( $cluster, $wiki = false ) {
-               if ( !isset( $this->externalLoads[$cluster] ) ) {
-                       throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"" );
-               }
-               $template = $this->serverTemplate;
-               if ( isset( $this->externalTemplateOverrides ) ) {
-                       $template = $this->externalTemplateOverrides + $template;
-               }
-               if ( isset( $this->templateOverridesByCluster[$cluster] ) ) {
-                       $template = $this->templateOverridesByCluster[$cluster] + $template;
-               }
-
-               return $this->newLoadBalancer(
-                       $template,
-                       $this->externalLoads[$cluster],
-                       [],
-                       $this->readOnlyReason
-               );
-       }
-
-       /**
-        * @param string $cluster External storage cluster, or false for core
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancer
-        */
-       public function getExternalLB( $cluster, $wiki = false ) {
-               if ( !isset( $this->extLBs[$cluster] ) ) {
-                       $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $wiki );
-                       $this->chronProt->initLB( $this->extLBs[$cluster] );
-               }
-
-               return $this->extLBs[$cluster];
-       }
-
-       /**
-        * Make a new load balancer object based on template and load array
-        *
-        * @param array $template
-        * @param array $loads
-        * @param array $groupLoads
-        * @param string|bool $readOnlyReason
-        * @return LoadBalancer
-        */
-       private function newLoadBalancer( $template, $loads, $groupLoads, $readOnlyReason ) {
-               $lb = new LoadBalancer( array_merge(
-                       $this->baseLoadBalancerParams(),
-                       [
-                               'servers' => $this->makeServerArray( $template, $loads, $groupLoads ),
-                               'loadMonitor' => $this->loadMonitorClass,
-                               'readOnlyReason' => $readOnlyReason
-                       ]
-               ) );
-               $this->initLoadBalancer( $lb );
-
-               return $lb;
-       }
-
-       /**
-        * Make a server array as expected by LoadBalancer::__construct, using a template and load array
-        *
-        * @param array $template
-        * @param array $loads
-        * @param array $groupLoads
-        * @return array
-        */
-       private function makeServerArray( $template, $loads, $groupLoads ) {
-               $servers = [];
-               $master = true;
-               $groupLoadsByServer = $this->reindexGroupLoads( $groupLoads );
-               foreach ( $groupLoadsByServer as $server => $stuff ) {
-                       if ( !isset( $loads[$server] ) ) {
-                               $loads[$server] = 0;
-                       }
-               }
-               foreach ( $loads as $serverName => $load ) {
-                       $serverInfo = $template;
-                       if ( $master ) {
-                               $serverInfo['master'] = true;
-                               if ( isset( $this->masterTemplateOverrides ) ) {
-                                       $serverInfo = $this->masterTemplateOverrides + $serverInfo;
-                               }
-                               $master = false;
-                       } else {
-                               $serverInfo['replica'] = true;
-                       }
-                       if ( isset( $this->templateOverridesByServer[$serverName] ) ) {
-                               $serverInfo = $this->templateOverridesByServer[$serverName] + $serverInfo;
-                       }
-                       if ( isset( $groupLoadsByServer[$serverName] ) ) {
-                               $serverInfo['groupLoads'] = $groupLoadsByServer[$serverName];
-                       }
-                       if ( isset( $this->hostsByName[$serverName] ) ) {
-                               $serverInfo['host'] = $this->hostsByName[$serverName];
-                       } else {
-                               $serverInfo['host'] = $serverName;
-                       }
-                       $serverInfo['hostName'] = $serverName;
-                       $serverInfo['load'] = $load;
-                       $serverInfo += [ 'flags' => DBO_DEFAULT ];
-
-                       $servers[] = $serverInfo;
-               }
-
-               return $servers;
-       }
-
-       /**
-        * Take a group load array indexed by group then server, and reindex it by server then group
-        * @param array $groupLoads
-        * @return array
-        */
-       private function reindexGroupLoads( $groupLoads ) {
-               $reindexed = [];
-               foreach ( $groupLoads as $group => $loads ) {
-                       foreach ( $loads as $server => $load ) {
-                               $reindexed[$server][$group] = $load;
-                       }
-               }
-
-               return $reindexed;
-       }
-
-       /**
-        * Get the database name and prefix based on the wiki ID
-        * @param bool|string $wiki
-        * @return array
-        */
-       private function getDBNameAndPrefix( $wiki = false ) {
-               if ( $wiki === false ) {
-                       global $wgDBname, $wgDBprefix;
-
-                       return [ $wgDBname, $wgDBprefix ];
-               } else {
-                       return wfSplitWikiID( $wiki );
-               }
-       }
-
-       /**
-        * Execute a function for each tracked load balancer
-        * The callback is called with the load balancer as the first parameter,
-        * and $params passed as the subsequent parameters.
-        * @param callable $callback
-        * @param array $params
-        */
-       public function forEachLB( $callback, array $params = [] ) {
-               foreach ( $this->mainLBs as $lb ) {
-                       call_user_func_array( $callback, array_merge( [ $lb ], $params ) );
-               }
-               foreach ( $this->extLBs as $lb ) {
-                       call_user_func_array( $callback, array_merge( [ $lb ], $params ) );
-               }
-       }
-}
diff --git a/includes/db/loadbalancer/LBFactorySimple.php b/includes/db/loadbalancer/LBFactorySimple.php
deleted file mode 100644 (file)
index d8590b7..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-<?php
-/**
- * Generator of database load balancing objects.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * A simple single-master LBFactory that gets its configuration from the b/c globals
- */
-class LBFactorySimple extends LBFactory {
-       /** @var LoadBalancer */
-       private $mainLB;
-       /** @var LoadBalancer[] */
-       private $extLBs = [];
-
-       /** @var string */
-       private $loadMonitorClass;
-
-       public function __construct( array $conf ) {
-               parent::__construct( $conf );
-
-               $this->loadMonitorClass = isset( $conf['loadMonitorClass'] )
-                       ? $conf['loadMonitorClass']
-                       : null;
-       }
-
-       /**
-        * @param bool|string $wiki
-        * @return LoadBalancer
-        */
-       public function newMainLB( $wiki = false ) {
-               global $wgDBservers;
-
-               if ( is_array( $wgDBservers ) ) {
-                       $servers = $wgDBservers;
-                       foreach ( $servers as $i => &$server ) {
-                               if ( $i == 0 ) {
-                                       $server['master'] = true;
-                               } else {
-                                       $server['replica'] = true;
-                               }
-                               $server += [ 'flags' => DBO_DEFAULT ];
-                       }
-               } else {
-                       global $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, $wgDBtype, $wgDebugDumpSql;
-                       global $wgDBssl, $wgDBcompress;
-
-                       $flags = DBO_DEFAULT;
-                       if ( $wgDebugDumpSql ) {
-                               $flags |= DBO_DEBUG;
-                       }
-                       if ( $wgDBssl ) {
-                               $flags |= DBO_SSL;
-                       }
-                       if ( $wgDBcompress ) {
-                               $flags |= DBO_COMPRESS;
-                       }
-
-                       $servers = [ [
-                               'host' => $wgDBserver,
-                               'user' => $wgDBuser,
-                               'password' => $wgDBpassword,
-                               'dbname' => $wgDBname,
-                               'type' => $wgDBtype,
-                               'load' => 1,
-                               'flags' => $flags,
-                               'master' => true
-                       ] ];
-               }
-
-               return $this->newLoadBalancer( $servers );
-       }
-
-       /**
-        * @param bool|string $wiki
-        * @return LoadBalancer
-        */
-       public function getMainLB( $wiki = false ) {
-               if ( !isset( $this->mainLB ) ) {
-                       $this->mainLB = $this->newMainLB( $wiki );
-                       $this->chronProt->initLB( $this->mainLB );
-               }
-
-               return $this->mainLB;
-       }
-
-       /**
-        * @throws MWException
-        * @param string $cluster
-        * @param bool|string $wiki
-        * @return LoadBalancer
-        */
-       protected function newExternalLB( $cluster, $wiki = false ) {
-               global $wgExternalServers;
-               if ( !isset( $wgExternalServers[$cluster] ) ) {
-                       throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"" );
-               }
-
-               return $this->newLoadBalancer( $wgExternalServers[$cluster] );
-       }
-
-       /**
-        * @param string $cluster
-        * @param bool|string $wiki
-        * @return array
-        */
-       public function getExternalLB( $cluster, $wiki = false ) {
-               if ( !isset( $this->extLBs[$cluster] ) ) {
-                       $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $wiki );
-                       $this->chronProt->initLB( $this->extLBs[$cluster] );
-               }
-
-               return $this->extLBs[$cluster];
-       }
-
-       private function newLoadBalancer( array $servers ) {
-               $lb = new LoadBalancer( array_merge(
-                       $this->baseLoadBalancerParams(),
-                       [
-                               'servers' => $servers,
-                               'loadMonitor' => $this->loadMonitorClass,
-                       ]
-               ) );
-               $this->initLoadBalancer( $lb );
-
-               return $lb;
-       }
-
-       /**
-        * Execute a function for each tracked load balancer
-        * The callback is called with the load balancer as the first parameter,
-        * and $params passed as the subsequent parameters.
-        *
-        * @param callable $callback
-        * @param array $params
-        */
-       public function forEachLB( $callback, array $params = [] ) {
-               if ( isset( $this->mainLB ) ) {
-                       call_user_func_array( $callback, array_merge( [ $this->mainLB ], $params ) );
-               }
-               foreach ( $this->extLBs as $lb ) {
-                       call_user_func_array( $callback, array_merge( [ $lb ], $params ) );
-               }
-       }
-}
diff --git a/includes/db/loadbalancer/LBFactorySingle.php b/includes/db/loadbalancer/LBFactorySingle.php
deleted file mode 100644 (file)
index de82a1f..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-<?php
-/**
- * Simple generator of database connections that always returns the same object.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * An LBFactory class that always returns a single database object.
- */
-class LBFactorySingle extends LBFactory {
-       /** @var LoadBalancerSingle */
-       private $lb;
-
-       /**
-        * @param array $conf An associative array with one member:
-        *  - connection: The DatabaseBase connection object
-        */
-       public function __construct( array $conf ) {
-               parent::__construct( $conf );
-
-               $this->lb = new LoadBalancerSingle( array_merge( $this->baseLoadBalancerParams(), $conf ) );
-       }
-
-       /**
-        * @param bool|string $wiki
-        * @return LoadBalancerSingle
-        */
-       public function newMainLB( $wiki = false ) {
-               return $this->lb;
-       }
-
-       /**
-        * @param bool|string $wiki
-        * @return LoadBalancerSingle
-        */
-       public function getMainLB( $wiki = false ) {
-               return $this->lb;
-       }
-
-       /**
-        * @param string $cluster External storage cluster, or false for core
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancerSingle
-        */
-       protected function newExternalLB( $cluster, $wiki = false ) {
-               return $this->lb;
-       }
-
-       /**
-        * @param string $cluster External storage cluster, or false for core
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancerSingle
-        */
-       public function getExternalLB( $cluster, $wiki = false ) {
-               return $this->lb;
-       }
-
-       /**
-        * @param string|callable $callback
-        * @param array $params
-        */
-       public function forEachLB( $callback, array $params = [] ) {
-               call_user_func_array( $callback, array_merge( [ $this->lb ], $params ) );
-       }
-}
-
-/**
- * Helper class for LBFactorySingle.
- */
-class LoadBalancerSingle extends LoadBalancer {
-       /** @var DatabaseBase */
-       private $db;
-
-       /**
-        * @param array $params
-        */
-       public function __construct( array $params ) {
-               $this->db = $params['connection'];
-
-               parent::__construct( [
-                       'servers' => [
-                               [
-                                       'type' => $this->db->getType(),
-                                       'host' => $this->db->getServer(),
-                                       'dbname' => $this->db->getDBname(),
-                                       'load' => 1,
-                               ]
-                       ],
-                       'trxProfiler' => isset( $params['trxProfiler'] ) ? $params['trxProfiler'] : null,
-                       'srvCache' => isset( $params['srvCache'] ) ? $params['srvCache'] : null,
-                       'wanCache' => isset( $params['wanCache'] ) ? $params['wanCache'] : null
-               ] );
-
-               if ( isset( $params['readOnlyReason'] ) ) {
-                       $this->db->setLBInfo( 'readOnlyReason', $params['readOnlyReason'] );
-               }
-       }
-
-       /**
-        *
-        * @param string $server
-        * @param bool $dbNameOverride
-        *
-        * @return DatabaseBase
-        */
-       protected function reallyOpenConnection( $server, $dbNameOverride = false ) {
-               return $this->db;
-       }
-}
diff --git a/includes/db/loadbalancer/LoadBalancer.php b/includes/db/loadbalancer/LoadBalancer.php
deleted file mode 100644 (file)
index 8069cf6..0000000
+++ /dev/null
@@ -1,1574 +0,0 @@
-<?php
-/**
- * Database load balancing manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-use Psr\Log\LoggerInterface;
-
-/**
- * Database load balancing, tracking, and transaction management object
- *
- * @ingroup Database
- */
-class LoadBalancer implements ILoadBalancer {
-       /** @var array[] Map of (server index => server config array) */
-       private $mServers;
-       /** @var array[] Map of (local/foreignUsed/foreignFree => server index => DatabaseBase array) */
-       private $mConns;
-       /** @var array Map of (server index => weight) */
-       private $mLoads;
-       /** @var array[] Map of (group => server index => weight) */
-       private $mGroupLoads;
-       /** @var bool Whether to disregard replica DB lag as a factor in replica DB selection */
-       private $mAllowLagged;
-       /** @var integer Seconds to spend waiting on replica DB lag to resolve */
-       private $mWaitTimeout;
-       /** @var string The LoadMonitor subclass name */
-       private $mLoadMonitorClass;
-
-       /** @var LoadMonitor */
-       private $mLoadMonitor;
-       /** @var BagOStuff */
-       private $srvCache;
-       /** @var BagOStuff */
-       private $memCache;
-       /** @var WANObjectCache */
-       private $wanCache;
-       /** @var TransactionProfiler */
-       protected $trxProfiler;
-       /** @var LoggerInterface */
-       protected $replLogger;
-       /** @var LoggerInterface */
-       protected $connLogger;
-       /** @var LoggerInterface */
-       protected $queryLogger;
-       /** @var LoggerInterface */
-       protected $perfLogger;
-
-       /** @var bool|DatabaseBase Database connection that caused a problem */
-       private $mErrorConnection;
-       /** @var integer The generic (not query grouped) replica DB index (of $mServers) */
-       private $mReadIndex;
-       /** @var bool|DBMasterPos False if not set */
-       private $mWaitForPos;
-       /** @var bool Whether the generic reader fell back to a lagged replica DB */
-       private $laggedReplicaMode = false;
-       /** @var bool Whether the generic reader fell back to a lagged replica DB */
-       private $allReplicasDownMode = false;
-       /** @var string The last DB selection or connection error */
-       private $mLastError = 'Unknown error';
-       /** @var string|bool Reason the LB is read-only or false if not */
-       private $readOnlyReason = false;
-       /** @var integer Total connections opened */
-       private $connsOpened = 0;
-       /** @var string|bool String if a requested DBO_TRX transaction round is active */
-       private $trxRoundId = false;
-       /** @var array[] Map of (name => callable) */
-       private $trxRecurringCallbacks = [];
-       /** @var string Local Wiki ID and default for selectDB() calls */
-       private $localDomain;
-       /** @var callable Exception logger */
-       private $errorLogger;
-
-       /** @var boolean */
-       private $disabled = false;
-
-       /** @var integer Warn when this many connection are held */
-       const CONN_HELD_WARN_THRESHOLD = 10;
-       /** @var integer Default 'max lag' when unspecified */
-       const MAX_LAG_DEFAULT = 10;
-       /** @var integer Max time to wait for a replica DB to catch up (e.g. ChronologyProtector) */
-       const POS_WAIT_TIMEOUT = 10;
-       /** @var integer Seconds to cache master server read-only status */
-       const TTL_CACHE_READONLY = 5;
-
-       public function __construct( array $params ) {
-               if ( !isset( $params['servers'] ) ) {
-                       throw new InvalidArgumentException( __CLASS__ . ': missing servers parameter' );
-               }
-               $this->mServers = $params['servers'];
-               $this->mWaitTimeout = isset( $params['waitTimeout'] )
-                       ? $params['waitTimeout']
-                       : self::POS_WAIT_TIMEOUT;
-               $this->localDomain = isset( $params['localDomain'] ) ? $params['localDomain'] : '';
-
-               $this->mReadIndex = -1;
-               $this->mConns = [
-                       'local' => [],
-                       'foreignUsed' => [],
-                       'foreignFree' => [] ];
-               $this->mLoads = [];
-               $this->mWaitForPos = false;
-               $this->mErrorConnection = false;
-               $this->mAllowLagged = false;
-
-               if ( isset( $params['readOnlyReason'] ) && is_string( $params['readOnlyReason'] ) ) {
-                       $this->readOnlyReason = $params['readOnlyReason'];
-               }
-
-               if ( isset( $params['loadMonitor'] ) ) {
-                       $this->mLoadMonitorClass = $params['loadMonitor'];
-               } else {
-                       $master = reset( $params['servers'] );
-                       if ( isset( $master['type'] ) && $master['type'] === 'mysql' ) {
-                               $this->mLoadMonitorClass = 'LoadMonitorMySQL';
-                       } else {
-                               $this->mLoadMonitorClass = 'LoadMonitorNull';
-                       }
-               }
-
-               foreach ( $params['servers'] as $i => $server ) {
-                       $this->mLoads[$i] = $server['load'];
-                       if ( isset( $server['groupLoads'] ) ) {
-                               foreach ( $server['groupLoads'] as $group => $ratio ) {
-                                       if ( !isset( $this->mGroupLoads[$group] ) ) {
-                                               $this->mGroupLoads[$group] = [];
-                                       }
-                                       $this->mGroupLoads[$group][$i] = $ratio;
-                               }
-                       }
-               }
-
-               if ( isset( $params['srvCache'] ) ) {
-                       $this->srvCache = $params['srvCache'];
-               } else {
-                       $this->srvCache = new EmptyBagOStuff();
-               }
-               if ( isset( $params['memCache'] ) ) {
-                       $this->memCache = $params['memCache'];
-               } else {
-                       $this->memCache = new EmptyBagOStuff();
-               }
-               if ( isset( $params['wanCache'] ) ) {
-                       $this->wanCache = $params['wanCache'];
-               } else {
-                       $this->wanCache = WANObjectCache::newEmpty();
-               }
-               if ( isset( $params['trxProfiler'] ) ) {
-                       $this->trxProfiler = $params['trxProfiler'];
-               } else {
-                       $this->trxProfiler = new TransactionProfiler();
-               }
-
-               $this->errorLogger = isset( $params['errorLogger'] )
-                       ? $params['errorLogger']
-                       : function ( Exception $e ) {
-                               trigger_error( E_WARNING, $e->getMessage() );
-                       };
-
-               foreach ( [ 'replLogger', 'connLogger', 'queryLogger', 'perfLogger' ] as $key ) {
-                       $this->$key = isset( $params[$key] ) ? $params[$key] : new \Psr\Log\NullLogger();
-               }
-       }
-
-       /**
-        * Get a LoadMonitor instance
-        *
-        * @return LoadMonitor
-        */
-       private function getLoadMonitor() {
-               if ( !isset( $this->mLoadMonitor ) ) {
-                       $class = $this->mLoadMonitorClass;
-                       $this->mLoadMonitor = new $class( $this, $this->srvCache, $this->memCache );
-                       $this->mLoadMonitor->setLogger( $this->replLogger );
-               }
-
-               return $this->mLoadMonitor;
-       }
-
-       /**
-        * @param array $loads
-        * @param bool|string $wiki Wiki to get non-lagged for
-        * @param int $maxLag Restrict the maximum allowed lag to this many seconds
-        * @return bool|int|string
-        */
-       private function getRandomNonLagged( array $loads, $wiki = false, $maxLag = INF ) {
-               $lags = $this->getLagTimes( $wiki );
-
-               # Unset excessively lagged servers
-               foreach ( $lags as $i => $lag ) {
-                       if ( $i != 0 ) {
-                               # How much lag this server nominally is allowed to have
-                               $maxServerLag = isset( $this->mServers[$i]['max lag'] )
-                                       ? $this->mServers[$i]['max lag']
-                                       : self::MAX_LAG_DEFAULT; // default
-                               # Constrain that futher by $maxLag argument
-                               $maxServerLag = min( $maxServerLag, $maxLag );
-
-                               $host = $this->getServerName( $i );
-                               if ( $lag === false && !is_infinite( $maxServerLag ) ) {
-                                       $this->replLogger->error( "Server $host (#$i) is not replicating?" );
-                                       unset( $loads[$i] );
-                               } elseif ( $lag > $maxServerLag ) {
-                                       $this->replLogger->warning( "Server $host (#$i) has >= $lag seconds of lag" );
-                                       unset( $loads[$i] );
-                               }
-                       }
-               }
-
-               # Find out if all the replica DBs with non-zero load are lagged
-               $sum = 0;
-               foreach ( $loads as $load ) {
-                       $sum += $load;
-               }
-               if ( $sum == 0 ) {
-                       # No appropriate DB servers except maybe the master and some replica DBs with zero load
-                       # Do NOT use the master
-                       # Instead, this function will return false, triggering read-only mode,
-                       # and a lagged replica DB will be used instead.
-                       return false;
-               }
-
-               if ( count( $loads ) == 0 ) {
-                       return false;
-               }
-
-               # Return a random representative of the remainder
-               return ArrayUtils::pickRandom( $loads );
-       }
-
-       public function getReaderIndex( $group = false, $wiki = false ) {
-               if ( count( $this->mServers ) == 1 ) {
-                       # Skip the load balancing if there's only one server
-                       return $this->getWriterIndex();
-               } elseif ( $group === false && $this->mReadIndex >= 0 ) {
-                       # Shortcut if generic reader exists already
-                       return $this->mReadIndex;
-               }
-
-               # Find the relevant load array
-               if ( $group !== false ) {
-                       if ( isset( $this->mGroupLoads[$group] ) ) {
-                               $nonErrorLoads = $this->mGroupLoads[$group];
-                       } else {
-                               # No loads for this group, return false and the caller can use some other group
-                               $this->connLogger->info( __METHOD__ . ": no loads for group $group" );
-
-                               return false;
-                       }
-               } else {
-                       $nonErrorLoads = $this->mLoads;
-               }
-
-               if ( !count( $nonErrorLoads ) ) {
-                       throw new InvalidArgumentException( "Empty server array given to LoadBalancer" );
-               }
-
-               # Scale the configured load ratios according to the dynamic load if supported
-               $this->getLoadMonitor()->scaleLoads( $nonErrorLoads, $group, $wiki );
-
-               $laggedReplicaMode = false;
-
-               # No server found yet
-               $i = false;
-               # First try quickly looking through the available servers for a server that
-               # meets our criteria
-               $currentLoads = $nonErrorLoads;
-               while ( count( $currentLoads ) ) {
-                       if ( $this->mAllowLagged || $laggedReplicaMode ) {
-                               $i = ArrayUtils::pickRandom( $currentLoads );
-                       } else {
-                               $i = false;
-                               if ( $this->mWaitForPos && $this->mWaitForPos->asOfTime() ) {
-                                       # ChronologyProtecter causes mWaitForPos to be set via sessions.
-                                       # This triggers doWait() after connect, so it's especially good to
-                                       # avoid lagged servers so as to avoid just blocking in that method.
-                                       $ago = microtime( true ) - $this->mWaitForPos->asOfTime();
-                                       # Aim for <= 1 second of waiting (being too picky can backfire)
-                                       $i = $this->getRandomNonLagged( $currentLoads, $wiki, $ago + 1 );
-                               }
-                               if ( $i === false ) {
-                                       # Any server with less lag than it's 'max lag' param is preferable
-                                       $i = $this->getRandomNonLagged( $currentLoads, $wiki );
-                               }
-                               if ( $i === false && count( $currentLoads ) != 0 ) {
-                                       # All replica DBs lagged. Switch to read-only mode
-                                       $this->replLogger->error( "All replica DBs lagged. Switch to read-only mode" );
-                                       $i = ArrayUtils::pickRandom( $currentLoads );
-                                       $laggedReplicaMode = true;
-                               }
-                       }
-
-                       if ( $i === false ) {
-                               # pickRandom() returned false
-                               # This is permanent and means the configuration or the load monitor
-                               # wants us to return false.
-                               $this->connLogger->debug( __METHOD__ . ": pickRandom() returned false" );
-
-                               return false;
-                       }
-
-                       $serverName = $this->getServerName( $i );
-                       $this->connLogger->debug( __METHOD__ . ": Using reader #$i: $serverName..." );
-
-                       $conn = $this->openConnection( $i, $wiki );
-                       if ( !$conn ) {
-                               $this->connLogger->warning( __METHOD__ . ": Failed connecting to $i/$wiki" );
-                               unset( $nonErrorLoads[$i] );
-                               unset( $currentLoads[$i] );
-                               $i = false;
-                               continue;
-                       }
-
-                       // Decrement reference counter, we are finished with this connection.
-                       // It will be incremented for the caller later.
-                       if ( $wiki !== false ) {
-                               $this->reuseConnection( $conn );
-                       }
-
-                       # Return this server
-                       break;
-               }
-
-               # If all servers were down, quit now
-               if ( !count( $nonErrorLoads ) ) {
-                       $this->connLogger->error( "All servers down" );
-               }
-
-               if ( $i !== false ) {
-                       # Replica DB connection successful.
-                       # Wait for the session master pos for a short time.
-                       if ( $this->mWaitForPos && $i > 0 ) {
-                               $this->doWait( $i );
-                       }
-                       if ( $this->mReadIndex <= 0 && $this->mLoads[$i] > 0 && $group === false ) {
-                               $this->mReadIndex = $i;
-                               # Record if the generic reader index is in "lagged replica DB" mode
-                               if ( $laggedReplicaMode ) {
-                                       $this->laggedReplicaMode = true;
-                               }
-                       }
-                       $serverName = $this->getServerName( $i );
-                       $this->connLogger->debug(
-                               __METHOD__ . ": using server $serverName for group '$group'\n" );
-               }
-
-               return $i;
-       }
-
-       public function waitFor( $pos ) {
-               $this->mWaitForPos = $pos;
-               $i = $this->mReadIndex;
-
-               if ( $i > 0 ) {
-                       if ( !$this->doWait( $i ) ) {
-                               $this->laggedReplicaMode = true;
-                       }
-               }
-       }
-
-       /**
-        * Set the master wait position and wait for a "generic" replica DB to catch up to it
-        *
-        * This can be used a faster proxy for waitForAll()
-        *
-        * @param DBMasterPos $pos
-        * @param int $timeout Max seconds to wait; default is mWaitTimeout
-        * @return bool Success (able to connect and no timeouts reached)
-        * @since 1.26
-        */
-       public function waitForOne( $pos, $timeout = null ) {
-               $this->mWaitForPos = $pos;
-
-               $i = $this->mReadIndex;
-               if ( $i <= 0 ) {
-                       // Pick a generic replica DB if there isn't one yet
-                       $readLoads = $this->mLoads;
-                       unset( $readLoads[$this->getWriterIndex()] ); // replica DBs only
-                       $readLoads = array_filter( $readLoads ); // with non-zero load
-                       $i = ArrayUtils::pickRandom( $readLoads );
-               }
-
-               if ( $i > 0 ) {
-                       $ok = $this->doWait( $i, true, $timeout );
-               } else {
-                       $ok = true; // no applicable loads
-               }
-
-               return $ok;
-       }
-
-       public function waitForAll( $pos, $timeout = null ) {
-               $this->mWaitForPos = $pos;
-               $serverCount = count( $this->mServers );
-
-               $ok = true;
-               for ( $i = 1; $i < $serverCount; $i++ ) {
-                       if ( $this->mLoads[$i] > 0 ) {
-                               $ok = $this->doWait( $i, true, $timeout ) && $ok;
-                       }
-               }
-
-               return $ok;
-       }
-
-       public function getAnyOpenConnection( $i ) {
-               foreach ( $this->mConns as $connsByServer ) {
-                       if ( !empty( $connsByServer[$i] ) ) {
-                               return reset( $connsByServer[$i] );
-                       }
-               }
-
-               return false;
-       }
-
-       /**
-        * Wait for a given replica DB to catch up to the master pos stored in $this
-        * @param int $index Server index
-        * @param bool $open Check the server even if a new connection has to be made
-        * @param int $timeout Max seconds to wait; default is mWaitTimeout
-        * @return bool
-        */
-       protected function doWait( $index, $open = false, $timeout = null ) {
-               $close = false; // close the connection afterwards
-
-               // Check if we already know that the DB has reached this point
-               $server = $this->getServerName( $index );
-               $key = $this->srvCache->makeGlobalKey( __CLASS__, 'last-known-pos', $server );
-               /** @var DBMasterPos $knownReachedPos */
-               $knownReachedPos = $this->srvCache->get( $key );
-               if ( $knownReachedPos && $knownReachedPos->hasReached( $this->mWaitForPos ) ) {
-                       $this->replLogger->debug( __METHOD__ .
-                               ": replica DB $server known to be caught up (pos >= $knownReachedPos).\n" );
-                       return true;
-               }
-
-               // Find a connection to wait on, creating one if needed and allowed
-               $conn = $this->getAnyOpenConnection( $index );
-               if ( !$conn ) {
-                       if ( !$open ) {
-                               $this->replLogger->debug( __METHOD__ . ": no connection open for $server\n" );
-
-                               return false;
-                       } else {
-                               $conn = $this->openConnection( $index, '' );
-                               if ( !$conn ) {
-                                       $this->replLogger->warning( __METHOD__ . ": failed to connect to $server\n" );
-
-                                       return false;
-                               }
-                               // Avoid connection spam in waitForAll() when connections
-                               // are made just for the sake of doing this lag check.
-                               $close = true;
-                       }
-               }
-
-               $this->replLogger->info( __METHOD__ . ": Waiting for replica DB $server to catch up...\n" );
-               $timeout = $timeout ?: $this->mWaitTimeout;
-               $result = $conn->masterPosWait( $this->mWaitForPos, $timeout );
-
-               if ( $result == -1 || is_null( $result ) ) {
-                       // Timed out waiting for replica DB, use master instead
-                       $msg = __METHOD__ . ": Timed out waiting on $server pos {$this->mWaitForPos}";
-                       $this->replLogger->warning( "$msg\n" );
-                       $this->perfLogger->warning( "$msg:\n" . wfBacktrace( true ) );
-                       $ok = false;
-               } else {
-                       $this->replLogger->info( __METHOD__ . ": Done\n" );
-                       $ok = true;
-                       // Remember that the DB reached this point
-                       $this->srvCache->set( $key, $this->mWaitForPos, BagOStuff::TTL_DAY );
-               }
-
-               if ( $close ) {
-                       $this->closeConnection( $conn );
-               }
-
-               return $ok;
-       }
-
-       public function getConnection( $i, $groups = [], $wiki = false ) {
-               if ( $i === null || $i === false ) {
-                       throw new InvalidArgumentException( 'Attempt to call ' . __METHOD__ .
-                               ' with invalid server index' );
-               }
-
-               if ( $wiki === $this->localDomain ) {
-                       $wiki = false;
-               }
-
-               $groups = ( $groups === false || $groups === [] )
-                       ? [ false ] // check one "group": the generic pool
-                       : (array)$groups;
-
-               $masterOnly = ( $i == DB_MASTER || $i == $this->getWriterIndex() );
-               $oldConnsOpened = $this->connsOpened; // connections open now
-
-               if ( $i == DB_MASTER ) {
-                       $i = $this->getWriterIndex();
-               } else {
-                       # Try to find an available server in any the query groups (in order)
-                       foreach ( $groups as $group ) {
-                               $groupIndex = $this->getReaderIndex( $group, $wiki );
-                               if ( $groupIndex !== false ) {
-                                       $i = $groupIndex;
-                                       break;
-                               }
-                       }
-               }
-
-               # Operation-based index
-               if ( $i == DB_REPLICA ) {
-                       $this->mLastError = 'Unknown error'; // reset error string
-                       # Try the general server pool if $groups are unavailable.
-                       $i = in_array( false, $groups, true )
-                               ? false // don't bother with this if that is what was tried above
-                               : $this->getReaderIndex( false, $wiki );
-                       # Couldn't find a working server in getReaderIndex()?
-                       if ( $i === false ) {
-                               $this->mLastError = 'No working replica DB server: ' . $this->mLastError;
-
-                               return $this->reportConnectionError();
-                       }
-               }
-
-               # Now we have an explicit index into the servers array
-               $conn = $this->openConnection( $i, $wiki );
-               if ( !$conn ) {
-                       return $this->reportConnectionError();
-               }
-
-               # Profile any new connections that happen
-               if ( $this->connsOpened > $oldConnsOpened ) {
-                       $host = $conn->getServer();
-                       $dbname = $conn->getDBname();
-                       $this->trxProfiler->recordConnection( $host, $dbname, $masterOnly );
-               }
-
-               if ( $masterOnly ) {
-                       # Make master-requested DB handles inherit any read-only mode setting
-                       $conn->setLBInfo( 'readOnlyReason', $this->getReadOnlyReason( $wiki, $conn ) );
-               }
-
-               return $conn;
-       }
-
-       public function reuseConnection( $conn ) {
-               $serverIndex = $conn->getLBInfo( 'serverIndex' );
-               $refCount = $conn->getLBInfo( 'foreignPoolRefCount' );
-               if ( $serverIndex === null || $refCount === null ) {
-                       /**
-                        * This can happen in code like:
-                        *   foreach ( $dbs as $db ) {
-                        *     $conn = $lb->getConnection( DB_REPLICA, [], $db );
-                        *     ...
-                        *     $lb->reuseConnection( $conn );
-                        *   }
-                        * When a connection to the local DB is opened in this way, reuseConnection()
-                        * should be ignored
-                        */
-                       return;
-               }
-
-               $dbName = $conn->getDBname();
-               $prefix = $conn->tablePrefix();
-               if ( strval( $prefix ) !== '' ) {
-                       $wiki = "$dbName-$prefix";
-               } else {
-                       $wiki = $dbName;
-               }
-               if ( $this->mConns['foreignUsed'][$serverIndex][$wiki] !== $conn ) {
-                       throw new InvalidArgumentException( __METHOD__ . ": connection not found, has " .
-                               "the connection been freed already?" );
-               }
-               $conn->setLBInfo( 'foreignPoolRefCount', --$refCount );
-               if ( $refCount <= 0 ) {
-                       $this->mConns['foreignFree'][$serverIndex][$wiki] = $conn;
-                       unset( $this->mConns['foreignUsed'][$serverIndex][$wiki] );
-                       wfDebug( __METHOD__ . ": freed connection $serverIndex/$wiki\n" );
-               } else {
-                       wfDebug( __METHOD__ . ": reference count for $serverIndex/$wiki reduced to $refCount\n" );
-               }
-       }
-
-       /**
-        * Get a database connection handle reference
-        *
-        * The handle's methods wrap simply wrap those of a DatabaseBase handle
-        *
-        * @see LoadBalancer::getConnection() for parameter information
-        *
-        * @param int $db
-        * @param array|string|bool $groups Query group(s), or false for the generic reader
-        * @param string|bool $wiki Wiki ID, or false for the current wiki
-        * @return DBConnRef
-        * @since 1.22
-        */
-       public function getConnectionRef( $db, $groups = [], $wiki = false ) {
-               return new DBConnRef( $this, $this->getConnection( $db, $groups, $wiki ) );
-       }
-
-       /**
-        * Get a database connection handle reference without connecting yet
-        *
-        * The handle's methods wrap simply wrap those of a DatabaseBase handle
-        *
-        * @see LoadBalancer::getConnection() for parameter information
-        *
-        * @param int $db
-        * @param array|string|bool $groups Query group(s), or false for the generic reader
-        * @param string|bool $wiki Wiki ID, or false for the current wiki
-        * @return DBConnRef
-        * @since 1.22
-        */
-       public function getLazyConnectionRef( $db, $groups = [], $wiki = false ) {
-               $wiki = ( $wiki !== false ) ? $wiki : $this->localDomain;
-
-               return new DBConnRef( $this, [ $db, $groups, $wiki ] );
-       }
-
-       public function openConnection( $i, $wiki = false ) {
-               if ( $wiki !== false ) {
-                       $conn = $this->openForeignConnection( $i, $wiki );
-               } elseif ( isset( $this->mConns['local'][$i][0] ) ) {
-                       $conn = $this->mConns['local'][$i][0];
-               } else {
-                       $server = $this->mServers[$i];
-                       $server['serverIndex'] = $i;
-                       $conn = $this->reallyOpenConnection( $server, false );
-                       $serverName = $this->getServerName( $i );
-                       if ( $conn->isOpen() ) {
-                               $this->connLogger->debug( "Connected to database $i at '$serverName'." );
-                               $this->mConns['local'][$i][0] = $conn;
-                       } else {
-                               $this->connLogger->warning( "Failed to connect to database $i at '$serverName'." );
-                               $this->mErrorConnection = $conn;
-                               $conn = false;
-                       }
-               }
-
-               if ( $conn && !$conn->isOpen() ) {
-                       // Connection was made but later unrecoverably lost for some reason.
-                       // Do not return a handle that will just throw exceptions on use,
-                       // but let the calling code (e.g. getReaderIndex) try another server.
-                       // See DatabaseMyslBase::ping() for how this can happen.
-                       $this->mErrorConnection = $conn;
-                       $conn = false;
-               }
-
-               return $conn;
-       }
-
-       /**
-        * Open a connection to a foreign DB, or return one if it is already open.
-        *
-        * Increments a reference count on the returned connection which locks the
-        * connection to the requested wiki. This reference count can be
-        * decremented by calling reuseConnection().
-        *
-        * If a connection is open to the appropriate server already, but with the wrong
-        * database, it will be switched to the right database and returned, as long as
-        * it has been freed first with reuseConnection().
-        *
-        * On error, returns false, and the connection which caused the
-        * error will be available via $this->mErrorConnection.
-        *
-        * @note If disable() was called on this LoadBalancer, this method will throw a DBAccessError.
-        *
-        * @param int $i Server index
-        * @param string $wiki Wiki ID to open
-        * @return DatabaseBase
-        */
-       private function openForeignConnection( $i, $wiki ) {
-               list( $dbName, $prefix ) = explode( '-', $wiki, 2 ) + [ '', '' ];
-
-               if ( isset( $this->mConns['foreignUsed'][$i][$wiki] ) ) {
-                       // Reuse an already-used connection
-                       $conn = $this->mConns['foreignUsed'][$i][$wiki];
-                       wfDebug( __METHOD__ . ": reusing connection $i/$wiki\n" );
-               } elseif ( isset( $this->mConns['foreignFree'][$i][$wiki] ) ) {
-                       // Reuse a free connection for the same wiki
-                       $conn = $this->mConns['foreignFree'][$i][$wiki];
-                       unset( $this->mConns['foreignFree'][$i][$wiki] );
-                       $this->mConns['foreignUsed'][$i][$wiki] = $conn;
-                       wfDebug( __METHOD__ . ": reusing free connection $i/$wiki\n" );
-               } elseif ( !empty( $this->mConns['foreignFree'][$i] ) ) {
-                       // Reuse a connection from another wiki
-                       $conn = reset( $this->mConns['foreignFree'][$i] );
-                       $oldWiki = key( $this->mConns['foreignFree'][$i] );
-
-                       // The empty string as a DB name means "don't care".
-                       // DatabaseMysqlBase::open() already handle this on connection.
-                       if ( $dbName !== '' && !$conn->selectDB( $dbName ) ) {
-                               $this->mLastError = "Error selecting database $dbName on server " .
-                                       $conn->getServer() . " from client host " . wfHostname() . "\n";
-                               $this->mErrorConnection = $conn;
-                               $conn = false;
-                       } else {
-                               $conn->tablePrefix( $prefix );
-                               unset( $this->mConns['foreignFree'][$i][$oldWiki] );
-                               $this->mConns['foreignUsed'][$i][$wiki] = $conn;
-                               wfDebug( __METHOD__ . ": reusing free connection from $oldWiki for $wiki\n" );
-                       }
-               } else {
-                       // Open a new connection
-                       $server = $this->mServers[$i];
-                       $server['serverIndex'] = $i;
-                       $server['foreignPoolRefCount'] = 0;
-                       $server['foreign'] = true;
-                       $conn = $this->reallyOpenConnection( $server, $dbName );
-                       if ( !$conn->isOpen() ) {
-                               wfDebug( __METHOD__ . ": error opening connection for $i/$wiki\n" );
-                               $this->mErrorConnection = $conn;
-                               $conn = false;
-                       } else {
-                               $conn->tablePrefix( $prefix );
-                               $this->mConns['foreignUsed'][$i][$wiki] = $conn;
-                               wfDebug( __METHOD__ . ": opened new connection for $i/$wiki\n" );
-                       }
-               }
-
-               // Increment reference count
-               if ( $conn ) {
-                       $refCount = $conn->getLBInfo( 'foreignPoolRefCount' );
-                       $conn->setLBInfo( 'foreignPoolRefCount', $refCount + 1 );
-               }
-
-               return $conn;
-       }
-
-       /**
-        * Test if the specified index represents an open connection
-        *
-        * @param int $index Server index
-        * @access private
-        * @return bool
-        */
-       private function isOpen( $index ) {
-               if ( !is_integer( $index ) ) {
-                       return false;
-               }
-
-               return (bool)$this->getAnyOpenConnection( $index );
-       }
-
-       /**
-        * Really opens a connection. Uncached.
-        * Returns a Database object whether or not the connection was successful.
-        * @access private
-        *
-        * @param array $server
-        * @param bool $dbNameOverride
-        * @throws MWException
-        * @return DatabaseBase
-        */
-       protected function reallyOpenConnection( $server, $dbNameOverride = false ) {
-               if ( $this->disabled ) {
-                       throw new DBAccessError();
-               }
-
-               if ( !is_array( $server ) ) {
-                       throw new InvalidArgumentException( 'You must update your load-balancing configuration. ' .
-                               'See DefaultSettings.php entry for $wgDBservers.' );
-               }
-
-               if ( $dbNameOverride !== false ) {
-                       $server['dbname'] = $dbNameOverride;
-               }
-
-               // Let the handle know what the cluster master is (e.g. "db1052")
-               $masterName = $this->getServerName( $this->getWriterIndex() );
-               $server['clusterMasterHost'] = $masterName;
-
-               // Log when many connection are made on requests
-               if ( ++$this->connsOpened >= self::CONN_HELD_WARN_THRESHOLD ) {
-                       $this->perfLogger->warning( __METHOD__ . ": " .
-                               "{$this->connsOpened}+ connections made (master=$masterName)\n" .
-                               wfBacktrace( true ) );
-               }
-
-               // Set loggers
-               $server['connLogger'] = $this->connLogger;
-               $server['queryLogger'] = $this->queryLogger;
-
-               // Create a live connection object
-               try {
-                       $db = DatabaseBase::factory( $server['type'], $server );
-               } catch ( DBConnectionError $e ) {
-                       // FIXME: This is probably the ugliest thing I have ever done to
-                       // PHP. I'm half-expecting it to segfault, just out of disgust. -- TS
-                       $db = $e->db;
-               }
-
-               $db->setLBInfo( $server );
-               $db->setLazyMasterHandle(
-                       $this->getLazyConnectionRef( DB_MASTER, [], $db->getWikiID() )
-               );
-               $db->setTransactionProfiler( $this->trxProfiler );
-
-               if ( $server['serverIndex'] === $this->getWriterIndex() ) {
-                       if ( $this->trxRoundId !== false ) {
-                               $this->applyTransactionRoundFlags( $db );
-                       }
-                       foreach ( $this->trxRecurringCallbacks as $name => $callback ) {
-                               $db->setTransactionListener( $name, $callback );
-                       }
-               }
-
-               return $db;
-       }
-
-       /**
-        * @throws DBConnectionError
-        * @return bool
-        */
-       private function reportConnectionError() {
-               $conn = $this->mErrorConnection; // The connection which caused the error
-               $context = [
-                       'method' => __METHOD__,
-                       'last_error' => $this->mLastError,
-               ];
-
-               if ( !is_object( $conn ) ) {
-                       // No last connection, probably due to all servers being too busy
-                       wfLogDBError(
-                               "LB failure with no last connection. Connection error: {last_error}",
-                               $context
-                       );
-
-                       // If all servers were busy, mLastError will contain something sensible
-                       throw new DBConnectionError( null, $this->mLastError );
-               } else {
-                       $context['db_server'] = $conn->getProperty( 'mServer' );
-                       wfLogDBError(
-                               "Connection error: {last_error} ({db_server})",
-                               $context
-                       );
-
-                       // throws DBConnectionError
-                       $conn->reportConnectionError( "{$this->mLastError} ({$context['db_server']})" );
-               }
-
-               return false; /* not reached */
-       }
-
-       public function getWriterIndex() {
-               return 0;
-       }
-
-       public function haveIndex( $i ) {
-               return array_key_exists( $i, $this->mServers );
-       }
-
-       public function isNonZeroLoad( $i ) {
-               return array_key_exists( $i, $this->mServers ) && $this->mLoads[$i] != 0;
-       }
-
-       public function getServerCount() {
-               return count( $this->mServers );
-       }
-
-       public function getServerName( $i ) {
-               if ( isset( $this->mServers[$i]['hostName'] ) ) {
-                       $name = $this->mServers[$i]['hostName'];
-               } elseif ( isset( $this->mServers[$i]['host'] ) ) {
-                       $name = $this->mServers[$i]['host'];
-               } else {
-                       $name = '';
-               }
-
-               return ( $name != '' ) ? $name : 'localhost';
-       }
-
-       public function getServerInfo( $i ) {
-               if ( isset( $this->mServers[$i] ) ) {
-                       return $this->mServers[$i];
-               } else {
-                       return false;
-               }
-       }
-
-       public function setServerInfo( $i, array $serverInfo ) {
-               $this->mServers[$i] = $serverInfo;
-       }
-
-       public function getMasterPos() {
-               # If this entire request was served from a replica DB without opening a connection to the
-               # master (however unlikely that may be), then we can fetch the position from the replica DB.
-               $masterConn = $this->getAnyOpenConnection( $this->getWriterIndex() );
-               if ( !$masterConn ) {
-                       $serverCount = count( $this->mServers );
-                       for ( $i = 1; $i < $serverCount; $i++ ) {
-                               $conn = $this->getAnyOpenConnection( $i );
-                               if ( $conn ) {
-                                       return $conn->getSlavePos();
-                               }
-                       }
-               } else {
-                       return $masterConn->getMasterPos();
-               }
-
-               return false;
-       }
-
-       /**
-        * Disable this load balancer. All connections are closed, and any attempt to
-        * open a new connection will result in a DBAccessError.
-        *
-        * @since 1.27
-        */
-       public function disable() {
-               $this->closeAll();
-               $this->disabled = true;
-       }
-
-       public function closeAll() {
-               $this->forEachOpenConnection( function ( DatabaseBase $conn ) {
-                       $conn->close();
-               } );
-
-               $this->mConns = [
-                       'local' => [],
-                       'foreignFree' => [],
-                       'foreignUsed' => [],
-               ];
-               $this->connsOpened = 0;
-       }
-
-       public function closeConnection( IDatabase $conn ) {
-               $serverIndex = $conn->getLBInfo( 'serverIndex' ); // second index level of mConns
-               foreach ( $this->mConns as $type => $connsByServer ) {
-                       if ( !isset( $connsByServer[$serverIndex] ) ) {
-                               continue;
-                       }
-
-                       foreach ( $connsByServer[$serverIndex] as $i => $trackedConn ) {
-                               if ( $conn === $trackedConn ) {
-                                       unset( $this->mConns[$type][$serverIndex][$i] );
-                                       --$this->connsOpened;
-                                       break 2;
-                               }
-                       }
-               }
-
-               $conn->close();
-       }
-
-       public function commitAll( $fname = __METHOD__ ) {
-               $failures = [];
-
-               $restore = ( $this->trxRoundId !== false );
-               $this->trxRoundId = false;
-               $this->forEachOpenConnection(
-                       function ( DatabaseBase $conn ) use ( $fname, $restore, &$failures ) {
-                               try {
-                                       $conn->commit( $fname, $conn::FLUSHING_ALL_PEERS );
-                               } catch ( DBError $e ) {
-                                       call_user_func( $this->errorLogger, $e );
-                                       $failures[] = "{$conn->getServer()}: {$e->getMessage()}";
-                               }
-                               if ( $restore && $conn->getLBInfo( 'master' ) ) {
-                                       $this->undoTransactionRoundFlags( $conn );
-                               }
-                       }
-               );
-
-               if ( $failures ) {
-                       throw new DBExpectedError(
-                               null,
-                               "Commit failed on server(s) " . implode( "\n", array_unique( $failures ) )
-                       );
-               }
-       }
-
-       /**
-        * Perform all pre-commit callbacks that remain part of the atomic transactions
-        * and disable any post-commit callbacks until runMasterPostTrxCallbacks()
-        * @since 1.28
-        */
-       public function finalizeMasterChanges() {
-               $this->forEachOpenMasterConnection( function ( DatabaseBase $conn ) {
-                       // Any error should cause all DB transactions to be rolled back together
-                       $conn->setTrxEndCallbackSuppression( false );
-                       $conn->runOnTransactionPreCommitCallbacks();
-                       // Defer post-commit callbacks until COMMIT finishes for all DBs
-                       $conn->setTrxEndCallbackSuppression( true );
-               } );
-       }
-
-       /**
-        * Perform all pre-commit checks for things like replication safety
-        * @param array $options Includes:
-        *   - maxWriteDuration : max write query duration time in seconds
-        * @throws DBTransactionError
-        * @since 1.28
-        */
-       public function approveMasterChanges( array $options ) {
-               $limit = isset( $options['maxWriteDuration'] ) ? $options['maxWriteDuration'] : 0;
-               $this->forEachOpenMasterConnection( function ( DatabaseBase $conn ) use ( $limit ) {
-                       // If atomic sections or explicit transactions are still open, some caller must have
-                       // caught an exception but failed to properly rollback any changes. Detect that and
-                       // throw and error (causing rollback).
-                       if ( $conn->explicitTrxActive() ) {
-                               throw new DBTransactionError(
-                                       $conn,
-                                       "Explicit transaction still active. A caller may have caught an error."
-                               );
-                       }
-                       // Assert that the time to replicate the transaction will be sane.
-                       // If this fails, then all DB transactions will be rollback back together.
-                       $time = $conn->pendingWriteQueryDuration( $conn::ESTIMATE_DB_APPLY );
-                       if ( $limit > 0 && $time > $limit ) {
-                               throw new DBTransactionError(
-                                       $conn,
-                                       wfMessage( 'transaction-duration-limit-exceeded', $time, $limit )->text()
-                               );
-                       }
-                       // If a connection sits idle while slow queries execute on another, that connection
-                       // may end up dropped before the commit round is reached. Ping servers to detect this.
-                       if ( $conn->writesOrCallbacksPending() && !$conn->ping() ) {
-                               throw new DBTransactionError(
-                                       $conn,
-                                       "A connection to the {$conn->getDBname()} database was lost before commit."
-                               );
-                       }
-               } );
-       }
-
-       /**
-        * Flush any master transaction snapshots and set DBO_TRX (if DBO_DEFAULT is set)
-        *
-        * The DBO_TRX setting will be reverted to the default in each of these methods:
-        *   - commitMasterChanges()
-        *   - rollbackMasterChanges()
-        *   - commitAll()
-        * This allows for custom transaction rounds from any outer transaction scope.
-        *
-        * @param string $fname
-        * @throws DBExpectedError
-        * @since 1.28
-        */
-       public function beginMasterChanges( $fname = __METHOD__ ) {
-               if ( $this->trxRoundId !== false ) {
-                       throw new DBTransactionError(
-                               null,
-                               "$fname: Transaction round '{$this->trxRoundId}' already started."
-                       );
-               }
-               $this->trxRoundId = $fname;
-
-               $failures = [];
-               $this->forEachOpenMasterConnection(
-                       function ( DatabaseBase $conn ) use ( $fname, &$failures ) {
-                               $conn->setTrxEndCallbackSuppression( true );
-                               try {
-                                       $conn->flushSnapshot( $fname );
-                               } catch ( DBError $e ) {
-                                       call_user_func( $this->errorLogger, $e );
-                                       $failures[] = "{$conn->getServer()}: {$e->getMessage()}";
-                               }
-                               $conn->setTrxEndCallbackSuppression( false );
-                               $this->applyTransactionRoundFlags( $conn );
-                       }
-               );
-
-               if ( $failures ) {
-                       throw new DBExpectedError(
-                               null,
-                               "$fname: Flush failed on server(s) " . implode( "\n", array_unique( $failures ) )
-                       );
-               }
-       }
-
-       public function commitMasterChanges( $fname = __METHOD__ ) {
-               $failures = [];
-
-               $restore = ( $this->trxRoundId !== false );
-               $this->trxRoundId = false;
-               $this->forEachOpenMasterConnection(
-                       function ( DatabaseBase $conn ) use ( $fname, $restore, &$failures ) {
-                               try {
-                                       if ( $conn->writesOrCallbacksPending() ) {
-                                               $conn->commit( $fname, $conn::FLUSHING_ALL_PEERS );
-                                       } elseif ( $restore ) {
-                                               $conn->flushSnapshot( $fname );
-                                       }
-                               } catch ( DBError $e ) {
-                                       call_user_func( $this->errorLogger, $e );
-                                       $failures[] = "{$conn->getServer()}: {$e->getMessage()}";
-                               }
-                               if ( $restore ) {
-                                       $this->undoTransactionRoundFlags( $conn );
-                               }
-                       }
-               );
-
-               if ( $failures ) {
-                       throw new DBExpectedError(
-                               null,
-                               "$fname: Commit failed on server(s) " . implode( "\n", array_unique( $failures ) )
-                       );
-               }
-       }
-
-       /**
-        * Issue all pending post-COMMIT/ROLLBACK callbacks
-        * @param integer $type IDatabase::TRIGGER_* constant
-        * @return Exception|null The first exception or null if there were none
-        * @since 1.28
-        */
-       public function runMasterPostTrxCallbacks( $type ) {
-               $e = null; // first exception
-               $this->forEachOpenMasterConnection( function ( DatabaseBase $conn ) use ( $type, &$e ) {
-                       $conn->setTrxEndCallbackSuppression( false );
-                       if ( $conn->writesOrCallbacksPending() ) {
-                               // This happens if onTransactionIdle() callbacks leave callbacks on *another* DB
-                               // (which finished its callbacks already). Warn and recover in this case. Let the
-                               // callbacks run in the final commitMasterChanges() in LBFactory::shutdown().
-                               wfWarn( __METHOD__ . ": did not expect writes/callbacks pending." );
-                               return;
-                       } elseif ( $conn->trxLevel() ) {
-                               // This happens for single-DB setups where DB_REPLICA uses the master DB,
-                               // thus leaving an implicit read-only transaction open at this point. It
-                               // also happens if onTransactionIdle() callbacks leave implicit transactions
-                               // open on *other* DBs (which is slightly improper). Let these COMMIT on the
-                               // next call to commitMasterChanges(), possibly in LBFactory::shutdown().
-                               return;
-                       }
-                       try {
-                               $conn->runOnTransactionIdleCallbacks( $type );
-                       } catch ( Exception $ex ) {
-                               $e = $e ?: $ex;
-                       }
-                       try {
-                               $conn->runTransactionListenerCallbacks( $type );
-                       } catch ( Exception $ex ) {
-                               $e = $e ?: $ex;
-                       }
-               } );
-
-               return $e;
-       }
-
-       /**
-        * Issue ROLLBACK only on master, only if queries were done on connection
-        * @param string $fname Caller name
-        * @throws DBExpectedError
-        * @since 1.23
-        */
-       public function rollbackMasterChanges( $fname = __METHOD__ ) {
-               $restore = ( $this->trxRoundId !== false );
-               $this->trxRoundId = false;
-               $this->forEachOpenMasterConnection(
-                       function ( DatabaseBase $conn ) use ( $fname, $restore ) {
-                               if ( $conn->writesOrCallbacksPending() ) {
-                                       $conn->rollback( $fname, $conn::FLUSHING_ALL_PEERS );
-                               }
-                               if ( $restore ) {
-                                       $this->undoTransactionRoundFlags( $conn );
-                               }
-                       }
-               );
-       }
-
-       /**
-        * Suppress all pending post-COMMIT/ROLLBACK callbacks
-        * @return Exception|null The first exception or null if there were none
-        * @since 1.28
-        */
-       public function suppressTransactionEndCallbacks() {
-               $this->forEachOpenMasterConnection( function ( DatabaseBase $conn ) {
-                       $conn->setTrxEndCallbackSuppression( true );
-               } );
-       }
-
-       /**
-        * @param IDatabase $conn
-        */
-       private function applyTransactionRoundFlags( IDatabase $conn ) {
-               if ( $conn->getFlag( DBO_DEFAULT ) ) {
-                       // DBO_TRX is controlled entirely by CLI mode presence with DBO_DEFAULT.
-                       // Force DBO_TRX even in CLI mode since a commit round is expected soon.
-                       $conn->setFlag( DBO_TRX, $conn::REMEMBER_PRIOR );
-                       // If config has explicitly requested DBO_TRX be either on or off by not
-                       // setting DBO_DEFAULT, then respect that. Forcing no transactions is useful
-                       // for things like blob stores (ExternalStore) which want auto-commit mode.
-               }
-       }
-
-       /**
-        * @param IDatabase $conn
-        */
-       private function undoTransactionRoundFlags( IDatabase $conn ) {
-               if ( $conn->getFlag( DBO_DEFAULT ) ) {
-                       $conn->restoreFlags( $conn::RESTORE_PRIOR );
-               }
-       }
-
-       /**
-        * Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshot
-        *
-        * @param string $fname Caller name
-        * @since 1.28
-        */
-       public function flushReplicaSnapshots( $fname = __METHOD__ ) {
-               $this->forEachOpenReplicaConnection( function ( DatabaseBase $conn ) {
-                       $conn->flushSnapshot( __METHOD__ );
-               } );
-       }
-
-       /**
-        * @return bool Whether a master connection is already open
-        * @since 1.24
-        */
-       public function hasMasterConnection() {
-               return $this->isOpen( $this->getWriterIndex() );
-       }
-
-       /**
-        * Determine if there are pending changes in a transaction by this thread
-        * @since 1.23
-        * @return bool
-        */
-       public function hasMasterChanges() {
-               $pending = 0;
-               $this->forEachOpenMasterConnection( function ( DatabaseBase $conn ) use ( &$pending ) {
-                       $pending |= $conn->writesOrCallbacksPending();
-               } );
-
-               return (bool)$pending;
-       }
-
-       /**
-        * Get the timestamp of the latest write query done by this thread
-        * @since 1.25
-        * @return float|bool UNIX timestamp or false
-        */
-       public function lastMasterChangeTimestamp() {
-               $lastTime = false;
-               $this->forEachOpenMasterConnection( function ( DatabaseBase $conn ) use ( &$lastTime ) {
-                       $lastTime = max( $lastTime, $conn->lastDoneWrites() );
-               } );
-
-               return $lastTime;
-       }
-
-       /**
-        * Check if this load balancer object had any recent or still
-        * pending writes issued against it by this PHP thread
-        *
-        * @param float $age How many seconds ago is "recent" [defaults to mWaitTimeout]
-        * @return bool
-        * @since 1.25
-        */
-       public function hasOrMadeRecentMasterChanges( $age = null ) {
-               $age = ( $age === null ) ? $this->mWaitTimeout : $age;
-
-               return ( $this->hasMasterChanges()
-                       || $this->lastMasterChangeTimestamp() > microtime( true ) - $age );
-       }
-
-       /**
-        * Get the list of callers that have pending master changes
-        *
-        * @return string[] List of method names
-        * @since 1.27
-        */
-       public function pendingMasterChangeCallers() {
-               $fnames = [];
-               $this->forEachOpenMasterConnection( function ( DatabaseBase $conn ) use ( &$fnames ) {
-                       $fnames = array_merge( $fnames, $conn->pendingWriteCallers() );
-               } );
-
-               return $fnames;
-       }
-
-       public function getLaggedReplicaMode( $wiki = false ) {
-               // No-op if there is only one DB (also avoids recursion)
-               if ( !$this->laggedReplicaMode && $this->getServerCount() > 1 ) {
-                       try {
-                               // See if laggedReplicaMode gets set
-                               $conn = $this->getConnection( DB_REPLICA, false, $wiki );
-                               $this->reuseConnection( $conn );
-                       } catch ( DBConnectionError $e ) {
-                               // Avoid expensive re-connect attempts and failures
-                               $this->allReplicasDownMode = true;
-                               $this->laggedReplicaMode = true;
-                       }
-               }
-
-               return $this->laggedReplicaMode;
-       }
-
-       /**
-        * @param bool $wiki
-        * @return bool
-        * @deprecated 1.28; use getLaggedReplicaMode()
-        */
-       public function getLaggedSlaveMode( $wiki = false ) {
-               return $this->getLaggedReplicaMode( $wiki );
-       }
-
-       /**
-        * @note This method will never cause a new DB connection
-        * @return bool Whether any generic connection used for reads was highly "lagged"
-        * @since 1.28
-        */
-       public function laggedReplicaUsed() {
-               return $this->laggedReplicaMode;
-       }
-
-       /**
-        * @return bool
-        * @since 1.27
-        * @deprecated Since 1.28; use laggedReplicaUsed()
-        */
-       public function laggedSlaveUsed() {
-               return $this->laggedReplicaUsed();
-       }
-
-       /**
-        * @note This method may trigger a DB connection if not yet done
-        * @param string|bool $wiki Wiki ID, or false for the current wiki
-        * @param IDatabase|null DB master connection; used to avoid loops [optional]
-        * @return string|bool Reason the master is read-only or false if it is not
-        * @since 1.27
-        */
-       public function getReadOnlyReason( $wiki = false, IDatabase $conn = null ) {
-               if ( $this->readOnlyReason !== false ) {
-                       return $this->readOnlyReason;
-               } elseif ( $this->getLaggedReplicaMode( $wiki ) ) {
-                       if ( $this->allReplicasDownMode ) {
-                               return 'The database has been automatically locked ' .
-                                       'until the replica database servers become available';
-                       } else {
-                               return 'The database has been automatically locked ' .
-                                       'while the replica database servers catch up to the master.';
-                       }
-               } elseif ( $this->masterRunningReadOnly( $wiki, $conn ) ) {
-                       return 'The database master is running in read-only mode.';
-               }
-
-               return false;
-       }
-
-       /**
-        * @param string $wiki Wiki ID, or false for the current wiki
-        * @param IDatabase|null DB master connectionl used to avoid loops [optional]
-        * @return bool
-        */
-       private function masterRunningReadOnly( $wiki, IDatabase $conn = null ) {
-               $cache = $this->wanCache;
-               $masterServer = $this->getServerName( $this->getWriterIndex() );
-
-               return (bool)$cache->getWithSetCallback(
-                       $cache->makeGlobalKey( __CLASS__, 'server-read-only', $masterServer ),
-                       self::TTL_CACHE_READONLY,
-                       function () use ( $wiki, $conn ) {
-                               $this->trxProfiler->setSilenced( true );
-                               try {
-                                       $dbw = $conn ?: $this->getConnection( DB_MASTER, [], $wiki );
-                                       $readOnly = (int)$dbw->serverIsReadOnly();
-                               } catch ( DBError $e ) {
-                                       $readOnly = 0;
-                               }
-                               $this->trxProfiler->setSilenced( false );
-                               return $readOnly;
-                       },
-                       [ 'pcTTL' => $cache::TTL_PROC_LONG, 'busyValue' => 0 ]
-               );
-       }
-
-       public function allowLagged( $mode = null ) {
-               if ( $mode === null ) {
-                       return $this->mAllowLagged;
-               }
-               $this->mAllowLagged = $mode;
-
-               return $this->mAllowLagged;
-       }
-
-       public function pingAll() {
-               $success = true;
-               $this->forEachOpenConnection( function ( DatabaseBase $conn ) use ( &$success ) {
-                       if ( !$conn->ping() ) {
-                               $success = false;
-                       }
-               } );
-
-               return $success;
-       }
-
-       public function forEachOpenConnection( $callback, array $params = [] ) {
-               foreach ( $this->mConns as $connsByServer ) {
-                       foreach ( $connsByServer as $serverConns ) {
-                               foreach ( $serverConns as $conn ) {
-                                       $mergedParams = array_merge( [ $conn ], $params );
-                                       call_user_func_array( $callback, $mergedParams );
-                               }
-                       }
-               }
-       }
-
-       /**
-        * Call a function with each open connection object to a master
-        * @param callable $callback
-        * @param array $params
-        * @since 1.28
-        */
-       public function forEachOpenMasterConnection( $callback, array $params = [] ) {
-               $masterIndex = $this->getWriterIndex();
-               foreach ( $this->mConns as $connsByServer ) {
-                       if ( isset( $connsByServer[$masterIndex] ) ) {
-                               /** @var DatabaseBase $conn */
-                               foreach ( $connsByServer[$masterIndex] as $conn ) {
-                                       $mergedParams = array_merge( [ $conn ], $params );
-                                       call_user_func_array( $callback, $mergedParams );
-                               }
-                       }
-               }
-       }
-
-       /**
-        * Call a function with each open replica DB connection object
-        * @param callable $callback
-        * @param array $params
-        * @since 1.28
-        */
-       public function forEachOpenReplicaConnection( $callback, array $params = [] ) {
-               foreach ( $this->mConns as $connsByServer ) {
-                       foreach ( $connsByServer as $i => $serverConns ) {
-                               if ( $i === $this->getWriterIndex() ) {
-                                       continue; // skip master
-                               }
-                               foreach ( $serverConns as $conn ) {
-                                       $mergedParams = array_merge( [ $conn ], $params );
-                                       call_user_func_array( $callback, $mergedParams );
-                               }
-                       }
-               }
-       }
-
-       public function getMaxLag( $wiki = false ) {
-               $maxLag = -1;
-               $host = '';
-               $maxIndex = 0;
-
-               if ( $this->getServerCount() <= 1 ) {
-                       return [ $host, $maxLag, $maxIndex ]; // no replication = no lag
-               }
-
-               $lagTimes = $this->getLagTimes( $wiki );
-               foreach ( $lagTimes as $i => $lag ) {
-                       if ( $this->mLoads[$i] > 0 && $lag > $maxLag ) {
-                               $maxLag = $lag;
-                               $host = $this->mServers[$i]['host'];
-                               $maxIndex = $i;
-                       }
-               }
-
-               return [ $host, $maxLag, $maxIndex ];
-       }
-
-       public function getLagTimes( $wiki = false ) {
-               if ( $this->getServerCount() <= 1 ) {
-                       return [ 0 => 0 ]; // no replication = no lag
-               }
-
-               # Send the request to the load monitor
-               return $this->getLoadMonitor()->getLagTimes( array_keys( $this->mServers ), $wiki );
-       }
-
-       public function safeGetLag( IDatabase $conn ) {
-               if ( $this->getServerCount() == 1 ) {
-                       return 0;
-               } else {
-                       return $conn->getLag();
-               }
-       }
-
-       /**
-        * Wait for a replica DB to reach a specified master position
-        *
-        * This will connect to the master to get an accurate position if $pos is not given
-        *
-        * @param IDatabase $conn Replica DB
-        * @param DBMasterPos|bool $pos Master position; default: current position
-        * @param integer $timeout Timeout in seconds
-        * @return bool Success
-        * @since 1.27
-        */
-       public function safeWaitForMasterPos( IDatabase $conn, $pos = false, $timeout = 10 ) {
-               if ( $this->getServerCount() == 1 || !$conn->getLBInfo( 'replica' ) ) {
-                       return true; // server is not a replica DB
-               }
-
-               $pos = $pos ?: $this->getConnection( DB_MASTER )->getMasterPos();
-               if ( !( $pos instanceof DBMasterPos ) ) {
-                       return false; // something is misconfigured
-               }
-
-               $result = $conn->masterPosWait( $pos, $timeout );
-               if ( $result == -1 || is_null( $result ) ) {
-                       $msg = __METHOD__ . ": Timed out waiting on {$conn->getServer()} pos {$pos}";
-                       $this->replLogger->warning( "$msg\n" );
-                       $this->perfLogger->warning( "$msg:\n" . wfBacktrace( true ) );
-                       $ok = false;
-               } else {
-                       $this->replLogger->info( __METHOD__ . ": Done\n" );
-                       $ok = true;
-               }
-
-               return $ok;
-       }
-
-       /**
-        * Clear the cache for slag lag delay times
-        *
-        * This is only used for testing
-        * @since 1.26
-        */
-       public function clearLagTimeCache() {
-               $this->getLoadMonitor()->clearCaches();
-       }
-
-       /**
-        * Set a callback via DatabaseBase::setTransactionListener() on
-        * all current and future master connections of this load balancer
-        *
-        * @param string $name Callback name
-        * @param callable|null $callback
-        * @since 1.28
-        */
-       public function setTransactionListener( $name, callable $callback = null ) {
-               if ( $callback ) {
-                       $this->trxRecurringCallbacks[$name] = $callback;
-               } else {
-                       unset( $this->trxRecurringCallbacks[$name] );
-               }
-               $this->forEachOpenMasterConnection(
-                       function ( DatabaseBase $conn ) use ( $name, $callback ) {
-                               $conn->setTransactionListener( $name, $callback );
-                       }
-               );
-       }
-
-       /**
-        * Set a new table prefix for the existing local wiki ID for testing
-        *
-        * @param string $prefix
-        * @since 1.28
-        */
-       public function setDomainPrefix( $prefix ) {
-               list( $dbName, ) = explode( '-', $this->localDomain, 2 );
-
-               $this->localDomain = "{$dbName}-{$prefix}";
-       }
-}
index 8c019d8..dde678f 100644 (file)
@@ -439,7 +439,7 @@ class MWDebug {
 
                if ( $wgDebugComments ) {
                        $html .= "<!-- Debug output:\n" .
-                               htmlspecialchars( implode( "\n", self::$debug ) ) .
+                               htmlspecialchars( implode( "\n", self::$debug ), ENT_NOQUOTES ) .
                                "\n\n-->";
                }
 
index 526b4ab..4d7c84d 100644 (file)
@@ -70,6 +70,14 @@ class LegacyLogger extends AbstractLogger {
                LogLevel::EMERGENCY => 600,
        ];
 
+       /**
+        * @var array
+        */
+       protected static $dbChannels = [
+               'DBQuery' => true,
+               'DBConnection' => true
+       ];
+
        /**
         * @param string $channel
         */
@@ -83,11 +91,31 @@ class LegacyLogger extends AbstractLogger {
         * @param string|int $level
         * @param string $message
         * @param array $context
+        * @return null
         */
        public function log( $level, $message, array $context = [] ) {
-               if ( self::shouldEmit( $this->channel, $message, $level, $context ) ) {
-                       $text = self::format( $this->channel, $message, $context );
-                       $destination = self::destination( $this->channel, $message, $context );
+               if ( is_string( $level ) ) {
+                       $level = self::$levelMapping[$level];
+               }
+               if ( $this->channel === 'DBQuery' && isset( $context['method'] )
+                       && isset( $context['master'] ) && isset( $context['runtime'] )
+               ) {
+                       MWDebug::query( $message, $context['method'], $context['master'], $context['runtime'] );
+                       return; // only send profiling data to MWDebug profiling
+               }
+
+               if ( isset( self::$dbChannels[$this->channel] )
+                       && $level >= self::$levelMapping[LogLevel::ERROR]
+               ) {
+                       // Format and write DB errors to the legacy locations
+                       $effectiveChannel = 'wfLogDBError';
+               } else {
+                       $effectiveChannel = $this->channel;
+               }
+
+               if ( self::shouldEmit( $effectiveChannel, $message, $level, $context ) ) {
+                       $text = self::format( $effectiveChannel, $message, $context );
+                       $destination = self::destination( $effectiveChannel, $message, $context );
                        self::emit( $text, $destination );
                }
                if ( !isset( $context['private'] ) || !$context['private'] ) {
@@ -101,7 +129,7 @@ class LegacyLogger extends AbstractLogger {
         *
         * @param string $channel
         * @param string $message
-        * @param string|int $level \Psr\Log\LogEvent constant or Monlog level int
+        * @param string|int $level \Psr\Log\LogEvent constant or Monolog level int
         * @param array $context
         * @return bool True if message should be sent to disk/network, false
         * otherwise
@@ -109,6 +137,10 @@ class LegacyLogger extends AbstractLogger {
        public static function shouldEmit( $channel, $message, $level, $context ) {
                global $wgDebugLogFile, $wgDBerrorLog, $wgDebugLogGroups;
 
+               if ( is_string( $level ) ) {
+                       $level = self::$levelMapping[$level];
+               }
+
                if ( $channel === 'wfLogDBError' ) {
                        // wfLogDBError messages are emitted if a database log location is
                        // specfied.
@@ -136,9 +168,6 @@ class LegacyLogger extends AbstractLogger {
                                }
 
                                if ( isset( $logConfig['level'] ) ) {
-                                       if ( is_string( $level ) ) {
-                                               $level = self::$levelMapping[$level];
-                                       }
                                        $shouldEmit = $level >= self::$levelMapping[$logConfig['level']];
                                }
                        } else {
@@ -298,6 +327,7 @@ class LegacyLogger extends AbstractLogger {
         * @param string $channel
         * @param string $message
         * @param array $context
+        * @return null
         */
        protected static function formatAsWfDebugLog( $channel, $message, $context ) {
                $time = wfTimestamp( TS_DB );
@@ -432,7 +462,6 @@ class LegacyLogger extends AbstractLogger {
        *
        * @param string $text
        * @param string $file Filename
-       * @throws MWException
        */
        public static function emit( $text, $file ) {
                if ( substr( $file, 0, 4 ) == 'udp:' ) {
index a348719..6585575 100644 (file)
@@ -24,7 +24,7 @@ class AtomicSectionUpdate implements DeferrableUpdate, DeferrableCallback {
                $this->callback = $callback;
 
                if ( $this->dbw->trxLevel() ) {
-                       $this->dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ] );
+                       $this->dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ], $fname );
                }
        }
 
index d26cf9d..d61dec2 100644 (file)
@@ -23,7 +23,7 @@ class AutoCommitUpdate implements DeferrableUpdate, DeferrableCallback {
                $this->callback = $callback;
 
                if ( $this->dbw->trxLevel() ) {
-                       $this->dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ] );
+                       $this->dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ], $fname );
                }
        }
 
index d24ebde..1ba6c1f 100644 (file)
@@ -52,6 +52,8 @@ class DeferredUpdates {
        private static $preSendUpdates = [];
        /** @var DeferrableUpdate[] Updates to be deferred until after request end */
        private static $postSendUpdates = [];
+       /** @var bool Whether to just run updates in addUpdate() */
+       private static $immediateMode = false;
 
        const ALL = 0; // all updates; in web requests, use only after flushing the output buffer
        const PRESEND = 1; // for updates that should run before flushing output buffer
@@ -85,6 +87,12 @@ class DeferredUpdates {
                        self::push( self::$postSendUpdates, $update );
                }
 
+               if ( self::$immediateMode ) {
+                       // No more explicit doUpdates() calls will happen, so run this now
+                       self::doUpdates( 'run' );
+                       return;
+               }
+
                // Try to run the updates now if in CLI mode and no transaction is active.
                // This covers scripts that don't/barely use the DB but make updates to other stores.
                if ( $wgCommandLineMode ) {
@@ -126,6 +134,14 @@ class DeferredUpdates {
                }
        }
 
+       /**
+        * @param bool $value Whether to just immediately run updates in addUpdate()
+        * @since 1.28
+        */
+       public static function setImmediateMode( $value ) {
+               self::$immediateMode = (bool)$value;
+       }
+
        /**
         * @param DeferrableUpdate[] $queue
         * @param DeferrableUpdate $update
@@ -214,6 +230,10 @@ class DeferredUpdates {
                                                $firstKey = key( self::$executeContext['subqueue'] );
                                                unset( self::$executeContext['subqueue'][$firstKey] );
 
+                                               if ( $subUpdate instanceof DataUpdate ) {
+                                                       $subUpdate->setTransactionTicket( $ticket );
+                                               }
+
                                                $guiError = self::runUpdate( $subUpdate, $lbFactory, $stage );
                                                $reportableError = $reportableError ?: $guiError;
                                        }
index 4159166..6aa3831 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  */
 use MediaWiki\MediaWikiServices;
+use Wikimedia\ScopedCallback;
 
 /**
  * Update object handling the cleanup of links tables after a page was deleted.
@@ -108,87 +109,81 @@ class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate {
                        }
                }
 
-               // If using cascading deletes, we can skip some explicit deletes
-               if ( !$dbw->cascadingDeletes() ) {
-                       // Delete outgoing links
-                       $this->batchDeleteByPK(
-                               'pagelinks',
-                               [ 'pl_from' => $id ],
-                               [ 'pl_from', 'pl_namespace', 'pl_title' ],
-                               $batchSize
-                       );
-                       $this->batchDeleteByPK(
-                               'imagelinks',
-                               [ 'il_from' => $id ],
-                               [ 'il_from', 'il_to' ],
-                               $batchSize
-                       );
-                       $this->batchDeleteByPK(
-                               'categorylinks',
-                               [ 'cl_from' => $id ],
-                               [ 'cl_from', 'cl_to' ],
-                               $batchSize
-                       );
-                       $this->batchDeleteByPK(
-                               'templatelinks',
-                               [ 'tl_from' => $id ],
-                               [ 'tl_from', 'tl_namespace', 'tl_title' ],
-                               $batchSize
-                       );
-                       $this->batchDeleteByPK(
-                               'externallinks',
-                               [ 'el_from' => $id ],
-                               [ 'el_id' ],
-                               $batchSize
-                       );
-                       $this->batchDeleteByPK(
-                               'langlinks',
-                               [ 'll_from' => $id ],
-                               [ 'll_from', 'll_lang' ],
-                               $batchSize
-                       );
-                       $this->batchDeleteByPK(
-                               'iwlinks',
-                               [ 'iwl_from' => $id ],
-                               [ 'iwl_from', 'iwl_prefix', 'iwl_title' ],
-                               $batchSize
-                       );
-                       // Delete any redirect entry or page props entries
-                       $dbw->delete( 'redirect', [ 'rd_from' => $id ], __METHOD__ );
-                       $dbw->delete( 'page_props', [ 'pp_page' => $id ], __METHOD__ );
-               }
+               $this->batchDeleteByPK(
+                       'pagelinks',
+                       [ 'pl_from' => $id ],
+                       [ 'pl_from', 'pl_namespace', 'pl_title' ],
+                       $batchSize
+               );
+               $this->batchDeleteByPK(
+                       'imagelinks',
+                       [ 'il_from' => $id ],
+                       [ 'il_from', 'il_to' ],
+                       $batchSize
+               );
+               $this->batchDeleteByPK(
+                       'categorylinks',
+                       [ 'cl_from' => $id ],
+                       [ 'cl_from', 'cl_to' ],
+                       $batchSize
+               );
+               $this->batchDeleteByPK(
+                       'templatelinks',
+                       [ 'tl_from' => $id ],
+                       [ 'tl_from', 'tl_namespace', 'tl_title' ],
+                       $batchSize
+               );
+               $this->batchDeleteByPK(
+                       'externallinks',
+                       [ 'el_from' => $id ],
+                       [ 'el_id' ],
+                       $batchSize
+               );
+               $this->batchDeleteByPK(
+                       'langlinks',
+                       [ 'll_from' => $id ],
+                       [ 'll_from', 'll_lang' ],
+                       $batchSize
+               );
+               $this->batchDeleteByPK(
+                       'iwlinks',
+                       [ 'iwl_from' => $id ],
+                       [ 'iwl_from', 'iwl_prefix', 'iwl_title' ],
+                       $batchSize
+               );
 
-               // If using cleanup triggers, we can skip some manual deletes
-               if ( !$dbw->cleanupTriggers() ) {
-                       // Find recentchanges entries to clean up...
-                       $rcIdsForTitle = $dbw->selectFieldValues(
-                               'recentchanges',
-                               'rc_id',
-                               [
-                                       'rc_type != ' . RC_LOG,
-                                       'rc_namespace' => $title->getNamespace(),
-                                       'rc_title' => $title->getDBkey(),
-                                       'rc_timestamp < ' .
-                                               $dbw->addQuotes( $dbw->timestamp( $this->timestamp ) )
-                               ],
-                               __METHOD__
-                       );
-                       $rcIdsForPage = $dbw->selectFieldValues(
-                               'recentchanges',
-                               'rc_id',
-                               [ 'rc_type != ' . RC_LOG, 'rc_cur_id' => $id ],
-                               __METHOD__
-                       );
+               // Delete any redirect entry or page props entries
+               $dbw->delete( 'redirect', [ 'rd_from' => $id ], __METHOD__ );
+               $dbw->delete( 'page_props', [ 'pp_page' => $id ], __METHOD__ );
+
+               // Find recentchanges entries to clean up...
+               $rcIdsForTitle = $dbw->selectFieldValues(
+                       'recentchanges',
+                       'rc_id',
+                       [
+                               'rc_type != ' . RC_LOG,
+                               'rc_namespace' => $title->getNamespace(),
+                               'rc_title' => $title->getDBkey(),
+                               'rc_timestamp < ' .
+                                       $dbw->addQuotes( $dbw->timestamp( $this->timestamp ) )
+                       ],
+                       __METHOD__
+               );
+               $rcIdsForPage = $dbw->selectFieldValues(
+                       'recentchanges',
+                       'rc_id',
+                       [ 'rc_type != ' . RC_LOG, 'rc_cur_id' => $id ],
+                       __METHOD__
+               );
 
-                       // T98706: delete by PK to avoid lock contention with RC delete log insertions
-                       $rcIdBatches = array_chunk( array_merge( $rcIdsForTitle, $rcIdsForPage ), $batchSize );
-                       foreach ( $rcIdBatches as $rcIdBatch ) {
-                               $dbw->delete( 'recentchanges', [ 'rc_id' => $rcIdBatch ], __METHOD__ );
-                               if ( count( $rcIdBatches ) > 1 ) {
-                                       $lbFactory->commitAndWaitForReplication(
-                                               __METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ]
-                                       );
-                               }
+               // T98706: delete by PK to avoid lock contention with RC delete log insertions
+               $rcIdBatches = array_chunk( array_merge( $rcIdsForTitle, $rcIdsForPage ), $batchSize );
+               foreach ( $rcIdBatches as $rcIdBatch ) {
+                       $dbw->delete( 'recentchanges', [ 'rc_id' => $rcIdBatch ], __METHOD__ );
+                       if ( count( $rcIdBatches ) > 1 ) {
+                               $lbFactory->commitAndWaitForReplication(
+                                       __METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ]
+                               );
                        }
                }
 
index e24a9c0..c7d378e 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 use MediaWiki\MediaWikiServices;
+use Wikimedia\ScopedCallback;
 
 /**
  * Class the manages updates of *_link tables as well as similar extension-managed tables
@@ -174,9 +175,12 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
                // Commit and release the lock (if set)
                ScopedCallback::consume( $scopedLock );
                // Run post-commit hooks without DBO_TRX
-               $this->getDB()->onTransactionIdle( function() {
-                       Hooks::run( 'LinksUpdateComplete', [ &$this ] );
-               } );
+               $this->getDB()->onTransactionIdle(
+                       function () {
+                               Hooks::run( 'LinksUpdateComplete', [ &$this, $this->ticket ] );
+                       },
+                       __METHOD__
+               );
        }
 
        /**
index 47b162c..5247e97 100644 (file)
@@ -19,7 +19,7 @@ class MWCallableUpdate implements DeferrableUpdate, DeferrableCallback {
                $this->fname = $fname;
 
                if ( $dbw && $dbw->trxLevel() ) {
-                       $dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ] );
+                       $dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ], $fname );
                }
        }
 
index d8bc35b..ab4a609 100644 (file)
  *
  * @file
  */
+use Wikimedia\Assert\Assert;
 
 /**
  * Class for handling updates to the site_stats table
  */
-class SiteStatsUpdate implements DeferrableUpdate {
+class SiteStatsUpdate implements DeferrableUpdate, MergeableUpdate {
        /** @var int */
        protected $edits = 0;
-
        /** @var int */
        protected $pages = 0;
-
        /** @var int */
        protected $articles = 0;
-
        /** @var int */
        protected $users = 0;
-
        /** @var int */
        protected $images = 0;
 
+       private static $counters = [ 'edits', 'pages', 'articles', 'users', 'images' ];
+
        // @todo deprecate this constructor
        function __construct( $views, $edits, $good, $pages = 0, $users = 0 ) {
                $this->edits = $edits;
@@ -45,6 +44,15 @@ class SiteStatsUpdate implements DeferrableUpdate {
                $this->users = $users;
        }
 
+       public function merge( MergeableUpdate $update ) {
+               /** @var SiteStatsUpdate $update */
+               Assert::parameterType( __CLASS__, $update, '$update' );
+
+               foreach ( self::$counters as $field ) {
+                       $this->$field += $update->$field;
+               }
+       }
+
        /**
         * @param array $deltas
         * @return SiteStatsUpdate
@@ -52,8 +60,7 @@ class SiteStatsUpdate implements DeferrableUpdate {
        public static function factory( array $deltas ) {
                $update = new self( 0, 0, 0 );
 
-               $fields = [ 'views', 'edits', 'pages', 'articles', 'users', 'images' ];
-               foreach ( $fields as $field ) {
+               foreach ( self::$counters as $field ) {
                        if ( isset( $deltas[$field] ) && $deltas[$field] ) {
                                $update->$field = $deltas[$field];
                        }
index 1537535..16e9a44 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup DifferenceEngine
  */
 
-// Deprecated, use class constant instead
+/** @deprecated use class constant instead */
 define( 'MW_DIFF_VERSION', '1.11a' );
 
 /**
@@ -176,7 +176,7 @@ class DifferenceEngine extends ContextSource {
         *
         * @param int $id Revision ID
         *
-        * @return mixed URL or false
+        * @return string|bool Link HTML or false
         */
        public function deletedLink( $id ) {
                if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
@@ -609,7 +609,7 @@ class DifferenceEngine extends ContextSource {
                                // This needs to be synchronised with Article::showCssOrJsPage(), which sucks
                                // Give hooks a chance to customise the output
                                // @todo standardize this crap into one function
-                               if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', [ $this->mNewContent, $this->mNewPage, $out ] ) ) {
+                               if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', [ $this->mNewContent, $this->mNewPage, $out ], '1.24' ) ) {
                                        // NOTE: deprecated hook, B/C only
                                        // use the content object's own rendering
                                        $cnt = $this->mNewRev->getContent();
@@ -620,7 +620,11 @@ class DifferenceEngine extends ContextSource {
                                }
                        } elseif ( !Hooks::run( 'ArticleContentViewCustom', [ $this->mNewContent, $this->mNewPage, $out ] ) ) {
                                // Handled by extension
-                       } elseif ( !ContentHandler::runLegacyHooks( 'ArticleViewCustom', [ $this->mNewContent, $this->mNewPage, $out ] ) ) {
+                       } elseif ( !ContentHandler::runLegacyHooks(
+                               'ArticleViewCustom',
+                               [ $this->mNewContent, $this->mNewPage, $out ],
+                               '1.21'
+                       ) ) {
                                // NOTE: deprecated hook, B/C only
                                // Handled by extension
                        } else {
index 0a174fe..e958c94 100644 (file)
@@ -71,37 +71,7 @@ class MWException extends Exception {
         * @return string|null String to output or null if any hook has been called
         */
        public function runHooks( $name, $args = [] ) {
-               global $wgExceptionHooks;
-
-               if ( !isset( $wgExceptionHooks ) || !is_array( $wgExceptionHooks ) ) {
-                       return null; // Just silently ignore
-               }
-
-               if ( !array_key_exists( $name, $wgExceptionHooks ) ||
-                       !is_array( $wgExceptionHooks[$name] )
-               ) {
-                       return null;
-               }
-
-               $hooks = $wgExceptionHooks[$name];
-               $callargs = array_merge( [ $this ], $args );
-
-               foreach ( $hooks as $hook ) {
-                       if (
-                               is_string( $hook ) ||
-                               ( is_array( $hook ) && count( $hook ) >= 2 && is_string( $hook[0] ) )
-                       ) {
-                               // 'function' or [ 'class', 'hook' ]
-                               $result = call_user_func_array( $hook, $callargs );
-                       } else {
-                               $result = null;
-                       }
-
-                       if ( is_string( $result ) ) {
-                               return $result;
-                       }
-               }
-               return null;
+               return MWExceptionRenderer::runHooks( $this, $name, $args );
        }
 
        /**
@@ -236,7 +206,13 @@ class MWException extends Exception {
                        self::header( 'MediaWiki-API-Error: internal_api_error_' . get_class( $this ) );
                        wfHttpError( 500, 'Internal Server Error', $this->getText() );
                } elseif ( self::isCommandLine() ) {
-                       MWExceptionHandler::printError( $this->getText() );
+                       $message = $this->getText();
+                       // T17602: STDERR may not be available
+                       if ( defined( 'STDERR' ) ) {
+                               fwrite( STDERR, $message );
+                       } else {
+                               echo $message;
+                       }
                } else {
                        self::statusHeader( 500 );
                        self::header( "Content-Type: $wgMimeType; charset=utf-8" );
index 9c83d3c..736cb06 100644 (file)
@@ -60,71 +60,21 @@ class MWExceptionHandler {
         * @param Exception|Throwable $e
         */
        protected static function report( $e ) {
-               global $wgShowExceptionDetails;
-
-               $cmdLine = MWException::isCommandLine();
-
-               if ( $e instanceof MWException ) {
-                       try {
-                               // Try and show the exception prettily, with the normal skin infrastructure
+               try {
+                       // Try and show the exception prettily, with the normal skin infrastructure
+                       if ( $e instanceof MWException ) {
+                               // Delegate to MWException until all subclasses are handled by
+                               // MWExceptionRenderer and MWException::report() has been
+                               // removed.
                                $e->report();
-                       } catch ( Exception $e2 ) {
-                               // Exception occurred from within exception handler
-                               // Show a simpler message for the original exception,
-                               // don't try to invoke report()
-                               $message = "MediaWiki internal error.\n\n";
-
-                               if ( $wgShowExceptionDetails ) {
-                                       $message .= 'Original exception: ' . self::getLogMessage( $e ) .
-                                               "\nBacktrace:\n" . self::getRedactedTraceAsString( $e ) .
-                                               "\n\nException caught inside exception handler: " . self::getLogMessage( $e2 ) .
-                                               "\nBacktrace:\n" . self::getRedactedTraceAsString( $e2 );
-                               } else {
-                                       $message .= "Exception caught inside exception handler.\n\n" .
-                                               "Set \$wgShowExceptionDetails = true; at the bottom of LocalSettings.php " .
-                                               "to show detailed debugging information.";
-                               }
-
-                               $message .= "\n";
-
-                               if ( $cmdLine ) {
-                                       self::printError( $message );
-                               } else {
-                                       echo nl2br( htmlspecialchars( $message ) ) . "\n";
-                               }
-                       }
-               } else {
-                       if ( !$wgShowExceptionDetails ) {
-                               $message = self::getPublicLogMessage( $e );
                        } else {
-                               $message = self::getLogMessage( $e ) .
-                                       "\nBacktrace:\n" .
-                                       self::getRedactedTraceAsString( $e ) . "\n";
+                               MWExceptionRenderer::output( $e, MWExceptionRenderer::AS_PRETTY );
                        }
-
-                       if ( $cmdLine ) {
-                               self::printError( $message );
-                       } else {
-                               echo nl2br( htmlspecialchars( $message ) ) . "\n";
-                       }
-
-               }
-       }
-
-       /**
-        * Print a message, if possible to STDERR.
-        * Use this in command line mode only (see isCommandLine)
-        *
-        * @param string $message Failure text
-        */
-       public static function printError( $message ) {
-               # NOTE: STDERR may not be available, especially if php-cgi is used from the
-               # command line (bug #15602). Try to produce meaningful output anyway. Using
-               # echo may corrupt output to STDOUT though.
-               if ( defined( 'STDERR' ) ) {
-                       fwrite( STDERR, $message );
-               } else {
-                       echo $message;
+               } catch ( Exception $e2 ) {
+                       // Exception occurred from within exception handler
+                       // Show a simpler message for the original exception,
+                       // don't try to invoke report()
+                       MWExceptionRenderer::output( $e, MWExceptionRenderer::AS_RAW, $e2 );
                }
        }
 
@@ -137,7 +87,12 @@ class MWExceptionHandler {
         * @param Exception|Throwable $e
         */
        public static function rollbackMasterChangesAndLog( $e ) {
-               $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+               $services = MediaWikiServices::getInstance();
+               if ( $services->isServiceDisabled( 'DBLoadBalancerFactory' ) ) {
+                       return; // T147599
+               }
+
+               $lbFactory = $services->getDBLoadBalancerFactory();
                if ( $lbFactory->hasMasterChanges() ) {
                        $logger = LoggerFactory::getInstance( 'Bug56269' );
                        $logger->warning(
diff --git a/includes/exception/MWExceptionRenderer.php b/includes/exception/MWExceptionRenderer.php
new file mode 100644 (file)
index 0000000..8fdc417
--- /dev/null
@@ -0,0 +1,405 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Aaron Schulz
+ */
+
+/**
+ * Class to expose exceptions to the client (API bots, users, admins using CLI scripts)
+ * @since 1.28
+ */
+class MWExceptionRenderer {
+       const AS_RAW = 1; // show as text
+       const AS_PRETTY = 2; // show as HTML
+
+       /**
+        * @param Exception|Throwable $e Original exception
+        * @param integer $mode MWExceptionExposer::AS_* constant
+        * @param Exception|Throwable|null $eNew New exception from attempting to show the first
+        */
+       public static function output( $e, $mode, $eNew = null ) {
+               global $wgMimeType;
+
+               if ( defined( 'MW_API' ) ) {
+                       // Unhandled API exception, we can't be sure that format printer is alive
+                       self::header( 'MediaWiki-API-Error: internal_api_error_' . get_class( $e ) );
+                       wfHttpError( 500, 'Internal Server Error', self::getText( $e ) );
+               } elseif ( self::isCommandLine() ) {
+                       self::printError( self::getText( $e ) );
+               } elseif ( $mode === self::AS_PRETTY ) {
+                       if ( $e instanceof DBConnectionError ) {
+                               self::reportOutageHTML( $e );
+                       } else {
+                               self::statusHeader( 500 );
+                               self::header( "Content-Type: $wgMimeType; charset=utf-8" );
+                               self::reportHTML( $e );
+                       }
+               } else {
+                       if ( $eNew ) {
+                               $message = "MediaWiki internal error.\n\n";
+                               if ( self::showBackTrace( $e ) ) {
+                                       $message .= 'Original exception: ' .
+                                               MWExceptionHandler::getLogMessage( $e ) .
+                                               "\nBacktrace:\n" . MWExceptionHandler::getRedactedTraceAsString( $e ) .
+                                               "\n\nException caught inside exception handler: " .
+                                                       MWExceptionHandler::getLogMessage( $eNew ) .
+                                               "\nBacktrace:\n" . MWExceptionHandler::getRedactedTraceAsString( $eNew );
+                               } else {
+                                       $message .= "Exception caught inside exception handler.\n\n" .
+                                               "Set \$wgShowExceptionDetails = true; at the bottom of LocalSettings.php " .
+                                               "to show detailed debugging information.";
+                               }
+                               $message .= "\n";
+                       } else {
+                               if ( self::showBackTrace( $e ) ) {
+                                       $message = MWExceptionHandler::getLogMessage( $e ) .
+                                               "\nBacktrace:\n" .
+                                               MWExceptionHandler::getRedactedTraceAsString( $e ) . "\n";
+                               } else {
+                                       $message = MWExceptionHandler::getPublicLogMessage( $e );
+                               }
+                       }
+                       if ( self::isCommandLine() ) {
+                               self::printError( $message );
+                       } else {
+                               echo nl2br( htmlspecialchars( $message ) ) . "\n";
+                       }
+               }
+       }
+
+       /**
+        * Run hook to allow extensions to modify the text of the exception
+        *
+        * Called by MWException for b/c
+        *
+        * @param Exception|Throwable $e
+        * @param string $name Class name of the exception
+        * @param array $args Arguments to pass to the callback functions
+        * @return string|null String to output or null if any hook has been called
+        */
+       public static function runHooks( $e, $name, $args = [] ) {
+               global $wgExceptionHooks;
+
+               if ( !isset( $wgExceptionHooks ) || !is_array( $wgExceptionHooks ) ) {
+                       return null; // Just silently ignore
+               }
+
+               if ( !array_key_exists( $name, $wgExceptionHooks ) ||
+                       !is_array( $wgExceptionHooks[$name] )
+               ) {
+                       return null;
+               }
+
+               $hooks = $wgExceptionHooks[$name];
+               $callargs = array_merge( [ $e ], $args );
+
+               foreach ( $hooks as $hook ) {
+                       if (
+                               is_string( $hook ) ||
+                               ( is_array( $hook ) && count( $hook ) >= 2 && is_string( $hook[0] ) )
+                       ) {
+                               // 'function' or [ 'class', 'hook' ]
+                               $result = call_user_func_array( $hook, $callargs );
+                       } else {
+                               $result = null;
+                       }
+
+                       if ( is_string( $result ) ) {
+                               return $result;
+                       }
+               }
+
+               return null;
+       }
+
+       /**
+        * @param Exception|Throwable $e
+        * @return bool Should the exception use $wgOut to output the error?
+        */
+       private static function useOutputPage( $e ) {
+               // Can the extension use the Message class/wfMessage to get i18n-ed messages?
+               foreach ( $e->getTrace() as $frame ) {
+                       if ( isset( $frame['class'] ) && $frame['class'] === 'LocalisationCache' ) {
+                               return false;
+                       }
+               }
+
+               return (
+                       !empty( $GLOBALS['wgFullyInitialised'] ) &&
+                       !empty( $GLOBALS['wgOut'] ) &&
+                       !defined( 'MEDIAWIKI_INSTALL' )
+               );
+       }
+
+       /**
+        * Output the exception report using HTML
+        *
+        * @param Exception|Throwable $e
+        */
+       private static function reportHTML( $e ) {
+               global $wgOut, $wgSitename;
+
+               if ( self::useOutputPage( $e ) ) {
+                       if ( $e instanceof MWException ) {
+                               $wgOut->prepareErrorPage( $e->getPageTitle() );
+                       } elseif ( $e instanceof DBReadOnlyError ) {
+                               $wgOut->prepareErrorPage( self::msg( 'readonly', 'Database is locked' ) );
+                       } elseif ( $e instanceof DBExpectedError ) {
+                               $wgOut->prepareErrorPage( self::msg( 'databaseerror', 'Database error' ) );
+                       } else {
+                               $wgOut->prepareErrorPage( self::msg( 'internalerror', 'Internal error' ) );
+                       }
+
+                       $hookResult = self::runHooks( $e, get_class( $e ) );
+                       if ( $hookResult ) {
+                               $wgOut->addHTML( $hookResult );
+                       } else {
+                               // Show any custom GUI message before the details
+                               if ( $e instanceof MessageSpecifier ) {
+                                       $wgOut->addHTML( Message::newFromSpecifier( $e )->escaped() );
+                               }
+                               $wgOut->addHTML( self::getHTML( $e ) );
+                       }
+
+                       $wgOut->output();
+               } else {
+                       self::header( 'Content-Type: text/html; charset=utf-8' );
+                       $pageTitle = self::msg( 'internalerror', 'Internal error' );
+                       echo "<!DOCTYPE html>\n" .
+                               '<html><head>' .
+                               // Mimick OutputPage::setPageTitle behaviour
+                               '<title>' .
+                               htmlspecialchars( self::msg( 'pagetitle', "$1 - $wgSitename", $pageTitle ) ) .
+                               '</title>' .
+                               '<style>body { font-family: sans-serif; margin: 0; padding: 0.5em 2em; }</style>' .
+                               "</head><body>\n";
+
+                       $hookResult = self::runHooks( $e, get_class( $e ) . 'Raw' );
+                       if ( $hookResult ) {
+                               echo $hookResult;
+                       } else {
+                               echo self::getHTML( $e );
+                       }
+
+                       echo "</body></html>\n";
+               }
+       }
+
+       /**
+        * If $wgShowExceptionDetails is true, return a HTML message with a
+        * backtrace to the error, otherwise show a message to ask to set it to true
+        * to show that information.
+        *
+        * @param Exception|Throwable $e
+        * @return string Html to output
+        */
+       public static function getHTML( $e ) {
+               if ( self::showBackTrace( $e ) ) {
+                       $html = "<div class=\"errorbox\"><p>" .
+                               nl2br( htmlspecialchars( MWExceptionHandler::getLogMessage( $e ) ) ) .
+                               '</p><p>Backtrace:</p><p>' .
+                               nl2br( htmlspecialchars( MWExceptionHandler::getRedactedTraceAsString( $e ) ) ) .
+                               "</p></div>\n";
+               } else {
+                       $logId = WebRequest::getRequestId();
+                       $html = "<div class=\"errorbox\">" .
+                               '[' . $logId . '] ' .
+                               gmdate( 'Y-m-d H:i:s' ) . ": " .
+                               self::msg( "internalerror-fatal-exception",
+                                       "Fatal exception of type $1",
+                                       get_class( $e ),
+                                       $logId,
+                                       MWExceptionHandler::getURL()
+                               ) . "</div>\n" .
+                       "<!-- Set \$wgShowExceptionDetails = true; " .
+                       "at the bottom of LocalSettings.php to show detailed " .
+                       "debugging information. -->";
+               }
+
+               return $html;
+       }
+
+       /**
+        * Get a message from i18n
+        *
+        * @param string $key Message name
+        * @param string $fallback Default message if the message cache can't be
+        *                  called by the exception
+        * The function also has other parameters that are arguments for the message
+        * @return string Message with arguments replaced
+        */
+       private static function msg( $key, $fallback /*[, params...] */ ) {
+               $args = array_slice( func_get_args(), 2 );
+               try {
+                       return wfMessage( $key, $args )->text();
+               } catch ( Exception $e ) {
+                       return wfMsgReplaceArgs( $fallback, $args );
+               }
+       }
+
+       /**
+        * @param Exception|Throwable $e
+        * @return string
+        */
+       private static function getText( $e ) {
+               if ( self::showBackTrace( $e ) ) {
+                       return MWExceptionHandler::getLogMessage( $e ) .
+                               "\nBacktrace:\n" .
+                               MWExceptionHandler::getRedactedTraceAsString( $e ) . "\n";
+               } else {
+                       return "Set \$wgShowExceptionDetails = true; " .
+                               "in LocalSettings.php to show detailed debugging information.\n";
+               }
+       }
+
+       /**
+        * @param Exception|Throwable $e
+        * @return bool
+        */
+       private static function showBackTrace( $e ) {
+               global $wgShowExceptionDetails, $wgShowDBErrorBacktrace;
+
+               return (
+                       $wgShowExceptionDetails &&
+                       ( !( $e instanceof DBError ) || $wgShowDBErrorBacktrace )
+               );
+       }
+
+       /**
+        * @return bool
+        */
+       private static function isCommandLine() {
+               return !empty( $GLOBALS['wgCommandLineMode'] );
+       }
+
+       /**
+        * @param string $header
+        */
+       private static function header( $header ) {
+               if ( !headers_sent() ) {
+                       header( $header );
+               }
+       }
+
+       /**
+        * @param integer $code
+        */
+       private static function statusHeader( $code ) {
+               if ( !headers_sent() ) {
+                       HttpStatus::header( $code );
+               }
+       }
+
+       /**
+        * Print a message, if possible to STDERR.
+        * Use this in command line mode only (see isCommandLine)
+        *
+        * @param string $message Failure text
+        */
+       private static function printError( $message ) {
+               // NOTE: STDERR may not be available, especially if php-cgi is used from the
+               // command line (bug #15602). Try to produce meaningful output anyway. Using
+               // echo may corrupt output to STDOUT though.
+               if ( defined( 'STDERR' ) ) {
+                       fwrite( STDERR, $message );
+               } else {
+                       echo $message;
+               }
+       }
+
+       /**
+        * @param Exception|Throwable $e
+        */
+       private static function reportOutageHTML( $e ) {
+               global $wgShowDBErrorBacktrace, $wgShowHostnames, $wgShowSQLErrors;
+
+               $sorry = htmlspecialchars( self::msg(
+                       'dberr-problems',
+                       'Sorry! This site is experiencing technical difficulties.'
+               ) );
+               $again = htmlspecialchars( self::msg(
+                       'dberr-again',
+                       'Try waiting a few minutes and reloading.'
+               ) );
+
+               if ( $wgShowHostnames || $wgShowSQLErrors ) {
+                       $info = str_replace(
+                               '$1',
+                               Html::element( 'span', [ 'dir' => 'ltr' ], htmlspecialchars( $e->getMessage() ) ),
+                               htmlspecialchars( self::msg( 'dberr-info', '($1)' ) )
+                       );
+               } else {
+                       $info = htmlspecialchars( self::msg(
+                               'dberr-info-hidden',
+                               '(Cannot access the database)'
+                       ) );
+               }
+
+               MessageCache::singleton()->disable(); // no DB access
+
+               $html = "<h1>$sorry</h1><p>$again</p><p><small>$info</small></p>";
+
+               if ( $wgShowDBErrorBacktrace ) {
+                       $html .= '<p>Backtrace:</p><pre>' .
+                               htmlspecialchars( $e->getTraceAsString() ) . '</pre>';
+               }
+
+               $html .= '<hr />';
+               $html .= self::googleSearchForm();
+
+               echo $html;
+       }
+
+       /**
+        * @return string
+        */
+       private static function googleSearchForm() {
+               global $wgSitename, $wgCanonicalServer, $wgRequest;
+
+               $usegoogle = htmlspecialchars( self::msg(
+                       'dberr-usegoogle',
+                       'You can try searching via Google in the meantime.'
+               ) );
+               $outofdate = htmlspecialchars( self::msg(
+                       'dberr-outofdate',
+                       'Note that their indexes of our content may be out of date.'
+               ) );
+               $googlesearch = htmlspecialchars( self::msg( 'searchbutton', 'Search' ) );
+               $search = htmlspecialchars( $wgRequest->getVal( 'search' ) );
+               $server = htmlspecialchars( $wgCanonicalServer );
+               $sitename = htmlspecialchars( $wgSitename );
+               $trygoogle = <<<EOT
+<div style="margin: 1.5em">$usegoogle<br />
+<small>$outofdate</small>
+</div>
+<form method="get" action="//www.google.com/search" id="googlesearch">
+       <input type="hidden" name="domains" value="$server" />
+       <input type="hidden" name="num" value="50" />
+       <input type="hidden" name="ie" value="UTF-8" />
+       <input type="hidden" name="oe" value="UTF-8" />
+       <input type="text" name="q" size="31" maxlength="255" value="$search" />
+       <input type="submit" name="btnG" value="$googlesearch" />
+       <p>
+               <label><input type="radio" name="sitesearch" value="$server" checked="checked" />$sitename</label>
+               <label><input type="radio" name="sitesearch" value="" />WWW</label>
+       </p>
+</form>
+EOT;
+               return $trygoogle;
+       }
+}
index bd0b120..e31374c 100644 (file)
@@ -29,12 +29,19 @@ class PermissionsError extends ErrorPageError {
        public $permission, $errors;
 
        /**
-        * @param string $permission A permission name.
-        * @param string[] $errors Error message keys
+        * @param string|null $permission A permission name or null if unknown
+        * @param array $errors Error message keys or [key, param...] arrays; must not be empty if
+        *   $permission is null
+        * @throws \InvalidArgumentException
         */
        public function __construct( $permission, $errors = [] ) {
                global $wgLang;
 
+               if ( $permission === null && !$errors ) {
+                       throw new \InvalidArgumentException( __METHOD__ .
+                               ': $permission and $errors cannot both be empty' );
+               }
+
                $this->permission = $permission;
 
                if ( !count( $errors ) ) {
diff --git a/includes/exception/TimestampException.php b/includes/exception/TimestampException.php
deleted file mode 100644 (file)
index b9c0c35..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
-/**
- * @since 1.20
- */
-class TimestampException extends MWException {
-}
index 2eae279..7e93299 100644 (file)
@@ -130,7 +130,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
                        wfDebug( "writable external store\n" );
                }
 
-               $db = $lb->getConnection( DB_REPLICA, [], $wiki );
+               $db = $lb->getConnectionRef( DB_REPLICA, [], $wiki );
                $db->clearFlag( DBO_TRX ); // sanity
 
                return $db;
@@ -146,7 +146,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
                $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
                $lb = $this->getLoadBalancer( $cluster );
 
-               $db = $lb->getConnection( DB_MASTER, [], $wiki );
+               $db = $lb->getConnectionRef( DB_MASTER, [], $wiki );
                $db->clearFlag( DBO_TRX ); // sanity
 
                return $db;
diff --git a/includes/filebackend/FSFile.php b/includes/filebackend/FSFile.php
deleted file mode 100644 (file)
index 8aa11b6..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-<?php
-/**
- * Non-directory file on the file system.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileBackend
- */
-
-/**
- * Class representing a non-directory file on the file system
- *
- * @ingroup FileBackend
- */
-class FSFile {
-       /** @var string Path to file */
-       protected $path;
-
-       /** @var string File SHA-1 in base 36 */
-       protected $sha1Base36;
-
-       /**
-        * Sets up the file object
-        *
-        * @param string $path Path to temporary file on local disk
-        */
-       public function __construct( $path ) {
-               $this->path = $path;
-       }
-
-       /**
-        * Returns the file system path
-        *
-        * @return string
-        */
-       public function getPath() {
-               return $this->path;
-       }
-
-       /**
-        * Checks if the file exists
-        *
-        * @return bool
-        */
-       public function exists() {
-               return is_file( $this->path );
-       }
-
-       /**
-        * Get the file size in bytes
-        *
-        * @return int|bool
-        */
-       public function getSize() {
-               return filesize( $this->path );
-       }
-
-       /**
-        * Get the file's last-modified timestamp
-        *
-        * @return string|bool TS_MW timestamp or false on failure
-        */
-       public function getTimestamp() {
-               MediaWiki\suppressWarnings();
-               $timestamp = filemtime( $this->path );
-               MediaWiki\restoreWarnings();
-               if ( $timestamp !== false ) {
-                       $timestamp = wfTimestamp( TS_MW, $timestamp );
-               }
-
-               return $timestamp;
-       }
-
-       /**
-        * Guess the MIME type from the file contents alone
-        *
-        * @return string
-        */
-       public function getMimeType() {
-               return MimeMagic::singleton()->guessMimeType( $this->path, false );
-       }
-
-       /**
-        * Get an associative array containing information about
-        * a file with the given storage path.
-        *
-        * Resulting array fields include:
-        *   - fileExists
-        *   - size (filesize in bytes)
-        *   - mime (as major/minor)
-        *   - media_type (value to be used with the MEDIATYPE_xxx constants)
-        *   - metadata (handler specific)
-        *   - sha1 (in base 36)
-        *   - width
-        *   - height
-        *   - bits (bitrate)
-        *   - file-mime
-        *   - major_mime
-        *   - minor_mime
-        *
-        * @param string|bool $ext The file extension, or true to extract it from the filename.
-        *             Set it to false to ignore the extension.
-        * @return array
-        */
-       public function getProps( $ext = true ) {
-               wfDebug( __METHOD__ . ": Getting file info for $this->path\n" );
-
-               $info = self::placeholderProps();
-               $info['fileExists'] = $this->exists();
-
-               if ( $info['fileExists'] ) {
-                       $magic = MimeMagic::singleton();
-
-                       # get the file extension
-                       if ( $ext === true ) {
-                               $ext = self::extensionFromPath( $this->path );
-                       }
-
-                       # MIME type according to file contents
-                       $info['file-mime'] = $this->getMimeType();
-                       # logical MIME type
-                       $info['mime'] = $magic->improveTypeFromExtension( $info['file-mime'], $ext );
-
-                       list( $info['major_mime'], $info['minor_mime'] ) = File::splitMime( $info['mime'] );
-                       $info['media_type'] = $magic->getMediaType( $this->path, $info['mime'] );
-
-                       # Get size in bytes
-                       $info['size'] = $this->getSize();
-
-                       # Height, width and metadata
-                       $handler = MediaHandler::getHandler( $info['mime'] );
-                       if ( $handler ) {
-                               $tempImage = (object)[]; // XXX (hack for File object)
-                               $info['metadata'] = $handler->getMetadata( $tempImage, $this->path );
-                               $gis = $handler->getImageSize( $tempImage, $this->path, $info['metadata'] );
-                               if ( is_array( $gis ) ) {
-                                       $info = $this->extractImageSizeInfo( $gis ) + $info;
-                               }
-                       }
-                       $info['sha1'] = $this->getSha1Base36();
-
-                       wfDebug( __METHOD__ . ": $this->path loaded, {$info['size']} bytes, {$info['mime']}.\n" );
-               } else {
-                       wfDebug( __METHOD__ . ": $this->path NOT FOUND!\n" );
-               }
-
-               return $info;
-       }
-
-       /**
-        * Placeholder file properties to use for files that don't exist
-        *
-        * Resulting array fields include:
-        *   - fileExists
-        *   - mime (as major/minor)
-        *   - media_type (value to be used with the MEDIATYPE_xxx constants)
-        *   - metadata (handler specific)
-        *   - sha1 (in base 36)
-        *   - width
-        *   - height
-        *   - bits (bitrate)
-        *
-        * @return array
-        */
-       public static function placeholderProps() {
-               $info = [];
-               $info['fileExists'] = false;
-               $info['mime'] = null;
-               $info['media_type'] = MEDIATYPE_UNKNOWN;
-               $info['metadata'] = '';
-               $info['sha1'] = '';
-               $info['width'] = 0;
-               $info['height'] = 0;
-               $info['bits'] = 0;
-
-               return $info;
-       }
-
-       /**
-        * Exract image size information
-        *
-        * @param array $gis
-        * @return array
-        */
-       protected function extractImageSizeInfo( array $gis ) {
-               $info = [];
-               # NOTE: $gis[2] contains a code for the image type. This is no longer used.
-               $info['width'] = $gis[0];
-               $info['height'] = $gis[1];
-               if ( isset( $gis['bits'] ) ) {
-                       $info['bits'] = $gis['bits'];
-               } else {
-                       $info['bits'] = 0;
-               }
-
-               return $info;
-       }
-
-       /**
-        * Get a SHA-1 hash of a file in the local filesystem, in base-36 lower case
-        * encoding, zero padded to 31 digits.
-        *
-        * 160 log 2 / log 36 = 30.95, so the 160-bit hash fills 31 digits in base 36
-        * fairly neatly.
-        *
-        * @param bool $recache
-        * @return bool|string False on failure
-        */
-       public function getSha1Base36( $recache = false ) {
-               if ( $this->sha1Base36 !== null && !$recache ) {
-                       return $this->sha1Base36;
-               }
-
-               MediaWiki\suppressWarnings();
-               $this->sha1Base36 = sha1_file( $this->path );
-               MediaWiki\restoreWarnings();
-
-               if ( $this->sha1Base36 !== false ) {
-                       $this->sha1Base36 = Wikimedia\base_convert( $this->sha1Base36, 16, 36, 31 );
-               }
-
-               return $this->sha1Base36;
-       }
-
-       /**
-        * Get the final file extension from a file system path
-        *
-        * @param string $path
-        * @return string
-        */
-       public static function extensionFromPath( $path ) {
-               $i = strrpos( $path, '.' );
-
-               return strtolower( $i ? substr( $path, $i + 1 ) : '' );
-       }
-
-       /**
-        * Get an associative array containing information about a file in the local filesystem.
-        *
-        * @param string $path Absolute local filesystem path
-        * @param string|bool $ext The file extension, or true to extract it from the filename.
-        *   Set it to false to ignore the extension.
-        * @return array
-        */
-       public static function getPropsFromPath( $path, $ext = true ) {
-               $fsFile = new self( $path );
-
-               return $fsFile->getProps( $ext );
-       }
-
-       /**
-        * Get a SHA-1 hash of a file in the local filesystem, in base-36 lower case
-        * encoding, zero padded to 31 digits.
-        *
-        * 160 log 2 / log 36 = 30.95, so the 160-bit hash fills 31 digits in base 36
-        * fairly neatly.
-        *
-        * @param string $path
-        * @return bool|string False on failure
-        */
-       public static function getSha1Base36FromPath( $path ) {
-               $fsFile = new self( $path );
-
-               return $fsFile->getSha1Base36();
-       }
-}
diff --git a/includes/filebackend/FSFileBackend.php b/includes/filebackend/FSFileBackend.php
deleted file mode 100644 (file)
index efe78ee..0000000
+++ /dev/null
@@ -1,975 +0,0 @@
-<?php
-/**
- * File system based backend.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileBackend
- * @author Aaron Schulz
- */
-
-/**
- * @brief Class for a file system (FS) based file backend.
- *
- * All "containers" each map to a directory under the backend's base directory.
- * For backwards-compatibility, some container paths can be set to custom paths.
- * The wiki ID will not be used in any custom paths, so this should be avoided.
- *
- * Having directories with thousands of files will diminish performance.
- * Sharding can be accomplished by using FileRepo-style hash paths.
- *
- * Status messages should avoid mentioning the internal FS paths.
- * PHP warnings are assumed to be logged rather than output.
- *
- * @ingroup FileBackend
- * @since 1.19
- */
-class FSFileBackend extends FileBackendStore {
-       /** @var string Directory holding the container directories */
-       protected $basePath;
-
-       /** @var array Map of container names to root paths for custom container paths */
-       protected $containerPaths = [];
-
-       /** @var int File permission mode */
-       protected $fileMode;
-
-       /** @var string Required OS username to own files */
-       protected $fileOwner;
-
-       /** @var string OS username running this script */
-       protected $currentUser;
-
-       /** @var array */
-       protected $hadWarningErrors = [];
-
-       /**
-        * @see FileBackendStore::__construct()
-        * Additional $config params include:
-        *   - basePath       : File system directory that holds containers.
-        *   - containerPaths : Map of container names to custom file system directories.
-        *                      This should only be used for backwards-compatibility.
-        *   - fileMode       : Octal UNIX file permissions to use on files stored.
-        * @param array $config
-        */
-       public function __construct( array $config ) {
-               parent::__construct( $config );
-
-               // Remove any possible trailing slash from directories
-               if ( isset( $config['basePath'] ) ) {
-                       $this->basePath = rtrim( $config['basePath'], '/' ); // remove trailing slash
-               } else {
-                       $this->basePath = null; // none; containers must have explicit paths
-               }
-
-               if ( isset( $config['containerPaths'] ) ) {
-                       $this->containerPaths = (array)$config['containerPaths'];
-                       foreach ( $this->containerPaths as &$path ) {
-                               $path = rtrim( $path, '/' ); // remove trailing slash
-                       }
-               }
-
-               $this->fileMode = isset( $config['fileMode'] ) ? $config['fileMode'] : 0644;
-               if ( isset( $config['fileOwner'] ) && function_exists( 'posix_getuid' ) ) {
-                       $this->fileOwner = $config['fileOwner'];
-                       // cache this, assuming it doesn't change
-                       $this->currentUser = posix_getpwuid( posix_getuid() )['name'];
-               }
-       }
-
-       public function getFeatures() {
-               return !wfIsWindows() ? FileBackend::ATTR_UNICODE_PATHS : 0;
-       }
-
-       protected function resolveContainerPath( $container, $relStoragePath ) {
-               // Check that container has a root directory
-               if ( isset( $this->containerPaths[$container] ) || isset( $this->basePath ) ) {
-                       // Check for sane relative paths (assume the base paths are OK)
-                       if ( $this->isLegalRelPath( $relStoragePath ) ) {
-                               return $relStoragePath;
-                       }
-               }
-
-               return null;
-       }
-
-       /**
-        * Sanity check a relative file system path for validity
-        *
-        * @param string $path Normalized relative path
-        * @return bool
-        */
-       protected function isLegalRelPath( $path ) {
-               // Check for file names longer than 255 chars
-               if ( preg_match( '![^/]{256}!', $path ) ) { // ext3/NTFS
-                       return false;
-               }
-               if ( wfIsWindows() ) { // NTFS
-                       return !preg_match( '![:*?"<>|]!', $path );
-               } else {
-                       return true;
-               }
-       }
-
-       /**
-        * Given the short (unresolved) and full (resolved) name of
-        * a container, return the file system path of the container.
-        *
-        * @param string $shortCont
-        * @param string $fullCont
-        * @return string|null
-        */
-       protected function containerFSRoot( $shortCont, $fullCont ) {
-               if ( isset( $this->containerPaths[$shortCont] ) ) {
-                       return $this->containerPaths[$shortCont];
-               } elseif ( isset( $this->basePath ) ) {
-                       return "{$this->basePath}/{$fullCont}";
-               }
-
-               return null; // no container base path defined
-       }
-
-       /**
-        * Get the absolute file system path for a storage path
-        *
-        * @param string $storagePath Storage path
-        * @return string|null
-        */
-       protected function resolveToFSPath( $storagePath ) {
-               list( $fullCont, $relPath ) = $this->resolveStoragePathReal( $storagePath );
-               if ( $relPath === null ) {
-                       return null; // invalid
-               }
-               list( , $shortCont, ) = FileBackend::splitStoragePath( $storagePath );
-               $fsPath = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
-               if ( $relPath != '' ) {
-                       $fsPath .= "/{$relPath}";
-               }
-
-               return $fsPath;
-       }
-
-       public function isPathUsableInternal( $storagePath ) {
-               $fsPath = $this->resolveToFSPath( $storagePath );
-               if ( $fsPath === null ) {
-                       return false; // invalid
-               }
-               $parentDir = dirname( $fsPath );
-
-               if ( file_exists( $fsPath ) ) {
-                       $ok = is_file( $fsPath ) && is_writable( $fsPath );
-               } else {
-                       $ok = is_dir( $parentDir ) && is_writable( $parentDir );
-               }
-
-               if ( $this->fileOwner !== null && $this->currentUser !== $this->fileOwner ) {
-                       $ok = false;
-                       trigger_error( __METHOD__ . ": PHP process owner is not '{$this->fileOwner}'." );
-               }
-
-               return $ok;
-       }
-
-       protected function doCreateInternal( array $params ) {
-               $status = Status::newGood();
-
-               $dest = $this->resolveToFSPath( $params['dst'] );
-               if ( $dest === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $tempFile = TempFSFile::factory( 'create_', 'tmp' );
-                       if ( !$tempFile ) {
-                               $status->fatal( 'backend-fail-create', $params['dst'] );
-
-                               return $status;
-                       }
-                       $this->trapWarnings();
-                       $bytes = file_put_contents( $tempFile->getPath(), $params['content'] );
-                       $this->untrapWarnings();
-                       if ( $bytes === false ) {
-                               $status->fatal( 'backend-fail-create', $params['dst'] );
-
-                               return $status;
-                       }
-                       $cmd = implode( ' ', [
-                               wfIsWindows() ? 'COPY /B /Y' : 'cp', // (binary, overwrite)
-                               wfEscapeShellArg( $this->cleanPathSlashes( $tempFile->getPath() ) ),
-                               wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
-                       ] );
-                       $handler = function ( $errors, Status $status, array $params, $cmd ) {
-                               if ( $errors !== '' && !( wfIsWindows() && $errors[0] === " " ) ) {
-                                       $status->fatal( 'backend-fail-create', $params['dst'] );
-                                       trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
-                               }
-                       };
-                       $status->value = new FSFileOpHandle( $this, $params, $handler, $cmd, $dest );
-                       $tempFile->bind( $status->value );
-               } else { // immediate write
-                       $this->trapWarnings();
-                       $bytes = file_put_contents( $dest, $params['content'] );
-                       $this->untrapWarnings();
-                       if ( $bytes === false ) {
-                               $status->fatal( 'backend-fail-create', $params['dst'] );
-
-                               return $status;
-                       }
-                       $this->chmod( $dest );
-               }
-
-               return $status;
-       }
-
-       protected function doStoreInternal( array $params ) {
-               $status = Status::newGood();
-
-               $dest = $this->resolveToFSPath( $params['dst'] );
-               if ( $dest === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $cmd = implode( ' ', [
-                               wfIsWindows() ? 'COPY /B /Y' : 'cp', // (binary, overwrite)
-                               wfEscapeShellArg( $this->cleanPathSlashes( $params['src'] ) ),
-                               wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
-                       ] );
-                       $handler = function ( $errors, Status $status, array $params, $cmd ) {
-                               if ( $errors !== '' && !( wfIsWindows() && $errors[0] === " " ) ) {
-                                       $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
-                                       trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
-                               }
-                       };
-                       $status->value = new FSFileOpHandle( $this, $params, $handler, $cmd, $dest );
-               } else { // immediate write
-                       $this->trapWarnings();
-                       $ok = copy( $params['src'], $dest );
-                       $this->untrapWarnings();
-                       // In some cases (at least over NFS), copy() returns true when it fails
-                       if ( !$ok || ( filesize( $params['src'] ) !== filesize( $dest ) ) ) {
-                               if ( $ok ) { // PHP bug
-                                       unlink( $dest ); // remove broken file
-                                       trigger_error( __METHOD__ . ": copy() failed but returned true." );
-                               }
-                               $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
-
-                               return $status;
-                       }
-                       $this->chmod( $dest );
-               }
-
-               return $status;
-       }
-
-       protected function doCopyInternal( array $params ) {
-               $status = Status::newGood();
-
-               $source = $this->resolveToFSPath( $params['src'] );
-               if ( $source === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
-
-                       return $status;
-               }
-
-               $dest = $this->resolveToFSPath( $params['dst'] );
-               if ( $dest === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               if ( !is_file( $source ) ) {
-                       if ( empty( $params['ignoreMissingSource'] ) ) {
-                               $status->fatal( 'backend-fail-copy', $params['src'] );
-                       }
-
-                       return $status; // do nothing; either OK or bad status
-               }
-
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $cmd = implode( ' ', [
-                               wfIsWindows() ? 'COPY /B /Y' : 'cp', // (binary, overwrite)
-                               wfEscapeShellArg( $this->cleanPathSlashes( $source ) ),
-                               wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
-                       ] );
-                       $handler = function ( $errors, Status $status, array $params, $cmd ) {
-                               if ( $errors !== '' && !( wfIsWindows() && $errors[0] === " " ) ) {
-                                       $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
-                                       trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
-                               }
-                       };
-                       $status->value = new FSFileOpHandle( $this, $params, $handler, $cmd, $dest );
-               } else { // immediate write
-                       $this->trapWarnings();
-                       $ok = ( $source === $dest ) ? true : copy( $source, $dest );
-                       $this->untrapWarnings();
-                       // In some cases (at least over NFS), copy() returns true when it fails
-                       if ( !$ok || ( filesize( $source ) !== filesize( $dest ) ) ) {
-                               if ( $ok ) { // PHP bug
-                                       $this->trapWarnings();
-                                       unlink( $dest ); // remove broken file
-                                       $this->untrapWarnings();
-                                       trigger_error( __METHOD__ . ": copy() failed but returned true." );
-                               }
-                               $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
-
-                               return $status;
-                       }
-                       $this->chmod( $dest );
-               }
-
-               return $status;
-       }
-
-       protected function doMoveInternal( array $params ) {
-               $status = Status::newGood();
-
-               $source = $this->resolveToFSPath( $params['src'] );
-               if ( $source === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
-
-                       return $status;
-               }
-
-               $dest = $this->resolveToFSPath( $params['dst'] );
-               if ( $dest === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               if ( !is_file( $source ) ) {
-                       if ( empty( $params['ignoreMissingSource'] ) ) {
-                               $status->fatal( 'backend-fail-move', $params['src'] );
-                       }
-
-                       return $status; // do nothing; either OK or bad status
-               }
-
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $cmd = implode( ' ', [
-                               wfIsWindows() ? 'MOVE /Y' : 'mv', // (overwrite)
-                               wfEscapeShellArg( $this->cleanPathSlashes( $source ) ),
-                               wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
-                       ] );
-                       $handler = function ( $errors, Status $status, array $params, $cmd ) {
-                               if ( $errors !== '' && !( wfIsWindows() && $errors[0] === " " ) ) {
-                                       $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
-                                       trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
-                               }
-                       };
-                       $status->value = new FSFileOpHandle( $this, $params, $handler, $cmd );
-               } else { // immediate write
-                       $this->trapWarnings();
-                       $ok = ( $source === $dest ) ? true : rename( $source, $dest );
-                       $this->untrapWarnings();
-                       clearstatcache(); // file no longer at source
-                       if ( !$ok ) {
-                               $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
-
-                               return $status;
-                       }
-               }
-
-               return $status;
-       }
-
-       protected function doDeleteInternal( array $params ) {
-               $status = Status::newGood();
-
-               $source = $this->resolveToFSPath( $params['src'] );
-               if ( $source === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
-
-                       return $status;
-               }
-
-               if ( !is_file( $source ) ) {
-                       if ( empty( $params['ignoreMissingSource'] ) ) {
-                               $status->fatal( 'backend-fail-delete', $params['src'] );
-                       }
-
-                       return $status; // do nothing; either OK or bad status
-               }
-
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $cmd = implode( ' ', [
-                               wfIsWindows() ? 'DEL' : 'unlink',
-                               wfEscapeShellArg( $this->cleanPathSlashes( $source ) )
-                       ] );
-                       $handler = function ( $errors, Status $status, array $params, $cmd ) {
-                               if ( $errors !== '' && !( wfIsWindows() && $errors[0] === " " ) ) {
-                                       $status->fatal( 'backend-fail-delete', $params['src'] );
-                                       trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
-                               }
-                       };
-                       $status->value = new FSFileOpHandle( $this, $params, $handler, $cmd );
-               } else { // immediate write
-                       $this->trapWarnings();
-                       $ok = unlink( $source );
-                       $this->untrapWarnings();
-                       if ( !$ok ) {
-                               $status->fatal( 'backend-fail-delete', $params['src'] );
-
-                               return $status;
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @param string $fullCont
-        * @param string $dirRel
-        * @param array $params
-        * @return Status
-        */
-       protected function doPrepareInternal( $fullCont, $dirRel, array $params ) {
-               $status = Status::newGood();
-               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
-               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
-               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
-               $existed = is_dir( $dir ); // already there?
-               // Create the directory and its parents as needed...
-               $this->trapWarnings();
-               if ( !wfMkdirParents( $dir ) ) {
-                       wfDebugLog( 'FSFileBackend', __METHOD__ . ": cannot create directory $dir" );
-                       $status->fatal( 'directorycreateerror', $params['dir'] ); // fails on races
-               } elseif ( !is_writable( $dir ) ) {
-                       wfDebugLog( 'FSFileBackend', __METHOD__ . ": directory $dir is read-only" );
-                       $status->fatal( 'directoryreadonlyerror', $params['dir'] );
-               } elseif ( !is_readable( $dir ) ) {
-                       wfDebugLog( 'FSFileBackend', __METHOD__ . ": directory $dir is not readable" );
-                       $status->fatal( 'directorynotreadableerror', $params['dir'] );
-               }
-               $this->untrapWarnings();
-               // Respect any 'noAccess' or 'noListing' flags...
-               if ( is_dir( $dir ) && !$existed ) {
-                       $status->merge( $this->doSecureInternal( $fullCont, $dirRel, $params ) );
-               }
-
-               return $status;
-       }
-
-       protected function doSecureInternal( $fullCont, $dirRel, array $params ) {
-               $status = Status::newGood();
-               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
-               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
-               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
-               // Seed new directories with a blank index.html, to prevent crawling...
-               if ( !empty( $params['noListing'] ) && !file_exists( "{$dir}/index.html" ) ) {
-                       $this->trapWarnings();
-                       $bytes = file_put_contents( "{$dir}/index.html", $this->indexHtmlPrivate() );
-                       $this->untrapWarnings();
-                       if ( $bytes === false ) {
-                               $status->fatal( 'backend-fail-create', $params['dir'] . '/index.html' );
-                       }
-               }
-               // Add a .htaccess file to the root of the container...
-               if ( !empty( $params['noAccess'] ) && !file_exists( "{$contRoot}/.htaccess" ) ) {
-                       $this->trapWarnings();
-                       $bytes = file_put_contents( "{$contRoot}/.htaccess", $this->htaccessPrivate() );
-                       $this->untrapWarnings();
-                       if ( $bytes === false ) {
-                               $storeDir = "mwstore://{$this->name}/{$shortCont}";
-                               $status->fatal( 'backend-fail-create', "{$storeDir}/.htaccess" );
-                       }
-               }
-
-               return $status;
-       }
-
-       protected function doPublishInternal( $fullCont, $dirRel, array $params ) {
-               $status = Status::newGood();
-               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
-               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
-               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
-               // Unseed new directories with a blank index.html, to allow crawling...
-               if ( !empty( $params['listing'] ) && is_file( "{$dir}/index.html" ) ) {
-                       $exists = ( file_get_contents( "{$dir}/index.html" ) === $this->indexHtmlPrivate() );
-                       $this->trapWarnings();
-                       if ( $exists && !unlink( "{$dir}/index.html" ) ) { // reverse secure()
-                               $status->fatal( 'backend-fail-delete', $params['dir'] . '/index.html' );
-                       }
-                       $this->untrapWarnings();
-               }
-               // Remove the .htaccess file from the root of the container...
-               if ( !empty( $params['access'] ) && is_file( "{$contRoot}/.htaccess" ) ) {
-                       $exists = ( file_get_contents( "{$contRoot}/.htaccess" ) === $this->htaccessPrivate() );
-                       $this->trapWarnings();
-                       if ( $exists && !unlink( "{$contRoot}/.htaccess" ) ) { // reverse secure()
-                               $storeDir = "mwstore://{$this->name}/{$shortCont}";
-                               $status->fatal( 'backend-fail-delete', "{$storeDir}/.htaccess" );
-                       }
-                       $this->untrapWarnings();
-               }
-
-               return $status;
-       }
-
-       protected function doCleanInternal( $fullCont, $dirRel, array $params ) {
-               $status = Status::newGood();
-               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
-               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
-               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
-               $this->trapWarnings();
-               if ( is_dir( $dir ) ) {
-                       rmdir( $dir ); // remove directory if empty
-               }
-               $this->untrapWarnings();
-
-               return $status;
-       }
-
-       protected function doGetFileStat( array $params ) {
-               $source = $this->resolveToFSPath( $params['src'] );
-               if ( $source === null ) {
-                       return false; // invalid storage path
-               }
-
-               $this->trapWarnings(); // don't trust 'false' if there were errors
-               $stat = is_file( $source ) ? stat( $source ) : false; // regular files only
-               $hadError = $this->untrapWarnings();
-
-               if ( $stat ) {
-                       return [
-                               'mtime' => wfTimestamp( TS_MW, $stat['mtime'] ),
-                               'size' => $stat['size']
-                       ];
-               } elseif ( !$hadError ) {
-                       return false; // file does not exist
-               } else {
-                       return null; // failure
-               }
-       }
-
-       protected function doClearCache( array $paths = null ) {
-               clearstatcache(); // clear the PHP file stat cache
-       }
-
-       protected function doDirectoryExists( $fullCont, $dirRel, array $params ) {
-               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
-               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
-               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
-
-               $this->trapWarnings(); // don't trust 'false' if there were errors
-               $exists = is_dir( $dir );
-               $hadError = $this->untrapWarnings();
-
-               return $hadError ? null : $exists;
-       }
-
-       /**
-        * @see FileBackendStore::getDirectoryListInternal()
-        * @param string $fullCont
-        * @param string $dirRel
-        * @param array $params
-        * @return array|null
-        */
-       public function getDirectoryListInternal( $fullCont, $dirRel, array $params ) {
-               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
-               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
-               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
-               $exists = is_dir( $dir );
-               if ( !$exists ) {
-                       wfDebug( __METHOD__ . "() given directory does not exist: '$dir'\n" );
-
-                       return []; // nothing under this dir
-               } elseif ( !is_readable( $dir ) ) {
-                       wfDebug( __METHOD__ . "() given directory is unreadable: '$dir'\n" );
-
-                       return null; // bad permissions?
-               }
-
-               return new FSFileBackendDirList( $dir, $params );
-       }
-
-       /**
-        * @see FileBackendStore::getFileListInternal()
-        * @param string $fullCont
-        * @param string $dirRel
-        * @param array $params
-        * @return array|FSFileBackendFileList|null
-        */
-       public function getFileListInternal( $fullCont, $dirRel, array $params ) {
-               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
-               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
-               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
-               $exists = is_dir( $dir );
-               if ( !$exists ) {
-                       wfDebug( __METHOD__ . "() given directory does not exist: '$dir'\n" );
-
-                       return []; // nothing under this dir
-               } elseif ( !is_readable( $dir ) ) {
-                       wfDebug( __METHOD__ . "() given directory is unreadable: '$dir'\n" );
-
-                       return null; // bad permissions?
-               }
-
-               return new FSFileBackendFileList( $dir, $params );
-       }
-
-       protected function doGetLocalReferenceMulti( array $params ) {
-               $fsFiles = []; // (path => FSFile)
-
-               foreach ( $params['srcs'] as $src ) {
-                       $source = $this->resolveToFSPath( $src );
-                       if ( $source === null || !is_file( $source ) ) {
-                               $fsFiles[$src] = null; // invalid path or file does not exist
-                       } else {
-                               $fsFiles[$src] = new FSFile( $source );
-                       }
-               }
-
-               return $fsFiles;
-       }
-
-       protected function doGetLocalCopyMulti( array $params ) {
-               $tmpFiles = []; // (path => TempFSFile)
-
-               foreach ( $params['srcs'] as $src ) {
-                       $source = $this->resolveToFSPath( $src );
-                       if ( $source === null ) {
-                               $tmpFiles[$src] = null; // invalid path
-                       } else {
-                               // Create a new temporary file with the same extension...
-                               $ext = FileBackend::extensionFromPath( $src );
-                               $tmpFile = TempFSFile::factory( 'localcopy_', $ext );
-                               if ( !$tmpFile ) {
-                                       $tmpFiles[$src] = null;
-                               } else {
-                                       $tmpPath = $tmpFile->getPath();
-                                       // Copy the source file over the temp file
-                                       $this->trapWarnings();
-                                       $ok = copy( $source, $tmpPath );
-                                       $this->untrapWarnings();
-                                       if ( !$ok ) {
-                                               $tmpFiles[$src] = null;
-                                       } else {
-                                               $this->chmod( $tmpPath );
-                                               $tmpFiles[$src] = $tmpFile;
-                                       }
-                               }
-                       }
-               }
-
-               return $tmpFiles;
-       }
-
-       protected function directoriesAreVirtual() {
-               return false;
-       }
-
-       /**
-        * @param FSFileOpHandle[] $fileOpHandles
-        *
-        * @return Status[]
-        */
-       protected function doExecuteOpHandlesInternal( array $fileOpHandles ) {
-               $statuses = [];
-
-               $pipes = [];
-               foreach ( $fileOpHandles as $index => $fileOpHandle ) {
-                       $pipes[$index] = popen( "{$fileOpHandle->cmd} 2>&1", 'r' );
-               }
-
-               $errs = [];
-               foreach ( $pipes as $index => $pipe ) {
-                       // Result will be empty on success in *NIX. On Windows,
-                       // it may be something like "        1 file(s) [copied|moved].".
-                       $errs[$index] = stream_get_contents( $pipe );
-                       fclose( $pipe );
-               }
-
-               foreach ( $fileOpHandles as $index => $fileOpHandle ) {
-                       $status = Status::newGood();
-                       $function = $fileOpHandle->call;
-                       $function( $errs[$index], $status, $fileOpHandle->params, $fileOpHandle->cmd );
-                       $statuses[$index] = $status;
-                       if ( $status->isOK() && $fileOpHandle->chmodPath ) {
-                               $this->chmod( $fileOpHandle->chmodPath );
-                       }
-               }
-
-               clearstatcache(); // files changed
-               return $statuses;
-       }
-
-       /**
-        * Chmod a file, suppressing the warnings
-        *
-        * @param string $path Absolute file system path
-        * @return bool Success
-        */
-       protected function chmod( $path ) {
-               $this->trapWarnings();
-               $ok = chmod( $path, $this->fileMode );
-               $this->untrapWarnings();
-
-               return $ok;
-       }
-
-       /**
-        * Return the text of an index.html file to hide directory listings
-        *
-        * @return string
-        */
-       protected function indexHtmlPrivate() {
-               return '';
-       }
-
-       /**
-        * Return the text of a .htaccess file to make a directory private
-        *
-        * @return string
-        */
-       protected function htaccessPrivate() {
-               return "Deny from all\n";
-       }
-
-       /**
-        * Clean up directory separators for the given OS
-        *
-        * @param string $path FS path
-        * @return string
-        */
-       protected function cleanPathSlashes( $path ) {
-               return wfIsWindows() ? strtr( $path, '/', '\\' ) : $path;
-       }
-
-       /**
-        * Listen for E_WARNING errors and track whether any happen
-        */
-       protected function trapWarnings() {
-               $this->hadWarningErrors[] = false; // push to stack
-               set_error_handler( [ $this, 'handleWarning' ], E_WARNING );
-       }
-
-       /**
-        * Stop listening for E_WARNING errors and return true if any happened
-        *
-        * @return bool
-        */
-       protected function untrapWarnings() {
-               restore_error_handler(); // restore previous handler
-               return array_pop( $this->hadWarningErrors ); // pop from stack
-       }
-
-       /**
-        * @param int $errno
-        * @param string $errstr
-        * @return bool
-        * @access private
-        */
-       public function handleWarning( $errno, $errstr ) {
-               wfDebugLog( 'FSFileBackend', $errstr ); // more detailed error logging
-               $this->hadWarningErrors[count( $this->hadWarningErrors ) - 1] = true;
-
-               return true; // suppress from PHP handler
-       }
-}
-
-/**
- * @see FileBackendStoreOpHandle
- */
-class FSFileOpHandle extends FileBackendStoreOpHandle {
-       public $cmd; // string; shell command
-       public $chmodPath; // string; file to chmod
-
-       /**
-        * @param FSFileBackend $backend
-        * @param array $params
-        * @param callable $call
-        * @param string $cmd
-        * @param int|null $chmodPath
-        */
-       public function __construct(
-               FSFileBackend $backend, array $params, $call, $cmd, $chmodPath = null
-       ) {
-               $this->backend = $backend;
-               $this->params = $params;
-               $this->call = $call;
-               $this->cmd = $cmd;
-               $this->chmodPath = $chmodPath;
-       }
-}
-
-/**
- * Wrapper around RecursiveDirectoryIterator/DirectoryIterator that
- * catches exception or does any custom behavoir that we may want.
- * Do not use this class from places outside FSFileBackend.
- *
- * @ingroup FileBackend
- */
-abstract class FSFileBackendList implements Iterator {
-       /** @var Iterator */
-       protected $iter;
-
-       /** @var int */
-       protected $suffixStart;
-
-       /** @var int */
-       protected $pos = 0;
-
-       /** @var array */
-       protected $params = [];
-
-       /**
-        * @param string $dir File system directory
-        * @param array $params
-        */
-       public function __construct( $dir, array $params ) {
-               $path = realpath( $dir ); // normalize
-               if ( $path === false ) {
-                       $path = $dir;
-               }
-               $this->suffixStart = strlen( $path ) + 1; // size of "path/to/dir/"
-               $this->params = $params;
-
-               try {
-                       $this->iter = $this->initIterator( $path );
-               } catch ( UnexpectedValueException $e ) {
-                       $this->iter = null; // bad permissions? deleted?
-               }
-       }
-
-       /**
-        * Return an appropriate iterator object to wrap
-        *
-        * @param string $dir File system directory
-        * @return Iterator
-        */
-       protected function initIterator( $dir ) {
-               if ( !empty( $this->params['topOnly'] ) ) { // non-recursive
-                       # Get an iterator that will get direct sub-nodes
-                       return new DirectoryIterator( $dir );
-               } else { // recursive
-                       # Get an iterator that will return leaf nodes (non-directories)
-                       # RecursiveDirectoryIterator extends FilesystemIterator.
-                       # FilesystemIterator::SKIP_DOTS default is inconsistent in PHP 5.3.x.
-                       $flags = FilesystemIterator::CURRENT_AS_SELF | FilesystemIterator::SKIP_DOTS;
-
-                       return new RecursiveIteratorIterator(
-                               new RecursiveDirectoryIterator( $dir, $flags ),
-                               RecursiveIteratorIterator::CHILD_FIRST // include dirs
-                       );
-               }
-       }
-
-       /**
-        * @see Iterator::key()
-        * @return int
-        */
-       public function key() {
-               return $this->pos;
-       }
-
-       /**
-        * @see Iterator::current()
-        * @return string|bool String or false
-        */
-       public function current() {
-               return $this->getRelPath( $this->iter->current()->getPathname() );
-       }
-
-       /**
-        * @see Iterator::next()
-        * @throws FileBackendError
-        */
-       public function next() {
-               try {
-                       $this->iter->next();
-                       $this->filterViaNext();
-               } catch ( UnexpectedValueException $e ) { // bad permissions? deleted?
-                       throw new FileBackendError( "File iterator gave UnexpectedValueException." );
-               }
-               ++$this->pos;
-       }
-
-       /**
-        * @see Iterator::rewind()
-        * @throws FileBackendError
-        */
-       public function rewind() {
-               $this->pos = 0;
-               try {
-                       $this->iter->rewind();
-                       $this->filterViaNext();
-               } catch ( UnexpectedValueException $e ) { // bad permissions? deleted?
-                       throw new FileBackendError( "File iterator gave UnexpectedValueException." );
-               }
-       }
-
-       /**
-        * @see Iterator::valid()
-        * @return bool
-        */
-       public function valid() {
-               return $this->iter && $this->iter->valid();
-       }
-
-       /**
-        * Filter out items by advancing to the next ones
-        */
-       protected function filterViaNext() {
-       }
-
-       /**
-        * Return only the relative path and normalize slashes to FileBackend-style.
-        * Uses the "real path" since the suffix is based upon that.
-        *
-        * @param string $dir
-        * @return string
-        */
-       protected function getRelPath( $dir ) {
-               $path = realpath( $dir );
-               if ( $path === false ) {
-                       $path = $dir;
-               }
-
-               return strtr( substr( $path, $this->suffixStart ), '\\', '/' );
-       }
-}
-
-class FSFileBackendDirList extends FSFileBackendList {
-       protected function filterViaNext() {
-               while ( $this->iter->valid() ) {
-                       if ( $this->iter->current()->isDot() || !$this->iter->current()->isDir() ) {
-                               $this->iter->next(); // skip non-directories and dot files
-                       } else {
-                               break;
-                       }
-               }
-       }
-}
-
-class FSFileBackendFileList extends FSFileBackendList {
-       protected function filterViaNext() {
-               while ( $this->iter->valid() ) {
-                       if ( !$this->iter->current()->isFile() ) {
-                               $this->iter->next(); // skip non-files and dot files
-                       } else {
-                               break;
-                       }
-               }
-       }
-}
diff --git a/includes/filebackend/FileBackend.php b/includes/filebackend/FileBackend.php
deleted file mode 100644 (file)
index ed36a1f..0000000
+++ /dev/null
@@ -1,1551 +0,0 @@
-<?php
-/**
- * @defgroup FileBackend File backend
- *
- * File backend is used to interact with file storage systems,
- * such as the local file system, NFS, or cloud storage systems.
- */
-
-/**
- * Base class for all file backends.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileBackend
- * @author Aaron Schulz
- */
-
-/**
- * @brief Base class for all file backend classes (including multi-write backends).
- *
- * This class defines the methods as abstract that subclasses must implement.
- * Outside callers can assume that all backends will have these functions.
- *
- * All "storage paths" are of the format "mwstore://<backend>/<container>/<path>".
- * The "backend" portion is unique name for MediaWiki to refer to a backend, while
- * the "container" portion is a top-level directory of the backend. The "path" portion
- * is a relative path that uses UNIX file system (FS) notation, though any particular
- * backend may not actually be using a local filesystem. Therefore, the relative paths
- * are only virtual.
- *
- * Backend contents are stored under wiki-specific container names by default.
- * Global (qualified) backends are achieved by configuring the "wiki ID" to a constant.
- * For legacy reasons, the FSFileBackend class allows manually setting the paths of
- * containers to ones that do not respect the "wiki ID".
- *
- * In key/value (object) stores, containers are the only hierarchy (the rest is emulated).
- * FS-based backends are somewhat more restrictive due to the existence of real
- * directory files; a regular file cannot have the same name as a directory. Other
- * backends with virtual directories may not have this limitation. Callers should
- * store files in such a way that no files and directories are under the same path.
- *
- * In general, this class allows for callers to access storage through the same
- * interface, without regard to the underlying storage system. However, calling code
- * must follow certain patterns and be aware of certain things to ensure compatibility:
- *   - a) Always call prepare() on the parent directory before trying to put a file there;
- *        key/value stores only need the container to exist first, but filesystems need
- *        all the parent directories to exist first (prepare() is aware of all this)
- *   - b) Always call clean() on a directory when it might become empty to avoid empty
- *        directory buildup on filesystems; key/value stores never have empty directories,
- *        so doing this helps preserve consistency in both cases
- *   - c) Likewise, do not rely on the existence of empty directories for anything;
- *        calling directoryExists() on a path that prepare() was previously called on
- *        will return false for key/value stores if there are no files under that path
- *   - d) Never alter the resulting FSFile returned from getLocalReference(), as it could
- *        either be a copy of the source file in /tmp or the original source file itself
- *   - e) Use a file layout that results in never attempting to store files over directories
- *        or directories over files; key/value stores allow this but filesystems do not
- *   - f) Use ASCII file names (e.g. base32, IDs, hashes) to avoid Unicode issues in Windows
- *   - g) Do not assume that move operations are atomic (difficult with key/value stores)
- *   - h) Do not assume that file stat or read operations always have immediate consistency;
- *        various methods have a "latest" flag that should always be used if up-to-date
- *        information is required (this trades performance for correctness as needed)
- *   - i) Do not assume that directory listings have immediate consistency
- *
- * Methods of subclasses should avoid throwing exceptions at all costs.
- * As a corollary, external dependencies should be kept to a minimum.
- *
- * @ingroup FileBackend
- * @since 1.19
- */
-abstract class FileBackend {
-       /** @var string Unique backend name */
-       protected $name;
-
-       /** @var string Unique wiki name */
-       protected $wikiId;
-
-       /** @var string Read-only explanation message */
-       protected $readOnly;
-
-       /** @var string When to do operations in parallel */
-       protected $parallelize;
-
-       /** @var int How many operations can be done in parallel */
-       protected $concurrency;
-
-       /** @var LockManager */
-       protected $lockManager;
-
-       /** @var FileJournal */
-       protected $fileJournal;
-
-       /** Bitfield flags for supported features */
-       const ATTR_HEADERS = 1; // files can be tagged with standard HTTP headers
-       const ATTR_METADATA = 2; // files can be stored with metadata key/values
-       const ATTR_UNICODE_PATHS = 4; // files can have Unicode paths (not just ASCII)
-
-       /**
-        * Create a new backend instance from configuration.
-        * This should only be called from within FileBackendGroup.
-        *
-        * @param array $config Parameters include:
-        *   - name        : The unique name of this backend.
-        *                   This should consist of alphanumberic, '-', and '_' characters.
-        *                   This name should not be changed after use (e.g. with journaling).
-        *                   Note that the name is *not* used in actual container names.
-        *   - wikiId      : Prefix to container names that is unique to this backend.
-        *                   It should only consist of alphanumberic, '-', and '_' characters.
-        *                   This ID is what avoids collisions if multiple logical backends
-        *                   use the same storage system, so this should be set carefully.
-        *   - lockManager : LockManager object to use for any file locking.
-        *                   If not provided, then no file locking will be enforced.
-        *   - fileJournal : FileJournal object to use for logging changes to files.
-        *                   If not provided, then change journaling will be disabled.
-        *   - readOnly    : Write operations are disallowed if this is a non-empty string.
-        *                   It should be an explanation for the backend being read-only.
-        *   - parallelize : When to do file operations in parallel (when possible).
-        *                   Allowed values are "implicit", "explicit" and "off".
-        *   - concurrency : How many file operations can be done in parallel.
-        * @throws FileBackendException
-        */
-       public function __construct( array $config ) {
-               $this->name = $config['name'];
-               $this->wikiId = $config['wikiId']; // e.g. "my_wiki-en_"
-               if ( !preg_match( '!^[a-zA-Z0-9-_]{1,255}$!', $this->name ) ) {
-                       throw new FileBackendException( "Backend name '{$this->name}' is invalid." );
-               } elseif ( !is_string( $this->wikiId ) ) {
-                       throw new FileBackendException( "Backend wiki ID not provided for '{$this->name}'." );
-               }
-               $this->lockManager = isset( $config['lockManager'] )
-                       ? $config['lockManager']
-                       : new NullLockManager( [] );
-               $this->fileJournal = isset( $config['fileJournal'] )
-                       ? $config['fileJournal']
-                       : FileJournal::factory( [ 'class' => 'NullFileJournal' ], $this->name );
-               $this->readOnly = isset( $config['readOnly'] )
-                       ? (string)$config['readOnly']
-                       : '';
-               $this->parallelize = isset( $config['parallelize'] )
-                       ? (string)$config['parallelize']
-                       : 'off';
-               $this->concurrency = isset( $config['concurrency'] )
-                       ? (int)$config['concurrency']
-                       : 50;
-       }
-
-       /**
-        * Get the unique backend name.
-        * We may have multiple different backends of the same type.
-        * For example, we can have two Swift backends using different proxies.
-        *
-        * @return string
-        */
-       final public function getName() {
-               return $this->name;
-       }
-
-       /**
-        * Get the wiki identifier used for this backend (possibly empty).
-        * Note that this might *not* be in the same format as wfWikiID().
-        *
-        * @return string
-        * @since 1.20
-        */
-       final public function getWikiId() {
-               return $this->wikiId;
-       }
-
-       /**
-        * Check if this backend is read-only
-        *
-        * @return bool
-        */
-       final public function isReadOnly() {
-               return ( $this->readOnly != '' );
-       }
-
-       /**
-        * Get an explanatory message if this backend is read-only
-        *
-        * @return string|bool Returns false if the backend is not read-only
-        */
-       final public function getReadOnlyReason() {
-               return ( $this->readOnly != '' ) ? $this->readOnly : false;
-       }
-
-       /**
-        * Get the a bitfield of extra features supported by the backend medium
-        *
-        * @return int Bitfield of FileBackend::ATTR_* flags
-        * @since 1.23
-        */
-       public function getFeatures() {
-               return self::ATTR_UNICODE_PATHS;
-       }
-
-       /**
-        * Check if the backend medium supports a field of extra features
-        *
-        * @param int $bitfield Bitfield of FileBackend::ATTR_* flags
-        * @return bool
-        * @since 1.23
-        */
-       final public function hasFeatures( $bitfield ) {
-               return ( $this->getFeatures() & $bitfield ) === $bitfield;
-       }
-
-       /**
-        * This is the main entry point into the backend for write operations.
-        * Callers supply an ordered list of operations to perform as a transaction.
-        * Files will be locked, the stat cache cleared, and then the operations attempted.
-        * If any serious errors occur, all attempted operations will be rolled back.
-        *
-        * $ops is an array of arrays. The outer array holds a list of operations.
-        * Each inner array is a set of key value pairs that specify an operation.
-        *
-        * Supported operations and their parameters. The supported actions are:
-        *  - create
-        *  - store
-        *  - copy
-        *  - move
-        *  - delete
-        *  - describe (since 1.21)
-        *  - null
-        *
-        * FSFile/TempFSFile object support was added in 1.27.
-        *
-        * a) Create a new file in storage with the contents of a string
-        * @code
-        *     [
-        *         'op'                  => 'create',
-        *         'dst'                 => <storage path>,
-        *         'content'             => <string of new file contents>,
-        *         'overwrite'           => <boolean>,
-        *         'overwriteSame'       => <boolean>,
-        *         'headers'             => <HTTP header name/value map> # since 1.21
-        *     ]
-        * @endcode
-        *
-        * b) Copy a file system file into storage
-        * @code
-        *     [
-        *         'op'                  => 'store',
-        *         'src'                 => <file system path, FSFile, or TempFSFile>,
-        *         'dst'                 => <storage path>,
-        *         'overwrite'           => <boolean>,
-        *         'overwriteSame'       => <boolean>,
-        *         'headers'             => <HTTP header name/value map> # since 1.21
-        *     ]
-        * @endcode
-        *
-        * c) Copy a file within storage
-        * @code
-        *     [
-        *         'op'                  => 'copy',
-        *         'src'                 => <storage path>,
-        *         'dst'                 => <storage path>,
-        *         'overwrite'           => <boolean>,
-        *         'overwriteSame'       => <boolean>,
-        *         'ignoreMissingSource' => <boolean>, # since 1.21
-        *         'headers'             => <HTTP header name/value map> # since 1.21
-        *     ]
-        * @endcode
-        *
-        * d) Move a file within storage
-        * @code
-        *     [
-        *         'op'                  => 'move',
-        *         'src'                 => <storage path>,
-        *         'dst'                 => <storage path>,
-        *         'overwrite'           => <boolean>,
-        *         'overwriteSame'       => <boolean>,
-        *         'ignoreMissingSource' => <boolean>, # since 1.21
-        *         'headers'             => <HTTP header name/value map> # since 1.21
-        *     ]
-        * @endcode
-        *
-        * e) Delete a file within storage
-        * @code
-        *     [
-        *         'op'                  => 'delete',
-        *         'src'                 => <storage path>,
-        *         'ignoreMissingSource' => <boolean>
-        *     ]
-        * @endcode
-        *
-        * f) Update metadata for a file within storage
-        * @code
-        *     [
-        *         'op'                  => 'describe',
-        *         'src'                 => <storage path>,
-        *         'headers'             => <HTTP header name/value map>
-        *     ]
-        * @endcode
-        *
-        * g) Do nothing (no-op)
-        * @code
-        *     [
-        *         'op'                  => 'null',
-        *     ]
-        * @endcode
-        *
-        * Boolean flags for operations (operation-specific):
-        *   - ignoreMissingSource : The operation will simply succeed and do
-        *                           nothing if the source file does not exist.
-        *   - overwrite           : Any destination file will be overwritten.
-        *   - overwriteSame       : If a file already exists at the destination with the
-        *                           same contents, then do nothing to the destination file
-        *                           instead of giving an error. This does not compare headers.
-        *                           This option is ignored if 'overwrite' is already provided.
-        *   - headers             : If supplied, the result of merging these headers with any
-        *                           existing source file headers (replacing conflicting ones)
-        *                           will be set as the destination file headers. Headers are
-        *                           deleted if their value is set to the empty string. When a
-        *                           file has headers they are included in responses to GET and
-        *                           HEAD requests to the backing store for that file.
-        *                           Header values should be no larger than 255 bytes, except for
-        *                           Content-Disposition. The system might ignore or truncate any
-        *                           headers that are too long to store (exact limits will vary).
-        *                           Backends that don't support metadata ignore this. (since 1.21)
-        *
-        * $opts is an associative of boolean flags, including:
-        *   - force               : Operation precondition errors no longer trigger an abort.
-        *                           Any remaining operations are still attempted. Unexpected
-        *                           failures may still cause remaining operations to be aborted.
-        *   - nonLocking          : No locks are acquired for the operations.
-        *                           This can increase performance for non-critical writes.
-        *                           This has no effect unless the 'force' flag is set.
-        *   - nonJournaled        : Don't log this operation batch in the file journal.
-        *                           This limits the ability of recovery scripts.
-        *   - parallelize         : Try to do operations in parallel when possible.
-        *   - bypassReadOnly      : Allow writes in read-only mode. (since 1.20)
-        *   - preserveCache       : Don't clear the process cache before checking files.
-        *                           This should only be used if all entries in the process
-        *                           cache were added after the files were already locked. (since 1.20)
-        *
-        * @remarks Remarks on locking:
-        * File system paths given to operations should refer to files that are
-        * already locked or otherwise safe from modification from other processes.
-        * Normally these files will be new temp files, which should be adequate.
-        *
-        * @par Return value:
-        *
-        * This returns a Status, which contains all warnings and fatals that occurred
-        * during the operation. The 'failCount', 'successCount', and 'success' members
-        * will reflect each operation attempted.
-        *
-        * The status will be "OK" unless:
-        *   - a) unexpected operation errors occurred (network partitions, disk full...)
-        *   - b) significant operation errors occurred and 'force' was not set
-        *
-        * @param array $ops List of operations to execute in order
-        * @param array $opts Batch operation options
-        * @return Status
-        */
-       final public function doOperations( array $ops, array $opts = [] ) {
-               if ( empty( $opts['bypassReadOnly'] ) && $this->isReadOnly() ) {
-                       return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
-               }
-               if ( !count( $ops ) ) {
-                       return Status::newGood(); // nothing to do
-               }
-
-               $ops = $this->resolveFSFileObjects( $ops );
-               if ( empty( $opts['force'] ) ) { // sanity
-                       unset( $opts['nonLocking'] );
-               }
-
-               /** @noinspection PhpUnusedLocalVariableInspection */
-               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
-
-               return $this->doOperationsInternal( $ops, $opts );
-       }
-
-       /**
-        * @see FileBackend::doOperations()
-        * @param array $ops
-        * @param array $opts
-        */
-       abstract protected function doOperationsInternal( array $ops, array $opts );
-
-       /**
-        * Same as doOperations() except it takes a single operation.
-        * If you are doing a batch of operations that should either
-        * all succeed or all fail, then use that function instead.
-        *
-        * @see FileBackend::doOperations()
-        *
-        * @param array $op Operation
-        * @param array $opts Operation options
-        * @return Status
-        */
-       final public function doOperation( array $op, array $opts = [] ) {
-               return $this->doOperations( [ $op ], $opts );
-       }
-
-       /**
-        * Performs a single create operation.
-        * This sets $params['op'] to 'create' and passes it to doOperation().
-        *
-        * @see FileBackend::doOperation()
-        *
-        * @param array $params Operation parameters
-        * @param array $opts Operation options
-        * @return Status
-        */
-       final public function create( array $params, array $opts = [] ) {
-               return $this->doOperation( [ 'op' => 'create' ] + $params, $opts );
-       }
-
-       /**
-        * Performs a single store operation.
-        * This sets $params['op'] to 'store' and passes it to doOperation().
-        *
-        * @see FileBackend::doOperation()
-        *
-        * @param array $params Operation parameters
-        * @param array $opts Operation options
-        * @return Status
-        */
-       final public function store( array $params, array $opts = [] ) {
-               return $this->doOperation( [ 'op' => 'store' ] + $params, $opts );
-       }
-
-       /**
-        * Performs a single copy operation.
-        * This sets $params['op'] to 'copy' and passes it to doOperation().
-        *
-        * @see FileBackend::doOperation()
-        *
-        * @param array $params Operation parameters
-        * @param array $opts Operation options
-        * @return Status
-        */
-       final public function copy( array $params, array $opts = [] ) {
-               return $this->doOperation( [ 'op' => 'copy' ] + $params, $opts );
-       }
-
-       /**
-        * Performs a single move operation.
-        * This sets $params['op'] to 'move' and passes it to doOperation().
-        *
-        * @see FileBackend::doOperation()
-        *
-        * @param array $params Operation parameters
-        * @param array $opts Operation options
-        * @return Status
-        */
-       final public function move( array $params, array $opts = [] ) {
-               return $this->doOperation( [ 'op' => 'move' ] + $params, $opts );
-       }
-
-       /**
-        * Performs a single delete operation.
-        * This sets $params['op'] to 'delete' and passes it to doOperation().
-        *
-        * @see FileBackend::doOperation()
-        *
-        * @param array $params Operation parameters
-        * @param array $opts Operation options
-        * @return Status
-        */
-       final public function delete( array $params, array $opts = [] ) {
-               return $this->doOperation( [ 'op' => 'delete' ] + $params, $opts );
-       }
-
-       /**
-        * Performs a single describe operation.
-        * This sets $params['op'] to 'describe' and passes it to doOperation().
-        *
-        * @see FileBackend::doOperation()
-        *
-        * @param array $params Operation parameters
-        * @param array $opts Operation options
-        * @return Status
-        * @since 1.21
-        */
-       final public function describe( array $params, array $opts = [] ) {
-               return $this->doOperation( [ 'op' => 'describe' ] + $params, $opts );
-       }
-
-       /**
-        * Perform a set of independent file operations on some files.
-        *
-        * This does no locking, nor journaling, and possibly no stat calls.
-        * Any destination files that already exist will be overwritten.
-        * This should *only* be used on non-original files, like cache files.
-        *
-        * Supported operations and their parameters:
-        *  - create
-        *  - store
-        *  - copy
-        *  - move
-        *  - delete
-        *  - describe (since 1.21)
-        *  - null
-        *
-        * FSFile/TempFSFile object support was added in 1.27.
-        *
-        * a) Create a new file in storage with the contents of a string
-        * @code
-        *     [
-        *         'op'                  => 'create',
-        *         'dst'                 => <storage path>,
-        *         'content'             => <string of new file contents>,
-        *         'headers'             => <HTTP header name/value map> # since 1.21
-        *     ]
-        * @endcode
-        *
-        * b) Copy a file system file into storage
-        * @code
-        *     [
-        *         'op'                  => 'store',
-        *         'src'                 => <file system path, FSFile, or TempFSFile>,
-        *         'dst'                 => <storage path>,
-        *         'headers'             => <HTTP header name/value map> # since 1.21
-        *     ]
-        * @endcode
-        *
-        * c) Copy a file within storage
-        * @code
-        *     [
-        *         'op'                  => 'copy',
-        *         'src'                 => <storage path>,
-        *         'dst'                 => <storage path>,
-        *         'ignoreMissingSource' => <boolean>, # since 1.21
-        *         'headers'             => <HTTP header name/value map> # since 1.21
-        *     ]
-        * @endcode
-        *
-        * d) Move a file within storage
-        * @code
-        *     [
-        *         'op'                  => 'move',
-        *         'src'                 => <storage path>,
-        *         'dst'                 => <storage path>,
-        *         'ignoreMissingSource' => <boolean>, # since 1.21
-        *         'headers'             => <HTTP header name/value map> # since 1.21
-        *     ]
-        * @endcode
-        *
-        * e) Delete a file within storage
-        * @code
-        *     [
-        *         'op'                  => 'delete',
-        *         'src'                 => <storage path>,
-        *         'ignoreMissingSource' => <boolean>
-        *     ]
-        * @endcode
-        *
-        * f) Update metadata for a file within storage
-        * @code
-        *     [
-        *         'op'                  => 'describe',
-        *         'src'                 => <storage path>,
-        *         'headers'             => <HTTP header name/value map>
-        *     ]
-        * @endcode
-        *
-        * g) Do nothing (no-op)
-        * @code
-        *     [
-        *         'op'                  => 'null',
-        *     ]
-        * @endcode
-        *
-        * @par Boolean flags for operations (operation-specific):
-        *   - ignoreMissingSource : The operation will simply succeed and do
-        *                           nothing if the source file does not exist.
-        *   - headers             : If supplied with a header name/value map, the backend will
-        *                           reply with these headers when GETs/HEADs of the destination
-        *                           file are made. Header values should be smaller than 256 bytes.
-        *                           Content-Disposition headers can be longer, though the system
-        *                           might ignore or truncate ones that are too long to store.
-        *                           Existing headers will remain, but these will replace any
-        *                           conflicting previous headers, and headers will be removed
-        *                           if they are set to an empty string.
-        *                           Backends that don't support metadata ignore this. (since 1.21)
-        *
-        * $opts is an associative of boolean flags, including:
-        *   - bypassReadOnly      : Allow writes in read-only mode (since 1.20)
-        *
-        * @par Return value:
-        * This returns a Status, which contains all warnings and fatals that occurred
-        * during the operation. The 'failCount', 'successCount', and 'success' members
-        * will reflect each operation attempted for the given files. The status will be
-        * considered "OK" as long as no fatal errors occurred.
-        *
-        * @param array $ops Set of operations to execute
-        * @param array $opts Batch operation options
-        * @return Status
-        * @since 1.20
-        */
-       final public function doQuickOperations( array $ops, array $opts = [] ) {
-               if ( empty( $opts['bypassReadOnly'] ) && $this->isReadOnly() ) {
-                       return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
-               }
-               if ( !count( $ops ) ) {
-                       return Status::newGood(); // nothing to do
-               }
-
-               $ops = $this->resolveFSFileObjects( $ops );
-               foreach ( $ops as &$op ) {
-                       $op['overwrite'] = true; // avoids RTTs in key/value stores
-               }
-
-               /** @noinspection PhpUnusedLocalVariableInspection */
-               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
-
-               return $this->doQuickOperationsInternal( $ops );
-       }
-
-       /**
-        * @see FileBackend::doQuickOperations()
-        * @param array $ops
-        * @since 1.20
-        */
-       abstract protected function doQuickOperationsInternal( array $ops );
-
-       /**
-        * Same as doQuickOperations() except it takes a single operation.
-        * If you are doing a batch of operations, then use that function instead.
-        *
-        * @see FileBackend::doQuickOperations()
-        *
-        * @param array $op Operation
-        * @return Status
-        * @since 1.20
-        */
-       final public function doQuickOperation( array $op ) {
-               return $this->doQuickOperations( [ $op ] );
-       }
-
-       /**
-        * Performs a single quick create operation.
-        * This sets $params['op'] to 'create' and passes it to doQuickOperation().
-        *
-        * @see FileBackend::doQuickOperation()
-        *
-        * @param array $params Operation parameters
-        * @return Status
-        * @since 1.20
-        */
-       final public function quickCreate( array $params ) {
-               return $this->doQuickOperation( [ 'op' => 'create' ] + $params );
-       }
-
-       /**
-        * Performs a single quick store operation.
-        * This sets $params['op'] to 'store' and passes it to doQuickOperation().
-        *
-        * @see FileBackend::doQuickOperation()
-        *
-        * @param array $params Operation parameters
-        * @return Status
-        * @since 1.20
-        */
-       final public function quickStore( array $params ) {
-               return $this->doQuickOperation( [ 'op' => 'store' ] + $params );
-       }
-
-       /**
-        * Performs a single quick copy operation.
-        * This sets $params['op'] to 'copy' and passes it to doQuickOperation().
-        *
-        * @see FileBackend::doQuickOperation()
-        *
-        * @param array $params Operation parameters
-        * @return Status
-        * @since 1.20
-        */
-       final public function quickCopy( array $params ) {
-               return $this->doQuickOperation( [ 'op' => 'copy' ] + $params );
-       }
-
-       /**
-        * Performs a single quick move operation.
-        * This sets $params['op'] to 'move' and passes it to doQuickOperation().
-        *
-        * @see FileBackend::doQuickOperation()
-        *
-        * @param array $params Operation parameters
-        * @return Status
-        * @since 1.20
-        */
-       final public function quickMove( array $params ) {
-               return $this->doQuickOperation( [ 'op' => 'move' ] + $params );
-       }
-
-       /**
-        * Performs a single quick delete operation.
-        * This sets $params['op'] to 'delete' and passes it to doQuickOperation().
-        *
-        * @see FileBackend::doQuickOperation()
-        *
-        * @param array $params Operation parameters
-        * @return Status
-        * @since 1.20
-        */
-       final public function quickDelete( array $params ) {
-               return $this->doQuickOperation( [ 'op' => 'delete' ] + $params );
-       }
-
-       /**
-        * Performs a single quick describe operation.
-        * This sets $params['op'] to 'describe' and passes it to doQuickOperation().
-        *
-        * @see FileBackend::doQuickOperation()
-        *
-        * @param array $params Operation parameters
-        * @return Status
-        * @since 1.21
-        */
-       final public function quickDescribe( array $params ) {
-               return $this->doQuickOperation( [ 'op' => 'describe' ] + $params );
-       }
-
-       /**
-        * Concatenate a list of storage files into a single file system file.
-        * The target path should refer to a file that is already locked or
-        * otherwise safe from modification from other processes. Normally,
-        * the file will be a new temp file, which should be adequate.
-        *
-        * @param array $params Operation parameters, include:
-        *   - srcs        : ordered source storage paths (e.g. chunk1, chunk2, ...)
-        *   - dst         : file system path to 0-byte temp file
-        *   - parallelize : try to do operations in parallel when possible
-        * @return Status
-        */
-       abstract public function concatenate( array $params );
-
-       /**
-        * Prepare a storage directory for usage.
-        * This will create any required containers and parent directories.
-        * Backends using key/value stores only need to create the container.
-        *
-        * The 'noAccess' and 'noListing' parameters works the same as in secure(),
-        * except they are only applied *if* the directory/container had to be created.
-        * These flags should always be set for directories that have private files.
-        * However, setting them is not guaranteed to actually do anything.
-        * Additional server configuration may be needed to achieve the desired effect.
-        *
-        * @param array $params Parameters include:
-        *   - dir            : storage directory
-        *   - noAccess       : try to deny file access (since 1.20)
-        *   - noListing      : try to deny file listing (since 1.20)
-        *   - bypassReadOnly : allow writes in read-only mode (since 1.20)
-        * @return Status
-        */
-       final public function prepare( array $params ) {
-               if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
-                       return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
-               }
-               /** @noinspection PhpUnusedLocalVariableInspection */
-               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
-               return $this->doPrepare( $params );
-       }
-
-       /**
-        * @see FileBackend::prepare()
-        * @param array $params
-        */
-       abstract protected function doPrepare( array $params );
-
-       /**
-        * Take measures to block web access to a storage directory and
-        * the container it belongs to. FS backends might add .htaccess
-        * files whereas key/value store backends might revoke container
-        * access to the storage user representing end-users in web requests.
-        *
-        * This is not guaranteed to actually make files or listings publically hidden.
-        * Additional server configuration may be needed to achieve the desired effect.
-        *
-        * @param array $params Parameters include:
-        *   - dir            : storage directory
-        *   - noAccess       : try to deny file access
-        *   - noListing      : try to deny file listing
-        *   - bypassReadOnly : allow writes in read-only mode (since 1.20)
-        * @return Status
-        */
-       final public function secure( array $params ) {
-               if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
-                       return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
-               }
-               /** @noinspection PhpUnusedLocalVariableInspection */
-               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
-               return $this->doSecure( $params );
-       }
-
-       /**
-        * @see FileBackend::secure()
-        * @param array $params
-        */
-       abstract protected function doSecure( array $params );
-
-       /**
-        * Remove measures to block web access to a storage directory and
-        * the container it belongs to. FS backends might remove .htaccess
-        * files whereas key/value store backends might grant container
-        * access to the storage user representing end-users in web requests.
-        * This essentially can undo the result of secure() calls.
-        *
-        * This is not guaranteed to actually make files or listings publically viewable.
-        * Additional server configuration may be needed to achieve the desired effect.
-        *
-        * @param array $params Parameters include:
-        *   - dir            : storage directory
-        *   - access         : try to allow file access
-        *   - listing        : try to allow file listing
-        *   - bypassReadOnly : allow writes in read-only mode (since 1.20)
-        * @return Status
-        * @since 1.20
-        */
-       final public function publish( array $params ) {
-               if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
-                       return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
-               }
-               /** @noinspection PhpUnusedLocalVariableInspection */
-               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
-               return $this->doPublish( $params );
-       }
-
-       /**
-        * @see FileBackend::publish()
-        * @param array $params
-        */
-       abstract protected function doPublish( array $params );
-
-       /**
-        * Delete a storage directory if it is empty.
-        * Backends using key/value stores may do nothing unless the directory
-        * is that of an empty container, in which case it will be deleted.
-        *
-        * @param array $params Parameters include:
-        *   - dir            : storage directory
-        *   - recursive      : recursively delete empty subdirectories first (since 1.20)
-        *   - bypassReadOnly : allow writes in read-only mode (since 1.20)
-        * @return Status
-        */
-       final public function clean( array $params ) {
-               if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
-                       return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
-               }
-               /** @noinspection PhpUnusedLocalVariableInspection */
-               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
-               return $this->doClean( $params );
-       }
-
-       /**
-        * @see FileBackend::clean()
-        * @param array $params
-        */
-       abstract protected function doClean( array $params );
-
-       /**
-        * Enter file operation scope.
-        * This just makes PHP ignore user aborts/disconnects until the return
-        * value leaves scope. This returns null and does nothing in CLI mode.
-        *
-        * @return ScopedCallback|null
-        */
-       final protected function getScopedPHPBehaviorForOps() {
-               if ( PHP_SAPI != 'cli' ) { // http://bugs.php.net/bug.php?id=47540
-                       $old = ignore_user_abort( true ); // avoid half-finished operations
-                       return new ScopedCallback( function () use ( $old ) {
-                               ignore_user_abort( $old );
-                       } );
-               }
-
-               return null;
-       }
-
-       /**
-        * Check if a file exists at a storage path in the backend.
-        * This returns false if only a directory exists at the path.
-        *
-        * @param array $params Parameters include:
-        *   - src    : source storage path
-        *   - latest : use the latest available data
-        * @return bool|null Returns null on failure
-        */
-       abstract public function fileExists( array $params );
-
-       /**
-        * Get the last-modified timestamp of the file at a storage path.
-        *
-        * @param array $params Parameters include:
-        *   - src    : source storage path
-        *   - latest : use the latest available data
-        * @return string|bool TS_MW timestamp or false on failure
-        */
-       abstract public function getFileTimestamp( array $params );
-
-       /**
-        * Get the contents of a file at a storage path in the backend.
-        * This should be avoided for potentially large files.
-        *
-        * @param array $params Parameters include:
-        *   - src    : source storage path
-        *   - latest : use the latest available data
-        * @return string|bool Returns false on failure
-        */
-       final public function getFileContents( array $params ) {
-               $contents = $this->getFileContentsMulti(
-                       [ 'srcs' => [ $params['src'] ] ] + $params );
-
-               return $contents[$params['src']];
-       }
-
-       /**
-        * Like getFileContents() except it takes an array of storage paths
-        * and returns a map of storage paths to strings (or null on failure).
-        * The map keys (paths) are in the same order as the provided list of paths.
-        *
-        * @see FileBackend::getFileContents()
-        *
-        * @param array $params Parameters include:
-        *   - srcs        : list of source storage paths
-        *   - latest      : use the latest available data
-        *   - parallelize : try to do operations in parallel when possible
-        * @return array Map of (path name => string or false on failure)
-        * @since 1.20
-        */
-       abstract public function getFileContentsMulti( array $params );
-
-       /**
-        * Get metadata about a file at a storage path in the backend.
-        * If the file does not exist, then this returns false.
-        * Otherwise, the result is an associative array that includes:
-        *   - headers  : map of HTTP headers used for GET/HEAD requests (name => value)
-        *   - metadata : map of file metadata (name => value)
-        * Metadata keys and headers names will be returned in all lower-case.
-        * Additional values may be included for internal use only.
-        *
-        * Use FileBackend::hasFeatures() to check how well this is supported.
-        *
-        * @param array $params
-        * $params include:
-        *   - src    : source storage path
-        *   - latest : use the latest available data
-        * @return array|bool Returns false on failure
-        * @since 1.23
-        */
-       abstract public function getFileXAttributes( array $params );
-
-       /**
-        * Get the size (bytes) of a file at a storage path in the backend.
-        *
-        * @param array $params Parameters include:
-        *   - src    : source storage path
-        *   - latest : use the latest available data
-        * @return int|bool Returns false on failure
-        */
-       abstract public function getFileSize( array $params );
-
-       /**
-        * Get quick information about a file at a storage path in the backend.
-        * If the file does not exist, then this returns false.
-        * Otherwise, the result is an associative array that includes:
-        *   - mtime  : the last-modified timestamp (TS_MW)
-        *   - size   : the file size (bytes)
-        * Additional values may be included for internal use only.
-        *
-        * @param array $params Parameters include:
-        *   - src    : source storage path
-        *   - latest : use the latest available data
-        * @return array|bool|null Returns null on failure
-        */
-       abstract public function getFileStat( array $params );
-
-       /**
-        * Get a SHA-1 hash of the file at a storage path in the backend.
-        *
-        * @param array $params Parameters include:
-        *   - src    : source storage path
-        *   - latest : use the latest available data
-        * @return string|bool Hash string or false on failure
-        */
-       abstract public function getFileSha1Base36( array $params );
-
-       /**
-        * Get the properties of the file at a storage path in the backend.
-        * This gives the result of FSFile::getProps() on a local copy of the file.
-        *
-        * @param array $params Parameters include:
-        *   - src    : source storage path
-        *   - latest : use the latest available data
-        * @return array Returns FSFile::placeholderProps() on failure
-        */
-       abstract public function getFileProps( array $params );
-
-       /**
-        * Stream the file at a storage path in the backend.
-        *
-        * If the file does not exists, an HTTP 404 error will be given.
-        * Appropriate HTTP headers (Status, Content-Type, Content-Length)
-        * will be sent if streaming began, while none will be sent otherwise.
-        * Implementations should flush the output buffer before sending data.
-        *
-        * @param array $params Parameters include:
-        *   - src      : source storage path
-        *   - headers  : list of additional HTTP headers to send if the file exists
-        *   - options  : HTTP request header map with lower case keys (since 1.28). Supports:
-        *                range             : format is "bytes=(\d*-\d*)"
-        *                if-modified-since : format is an HTTP date
-        *   - headless : only include the body (and headers from "headers") (since 1.28)
-        *   - latest   : use the latest available data
-        *   - allowOB  : preserve any output buffers (since 1.28)
-        * @return Status
-        */
-       abstract public function streamFile( array $params );
-
-       /**
-        * Returns a file system file, identical to the file at a storage path.
-        * The file returned is either:
-        *   - a) A local copy of the file at a storage path in the backend.
-        *        The temporary copy will have the same extension as the source.
-        *   - b) An original of the file at a storage path in the backend.
-        * Temporary files may be purged when the file object falls out of scope.
-        *
-        * Write operations should *never* be done on this file as some backends
-        * may do internal tracking or may be instances of FileBackendMultiWrite.
-        * In that latter case, there are copies of the file that must stay in sync.
-        * Additionally, further calls to this function may return the same file.
-        *
-        * @param array $params Parameters include:
-        *   - src    : source storage path
-        *   - latest : use the latest available data
-        * @return FSFile|null Returns null on failure
-        */
-       final public function getLocalReference( array $params ) {
-               $fsFiles = $this->getLocalReferenceMulti(
-                       [ 'srcs' => [ $params['src'] ] ] + $params );
-
-               return $fsFiles[$params['src']];
-       }
-
-       /**
-        * Like getLocalReference() except it takes an array of storage paths
-        * and returns a map of storage paths to FSFile objects (or null on failure).
-        * The map keys (paths) are in the same order as the provided list of paths.
-        *
-        * @see FileBackend::getLocalReference()
-        *
-        * @param array $params Parameters include:
-        *   - srcs        : list of source storage paths
-        *   - latest      : use the latest available data
-        *   - parallelize : try to do operations in parallel when possible
-        * @return array Map of (path name => FSFile or null on failure)
-        * @since 1.20
-        */
-       abstract public function getLocalReferenceMulti( array $params );
-
-       /**
-        * Get a local copy on disk of the file at a storage path in the backend.
-        * The temporary copy will have the same file extension as the source.
-        * Temporary files may be purged when the file object falls out of scope.
-        *
-        * @param array $params Parameters include:
-        *   - src    : source storage path
-        *   - latest : use the latest available data
-        * @return TempFSFile|null Returns null on failure
-        */
-       final public function getLocalCopy( array $params ) {
-               $tmpFiles = $this->getLocalCopyMulti(
-                       [ 'srcs' => [ $params['src'] ] ] + $params );
-
-               return $tmpFiles[$params['src']];
-       }
-
-       /**
-        * Like getLocalCopy() except it takes an array of storage paths and
-        * returns a map of storage paths to TempFSFile objects (or null on failure).
-        * The map keys (paths) are in the same order as the provided list of paths.
-        *
-        * @see FileBackend::getLocalCopy()
-        *
-        * @param array $params Parameters include:
-        *   - srcs        : list of source storage paths
-        *   - latest      : use the latest available data
-        *   - parallelize : try to do operations in parallel when possible
-        * @return array Map of (path name => TempFSFile or null on failure)
-        * @since 1.20
-        */
-       abstract public function getLocalCopyMulti( array $params );
-
-       /**
-        * Return an HTTP URL to a given file that requires no authentication to use.
-        * The URL may be pre-authenticated (via some token in the URL) and temporary.
-        * This will return null if the backend cannot make an HTTP URL for the file.
-        *
-        * This is useful for key/value stores when using scripts that seek around
-        * large files and those scripts (and the backend) support HTTP Range headers.
-        * Otherwise, one would need to use getLocalReference(), which involves loading
-        * the entire file on to local disk.
-        *
-        * @param array $params Parameters include:
-        *   - src : source storage path
-        *   - ttl : lifetime (seconds) if pre-authenticated; default is 1 day
-        * @return string|null
-        * @since 1.21
-        */
-       abstract public function getFileHttpUrl( array $params );
-
-       /**
-        * Check if a directory exists at a given storage path.
-        * Backends using key/value stores will check if the path is a
-        * virtual directory, meaning there are files under the given directory.
-        *
-        * Storage backends with eventual consistency might return stale data.
-        *
-        * @param array $params Parameters include:
-        *   - dir : storage directory
-        * @return bool|null Returns null on failure
-        * @since 1.20
-        */
-       abstract public function directoryExists( array $params );
-
-       /**
-        * Get an iterator to list *all* directories under a storage directory.
-        * If the directory is of the form "mwstore://backend/container",
-        * then all directories in the container will be listed.
-        * If the directory is of form "mwstore://backend/container/dir",
-        * then all directories directly under that directory will be listed.
-        * Results will be storage directories relative to the given directory.
-        *
-        * Storage backends with eventual consistency might return stale data.
-        *
-        * Failures during iteration can result in FileBackendError exceptions (since 1.22).
-        *
-        * @param array $params Parameters include:
-        *   - dir     : storage directory
-        *   - topOnly : only return direct child dirs of the directory
-        * @return Traversable|array|null Returns null on failure
-        * @since 1.20
-        */
-       abstract public function getDirectoryList( array $params );
-
-       /**
-        * Same as FileBackend::getDirectoryList() except only lists
-        * directories that are immediately under the given directory.
-        *
-        * Storage backends with eventual consistency might return stale data.
-        *
-        * Failures during iteration can result in FileBackendError exceptions (since 1.22).
-        *
-        * @param array $params Parameters include:
-        *   - dir : storage directory
-        * @return Traversable|array|null Returns null on failure
-        * @since 1.20
-        */
-       final public function getTopDirectoryList( array $params ) {
-               return $this->getDirectoryList( [ 'topOnly' => true ] + $params );
-       }
-
-       /**
-        * Get an iterator to list *all* stored files under a storage directory.
-        * If the directory is of the form "mwstore://backend/container",
-        * then all files in the container will be listed.
-        * If the directory is of form "mwstore://backend/container/dir",
-        * then all files under that directory will be listed.
-        * Results will be storage paths relative to the given directory.
-        *
-        * Storage backends with eventual consistency might return stale data.
-        *
-        * Failures during iteration can result in FileBackendError exceptions (since 1.22).
-        *
-        * @param array $params Parameters include:
-        *   - dir        : storage directory
-        *   - topOnly    : only return direct child files of the directory (since 1.20)
-        *   - adviseStat : set to true if stat requests will be made on the files (since 1.22)
-        * @return Traversable|array|null Returns null on failure
-        */
-       abstract public function getFileList( array $params );
-
-       /**
-        * Same as FileBackend::getFileList() except only lists
-        * files that are immediately under the given directory.
-        *
-        * Storage backends with eventual consistency might return stale data.
-        *
-        * Failures during iteration can result in FileBackendError exceptions (since 1.22).
-        *
-        * @param array $params Parameters include:
-        *   - dir        : storage directory
-        *   - adviseStat : set to true if stat requests will be made on the files (since 1.22)
-        * @return Traversable|array|null Returns null on failure
-        * @since 1.20
-        */
-       final public function getTopFileList( array $params ) {
-               return $this->getFileList( [ 'topOnly' => true ] + $params );
-       }
-
-       /**
-        * Preload persistent file stat cache and property cache into in-process cache.
-        * This should be used when stat calls will be made on a known list of a many files.
-        *
-        * @see FileBackend::getFileStat()
-        *
-        * @param array $paths Storage paths
-        */
-       abstract public function preloadCache( array $paths );
-
-       /**
-        * Invalidate any in-process file stat and property cache.
-        * If $paths is given, then only the cache for those files will be cleared.
-        *
-        * @see FileBackend::getFileStat()
-        *
-        * @param array $paths Storage paths (optional)
-        */
-       abstract public function clearCache( array $paths = null );
-
-       /**
-        * Preload file stat information (concurrently if possible) into in-process cache.
-        *
-        * This should be used when stat calls will be made on a known list of a many files.
-        * This does not make use of the persistent file stat cache.
-        *
-        * @see FileBackend::getFileStat()
-        *
-        * @param array $params Parameters include:
-        *   - srcs        : list of source storage paths
-        *   - latest      : use the latest available data
-        * @return bool All requests proceeded without I/O errors (since 1.24)
-        * @since 1.23
-        */
-       abstract public function preloadFileStat( array $params );
-
-       /**
-        * Lock the files at the given storage paths in the backend.
-        * This will either lock all the files or none (on failure).
-        *
-        * Callers should consider using getScopedFileLocks() instead.
-        *
-        * @param array $paths Storage paths
-        * @param int $type LockManager::LOCK_* constant
-        * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.24)
-        * @return Status
-        */
-       final public function lockFiles( array $paths, $type, $timeout = 0 ) {
-               $paths = array_map( 'FileBackend::normalizeStoragePath', $paths );
-
-               return $this->lockManager->lock( $paths, $type, $timeout );
-       }
-
-       /**
-        * Unlock the files at the given storage paths in the backend.
-        *
-        * @param array $paths Storage paths
-        * @param int $type LockManager::LOCK_* constant
-        * @return Status
-        */
-       final public function unlockFiles( array $paths, $type ) {
-               $paths = array_map( 'FileBackend::normalizeStoragePath', $paths );
-
-               return $this->lockManager->unlock( $paths, $type );
-       }
-
-       /**
-        * Lock the files at the given storage paths in the backend.
-        * This will either lock all the files or none (on failure).
-        * On failure, the status object will be updated with errors.
-        *
-        * Once the return value goes out scope, the locks will be released and
-        * the status updated. Unlock fatals will not change the status "OK" value.
-        *
-        * @see ScopedLock::factory()
-        *
-        * @param array $paths List of storage paths or map of lock types to path lists
-        * @param int|string $type LockManager::LOCK_* constant or "mixed"
-        * @param Status $status Status to update on lock/unlock
-        * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.24)
-        * @return ScopedLock|null Returns null on failure
-        */
-       final public function getScopedFileLocks( array $paths, $type, Status $status, $timeout = 0 ) {
-               if ( $type === 'mixed' ) {
-                       foreach ( $paths as &$typePaths ) {
-                               $typePaths = array_map( 'FileBackend::normalizeStoragePath', $typePaths );
-                       }
-               } else {
-                       $paths = array_map( 'FileBackend::normalizeStoragePath', $paths );
-               }
-
-               return ScopedLock::factory( $this->lockManager, $paths, $type, $status, $timeout );
-       }
-
-       /**
-        * Get an array of scoped locks needed for a batch of file operations.
-        *
-        * Normally, FileBackend::doOperations() handles locking, unless
-        * the 'nonLocking' param is passed in. This function is useful if you
-        * want the files to be locked for a broader scope than just when the
-        * files are changing. For example, if you need to update DB metadata,
-        * you may want to keep the files locked until finished.
-        *
-        * @see FileBackend::doOperations()
-        *
-        * @param array $ops List of file operations to FileBackend::doOperations()
-        * @param Status $status Status to update on lock/unlock
-        * @return ScopedLock|null
-        * @since 1.20
-        */
-       abstract public function getScopedLocksForOps( array $ops, Status $status );
-
-       /**
-        * Get the root storage path of this backend.
-        * All container paths are "subdirectories" of this path.
-        *
-        * @return string Storage path
-        * @since 1.20
-        */
-       final public function getRootStoragePath() {
-               return "mwstore://{$this->name}";
-       }
-
-       /**
-        * Get the storage path for the given container for this backend
-        *
-        * @param string $container Container name
-        * @return string Storage path
-        * @since 1.21
-        */
-       final public function getContainerStoragePath( $container ) {
-               return $this->getRootStoragePath() . "/{$container}";
-       }
-
-       /**
-        * Get the file journal object for this backend
-        *
-        * @return FileJournal
-        */
-       final public function getJournal() {
-               return $this->fileJournal;
-       }
-
-       /**
-        * Convert FSFile 'src' paths to string paths (with an 'srcRef' field set to the FSFile)
-        *
-        * The 'srcRef' field keeps any TempFSFile objects in scope for the backend to have it
-        * around as long it needs (which may vary greatly depending on configuration)
-        *
-        * @param array $ops File operation batch for FileBaclend::doOperations()
-        * @return array File operation batch
-        */
-       protected function resolveFSFileObjects( array $ops ) {
-               foreach ( $ops as &$op ) {
-                       $src = isset( $op['src'] ) ? $op['src'] : null;
-                       if ( $src instanceof FSFile ) {
-                               $op['srcRef'] = $src;
-                               $op['src'] = $src->getPath();
-                       }
-               }
-               unset( $op );
-
-               return $ops;
-       }
-
-       /**
-        * Check if a given path is a "mwstore://" path.
-        * This does not do any further validation or any existence checks.
-        *
-        * @param string $path
-        * @return bool
-        */
-       final public static function isStoragePath( $path ) {
-               return ( strpos( $path, 'mwstore://' ) === 0 );
-       }
-
-       /**
-        * Split a storage path into a backend name, a container name,
-        * and a relative file path. The relative path may be the empty string.
-        * This does not do any path normalization or traversal checks.
-        *
-        * @param string $storagePath
-        * @return array (backend, container, rel object) or (null, null, null)
-        */
-       final public static function splitStoragePath( $storagePath ) {
-               if ( self::isStoragePath( $storagePath ) ) {
-                       // Remove the "mwstore://" prefix and split the path
-                       $parts = explode( '/', substr( $storagePath, 10 ), 3 );
-                       if ( count( $parts ) >= 2 && $parts[0] != '' && $parts[1] != '' ) {
-                               if ( count( $parts ) == 3 ) {
-                                       return $parts; // e.g. "backend/container/path"
-                               } else {
-                                       return [ $parts[0], $parts[1], '' ]; // e.g. "backend/container"
-                               }
-                       }
-               }
-
-               return [ null, null, null ];
-       }
-
-       /**
-        * Normalize a storage path by cleaning up directory separators.
-        * Returns null if the path is not of the format of a valid storage path.
-        *
-        * @param string $storagePath
-        * @return string|null
-        */
-       final public static function normalizeStoragePath( $storagePath ) {
-               list( $backend, $container, $relPath ) = self::splitStoragePath( $storagePath );
-               if ( $relPath !== null ) { // must be for this backend
-                       $relPath = self::normalizeContainerPath( $relPath );
-                       if ( $relPath !== null ) {
-                               return ( $relPath != '' )
-                                       ? "mwstore://{$backend}/{$container}/{$relPath}"
-                                       : "mwstore://{$backend}/{$container}";
-                       }
-               }
-
-               return null;
-       }
-
-       /**
-        * Get the parent storage directory of a storage path.
-        * This returns a path like "mwstore://backend/container",
-        * "mwstore://backend/container/...", or null if there is no parent.
-        *
-        * @param string $storagePath
-        * @return string|null
-        */
-       final public static function parentStoragePath( $storagePath ) {
-               $storagePath = dirname( $storagePath );
-               list( , , $rel ) = self::splitStoragePath( $storagePath );
-
-               return ( $rel === null ) ? null : $storagePath;
-       }
-
-       /**
-        * Get the final extension from a storage or FS path
-        *
-        * @param string $path
-        * @param string $case One of (rawcase, uppercase, lowercase) (since 1.24)
-        * @return string
-        */
-       final public static function extensionFromPath( $path, $case = 'lowercase' ) {
-               $i = strrpos( $path, '.' );
-               $ext = $i ? substr( $path, $i + 1 ) : '';
-
-               if ( $case === 'lowercase' ) {
-                       $ext = strtolower( $ext );
-               } elseif ( $case === 'uppercase' ) {
-                       $ext = strtoupper( $ext );
-               }
-
-               return $ext;
-       }
-
-       /**
-        * Check if a relative path has no directory traversals
-        *
-        * @param string $path
-        * @return bool
-        * @since 1.20
-        */
-       final public static function isPathTraversalFree( $path ) {
-               return ( self::normalizeContainerPath( $path ) !== null );
-       }
-
-       /**
-        * Build a Content-Disposition header value per RFC 6266.
-        *
-        * @param string $type One of (attachment, inline)
-        * @param string $filename Suggested file name (should not contain slashes)
-        * @throws FileBackendError
-        * @return string
-        * @since 1.20
-        */
-       final public static function makeContentDisposition( $type, $filename = '' ) {
-               $parts = [];
-
-               $type = strtolower( $type );
-               if ( !in_array( $type, [ 'inline', 'attachment' ] ) ) {
-                       throw new FileBackendError( "Invalid Content-Disposition type '$type'." );
-               }
-               $parts[] = $type;
-
-               if ( strlen( $filename ) ) {
-                       $parts[] = "filename*=UTF-8''" . rawurlencode( basename( $filename ) );
-               }
-
-               return implode( ';', $parts );
-       }
-
-       /**
-        * Validate and normalize a relative storage path.
-        * Null is returned if the path involves directory traversal.
-        * Traversal is insecure for FS backends and broken for others.
-        *
-        * This uses the same traversal protection as Title::secureAndSplit().
-        *
-        * @param string $path Storage path relative to a container
-        * @return string|null
-        */
-       final protected static function normalizeContainerPath( $path ) {
-               // Normalize directory separators
-               $path = strtr( $path, '\\', '/' );
-               // Collapse any consecutive directory separators
-               $path = preg_replace( '![/]{2,}!', '/', $path );
-               // Remove any leading directory separator
-               $path = ltrim( $path, '/' );
-               // Use the same traversal protection as Title::secureAndSplit()
-               if ( strpos( $path, '.' ) !== false ) {
-                       if (
-                               $path === '.' ||
-                               $path === '..' ||
-                               strpos( $path, './' ) === 0 ||
-                               strpos( $path, '../' ) === 0 ||
-                               strpos( $path, '/./' ) !== false ||
-                               strpos( $path, '/../' ) !== false
-                       ) {
-                               return null;
-                       }
-               }
-
-               return $path;
-       }
-}
-
-/**
- * Generic file backend exception for checked and unexpected (e.g. config) exceptions
- *
- * @ingroup FileBackend
- * @since 1.23
- */
-class FileBackendException extends Exception {
-}
-
-/**
- * File backend exception for checked exceptions (e.g. I/O errors)
- *
- * @ingroup FileBackend
- * @since 1.22
- */
-class FileBackendError extends FileBackendException {
-}
index 57461a4..e65a594 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup FileBackend
  * @author Aaron Schulz
  */
+use \MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 
 /**
  * Class to handle file backend registration
@@ -61,7 +63,7 @@ class FileBackendGroup {
         * Register file backends from the global variables
         */
        protected function initFromGlobals() {
-               global $wgLocalFileRepo, $wgForeignFileRepos, $wgFileBackends;
+               global $wgLocalFileRepo, $wgForeignFileRepos, $wgFileBackends, $wgDirectoryMode;
 
                // Register explicitly defined backends
                $this->register( $wgFileBackends, wfConfiguredReadOnlyReason() );
@@ -86,9 +88,6 @@ class FileBackendGroup {
                        $transcodedDir = isset( $info['transcodedDir'] )
                                ? $info['transcodedDir']
                                : "{$directory}/transcoded";
-                       $fileMode = isset( $info['fileMode'] )
-                               ? $info['fileMode']
-                               : 0644;
                        // Get the FS backend configuration
                        $autoBackends[] = [
                                'name' => $backendName,
@@ -101,7 +100,8 @@ class FileBackendGroup {
                                        "{$repoName}-deleted" => $deletedDir,
                                        "{$repoName}-temp" => "{$directory}/temp"
                                ],
-                               'fileMode' => $fileMode,
+                               'fileMode' => isset( $info['fileMode'] ) ? $info['fileMode'] : 0644,
+                               'directoryMode' => $wgDirectoryMode,
                        ];
                }
 
@@ -114,18 +114,18 @@ class FileBackendGroup {
         *
         * @param array $configs
         * @param string|null $readOnlyReason
-        * @throws FileBackendException
+        * @throws InvalidArgumentException
         */
        protected function register( array $configs, $readOnlyReason = null ) {
                foreach ( $configs as $config ) {
                        if ( !isset( $config['name'] ) ) {
-                               throw new FileBackendException( "Cannot register a backend with no name." );
+                               throw new InvalidArgumentException( "Cannot register a backend with no name." );
                        }
                        $name = $config['name'];
                        if ( isset( $this->backends[$name] ) ) {
-                               throw new FileBackendException( "Backend with name `{$name}` already registered." );
+                               throw new LogicException( "Backend with name `{$name}` already registered." );
                        } elseif ( !isset( $config['class'] ) ) {
-                               throw new FileBackendException( "Backend with name `{$name}` has no class." );
+                               throw new InvalidArgumentException( "Backend with name `{$name}` has no class." );
                        }
                        $class = $config['class'];
 
@@ -147,26 +147,23 @@ class FileBackendGroup {
         *
         * @param string $name
         * @return FileBackend
-        * @throws FileBackendException
+        * @throws InvalidArgumentException
         */
        public function get( $name ) {
-               if ( !isset( $this->backends[$name] ) ) {
-                       throw new FileBackendException( "No backend defined with the name `$name`." );
-               }
                // Lazy-load the actual backend instance
                if ( !isset( $this->backends[$name]['instance'] ) ) {
-                       $class = $this->backends[$name]['class'];
-                       $config = $this->backends[$name]['config'];
-                       $config['wikiId'] = isset( $config['wikiId'] )
-                               ? $config['wikiId']
-                               : wfWikiID(); // e.g. "my_wiki-en_"
-                       $config['lockManager'] =
-                               LockManagerGroup::singleton( $config['wikiId'] )->get( $config['lockManager'] );
-                       $config['fileJournal'] = isset( $config['fileJournal'] )
-                               ? FileJournal::factory( $config['fileJournal'], $name )
-                               : FileJournal::factory( [ 'class' => 'NullFileJournal' ], $name );
-                       $config['wanCache'] = ObjectCache::getMainWANInstance();
-                       $config['mimeCallback'] = [ $this, 'guessMimeInternal' ];
+                       $config = $this->config( $name );
+
+                       $class = $config['class'];
+                       if ( $class === 'FileBackendMultiWrite' ) {
+                               foreach ( $config['backends'] as $index => $beConfig ) {
+                                       if ( isset( $beConfig['template'] ) ) {
+                                               // Config is just a modified version of a registered backend's.
+                                               // This should only be used when that config is used only by this backend.
+                                               $config['backends'][$index] += $this->config( $beConfig['template'] );
+                                       }
+                               }
+                       }
 
                        $this->backends[$name]['instance'] = new $class( $config );
                }
@@ -178,16 +175,36 @@ class FileBackendGroup {
         * Get the config array for a backend object with a given name
         *
         * @param string $name
-        * @return array
-        * @throws FileBackendException
+        * @return array Parameters to FileBackend::__construct()
+        * @throws InvalidArgumentException
         */
        public function config( $name ) {
                if ( !isset( $this->backends[$name] ) ) {
-                       throw new FileBackendException( "No backend defined with the name `$name`." );
+                       throw new InvalidArgumentException( "No backend defined with the name `$name`." );
                }
                $class = $this->backends[$name]['class'];
 
-               return [ 'class' => $class ] + $this->backends[$name]['config'];
+               $config = $this->backends[$name]['config'];
+               $config['class'] = $class;
+               $config += [ // set defaults
+                       'wikiId' => wfWikiID(), // e.g. "my_wiki-en_"
+                       'mimeCallback' => [ $this, 'guessMimeInternal' ],
+                       'obResetFunc' => 'wfResetOutputBuffers',
+                       'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ],
+                       'tmpDirectory' => wfTempDir(),
+                       'statusWrapper' => [ 'Status', 'wrap' ],
+                       'wanCache' => MediaWikiServices::getInstance()->getMainWANObjectCache(),
+                       'srvCache' => ObjectCache::getLocalServerInstance( 'hash' ),
+                       'logger' => LoggerFactory::getInstance( 'FileOperation' ),
+                       'profiler' => Profiler::instance()
+               ];
+               $config['lockManager'] =
+                       LockManagerGroup::singleton( $config['wikiId'] )->get( $config['lockManager'] );
+               $config['fileJournal'] = isset( $config['fileJournal'] )
+                       ? FileJournal::factory( $config['fileJournal'], $name )
+                       : FileJournal::factory( [ 'class' => 'NullFileJournal' ], $name );
+
+               return $config;
        }
 
        /**
@@ -221,7 +238,7 @@ class FileBackendGroup {
                if ( !$type && $fsPath ) {
                        $type = $magic->guessMimeType( $fsPath, false );
                } elseif ( !$type && strlen( $content ) ) {
-                       $tmpFile = TempFSFile::factory( 'mime_' );
+                       $tmpFile = TempFSFile::factory( 'mime_', '', wfTempDir() );
                        file_put_contents( $tmpFile->getPath(), $content );
                        $type = $magic->guessMimeType( $tmpFile->getPath(), false );
                }
diff --git a/includes/filebackend/FileBackendMultiWrite.php b/includes/filebackend/FileBackendMultiWrite.php
deleted file mode 100644 (file)
index 3b20048..0000000
+++ /dev/null
@@ -1,761 +0,0 @@
-<?php
-/**
- * Proxy backend that mirrors writes to several internal backends.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileBackend
- * @author Aaron Schulz
- */
-
-/**
- * @brief Proxy backend that mirrors writes to several internal backends.
- *
- * This class defines a multi-write backend. Multiple backends can be
- * registered to this proxy backend and it will act as a single backend.
- * Use this when all access to those backends is through this proxy backend.
- * At least one of the backends must be declared the "master" backend.
- *
- * Only use this class when transitioning from one storage system to another.
- *
- * Read operations are only done on the 'master' backend for consistency.
- * Write operations are performed on all backends, starting with the master.
- * This makes a best-effort to have transactional semantics, but since requests
- * may sometimes fail, the use of "autoResync" or background scripts to fix
- * inconsistencies is important.
- *
- * @ingroup FileBackend
- * @since 1.19
- */
-class FileBackendMultiWrite extends FileBackend {
-       /** @var FileBackendStore[] Prioritized list of FileBackendStore objects */
-       protected $backends = [];
-
-       /** @var int Index of master backend */
-       protected $masterIndex = -1;
-       /** @var int Index of read affinity backend */
-       protected $readIndex = -1;
-
-       /** @var int Bitfield */
-       protected $syncChecks = 0;
-       /** @var string|bool */
-       protected $autoResync = false;
-
-       /** @var bool */
-       protected $asyncWrites = false;
-
-       /* Possible internal backend consistency checks */
-       const CHECK_SIZE = 1;
-       const CHECK_TIME = 2;
-       const CHECK_SHA1 = 4;
-
-       /**
-        * Construct a proxy backend that consists of several internal backends.
-        * Locking, journaling, and read-only checks are handled by the proxy backend.
-        *
-        * Additional $config params include:
-        *   - backends       : Array of backend config and multi-backend settings.
-        *                      Each value is the config used in the constructor of a
-        *                      FileBackendStore class, but with these additional settings:
-        *                        - class         : The name of the backend class
-        *                        - isMultiMaster : This must be set for one backend.
-        *                        - readAffinity  : Use this for reads without 'latest' set.
-        *                        - template:     : If given a backend name, this will use
-        *                                          the config of that backend as a template.
-        *                                          Values specified here take precedence.
-        *   - syncChecks     : Integer bitfield of internal backend sync checks to perform.
-        *                      Possible bits include the FileBackendMultiWrite::CHECK_* constants.
-        *                      There are constants for SIZE, TIME, and SHA1.
-        *                      The checks are done before allowing any file operations.
-        *   - autoResync     : Automatically resync the clone backends to the master backend
-        *                      when pre-operation sync checks fail. This should only be used
-        *                      if the master backend is stable and not missing any files.
-        *                      Use "conservative" to limit resyncing to copying newer master
-        *                      backend files over older (or non-existing) clone backend files.
-        *                      Cases that cannot be handled will result in operation abortion.
-        *   - replication    : Set to 'async' to defer file operations on the non-master backends.
-        *                      This will apply such updates post-send for web requests. Note that
-        *                      any checks from "syncChecks" are still synchronous.
-        *
-        * @param array $config
-        * @throws FileBackendError
-        */
-       public function __construct( array $config ) {
-               parent::__construct( $config );
-               $this->syncChecks = isset( $config['syncChecks'] )
-                       ? $config['syncChecks']
-                       : self::CHECK_SIZE;
-               $this->autoResync = isset( $config['autoResync'] )
-                       ? $config['autoResync']
-                       : false;
-               $this->asyncWrites = isset( $config['replication'] ) && $config['replication'] === 'async';
-               // Construct backends here rather than via registration
-               // to keep these backends hidden from outside the proxy.
-               $namesUsed = [];
-               foreach ( $config['backends'] as $index => $config ) {
-                       if ( isset( $config['template'] ) ) {
-                               // Config is just a modified version of a registered backend's.
-                               // This should only be used when that config is used only by this backend.
-                               $config = $config + FileBackendGroup::singleton()->config( $config['template'] );
-                       }
-                       $name = $config['name'];
-                       if ( isset( $namesUsed[$name] ) ) { // don't break FileOp predicates
-                               throw new FileBackendError( "Two or more backends defined with the name $name." );
-                       }
-                       $namesUsed[$name] = 1;
-                       // Alter certain sub-backend settings for sanity
-                       unset( $config['readOnly'] ); // use proxy backend setting
-                       unset( $config['fileJournal'] ); // use proxy backend journal
-                       unset( $config['lockManager'] ); // lock under proxy backend
-                       $config['wikiId'] = $this->wikiId; // use the proxy backend wiki ID
-                       if ( !empty( $config['isMultiMaster'] ) ) {
-                               if ( $this->masterIndex >= 0 ) {
-                                       throw new FileBackendError( 'More than one master backend defined.' );
-                               }
-                               $this->masterIndex = $index; // this is the "master"
-                               $config['fileJournal'] = $this->fileJournal; // log under proxy backend
-                       }
-                       if ( !empty( $config['readAffinity'] ) ) {
-                               $this->readIndex = $index; // prefer this for reads
-                       }
-                       // Create sub-backend object
-                       if ( !isset( $config['class'] ) ) {
-                               throw new FileBackendError( 'No class given for a backend config.' );
-                       }
-                       $class = $config['class'];
-                       $this->backends[$index] = new $class( $config );
-               }
-               if ( $this->masterIndex < 0 ) { // need backends and must have a master
-                       throw new FileBackendError( 'No master backend defined.' );
-               }
-               if ( $this->readIndex < 0 ) {
-                       $this->readIndex = $this->masterIndex; // default
-               }
-       }
-
-       final protected function doOperationsInternal( array $ops, array $opts ) {
-               $status = Status::newGood();
-
-               $mbe = $this->backends[$this->masterIndex]; // convenience
-
-               // Try to lock those files for the scope of this function...
-               $scopeLock = null;
-               if ( empty( $opts['nonLocking'] ) ) {
-                       // Try to lock those files for the scope of this function...
-                       /** @noinspection PhpUnusedLocalVariableInspection */
-                       $scopeLock = $this->getScopedLocksForOps( $ops, $status );
-                       if ( !$status->isOK() ) {
-                               return $status; // abort
-                       }
-               }
-               // Clear any cache entries (after locks acquired)
-               $this->clearCache();
-               $opts['preserveCache'] = true; // only locked files are cached
-               // Get the list of paths to read/write...
-               $relevantPaths = $this->fileStoragePathsForOps( $ops );
-               // Check if the paths are valid and accessible on all backends...
-               $status->merge( $this->accessibilityCheck( $relevantPaths ) );
-               if ( !$status->isOK() ) {
-                       return $status; // abort
-               }
-               // Do a consistency check to see if the backends are consistent...
-               $syncStatus = $this->consistencyCheck( $relevantPaths );
-               if ( !$syncStatus->isOK() ) {
-                       wfDebugLog( 'FileOperation', get_class( $this ) .
-                               " failed sync check: " . FormatJson::encode( $relevantPaths ) );
-                       // Try to resync the clone backends to the master on the spot...
-                       if ( $this->autoResync === false
-                               || !$this->resyncFiles( $relevantPaths, $this->autoResync )->isOK()
-                       ) {
-                               $status->merge( $syncStatus );
-
-                               return $status; // abort
-                       }
-               }
-               // Actually attempt the operation batch on the master backend...
-               $realOps = $this->substOpBatchPaths( $ops, $mbe );
-               $masterStatus = $mbe->doOperations( $realOps, $opts );
-               $status->merge( $masterStatus );
-               // Propagate the operations to the clone backends if there were no unexpected errors
-               // and if there were either no expected errors or if the 'force' option was used.
-               // However, if nothing succeeded at all, then don't replicate any of the operations.
-               // If $ops only had one operation, this might avoid backend sync inconsistencies.
-               if ( $masterStatus->isOK() && $masterStatus->successCount > 0 ) {
-                       foreach ( $this->backends as $index => $backend ) {
-                               if ( $index === $this->masterIndex ) {
-                                       continue; // done already
-                               }
-
-                               $realOps = $this->substOpBatchPaths( $ops, $backend );
-                               if ( $this->asyncWrites && !$this->hasVolatileSources( $ops ) ) {
-                                       // Bind $scopeLock to the callback to preserve locks
-                                       DeferredUpdates::addCallableUpdate(
-                                               function() use ( $backend, $realOps, $opts, $scopeLock, $relevantPaths ) {
-                                                       wfDebugLog( 'FileOperationReplication',
-                                                               "'{$backend->getName()}' async replication; paths: " .
-                                                               FormatJson::encode( $relevantPaths ) );
-                                                       $backend->doOperations( $realOps, $opts );
-                                               }
-                                       );
-                               } else {
-                                       wfDebugLog( 'FileOperationReplication',
-                                               "'{$backend->getName()}' sync replication; paths: " .
-                                               FormatJson::encode( $relevantPaths ) );
-                                       $status->merge( $backend->doOperations( $realOps, $opts ) );
-                               }
-                       }
-               }
-               // Make 'success', 'successCount', and 'failCount' fields reflect
-               // the overall operation, rather than all the batches for each backend.
-               // Do this by only using success values from the master backend's batch.
-               $status->success = $masterStatus->success;
-               $status->successCount = $masterStatus->successCount;
-               $status->failCount = $masterStatus->failCount;
-
-               return $status;
-       }
-
-       /**
-        * Check that a set of files are consistent across all internal backends
-        *
-        * @param array $paths List of storage paths
-        * @return Status
-        */
-       public function consistencyCheck( array $paths ) {
-               $status = Status::newGood();
-               if ( $this->syncChecks == 0 || count( $this->backends ) <= 1 ) {
-                       return $status; // skip checks
-               }
-
-               // Preload all of the stat info in as few round trips as possible...
-               foreach ( $this->backends as $backend ) {
-                       $realPaths = $this->substPaths( $paths, $backend );
-                       $backend->preloadFileStat( [ 'srcs' => $realPaths, 'latest' => true ] );
-               }
-
-               $mBackend = $this->backends[$this->masterIndex];
-               foreach ( $paths as $path ) {
-                       $params = [ 'src' => $path, 'latest' => true ];
-                       $mParams = $this->substOpPaths( $params, $mBackend );
-                       // Stat the file on the 'master' backend
-                       $mStat = $mBackend->getFileStat( $mParams );
-                       if ( $this->syncChecks & self::CHECK_SHA1 ) {
-                               $mSha1 = $mBackend->getFileSha1Base36( $mParams );
-                       } else {
-                               $mSha1 = false;
-                       }
-                       // Check if all clone backends agree with the master...
-                       foreach ( $this->backends as $index => $cBackend ) {
-                               if ( $index === $this->masterIndex ) {
-                                       continue; // master
-                               }
-                               $cParams = $this->substOpPaths( $params, $cBackend );
-                               $cStat = $cBackend->getFileStat( $cParams );
-                               if ( $mStat ) { // file is in master
-                                       if ( !$cStat ) { // file should exist
-                                               $status->fatal( 'backend-fail-synced', $path );
-                                               continue;
-                                       }
-                                       if ( $this->syncChecks & self::CHECK_SIZE ) {
-                                               if ( $cStat['size'] != $mStat['size'] ) { // wrong size
-                                                       $status->fatal( 'backend-fail-synced', $path );
-                                                       continue;
-                                               }
-                                       }
-                                       if ( $this->syncChecks & self::CHECK_TIME ) {
-                                               $mTs = wfTimestamp( TS_UNIX, $mStat['mtime'] );
-                                               $cTs = wfTimestamp( TS_UNIX, $cStat['mtime'] );
-                                               if ( abs( $mTs - $cTs ) > 30 ) { // outdated file somewhere
-                                                       $status->fatal( 'backend-fail-synced', $path );
-                                                       continue;
-                                               }
-                                       }
-                                       if ( $this->syncChecks & self::CHECK_SHA1 ) {
-                                               if ( $cBackend->getFileSha1Base36( $cParams ) !== $mSha1 ) { // wrong SHA1
-                                                       $status->fatal( 'backend-fail-synced', $path );
-                                                       continue;
-                                               }
-                                       }
-                               } else { // file is not in master
-                                       if ( $cStat ) { // file should not exist
-                                               $status->fatal( 'backend-fail-synced', $path );
-                                       }
-                               }
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * Check that a set of file paths are usable across all internal backends
-        *
-        * @param array $paths List of storage paths
-        * @return Status
-        */
-       public function accessibilityCheck( array $paths ) {
-               $status = Status::newGood();
-               if ( count( $this->backends ) <= 1 ) {
-                       return $status; // skip checks
-               }
-
-               foreach ( $paths as $path ) {
-                       foreach ( $this->backends as $backend ) {
-                               $realPath = $this->substPaths( $path, $backend );
-                               if ( !$backend->isPathUsableInternal( $realPath ) ) {
-                                       $status->fatal( 'backend-fail-usable', $path );
-                               }
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * Check that a set of files are consistent across all internal backends
-        * and re-synchronize those files against the "multi master" if needed.
-        *
-        * @param array $paths List of storage paths
-        * @param string|bool $resyncMode False, True, or "conservative"; see __construct()
-        * @return Status
-        */
-       public function resyncFiles( array $paths, $resyncMode = true ) {
-               $status = Status::newGood();
-
-               $mBackend = $this->backends[$this->masterIndex];
-               foreach ( $paths as $path ) {
-                       $mPath = $this->substPaths( $path, $mBackend );
-                       $mSha1 = $mBackend->getFileSha1Base36( [ 'src' => $mPath, 'latest' => true ] );
-                       $mStat = $mBackend->getFileStat( [ 'src' => $mPath, 'latest' => true ] );
-                       if ( $mStat === null || ( $mSha1 !== false && !$mStat ) ) { // sanity
-                               $status->fatal( 'backend-fail-internal', $this->name );
-                               wfDebugLog( 'FileOperation', __METHOD__
-                                       . ': File is not available on the master backend' );
-                               continue; // file is not available on the master backend...
-                       }
-                       // Check of all clone backends agree with the master...
-                       foreach ( $this->backends as $index => $cBackend ) {
-                               if ( $index === $this->masterIndex ) {
-                                       continue; // master
-                               }
-                               $cPath = $this->substPaths( $path, $cBackend );
-                               $cSha1 = $cBackend->getFileSha1Base36( [ 'src' => $cPath, 'latest' => true ] );
-                               $cStat = $cBackend->getFileStat( [ 'src' => $cPath, 'latest' => true ] );
-                               if ( $cStat === null || ( $cSha1 !== false && !$cStat ) ) { // sanity
-                                       $status->fatal( 'backend-fail-internal', $cBackend->getName() );
-                                       wfDebugLog( 'FileOperation', __METHOD__ .
-                                               ': File is not available on the clone backend' );
-                                       continue; // file is not available on the clone backend...
-                               }
-                               if ( $mSha1 === $cSha1 ) {
-                                       // already synced; nothing to do
-                               } elseif ( $mSha1 !== false ) { // file is in master
-                                       if ( $resyncMode === 'conservative'
-                                               && $cStat && $cStat['mtime'] > $mStat['mtime']
-                                       ) {
-                                               $status->fatal( 'backend-fail-synced', $path );
-                                               continue; // don't rollback data
-                                       }
-                                       $fsFile = $mBackend->getLocalReference(
-                                               [ 'src' => $mPath, 'latest' => true ] );
-                                       $status->merge( $cBackend->quickStore(
-                                               [ 'src' => $fsFile->getPath(), 'dst' => $cPath ]
-                                       ) );
-                               } elseif ( $mStat === false ) { // file is not in master
-                                       if ( $resyncMode === 'conservative' ) {
-                                               $status->fatal( 'backend-fail-synced', $path );
-                                               continue; // don't delete data
-                                       }
-                                       $status->merge( $cBackend->quickDelete( [ 'src' => $cPath ] ) );
-                               }
-                       }
-               }
-
-               if ( !$status->isOK() ) {
-                       wfDebugLog( 'FileOperation', get_class( $this ) .
-                               " failed to resync: " . FormatJson::encode( $paths ) );
-               }
-
-               return $status;
-       }
-
-       /**
-        * Get a list of file storage paths to read or write for a list of operations
-        *
-        * @param array $ops Same format as doOperations()
-        * @return array List of storage paths to files (does not include directories)
-        */
-       protected function fileStoragePathsForOps( array $ops ) {
-               $paths = [];
-               foreach ( $ops as $op ) {
-                       if ( isset( $op['src'] ) ) {
-                               // For things like copy/move/delete with "ignoreMissingSource" and there
-                               // is no source file, nothing should happen and there should be no errors.
-                               if ( empty( $op['ignoreMissingSource'] )
-                                       || $this->fileExists( [ 'src' => $op['src'] ] )
-                               ) {
-                                       $paths[] = $op['src'];
-                               }
-                       }
-                       if ( isset( $op['srcs'] ) ) {
-                               $paths = array_merge( $paths, $op['srcs'] );
-                       }
-                       if ( isset( $op['dst'] ) ) {
-                               $paths[] = $op['dst'];
-                       }
-               }
-
-               return array_values( array_unique( array_filter( $paths, 'FileBackend::isStoragePath' ) ) );
-       }
-
-       /**
-        * Substitute the backend name in storage path parameters
-        * for a set of operations with that of a given internal backend.
-        *
-        * @param array $ops List of file operation arrays
-        * @param FileBackendStore $backend
-        * @return array
-        */
-       protected function substOpBatchPaths( array $ops, FileBackendStore $backend ) {
-               $newOps = []; // operations
-               foreach ( $ops as $op ) {
-                       $newOp = $op; // operation
-                       foreach ( [ 'src', 'srcs', 'dst', 'dir' ] as $par ) {
-                               if ( isset( $newOp[$par] ) ) { // string or array
-                                       $newOp[$par] = $this->substPaths( $newOp[$par], $backend );
-                               }
-                       }
-                       $newOps[] = $newOp;
-               }
-
-               return $newOps;
-       }
-
-       /**
-        * Same as substOpBatchPaths() but for a single operation
-        *
-        * @param array $ops File operation array
-        * @param FileBackendStore $backend
-        * @return array
-        */
-       protected function substOpPaths( array $ops, FileBackendStore $backend ) {
-               $newOps = $this->substOpBatchPaths( [ $ops ], $backend );
-
-               return $newOps[0];
-       }
-
-       /**
-        * Substitute the backend of storage paths with an internal backend's name
-        *
-        * @param array|string $paths List of paths or single string path
-        * @param FileBackendStore $backend
-        * @return array|string
-        */
-       protected function substPaths( $paths, FileBackendStore $backend ) {
-               return preg_replace(
-                       '!^mwstore://' . preg_quote( $this->name, '!' ) . '/!',
-                       StringUtils::escapeRegexReplacement( "mwstore://{$backend->getName()}/" ),
-                       $paths // string or array
-               );
-       }
-
-       /**
-        * Substitute the backend of internal storage paths with the proxy backend's name
-        *
-        * @param array|string $paths List of paths or single string path
-        * @return array|string
-        */
-       protected function unsubstPaths( $paths ) {
-               return preg_replace(
-                       '!^mwstore://([^/]+)!',
-                       StringUtils::escapeRegexReplacement( "mwstore://{$this->name}" ),
-                       $paths // string or array
-               );
-       }
-
-       /**
-        * @param array $ops File operations for FileBackend::doOperations()
-        * @return bool Whether there are file path sources with outside lifetime/ownership
-        */
-       protected function hasVolatileSources( array $ops ) {
-               foreach ( $ops as $op ) {
-                       if ( $op['op'] === 'store' && !isset( $op['srcRef'] ) ) {
-                               return true; // source file might be deleted anytime after do*Operations()
-                       }
-               }
-
-               return false;
-       }
-
-       protected function doQuickOperationsInternal( array $ops ) {
-               $status = Status::newGood();
-               // Do the operations on the master backend; setting Status fields...
-               $realOps = $this->substOpBatchPaths( $ops, $this->backends[$this->masterIndex] );
-               $masterStatus = $this->backends[$this->masterIndex]->doQuickOperations( $realOps );
-               $status->merge( $masterStatus );
-               // Propagate the operations to the clone backends...
-               foreach ( $this->backends as $index => $backend ) {
-                       if ( $index === $this->masterIndex ) {
-                               continue; // done already
-                       }
-
-                       $realOps = $this->substOpBatchPaths( $ops, $backend );
-                       if ( $this->asyncWrites && !$this->hasVolatileSources( $ops ) ) {
-                               DeferredUpdates::addCallableUpdate(
-                                       function() use ( $backend, $realOps ) {
-                                               $backend->doQuickOperations( $realOps );
-                                       }
-                               );
-                       } else {
-                               $status->merge( $backend->doQuickOperations( $realOps ) );
-                       }
-               }
-               // Make 'success', 'successCount', and 'failCount' fields reflect
-               // the overall operation, rather than all the batches for each backend.
-               // Do this by only using success values from the master backend's batch.
-               $status->success = $masterStatus->success;
-               $status->successCount = $masterStatus->successCount;
-               $status->failCount = $masterStatus->failCount;
-
-               return $status;
-       }
-
-       protected function doPrepare( array $params ) {
-               return $this->doDirectoryOp( 'prepare', $params );
-       }
-
-       protected function doSecure( array $params ) {
-               return $this->doDirectoryOp( 'secure', $params );
-       }
-
-       protected function doPublish( array $params ) {
-               return $this->doDirectoryOp( 'publish', $params );
-       }
-
-       protected function doClean( array $params ) {
-               return $this->doDirectoryOp( 'clean', $params );
-       }
-
-       /**
-        * @param string $method One of (doPrepare,doSecure,doPublish,doClean)
-        * @param array $params Method arguments
-        * @return Status
-        */
-       protected function doDirectoryOp( $method, array $params ) {
-               $status = Status::newGood();
-
-               $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
-               $masterStatus = $this->backends[$this->masterIndex]->$method( $realParams );
-               $status->merge( $masterStatus );
-
-               foreach ( $this->backends as $index => $backend ) {
-                       if ( $index === $this->masterIndex ) {
-                               continue; // already done
-                       }
-
-                       $realParams = $this->substOpPaths( $params, $backend );
-                       if ( $this->asyncWrites ) {
-                               DeferredUpdates::addCallableUpdate(
-                                       function() use ( $backend, $method, $realParams ) {
-                                               $backend->$method( $realParams );
-                                       }
-                               );
-                       } else {
-                               $status->merge( $backend->$method( $realParams ) );
-                       }
-               }
-
-               return $status;
-       }
-
-       public function concatenate( array $params ) {
-               // We are writing to an FS file, so we don't need to do this per-backend
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->concatenate( $realParams );
-       }
-
-       public function fileExists( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->fileExists( $realParams );
-       }
-
-       public function getFileTimestamp( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->getFileTimestamp( $realParams );
-       }
-
-       public function getFileSize( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->getFileSize( $realParams );
-       }
-
-       public function getFileStat( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->getFileStat( $realParams );
-       }
-
-       public function getFileXAttributes( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->getFileXAttributes( $realParams );
-       }
-
-       public function getFileContentsMulti( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               $contentsM = $this->backends[$index]->getFileContentsMulti( $realParams );
-
-               $contents = []; // (path => FSFile) mapping using the proxy backend's name
-               foreach ( $contentsM as $path => $data ) {
-                       $contents[$this->unsubstPaths( $path )] = $data;
-               }
-
-               return $contents;
-       }
-
-       public function getFileSha1Base36( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->getFileSha1Base36( $realParams );
-       }
-
-       public function getFileProps( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->getFileProps( $realParams );
-       }
-
-       public function streamFile( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->streamFile( $realParams );
-       }
-
-       public function getLocalReferenceMulti( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               $fsFilesM = $this->backends[$index]->getLocalReferenceMulti( $realParams );
-
-               $fsFiles = []; // (path => FSFile) mapping using the proxy backend's name
-               foreach ( $fsFilesM as $path => $fsFile ) {
-                       $fsFiles[$this->unsubstPaths( $path )] = $fsFile;
-               }
-
-               return $fsFiles;
-       }
-
-       public function getLocalCopyMulti( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               $tempFilesM = $this->backends[$index]->getLocalCopyMulti( $realParams );
-
-               $tempFiles = []; // (path => TempFSFile) mapping using the proxy backend's name
-               foreach ( $tempFilesM as $path => $tempFile ) {
-                       $tempFiles[$this->unsubstPaths( $path )] = $tempFile;
-               }
-
-               return $tempFiles;
-       }
-
-       public function getFileHttpUrl( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->getFileHttpUrl( $realParams );
-       }
-
-       public function directoryExists( array $params ) {
-               $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
-
-               return $this->backends[$this->masterIndex]->directoryExists( $realParams );
-       }
-
-       public function getDirectoryList( array $params ) {
-               $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
-
-               return $this->backends[$this->masterIndex]->getDirectoryList( $realParams );
-       }
-
-       public function getFileList( array $params ) {
-               $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
-
-               return $this->backends[$this->masterIndex]->getFileList( $realParams );
-       }
-
-       public function getFeatures() {
-               return $this->backends[$this->masterIndex]->getFeatures();
-       }
-
-       public function clearCache( array $paths = null ) {
-               foreach ( $this->backends as $backend ) {
-                       $realPaths = is_array( $paths ) ? $this->substPaths( $paths, $backend ) : null;
-                       $backend->clearCache( $realPaths );
-               }
-       }
-
-       public function preloadCache( array $paths ) {
-               $realPaths = $this->substPaths( $paths, $this->backends[$this->readIndex] );
-               $this->backends[$this->readIndex]->preloadCache( $realPaths );
-       }
-
-       public function preloadFileStat( array $params ) {
-               $index = $this->getReadIndexFromParams( $params );
-               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
-
-               return $this->backends[$index]->preloadFileStat( $realParams );
-       }
-
-       public function getScopedLocksForOps( array $ops, Status $status ) {
-               $realOps = $this->substOpBatchPaths( $ops, $this->backends[$this->masterIndex] );
-               $fileOps = $this->backends[$this->masterIndex]->getOperationsInternal( $realOps );
-               // Get the paths to lock from the master backend
-               $paths = $this->backends[$this->masterIndex]->getPathsToLockForOpsInternal( $fileOps );
-               // Get the paths under the proxy backend's name
-               $pbPaths = [
-                       LockManager::LOCK_UW => $this->unsubstPaths( $paths[LockManager::LOCK_UW] ),
-                       LockManager::LOCK_EX => $this->unsubstPaths( $paths[LockManager::LOCK_EX] )
-               ];
-
-               // Actually acquire the locks
-               return $this->getScopedFileLocks( $pbPaths, 'mixed', $status );
-       }
-
-       /**
-        * @param array $params
-        * @return int The master or read affinity backend index, based on $params['latest']
-        */
-       protected function getReadIndexFromParams( array $params ) {
-               return !empty( $params['latest'] ) ? $this->masterIndex : $this->readIndex;
-       }
-}
diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php
deleted file mode 100644 (file)
index bc4d81d..0000000
+++ /dev/null
@@ -1,1971 +0,0 @@
-<?php
-/**
- * Base class for all backends using particular storage medium.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileBackend
- * @author Aaron Schulz
- */
-
-/**
- * @brief Base class for all backends using particular storage medium.
- *
- * This class defines the methods as abstract that subclasses must implement.
- * Outside callers should *not* use functions with "Internal" in the name.
- *
- * The FileBackend operations are implemented using basic functions
- * such as storeInternal(), copyInternal(), deleteInternal() and the like.
- * This class is also responsible for path resolution and sanitization.
- *
- * @ingroup FileBackend
- * @since 1.19
- */
-abstract class FileBackendStore extends FileBackend {
-       /** @var WANObjectCache */
-       protected $memCache;
-       /** @var ProcessCacheLRU Map of paths to small (RAM/disk) cache items */
-       protected $cheapCache;
-       /** @var ProcessCacheLRU Map of paths to large (RAM/disk) cache items */
-       protected $expensiveCache;
-
-       /** @var array Map of container names to sharding config */
-       protected $shardViaHashLevels = [];
-
-       /** @var callable Method to get the MIME type of files */
-       protected $mimeCallback;
-
-       protected $maxFileSize = 4294967296; // integer bytes (4GiB)
-
-       const CACHE_TTL = 10; // integer; TTL in seconds for process cache entries
-       const CACHE_CHEAP_SIZE = 500; // integer; max entries in "cheap cache"
-       const CACHE_EXPENSIVE_SIZE = 5; // integer; max entries in "expensive cache"
-
-       /**
-        * @see FileBackend::__construct()
-        * Additional $config params include:
-        *   - wanCache     : WANObjectCache object to use for persistent caching.
-        *   - mimeCallback : Callback that takes (storage path, content, file system path) and
-        *                    returns the MIME type of the file or 'unknown/unknown'. The file
-        *                    system path parameter should be used if the content one is null.
-        *
-        * @param array $config
-        */
-       public function __construct( array $config ) {
-               parent::__construct( $config );
-               $this->mimeCallback = isset( $config['mimeCallback'] )
-                       ? $config['mimeCallback']
-                       : null;
-               $this->memCache = WANObjectCache::newEmpty(); // disabled by default
-               $this->cheapCache = new ProcessCacheLRU( self::CACHE_CHEAP_SIZE );
-               $this->expensiveCache = new ProcessCacheLRU( self::CACHE_EXPENSIVE_SIZE );
-       }
-
-       /**
-        * Get the maximum allowable file size given backend
-        * medium restrictions and basic performance constraints.
-        * Do not call this function from places outside FileBackend and FileOp.
-        *
-        * @return int Bytes
-        */
-       final public function maxFileSizeInternal() {
-               return $this->maxFileSize;
-       }
-
-       /**
-        * Check if a file can be created or changed at a given storage path.
-        * FS backends should check if the parent directory exists, files can be
-        * written under it, and that any file already there is writable.
-        * Backends using key/value stores should check if the container exists.
-        *
-        * @param string $storagePath
-        * @return bool
-        */
-       abstract public function isPathUsableInternal( $storagePath );
-
-       /**
-        * Create a file in the backend with the given contents.
-        * This will overwrite any file that exists at the destination.
-        * Do not call this function from places outside FileBackend and FileOp.
-        *
-        * $params include:
-        *   - content     : the raw file contents
-        *   - dst         : destination storage path
-        *   - headers     : HTTP header name/value map
-        *   - async       : Status will be returned immediately if supported.
-        *                   If the status is OK, then its value field will be
-        *                   set to a FileBackendStoreOpHandle object.
-        *   - dstExists   : Whether a file exists at the destination (optimization).
-        *                   Callers can use "false" if no existing file is being changed.
-        *
-        * @param array $params
-        * @return Status
-        */
-       final public function createInternal( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               if ( strlen( $params['content'] ) > $this->maxFileSizeInternal() ) {
-                       $status = Status::newFatal( 'backend-fail-maxsize',
-                               $params['dst'], $this->maxFileSizeInternal() );
-               } else {
-                       $status = $this->doCreateInternal( $params );
-                       $this->clearCache( [ $params['dst'] ] );
-                       if ( !isset( $params['dstExists'] ) || $params['dstExists'] ) {
-                               $this->deleteFileCache( $params['dst'] ); // persistent cache
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::createInternal()
-        * @param array $params
-        * @return Status
-        */
-       abstract protected function doCreateInternal( array $params );
-
-       /**
-        * Store a file into the backend from a file on disk.
-        * This will overwrite any file that exists at the destination.
-        * Do not call this function from places outside FileBackend and FileOp.
-        *
-        * $params include:
-        *   - src         : source path on disk
-        *   - dst         : destination storage path
-        *   - headers     : HTTP header name/value map
-        *   - async       : Status will be returned immediately if supported.
-        *                   If the status is OK, then its value field will be
-        *                   set to a FileBackendStoreOpHandle object.
-        *   - dstExists   : Whether a file exists at the destination (optimization).
-        *                   Callers can use "false" if no existing file is being changed.
-        *
-        * @param array $params
-        * @return Status
-        */
-       final public function storeInternal( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               if ( filesize( $params['src'] ) > $this->maxFileSizeInternal() ) {
-                       $status = Status::newFatal( 'backend-fail-maxsize',
-                               $params['dst'], $this->maxFileSizeInternal() );
-               } else {
-                       $status = $this->doStoreInternal( $params );
-                       $this->clearCache( [ $params['dst'] ] );
-                       if ( !isset( $params['dstExists'] ) || $params['dstExists'] ) {
-                               $this->deleteFileCache( $params['dst'] ); // persistent cache
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::storeInternal()
-        * @param array $params
-        * @return Status
-        */
-       abstract protected function doStoreInternal( array $params );
-
-       /**
-        * Copy a file from one storage path to another in the backend.
-        * This will overwrite any file that exists at the destination.
-        * Do not call this function from places outside FileBackend and FileOp.
-        *
-        * $params include:
-        *   - src                 : source storage path
-        *   - dst                 : destination storage path
-        *   - ignoreMissingSource : do nothing if the source file does not exist
-        *   - headers             : HTTP header name/value map
-        *   - async               : Status will be returned immediately if supported.
-        *                           If the status is OK, then its value field will be
-        *                           set to a FileBackendStoreOpHandle object.
-        *   - dstExists           : Whether a file exists at the destination (optimization).
-        *                           Callers can use "false" if no existing file is being changed.
-        *
-        * @param array $params
-        * @return Status
-        */
-       final public function copyInternal( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = $this->doCopyInternal( $params );
-               $this->clearCache( [ $params['dst'] ] );
-               if ( !isset( $params['dstExists'] ) || $params['dstExists'] ) {
-                       $this->deleteFileCache( $params['dst'] ); // persistent cache
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::copyInternal()
-        * @param array $params
-        * @return Status
-        */
-       abstract protected function doCopyInternal( array $params );
-
-       /**
-        * Delete a file at the storage path.
-        * Do not call this function from places outside FileBackend and FileOp.
-        *
-        * $params include:
-        *   - src                 : source storage path
-        *   - ignoreMissingSource : do nothing if the source file does not exist
-        *   - async               : Status will be returned immediately if supported.
-        *                           If the status is OK, then its value field will be
-        *                           set to a FileBackendStoreOpHandle object.
-        *
-        * @param array $params
-        * @return Status
-        */
-       final public function deleteInternal( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = $this->doDeleteInternal( $params );
-               $this->clearCache( [ $params['src'] ] );
-               $this->deleteFileCache( $params['src'] ); // persistent cache
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::deleteInternal()
-        * @param array $params
-        * @return Status
-        */
-       abstract protected function doDeleteInternal( array $params );
-
-       /**
-        * Move a file from one storage path to another in the backend.
-        * This will overwrite any file that exists at the destination.
-        * Do not call this function from places outside FileBackend and FileOp.
-        *
-        * $params include:
-        *   - src                 : source storage path
-        *   - dst                 : destination storage path
-        *   - ignoreMissingSource : do nothing if the source file does not exist
-        *   - headers             : HTTP header name/value map
-        *   - async               : Status will be returned immediately if supported.
-        *                           If the status is OK, then its value field will be
-        *                           set to a FileBackendStoreOpHandle object.
-        *   - dstExists           : Whether a file exists at the destination (optimization).
-        *                           Callers can use "false" if no existing file is being changed.
-        *
-        * @param array $params
-        * @return Status
-        */
-       final public function moveInternal( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = $this->doMoveInternal( $params );
-               $this->clearCache( [ $params['src'], $params['dst'] ] );
-               $this->deleteFileCache( $params['src'] ); // persistent cache
-               if ( !isset( $params['dstExists'] ) || $params['dstExists'] ) {
-                       $this->deleteFileCache( $params['dst'] ); // persistent cache
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::moveInternal()
-        * @param array $params
-        * @return Status
-        */
-       protected function doMoveInternal( array $params ) {
-               unset( $params['async'] ); // two steps, won't work here :)
-               $nsrc = FileBackend::normalizeStoragePath( $params['src'] );
-               $ndst = FileBackend::normalizeStoragePath( $params['dst'] );
-               // Copy source to dest
-               $status = $this->copyInternal( $params );
-               if ( $nsrc !== $ndst && $status->isOK() ) {
-                       // Delete source (only fails due to races or network problems)
-                       $status->merge( $this->deleteInternal( [ 'src' => $params['src'] ] ) );
-                       $status->setResult( true, $status->value ); // ignore delete() errors
-               }
-
-               return $status;
-       }
-
-       /**
-        * Alter metadata for a file at the storage path.
-        * Do not call this function from places outside FileBackend and FileOp.
-        *
-        * $params include:
-        *   - src           : source storage path
-        *   - headers       : HTTP header name/value map
-        *   - async         : Status will be returned immediately if supported.
-        *                     If the status is OK, then its value field will be
-        *                     set to a FileBackendStoreOpHandle object.
-        *
-        * @param array $params
-        * @return Status
-        */
-       final public function describeInternal( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               if ( count( $params['headers'] ) ) {
-                       $status = $this->doDescribeInternal( $params );
-                       $this->clearCache( [ $params['src'] ] );
-                       $this->deleteFileCache( $params['src'] ); // persistent cache
-               } else {
-                       $status = Status::newGood(); // nothing to do
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::describeInternal()
-        * @param array $params
-        * @return Status
-        */
-       protected function doDescribeInternal( array $params ) {
-               return Status::newGood();
-       }
-
-       /**
-        * No-op file operation that does nothing.
-        * Do not call this function from places outside FileBackend and FileOp.
-        *
-        * @param array $params
-        * @return Status
-        */
-       final public function nullInternal( array $params ) {
-               return Status::newGood();
-       }
-
-       final public function concatenate( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = Status::newGood();
-
-               // Try to lock the source files for the scope of this function
-               $scopeLockS = $this->getScopedFileLocks( $params['srcs'], LockManager::LOCK_UW, $status );
-               if ( $status->isOK() ) {
-                       // Actually do the file concatenation...
-                       $start_time = microtime( true );
-                       $status->merge( $this->doConcatenate( $params ) );
-                       $sec = microtime( true ) - $start_time;
-                       if ( !$status->isOK() ) {
-                               wfDebugLog( 'FileOperation', get_class( $this ) . "-{$this->name}" .
-                                       " failed to concatenate " . count( $params['srcs'] ) . " file(s) [$sec sec]" );
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::concatenate()
-        * @param array $params
-        * @return Status
-        */
-       protected function doConcatenate( array $params ) {
-               $status = Status::newGood();
-               $tmpPath = $params['dst']; // convenience
-               unset( $params['latest'] ); // sanity
-
-               // Check that the specified temp file is valid...
-               MediaWiki\suppressWarnings();
-               $ok = ( is_file( $tmpPath ) && filesize( $tmpPath ) == 0 );
-               MediaWiki\restoreWarnings();
-               if ( !$ok ) { // not present or not empty
-                       $status->fatal( 'backend-fail-opentemp', $tmpPath );
-
-                       return $status;
-               }
-
-               // Get local FS versions of the chunks needed for the concatenation...
-               $fsFiles = $this->getLocalReferenceMulti( $params );
-               foreach ( $fsFiles as $path => &$fsFile ) {
-                       if ( !$fsFile ) { // chunk failed to download?
-                               $fsFile = $this->getLocalReference( [ 'src' => $path ] );
-                               if ( !$fsFile ) { // retry failed?
-                                       $status->fatal( 'backend-fail-read', $path );
-
-                                       return $status;
-                               }
-                       }
-               }
-               unset( $fsFile ); // unset reference so we can reuse $fsFile
-
-               // Get a handle for the destination temp file
-               $tmpHandle = fopen( $tmpPath, 'ab' );
-               if ( $tmpHandle === false ) {
-                       $status->fatal( 'backend-fail-opentemp', $tmpPath );
-
-                       return $status;
-               }
-
-               // Build up the temp file using the source chunks (in order)...
-               foreach ( $fsFiles as $virtualSource => $fsFile ) {
-                       // Get a handle to the local FS version
-                       $sourceHandle = fopen( $fsFile->getPath(), 'rb' );
-                       if ( $sourceHandle === false ) {
-                               fclose( $tmpHandle );
-                               $status->fatal( 'backend-fail-read', $virtualSource );
-
-                               return $status;
-                       }
-                       // Append chunk to file (pass chunk size to avoid magic quotes)
-                       if ( !stream_copy_to_stream( $sourceHandle, $tmpHandle ) ) {
-                               fclose( $sourceHandle );
-                               fclose( $tmpHandle );
-                               $status->fatal( 'backend-fail-writetemp', $tmpPath );
-
-                               return $status;
-                       }
-                       fclose( $sourceHandle );
-               }
-               if ( !fclose( $tmpHandle ) ) {
-                       $status->fatal( 'backend-fail-closetemp', $tmpPath );
-
-                       return $status;
-               }
-
-               clearstatcache(); // temp file changed
-
-               return $status;
-       }
-
-       final protected function doPrepare( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = Status::newGood();
-
-               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
-               if ( $dir === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dir'] );
-
-                       return $status; // invalid storage path
-               }
-
-               if ( $shard !== null ) { // confined to a single container/shard
-                       $status->merge( $this->doPrepareInternal( $fullCont, $dir, $params ) );
-               } else { // directory is on several shards
-                       wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
-                       foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
-                               $status->merge( $this->doPrepareInternal( "{$fullCont}{$suffix}", $dir, $params ) );
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::doPrepare()
-        * @param string $container
-        * @param string $dir
-        * @param array $params
-        * @return Status
-        */
-       protected function doPrepareInternal( $container, $dir, array $params ) {
-               return Status::newGood();
-       }
-
-       final protected function doSecure( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = Status::newGood();
-
-               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
-               if ( $dir === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dir'] );
-
-                       return $status; // invalid storage path
-               }
-
-               if ( $shard !== null ) { // confined to a single container/shard
-                       $status->merge( $this->doSecureInternal( $fullCont, $dir, $params ) );
-               } else { // directory is on several shards
-                       wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
-                       foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
-                               $status->merge( $this->doSecureInternal( "{$fullCont}{$suffix}", $dir, $params ) );
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::doSecure()
-        * @param string $container
-        * @param string $dir
-        * @param array $params
-        * @return Status
-        */
-       protected function doSecureInternal( $container, $dir, array $params ) {
-               return Status::newGood();
-       }
-
-       final protected function doPublish( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = Status::newGood();
-
-               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
-               if ( $dir === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dir'] );
-
-                       return $status; // invalid storage path
-               }
-
-               if ( $shard !== null ) { // confined to a single container/shard
-                       $status->merge( $this->doPublishInternal( $fullCont, $dir, $params ) );
-               } else { // directory is on several shards
-                       wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
-                       foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
-                               $status->merge( $this->doPublishInternal( "{$fullCont}{$suffix}", $dir, $params ) );
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::doPublish()
-        * @param string $container
-        * @param string $dir
-        * @param array $params
-        * @return Status
-        */
-       protected function doPublishInternal( $container, $dir, array $params ) {
-               return Status::newGood();
-       }
-
-       final protected function doClean( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = Status::newGood();
-
-               // Recursive: first delete all empty subdirs recursively
-               if ( !empty( $params['recursive'] ) && !$this->directoriesAreVirtual() ) {
-                       $subDirsRel = $this->getTopDirectoryList( [ 'dir' => $params['dir'] ] );
-                       if ( $subDirsRel !== null ) { // no errors
-                               foreach ( $subDirsRel as $subDirRel ) {
-                                       $subDir = $params['dir'] . "/{$subDirRel}"; // full path
-                                       $status->merge( $this->doClean( [ 'dir' => $subDir ] + $params ) );
-                               }
-                               unset( $subDirsRel ); // free directory for rmdir() on Windows (for FS backends)
-                       }
-               }
-
-               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
-               if ( $dir === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dir'] );
-
-                       return $status; // invalid storage path
-               }
-
-               // Attempt to lock this directory...
-               $filesLockEx = [ $params['dir'] ];
-               $scopedLockE = $this->getScopedFileLocks( $filesLockEx, LockManager::LOCK_EX, $status );
-               if ( !$status->isOK() ) {
-                       return $status; // abort
-               }
-
-               if ( $shard !== null ) { // confined to a single container/shard
-                       $status->merge( $this->doCleanInternal( $fullCont, $dir, $params ) );
-                       $this->deleteContainerCache( $fullCont ); // purge cache
-               } else { // directory is on several shards
-                       wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
-                       foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
-                               $status->merge( $this->doCleanInternal( "{$fullCont}{$suffix}", $dir, $params ) );
-                               $this->deleteContainerCache( "{$fullCont}{$suffix}" ); // purge cache
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::doClean()
-        * @param string $container
-        * @param string $dir
-        * @param array $params
-        * @return Status
-        */
-       protected function doCleanInternal( $container, $dir, array $params ) {
-               return Status::newGood();
-       }
-
-       final public function fileExists( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $stat = $this->getFileStat( $params );
-
-               return ( $stat === null ) ? null : (bool)$stat; // null => failure
-       }
-
-       final public function getFileTimestamp( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $stat = $this->getFileStat( $params );
-
-               return $stat ? $stat['mtime'] : false;
-       }
-
-       final public function getFileSize( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $stat = $this->getFileStat( $params );
-
-               return $stat ? $stat['size'] : false;
-       }
-
-       final public function getFileStat( array $params ) {
-               $path = self::normalizeStoragePath( $params['src'] );
-               if ( $path === null ) {
-                       return false; // invalid storage path
-               }
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $latest = !empty( $params['latest'] ); // use latest data?
-               if ( !$latest && !$this->cheapCache->has( $path, 'stat', self::CACHE_TTL ) ) {
-                       $this->primeFileCache( [ $path ] ); // check persistent cache
-               }
-               if ( $this->cheapCache->has( $path, 'stat', self::CACHE_TTL ) ) {
-                       $stat = $this->cheapCache->get( $path, 'stat' );
-                       // If we want the latest data, check that this cached
-                       // value was in fact fetched with the latest available data.
-                       if ( is_array( $stat ) ) {
-                               if ( !$latest || $stat['latest'] ) {
-                                       return $stat;
-                               }
-                       } elseif ( in_array( $stat, [ 'NOT_EXIST', 'NOT_EXIST_LATEST' ] ) ) {
-                               if ( !$latest || $stat === 'NOT_EXIST_LATEST' ) {
-                                       return false;
-                               }
-                       }
-               }
-               $stat = $this->doGetFileStat( $params );
-               if ( is_array( $stat ) ) { // file exists
-                       // Strongly consistent backends can automatically set "latest"
-                       $stat['latest'] = isset( $stat['latest'] ) ? $stat['latest'] : $latest;
-                       $this->cheapCache->set( $path, 'stat', $stat );
-                       $this->setFileCache( $path, $stat ); // update persistent cache
-                       if ( isset( $stat['sha1'] ) ) { // some backends store SHA-1 as metadata
-                               $this->cheapCache->set( $path, 'sha1',
-                                       [ 'hash' => $stat['sha1'], 'latest' => $latest ] );
-                       }
-                       if ( isset( $stat['xattr'] ) ) { // some backends store headers/metadata
-                               $stat['xattr'] = self::normalizeXAttributes( $stat['xattr'] );
-                               $this->cheapCache->set( $path, 'xattr',
-                                       [ 'map' => $stat['xattr'], 'latest' => $latest ] );
-                       }
-               } elseif ( $stat === false ) { // file does not exist
-                       $this->cheapCache->set( $path, 'stat', $latest ? 'NOT_EXIST_LATEST' : 'NOT_EXIST' );
-                       $this->cheapCache->set( $path, 'xattr', [ 'map' => false, 'latest' => $latest ] );
-                       $this->cheapCache->set( $path, 'sha1', [ 'hash' => false, 'latest' => $latest ] );
-                       wfDebug( __METHOD__ . ": File $path does not exist.\n" );
-               } else { // an error occurred
-                       wfDebug( __METHOD__ . ": Could not stat file $path.\n" );
-               }
-
-               return $stat;
-       }
-
-       /**
-        * @see FileBackendStore::getFileStat()
-        */
-       abstract protected function doGetFileStat( array $params );
-
-       public function getFileContentsMulti( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-
-               $params = $this->setConcurrencyFlags( $params );
-               $contents = $this->doGetFileContentsMulti( $params );
-
-               return $contents;
-       }
-
-       /**
-        * @see FileBackendStore::getFileContentsMulti()
-        * @param array $params
-        * @return array
-        */
-       protected function doGetFileContentsMulti( array $params ) {
-               $contents = [];
-               foreach ( $this->doGetLocalReferenceMulti( $params ) as $path => $fsFile ) {
-                       MediaWiki\suppressWarnings();
-                       $contents[$path] = $fsFile ? file_get_contents( $fsFile->getPath() ) : false;
-                       MediaWiki\restoreWarnings();
-               }
-
-               return $contents;
-       }
-
-       final public function getFileXAttributes( array $params ) {
-               $path = self::normalizeStoragePath( $params['src'] );
-               if ( $path === null ) {
-                       return false; // invalid storage path
-               }
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $latest = !empty( $params['latest'] ); // use latest data?
-               if ( $this->cheapCache->has( $path, 'xattr', self::CACHE_TTL ) ) {
-                       $stat = $this->cheapCache->get( $path, 'xattr' );
-                       // If we want the latest data, check that this cached
-                       // value was in fact fetched with the latest available data.
-                       if ( !$latest || $stat['latest'] ) {
-                               return $stat['map'];
-                       }
-               }
-               $fields = $this->doGetFileXAttributes( $params );
-               $fields = is_array( $fields ) ? self::normalizeXAttributes( $fields ) : false;
-               $this->cheapCache->set( $path, 'xattr', [ 'map' => $fields, 'latest' => $latest ] );
-
-               return $fields;
-       }
-
-       /**
-        * @see FileBackendStore::getFileXAttributes()
-        * @return bool|string
-        */
-       protected function doGetFileXAttributes( array $params ) {
-               return [ 'headers' => [], 'metadata' => [] ]; // not supported
-       }
-
-       final public function getFileSha1Base36( array $params ) {
-               $path = self::normalizeStoragePath( $params['src'] );
-               if ( $path === null ) {
-                       return false; // invalid storage path
-               }
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $latest = !empty( $params['latest'] ); // use latest data?
-               if ( $this->cheapCache->has( $path, 'sha1', self::CACHE_TTL ) ) {
-                       $stat = $this->cheapCache->get( $path, 'sha1' );
-                       // If we want the latest data, check that this cached
-                       // value was in fact fetched with the latest available data.
-                       if ( !$latest || $stat['latest'] ) {
-                               return $stat['hash'];
-                       }
-               }
-               $hash = $this->doGetFileSha1Base36( $params );
-               $this->cheapCache->set( $path, 'sha1', [ 'hash' => $hash, 'latest' => $latest ] );
-
-               return $hash;
-       }
-
-       /**
-        * @see FileBackendStore::getFileSha1Base36()
-        * @param array $params
-        * @return bool|string
-        */
-       protected function doGetFileSha1Base36( array $params ) {
-               $fsFile = $this->getLocalReference( $params );
-               if ( !$fsFile ) {
-                       return false;
-               } else {
-                       return $fsFile->getSha1Base36();
-               }
-       }
-
-       final public function getFileProps( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $fsFile = $this->getLocalReference( $params );
-               $props = $fsFile ? $fsFile->getProps() : FSFile::placeholderProps();
-
-               return $props;
-       }
-
-       final public function getLocalReferenceMulti( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-
-               $params = $this->setConcurrencyFlags( $params );
-
-               $fsFiles = []; // (path => FSFile)
-               $latest = !empty( $params['latest'] ); // use latest data?
-               // Reuse any files already in process cache...
-               foreach ( $params['srcs'] as $src ) {
-                       $path = self::normalizeStoragePath( $src );
-                       if ( $path === null ) {
-                               $fsFiles[$src] = null; // invalid storage path
-                       } elseif ( $this->expensiveCache->has( $path, 'localRef' ) ) {
-                               $val = $this->expensiveCache->get( $path, 'localRef' );
-                               // If we want the latest data, check that this cached
-                               // value was in fact fetched with the latest available data.
-                               if ( !$latest || $val['latest'] ) {
-                                       $fsFiles[$src] = $val['object'];
-                               }
-                       }
-               }
-               // Fetch local references of any remaning files...
-               $params['srcs'] = array_diff( $params['srcs'], array_keys( $fsFiles ) );
-               foreach ( $this->doGetLocalReferenceMulti( $params ) as $path => $fsFile ) {
-                       $fsFiles[$path] = $fsFile;
-                       if ( $fsFile ) { // update the process cache...
-                               $this->expensiveCache->set( $path, 'localRef',
-                                       [ 'object' => $fsFile, 'latest' => $latest ] );
-                       }
-               }
-
-               return $fsFiles;
-       }
-
-       /**
-        * @see FileBackendStore::getLocalReferenceMulti()
-        * @param array $params
-        * @return array
-        */
-       protected function doGetLocalReferenceMulti( array $params ) {
-               return $this->doGetLocalCopyMulti( $params );
-       }
-
-       final public function getLocalCopyMulti( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-
-               $params = $this->setConcurrencyFlags( $params );
-               $tmpFiles = $this->doGetLocalCopyMulti( $params );
-
-               return $tmpFiles;
-       }
-
-       /**
-        * @see FileBackendStore::getLocalCopyMulti()
-        * @param array $params
-        * @return array
-        */
-       abstract protected function doGetLocalCopyMulti( array $params );
-
-       /**
-        * @see FileBackend::getFileHttpUrl()
-        * @param array $params
-        * @return string|null
-        */
-       public function getFileHttpUrl( array $params ) {
-               return null; // not supported
-       }
-
-       final public function streamFile( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = Status::newGood();
-
-               // Always set some fields for subclass convenience
-               $params['options'] = isset( $params['options'] ) ? $params['options'] : [];
-               $params['headers'] = isset( $params['headers'] ) ? $params['headers'] : [];
-
-               // Don't stream it out as text/html if there was a PHP error
-               if ( ( empty( $params['headless'] ) || $params['headers'] ) && headers_sent() ) {
-                       print "Headers already sent, terminating.\n";
-                       $status->fatal( 'backend-fail-stream', $params['src'] );
-                       return $status;
-               }
-
-               $status->merge( $this->doStreamFile( $params ) );
-
-               return $status;
-       }
-
-       /**
-        * @see FileBackendStore::streamFile()
-        * @param array $params
-        * @return Status
-        */
-       protected function doStreamFile( array $params ) {
-               $status = Status::newGood();
-
-               $flags = 0;
-               $flags |= !empty( $params['headless'] ) ? StreamFile::STREAM_HEADLESS : 0;
-               $flags |= !empty( $params['allowOB'] ) ? StreamFile::STREAM_ALLOW_OB : 0;
-
-               $fsFile = $this->getLocalReference( $params );
-
-               if ( $fsFile ) {
-                       $res = StreamFile::stream( $fsFile->getPath(),
-                               $params['headers'], true, $params['options'], $flags );
-               } else {
-                       $res = false;
-                       StreamFile::send404Message( $params['src'], $flags );
-               }
-
-               if ( !$res ) {
-                       $status->fatal( 'backend-fail-stream', $params['src'] );
-               }
-
-               return $status;
-       }
-
-       final public function directoryExists( array $params ) {
-               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
-               if ( $dir === null ) {
-                       return false; // invalid storage path
-               }
-               if ( $shard !== null ) { // confined to a single container/shard
-                       return $this->doDirectoryExists( $fullCont, $dir, $params );
-               } else { // directory is on several shards
-                       wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
-                       $res = false; // response
-                       foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
-                               $exists = $this->doDirectoryExists( "{$fullCont}{$suffix}", $dir, $params );
-                               if ( $exists ) {
-                                       $res = true;
-                                       break; // found one!
-                               } elseif ( $exists === null ) { // error?
-                                       $res = null; // if we don't find anything, it is indeterminate
-                               }
-                       }
-
-                       return $res;
-               }
-       }
-
-       /**
-        * @see FileBackendStore::directoryExists()
-        *
-        * @param string $container Resolved container name
-        * @param string $dir Resolved path relative to container
-        * @param array $params
-        * @return bool|null
-        */
-       abstract protected function doDirectoryExists( $container, $dir, array $params );
-
-       final public function getDirectoryList( array $params ) {
-               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
-               if ( $dir === null ) { // invalid storage path
-                       return null;
-               }
-               if ( $shard !== null ) {
-                       // File listing is confined to a single container/shard
-                       return $this->getDirectoryListInternal( $fullCont, $dir, $params );
-               } else {
-                       wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       // File listing spans multiple containers/shards
-                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
-
-                       return new FileBackendStoreShardDirIterator( $this,
-                               $fullCont, $dir, $this->getContainerSuffixes( $shortCont ), $params );
-               }
-       }
-
-       /**
-        * Do not call this function from places outside FileBackend
-        *
-        * @see FileBackendStore::getDirectoryList()
-        *
-        * @param string $container Resolved container name
-        * @param string $dir Resolved path relative to container
-        * @param array $params
-        * @return Traversable|array|null Returns null on failure
-        */
-       abstract public function getDirectoryListInternal( $container, $dir, array $params );
-
-       final public function getFileList( array $params ) {
-               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
-               if ( $dir === null ) { // invalid storage path
-                       return null;
-               }
-               if ( $shard !== null ) {
-                       // File listing is confined to a single container/shard
-                       return $this->getFileListInternal( $fullCont, $dir, $params );
-               } else {
-                       wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       // File listing spans multiple containers/shards
-                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
-
-                       return new FileBackendStoreShardFileIterator( $this,
-                               $fullCont, $dir, $this->getContainerSuffixes( $shortCont ), $params );
-               }
-       }
-
-       /**
-        * Do not call this function from places outside FileBackend
-        *
-        * @see FileBackendStore::getFileList()
-        *
-        * @param string $container Resolved container name
-        * @param string $dir Resolved path relative to container
-        * @param array $params
-        * @return Traversable|array|null Returns null on failure
-        */
-       abstract public function getFileListInternal( $container, $dir, array $params );
-
-       /**
-        * Return a list of FileOp objects from a list of operations.
-        * Do not call this function from places outside FileBackend.
-        *
-        * The result must have the same number of items as the input.
-        * An exception is thrown if an unsupported operation is requested.
-        *
-        * @param array $ops Same format as doOperations()
-        * @return array List of FileOp objects
-        * @throws FileBackendError
-        */
-       final public function getOperationsInternal( array $ops ) {
-               $supportedOps = [
-                       'store' => 'StoreFileOp',
-                       'copy' => 'CopyFileOp',
-                       'move' => 'MoveFileOp',
-                       'delete' => 'DeleteFileOp',
-                       'create' => 'CreateFileOp',
-                       'describe' => 'DescribeFileOp',
-                       'null' => 'NullFileOp'
-               ];
-
-               $performOps = []; // array of FileOp objects
-               // Build up ordered array of FileOps...
-               foreach ( $ops as $operation ) {
-                       $opName = $operation['op'];
-                       if ( isset( $supportedOps[$opName] ) ) {
-                               $class = $supportedOps[$opName];
-                               // Get params for this operation
-                               $params = $operation;
-                               // Append the FileOp class
-                               $performOps[] = new $class( $this, $params );
-                       } else {
-                               throw new FileBackendError( "Operation '$opName' is not supported." );
-                       }
-               }
-
-               return $performOps;
-       }
-
-       /**
-        * Get a list of storage paths to lock for a list of operations
-        * Returns an array with LockManager::LOCK_UW (shared locks) and
-        * LockManager::LOCK_EX (exclusive locks) keys, each corresponding
-        * to a list of storage paths to be locked. All returned paths are
-        * normalized.
-        *
-        * @param array $performOps List of FileOp objects
-        * @return array (LockManager::LOCK_UW => path list, LockManager::LOCK_EX => path list)
-        */
-       final public function getPathsToLockForOpsInternal( array $performOps ) {
-               // Build up a list of files to lock...
-               $paths = [ 'sh' => [], 'ex' => [] ];
-               foreach ( $performOps as $fileOp ) {
-                       $paths['sh'] = array_merge( $paths['sh'], $fileOp->storagePathsRead() );
-                       $paths['ex'] = array_merge( $paths['ex'], $fileOp->storagePathsChanged() );
-               }
-               // Optimization: if doing an EX lock anyway, don't also set an SH one
-               $paths['sh'] = array_diff( $paths['sh'], $paths['ex'] );
-               // Get a shared lock on the parent directory of each path changed
-               $paths['sh'] = array_merge( $paths['sh'], array_map( 'dirname', $paths['ex'] ) );
-
-               return [
-                       LockManager::LOCK_UW => $paths['sh'],
-                       LockManager::LOCK_EX => $paths['ex']
-               ];
-       }
-
-       public function getScopedLocksForOps( array $ops, Status $status ) {
-               $paths = $this->getPathsToLockForOpsInternal( $this->getOperationsInternal( $ops ) );
-
-               return $this->getScopedFileLocks( $paths, 'mixed', $status );
-       }
-
-       final protected function doOperationsInternal( array $ops, array $opts ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = Status::newGood();
-
-               // Fix up custom header name/value pairs...
-               $ops = array_map( [ $this, 'sanitizeOpHeaders' ], $ops );
-
-               // Build up a list of FileOps...
-               $performOps = $this->getOperationsInternal( $ops );
-
-               // Acquire any locks as needed...
-               if ( empty( $opts['nonLocking'] ) ) {
-                       // Build up a list of files to lock...
-                       $paths = $this->getPathsToLockForOpsInternal( $performOps );
-                       // Try to lock those files for the scope of this function...
-
-                       $scopeLock = $this->getScopedFileLocks( $paths, 'mixed', $status );
-                       if ( !$status->isOK() ) {
-                               return $status; // abort
-                       }
-               }
-
-               // Clear any file cache entries (after locks acquired)
-               if ( empty( $opts['preserveCache'] ) ) {
-                       $this->clearCache();
-               }
-
-               // Build the list of paths involved
-               $paths = [];
-               foreach ( $performOps as $op ) {
-                       $paths = array_merge( $paths, $op->storagePathsRead() );
-                       $paths = array_merge( $paths, $op->storagePathsChanged() );
-               }
-
-               // Enlarge the cache to fit the stat entries of these files
-               $this->cheapCache->resize( max( 2 * count( $paths ), self::CACHE_CHEAP_SIZE ) );
-
-               // Load from the persistent container caches
-               $this->primeContainerCache( $paths );
-               // Get the latest stat info for all the files (having locked them)
-               $ok = $this->preloadFileStat( [ 'srcs' => $paths, 'latest' => true ] );
-
-               if ( $ok ) {
-                       // Actually attempt the operation batch...
-                       $opts = $this->setConcurrencyFlags( $opts );
-                       $subStatus = FileOpBatch::attempt( $performOps, $opts, $this->fileJournal );
-               } else {
-                       // If we could not even stat some files, then bail out...
-                       $subStatus = Status::newFatal( 'backend-fail-internal', $this->name );
-                       foreach ( $ops as $i => $op ) { // mark each op as failed
-                               $subStatus->success[$i] = false;
-                               ++$subStatus->failCount;
-                       }
-                       wfDebugLog( 'FileOperation', get_class( $this ) . "-{$this->name} " .
-                               " stat failure; aborted operations: " . FormatJson::encode( $ops ) );
-               }
-
-               // Merge errors into status fields
-               $status->merge( $subStatus );
-               $status->success = $subStatus->success; // not done in merge()
-
-               // Shrink the stat cache back to normal size
-               $this->cheapCache->resize( self::CACHE_CHEAP_SIZE );
-
-               return $status;
-       }
-
-       final protected function doQuickOperationsInternal( array $ops ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $status = Status::newGood();
-
-               // Fix up custom header name/value pairs...
-               $ops = array_map( [ $this, 'sanitizeOpHeaders' ], $ops );
-
-               // Clear any file cache entries
-               $this->clearCache();
-
-               $supportedOps = [ 'create', 'store', 'copy', 'move', 'delete', 'describe', 'null' ];
-               // Parallel ops may be disabled in config due to dependencies (e.g. needing popen())
-               $async = ( $this->parallelize === 'implicit' && count( $ops ) > 1 );
-               $maxConcurrency = $this->concurrency; // throttle
-
-               $statuses = []; // array of (index => Status)
-               $fileOpHandles = []; // list of (index => handle) arrays
-               $curFileOpHandles = []; // current handle batch
-               // Perform the sync-only ops and build up op handles for the async ops...
-               foreach ( $ops as $index => $params ) {
-                       if ( !in_array( $params['op'], $supportedOps ) ) {
-                               throw new FileBackendError( "Operation '{$params['op']}' is not supported." );
-                       }
-                       $method = $params['op'] . 'Internal'; // e.g. "storeInternal"
-                       $subStatus = $this->$method( [ 'async' => $async ] + $params );
-                       if ( $subStatus->value instanceof FileBackendStoreOpHandle ) { // async
-                               if ( count( $curFileOpHandles ) >= $maxConcurrency ) {
-                                       $fileOpHandles[] = $curFileOpHandles; // push this batch
-                                       $curFileOpHandles = [];
-                               }
-                               $curFileOpHandles[$index] = $subStatus->value; // keep index
-                       } else { // error or completed
-                               $statuses[$index] = $subStatus; // keep index
-                       }
-               }
-               if ( count( $curFileOpHandles ) ) {
-                       $fileOpHandles[] = $curFileOpHandles; // last batch
-               }
-               // Do all the async ops that can be done concurrently...
-               foreach ( $fileOpHandles as $fileHandleBatch ) {
-                       $statuses = $statuses + $this->executeOpHandlesInternal( $fileHandleBatch );
-               }
-               // Marshall and merge all the responses...
-               foreach ( $statuses as $index => $subStatus ) {
-                       $status->merge( $subStatus );
-                       if ( $subStatus->isOK() ) {
-                               $status->success[$index] = true;
-                               ++$status->successCount;
-                       } else {
-                               $status->success[$index] = false;
-                               ++$status->failCount;
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * Execute a list of FileBackendStoreOpHandle handles in parallel.
-        * The resulting Status object fields will correspond
-        * to the order in which the handles where given.
-        *
-        * @param FileBackendStoreOpHandle[] $fileOpHandles
-        *
-        * @throws FileBackendError
-        * @return array Map of Status objects
-        */
-       final public function executeOpHandlesInternal( array $fileOpHandles ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-
-               foreach ( $fileOpHandles as $fileOpHandle ) {
-                       if ( !( $fileOpHandle instanceof FileBackendStoreOpHandle ) ) {
-                               throw new FileBackendError( "Given a non-FileBackendStoreOpHandle object." );
-                       } elseif ( $fileOpHandle->backend->getName() !== $this->getName() ) {
-                               throw new FileBackendError( "Given a FileBackendStoreOpHandle for the wrong backend." );
-                       }
-               }
-               $res = $this->doExecuteOpHandlesInternal( $fileOpHandles );
-               foreach ( $fileOpHandles as $fileOpHandle ) {
-                       $fileOpHandle->closeResources();
-               }
-
-               return $res;
-       }
-
-       /**
-        * @see FileBackendStore::executeOpHandlesInternal()
-        *
-        * @param FileBackendStoreOpHandle[] $fileOpHandles
-        *
-        * @throws FileBackendError
-        * @return Status[] List of corresponding Status objects
-        */
-       protected function doExecuteOpHandlesInternal( array $fileOpHandles ) {
-               if ( count( $fileOpHandles ) ) {
-                       throw new FileBackendError( "This backend supports no asynchronous operations." );
-               }
-
-               return [];
-       }
-
-       /**
-        * Normalize and filter HTTP headers from a file operation
-        *
-        * This normalizes and strips long HTTP headers from a file operation.
-        * Most headers are just numbers, but some are allowed to be long.
-        * This function is useful for cleaning up headers and avoiding backend
-        * specific errors, especially in the middle of batch file operations.
-        *
-        * @param array $op Same format as doOperation()
-        * @return array
-        */
-       protected function sanitizeOpHeaders( array $op ) {
-               static $longs = [ 'content-disposition' ];
-
-               if ( isset( $op['headers'] ) ) { // op sets HTTP headers
-                       $newHeaders = [];
-                       foreach ( $op['headers'] as $name => $value ) {
-                               $name = strtolower( $name );
-                               $maxHVLen = in_array( $name, $longs ) ? INF : 255;
-                               if ( strlen( $name ) > 255 || strlen( $value ) > $maxHVLen ) {
-                                       trigger_error( "Header '$name: $value' is too long." );
-                               } else {
-                                       $newHeaders[$name] = strlen( $value ) ? $value : ''; // null/false => ""
-                               }
-                       }
-                       $op['headers'] = $newHeaders;
-               }
-
-               return $op;
-       }
-
-       final public function preloadCache( array $paths ) {
-               $fullConts = []; // full container names
-               foreach ( $paths as $path ) {
-                       list( $fullCont, , ) = $this->resolveStoragePath( $path );
-                       $fullConts[] = $fullCont;
-               }
-               // Load from the persistent file and container caches
-               $this->primeContainerCache( $fullConts );
-               $this->primeFileCache( $paths );
-       }
-
-       final public function clearCache( array $paths = null ) {
-               if ( is_array( $paths ) ) {
-                       $paths = array_map( 'FileBackend::normalizeStoragePath', $paths );
-                       $paths = array_filter( $paths, 'strlen' ); // remove nulls
-               }
-               if ( $paths === null ) {
-                       $this->cheapCache->clear();
-                       $this->expensiveCache->clear();
-               } else {
-                       foreach ( $paths as $path ) {
-                               $this->cheapCache->clear( $path );
-                               $this->expensiveCache->clear( $path );
-                       }
-               }
-               $this->doClearCache( $paths );
-       }
-
-       /**
-        * Clears any additional stat caches for storage paths
-        *
-        * @see FileBackend::clearCache()
-        *
-        * @param array $paths Storage paths (optional)
-        */
-       protected function doClearCache( array $paths = null ) {
-       }
-
-       final public function preloadFileStat( array $params ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               $success = true; // no network errors
-
-               $params['concurrency'] = ( $this->parallelize !== 'off' ) ? $this->concurrency : 1;
-               $stats = $this->doGetFileStatMulti( $params );
-               if ( $stats === null ) {
-                       return true; // not supported
-               }
-
-               $latest = !empty( $params['latest'] ); // use latest data?
-               foreach ( $stats as $path => $stat ) {
-                       $path = FileBackend::normalizeStoragePath( $path );
-                       if ( $path === null ) {
-                               continue; // this shouldn't happen
-                       }
-                       if ( is_array( $stat ) ) { // file exists
-                               // Strongly consistent backends can automatically set "latest"
-                               $stat['latest'] = isset( $stat['latest'] ) ? $stat['latest'] : $latest;
-                               $this->cheapCache->set( $path, 'stat', $stat );
-                               $this->setFileCache( $path, $stat ); // update persistent cache
-                               if ( isset( $stat['sha1'] ) ) { // some backends store SHA-1 as metadata
-                                       $this->cheapCache->set( $path, 'sha1',
-                                               [ 'hash' => $stat['sha1'], 'latest' => $latest ] );
-                               }
-                               if ( isset( $stat['xattr'] ) ) { // some backends store headers/metadata
-                                       $stat['xattr'] = self::normalizeXAttributes( $stat['xattr'] );
-                                       $this->cheapCache->set( $path, 'xattr',
-                                               [ 'map' => $stat['xattr'], 'latest' => $latest ] );
-                               }
-                       } elseif ( $stat === false ) { // file does not exist
-                               $this->cheapCache->set( $path, 'stat',
-                                       $latest ? 'NOT_EXIST_LATEST' : 'NOT_EXIST' );
-                               $this->cheapCache->set( $path, 'xattr',
-                                       [ 'map' => false, 'latest' => $latest ] );
-                               $this->cheapCache->set( $path, 'sha1',
-                                       [ 'hash' => false, 'latest' => $latest ] );
-                               wfDebug( __METHOD__ . ": File $path does not exist.\n" );
-                       } else { // an error occurred
-                               $success = false;
-                               wfDebug( __METHOD__ . ": Could not stat file $path.\n" );
-                       }
-               }
-
-               return $success;
-       }
-
-       /**
-        * Get file stat information (concurrently if possible) for several files
-        *
-        * @see FileBackend::getFileStat()
-        *
-        * @param array $params Parameters include:
-        *   - srcs        : list of source storage paths
-        *   - latest      : use the latest available data
-        * @return array|null Map of storage paths to array|bool|null (returns null if not supported)
-        * @since 1.23
-        */
-       protected function doGetFileStatMulti( array $params ) {
-               return null; // not supported
-       }
-
-       /**
-        * Is this a key/value store where directories are just virtual?
-        * Virtual directories exists in so much as files exists that are
-        * prefixed with the directory path followed by a forward slash.
-        *
-        * @return bool
-        */
-       abstract protected function directoriesAreVirtual();
-
-       /**
-        * Check if a short container name is valid
-        *
-        * This checks for length and illegal characters.
-        * This may disallow certain characters that can appear
-        * in the prefix used to make the full container name.
-        *
-        * @param string $container
-        * @return bool
-        */
-       final protected static function isValidShortContainerName( $container ) {
-               // Suffixes like '.xxx' (hex shard chars) or '.seg' (file segments)
-               // might be used by subclasses. Reserve the dot character for sanity.
-               // The only way dots end up in containers (e.g. resolveStoragePath)
-               // is due to the wikiId container prefix or the above suffixes.
-               return self::isValidContainerName( $container ) && !preg_match( '/[.]/', $container );
-       }
-
-       /**
-        * Check if a full container name is valid
-        *
-        * This checks for length and illegal characters.
-        * Limiting the characters makes migrations to other stores easier.
-        *
-        * @param string $container
-        * @return bool
-        */
-       final protected static function isValidContainerName( $container ) {
-               // This accounts for NTFS, Swift, and Ceph restrictions
-               // and disallows directory separators or traversal characters.
-               // Note that matching strings URL encode to the same string;
-               // in Swift/Ceph, the length restriction is *after* URL encoding.
-               return (bool)preg_match( '/^[a-z0-9][a-z0-9-_.]{0,199}$/i', $container );
-       }
-
-       /**
-        * Splits a storage path into an internal container name,
-        * an internal relative file name, and a container shard suffix.
-        * Any shard suffix is already appended to the internal container name.
-        * This also checks that the storage path is valid and within this backend.
-        *
-        * If the container is sharded but a suffix could not be determined,
-        * this means that the path can only refer to a directory and can only
-        * be scanned by looking in all the container shards.
-        *
-        * @param string $storagePath
-        * @return array (container, path, container suffix) or (null, null, null) if invalid
-        */
-       final protected function resolveStoragePath( $storagePath ) {
-               list( $backend, $shortCont, $relPath ) = self::splitStoragePath( $storagePath );
-               if ( $backend === $this->name ) { // must be for this backend
-                       $relPath = self::normalizeContainerPath( $relPath );
-                       if ( $relPath !== null && self::isValidShortContainerName( $shortCont ) ) {
-                               // Get shard for the normalized path if this container is sharded
-                               $cShard = $this->getContainerShard( $shortCont, $relPath );
-                               // Validate and sanitize the relative path (backend-specific)
-                               $relPath = $this->resolveContainerPath( $shortCont, $relPath );
-                               if ( $relPath !== null ) {
-                                       // Prepend any wiki ID prefix to the container name
-                                       $container = $this->fullContainerName( $shortCont );
-                                       if ( self::isValidContainerName( $container ) ) {
-                                               // Validate and sanitize the container name (backend-specific)
-                                               $container = $this->resolveContainerName( "{$container}{$cShard}" );
-                                               if ( $container !== null ) {
-                                                       return [ $container, $relPath, $cShard ];
-                                               }
-                                       }
-                               }
-                       }
-               }
-
-               return [ null, null, null ];
-       }
-
-       /**
-        * Like resolveStoragePath() except null values are returned if
-        * the container is sharded and the shard could not be determined
-        * or if the path ends with '/'. The latter case is illegal for FS
-        * backends and can confuse listings for object store backends.
-        *
-        * This function is used when resolving paths that must be valid
-        * locations for files. Directory and listing functions should
-        * generally just use resolveStoragePath() instead.
-        *
-        * @see FileBackendStore::resolveStoragePath()
-        *
-        * @param string $storagePath
-        * @return array (container, path) or (null, null) if invalid
-        */
-       final protected function resolveStoragePathReal( $storagePath ) {
-               list( $container, $relPath, $cShard ) = $this->resolveStoragePath( $storagePath );
-               if ( $cShard !== null && substr( $relPath, -1 ) !== '/' ) {
-                       return [ $container, $relPath ];
-               }
-
-               return [ null, null ];
-       }
-
-       /**
-        * Get the container name shard suffix for a given path.
-        * Any empty suffix means the container is not sharded.
-        *
-        * @param string $container Container name
-        * @param string $relPath Storage path relative to the container
-        * @return string|null Returns null if shard could not be determined
-        */
-       final protected function getContainerShard( $container, $relPath ) {
-               list( $levels, $base, $repeat ) = $this->getContainerHashLevels( $container );
-               if ( $levels == 1 || $levels == 2 ) {
-                       // Hash characters are either base 16 or 36
-                       $char = ( $base == 36 ) ? '[0-9a-z]' : '[0-9a-f]';
-                       // Get a regex that represents the shard portion of paths.
-                       // The concatenation of the captures gives us the shard.
-                       if ( $levels === 1 ) { // 16 or 36 shards per container
-                               $hashDirRegex = '(' . $char . ')';
-                       } else { // 256 or 1296 shards per container
-                               if ( $repeat ) { // verbose hash dir format (e.g. "a/ab/abc")
-                                       $hashDirRegex = $char . '/(' . $char . '{2})';
-                               } else { // short hash dir format (e.g. "a/b/c")
-                                       $hashDirRegex = '(' . $char . ')/(' . $char . ')';
-                               }
-                       }
-                       // Allow certain directories to be above the hash dirs so as
-                       // to work with FileRepo (e.g. "archive/a/ab" or "temp/a/ab").
-                       // They must be 2+ chars to avoid any hash directory ambiguity.
-                       $m = [];
-                       if ( preg_match( "!^(?:[^/]{2,}/)*$hashDirRegex(?:/|$)!", $relPath, $m ) ) {
-                               return '.' . implode( '', array_slice( $m, 1 ) );
-                       }
-
-                       return null; // failed to match
-               }
-
-               return ''; // no sharding
-       }
-
-       /**
-        * Check if a storage path maps to a single shard.
-        * Container dirs like "a", where the container shards on "x/xy",
-        * can reside on several shards. Such paths are tricky to handle.
-        *
-        * @param string $storagePath Storage path
-        * @return bool
-        */
-       final public function isSingleShardPathInternal( $storagePath ) {
-               list( , , $shard ) = $this->resolveStoragePath( $storagePath );
-
-               return ( $shard !== null );
-       }
-
-       /**
-        * Get the sharding config for a container.
-        * If greater than 0, then all file storage paths within
-        * the container are required to be hashed accordingly.
-        *
-        * @param string $container
-        * @return array (integer levels, integer base, repeat flag) or (0, 0, false)
-        */
-       final protected function getContainerHashLevels( $container ) {
-               if ( isset( $this->shardViaHashLevels[$container] ) ) {
-                       $config = $this->shardViaHashLevels[$container];
-                       $hashLevels = (int)$config['levels'];
-                       if ( $hashLevels == 1 || $hashLevels == 2 ) {
-                               $hashBase = (int)$config['base'];
-                               if ( $hashBase == 16 || $hashBase == 36 ) {
-                                       return [ $hashLevels, $hashBase, $config['repeat'] ];
-                               }
-                       }
-               }
-
-               return [ 0, 0, false ]; // no sharding
-       }
-
-       /**
-        * Get a list of full container shard suffixes for a container
-        *
-        * @param string $container
-        * @return array
-        */
-       final protected function getContainerSuffixes( $container ) {
-               $shards = [];
-               list( $digits, $base ) = $this->getContainerHashLevels( $container );
-               if ( $digits > 0 ) {
-                       $numShards = pow( $base, $digits );
-                       for ( $index = 0; $index < $numShards; $index++ ) {
-                               $shards[] = '.' . Wikimedia\base_convert( $index, 10, $base, $digits );
-                       }
-               }
-
-               return $shards;
-       }
-
-       /**
-        * Get the full container name, including the wiki ID prefix
-        *
-        * @param string $container
-        * @return string
-        */
-       final protected function fullContainerName( $container ) {
-               if ( $this->wikiId != '' ) {
-                       return "{$this->wikiId}-$container";
-               } else {
-                       return $container;
-               }
-       }
-
-       /**
-        * Resolve a container name, checking if it's allowed by the backend.
-        * This is intended for internal use, such as encoding illegal chars.
-        * Subclasses can override this to be more restrictive.
-        *
-        * @param string $container
-        * @return string|null
-        */
-       protected function resolveContainerName( $container ) {
-               return $container;
-       }
-
-       /**
-        * Resolve a relative storage path, checking if it's allowed by the backend.
-        * This is intended for internal use, such as encoding illegal chars or perhaps
-        * getting absolute paths (e.g. FS based backends). Note that the relative path
-        * may be the empty string (e.g. the path is simply to the container).
-        *
-        * @param string $container Container name
-        * @param string $relStoragePath Storage path relative to the container
-        * @return string|null Path or null if not valid
-        */
-       protected function resolveContainerPath( $container, $relStoragePath ) {
-               return $relStoragePath;
-       }
-
-       /**
-        * Get the cache key for a container
-        *
-        * @param string $container Resolved container name
-        * @return string
-        */
-       private function containerCacheKey( $container ) {
-               return "filebackend:{$this->name}:{$this->wikiId}:container:{$container}";
-       }
-
-       /**
-        * Set the cached info for a container
-        *
-        * @param string $container Resolved container name
-        * @param array $val Information to cache
-        */
-       final protected function setContainerCache( $container, array $val ) {
-               $this->memCache->set( $this->containerCacheKey( $container ), $val, 14 * 86400 );
-       }
-
-       /**
-        * Delete the cached info for a container.
-        * The cache key is salted for a while to prevent race conditions.
-        *
-        * @param string $container Resolved container name
-        */
-       final protected function deleteContainerCache( $container ) {
-               if ( !$this->memCache->delete( $this->containerCacheKey( $container ), 300 ) ) {
-                       trigger_error( "Unable to delete stat cache for container $container." );
-               }
-       }
-
-       /**
-        * Do a batch lookup from cache for container stats for all containers
-        * used in a list of container names or storage paths objects.
-        * This loads the persistent cache values into the process cache.
-        *
-        * @param array $items
-        */
-       final protected function primeContainerCache( array $items ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-
-               $paths = []; // list of storage paths
-               $contNames = []; // (cache key => resolved container name)
-               // Get all the paths/containers from the items...
-               foreach ( $items as $item ) {
-                       if ( self::isStoragePath( $item ) ) {
-                               $paths[] = $item;
-                       } elseif ( is_string( $item ) ) { // full container name
-                               $contNames[$this->containerCacheKey( $item )] = $item;
-                       }
-               }
-               // Get all the corresponding cache keys for paths...
-               foreach ( $paths as $path ) {
-                       list( $fullCont, , ) = $this->resolveStoragePath( $path );
-                       if ( $fullCont !== null ) { // valid path for this backend
-                               $contNames[$this->containerCacheKey( $fullCont )] = $fullCont;
-                       }
-               }
-
-               $contInfo = []; // (resolved container name => cache value)
-               // Get all cache entries for these container cache keys...
-               $values = $this->memCache->getMulti( array_keys( $contNames ) );
-               foreach ( $values as $cacheKey => $val ) {
-                       $contInfo[$contNames[$cacheKey]] = $val;
-               }
-
-               // Populate the container process cache for the backend...
-               $this->doPrimeContainerCache( array_filter( $contInfo, 'is_array' ) );
-       }
-
-       /**
-        * Fill the backend-specific process cache given an array of
-        * resolved container names and their corresponding cached info.
-        * Only containers that actually exist should appear in the map.
-        *
-        * @param array $containerInfo Map of resolved container names to cached info
-        */
-       protected function doPrimeContainerCache( array $containerInfo ) {
-       }
-
-       /**
-        * Get the cache key for a file path
-        *
-        * @param string $path Normalized storage path
-        * @return string
-        */
-       private function fileCacheKey( $path ) {
-               return "filebackend:{$this->name}:{$this->wikiId}:file:" . sha1( $path );
-       }
-
-       /**
-        * Set the cached stat info for a file path.
-        * Negatives (404s) are not cached. By not caching negatives, we can skip cache
-        * salting for the case when a file is created at a path were there was none before.
-        *
-        * @param string $path Storage path
-        * @param array $val Stat information to cache
-        */
-       final protected function setFileCache( $path, array $val ) {
-               $path = FileBackend::normalizeStoragePath( $path );
-               if ( $path === null ) {
-                       return; // invalid storage path
-               }
-               $mtime = wfTimestamp( TS_UNIX, $val['mtime'] );
-               $ttl = $this->memCache->adaptiveTTL( $mtime, 7 * 86400, 300, .1 );
-               $key = $this->fileCacheKey( $path );
-               // Set the cache unless it is currently salted.
-               $this->memCache->set( $key, $val, $ttl );
-       }
-
-       /**
-        * Delete the cached stat info for a file path.
-        * The cache key is salted for a while to prevent race conditions.
-        * Since negatives (404s) are not cached, this does not need to be called when
-        * a file is created at a path were there was none before.
-        *
-        * @param string $path Storage path
-        */
-       final protected function deleteFileCache( $path ) {
-               $path = FileBackend::normalizeStoragePath( $path );
-               if ( $path === null ) {
-                       return; // invalid storage path
-               }
-               if ( !$this->memCache->delete( $this->fileCacheKey( $path ), 300 ) ) {
-                       trigger_error( "Unable to delete stat cache for file $path." );
-               }
-       }
-
-       /**
-        * Do a batch lookup from cache for file stats for all paths
-        * used in a list of storage paths or FileOp objects.
-        * This loads the persistent cache values into the process cache.
-        *
-        * @param array $items List of storage paths
-        */
-       final protected function primeFileCache( array $items ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-
-               $paths = []; // list of storage paths
-               $pathNames = []; // (cache key => storage path)
-               // Get all the paths/containers from the items...
-               foreach ( $items as $item ) {
-                       if ( self::isStoragePath( $item ) ) {
-                               $paths[] = FileBackend::normalizeStoragePath( $item );
-                       }
-               }
-               // Get rid of any paths that failed normalization...
-               $paths = array_filter( $paths, 'strlen' ); // remove nulls
-               // Get all the corresponding cache keys for paths...
-               foreach ( $paths as $path ) {
-                       list( , $rel, ) = $this->resolveStoragePath( $path );
-                       if ( $rel !== null ) { // valid path for this backend
-                               $pathNames[$this->fileCacheKey( $path )] = $path;
-                       }
-               }
-               // Get all cache entries for these file cache keys...
-               $values = $this->memCache->getMulti( array_keys( $pathNames ) );
-               foreach ( $values as $cacheKey => $val ) {
-                       $path = $pathNames[$cacheKey];
-                       if ( is_array( $val ) ) {
-                               $val['latest'] = false; // never completely trust cache
-                               $this->cheapCache->set( $path, 'stat', $val );
-                               if ( isset( $val['sha1'] ) ) { // some backends store SHA-1 as metadata
-                                       $this->cheapCache->set( $path, 'sha1',
-                                               [ 'hash' => $val['sha1'], 'latest' => false ] );
-                               }
-                               if ( isset( $val['xattr'] ) ) { // some backends store headers/metadata
-                                       $val['xattr'] = self::normalizeXAttributes( $val['xattr'] );
-                                       $this->cheapCache->set( $path, 'xattr',
-                                               [ 'map' => $val['xattr'], 'latest' => false ] );
-                               }
-                       }
-               }
-       }
-
-       /**
-        * Normalize file headers/metadata to the FileBackend::getFileXAttributes() format
-        *
-        * @param array $xattr
-        * @return array
-        * @since 1.22
-        */
-       final protected static function normalizeXAttributes( array $xattr ) {
-               $newXAttr = [ 'headers' => [], 'metadata' => [] ];
-
-               foreach ( $xattr['headers'] as $name => $value ) {
-                       $newXAttr['headers'][strtolower( $name )] = $value;
-               }
-
-               foreach ( $xattr['metadata'] as $name => $value ) {
-                       $newXAttr['metadata'][strtolower( $name )] = $value;
-               }
-
-               return $newXAttr;
-       }
-
-       /**
-        * Set the 'concurrency' option from a list of operation options
-        *
-        * @param array $opts Map of operation options
-        * @return array
-        */
-       final protected function setConcurrencyFlags( array $opts ) {
-               $opts['concurrency'] = 1; // off
-               if ( $this->parallelize === 'implicit' ) {
-                       if ( !isset( $opts['parallelize'] ) || $opts['parallelize'] ) {
-                               $opts['concurrency'] = $this->concurrency;
-                       }
-               } elseif ( $this->parallelize === 'explicit' ) {
-                       if ( !empty( $opts['parallelize'] ) ) {
-                               $opts['concurrency'] = $this->concurrency;
-                       }
-               }
-
-               return $opts;
-       }
-
-       /**
-        * Get the content type to use in HEAD/GET requests for a file
-        *
-        * @param string $storagePath
-        * @param string|null $content File data
-        * @param string|null $fsPath File system path
-        * @return string MIME type
-        */
-       protected function getContentType( $storagePath, $content, $fsPath ) {
-               if ( $this->mimeCallback ) {
-                       return call_user_func_array( $this->mimeCallback, func_get_args() );
-               }
-
-               $mime = null;
-               if ( $fsPath !== null && function_exists( 'finfo_file' ) ) {
-                       $finfo = finfo_open( FILEINFO_MIME_TYPE );
-                       $mime = finfo_file( $finfo, $fsPath );
-                       finfo_close( $finfo );
-               }
-
-               return is_string( $mime ) ? $mime : 'unknown/unknown';
-       }
-}
-
-/**
- * FileBackendStore helper class for performing asynchronous file operations.
- *
- * For example, calling FileBackendStore::createInternal() with the "async"
- * param flag may result in a Status that contains this object as a value.
- * This class is largely backend-specific and is mostly just "magic" to be
- * passed to FileBackendStore::executeOpHandlesInternal().
- */
-abstract class FileBackendStoreOpHandle {
-       /** @var array */
-       public $params = []; // params to caller functions
-       /** @var FileBackendStore */
-       public $backend;
-       /** @var array */
-       public $resourcesToClose = [];
-
-       public $call; // string; name that identifies the function called
-
-       /**
-        * Close all open file handles
-        */
-       public function closeResources() {
-               array_map( 'fclose', $this->resourcesToClose );
-       }
-}
-
-/**
- * FileBackendStore helper function to handle listings that span container shards.
- * Do not use this class from places outside of FileBackendStore.
- *
- * @ingroup FileBackend
- */
-abstract class FileBackendStoreShardListIterator extends FilterIterator {
-       /** @var FileBackendStore */
-       protected $backend;
-
-       /** @var array */
-       protected $params;
-
-       /** @var string Full container name */
-       protected $container;
-
-       /** @var string Resolved relative path */
-       protected $directory;
-
-       /** @var array */
-       protected $multiShardPaths = []; // (rel path => 1)
-
-       /**
-        * @param FileBackendStore $backend
-        * @param string $container Full storage container name
-        * @param string $dir Storage directory relative to container
-        * @param array $suffixes List of container shard suffixes
-        * @param array $params
-        */
-       public function __construct(
-               FileBackendStore $backend, $container, $dir, array $suffixes, array $params
-       ) {
-               $this->backend = $backend;
-               $this->container = $container;
-               $this->directory = $dir;
-               $this->params = $params;
-
-               $iter = new AppendIterator();
-               foreach ( $suffixes as $suffix ) {
-                       $iter->append( $this->listFromShard( $this->container . $suffix ) );
-               }
-
-               parent::__construct( $iter );
-       }
-
-       public function accept() {
-               $rel = $this->getInnerIterator()->current(); // path relative to given directory
-               $path = $this->params['dir'] . "/{$rel}"; // full storage path
-               if ( $this->backend->isSingleShardPathInternal( $path ) ) {
-                       return true; // path is only on one shard; no issue with duplicates
-               } elseif ( isset( $this->multiShardPaths[$rel] ) ) {
-                       // Don't keep listing paths that are on multiple shards
-                       return false;
-               } else {
-                       $this->multiShardPaths[$rel] = 1;
-
-                       return true;
-               }
-       }
-
-       public function rewind() {
-               parent::rewind();
-               $this->multiShardPaths = [];
-       }
-
-       /**
-        * Get the list for a given container shard
-        *
-        * @param string $container Resolved container name
-        * @return Iterator
-        */
-       abstract protected function listFromShard( $container );
-}
-
-/**
- * Iterator for listing directories
- */
-class FileBackendStoreShardDirIterator extends FileBackendStoreShardListIterator {
-       protected function listFromShard( $container ) {
-               $list = $this->backend->getDirectoryListInternal(
-                       $container, $this->directory, $this->params );
-               if ( $list === null ) {
-                       return new ArrayIterator( [] );
-               } else {
-                       return is_array( $list ) ? new ArrayIterator( $list ) : $list;
-               }
-       }
-}
-
-/**
- * Iterator for listing regular files
- */
-class FileBackendStoreShardFileIterator extends FileBackendStoreShardListIterator {
-       protected function listFromShard( $container ) {
-               $list = $this->backend->getFileListInternal(
-                       $container, $this->directory, $this->params );
-               if ( $list === null ) {
-                       return new ArrayIterator( [] );
-               } else {
-                       return is_array( $list ) ? new ArrayIterator( $list ) : $list;
-               }
-       }
-}
diff --git a/includes/filebackend/FileOp.php b/includes/filebackend/FileOp.php
deleted file mode 100644 (file)
index 56a4073..0000000
+++ /dev/null
@@ -1,848 +0,0 @@
-<?php
-/**
- * Helper class for representing operations with transaction support.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileBackend
- * @author Aaron Schulz
- */
-
-/**
- * FileBackend helper class for representing operations.
- * Do not use this class from places outside FileBackend.
- *
- * Methods called from FileOpBatch::attempt() should avoid throwing
- * exceptions at all costs. FileOp objects should be lightweight in order
- * to support large arrays in memory and serialization.
- *
- * @ingroup FileBackend
- * @since 1.19
- */
-abstract class FileOp {
-       /** @var array */
-       protected $params = [];
-
-       /** @var FileBackendStore */
-       protected $backend;
-
-       /** @var int */
-       protected $state = self::STATE_NEW;
-
-       /** @var bool */
-       protected $failed = false;
-
-       /** @var bool */
-       protected $async = false;
-
-       /** @var string */
-       protected $batchId;
-
-       /** @var bool Operation is not a no-op */
-       protected $doOperation = true;
-
-       /** @var string */
-       protected $sourceSha1;
-
-       /** @var bool */
-       protected $overwriteSameCase;
-
-       /** @var bool */
-       protected $destExists;
-
-       /* Object life-cycle */
-       const STATE_NEW = 1;
-       const STATE_CHECKED = 2;
-       const STATE_ATTEMPTED = 3;
-
-       /**
-        * Build a new batch file operation transaction
-        *
-        * @param FileBackendStore $backend
-        * @param array $params
-        * @throws FileBackendError
-        */
-       final public function __construct( FileBackendStore $backend, array $params ) {
-               $this->backend = $backend;
-               list( $required, $optional, $paths ) = $this->allowedParams();
-               foreach ( $required as $name ) {
-                       if ( isset( $params[$name] ) ) {
-                               $this->params[$name] = $params[$name];
-                       } else {
-                               throw new FileBackendError( "File operation missing parameter '$name'." );
-                       }
-               }
-               foreach ( $optional as $name ) {
-                       if ( isset( $params[$name] ) ) {
-                               $this->params[$name] = $params[$name];
-                       }
-               }
-               foreach ( $paths as $name ) {
-                       if ( isset( $this->params[$name] ) ) {
-                               // Normalize paths so the paths to the same file have the same string
-                               $this->params[$name] = self::normalizeIfValidStoragePath( $this->params[$name] );
-                       }
-               }
-       }
-
-       /**
-        * Normalize a string if it is a valid storage path
-        *
-        * @param string $path
-        * @return string
-        */
-       protected static function normalizeIfValidStoragePath( $path ) {
-               if ( FileBackend::isStoragePath( $path ) ) {
-                       $res = FileBackend::normalizeStoragePath( $path );
-
-                       return ( $res !== null ) ? $res : $path;
-               }
-
-               return $path;
-       }
-
-       /**
-        * Set the batch UUID this operation belongs to
-        *
-        * @param string $batchId
-        */
-       final public function setBatchId( $batchId ) {
-               $this->batchId = $batchId;
-       }
-
-       /**
-        * Get the value of the parameter with the given name
-        *
-        * @param string $name
-        * @return mixed Returns null if the parameter is not set
-        */
-       final public function getParam( $name ) {
-               return isset( $this->params[$name] ) ? $this->params[$name] : null;
-       }
-
-       /**
-        * Check if this operation failed precheck() or attempt()
-        *
-        * @return bool
-        */
-       final public function failed() {
-               return $this->failed;
-       }
-
-       /**
-        * Get a new empty predicates array for precheck()
-        *
-        * @return array
-        */
-       final public static function newPredicates() {
-               return [ 'exists' => [], 'sha1' => [] ];
-       }
-
-       /**
-        * Get a new empty dependency tracking array for paths read/written to
-        *
-        * @return array
-        */
-       final public static function newDependencies() {
-               return [ 'read' => [], 'write' => [] ];
-       }
-
-       /**
-        * Update a dependency tracking array to account for this operation
-        *
-        * @param array $deps Prior path reads/writes; format of FileOp::newPredicates()
-        * @return array
-        */
-       final public function applyDependencies( array $deps ) {
-               $deps['read'] += array_fill_keys( $this->storagePathsRead(), 1 );
-               $deps['write'] += array_fill_keys( $this->storagePathsChanged(), 1 );
-
-               return $deps;
-       }
-
-       /**
-        * Check if this operation changes files listed in $paths
-        *
-        * @param array $deps Prior path reads/writes; format of FileOp::newPredicates()
-        * @return bool
-        */
-       final public function dependsOn( array $deps ) {
-               foreach ( $this->storagePathsChanged() as $path ) {
-                       if ( isset( $deps['read'][$path] ) || isset( $deps['write'][$path] ) ) {
-                               return true; // "output" or "anti" dependency
-                       }
-               }
-               foreach ( $this->storagePathsRead() as $path ) {
-                       if ( isset( $deps['write'][$path] ) ) {
-                               return true; // "flow" dependency
-                       }
-               }
-
-               return false;
-       }
-
-       /**
-        * Get the file journal entries for this file operation
-        *
-        * @param array $oPredicates Pre-op info about files (format of FileOp::newPredicates)
-        * @param array $nPredicates Post-op info about files (format of FileOp::newPredicates)
-        * @return array
-        */
-       final public function getJournalEntries( array $oPredicates, array $nPredicates ) {
-               if ( !$this->doOperation ) {
-                       return []; // this is a no-op
-               }
-               $nullEntries = [];
-               $updateEntries = [];
-               $deleteEntries = [];
-               $pathsUsed = array_merge( $this->storagePathsRead(), $this->storagePathsChanged() );
-               foreach ( array_unique( $pathsUsed ) as $path ) {
-                       $nullEntries[] = [ // assertion for recovery
-                               'op' => 'null',
-                               'path' => $path,
-                               'newSha1' => $this->fileSha1( $path, $oPredicates )
-                       ];
-               }
-               foreach ( $this->storagePathsChanged() as $path ) {
-                       if ( $nPredicates['sha1'][$path] === false ) { // deleted
-                               $deleteEntries[] = [
-                                       'op' => 'delete',
-                                       'path' => $path,
-                                       'newSha1' => ''
-                               ];
-                       } else { // created/updated
-                               $updateEntries[] = [
-                                       'op' => $this->fileExists( $path, $oPredicates ) ? 'update' : 'create',
-                                       'path' => $path,
-                                       'newSha1' => $nPredicates['sha1'][$path]
-                               ];
-                       }
-               }
-
-               return array_merge( $nullEntries, $updateEntries, $deleteEntries );
-       }
-
-       /**
-        * Check preconditions of the operation without writing anything.
-        * This must update $predicates for each path that the op can change
-        * except when a failing status object is returned.
-        *
-        * @param array $predicates
-        * @return Status
-        */
-       final public function precheck( array &$predicates ) {
-               if ( $this->state !== self::STATE_NEW ) {
-                       return Status::newFatal( 'fileop-fail-state', self::STATE_NEW, $this->state );
-               }
-               $this->state = self::STATE_CHECKED;
-               $status = $this->doPrecheck( $predicates );
-               if ( !$status->isOK() ) {
-                       $this->failed = true;
-               }
-
-               return $status;
-       }
-
-       /**
-        * @param array $predicates
-        * @return Status
-        */
-       protected function doPrecheck( array &$predicates ) {
-               return Status::newGood();
-       }
-
-       /**
-        * Attempt the operation
-        *
-        * @return Status
-        */
-       final public function attempt() {
-               if ( $this->state !== self::STATE_CHECKED ) {
-                       return Status::newFatal( 'fileop-fail-state', self::STATE_CHECKED, $this->state );
-               } elseif ( $this->failed ) { // failed precheck
-                       return Status::newFatal( 'fileop-fail-attempt-precheck' );
-               }
-               $this->state = self::STATE_ATTEMPTED;
-               if ( $this->doOperation ) {
-                       $status = $this->doAttempt();
-                       if ( !$status->isOK() ) {
-                               $this->failed = true;
-                               $this->logFailure( 'attempt' );
-                       }
-               } else { // no-op
-                       $status = Status::newGood();
-               }
-
-               return $status;
-       }
-
-       /**
-        * @return Status
-        */
-       protected function doAttempt() {
-               return Status::newGood();
-       }
-
-       /**
-        * Attempt the operation in the background
-        *
-        * @return Status
-        */
-       final public function attemptAsync() {
-               $this->async = true;
-               $result = $this->attempt();
-               $this->async = false;
-
-               return $result;
-       }
-
-       /**
-        * Get the file operation parameters
-        *
-        * @return array (required params list, optional params list, list of params that are paths)
-        */
-       protected function allowedParams() {
-               return [ [], [], [] ];
-       }
-
-       /**
-        * Adjust params to FileBackendStore internal file calls
-        *
-        * @param array $params
-        * @return array (required params list, optional params list)
-        */
-       protected function setFlags( array $params ) {
-               return [ 'async' => $this->async ] + $params;
-       }
-
-       /**
-        * Get a list of storage paths read from for this operation
-        *
-        * @return array
-        */
-       public function storagePathsRead() {
-               return [];
-       }
-
-       /**
-        * Get a list of storage paths written to for this operation
-        *
-        * @return array
-        */
-       public function storagePathsChanged() {
-               return [];
-       }
-
-       /**
-        * Check for errors with regards to the destination file already existing.
-        * Also set the destExists, overwriteSameCase and sourceSha1 member variables.
-        * A bad status will be returned if there is no chance it can be overwritten.
-        *
-        * @param array $predicates
-        * @return Status
-        */
-       protected function precheckDestExistence( array $predicates ) {
-               $status = Status::newGood();
-               // Get hash of source file/string and the destination file
-               $this->sourceSha1 = $this->getSourceSha1Base36(); // FS file or data string
-               if ( $this->sourceSha1 === null ) { // file in storage?
-                       $this->sourceSha1 = $this->fileSha1( $this->params['src'], $predicates );
-               }
-               $this->overwriteSameCase = false;
-               $this->destExists = $this->fileExists( $this->params['dst'], $predicates );
-               if ( $this->destExists ) {
-                       if ( $this->getParam( 'overwrite' ) ) {
-                               return $status; // OK
-                       } elseif ( $this->getParam( 'overwriteSame' ) ) {
-                               $dhash = $this->fileSha1( $this->params['dst'], $predicates );
-                               // Check if hashes are valid and match each other...
-                               if ( !strlen( $this->sourceSha1 ) || !strlen( $dhash ) ) {
-                                       $status->fatal( 'backend-fail-hashes' );
-                               } elseif ( $this->sourceSha1 !== $dhash ) {
-                                       // Give an error if the files are not identical
-                                       $status->fatal( 'backend-fail-notsame', $this->params['dst'] );
-                               } else {
-                                       $this->overwriteSameCase = true; // OK
-                               }
-
-                               return $status; // do nothing; either OK or bad status
-                       } else {
-                               $status->fatal( 'backend-fail-alreadyexists', $this->params['dst'] );
-
-                               return $status;
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * precheckDestExistence() helper function to get the source file SHA-1.
-        * Subclasses should overwride this if the source is not in storage.
-        *
-        * @return string|bool Returns false on failure
-        */
-       protected function getSourceSha1Base36() {
-               return null; // N/A
-       }
-
-       /**
-        * Check if a file will exist in storage when this operation is attempted
-        *
-        * @param string $source Storage path
-        * @param array $predicates
-        * @return bool
-        */
-       final protected function fileExists( $source, array $predicates ) {
-               if ( isset( $predicates['exists'][$source] ) ) {
-                       return $predicates['exists'][$source]; // previous op assures this
-               } else {
-                       $params = [ 'src' => $source, 'latest' => true ];
-
-                       return $this->backend->fileExists( $params );
-               }
-       }
-
-       /**
-        * Get the SHA-1 of a file in storage when this operation is attempted
-        *
-        * @param string $source Storage path
-        * @param array $predicates
-        * @return string|bool False on failure
-        */
-       final protected function fileSha1( $source, array $predicates ) {
-               if ( isset( $predicates['sha1'][$source] ) ) {
-                       return $predicates['sha1'][$source]; // previous op assures this
-               } elseif ( isset( $predicates['exists'][$source] ) && !$predicates['exists'][$source] ) {
-                       return false; // previous op assures this
-               } else {
-                       $params = [ 'src' => $source, 'latest' => true ];
-
-                       return $this->backend->getFileSha1Base36( $params );
-               }
-       }
-
-       /**
-        * Get the backend this operation is for
-        *
-        * @return FileBackendStore
-        */
-       public function getBackend() {
-               return $this->backend;
-       }
-
-       /**
-        * Log a file operation failure and preserve any temp files
-        *
-        * @param string $action
-        */
-       final public function logFailure( $action ) {
-               $params = $this->params;
-               $params['failedAction'] = $action;
-               try {
-                       wfDebugLog( 'FileOperation', get_class( $this ) .
-                               " failed (batch #{$this->batchId}): " . FormatJson::encode( $params ) );
-               } catch ( Exception $e ) {
-                       // bad config? debug log error?
-               }
-       }
-}
-
-/**
- * Create a file in the backend with the given content.
- * Parameters for this operation are outlined in FileBackend::doOperations().
- */
-class CreateFileOp extends FileOp {
-       protected function allowedParams() {
-               return [
-                       [ 'content', 'dst' ],
-                       [ 'overwrite', 'overwriteSame', 'headers' ],
-                       [ 'dst' ]
-               ];
-       }
-
-       protected function doPrecheck( array &$predicates ) {
-               $status = Status::newGood();
-               // Check if the source data is too big
-               if ( strlen( $this->getParam( 'content' ) ) > $this->backend->maxFileSizeInternal() ) {
-                       $status->fatal( 'backend-fail-maxsize',
-                               $this->params['dst'], $this->backend->maxFileSizeInternal() );
-                       $status->fatal( 'backend-fail-create', $this->params['dst'] );
-
-                       return $status;
-               // Check if a file can be placed/changed at the destination
-               } elseif ( !$this->backend->isPathUsableInternal( $this->params['dst'] ) ) {
-                       $status->fatal( 'backend-fail-usable', $this->params['dst'] );
-                       $status->fatal( 'backend-fail-create', $this->params['dst'] );
-
-                       return $status;
-               }
-               // Check if destination file exists
-               $status->merge( $this->precheckDestExistence( $predicates ) );
-               $this->params['dstExists'] = $this->destExists; // see FileBackendStore::setFileCache()
-               if ( $status->isOK() ) {
-                       // Update file existence predicates
-                       $predicates['exists'][$this->params['dst']] = true;
-                       $predicates['sha1'][$this->params['dst']] = $this->sourceSha1;
-               }
-
-               return $status; // safe to call attempt()
-       }
-
-       protected function doAttempt() {
-               if ( !$this->overwriteSameCase ) {
-                       // Create the file at the destination
-                       return $this->backend->createInternal( $this->setFlags( $this->params ) );
-               }
-
-               return Status::newGood();
-       }
-
-       protected function getSourceSha1Base36() {
-               return Wikimedia\base_convert( sha1( $this->params['content'] ), 16, 36, 31 );
-       }
-
-       public function storagePathsChanged() {
-               return [ $this->params['dst'] ];
-       }
-}
-
-/**
- * Store a file into the backend from a file on the file system.
- * Parameters for this operation are outlined in FileBackend::doOperations().
- */
-class StoreFileOp extends FileOp {
-       protected function allowedParams() {
-               return [
-                       [ 'src', 'dst' ],
-                       [ 'overwrite', 'overwriteSame', 'headers' ],
-                       [ 'src', 'dst' ]
-               ];
-       }
-
-       protected function doPrecheck( array &$predicates ) {
-               $status = Status::newGood();
-               // Check if the source file exists on the file system
-               if ( !is_file( $this->params['src'] ) ) {
-                       $status->fatal( 'backend-fail-notexists', $this->params['src'] );
-
-                       return $status;
-               // Check if the source file is too big
-               } elseif ( filesize( $this->params['src'] ) > $this->backend->maxFileSizeInternal() ) {
-                       $status->fatal( 'backend-fail-maxsize',
-                               $this->params['dst'], $this->backend->maxFileSizeInternal() );
-                       $status->fatal( 'backend-fail-store', $this->params['src'], $this->params['dst'] );
-
-                       return $status;
-               // Check if a file can be placed/changed at the destination
-               } elseif ( !$this->backend->isPathUsableInternal( $this->params['dst'] ) ) {
-                       $status->fatal( 'backend-fail-usable', $this->params['dst'] );
-                       $status->fatal( 'backend-fail-store', $this->params['src'], $this->params['dst'] );
-
-                       return $status;
-               }
-               // Check if destination file exists
-               $status->merge( $this->precheckDestExistence( $predicates ) );
-               $this->params['dstExists'] = $this->destExists; // see FileBackendStore::setFileCache()
-               if ( $status->isOK() ) {
-                       // Update file existence predicates
-                       $predicates['exists'][$this->params['dst']] = true;
-                       $predicates['sha1'][$this->params['dst']] = $this->sourceSha1;
-               }
-
-               return $status; // safe to call attempt()
-       }
-
-       protected function doAttempt() {
-               if ( !$this->overwriteSameCase ) {
-                       // Store the file at the destination
-                       return $this->backend->storeInternal( $this->setFlags( $this->params ) );
-               }
-
-               return Status::newGood();
-       }
-
-       protected function getSourceSha1Base36() {
-               MediaWiki\suppressWarnings();
-               $hash = sha1_file( $this->params['src'] );
-               MediaWiki\restoreWarnings();
-               if ( $hash !== false ) {
-                       $hash = Wikimedia\base_convert( $hash, 16, 36, 31 );
-               }
-
-               return $hash;
-       }
-
-       public function storagePathsChanged() {
-               return [ $this->params['dst'] ];
-       }
-}
-
-/**
- * Copy a file from one storage path to another in the backend.
- * Parameters for this operation are outlined in FileBackend::doOperations().
- */
-class CopyFileOp extends FileOp {
-       protected function allowedParams() {
-               return [
-                       [ 'src', 'dst' ],
-                       [ 'overwrite', 'overwriteSame', 'ignoreMissingSource', 'headers' ],
-                       [ 'src', 'dst' ]
-               ];
-       }
-
-       protected function doPrecheck( array &$predicates ) {
-               $status = Status::newGood();
-               // Check if the source file exists
-               if ( !$this->fileExists( $this->params['src'], $predicates ) ) {
-                       if ( $this->getParam( 'ignoreMissingSource' ) ) {
-                               $this->doOperation = false; // no-op
-                               // Update file existence predicates (cache 404s)
-                               $predicates['exists'][$this->params['src']] = false;
-                               $predicates['sha1'][$this->params['src']] = false;
-
-                               return $status; // nothing to do
-                       } else {
-                               $status->fatal( 'backend-fail-notexists', $this->params['src'] );
-
-                               return $status;
-                       }
-                       // Check if a file can be placed/changed at the destination
-               } elseif ( !$this->backend->isPathUsableInternal( $this->params['dst'] ) ) {
-                       $status->fatal( 'backend-fail-usable', $this->params['dst'] );
-                       $status->fatal( 'backend-fail-copy', $this->params['src'], $this->params['dst'] );
-
-                       return $status;
-               }
-               // Check if destination file exists
-               $status->merge( $this->precheckDestExistence( $predicates ) );
-               $this->params['dstExists'] = $this->destExists; // see FileBackendStore::setFileCache()
-               if ( $status->isOK() ) {
-                       // Update file existence predicates
-                       $predicates['exists'][$this->params['dst']] = true;
-                       $predicates['sha1'][$this->params['dst']] = $this->sourceSha1;
-               }
-
-               return $status; // safe to call attempt()
-       }
-
-       protected function doAttempt() {
-               if ( $this->overwriteSameCase ) {
-                       $status = Status::newGood(); // nothing to do
-               } elseif ( $this->params['src'] === $this->params['dst'] ) {
-                       // Just update the destination file headers
-                       $headers = $this->getParam( 'headers' ) ?: [];
-                       $status = $this->backend->describeInternal( $this->setFlags( [
-                               'src' => $this->params['dst'], 'headers' => $headers
-                       ] ) );
-               } else {
-                       // Copy the file to the destination
-                       $status = $this->backend->copyInternal( $this->setFlags( $this->params ) );
-               }
-
-               return $status;
-       }
-
-       public function storagePathsRead() {
-               return [ $this->params['src'] ];
-       }
-
-       public function storagePathsChanged() {
-               return [ $this->params['dst'] ];
-       }
-}
-
-/**
- * Move a file from one storage path to another in the backend.
- * Parameters for this operation are outlined in FileBackend::doOperations().
- */
-class MoveFileOp extends FileOp {
-       protected function allowedParams() {
-               return [
-                       [ 'src', 'dst' ],
-                       [ 'overwrite', 'overwriteSame', 'ignoreMissingSource', 'headers' ],
-                       [ 'src', 'dst' ]
-               ];
-       }
-
-       protected function doPrecheck( array &$predicates ) {
-               $status = Status::newGood();
-               // Check if the source file exists
-               if ( !$this->fileExists( $this->params['src'], $predicates ) ) {
-                       if ( $this->getParam( 'ignoreMissingSource' ) ) {
-                               $this->doOperation = false; // no-op
-                               // Update file existence predicates (cache 404s)
-                               $predicates['exists'][$this->params['src']] = false;
-                               $predicates['sha1'][$this->params['src']] = false;
-
-                               return $status; // nothing to do
-                       } else {
-                               $status->fatal( 'backend-fail-notexists', $this->params['src'] );
-
-                               return $status;
-                       }
-               // Check if a file can be placed/changed at the destination
-               } elseif ( !$this->backend->isPathUsableInternal( $this->params['dst'] ) ) {
-                       $status->fatal( 'backend-fail-usable', $this->params['dst'] );
-                       $status->fatal( 'backend-fail-move', $this->params['src'], $this->params['dst'] );
-
-                       return $status;
-               }
-               // Check if destination file exists
-               $status->merge( $this->precheckDestExistence( $predicates ) );
-               $this->params['dstExists'] = $this->destExists; // see FileBackendStore::setFileCache()
-               if ( $status->isOK() ) {
-                       // Update file existence predicates
-                       $predicates['exists'][$this->params['src']] = false;
-                       $predicates['sha1'][$this->params['src']] = false;
-                       $predicates['exists'][$this->params['dst']] = true;
-                       $predicates['sha1'][$this->params['dst']] = $this->sourceSha1;
-               }
-
-               return $status; // safe to call attempt()
-       }
-
-       protected function doAttempt() {
-               if ( $this->overwriteSameCase ) {
-                       if ( $this->params['src'] === $this->params['dst'] ) {
-                               // Do nothing to the destination (which is also the source)
-                               $status = Status::newGood();
-                       } else {
-                               // Just delete the source as the destination file needs no changes
-                               $status = $this->backend->deleteInternal( $this->setFlags(
-                                       [ 'src' => $this->params['src'] ]
-                               ) );
-                       }
-               } elseif ( $this->params['src'] === $this->params['dst'] ) {
-                       // Just update the destination file headers
-                       $headers = $this->getParam( 'headers' ) ?: [];
-                       $status = $this->backend->describeInternal( $this->setFlags(
-                               [ 'src' => $this->params['dst'], 'headers' => $headers ]
-                       ) );
-               } else {
-                       // Move the file to the destination
-                       $status = $this->backend->moveInternal( $this->setFlags( $this->params ) );
-               }
-
-               return $status;
-       }
-
-       public function storagePathsRead() {
-               return [ $this->params['src'] ];
-       }
-
-       public function storagePathsChanged() {
-               return [ $this->params['src'], $this->params['dst'] ];
-       }
-}
-
-/**
- * Delete a file at the given storage path from the backend.
- * Parameters for this operation are outlined in FileBackend::doOperations().
- */
-class DeleteFileOp extends FileOp {
-       protected function allowedParams() {
-               return [ [ 'src' ], [ 'ignoreMissingSource' ], [ 'src' ] ];
-       }
-
-       protected function doPrecheck( array &$predicates ) {
-               $status = Status::newGood();
-               // Check if the source file exists
-               if ( !$this->fileExists( $this->params['src'], $predicates ) ) {
-                       if ( $this->getParam( 'ignoreMissingSource' ) ) {
-                               $this->doOperation = false; // no-op
-                               // Update file existence predicates (cache 404s)
-                               $predicates['exists'][$this->params['src']] = false;
-                               $predicates['sha1'][$this->params['src']] = false;
-
-                               return $status; // nothing to do
-                       } else {
-                               $status->fatal( 'backend-fail-notexists', $this->params['src'] );
-
-                               return $status;
-                       }
-               // Check if a file can be placed/changed at the source
-               } elseif ( !$this->backend->isPathUsableInternal( $this->params['src'] ) ) {
-                       $status->fatal( 'backend-fail-usable', $this->params['src'] );
-                       $status->fatal( 'backend-fail-delete', $this->params['src'] );
-
-                       return $status;
-               }
-               // Update file existence predicates
-               $predicates['exists'][$this->params['src']] = false;
-               $predicates['sha1'][$this->params['src']] = false;
-
-               return $status; // safe to call attempt()
-       }
-
-       protected function doAttempt() {
-               // Delete the source file
-               return $this->backend->deleteInternal( $this->setFlags( $this->params ) );
-       }
-
-       public function storagePathsChanged() {
-               return [ $this->params['src'] ];
-       }
-}
-
-/**
- * Change metadata for a file at the given storage path in the backend.
- * Parameters for this operation are outlined in FileBackend::doOperations().
- */
-class DescribeFileOp extends FileOp {
-       protected function allowedParams() {
-               return [ [ 'src' ], [ 'headers' ], [ 'src' ] ];
-       }
-
-       protected function doPrecheck( array &$predicates ) {
-               $status = Status::newGood();
-               // Check if the source file exists
-               if ( !$this->fileExists( $this->params['src'], $predicates ) ) {
-                       $status->fatal( 'backend-fail-notexists', $this->params['src'] );
-
-                       return $status;
-               // Check if a file can be placed/changed at the source
-               } elseif ( !$this->backend->isPathUsableInternal( $this->params['src'] ) ) {
-                       $status->fatal( 'backend-fail-usable', $this->params['src'] );
-                       $status->fatal( 'backend-fail-describe', $this->params['src'] );
-
-                       return $status;
-               }
-               // Update file existence predicates
-               $predicates['exists'][$this->params['src']] =
-                       $this->fileExists( $this->params['src'], $predicates );
-               $predicates['sha1'][$this->params['src']] =
-                       $this->fileSha1( $this->params['src'], $predicates );
-
-               return $status; // safe to call attempt()
-       }
-
-       protected function doAttempt() {
-               // Update the source file's metadata
-               return $this->backend->describeInternal( $this->setFlags( $this->params ) );
-       }
-
-       public function storagePathsChanged() {
-               return [ $this->params['src'] ];
-       }
-}
-
-/**
- * Placeholder operation that has no params and does nothing
- */
-class NullFileOp extends FileOp {
-}
diff --git a/includes/filebackend/FileOpBatch.php b/includes/filebackend/FileOpBatch.php
deleted file mode 100644 (file)
index 78209d8..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-<?php
-/**
- * Helper class for representing batch file operations.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileBackend
- * @author Aaron Schulz
- */
-
-/**
- * Helper class for representing batch file operations.
- * Do not use this class from places outside FileBackend.
- *
- * Methods should avoid throwing exceptions at all costs.
- *
- * @ingroup FileBackend
- * @since 1.20
- */
-class FileOpBatch {
-       /* Timeout related parameters */
-       const MAX_BATCH_SIZE = 1000; // integer
-
-       /**
-        * Attempt to perform a series of file operations.
-        * Callers are responsible for handling file locking.
-        *
-        * $opts is an array of options, including:
-        *   - force        : Errors that would normally cause a rollback do not.
-        *                    The remaining operations are still attempted if any fail.
-        *   - nonJournaled : Don't log this operation batch in the file journal.
-        *   - concurrency  : Try to do this many operations in parallel when possible.
-        *
-        * The resulting Status will be "OK" unless:
-        *   - a) unexpected operation errors occurred (network partitions, disk full...)
-        *   - b) significant operation errors occurred and 'force' was not set
-        *
-        * @param FileOp[] $performOps List of FileOp operations
-        * @param array $opts Batch operation options
-        * @param FileJournal $journal Journal to log operations to
-        * @return Status
-        */
-       public static function attempt( array $performOps, array $opts, FileJournal $journal ) {
-               $status = Status::newGood();
-
-               $n = count( $performOps );
-               if ( $n > self::MAX_BATCH_SIZE ) {
-                       $status->fatal( 'backend-fail-batchsize', $n, self::MAX_BATCH_SIZE );
-
-                       return $status;
-               }
-
-               $batchId = $journal->getTimestampedUUID();
-               $ignoreErrors = !empty( $opts['force'] );
-               $journaled = empty( $opts['nonJournaled'] );
-               $maxConcurrency = isset( $opts['concurrency'] ) ? $opts['concurrency'] : 1;
-
-               $entries = []; // file journal entry list
-               $predicates = FileOp::newPredicates(); // account for previous ops in prechecks
-               $curBatch = []; // concurrent FileOp sub-batch accumulation
-               $curBatchDeps = FileOp::newDependencies(); // paths used in FileOp sub-batch
-               $pPerformOps = []; // ordered list of concurrent FileOp sub-batches
-               $lastBackend = null; // last op backend name
-               // Do pre-checks for each operation; abort on failure...
-               foreach ( $performOps as $index => $fileOp ) {
-                       $backendName = $fileOp->getBackend()->getName();
-                       $fileOp->setBatchId( $batchId ); // transaction ID
-                       // Decide if this op can be done concurrently within this sub-batch
-                       // or if a new concurrent sub-batch must be started after this one...
-                       if ( $fileOp->dependsOn( $curBatchDeps )
-                               || count( $curBatch ) >= $maxConcurrency
-                               || ( $backendName !== $lastBackend && count( $curBatch ) )
-                       ) {
-                               $pPerformOps[] = $curBatch; // push this batch
-                               $curBatch = []; // start a new sub-batch
-                               $curBatchDeps = FileOp::newDependencies();
-                       }
-                       $lastBackend = $backendName;
-                       $curBatch[$index] = $fileOp; // keep index
-                       // Update list of affected paths in this batch
-                       $curBatchDeps = $fileOp->applyDependencies( $curBatchDeps );
-                       // Simulate performing the operation...
-                       $oldPredicates = $predicates;
-                       $subStatus = $fileOp->precheck( $predicates ); // updates $predicates
-                       $status->merge( $subStatus );
-                       if ( $subStatus->isOK() ) {
-                               if ( $journaled ) { // journal log entries
-                                       $entries = array_merge( $entries,
-                                               $fileOp->getJournalEntries( $oldPredicates, $predicates ) );
-                               }
-                       } else { // operation failed?
-                               $status->success[$index] = false;
-                               ++$status->failCount;
-                               if ( !$ignoreErrors ) {
-                                       return $status; // abort
-                               }
-                       }
-               }
-               // Push the last sub-batch
-               if ( count( $curBatch ) ) {
-                       $pPerformOps[] = $curBatch;
-               }
-
-               // Log the operations in the file journal...
-               if ( count( $entries ) ) {
-                       $subStatus = $journal->logChangeBatch( $entries, $batchId );
-                       if ( !$subStatus->isOK() ) {
-                               return $subStatus; // abort
-                       }
-               }
-
-               if ( $ignoreErrors ) { // treat precheck() fatals as mere warnings
-                       $status->setResult( true, $status->value );
-               }
-
-               // Attempt each operation (in parallel if allowed and possible)...
-               self::runParallelBatches( $pPerformOps, $status );
-
-               return $status;
-       }
-
-       /**
-        * Attempt a list of file operations sub-batches in series.
-        *
-        * The operations *in* each sub-batch will be done in parallel.
-        * The caller is responsible for making sure the operations
-        * within any given sub-batch do not depend on each other.
-        * This will abort remaining ops on failure.
-        *
-        * @param array $pPerformOps Batches of file ops (batches use original indexes)
-        * @param Status $status
-        */
-       protected static function runParallelBatches( array $pPerformOps, Status $status ) {
-               $aborted = false; // set to true on unexpected errors
-               foreach ( $pPerformOps as $performOpsBatch ) {
-                       /** @var FileOp[] $performOpsBatch */
-                       if ( $aborted ) { // check batch op abort flag...
-                               // We can't continue (even with $ignoreErrors) as $predicates is wrong.
-                               // Log the remaining ops as failed for recovery...
-                               foreach ( $performOpsBatch as $i => $fileOp ) {
-                                       $status->success[$i] = false;
-                                       ++$status->failCount;
-                                       $performOpsBatch[$i]->logFailure( 'attempt_aborted' );
-                               }
-                               continue;
-                       }
-                       /** @var Status[] $statuses */
-                       $statuses = [];
-                       $opHandles = [];
-                       // Get the backend; all sub-batch ops belong to a single backend
-                       $backend = reset( $performOpsBatch )->getBackend();
-                       // Get the operation handles or actually do it if there is just one.
-                       // If attemptAsync() returns a Status, it was either due to an error
-                       // or the backend does not support async ops and did it synchronously.
-                       foreach ( $performOpsBatch as $i => $fileOp ) {
-                               if ( !isset( $status->success[$i] ) ) { // didn't already fail in precheck()
-                                       // Parallel ops may be disabled in config due to missing dependencies,
-                                       // (e.g. needing popen()). When they are, $performOpsBatch has size 1.
-                                       $subStatus = ( count( $performOpsBatch ) > 1 )
-                                               ? $fileOp->attemptAsync()
-                                               : $fileOp->attempt();
-                                       if ( $subStatus->value instanceof FileBackendStoreOpHandle ) {
-                                               $opHandles[$i] = $subStatus->value; // deferred
-                                       } else {
-                                               $statuses[$i] = $subStatus; // done already
-                                       }
-                               }
-                       }
-                       // Try to do all the operations concurrently...
-                       $statuses = $statuses + $backend->executeOpHandlesInternal( $opHandles );
-                       // Marshall and merge all the responses (blocking)...
-                       foreach ( $performOpsBatch as $i => $fileOp ) {
-                               if ( !isset( $status->success[$i] ) ) { // didn't already fail in precheck()
-                                       $subStatus = $statuses[$i];
-                                       $status->merge( $subStatus );
-                                       if ( $subStatus->isOK() ) {
-                                               $status->success[$i] = true;
-                                               ++$status->successCount;
-                                       } else {
-                                               $status->success[$i] = false;
-                                               ++$status->failCount;
-                                               $aborted = true; // set abort flag; we can't continue
-                                       }
-                               }
-                       }
-               }
-       }
-}
diff --git a/includes/filebackend/MemoryFileBackend.php b/includes/filebackend/MemoryFileBackend.php
deleted file mode 100644 (file)
index e2c1ede..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-<?php
-/**
- * Simulation of a backend storage in memory.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileBackend
- * @author Aaron Schulz
- */
-
-/**
- * Simulation of a backend storage in memory.
- *
- * All data in the backend is automatically deleted at the end of PHP execution.
- * Since the data stored here is volatile, this is only useful for staging or testing.
- *
- * @ingroup FileBackend
- * @since 1.23
- */
-class MemoryFileBackend extends FileBackendStore {
-       /** @var array Map of (file path => (data,mtime) */
-       protected $files = [];
-
-       public function getFeatures() {
-               return self::ATTR_UNICODE_PATHS;
-       }
-
-       public function isPathUsableInternal( $storagePath ) {
-               return true;
-       }
-
-       protected function doCreateInternal( array $params ) {
-               $status = Status::newGood();
-
-               $dst = $this->resolveHashKey( $params['dst'] );
-               if ( $dst === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               $this->files[$dst] = [
-                       'data' => $params['content'],
-                       'mtime' => wfTimestamp( TS_MW, time() )
-               ];
-
-               return $status;
-       }
-
-       protected function doStoreInternal( array $params ) {
-               $status = Status::newGood();
-
-               $dst = $this->resolveHashKey( $params['dst'] );
-               if ( $dst === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               MediaWiki\suppressWarnings();
-               $data = file_get_contents( $params['src'] );
-               MediaWiki\restoreWarnings();
-               if ( $data === false ) { // source doesn't exist?
-                       $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
-
-                       return $status;
-               }
-
-               $this->files[$dst] = [
-                       'data' => $data,
-                       'mtime' => wfTimestamp( TS_MW, time() )
-               ];
-
-               return $status;
-       }
-
-       protected function doCopyInternal( array $params ) {
-               $status = Status::newGood();
-
-               $src = $this->resolveHashKey( $params['src'] );
-               if ( $src === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
-
-                       return $status;
-               }
-
-               $dst = $this->resolveHashKey( $params['dst'] );
-               if ( $dst === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               if ( !isset( $this->files[$src] ) ) {
-                       if ( empty( $params['ignoreMissingSource'] ) ) {
-                               $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
-                       }
-
-                       return $status;
-               }
-
-               $this->files[$dst] = [
-                       'data' => $this->files[$src]['data'],
-                       'mtime' => wfTimestamp( TS_MW, time() )
-               ];
-
-               return $status;
-       }
-
-       protected function doDeleteInternal( array $params ) {
-               $status = Status::newGood();
-
-               $src = $this->resolveHashKey( $params['src'] );
-               if ( $src === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
-
-                       return $status;
-               }
-
-               if ( !isset( $this->files[$src] ) ) {
-                       if ( empty( $params['ignoreMissingSource'] ) ) {
-                               $status->fatal( 'backend-fail-delete', $params['src'] );
-                       }
-
-                       return $status;
-               }
-
-               unset( $this->files[$src] );
-
-               return $status;
-       }
-
-       protected function doGetFileStat( array $params ) {
-               $src = $this->resolveHashKey( $params['src'] );
-               if ( $src === null ) {
-                       return null;
-               }
-
-               if ( isset( $this->files[$src] ) ) {
-                       return [
-                               'mtime' => $this->files[$src]['mtime'],
-                               'size' => strlen( $this->files[$src]['data'] ),
-                       ];
-               }
-
-               return false;
-       }
-
-       protected function doGetLocalCopyMulti( array $params ) {
-               $tmpFiles = []; // (path => TempFSFile)
-               foreach ( $params['srcs'] as $srcPath ) {
-                       $src = $this->resolveHashKey( $srcPath );
-                       if ( $src === null || !isset( $this->files[$src] ) ) {
-                               $fsFile = null;
-                       } else {
-                               // Create a new temporary file with the same extension...
-                               $ext = FileBackend::extensionFromPath( $src );
-                               $fsFile = TempFSFile::factory( 'localcopy_', $ext );
-                               if ( $fsFile ) {
-                                       $bytes = file_put_contents( $fsFile->getPath(), $this->files[$src]['data'] );
-                                       if ( $bytes !== strlen( $this->files[$src]['data'] ) ) {
-                                               $fsFile = null;
-                                       }
-                               }
-                       }
-                       $tmpFiles[$srcPath] = $fsFile;
-               }
-
-               return $tmpFiles;
-       }
-
-       protected function doDirectoryExists( $container, $dir, array $params ) {
-               $prefix = rtrim( "$container/$dir", '/' ) . '/';
-               foreach ( $this->files as $path => $data ) {
-                       if ( strpos( $path, $prefix ) === 0 ) {
-                               return true;
-                       }
-               }
-
-               return false;
-       }
-
-       public function getDirectoryListInternal( $container, $dir, array $params ) {
-               $dirs = [];
-               $prefix = rtrim( "$container/$dir", '/' ) . '/';
-               $prefixLen = strlen( $prefix );
-               foreach ( $this->files as $path => $data ) {
-                       if ( strpos( $path, $prefix ) === 0 ) {
-                               $relPath = substr( $path, $prefixLen );
-                               if ( $relPath === false ) {
-                                       continue;
-                               } elseif ( strpos( $relPath, '/' ) === false ) {
-                                       continue; // just a file
-                               }
-                               $parts = array_slice( explode( '/', $relPath ), 0, -1 ); // last part is file name
-                               if ( !empty( $params['topOnly'] ) ) {
-                                       $dirs[$parts[0]] = 1; // top directory
-                               } else {
-                                       $current = '';
-                                       foreach ( $parts as $part ) { // all directories
-                                               $dir = ( $current === '' ) ? $part : "$current/$part";
-                                               $dirs[$dir] = 1;
-                                               $current = $dir;
-                                       }
-                               }
-                       }
-               }
-
-               return array_keys( $dirs );
-       }
-
-       public function getFileListInternal( $container, $dir, array $params ) {
-               $files = [];
-               $prefix = rtrim( "$container/$dir", '/' ) . '/';
-               $prefixLen = strlen( $prefix );
-               foreach ( $this->files as $path => $data ) {
-                       if ( strpos( $path, $prefix ) === 0 ) {
-                               $relPath = substr( $path, $prefixLen );
-                               if ( $relPath === false ) {
-                                       continue;
-                               } elseif ( !empty( $params['topOnly'] ) && strpos( $relPath, '/' ) !== false ) {
-                                       continue;
-                               }
-                               $files[] = $relPath;
-                       }
-               }
-
-               return $files;
-       }
-
-       protected function directoriesAreVirtual() {
-               return true;
-       }
-
-       /**
-        * Get the absolute file system path for a storage path
-        *
-        * @param string $storagePath Storage path
-        * @return string|null
-        */
-       protected function resolveHashKey( $storagePath ) {
-               list( $fullCont, $relPath ) = $this->resolveStoragePathReal( $storagePath );
-               if ( $relPath === null ) {
-                       return null; // invalid
-               }
-
-               return ( $relPath !== '' ) ? "$fullCont/$relPath" : $fullCont;
-       }
-}
diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php
deleted file mode 100644 (file)
index 2adf934..0000000
+++ /dev/null
@@ -1,1940 +0,0 @@
-<?php
-/**
- * OpenStack Swift based file backend.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileBackend
- * @author Russ Nelson
- * @author Aaron Schulz
- */
-
-/**
- * @brief Class for an OpenStack Swift (or Ceph RGW) based file backend.
- *
- * Status messages should avoid mentioning the Swift account name.
- * Likewise, error suppression should be used to avoid path disclosure.
- *
- * @ingroup FileBackend
- * @since 1.19
- */
-class SwiftFileBackend extends FileBackendStore {
-       /** @var MultiHttpClient */
-       protected $http;
-
-       /** @var int TTL in seconds */
-       protected $authTTL;
-
-       /** @var string Authentication base URL (without version) */
-       protected $swiftAuthUrl;
-
-       /** @var string Swift user (account:user) to authenticate as */
-       protected $swiftUser;
-
-       /** @var string Secret key for user */
-       protected $swiftKey;
-
-       /** @var string Shared secret value for making temp URLs */
-       protected $swiftTempUrlKey;
-
-       /** @var string S3 access key (RADOS Gateway) */
-       protected $rgwS3AccessKey;
-
-       /** @var string S3 authentication key (RADOS Gateway) */
-       protected $rgwS3SecretKey;
-
-       /** @var BagOStuff */
-       protected $srvCache;
-
-       /** @var ProcessCacheLRU Container stat cache */
-       protected $containerStatCache;
-
-       /** @var array */
-       protected $authCreds;
-
-       /** @var int UNIX timestamp */
-       protected $authSessionTimestamp = 0;
-
-       /** @var int UNIX timestamp */
-       protected $authErrorTimestamp = null;
-
-       /** @var bool Whether the server is an Ceph RGW */
-       protected $isRGW = false;
-
-       /**
-        * @see FileBackendStore::__construct()
-        * Additional $config params include:
-        *   - swiftAuthUrl       : Swift authentication server URL
-        *   - swiftUser          : Swift user used by MediaWiki (account:username)
-        *   - swiftKey           : Swift authentication key for the above user
-        *   - swiftAuthTTL       : Swift authentication TTL (seconds)
-        *   - swiftTempUrlKey    : Swift "X-Account-Meta-Temp-URL-Key" value on the account.
-        *                          Do not set this until it has been set in the backend.
-        *   - shardViaHashLevels : Map of container names to sharding config with:
-        *                             - base   : base of hash characters, 16 or 36
-        *                             - levels : the number of hash levels (and digits)
-        *                             - repeat : hash subdirectories are prefixed with all the
-        *                                        parent hash directory names (e.g. "a/ab/abc")
-        *   - cacheAuthInfo      : Whether to cache authentication tokens in APC, XCache, ect.
-        *                          If those are not available, then the main cache will be used.
-        *                          This is probably insecure in shared hosting environments.
-        *   - rgwS3AccessKey     : Rados Gateway S3 "access key" value on the account.
-        *                          Do not set this until it has been set in the backend.
-        *                          This is used for generating expiring pre-authenticated URLs.
-        *                          Only use this when using rgw and to work around
-        *                          http://tracker.newdream.net/issues/3454.
-        *   - rgwS3SecretKey     : Rados Gateway S3 "secret key" value on the account.
-        *                          Do not set this until it has been set in the backend.
-        *                          This is used for generating expiring pre-authenticated URLs.
-        *                          Only use this when using rgw and to work around
-        *                          http://tracker.newdream.net/issues/3454.
-        */
-       public function __construct( array $config ) {
-               parent::__construct( $config );
-               // Required settings
-               $this->swiftAuthUrl = $config['swiftAuthUrl'];
-               $this->swiftUser = $config['swiftUser'];
-               $this->swiftKey = $config['swiftKey'];
-               // Optional settings
-               $this->authTTL = isset( $config['swiftAuthTTL'] )
-                       ? $config['swiftAuthTTL']
-                       : 15 * 60; // some sane number
-               $this->swiftTempUrlKey = isset( $config['swiftTempUrlKey'] )
-                       ? $config['swiftTempUrlKey']
-                       : '';
-               $this->shardViaHashLevels = isset( $config['shardViaHashLevels'] )
-                       ? $config['shardViaHashLevels']
-                       : '';
-               $this->rgwS3AccessKey = isset( $config['rgwS3AccessKey'] )
-                       ? $config['rgwS3AccessKey']
-                       : '';
-               $this->rgwS3SecretKey = isset( $config['rgwS3SecretKey'] )
-                       ? $config['rgwS3SecretKey']
-                       : '';
-               // HTTP helper client
-               $this->http = new MultiHttpClient( [] );
-               // Cache container information to mask latency
-               if ( isset( $config['wanCache'] ) && $config['wanCache'] instanceof WANObjectCache ) {
-                       $this->memCache = $config['wanCache'];
-               }
-               // Process cache for container info
-               $this->containerStatCache = new ProcessCacheLRU( 300 );
-               // Cache auth token information to avoid RTTs
-               if ( !empty( $config['cacheAuthInfo'] ) ) {
-                       if ( PHP_SAPI === 'cli' ) {
-                               // Preferrably memcached
-                               $this->srvCache = ObjectCache::getLocalClusterInstance();
-                       } else {
-                               // Look for APC, XCache, WinCache, ect...
-                               $this->srvCache = ObjectCache::getLocalServerInstance( CACHE_NONE );
-                       }
-               } else {
-                       $this->srvCache = new EmptyBagOStuff();
-               }
-       }
-
-       public function getFeatures() {
-               return ( FileBackend::ATTR_UNICODE_PATHS |
-                       FileBackend::ATTR_HEADERS | FileBackend::ATTR_METADATA );
-       }
-
-       protected function resolveContainerPath( $container, $relStoragePath ) {
-               if ( !mb_check_encoding( $relStoragePath, 'UTF-8' ) ) {
-                       return null; // not UTF-8, makes it hard to use CF and the swift HTTP API
-               } elseif ( strlen( urlencode( $relStoragePath ) ) > 1024 ) {
-                       return null; // too long for Swift
-               }
-
-               return $relStoragePath;
-       }
-
-       public function isPathUsableInternal( $storagePath ) {
-               list( $container, $rel ) = $this->resolveStoragePathReal( $storagePath );
-               if ( $rel === null ) {
-                       return false; // invalid
-               }
-
-               return is_array( $this->getContainerStat( $container ) );
-       }
-
-       /**
-        * Sanitize and filter the custom headers from a $params array.
-        * Only allows certain "standard" Content- and X-Content- headers.
-        *
-        * @param array $params
-        * @return array Sanitized value of 'headers' field in $params
-        */
-       protected function sanitizeHdrs( array $params ) {
-               return isset( $params['headers'] )
-                       ? $this->getCustomHeaders( $params['headers'] )
-                       : [];
-
-       }
-
-       /**
-        * @param array $rawHeaders
-        * @return array Custom non-metadata HTTP headers
-        */
-       protected function getCustomHeaders( array $rawHeaders ) {
-               $headers = [];
-
-               // Normalize casing, and strip out illegal headers
-               foreach ( $rawHeaders as $name => $value ) {
-                       $name = strtolower( $name );
-                       if ( preg_match( '/^content-(type|length)$/', $name ) ) {
-                               continue; // blacklisted
-                       } elseif ( preg_match( '/^(x-)?content-/', $name ) ) {
-                               $headers[$name] = $value; // allowed
-                       } elseif ( preg_match( '/^content-(disposition)/', $name ) ) {
-                               $headers[$name] = $value; // allowed
-                       }
-               }
-               // By default, Swift has annoyingly low maximum header value limits
-               if ( isset( $headers['content-disposition'] ) ) {
-                       $disposition = '';
-                       // @note: assume FileBackend::makeContentDisposition() already used
-                       foreach ( explode( ';', $headers['content-disposition'] ) as $part ) {
-                               $part = trim( $part );
-                               $new = ( $disposition === '' ) ? $part : "{$disposition};{$part}";
-                               if ( strlen( $new ) <= 255 ) {
-                                       $disposition = $new;
-                               } else {
-                                       break; // too long; sigh
-                               }
-                       }
-                       $headers['content-disposition'] = $disposition;
-               }
-
-               return $headers;
-       }
-
-       /**
-        * @param array $rawHeaders
-        * @return array Custom metadata headers
-        */
-       protected function getMetadataHeaders( array $rawHeaders ) {
-               $headers = [];
-               foreach ( $rawHeaders as $name => $value ) {
-                       $name = strtolower( $name );
-                       if ( strpos( $name, 'x-object-meta-' ) === 0 ) {
-                               $headers[$name] = $value;
-                       }
-               }
-
-               return $headers;
-       }
-
-       /**
-        * @param array $rawHeaders
-        * @return array Custom metadata headers with prefix removed
-        */
-       protected function getMetadata( array $rawHeaders ) {
-               $metadata = [];
-               foreach ( $this->getMetadataHeaders( $rawHeaders ) as $name => $value ) {
-                       $metadata[substr( $name, strlen( 'x-object-meta-' ) )] = $value;
-               }
-
-               return $metadata;
-       }
-
-       protected function doCreateInternal( array $params ) {
-               $status = Status::newGood();
-
-               list( $dstCont, $dstRel ) = $this->resolveStoragePathReal( $params['dst'] );
-               if ( $dstRel === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               $sha1Hash = Wikimedia\base_convert( sha1( $params['content'] ), 16, 36, 31 );
-               $contentType = isset( $params['headers']['content-type'] )
-                       ? $params['headers']['content-type']
-                       : $this->getContentType( $params['dst'], $params['content'], null );
-
-               $reqs = [ [
-                       'method' => 'PUT',
-                       'url' => [ $dstCont, $dstRel ],
-                       'headers' => [
-                               'content-length' => strlen( $params['content'] ),
-                               'etag' => md5( $params['content'] ),
-                               'content-type' => $contentType,
-                               'x-object-meta-sha1base36' => $sha1Hash
-                       ] + $this->sanitizeHdrs( $params ),
-                       'body' => $params['content']
-               ] ];
-
-               $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $method, $params ) {
-                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
-                       if ( $rcode === 201 ) {
-                               // good
-                       } elseif ( $rcode === 412 ) {
-                               $status->fatal( 'backend-fail-contenttype', $params['dst'] );
-                       } else {
-                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
-                       }
-               };
-
-               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $status->value = $opHandle;
-               } else { // actually write the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
-               }
-
-               return $status;
-       }
-
-       protected function doStoreInternal( array $params ) {
-               $status = Status::newGood();
-
-               list( $dstCont, $dstRel ) = $this->resolveStoragePathReal( $params['dst'] );
-               if ( $dstRel === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               MediaWiki\suppressWarnings();
-               $sha1Hash = sha1_file( $params['src'] );
-               MediaWiki\restoreWarnings();
-               if ( $sha1Hash === false ) { // source doesn't exist?
-                       $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
-
-                       return $status;
-               }
-               $sha1Hash = Wikimedia\base_convert( $sha1Hash, 16, 36, 31 );
-               $contentType = isset( $params['headers']['content-type'] )
-                       ? $params['headers']['content-type']
-                       : $this->getContentType( $params['dst'], null, $params['src'] );
-
-               $handle = fopen( $params['src'], 'rb' );
-               if ( $handle === false ) { // source doesn't exist?
-                       $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
-
-                       return $status;
-               }
-
-               $reqs = [ [
-                       'method' => 'PUT',
-                       'url' => [ $dstCont, $dstRel ],
-                       'headers' => [
-                               'content-length' => filesize( $params['src'] ),
-                               'etag' => md5_file( $params['src'] ),
-                               'content-type' => $contentType,
-                               'x-object-meta-sha1base36' => $sha1Hash
-                       ] + $this->sanitizeHdrs( $params ),
-                       'body' => $handle // resource
-               ] ];
-
-               $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $method, $params ) {
-                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
-                       if ( $rcode === 201 ) {
-                               // good
-                       } elseif ( $rcode === 412 ) {
-                               $status->fatal( 'backend-fail-contenttype', $params['dst'] );
-                       } else {
-                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
-                       }
-               };
-
-               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $status->value = $opHandle;
-               } else { // actually write the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
-               }
-
-               return $status;
-       }
-
-       protected function doCopyInternal( array $params ) {
-               $status = Status::newGood();
-
-               list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
-               if ( $srcRel === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
-
-                       return $status;
-               }
-
-               list( $dstCont, $dstRel ) = $this->resolveStoragePathReal( $params['dst'] );
-               if ( $dstRel === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               $reqs = [ [
-                       'method' => 'PUT',
-                       'url' => [ $dstCont, $dstRel ],
-                       'headers' => [
-                               'x-copy-from' => '/' . rawurlencode( $srcCont ) .
-                                       '/' . str_replace( "%2F", "/", rawurlencode( $srcRel ) )
-                       ] + $this->sanitizeHdrs( $params ), // extra headers merged into object
-               ] ];
-
-               $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $method, $params ) {
-                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
-                       if ( $rcode === 201 ) {
-                               // good
-                       } elseif ( $rcode === 404 ) {
-                               $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
-                       } else {
-                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
-                       }
-               };
-
-               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $status->value = $opHandle;
-               } else { // actually write the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
-               }
-
-               return $status;
-       }
-
-       protected function doMoveInternal( array $params ) {
-               $status = Status::newGood();
-
-               list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
-               if ( $srcRel === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
-
-                       return $status;
-               }
-
-               list( $dstCont, $dstRel ) = $this->resolveStoragePathReal( $params['dst'] );
-               if ( $dstRel === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
-
-                       return $status;
-               }
-
-               $reqs = [
-                       [
-                               'method' => 'PUT',
-                               'url' => [ $dstCont, $dstRel ],
-                               'headers' => [
-                                       'x-copy-from' => '/' . rawurlencode( $srcCont ) .
-                                               '/' . str_replace( "%2F", "/", rawurlencode( $srcRel ) )
-                               ] + $this->sanitizeHdrs( $params ) // extra headers merged into object
-                       ]
-               ];
-               if ( "{$srcCont}/{$srcRel}" !== "{$dstCont}/{$dstRel}" ) {
-                       $reqs[] = [
-                               'method' => 'DELETE',
-                               'url' => [ $srcCont, $srcRel ],
-                               'headers' => []
-                       ];
-               }
-
-               $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $method, $params ) {
-                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
-                       if ( $request['method'] === 'PUT' && $rcode === 201 ) {
-                               // good
-                       } elseif ( $request['method'] === 'DELETE' && $rcode === 204 ) {
-                               // good
-                       } elseif ( $rcode === 404 ) {
-                               $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
-                       } else {
-                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
-                       }
-               };
-
-               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $status->value = $opHandle;
-               } else { // actually move the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
-               }
-
-               return $status;
-       }
-
-       protected function doDeleteInternal( array $params ) {
-               $status = Status::newGood();
-
-               list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
-               if ( $srcRel === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
-
-                       return $status;
-               }
-
-               $reqs = [ [
-                       'method' => 'DELETE',
-                       'url' => [ $srcCont, $srcRel ],
-                       'headers' => []
-               ] ];
-
-               $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $method, $params ) {
-                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
-                       if ( $rcode === 204 ) {
-                               // good
-                       } elseif ( $rcode === 404 ) {
-                               if ( empty( $params['ignoreMissingSource'] ) ) {
-                                       $status->fatal( 'backend-fail-delete', $params['src'] );
-                               }
-                       } else {
-                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
-                       }
-               };
-
-               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $status->value = $opHandle;
-               } else { // actually delete the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
-               }
-
-               return $status;
-       }
-
-       protected function doDescribeInternal( array $params ) {
-               $status = Status::newGood();
-
-               list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
-               if ( $srcRel === null ) {
-                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
-
-                       return $status;
-               }
-
-               // Fetch the old object headers/metadata...this should be in stat cache by now
-               $stat = $this->getFileStat( [ 'src' => $params['src'], 'latest' => 1 ] );
-               if ( $stat && !isset( $stat['xattr'] ) ) { // older cache entry
-                       $stat = $this->doGetFileStat( [ 'src' => $params['src'], 'latest' => 1 ] );
-               }
-               if ( !$stat ) {
-                       $status->fatal( 'backend-fail-describe', $params['src'] );
-
-                       return $status;
-               }
-
-               // POST clears prior headers, so we need to merge the changes in to the old ones
-               $metaHdrs = [];
-               foreach ( $stat['xattr']['metadata'] as $name => $value ) {
-                       $metaHdrs["x-object-meta-$name"] = $value;
-               }
-               $customHdrs = $this->sanitizeHdrs( $params ) + $stat['xattr']['headers'];
-
-               $reqs = [ [
-                       'method' => 'POST',
-                       'url' => [ $srcCont, $srcRel ],
-                       'headers' => $metaHdrs + $customHdrs
-               ] ];
-
-               $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $method, $params ) {
-                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
-                       if ( $rcode === 202 ) {
-                               // good
-                       } elseif ( $rcode === 404 ) {
-                               $status->fatal( 'backend-fail-describe', $params['src'] );
-                       } else {
-                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
-                       }
-               };
-
-               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
-               if ( !empty( $params['async'] ) ) { // deferred
-                       $status->value = $opHandle;
-               } else { // actually change the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
-               }
-
-               return $status;
-       }
-
-       protected function doPrepareInternal( $fullCont, $dir, array $params ) {
-               $status = Status::newGood();
-
-               // (a) Check if container already exists
-               $stat = $this->getContainerStat( $fullCont );
-               if ( is_array( $stat ) ) {
-                       return $status; // already there
-               } elseif ( $stat === null ) {
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       wfDebugLog( 'SwiftBackend', __METHOD__ . ': cannot get container stat' );
-
-                       return $status;
-               }
-
-               // (b) Create container as needed with proper ACLs
-               if ( $stat === false ) {
-                       $params['op'] = 'prepare';
-                       $status->merge( $this->createContainer( $fullCont, $params ) );
-               }
-
-               return $status;
-       }
-
-       protected function doSecureInternal( $fullCont, $dir, array $params ) {
-               $status = Status::newGood();
-               if ( empty( $params['noAccess'] ) ) {
-                       return $status; // nothing to do
-               }
-
-               $stat = $this->getContainerStat( $fullCont );
-               if ( is_array( $stat ) ) {
-                       // Make container private to end-users...
-                       $status->merge( $this->setContainerAccess(
-                               $fullCont,
-                               [ $this->swiftUser ], // read
-                               [ $this->swiftUser ] // write
-                       ) );
-               } elseif ( $stat === false ) {
-                       $status->fatal( 'backend-fail-usable', $params['dir'] );
-               } else {
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       wfDebugLog( 'SwiftBackend', __METHOD__ . ': cannot get container stat' );
-               }
-
-               return $status;
-       }
-
-       protected function doPublishInternal( $fullCont, $dir, array $params ) {
-               $status = Status::newGood();
-
-               $stat = $this->getContainerStat( $fullCont );
-               if ( is_array( $stat ) ) {
-                       // Make container public to end-users...
-                       $status->merge( $this->setContainerAccess(
-                               $fullCont,
-                               [ $this->swiftUser, '.r:*' ], // read
-                               [ $this->swiftUser ] // write
-                       ) );
-               } elseif ( $stat === false ) {
-                       $status->fatal( 'backend-fail-usable', $params['dir'] );
-               } else {
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       wfDebugLog( 'SwiftBackend', __METHOD__ . ': cannot get container stat' );
-               }
-
-               return $status;
-       }
-
-       protected function doCleanInternal( $fullCont, $dir, array $params ) {
-               $status = Status::newGood();
-
-               // Only containers themselves can be removed, all else is virtual
-               if ( $dir != '' ) {
-                       return $status; // nothing to do
-               }
-
-               // (a) Check the container
-               $stat = $this->getContainerStat( $fullCont, true );
-               if ( $stat === false ) {
-                       return $status; // ok, nothing to do
-               } elseif ( !is_array( $stat ) ) {
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       wfDebugLog( 'SwiftBackend', __METHOD__ . ': cannot get container stat' );
-
-                       return $status;
-               }
-
-               // (b) Delete the container if empty
-               if ( $stat['count'] == 0 ) {
-                       $params['op'] = 'clean';
-                       $status->merge( $this->deleteContainer( $fullCont, $params ) );
-               }
-
-               return $status;
-       }
-
-       protected function doGetFileStat( array $params ) {
-               $params = [ 'srcs' => [ $params['src'] ], 'concurrency' => 1 ] + $params;
-               unset( $params['src'] );
-               $stats = $this->doGetFileStatMulti( $params );
-
-               return reset( $stats );
-       }
-
-       /**
-        * Convert dates like "Tue, 03 Jan 2012 22:01:04 GMT"/"2013-05-11T07:37:27.678360Z".
-        * Dates might also come in like "2013-05-11T07:37:27.678360" from Swift listings,
-        * missing the timezone suffix (though Ceph RGW does not appear to have this bug).
-        *
-        * @param string $ts
-        * @param int $format Output format (TS_* constant)
-        * @return string
-        * @throws FileBackendError
-        */
-       protected function convertSwiftDate( $ts, $format = TS_MW ) {
-               try {
-                       $timestamp = new MWTimestamp( $ts );
-
-                       return $timestamp->getTimestamp( $format );
-               } catch ( Exception $e ) {
-                       throw new FileBackendError( $e->getMessage() );
-               }
-       }
-
-       /**
-        * Fill in any missing object metadata and save it to Swift
-        *
-        * @param array $objHdrs Object response headers
-        * @param string $path Storage path to object
-        * @return array New headers
-        */
-       protected function addMissingMetadata( array $objHdrs, $path ) {
-               if ( isset( $objHdrs['x-object-meta-sha1base36'] ) ) {
-                       return $objHdrs; // nothing to do
-               }
-
-               /** @noinspection PhpUnusedLocalVariableInspection */
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-               wfDebugLog( 'SwiftBackend', __METHOD__ . ": $path was not stored with SHA-1 metadata." );
-
-               $objHdrs['x-object-meta-sha1base36'] = false;
-
-               $auth = $this->getAuthentication();
-               if ( !$auth ) {
-                       return $objHdrs; // failed
-               }
-
-               // Find prior custom HTTP headers
-               $postHeaders = $this->getCustomHeaders( $objHdrs );
-               // Find prior metadata headers
-               $postHeaders += $this->getMetadataHeaders( $objHdrs );
-
-               $status = Status::newGood();
-               /** @noinspection PhpUnusedLocalVariableInspection */
-               $scopeLockS = $this->getScopedFileLocks( [ $path ], LockManager::LOCK_UW, $status );
-               if ( $status->isOK() ) {
-                       $tmpFile = $this->getLocalCopy( [ 'src' => $path, 'latest' => 1 ] );
-                       if ( $tmpFile ) {
-                               $hash = $tmpFile->getSha1Base36();
-                               if ( $hash !== false ) {
-                                       $objHdrs['x-object-meta-sha1base36'] = $hash;
-                                       // Merge new SHA1 header into the old ones
-                                       $postHeaders['x-object-meta-sha1base36'] = $hash;
-                                       list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $path );
-                                       list( $rcode ) = $this->http->run( [
-                                               'method' => 'POST',
-                                               'url' => $this->storageUrl( $auth, $srcCont, $srcRel ),
-                                               'headers' => $this->authTokenHeaders( $auth ) + $postHeaders
-                                       ] );
-                                       if ( $rcode >= 200 && $rcode <= 299 ) {
-                                               $this->deleteFileCache( $path );
-
-                                               return $objHdrs; // success
-                                       }
-                               }
-                       }
-               }
-
-               wfDebugLog( 'SwiftBackend', __METHOD__ . ": unable to set SHA-1 metadata for $path" );
-
-               return $objHdrs; // failed
-       }
-
-       protected function doGetFileContentsMulti( array $params ) {
-               $contents = [];
-
-               $auth = $this->getAuthentication();
-
-               $ep = array_diff_key( $params, [ 'srcs' => 1 ] ); // for error logging
-               // Blindly create tmp files and stream to them, catching any exception if the file does
-               // not exist. Doing stats here is useless and will loop infinitely in addMissingMetadata().
-               $reqs = []; // (path => op)
-
-               foreach ( $params['srcs'] as $path ) { // each path in this concurrent batch
-                       list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $path );
-                       if ( $srcRel === null || !$auth ) {
-                               $contents[$path] = false;
-                               continue;
-                       }
-                       // Create a new temporary memory file...
-                       $handle = fopen( 'php://temp', 'wb' );
-                       if ( $handle ) {
-                               $reqs[$path] = [
-                                       'method'  => 'GET',
-                                       'url'     => $this->storageUrl( $auth, $srcCont, $srcRel ),
-                                       'headers' => $this->authTokenHeaders( $auth )
-                                               + $this->headersFromParams( $params ),
-                                       'stream'  => $handle,
-                               ];
-                       }
-                       $contents[$path] = false;
-               }
-
-               $opts = [ 'maxConnsPerHost' => $params['concurrency'] ];
-               $reqs = $this->http->runMulti( $reqs, $opts );
-               foreach ( $reqs as $path => $op ) {
-                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $op['response'];
-                       if ( $rcode >= 200 && $rcode <= 299 ) {
-                               rewind( $op['stream'] ); // start from the beginning
-                               $contents[$path] = stream_get_contents( $op['stream'] );
-                       } elseif ( $rcode === 404 ) {
-                               $contents[$path] = false;
-                       } else {
-                               $this->onError( null, __METHOD__,
-                                       [ 'src' => $path ] + $ep, $rerr, $rcode, $rdesc );
-                       }
-                       fclose( $op['stream'] ); // close open handle
-               }
-
-               return $contents;
-       }
-
-       protected function doDirectoryExists( $fullCont, $dir, array $params ) {
-               $prefix = ( $dir == '' ) ? null : "{$dir}/";
-               $status = $this->objectListing( $fullCont, 'names', 1, null, $prefix );
-               if ( $status->isOK() ) {
-                       return ( count( $status->value ) ) > 0;
-               }
-
-               return null; // error
-       }
-
-       /**
-        * @see FileBackendStore::getDirectoryListInternal()
-        * @param string $fullCont
-        * @param string $dir
-        * @param array $params
-        * @return SwiftFileBackendDirList
-        */
-       public function getDirectoryListInternal( $fullCont, $dir, array $params ) {
-               return new SwiftFileBackendDirList( $this, $fullCont, $dir, $params );
-       }
-
-       /**
-        * @see FileBackendStore::getFileListInternal()
-        * @param string $fullCont
-        * @param string $dir
-        * @param array $params
-        * @return SwiftFileBackendFileList
-        */
-       public function getFileListInternal( $fullCont, $dir, array $params ) {
-               return new SwiftFileBackendFileList( $this, $fullCont, $dir, $params );
-       }
-
-       /**
-        * Do not call this function outside of SwiftFileBackendFileList
-        *
-        * @param string $fullCont Resolved container name
-        * @param string $dir Resolved storage directory with no trailing slash
-        * @param string|null $after Resolved container relative path to list items after
-        * @param int $limit Max number of items to list
-        * @param array $params Parameters for getDirectoryList()
-        * @return array List of container relative resolved paths of directories directly under $dir
-        * @throws FileBackendError
-        */
-       public function getDirListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) {
-               $dirs = [];
-               if ( $after === INF ) {
-                       return $dirs; // nothing more
-               }
-
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-
-               $prefix = ( $dir == '' ) ? null : "{$dir}/";
-               // Non-recursive: only list dirs right under $dir
-               if ( !empty( $params['topOnly'] ) ) {
-                       $status = $this->objectListing( $fullCont, 'names', $limit, $after, $prefix, '/' );
-                       if ( !$status->isOK() ) {
-                               throw new FileBackendError( "Iterator page I/O error: {$status->getMessage()}" );
-                       }
-                       $objects = $status->value;
-                       foreach ( $objects as $object ) { // files and directories
-                               if ( substr( $object, -1 ) === '/' ) {
-                                       $dirs[] = $object; // directories end in '/'
-                               }
-                       }
-               } else {
-                       // Recursive: list all dirs under $dir and its subdirs
-                       $getParentDir = function ( $path ) {
-                               return ( strpos( $path, '/' ) !== false ) ? dirname( $path ) : false;
-                       };
-
-                       // Get directory from last item of prior page
-                       $lastDir = $getParentDir( $after ); // must be first page
-                       $status = $this->objectListing( $fullCont, 'names', $limit, $after, $prefix );
-
-                       if ( !$status->isOK() ) {
-                               throw new FileBackendError( "Iterator page I/O error: {$status->getMessage()}" );
-                       }
-
-                       $objects = $status->value;
-
-                       foreach ( $objects as $object ) { // files
-                               $objectDir = $getParentDir( $object ); // directory of object
-
-                               if ( $objectDir !== false && $objectDir !== $dir ) {
-                                       // Swift stores paths in UTF-8, using binary sorting.
-                                       // See function "create_container_table" in common/db.py.
-                                       // If a directory is not "greater" than the last one,
-                                       // then it was already listed by the calling iterator.
-                                       if ( strcmp( $objectDir, $lastDir ) > 0 ) {
-                                               $pDir = $objectDir;
-                                               do { // add dir and all its parent dirs
-                                                       $dirs[] = "{$pDir}/";
-                                                       $pDir = $getParentDir( $pDir );
-                                               } while ( $pDir !== false // sanity
-                                                       && strcmp( $pDir, $lastDir ) > 0 // not done already
-                                                       && strlen( $pDir ) > strlen( $dir ) // within $dir
-                                               );
-                                       }
-                                       $lastDir = $objectDir;
-                               }
-                       }
-               }
-               // Page on the unfiltered directory listing (what is returned may be filtered)
-               if ( count( $objects ) < $limit ) {
-                       $after = INF; // avoid a second RTT
-               } else {
-                       $after = end( $objects ); // update last item
-               }
-
-               return $dirs;
-       }
-
-       /**
-        * Do not call this function outside of SwiftFileBackendFileList
-        *
-        * @param string $fullCont Resolved container name
-        * @param string $dir Resolved storage directory with no trailing slash
-        * @param string|null $after Resolved container relative path of file to list items after
-        * @param int $limit Max number of items to list
-        * @param array $params Parameters for getDirectoryList()
-        * @return array List of resolved container relative paths of files under $dir
-        * @throws FileBackendError
-        */
-       public function getFileListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) {
-               $files = []; // list of (path, stat array or null) entries
-               if ( $after === INF ) {
-                       return $files; // nothing more
-               }
-
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-
-               $prefix = ( $dir == '' ) ? null : "{$dir}/";
-               // $objects will contain a list of unfiltered names or CF_Object items
-               // Non-recursive: only list files right under $dir
-               if ( !empty( $params['topOnly'] ) ) {
-                       if ( !empty( $params['adviseStat'] ) ) {
-                               $status = $this->objectListing( $fullCont, 'info', $limit, $after, $prefix, '/' );
-                       } else {
-                               $status = $this->objectListing( $fullCont, 'names', $limit, $after, $prefix, '/' );
-                       }
-               } else {
-                       // Recursive: list all files under $dir and its subdirs
-                       if ( !empty( $params['adviseStat'] ) ) {
-                               $status = $this->objectListing( $fullCont, 'info', $limit, $after, $prefix );
-                       } else {
-                               $status = $this->objectListing( $fullCont, 'names', $limit, $after, $prefix );
-                       }
-               }
-
-               // Reformat this list into a list of (name, stat array or null) entries
-               if ( !$status->isOK() ) {
-                       throw new FileBackendError( "Iterator page I/O error: {$status->getMessage()}" );
-               }
-
-               $objects = $status->value;
-               $files = $this->buildFileObjectListing( $params, $dir, $objects );
-
-               // Page on the unfiltered object listing (what is returned may be filtered)
-               if ( count( $objects ) < $limit ) {
-                       $after = INF; // avoid a second RTT
-               } else {
-                       $after = end( $objects ); // update last item
-                       $after = is_object( $after ) ? $after->name : $after;
-               }
-
-               return $files;
-       }
-
-       /**
-        * Build a list of file objects, filtering out any directories
-        * and extracting any stat info if provided in $objects (for CF_Objects)
-        *
-        * @param array $params Parameters for getDirectoryList()
-        * @param string $dir Resolved container directory path
-        * @param array $objects List of CF_Object items or object names
-        * @return array List of (names,stat array or null) entries
-        */
-       private function buildFileObjectListing( array $params, $dir, array $objects ) {
-               $names = [];
-               foreach ( $objects as $object ) {
-                       if ( is_object( $object ) ) {
-                               if ( isset( $object->subdir ) || !isset( $object->name ) ) {
-                                       continue; // virtual directory entry; ignore
-                               }
-                               $stat = [
-                                       // Convert various random Swift dates to TS_MW
-                                       'mtime'  => $this->convertSwiftDate( $object->last_modified, TS_MW ),
-                                       'size'   => (int)$object->bytes,
-                                       'sha1'   => null,
-                                       // Note: manifiest ETags are not an MD5 of the file
-                                       'md5'    => ctype_xdigit( $object->hash ) ? $object->hash : null,
-                                       'latest' => false // eventually consistent
-                               ];
-                               $names[] = [ $object->name, $stat ];
-                       } elseif ( substr( $object, -1 ) !== '/' ) {
-                               // Omit directories, which end in '/' in listings
-                               $names[] = [ $object, null ];
-                       }
-               }
-
-               return $names;
-       }
-
-       /**
-        * Do not call this function outside of SwiftFileBackendFileList
-        *
-        * @param string $path Storage path
-        * @param array $val Stat value
-        */
-       public function loadListingStatInternal( $path, array $val ) {
-               $this->cheapCache->set( $path, 'stat', $val );
-       }
-
-       protected function doGetFileXAttributes( array $params ) {
-               $stat = $this->getFileStat( $params );
-               if ( $stat ) {
-                       if ( !isset( $stat['xattr'] ) ) {
-                               // Stat entries filled by file listings don't include metadata/headers
-                               $this->clearCache( [ $params['src'] ] );
-                               $stat = $this->getFileStat( $params );
-                       }
-
-                       return $stat['xattr'];
-               } else {
-                       return false;
-               }
-       }
-
-       protected function doGetFileSha1base36( array $params ) {
-               $stat = $this->getFileStat( $params );
-               if ( $stat ) {
-                       if ( !isset( $stat['sha1'] ) ) {
-                               // Stat entries filled by file listings don't include SHA1
-                               $this->clearCache( [ $params['src'] ] );
-                               $stat = $this->getFileStat( $params );
-                       }
-
-                       return $stat['sha1'];
-               } else {
-                       return false;
-               }
-       }
-
-       protected function doStreamFile( array $params ) {
-               $status = Status::newGood();
-
-               $flags = !empty( $params['headless'] ) ? StreamFile::STREAM_HEADLESS : 0;
-
-               list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
-               if ( $srcRel === null ) {
-                       StreamFile::send404Message( $params['src'], $flags );
-                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
-
-                       return $status;
-               }
-
-               $auth = $this->getAuthentication();
-               if ( !$auth || !is_array( $this->getContainerStat( $srcCont ) ) ) {
-                       StreamFile::send404Message( $params['src'], $flags );
-                       $status->fatal( 'backend-fail-stream', $params['src'] );
-
-                       return $status;
-               }
-
-               // If "headers" is set, we only want to send them if the file is there.
-               // Do not bother checking if the file exists if headers are not set though.
-               if ( $params['headers'] && !$this->fileExists( $params ) ) {
-                       StreamFile::send404Message( $params['src'], $flags );
-                       $status->fatal( 'backend-fail-stream', $params['src'] );
-
-                       return $status;
-               }
-
-               // Send the requested additional headers
-               foreach ( $params['headers'] as $header ) {
-                       header( $header ); // aways send
-               }
-
-               if ( empty( $params['allowOB'] ) ) {
-                       // Cancel output buffering and gzipping if set
-                       wfResetOutputBuffers();
-               }
-
-               $handle = fopen( 'php://output', 'wb' );
-               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
-                       'method' => 'GET',
-                       'url' => $this->storageUrl( $auth, $srcCont, $srcRel ),
-                       'headers' => $this->authTokenHeaders( $auth )
-                               + $this->headersFromParams( $params ) + $params['options'],
-                       'stream' => $handle,
-                       'flags'  => [ 'relayResponseHeaders' => empty( $params['headless'] ) ]
-               ] );
-
-               if ( $rcode >= 200 && $rcode <= 299 ) {
-                       // good
-               } elseif ( $rcode === 404 ) {
-                       $status->fatal( 'backend-fail-stream', $params['src'] );
-                       // Per bug 41113, nasty things can happen if bad cache entries get
-                       // stuck in cache. It's also possible that this error can come up
-                       // with simple race conditions. Clear out the stat cache to be safe.
-                       $this->clearCache( [ $params['src'] ] );
-                       $this->deleteFileCache( $params['src'] );
-               } else {
-                       $this->onError( $status, __METHOD__, $params, $rerr, $rcode, $rdesc );
-               }
-
-               return $status;
-       }
-
-       protected function doGetLocalCopyMulti( array $params ) {
-               $tmpFiles = [];
-
-               $auth = $this->getAuthentication();
-
-               $ep = array_diff_key( $params, [ 'srcs' => 1 ] ); // for error logging
-               // Blindly create tmp files and stream to them, catching any exception if the file does
-               // not exist. Doing a stat here is useless causes infinite loops in addMissingMetadata().
-               $reqs = []; // (path => op)
-
-               foreach ( $params['srcs'] as $path ) { // each path in this concurrent batch
-                       list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $path );
-                       if ( $srcRel === null || !$auth ) {
-                               $tmpFiles[$path] = null;
-                               continue;
-                       }
-                       // Get source file extension
-                       $ext = FileBackend::extensionFromPath( $path );
-                       // Create a new temporary file...
-                       $tmpFile = TempFSFile::factory( 'localcopy_', $ext );
-                       if ( $tmpFile ) {
-                               $handle = fopen( $tmpFile->getPath(), 'wb' );
-                               if ( $handle ) {
-                                       $reqs[$path] = [
-                                               'method'  => 'GET',
-                                               'url'     => $this->storageUrl( $auth, $srcCont, $srcRel ),
-                                               'headers' => $this->authTokenHeaders( $auth )
-                                                       + $this->headersFromParams( $params ),
-                                               'stream'  => $handle,
-                                       ];
-                               } else {
-                                       $tmpFile = null;
-                               }
-                       }
-                       $tmpFiles[$path] = $tmpFile;
-               }
-
-               $isLatest = ( $this->isRGW || !empty( $params['latest'] ) );
-               $opts = [ 'maxConnsPerHost' => $params['concurrency'] ];
-               $reqs = $this->http->runMulti( $reqs, $opts );
-               foreach ( $reqs as $path => $op ) {
-                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $op['response'];
-                       fclose( $op['stream'] ); // close open handle
-                       if ( $rcode >= 200 && $rcode <= 299 ) {
-                               $size = $tmpFiles[$path] ? $tmpFiles[$path]->getSize() : 0;
-                               // Double check that the disk is not full/broken
-                               if ( $size != $rhdrs['content-length'] ) {
-                                       $tmpFiles[$path] = null;
-                                       $rerr = "Got {$size}/{$rhdrs['content-length']} bytes";
-                                       $this->onError( null, __METHOD__,
-                                               [ 'src' => $path ] + $ep, $rerr, $rcode, $rdesc );
-                               }
-                               // Set the file stat process cache in passing
-                               $stat = $this->getStatFromHeaders( $rhdrs );
-                               $stat['latest'] = $isLatest;
-                               $this->cheapCache->set( $path, 'stat', $stat );
-                       } elseif ( $rcode === 404 ) {
-                               $tmpFiles[$path] = false;
-                       } else {
-                               $tmpFiles[$path] = null;
-                               $this->onError( null, __METHOD__,
-                                       [ 'src' => $path ] + $ep, $rerr, $rcode, $rdesc );
-                       }
-               }
-
-               return $tmpFiles;
-       }
-
-       public function getFileHttpUrl( array $params ) {
-               if ( $this->swiftTempUrlKey != '' ||
-                       ( $this->rgwS3AccessKey != '' && $this->rgwS3SecretKey != '' )
-               ) {
-                       list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
-                       if ( $srcRel === null ) {
-                               return null; // invalid path
-                       }
-
-                       $auth = $this->getAuthentication();
-                       if ( !$auth ) {
-                               return null;
-                       }
-
-                       $ttl = isset( $params['ttl'] ) ? $params['ttl'] : 86400;
-                       $expires = time() + $ttl;
-
-                       if ( $this->swiftTempUrlKey != '' ) {
-                               $url = $this->storageUrl( $auth, $srcCont, $srcRel );
-                               // Swift wants the signature based on the unencoded object name
-                               $contPath = parse_url( $this->storageUrl( $auth, $srcCont ), PHP_URL_PATH );
-                               $signature = hash_hmac( 'sha1',
-                                       "GET\n{$expires}\n{$contPath}/{$srcRel}",
-                                       $this->swiftTempUrlKey
-                               );
-
-                               return "{$url}?temp_url_sig={$signature}&temp_url_expires={$expires}";
-                       } else { // give S3 API URL for rgw
-                               // Path for signature starts with the bucket
-                               $spath = '/' . rawurlencode( $srcCont ) . '/' .
-                                       str_replace( '%2F', '/', rawurlencode( $srcRel ) );
-                               // Calculate the hash
-                               $signature = base64_encode( hash_hmac(
-                                       'sha1',
-                                       "GET\n\n\n{$expires}\n{$spath}",
-                                       $this->rgwS3SecretKey,
-                                       true // raw
-                               ) );
-                               // See http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html.
-                               // Note: adding a newline for empty CanonicalizedAmzHeaders does not work.
-                               return wfAppendQuery(
-                                       str_replace( '/swift/v1', '', // S3 API is the rgw default
-                                               $this->storageUrl( $auth ) . $spath ),
-                                       [
-                                               'Signature' => $signature,
-                                               'Expires' => $expires,
-                                               'AWSAccessKeyId' => $this->rgwS3AccessKey ]
-                               );
-                       }
-               }
-
-               return null;
-       }
-
-       protected function directoriesAreVirtual() {
-               return true;
-       }
-
-       /**
-        * Get headers to send to Swift when reading a file based
-        * on a FileBackend params array, e.g. that of getLocalCopy().
-        * $params is currently only checked for a 'latest' flag.
-        *
-        * @param array $params
-        * @return array
-        */
-       protected function headersFromParams( array $params ) {
-               $hdrs = [];
-               if ( !empty( $params['latest'] ) ) {
-                       $hdrs['x-newest'] = 'true';
-               }
-
-               return $hdrs;
-       }
-
-       /**
-        * @param FileBackendStoreOpHandle[] $fileOpHandles
-        *
-        * @return Status[]
-        */
-       protected function doExecuteOpHandlesInternal( array $fileOpHandles ) {
-               $statuses = [];
-
-               $auth = $this->getAuthentication();
-               if ( !$auth ) {
-                       foreach ( $fileOpHandles as $index => $fileOpHandle ) {
-                               $statuses[$index] = Status::newFatal( 'backend-fail-connect', $this->name );
-                       }
-
-                       return $statuses;
-               }
-
-               // Split the HTTP requests into stages that can be done concurrently
-               $httpReqsByStage = []; // map of (stage => index => HTTP request)
-               foreach ( $fileOpHandles as $index => $fileOpHandle ) {
-                       $reqs = $fileOpHandle->httpOp;
-                       // Convert the 'url' parameter to an actual URL using $auth
-                       foreach ( $reqs as $stage => &$req ) {
-                               list( $container, $relPath ) = $req['url'];
-                               $req['url'] = $this->storageUrl( $auth, $container, $relPath );
-                               $req['headers'] = isset( $req['headers'] ) ? $req['headers'] : [];
-                               $req['headers'] = $this->authTokenHeaders( $auth ) + $req['headers'];
-                               $httpReqsByStage[$stage][$index] = $req;
-                       }
-                       $statuses[$index] = Status::newGood();
-               }
-
-               // Run all requests for the first stage, then the next, and so on
-               $reqCount = count( $httpReqsByStage );
-               for ( $stage = 0; $stage < $reqCount; ++$stage ) {
-                       $httpReqs = $this->http->runMulti( $httpReqsByStage[$stage] );
-                       foreach ( $httpReqs as $index => $httpReq ) {
-                               // Run the callback for each request of this operation
-                               $callback = $fileOpHandles[$index]->callback;
-                               call_user_func_array( $callback, [ $httpReq, $statuses[$index] ] );
-                               // On failure, abort all remaining requests for this operation
-                               // (e.g. abort the DELETE request if the COPY request fails for a move)
-                               if ( !$statuses[$index]->isOK() ) {
-                                       $stages = count( $fileOpHandles[$index]->httpOp );
-                                       for ( $s = ( $stage + 1 ); $s < $stages; ++$s ) {
-                                               unset( $httpReqsByStage[$s][$index] );
-                                       }
-                               }
-                       }
-               }
-
-               return $statuses;
-       }
-
-       /**
-        * Set read/write permissions for a Swift container.
-        *
-        * @see http://swift.openstack.org/misc.html#acls
-        *
-        * In general, we don't allow listings to end-users. It's not useful, isn't well-defined
-        * (lists are truncated to 10000 item with no way to page), and is just a performance risk.
-        *
-        * @param string $container Resolved Swift container
-        * @param array $readGrps List of the possible criteria for a request to have
-        * access to read a container. Each item is one of the following formats:
-        *   - account:user        : Grants access if the request is by the given user
-        *   - ".r:<regex>"        : Grants access if the request is from a referrer host that
-        *                           matches the expression and the request is not for a listing.
-        *                           Setting this to '*' effectively makes a container public.
-        *   -".rlistings:<regex>" : Grants access if the request is from a referrer host that
-        *                           matches the expression and the request is for a listing.
-        * @param array $writeGrps A list of the possible criteria for a request to have
-        * access to write to a container. Each item is of the following format:
-        *   - account:user       : Grants access if the request is by the given user
-        * @return Status
-        */
-       protected function setContainerAccess( $container, array $readGrps, array $writeGrps ) {
-               $status = Status::newGood();
-               $auth = $this->getAuthentication();
-
-               if ( !$auth ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-
-                       return $status;
-               }
-
-               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
-                       'method' => 'POST',
-                       'url' => $this->storageUrl( $auth, $container ),
-                       'headers' => $this->authTokenHeaders( $auth ) + [
-                               'x-container-read' => implode( ',', $readGrps ),
-                               'x-container-write' => implode( ',', $writeGrps )
-                       ]
-               ] );
-
-               if ( $rcode != 204 && $rcode !== 202 ) {
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       wfDebugLog( 'SwiftBackend', __METHOD__ . ': unexpected rcode value (' . $rcode . ')' );
-               }
-
-               return $status;
-       }
-
-       /**
-        * Get a Swift container stat array, possibly from process cache.
-        * Use $reCache if the file count or byte count is needed.
-        *
-        * @param string $container Container name
-        * @param bool $bypassCache Bypass all caches and load from Swift
-        * @return array|bool|null False on 404, null on failure
-        */
-       protected function getContainerStat( $container, $bypassCache = false ) {
-               $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" );
-
-               if ( $bypassCache ) { // purge cache
-                       $this->containerStatCache->clear( $container );
-               } elseif ( !$this->containerStatCache->has( $container, 'stat' ) ) {
-                       $this->primeContainerCache( [ $container ] ); // check persistent cache
-               }
-               if ( !$this->containerStatCache->has( $container, 'stat' ) ) {
-                       $auth = $this->getAuthentication();
-                       if ( !$auth ) {
-                               return null;
-                       }
-
-                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
-                               'method' => 'HEAD',
-                               'url' => $this->storageUrl( $auth, $container ),
-                               'headers' => $this->authTokenHeaders( $auth )
-                       ] );
-
-                       if ( $rcode === 204 ) {
-                               $stat = [
-                                       'count' => $rhdrs['x-container-object-count'],
-                                       'bytes' => $rhdrs['x-container-bytes-used']
-                               ];
-                               if ( $bypassCache ) {
-                                       return $stat;
-                               } else {
-                                       $this->containerStatCache->set( $container, 'stat', $stat ); // cache it
-                                       $this->setContainerCache( $container, $stat ); // update persistent cache
-                               }
-                       } elseif ( $rcode === 404 ) {
-                               return false;
-                       } else {
-                               $this->onError( null, __METHOD__,
-                                       [ 'cont' => $container ], $rerr, $rcode, $rdesc );
-
-                               return null;
-                       }
-               }
-
-               return $this->containerStatCache->get( $container, 'stat' );
-       }
-
-       /**
-        * Create a Swift container
-        *
-        * @param string $container Container name
-        * @param array $params
-        * @return Status
-        */
-       protected function createContainer( $container, array $params ) {
-               $status = Status::newGood();
-
-               $auth = $this->getAuthentication();
-               if ( !$auth ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-
-                       return $status;
-               }
-
-               // @see SwiftFileBackend::setContainerAccess()
-               if ( empty( $params['noAccess'] ) ) {
-                       $readGrps = [ '.r:*', $this->swiftUser ]; // public
-               } else {
-                       $readGrps = [ $this->swiftUser ]; // private
-               }
-               $writeGrps = [ $this->swiftUser ]; // sanity
-
-               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
-                       'method' => 'PUT',
-                       'url' => $this->storageUrl( $auth, $container ),
-                       'headers' => $this->authTokenHeaders( $auth ) + [
-                               'x-container-read' => implode( ',', $readGrps ),
-                               'x-container-write' => implode( ',', $writeGrps )
-                       ]
-               ] );
-
-               if ( $rcode === 201 ) { // new
-                       // good
-               } elseif ( $rcode === 202 ) { // already there
-                       // this shouldn't really happen, but is OK
-               } else {
-                       $this->onError( $status, __METHOD__, $params, $rerr, $rcode, $rdesc );
-               }
-
-               return $status;
-       }
-
-       /**
-        * Delete a Swift container
-        *
-        * @param string $container Container name
-        * @param array $params
-        * @return Status
-        */
-       protected function deleteContainer( $container, array $params ) {
-               $status = Status::newGood();
-
-               $auth = $this->getAuthentication();
-               if ( !$auth ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-
-                       return $status;
-               }
-
-               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
-                       'method' => 'DELETE',
-                       'url' => $this->storageUrl( $auth, $container ),
-                       'headers' => $this->authTokenHeaders( $auth )
-               ] );
-
-               if ( $rcode >= 200 && $rcode <= 299 ) { // deleted
-                       $this->containerStatCache->clear( $container ); // purge
-               } elseif ( $rcode === 404 ) { // not there
-                       // this shouldn't really happen, but is OK
-               } elseif ( $rcode === 409 ) { // not empty
-                       $this->onError( $status, __METHOD__, $params, $rerr, $rcode, $rdesc ); // race?
-               } else {
-                       $this->onError( $status, __METHOD__, $params, $rerr, $rcode, $rdesc );
-               }
-
-               return $status;
-       }
-
-       /**
-        * Get a list of objects under a container.
-        * Either just the names or a list of stdClass objects with details can be returned.
-        *
-        * @param string $fullCont
-        * @param string $type ('info' for a list of object detail maps, 'names' for names only)
-        * @param int $limit
-        * @param string|null $after
-        * @param string|null $prefix
-        * @param string|null $delim
-        * @return Status With the list as value
-        */
-       private function objectListing(
-               $fullCont, $type, $limit, $after = null, $prefix = null, $delim = null
-       ) {
-               $status = Status::newGood();
-
-               $auth = $this->getAuthentication();
-               if ( !$auth ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-
-                       return $status;
-               }
-
-               $query = [ 'limit' => $limit ];
-               if ( $type === 'info' ) {
-                       $query['format'] = 'json';
-               }
-               if ( $after !== null ) {
-                       $query['marker'] = $after;
-               }
-               if ( $prefix !== null ) {
-                       $query['prefix'] = $prefix;
-               }
-               if ( $delim !== null ) {
-                       $query['delimiter'] = $delim;
-               }
-
-               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
-                       'method' => 'GET',
-                       'url' => $this->storageUrl( $auth, $fullCont ),
-                       'query' => $query,
-                       'headers' => $this->authTokenHeaders( $auth )
-               ] );
-
-               $params = [ 'cont' => $fullCont, 'prefix' => $prefix, 'delim' => $delim ];
-               if ( $rcode === 200 ) { // good
-                       if ( $type === 'info' ) {
-                               $status->value = FormatJson::decode( trim( $rbody ) );
-                       } else {
-                               $status->value = explode( "\n", trim( $rbody ) );
-                       }
-               } elseif ( $rcode === 204 ) {
-                       $status->value = []; // empty container
-               } elseif ( $rcode === 404 ) {
-                       $status->value = []; // no container
-               } else {
-                       $this->onError( $status, __METHOD__, $params, $rerr, $rcode, $rdesc );
-               }
-
-               return $status;
-       }
-
-       protected function doPrimeContainerCache( array $containerInfo ) {
-               foreach ( $containerInfo as $container => $info ) {
-                       $this->containerStatCache->set( $container, 'stat', $info );
-               }
-       }
-
-       protected function doGetFileStatMulti( array $params ) {
-               $stats = [];
-
-               $auth = $this->getAuthentication();
-
-               $reqs = [];
-               foreach ( $params['srcs'] as $path ) {
-                       list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $path );
-                       if ( $srcRel === null ) {
-                               $stats[$path] = false;
-                               continue; // invalid storage path
-                       } elseif ( !$auth ) {
-                               $stats[$path] = null;
-                               continue;
-                       }
-
-                       // (a) Check the container
-                       $cstat = $this->getContainerStat( $srcCont );
-                       if ( $cstat === false ) {
-                               $stats[$path] = false;
-                               continue; // ok, nothing to do
-                       } elseif ( !is_array( $cstat ) ) {
-                               $stats[$path] = null;
-                               continue;
-                       }
-
-                       $reqs[$path] = [
-                               'method'  => 'HEAD',
-                               'url'     => $this->storageUrl( $auth, $srcCont, $srcRel ),
-                               'headers' => $this->authTokenHeaders( $auth ) + $this->headersFromParams( $params )
-                       ];
-               }
-
-               $opts = [ 'maxConnsPerHost' => $params['concurrency'] ];
-               $reqs = $this->http->runMulti( $reqs, $opts );
-
-               foreach ( $params['srcs'] as $path ) {
-                       if ( array_key_exists( $path, $stats ) ) {
-                               continue; // some sort of failure above
-                       }
-                       // (b) Check the file
-                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $reqs[$path]['response'];
-                       if ( $rcode === 200 || $rcode === 204 ) {
-                               // Update the object if it is missing some headers
-                               $rhdrs = $this->addMissingMetadata( $rhdrs, $path );
-                               // Load the stat array from the headers
-                               $stat = $this->getStatFromHeaders( $rhdrs );
-                               if ( $this->isRGW ) {
-                                       $stat['latest'] = true; // strong consistency
-                               }
-                       } elseif ( $rcode === 404 ) {
-                               $stat = false;
-                       } else {
-                               $stat = null;
-                               $this->onError( null, __METHOD__, $params, $rerr, $rcode, $rdesc );
-                       }
-                       $stats[$path] = $stat;
-               }
-
-               return $stats;
-       }
-
-       /**
-        * @param array $rhdrs
-        * @return array
-        */
-       protected function getStatFromHeaders( array $rhdrs ) {
-               // Fetch all of the custom metadata headers
-               $metadata = $this->getMetadata( $rhdrs );
-               // Fetch all of the custom raw HTTP headers
-               $headers = $this->sanitizeHdrs( [ 'headers' => $rhdrs ] );
-
-               return [
-                       // Convert various random Swift dates to TS_MW
-                       'mtime' => $this->convertSwiftDate( $rhdrs['last-modified'], TS_MW ),
-                       // Empty objects actually return no content-length header in Ceph
-                       'size'  => isset( $rhdrs['content-length'] ) ? (int)$rhdrs['content-length'] : 0,
-                       'sha1'  => isset( $metadata['sha1base36'] ) ? $metadata['sha1base36'] : null,
-                       // Note: manifiest ETags are not an MD5 of the file
-                       'md5'   => ctype_xdigit( $rhdrs['etag'] ) ? $rhdrs['etag'] : null,
-                       'xattr' => [ 'metadata' => $metadata, 'headers' => $headers ]
-               ];
-       }
-
-       /**
-        * @return array|null Credential map
-        */
-       protected function getAuthentication() {
-               if ( $this->authErrorTimestamp !== null ) {
-                       if ( ( time() - $this->authErrorTimestamp ) < 60 ) {
-                               return null; // failed last attempt; don't bother
-                       } else { // actually retry this time
-                               $this->authErrorTimestamp = null;
-                       }
-               }
-               // Session keys expire after a while, so we renew them periodically
-               $reAuth = ( ( time() - $this->authSessionTimestamp ) > $this->authTTL );
-               // Authenticate with proxy and get a session key...
-               if ( !$this->authCreds || $reAuth ) {
-                       $this->authSessionTimestamp = 0;
-                       $cacheKey = $this->getCredsCacheKey( $this->swiftUser );
-                       $creds = $this->srvCache->get( $cacheKey ); // credentials
-                       // Try to use the credential cache
-                       if ( isset( $creds['auth_token'] ) && isset( $creds['storage_url'] ) ) {
-                               $this->authCreds = $creds;
-                               // Skew the timestamp for worst case to avoid using stale credentials
-                               $this->authSessionTimestamp = time() - ceil( $this->authTTL / 2 );
-                       } else { // cache miss
-                               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
-                                       'method' => 'GET',
-                                       'url' => "{$this->swiftAuthUrl}/v1.0",
-                                       'headers' => [
-                                               'x-auth-user' => $this->swiftUser,
-                                               'x-auth-key' => $this->swiftKey
-                                       ]
-                               ] );
-
-                               if ( $rcode >= 200 && $rcode <= 299 ) { // OK
-                                       $this->authCreds = [
-                                               'auth_token' => $rhdrs['x-auth-token'],
-                                               'storage_url' => $rhdrs['x-storage-url']
-                                       ];
-                                       $this->srvCache->set( $cacheKey, $this->authCreds, ceil( $this->authTTL / 2 ) );
-                                       $this->authSessionTimestamp = time();
-                               } elseif ( $rcode === 401 ) {
-                                       $this->onError( null, __METHOD__, [], "Authentication failed.", $rcode );
-                                       $this->authErrorTimestamp = time();
-
-                                       return null;
-                               } else {
-                                       $this->onError( null, __METHOD__, [], "HTTP return code: $rcode", $rcode );
-                                       $this->authErrorTimestamp = time();
-
-                                       return null;
-                               }
-                       }
-                       // Ceph RGW does not use <account> in URLs (OpenStack Swift uses "/v1/<account>")
-                       if ( substr( $this->authCreds['storage_url'], -3 ) === '/v1' ) {
-                               $this->isRGW = true; // take advantage of strong consistency in Ceph
-                       }
-               }
-
-               return $this->authCreds;
-       }
-
-       /**
-        * @param array $creds From getAuthentication()
-        * @param string $container
-        * @param string $object
-        * @return array
-        */
-       protected function storageUrl( array $creds, $container = null, $object = null ) {
-               $parts = [ $creds['storage_url'] ];
-               if ( strlen( $container ) ) {
-                       $parts[] = rawurlencode( $container );
-               }
-               if ( strlen( $object ) ) {
-                       $parts[] = str_replace( "%2F", "/", rawurlencode( $object ) );
-               }
-
-               return implode( '/', $parts );
-       }
-
-       /**
-        * @param array $creds From getAuthentication()
-        * @return array
-        */
-       protected function authTokenHeaders( array $creds ) {
-               return [ 'x-auth-token' => $creds['auth_token'] ];
-       }
-
-       /**
-        * Get the cache key for a container
-        *
-        * @param string $username
-        * @return string
-        */
-       private function getCredsCacheKey( $username ) {
-               return 'swiftcredentials:' . md5( $username . ':' . $this->swiftAuthUrl );
-       }
-
-       /**
-        * Log an unexpected exception for this backend.
-        * This also sets the Status object to have a fatal error.
-        *
-        * @param Status|null $status
-        * @param string $func
-        * @param array $params
-        * @param string $err Error string
-        * @param int $code HTTP status
-        * @param string $desc HTTP status description
-        */
-       public function onError( $status, $func, array $params, $err = '', $code = 0, $desc = '' ) {
-               if ( $status instanceof Status ) {
-                       $status->fatal( 'backend-fail-internal', $this->name );
-               }
-               if ( $code == 401 ) { // possibly a stale token
-                       $this->srvCache->delete( $this->getCredsCacheKey( $this->swiftUser ) );
-               }
-               wfDebugLog( 'SwiftBackend',
-                       "HTTP $code ($desc) in '{$func}' (given '" . FormatJson::encode( $params ) . "')" .
-                       ( $err ? ": $err" : "" )
-               );
-       }
-}
-
-/**
- * @see FileBackendStoreOpHandle
- */
-class SwiftFileOpHandle extends FileBackendStoreOpHandle {
-       /** @var array List of Requests for MultiHttpClient */
-       public $httpOp;
-       /** @var Closure */
-       public $callback;
-
-       /**
-        * @param SwiftFileBackend $backend
-        * @param Closure $callback Function that takes (HTTP request array, status)
-        * @param array $httpOp MultiHttpClient op
-        */
-       public function __construct( SwiftFileBackend $backend, Closure $callback, array $httpOp ) {
-               $this->backend = $backend;
-               $this->callback = $callback;
-               $this->httpOp = $httpOp;
-       }
-}
-
-/**
- * SwiftFileBackend helper class to page through listings.
- * Swift also has a listing limit of 10,000 objects for sanity.
- * Do not use this class from places outside SwiftFileBackend.
- *
- * @ingroup FileBackend
- */
-abstract class SwiftFileBackendList implements Iterator {
-       /** @var array List of path or (path,stat array) entries */
-       protected $bufferIter = [];
-
-       /** @var string List items *after* this path */
-       protected $bufferAfter = null;
-
-       /** @var int */
-       protected $pos = 0;
-
-       /** @var array */
-       protected $params = [];
-
-       /** @var SwiftFileBackend */
-       protected $backend;
-
-       /** @var string Container name */
-       protected $container;
-
-       /** @var string Storage directory */
-       protected $dir;
-
-       /** @var int */
-       protected $suffixStart;
-
-       const PAGE_SIZE = 9000; // file listing buffer size
-
-       /**
-        * @param SwiftFileBackend $backend
-        * @param string $fullCont Resolved container name
-        * @param string $dir Resolved directory relative to container
-        * @param array $params
-        */
-       public function __construct( SwiftFileBackend $backend, $fullCont, $dir, array $params ) {
-               $this->backend = $backend;
-               $this->container = $fullCont;
-               $this->dir = $dir;
-               if ( substr( $this->dir, -1 ) === '/' ) {
-                       $this->dir = substr( $this->dir, 0, -1 ); // remove trailing slash
-               }
-               if ( $this->dir == '' ) { // whole container
-                       $this->suffixStart = 0;
-               } else { // dir within container
-                       $this->suffixStart = strlen( $this->dir ) + 1; // size of "path/to/dir/"
-               }
-               $this->params = $params;
-       }
-
-       /**
-        * @see Iterator::key()
-        * @return int
-        */
-       public function key() {
-               return $this->pos;
-       }
-
-       /**
-        * @see Iterator::next()
-        */
-       public function next() {
-               // Advance to the next file in the page
-               next( $this->bufferIter );
-               ++$this->pos;
-               // Check if there are no files left in this page and
-               // advance to the next page if this page was not empty.
-               if ( !$this->valid() && count( $this->bufferIter ) ) {
-                       $this->bufferIter = $this->pageFromList(
-                               $this->container, $this->dir, $this->bufferAfter, self::PAGE_SIZE, $this->params
-                       ); // updates $this->bufferAfter
-               }
-       }
-
-       /**
-        * @see Iterator::rewind()
-        */
-       public function rewind() {
-               $this->pos = 0;
-               $this->bufferAfter = null;
-               $this->bufferIter = $this->pageFromList(
-                       $this->container, $this->dir, $this->bufferAfter, self::PAGE_SIZE, $this->params
-               ); // updates $this->bufferAfter
-       }
-
-       /**
-        * @see Iterator::valid()
-        * @return bool
-        */
-       public function valid() {
-               if ( $this->bufferIter === null ) {
-                       return false; // some failure?
-               } else {
-                       return ( current( $this->bufferIter ) !== false ); // no paths can have this value
-               }
-       }
-
-       /**
-        * Get the given list portion (page)
-        *
-        * @param string $container Resolved container name
-        * @param string $dir Resolved path relative to container
-        * @param string $after
-        * @param int $limit
-        * @param array $params
-        * @return Traversable|array
-        */
-       abstract protected function pageFromList( $container, $dir, &$after, $limit, array $params );
-}
-
-/**
- * Iterator for listing directories
- */
-class SwiftFileBackendDirList extends SwiftFileBackendList {
-       /**
-        * @see Iterator::current()
-        * @return string|bool String (relative path) or false
-        */
-       public function current() {
-               return substr( current( $this->bufferIter ), $this->suffixStart, -1 );
-       }
-
-       protected function pageFromList( $container, $dir, &$after, $limit, array $params ) {
-               return $this->backend->getDirListPageInternal( $container, $dir, $after, $limit, $params );
-       }
-}
-
-/**
- * Iterator for listing regular files
- */
-class SwiftFileBackendFileList extends SwiftFileBackendList {
-       /**
-        * @see Iterator::current()
-        * @return string|bool String (relative path) or false
-        */
-       public function current() {
-               list( $path, $stat ) = current( $this->bufferIter );
-               $relPath = substr( $path, $this->suffixStart );
-               if ( is_array( $stat ) ) {
-                       $storageDir = rtrim( $this->params['dir'], '/' );
-                       $this->backend->loadListingStatInternal( "$storageDir/$relPath", $stat );
-               }
-
-               return $relPath;
-       }
-
-       protected function pageFromList( $container, $dir, &$after, $limit, array $params ) {
-               return $this->backend->getFileListPageInternal( $container, $dir, $after, $limit, $params );
-       }
-}
diff --git a/includes/filebackend/TempFSFile.php b/includes/filebackend/TempFSFile.php
deleted file mode 100644 (file)
index f572840..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-<?php
-/**
- * Location holder of files stored temporarily
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileBackend
- */
-
-/**
- * This class is used to hold the location and do limited manipulation
- * of files stored temporarily (this will be whatever wfTempDir() returns)
- *
- * @ingroup FileBackend
- */
-class TempFSFile extends FSFile {
-       /** @var bool Garbage collect the temp file */
-       protected $canDelete = false;
-
-       /** @var array Map of (path => 1) for paths to delete on shutdown */
-       protected static $pathsCollect = null;
-
-       public function __construct( $path ) {
-               parent::__construct( $path );
-
-               if ( self::$pathsCollect === null ) {
-                       self::$pathsCollect = [];
-                       register_shutdown_function( [ __CLASS__, 'purgeAllOnShutdown' ] );
-               }
-       }
-
-       /**
-        * Make a new temporary file on the file system.
-        * Temporary files may be purged when the file object falls out of scope.
-        *
-        * @param string $prefix
-        * @param string $extension
-        * @return TempFSFile|null
-        */
-       public static function factory( $prefix, $extension = '' ) {
-               $ext = ( $extension != '' ) ? ".{$extension}" : '';
-
-               $attempts = 5;
-               while ( $attempts-- ) {
-                       $path = wfTempDir() . '/' . $prefix . wfRandomString( 12 ) . $ext;
-                       MediaWiki\suppressWarnings();
-                       $newFileHandle = fopen( $path, 'x' );
-                       MediaWiki\restoreWarnings();
-                       if ( $newFileHandle ) {
-                               fclose( $newFileHandle );
-                               $tmpFile = new self( $path );
-                               $tmpFile->autocollect();
-                               // Safely instantiated, end loop.
-                               return $tmpFile;
-                       }
-               }
-
-               // Give up
-               return null;
-       }
-
-       /**
-        * Purge this file off the file system
-        *
-        * @return bool Success
-        */
-       public function purge() {
-               $this->canDelete = false; // done
-               MediaWiki\suppressWarnings();
-               $ok = unlink( $this->path );
-               MediaWiki\restoreWarnings();
-
-               unset( self::$pathsCollect[$this->path] );
-
-               return $ok;
-       }
-
-       /**
-        * Clean up the temporary file only after an object goes out of scope
-        *
-        * @param object $object
-        * @return TempFSFile This object
-        */
-       public function bind( $object ) {
-               if ( is_object( $object ) ) {
-                       if ( !isset( $object->tempFSFileReferences ) ) {
-                               // Init first since $object might use __get() and return only a copy variable
-                               $object->tempFSFileReferences = [];
-                       }
-                       $object->tempFSFileReferences[] = $this;
-               }
-
-               return $this;
-       }
-
-       /**
-        * Set flag to not clean up after the temporary file
-        *
-        * @return TempFSFile This object
-        */
-       public function preserve() {
-               $this->canDelete = false;
-
-               unset( self::$pathsCollect[$this->path] );
-
-               return $this;
-       }
-
-       /**
-        * Set flag clean up after the temporary file
-        *
-        * @return TempFSFile This object
-        */
-       public function autocollect() {
-               $this->canDelete = true;
-
-               self::$pathsCollect[$this->path] = 1;
-
-               return $this;
-       }
-
-       /**
-        * Try to make sure that all files are purged on error
-        *
-        * This method should only be called internally
-        */
-       public static function purgeAllOnShutdown() {
-               foreach ( self::$pathsCollect as $path ) {
-                       MediaWiki\suppressWarnings();
-                       unlink( $path );
-                       MediaWiki\restoreWarnings();
-               }
-       }
-
-       /**
-        * Cleans up after the temporary file by deleting it
-        */
-       function __destruct() {
-               if ( $this->canDelete ) {
-                       $this->purge();
-               }
-       }
-}
index 7efb3a1..2e06c40 100644 (file)
@@ -48,10 +48,10 @@ class DBFileJournal extends FileJournal {
         * @see FileJournal::logChangeBatch()
         * @param array $entries
         * @param string $batchId
-        * @return Status
+        * @return StatusValue
         */
        protected function doLogChangeBatch( array $entries, $batchId ) {
-               $status = Status::newGood();
+               $status = StatusValue::newGood();
 
                try {
                        $dbw = $this->getMasterDB();
@@ -151,11 +151,11 @@ class DBFileJournal extends FileJournal {
 
        /**
         * @see FileJournal::purgeOldLogs()
-        * @return Status
+        * @return StatusValue
         * @throws DBError
         */
        protected function doPurgeOldLogs() {
-               $status = Status::newGood();
+               $status = StatusValue::newGood();
                if ( $this->ttlDays <= 0 ) {
                        return $status; // nothing to do
                }
diff --git a/includes/filebackend/filejournal/FileJournal.php b/includes/filebackend/filejournal/FileJournal.php
deleted file mode 100644 (file)
index b84e195..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-<?php
-/**
- * @defgroup FileJournal File journal
- * @ingroup FileBackend
- */
-
-/**
- * File operation journaling.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup FileJournal
- * @author Aaron Schulz
- */
-
-/**
- * @brief Class for handling file operation journaling.
- *
- * Subclasses should avoid throwing exceptions at all costs.
- *
- * @ingroup FileJournal
- * @since 1.20
- */
-abstract class FileJournal {
-       /** @var string */
-       protected $backend;
-
-       /** @var int */
-       protected $ttlDays;
-
-       /**
-        * Construct a new instance from configuration.
-        *
-        * @param array $config Includes:
-        *     'ttlDays' : days to keep log entries around (false means "forever")
-        */
-       protected function __construct( array $config ) {
-               $this->ttlDays = isset( $config['ttlDays'] ) ? $config['ttlDays'] : false;
-       }
-
-       /**
-        * Create an appropriate FileJournal object from config
-        *
-        * @param array $config
-        * @param string $backend A registered file backend name
-        * @throws Exception
-        * @return FileJournal
-        */
-       final public static function factory( array $config, $backend ) {
-               $class = $config['class'];
-               $jrn = new $class( $config );
-               if ( !$jrn instanceof self ) {
-                       throw new Exception( "Class given is not an instance of FileJournal." );
-               }
-               $jrn->backend = $backend;
-
-               return $jrn;
-       }
-
-       /**
-        * Get a statistically unique ID string
-        *
-        * @return string <9 char TS_MW timestamp in base 36><22 random base 36 chars>
-        */
-       final public function getTimestampedUUID() {
-               $s = '';
-               for ( $i = 0; $i < 5; $i++ ) {
-                       $s .= mt_rand( 0, 2147483647 );
-               }
-               $s = Wikimedia\base_convert( sha1( $s ), 16, 36, 31 );
-
-               return substr( Wikimedia\base_convert( wfTimestamp( TS_MW ), 10, 36, 9 ) . $s, 0, 31 );
-       }
-
-       /**
-        * Log changes made by a batch file operation.
-        *
-        * @param array $entries List of file operations (each an array of parameters) which contain:
-        *     op      : Basic operation name (create, update, delete)
-        *     path    : The storage path of the file
-        *     newSha1 : The final base 36 SHA-1 of the file
-        *   Note that 'false' should be used as the SHA-1 for non-existing files.
-        * @param string $batchId UUID string that identifies the operation batch
-        * @return Status
-        */
-       final public function logChangeBatch( array $entries, $batchId ) {
-               if ( !count( $entries ) ) {
-                       return Status::newGood();
-               }
-
-               return $this->doLogChangeBatch( $entries, $batchId );
-       }
-
-       /**
-        * @see FileJournal::logChangeBatch()
-        *
-        * @param array $entries List of file operations (each an array of parameters)
-        * @param string $batchId UUID string that identifies the operation batch
-        * @return Status
-        */
-       abstract protected function doLogChangeBatch( array $entries, $batchId );
-
-       /**
-        * Get the position ID of the latest journal entry
-        *
-        * @return int|bool
-        */
-       final public function getCurrentPosition() {
-               return $this->doGetCurrentPosition();
-       }
-
-       /**
-        * @see FileJournal::getCurrentPosition()
-        * @return int|bool
-        */
-       abstract protected function doGetCurrentPosition();
-
-       /**
-        * Get the position ID of the latest journal entry at some point in time
-        *
-        * @param int|string $time Timestamp
-        * @return int|bool
-        */
-       final public function getPositionAtTime( $time ) {
-               return $this->doGetPositionAtTime( $time );
-       }
-
-       /**
-        * @see FileJournal::getPositionAtTime()
-        * @param int|string $time Timestamp
-        * @return int|bool
-        */
-       abstract protected function doGetPositionAtTime( $time );
-
-       /**
-        * Get an array of file change log entries.
-        * A starting change ID and/or limit can be specified.
-        *
-        * @param int $start Starting change ID or null
-        * @param int $limit Maximum number of items to return
-        * @param string &$next Updated to the ID of the next entry.
-        * @return array List of associative arrays, each having:
-        *     id         : unique, monotonic, ID for this change
-        *     batch_uuid : UUID for an operation batch
-        *     backend    : the backend name
-        *     op         : primitive operation (create,update,delete,null)
-        *     path       : affected storage path
-        *     new_sha1   : base 36 sha1 of the new file had the operation succeeded
-        *     timestamp  : TS_MW timestamp of the batch change
-        *   Also, $next is updated to the ID of the next entry.
-        */
-       final public function getChangeEntries( $start = null, $limit = 0, &$next = null ) {
-               $entries = $this->doGetChangeEntries( $start, $limit ? $limit + 1 : 0 );
-               if ( $limit && count( $entries ) > $limit ) {
-                       $last = array_pop( $entries ); // remove the extra entry
-                       $next = $last['id']; // update for next call
-               } else {
-                       $next = null; // end of list
-               }
-
-               return $entries;
-       }
-
-       /**
-        * @see FileJournal::getChangeEntries()
-        * @param int $start
-        * @param int $limit
-        * @return array
-        */
-       abstract protected function doGetChangeEntries( $start, $limit );
-
-       /**
-        * Purge any old log entries
-        *
-        * @return Status
-        */
-       final public function purgeOldLogs() {
-               return $this->doPurgeOldLogs();
-       }
-
-       /**
-        * @see FileJournal::purgeOldLogs()
-        * @return Status
-        */
-       abstract protected function doPurgeOldLogs();
-}
-
-/**
- * Simple version of FileJournal that does nothing
- * @since 1.20
- */
-class NullFileJournal extends FileJournal {
-       /**
-        * @see FileJournal::doLogChangeBatch()
-        * @param array $entries
-        * @param string $batchId
-        * @return Status
-        */
-       protected function doLogChangeBatch( array $entries, $batchId ) {
-               return Status::newGood();
-       }
-
-       /**
-        * @see FileJournal::doGetCurrentPosition()
-        * @return int|bool
-        */
-       protected function doGetCurrentPosition() {
-               return false;
-       }
-
-       /**
-        * @see FileJournal::doGetPositionAtTime()
-        * @param int|string $time Timestamp
-        * @return int|bool
-        */
-       protected function doGetPositionAtTime( $time ) {
-               return false;
-       }
-
-       /**
-        * @see FileJournal::doGetChangeEntries()
-        * @param int $start
-        * @param int $limit
-        * @return array
-        */
-       protected function doGetChangeEntries( $start, $limit ) {
-               return [];
-       }
-
-       /**
-        * @see FileJournal::doPurgeOldLogs()
-        * @return Status
-        */
-       protected function doPurgeOldLogs() {
-               return Status::newGood();
-       }
-}
diff --git a/includes/filebackend/lockmanager/DBLockManager.php b/includes/filebackend/lockmanager/DBLockManager.php
deleted file mode 100644 (file)
index cccf71a..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-<?php
-/**
- * Version of LockManager based on using DB table locks.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup LockManager
- */
-
-/**
- * Version of LockManager based on using named/row DB locks.
- *
- * This is meant for multi-wiki systems that may share files.
- *
- * All lock requests for a resource, identified by a hash string, will map to one bucket.
- * Each bucket maps to one or several peer DBs, each on their own server.
- * A majority of peer DBs must agree for a lock to be acquired.
- *
- * Caching is used to avoid hitting servers that are down.
- *
- * @ingroup LockManager
- * @since 1.19
- */
-abstract class DBLockManager extends QuorumLockManager {
-       /** @var array[] Map of DB names to server config */
-       protected $dbServers; // (DB name => server config array)
-       /** @var BagOStuff */
-       protected $statusCache;
-
-       protected $lockExpiry; // integer number of seconds
-       protected $safeDelay; // integer number of seconds
-
-       protected $session = 0; // random integer
-       /** @var IDatabase[] Map Database connections (DB name => Database) */
-       protected $conns = [];
-
-       /**
-        * Construct a new instance from configuration.
-        *
-        * @param array $config Parameters include:
-        *   - dbServers   : Associative array of DB names to server configuration.
-        *                   Configuration is an associative array that includes:
-        *                     - host        : DB server name
-        *                     - dbname      : DB name
-        *                     - type        : DB type (mysql,postgres,...)
-        *                     - user        : DB user
-        *                     - password    : DB user password
-        *                     - tablePrefix : DB table prefix
-        *                     - flags       : DB flags (see DatabaseBase)
-        *   - dbsByBucket : Array of 1-16 consecutive integer keys, starting from 0,
-        *                   each having an odd-numbered list of DB names (peers) as values.
-        *                   Any DB named 'localDBMaster' will automatically use the DB master
-        *                   settings for this wiki (without the need for a dbServers entry).
-        *                   Only use 'localDBMaster' if the domain is a valid wiki ID.
-        *   - lockExpiry  : Lock timeout (seconds) for dropped connections. [optional]
-        *                   This tells the DB server how long to wait before assuming
-        *                   connection failure and releasing all the locks for a session.
-        */
-       public function __construct( array $config ) {
-               parent::__construct( $config );
-
-               $this->dbServers = isset( $config['dbServers'] )
-                       ? $config['dbServers']
-                       : []; // likely just using 'localDBMaster'
-               // Sanitize srvsByBucket config to prevent PHP errors
-               $this->srvsByBucket = array_filter( $config['dbsByBucket'], 'is_array' );
-               $this->srvsByBucket = array_values( $this->srvsByBucket ); // consecutive
-
-               if ( isset( $config['lockExpiry'] ) ) {
-                       $this->lockExpiry = $config['lockExpiry'];
-               } else {
-                       $met = ini_get( 'max_execution_time' );
-                       $this->lockExpiry = $met ? $met : 60; // use some sane amount if 0
-               }
-               $this->safeDelay = ( $this->lockExpiry <= 0 )
-                       ? 60 // pick a safe-ish number to match DB timeout default
-                       : $this->lockExpiry; // cover worst case
-
-               foreach ( $this->srvsByBucket as $bucket ) {
-                       if ( count( $bucket ) > 1 ) { // multiple peers
-                               // Tracks peers that couldn't be queried recently to avoid lengthy
-                               // connection timeouts. This is useless if each bucket has one peer.
-                               $this->statusCache = ObjectCache::getLocalServerInstance();
-                               break;
-                       }
-               }
-
-               $this->session = wfRandomString( 31 );
-       }
-
-       // @todo change this code to work in one batch
-       protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
-               $status = Status::newGood();
-               foreach ( $pathsByType as $type => $paths ) {
-                       $status->merge( $this->doGetLocksOnServer( $lockSrv, $paths, $type ) );
-               }
-
-               return $status;
-       }
-
-       abstract protected function doGetLocksOnServer( $lockSrv, array $paths, $type );
-
-       protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
-               return Status::newGood();
-       }
-
-       /**
-        * @see QuorumLockManager::isServerUp()
-        * @param string $lockSrv
-        * @return bool
-        */
-       protected function isServerUp( $lockSrv ) {
-               if ( !$this->cacheCheckFailures( $lockSrv ) ) {
-                       return false; // recent failure to connect
-               }
-               try {
-                       $this->getConnection( $lockSrv );
-               } catch ( DBError $e ) {
-                       $this->cacheRecordFailure( $lockSrv );
-
-                       return false; // failed to connect
-               }
-
-               return true;
-       }
-
-       /**
-        * Get (or reuse) a connection to a lock DB
-        *
-        * @param string $lockDb
-        * @return IDatabase
-        * @throws DBError
-        * @throws UnexpectedValueException
-        */
-       protected function getConnection( $lockDb ) {
-               if ( !isset( $this->conns[$lockDb] ) ) {
-                       if ( $lockDb === 'localDBMaster' ) {
-                               $lb = $this->getLocalLB();
-                               $db = $lb->getConnection( DB_MASTER, [], $this->domain );
-                               # Do not mess with settings if the LoadBalancer is the main singleton
-                               # to avoid clobbering the settings of handles from wfGetDB( DB_MASTER ).
-                               $init = ( wfGetLB() !== $lb );
-                       } elseif ( isset( $this->dbServers[$lockDb] ) ) {
-                               $config = $this->dbServers[$lockDb];
-                               $db = DatabaseBase::factory( $config['type'], $config );
-                               $init = true;
-                       } else {
-                               throw new UnexpectedValueException( "No server called '$lockDb'." );
-                       }
-
-                       if ( $init ) {
-                               $db->clearFlag( DBO_TRX );
-                               # If the connection drops, try to avoid letting the DB rollback
-                               # and release the locks before the file operations are finished.
-                               # This won't handle the case of DB server restarts however.
-                               $options = [];
-                               if ( $this->lockExpiry > 0 ) {
-                                       $options['connTimeout'] = $this->lockExpiry;
-                               }
-                               $db->setSessionOptions( $options );
-                               $this->initConnection( $lockDb, $db );
-                       }
-
-                       $this->conns[$lockDb] = $db;
-               }
-
-               return $this->conns[$lockDb];
-       }
-
-       /**
-        * @return LoadBalancer
-        */
-       protected function getLocalLB() {
-               return wfGetLBFactory()->getMainLB( $this->domain );
-       }
-
-       /**
-        * Do additional initialization for new lock DB connection
-        *
-        * @param string $lockDb
-        * @param IDatabase $db
-        * @throws DBError
-        */
-       protected function initConnection( $lockDb, IDatabase $db ) {
-       }
-
-       /**
-        * Checks if the DB has not recently had connection/query errors.
-        * This just avoids wasting time on doomed connection attempts.
-        *
-        * @param string $lockDb
-        * @return bool
-        */
-       protected function cacheCheckFailures( $lockDb ) {
-               return ( $this->statusCache && $this->safeDelay > 0 )
-                       ? !$this->statusCache->get( $this->getMissKey( $lockDb ) )
-                       : true;
-       }
-
-       /**
-        * Log a lock request failure to the cache
-        *
-        * @param string $lockDb
-        * @return bool Success
-        */
-       protected function cacheRecordFailure( $lockDb ) {
-               return ( $this->statusCache && $this->safeDelay > 0 )
-                       ? $this->statusCache->set( $this->getMissKey( $lockDb ), 1, $this->safeDelay )
-                       : true;
-       }
-
-       /**
-        * Get a cache key for recent query misses for a DB
-        *
-        * @param string $lockDb
-        * @return string
-        */
-       protected function getMissKey( $lockDb ) {
-               $lockDb = ( $lockDb === 'localDBMaster' ) ? wfWikiID() : $lockDb; // non-relative
-               return 'dblockmanager:downservers:' . str_replace( ' ', '_', $lockDb );
-       }
-
-       /**
-        * Make sure remaining locks get cleared for sanity
-        */
-       function __destruct() {
-               $this->releaseAllLocks();
-               foreach ( $this->conns as $db ) {
-                       $db->close();
-               }
-       }
-}
diff --git a/includes/filebackend/lockmanager/FSLockManager.php b/includes/filebackend/lockmanager/FSLockManager.php
deleted file mode 100644 (file)
index 2b660ec..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-<?php
-/**
- * Simple version of LockManager based on using FS lock files.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup LockManager
- */
-
-/**
- * Simple version of LockManager based on using FS lock files.
- * All locks are non-blocking, which avoids deadlocks.
- *
- * This should work fine for small sites running off one server.
- * Do not use this with 'lockDirectory' set to an NFS mount unless the
- * NFS client is at least version 2.6.12. Otherwise, the BSD flock()
- * locks will be ignored; see http://nfs.sourceforge.net/#section_d.
- *
- * @ingroup LockManager
- * @since 1.19
- */
-class FSLockManager extends LockManager {
-       /** @var array Mapping of lock types to the type actually used */
-       protected $lockTypeMap = [
-               self::LOCK_SH => self::LOCK_SH,
-               self::LOCK_UW => self::LOCK_SH,
-               self::LOCK_EX => self::LOCK_EX
-       ];
-
-       protected $lockDir; // global dir for all servers
-
-       /** @var array Map of (locked key => lock file handle) */
-       protected $handles = [];
-
-       /**
-        * Construct a new instance from configuration.
-        *
-        * @param array $config Includes:
-        *   - lockDirectory : Directory containing the lock files
-        */
-       function __construct( array $config ) {
-               parent::__construct( $config );
-
-               $this->lockDir = $config['lockDirectory'];
-       }
-
-       /**
-        * @see LockManager::doLock()
-        * @param array $paths
-        * @param int $type
-        * @return Status
-        */
-       protected function doLock( array $paths, $type ) {
-               $status = Status::newGood();
-
-               $lockedPaths = []; // files locked in this attempt
-               foreach ( $paths as $path ) {
-                       $status->merge( $this->doSingleLock( $path, $type ) );
-                       if ( $status->isOK() ) {
-                               $lockedPaths[] = $path;
-                       } else {
-                               // Abort and unlock everything
-                               $status->merge( $this->doUnlock( $lockedPaths, $type ) );
-
-                               return $status;
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see LockManager::doUnlock()
-        * @param array $paths
-        * @param int $type
-        * @return Status
-        */
-       protected function doUnlock( array $paths, $type ) {
-               $status = Status::newGood();
-
-               foreach ( $paths as $path ) {
-                       $status->merge( $this->doSingleUnlock( $path, $type ) );
-               }
-
-               return $status;
-       }
-
-       /**
-        * Lock a single resource key
-        *
-        * @param string $path
-        * @param int $type
-        * @return Status
-        */
-       protected function doSingleLock( $path, $type ) {
-               $status = Status::newGood();
-
-               if ( isset( $this->locksHeld[$path][$type] ) ) {
-                       ++$this->locksHeld[$path][$type];
-               } elseif ( isset( $this->locksHeld[$path][self::LOCK_EX] ) ) {
-                       $this->locksHeld[$path][$type] = 1;
-               } else {
-                       if ( isset( $this->handles[$path] ) ) {
-                               $handle = $this->handles[$path];
-                       } else {
-                               MediaWiki\suppressWarnings();
-                               $handle = fopen( $this->getLockPath( $path ), 'a+' );
-                               MediaWiki\restoreWarnings();
-                               if ( !$handle ) { // lock dir missing?
-                                       wfMkdirParents( $this->lockDir );
-                                       $handle = fopen( $this->getLockPath( $path ), 'a+' ); // try again
-                               }
-                       }
-                       if ( $handle ) {
-                               // Either a shared or exclusive lock
-                               $lock = ( $type == self::LOCK_SH ) ? LOCK_SH : LOCK_EX;
-                               if ( flock( $handle, $lock | LOCK_NB ) ) {
-                                       // Record this lock as active
-                                       $this->locksHeld[$path][$type] = 1;
-                                       $this->handles[$path] = $handle;
-                               } else {
-                                       fclose( $handle );
-                                       $status->fatal( 'lockmanager-fail-acquirelock', $path );
-                               }
-                       } else {
-                               $status->fatal( 'lockmanager-fail-openlock', $path );
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * Unlock a single resource key
-        *
-        * @param string $path
-        * @param int $type
-        * @return Status
-        */
-       protected function doSingleUnlock( $path, $type ) {
-               $status = Status::newGood();
-
-               if ( !isset( $this->locksHeld[$path] ) ) {
-                       $status->warning( 'lockmanager-notlocked', $path );
-               } elseif ( !isset( $this->locksHeld[$path][$type] ) ) {
-                       $status->warning( 'lockmanager-notlocked', $path );
-               } else {
-                       $handlesToClose = [];
-                       --$this->locksHeld[$path][$type];
-                       if ( $this->locksHeld[$path][$type] <= 0 ) {
-                               unset( $this->locksHeld[$path][$type] );
-                       }
-                       if ( !count( $this->locksHeld[$path] ) ) {
-                               unset( $this->locksHeld[$path] ); // no locks on this path
-                               if ( isset( $this->handles[$path] ) ) {
-                                       $handlesToClose[] = $this->handles[$path];
-                                       unset( $this->handles[$path] );
-                               }
-                       }
-                       // Unlock handles to release locks and delete
-                       // any lock files that end up with no locks on them...
-                       if ( wfIsWindows() ) {
-                               // Windows: for any process, including this one,
-                               // calling unlink() on a locked file will fail
-                               $status->merge( $this->closeLockHandles( $path, $handlesToClose ) );
-                               $status->merge( $this->pruneKeyLockFiles( $path ) );
-                       } else {
-                               // Unix: unlink() can be used on files currently open by this
-                               // process and we must do so in order to avoid race conditions
-                               $status->merge( $this->pruneKeyLockFiles( $path ) );
-                               $status->merge( $this->closeLockHandles( $path, $handlesToClose ) );
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @param string $path
-        * @param array $handlesToClose
-        * @return Status
-        */
-       private function closeLockHandles( $path, array $handlesToClose ) {
-               $status = Status::newGood();
-               foreach ( $handlesToClose as $handle ) {
-                       if ( !flock( $handle, LOCK_UN ) ) {
-                               $status->fatal( 'lockmanager-fail-releaselock', $path );
-                       }
-                       if ( !fclose( $handle ) ) {
-                               $status->warning( 'lockmanager-fail-closelock', $path );
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @param string $path
-        * @return Status
-        */
-       private function pruneKeyLockFiles( $path ) {
-               $status = Status::newGood();
-               if ( !isset( $this->locksHeld[$path] ) ) {
-                       # No locks are held for the lock file anymore
-                       if ( !unlink( $this->getLockPath( $path ) ) ) {
-                               $status->warning( 'lockmanager-fail-deletelock', $path );
-                       }
-                       unset( $this->handles[$path] );
-               }
-
-               return $status;
-       }
-
-       /**
-        * Get the path to the lock file for a key
-        * @param string $path
-        * @return string
-        */
-       protected function getLockPath( $path ) {
-               return "{$this->lockDir}/{$this->sha1Base36Absolute( $path )}.lock";
-       }
-
-       /**
-        * Make sure remaining locks get cleared for sanity
-        */
-       function __destruct() {
-               while ( count( $this->locksHeld ) ) {
-                       foreach ( $this->locksHeld as $path => $locks ) {
-                               $this->doSingleUnlock( $path, self::LOCK_EX );
-                               $this->doSingleUnlock( $path, self::LOCK_SH );
-                       }
-               }
-       }
-}
diff --git a/includes/filebackend/lockmanager/LockManager.php b/includes/filebackend/lockmanager/LockManager.php
deleted file mode 100644 (file)
index a3cb3b1..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-<?php
-/**
- * @defgroup LockManager Lock management
- * @ingroup FileBackend
- */
-
-/**
- * Resource locking handling.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup LockManager
- * @author Aaron Schulz
- */
-
-/**
- * @brief Class for handling resource locking.
- *
- * Locks on resource keys can either be shared or exclusive.
- *
- * Implementations must keep track of what is locked by this proccess
- * in-memory and support nested locking calls (using reference counting).
- * At least LOCK_UW and LOCK_EX must be implemented. LOCK_SH can be a no-op.
- * Locks should either be non-blocking or have low wait timeouts.
- *
- * Subclasses should avoid throwing exceptions at all costs.
- *
- * @ingroup LockManager
- * @since 1.19
- */
-abstract class LockManager {
-       /** @var array Mapping of lock types to the type actually used */
-       protected $lockTypeMap = [
-               self::LOCK_SH => self::LOCK_SH,
-               self::LOCK_UW => self::LOCK_EX, // subclasses may use self::LOCK_SH
-               self::LOCK_EX => self::LOCK_EX
-       ];
-
-       /** @var array Map of (resource path => lock type => count) */
-       protected $locksHeld = [];
-
-       protected $domain; // string; domain (usually wiki ID)
-       protected $lockTTL; // integer; maximum time locks can be held
-
-       /** Lock types; stronger locks have higher values */
-       const LOCK_SH = 1; // shared lock (for reads)
-       const LOCK_UW = 2; // shared lock (for reads used to write elsewhere)
-       const LOCK_EX = 3; // exclusive lock (for writes)
-
-       /**
-        * Construct a new instance from configuration
-        *
-        * @param array $config Parameters include:
-        *   - domain  : Domain (usually wiki ID) that all resources are relative to [optional]
-        *   - lockTTL : Age (in seconds) at which resource locks should expire.
-        *               This only applies if locks are not tied to a connection/process.
-        */
-       public function __construct( array $config ) {
-               $this->domain = isset( $config['domain'] ) ? $config['domain'] : wfWikiID();
-               if ( isset( $config['lockTTL'] ) ) {
-                       $this->lockTTL = max( 5, $config['lockTTL'] );
-               } elseif ( PHP_SAPI === 'cli' ) {
-                       $this->lockTTL = 3600;
-               } else {
-                       $met = ini_get( 'max_execution_time' ); // this is 0 in CLI mode
-                       $this->lockTTL = max( 5 * 60, 2 * (int)$met );
-               }
-       }
-
-       /**
-        * Lock the resources at the given abstract paths
-        *
-        * @param array $paths List of resource names
-        * @param int $type LockManager::LOCK_* constant
-        * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.21)
-        * @return Status
-        */
-       final public function lock( array $paths, $type = self::LOCK_EX, $timeout = 0 ) {
-               return $this->lockByType( [ $type => $paths ], $timeout );
-       }
-
-       /**
-        * Lock the resources at the given abstract paths
-        *
-        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
-        * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.21)
-        * @return Status
-        * @since 1.22
-        */
-       final public function lockByType( array $pathsByType, $timeout = 0 ) {
-               $pathsByType = $this->normalizePathsByType( $pathsByType );
-
-               $status = null;
-               $loop = new WaitConditionLoop(
-                       function () use ( &$status, $pathsByType ) {
-                               $status = $this->doLockByType( $pathsByType );
-
-                               return $status->isOK() ?: WaitConditionLoop::CONDITION_CONTINUE;
-                       },
-                       $timeout
-               );
-               $loop->invoke();
-
-               return $status;
-       }
-
-       /**
-        * Unlock the resources at the given abstract paths
-        *
-        * @param array $paths List of paths
-        * @param int $type LockManager::LOCK_* constant
-        * @return Status
-        */
-       final public function unlock( array $paths, $type = self::LOCK_EX ) {
-               return $this->unlockByType( [ $type => $paths ] );
-       }
-
-       /**
-        * Unlock the resources at the given abstract paths
-        *
-        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
-        * @return Status
-        * @since 1.22
-        */
-       final public function unlockByType( array $pathsByType ) {
-               $pathsByType = $this->normalizePathsByType( $pathsByType );
-               $status = $this->doUnlockByType( $pathsByType );
-
-               return $status;
-       }
-
-       /**
-        * Get the base 36 SHA-1 of a string, padded to 31 digits.
-        * Before hashing, the path will be prefixed with the domain ID.
-        * This should be used interally for lock key or file names.
-        *
-        * @param string $path
-        * @return string
-        */
-       final protected function sha1Base36Absolute( $path ) {
-               return Wikimedia\base_convert( sha1( "{$this->domain}:{$path}" ), 16, 36, 31 );
-       }
-
-       /**
-        * Get the base 16 SHA-1 of a string, padded to 31 digits.
-        * Before hashing, the path will be prefixed with the domain ID.
-        * This should be used interally for lock key or file names.
-        *
-        * @param string $path
-        * @return string
-        */
-       final protected function sha1Base16Absolute( $path ) {
-               return sha1( "{$this->domain}:{$path}" );
-       }
-
-       /**
-        * Normalize the $paths array by converting LOCK_UW locks into the
-        * appropriate type and removing any duplicated paths for each lock type.
-        *
-        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
-        * @return array
-        * @since 1.22
-        */
-       final protected function normalizePathsByType( array $pathsByType ) {
-               $res = [];
-               foreach ( $pathsByType as $type => $paths ) {
-                       $res[$this->lockTypeMap[$type]] = array_unique( $paths );
-               }
-
-               return $res;
-       }
-
-       /**
-        * @see LockManager::lockByType()
-        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
-        * @return Status
-        * @since 1.22
-        */
-       protected function doLockByType( array $pathsByType ) {
-               $status = Status::newGood();
-               $lockedByType = []; // map of (type => paths)
-               foreach ( $pathsByType as $type => $paths ) {
-                       $status->merge( $this->doLock( $paths, $type ) );
-                       if ( $status->isOK() ) {
-                               $lockedByType[$type] = $paths;
-                       } else {
-                               // Release the subset of locks that were acquired
-                               foreach ( $lockedByType as $lType => $lPaths ) {
-                                       $status->merge( $this->doUnlock( $lPaths, $lType ) );
-                               }
-                               break;
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * Lock resources with the given keys and lock type
-        *
-        * @param array $paths List of paths
-        * @param int $type LockManager::LOCK_* constant
-        * @return Status
-        */
-       abstract protected function doLock( array $paths, $type );
-
-       /**
-        * @see LockManager::unlockByType()
-        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
-        * @return Status
-        * @since 1.22
-        */
-       protected function doUnlockByType( array $pathsByType ) {
-               $status = Status::newGood();
-               foreach ( $pathsByType as $type => $paths ) {
-                       $status->merge( $this->doUnlock( $paths, $type ) );
-               }
-
-               return $status;
-       }
-
-       /**
-        * Unlock resources with the given keys and lock type
-        *
-        * @param array $paths List of paths
-        * @param int $type LockManager::LOCK_* constant
-        * @return Status
-        */
-       abstract protected function doUnlock( array $paths, $type );
-}
-
-/**
- * Simple version of LockManager that does nothing
- * @since 1.19
- */
-class NullLockManager extends LockManager {
-       protected function doLock( array $paths, $type ) {
-               return Status::newGood();
-       }
-
-       protected function doUnlock( array $paths, $type ) {
-               return Status::newGood();
-       }
-}
index 602b876..1e66e6e 100644 (file)
@@ -20,6 +20,8 @@
  * @file
  * @ingroup LockManager
  */
+use MediaWiki\MediaWikiServices;
+use MediaWiki\Logger\LoggerFactory;
 
 /**
  * Class to handle file lock manager registration
@@ -29,7 +31,7 @@
  * @since 1.19
  */
 class LockManagerGroup {
-       /** @var array (domain => LockManager) */
+       /** @var LockManagerGroup[] (domain => LockManagerGroup) */
        protected static $instances = [];
 
        protected $domain; // string; domain (usually wiki ID)
@@ -115,6 +117,16 @@ class LockManagerGroup {
                if ( !isset( $this->managers[$name]['instance'] ) ) {
                        $class = $this->managers[$name]['class'];
                        $config = $this->managers[$name]['config'];
+                       if ( $class === 'DBLockManager' ) {
+                               $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+                               $lb = $lbFactory->newMainLB( $config['domain'] );
+                               $dbw = $lb->getLazyConnectionRef( DB_MASTER, [], $config['domain'] );
+
+                               $config['dbServers']['localDBMaster'] = $dbw;
+                               $config['srvCache'] = ObjectCache::getLocalServerInstance( 'hash' );
+                       }
+                       $config['logger'] = LoggerFactory::getInstance( 'LockManager' );
+
                        $this->managers[$name]['instance'] = new $class( $config );
                }
 
diff --git a/includes/filebackend/lockmanager/MemcLockManager.php b/includes/filebackend/lockmanager/MemcLockManager.php
deleted file mode 100644 (file)
index 2f17e27..0000000
+++ /dev/null
@@ -1,386 +0,0 @@
-<?php
-/**
- * Version of LockManager based on using memcached servers.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup LockManager
- */
-
-/**
- * Manage locks using memcached servers.
- *
- * Version of LockManager based on using memcached servers.
- * This is meant for multi-wiki systems that may share files.
- * All locks are non-blocking, which avoids deadlocks.
- *
- * All lock requests for a resource, identified by a hash string, will map to one
- * bucket. Each bucket maps to one or several peer servers, each running memcached.
- * A majority of peers must agree for a lock to be acquired.
- *
- * @ingroup LockManager
- * @since 1.20
- */
-class MemcLockManager extends QuorumLockManager {
-       /** @var array Mapping of lock types to the type actually used */
-       protected $lockTypeMap = [
-               self::LOCK_SH => self::LOCK_SH,
-               self::LOCK_UW => self::LOCK_SH,
-               self::LOCK_EX => self::LOCK_EX
-       ];
-
-       /** @var array Map server names to MemcachedBagOStuff objects */
-       protected $bagOStuffs = [];
-
-       /** @var array (server name => bool) */
-       protected $serversUp = [];
-
-       /** @var string Random UUID */
-       protected $session = '';
-
-       /**
-        * Construct a new instance from configuration.
-        *
-        * @param array $config Parameters include:
-        *   - lockServers  : Associative array of server names to "<IP>:<port>" strings.
-        *   - srvsByBucket : Array of 1-16 consecutive integer keys, starting from 0,
-        *                    each having an odd-numbered list of server names (peers) as values.
-        *   - memcConfig   : Configuration array for ObjectCache::newFromParams. [optional]
-        *                    If set, this must use one of the memcached classes.
-        * @throws Exception
-        */
-       public function __construct( array $config ) {
-               parent::__construct( $config );
-
-               // Sanitize srvsByBucket config to prevent PHP errors
-               $this->srvsByBucket = array_filter( $config['srvsByBucket'], 'is_array' );
-               $this->srvsByBucket = array_values( $this->srvsByBucket ); // consecutive
-
-               $memcConfig = isset( $config['memcConfig'] )
-                       ? $config['memcConfig']
-                       : [ 'class' => 'MemcachedPhpBagOStuff' ];
-
-               foreach ( $config['lockServers'] as $name => $address ) {
-                       $params = [ 'servers' => [ $address ] ] + $memcConfig;
-                       $cache = ObjectCache::newFromParams( $params );
-                       if ( $cache instanceof MemcachedBagOStuff ) {
-                               $this->bagOStuffs[$name] = $cache;
-                       } else {
-                               throw new Exception(
-                                       'Only MemcachedBagOStuff classes are supported by MemcLockManager.' );
-                       }
-               }
-
-               $this->session = wfRandomString( 32 );
-       }
-
-       // @todo Change this code to work in one batch
-       protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
-               $status = Status::newGood();
-
-               $lockedPaths = [];
-               foreach ( $pathsByType as $type => $paths ) {
-                       $status->merge( $this->doGetLocksOnServer( $lockSrv, $paths, $type ) );
-                       if ( $status->isOK() ) {
-                               $lockedPaths[$type] = isset( $lockedPaths[$type] )
-                                       ? array_merge( $lockedPaths[$type], $paths )
-                                       : $paths;
-                       } else {
-                               foreach ( $lockedPaths as $lType => $lPaths ) {
-                                       $status->merge( $this->doFreeLocksOnServer( $lockSrv, $lPaths, $lType ) );
-                               }
-                               break;
-                       }
-               }
-
-               return $status;
-       }
-
-       // @todo Change this code to work in one batch
-       protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
-               $status = Status::newGood();
-
-               foreach ( $pathsByType as $type => $paths ) {
-                       $status->merge( $this->doFreeLocksOnServer( $lockSrv, $paths, $type ) );
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see QuorumLockManager::getLocksOnServer()
-        * @param string $lockSrv
-        * @param array $paths
-        * @param string $type
-        * @return Status
-        */
-       protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
-               $status = Status::newGood();
-
-               $memc = $this->getCache( $lockSrv );
-               $keys = array_map( [ $this, 'recordKeyForPath' ], $paths ); // lock records
-
-               // Lock all of the active lock record keys...
-               if ( !$this->acquireMutexes( $memc, $keys ) ) {
-                       foreach ( $paths as $path ) {
-                               $status->fatal( 'lockmanager-fail-acquirelock', $path );
-                       }
-
-                       return $status;
-               }
-
-               // Fetch all the existing lock records...
-               $lockRecords = $memc->getMulti( $keys );
-
-               $now = time();
-               // Check if the requested locks conflict with existing ones...
-               foreach ( $paths as $path ) {
-                       $locksKey = $this->recordKeyForPath( $path );
-                       $locksHeld = isset( $lockRecords[$locksKey] )
-                               ? self::sanitizeLockArray( $lockRecords[$locksKey] )
-                               : self::newLockArray(); // init
-                       foreach ( $locksHeld[self::LOCK_EX] as $session => $expiry ) {
-                               if ( $expiry < $now ) { // stale?
-                                       unset( $locksHeld[self::LOCK_EX][$session] );
-                               } elseif ( $session !== $this->session ) {
-                                       $status->fatal( 'lockmanager-fail-acquirelock', $path );
-                               }
-                       }
-                       if ( $type === self::LOCK_EX ) {
-                               foreach ( $locksHeld[self::LOCK_SH] as $session => $expiry ) {
-                                       if ( $expiry < $now ) { // stale?
-                                               unset( $locksHeld[self::LOCK_SH][$session] );
-                                       } elseif ( $session !== $this->session ) {
-                                               $status->fatal( 'lockmanager-fail-acquirelock', $path );
-                                       }
-                               }
-                       }
-                       if ( $status->isOK() ) {
-                               // Register the session in the lock record array
-                               $locksHeld[$type][$this->session] = $now + $this->lockTTL;
-                               // We will update this record if none of the other locks conflict
-                               $lockRecords[$locksKey] = $locksHeld;
-                       }
-               }
-
-               // If there were no lock conflicts, update all the lock records...
-               if ( $status->isOK() ) {
-                       foreach ( $paths as $path ) {
-                               $locksKey = $this->recordKeyForPath( $path );
-                               $locksHeld = $lockRecords[$locksKey];
-                               $ok = $memc->set( $locksKey, $locksHeld, 7 * 86400 );
-                               if ( !$ok ) {
-                                       $status->fatal( 'lockmanager-fail-acquirelock', $path );
-                               } else {
-                                       wfDebug( __METHOD__ . ": acquired lock on key $locksKey.\n" );
-                               }
-                       }
-               }
-
-               // Unlock all of the active lock record keys...
-               $this->releaseMutexes( $memc, $keys );
-
-               return $status;
-       }
-
-       /**
-        * @see QuorumLockManager::freeLocksOnServer()
-        * @param string $lockSrv
-        * @param array $paths
-        * @param string $type
-        * @return Status
-        */
-       protected function doFreeLocksOnServer( $lockSrv, array $paths, $type ) {
-               $status = Status::newGood();
-
-               $memc = $this->getCache( $lockSrv );
-               $keys = array_map( [ $this, 'recordKeyForPath' ], $paths ); // lock records
-
-               // Lock all of the active lock record keys...
-               if ( !$this->acquireMutexes( $memc, $keys ) ) {
-                       foreach ( $paths as $path ) {
-                               $status->fatal( 'lockmanager-fail-releaselock', $path );
-                       }
-
-                       return $status;
-               }
-
-               // Fetch all the existing lock records...
-               $lockRecords = $memc->getMulti( $keys );
-
-               // Remove the requested locks from all records...
-               foreach ( $paths as $path ) {
-                       $locksKey = $this->recordKeyForPath( $path ); // lock record
-                       if ( !isset( $lockRecords[$locksKey] ) ) {
-                               $status->warning( 'lockmanager-fail-releaselock', $path );
-                               continue; // nothing to do
-                       }
-                       $locksHeld = self::sanitizeLockArray( $lockRecords[$locksKey] );
-                       if ( isset( $locksHeld[$type][$this->session] ) ) {
-                               unset( $locksHeld[$type][$this->session] ); // unregister this session
-                               if ( $locksHeld === self::newLockArray() ) {
-                                       $ok = $memc->delete( $locksKey );
-                               } else {
-                                       $ok = $memc->set( $locksKey, $locksHeld );
-                               }
-                               if ( !$ok ) {
-                                       $status->fatal( 'lockmanager-fail-releaselock', $path );
-                               }
-                       } else {
-                               $status->warning( 'lockmanager-fail-releaselock', $path );
-                       }
-                       wfDebug( __METHOD__ . ": released lock on key $locksKey.\n" );
-               }
-
-               // Unlock all of the active lock record keys...
-               $this->releaseMutexes( $memc, $keys );
-
-               return $status;
-       }
-
-       /**
-        * @see QuorumLockManager::releaseAllLocks()
-        * @return Status
-        */
-       protected function releaseAllLocks() {
-               return Status::newGood(); // not supported
-       }
-
-       /**
-        * @see QuorumLockManager::isServerUp()
-        * @param string $lockSrv
-        * @return bool
-        */
-       protected function isServerUp( $lockSrv ) {
-               return (bool)$this->getCache( $lockSrv );
-       }
-
-       /**
-        * Get the MemcachedBagOStuff object for a $lockSrv
-        *
-        * @param string $lockSrv Server name
-        * @return MemcachedBagOStuff|null
-        */
-       protected function getCache( $lockSrv ) {
-               /** @var BagOStuff $memc */
-               $memc = null;
-               if ( isset( $this->bagOStuffs[$lockSrv] ) ) {
-                       $memc = $this->bagOStuffs[$lockSrv];
-                       if ( !isset( $this->serversUp[$lockSrv] ) ) {
-                               $this->serversUp[$lockSrv] = $memc->set( __CLASS__ . ':ping', 1, 1 );
-                               if ( !$this->serversUp[$lockSrv] ) {
-                                       trigger_error( __METHOD__ . ": Could not contact $lockSrv.", E_USER_WARNING );
-                               }
-                       }
-                       if ( !$this->serversUp[$lockSrv] ) {
-                               return null; // server appears to be down
-                       }
-               }
-
-               return $memc;
-       }
-
-       /**
-        * @param string $path
-        * @return string
-        */
-       protected function recordKeyForPath( $path ) {
-               return implode( ':', [ __CLASS__, 'locks', $this->sha1Base36Absolute( $path ) ] );
-       }
-
-       /**
-        * @return array An empty lock structure for a key
-        */
-       protected static function newLockArray() {
-               return [ self::LOCK_SH => [], self::LOCK_EX => [] ];
-       }
-
-       /**
-        * @param array $a
-        * @return array An empty lock structure for a key
-        */
-       protected static function sanitizeLockArray( $a ) {
-               if ( is_array( $a ) && isset( $a[self::LOCK_EX] ) && isset( $a[self::LOCK_SH] ) ) {
-                       return $a;
-               } else {
-                       trigger_error( __METHOD__ . ": reset invalid lock array.", E_USER_WARNING );
-
-                       return self::newLockArray();
-               }
-       }
-
-       /**
-        * @param MemcachedBagOStuff $memc
-        * @param array $keys List of keys to acquire
-        * @return bool
-        */
-       protected function acquireMutexes( MemcachedBagOStuff $memc, array $keys ) {
-               $lockedKeys = [];
-
-               // Acquire the keys in lexicographical order, to avoid deadlock problems.
-               // If P1 is waiting to acquire a key P2 has, P2 can't also be waiting for a key P1 has.
-               sort( $keys );
-
-               // Try to quickly loop to acquire the keys, but back off after a few rounds.
-               // This reduces memcached spam, especially in the rare case where a server acquires
-               // some lock keys and dies without releasing them. Lock keys expire after a few minutes.
-               $loop = new WaitConditionLoop(
-                       function () use ( $memc, $keys, &$lockedKeys ) {
-                               foreach ( array_diff( $keys, $lockedKeys ) as $key ) {
-                                       if ( $memc->add( "$key:mutex", 1, 180 ) ) { // lock record
-                                               $lockedKeys[] = $key;
-                                       }
-                               }
-
-                               return array_diff( $keys, $lockedKeys )
-                                       ? WaitConditionLoop::CONDITION_CONTINUE
-                                       : true;
-                       },
-                       3.0 // timeout
-               );
-               $loop->invoke();
-
-               if ( count( $lockedKeys ) != count( $keys ) ) {
-                       $this->releaseMutexes( $memc, $lockedKeys ); // failed; release what was locked
-                       return false;
-               }
-
-               return true;
-       }
-
-       /**
-        * @param MemcachedBagOStuff $memc
-        * @param array $keys List of acquired keys
-        */
-       protected function releaseMutexes( MemcachedBagOStuff $memc, array $keys ) {
-               foreach ( $keys as $key ) {
-                       $memc->delete( "$key:mutex" );
-               }
-       }
-
-       /**
-        * Make sure remaining locks get cleared for sanity
-        */
-       function __destruct() {
-               while ( count( $this->locksHeld ) ) {
-                       foreach ( $this->locksHeld as $path => $locks ) {
-                               $this->doUnlock( [ $path ], self::LOCK_EX );
-                               $this->doUnlock( [ $path ], self::LOCK_SH );
-                       }
-               }
-       }
-}
index 0536091..fc23f76 100644 (file)
@@ -2,7 +2,11 @@
 /**
  * MySQL version of DBLockManager that supports shared locks.
  *
- * All lock servers must have the innodb table defined in locking/filelocks.sql.
+ * Do NOT use this on connection handles that are also being used for anything
+ * else as the transaction isolation will be wrong and all the other changes will
+ * get rolled back when the locks release!
+ *
+ * All lock servers must have the innodb table defined in maintenance/locking/filelocks.sql.
  * All locks are non-blocking, which avoids deadlocks.
  *
  * @ingroup LockManager
@@ -15,9 +19,10 @@ class MySqlLockManager extends DBLockManager {
                self::LOCK_EX => self::LOCK_EX
        ];
 
-       protected function getLocalLB() {
-               // Use a separate connection so releaseAllLocks() doesn't rollback the main trx
-               return wfGetLBFactory()->newMainLB( $this->domain );
+       public function __construct( array $config ) {
+               parent::__construct( $config );
+
+               $this->session = substr( $this->session, 0, 31 ); // fit to field
        }
 
        protected function initConnection( $lockDb, IDatabase $db ) {
@@ -35,10 +40,10 @@ class MySqlLockManager extends DBLockManager {
         * @param string $lockSrv
         * @param array $paths
         * @param string $type
-        * @return Status
+        * @return StatusValue
         */
        protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
-               $status = Status::newGood();
+               $status = StatusValue::newGood();
 
                $db = $this->getConnection( $lockSrv ); // checked in isServerUp()
 
@@ -51,7 +56,7 @@ class MySqlLockManager extends DBLockManager {
                        $keys[] = $key;
                        $data[] = [ 'fls_key' => $key, 'fls_session' => $this->session ];
                        if ( !isset( $this->locksHeld[$path][self::LOCK_EX] ) ) {
-                               $checkEXKeys[] = $key;
+                               $checkEXKeys[] = $key; // this has no EX lock on $key itself
                        }
                }
 
@@ -59,13 +64,16 @@ class MySqlLockManager extends DBLockManager {
                $db->insert( 'filelocks_shared', $data, __METHOD__, [ 'IGNORE' ] );
                # Actually do the locking queries...
                if ( $type == self::LOCK_SH ) { // reader locks
-                       $blocked = false;
                        # Bail if there are any existing writers...
                        if ( count( $checkEXKeys ) ) {
-                               $blocked = $db->selectField( 'filelocks_exclusive', '1',
+                               $blocked = $db->selectField(
+                                       'filelocks_exclusive',
+                                       '1',
                                        [ 'fle_key' => $checkEXKeys ],
                                        __METHOD__
                                );
+                       } else {
+                               $blocked = false;
                        }
                        # Other prospective writers that haven't yet updated filelocks_exclusive
                        # will recheck filelocks_shared after doing so and bail due to this entry.
@@ -74,7 +82,9 @@ class MySqlLockManager extends DBLockManager {
                        # Bail if there are any existing writers...
                        # This may detect readers, but the safe check for them is below.
                        # Note: if two writers come at the same time, both bail :)
-                       $blocked = $db->selectField( 'filelocks_shared', '1',
+                       $blocked = $db->selectField(
+                               'filelocks_shared',
+                               '1',
                                [ 'fls_key' => $keys, "fls_session != $encSession" ],
                                __METHOD__
                        );
@@ -87,7 +97,9 @@ class MySqlLockManager extends DBLockManager {
                                # Block new readers/writers...
                                $db->insert( 'filelocks_exclusive', $data, __METHOD__ );
                                # Bail if there are any existing readers...
-                               $blocked = $db->selectField( 'filelocks_shared', '1',
+                               $blocked = $db->selectField(
+                                       'filelocks_shared',
+                                       '1',
                                        [ 'fls_key' => $keys, "fls_session != $encSession" ],
                                        __METHOD__
                                );
@@ -105,10 +117,10 @@ class MySqlLockManager extends DBLockManager {
 
        /**
         * @see QuorumLockManager::releaseAllLocks()
-        * @return Status
+        * @return StatusValue
         */
        protected function releaseAllLocks() {
-               $status = Status::newGood();
+               $status = StatusValue::newGood();
 
                foreach ( $this->conns as $lockDb => $db ) {
                        if ( $db->trxLevel() ) { // in transaction
diff --git a/includes/filebackend/lockmanager/PostgreSqlLockManager.php b/includes/filebackend/lockmanager/PostgreSqlLockManager.php
deleted file mode 100644 (file)
index d55b5ae..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-/**
- * PostgreSQL version of DBLockManager that supports shared locks.
- * All locks are non-blocking, which avoids deadlocks.
- *
- * @ingroup LockManager
- */
-class PostgreSqlLockManager extends DBLockManager {
-       /** @var array Mapping of lock types to the type actually used */
-       protected $lockTypeMap = [
-               self::LOCK_SH => self::LOCK_SH,
-               self::LOCK_UW => self::LOCK_SH,
-               self::LOCK_EX => self::LOCK_EX
-       ];
-
-       protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
-               $status = Status::newGood();
-               if ( !count( $paths ) ) {
-                       return $status; // nothing to lock
-               }
-
-               $db = $this->getConnection( $lockSrv ); // checked in isServerUp()
-               $bigints = array_unique( array_map(
-                       function ( $key ) {
-                               return Wikimedia\base_convert( substr( $key, 0, 15 ), 16, 10 );
-                       },
-                       array_map( [ $this, 'sha1Base16Absolute' ], $paths )
-               ) );
-
-               // Try to acquire all the locks...
-               $fields = [];
-               foreach ( $bigints as $bigint ) {
-                       $fields[] = ( $type == self::LOCK_SH )
-                               ? "pg_try_advisory_lock_shared({$db->addQuotes( $bigint )}) AS K$bigint"
-                               : "pg_try_advisory_lock({$db->addQuotes( $bigint )}) AS K$bigint";
-               }
-               $res = $db->query( 'SELECT ' . implode( ', ', $fields ), __METHOD__ );
-               $row = $res->fetchRow();
-
-               if ( in_array( 'f', $row ) ) {
-                       // Release any acquired locks if some could not be acquired...
-                       $fields = [];
-                       foreach ( $row as $kbigint => $ok ) {
-                               if ( $ok === 't' ) { // locked
-                                       $bigint = substr( $kbigint, 1 ); // strip off the "K"
-                                       $fields[] = ( $type == self::LOCK_SH )
-                                               ? "pg_advisory_unlock_shared({$db->addQuotes( $bigint )})"
-                                               : "pg_advisory_unlock({$db->addQuotes( $bigint )})";
-                               }
-                       }
-                       if ( count( $fields ) ) {
-                               $db->query( 'SELECT ' . implode( ', ', $fields ), __METHOD__ );
-                       }
-                       foreach ( $paths as $path ) {
-                               $status->fatal( 'lockmanager-fail-acquirelock', $path );
-                       }
-               }
-
-               return $status;
-       }
-
-       /**
-        * @see QuorumLockManager::releaseAllLocks()
-        * @return Status
-        */
-       protected function releaseAllLocks() {
-               $status = Status::newGood();
-
-               foreach ( $this->conns as $lockDb => $db ) {
-                       try {
-                               $db->query( "SELECT pg_advisory_unlock_all()", __METHOD__ );
-                       } catch ( DBError $e ) {
-                               $status->fatal( 'lockmanager-fail-db-release', $lockDb );
-                       }
-               }
-
-               return $status;
-       }
-}
diff --git a/includes/filebackend/lockmanager/QuorumLockManager.php b/includes/filebackend/lockmanager/QuorumLockManager.php
deleted file mode 100644 (file)
index 108b846..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-<?php
-/**
- * Version of LockManager that uses a quorum from peer servers for locks.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup LockManager
- */
-
-/**
- * Version of LockManager that uses a quorum from peer servers for locks.
- * The resource space can also be sharded into separate peer groups.
- *
- * @ingroup LockManager
- * @since 1.20
- */
-abstract class QuorumLockManager extends LockManager {
-       /** @var array Map of bucket indexes to peer server lists */
-       protected $srvsByBucket = []; // (bucket index => (lsrv1, lsrv2, ...))
-
-       /** @var array Map of degraded buckets */
-       protected $degradedBuckets = []; // (buckey index => UNIX timestamp)
-
-       final protected function doLock( array $paths, $type ) {
-               return $this->doLockByType( [ $type => $paths ] );
-       }
-
-       final protected function doUnlock( array $paths, $type ) {
-               return $this->doUnlockByType( [ $type => $paths ] );
-       }
-
-       protected function doLockByType( array $pathsByType ) {
-               $status = Status::newGood();
-
-               $pathsToLock = []; // (bucket => type => paths)
-               // Get locks that need to be acquired (buckets => locks)...
-               foreach ( $pathsByType as $type => $paths ) {
-                       foreach ( $paths as $path ) {
-                               if ( isset( $this->locksHeld[$path][$type] ) ) {
-                                       ++$this->locksHeld[$path][$type];
-                               } else {
-                                       $bucket = $this->getBucketFromPath( $path );
-                                       $pathsToLock[$bucket][$type][] = $path;
-                               }
-                       }
-               }
-
-               $lockedPaths = []; // files locked in this attempt (type => paths)
-               // Attempt to acquire these locks...
-               foreach ( $pathsToLock as $bucket => $pathsToLockByType ) {
-                       // Try to acquire the locks for this bucket
-                       $status->merge( $this->doLockingRequestBucket( $bucket, $pathsToLockByType ) );
-                       if ( !$status->isOK() ) {
-                               $status->merge( $this->doUnlockByType( $lockedPaths ) );
-
-                               return $status;
-                       }
-                       // Record these locks as active
-                       foreach ( $pathsToLockByType as $type => $paths ) {
-                               foreach ( $paths as $path ) {
-                                       $this->locksHeld[$path][$type] = 1; // locked
-                                       // Keep track of what locks were made in this attempt
-                                       $lockedPaths[$type][] = $path;
-                               }
-                       }
-               }
-
-               return $status;
-       }
-
-       protected function doUnlockByType( array $pathsByType ) {
-               $status = Status::newGood();
-
-               $pathsToUnlock = []; // (bucket => type => paths)
-               foreach ( $pathsByType as $type => $paths ) {
-                       foreach ( $paths as $path ) {
-                               if ( !isset( $this->locksHeld[$path][$type] ) ) {
-                                       $status->warning( 'lockmanager-notlocked', $path );
-                               } else {
-                                       --$this->locksHeld[$path][$type];
-                                       // Reference count the locks held and release locks when zero
-                                       if ( $this->locksHeld[$path][$type] <= 0 ) {
-                                               unset( $this->locksHeld[$path][$type] );
-                                               $bucket = $this->getBucketFromPath( $path );
-                                               $pathsToUnlock[$bucket][$type][] = $path;
-                                       }
-                                       if ( !count( $this->locksHeld[$path] ) ) {
-                                               unset( $this->locksHeld[$path] ); // no SH or EX locks left for key
-                                       }
-                               }
-                       }
-               }
-
-               // Remove these specific locks if possible, or at least release
-               // all locks once this process is currently not holding any locks.
-               foreach ( $pathsToUnlock as $bucket => $pathsToUnlockByType ) {
-                       $status->merge( $this->doUnlockingRequestBucket( $bucket, $pathsToUnlockByType ) );
-               }
-               if ( !count( $this->locksHeld ) ) {
-                       $status->merge( $this->releaseAllLocks() );
-                       $this->degradedBuckets = []; // safe to retry the normal quorum
-               }
-
-               return $status;
-       }
-
-       /**
-        * Attempt to acquire locks with the peers for a bucket.
-        * This is all or nothing; if any key is locked then this totally fails.
-        *
-        * @param int $bucket
-        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
-        * @return Status
-        */
-       final protected function doLockingRequestBucket( $bucket, array $pathsByType ) {
-               $status = Status::newGood();
-
-               $yesVotes = 0; // locks made on trustable servers
-               $votesLeft = count( $this->srvsByBucket[$bucket] ); // remaining peers
-               $quorum = floor( $votesLeft / 2 + 1 ); // simple majority
-               // Get votes for each peer, in order, until we have enough...
-               foreach ( $this->srvsByBucket[$bucket] as $lockSrv ) {
-                       if ( !$this->isServerUp( $lockSrv ) ) {
-                               --$votesLeft;
-                               $status->warning( 'lockmanager-fail-svr-acquire', $lockSrv );
-                               $this->degradedBuckets[$bucket] = time();
-                               continue; // server down?
-                       }
-                       // Attempt to acquire the lock on this peer
-                       $status->merge( $this->getLocksOnServer( $lockSrv, $pathsByType ) );
-                       if ( !$status->isOK() ) {
-                               return $status; // vetoed; resource locked
-                       }
-                       ++$yesVotes; // success for this peer
-                       if ( $yesVotes >= $quorum ) {
-                               return $status; // lock obtained
-                       }
-                       --$votesLeft;
-                       $votesNeeded = $quorum - $yesVotes;
-                       if ( $votesNeeded > $votesLeft ) {
-                               break; // short-circuit
-                       }
-               }
-               // At this point, we must not have met the quorum
-               $status->setResult( false );
-
-               return $status;
-       }
-
-       /**
-        * Attempt to release locks with the peers for a bucket
-        *
-        * @param int $bucket
-        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
-        * @return Status
-        */
-       final protected function doUnlockingRequestBucket( $bucket, array $pathsByType ) {
-               $status = Status::newGood();
-
-               $yesVotes = 0; // locks freed on trustable servers
-               $votesLeft = count( $this->srvsByBucket[$bucket] ); // remaining peers
-               $quorum = floor( $votesLeft / 2 + 1 ); // simple majority
-               $isDegraded = isset( $this->degradedBuckets[$bucket] ); // not the normal quorum?
-               foreach ( $this->srvsByBucket[$bucket] as $lockSrv ) {
-                       if ( !$this->isServerUp( $lockSrv ) ) {
-                               $status->warning( 'lockmanager-fail-svr-release', $lockSrv );
-                       } else {
-                               // Attempt to release the lock on this peer
-                               $status->merge( $this->freeLocksOnServer( $lockSrv, $pathsByType ) );
-                               ++$yesVotes; // success for this peer
-                               // Normally the first peers form the quorum, and the others are ignored.
-                               // Ignore them in this case, but not when an alternative quorum was used.
-                               if ( $yesVotes >= $quorum && !$isDegraded ) {
-                                       break; // lock released
-                               }
-                       }
-               }
-               // Set a bad status if the quorum was not met.
-               // Assumes the same "up" servers as during the acquire step.
-               $status->setResult( $yesVotes >= $quorum );
-
-               return $status;
-       }
-
-       /**
-        * Get the bucket for resource path.
-        * This should avoid throwing any exceptions.
-        *
-        * @param string $path
-        * @return int
-        */
-       protected function getBucketFromPath( $path ) {
-               $prefix = substr( sha1( $path ), 0, 2 ); // first 2 hex chars (8 bits)
-               return (int)base_convert( $prefix, 16, 10 ) % count( $this->srvsByBucket );
-       }
-
-       /**
-        * Check if a lock server is up.
-        * This should process cache results to reduce RTT.
-        *
-        * @param string $lockSrv
-        * @return bool
-        */
-       abstract protected function isServerUp( $lockSrv );
-
-       /**
-        * Get a connection to a lock server and acquire locks
-        *
-        * @param string $lockSrv
-        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
-        * @return Status
-        */
-       abstract protected function getLocksOnServer( $lockSrv, array $pathsByType );
-
-       /**
-        * Get a connection to a lock server and release locks on $paths.
-        *
-        * Subclasses must effectively implement this or releaseAllLocks().
-        *
-        * @param string $lockSrv
-        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
-        * @return Status
-        */
-       abstract protected function freeLocksOnServer( $lockSrv, array $pathsByType );
-
-       /**
-        * Release all locks that this session is holding.
-        *
-        * Subclasses must effectively implement this or freeLocksOnServer().
-        *
-        * @return Status
-        */
-       abstract protected function releaseAllLocks();
-}
diff --git a/includes/filebackend/lockmanager/RedisLockManager.php b/includes/filebackend/lockmanager/RedisLockManager.php
deleted file mode 100644 (file)
index 4121ecb..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-<?php
-/**
- * Version of LockManager based on using redis servers.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup LockManager
- */
-
-/**
- * Manage locks using redis servers.
- *
- * Version of LockManager based on using redis servers.
- * This is meant for multi-wiki systems that may share files.
- * All locks are non-blocking, which avoids deadlocks.
- *
- * All lock requests for a resource, identified by a hash string, will map to one
- * bucket. Each bucket maps to one or several peer servers, each running redis.
- * A majority of peers must agree for a lock to be acquired.
- *
- * This class requires Redis 2.6 as it makes use Lua scripts for fast atomic operations.
- *
- * @ingroup LockManager
- * @since 1.22
- */
-class RedisLockManager extends QuorumLockManager {
-       /** @var array Mapping of lock types to the type actually used */
-       protected $lockTypeMap = [
-               self::LOCK_SH => self::LOCK_SH,
-               self::LOCK_UW => self::LOCK_SH,
-               self::LOCK_EX => self::LOCK_EX
-       ];
-
-       /** @var RedisConnectionPool */
-       protected $redisPool;
-
-       /** @var array Map server names to hostname/IP and port numbers */
-       protected $lockServers = [];
-
-       /** @var string Random UUID */
-       protected $session = '';
-
-       /**
-        * Construct a new instance from configuration.
-        *
-        * @param array $config Parameters include:
-        *   - lockServers  : Associative array of server names to "<IP>:<port>" strings.
-        *   - srvsByBucket : Array of 1-16 consecutive integer keys, starting from 0,
-        *                    each having an odd-numbered list of server names (peers) as values.
-        *   - redisConfig  : Configuration for RedisConnectionPool::__construct().
-        * @throws Exception
-        */
-       public function __construct( array $config ) {
-               parent::__construct( $config );
-
-               $this->lockServers = $config['lockServers'];
-               // Sanitize srvsByBucket config to prevent PHP errors
-               $this->srvsByBucket = array_filter( $config['srvsByBucket'], 'is_array' );
-               $this->srvsByBucket = array_values( $this->srvsByBucket ); // consecutive
-
-               $config['redisConfig']['serializer'] = 'none';
-               $this->redisPool = RedisConnectionPool::singleton( $config['redisConfig'] );
-
-               $this->session = wfRandomString( 32 );
-       }
-
-       protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
-               $status = Status::newGood();
-
-               $pathList = call_user_func_array( 'array_merge', array_values( $pathsByType ) );
-
-               $server = $this->lockServers[$lockSrv];
-               $conn = $this->redisPool->getConnection( $server );
-               if ( !$conn ) {
-                       foreach ( $pathList as $path ) {
-                               $status->fatal( 'lockmanager-fail-acquirelock', $path );
-                       }
-
-                       return $status;
-               }
-
-               $pathsByKey = []; // (type:hash => path) map
-               foreach ( $pathsByType as $type => $paths ) {
-                       $typeString = ( $type == LockManager::LOCK_SH ) ? 'SH' : 'EX';
-                       foreach ( $paths as $path ) {
-                               $pathsByKey[$this->recordKeyForPath( $path, $typeString )] = $path;
-                       }
-               }
-
-               try {
-                       static $script =
-<<<LUA
-                       local failed = {}
-                       -- Load input params (e.g. session, ttl, time of request)
-                       local rSession, rTTL, rTime = unpack(ARGV)
-                       -- Check that all the locks can be acquired
-                       for i,requestKey in ipairs(KEYS) do
-                               local _, _, rType, resourceKey = string.find(requestKey,"(%w+):(%w+)$")
-                               local keyIsFree = true
-                               local currentLocks = redis.call('hKeys',resourceKey)
-                               for i,lockKey in ipairs(currentLocks) do
-                                       -- Get the type and session of this lock
-                                       local _, _, type, session = string.find(lockKey,"(%w+):(%w+)")
-                                       -- Check any locks that are not owned by this session
-                                       if session ~= rSession then
-                                               local lockExpiry = redis.call('hGet',resourceKey,lockKey)
-                                               if 1*lockExpiry < 1*rTime then
-                                                       -- Lock is stale, so just prune it out
-                                                       redis.call('hDel',resourceKey,lockKey)
-                                               elseif rType == 'EX' or type == 'EX' then
-                                                       keyIsFree = false
-                                                       break
-                                               end
-                                       end
-                               end
-                               if not keyIsFree then
-                                       failed[#failed+1] = requestKey
-                               end
-                       end
-                       -- If all locks could be acquired, then do so
-                       if #failed == 0 then
-                               for i,requestKey in ipairs(KEYS) do
-                                       local _, _, rType, resourceKey = string.find(requestKey,"(%w+):(%w+)$")
-                                       redis.call('hSet',resourceKey,rType .. ':' .. rSession,rTime + rTTL)
-                                       -- In addition to invalidation logic, be sure to garbage collect
-                                       redis.call('expire',resourceKey,rTTL)
-                               end
-                       end
-                       return failed
-LUA;
-                       $res = $conn->luaEval( $script,
-                               array_merge(
-                                       array_keys( $pathsByKey ), // KEYS[0], KEYS[1],...,KEYS[N]
-                                       [
-                                               $this->session, // ARGV[1]
-                                               $this->lockTTL, // ARGV[2]
-                                               time() // ARGV[3]
-                                       ]
-                               ),
-                               count( $pathsByKey ) # number of first argument(s) that are keys
-                       );
-               } catch ( RedisException $e ) {
-                       $res = false;
-                       $this->redisPool->handleError( $conn, $e );
-               }
-
-               if ( $res === false ) {
-                       foreach ( $pathList as $path ) {
-                               $status->fatal( 'lockmanager-fail-acquirelock', $path );
-                       }
-               } else {
-                       foreach ( $res as $key ) {
-                               $status->fatal( 'lockmanager-fail-acquirelock', $pathsByKey[$key] );
-                       }
-               }
-
-               return $status;
-       }
-
-       protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
-               $status = Status::newGood();
-
-               $pathList = call_user_func_array( 'array_merge', array_values( $pathsByType ) );
-
-               $server = $this->lockServers[$lockSrv];
-               $conn = $this->redisPool->getConnection( $server );
-               if ( !$conn ) {
-                       foreach ( $pathList as $path ) {
-                               $status->fatal( 'lockmanager-fail-releaselock', $path );
-                       }
-
-                       return $status;
-               }
-
-               $pathsByKey = []; // (type:hash => path) map
-               foreach ( $pathsByType as $type => $paths ) {
-                       $typeString = ( $type == LockManager::LOCK_SH ) ? 'SH' : 'EX';
-                       foreach ( $paths as $path ) {
-                               $pathsByKey[$this->recordKeyForPath( $path, $typeString )] = $path;
-                       }
-               }
-
-               try {
-                       static $script =
-<<<LUA
-                       local failed = {}
-                       -- Load input params (e.g. session)
-                       local rSession = unpack(ARGV)
-                       for i,requestKey in ipairs(KEYS) do
-                               local _, _, rType, resourceKey = string.find(requestKey,"(%w+):(%w+)$")
-                               local released = redis.call('hDel',resourceKey,rType .. ':' .. rSession)
-                               if released > 0 then
-                                       -- Remove the whole structure if it is now empty
-                                       if redis.call('hLen',resourceKey) == 0 then
-                                               redis.call('del',resourceKey)
-                                       end
-                               else
-                                       failed[#failed+1] = requestKey
-                               end
-                       end
-                       return failed
-LUA;
-                       $res = $conn->luaEval( $script,
-                               array_merge(
-                                       array_keys( $pathsByKey ), // KEYS[0], KEYS[1],...,KEYS[N]
-                                       [
-                                               $this->session, // ARGV[1]
-                                       ]
-                               ),
-                               count( $pathsByKey ) # number of first argument(s) that are keys
-                       );
-               } catch ( RedisException $e ) {
-                       $res = false;
-                       $this->redisPool->handleError( $conn, $e );
-               }
-
-               if ( $res === false ) {
-                       foreach ( $pathList as $path ) {
-                               $status->fatal( 'lockmanager-fail-releaselock', $path );
-                       }
-               } else {
-                       foreach ( $res as $key ) {
-                               $status->fatal( 'lockmanager-fail-releaselock', $pathsByKey[$key] );
-                       }
-               }
-
-               return $status;
-       }
-
-       protected function releaseAllLocks() {
-               return Status::newGood(); // not supported
-       }
-
-       protected function isServerUp( $lockSrv ) {
-               return (bool)$this->redisPool->getConnection( $this->lockServers[$lockSrv] );
-       }
-
-       /**
-        * @param string $path
-        * @param string $type One of (EX,SH)
-        * @return string
-        */
-       protected function recordKeyForPath( $path, $type ) {
-               return implode( ':',
-                       [ __CLASS__, 'locks', "$type:" . $this->sha1Base36Absolute( $path ) ] );
-       }
-
-       /**
-        * Make sure remaining locks get cleared for sanity
-        */
-       function __destruct() {
-               while ( count( $this->locksHeld ) ) {
-                       $pathsByType = [];
-                       foreach ( $this->locksHeld as $path => $locks ) {
-                               foreach ( $locks as $type => $count ) {
-                                       $pathsByType[$type][] = $path;
-                               }
-                       }
-                       $this->unlockByType( $pathsByType );
-               }
-       }
-}
diff --git a/includes/filebackend/lockmanager/ScopedLock.php b/includes/filebackend/lockmanager/ScopedLock.php
deleted file mode 100644 (file)
index e1a600c..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php
-/**
- * Resource locking handling.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup LockManager
- * @author Aaron Schulz
- */
-
-/**
- * Self-releasing locks
- *
- * LockManager helper class to handle scoped locks, which
- * release when an object is destroyed or goes out of scope.
- *
- * @ingroup LockManager
- * @since 1.19
- */
-class ScopedLock {
-       /** @var LockManager */
-       protected $manager;
-
-       /** @var Status */
-       protected $status;
-
-       /** @var array Map of lock types to resource paths */
-       protected $pathsByType;
-
-       /**
-        * @param LockManager $manager
-        * @param array $pathsByType Map of lock types to path lists
-        * @param Status $status
-        */
-       protected function __construct( LockManager $manager, array $pathsByType, Status $status ) {
-               $this->manager = $manager;
-               $this->pathsByType = $pathsByType;
-               $this->status = $status;
-       }
-
-       /**
-        * Get a ScopedLock object representing a lock on resource paths.
-        * Any locks are released once this object goes out of scope.
-        * The status object is updated with any errors or warnings.
-        *
-        * @param LockManager $manager
-        * @param array $paths List of storage paths or map of lock types to path lists
-        * @param int|string $type LockManager::LOCK_* constant or "mixed" and $paths
-        *   can be a map of types to paths (since 1.22). Otherwise $type should be an
-        *   integer and $paths should be a list of paths.
-        * @param Status $status
-        * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.22)
-        * @return ScopedLock|null Returns null on failure
-        */
-       public static function factory(
-               LockManager $manager, array $paths, $type, Status $status, $timeout = 0
-       ) {
-               $pathsByType = is_integer( $type ) ? [ $type => $paths ] : $paths;
-               $lockStatus = $manager->lockByType( $pathsByType, $timeout );
-               $status->merge( $lockStatus );
-               if ( $lockStatus->isOK() ) {
-                       return new self( $manager, $pathsByType, $status );
-               }
-
-               return null;
-       }
-
-       /**
-        * Release a scoped lock and set any errors in the attatched Status object.
-        * This is useful for early release of locks before function scope is destroyed.
-        * This is the same as setting the lock object to null.
-        *
-        * @param ScopedLock $lock
-        * @since 1.21
-        */
-       public static function release( ScopedLock &$lock = null ) {
-               $lock = null;
-       }
-
-       /**
-        * Release the locks when this goes out of scope
-        */
-       function __destruct() {
-               $wasOk = $this->status->isOK();
-               $this->status->merge( $this->manager->unlockByType( $this->pathsByType ) );
-               if ( $wasOk ) {
-                       // Make sure status is OK, despite any unlockFiles() fatals
-                       $this->status->setResult( true, $this->status->value );
-               }
-       }
-}
index b24354d..d06acf2 100644 (file)
@@ -66,6 +66,7 @@ class FSRepo extends FileRepo {
                                        "{$repoName}-deleted" => $deletedDir
                                ],
                                'fileMode' => $fileMode,
+                               'tmpDirectory' => wfTempDir()
                        ] );
                        // Update repo config to use this backend
                        $info['backend'] = $backend;
index 596dbde..5bc60a0 100644 (file)
@@ -50,8 +50,10 @@ class FileBackendDBRepoWrapper extends FileBackend {
        protected $dbs;
 
        public function __construct( array $config ) {
-               $config['name'] = $config['backend']->getName();
-               $config['wikiId'] = $config['backend']->getWikiId();
+               /** @var FileBackend $backend */
+               $backend = $config['backend'];
+               $config['name'] = $backend->getName();
+               $config['wikiId'] = $backend->getWikiId();
                parent::__construct( $config );
                $this->backend = $config['backend'];
                $this->repoName = $config['repoName'];
@@ -256,7 +258,7 @@ class FileBackendDBRepoWrapper extends FileBackend {
                return $this->translateSrcParams( __FUNCTION__, $params );
        }
 
-       public function getScopedLocksForOps( array $ops, Status $status ) {
+       public function getScopedLocksForOps( array $ops, StatusValue $status ) {
                return $this->backend->getScopedLocksForOps( $ops, $status );
        }
 
index b8b1cf6..66dab99 100644 (file)
@@ -393,7 +393,7 @@ class FileRepo {
                        if ( $this->oldFileFactory ) {
                                return call_user_func( $this->oldFileFactory, $title, $this, $time );
                        } else {
-                               return false;
+                               return null;
                        }
                } else {
                        return call_user_func( $this->fileFactory, $title, $this );
@@ -818,14 +818,14 @@ class FileRepo {
         *   self::OVERWRITE_SAME    Overwrite the file if the destination exists and has the
         *                           same contents as the source
         *   self::SKIP_LOCKING      Skip any file locking when doing the store
-        * @return FileRepoStatus
+        * @return Status
         */
        public function store( $srcPath, $dstZone, $dstRel, $flags = 0 ) {
                $this->assertWritableRepo(); // fail out if read-only
 
                $status = $this->storeBatch( [ [ $srcPath, $dstZone, $dstRel ] ], $flags );
                if ( $status->successCount == 0 ) {
-                       $status->ok = false;
+                       $status->setOK( false );
                }
 
                return $status;
@@ -841,7 +841,7 @@ class FileRepo {
         *                           same contents as the source
         *   self::SKIP_LOCKING      Skip any file locking when doing the store
         * @throws MWException
-        * @return FileRepoStatus
+        * @return Status
         */
        public function storeBatch( array $triplets, $flags = 0 ) {
                $this->assertWritableRepo(); // fail out if read-only
@@ -912,7 +912,7 @@ class FileRepo {
         * @param array $files List of files to delete
         * @param int $flags Bitwise combination of the following flags:
         *   self::SKIP_LOCKING      Skip any file locking when doing the deletions
-        * @return FileRepoStatus
+        * @return Status
         */
        public function cleanupBatch( array $files, $flags = 0 ) {
                $this->assertWritableRepo(); // fail out if read-only
@@ -952,7 +952,7 @@ class FileRepo {
         * @param array|string|null $options An array consisting of a key named headers
         *   listing extra headers. If a string, taken as content-disposition header.
         *   (Support for array of options new in 1.23)
-        * @return FileRepoStatus
+        * @return Status
         */
        final public function quickImport( $src, $dst, $options = null ) {
                return $this->quickImportBatch( [ [ $src, $dst, $options ] ] );
@@ -964,7 +964,7 @@ class FileRepo {
         * This is intended for purging thumbnails.
         *
         * @param string $path Virtual URL or storage path
-        * @return FileRepoStatus
+        * @return Status
         */
        final public function quickPurge( $path ) {
                return $this->quickPurgeBatch( [ $path ] );
@@ -995,7 +995,7 @@ class FileRepo {
         * When "headers" are given they are used as HTTP headers if supported.
         *
         * @param array $triples List of (source path or FSFile, destination path, disposition)
-        * @return FileRepoStatus
+        * @return Status
         */
        public function quickImportBatch( array $triples ) {
                $status = $this->newGood();
@@ -1040,7 +1040,7 @@ class FileRepo {
         * This does no locking nor journaling and is intended for purging thumbnails.
         *
         * @param array $paths List of virtual URLs or storage paths
-        * @return FileRepoStatus
+        * @return Status
         */
        public function quickPurgeBatch( array $paths ) {
                $status = $this->newGood();
@@ -1065,7 +1065,7 @@ class FileRepo {
         * @param string $originalName The base name of the file as specified
         *   by the user. The file extension will be maintained.
         * @param string $srcPath The current location of the file.
-        * @return FileRepoStatus Object with the URL in the value.
+        * @return Status Object with the URL in the value.
         */
        public function storeTemp( $originalName, $srcPath ) {
                $this->assertWritableRepo(); // fail out if read-only
@@ -1107,7 +1107,7 @@ class FileRepo {
         * @param string $dstPath Target file system path
         * @param int $flags Bitwise combination of the following flags:
         *   self::DELETE_SOURCE     Delete the source files on success
-        * @return FileRepoStatus
+        * @return Status
         */
        public function concatenate( array $srcPaths, $dstPath, $flags = 0 ) {
                $this->assertWritableRepo(); // fail out if read-only
@@ -1156,7 +1156,7 @@ class FileRepo {
         * @param int $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate
         *   that the source file should be deleted if possible
         * @param array $options Optional additional parameters
-        * @return FileRepoStatus
+        * @return Status
         */
        public function publish(
                $src, $dstRel, $archiveRel, $flags = 0, array $options = []
@@ -1166,7 +1166,7 @@ class FileRepo {
                $status = $this->publishBatch(
                        [ [ $src, $dstRel, $archiveRel, $options ] ], $flags );
                if ( $status->successCount == 0 ) {
-                       $status->ok = false;
+                       $status->setOK( false );
                }
                if ( isset( $status->value[0] ) ) {
                        $status->value = $status->value[0];
@@ -1185,7 +1185,7 @@ class FileRepo {
         * @param int $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate
         *   that the source files should be deleted if possible
         * @throws MWException
-        * @return FileRepoStatus
+        * @return Status
         */
        public function publishBatch( array $ntuples, $flags = 0 ) {
                $this->assertWritableRepo(); // fail out if read-only
@@ -1322,7 +1322,10 @@ class FileRepo {
                        $params = [ 'noAccess' => true, 'noListing' => true ] + $params;
                }
 
-               return $this->backend->prepare( $params );
+               $status = $this->newGood();
+               $status->merge( $this->backend->prepare( $params ) );
+
+               return $status;
        }
 
        /**
@@ -1380,7 +1383,7 @@ class FileRepo {
         * @param mixed $srcRel Relative path for the file to be deleted
         * @param mixed $archiveRel Relative path for the archive location.
         *   Relative to a private archive directory.
-        * @return FileRepoStatus
+        * @return Status
         */
        public function delete( $srcRel, $archiveRel ) {
                $this->assertWritableRepo(); // fail out if read-only
@@ -1403,7 +1406,7 @@ class FileRepo {
         *   public root in the first element, and the archive file path relative
         *   to the deleted zone root in the second element.
         * @throws MWException
-        * @return FileRepoStatus
+        * @return Status
         */
        public function deleteBatch( array $sourceDestPairs ) {
                $this->assertWritableRepo(); // fail out if read-only
@@ -1539,9 +1542,15 @@ class FileRepo {
         * @return array
         */
        public function getFileProps( $virtualUrl ) {
-               $path = $this->resolveToStoragePath( $virtualUrl );
+               $fsFile = $this->getLocalReference( $virtualUrl );
+               $mwProps = new MWFileProps( MimeMagic::singleton() );
+               if ( $fsFile ) {
+                       $props = $mwProps->getPropsFromPath( $fsFile->getPath(), true );
+               } else {
+                       $props = $mwProps->newPlaceholderProps();
+               }
 
-               return $this->backend->getFileProps( [ 'src' => $path ] );
+               return $props;
        }
 
        /**
@@ -1593,7 +1602,10 @@ class FileRepo {
                $path = $this->resolveToStoragePath( $virtualUrl );
                $params = [ 'src' => $path, 'headers' => $headers, 'options' => $optHeaders ];
 
-               return $this->backend->streamFile( $params );
+               $status = $this->newGood();
+               $status->merge( $this->backend->streamFile( $params ) );
+
+               return $status;
        }
 
        /**
index 645a59b..4176c82 100644 (file)
@@ -532,8 +532,8 @@ class ForeignAPIRepo extends FileRepo {
                $status = $req->execute();
 
                if ( $status->isOK() ) {
-                       $mtime = wfTimestampOrNull( TS_UNIX, $req->getResponseHeader( 'Last-Modified' ) );
-                       $mtime = $mtime ?: false;
+                       $lmod = $req->getResponseHeader( 'Last-Modified' );
+                       $mtime = $lmod ? wfTimestamp( TS_UNIX, $lmod ) : false;
 
                        return $req->getContent();
                } else {
index 001800f..7fb7a0e 100644 (file)
@@ -51,9 +51,12 @@ class ForeignDBRepo extends LocalRepo {
        /** @var bool */
        protected $hasSharedCache;
 
-       # Other stuff
+       /** @var IDatabase */
        protected $dbConn;
+
+       /** @var callable */
        protected $fileFactory = [ 'ForeignDBFile', 'newFromTitle' ];
+       /** @var callable */
        protected $fileFromRowFactory = [ 'ForeignDBFile', 'newFromRow' ];
 
        /**
@@ -106,7 +109,7 @@ class ForeignDBRepo extends LocalRepo {
                ];
 
                return function ( $index ) use ( $type, $params ) {
-                       return DatabaseBase::factory( $type, $params );
+                       return Database::factory( $type, $params );
                };
        }
 
index f8b1ed9..129d55a 100644 (file)
@@ -42,6 +42,9 @@ class ForeignDBViaLBRepo extends LocalRepo {
        /** @var array */
        protected $fileFromRowFactory = [ 'ForeignDBFile', 'newFromRow' ];
 
+       /** @var bool */
+       protected $hasSharedCache;
+
        /**
         * @param array|null $info
         */
@@ -56,23 +59,22 @@ class ForeignDBViaLBRepo extends LocalRepo {
         * @return IDatabase
         */
        function getMasterDB() {
-               return wfGetDB( DB_MASTER, [], $this->wiki );
+               return wfGetLB( $this->wiki )->getConnectionRef( DB_MASTER, [], $this->wiki );
        }
 
        /**
         * @return IDatabase
         */
        function getSlaveDB() {
-               return wfGetDB( DB_REPLICA, [], $this->wiki );
+               return wfGetLB( $this->wiki )->getConnectionRef( DB_REPLICA, [], $this->wiki );
        }
 
        /**
         * @return Closure
         */
        protected function getDBFactory() {
-               $wiki = $this->wiki;
-               return function( $index ) use ( $wiki ) {
-                       return wfGetDB( $index, [], $wiki );
+               return function( $index ) {
+                       return wfGetLB( $this->wiki )->getConnectionRef( $index, [], $this->wiki );
                };
        }
 
index fccb755..c195241 100644 (file)
  * @ingroup FileRepo
  */
 class LocalRepo extends FileRepo {
-       /** @var array */
+       /** @var callable */
        protected $fileFactory = [ 'LocalFile', 'newFromTitle' ];
-
-       /** @var array */
+       /** @var callable */
        protected $fileFactoryKey = [ 'LocalFile', 'newFromKey' ];
-
-       /** @var array */
+       /** @var callable */
        protected $fileFromRowFactory = [ 'LocalFile', 'newFromRow' ];
-
-       /** @var array */
+       /** @var callable */
        protected $oldFileFromRowFactory = [ 'OldLocalFile', 'newFromRow' ];
-
-       /** @var array */
+       /** @var callable */
        protected $oldFileFactory = [ 'OldLocalFile', 'newFromTitle' ];
-
-       /** @var array */
+       /** @var callable */
        protected $oldFileFactoryKey = [ 'OldLocalFile', 'newFromKey' ];
 
        function __construct( array $info = null ) {
                parent::__construct( $info );
 
-               $this->hasSha1Storage = isset( $info['storageLayout'] ) && $info['storageLayout'] === 'sha1';
+               $this->hasSha1Storage = isset( $info['storageLayout'] )
+                       && $info['storageLayout'] === 'sha1';
 
                if ( $this->hasSha1Storage() ) {
                        $this->backend = new FileBackendDBRepoWrapper( [
@@ -93,7 +89,7 @@ class LocalRepo extends FileRepo {
         *
         * @param array $storageKeys
         *
-        * @return FileRepoStatus
+        * @return Status
         */
        function cleanupDeletedBatch( array $storageKeys ) {
                if ( $this->hasSha1Storage() ) {
@@ -454,7 +450,7 @@ class LocalRepo extends FileRepo {
 
        /**
         * Get a connection to the replica DB
-        * @return DatabaseBase
+        * @return IDatabase
         */
        function getSlaveDB() {
                return wfGetDB( DB_REPLICA );
@@ -462,7 +458,7 @@ class LocalRepo extends FileRepo {
 
        /**
         * Get a connection to the master DB
-        * @return DatabaseBase
+        * @return IDatabase
         */
        function getMasterDB() {
                return wfGetDB( DB_MASTER );
@@ -500,9 +496,12 @@ class LocalRepo extends FileRepo {
        function invalidateImageRedirect( Title $title ) {
                $key = $this->getSharedCacheKey( 'image_redirect', md5( $title->getDBkey() ) );
                if ( $key ) {
-                       $this->getMasterDB()->onTransactionPreCommitOrIdle( function() use ( $key ) {
-                               ObjectCache::getMainWANInstance()->delete( $key );
-                       } );
+                       $this->getMasterDB()->onTransactionPreCommitOrIdle(
+                               function () use ( $key ) {
+                                       ObjectCache::getMainWANInstance()->delete( $key );
+                               },
+                               __METHOD__
+                       );
                }
        }
 
@@ -559,7 +558,7 @@ class LocalRepo extends FileRepo {
         *
         * @param string $function
         * @param array $args
-        * @return FileRepoStatus
+        * @return Status
         */
        protected function skipWriteOperationIfSha1( $function, array $args ) {
                $this->assertWritableRepo(); // fail out if read-only
index d515b05..d47624f 100644 (file)
@@ -135,17 +135,18 @@ class RepoGroup {
                }
 
                # Check the cache
+               $dbkey = $title->getDBkey();
                if ( empty( $options['ignoreRedirect'] )
                        && empty( $options['private'] )
                        && empty( $options['bypassCache'] )
                ) {
                        $time = isset( $options['time'] ) ? $options['time'] : '';
-                       $dbkey = $title->getDBkey();
                        if ( $this->cache->has( $dbkey, $time, 60 ) ) {
                                return $this->cache->get( $dbkey, $time );
                        }
                        $useCache = true;
                } else {
+                       $time = false;
                        $useCache = false;
                }
 
@@ -451,7 +452,9 @@ class RepoGroup {
 
                        return $repo->getFileProps( $fileName );
                } else {
-                       return FSFile::getPropsFromPath( $fileName );
+                       $mwProps = new MWFileProps( MimeMagic::singleton() );
+
+                       return $mwProps->getPropsFromPath( $fileName, true );
                }
        }
 
index d1e683a..921e129 100644 (file)
@@ -425,6 +425,7 @@ class ArchivedFile {
         */
        function pageCount() {
                if ( !isset( $this->pageCount ) ) {
+                       // @FIXME: callers expect File objects
                        if ( $this->getHandler() && $this->handler->isMultiPage( $this ) ) {
                                $this->pageCount = $this->handler->pageCount( $this );
                        } else {
index 425a08c..c1d5573 100644 (file)
@@ -1328,7 +1328,7 @@ abstract class File implements IDBAccessObject {
         */
        protected function makeTransformTmpFile( $thumbPath ) {
                $thumbExt = FileBackend::extensionFromPath( $thumbPath );
-               return TempFSFile::factory( 'transform_', $thumbExt );
+               return TempFSFile::factory( 'transform_', $thumbExt, wfTempDir() );
        }
 
        /**
@@ -1805,7 +1805,7 @@ abstract class File implements IDBAccessObject {
         * @param int $flags A bitwise combination of:
         *   File::DELETE_SOURCE    Delete the source file, i.e. move rather than copy
         * @param array $options Optional additional parameters
-        * @return FileRepoStatus On success, the value member contains the
+        * @return Status On success, the value member contains the
         *   archive name, or an empty string if it was a new file.
         *
         * STUB
@@ -1905,7 +1905,7 @@ abstract class File implements IDBAccessObject {
         * and logging are caller's responsibility
         *
         * @param Title $target New file name
-        * @return FileRepoStatus
+        * @return Status
         */
        function move( $target ) {
                $this->readOnlyError();
@@ -1922,7 +1922,7 @@ abstract class File implements IDBAccessObject {
         * @param string $reason
         * @param bool $suppress Hide content from sysops?
         * @param User|null $user
-        * @return FileRepoStatus
+        * @return Status
         * STUB
         * Overridden by LocalFile
         */
index f6752d8..43b6855 100644 (file)
  * @ingroup FileAbstraction
  */
 class ForeignAPIFile extends File {
+       /** @var bool */
        private $mExists;
+       /** @var array */
+       private $mInfo = [];
 
        protected $repoClass = 'ForeignApiRepo';
 
@@ -244,7 +247,7 @@ class ForeignAPIFile extends File {
        public function getUser( $type = 'text' ) {
                if ( $type == 'text' ) {
                        return isset( $this->mInfo['user'] ) ? strval( $this->mInfo['user'] ) : null;
-               } elseif ( $type == 'id' ) {
+               } else {
                        return 0; // What makes sense here, for a remote user?
                }
        }
@@ -344,9 +347,6 @@ class ForeignAPIFile extends File {
                return $files;
        }
 
-       /**
-        * @see File::purgeCache()
-        */
        function purgeCache( $options = [] ) {
                $this->purgeThumbnails( $options );
                $this->purgeDescriptionPage();
index cf0045e..c041dea 100644 (file)
@@ -57,7 +57,7 @@ class ForeignDBFile extends LocalFile {
         * @param string $srcPath
         * @param int $flags
         * @param array $options
-        * @return FileRepoStatus
+        * @return Status
         * @throws MWException
         */
        function publish( $srcPath, $flags = 0, array $options = [] ) {
@@ -84,7 +84,7 @@ class ForeignDBFile extends LocalFile {
        /**
         * @param array $versions
         * @param bool $unsuppress
-        * @return FileRepoStatus
+        * @return Status
         * @throws MWException
         */
        function restore( $versions = [], $unsuppress = false ) {
@@ -95,7 +95,7 @@ class ForeignDBFile extends LocalFile {
         * @param string $reason
         * @param bool $suppress
         * @param User|null $user
-        * @return FileRepoStatus
+        * @return Status
         * @throws MWException
         */
        function delete( $reason, $suppress = false, $user = null ) {
@@ -104,7 +104,7 @@ class ForeignDBFile extends LocalFile {
 
        /**
         * @param Title $target
-        * @return FileRepoStatus
+        * @return Status
         * @throws MWException
         */
        function move( $target ) {
index d63a91b..d3a14fa 100644 (file)
@@ -313,9 +313,12 @@ class LocalFile extends File {
                        return;
                }
 
-               $this->repo->getMasterDB()->onTransactionPreCommitOrIdle( function() use ( $key ) {
-                       ObjectCache::getMainWANInstance()->delete( $key );
-               } );
+               $this->repo->getMasterDB()->onTransactionPreCommitOrIdle(
+                       function () use ( $key ) {
+                               ObjectCache::getMainWANInstance()->delete( $key );
+                       },
+                       __METHOD__
+               );
        }
 
        /**
@@ -1157,7 +1160,7 @@ class LocalFile extends File {
         * @param User|null $user User object or null to use $wgUser
         * @param string[] $tags Change tags to add to the log entry and page revision.
         *   (This doesn't check $user's permissions.)
-        * @return FileRepoStatus On success, the value member contains the
+        * @return Status On success, the value member contains the
         *     archive name, or an empty string if it was a new file.
         */
        function upload( $src, $comment, $pageText, $flags = 0, $props = false,
@@ -1176,7 +1179,8 @@ class LocalFile extends File {
                        ) {
                                $props = $this->repo->getFileProps( $srcPath );
                        } else {
-                               $props = FSFile::getPropsFromPath( $srcPath );
+                               $mwProps = new MWFileProps( MimeMagic::singleton() );
+                               $props = $mwProps->getPropsFromPath( $srcPath, true );
                        }
                }
 
@@ -1477,8 +1481,10 @@ class LocalFile extends File {
                                                );
 
                                                if ( isset( $status->value['revision'] ) ) {
+                                                       /** @var $rev Revision */
+                                                       $rev = $status->value['revision'];
                                                        // Associate new page revision id
-                                                       $logEntry->setAssociatedRevId( $status->value['revision']->getId() );
+                                                       $logEntry->setAssociatedRevId( $rev->getId() );
                                                }
                                                // This relies on the resetArticleID() call in WikiPage::insertOn(),
                                                // which is triggered on $descTitle by doEditContent() above.
@@ -1576,7 +1582,7 @@ class LocalFile extends File {
         * @param int $flags A bitwise combination of:
         *     File::DELETE_SOURCE    Delete the source file, i.e. move rather than copy
         * @param array $options Optional additional parameters
-        * @return FileRepoStatus On success, the value member contains the
+        * @return Status On success, the value member contains the
         *     archive name, or an empty string if it was a new file.
         */
        function publish( $src, $flags = 0, array $options = [] ) {
@@ -1595,7 +1601,7 @@ class LocalFile extends File {
         * @param int $flags A bitwise combination of:
         *     File::DELETE_SOURCE    Delete the source file, i.e. move rather than copy
         * @param array $options Optional additional parameters
-        * @return FileRepoStatus On success, the value member contains the
+        * @return Status On success, the value member contains the
         *     archive name, or an empty string if it was a new file.
         */
        function publishTo( $src, $dstRel, $flags = 0, array $options = [] ) {
@@ -1657,7 +1663,7 @@ class LocalFile extends File {
         * and logging are caller's responsibility
         *
         * @param Title $target New file name
-        * @return FileRepoStatus
+        * @return Status
         */
        function move( $target ) {
                if ( $this->getRepo()->getReadOnlyReason() !== false ) {
@@ -1716,7 +1722,7 @@ class LocalFile extends File {
         * @param string $reason
         * @param bool $suppress
         * @param User|null $user
-        * @return FileRepoStatus
+        * @return Status
         */
        function delete( $reason, $suppress = false, $user = null ) {
                if ( $this->getRepo()->getReadOnlyReason() !== false ) {
@@ -1774,7 +1780,7 @@ class LocalFile extends File {
         * @param bool $suppress
         * @param User|null $user
         * @throws MWException Exception on database or file store failure
-        * @return FileRepoStatus
+        * @return Status
         */
        function deleteOld( $archiveName, $reason, $suppress = false, $user = null ) {
                if ( $this->getRepo()->getReadOnlyReason() !== false ) {
@@ -1810,7 +1816,7 @@ class LocalFile extends File {
         * @param array $versions Set of record ids of deleted items to restore,
         *   or empty to restore all revisions.
         * @param bool $unsuppress
-        * @return FileRepoStatus
+        * @return Status
         */
        function restore( $versions = [], $unsuppress = false ) {
                if ( $this->getRepo()->getReadOnlyReason() !== false ) {
@@ -2002,12 +2008,15 @@ class LocalFile extends File {
                        }
                        // Release the lock *after* commit to avoid row-level contention.
                        // Make sure it triggers on rollback() as well as commit() (T132921).
-                       $dbw->onTransactionResolution( function () use ( $logger ) {
-                               $status = $this->releaseFileLock();
-                               if ( !$status->isGood() ) {
-                                       $logger->error( "Failed to unlock '{file}'", [ 'file' => $this->name ] );
-                               }
-                       } );
+                       $dbw->onTransactionResolution(
+                               function () use ( $logger ) {
+                                       $status = $this->releaseFileLock();
+                                       if ( !$status->isGood() ) {
+                                               $logger->error( "Failed to unlock '{file}'", [ 'file' => $this->name ] );
+                                       }
+                               },
+                               __METHOD__
+                       );
                        // Callers might care if the SELECT snapshot is safely fresh
                        $this->lockedOwnTrx = $makesTransaction;
                }
@@ -2225,12 +2234,7 @@ class LocalFileDeleteBatch {
 
                // Bitfields to further suppress the content
                if ( $this->suppress ) {
-                       $bitfield = 0;
-                       // This should be 15...
-                       $bitfield |= Revision::DELETED_TEXT;
-                       $bitfield |= Revision::DELETED_COMMENT;
-                       $bitfield |= Revision::DELETED_USER;
-                       $bitfield |= Revision::DELETED_RESTRICTED;
+                       $bitfield = Revision::SUPPRESSED_ALL;
                } else {
                        $bitfield = 'oi_deleted';
                }
@@ -2250,7 +2254,6 @@ class LocalFileDeleteBatch {
                                        'fa_deleted_timestamp' => $encTimestamp,
                                        'fa_deleted_reason' => $encReason,
                                        'fa_deleted' => $this->suppress ? $bitfield : 0,
-
                                        'fa_name' => 'img_name',
                                        'fa_archive_name' => 'NULL',
                                        'fa_size' => 'img_size',
@@ -2337,7 +2340,7 @@ class LocalFileDeleteBatch {
 
        /**
         * Run the transaction
-        * @return FileRepoStatus
+        * @return Status
         */
        public function execute() {
                $repo = $this->file->getRepo();
@@ -2485,7 +2488,7 @@ class LocalFileRestoreBatch {
         * rows and there's no need to keep the image row locked while it's acquiring those locks
         * The caller may have its own transaction open.
         * So we save the batch and let the caller call cleanup()
-        * @return FileRepoStatus
+        * @return Status
         */
        public function execute() {
                /** @var Language */
@@ -2686,7 +2689,7 @@ class LocalFileRestoreBatch {
                                // Even if some files could be copied, fail entirely as that is the
                                // easiest thing to do without data loss
                                $this->cleanupFailedBatch( $storeStatus, $storeBatch );
-                               $status->ok = false;
+                               $status->setOK( false );
                                $this->file->unlock();
 
                                return $status;
@@ -2786,7 +2789,7 @@ class LocalFileRestoreBatch {
        /**
         * Delete unused files in the deleted zone.
         * This should be called from outside the transaction in which execute() was called.
-        * @return FileRepoStatus
+        * @return Status
         */
        public function cleanup() {
                if ( !$this->cleanupBatch ) {
@@ -2843,7 +2846,7 @@ class LocalFileMoveBatch {
 
        protected $archive;
 
-       /** @var DatabaseBase */
+       /** @var IDatabase */
        protected $db;
 
        /**
@@ -2921,7 +2924,7 @@ class LocalFileMoveBatch {
 
        /**
         * Perform the move.
-        * @return FileRepoStatus
+        * @return Status
         */
        public function execute() {
                $repo = $this->file->repo;
@@ -2946,7 +2949,7 @@ class LocalFileMoveBatch {
                if ( !$statusDb->isGood() ) {
                        $destFile->unlock();
                        $this->file->unlock();
-                       $statusDb->ok = false;
+                       $statusDb->setOK( false );
 
                        return $statusDb;
                }
@@ -2965,7 +2968,7 @@ class LocalFileMoveBatch {
                                $this->file->unlock();
                                wfDebugLog( 'imagemove', "Error in moving files: "
                                        . $statusMove->getWikiText( false, false, 'en' ) );
-                               $statusMove->ok = false;
+                               $statusMove->setOK( false );
 
                                return $statusMove;
                        }
@@ -2993,7 +2996,7 @@ class LocalFileMoveBatch {
         * Verify the database updates and return a new FileRepoStatus indicating how
         * many rows would be updated.
         *
-        * @return FileRepoStatus
+        * @return Status
         */
        protected function verifyDBUpdates() {
                $repo = $this->file->repo;
index 31e62ec..a17ca6e 100644 (file)
@@ -332,7 +332,7 @@ class OldLocalFile extends LocalFile {
         * @param string $timestamp
         * @param string $comment
         * @param User $user
-        * @return FileRepoStatus
+        * @return Status
         */
        function uploadOld( $srcPath, $archiveName, $timestamp, $comment, $user ) {
                $this->lock();
index f6527b8..0f889da 100644 (file)
@@ -238,8 +238,8 @@ class TraditionalImageGallery extends ImageGalleryBase {
        }
 
        /**
-        * How much padding such the thumb have between image and inner div that
-        * that contains the border. This is both for verical and horizontal
+        * How much padding the thumb has between the image and the inner div
+        * that contains the border. This is for both vertical and horizontal
         * padding. (However, it is cut in half in the vertical direction).
         * @return int
         */
index 3c88594..cadb502 100644 (file)
@@ -147,12 +147,16 @@ class HTMLForm extends ContextSource {
                'namespaceselect' => 'HTMLSelectNamespace',
                'namespaceselectwithbutton' => 'HTMLSelectNamespaceWithButton',
                'tagfilter' => 'HTMLTagFilter',
+               'sizefilter' => 'HTMLSizeFilterField',
                'submit' => 'HTMLSubmitField',
                'hidden' => 'HTMLHiddenField',
                'edittools' => 'HTMLEditTools',
                'checkmatrix' => 'HTMLCheckMatrix',
                'cloner' => 'HTMLFormFieldCloner',
                'autocompleteselect' => 'HTMLAutoCompleteSelectField',
+               'date' => 'HTMLDateTimeField',
+               'time' => 'HTMLDateTimeField',
+               'datetime' => 'HTMLDateTimeField',
                // HTMLTextField will output the correct type="" attribute automagically.
                // There are about four zillion other HTML5 input types, like range, but
                // we don't use those at the moment, so no point in adding all of them.
@@ -173,7 +177,7 @@ class HTMLForm extends ContextSource {
        protected $mFieldTree;
        protected $mShowReset = false;
        protected $mShowSubmit = true;
-       protected $mSubmitFlags = [ 'constructive', 'primary' ];
+       protected $mSubmitFlags = [ 'primary', 'progressive' ];
        protected $mShowCancel = false;
        protected $mCancelTarget;
 
@@ -1014,7 +1018,8 @@ class HTMLForm extends ContextSource {
                $this->getOutput()->addModuleStyles( 'mediawiki.htmlform.styles' );
 
                $html = ''
-                       . $this->getErrors( $submitResult )
+                       . $this->getErrorsOrWarnings( $submitResult, 'error' )
+                       . $this->getErrorsOrWarnings( $submitResult, 'warning' )
                        . $this->getHeaderText()
                        . $this->getBody()
                        . $this->getHiddenFields()
@@ -1230,23 +1235,46 @@ class HTMLForm extends ContextSource {
         *
         * @param string|array|Status $errors
         *
+        * @deprecated since 1.28, use getErrorsOrWarnings() instead
+        *
         * @return string
         */
        public function getErrors( $errors ) {
-               if ( $errors instanceof Status ) {
-                       if ( $errors->isOK() ) {
-                               $errorstr = '';
+               wfDeprecated( __METHOD__ );
+               return $this->getErrorsOrWarnings( $errors, 'error' );
+       }
+
+       /**
+        * Returns a formatted list of errors or warnings from the given elements.
+        *
+        * @param string|array|Status $elements The set of errors/warnings to process.
+        * @param string $elementsType Should warnings or errors be returned.  This is meant
+        *      for Status objects, all other valid types are always considered as errors.
+        * @return string
+        */
+       public function getErrorsOrWarnings( $elements, $elementsType ) {
+               if ( !in_array( $elementsType, [ 'error', 'warning' ], true ) ) {
+                       throw new DomainException( $elementsType . ' is not a valid type.' );
+               }
+               $elementstr = false;
+               if ( $elements instanceof Status ) {
+                       list( $errorStatus, $warningStatus ) = $elements->splitByErrorType();
+                       $status = $elementsType === 'error' ? $errorStatus : $warningStatus;
+                       if ( $status->isGood() ) {
+                               $elementstr = '';
                        } else {
-                               $errorstr = $this->getOutput()->parse( $errors->getWikiText() );
+                               $elementstr = $this->getOutput()->parse(
+                                       $status->getWikiText()
+                               );
                        }
-               } elseif ( is_array( $errors ) ) {
-                       $errorstr = $this->formatErrors( $errors );
-               } else {
-                       $errorstr = $errors;
+               } elseif ( is_array( $elements ) && $elementsType === 'error' ) {
+                       $elementstr = $this->formatErrors( $elements );
+               } elseif ( $elementsType === 'error' ) {
+                       $elementstr = $elements;
                }
 
-               return $errorstr
-                       ? Html::rawElement( 'div', [ 'class' => 'error' ], $errorstr )
+               return $elementstr
+                       ? Html::rawElement( 'div', [ 'class' => $elementsType ], $elementstr )
                        : '';
        }
 
index 8604ba2..4afdea7 100644 (file)
@@ -821,7 +821,7 @@ abstract class HTMLFormField {
        /**
         * Determine the help text to display
         * @since 1.20
-        * @return string HTML
+        * @return string|null HTML
         */
        public function getHelpText() {
                $helptext = null;
index 0b22727..6fbf15b 100644 (file)
@@ -26,6 +26,7 @@
  */
 class OOUIHTMLForm extends HTMLForm {
        private $oouiErrors;
+       private $oouiWarnings;
 
        public function __construct( $descriptor, $context = null, $messagePrefix = '' ) {
                parent::__construct( $descriptor, $context, $messagePrefix );
@@ -185,28 +186,34 @@ class OOUIHTMLForm extends HTMLForm {
        }
 
        /**
-        * @param string|array|Status $err
+        * @param string|array|Status $elements
+        * @param string $elementsType
         * @return string
         */
-       function getErrors( $err ) {
-               if ( !$err ) {
+       function getErrorsOrWarnings( $elements, $elementsType ) {
+               if ( !in_array( $elementsType, [ 'error', 'warning' ] ) ) {
+                       throw new DomainException( $elementsType . ' is not a valid type.' );
+               }
+               if ( !$elements ) {
                        $errors = [];
-               } elseif ( $err instanceof Status ) {
-                       if ( $err->isOK() ) {
+               } elseif ( $elements instanceof Status ) {
+                       if ( $elements->isGood() ) {
                                $errors = [];
                        } else {
-                               $errors = $err->getErrorsByType( 'error' );
+                               $errors = $elements->getErrorsByType( $elementsType );
                                foreach ( $errors as &$error ) {
-                                       // Input:  array( 'message' => 'foo', 'errors' => array( 'a', 'b', 'c' ) )
-                                       // Output: array( 'foo', 'a', 'b', 'c' )
+                                       // Input:  [ 'message' => 'foo', 'errors' => [ 'a', 'b', 'c' ] ]
+                                       // Output: [ 'foo', 'a', 'b', 'c' ]
                                        $error = array_merge( [ $error['message'] ], $error['params'] );
                                }
                        }
-               } else {
-                       $errors = $err;
+               } elseif ( $elementsType === 'errors' )  {
+                       $errors = $elements;
                        if ( !is_array( $errors ) ) {
                                $errors = [ $errors ];
                        }
+               } else {
+                       $errors = [];
                }
 
                foreach ( $errors as &$error ) {
@@ -215,7 +222,11 @@ class OOUIHTMLForm extends HTMLForm {
                }
 
                // Used in getBody()
-               $this->oouiErrors = $errors;
+               if ( $elementsType === 'error' ) {
+                       $this->oouiErrors = $errors;
+               } else {
+                       $this->oouiWarnings = $errors;
+               }
                return '';
        }
 
@@ -236,7 +247,10 @@ class OOUIHTMLForm extends HTMLForm {
                        if ( $this->oouiErrors ) {
                                $classes[] = 'mw-htmlform-ooui-header-errors';
                        }
-                       if ( $this->mHeader || $this->oouiErrors ) {
+                       if ( $this->oouiWarnings ) {
+                               $classes[] = 'mw-htmlform-ooui-header-warnings';
+                       }
+                       if ( $this->mHeader || $this->oouiErrors || $this->oouiWarnings ) {
                                // if there's no header, don't create an (empty) LabelWidget, simply use a placeholder
                                if ( $this->mHeader ) {
                                        $element = new OOUI\LabelWidget( [ 'label' => new OOUI\HtmlSnippet( $this->mHeader ) ] );
@@ -249,6 +263,7 @@ class OOUIHTMLForm extends HTMLForm {
                                                [
                                                        'align' => 'top',
                                                        'errors' => $this->oouiErrors,
+                                                       'notices' => $this->oouiWarnings,
                                                        'classes' => $classes,
                                                ]
                                        )
diff --git a/includes/htmlform/fields/HTMLDateTimeField.php b/includes/htmlform/fields/HTMLDateTimeField.php
new file mode 100644 (file)
index 0000000..3390a56
--- /dev/null
@@ -0,0 +1,193 @@
+<?php
+
+/**
+ * A field that will contain a date and/or time
+ *
+ * Currently recognizes only {YYYY}-{MM}-{DD}T{HH}:{MM}:{SS.S*}Z formatted dates.
+ *
+ * Besides the parameters recognized by HTMLTextField, additional recognized
+ * parameters in the field descriptor array include:
+ *  type - 'date', 'time', or 'datetime'
+ *  min - The minimum date to allow, in any recognized format.
+ *  max - The maximum date to allow, in any recognized format.
+ *  placeholder - The default comes from the htmlform-(date|time|datetime)-placeholder message.
+ *
+ * The result is a formatted date.
+ *
+ * @note This widget is not likely to work well in non-OOUI forms.
+ */
+class HTMLDateTimeField extends HTMLTextField {
+       protected static $patterns = [
+               'date' => '[0-9]{4}-[01][0-9]-[0-3][0-9]',
+               'time' => '[0-2][0-9]:[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?',
+               'datetime' => '[0-9]{4}-[01][0-9]-[0-3][0-9][T ][0-2][0-9]:[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?Z?',
+       ];
+
+       protected $mType = 'datetime';
+
+       public function __construct( $params ) {
+               parent::__construct( $params );
+
+               $this->mType = array_key_exists( 'type', $params )
+                       ? $params['type']
+                       : 'datetime';
+
+               if ( !in_array( $this->mType, [ 'date', 'time', 'datetime' ] ) ) {
+                       throw new InvalidArgumentException( "Invalid type '$this->mType'" );
+               }
+
+               $this->mClass .= ' mw-htmlform-datetime-field';
+       }
+
+       public function getAttributes( array $list ) {
+               $parentList = array_diff( $list, [ 'min', 'max' ] );
+               $ret = parent::getAttributes( $parentList );
+
+               if ( in_array( 'placeholder', $list ) && !isset( $ret['placeholder'] ) ) {
+                       // Messages: htmlform-date-placeholder htmlform-time-placeholder htmlform-datetime-placeholder
+                       $ret['placeholder'] = $this->msg( "htmlform-{$this->mType}-placeholder" )->text();
+               }
+
+               if ( in_array( 'min', $list ) && isset( $this->mParams['min'] ) ) {
+                       $min = $this->parseDate( $this->mParams['min'] );
+                       if ( $min ) {
+                               $ret['min'] = $this->formatDate( $min );
+                               // Because Html::expandAttributes filters it out
+                               $ret['data-min'] = $ret['min'];
+                       }
+               }
+               if ( in_array( 'max', $list ) && isset( $this->mParams['max'] ) ) {
+                       $max = $this->parseDate( $this->mParams['max'] );
+                       if ( $max ) {
+                               $ret['max'] = $this->formatDate( $max );
+                               // Because Html::expandAttributes filters it out
+                               $ret['data-max'] = $ret['max'];
+                       }
+               }
+
+               $ret['step'] = 1;
+               // Because Html::expandAttributes filters it out
+               $ret['data-step'] = 1;
+
+               $ret['type'] = $this->mType;
+               $ret['pattern'] = static::$patterns[$this->mType];
+
+               return $ret;
+       }
+
+       function loadDataFromRequest( $request ) {
+               if ( !$request->getCheck( $this->mName ) ) {
+                       return $this->getDefault();
+               }
+
+               $value = $request->getText( $this->mName );
+               $date = $this->parseDate( $value );
+               return $date ? $this->formatDate( $date ) : $value;
+       }
+
+       function validate( $value, $alldata ) {
+               $p = parent::validate( $value, $alldata );
+
+               if ( $p !== true ) {
+                       return $p;
+               }
+
+               if ( $value === '' ) {
+                       // required was already checked by parent::validate
+                       return true;
+               }
+
+               $date = $this->parseDate( $value );
+               if ( !$date ) {
+                       // Messages: htmlform-date-invalid htmlform-time-invalid htmlform-datetime-invalid
+                       return $this->msg( "htmlform-{$this->mType}-invalid" )->parseAsBlock();
+               }
+
+               if ( isset( $this->mParams['min'] ) ) {
+                       $min = $this->parseDate( $this->mParams['min'] );
+                       if ( $min && $date < $min ) {
+                               // Messages: htmlform-date-toolow htmlform-time-toolow htmlform-datetime-toolow
+                               return $this->msg( "htmlform-{$this->mType}-toolow", $this->formatDate( $min ) )
+                                       ->parseAsBlock();
+                       }
+               }
+
+               if ( isset( $this->mParams['max'] ) ) {
+                       $max = $this->parseDate( $this->mParams['max'] );
+                       if ( $max && $date > $max ) {
+                               // Messages: htmlform-date-toohigh htmlform-time-toohigh htmlform-datetime-toohigh
+                               return $this->msg( "htmlform-{$this->mType}-toohigh", $this->formatDate( $max ) )
+                                       ->parseAsBlock();
+                       }
+               }
+
+               return true;
+       }
+
+       protected function parseDate( $value ) {
+               $value = trim( $value );
+               if ( $value === '' ) {
+                       return false;
+               }
+
+               if ( $this->mType === 'date' ) {
+                       $value .= ' T00:00:00+0000';
+               }
+               if ( $this->mType === 'time' ) {
+                       $value = '1970-01-01 ' . $value . '+0000';
+               }
+
+               try {
+                       $date = new DateTime( $value, new DateTimeZone( 'GMT' ) );
+                       return $date->getTimestamp();
+               } catch ( Exception $ex ) {
+                       return false;
+               }
+       }
+
+       protected function formatDate( $value ) {
+               switch ( $this->mType ) {
+                       case 'date':
+                               return gmdate( 'Y-m-d', $value );
+
+                       case 'time':
+                               return gmdate( 'H:i:s', $value );
+
+                       case 'datetime':
+                               return gmdate( 'Y-m-d\\TH:i:s\\Z', $value );
+               }
+       }
+
+       public function getInputOOUI( $value ) {
+               $params = [
+                       'type' => $this->mType,
+                       'value' => $value,
+                       'name' => $this->mName,
+                       'id' => $this->mID,
+               ];
+
+               if ( isset( $this->mParams['min'] ) ) {
+                       $min = $this->parseDate( $this->mParams['min'] );
+                       if ( $min ) {
+                               $params['min'] = $this->formatDate( $min );
+                       }
+               }
+               if ( isset( $this->mParams['max'] ) ) {
+                       $max = $this->parseDate( $this->mParams['max'] );
+                       if ( $max ) {
+                               $params['max'] = $this->formatDate( $max );
+                       }
+               }
+
+               return new MediaWiki\Widget\DateTimeInputWidget( $params );
+       }
+
+       protected function getOOUIModules() {
+               return [ 'mediawiki.widgets.datetime' ];
+       }
+
+       protected function shouldInfuseOOUI() {
+               return true;
+       }
+
+}
index c9fcb09..fee5d63 100644 (file)
@@ -120,6 +120,8 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
         * @return OOUI\CheckboxMultiselectInputWidget
         */
        public function getInputOOUI( $value ) {
+               $this->mParent->getOutput()->addModules( 'oojs-ui-widgets' );
+
                $attr = $this->getTooltipAndAccessKey();
                $attr['id'] = $this->mID;
                $attr['name'] = "{$this->mName}[]";
diff --git a/includes/htmlform/fields/HTMLRestrictionsField.php b/includes/htmlform/fields/HTMLRestrictionsField.php
new file mode 100644 (file)
index 0000000..8dc16bf
--- /dev/null
@@ -0,0 +1,121 @@
+<?php
+
+/**
+ * Class for updating an MWRestrictions value (which is, currently, basically just an IP address
+ * list).
+ *
+ * Will be represented as a textarea with one address per line, with intelligent defaults for
+ * label, help text and row count.
+ *
+ * The value returned will be an MWRestrictions or the input string if it was not a list of
+ * valid IP ranges.
+ */
+class HTMLRestrictionsField extends HTMLTextAreaField {
+       const DEFAULT_ROWS = 5;
+
+       public function __construct( array $params ) {
+               parent::__construct( $params );
+               if ( !$this->mLabel ) {
+                       $this->mLabel = $this->msg( 'restrictionsfield-label' )->parse();
+               }
+       }
+
+       public function getHelpText() {
+               $helpText = parent::getHelpText();
+               if ( $helpText === null ) {
+                       $helpText = $this->msg( 'restrictionsfield-help' )->parse();
+               }
+               return $helpText;
+       }
+
+       /**
+        * @param WebRequest $request
+        * @return string|MWRestrictions Restrictions object or original string if invalid
+        */
+       function loadDataFromRequest( $request ) {
+               if ( !$request->getCheck( $this->mName ) ) {
+                       return $this->getDefault();
+               }
+
+               $value = rtrim( $request->getText( $this->mName ), "\r\n" );
+               $ips = $value === '' ? [] : explode( PHP_EOL, $value );
+               try {
+                       return MWRestrictions::newFromArray( [ 'IPAddresses' => $ips ] );
+               } catch ( InvalidArgumentException $e ) {
+                       return $value;
+               }
+       }
+
+       /**
+        * @return MWRestrictions
+        */
+       public function getDefault() {
+               $default = parent::getDefault();
+               if ( $default === null ) {
+                       $default = MWRestrictions::newDefault();
+               }
+               return $default;
+       }
+
+       /**
+        * @param string|MWRestrictions $value The value the field was submitted with
+        * @param array $alldata The data collected from the form
+        *
+        * @return bool|string True on success, or String error to display, or
+        *   false to fail validation without displaying an error.
+        */
+       public function validate( $value, $alldata ) {
+               if ( $this->isHidden( $alldata ) ) {
+                       return true;
+               }
+
+               if (
+                       isset( $this->mParams['required'] ) && $this->mParams['required'] !== false
+                       && $value instanceof MWRestrictions && !$value->toArray()['IPAddresses']
+               ) {
+                       return $this->msg( 'htmlform-required' )->parse();
+               }
+
+               if ( is_string( $value ) ) {
+                       // MWRestrictions::newFromArray failed; one of the IP ranges must be invalid
+                       $status = Status::newGood();
+                       foreach ( explode( PHP_EOL,  $value ) as $range ) {
+                               if ( !\IP::isIPAddress( $range ) ) {
+                                       $status->fatal( 'restrictionsfield-badip', $range );
+                               }
+                       }
+                       if ( $status->isOK() ) {
+                               $status->fatal( 'unknown-error' );
+                       }
+                       return $status->getMessage()->parse();
+               }
+
+               if ( isset( $this->mValidationCallback ) ) {
+                       return call_user_func( $this->mValidationCallback, $value, $alldata, $this->mParent );
+               }
+
+               return true;
+       }
+
+       /**
+        * @param string|MWRestrictions $value
+        * @return string
+        */
+       public function getInputHTML( $value ) {
+               if ( $value instanceof MWRestrictions ) {
+                       $value = implode( PHP_EOL, $value->toArray()['IPAddresses'] );
+               }
+               return parent::getInputHTML( $value );
+       }
+
+       /**
+        * @param MWRestrictions $value
+        * @return string
+        */
+       public function getInputOOUI( $value ) {
+               if ( $value instanceof MWRestrictions ) {
+                       $value = implode( PHP_EOL, $value->toArray()['IPAddresses'] );
+               }
+               return parent::getInputOOUI( $value );
+       }
+}
diff --git a/includes/htmlform/fields/HTMLSizeFilterField.php b/includes/htmlform/fields/HTMLSizeFilterField.php
new file mode 100644 (file)
index 0000000..c767d8f
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+
+/**
+ * A size filter field for use on query-type special pages. It looks a bit like:
+ *
+ *    (o) Min size  ( ) Max size:  [       ] bytes
+ *
+ * Minimum size limits are represented using a positive integer, while maximum
+ * size limits are represented using a negative integer.
+ */
+class HTMLSizeFilterField extends HTMLIntField {
+       function getSize() {
+               return isset( $this->mParams['size'] ) ? $this->mParams['size'] : 9;
+       }
+
+       function getInputHTML( $value ) {
+               $attribs = [];
+               if ( !empty( $this->mParams['disabled'] ) ) {
+                       $attribs['disabled'] = 'disabled';
+               }
+
+               $html = Xml::radioLabel(
+                       $this->msg( 'minimum-size' )->text(),
+                       $this->mName . '-mode',
+                       'min',
+                       $this->mID . '-mode-min',
+                       $value >= 0,
+                       $attribs
+               );
+               $html .= '&#160;' . Xml::radioLabel(
+                       $this->msg( 'maximum-size' )->text(),
+                       $this->mName . '-mode',
+                       'max',
+                       $this->mID . '-mode-max',
+                       $value < 0,
+                       $attribs
+               );
+               $html .= '&#160;' . parent::getInputHTML( $value ? abs( $value ) : '' );
+               $html .= '&#160;' . $this->msg( 'pagesize' )->parse();
+
+               return $html;
+       }
+
+       // No OOUI yet
+       function getInputOOUI( $value ) {
+               return false;
+       }
+
+       /**
+        * @param WebRequest $request
+        *
+        * @return string
+        */
+       function loadDataFromRequest( $request ) {
+               $size = $request->getInt( $this->mName );
+               if ( !$size ) {
+                       return $this->getDefault();
+               }
+               $size = abs( $size );
+
+               // negative numbers represent "max", positive numbers represent "min"
+               if ( $request->getVal( $this->mName . '-mode' ) === 'max' ) {
+                       return -$size;
+               } else {
+                       return $size;
+               }
+       }
+
+       protected function needsLabel() {
+               return false;
+       }
+}
index cb98549..0c33ad9 100644 (file)
@@ -7,7 +7,7 @@
 class HTMLSubmitField extends HTMLButtonField {
        protected $buttonType = 'submit';
 
-       protected $mFlags = [ 'primary', 'constructive' ];
+       protected $mFlags = [ 'primary', 'progressive' ];
 
        public function skipLoadData( $request ) {
                return !$request->getCheck( $this->mName );
diff --git a/includes/http/CurlHttpRequest.php b/includes/http/CurlHttpRequest.php
new file mode 100644 (file)
index 0000000..f58c3a9
--- /dev/null
@@ -0,0 +1,165 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * MWHttpRequest implemented using internal curl compiled into PHP
+ */
+class CurlHttpRequest extends MWHttpRequest {
+       const SUPPORTS_FILE_POSTS = true;
+
+       protected $curlOptions = [];
+       protected $headerText = "";
+
+       /**
+        * @param resource $fh
+        * @param string $content
+        * @return int
+        */
+       protected function readHeader( $fh, $content ) {
+               $this->headerText .= $content;
+               return strlen( $content );
+       }
+
+       public function execute() {
+
+               parent::execute();
+
+               if ( !$this->status->isOK() ) {
+                       return $this->status;
+               }
+
+               $this->curlOptions[CURLOPT_PROXY] = $this->proxy;
+               $this->curlOptions[CURLOPT_TIMEOUT] = $this->timeout;
+
+               // Only supported in curl >= 7.16.2
+               if ( defined( 'CURLOPT_CONNECTTIMEOUT_MS' ) ) {
+                       $this->curlOptions[CURLOPT_CONNECTTIMEOUT_MS] = $this->connectTimeout * 1000;
+               }
+
+               $this->curlOptions[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;
+               $this->curlOptions[CURLOPT_WRITEFUNCTION] = $this->callback;
+               $this->curlOptions[CURLOPT_HEADERFUNCTION] = [ $this, "readHeader" ];
+               $this->curlOptions[CURLOPT_MAXREDIRS] = $this->maxRedirects;
+               $this->curlOptions[CURLOPT_ENCODING] = ""; # Enable compression
+
+               $this->curlOptions[CURLOPT_USERAGENT] = $this->reqHeaders['User-Agent'];
+
+               $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = $this->sslVerifyHost ? 2 : 0;
+               $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = $this->sslVerifyCert;
+
+               if ( $this->caInfo ) {
+                       $this->curlOptions[CURLOPT_CAINFO] = $this->caInfo;
+               }
+
+               if ( $this->headersOnly ) {
+                       $this->curlOptions[CURLOPT_NOBODY] = true;
+                       $this->curlOptions[CURLOPT_HEADER] = true;
+               } elseif ( $this->method == 'POST' ) {
+                       $this->curlOptions[CURLOPT_POST] = true;
+                       $postData = $this->postData;
+                       // Don't interpret POST parameters starting with '@' as file uploads, because this
+                       // makes it impossible to POST plain values starting with '@' (and causes security
+                       // issues potentially exposing the contents of local files).
+                       // The PHP manual says this option was introduced in PHP 5.5 defaults to true in PHP 5.6,
+                       // but we support lower versions, and the option doesn't exist in HHVM 5.6.99.
+                       if ( defined( 'CURLOPT_SAFE_UPLOAD' ) ) {
+                               $this->curlOptions[CURLOPT_SAFE_UPLOAD] = true;
+                       } elseif ( is_array( $postData ) ) {
+                               // In PHP 5.2 and later, '@' is interpreted as a file upload if POSTFIELDS
+                               // is an array, but not if it's a string. So convert $req['body'] to a string
+                               // for safety.
+                               $postData = wfArrayToCgi( $postData );
+                       }
+                       $this->curlOptions[CURLOPT_POSTFIELDS] = $postData;
+
+                       // Suppress 'Expect: 100-continue' header, as some servers
+                       // will reject it with a 417 and Curl won't auto retry
+                       // with HTTP 1.0 fallback
+                       $this->reqHeaders['Expect'] = '';
+               } else {
+                       $this->curlOptions[CURLOPT_CUSTOMREQUEST] = $this->method;
+               }
+
+               $this->curlOptions[CURLOPT_HTTPHEADER] = $this->getHeaderList();
+
+               $curlHandle = curl_init( $this->url );
+
+               if ( !curl_setopt_array( $curlHandle, $this->curlOptions ) ) {
+                       throw new MWException( "Error setting curl options." );
+               }
+
+               if ( $this->followRedirects && $this->canFollowRedirects() ) {
+                       MediaWiki\suppressWarnings();
+                       if ( !curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, true ) ) {
+                               $this->logger->debug( __METHOD__ . ": Couldn't set CURLOPT_FOLLOWLOCATION. " .
+                                       "Probably open_basedir is set.\n" );
+                               // Continue the processing. If it were in curl_setopt_array,
+                               // processing would have halted on its entry
+                       }
+                       MediaWiki\restoreWarnings();
+               }
+
+               if ( $this->profiler ) {
+                       $profileSection = $this->profiler->scopedProfileIn(
+                               __METHOD__ . '-' . $this->profileName
+                       );
+               }
+
+               $curlRes = curl_exec( $curlHandle );
+               if ( curl_errno( $curlHandle ) == CURLE_OPERATION_TIMEOUTED ) {
+                       $this->status->fatal( 'http-timed-out', $this->url );
+               } elseif ( $curlRes === false ) {
+                       $this->status->fatal( 'http-curl-error', curl_error( $curlHandle ) );
+               } else {
+                       $this->headerList = explode( "\r\n", $this->headerText );
+               }
+
+               curl_close( $curlHandle );
+
+               if ( $this->profiler ) {
+                       $this->profiler->scopedProfileOut( $profileSection );
+               }
+
+               $this->parseHeader();
+               $this->setStatus();
+
+               return $this->status;
+       }
+
+       /**
+        * @return bool
+        */
+       public function canFollowRedirects() {
+               $curlVersionInfo = curl_version();
+               if ( $curlVersionInfo['version_number'] < 0x071304 ) {
+                       $this->logger->debug( "Cannot follow redirects with libcurl < 7.19.4 due to CVE-2009-0037\n" );
+                       return false;
+               }
+
+               if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
+                       if ( strval( ini_get( 'open_basedir' ) ) !== '' ) {
+                               $this->logger->debug( "Cannot follow redirects when open_basedir is set\n" );
+                               return false;
+                       }
+               }
+
+               return true;
+       }
+}
diff --git a/includes/http/Http.php b/includes/http/Http.php
new file mode 100644 (file)
index 0000000..43ae2d0
--- /dev/null
@@ -0,0 +1,163 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+use MediaWiki\Logger\LoggerFactory;
+
+/**
+ * Various HTTP related functions
+ * @ingroup HTTP
+ */
+class Http {
+       static public $httpEngine = false;
+
+       /**
+        * Perform an HTTP request
+        *
+        * @param string $method HTTP method. Usually GET/POST
+        * @param string $url Full URL to act on. If protocol-relative, will be expanded to an http:// URL
+        * @param array $options Options to pass to MWHttpRequest object.
+        *      Possible keys for the array:
+        *    - timeout             Timeout length in seconds
+        *    - connectTimeout      Timeout for connection, in seconds (curl only)
+        *    - postData            An array of key-value pairs or a url-encoded form data
+        *    - proxy               The proxy to use.
+        *                          Otherwise it will use $wgHTTPProxy (if set)
+        *                          Otherwise it will use the environment variable "http_proxy" (if set)
+        *    - noProxy             Don't use any proxy at all. Takes precedence over proxy value(s).
+        *    - sslVerifyHost       Verify hostname against certificate
+        *    - sslVerifyCert       Verify SSL certificate
+        *    - caInfo              Provide CA information
+        *    - maxRedirects        Maximum number of redirects to follow (defaults to 5)
+        *    - followRedirects     Whether to follow redirects (defaults to false).
+        *                                  Note: this should only be used when the target URL is trusted,
+        *                                  to avoid attacks on intranet services accessible by HTTP.
+        *    - userAgent           A user agent, if you want to override the default
+        *                          MediaWiki/$wgVersion
+        *    - logger              A \Psr\Logger\LoggerInterface instance for debug logging
+        * @param string $caller The method making this request, for profiling
+        * @return string|bool (bool)false on failure or a string on success
+        */
+       public static function request( $method, $url, $options = [], $caller = __METHOD__ ) {
+               wfDebug( "HTTP: $method: $url\n" );
+
+               $options['method'] = strtoupper( $method );
+
+               if ( !isset( $options['timeout'] ) ) {
+                       $options['timeout'] = 'default';
+               }
+               if ( !isset( $options['connectTimeout'] ) ) {
+                       $options['connectTimeout'] = 'default';
+               }
+
+               $req = MWHttpRequest::factory( $url, $options, $caller );
+               $status = $req->execute();
+
+               if ( $status->isOK() ) {
+                       return $req->getContent();
+               } else {
+                       $errors = $status->getErrorsByType( 'error' );
+                       $logger = LoggerFactory::getInstance( 'http' );
+                       $logger->warning( $status->getWikiText( false, false, 'en' ),
+                               [ 'error' => $errors, 'caller' => $caller, 'content' => $req->getContent() ] );
+                       return false;
+               }
+       }
+
+       /**
+        * Simple wrapper for Http::request( 'GET' )
+        * @see Http::request()
+        * @since 1.25 Second parameter $timeout removed. Second parameter
+        * is now $options which can be given a 'timeout'
+        *
+        * @param string $url
+        * @param array $options
+        * @param string $caller The method making this request, for profiling
+        * @return string|bool false on error
+        */
+       public static function get( $url, $options = [], $caller = __METHOD__ ) {
+               $args = func_get_args();
+               if ( isset( $args[1] ) && ( is_string( $args[1] ) || is_numeric( $args[1] ) ) ) {
+                       // Second was used to be the timeout
+                       // And third parameter used to be $options
+                       wfWarn( "Second parameter should not be a timeout.", 2 );
+                       $options = isset( $args[2] ) && is_array( $args[2] ) ?
+                               $args[2] : [];
+                       $options['timeout'] = $args[1];
+                       $caller = __METHOD__;
+               }
+               return Http::request( 'GET', $url, $options, $caller );
+       }
+
+       /**
+        * Simple wrapper for Http::request( 'POST' )
+        * @see Http::request()
+        *
+        * @param string $url
+        * @param array $options
+        * @param string $caller The method making this request, for profiling
+        * @return string|bool false on error
+        */
+       public static function post( $url, $options = [], $caller = __METHOD__ ) {
+               return Http::request( 'POST', $url, $options, $caller );
+       }
+
+       /**
+        * A standard user-agent we can use for external requests.
+        * @return string
+        */
+       public static function userAgent() {
+               global $wgVersion;
+               return "MediaWiki/$wgVersion";
+       }
+
+       /**
+        * Checks that the given URI is a valid one. Hardcoding the
+        * protocols, because we only want protocols that both cURL
+        * and php support.
+        *
+        * file:// should not be allowed here for security purpose (r67684)
+        *
+        * @todo FIXME this is wildly inaccurate and fails to actually check most stuff
+        *
+        * @param string $uri URI to check for validity
+        * @return bool
+        */
+       public static function isValidURI( $uri ) {
+               return preg_match(
+                       '/^https?:\/\/[^\/\s]\S*$/D',
+                       $uri
+               );
+       }
+
+       /**
+        * Gets the relevant proxy from $wgHTTPProxy
+        *
+        * @return mixed The proxy address or an empty string if not set.
+        */
+       public static function getProxy() {
+               global $wgHTTPProxy;
+
+               if ( $wgHTTPProxy ) {
+                       return $wgHTTPProxy;
+               }
+
+               return "";
+       }
+}
diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php
new file mode 100644 (file)
index 0000000..458854a
--- /dev/null
@@ -0,0 +1,618 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+use MediaWiki\Logger\LoggerFactory;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\NullLogger;
+
+/**
+ * This wrapper class will call out to curl (if available) or fallback
+ * to regular PHP if necessary for handling internal HTTP requests.
+ *
+ * Renamed from HttpRequest to MWHttpRequest to avoid conflict with
+ * PHP's HTTP extension.
+ */
+class MWHttpRequest implements LoggerAwareInterface {
+       const SUPPORTS_FILE_POSTS = false;
+
+       protected $content;
+       protected $timeout = 'default';
+       protected $headersOnly = null;
+       protected $postData = null;
+       protected $proxy = null;
+       protected $noProxy = false;
+       protected $sslVerifyHost = true;
+       protected $sslVerifyCert = true;
+       protected $caInfo = null;
+       protected $method = "GET";
+       protected $reqHeaders = [];
+       protected $url;
+       protected $parsedUrl;
+       protected $callback;
+       protected $maxRedirects = 5;
+       protected $followRedirects = false;
+
+       /**
+        * @var CookieJar
+        */
+       protected $cookieJar;
+
+       protected $headerList = [];
+       protected $respVersion = "0.9";
+       protected $respStatus = "200 Ok";
+       protected $respHeaders = [];
+
+       public $status;
+
+       /**
+        * @var Profiler
+        */
+       protected $profiler;
+
+       /**
+        * @var string
+        */
+       protected $profileName;
+
+       /**
+        * @var LoggerInterface;
+        */
+       protected $logger;
+
+       /**
+        * @param string $url Url to use. If protocol-relative, will be expanded to an http:// URL
+        * @param array $options (optional) extra params to pass (see Http::request())
+        * @param string $caller The method making this request, for profiling
+        * @param Profiler $profiler An instance of the profiler for profiling, or null
+        */
+       protected function __construct(
+               $url, $options = [], $caller = __METHOD__, $profiler = null
+       ) {
+               global $wgHTTPTimeout, $wgHTTPConnectTimeout;
+
+               $this->url = wfExpandUrl( $url, PROTO_HTTP );
+               $this->parsedUrl = wfParseUrl( $this->url );
+
+               if ( isset( $options['logger'] ) ) {
+                       $this->logger = $options['logger'];
+               } else {
+                       $this->logger = new NullLogger();
+               }
+
+               if ( !$this->parsedUrl || !Http::isValidURI( $this->url ) ) {
+                       $this->status = Status::newFatal( 'http-invalid-url', $url );
+               } else {
+                       $this->status = Status::newGood( 100 ); // continue
+               }
+
+               if ( isset( $options['timeout'] ) && $options['timeout'] != 'default' ) {
+                       $this->timeout = $options['timeout'];
+               } else {
+                       $this->timeout = $wgHTTPTimeout;
+               }
+               if ( isset( $options['connectTimeout'] ) && $options['connectTimeout'] != 'default' ) {
+                       $this->connectTimeout = $options['connectTimeout'];
+               } else {
+                       $this->connectTimeout = $wgHTTPConnectTimeout;
+               }
+               if ( isset( $options['userAgent'] ) ) {
+                       $this->setUserAgent( $options['userAgent'] );
+               }
+
+               $members = [ "postData", "proxy", "noProxy", "sslVerifyHost", "caInfo",
+                               "method", "followRedirects", "maxRedirects", "sslVerifyCert", "callback" ];
+
+               foreach ( $members as $o ) {
+                       if ( isset( $options[$o] ) ) {
+                               // ensure that MWHttpRequest::method is always
+                               // uppercased. Bug 36137
+                               if ( $o == 'method' ) {
+                                       $options[$o] = strtoupper( $options[$o] );
+                               }
+                               $this->$o = $options[$o];
+                       }
+               }
+
+               if ( $this->noProxy ) {
+                       $this->proxy = ''; // noProxy takes precedence
+               }
+
+               // Profile based on what's calling us
+               $this->profiler = $profiler;
+               $this->profileName = $caller;
+       }
+
+       /**
+        * @param LoggerInterface $logger
+        */
+       public function setLogger( LoggerInterface $logger ) {
+               $this->logger = $logger;
+       }
+
+       /**
+        * Simple function to test if we can make any sort of requests at all, using
+        * cURL or fopen()
+        * @return bool
+        */
+       public static function canMakeRequests() {
+               return function_exists( 'curl_init' ) || wfIniGetBool( 'allow_url_fopen' );
+       }
+
+       /**
+        * Generate a new request object
+        * @param string $url Url to use
+        * @param array $options (optional) extra params to pass (see Http::request())
+        * @param string $caller The method making this request, for profiling
+        * @throws MWException
+        * @return CurlHttpRequest|PhpHttpRequest
+        * @see MWHttpRequest::__construct
+        */
+       public static function factory( $url, $options = null, $caller = __METHOD__ ) {
+               if ( !Http::$httpEngine ) {
+                       Http::$httpEngine = function_exists( 'curl_init' ) ? 'curl' : 'php';
+               } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) {
+                       throw new MWException( __METHOD__ . ': curl (http://php.net/curl) is not installed, but' .
+                               ' Http::$httpEngine is set to "curl"' );
+               }
+
+               if ( !is_array( $options ) ) {
+                       $options = [];
+               }
+
+               if ( !isset( $options['logger'] ) ) {
+                       $options['logger'] = LoggerFactory::getInstance( 'http' );
+               }
+
+               switch ( Http::$httpEngine ) {
+                       case 'curl':
+                               return new CurlHttpRequest( $url, $options, $caller, Profiler::instance() );
+                       case 'php':
+                               if ( !wfIniGetBool( 'allow_url_fopen' ) ) {
+                                       throw new MWException( __METHOD__ . ': allow_url_fopen ' .
+                                               'needs to be enabled for pure PHP http requests to ' .
+                                               'work. If possible, curl should be used instead. See ' .
+                                               'http://php.net/curl.'
+                                       );
+                               }
+                               return new PhpHttpRequest( $url, $options, $caller, Profiler::instance() );
+                       default:
+                               throw new MWException( __METHOD__ . ': The setting of Http::$httpEngine is not valid.' );
+               }
+       }
+
+       /**
+        * Get the body, or content, of the response to the request
+        *
+        * @return string
+        */
+       public function getContent() {
+               return $this->content;
+       }
+
+       /**
+        * Set the parameters of the request
+        *
+        * @param array $args
+        * @todo overload the args param
+        */
+       public function setData( $args ) {
+               $this->postData = $args;
+       }
+
+       /**
+        * Take care of setting up the proxy (do nothing if "noProxy" is set)
+        *
+        * @return void
+        */
+       public function proxySetup() {
+               // If there is an explicit proxy set and proxies are not disabled, then use it
+               if ( $this->proxy && !$this->noProxy ) {
+                       return;
+               }
+
+               // Otherwise, fallback to $wgHTTPProxy if this is not a machine
+               // local URL and proxies are not disabled
+               if ( self::isLocalURL( $this->url ) || $this->noProxy ) {
+                       $this->proxy = '';
+               } else {
+                       $this->proxy = Http::getProxy();
+               }
+       }
+
+       /**
+        * Check if the URL can be served by localhost
+        *
+        * @param string $url Full url to check
+        * @return bool
+        */
+       private static function isLocalURL( $url ) {
+               global $wgCommandLineMode, $wgLocalVirtualHosts;
+
+               if ( $wgCommandLineMode ) {
+                       return false;
+               }
+
+               // Extract host part
+               $matches = [];
+               if ( preg_match( '!^https?://([\w.-]+)[/:].*$!', $url, $matches ) ) {
+                       $host = $matches[1];
+                       // Split up dotwise
+                       $domainParts = explode( '.', $host );
+                       // Check if this domain or any superdomain is listed as a local virtual host
+                       $domainParts = array_reverse( $domainParts );
+
+                       $domain = '';
+                       $countParts = count( $domainParts );
+                       for ( $i = 0; $i < $countParts; $i++ ) {
+                               $domainPart = $domainParts[$i];
+                               if ( $i == 0 ) {
+                                       $domain = $domainPart;
+                               } else {
+                                       $domain = $domainPart . '.' . $domain;
+                               }
+
+                               if ( in_array( $domain, $wgLocalVirtualHosts ) ) {
+                                       return true;
+                               }
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Set the user agent
+        * @param string $UA
+        */
+       public function setUserAgent( $UA ) {
+               $this->setHeader( 'User-Agent', $UA );
+       }
+
+       /**
+        * Set an arbitrary header
+        * @param string $name
+        * @param string $value
+        */
+       public function setHeader( $name, $value ) {
+               // I feel like I should normalize the case here...
+               $this->reqHeaders[$name] = $value;
+       }
+
+       /**
+        * Get an array of the headers
+        * @return array
+        */
+       public function getHeaderList() {
+               $list = [];
+
+               if ( $this->cookieJar ) {
+                       $this->reqHeaders['Cookie'] =
+                               $this->cookieJar->serializeToHttpRequest(
+                                       $this->parsedUrl['path'],
+                                       $this->parsedUrl['host']
+                               );
+               }
+
+               foreach ( $this->reqHeaders as $name => $value ) {
+                       $list[] = "$name: $value";
+               }
+
+               return $list;
+       }
+
+       /**
+        * Set a read callback to accept data read from the HTTP request.
+        * By default, data is appended to an internal buffer which can be
+        * retrieved through $req->getContent().
+        *
+        * To handle data as it comes in -- especially for large files that
+        * would not fit in memory -- you can instead set your own callback,
+        * in the form function($resource, $buffer) where the first parameter
+        * is the low-level resource being read (implementation specific),
+        * and the second parameter is the data buffer.
+        *
+        * You MUST return the number of bytes handled in the buffer; if fewer
+        * bytes are reported handled than were passed to you, the HTTP fetch
+        * will be aborted.
+        *
+        * @param callable $callback
+        * @throws MWException
+        */
+       public function setCallback( $callback ) {
+               if ( !is_callable( $callback ) ) {
+                       throw new MWException( 'Invalid MwHttpRequest callback' );
+               }
+               $this->callback = $callback;
+       }
+
+       /**
+        * A generic callback to read the body of the response from a remote
+        * server.
+        *
+        * @param resource $fh
+        * @param string $content
+        * @return int
+        */
+       public function read( $fh, $content ) {
+               $this->content .= $content;
+               return strlen( $content );
+       }
+
+       /**
+        * Take care of whatever is necessary to perform the URI request.
+        *
+        * @return Status
+        */
+       public function execute() {
+
+               $this->content = "";
+
+               if ( strtoupper( $this->method ) == "HEAD" ) {
+                       $this->headersOnly = true;
+               }
+
+               $this->proxySetup(); // set up any proxy as needed
+
+               if ( !$this->callback ) {
+                       $this->setCallback( [ $this, 'read' ] );
+               }
+
+               if ( !isset( $this->reqHeaders['User-Agent'] ) ) {
+                       $this->setUserAgent( Http::userAgent() );
+               }
+
+       }
+
+       /**
+        * Parses the headers, including the HTTP status code and any
+        * Set-Cookie headers.  This function expects the headers to be
+        * found in an array in the member variable headerList.
+        */
+       protected function parseHeader() {
+
+               $lastname = "";
+
+               foreach ( $this->headerList as $header ) {
+                       if ( preg_match( "#^HTTP/([0-9.]+) (.*)#", $header, $match ) ) {
+                               $this->respVersion = $match[1];
+                               $this->respStatus = $match[2];
+                       } elseif ( preg_match( "#^[ \t]#", $header ) ) {
+                               $last = count( $this->respHeaders[$lastname] ) - 1;
+                               $this->respHeaders[$lastname][$last] .= "\r\n$header";
+                       } elseif ( preg_match( "#^([^:]*):[\t ]*(.*)#", $header, $match ) ) {
+                               $this->respHeaders[strtolower( $match[1] )][] = $match[2];
+                               $lastname = strtolower( $match[1] );
+                       }
+               }
+
+               $this->parseCookies();
+
+       }
+
+       /**
+        * Sets HTTPRequest status member to a fatal value with the error
+        * message if the returned integer value of the status code was
+        * not successful (< 300) or a redirect (>=300 and < 400).  (see
+        * RFC2616, section 10,
+        * http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for a
+        * list of status codes.)
+        */
+       protected function setStatus() {
+               if ( !$this->respHeaders ) {
+                       $this->parseHeader();
+               }
+
+               if ( (int)$this->respStatus > 399 ) {
+                       list( $code, $message ) = explode( " ", $this->respStatus, 2 );
+                       $this->status->fatal( "http-bad-status", $code, $message );
+               }
+       }
+
+       /**
+        * Get the integer value of the HTTP status code (e.g. 200 for "200 Ok")
+        * (see RFC2616, section 10, http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
+        * for a list of status codes.)
+        *
+        * @return int
+        */
+       public function getStatus() {
+               if ( !$this->respHeaders ) {
+                       $this->parseHeader();
+               }
+
+               return (int)$this->respStatus;
+       }
+
+       /**
+        * Returns true if the last status code was a redirect.
+        *
+        * @return bool
+        */
+       public function isRedirect() {
+               if ( !$this->respHeaders ) {
+                       $this->parseHeader();
+               }
+
+               $status = (int)$this->respStatus;
+
+               if ( $status >= 300 && $status <= 303 ) {
+                       return true;
+               }
+
+               return false;
+       }
+
+       /**
+        * Returns an associative array of response headers after the
+        * request has been executed.  Because some headers
+        * (e.g. Set-Cookie) can appear more than once the, each value of
+        * the associative array is an array of the values given.
+        *
+        * @return array
+        */
+       public function getResponseHeaders() {
+               if ( !$this->respHeaders ) {
+                       $this->parseHeader();
+               }
+
+               return $this->respHeaders;
+       }
+
+       /**
+        * Returns the value of the given response header.
+        *
+        * @param string $header
+        * @return string|null
+        */
+       public function getResponseHeader( $header ) {
+               if ( !$this->respHeaders ) {
+                       $this->parseHeader();
+               }
+
+               if ( isset( $this->respHeaders[strtolower( $header )] ) ) {
+                       $v = $this->respHeaders[strtolower( $header )];
+                       return $v[count( $v ) - 1];
+               }
+
+               return null;
+       }
+
+       /**
+        * Tells the MWHttpRequest object to use this pre-loaded CookieJar.
+        *
+        * @param CookieJar $jar
+        */
+       public function setCookieJar( $jar ) {
+               $this->cookieJar = $jar;
+       }
+
+       /**
+        * Returns the cookie jar in use.
+        *
+        * @return CookieJar
+        */
+       public function getCookieJar() {
+               if ( !$this->respHeaders ) {
+                       $this->parseHeader();
+               }
+
+               return $this->cookieJar;
+       }
+
+       /**
+        * Sets a cookie. Used before a request to set up any individual
+        * cookies. Used internally after a request to parse the
+        * Set-Cookie headers.
+        * @see Cookie::set
+        * @param string $name
+        * @param mixed $value
+        * @param array $attr
+        */
+       public function setCookie( $name, $value = null, $attr = null ) {
+               if ( !$this->cookieJar ) {
+                       $this->cookieJar = new CookieJar;
+               }
+
+               $this->cookieJar->setCookie( $name, $value, $attr );
+       }
+
+       /**
+        * Parse the cookies in the response headers and store them in the cookie jar.
+        */
+       protected function parseCookies() {
+
+               if ( !$this->cookieJar ) {
+                       $this->cookieJar = new CookieJar;
+               }
+
+               if ( isset( $this->respHeaders['set-cookie'] ) ) {
+                       $url = parse_url( $this->getFinalUrl() );
+                       foreach ( $this->respHeaders['set-cookie'] as $cookie ) {
+                               $this->cookieJar->parseCookieResponseHeader( $cookie, $url['host'] );
+                       }
+               }
+
+       }
+
+       /**
+        * Returns the final URL after all redirections.
+        *
+        * Relative values of the "Location" header are incorrect as
+        * stated in RFC, however they do happen and modern browsers
+        * support them.  This function loops backwards through all
+        * locations in order to build the proper absolute URI - Marooned
+        * at wikia-inc.com
+        *
+        * Note that the multiple Location: headers are an artifact of
+        * CURL -- they shouldn't actually get returned this way. Rewrite
+        * this when bug 29232 is taken care of (high-level redirect
+        * handling rewrite).
+        *
+        * @return string
+        */
+       public function getFinalUrl() {
+               $headers = $this->getResponseHeaders();
+
+               // return full url (fix for incorrect but handled relative location)
+               if ( isset( $headers['location'] ) ) {
+                       $locations = $headers['location'];
+                       $domain = '';
+                       $foundRelativeURI = false;
+                       $countLocations = count( $locations );
+
+                       for ( $i = $countLocations - 1; $i >= 0; $i-- ) {
+                               $url = parse_url( $locations[$i] );
+
+                               if ( isset( $url['host'] ) ) {
+                                       $domain = $url['scheme'] . '://' . $url['host'];
+                                       break; // found correct URI (with host)
+                               } else {
+                                       $foundRelativeURI = true;
+                               }
+                       }
+
+                       if ( $foundRelativeURI ) {
+                               if ( $domain ) {
+                                       return $domain . $locations[$countLocations - 1];
+                               } else {
+                                       $url = parse_url( $this->url );
+                                       if ( isset( $url['host'] ) ) {
+                                               return $url['scheme'] . '://' . $url['host'] .
+                                                       $locations[$countLocations - 1];
+                                       }
+                               }
+                       } else {
+                               return $locations[$countLocations - 1];
+                       }
+               }
+
+               return $this->url;
+       }
+
+       /**
+        * Returns true if the backend can follow redirects. Overridden by the
+        * child classes.
+        * @return bool
+        */
+       public function canFollowRedirects() {
+               return true;
+       }
+}
diff --git a/includes/http/PhpHttpRequest.php b/includes/http/PhpHttpRequest.php
new file mode 100644 (file)
index 0000000..2af000f
--- /dev/null
@@ -0,0 +1,258 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+class PhpHttpRequest extends MWHttpRequest {
+
+       private $fopenErrors = [];
+
+       /**
+        * @param string $url
+        * @return string
+        */
+       protected function urlToTcp( $url ) {
+               $parsedUrl = parse_url( $url );
+
+               return 'tcp://' . $parsedUrl['host'] . ':' . $parsedUrl['port'];
+       }
+
+       /**
+        * Returns an array with a 'capath' or 'cafile' key
+        * that is suitable to be merged into the 'ssl' sub-array of
+        * a stream context options array.
+        * Uses the 'caInfo' option of the class if it is provided, otherwise uses the system
+        * default CA bundle if PHP supports that, or searches a few standard locations.
+        * @return array
+        * @throws DomainException
+        */
+       protected function getCertOptions() {
+               $certOptions = [];
+               $certLocations = [];
+               if ( $this->caInfo ) {
+                       $certLocations = [ 'manual' => $this->caInfo ];
+               } elseif ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
+                       // @codingStandardsIgnoreStart Generic.Files.LineLength
+                       // Default locations, based on
+                       // https://www.happyassassin.net/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/
+                       // PHP 5.5 and older doesn't have any defaults, so we try to guess ourselves.
+                       // PHP 5.6+ gets the CA location from OpenSSL as long as it is not set manually,
+                       // so we should leave capath/cafile empty there.
+                       // @codingStandardsIgnoreEnd
+                       $certLocations = array_filter( [
+                               getenv( 'SSL_CERT_DIR' ),
+                               getenv( 'SSL_CERT_PATH' ),
+                               '/etc/pki/tls/certs/ca-bundle.crt', # Fedora et al
+                               '/etc/ssl/certs',  # Debian et al
+                               '/etc/pki/tls/certs/ca-bundle.trust.crt',
+                               '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem',
+                               '/System/Library/OpenSSL', # OSX
+                       ] );
+               }
+
+               foreach ( $certLocations as $key => $cert ) {
+                       if ( is_dir( $cert ) ) {
+                               $certOptions['capath'] = $cert;
+                               break;
+                       } elseif ( is_file( $cert ) ) {
+                               $certOptions['cafile'] = $cert;
+                               break;
+                       } elseif ( $key === 'manual' ) {
+                               // fail more loudly if a cert path was manually configured and it is not valid
+                               throw new DomainException( "Invalid CA info passed: $cert" );
+                       }
+               }
+
+               return $certOptions;
+       }
+
+       /**
+        * Custom error handler for dealing with fopen() errors.
+        * fopen() tends to fire multiple errors in succession, and the last one
+        * is completely useless (something like "fopen: failed to open stream")
+        * so normal methods of handling errors programmatically
+        * like get_last_error() don't work.
+        */
+       public function errorHandler( $errno, $errstr ) {
+               $n = count( $this->fopenErrors ) + 1;
+               $this->fopenErrors += [ "errno$n" => $errno, "errstr$n" => $errstr ];
+       }
+
+       public function execute() {
+
+               parent::execute();
+
+               if ( is_array( $this->postData ) ) {
+                       $this->postData = wfArrayToCgi( $this->postData );
+               }
+
+               if ( $this->parsedUrl['scheme'] != 'http'
+                       && $this->parsedUrl['scheme'] != 'https' ) {
+                       $this->status->fatal( 'http-invalid-scheme', $this->parsedUrl['scheme'] );
+               }
+
+               $this->reqHeaders['Accept'] = "*/*";
+               $this->reqHeaders['Connection'] = 'Close';
+               if ( $this->method == 'POST' ) {
+                       // Required for HTTP 1.0 POSTs
+                       $this->reqHeaders['Content-Length'] = strlen( $this->postData );
+                       if ( !isset( $this->reqHeaders['Content-Type'] ) ) {
+                               $this->reqHeaders['Content-Type'] = "application/x-www-form-urlencoded";
+                       }
+               }
+
+               // Set up PHP stream context
+               $options = [
+                       'http' => [
+                               'method' => $this->method,
+                               'header' => implode( "\r\n", $this->getHeaderList() ),
+                               'protocol_version' => '1.1',
+                               'max_redirects' => $this->followRedirects ? $this->maxRedirects : 0,
+                               'ignore_errors' => true,
+                               'timeout' => $this->timeout,
+                               // Curl options in case curlwrappers are installed
+                               'curl_verify_ssl_host' => $this->sslVerifyHost ? 2 : 0,
+                               'curl_verify_ssl_peer' => $this->sslVerifyCert,
+                       ],
+                       'ssl' => [
+                               'verify_peer' => $this->sslVerifyCert,
+                               'SNI_enabled' => true,
+                               'ciphers' => 'HIGH:!SSLv2:!SSLv3:-ADH:-kDH:-kECDH:-DSS',
+                               'disable_compression' => true,
+                       ],
+               ];
+
+               if ( $this->proxy ) {
+                       $options['http']['proxy'] = $this->urlToTcp( $this->proxy );
+                       $options['http']['request_fulluri'] = true;
+               }
+
+               if ( $this->postData ) {
+                       $options['http']['content'] = $this->postData;
+               }
+
+               if ( $this->sslVerifyHost ) {
+                       // PHP 5.6.0 deprecates CN_match, in favour of peer_name which
+                       // actually checks SubjectAltName properly.
+                       if ( version_compare( PHP_VERSION, '5.6.0', '>=' ) ) {
+                               $options['ssl']['peer_name'] = $this->parsedUrl['host'];
+                       } else {
+                               $options['ssl']['CN_match'] = $this->parsedUrl['host'];
+                       }
+               }
+
+               $options['ssl'] += $this->getCertOptions();
+
+               $context = stream_context_create( $options );
+
+               $this->headerList = [];
+               $reqCount = 0;
+               $url = $this->url;
+
+               $result = [];
+
+               if ( $this->profiler ) {
+                       $profileSection = $this->profiler->scopedProfileIn(
+                               __METHOD__ . '-' . $this->profileName
+                       );
+               }
+               do {
+                       $reqCount++;
+                       $this->fopenErrors = [];
+                       set_error_handler( [ $this, 'errorHandler' ] );
+                       $fh = fopen( $url, "r", false, $context );
+                       restore_error_handler();
+
+                       if ( !$fh ) {
+                               // HACK for instant commons.
+                               // If we are contacting (commons|upload).wikimedia.org
+                               // try again with CN_match for en.wikipedia.org
+                               // as php does not handle SubjectAltName properly
+                               // prior to "peer_name" option in php 5.6
+                               if ( isset( $options['ssl']['CN_match'] )
+                                       && ( $options['ssl']['CN_match'] === 'commons.wikimedia.org'
+                                               || $options['ssl']['CN_match'] === 'upload.wikimedia.org' )
+                               ) {
+                                       $options['ssl']['CN_match'] = 'en.wikipedia.org';
+                                       $context = stream_context_create( $options );
+                                       continue;
+                               }
+                               break;
+                       }
+
+                       $result = stream_get_meta_data( $fh );
+                       $this->headerList = $result['wrapper_data'];
+                       $this->parseHeader();
+
+                       if ( !$this->followRedirects ) {
+                               break;
+                       }
+
+                       # Handle manual redirection
+                       if ( !$this->isRedirect() || $reqCount > $this->maxRedirects ) {
+                               break;
+                       }
+                       # Check security of URL
+                       $url = $this->getResponseHeader( "Location" );
+
+                       if ( !Http::isValidURI( $url ) ) {
+                               $this->logger->debug( __METHOD__ . ": insecure redirection\n" );
+                               break;
+                       }
+               } while ( true );
+               if ( $this->profiler ) {
+                       $this->profiler->scopedProfileOut( $profileSection );
+               }
+
+               $this->setStatus();
+
+               if ( $fh === false ) {
+                       if ( $this->fopenErrors ) {
+                               $this->logger->warning( __CLASS__
+                                       . ': error opening connection: {errstr1}', $this->fopenErrors );
+                       }
+                       $this->status->fatal( 'http-request-error' );
+                       return $this->status;
+               }
+
+               if ( $result['timed_out'] ) {
+                       $this->status->fatal( 'http-timed-out', $this->url );
+                       return $this->status;
+               }
+
+               // If everything went OK, or we received some error code
+               // get the response body content.
+               if ( $this->status->isOK() || (int)$this->respStatus >= 300 ) {
+                       while ( !feof( $fh ) ) {
+                               $buf = fread( $fh, 8192 );
+
+                               if ( $buf === false ) {
+                                       $this->status->fatal( 'http-read-error' );
+                                       break;
+                               }
+
+                               if ( strlen( $buf ) ) {
+                                       call_user_func( $this->callback, $fh, $buf );
+                               }
+                       }
+               }
+               fclose( $fh );
+
+               return $this->status;
+       }
+}
index d78d61a..1e866f3 100644 (file)
@@ -319,7 +319,7 @@ class WikiRevision {
         * @deprecated Since 1.21, use getContent() instead.
         */
        function getText() {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
 
                return $this->text;
        }
index 701403e..331d1a1 100644 (file)
@@ -41,7 +41,7 @@ abstract class DatabaseInstaller {
        /**
         * The database connection.
         *
-        * @var DatabaseBase
+        * @var Database
         */
        public $db = null;
 
@@ -167,7 +167,7 @@ abstract class DatabaseInstaller {
         *
         * @param string $sourceFileMethod
         * @param string $stepName
-        * @param string $archiveTableMustNotExist
+        * @param bool $archiveTableMustNotExist
         * @return Status
         */
        private function stepApplySourceFile(
@@ -192,7 +192,7 @@ abstract class DatabaseInstaller {
                $this->db->begin( __METHOD__ );
 
                $error = $this->db->sourceFile(
-                       call_user_func( [ $this->db, $sourceFileMethod ] )
+                       call_user_func( [ $this, $sourceFileMethod ], $this->db )
                );
                if ( $error !== true ) {
                        $this->db->reportQueryError( $error, 0, '', __METHOD__ );
@@ -227,6 +227,47 @@ abstract class DatabaseInstaller {
                return $this->stepApplySourceFile( 'getUpdateKeysPath', 'updates', false );
        }
 
+       /**
+        * Return a path to the DBMS-specific SQL file if it exists,
+        * otherwise default SQL file
+        *
+        * @param IDatabase $db
+        * @param string $filename
+        * @return string
+        */
+       private function getSqlFilePath( $db, $filename ) {
+               global $IP;
+
+               $dbmsSpecificFilePath = "$IP/maintenance/" . $db->getType() . "/$filename";
+               if ( file_exists( $dbmsSpecificFilePath ) ) {
+                       return $dbmsSpecificFilePath;
+               } else {
+                       return "$IP/maintenance/$filename";
+               }
+       }
+
+       /**
+        * Return a path to the DBMS-specific schema file,
+        * otherwise default to tables.sql
+        *
+        * @param IDatabase $db
+        * @return string
+        */
+       public function getSchemaPath( $db ) {
+               return $this->getSqlFilePath( $db, 'tables.sql' );
+       }
+
+       /**
+        * Return a path to the DBMS-specific update key file,
+        * otherwise default to update-keys.sql
+        *
+        * @param IDatabase $db
+        * @return string
+        */
+       public function getUpdateKeysPath( $db ) {
+               return $this->getSqlFilePath( $db, 'update-keys.sql' );
+       }
+
        /**
         * Create the tables for each extension the user enabled
         * @return Status
@@ -293,8 +334,7 @@ abstract class DatabaseInstaller {
 
                $connection = $status->value;
                $services->redefineService( 'DBLoadBalancerFactory', function() use ( $connection ) {
-                       return new LBFactorySingle( [
-                               'connection' => $connection ] );
+                       return LBFactorySingle::newFromConnection( $connection );
                } );
 
        }
@@ -313,10 +353,14 @@ abstract class DatabaseInstaller {
                $up = DatabaseUpdater::newForDB( $this->db );
                try {
                        $up->doUpdates();
-               } catch ( Exception $e ) {
+               } catch ( MWException $e ) {
                        echo "\nAn error occurred:\n";
                        echo $e->getText();
                        $ret = false;
+               } catch ( Exception $e ) {
+                       echo "\nAn error occurred:\n";
+                       echo $e->getMessage();
+                       $ret = false;
                }
                $up->purgeCache();
                ob_end_flush();
index 86b2f3b..6a702e9 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Deployment
  */
+use MediaWiki\MediaWikiServices;
 
 require_once __DIR__ . '/../../maintenance/Maintenance.php';
 
@@ -56,7 +57,7 @@ abstract class DatabaseUpdater {
        /**
         * Handle to the database subclass
         *
-        * @var DatabaseBase
+        * @var Database
         */
        protected $db;
 
@@ -76,6 +77,7 @@ abstract class DatabaseUpdater {
                PopulateBacklinkNamespace::class,
                FixDefaultJsonContentPages::class,
                CleanupEmptyCategories::class,
+               AddRFCAndPMIDInterwiki::class,
        ];
 
        /**
@@ -100,11 +102,11 @@ abstract class DatabaseUpdater {
        /**
         * Constructor
         *
-        * @param DatabaseBase $db To perform updates on
+        * @param Database $db To perform updates on
         * @param bool $shared Whether to perform updates on shared tables
         * @param Maintenance $maintenance Maintenance object which created us
         */
-       protected function __construct( DatabaseBase &$db, $shared, Maintenance $maintenance = null ) {
+       protected function __construct( Database &$db, $shared, Maintenance $maintenance = null ) {
                $this->db = $db;
                $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files
                $this->shared = $shared;
@@ -170,14 +172,14 @@ abstract class DatabaseUpdater {
        }
 
        /**
-        * @param DatabaseBase $db
+        * @param Database $db
         * @param bool $shared
         * @param Maintenance $maintenance
         *
         * @throws MWException
         * @return DatabaseUpdater
         */
-       public static function newForDB( &$db, $shared = false, $maintenance = null ) {
+       public static function newForDB( Database $db, $shared = false, $maintenance = null ) {
                $type = $db->getType();
                if ( in_array( $type, Installer::getDBTypes() ) ) {
                        $class = ucfirst( $type ) . 'Updater';
@@ -191,7 +193,7 @@ abstract class DatabaseUpdater {
        /**
         * Get a database connection to run updates
         *
-        * @return DatabaseBase
+        * @return Database
         */
        public function getDB() {
                return $this->db;
@@ -220,12 +222,11 @@ abstract class DatabaseUpdater {
         *
         * @since 1.17
         *
-        * @param array $update The update to run. Format is the following:
-        *                first item is the callback function, it also can be a
-        *                simple string with the name of a function in this class,
-        *                following elements are parameters to the function.
-        *                Note that callback functions will receive this object as
-        *                first parameter.
+        * @param array $update The update to run. Format is [ $callback, $params... ]
+        *   $callback is the method to call; either a DatabaseUpdater method name or a callable.
+        *   Must be serializable (ie. no anonymous functions allowed). The rest of the parameters
+        *   (if any) will be passed to the callback. The first parameter passed to the callback
+        *   is always this object.
         */
        public function addExtensionUpdate( array $update ) {
                $this->extensionUpdates[] = $update;
@@ -402,6 +403,20 @@ abstract class DatabaseUpdater {
                }
        }
 
+       /**
+        * Get appropriate schema variables in the current database connection.
+        *
+        * This should be called after any request data has been imported, but before
+        * any write operations to the database. The result should be passed to the DB
+        * setSchemaVars() method.
+        *
+        * @return array
+        * @since 1.28
+        */
+       public function getSchemaVars() {
+               return []; // DB-type specific
+       }
+
        /**
         * Do all the updates
         *
@@ -410,6 +425,8 @@ abstract class DatabaseUpdater {
        public function doUpdates( $what = [ 'core', 'extensions', 'stats' ] ) {
                global $wgVersion;
 
+               $this->db->setSchemaVars( $this->getSchemaVars() );
+
                $what = array_flip( $what );
                $this->skipSchema = isset( $what['noschema'] ) || $this->fileHandle !== null;
                if ( isset( $what['core'] ) ) {
@@ -440,6 +457,8 @@ abstract class DatabaseUpdater {
         * @param bool $passSelf Whether to pass this object we calling external functions
         */
        private function runUpdates( array $updates, $passSelf ) {
+               $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+
                $updatesDone = [];
                $updatesSkipped = [];
                foreach ( $updates as $params ) {
@@ -454,7 +473,7 @@ abstract class DatabaseUpdater {
                        flush();
                        if ( $ret !== false ) {
                                $updatesDone[] = $origParams;
-                               wfGetLBFactory()->waitForReplication();
+                               $lbFactory->waitForReplication();
                        } else {
                                $updatesSkipped[] = [ $func, $params, $origParams ];
                        }
@@ -614,7 +633,11 @@ abstract class DatabaseUpdater {
         * @param string $filename File name to open
         */
        public function copyFile( $filename ) {
-               $this->db->sourceFile( $filename, false, false, false,
+               $this->db->sourceFile(
+                       $filename,
+                       null,
+                       null,
+                       __METHOD__,
                        [ $this, 'appendLine' ]
                );
        }
@@ -659,7 +682,7 @@ abstract class DatabaseUpdater {
                $this->output( "$msg ..." );
 
                if ( !$isFullPath ) {
-                       $path = $this->db->patchPath( $path );
+                       $path = $this->patchPath( $this->db, $path );
                }
                if ( $this->fileHandle !== null ) {
                        $this->copyFile( $path );
@@ -671,6 +694,26 @@ abstract class DatabaseUpdater {
                return true;
        }
 
+       /**
+        * Get the full path of a patch file. Originally based on archive()
+        * from updaters.inc. Keep in mind this always returns a patch, as
+        * it fails back to MySQL if no DB-specific patch can be found
+        *
+        * @param IDatabase $db
+        * @param string $patch The name of the patch, like patch-something.sql
+        * @return string Full path to patch file
+        */
+       public function patchPath( IDatabase $db, $patch ) {
+               global $IP;
+
+               $dbType = $db->getType();
+               if ( file_exists( "$IP/maintenance/$dbType/archives/$patch" ) ) {
+                       return "$IP/maintenance/$dbType/archives/$patch";
+               } else {
+                       return "$IP/maintenance/archives/$patch";
+               }
+       }
+
        /**
         * Add a new table to the database
         *
@@ -1078,7 +1121,7 @@ abstract class DatabaseUpdater {
                global $wgProfiler;
 
                if ( !$this->doTable( 'profiling' ) ) {
-                       return true;
+                       return;
                }
 
                $profileToDb = false;
index eafb9d4..03f9974 100644 (file)
@@ -244,6 +244,7 @@ abstract class Installer {
        protected $objectCaches = [
                'xcache' => 'xcache_get',
                'apc' => 'apc_fetch',
+               'apcu' => 'apcu_fetch',
                'wincache' => 'wincache_ucache_get'
        ];
 
index 62cd883..c5ec72b 100644 (file)
@@ -182,7 +182,7 @@ class MssqlInstaller extends DatabaseInstaller {
                        return $status;
                }
                /**
-                * @var $conn DatabaseBase
+                * @var $conn Database
                 */
                $conn = $status->value;
 
@@ -212,7 +212,7 @@ class MssqlInstaller extends DatabaseInstaller {
                }
 
                try {
-                       $db = DatabaseBase::factory( 'mssql', [
+                       $db = Database::factory( 'mssql', [
                                'host' => $this->getVar( 'wgDBserver' ),
                                'user' => $user,
                                'password' => $password,
@@ -240,7 +240,7 @@ class MssqlInstaller extends DatabaseInstaller {
                        return;
                }
                /**
-                * @var $conn DatabaseBase
+                * @var $conn Database
                 */
                $conn = $status->value;
                $conn->selectDB( $this->getVar( 'wgDBname' ) );
@@ -261,7 +261,7 @@ class MssqlInstaller extends DatabaseInstaller {
                if ( !$status->isOK() ) {
                        return false;
                }
-               /** @var $conn DatabaseBase */
+               /** @var $conn Database */
                $conn = $status->value;
 
                // We need the server-level ALTER ANY LOGIN permission to create new accounts
@@ -457,7 +457,7 @@ class MssqlInstaller extends DatabaseInstaller {
                        }
 
                        try {
-                               DatabaseBase::factory( 'mssql', [
+                               Database::factory( 'mssql', [
                                        'host' => $this->getVar( 'wgDBserver' ),
                                        'user' => $user,
                                        'password' => $password,
@@ -491,7 +491,7 @@ class MssqlInstaller extends DatabaseInstaller {
                if ( !$status->isOK() ) {
                        return $status;
                }
-               /** @var DatabaseBase $conn */
+               /** @var Database $conn */
                $conn = $status->value;
                $dbName = $this->getVar( 'wgDBname' );
                $schemaName = $this->getVar( 'wgDBmwschema' );
index 770d3bf..1175e9e 100644 (file)
@@ -92,6 +92,8 @@ class MssqlUpdater extends DatabaseUpdater {
                        // 1.28
                        [ 'addIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp',
                                'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
+                       [ 'addField', 'change_tag', 'ct_id', 'patch-change_tag-ct_id.sql' ],
+                       [ 'addField', 'tag_summary', 'ts_id', 'patch-tag_summary-ts_id.sql' ],
                ];
        }
 
index 1bd3f51..5ff47e9 100644 (file)
@@ -124,7 +124,7 @@ class MysqlInstaller extends DatabaseInstaller {
                        return $status;
                }
                /**
-                * @var $conn DatabaseBase
+                * @var $conn Database
                 */
                $conn = $status->value;
 
@@ -143,7 +143,7 @@ class MysqlInstaller extends DatabaseInstaller {
        public function openConnection() {
                $status = Status::newGood();
                try {
-                       $db = DatabaseBase::factory( 'mysql', [
+                       $db = Database::factory( 'mysql', [
                                'host' => $this->getVar( 'wgDBserver' ),
                                'user' => $this->getVar( '_InstallUser' ),
                                'password' => $this->getVar( '_InstallPassword' ),
@@ -168,7 +168,7 @@ class MysqlInstaller extends DatabaseInstaller {
                        return;
                }
                /**
-                * @var $conn DatabaseBase
+                * @var $conn Database
                 */
                $conn = $status->value;
                $conn->selectDB( $this->getVar( 'wgDBname' ) );
@@ -226,7 +226,7 @@ class MysqlInstaller extends DatabaseInstaller {
                $status = $this->getConnection();
 
                /**
-                * @var $conn DatabaseBase
+                * @var $conn Database
                 */
                $conn = $status->value;
 
@@ -261,7 +261,7 @@ class MysqlInstaller extends DatabaseInstaller {
                if ( !$status->isOK() ) {
                        return false;
                }
-               /** @var $conn DatabaseBase */
+               /** @var $conn Database */
                $conn = $status->value;
 
                // Get current account name
@@ -427,7 +427,7 @@ class MysqlInstaller extends DatabaseInstaller {
                if ( !$create ) {
                        // Test the web account
                        try {
-                               DatabaseBase::factory( 'mysql', [
+                               Database::factory( 'mysql', [
                                        'host' => $this->getVar( 'wgDBserver' ),
                                        'user' => $this->getVar( 'wgDBuser' ),
                                        'password' => $this->getVar( 'wgDBpassword' ),
@@ -471,7 +471,7 @@ class MysqlInstaller extends DatabaseInstaller {
                if ( !$status->isOK() ) {
                        return $status;
                }
-               /** @var DatabaseBase $conn */
+               /** @var Database $conn */
                $conn = $status->value;
                $dbName = $this->getVar( 'wgDBname' );
                if ( !$conn->selectDB( $dbName ) ) {
@@ -509,7 +509,7 @@ class MysqlInstaller extends DatabaseInstaller {
                if ( $this->getVar( '_CreateDBAccount' ) ) {
                        // Before we blindly try to create a user that already has access,
                        try { // first attempt to connect to the database
-                               DatabaseBase::factory( 'mysql', [
+                               Database::factory( 'mysql', [
                                        'host' => $server,
                                        'user' => $dbUser,
                                        'password' => $password,
index 65af086..a637ce0 100644 (file)
@@ -288,6 +288,9 @@ class MysqlUpdater extends DatabaseUpdater {
                                'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
                        [ 'doRevisionPageRevIndexNonUnique' ],
                        [ 'doNonUniquePlTlIl' ],
+                       [ 'addField', 'change_tag', 'ct_id', 'patch-change_tag-ct_id.sql' ],
+                       [ 'addField', 'tag_summary', 'ts_id', 'patch-tag_summary-ts_id.sql' ],
+                       [ 'modifyField', 'recentchanges', 'rc_ip', 'patch-rc_ip_modify.sql' ],
                ];
        }
 
@@ -1122,4 +1125,18 @@ class MysqlUpdater extends DatabaseUpdater {
                        'Making rev_page_id index non-unique'
                );
        }
+
+       public function getSchemaVars() {
+               global $wgDBTableOptions;
+
+               $vars = [];
+               $vars['wgDBTableOptions'] = str_replace( 'TYPE', 'ENGINE', $wgDBTableOptions );
+               $vars['wgDBTableOptions'] = str_replace(
+                       'CHARSET=mysql4',
+                       'CHARSET=binary',
+                       $vars['wgDBTableOptions']
+               );
+
+               return $vars;
+       }
 }
index 8610834..b8fc4e7 100644 (file)
@@ -150,7 +150,7 @@ class OracleInstaller extends DatabaseInstaller {
                }
 
                /**
-                * @var $conn DatabaseBase
+                * @var $conn Database
                 */
                $conn = $status->value;
 
index 8075aac..e1e0d0f 100644 (file)
@@ -116,6 +116,8 @@ class OracleUpdater extends DatabaseUpdater {
                        // 1.28
                        [ 'addIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp',
                                'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
+                       [ 'addField', 'change_tag', 'ct_id', 'patch-change_tag-ct_id.sql' ],
+                       [ 'addField', 'tag_summary', 'ts_id', 'patch-tag_summary-ts_id.sql' ],
 
                        // KEEP THIS AT THE BOTTOM!!
                        [ 'doRebuildDuplicateFunction' ],
index 0728415..6dfa28b 100644 (file)
@@ -114,7 +114,7 @@ class PostgresInstaller extends DatabaseInstaller {
                        return $status;
                }
                /**
-                * @var $conn DatabaseBase
+                * @var $conn Database
                 */
                $conn = $status->value;
 
@@ -154,7 +154,7 @@ class PostgresInstaller extends DatabaseInstaller {
        protected function openConnectionWithParams( $user, $password, $dbName, $schema ) {
                $status = Status::newGood();
                try {
-                       $db = DatabaseBase::factory( 'postgres', [
+                       $db = Database::factory( 'postgres', [
                                'host' => $this->getVar( 'wgDBserver' ),
                                'user' => $user,
                                'password' => $password,
@@ -181,7 +181,7 @@ class PostgresInstaller extends DatabaseInstaller {
 
                if ( $status->isOK() ) {
                        /**
-                        * @var $conn DatabaseBase
+                        * @var $conn Database
                         */
                        $conn = $status->value;
                        $conn->clearFlag( DBO_TRX );
@@ -233,7 +233,7 @@ class PostgresInstaller extends DatabaseInstaller {
                                $status = $this->openPgConnection( 'create-schema' );
                                if ( $status->isOK() ) {
                                        /**
-                                        * @var $conn DatabaseBase
+                                        * @var $conn Database
                                         */
                                        $conn = $status->value;
                                        $safeRole = $conn->addIdentifierQuotes( $this->getVar( 'wgDBuser' ) );
@@ -264,7 +264,7 @@ class PostgresInstaller extends DatabaseInstaller {
                                        'password' => $password,
                                        'dbname' => $db
                                ];
-                               $conn = DatabaseBase::factory( 'postgres', $p );
+                               $conn = Database::factory( 'postgres', $p );
                        } catch ( DBConnectionError $error ) {
                                $conn = false;
                                $status->fatal( 'config-pg-test-error', $db,
@@ -287,7 +287,7 @@ class PostgresInstaller extends DatabaseInstaller {
                        return false;
                }
                /**
-                * @var $conn DatabaseBase
+                * @var $conn Database
                 */
                $conn = $status->value;
                $superuser = $this->getVar( '_InstallUser' );
@@ -413,7 +413,7 @@ class PostgresInstaller extends DatabaseInstaller {
 
        /**
         * Recursive helper for canCreateObjectsForWebUser().
-        * @param DatabaseBase $conn
+        * @param Database $conn
         * @param int $targetMember Role ID of the member to look for
         * @param int $group Role ID of the group to look for
         * @param int $maxDepth Maximum recursive search depth
@@ -587,9 +587,7 @@ class PostgresInstaller extends DatabaseInstaller {
                        return $status;
                }
 
-               /**
-                * @var $conn DatabaseBase
-                */
+               /** @var $conn DatabasePostgres */
                $conn = $status->value;
 
                if ( $conn->tableExists( 'archive' ) ) {
@@ -606,7 +604,7 @@ class PostgresInstaller extends DatabaseInstaller {
 
                        return $status;
                }
-               $error = $conn->sourceFile( $conn->getSchemaPath() );
+               $error = $conn->sourceFile( $this->getSchemaPath( $conn ) );
                if ( $error !== true ) {
                        $conn->reportQueryError( $error, 0, '', __METHOD__ );
                        $conn->rollback( __METHOD__ );
@@ -638,7 +636,7 @@ class PostgresInstaller extends DatabaseInstaller {
                        return $status;
                }
                /**
-                * @var $conn DatabaseBase
+                * @var $conn Database
                 */
                $conn = $status->value;
 
index be94d91..f3d2860 100644 (file)
@@ -68,6 +68,8 @@ class PostgresUpdater extends DatabaseUpdater {
                        [ 'addSequence', 'archive', false, 'archive_ar_id_seq' ],
                        [ 'addSequence', 'externallinks', false, 'externallinks_el_id_seq' ],
                        [ 'addSequence', 'watchlist', false, 'watchlist_wl_id_seq' ],
+                       [ 'addSequence', 'change_tag', false, 'change_tag_ct_id_seq' ],
+                       [ 'addSequence', 'tag_summary', false, 'tag_summary_ts_id_seq' ],
 
                        # new tables
                        [ 'addTable', 'category', 'patch-category.sql' ],
@@ -437,6 +439,10 @@ class PostgresUpdater extends DatabaseUpdater {
                        // 1.28
                        [ 'addPgIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp',
                                '( rc_namespace, rc_type, rc_patrolled, rc_timestamp )' ],
+                       [ 'addPgField', 'change_tag', 'ct_id',
+                               "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('change_tag_ct_id_seq')" ],
+                       [ 'addPgField', 'tag_summary', 'ts_id',
+                               "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('tag_summary_ts_id_seq')" ],
                ];
        }
 
index d59c162..c5c4a7c 100644 (file)
@@ -179,16 +179,12 @@ class SqliteInstaller extends DatabaseInstaller {
         * @return Status
         */
        public function openConnection() {
-               global $wgSQLiteDataDir;
-
                $status = Status::newGood();
                $dir = $this->getVar( 'wgSQLiteDataDir' );
                $dbName = $this->getVar( 'wgDBname' );
                try {
                        # @todo FIXME: Need more sensible constructor parameters, e.g. single associative array
-                       # Setting globals kind of sucks
-                       $wgSQLiteDataDir = $dir;
-                       $db = DatabaseBase::factory( 'sqlite', [ 'dbname' => $dbName ] );
+                       $db = Database::factory( 'sqlite', [ 'dbname' => $dbName, 'dbDirectory' => $dir ] );
                        $status->value = $db;
                } catch ( DBConnectionError $e ) {
                        $status->fatal( 'config-sqlite-connection-error', $e->getMessage() );
@@ -243,10 +239,7 @@ class SqliteInstaller extends DatabaseInstaller {
 
                # Create the global cache DB
                try {
-                       global $wgSQLiteDataDir;
-                       # @todo FIXME: setting globals kind of sucks
-                       $wgSQLiteDataDir = $dir;
-                       $conn = DatabaseBase::factory( 'sqlite', [ 'dbname' => "wikicache" ] );
+                       $conn = Database::factory( 'sqlite', [ 'dbname' => 'wikicache', 'dbDirectory' => $dir ] );
                        # @todo: don't duplicate objectcache definition, though it's very simple
                        $sql =
 <<<EOT
@@ -268,6 +261,11 @@ EOT;
                return $this->getConnection();
        }
 
+       /**
+        * @param $dir
+        * @param $db
+        * @return Status
+        */
        protected function makeStubDBFile( $dir, $db ) {
                $file = DatabaseSqlite::generateFileName( $dir, $db );
                if ( file_exists( $file ) ) {
@@ -326,6 +324,7 @@ EOT;
                'type' => 'sqlite',
                'dbname' => 'wikicache',
                'tablePrefix' => '',
+               'dbDirectory' => \$wgSQLiteDataDir,
                'flags' => 0
        ]
 ];";
index 1c6e6eb..388c034 100644 (file)
@@ -156,6 +156,8 @@ class SqliteUpdater extends DatabaseUpdater {
                        // 1.28
                        [ 'addIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp',
                                'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
+                       [ 'addField', 'change_tag', 'ct_id', 'patch-change_tag-ct_id.sql' ],
+                       [ 'addField', 'tag_summary', 'ts_id', 'patch-tag_summary-ts_id.sql' ],
                ];
        }
 
index 77cd689..eb84cc6 100644 (file)
@@ -65,6 +65,7 @@
        "config-memory-bad": "'''Папярэджаньне:''' памер PHP <code>memory_limit</code> складае $1.\nВерагодна, гэта вельмі мала.\nУсталяваньне можа быць няўдалым!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] усталяваны",
        "config-apc": "[http://www.php.net/apc APC] усталяваны",
+       "config-apcu": "[http://www.php.net/apcu APCu] ўсталяваны",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] усталяваны",
        "config-no-cache-apcu": "<strong>Папярэджаньне:</strong> ня знойдзеныя [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] ці [http://www.iis.net/download/WinCacheForPhp WinCache]. Кэшаваньне аб’ектаў адключанае.",
        "config-mod-security": "'''Папярэджаньне''': на Вашым ўэб-сэрверы ўключаны [http://modsecurity.org/ mod_security]. У выпадку няслушнай наладцы, ён можа стаць прычынай праблемаў для MediaWiki ці іншага праграмнага забесьпячэньня, якое дазваляе ўдзельнікам дасылаць на сэрвэр любы зьмест.\nГлядзіце [http://modsecurity.org/documentation/ дакумэнтацыю mod_security] ці зьвярніцеся ў падтрымку Вашага хосту, калі ў Вас узьнікаюць выпадковыя праблемы.",
        "config-cache-options": "Налады кэшаваньня аб’ектаў:",
        "config-cache-help": "Кэшаваньне аб’ектаў павялічвае хуткасьць працы MediaWiki праз кэшаваньне зьвестак, якія часта выкарыстоўваюцца.\nВельмі рэкамэндуем уключыць гэта для сярэдніх і буйных сайтаў, таксама будзе карысна для дробных сайтаў.",
        "config-cache-none": "Без кэшаваньня (ніякія магчымасьці не страчваюцца, але хуткасьць працы буйных сайтаў можа зьнізіцца)",
-       "config-cache-accel": "Кэшаваньне аб’ектаў PHP (APC, XCache ці WinCache)",
+       "config-cache-accel": "Кэшаваньне аб’ектаў PHP (APC, APCu, XCache ці WinCache)",
        "config-cache-memcached": "Выкарыстоўваць Memcached (патрабуе дадатковай канфігурацыі)",
        "config-memcached-servers": "Сэрвэры memcached:",
        "config-memcached-help": "Сьпіс IP-адрасоў, якія будуць выкарыстоўвацца Memcached.\nАдрасы павінны быць у асобным радку з пазначэньнем порту, які будзе выкарыстоўвацца. Напрыклад:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index 4e34c7d..5cdb83f 100644 (file)
@@ -43,8 +43,8 @@
        "config-page-existingwiki": "Съществуващо уики",
        "config-help-restart": "Необходимо е потвърждение за изтриване на всички въведени и съхранени данни и започване отначало на процеса по инсталация.",
        "config-restart": "Да, започване отначало",
-       "config-welcome": "=== Ð\9fÑ\80овеÑ\80ка Ð½Ð° Ñ\81Ñ\80едаÑ\82а ===\nЩе Ð±Ñ\8aдаÑ\82 Ð¸Ð·Ð²Ñ\8aÑ\80Ñ\88ени Ð¾Ñ\81новни Ð¿Ñ\80овеÑ\80ки, ÐºÐ¾Ð¸Ñ\82о Ð´Ð° Ñ\83Ñ\81Ñ\82ановÑ\8fÑ\82 Ð´Ð°Ð»Ð¸ Ñ\81Ñ\80едаÑ\82а Ðµ Ð¿Ð¾Ð´Ñ\85одÑ\8fÑ\89а за инсталиране на МедияУики.\nАко е необходима помощ по време на инсталацията, резултатите от направените проверки трябва също да бъдат предоставени.",
-       "config-copyright": "=== Авторски права и Условия ===\n\n$1\n\nТази програма е свободен софтуер, който може да се променя и/или разпространява според Общия публичен лиценз на GNU, както е публикуван от Free Software Foundation във версия на Лиценза 2 или по-късна версия.\n\nТази програма се разпространява с надеждата, че ще е полезна, но '''без каквито и да е гаранции'''; без дори косвена гаранция за '''продаваемост''' или '''прогодност за конкретна употреба'''.\nЗа повече подробности се препоръчва преглеждането на Общия публичен лиценз на GNU.\n\nКъм програмата трябва да е приложено <doclink href=Copying>копие на Общия публичен лиценз на GNU</doclink>; ако не, можете да пишете на Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. или да [http://www.gnu.org/copyleft/gpl.html го прочетете онлайн].",
+       "config-welcome": "=== Ð\9fÑ\80овеÑ\80ка Ð½Ð° Ñ\83Ñ\81ловиÑ\8fÑ\82а ===\nЩе Ð±Ñ\8aдаÑ\82 Ð¸Ð·Ð²Ñ\8aÑ\80Ñ\88ени Ð¾Ñ\81новни Ð¿Ñ\80овеÑ\80ки, ÐºÐ¾Ð¸Ñ\82о Ð´Ð° Ñ\83Ñ\81Ñ\82ановÑ\8fÑ\82 Ð´Ð°Ð»Ð¸ Ñ\83Ñ\81ловиÑ\8fÑ\82а Ñ\81а Ð¿Ð¾Ð´Ñ\85одÑ\8fÑ\89и за инсталиране на МедияУики.\nАко е необходима помощ по време на инсталацията, резултатите от направените проверки трябва също да бъдат предоставени.",
+       "config-copyright": "=== Авторски права и условия ===\n\n$1\n\nТази програма е свободен софтуер, който може да се променя и/или разпространява според Общия публичен лиценз на GNU, както е публикуван от Free Software Foundation във версия на Лиценза 2 или по-късна версия.\n\nТази програма се разпространява с надеждата, че ще е полезна, но <strong>без каквито и да е гаранции</strong>; без дори косвена гаранция за <strong>продаваемост</strong>  или <strong>прогодност за конкретна употреба</strong> .\nЗа повече подробности се препоръчва преглеждането на Общия публичен лиценз на GNU.\n\nКъм програмата трябва да е приложено <doclink href=Copying>копие на Общия публичен лиценз на GNU</doclink>; ако не, можете да пишете на Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA, или да [http://www.gnu.org/copyleft/gpl.html го прочетете онлайн].",
        "config-sidebar": "* [https://www.mediawiki.org Сайт на МедияУики]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents Наръчник на потребителя]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents Наръчник на администратора]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ ЧЗВ]\n----\n* <doclink href=Readme>Документация</doclink>\n* <doclink href=ReleaseNotes>Бележки за версията</doclink>\n* <doclink href=Copying>Авторски права</doclink>\n* <doclink href=UpgradeDoc>Обновяване</doclink>",
        "config-env-good": "Средата беше проверена.\nИнсталирането на МедияУики е възможно.",
        "config-env-bad": "Средата беше проверена.\nНе е възможна инсталация на МедияУики.",
        "config-pcre-old": "<strong>Фатална грешка:</strong> Изисква се PCRE версия $1 или по-нова.\nИзпълнимият файл на PHP е свързан с PCRE версия $2.\n[https://www.mediawiki.org/wiki/Manual:Errors_and_symptoms/Повече информация за PCRE].",
        "config-pcre-no-utf8": "'''Фатално''': Модулът PCRE на PHP изглежда е компилиран без поддръжка на PCRE_UTF8.\nЗа да функционира правилно, МедияУики изисква поддръжка на UTF-8.",
        "config-memory-raised": "<code>memory_limit</code> на PHP е $1, увеличаване до $2.",
-       "config-memory-bad": "'''Предупреждение:''' <code>memory_limit</code> на PHP е $1.\nСтойността вероятно е твърде ниска.\nВъзможно е инсталацията да се провали!",
+       "config-memory-bad": "<strong>Предупреждение:<strong> <code>memory_limit</code> на PHP е $1.\nСтойността вероятно е твърде ниска.\nВъзможно е инсталацията да се провали!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] е инсталиран",
        "config-apc": "[http://www.php.net/apc APC] е инсталиран",
+       "config-apcu": "[http://www.php.net/apc APC] е инсталиран",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] е инсталиран",
        "config-mod-security": "<strong>Предупреждение:</strong> [http://modsecurity.org/ mod_security]/mod_security2 е включено на вашия уеб сървър. Много от обичайните му конфигурации пораждат проблеми с МедияУики и друг софтуер, който позволява публикуване на произволно съдържание.\nАко е възможно, моля изключете го. В противен случай се обърнете към [http://modsecurity.org/documentation/ документацията на mod_security] или се свържете с поддръжката на хостинга си, ако се сблъскате със случайни грешки.",
        "config-diff3-bad": "GNU diff3 не беше намерен.",
        "config-admin-help": "Въвежда се предпочитаното потребителско име, например \"Иванчо Иванчев\".\nТова ще е потребителското име, което администраторът ще използва за влизане в уикито.",
        "config-admin-name-blank": "Необходимо е да бъде въведено потребителско име на администратора.",
        "config-admin-name-invalid": "Посоченото потребителско име \"<nowiki>$1</nowiki>\" е невалидно.\nНеобходимо е да се посочи друго.",
-       "config-admin-password-blank": "Ð\9dеовÑ\85одимо Ðµ Ð´Ð° Ñ\81е Ð²Ñ\8aведе парола за администраторската сметка.",
+       "config-admin-password-blank": "Ð\92Ñ\8aведеÑ\82е парола за администраторската сметка.",
        "config-admin-password-mismatch": "Двете въведени пароли не съвпадат.",
        "config-admin-email": "Адрес за електронна поща:",
        "config-admin-email-help": "Въвеждането на адрес за е-поща позволява получаване на е-писма от другите потребители на уикито, възстановяване на изгубена или забравена парола, оповестяване при промени в страниците от списъка за наблюдение. Това поле може да бъде оставено празно.",
        "config-cache-options": "Настройки за обектното кеширане:",
        "config-cache-help": "Обектното кеширане се използва за подобряване на скоростта на МедияУики чрез кеширане на често използваните данни.\nСилно препоръчително е на средните и големите сайтове да включат тази настройка, но малките също могат да се възползват от нея.",
        "config-cache-none": "Без кеширане (не се премахва от функционалността, но това влияе на скоростта на по-големи уикита)",
-       "config-cache-accel": "PHP обектно кеширане (APC, XCache или WinCache)",
+       "config-cache-accel": "PHP обектно кеширане (APCu, XCache или WinCache)",
        "config-cache-memcached": "Използване на Memcached (изисква допълнителни настройки и конфигуриране)",
        "config-memcached-servers": "Memcached сървъри:",
        "config-memcached-help": "Списък с IP адреси за използване за Memcached.\nНеобходимо е да бъдат разделени по един на ред, както и да е посочен порта. Пример:\n127.0.0.1:11211\n192.168.1.25:1234",
        "config-install-done-path": "<strong>Поздравления!</strong>\nИнсталирането на МедияУики приключи успешно.\n\nИнсталаторът създаде файл <code>LocalSettings.php</code>.\nТой съдържа всички ваши настройки.\n\nНеобходимо е той да бъде изтеглен и поставен в <code>$4</code>. Изтеглянето би трябвало да започне автоматично.\n\nАко изтеглянето не започне автоматично или е било прекратено, файлът може да бъде изтеглен чрез щракване на препратката по-долу:\n\n$3\n\n<strong>Забележка:</strong> Ако това не бъде направено сега, генерираният конфигурационен файл няма да е достъпен на по-късен етап ако не бъде изтеглен сега или инсталацията приключи без изтеглянето му.\n\nКогато файлът вече е в основната директория, <strong>[$2 уикито ще е достъпно на този адрес]</strong>.",
        "config-download-localsettings": "Изтегляне на <code>LocalSettings.php</code>",
        "config-help": "помощ",
+       "config-help-tooltip": "Щракнете за разширяване",
        "config-nofile": "Файлът „$1“ не може да бъде открит. Да не е бил изтрит?",
        "config-extension-link": "Знаете ли, че това уики поддържа [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions разширения]?\n\nМожете да разгледате [https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category разширенията по категория] или [https://www.mediawiki.org/wiki/Extension_Matrix Матрицата на разширенията] за пълен списък на разширенията.",
-       "mainpagetext": "<strong>УикиÑ\82о беше успешно инсталирано.</strong>",
+       "mainpagetext": "<strong>Ð\9cедиÑ\8fУики беше успешно инсталирано.</strong>",
        "mainpagedocfooter": "Разгледайте [https://meta.wikimedia.org/wiki/Help:Contents ръководството] за подробна информация относно използването на уики софтуера.\n\n== Първи стъпки ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Настройки за конфигуриране]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ ЧЗВ за МедияУики]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Пощенски списък относно нови версии на МедияУики]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Локализиране на МедияУики]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Научете как да се справяте със спама във вашето уики]"
 }
index fb23d01..d52f8f1 100644 (file)
@@ -6,7 +6,8 @@
                        "Aftab1995",
                        "Tauhid16",
                        "Aftabuzzaman",
-                       "Hasive"
+                       "Hasive",
+                       "আজিজ"
                ]
        },
        "config-desc": "মিডিয়াউইকির জন্য ইন্সটলার",
@@ -64,6 +65,7 @@
        "config-oracle-def-ts": "পূর্বনির্ধারিত টেবিলস্পেস",
        "config-oracle-temp-ts": "সাময়কি টেবিলস্পেস:",
        "config-type-mssql": "মাইক্রোসফট এসকিউএল সার্ভার",
+       "config-dbsupport-postgres": "* MySQL-এর বিকল্প হিসেবে [{{int:version-db-postgres-url}} PostgreSQL] হচ্ছে একটি জনপ্রিয় ওপেন সোর্স ডাটাবেস ব্যবস্থা। ([http://www.php.net/manual/en/pgsql.installation.php PostgreSQL সমর্থনসহ কিভাবে PHP সঙ্কলন করবেন])",
        "config-header-mysql": "মাইএসকিউএল সেটিংস",
        "config-header-postgres": "পোস্টগ্রেএসকিউএল সেটিংস",
        "config-header-sqlite": "এসকিউলাইট সেটিংস",
@@ -94,7 +96,9 @@
        "config-admin-name": "আপনার ব্যবহারকারী নাম:",
        "config-admin-password": "পাসওয়ার্ড:",
        "config-admin-password-confirm": "পাসওয়ার্ড আবারও প্রবেশ করান:",
+       "config-admin-help": "এখানে আপনার পছন্দের ব্যবহারকারী নাম লিখুন, উদাহরণস্বরূপ \"আজিজ\"। এই নামটি উইকিতে প্রবেশের সময় ব্যবহার করতে হবে।",
        "config-admin-name-blank": "একটি প্রশাসক ব্যবহারকারী নাম প্রবেশ করান",
+       "config-admin-name-invalid": "উল্লেখিত ব্যবহারকারী নাম \"<nowiki>$1</nowiki>\" অবৈধ। একটি ভিন্ন নাম উল্লেখ করুন।",
        "config-admin-password-blank": "প্রশাসক অ্যাকাউন্টের জন্য পাসওয়ার্ড প্রবেশ করান।",
        "config-admin-password-mismatch": "আপনি যে দুটি পাসওয়ার্ড দিয়েছেন তারা পরস্পর মেলেনি।",
        "config-admin-email": "ইমেইল ঠিকানা:",
index 2cd7bb8..583b80c 100644 (file)
@@ -51,6 +51,6 @@
        "config-email-settings": "ڕێکخستنەکانی ئیمەیڵ",
        "config-install-step-done": "کرا",
        "config-help": "یارمەتی",
-       "mainpagetext": "'''میدیاویکی بە سەرکەوتوویی دامەزرا.'''",
-       "mainpagedocfooter": "لە [https://meta.wikimedia.org/wiki/Help:Contents ڕێنوێنیی بەکارھێنەران] بۆ زانیاری سەبارەت بە بەکارھێنانی نەرمامێری ویکی کەڵک وەربگرە.\n\n== دەستپێکردن ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings پێرستی ڕێکخستنەکانی شێوەپێدان]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ پرسیارە دووپاتکراوەکانی میدیاویکی (MediaWiki FAQ)]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce پێرستی ئیمەیلی وەشانەکانی میدیاویکی]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources خۆماڵیکردنی ویکیمیدیا بۆ زمانەکەت]"
+       "mainpagetext": "<strong>میدیاویکی بە سەرکەوتوویی دامەزرا.</strong>",
+       "mainpagedocfooter": "لە [https://meta.wikimedia.org/wiki/Help:Contents ڕێنوێنیی بەکارھێنەران] بۆ زانیاری سەبارەت بە بەکارھێنانی نەرمامێری ویکی کەڵک وەربگرە.\n\n== دەستپێکردن ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings پێرستی ڕێکخستنەکانی شێوەپێدان]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ پرسیارە دووپاتکراوەکانی میدیاویکی (MediaWiki FAQ)]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce پێرستی ئیمەیلی وەشانەکانی میدیاویکی]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources خۆماڵیکردنی ویکیمیدیا بۆ زمانەکەت]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam فێربە چۆن ڕووبەڕووى ئیمەیڵە بێزارکەرەکانی ویکییەکەت دەبیتەوە]"
 }
index 68497c5..06e54e1 100644 (file)
@@ -66,6 +66,7 @@
        "config-memory-bad": "<strong>Upozornění:</strong> <code>memory_limit</code> je v PHP nastaven na $1.\nTo je pravděpodobně příliš málo.\nInstalace může selhat!",
        "config-xcache": "Je nainstalována [http://xcache.lighttpd.net/ XCache]",
        "config-apc": "Je nainstalováno [http://www.php.net/apc APC]",
+       "config-apcu": "Je nainstalováno [http://www.php.net/apcu APCu]",
        "config-wincache": "Je nainstalována [http://www.iis.net/download/WinCacheForPhp WinCache]",
        "config-no-cache-apcu": "<strong>Upozornění:</strong> Nebylo nalezeno [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache], ani [http://www.iis.net/download/WinCacheForPhp WinCache].\nKešování objektů bude vypnuto.",
        "config-mod-security": "<strong>Upozornění:</strong> váš webový server má zapnuto [http://modsecurity.org/ mod_security]/mod_security2. Mnoho běžných konfigurací bude způsobovat potíže MediaWiki a dalším programům, které umožňují ukládat libovolný obsah.\nPokud je to možné, mělo by se to vypnout. Jinak se v případě, že narazíte na náhodné chyby, podívejte do [http://modsecurity.org/documentation/ dokumentace mod_security] nebo kontaktujte technickou podporu vašeho poskytovatele.",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki podporuje následující databázové systémy:\n\n$1\n\nPokud v nabídce níže nevidíte databázový systém, který chcete použít, musíte pro zapnutí podpory následovat instrukce odkázané výše.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] je pro MediaWiki hlavní platformou a je podporováno nejlépe. MediaWiki pracuje také s [{{int:version-db-mariadb-url}} MariaDB] a [{{int:version-db-percona-url}} Percona Server], které jsou s MySQL kompatibilní. ([http://www.php.net/manual/en/mysql.installation.php Jak zkompilovat PHP s podporou MySQL])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] je populární otevřený databázový systém používaný jako alternativa k MySQL. Mohou se vyskytnout ještě nějaké menší chyby, použití ve výrobním prostředí se nedoporučuje.  ([http://www.php.net/manual/en/pgsql.installation.php Jak přeložit PHP s podporou PostgreSQL])",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] je populární otevřený databázový systém používaný jako alternativa k MySQL. ([http://www.php.net/manual/en/pgsql.installation.php Jak přeložit PHP s podporou PostgreSQL])",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] je velmi dobře podporovaný odlehčený databázový systém. ([http://www.php.net/manual/en/pdo.installation.php Jak přeložit PHP s podporou SQLite], používá PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] je komerční podniková databáze. ([http://www.php.net/manual/en/oci8.installation.php Jak přeložit PHP s podporou OCI8])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] je komerční podniková databáze pro Windows. ([http://www.php.net/manual/en/sqlsrv.installation.php Jak přeložit PHP s podporou SQLSRV])",
        "config-cache-options": "Nastavení cachování objektů:",
        "config-cache-help": "Cachování objektů se používá pro vylepšení rychlosti MediaWiki tím, že se cachují často používaná data.\nStředním až velkým serverům se jeho zapnutí důrazně doporučuje, i menší servery pocítí jeho výhody.",
        "config-cache-none": "Bez cachování (o žádnou funkcionalitu nepřijdete, na větších wiki však může dojít ke zhoršení rychlosti)",
-       "config-cache-accel": "Cachování PHP objektů (APC, XCache nebo WinCache)",
+       "config-cache-accel": "Cachování PHP objektů (APC, APCu, XCache nebo WinCache)",
        "config-cache-memcached": "Použít Memcached (vyžaduje další nastavení a konfiguraci)",
        "config-memcached-servers": "Servery Memcached:",
        "config-memcached-help": "Seznam IP adres, které se mají používat pro Memcached.\nUveďte jednu na řádek spolu s portem. Například:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index e704141..3fe893a 100644 (file)
@@ -74,6 +74,7 @@
        "config-memory-bad": "'''Warnung:''' Der PHP-Parameter <code>memory_limit</code> beträgt $1.\nDieser Wert ist wahrscheinlich zu niedrig.\nDer Installationsvorgang könnte eventuell scheitern!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] ist installiert",
        "config-apc": "[http://www.php.net/apc APC] ist installiert",
+       "config-apcu": "[http://www.php.net/apcu APCu] ist installiert",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] ist installiert",
        "config-no-cache-apcu": "<strong>Warnung:</strong> [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] oder [http://www.iis.net/download/WinCacheForPhp WinCache] konnten nicht gefunden werden.\nDer Objektcache ist nicht aktiviert.",
        "config-mod-security": "'''Warnung:''' Auf dem Webserver wurde [http://modsecurity.org/ ModSecurity] aktiviert. Sofern falsch konfiguriert, kann dies zu Problemen mit MediaWiki sowie anderer Software auf dem Server führen und es Benutzern ermöglichen, beliebige Inhalte im Wiki einzustellen.\nFür weitere Informationen empfehlen wir die [http://modsecurity.org/documentation/ Dokumentation zu ModSecurity] oder den Kontakt zum Hoster, sofern Fehler auftreten.",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki unterstützt die folgenden Datenbanksysteme:\n\n$1\n\nSofern unterhalb nicht das Datenbanksystem angezeigt wird, das verwendet werden soll, muss dieses noch verfügbar gemacht werden. Oben ist zu jedem unterstützten Datenbanksystem ein Link zur entsprechenden Anleitung vorhanden.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] ist das von MediaWiki primär unterstützte Datenbanksystem. MediaWiki funktioniert auch mit [{{int:version-db-mariadb-url}} MariaDB] und [{{int:version-db-percona-url}} Percona Server], die MySQL-kompatibel sind. ([https://www.php.net/manual/en/mysqli.installation.php Anleitung zur Kompilierung von PHP mit MySQL-Unterstützung])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] ist ein beliebtes Open-Source-Datenbanksystem und eine Alternative zu MySQL. Es gibt allerdings einige kleinere Implementierungsfehler, so dass von der Nutzung in einer Produktivumgebung abgeraten wird. ([https://www.php.net/manual/de/pgsql.installation.php Anleitung zur Kompilierung von PHP mit PostgreSQL-Unterstützung])",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] ist ein beliebtes Open-Source-Datenbanksystem und eine Alternative zu MySQL. ([https://www.php.net/manual/de/pgsql.installation.php Anleitung zur Kompilierung von PHP mit PostgreSQL-Unterstützung])",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] ist ein verschlanktes Datenbanksystem, das auch gut unterstützt wird ([https://www.php.net/manual/de/pdo.installation.php Anleitung zur Kompilierung von PHP mit SQLite-Unterstützung], verwendet PHP Data Objects (PDO))",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] ist eine kommerzielle Unternehmensdatenbank ([https://www.php.net/manual/en/oci8.installation.php Anleitung zur Kompilierung von PHP mit OCI8-Unterstützung])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] ist eine gewerbliche Unternehmensdatenbank für Windows. ([https://www.php.net/manual/de/sqlsrv.installation.php Anleitung zur Kompilierung von PHP mit SQLSRV-Unterstützung])",
        "config-cache-options": "Einstellungen für die Zwischenspeicherung von Objekten:",
        "config-cache-help": "Das Objektcaching wird dazu genutzt, die Geschwindigkeit von MediaWiki zu verbessern, indem häufig genutzte Daten zwischengespeichert werden.\nEs wird sehr empfohlen, es für mittelgroße bis große Wikis zu nutzen, aber auch für kleine Wikis ergeben sich erkennbare Geschwindigkeitsverbesserungen.",
        "config-cache-none": "Kein Objektcaching (es wird keine Funktion entfernt, allerdings kann dies die Leistungsfähigkeit größerer Wikis negativ beeinflussen)",
-       "config-cache-accel": "Objektcaching von PHP (APC, XCache oder WinCache)",
+       "config-cache-accel": "Objektcaching von PHP (APC, APCu, XCache oder WinCache)",
        "config-cache-memcached": "Memcached Cacheserver (erfordert einen zusätzlichen Installationsvorgang mitsamt Konfiguration)",
        "config-memcached-servers": "Memcached Cacheserver",
        "config-memcached-help": "Liste der für Memcached nutzbaren IP-Adressen.\nEs sollte eine je Zeile mitsamt des vorgesehenen Ports angegeben werden. Beispiele:\n127.0.0.1:11211 oder\n192.168.1.25:1234 usw.",
index 6fa270a..c80d54e 100644 (file)
@@ -13,6 +13,7 @@
        "config-localsettings-key": "Kesay berzkerdin:",
        "config-your-language": "Zıwanê şıma:",
        "config-wiki-language": "Wiki zıwan:",
+       "config-wiki-language-help": "Degmesi zıwanê kı wiki do tey bınusi yo",
        "config-back": "← Peyser",
        "config-continue": "Dewam ke",
        "config-page-language": "Zıwan",
        "config-page-complete": "Temamyayo",
        "config-page-restart": "Barkerdışi fına ser kı",
        "config-page-readme": "Mı bıwane",
+       "config-page-releasenotes": "Notë versiyoni",
        "config-page-copying": "Kopyayeno",
        "config-page-upgradedoc": "Berzkerdış",
+       "config-page-existingwiki": "Mewcud wiki",
        "config-restart": "E, fına dest pekê",
        "config-sidebar": "* [https://www.mediawiki.org MediaWiki keye]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents Şınasiya Karberi]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents Şınasiya İdarekaran]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Peşti]\n----\n* <doclink href=Readme>Mı buwanê</doclink>\n* <doclink href=ReleaseNotes>Notê elaqeyıni</doclink>\n* <doclink href=Copying>Kopyakerdış</doclink>\n* <doclink href=UpgradeDoc>Zêdekerdış</doclink>",
        "config-env-php": "PHP $1 i biyo saz.",
        "config-db-type": "Database tipe:",
        "config-db-host": "Database host:",
        "config-db-host-oracle": "Database TNS:",
+       "config-db-wiki-settings": "Ena wikiyer akernë",
        "config-db-name": "Database name:",
+       "config-db-name-oracle": "Şemaya hardata:",
        "config-db-username": "Database nameykarberi:",
        "config-db-password": "Database parola :",
        "config-db-port": "Portê database:",
+       "config-oracle-def-ts": "Hesıbyaye caytabloy:",
+       "config-oracle-temp-ts": "İdareten caytabloy:",
+       "config-type-mysql": "MySQL (yana hewlın)",
        "config-type-mssql": "Microsoft SQL Server",
        "config-header-mysql": "Eyarê MySQL",
+       "config-header-sqlite": "SQLite sazi",
+       "config-header-oracle": "Orqcle sazi",
+       "config-header-mssql": "Sazë Microsoft SQL Serveri",
+       "config-missing-db-name": "\"{{int:config-db-name}}\"nrë jew erc dekerdış gerek keno.",
+       "config-missing-db-host": "\"{{int:config-db-host}}\" rë jew erc gerek keno",
+       "config-missing-db-server-oracle": "\"{{int:config-db-host-oracle}}\" rë jew erc gerek keno",
+       "config-mysql-engine": "Motorë depok kerdışi",
        "config-mysql-innodb": "InnoDB",
        "config-mysql-myisam": "MyISAM",
        "config-mysql-binary": "Dılet",
        "config-mysql-utf8": "UTF-8",
+       "config-mssql-sqlauth": "SQL Server araştnayış",
+       "config-mssql-windowsauth": "Windows kamiye araştnayış",
        "config-site-name": "Namey wiki:",
        "config-site-name-blank": "Yew nameyê sita cıkewe.",
        "config-project-namespace": "Wareyê nameyê proceyi:",
index 3f3032b..1f7333a 100644 (file)
@@ -57,6 +57,7 @@
        "config-memory-bad": "<strong>Warning:</strong> PHP's <code>memory_limit</code> is $1.\nThis is probably too low.\nThe installation may fail!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] is installed",
        "config-apc": "[http://www.php.net/apc APC] is installed",
+       "config-apcu": "[http://www.php.net/apcu APCu] is installed",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] is installed",
        "config-no-cache-apcu": "<strong>Warning:</strong> Could not find [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] or [http://www.iis.net/download/WinCacheForPhp WinCache].\nObject caching is not enabled.",
        "config-mod-security": "<strong>Warning:</strong> Your web server has [http://modsecurity.org/ mod_security]/mod_security2 enabled. Many common configurations of this will cause problems for MediaWiki and other software that allows users to post arbitrary content.\nIf possible, this should be disabled. Otherwise, refer to [http://modsecurity.org/documentation/ mod_security documentation] or contact your host's support if you encounter random errors.",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki supports the following database systems:\n\n$1\n\nIf you do not see the database system you are trying to use listed below, then follow the instructions linked above to enable support.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] is the primary target for MediaWiki and is best supported. MediaWiki also works with [{{int:version-db-mariadb-url}} MariaDB] and [{{int:version-db-percona-url}} Percona Server], which are MySQL compatible. ([http://www.php.net/manual/en/mysqli.installation.php How to compile PHP with MySQL support])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] is a popular open source database system as an alternative to MySQL. There may be some minor outstanding bugs, and it is not recommended for use in a production environment. ([http://www.php.net/manual/en/pgsql.installation.php How to compile PHP with PostgreSQL support])",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] is a popular open source database system as an alternative to MySQL. ([http://www.php.net/manual/en/pgsql.installation.php How to compile PHP with PostgreSQL support])",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] is a lightweight database system that is very well supported. ([http://www.php.net/manual/en/pdo.installation.php How to compile PHP with SQLite support], uses PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] is a commercial enterprise database. ([http://www.php.net/manual/en/oci8.installation.php How to compile PHP with OCI8 support])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] is a commercial enterprise database for Windows. ([http://www.php.net/manual/en/sqlsrv.installation.php How to compile PHP with SQLSRV support])",
        "config-cache-options": "Settings for object caching:",
        "config-cache-help": "Object caching is used to improve the speed of MediaWiki by caching frequently used data.\nMedium to large sites are highly encouraged to enable this, and small sites will see benefits as well.",
        "config-cache-none": "No caching (no functionality is removed, but speed may be impacted on larger wiki sites)",
-       "config-cache-accel": "PHP object caching (APC, XCache or WinCache)",
+       "config-cache-accel": "PHP object caching (APC, APCu, XCache or WinCache)",
        "config-cache-memcached": "Use Memcached (requires additional setup and configuration)",
        "config-memcached-servers": "Memcached servers:",
        "config-memcached-help": "List of IP addresses to use for Memcached.\nShould specify one per line and specify the port to be used. For example:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index 09f3a40..4398492 100644 (file)
@@ -31,7 +31,8 @@
                        "AlvaroMolina",
                        "Indiralena",
                        "Peter Bowman",
-                       "Dgstranz"
+                       "Dgstranz",
+                       "Irus"
                ]
        },
        "config-desc": "El instalador de MediaWiki",
@@ -89,6 +90,7 @@
        "config-memory-bad": "<strong>Advertencia:</strong> el parámetro <code>memory_limit</code> de PHP es $1.\nProbablemente sea demasiado bajo.\n¡La instalación puede fallar!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] está instalado",
        "config-apc": "[http://www.php.net/apc APC] está instalado",
+       "config-apcu": "[http://www.php.net/apcu APCu] está instalado",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] está instalado",
        "config-no-cache-apcu": "<strong>Advertencia:</strong> No se pudo encontrar [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] o [http://www.iis.net/download/WinCacheForPhp WinCache].\nEl caché de objetos no está activado.",
        "config-mod-security": "<strong>Advertencia:</strong> tu servidor web tiene activado [http://modsecurity.org/ mod_security]/mod_security2. Muchas de sus configuraciones comunes pueden causar problemas a MediaWiki u otro software que permita a los usuarios publicar contenido arbitrario. De ser posible, deberías desactivarlo. Si no, consulta la [http://modsecurity.org/documentation/ documentación de mod_security] o contacta con el administrador de tu servidor si encuentras errores aleatorios.",
        "config-mysql-innodb": "InnoDB",
        "config-mysql-myisam": "MyISAM",
        "config-mysql-myisam-dep": "<strong>Advertencia:</strong> has seleccionado MyISAM como motor de almacenamiento de MySQL, el cual no está recomendado para usarse con MediaWiki, porque:\n* apenas soporta concurrencia debido al bloqueo de tablas\n* es más propenso a la corrupción que otros motores\n* el código MediaWiki no siempre controla MyISAM como debiera\n\nSi tu instalación de MySQL soporta InnoDB, es muy recomendable que lo elijas en su lugar.\nSi tu instalación de MySQL no soporta InnoDB, quizás es el momento de una actualización.",
-       "config-mysql-only-myisam-dep": "<strong>Advertencia:</strong> solo se ha encontrado el motor de almacenamiento MyISAM para MySQL en esta máquina, y no se recomienda su uso con MediaWiki, porque:\n* apenas soporta concurrencia debido al bloqueo de tablas\n* es más propenso a la corrupción que otros motores\n* el código MediaWiki no siempre controla MyISAM como debiera\n\nTu instalación de MySQL no soporta InnoDB, quizás es el momento de una actualización.",
+       "config-mysql-only-myisam-dep": "<strong>Advertencia:</strong> solo se ha encontrado el motor de almacenamiento MyISAM para MySQL en esta máquina, y no se recomienda su uso con MediaWiki, porque:\n* apenas admite la concurrencia debido al bloqueo de tablas\n* es más propenso a daños que otros motores\n* el código de MediaWiki no siempre controla MyISAM como debería\n\nTu instalación de MySQL no admite InnoDB; quizás es el momento de una actualización.",
        "config-mysql-engine-help": "<strong>InnoDB</strong> es casi siempre la mejor opción, dado que soporta bien los accesos simultáneos.\n\n<strong>MyISAM</strong> puede ser más rápido en instalaciones con usuario único o de sólo lectura.\nLas bases de datos MyISAM tienden a corromperse más a menudo que las bases de datos InnoDB.",
        "config-mysql-charset": "Conjunto de caracteres de la base de datos:",
        "config-mysql-binary": "Binario",
        "config-cache-options": "Configuración de la caché de objetos:",
        "config-cache-help": "El almacenamiento en caché de objetos se utiliza para mejorar la velocidad de MediaWiki mediante el almacenamiento en caché los datos usados más frecuentemente.\nA los sitios medianos y grandes se les recomienda que permitirlo. También es beneficioso para los sitios pequeños.",
        "config-cache-none": "Sin almacenamiento en caché (no se pierde ninguna funcionalidad, pero la velocidad puede resentirse en sitios grandes)",
-       "config-cache-accel": "Almacenamiento en caché de objetos PHP (APC, XCache o WinCache)",
+       "config-cache-accel": "Almacenamiento en caché de objetos PHP (APC, APCu, XCache o WinCache)",
        "config-cache-memcached": "Utilizar Memcached (necesita ser instalado y configurado aparte)",
        "config-memcached-servers": "Servidores Memcached:",
        "config-memcached-help": "Lista de direcciones IP que serán usadas por Memcached.\nDeben especificarse una por cada línea y especificar el puerto a utilizar. Por ejemplo:\n127.0.0.1:11211\n192.168.1.25:1234",
index 7dbca51..5939291 100644 (file)
@@ -75,6 +75,7 @@
        "config-memory-bad": "'''Varoitus:''' PHP:n <code>memory_limit</code> on $1.\nTämä on luultavasti liian alhainen.\nAsennus saattaa epäonnistua!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] on asennettu",
        "config-apc": "[http://www.php.net/apc APC] on asennettu.",
+       "config-apcu": "[http://www.php.net/apcu APCu] on asennettu",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] on asennettu",
        "config-diff3-bad": "GNU diff3:a ei löytynyt.",
        "config-git": "Löydetty Git versionhallintaohjelmisto: <code>$1</code>",
index 3e7f8f3..43a39e0 100644 (file)
@@ -85,6 +85,7 @@
        "config-memory-bad": "'''Attention :''' Le paramètre <code>memory_limit</code> de PHP est à $1.\nCette valeur est probablement trop faible.\nIl est possible que l’installation échoue !",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] est installé",
        "config-apc": "[http://www.php.net/apc APC] est installé",
+       "config-apcu": "[http://www.php.net/apcu APCu] est installé",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] est installé",
        "config-no-cache-apcu": "'''Attention :''' Impossible de trouver [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] ou [http://www.iis.net/download/WinCacheForPhp WinCache].\nLa mise en cache d'objets n'est pas activée.",
        "config-mod-security": "'''Attention''': Votre serveur web a [http://modsecurity.org/ mod_security] activé. S'il est mal configuré, cela peut poser des problèmes à MediaWiki ou à d'autres applications qui permettent aux utilisateurs de publier un contenu quelconque.\nReportez-vous à [http://modsecurity.org/documentation/ la documentation de mod_security] ou contactez le support de votre hébergeur si vous rencontrez des erreurs aléatoires.",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki prend en charge ces systèmes de bases de données :\n\n$1\n\nSi vous ne voyez pas le système de base de données que vous essayez d’utiliser ci-dessous, alors suivez les instructions ci-dessus (voir liens) pour activer la prise en charge.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] est le premier choix pour MediaWiki et est le mieux pris en charge. MediaWiki fonctionne aussi avec [{{int:version-db-mariadb-url}} MariaDB] et [{{int:version-db-percona-url}} Percona Server], qui sont compatibles avec MySQL. ([http://www.php.net/manual/en/mysqli.installation.php Comment compiler PHP avec le support MySQL])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] est un système de base de données populaire et ''open source'' qui peut être une alternative à MySQL. Son support peut contenir quelques bogues mineurs et n'est pas recommandé dans un environnement de production.  ([http://www.php.net/manual/en/pgsql.installation.php Comment compiler PHP avec le support de PostgreSQL])",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] est un système de base de données populaire et ''open source'' qui peut être une alternative à MySQL ([http://www.php.net/manual/en/pgsql.installation.php Comment compiler PHP avec le support de PostgreSQL]).",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] est un système de base de données léger bien pris en charge. ([http://www.php.net/manual/fr/pdo.installation.php Comment compiler PHP avec la prise en charge de SQLite], en utilisant PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] est un système commercial de gestion de base de données d’entreprise. ([http://www.php.net/manual/en/oci8.installation.php Comment compiler PHP avec le support OCI8])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] est une base de données commerciale d’entreprise pour Windows. ([http://www.php.net/manual/en/sqlsrv.installation.php Comment compiler PHP avec le support de SQLSRV])",
        "config-cache-options": "Paramètres pour la mise en cache des objets:",
        "config-cache-help": "La mise en cache des objets améliore la vitesse de MediaWiki en mettant en cache les données fréquemment utilisées.\nLes sites de taille moyenne à grande sont fortement encouragés à l'activer. Les petits sites y verront également des avantages.",
        "config-cache-none": "Pas de mise en cache (aucune fonctionnalité n'a été supprimée, mais la vitesse peut changer sur les wikis importants)",
-       "config-cache-accel": "Mise en cache des objets PHP (APC, XCache ou WinCache)",
+       "config-cache-accel": "Mise en cache des objets PHP (APC, APCu, XCache ou WinCache)",
        "config-cache-memcached": "Utiliser Memcached (nécessite une installation et une configuration supplémentaires)",
        "config-memcached-servers": "serveurs pour Memcached :",
        "config-memcached-help": "Liste des adresses IP à utiliser pour Memcached.\nUne par ligne, en indiquant le port à utiliser. Par exemple :\n  127.0.0.1:11211\n  192.168.1.25:1234",
index e9e757a..f7d8d07 100644 (file)
@@ -64,6 +64,7 @@
        "config-memory-bad": "<strong>Atención:<strong> O parámetro <code>memory_limit</code> do PHP é $1.\nProbablemente é un valor baixo de máis.\nA instalación pode fallar!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] está instalado",
        "config-apc": "[http://www.php.net/apc APC] está instalado",
+       "config-apcu": "[http://www.php.net/apcu APCu] está instalado",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] está instalado",
        "config-no-cache-apcu": "<strong>Advertencia:</strong> Non se puido atopar [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] ou [http://www.iis.net/download/WinCacheForPhp WinCache].\nA caché de obxectos non está activada.",
        "config-mod-security": "<strong>Atención:</strong> O seu servidor web ten o [http://modsecurity.org/ mod_security] activado. Se estivese mal configurado, pode causar problemas a MediaWiki ou calquera outro software que permita aos usuarios publicar contidos arbitrarios.\nOlle a [http://modsecurity.org/documentation/ documentación do mod_security] ou póñase en contacto co soporte do seu servidor se atopa erros aleatorios.",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki soporta os seguintes sistemas de bases de datos:\n\n$1\n\nSe non ve listado a continuación o sistema de base de datos que intenta usar, siga as instrucións ligadas enriba para activar o soporte.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] é o obxectivo principal para MediaWiki e está mellor soportado. MediaWiki tamén funciona con [{{int:version-db-mariadb-url}} MariaDB] e [{{int:version-db-percona-url}} Percona Server], que son compatibles con MySQL. ([http://www.php.net/manual/en/mysqli.installation.php  Como compilar PHP con compatibilidade MySQL])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] é un sistema de base de datos popular e de código aberto como alternativa a MySQL. É posible que haxa algúns pequenos erros e non se recomenda o seu uso nunha contorna de produción. ([http://www.php.net/manual/en/pgsql.installation.php Como compilar PHP con compatibilidade PostgreSQL])",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] é un sistema de base de datos popular e de código aberto como alternativa a MySQL. ([http://www.php.net/manual/en/pgsql.installation.php Como compilar PHP con compatibilidade PostgreSQL])",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] é un sistema de base de datos lixeiro moi ben soportado. ([http://www.php.net/manual/en/pdo.installation.php Como compilar o PHP con soporte SQLite], emprega PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] é un sistema comercial de xestión de base de datos de nivel empresarial. ([http://www.php.net/manual/en/oci8.installation.php Como compilar o PHP con compatibilidade OCI8])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] é un sistema comercial de xestión de base de datos de nivel empresarial para Windows. ([http://www.php.net/manual/en/sqlsrv.installation.php Como compilar o PHP con compatibilidade SQLSRV])",
        "config-cache-options": "Configuración da caché de obxectos:",
        "config-cache-help": "A caché de obxectos emprégase para mellorar a velocidade de MediaWiki mediante a memorización de datos usados con frecuencia.\nÉ amplamente recomendable a súa activación nos sitios de tamaño medio e grande; os sitios pequenos obterán tamén beneficios.",
        "config-cache-none": "Sen caché (non se elimina ningunha funcionalidade, pero pode afectar á velocidade en wikis grandes)",
-       "config-cache-accel": "Caché de obxectos do PHP (APC, XCache ou WinCache)",
+       "config-cache-accel": "Caché de obxectos do PHP (APC, APCu, XCache ou WinCache)",
        "config-cache-memcached": "Empregar o Memcached (necesita unha instalación e configuración adicional)",
        "config-memcached-servers": "Servidores da memoria caché:",
        "config-memcached-help": "Lista de enderezos IP para Memcached.\nDebe especificarse un por liña, así como o porto a usar. Por exemplo:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index ac67394..e98988c 100644 (file)
@@ -67,6 +67,7 @@
        "config-memory-bad": "'''אזהרה:''' ערך האפשרות <code>memory_limit</code> של PHP הוא $1.\nזה כנראה נמוך מדי.\nההתקנה עשויה להיכשל!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] מותקן",
        "config-apc": "[http://www.php.net/apc APC] מותקן",
+       "config-apcu": "[http://www.php.net/apcu APCu] מותקן",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] מותקן",
        "config-no-cache-apcu": "<strong>אזהרה:</strong> לא נמצא [http://www.php.net/apcu APCu]‏, [http://xcache.lighttpd.net/ XCache] או [http://www.iis.net/download/WinCacheForPhp WinCache].\nמטמון עצמים לא מופעל.",
        "config-mod-security": "'''אזהרה''': בשרת הווב שלך מופעל [http://modsecurity.org/ mod_security]. אם הוא לא מוגדר טוב, זה יכול לגרום לבעיות במדיה־ויקי ובתכנה אחרת שמאפשרת למשתמשים לשלוח תוכן שרירותי.\nיש לקרוא את [http://modsecurity.org/documentation/ התיעוד של mod_security] או ליצור קשר עם אנשי התמיכה של שירותי האירוח שלכם אם מופיעות לך שגיאות אקראיות.",
index cc197c8..069bf68 100644 (file)
        "config-type-mssql": "Microsoft SQL Szerver",
        "config-support-info": "A MediaWiki a következő adatbázisrendszereket támogatja:\n\n$1\n\nHa az alábbi listán nem találod azt a rendszert, melyet használni szeretnél, a fenti linken található instrukciókat követve engedélyezheted a támogatását.",
        "config-dbsupport-mysql": "* A [{{int:version-db-mysql-url}} MySQL] a MediaWiki elsődleges célpontja, így a legjobban támogatott. A MediaWiki elfut [{{int:version-db-mariadb-url}} MariaDB-n] és [{{int:version-db-percona-url}} Percona Serveren] is, mivel ezek MySQL-kompatibilisek. ([http://www.php.net/manual/en/mysql.installation.php Hogyan fordítható a PHP MySQL-támogatással])",
-       "config-dbsupport-postgres": "* A [{{int:version-db-postgres-url}} PostgreSQL] népszerű, nyílt forráskódú adatbázisrendszer, a MySQL alternatívája ([http://www.php.net/manual/en/pgsql.installation.php Hogyan fordítható a PHP PostgreSQL-támogatással]). Több apró, javítatlan hiba is előfordulhat, így nem ajánlott éles környezetben használni. ([http://www.php.net/manual/en/pgsql.installation.php Hogyan fordítható a PHP PostgreSQL-támogatással])",
+       "config-dbsupport-postgres": "* A [{{int:version-db-postgres-url}} PostgreSQL] népszerű, nyílt forráskódú adatbázisrendszer, a MySQL alternatívája. ([http://www.php.net/manual/en/pgsql.installation.php Hogyan fordítható a PHP PostgreSQL-támogatással])",
        "config-dbsupport-sqlite": "* Az [{{int:version-db-sqlite-url}} SQLite] egy könnyű, nagyon jól támogatott adatbázisrendszer. ([http://www.php.net/manual/en/pdo.installation.php Hogyan fordítható a PHP SQLite-támogatással], PDO-t használ)",
        "config-dbsupport-oracle": "* Az [{{int:version-db-oracle-url}} Oracle] kereskedelmi, vállalati adatbázisrendszer. ([http://www.php.net/manual/en/oci8.installation.php Hogyan fordítható a PHP OCI8-támogatással])",
        "config-dbsupport-mssql": "* A [{{int:version-db-mssql-url}} Microsoft SQL Server] kereskedelmi, vállalati adatbázisrendszer. ([http://www.php.net/manual/en/sqlsrv.installation.php Hogyan fordítható a PHP SQLSRV-támogatással])",
        "config-cache-options": "Objektum-gyorsítótárazás beállításai:",
        "config-cache-help": "Az objektumgyorsítótárazás célja, hogy felgyorsítsa a MediaWiki működését a gyakran használt adatok gyorsítótárazásával.\nKözepes vagy nagyobb oldalak esetén erősen ajánlott a használata, de kisebb oldalak esetén is hasznos lehet.",
        "config-cache-none": "Nincs gyorsítótárazás (minden funkció működik, de nagyobb wiki esetében lassabb működést eredményezhet)",
-       "config-cache-accel": "PHP-objektumok gyorsítótárazása (APC, XCache or WinCache)",
+       "config-cache-accel": "PHP-objektumok gyorsítótárazása (APC, APCu, XCache vagy WinCache)",
        "config-cache-memcached": "Memcached használata (további telepítés és konfigurálás szükséges)",
        "config-memcached-servers": "Memcached-szerverek:",
        "config-memcached-help": "Azon IP-címek listája, melyeket a Memcached használhat.\nVesszővel kell elválasztani őket, és meg kell adni a portot is. Például:\n 127.0.0.1:11211\n 192.168.1.25:11211",
index d6ba2fe..8ad4347 100644 (file)
@@ -2,8 +2,11 @@
        "@metadata": {
                "authors": [
                        "Умар",
-                       "ElizaMag"
+                       "ElizaMag",
+                       "Adam-Yourist"
                ]
        },
+       "config-localsettings-key": "Кердадаккхара дIоагIа:",
+       "config-localsettings-badkey": "Iа белгалдаьккхад харцахь дола кердадаккхара дIоагIа.",
        "config-help": "новкъoстал"
 }
index 6ed2722..8d4f8be 100644 (file)
@@ -18,7 +18,9 @@
                        "C.R.",
                        "Macofe",
                        "Matteocng",
-                       "Einreiher"
+                       "Einreiher",
+                       "Tosky",
+                       "Selven"
                ]
        },
        "config-desc": "Programma di installazione per MediaWiki",
@@ -76,6 +78,7 @@
        "config-memory-bad": "''Attenzione:''' Il valore di <code>memory_limit</code> di PHP è $1.\nProbabilmente è troppo basso.\nL'installazione potrebbe non riuscire!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] è installato",
        "config-apc": "[http://www.php.net/apc APC] è installato",
+       "config-apcu": "[http://www.php.net/apc APC] è installato",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] è installato",
        "config-no-cache-apcu": "'''Attenzione:''' [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] o [http://www.iis.net/download/WinCacheForPhp WinCache] non sono stati trovati.\nLa caching degli oggetti non è attivata.",
        "config-mod-security": "<strong>Attenzione:</strong> Il tuo server web ha il [http://modsecurity.org/ mod_security] abilitato. Se non correttamente configurato, può creare problemi a MediaWiki o ad altro software che permette agli utenti di pubblicare contenuto.\nFai riferimento alla [http://modsecurity.org/documentation/ documentazione sul mod_security] o contatta il supporto tecnico del tuo provider di hosting se si verificano errori.",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki supporta i seguenti sistemi di database:\n\n$1\n\nSe fra quelli elencati qui sotto non vedi il sistema di database che vorresti utilizzare, seguire le istruzioni linkate sopra per abilitare il supporto.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] è la configurazione preferibile per MediaWiki ed è quella meglio supportata. MediaWiki funziona anche con [{{int:version-db-mariadb-url}} MariaDB] e [{{int:version-db-percona-url}} Percona Server], che sono compatibili con MySQL.([http://www.php.net/manual/en/mysqli.installation.php Come compilare PHP con supporto MySQL])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] è un popolare sistema di database open source come alternativa a MySQL. Ci possono essere alcuni bug minori in sospeso, e non è raccomandato per l'uso in un ambiente di produzione. ([http://www.php.net/manual/en/pgsql.installation.php Come compilare PHP con supporto PostgreSQL])",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] è un popolare sistema di database open source come alternativa a MySQL. ([http://www.php.net/manual/en/pgsql.installation.php Come compilare PHP con supporto PostgreSQL])",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite]  è un sistema di database leggero, che è supportato molto bene. ([http://www.php.net/manual/en/pdo.installation.php Come compilare PHP con supporto SQLite], utilizza PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] è un database di un'impresa commerciale. ([http://www.php.net/manual/en/oci8.installation.php Come compilare PHP con supporto OCI8])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] è un database di un'impresa commerciale per Windows. ([http://www.php.net/manual/en/sqlsrv.installation.php Come compilare PHP con supporto SQLSRV])",
        "config-subscribe-help": "Si tratta di una mailing list a basso traffico dedicata agli annunci di nuove versioni, compresi importanti segnalazioni riguardanti la sicurezza.\nÈ consigliato iscriversi e aggiornare la propria installazione di MediaWiki quando una nuova versione viene resa pubblica.",
        "config-subscribe-noemail": "Hai provato ad iscriverti alla mailing list dedicata agli annunci delle nuove versioni senza fornire un indirizzo email.\nInserire un indirizzo email se si desidera effettuare l'iscrizione alla mailing list.",
        "config-pingback": "Condividi i dati su questa installazione con gli sviluppatori di MediaWiki.",
-       "config-almost-done": "Hai quasi finito!\nAdesso puoi saltare la rimanente parte della configurazione e semplicemente installare la wiki.",
+       "config-pingback-help": "Se si seleziona questa opzione, MediaWiki contatterà periodicamente https://www.mediawiki.org con i dati base su questa istanza MediaWiki. In questa categoria di dati rientrano, per esempio, il tipo di sistema, la versione di PHP e database di backend scelto. La Wikimedia Foundation condivide questi dati con gli sviluppatori Mediawiki per aiutarla a guidare i futuri sforzi di sviluppo. Per il tuo sistema saranno inviati i seguenti dati:\n<pre>$1</pre>",
+       "config-almost-done": "Hai quasi finito!\nAdesso puoi saltare la rimanente parte della configurazione e semplicemente installare il wiki.",
        "config-optional-continue": "Fammi altre domande.",
        "config-optional-skip": "Sono già stanco, installa solo il wiki.",
        "config-profile": "Profilo dei diritti utente:",
        "config-cache-options": "Impostazioni per la cache di oggetti:",
        "config-cache-help": "La memorizzazione di oggetti nella cache è utilizzata per migliorare la velocità di MediaWiki attraverso l'allocazione nella cache dei dati utilizzati di frequente.\nPer siti di dimensioni medie e grandi, è caldamente consigliato attivare la cache, ma anche per piccoli siti se ne vedranno i benefici.",
        "config-cache-none": "Nessuna memorizzazione in cache (nessuna funzionalità viene impedita, ma sui siti wiki più grandi la velocità potrebbe risentirne)",
-       "config-cache-accel": "Mettere in cache oggetti PHP (APC, XCache o WinCache)",
+       "config-cache-accel": "Mettere in cache oggetti PHP (APC, APCu, XCache o WinCache)",
        "config-cache-memcached": "Usa Memcached (richiede ulteriori attività di installazione e configurazione)",
        "config-memcached-servers": "Server di memcached:",
        "config-memcached-help": "Elenco di indirizzi IP da utilizzare per Memcached.\nDovresti specificarne uno per riga e indicare la porta da utilizzare. Per esempio:\n 127.0.0.1:11211\n 192.168.1.25:1234",
        "config-install-extension-tables": "Creazione delle tabelle per le estensioni attivate",
        "config-install-mainpage-failed": "Impossibile inserire la pagina principale: $1",
        "config-install-done": "<strong>Complimenti!</strong>\nHai installato MediaWiki.\n\nIl programma di installazione ha generato un file <code>LocalSettings.php</code> che contiene tutte le impostazioni.\n\nDevi scaricarlo ed inserirlo nella directory base del tuo wiki (la stessa dove è presente index.php). Il download dovrebbe partire automaticamente.\n\nSe il download non si avvia, o se è stato annullato, puoi riavviarlo cliccando sul collegamento di seguito:\n\n$3\n\n<strong>Nota:</strong> se esci ora dall'installazione senza scaricare il file di configurazione che è stato generato, questo poi non sarà più disponibile in seguito.\n\nQuando hai fatto, puoi <strong>[$2 entrare nel tuo wiki]</strong>.",
+       "config-install-done-path": "<strong>Complimenti!</strong>\nHai installato MediaWiki.\n\nIl programma di installazione ha generato un file <code>LocalSettings.php</code> che contiene tutte le impostazioni.\n\nDevi scaricarlo ed inserirlo in <code>$4</code>. Il download dovrebbe partire automaticamente.\n\nSe il download non si avvia, o se è stato annullato, puoi riavviarlo cliccando sul collegamento seguente:\n\n$3\n\n<strong>Nota:</strong> se esci ora dall'installazione senza scaricare il file di configurazione che è stato generato, questo poi non sarà più disponibile in seguito.\n\nQuando hai fatto, puoi <strong>[$2 entrare nel tuo wiki]</strong>.",
        "config-download-localsettings": "Scarica <code>LocalSettings.php</code>",
        "config-help": "aiuto",
        "config-help-tooltip": "fai clic per espandere",
index c9ae2c8..ce3ae88 100644 (file)
@@ -69,6 +69,7 @@
        "config-memory-bad": "<strong>경고:</strong> PHP의 <code>memory_limit</code>는 $1입니다.\n아마도 너무 낮은 것 같습니다.\n설치가 실패할 수 있습니다!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache]가 설치되었습니다",
        "config-apc": "[http://www.php.net/apc APC]가 설치되었습니다",
+       "config-apcu": "[http://www.php.net/apcu APCu]가 설치되었습니다",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache]가 설치되었습니다",
        "config-no-cache-apcu": "<strong>경고:</strong> [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] 또는 [http://www.iis.net/download/WinCacheForPhp WinCache]를 찾을 수 없습니다.\n개체 캐싱을 활성화할 수 없습니다.",
        "config-mod-security": "<strong>경고:</strong> 웹 서버에 [http://modsecurity.org/ mod_security]가 허용되었습니다. 잘못 설정된 경우 미디어위키나 사용자가 임의의 내용을 게시할 수 있는 다른 소프트웨어에 대한 문제를 일으킬 수 있습니다.\n[http://modsecurity.org/documentation/ mod_security] 문서를 참고하거나 임의의 오류가 발생할 경우 호스트의 지원 요청에 문의하십시오.",
        "config-type-mssql": "Microsoft SQL 서버",
        "config-support-info": "미디어위키는 다음의 데이터베이스 시스템을 지원합니다:\n\n$1\n\n데이터베이스 시스템이 표시되지 않을 때 아래에 나열된 다음 지원을 활성화하려면 위의 링크된 지시에 따라 설치해볼 수 있습니다.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL]은 미디어위키의 기본 대상이며 가장 잘 지원됩니다. 미디어위키는 또한 MySQL와 호환되는 [{{int:version-db-mariadb-url}} MariaDB]와 [{{int:version-db-percona-url}} Percona 서버]에서도 작동합니다. ([http://www.php.net/manual/en/mysql.installation.php MySQL 지원으로 PHP를 컴파일하는 방법])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL]은 MySQL의 대안으로서 인기 있는 오픈 소스 데이터베이스 시스템입니다. ([http://www.php.net/manual/en/pgsql.installation.php PostgreSQL 지원으로 PHP를 컴파일하는 방법]) 몇 가지 해결하지 못한 사소한 버그가 있을 수 있으며, 이를 제작 환경에서 사용하지 않는 것이 좋습니다.",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL]은 MySQL의 대안으로서 인기 있는 오픈 소스 데이터베이스 시스템입니다. ([http://www.php.net/manual/en/pgsql.installation.php PostgreSQL 지원으로 PHP를 컴파일하는 방법])",
        "config-dbsupport-sqlite": "*  [{{int:version-db-sqlite-url}} SQLite]는 매우 잘 지원되고 가벼운 데이터베이스 시스템입니다. ([http://www.php.net/manual/en/pdo.installation.php SQLite 지원으로 PHP를 컴파일하는 방법], PDO 사용)",
        "config-dbsupport-oracle": "*  [{{int:version-db-oracle-url}} Oracle]은 상용 기업 데이터베이스입니다. ([http://www.php.net/manual/en/oci8.installation.php OCI8 지원으로 PHP를 컴파일하는 방법])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL 서버]는 Windows용 상용 기업 데이터베이스입니다. ([http://www.php.net/manual/en/sqlsrv.installation.php SQLSRV 지원으로 PHP를 컴파일하는 방법])",
        "config-cache-options": "개체 캐싱을 위한 설정:",
        "config-cache-help": "개체 캐싱은 자주 사용하는 데이터를 캐싱하여 미디어위키의 속도를 개선하는 데 사용합니다.\n큰 규모의 사이트는 이를 많이 사용하도록 권장하고 있으며, 소규모 사이트들도 물론 혜택을 볼 수 있습니다.",
        "config-cache-none": "캐시하지 않음 (기능이 삭제되지는 않지만 큰 위키 사이트에 속도가 영향을 받을 수 있습니다)",
-       "config-cache-accel": "PHP 개체 캐싱 (APC, XCache 또는 WinCache)",
+       "config-cache-accel": "PHP 개체 캐싱 (APC, APCu, XCache 또는 WinCache)",
        "config-cache-memcached": "Memcached 사용 (추가적인 설치와 설정이 필요합니다)",
        "config-memcached-servers": "Memcached 서버:",
        "config-memcached-help": "Memcached의 사용하기 위한 IP 주소 목록입니다.\n한 줄에 하나씩 사용할 포트를 지정해야 합니다. 예를 들어:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index 91df060..b23288c 100644 (file)
@@ -50,6 +50,7 @@
        "config-memory-bad": "'''Opgepasst:''' De Parameter <code>memory_limit</code> vu PHP ass $1.\nDat ass wahrscheinlech ze niddreg.\nD'Installatioun kéint net funktionéieren.",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] ass installéiert",
        "config-apc": "[http://www.php.net/apc APC] ass installéiert",
+       "config-apcu": "[http://www.php.net/apcu APCu] ass installéiert.",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] ass installéiert",
        "config-diff3-bad": "GNU diff3 gouf net fonnt.",
        "config-git": "D'Software Git fir d'Kontroll vu Versioune gouf fonnt: <code>$1</code>.",
@@ -83,7 +84,7 @@
        "config-type-sqlite": "SQLite",
        "config-type-oracle": "Oracle",
        "config-type-mssql": "Microsoft SQL Server",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] ass e beléiften Open-Source-Datebanksystem an eng Alternativ zu MySQL. Et gëtt awer e puer kleng Implementatiounsfeeler, dofir gëtt vun der Notzung an engem Produktivsystem ofgeroden. ([http://www.php.net/manual/de/pgsql.installation.php Uleedung fir d'Kompilatoun vu PHP mat PostgreSQL-Ënnerstëtzung])",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] ass e beléiften Open-Source-Datebanksystem an eng Alternativ zu MySQL. ([http://www.php.net/manual/de/pgsql.installation.php Uleedung fir d'Kompilatoun vu PHP mat PostgreSQL-Ënnerstëtzung])",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] ass eng kommerziell Datebank-Software. ([http://www.php.net/manual/en/oci8.installation.php How to compile PHP mat OCI8 Ënnerstëtzung])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] ass eng kommerziell Datebank-Software fir Windows. ([http://www.php.net/manual/en/sqlsrv.installation.php Wéi PHP mat SQLSRV Ënnerstëtzung kompiléieren])",
        "config-header-mysql": "MySQL-Astellungen",
index 22cceb4..3660b82 100644 (file)
@@ -4,7 +4,8 @@
                        "Eitvys200",
                        "Mantak111",
                        "Zygimantus",
-                       "Hugo.arg"
+                       "Hugo.arg",
+                       "Homo"
                ]
        },
        "config-desc": "MediaWiki diegimas",
@@ -69,7 +70,7 @@
        "config-db-install-account": "Vartotojo paskyra diegimui",
        "config-db-username": "Duomenų bazės vartotojo vardas:",
        "config-db-password": "Duomenų bazės slaptažodis:",
-       "config-db-wiki-account": "Vartotojo paskyra normaliai operacijai",
+       "config-db-wiki-account": "Naudotojo paskyra įprastai operacijai",
        "config-db-prefix": "Duomenų bazės lentelės priešdėlis:",
        "config-mysql-old": "MySQL $1 ar vėlesnė yra reikalinga. Jūs turite $2.",
        "config-db-port": "Duomenų bazės prievadas:",
        "config-license": "Autorinės teisės ir licencija:",
        "config-license-pd": "Viešas domenas",
        "config-email-settings": "El. pašto nustatymai",
-       "config-email-watchlist": "Įjungti stebimų pranešimą",
+       "config-email-watchlist": "Įjungti stebimų pranešimą",
        "config-email-auth": "Įjungti el. pašto autentifikavimą",
        "config-upload-settings": "Vaizdų ir failų įkėlimai",
        "config-upload-enable": "Įgalinti failų įkėlimus",
index 7fe3a64..23f3de1 100644 (file)
@@ -26,6 +26,8 @@
        "config-page-copying": "Kopē",
        "config-restart": "Jā, restartēt",
        "config-env-php": "PHP $1 ir uzstādīts.",
+       "config-env-hhvm": "HHVM $1 ir uzstādīts.",
+       "config-apcu": "[http://www.php.net/apcu APCu] ir uzstādīts",
        "config-diff3-bad": "GNU diff3 nav atrasts.",
        "config-db-name": "Datubāzes nosaukums:",
        "config-db-username": "Datubāzes lietotājvārds:",
        "config-email-settings": "E-pasta iestatījumi",
        "config-logo": "Logo URL:",
        "config-cc-again": "Izvēlies vēlreiz...",
+       "config-memcached-servers": "Memcached serveri:",
        "config-extensions": "Paplašinājumi",
        "config-install-step-done": "Gatavs",
+       "config-install-user": "Veido datu bāzes lietotāju",
        "config-help": "palīdzība",
        "config-help-tooltip": "uzspiediet, lai izvērstu",
        "mainpagetext": "<strong>MediaWiki veiksmīgi instalēts.</strong>",
index 8b8e0fb..5e3fc0d 100644 (file)
@@ -21,9 +21,9 @@
        "config-page-dbsettings": "डाटाबेस कुंजी",
        "config-page-name": "नाम",
        "config-page-options": "विकल्प",
-       "config-page-install": "सà¥\8dथापित à¤\95रà¥\81",
+       "config-page-install": "सà¥\8dथापित à¤\95रà¥\80",
        "config-page-complete": "पूर्ण!",
-       "config-page-restart": "स्थापनाके पुनारम्भ करु",
+       "config-page-restart": "स्थापनाक पुनारम्भ करी",
        "config-page-readme": "पढू",
        "config-page-releasenotes": "रिलीज नोट्स",
        "config-page-copying": "अनुकरण",
index f8b66c1..649d9ce 100644 (file)
@@ -61,6 +61,7 @@
        "config-memory-bad": "'''Предупредување:''' <code>memory_limit</code> за PHP изнесува $1.\nОва е веројатно премалку.\nВоспоставката може да не успее!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] е воспоставен",
        "config-apc": "[http://www.php.net/apc APC] е воспоставен",
+       "config-apcu": "[http://www.php.net/apcu APCu] е воспоставен",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] е воспоставен",
        "config-no-cache-apcu": "<strong>Предупредување:</strong> Не можев да го најдам [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] или [http://www.iis.net/download/WinCacheForPhp WinCache].\nМеѓускладирањето на објекти не е овозможено",
        "config-mod-security": "'''Предупредување''': на вашиот опслужувач има овозможено [http://modsecurity.org/ mod_security]. Ако не е поставено како што треба, ова може да предизвика проблеми кај МедијаВики и други програми што им овозможуваат на корисниците да објавуваат произволни содржини.\nПогледнете ја [http://modsecurity.org/documentation/ mod_security документацијата] или обратете се кај домаќинот ако наидете на случајни грешки.",
        "config-cache-options": "Нагодувања за меѓускладирање на објекти:",
        "config-cache-help": "Меѓускладирањето на објекти се користи за зголемување на брзината на МедијаВики со меѓускладирање на често употребуваните податоци.\nОва многу се препорачува на средни до големи викија, но од тоа ќе имаат полза и малите викија.",
        "config-cache-none": "Без меѓускладирање (не се остранува ниедна функција, но може да влијае на брзината кај поголеми викија)",
-       "config-cache-accel": "Меѓускладирање на PHP-објекти (APC, XCache или WinCache)",
+       "config-cache-accel": "Меѓускладирање на PHP-објекти (APC, APCu, XCache или WinCache)",
        "config-cache-memcached": "Користи Memcached (бара дополнително поставување и нагодување)",
        "config-memcached-servers": "Memcached-опслужувачи:",
        "config-memcached-help": "Список на IP-адреси за употреба во Memcached.\nТреба да се наведе по една во секој ред, како и портата што ќе се користи. На пример:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index 29bbb71..a6b1508 100644 (file)
@@ -7,7 +7,8 @@
                        "Danmichaelo",
                        "Jeblad",
                        "Macofe",
-                       "SuperPotato"
+                       "SuperPotato",
+                       "Jon Harald Søby"
                ]
        },
        "config-desc": "Installasjonsprogrammet for MediaWiki",
        "config-sidebar": "* [https://www.mediawiki.org MediaWiki hjem]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents Brukerguide]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents Administratorguide]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ OSS]\n----\n* <doclink href=Readme>Les meg</doclink>\n* <doclink href=ReleaseNotes>Utgivelsesnotater</doclink>\n* <doclink href=Copying>Kopiering</doclink>\n* <doclink href=UpgradeDoc>Oppgradering</doclink>",
        "config-env-good": "Miljøet har blitt sjekket.\nDu kan installere MediaWiki.",
        "config-env-bad": "Miljøet har blitt sjekket.\nDu kan installere MediaWiki.",
-       "config-env-php": "PHP $1 er innstallert.",
+       "config-env-php": "PHP $1 er installert.",
        "config-env-hhvm": "HHVM $1 er installert.",
        "config-unicode-using-intl": "Bruker [http://pecl.php.net/intl intl PECL-utvidelsen] for Unicode-normalisering.",
        "config-unicode-pure-php-warning": "'''Advarsel''': [http://pecl.php.net/intl intl PECL-utvidelsen] er ikke tilgjengelig for å håndtere Unicode-normaliseringen, faller tilbake til en langsommere ren-PHP-implementasjon.\nOm du kjører et nettsted med høy trafikk bør du lese litt om [https://www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations Unicode-normalisering].",
-       "config-unicode-update-warning": "'''Advarsel''': Den installerte versjonen av Unicode-normalisereren bruker en eldre versjon av [http://site.icu-project.org/ ICU-prosjektets] bibliotek.\nDu bør [https://www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations oppgradere] om du er bekymret for å bruke Unicode.",
+       "config-unicode-update-warning": "<strong>Advarsel:</strong> Den installerte versjonen av Unicode-normalisereren bruker en eldre versjon av [http://site.icu-project.org/ ICU-prosjektets] bibliotek.\nDu bør [https://www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations oppgradere] om du er bekymret for å bruke Unicode.",
        "config-no-db": "Fant ingen passende databasedriver! Du må installere en databasedriver for PHP.\nFølgende {{PLURAL:$2|databasetype|databasetyper}} støttes: $1\n\nOm du kompilerte PHP selv, rekonfigurer den med en aktivert databaseklient, for eksempel ved å bruke <code>./configure --with-mysql</code>.\nOm du installerte PHP fra en Debian- eller Ubuntu-pakke, må du også installere for eksempel <code>php5-mysql</code>-pakken.",
        "config-outdated-sqlite": "'''Advarsel''': Du har SQLite $1, som er en eldre versjon enn minimumskravet SQLite $2. SQLite vil ikke være tilgjengelig.",
        "config-no-fts3": "'''Advarsel''': SQLite er kompilert uten [//sqlite.org/fts3.html FTS3-modulen], søkefunksjoner vil ikke være tilgjengelig på dette bakstykket.",
@@ -63,8 +64,9 @@
        "config-pcre-no-utf8": "'''Fatal''': PHPs PCRE modul ser ut til å være kompilert uten PCRE_UTF8-støtte.\nMediaWiki krever UTF-8-støtte for å fungere riktig.",
        "config-memory-raised": "PHPs <code>memory_limit</code> er $1, økt til $2.",
        "config-memory-bad": "'''Advarsel:''' PHPs <code>memory_limit</code> er $1.\nDette er sannsynligvis for lavt.\nInstallasjonen kan mislykkes!",
-       "config-xcache": "[http://xcache.lighttpd.net/ XCache] er innstallert",
-       "config-apc": "[http://www.php.net/apc APC] er innstallert",
+       "config-xcache": "[http://xcache.lighttpd.net/ XCache] er installert",
+       "config-apc": "[http://www.php.net/apc APC] er installert",
+       "config-apcu": "[http://www.php.net/apcu APCu] er installert",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] er installert",
        "config-no-cache-apcu": "<strong>Advarsel:</strong> Kunne ikke finne [http://www.php.net/apc APC], [http://xcache.lighttpd.net/ XCache] eller [http://www.iis.net/download/WinCacheForPhp WinCache].\nObjekthurtiglagring er ikke aktivert.",
        "config-mod-security": "'''Advarsel''': Din web-tjener har [http://modsecurity.org/ mod_security] påslått. Hvis denne er feilinnstilt, kan det gi problemer for MediaWiki eller annen programvare som tillater brukere å poste vilkårlig innhold.\nSjekk [http://modsecurity.org/documentation/ mod_security-dokumentasjonen] eller ta kontakt med din nettleverandør hvis du opplever tilfeldige feil.",
        "config-ns-site-name": "Samme som wikinavnet: $1",
        "config-ns-other": "Annet (spesifiser)",
        "config-ns-other-default": "MyWiki",
-       "config-project-namespace-help": "Etter Wikipedias eksempel holder mange wikier deres sider med retningslinjer atskilt fra sine innholdssider, i et «'''prosjektnavnerom'''».\nAlle sidetitler i dette navnerommet starter med et gitt prefiks som du kan angi her.\nTradisjonelt er dette prefikset avledet fra navnet på wikien, men det kan ikke innholde punkttegn som «#» eller «:».",
+       "config-project-namespace-help": "Etter Wikipedias eksempel holder mange wikier deres sider med retningslinjer atskilt fra sine innholdssider, i et «'''prosjektnavnerom'''».\nAlle sidetitler i dette navnerommet starter med et gitt prefiks som du kan angi her.\nVanligvis er dette prefikset avledet fra navnet på wikien, men det kan ikke innholde punkttegn som «#» eller «:».",
        "config-ns-invalid": "Det angitte navnerommet «<nowiki>$1</nowiki>» er ugyldig.\nAngi et annet prosjektnavnerom.",
        "config-ns-conflict": "Det angitte navnerommet «<nowiki>$1</nowiki>» er i konflikt med et standard MediaWiki-navnerom.\nAngi et annet prosjekt-navnerom.",
        "config-admin-box": "Administratorkonto",
        "config-subscribe": "Abonner på [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce e-postlisten for utgivelsesannonseringer].",
        "config-subscribe-help": "Dette er en lav-volums e-postliste brukt til utgivelsesannonseringer, herunder viktige sikkerhetsannonseringer.\nDu bør abonnere på den og oppdatere MediaWikiinstallasjonen din når nye versjoner kommer ut.",
        "config-subscribe-noemail": "Du prøvde å abonnere på epost-meldinger om nye versjoner uten å oppgi en epost-adresse. Vær vennlig å oppgi en epost-adresse om du ønsker dette abonnementet.",
+       "config-pingback": "Del data om denne installasjonen med MediaWiki-utviklerne.",
+       "config-pingback-help": "Om du velger denne vil MediaWiki periodisk pinge https://www.mediawiki.org med grunnleggende data om denne MediaWiki-instansen. Disse dataene inkluderer for eksempel systemtypen, PHP-versjonen og hvilket databasebakstykke som er valgt. Wikimedia Foundation deler disse dataene med MediaWiki-utviklerne for å bestemme framtidige utviklingstiltak. Følgende data vil bli sendt for ditt system:\n<pre>$1</pre>",
        "config-almost-done": "Du er nesten ferdig!\nDu kan velge å hoppe over de siste konfigurasjonstrinnene og installere wikien med en gang.",
        "config-optional-continue": "Still meg flere spørsmål.",
        "config-optional-skip": "Jeg er lei, bare installer wikien.",
        "config-cache-options": "Innstillinger for objekt-mellomlagring:",
        "config-cache-help": "Objekt-mellomlagring brukes for å forbedre hastigheten for MediaWiki. Ofte forekommende data lagres for gjenbruk.\nMiddels til store nettsteder bør absolutt aktivisere mellomlagring, med også små nettsteder kan ha nytte av dette.",
        "config-cache-none": "Ingen mellomlagring (ingen funksjonalitet mistes, men hastigheten kan bli dårlig for store wikier-nettsteder)",
-       "config-cache-accel": "Mellomlagring av PHP-objekter (APC, XCache or WinCache)",
+       "config-cache-accel": "Mellomlagring av PHP-objekter (APC, APCu, XCache eller WinCache)",
        "config-cache-memcached": "Bruk Memcached (krever tilleggsoppsett og -konfigurering)",
        "config-memcached-servers": "Memcached-servere:",
        "config-memcached-help": "Liste av IP-adresser for bruk fra Memcached.\nDet bør angis en per linje sammen med porten som brukes. For eksempel:\n 127.0.0.1:11211\n 192.168.1.25:1234",
        "config-install-extension-tables": "Oppretter tabeller for aktiviserte utvidelser",
        "config-install-mainpage-failed": "Kunne ikke sette inn hovedside: $1",
        "config-install-done": "<strong>Gratulrerer!</strong>\nDu har lykkes i å installere MediaWiki.\n\nInstallasjonsprogrammet har generert en <code>LocalSettings.php</code>-fil.\nDen inneholder alle dine konfigureringer.\n\nDu må laste den ned og legge den på hovedfolderen for din wiki-installasjon (der index.php ligger). Nedlastingen skulle ha startet automatisk.\n\nHvis ingen nedlasting ble tilbudt, eller du avbrøt den, kan du få den i gang ved å klikke på lenken under:\n\n$3\n\n<strong>OBS:</strong> Hvis du ikke gjør dette nå, vil den genererte konfigurasjonsfilen ikke være tilgjengelig for deg senere.\n\nNår dette er gjort, kan du <strong>[$2 gå inn i wikien]</strong>.",
+       "config-install-done-path": "<strong>Gratulerer!</strong>\nDu har installert MediaWiki.\n\nInstallereren har generert en <code>LocalSettings.php</code>-fil.\nDen inneholder all konfigurasjonen for wikien.\n\nDu må laste den ned og legge den i <code>$4</code>. Nedlastingen skal ha startet automatisk.\n\nOm nedlastingen ikke ble startet, eller om du avbrøt den, kan du starte på nytt ved å klikke lenken nedenfor:\n\n$3\n\n<strong>Merk:</strong> Om du ikke gjør dette nå vil den genererte konfigurasjonen ikke være tilgjengelig senere.\n\nNår dette er gjort kan du <strong>[$2 gå til wikien din]</strong>.",
        "config-download-localsettings": "Last ned <code>LocalSettings.php</code>",
        "config-help": "hjelp",
        "config-help-tooltip": "klikk for å utvide",
        "config-nofile": "Filen \"$1\" ble ikke funnet. Kan den være blitt slettet?",
        "config-extension-link": "Visste du at wikien din kan brukes sammen med en mengde [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions utvidelser]?\n\nDu kan sjekke gjennom [https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category utvidelser per kategori] eller [https://www.mediawiki.org/wiki/Extension_Matrix utvidelsesmatrisen] for å se den komplette listen av utvidelser.",
-       "mainpagetext": "'''MediaWiki-programvaren er nå installert.'''",
+       "mainpagetext": "<strong>MediaWiki har blitt installert.</strong>",
        "mainpagedocfooter": "Sjekk [https://meta.wikimedia.org/wiki/Help:Contents brukerveiledningen] for å få informasjon om hvordan du bruker wiki-programvaren.\n\n==Hvordan komme igang==\n*[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Innstillingsliste]\n*[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Ofte stilte spørsmål om MediaWiki]\n*[https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki e-postliste]\n*[https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Tilpass MediaWiki for ditt språk]\n*[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Lær deg å beskytte deg mot spam på wikien din]"
 }
index 7c50e82..3ee33c1 100644 (file)
@@ -24,7 +24,7 @@
        "config-page-dbconnect": "डेटाबेससँग सम्बन्ध बनाउने",
        "config-page-dbsettings": "डेटावेस सेटिङ",
        "config-page-name": "नाम",
-       "config-page-options": "विà¤\95लà¥\8dपहरà¥\81",
+       "config-page-options": "विà¤\95लà¥\8dपहरà¥\82",
        "config-page-install": "स्थापना गर्ने",
        "config-page-complete": "पूरा भयो !",
        "config-page-restart": "स्थापना फेरि सुरु गर्ने",
@@ -57,7 +57,7 @@
        "config-ns-other": "अन्य(खुलाउनुहोस)",
        "config-ns-other-default": "MyWiki",
        "config-admin-box": "प्रवन्धक खाता",
-       "config-admin-name": "तपाà¤\88à¤\81को प्रयोगकर्ता नाम:",
+       "config-admin-name": "तपाà¤\88à¤\82को प्रयोगकर्ता नाम:",
        "config-admin-password": "पासवर्ड:",
        "config-admin-email": "इमेल ठेगाना:",
        "config-optional-continue": "मलाई थप प्रश्नहरू सोध्नुहोस् ।",
@@ -82,5 +82,5 @@
        "config-help": "सहायता",
        "config-help-tooltip": "विस्तार गर्न क्लीक गर्नुहोस्",
        "mainpagetext": "'''मीडिया सफलतापूर्वक कम्प्यूटरमा स्थापित भयो ।'''",
-       "mainpagedocfooter": " विकी अनुप्रयोग कसरी प्रयोग गर्ने भन्ने जानकारीको लागि  [https://meta.wikimedia.org/wiki/Help:Contents प्रयोगकर्ता सहायता] हेर्नुहोस्\n\n== सुरू गर्नको लागि  ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings विन्यास सेटिङ्ग सूची]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ मेडियाविकि सामान्य प्रश्नका उत्तरहरु]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce मेडियाविकि सुचना मेलिङ्ग सूची]"
+       "mainpagedocfooter": " विकी अनुप्रयोग कसरी प्रयोग गर्ने भन्ने जानकारीको लागि  [https://meta.wikimedia.org/wiki/Help:Contents प्रयोगकर्ता सहायता] हेर्नुहोस्\n\n विकी अनुप्रयोग कसरी प्रयोग गर्ने भन्ने जानकारीको लागि  [https://meta.wikimedia.org/wiki/Help:Contents प्रयोगकर्ता सहायता] हेर्नुहोस्\n\n== सुरू गर्नको लागि  ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings विन्यास सेटिङ्ग सूची]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ मेडियाविकि सामान्य प्रश्नका उत्तरहरू]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce मेडियाविकि सूचना मेलिङ्ग सूची]"
 }
index 78649ce..0a77232 100644 (file)
@@ -57,7 +57,7 @@
        "config-restart": "Ja, opnieuw starten",
        "config-welcome": "=== Controle omgeving ===\nEr worden een aantal basiscontroles uitgevoerd met als doel vast te stellen of deze omgeving geschikt is voor een installatie van MediaWiki.\nLever deze gegevens aan als u ondersteuning vraagt bij de installatie.",
        "config-copyright": "=== Auteursrechten en voorwaarden ===\n\n$1\n\nDit programma is vrije software. U mag het verder verspreiden en/of aanpassen in overeenstemming met de voorwaarden van de GNU General Public License zoals uitgegeven door de Free Software Foundation; ofwel versie 2 van de Licentie of - naar uw keuze - enige latere versie.\n\nDit programma wordt verspreid in de hoop dat het nuttig is, maar '''zonder enige garantie''', zelfs zonder de impliciete garantie van '''verkoopbaarheid''' of '''geschiktheid voor een bepaald doel'''.\nZie de GNU General Public License voor meer informatie.\n\nSamen met dit programma hoort u een <doclink href=Copying>exemplaar van de GNU General Public License</doclink> ontvangen te hebben; zo niet, schrijf dan aan de Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, Verenigde Staten. Of [http://www.gnu.org/copyleft/gpl.html lees de licentie online].",
-       "config-sidebar": "* [https://www.mediawiki.org MediaWiki thuispagina]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents Gebruikershandleiding] (Engelstalig)\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents Beheerdershandleiding] (Engelstalig)\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Veelgestelde vragen] (Engelstalig)\n----\n* <doclink href=Readme>Leesmij</doclink> (Engelstalig)\n* <doclink href=ReleaseNotes>Release notes</doclink> (Engelstalig)\n* <doclink href=Copying>Kopiëren</doclink> (Engelstalig)\n* <doclink href=UpgradeDoc>Versie bijwerken</doclink> (Engelstalig)",
+       "config-sidebar": "* [https://www.mediawiki.org MediaWiki-thuispagina]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents Gebruikershandleiding] (Engelstalig)\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents Beheerdershandleiding] (Engelstalig)\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Veelgestelde vragen] (Engelstalig)\n----\n* <doclink href=Readme>Leesmij</doclink> (Engelstalig)\n* <doclink href=ReleaseNotes>Release notes</doclink> (Engelstalig)\n* <doclink href=Copying>Kopiëren</doclink> (Engelstalig)\n* <doclink href=UpgradeDoc>Versie bijwerken</doclink> (Engelstalig)",
        "config-env-good": "De omgeving is gecontroleerd.\nU kunt MediaWiki installeren.",
        "config-env-bad": "De omgeving is gecontroleerd.\nU kunt MediaWiki niet installeren.",
        "config-env-php": "PHP $1 is op dit moment geïnstalleerd.",
        "config-ns-site-name": "Zelfde als de wiki: $1",
        "config-ns-other": "Andere (geef aan welke)",
        "config-ns-other-default": "MijnWiki",
-       "config-project-namespace-help": "In het kielzog van Wikipedia beheren veel wiki's hun beleidspagina's apart van hun inhoudelijke pagina's in een \"'''projectnaamruimte'''\".\nAlle paginanamen in deze naamruimte beginnen met een bepaald voorvoegsel dat u hier kunt opgeven.\nDit voorvoegsel wordt meestal afgeleid van de naam van de wiki, maar het kan geen bijzondere tekens bevatten als \"#\" of \":\".",
+       "config-project-namespace-help": "In het kielzog van Wikipedia beheren veel wiki's hun beleidspagina's apart van hun inhoudelijke pagina's in een '''projectnaamruimte'''.\nAlle paginanamen in deze naamruimte beginnen met een bepaald voorvoegsel dat u hier kunt opgeven.\nDit voorvoegsel wordt meestal afgeleid van de naam van de wiki, maar het kan geen bijzondere tekens bevatten als \"#\" of \":\".",
        "config-ns-invalid": "De opgegeven naamruimte \"<nowiki>$1</nowiki>\" is ongeldig.\nGeef een andere naamruimte op.",
        "config-ns-conflict": "De opgegeven naamruimte \"<nowiki>$1</nowiki>\" conflicteert met een standaard naamruimte in MediaWiki.\nGeef een andere naam op voor de projectnaamruimte.",
        "config-admin-box": "Beheerdersgebruiker",
        "config-subscribe": "Abonneren op de [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce mailinglijst releaseaankondigen].",
        "config-subscribe-help": "Dit is een mailinglijst met een laag volume voor aankondigingen van nieuwe versies, inclusief belangrijke aankondigingen met betrekking tot beveiliging.\nAbonneer uzelf erop en werk uw MediaWiki-installatie bij als er nieuwe versies uitkomen.",
        "config-subscribe-noemail": "U hebt geprobeerd zich te abonneren op de mailinglijst voor release-aankondigingen zonder een e-mailadres op te geven.\nGeef een e-mailadres op als u zich wilt abonneren op de mailinglijst.",
+       "config-pingback": "Gegevens over deze installatie delen met MediaWiki-ontwikkelaars.",
        "config-almost-done": "U bent bijna klaar!\nAls u wilt kunt u de overige instellingen overslaan en de wiki nu installeren.",
        "config-optional-continue": "Stel me meer vragen.",
        "config-optional-skip": "Laat maar zitten, installeer gewoon de wiki.",
        "config-logo": "URL voor logo:",
        "config-logo-help": "Het standaarduiterlijk van MediaWiki bevat ruimte voor een logo van 135x160 pixels boven het menu.\nUpload een afbeelding met de juiste afmetingen en voer de URL hier in.\n\nU kunt <code>$wgStylePath</code> of <code>$wgScriptPath</code> gebruiken als uw logo relatief is aan een van deze paden.\n\nAls u geen logo wilt gebruiken, kunt u dit veld leeg laten.",
        "config-instantcommons": "Instant Commons inschakelen",
-       "config-instantcommons-help": "[https://www.mediawiki.org/wiki/InstantCommons Instant Commons] is functie die het mogelijk maakt om afbeeldingen, geluidsbestanden en andere mediabestanden te gebruiken van de website [https://commons.wikimedia.org/ Wikimedia Commons].\nHiervoor heeft MediaWiki toegang nodig tot Internet.\n\nMeer informatie over deze functie en hoe deze in te stellen voor andere wiki's dan Wikimedia Commons is te vinden in de [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgForeignFileRepos handleiding].",
+       "config-instantcommons-help": "[https://www.mediawiki.org/wiki/InstantCommons Instant Commons] is functie die het mogelijk maakt om afbeeldingen, geluidsbestanden en andere mediabestanden te gebruiken van de website [https://commons.wikimedia.org/ Wikimedia Commons].\nHiervoor heeft MediaWiki toegang nodig tot internet.\n\nMeer informatie over deze functie en hoe deze in te stellen voor andere wiki's dan Wikimedia Commons is te vinden in de [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgForeignFileRepos handleiding].",
        "config-cc-error": "De licentiekiezer van Creative Commons heeft geen resultaat opgeleverd.\nVoer de licentie handmatig in.",
        "config-cc-again": "Opnieuw kiezen...",
        "config-cc-not-chosen": "Kies de Creative Commonslicentie die u wilt gebruiken en klik op \"proceed\".",
index e04944f..6cd4d38 100644 (file)
@@ -3,7 +3,8 @@
                "authors": [
                        "Harald Khan",
                        "Nghtwlkr",
-                       "Njardarlogar"
+                       "Njardarlogar",
+                       "Jon Harald Søby"
                ]
        },
        "config-your-language": "Språket ditt:",
@@ -13,8 +14,8 @@
        "config-page-language": "Språk",
        "config-memory-raised": "PHPs <code>memory_limit</code> er $1, auka til $2.",
        "config-memory-bad": "'''Advarsel:''' PHPs <code>memory_limit</code> er $1.\nDette er sannsynlegvis for lågt.\nInstallasjonen kan mislukkast!",
-       "config-xcache": "[http://xcache.lighttpd.net/ XCache] er innstallert",
-       "config-apc": "[http://www.php.net/apc APC] er innstallert",
+       "config-xcache": "[http://xcache.lighttpd.net/ XCache] er installert",
+       "config-apc": "[http://www.php.net/apc APC] er installert",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] er installert",
        "config-db-name": "Databasenamn:",
        "config-db-username": "Databasebrukarnamn:",
index 8d54c98..52b4ca5 100644 (file)
@@ -71,7 +71,7 @@
        "config-unicode-using-intl": "Korzystanie z [http://pecl.php.net/intl rozszerzenia intl PECL] do normalizacji Unicode.",
        "config-unicode-pure-php-warning": "<strong>Uwaga:<strong> [http://pecl.php.net/intl Rozszerzenie intl PECL] do obsługi normalizacji Unicode nie jest dostępne. Użyta zostanie mało wydajna zwykła implementacja w PHP.\nJeśli prowadzisz stronę o dużym natężeniu ruchu, powinieneś zapoznać się z informacjami o [https://www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations normalizacji Unicode].",
        "config-unicode-update-warning": "<strong>Uwaga:</strong> zainstalowana wersja normalizacji Unicode korzysta z nieaktualnej biblioteki [http://site.icu-project.org/ projektu ICU].\nPowinieneś [https://www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations wykonać aktualizację], jeśli chcesz korzystać w pełni z Unicode.",
-       "config-no-db": "Nie można odnaleźć właściwego sterownika bazy danych! Musisz zainstalować sterownik bazy danych dla PHP.\nMożna użyć {{PLURAL:$2|następującego typu bazy|następujących typów baz} danych: $1.\n\nJeśli skompilowałeś PHP samodzielnie, skonfiguruj je ponownie z włączonym klientem bazy danych, na przykład za pomocą polecenia <code>./configure --with-mysqli</code>.\nJeśli zainstalowałeś PHP jako pakiet Debiana lub Ubuntu, musisz również zainstalować np. moduł <code>php5-mysql</code>.",
+       "config-no-db": "Nie można odnaleźć właściwego sterownika bazy danych! Musisz zainstalować sterownik bazy danych dla PHP.\nMożna użyć {{PLURAL:$2|następującego typu bazy|następujących typów baz}} danych: $1.\n\nJeśli skompilowałeś PHP samodzielnie, skonfiguruj go ponownie z włączonym klientem bazy danych, na przykład za pomocą polecenia <code>./configure --with-mysqli</code>.\nJeśli zainstalowałeś PHP jako pakiet Debiana lub Ubuntu, musisz również zainstalować np. moduł <code>php5-mysql</code>.",
        "config-outdated-sqlite": "'''Ostrzeżenie''': masz SQLite  $1, która jest niższa od minimalnej wymaganej wersji  $2 . SQLite będzie niedostępne.",
        "config-no-fts3": "'''Uwaga''' – SQLite został skompilowany bez [//sqlite.org/fts3.html modułu FTS3] – funkcje wyszukiwania nie będą dostępne.",
        "config-pcre-old": "<strong>Błąd krytyczny:</strong> Wymagany jest PCRE w wersji $1 lub nowszej.\nTwój plik wykonywalny PHP jest powiązany z wersją PCRE $2.\n[https://www.mediawiki.org/wiki/Manual:Errors_and_symptoms/PCRE Więcej informacji].",
@@ -80,6 +80,7 @@
        "config-memory-bad": "'''Uwaga:''' PHP <code>memory_limit</code> jest ustawione na $1.\nTo jest prawdopodobnie zbyt mało.\nInstalacja może się nie udać!",
        "config-xcache": "[Http://trac.lighttpd.net/xcache/ XCache] jest zainstalowany",
        "config-apc": "[Http://www.php.net/apc APC] jest zainstalowany",
+       "config-apcu": "[http://www.php.net/apcu APCu] jest zainstalowany",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] jest zainstalowany",
        "config-no-cache-apcu": "<strong>Ostrzeżenie:</strong> Nie można znaleźć [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] lub [http://www.iis.net/download/WinCacheForPhp WinCache].\nPamięć podręczna obiektów nie zostanie włączona.",
        "config-mod-security": "''' Ostrzeżenie ''': Serwer sieci web ma włączone [http://modsecurity.org/ mod_security]. Jeśli jest niepoprawnie skonfigurowane, może być przyczyną problemów MediaWiki lub innego oprogramowania, które pozwala użytkownikom na wysyłanie dowolnej zawartości.\nSprawdź w [http://modsecurity.org/documentation/ dokumentacji mod_security] lub skontaktuj się z obsługa hosta, jeśli wystąpią losowe błędy.",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki może współpracować z następującymi systemami baz danych:\n\n$1\n\nPoniżej wyświetlone są systemy baz danych gotowe do użycia. Jeżeli poniżej brakuje bazy danych, z której chcesz skorzystać, oznacza to, że brakuje odpowiedniego oprogramowania lub zostało ono niepoprawnie skonfigurowane. Powyżej znajdziesz odnośniki do dokumentacji, która pomoże w konfiguracji odpowiednich komponentów.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] jest bazą danych, na której rozwijane jest oprogramowanie MediaWiki. MediaWiki działa również z [{{int:version-db-mariadb-url}} MariaDB] i [{{int:version-db-percona-url}} Percona Server], które są zgodne z MySQL. ([http://www.php.net/manual/en/mysqli.installation.php Zobacz, jak skompilować PHP ze wsparciem dla MySQL])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] jest popularnym systemem baz danych, często stosowanym zamiast MySQL. Z powodu możliwości wystąpienia drobnych błędów, nie jest zalecana do wymagających wdrożeń. ([http://www.php.net/manual/en/pgsql.installation.php Zobacz, jak skompilować PHP ze wsparciem dla PostgreSQL])",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] jest popularnym systemem baz danych, często stosowanym zamiast MySQL. ([http://www.php.net/manual/pl/pgsql.installation.php Zobacz, jak skompilować PHP z obsługą PostgreSQL])",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] jest niewielkim systemem bazy danych, z którym MediaWiki bardzo dobrze współpracuje. ([http://www.php.net/manual/en/pdo.installation.php Zobacz, jak skompilować PHP ze wsparciem dla SQLite], korzystając z PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] jest komercyjną profesjonalną bazą danych. ([http://www.php.net/manual/en/oci8.installation.php Jak skompilować PHP ze wsparciem dla OCI8])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] jest komercyjną profesjonalną bazą danych. ([http://www.php.net/manual/pl/sqlsrv.installation.php Jak skompilować PHP ze wsparciem dla SQLSRV])",
        "config-cc-not-chosen": "Wybierz, którą chcesz licencję Creative Commons i kliknij „proceed”.",
        "config-advanced-settings": "Konfiguracja zaawansowana",
        "config-cache-options": "Ustawienia buforowania obiektów:",
-       "config-cache-help": "Buforowanie obiekto jest używane aby przyspieszyć MediaWiki przez trzymanie w pamięci podręcznej często używanych danych.\nŚrednie oraz duże witryny są wysoce zachęcane by je włączyć, a małe witryny także dostrzegą korzyści.",
+       "config-cache-help": "Buforowanie obiektów jest używane do przyspieszenia MediaWiki przez trzymanie w pamięci podręcznej często używanych danych.\nŚrednie oraz duże witryny są wysoce zachęcane by je włączyć, ale małe witryny również dostrzegą korzyści.",
        "config-cache-none": "Brak buforowania (wszystkie funkcje będą działać, ale mogą wystąpić kłopoty z wydajnością na dużych witrynach wiki)",
-       "config-cache-accel": "Buforowania obiektów PHP (APC, XCache lub WinCache)",
+       "config-cache-accel": "Buforowania obiektów PHP (APC, APCu, XCache lub WinCache)",
        "config-cache-memcached": "Użyj Memcached (wymaga dodatkowej instalacji i konfiguracji)",
        "config-memcached-servers": "Serwery Memcached:",
        "config-memcached-help": "Lista adresów IP do wykorzystania przez Memcached.\nAdresy powinny być umieszczane po jednym w linii i określać również wykorzystywany port. Na przykład:\n 127.0.0.1:11211\n 192.168.1.25:1234",
        "config-install-begin": "Po naciśnięciu \"{{int:config-continue}}\", rozpocznie się instalacja MediaWiki.\nJeśli nadal chcesz dokonać zmian, naciśnij \"{{int:config-back}}\".",
        "config-install-step-done": "gotowe",
        "config-install-step-failed": "nieudane",
-       "config-install-extensions": "Włącznie z rozszerzeniami",
+       "config-install-extensions": "Dołączanie rozszerzeń",
        "config-install-database": "Konfigurowanie bazy danych",
        "config-install-schema": "Tworzenie schematu",
        "config-install-pg-schema-not-exist": "Schemat PostgreSQL nie istnieje.",
        "config-help": "pomoc",
        "config-help-tooltip": "kliknij, aby rozwinąć",
        "config-nofile": "Nie udało się odnaleźć pliku \"$1\". Czy nie został usunięty?",
-       "config-extension-link": "Czy wiesz, że twoja wiki obsługuje [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions/pl rozszerzenia]?\n\nMożesz przejrzeć [https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category rozszerzenia według kategorii] lub [https://www.mediawiki.org/wiki/Extension_Matrix Extension Matrix] aby zobaczyć pełną listę rozszerzeń.",
+       "config-extension-link": "Czy wiesz, że twoja wiki obsługuje [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions rozszerzenia]?\n\nMożesz przejrzeć [https://www.mediawiki.org/wiki/Category:Extensions_by_category rozszerzenia według kategorii] lub [https://www.mediawiki.org/wiki/Extension_Matrix Extension Matrix], aby zobaczyć pełną listę rozszerzeń.",
        "mainpagetext": "<strong>Instalacja MediaWiki powiodła się.</strong>",
-       "mainpagedocfooter": "Zobacz [https://meta.wikimedia.org/wiki/Help:Contents przewodnik użytkownika], aby uzyskać informacje o działaniu oprogramowania wiki.\n\n== Na początek ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings/pl Lista ustawień konfiguracyjnych]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ/pl MediaWiki FAQ]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Komunikaty o nowych wersjach MediaWiki]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Przetłumacz MediaWiki na swój język]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam \nDowiedz się, jak walczyć ze spamem na swojej wiki]"
+       "mainpagedocfooter": "Zobacz [https://meta.wikimedia.org/wiki/Help:Contents/pl przewodnik użytkownika], aby uzyskać informacje o działaniu oprogramowania wiki.\n\n== Na początek ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Lista ustawień konfiguracyjnych]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Komunikaty o nowych wersjach MediaWiki (lista dyskusyjna)]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Przetłumacz MediaWiki na swój język]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Dowiedz się, jak walczyć ze spamem na swojej wiki]"
 }
index 49f242a..32794b4 100644 (file)
@@ -55,7 +55,7 @@
        "config-page-existingwiki": "Wiki existente",
        "config-help-restart": "Deseja limpar todos os dados gravados que introduziu e reiniciar o processo de instalação?",
        "config-restart": "Sim, reiniciar",
-       "config-welcome": "=== Verificações do ambiente ===\nSão realizadas verificações básicas para determinar se este ambiente é apropriado para instalação do MediaWiki.\nSe necessitar de pedir ajuda durante a instalação, deve fornecer os resultados destas verificações.",
+       "config-welcome": "=== Verificações do ambiente ===\nSerão agora realizadas verificações básicas para determinar se este ambiente é apropriado para instalação do MediaWiki.\nLembre-se de fornecer esta informação se necessitar de pedir ajuda para concluir a instalação.",
        "config-copyright": "=== Direitos de autor e Condições de uso ===\n\n$1\n\nEste programa é software livre; pode redistribuí-lo e/ou modificá-lo nos termos da licença GNU General Public License, tal como publicada pela Free Software Foundation; tanto a versão 2 da Licença, como (por opção sua) qualquer versão posterior.\n\nEste programa é distribuído na esperança de que seja útil, mas '''sem qualquer garantia'''; inclusive, sem a garantia implícita da '''possibilidade de ser comercializado''' ou de '''adequação para qualquer finalidade específica'''.\nConsulte a licença GNU General Public License para mais detalhes.\n\nEm conjunto com este programa deve ter recebido <doclink href=Copying>uma cópia da licença GNU General Public License</doclink>; se não a recebeu, peça-a por escrito a Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA ou [http://www.gnu.org/copyleft/gpl.html leia-a na internet].",
        "config-sidebar": "* [https://www.mediawiki.org/wiki/MediaWiki/pt Página principal do MediaWiki]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents/pt Ajuda]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents/pt Manual técnico]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ FAQ]\n----\n* <doclink href=Readme>Leia-me</doclink>\n* <doclink href=ReleaseNotes>Notas de lançamento</doclink>\n* <doclink href=Copying>Cópia</doclink>\n* <doclink href=UpgradeDoc>Atualização</doclink>",
        "config-env-good": "O ambiente foi verificado.\nPode instalar o MediaWiki.",
@@ -74,7 +74,9 @@
        "config-memory-bad": "'''Aviso:''' A configuração <code>memory_limit</code> do PHP é $1.\nIsto é provavelmente demasiado baixo.\nA instalação poderá falhar!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] instalada",
        "config-apc": "[http://www.php.net/apc APC] instalada",
+       "config-apcu": "[http://www.php.net/apcu APCu] está instalado",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] instalada",
+       "config-no-cache-apcu": "<strong>Aviso:</strong> Não foram encontrados o [http://www.php.net/apcu APCu], o [http://xcache.lighttpd.net/ XCache] ou o [http://www.iis.net/download/WinCacheForPhp WinCache].\nA cache de objetos não está ativa.",
        "config-mod-security": "'''Aviso''': O seu servidor de internet tem o [http://modsecurity.org/ mod_security] ativado. Se este estiver mal configurado, pode causar problemas ao MediaWiki ou a outros programas, permitindo que os utilizadores publiquem conteúdos arbitrários.\nConsulte a [http://modsecurity.org/documentation/ mod_security documentação] ou peça apoio ao fornecedor do alojamento do seu servidor se encontrar erros aleatórios.",
        "config-diff3-bad": "O GNU diff3 não foi encontrado.",
        "config-git": "Foi encontrado o software de controlo de versões Git: <code>$1</code>.",
        "config-imagemagick": "Foi encontrado o ImageMagick: <code>$1</code>.\nSe possibilitar uploads, a miniaturização de imagens será ativada.",
        "config-gd": "Foi encontrada a biblioteca gráfica GD.\nSe possibilitar uploads, a miniaturização de imagens será ativada.",
        "config-no-scaling": "Não foi encontrada a biblioteca gráfica GD nem o ImageMagick.\nA miniaturização de imagens será desativada.",
-       "config-no-uri": "'''Erro:''' Não foi possível determinar a URI atual.\nA instalação foi abortada.",
+       "config-no-uri": "<strong>Erro:</strong> Não foi possível determinar o URI atual.\nA instalação foi abortada.",
        "config-no-cli-uri": "'''Aviso''':  Não foi especificado um <code>--scriptpath</code>; por omissão, será usado: <code>$1</code>.",
        "config-using-server": "Será usado o nome do servidor \"<nowiki>$1</nowiki>\".",
-       "config-using-uri": "Será usada a URL do servidor \"<nowiki>$1$2</nowiki>\".",
+       "config-using-uri": "Será usado o URL do servidor \"<nowiki>$1$2</nowiki>\".",
        "config-uploads-not-safe": "'''Aviso:''' O diretório por omissão para carregamentos <code>$1</code>, está vulnerável à execução arbitrária de scripts.\nEmbora o MediaWiki verifique a existência de ameaças de segurança em todos os ficheiros enviados, é altamente recomendado que [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Security#Upload_security vede esta vulnerabilidade de segurança] antes de possibilitar uploads.",
        "config-no-cli-uploads-check": "'''Aviso:''' O diretório por omissão para carregamentos, <code>$1</code>, não é verificado para determinar se é vulnerável à execução de código arbitrário durante a instalação por CLI (\"Command-line Interface\").",
        "config-brokenlibxml": "O seu sistema tem uma combinação de versões do PHP e do libxml2 conhecida por ser problemática, podendo causar corrupção de dados no MediaWiki e noutras aplicações da internet.\nAtualize para a versão 2.7.3 ou posterior do libxml2 ([https://bugs.php.net/bug.php?id=45996 incidência reportada no PHP]).\nInstalação cancelada.",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "O MediaWiki suporta as seguintes plataformas de base de dados:\n\n$1\n\nSe a plataforma que pretende usar não está listada abaixo, siga as instruções nos links acima para ativar o suporte.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] é a plataforma primária do MediaWiki e é a melhor suportada. O MediaWiki também trabalha com [{{int:version-db-mariadb-url}} MariaDB] e [{{int:version-db-percona-url}} Percona Server], que são compatíveis com MySQL. ([http://www.php.net/manual/en/mysql.installation.php Como compilar PHP com suporte a MySQL])",
-       "config-dbsupport-postgres": "* O [{{int:version-db-postgres-url}} PostgreSQL] é uma plataforma popular de base de dados de fonte aberta, alternativa ao MySQL. Poderá conter pequenos defeitos e o seu uso em ambientes de exploração/produção não é recomendado. ([http://www.php.net/manual/en/pgsql.installation.php Como compilar o PHP com suporte PostgreSQL])",
+       "config-dbsupport-postgres": "* O [{{int:version-db-postgres-url}} PostgreSQL] é uma plataforma popular de base de dados de código aberto, alternativa ao MySQL. ([http://www.php.net/manual/en/pgsql.installation.php Como compilar o PHP com suporte PostgreSQL])",
        "config-dbsupport-sqlite": "* O [{{int:version-db-sqlite-url}} SQLite] é uma plataforma de base de dados ligeira muito bem suportada. ([http://www.php.net/manual/en/pdo.installation.php Como compilar o PHP com suporte SQLite], usa PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] é uma base de dados comercial para empresas. ([http://www.php.net/manual/en/oci8.installation.php Como compilar o PHP com suporte OCI8])",
        "config-dbsupport-mssql": "* O [{{int:version-db-mssql-url}} Microsoft SQL Server] é uma base de dados comercial do Windows para empresas. ([http://www.php.net/manual/en/sqlsrv.installation.php Como compilar o PHP com suporte SQLSRV])",
        "config-subscribe": "Subscreva a [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce lista de divulgação de anúncios de lançamento].",
        "config-subscribe-help": "Esta é uma lista de divulgação de baixo volume para anúncios de lançamento de versões novas, incluindo anúncios de segurança importantes.\nDeve subscrevê-la e atualizar a sua instalação MediaWiki quando são lançadas versões novas.",
        "config-subscribe-noemail": "Tentou subscrever a lista de divulgação dos anúncios de novas versões, sem fornecer um endereço de correio electrónico.\nPara subscrever esta lista de divulgação tem de fornecer um endereço de correio electrónico.",
+       "config-pingback": "Partilhar dados sobre esta instalação com os programadores do MediaWiki.",
+       "config-pingback-help": "Se selecionar esta opção, o MediaWiki fará periodicamente um <i>ping</i> a https://www.mediawiki.org com dados básicos acerca desta instância do MediaWiki. Estes dados incluem, por exemplo, o tipo de sistema, a versão do PHP e a base de dados que escolheu. A Wikimedia Foundation partilha estes dados com os programadores do MediaWiki, para ajudar a guiar o esforço de desenvolvimento futuro. Para o seu sistema, serão enviados os seguintes dados:\n<pre>$1</pre>",
        "config-almost-done": "Está quase a terminar!\nAgora pode saltar as configurações restantes e instalar já a wiki.",
        "config-optional-continue": "Faz-me mais perguntas.",
        "config-optional-skip": "Já estou aborrecido, instala lá a wiki.",
        "config-upload-deleted": "Diretório para os ficheiros apagados:",
        "config-upload-deleted-help": "Escolha um diretório onde serão arquivados os ficheiros apagados.\nO ideal é que este diretório não possa ser diretamente acedido a partir da internet.",
        "config-logo": "URL do logótipo:",
-       "config-logo-help": "O tema padrão do MediaWiki inclui espaço para um logótipo de 135x160 pixels acima do menu da barra lateral.\nColoque na wiki uma imagem com estas dimensões e introduza aqui a URL dessa imagem.\n\nSe não pretende usar um logótipo, deixe este campo em branco.",
+       "config-logo-help": "O tema padrão do MediaWiki inclui espaço para um logótipo de 135x160 píxeis acima do menu da barra lateral.\nColoque na wiki uma imagem com estas dimensões e introduza aqui o URL dessa imagem.\n\nSe não pretende usar um logótipo, deixe este campo em branco.",
        "config-instantcommons": "Ativar Instant Commons",
        "config-instantcommons-help": "O [https://www.mediawiki.org/wiki/InstantCommons Instant Commons] é uma funcionalidade que permite que as wikis usem imagens, áudio e outros ficheiros multimédia disponíveis no sítio [https://commons.wikimedia.org/ Wikimedia Commons].\nPara poder usá-los, o MediaWiki necessita de acesso à Internet.\n\nPara mais informações sobre esta funcionalidade, incluindo instruções sobre como configurá-la para usar outras wikis em vez da Wikimedia Commons, consulte o [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgForeignFileRepos Manual Técnico].",
        "config-cc-error": "O auxiliar de escolha de licenças da Creative Commons não produziu resultados.\nIntroduza o nome da licença manualmente.",
        "config-cache-options": "Configuração da cache de objetos:",
        "config-cache-help": "A cache de objetos é usada para melhorar o desempenho do MediaWiki. Armazena dados usados com frequência.\nSites de tamanho médio ou grande são altamente encorajados a ativar esta funcionalidade e os sites pequenos também terão alguns benefícios em fazê-lo.",
        "config-cache-none": "Sem cache (não é removida nenhuma funcionalidade, mas a velocidade de operação pode ser afectada nas wikis grandes)",
-       "config-cache-accel": "Cache de objetos do PHP (APC, XCache ou WinCache)",
+       "config-cache-accel": "Cache de objetos do PHP (APC, APCu, XCache ou WinCache)",
        "config-cache-memcached": "Usar Memcached (requer instalação e configurações adicionais)",
        "config-memcached-servers": "Servidores Memcached:",
        "config-memcached-help": "Lista de endereços IP que serão usados para o Memcached.\nDeve-se colocar um por linha e indicar a porta a utilizar. Por exemplo:\n 127.0.0.1:11211\n 192.168.1.25:1234",
        "config-skins": "Temas",
        "config-skins-help": "Os temas listados abaixo foram detetados no seu diretório <code>./skins</code>. Deverá ativar pelo menos um e escolher qual o escolhido por padrão.",
        "config-skins-use-as-default": "Usar este tema como padrão",
+       "config-skins-missing": "Não foi encontrado nenhum tema; o MediaWiki usará um tema de recurso até instalar temas adequados.",
        "config-skins-must-enable-some": "Deve escolher pelo menos um tema para ativar.",
        "config-skins-must-enable-default": "O tema escolhido como padrão deve ser ativado.",
        "config-install-alreadydone": "'''Aviso:''' Parece que já instalou o MediaWiki e está a tentar instalá-lo novamente.\nPasse para a próxima página, por favor.",
        "config-install-stats": "A inicializar as estatísticas",
        "config-install-keys": "A gerar as chaves secretas",
        "config-insecure-keys": "'''Aviso:''' {{PLURAL:$2|A chave segura|As chaves seguras}} ($1) {{PLURAL:$2|gerada durante a instalação não é completamente segura|geradas durante a instalação não são completamente seguras}}. Considere a possibilidade de {{PLURAL:$2|alterá-la|alterá-las}} manualmente.",
+       "config-install-updates": "Evitar executar atualizações desnecessárias",
+       "config-install-updates-failed": "<strong>Erro:</strong> A inserção de chaves de atualização nas tabelas falhou com o seguinte erro: $1",
        "config-install-sysop": "A criar a conta de administrador",
        "config-install-subscribe-fail": "Não foi possível subscrever a lista mediawiki-announce: $1",
        "config-install-subscribe-notpossible": "cURL não está instalado e <code>allow_url_fopen</code> não está disponível.",
index 833e7d6..d7e86be 100644 (file)
@@ -75,6 +75,7 @@
        "config-memory-bad": "Parameters:\n* $1 is the configured <code>memory_limit</code>.",
        "config-xcache": "Message indicates if this program is available",
        "config-apc": "Message indicates if this program is available",
+       "config-apcu": "Message indicates if this program is available",
        "config-wincache": "Message indicates if this program is available",
        "config-no-cache-apcu": "Status message in the MediaWiki installer environment checks.",
        "config-mod-security": "Status message in the MediaWiki installer environment checks.",
index 53b4c9e..1ae87d0 100644 (file)
@@ -21,7 +21,8 @@
                        "Striking Blue",
                        "Ильнар",
                        "Macofe",
-                       "StasR"
+                       "StasR",
+                       "Irus"
                ]
        },
        "config-desc": "Инсталлятор MediaWiki",
@@ -79,6 +80,7 @@
        "config-memory-bad": "'''Внимание:''' размер PHP <code>memory_limit</code> составляет $1.\nВероятно, этого слишком мало.\nУстановка может потерпеть неудачу!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] установлен",
        "config-apc": "[http://www.php.net/apc APC] установлен",
+       "config-apcu": "[http://www.php.net/apcu APCu] установлен",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] установлен",
        "config-no-cache-apcu": "'''Внимание:''' Не найдены [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] или [http://www.iis.net/download/WinCacheForPhp WinCache].\nКэширование объектов будет отключено.",
        "config-mod-security": "<strong>Внимание</strong>: На вашем веб-сервере включен [http://modsecurity.org/ mod_security]/mod_security2. Многие его стандартные настройки могут вызывать проблемы для MediaWiki или другого ПО, позволяющего пользователям отправлять на сервер произвольный контент.\nОбратитесь к [http://modsecurity.org/documentation/ документации mod_security] или в службу поддержки вашего хостинг-провайдера, если вы сталкиваетесь со случайными ошибками.",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki поддерживает следующие СУБД:\n\n$1\n\nЕсли вы не видите своей системы хранения данных в этом списке, следуйте инструкциям, на которые есть ссылка выше, чтобы получить поддержку.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] — основная база данных для MediaWiki, которая поддерживается лучше всего. MediaWiki также работает с [{{int:version-db-mariadb-url}} MariaDB] и [{{int:version-db-percona-url}} Percona Server], которые являются MySQL-совместимым. ([http://www.php.net/manual/ru/mysql.installation.php инструкция, как собрать PHP с поддержкой MySQL])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] — популярная открытая СУБД, альтернатива MySQL\nМогут встречаться небольшие неисправленные ошибки, не рекомендуется для использования в рабочей системе. ([http://www.php.net/manual/ru/pgsql.installation.php инструкция, как собрать PHP с поддержкой PostgreSQL]).",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] — популярная открытая СУБД, альтернатива MySQL. ([http://www.php.net/manual/ru/pgsql.installation.php инструкция, как собрать PHP с поддержкой PostgreSQL]).",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] — это легковесная система баз данных, имеющая очень хорошую поддержку. ([http://www.php.net/manual/ru/pdo.installation.php инструкция, как собрать PHP с поддержкой SQLite], работающей посредством PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] — это коммерческая база данных масштаба предприятия. ([http://www.php.net/manual/ru/oci8.installation.php Как собрать PHP с поддержкой OCI8])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] — это коммерческое база данных база данных для Windows масштаба предприятия. ([http://www.php.net/manual/ru/sqlsrv.installation.php Как собрать PHP с поддержкой SQLSRV])",
        "config-cache-options": "Параметры кэширования объектов:",
        "config-cache-help": "Кэширование объектов используется для повышения скорости MediaWiki путем кэширования часто используемых данных.\nДля средних и больших сайтов кеширование настоятельно рекомендуется включать, а для небольших сайтов кеширование может показать преимущество.",
        "config-cache-none": "Без кэширования (никакой функционал не теряется, но крупные вики-сайты могут работать медленнее)",
-       "config-cache-accel": "PHP кэширование объектов (APC, XCache или WinCache)",
+       "config-cache-accel": "Кэширование PHP-объектов (APC, APCu, XCache или WinCache)",
        "config-cache-memcached": "Использовать Memcached (требует дополнительной настройки)",
        "config-memcached-servers": "Сервера Memcached:",
        "config-memcached-help": "Список IP-адресов, используемых Memcached.\nПеречислите по одному адресу на строку с указанием портов. Например:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index 33fa590..21a3297 100644 (file)
@@ -2,11 +2,12 @@
        "@metadata": {
                "authors": [
                        "Sindhu",
-                       "Aursani"
+                       "Aursani",
+                       "Mehtab ahmed"
                ]
        },
        "config-information": "معلومات",
-       "config-localsettings-badkey": "توهان جي ڏنل ڪنجي غيردرست آهي.",
+       "config-localsettings-badkey": "توهان جي سنواري ڏنل ڪنجي غيردرست آهي.",
        "config-your-language": "توهان جي ٻولي:",
        "config-wiki-language": "وڪِي ٻولي:",
        "config-back": "پوئتي ←",
@@ -26,6 +27,5 @@
        "config-page-existingwiki": "موجوده وڪِي",
        "config-restart": "ها، وري کان شروع ڪريو",
        "config-env-php": "PHP $1 تنصيب ٿي چڪو",
-       "config-env-hhvm": "HHVM $1 تنصيب ٿي چڪو.",
-       "config-xml-bad": "PHP جو XML ماڊيول کٽل آهي. ذريعات‌وڪيءَ کي ان ماڊيول ۾  فنڪشنس گھربل آهن ۽ اها موجوده ترتيب يا ڪنفيگيوريشن ۾ ڪم نہ ڪندي. \nتوهان کي گھرجي تہ php-xml RPM پيڪيج تنصيب ڪريو."
+       "config-env-hhvm": "HHVM $1 تنصيب ٿي چڪو."
 }
index 41be1ac..d6ee081 100644 (file)
        "config-cc-again": "Izberi ponovno ...",
        "config-cc-not-chosen": "Izberite licenco Creative Commons, ki jo želite uporabiti, in kliknite »proceed«.",
        "config-advanced-settings": "Napredna konfiguracija",
-       "config-cache-accel": "Predpomnjenje predmetov PHP (APC, XCache ali WinCache)",
+       "config-cache-accel": "Predpomnjenje predmetov PHP (APC, APCu, XCache ali WinCache)",
        "config-cache-memcached": "Uporabi Memcached (zahteva dodatno namestitev in konfiguracijo)",
        "config-memcached-servers": "Strežniki Memcached:",
        "config-memcache-badip": "Vnesli ste neveljaven IP-naslov za Memcached: $1",
index 2c5b8ce..f434356 100644 (file)
@@ -52,7 +52,7 @@
        "config-type-oracle": "Oracle",
        "config-type-mssql": "Microsoft SQL Server",
        "config-header-mysql": "MySQL подешавања",
-       "config-header-mssql": "Поставке Microsoft SQL Server-а",
+       "config-header-mssql": "Подешавања Microsoft SQL Server-а",
        "config-invalid-db-type": "Неважећи тип базе података.",
        "config-mssql-old": "Потребан је Microsoft SQL Server $1 или новији. Ви имате $2.",
        "config-mysql-innodb": "InnoDB",
index 20c2877..e0c5408 100644 (file)
@@ -1,7 +1,8 @@
 {
        "@metadata": {
                "authors": [
-                       "Milicevic01"
+                       "Milicevic01",
+                       "Сербијана"
                ]
        },
        "config-session-error": "Greška pri započinjanju sesije: $1",
        "config-type-postgres": "PostgreSQL",
        "config-type-sqlite": "SQLite",
        "config-type-oracle": "Oracle",
+       "config-header-mssql": "Podešavanja Microsoft SQL Server-a",
        "config-site-name": "Ime vikija:",
+       "config-admin-email": "Imejl adresa:",
        "config-license-cc-0": "Creative Commons Zero (javno vlasništvo)",
+       "config-email-settings": "Podešavanja imejla",
        "config-skins": "Teme",
        "mainpagetext": "<strong>Medijaviki je uspešno instaliran.</strong>",
        "mainpagedocfooter": "Molimo vidite [https://meta.wikimedia.org/wiki/Help:Contents korisnički vodič] za informacije o upotrebi viki softvera.\n\n== Za početak ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Pomoć u vezi sa podešavanjima]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Najčešće postavljena pitanja]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Mejling lista o izdanjima MedijaVikija]"
index 20ebf9b..45c5a7d 100644 (file)
@@ -67,6 +67,7 @@
        "config-memory-bad": "''' Varning:''' PHP:s <code>memory_limit</code> är $1.\nDetta är förmodligen för lågt.\nInstallationen kan misslyckas!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] är installerat",
        "config-apc": "[http://www.php.net/apc APC] är installerat",
+       "config-apcu": "[http://www.php.net/apcu APCu] är installerat",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] är installerat",
        "config-no-cache-apcu": "'''Varning:''' Kunde inte hitta [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] eller [http://www.iis.net/download/WinCacheForPhp WinCache].\nCachelagring av objekt är inte aktiverat.",
        "config-mod-security": "'''Varning:''' Din webbserver har [http://modsecurity.org/ mod_security] aktiverat. Om felaktigt konfigurerat kan den skapa problem för MediaWiki eller annan programvara som tillåter användaren att posta godtyckligt innehåll.\nTitta på [http://modsecurity.org/documentation/ mod_security-dokumentationen] eller kontakta din värd om du påträffar slumpmässiga fel.",
        "config-cache-options": "Inställningar för cachelagring av objekt:",
        "config-cache-help": "Cachelagring av objekt används för att förbättra hastigheten på MediaWiki genom att cachelagra data som används ofta.\nMedelstora till stora webbplatser är starkt uppmuntrade att aktivera detta, och små webbplatser kommer även att se fördelar.",
        "config-cache-none": "Ingen cachelagring (ingen funktionalitet tas bort, men hastighet kan påverkas på större wiki-webbplatser)",
-       "config-cache-accel": "Cachelagring av PHP-objekt (APC, XCache eller WinCache)",
+       "config-cache-accel": "Cachelagring av PHP-objekt (APC, APCu, XCache eller WinCache)",
        "config-cache-memcached": "Använda Memcached (kräver ytterligare inställningar och konfiguration)",
        "config-memcached-servers": "Memcached-servrar:",
        "config-memcached-help": "Lista över IP-adresser som ska användas för Memcached.\nBör ange en per rad och specificera den port som ska användas. Till exempel:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index 5240f13..556b182 100644 (file)
@@ -70,6 +70,7 @@
        "config-memory-bad": "'''Увага:''' Розмір пам'яті PHP (<code>memory_limit</code>) становить $1.\nІмовірно, це замало.\nВстановлення може не вдатись!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] встановлено",
        "config-apc": "[http://www.php.net/apc APC] встановлено",
+       "config-apcu": "[http://www.php.net/apcu APCu] встановлено",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] встановлено",
        "config-no-cache-apcu": "<strong>Увага:</strong> Не вдалося знайти [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] чи [http://www.iis.net/download/WinCacheForPhp WinCache].\nКешування об'єктів не ввімкнено.",
        "config-mod-security": "'''Увага''': на Вашому веб-сервері увімкнено [http://modsecurity.org/ mod_security]. У разі неправильних налаштувать, він може викликати проблеми MediaWiki або іншого ПЗ, яке дозволяє користувачам надсилати довільний вміст.\nЗверніться до [http://modsecurity.org/documentation/ документації mod_security] або підтримки Вашого хостера, якщо під час роботи виникають незрозумілі помилки.",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki підтримує такі системи баз даних:\n\n$1\n\nЯкщо Ви не бачите серед перерахованих систему баз даних, яку використовуєте, виконайте вказівки, вказані вище, щоб увімкнути підтримку.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] є основною для MediaWiki і найкраще підтримується.  MediaWiki також працює із [{{int:version-db-mariadb-url}} MariaDB] та [{{int:version-db-percona-url}} Percona Server], які сумісні з MySQL.  ([http://www.php.net/manual/en/mysqli.installation.php як зібрати PHP з допомогою MySQL])",
-       "config-dbsupport-postgres": "*  [{{int:version-db-postgres-url}} PostgreSQL] — популярна відкрита СУБД, альтернатива MySQL. Можуть зустрічатись деякі невеликі невиправлені помилки, не рекомендується використовувати у робочій системі.([http://www.php.net/manual/en/pgsql.installation.php як зібрати PHP з допомогою PostgreSQL]).",
+       "config-dbsupport-postgres": "*  [{{int:version-db-postgres-url}} PostgreSQL] — популярна відкрита СУБД, альтернатива MySQL. ([http://www.php.net/manual/en/pgsql.installation.php як зібрати PHP з допомогою PostgreSQL]).",
        "config-dbsupport-sqlite": "*  [{{int:version-db-sqlite-url}} SQLite] — легка система баз даних, яка дуже добре підтримується. ([http://www.php.net/manual/en/pdo.installation.php Як зібрати PHP з допомогою SQLite], що використовує PDO)",
        "config-dbsupport-oracle": "*  [{{int:version-db-oracle-url}} Oracle] — комерційна база даних масштабу підприємства. ([http://www.php.net/manual/en/oci8.installation.php Як зібрати PHP з підтримкою OCI8])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] — це комерційна база даних для Windows масштабу підприємства. ([http://www.php.net/manual/ru/sqlsrv.installation.php Як зібрати PHP з підтримкою SQLSRV])",
        "config-cache-options": "Налаштування кешування об'єктів:",
        "config-cache-help": "Кешування об'єктів використовується для покращення швидкодії MediaWiki методом кешування часто використовуваних даних.\nЗаохочується увімкнення цієї можливості для середніх і великих сайтів, малі сайти також можуть відчути її перевагу.",
        "config-cache-none": "Без кешування (жодні функції не втрачаються, але впливає на швидкодію великих вікі-сайтів)",
-       "config-cache-accel": "PHP кешування об'єктів (APC, XCache чи WinCache)",
+       "config-cache-accel": "PHP кешування об'єктів (APC, APCu, XCache чи WinCache)",
        "config-cache-memcached": "Використовувати Memcached (вимагає додаткової установки і налаштування)",
        "config-memcached-servers": "Сервери Memcached:",
        "config-memcached-help": "Список IP-адрес, що викоритовує Memcached.\nВкажіть по одному в рядку, разом з портами. Наприклад:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index 365231c..0820ff5 100644 (file)
@@ -64,6 +64,7 @@
        "config-memory-bad": "<strong>Cảnh báo:</strong> <code>memory_limit</code> của PHP là $1.\nGiá trị này có lẽ quá thấp.\nCài đặt có thể bị thất bại!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] đã được cài đặt",
        "config-apc": "[http://www.php.net/apc APC] đã được cài đặt",
+       "config-apcu": "[http://www.php.net/apcu APCu] đã được cài đặt",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] đã được cài đặt",
        "config-no-cache-apcu": "<strong>Cảnh báo:</strong> Không tìm thấy [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache], hoặc [http://www.iis.net/download/WinCacheForPhp WinCache].\nVùng nhớ đệm đối tượng không được kích hoạt.",
        "config-mod-security": "<strong>Cảnh báo:</strong> [http://modsecurity.org/ mod_security]/mod_security2 đã được kích hoạt trên máy chủ Web của bạn. Nhiều cấu hình phổ biến của phần mềm này sẽ gây vấn đề cho MediaWiki và những phần mềm khác cho phép người dùng đăng các nội dung tùy tiện.\nNếu có thể, bạn nên vô hiệu nó. Còn không, tra cứu [http://modsecurity.org/documentation/ tài liệu mod_security] hoặc liên hệ với nhà cung cấp hỗ trợ cho máy chủ nếu bạn gặp những lỗi ngẫu nhiên nào đó.",
        "config-cache-options": "Thiết lập bộ nhớ đệm đối tượng:",
        "config-cache-help": "Lưu vào bộ nhớ đệm đối tượng được sử dụng để cải thiện tốc độ của MediaWiki bằng cách lưu vào bộ nhớ đệm những dữ liệu thường xuyên sử dụng.\nCác trang web từ trung bình cho đến các trang web lớn rất được khuyến khích kích hoạt tính năng này, và các trang web nhỏ cũng sẽ nhìn thấy lợi ích tương tự.",
        "config-cache-none": "Không lưu vào bộ nhớ đệm (không có chức năng nhiệm vụ sẽ được loại bỏ, nhưng tốc độ có thể bị ảnh hưởng trên các trang web wiki lớn hơn)",
-       "config-cache-accel": "Bộ nhớ đệm đối tượng PHP (APC, XCache, hoặc WinCache)",
+       "config-cache-accel": "Bộ nhớ đệm đối tượng PHP (APC, APCu, XCache, hoặc WinCache)",
        "config-cache-memcached": "Sử dụng Memcached (cần thiết lập và cấu hình thêm)",
        "config-memcached-servers": "Máy chủ Memcached:",
        "config-memcached-help": "Danh sách các địa chỉ IP để sử dụng cho Memcached .\nNên xác định trên một dòng và chỉ định các cổng được sử dụng. Ví dụ:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index d541696..5d99079 100644 (file)
@@ -80,6 +80,7 @@
        "config-memory-bad": "<strong>警告:</strong>PHP的内存使用上限<code>memory_limit</code>为$1。\n该设定可能过低,并导致安装失败!",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache]已安装",
        "config-apc": "[http://www.php.net/apc APC]已安装",
+       "config-apcu": "[http://www.php.net/apcu APCu]已安装",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache]已安装",
        "config-no-cache-apcu": "<strong>警告:</strong>找不到[http://www.php.net/apcu APCu]、[http://xcache.lighttpd.net/ XCache]或[http://www.iis.net/download/WinCacheForPhp WinCache]。\n对象缓存未启用。",
        "config-mod-security": "<strong>警告:</strong>您的web服务器已启用[http://modsecurity.org/ mod_security]/mod_security2。它的很多常见配置可能导致MediaWiki及其他软件允许用户发布任意内容的问题。如果可能,这应当被禁用。否则,当您遭遇随机错误时,请参考[http://modsecurity.org/documentation/ mod_security 文档]或联络您的主机支持。",
        "config-type-mssql": "微软SQL服务器",
        "config-support-info": "MediaWiki支持以下数据库系统:\n\n$1\n\n如果您在下面列出的数据库系统中没有找到您希望使用的系统,请根据上方链向的指引启用支持。",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL]是MediaWiki的首选数据库,对它的支持最为完备。MediaWiki也可以在[{{int:version-db-mariadb-url}} MariaDB]和[{{int:version-db-percona-url}} Percona Server]下工作,它们与MySQL兼容。([http://www.php.net/manual/en/mysql.installation.php 如何将对MySQL的支持编译进PHP中])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL]是一种流行的开源数据库系统,可作为MySQL的替代([http://www.php.net/manual/en/pgsql.installation.php 如何将对PostgreSQL的支持编译进PHP中])。本程序中可能依然存在一些小而明显的错误,因此并不建议在生产环境中使用该数据库系统。",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL]是一种流行的开源数据库系统,可作为MySQL的替代([http://www.php.net/manual/en/pgsql.installation.php 如何将对PostgreSQL的支持编译进PHP中])",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite]是一种轻量级的数据库系统,能被良好地支持。([http://www.php.net/manual/en/pdo.installation.php 如何将对SQLite的支持编译进PHP中],须使用PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle]是一种商用企业级的数据库。([http://www.php.net/manual/en/oci8.installation.php 如何将对OCI8的支持编译进PHP中])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server]是一个适用于Windows的商业性企业数据库。([http://www.php.net/manual/en/sqlsrv.installation.php 如何编译带有SQLSRV支持的PHP])",
        "config-cache-options": "对象缓存设置:",
        "config-cache-help": "对象缓存可通过缓存频繁使用的数据来提高MediaWiki的速度。高度推荐中到大型的网站启用该功能,小型网站亦能从其中受益。",
        "config-cache-none": "无缓存(不影响功能,但对较大型的wiki网站会有速度影响)",
-       "config-cache-accel": "PHP对象缓存(APC、XCache或WinCache)",
+       "config-cache-accel": "PHP对象缓存(APC、APCu、XCache或WinCache)",
        "config-cache-memcached": "使用Memcached(需要另外安装并配置)",
        "config-memcached-servers": "Memcached服务器:",
        "config-memcached-help": "用于Memcached的IP地址列表。请保持每行一条,并指定要使用的端口。例如:\n127.0.0.1:11211\n192.168.1.25:1234",
index ab21779..2f2e934 100644 (file)
        "config-cache-options": "物件快取設定:",
        "config-cache-help": "物件快取是用來增進 MediaWiki 速度的一項功能,透過快取經常使用的資料。\n中型到大型的網站我們會建議開啟這個選項,對小型的網站也有一定程度的效果。",
        "config-cache-none": "不快取 (不會影響功能,但在大型 Wiki 網站可能會有處理速度的問題)",
-       "config-cache-accel": "使用 PHP 物件快取 (APC、XCache 或 WinCache)",
+       "config-cache-accel": "使用 PHP 物件快取 (APC、APCu、XCache 或 WinCache)",
        "config-cache-memcached": "使用 Memcached (需要額外安裝與設定)",
        "config-memcached-servers": "Memcached 伺服器:",
        "config-memcached-help": "請列出 Memcached 伺服器的 IP 位址。\n每一行只指定一個位置並且要註明使用的埠號,例如:\n 127.0.0.1:11211\n 192.168.1.25:1234",
index bbd0ddb..f814cee 100644 (file)
@@ -301,7 +301,9 @@ abstract class Job implements IJobSpecification {
        }
 
        /**
-        * @param callable $callback
+        * @param callable $callback A function with one parameter, the success status, which will be
+        *   false if the job failed or it succeeded but the DB changes could not be committed or
+        *   any deferred updates threw an exception. (This parameter was added in 1.28.)
         * @since 1.27
         */
        protected function addTeardownCallback( $callback ) {
@@ -310,12 +312,12 @@ abstract class Job implements IJobSpecification {
 
        /**
         * Do any final cleanup after run(), deferred updates, and all DB commits happen
-        *
+        * @param bool $status Whether the job, its deferred updates, and DB commit all succeeded
         * @since 1.27
         */
-       public function teardown() {
+       public function teardown( $status ) {
                foreach ( $this->teardownCallbacks as $callback ) {
-                       call_user_func( $callback );
+                       call_user_func( $callback, $status );
                }
        }
 
index 50727a2..aa01768 100644 (file)
@@ -21,6 +21,7 @@
  * @author Aaron Schulz
  */
 use MediaWiki\MediaWikiServices;
+use Wikimedia\ScopedCallback;
 
 /**
  * Class to handle job queues stored in the DB
@@ -186,7 +187,8 @@ class JobQueueDB extends JobQueue {
                $dbw->onTransactionIdle(
                        function () use ( $dbw, $jobs, $flags, $method ) {
                                $this->doBatchPushInternal( $dbw, $jobs, $flags, $method );
-                       }
+                       },
+                       __METHOD__
                );
        }
 
@@ -494,15 +496,18 @@ class JobQueueDB extends JobQueue {
                // jobs to become no-ops without any actual jobs that made them redundant.
                $dbw = $this->getMasterDB();
                $cache = $this->dupCache;
-               $dbw->onTransactionIdle( function () use ( $cache, $params, $key, $dbw ) {
-                       $timestamp = $cache->get( $key ); // current last timestamp of this job
-                       if ( $timestamp && $timestamp >= $params['rootJobTimestamp'] ) {
-                               return true; // a newer version of this root job was enqueued
-                       }
+               $dbw->onTransactionIdle(
+                       function () use ( $cache, $params, $key, $dbw ) {
+                               $timestamp = $cache->get( $key ); // current last timestamp of this job
+                               if ( $timestamp && $timestamp >= $params['rootJobTimestamp'] ) {
+                                       return true; // a newer version of this root job was enqueued
+                               }
 
-                       // Update the timestamp of the last root job started at the location...
-                       return $cache->set( $key, $params['rootJobTimestamp'], JobQueueDB::ROOTJOB_TTL );
-               } );
+                               // Update the timestamp of the last root job started at the location...
+                               return $cache->set( $key, $params['rootJobTimestamp'], JobQueueDB::ROOTJOB_TTL );
+                       },
+                       __METHOD__
+               );
 
                return true;
        }
index de5f410..71d68d9 100644 (file)
@@ -120,6 +120,8 @@ class JobQueueGroup {
         * @return void
         */
        public function push( $jobs ) {
+               global $wgJobTypesExcludedFromDefaultQueue;
+
                $jobs = is_array( $jobs ) ? $jobs : [ $jobs ];
                if ( !count( $jobs ) ) {
                        return;
@@ -149,7 +151,7 @@ class JobQueueGroup {
                        'true',
                        15
                );
-               if ( array_intersect( array_keys( $jobsByType ), $this->getDefaultQueueTypes() ) ) {
+               if ( array_diff( array_keys( $jobsByType ), $wgJobTypesExcludedFromDefaultQueue ) ) {
                        $cache->set(
                                $cache->makeGlobalKey( 'jobqueue', $this->wiki, 'hasjobs', self::TYPE_DEFAULT ),
                                'true',
index a356e84..25a271c 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @author Aaron Schulz
  */
+use Psr\Log\LoggerInterface;
 
 /**
  * Class to handle job queues stored in Redis
@@ -66,6 +67,8 @@
 class JobQueueRedis extends JobQueue {
        /** @var RedisConnectionPool */
        protected $redisPool;
+       /** @var LoggerInterface */
+       protected $logger;
 
        /** @var string Server address */
        protected $server;
@@ -96,6 +99,7 @@ class JobQueueRedis extends JobQueue {
                                "Non-daemonized mode is no longer supported. Please install the " .
                                "mediawiki/services/jobrunner service and update \$wgJobTypeConf as needed." );
                }
+               $this->logger = \MediaWiki\Logger\LoggerFactory::getInstance( 'redis' );
        }
 
        protected function supportedOrders() {
@@ -250,6 +254,7 @@ class JobQueueRedis extends JobQueue {
                        $args[] = (string)$this->serialize( $item );
                }
                static $script =
+               /** @lang Lua */
 <<<LUA
                local kUnclaimed, kSha1ById, kIdBySha1, kDelayed, kData, kQwJobs = unpack(KEYS)
                -- First argument is the queue ID
@@ -339,6 +344,7 @@ LUA;
         */
        protected function popAndAcquireBlob( RedisConnRef $conn ) {
                static $script =
+               /** @lang Lua */
 <<<LUA
                local kUnclaimed, kSha1ById, kIdBySha1, kClaimed, kAttempts, kData = unpack(KEYS)
                local rTime = unpack(ARGV)
@@ -386,6 +392,7 @@ LUA;
                $conn = $this->getConnection();
                try {
                        static $script =
+                       /** @lang Lua */
 <<<LUA
                        local kClaimed, kAttempts, kData = unpack(KEYS)
                        local id = unpack(ARGV)
@@ -745,7 +752,7 @@ LUA;
         * @throws JobQueueConnectionError
         */
        protected function getConnection() {
-               $conn = $this->redisPool->getConnection( $this->server );
+               $conn = $this->redisPool->getConnection( $this->server, $this->logger );
                if ( !$conn ) {
                        throw new JobQueueConnectionError(
                                "Unable to connect to redis server {$this->server}." );
index ed3aa9a..0469eeb 100644 (file)
@@ -26,6 +26,7 @@ use MediaWiki\Logger\LoggerFactory;
 use Liuggio\StatsdClient\Factory\StatsdDataFactory;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
+use Wikimedia\ScopedCallback;
 
 /**
  * Job queue runner utility methods
@@ -283,7 +284,7 @@ class JobRunner implements LoggerAwareInterface {
                }
                // Always attempt to call teardown() even if Job throws exception.
                try {
-                       $job->teardown();
+                       $job->teardown( $status );
                } catch ( Exception $e ) {
                        MWExceptionHandler::logException( $e );
                }
index 906a48e..6ae8837 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @author Aaron Schulz
  */
+use Psr\Log\LoggerInterface;
 
 /**
  * Class to handle tracking information about all queues using PhpRedis
@@ -33,6 +34,8 @@
 class JobQueueAggregatorRedis extends JobQueueAggregator {
        /** @var RedisConnectionPool */
        protected $redisPool;
+       /** @var LoggerInterface */
+       protected $logger;
        /** @var array List of Redis server addresses */
        protected $servers;
 
@@ -52,6 +55,7 @@ class JobQueueAggregatorRedis extends JobQueueAggregator {
                        : [ $params['redisServer'] ]; // b/c
                $params['redisConfig']['serializer'] = 'none';
                $this->redisPool = RedisConnectionPool::singleton( $params['redisConfig'] );
+               $this->logger = \MediaWiki\Logger\LoggerFactory::getInstance( 'redis' );
        }
 
        protected function doNotifyQueueEmpty( $wiki, $type ) {
@@ -104,7 +108,7 @@ class JobQueueAggregatorRedis extends JobQueueAggregator {
        protected function getConnection() {
                $conn = false;
                foreach ( $this->servers as $server ) {
-                       $conn = $this->redisPool->getConnection( $server );
+                       $conn = $this->redisPool->getConnection( $server, $this->logger );
                        if ( $conn ) {
                                break;
                        }
index 060cabb..e2914be 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Upload
  */
+use Wikimedia\ScopedCallback;
 
 /**
  * Assemble the segments of a chunked upload.
index 78531dc..37e80c2 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup Upload
  * @ingroup JobQueue
  */
+use Wikimedia\ScopedCallback;
 
 /**
  * Upload a file from the upload stash into the local file repo.
index 809fb63..0e90674 100644 (file)
@@ -19,6 +19,7 @@
  * @author Aaron Schulz
  * @ingroup JobQueue
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Job for pruning recent changes
@@ -81,7 +82,7 @@ class RecentChangesUpdateJob extends Job {
                        return; // already in progress
                }
 
-               $factory = wfGetLBFactory();
+               $factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
                $ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
                $cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
                do {
@@ -119,109 +120,112 @@ class RecentChangesUpdateJob extends Job {
                $dbw = wfGetDB( DB_MASTER );
                // JobRunner uses DBO_TRX, but doesn't call begin/commit itself;
                // onTransactionIdle() will run immediately since there is no trx.
-               $dbw->onTransactionIdle( function() use ( $dbw, $days, $window ) {
-                       $factory = wfGetLBFactory();
-                       $ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
-                       // Avoid disconnect/ping() cycle that makes locks fall off
-                       $dbw->setSessionOptions( [ 'connTimeout' => 900 ] );
-
-                       $lockKey = wfWikiID() . '-activeusers';
-                       if ( !$dbw->lock( $lockKey, __METHOD__, 1 ) ) {
-                               return; // exclusive update (avoids duplicate entries)
-                       }
-
-                       $nowUnix = time();
-                       // Get the last-updated timestamp for the cache
-                       $cTime = $dbw->selectField( 'querycache_info',
-                               'qci_timestamp',
-                               [ 'qci_type' => 'activeusers' ]
-                       );
-                       $cTimeUnix = $cTime ? wfTimestamp( TS_UNIX, $cTime ) : 1;
-
-                       // Pick the date range to fetch from. This is normally from the last
-                       // update to till the present time, but has a limited window for sanity.
-                       // If the window is limited, multiple runs are need to fully populate it.
-                       $sTimestamp = max( $cTimeUnix, $nowUnix - $days * 86400 );
-                       $eTimestamp = min( $sTimestamp + $window, $nowUnix );
-
-                       // Get all the users active since the last update
-                       $res = $dbw->select(
-                               [ 'recentchanges' ],
-                               [ 'rc_user_text', 'lastedittime' => 'MAX(rc_timestamp)' ],
-                               [
-                                       'rc_user > 0', // actual accounts
-                                       'rc_type != ' . $dbw->addQuotes( RC_EXTERNAL ), // no wikidata
-                                       'rc_log_type IS NULL OR rc_log_type != ' . $dbw->addQuotes( 'newusers' ),
-                                       'rc_timestamp >= ' . $dbw->addQuotes( $dbw->timestamp( $sTimestamp ) ),
-                                       'rc_timestamp <= ' . $dbw->addQuotes( $dbw->timestamp( $eTimestamp ) )
-                               ],
-                               __METHOD__,
-                               [
-                                       'GROUP BY' => [ 'rc_user_text' ],
-                                       'ORDER BY' => 'NULL' // avoid filesort
-                               ]
-                       );
-                       $names = [];
-                       foreach ( $res as $row ) {
-                               $names[$row->rc_user_text] = $row->lastedittime;
-                       }
-
-                       // Rotate out users that have not edited in too long (according to old data set)
-                       $dbw->delete( 'querycachetwo',
-                               [
-                                       'qcc_type' => 'activeusers',
-                                       'qcc_value < ' . $dbw->addQuotes( $nowUnix - $days * 86400 ) // TS_UNIX
-                               ],
-                               __METHOD__
-                       );
+               $dbw->onTransactionIdle(
+                       function () use ( $dbw, $days, $window ) {
+                               $factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+                               $ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
+                               // Avoid disconnect/ping() cycle that makes locks fall off
+                               $dbw->setSessionOptions( [ 'connTimeout' => 900 ] );
+
+                               $lockKey = wfWikiID() . '-activeusers';
+                               if ( !$dbw->lock( $lockKey, __METHOD__, 1 ) ) {
+                                       return; // exclusive update (avoids duplicate entries)
+                               }
 
-                       // Find which of the recently active users are already accounted for
-                       if ( count( $names ) ) {
-                               $res = $dbw->select( 'querycachetwo',
-                                       [ 'user_name' => 'qcc_title' ],
+                               $nowUnix = time();
+                               // Get the last-updated timestamp for the cache
+                               $cTime = $dbw->selectField( 'querycache_info',
+                                       'qci_timestamp',
+                                       [ 'qci_type' => 'activeusers' ]
+                               );
+                               $cTimeUnix = $cTime ? wfTimestamp( TS_UNIX, $cTime ) : 1;
+
+                               // Pick the date range to fetch from. This is normally from the last
+                               // update to till the present time, but has a limited window for sanity.
+                               // If the window is limited, multiple runs are need to fully populate it.
+                               $sTimestamp = max( $cTimeUnix, $nowUnix - $days * 86400 );
+                               $eTimestamp = min( $sTimestamp + $window, $nowUnix );
+
+                               // Get all the users active since the last update
+                               $res = $dbw->select(
+                                       [ 'recentchanges' ],
+                                       [ 'rc_user_text', 'lastedittime' => 'MAX(rc_timestamp)' ],
                                        [
-                                               'qcc_type' => 'activeusers',
-                                               'qcc_namespace' => NS_USER,
-                                               'qcc_title' => array_keys( $names ) ],
-                                       __METHOD__
+                                               'rc_user > 0', // actual accounts
+                                               'rc_type != ' . $dbw->addQuotes( RC_EXTERNAL ), // no wikidata
+                                               'rc_log_type IS NULL OR rc_log_type != ' . $dbw->addQuotes( 'newusers' ),
+                                               'rc_timestamp >= ' . $dbw->addQuotes( $dbw->timestamp( $sTimestamp ) ),
+                                               'rc_timestamp <= ' . $dbw->addQuotes( $dbw->timestamp( $eTimestamp ) )
+                                       ],
+                                       __METHOD__,
+                                       [
+                                               'GROUP BY' => [ 'rc_user_text' ],
+                                               'ORDER BY' => 'NULL' // avoid filesort
+                                       ]
                                );
+                               $names = [];
                                foreach ( $res as $row ) {
-                                       unset( $names[$row->user_name] );
+                                       $names[$row->rc_user_text] = $row->lastedittime;
                                }
-                       }
 
-                       // Insert the users that need to be added to the list
-                       if ( count( $names ) ) {
-                               $newRows = [];
-                               foreach ( $names as $name => $lastEditTime ) {
-                                       $newRows[] = [
+                               // Rotate out users that have not edited in too long (according to old data set)
+                               $dbw->delete( 'querycachetwo',
+                                       [
                                                'qcc_type' => 'activeusers',
-                                               'qcc_namespace' => NS_USER,
-                                               'qcc_title' => $name,
-                                               'qcc_value' => wfTimestamp( TS_UNIX, $lastEditTime ),
-                                               'qcc_namespacetwo' => 0, // unused
-                                               'qcc_titletwo' => '' // unused
-                                       ];
+                                               'qcc_value < ' . $dbw->addQuotes( $nowUnix - $days * 86400 ) // TS_UNIX
+                                       ],
+                                       __METHOD__
+                               );
+
+                               // Find which of the recently active users are already accounted for
+                               if ( count( $names ) ) {
+                                       $res = $dbw->select( 'querycachetwo',
+                                               [ 'user_name' => 'qcc_title' ],
+                                               [
+                                                       'qcc_type' => 'activeusers',
+                                                       'qcc_namespace' => NS_USER,
+                                                       'qcc_title' => array_keys( $names ) ],
+                                               __METHOD__
+                                       );
+                                       foreach ( $res as $row ) {
+                                               unset( $names[$row->user_name] );
+                                       }
                                }
-                               foreach ( array_chunk( $newRows, 500 ) as $rowBatch ) {
-                                       $dbw->insert( 'querycachetwo', $rowBatch, __METHOD__ );
-                                       $factory->commitAndWaitForReplication( __METHOD__, $ticket );
+
+                               // Insert the users that need to be added to the list
+                               if ( count( $names ) ) {
+                                       $newRows = [];
+                                       foreach ( $names as $name => $lastEditTime ) {
+                                               $newRows[] = [
+                                                       'qcc_type' => 'activeusers',
+                                                       'qcc_namespace' => NS_USER,
+                                                       'qcc_title' => $name,
+                                                       'qcc_value' => wfTimestamp( TS_UNIX, $lastEditTime ),
+                                                       'qcc_namespacetwo' => 0, // unused
+                                                       'qcc_titletwo' => '' // unused
+                                               ];
+                                       }
+                                       foreach ( array_chunk( $newRows, 500 ) as $rowBatch ) {
+                                               $dbw->insert( 'querycachetwo', $rowBatch, __METHOD__ );
+                                               $factory->commitAndWaitForReplication( __METHOD__, $ticket );
+                                       }
                                }
-                       }
 
-                       // If a transaction was already started, it might have an old
-                       // snapshot, so kludge the timestamp range back as needed.
-                       $asOfTimestamp = min( $eTimestamp, (int)$dbw->trxTimestamp() );
+                               // If a transaction was already started, it might have an old
+                               // snapshot, so kludge the timestamp range back as needed.
+                               $asOfTimestamp = min( $eTimestamp, (int)$dbw->trxTimestamp() );
 
-                       // Touch the data freshness timestamp
-                       $dbw->replace( 'querycache_info',
-                               [ 'qci_type' ],
-                               [ 'qci_type' => 'activeusers',
-                                       'qci_timestamp' => $dbw->timestamp( $asOfTimestamp ) ], // not always $now
-                               __METHOD__
-                       );
+                               // Touch the data freshness timestamp
+                               $dbw->replace( 'querycache_info',
+                                       [ 'qci_type' ],
+                                       [ 'qci_type' => 'activeusers',
+                                               'qci_timestamp' => $dbw->timestamp( $asOfTimestamp ) ], // not always $now
+                                       __METHOD__
+                               );
 
-                       $dbw->unlock( $lockKey, __METHOD__ );
-               } );
+                               $dbw->unlock( $lockKey, __METHOD__ );
+                       },
+                       __METHOD__
+               );
        }
 }
index 5eafcb3..d76d866 100644 (file)
@@ -36,42 +36,45 @@ class PurgeJobUtils {
                        return;
                }
 
-               $dbw->onTransactionIdle( function() use ( $dbw, $namespace, $dbkeys ) {
-                       $services = MediaWikiServices::getInstance();
-                       $lbFactory = $services->getDBLoadBalancerFactory();
-                       // Determine which pages need to be updated.
-                       // This is necessary to prevent the job queue from smashing the DB with
-                       // large numbers of concurrent invalidations of the same page.
-                       $now = $dbw->timestamp();
-                       $ids = $dbw->selectFieldValues(
-                               'page',
-                               'page_id',
-                               [
-                                       'page_namespace' => $namespace,
-                                       'page_title' => $dbkeys,
-                                       'page_touched < ' . $dbw->addQuotes( $now )
-                               ],
-                               __METHOD__
-                       );
-
-                       if ( !$ids ) {
-                               return;
-                       }
-
-                       $batchSize = $services->getMainConfig()->get( 'UpdateRowsPerQuery' );
-                       $ticket = $lbFactory->getEmptyTransactionTicket( __METHOD__ );
-                       foreach ( array_chunk( $ids, $batchSize ) as $idBatch ) {
-                               $dbw->update(
+               $dbw->onTransactionIdle(
+                       function () use ( $dbw, $namespace, $dbkeys ) {
+                               $services = MediaWikiServices::getInstance();
+                               $lbFactory = $services->getDBLoadBalancerFactory();
+                               // Determine which pages need to be updated.
+                               // This is necessary to prevent the job queue from smashing the DB with
+                               // large numbers of concurrent invalidations of the same page.
+                               $now = $dbw->timestamp();
+                               $ids = $dbw->selectFieldValues(
                                        'page',
-                                       [ 'page_touched' => $now ],
+                                       'page_id',
                                        [
-                                               'page_id' => $idBatch,
-                                               'page_touched < ' . $dbw->addQuotes( $now ) // handle races
+                                               'page_namespace' => $namespace,
+                                               'page_title' => $dbkeys,
+                                               'page_touched < ' . $dbw->addQuotes( $now )
                                        ],
                                        __METHOD__
                                );
-                               $lbFactory->commitAndWaitForReplication( __METHOD__, $ticket );
-                       }
-               } );
+
+                               if ( !$ids ) {
+                                       return;
+                               }
+
+                               $batchSize = $services->getMainConfig()->get( 'UpdateRowsPerQuery' );
+                               $ticket = $lbFactory->getEmptyTransactionTicket( __METHOD__ );
+                               foreach ( array_chunk( $ids, $batchSize ) as $idBatch ) {
+                                       $dbw->update(
+                                               'page',
+                                               [ 'page_touched' => $now ],
+                                               [
+                                                       'page_id' => $idBatch,
+                                                       'page_touched < ' . $dbw->addQuotes( $now ) // handle races
+                                               ],
+                                               __METHOD__
+                                       );
+                                       $lbFactory->commitAndWaitForReplication( __METHOD__, $ticket );
+                               }
+                       },
+                       __METHOD__
+               );
        }
 }
diff --git a/includes/libs/CryptHKDF.php b/includes/libs/CryptHKDF.php
new file mode 100644 (file)
index 0000000..4c86757
--- /dev/null
@@ -0,0 +1,282 @@
+<?php
+/**
+ * Extract-and-Expand Key Derivation Function (HKDF). A cryptographicly
+ * secure key expansion function based on RFC 5869.
+ *
+ * This relies on the secrecy of $wgSecretKey (by default), or $wgHKDFSecret.
+ * By default, sha256 is used as the underlying hashing algorithm, but any other
+ * algorithm can be used. Finding the secret key from the output would require
+ * an attacker to discover the input key (the PRK) to the hmac that generated
+ * the output, and discover the particular data, hmac'ed with an evolving key
+ * (salt), to produce the PRK. Even with md5, no publicly known attacks make
+ * this currently feasible.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @author Chris Steipp
+ * @file
+ */
+
+class CryptHKDF {
+
+       /**
+        * @var BagOStuff The persistent cache
+        */
+       protected $cache = null;
+
+       /**
+        * @var string Cache key we'll use for our salt
+        */
+       protected $cacheKey = null;
+
+       /**
+        * @var string The hash algorithm being used
+        */
+       protected $algorithm = null;
+
+       /**
+        * @var string binary string, the salt for the HKDF
+        * @see getSaltUsingCache
+        */
+       protected $salt = '';
+
+       /**
+        * @var string The pseudorandom key
+        */
+       private $prk = '';
+
+       /**
+        * The secret key material. This must be kept secret to preserve
+        * the security properties of this RNG.
+        *
+        * @var string
+        */
+       private $skm;
+
+       /**
+        * @var string The last block (K(i)) of the most recent expanded key
+        */
+       protected $lastK;
+
+       /**
+        * a "context information" string CTXinfo (which may be null)
+        * See http://eprint.iacr.org/2010/264.pdf Section 4.1
+        *
+        * @var array
+        */
+       protected $context = [];
+
+       /**
+        * Round count is computed based on the hash'es output length,
+        * which neither php nor openssl seem to provide easily.
+        *
+        * @var int[]
+        */
+       public static $hashLength = [
+               'md5' => 16,
+               'sha1' => 20,
+               'sha224' => 28,
+               'sha256' => 32,
+               'sha384' => 48,
+               'sha512' => 64,
+               'ripemd128' => 16,
+               'ripemd160' => 20,
+               'ripemd256' => 32,
+               'ripemd320' => 40,
+               'whirlpool' => 64,
+       ];
+
+       /**
+        * @var CryptRand
+        */
+       private $cryptRand;
+
+       /**
+        * @param string $secretKeyMaterial
+        * @param string $algorithm Name of hashing algorithm
+        * @param BagOStuff $cache
+        * @param string|array $context Context to mix into HKDF context
+        * @param CryptRand $cryptRand
+        * @throws InvalidArgumentException if secret key material is too short
+        */
+       public function __construct( $secretKeyMaterial, $algorithm, BagOStuff $cache, $context,
+               CryptRand $cryptRand
+       ) {
+               if ( strlen( $secretKeyMaterial ) < 16 ) {
+                       throw new InvalidArgumentException( "secret was too short." );
+               }
+               $this->skm = $secretKeyMaterial;
+               $this->algorithm = $algorithm;
+               $this->cache = $cache;
+               $this->context = is_array( $context ) ? $context : [ $context ];
+               $this->cryptRand = $cryptRand;
+
+               // To prevent every call from hitting the same memcache server, pick
+               // from a set of keys to use. mt_rand is only use to pick a random
+               // server, and does not affect the security of the process.
+               $this->cacheKey = $cache->makeKey( 'HKDF', mt_rand( 0, 16 ) );
+       }
+
+       /**
+        * Save the last block generated, so the next user will compute a different PRK
+        * from the same SKM. This should keep things unpredictable even if an attacker
+        * is able to influence CTXinfo.
+        */
+       function __destruct() {
+               if ( $this->lastK ) {
+                       $this->cache->set( $this->cacheKey, $this->lastK );
+               }
+       }
+
+       /**
+        * MW specific salt, cached from last run
+        * @return string Binary string
+        */
+       protected function getSaltUsingCache() {
+               if ( $this->salt == '' ) {
+                       $lastSalt = $this->cache->get( $this->cacheKey );
+                       if ( $lastSalt === false ) {
+                               // If we don't have a previous value to use as our salt, we use
+                               // 16 bytes from CryptRand, which will use a small amount of
+                               // entropy from our pool. Note, "XTR may be deterministic or keyed
+                               // via an optional “salt value”  (i.e., a non-secret random
+                               // value)..." - http://eprint.iacr.org/2010/264.pdf. However, we
+                               // use a strongly random value since we can.
+                               $lastSalt = $this->cryptRand->generate( 16 );
+                       }
+                       // Get a binary string that is hashLen long
+                       $this->salt = hash( $this->algorithm, $lastSalt, true );
+               }
+               return $this->salt;
+       }
+
+       /**
+        * Produce $bytes of secure random data. As a side-effect,
+        * $this->lastK is set to the last hashLen block of key material.
+        *
+        * @param int $bytes Number of bytes of data
+        * @param string $context Context to mix into CTXinfo
+        * @return string Binary string of length $bytes
+        */
+       public function generate( $bytes, $context = '' ) {
+               if ( $this->prk === '' ) {
+                       $salt = $this->getSaltUsingCache();
+                       $this->prk = self::HKDFExtract(
+                               $this->algorithm,
+                               $salt,
+                               $this->skm
+                       );
+               }
+
+               $CTXinfo = implode( ':', array_merge( $this->context, [ $context ] ) );
+
+               return self::HKDFExpand(
+                       $this->algorithm,
+                       $this->prk,
+                       $CTXinfo,
+                       $bytes,
+                       $this->lastK
+               );
+       }
+
+       /**
+        * RFC5869 defines HKDF in 2 steps, extraction and expansion.
+        * From http://eprint.iacr.org/2010/264.pdf:
+        *
+        * The scheme HKDF is specifed as:
+        *      HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t)
+        * where the values K(i) are defined as follows:
+        *      PRK = HMAC(XTS, SKM)
+        *      K(1) = HMAC(PRK, CTXinfo || 0);
+        *      K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t;
+        * where t = [L/k] and the value K(t) is truncated to its first d = L mod k bits;
+        * the counter i is non-wrapping and of a given fixed size, e.g., a single byte.
+        * Note that the length of the HMAC output is the same as its key length and therefore
+        * the scheme is well defined.
+        *
+        * XTS is the "extractor salt"
+        * SKM is the "secret keying material"
+        *
+        * N.B. http://eprint.iacr.org/2010/264.pdf seems to differ from RFC 5869 in that the test
+        * vectors from RFC 5869 only work if K(0) = '' and K(1) = HMAC(PRK, K(0) || CTXinfo || 1)
+        *
+        * @param string $hash The hashing function to use (e.g., sha256)
+        * @param string $ikm The input keying material
+        * @param string $salt The salt to add to the ikm, to get the prk
+        * @param string $info Optional context (change the output without affecting
+        *      the randomness properties of the output)
+        * @param int $L Number of bytes to return
+        * @return string Cryptographically secure pseudorandom binary string
+        */
+       public static function HKDF( $hash, $ikm, $salt, $info, $L ) {
+               $prk = self::HKDFExtract( $hash, $salt, $ikm );
+               $okm = self::HKDFExpand( $hash, $prk, $info, $L );
+               return $okm;
+       }
+
+       /**
+        * Extract the PRK, PRK = HMAC(XTS, SKM)
+        * Note that the hmac is keyed with XTS (the salt),
+        * and the SKM (source key material) is the "data".
+        *
+        * @param string $hash The hashing function to use (e.g., sha256)
+        * @param string $salt The salt to add to the ikm, to get the prk
+        * @param string $ikm The input keying material
+        * @return string Binary string (pseudorandm key) used as input to HKDFExpand
+        */
+       private static function HKDFExtract( $hash, $salt, $ikm ) {
+               return hash_hmac( $hash, $ikm, $salt, true );
+       }
+
+       /**
+        * Expand the key with the given context
+        *
+        * @param string $hash Hashing Algorithm
+        * @param string $prk A pseudorandom key of at least HashLen octets
+        *    (usually, the output from the extract step)
+        * @param string $info Optional context and application specific information
+        *    (can be a zero-length string)
+        * @param int $bytes Length of output keying material in bytes
+        *    (<= 255*HashLen)
+        * @param string &$lastK Set by this function to the last block of the expansion.
+        *    In MediaWiki, this is used to seed future Extractions.
+        * @return string Cryptographically secure random string $bytes long
+        * @throws InvalidArgumentException
+        */
+       private static function HKDFExpand( $hash, $prk, $info, $bytes, &$lastK = '' ) {
+               $hashLen = self::$hashLength[$hash];
+               $rounds = ceil( $bytes / $hashLen );
+               $output = '';
+
+               if ( $bytes > 255 * $hashLen ) {
+                       throw new InvalidArgumentException( 'Too many bytes requested from HDKFExpand' );
+               }
+
+               // K(1) = HMAC(PRK, CTXinfo || 1);
+               // K(i) = HMAC(PRK, K(i-1) || CTXinfo || i); 1 < i <= t;
+               for ( $counter = 1; $counter <= $rounds; ++$counter ) {
+                       $lastK = hash_hmac(
+                               $hash,
+                               $lastK . $info . chr( $counter ),
+                               $prk,
+                               true
+                       );
+                       $output .= $lastK;
+               }
+
+               return substr( $output, 0, $bytes );
+       }
+}
diff --git a/includes/libs/CryptRand.php b/includes/libs/CryptRand.php
new file mode 100644 (file)
index 0000000..6d18c81
--- /dev/null
@@ -0,0 +1,389 @@
+<?php
+/**
+ * A cryptographic random generator class used for generating secret keys
+ *
+ * This is based in part on Drupal code as well as what we used in our own code
+ * prior to introduction of this class.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @author Daniel Friesen
+ * @file
+ */
+use Psr\Log\LoggerInterface;
+
+class CryptRand {
+       /**
+        * Minimum number of iterations we want to make in our drift calculations.
+        */
+       const MIN_ITERATIONS = 1000;
+
+       /**
+        * Number of milliseconds we want to spend generating each separate byte
+        * of the final generated bytes.
+        * This is used in combination with the hash length to determine the duration
+        * we should spend doing drift calculations.
+        */
+       const MSEC_PER_BYTE = 0.5;
+
+       /**
+        * A boolean indicating whether the previous random generation was done using
+        * cryptographically strong random number generator or not.
+        */
+       protected $strong = null;
+
+       /**
+        * List of functions to call to generate some random state
+        *
+        * @var callable[]
+        */
+       protected $randomFuncs = [];
+
+       /**
+        * List of files to generate some random state from
+        *
+        * @var string[]
+        */
+       protected $randomFiles = [];
+
+       /**
+        * @var LoggerInterface
+        */
+       protected $logger;
+
+       public function __construct( array $randomFuncs, array $randomFiles, LoggerInterface $logger ) {
+               $this->randomFuncs = $randomFuncs;
+               $this->randomFiles = $randomFiles;
+               $this->logger = $logger;
+       }
+
+       /**
+        * Initialize an initial random state based off of whatever we can find
+        * @return string
+        */
+       protected function initialRandomState() {
+               // $_SERVER contains a variety of unstable user and system specific information
+               // It'll vary a little with each page, and vary even more with separate users
+               // It'll also vary slightly across different machines
+               $state = serialize( $_SERVER );
+
+               // Try to gather a little entropy from the different php rand sources
+               $state .= rand() . uniqid( mt_rand(), true );
+
+               // Include some information about the filesystem's current state in the random state
+               $files = $this->randomFiles;
+
+               // We know this file is here so grab some info about ourselves
+               $files[] = __FILE__;
+
+               // We must also have a parent folder, and with the usual file structure, a grandparent
+               $files[] = __DIR__;
+               $files[] = dirname( __DIR__ );
+
+               foreach ( $files as $file ) {
+                       MediaWiki\suppressWarnings();
+                       $stat = stat( $file );
+                       MediaWiki\restoreWarnings();
+                       if ( $stat ) {
+                               // stat() duplicates data into numeric and string keys so kill off all the numeric ones
+                               foreach ( $stat as $k => $v ) {
+                                       if ( is_numeric( $k ) ) {
+                                               unset( $k );
+                                       }
+                               }
+                               // The absolute filename itself will differ from install to install so don't leave it out
+                               $path = realpath( $file );
+                               if ( $path !== false ) {
+                                       $state .= $path;
+                               } else {
+                                       $state .= $file;
+                               }
+                               $state .= implode( '', $stat );
+                       } else {
+                               // The fact that the file isn't there is worth at least a
+                               // minuscule amount of entropy.
+                               $state .= '0';
+                       }
+               }
+
+               // Try and make this a little more unstable by including the varying process
+               // id of the php process we are running inside of if we are able to access it
+               if ( function_exists( 'getmypid' ) ) {
+                       $state .= getmypid();
+               }
+
+               // If available try to increase the instability of the data by throwing in
+               // the precise amount of memory that we happen to be using at the moment.
+               if ( function_exists( 'memory_get_usage' ) ) {
+                       $state .= memory_get_usage( true );
+               }
+
+               foreach ( $this->randomFuncs as $randomFunc ) {
+                       $state .= call_user_func( $randomFunc );
+               }
+
+               return $state;
+       }
+
+       /**
+        * Randomly hash data while mixing in clock drift data for randomness
+        *
+        * @param string $data The data to randomly hash.
+        * @return string The hashed bytes
+        * @author Tim Starling
+        */
+       protected function driftHash( $data ) {
+               // Minimum number of iterations (to avoid slow operations causing the
+               // loop to gather little entropy)
+               $minIterations = self::MIN_ITERATIONS;
+               // Duration of time to spend doing calculations (in seconds)
+               $duration = ( self::MSEC_PER_BYTE / 1000 ) * MWCryptHash::hashLength();
+               // Create a buffer to use to trigger memory operations
+               $bufLength = 10000000;
+               $buffer = str_repeat( ' ', $bufLength );
+               $bufPos = 0;
+
+               // Iterate for $duration seconds or at least $minIterations number of iterations
+               $iterations = 0;
+               $startTime = microtime( true );
+               $currentTime = $startTime;
+               while ( $iterations < $minIterations || $currentTime - $startTime < $duration ) {
+                       // Trigger some memory writing to trigger some bus activity
+                       // This may create variance in the time between iterations
+                       $bufPos = ( $bufPos + 13 ) % $bufLength;
+                       $buffer[$bufPos] = ' ';
+                       // Add the drift between this iteration and the last in as entropy
+                       $nextTime = microtime( true );
+                       $delta = (int)( ( $nextTime - $currentTime ) * 1000000 );
+                       $data .= $delta;
+                       // Every 100 iterations hash the data and entropy
+                       if ( $iterations % 100 === 0 ) {
+                               $data = sha1( $data );
+                       }
+                       $currentTime = $nextTime;
+                       $iterations++;
+               }
+               $timeTaken = $currentTime - $startTime;
+               $data = MWCryptHash::hash( $data );
+
+               $this->logger->debug( "Clock drift calculation " .
+                       "(time-taken=" . ( $timeTaken * 1000 ) . "ms, " .
+                       "iterations=$iterations, " .
+                       "time-per-iteration=" . ( $timeTaken / $iterations * 1e6 ) . "us)\n" );
+
+               return $data;
+       }
+
+       /**
+        * Return a rolling random state initially build using data from unstable sources
+        * @return string A new weak random state
+        */
+       protected function randomState() {
+               static $state = null;
+               if ( is_null( $state ) ) {
+                       // Initialize the state with whatever unstable data we can find
+                       // It's important that this data is hashed right afterwards to prevent
+                       // it from being leaked into the output stream
+                       $state = MWCryptHash::hash( $this->initialRandomState() );
+               }
+               // Generate a new random state based on the initial random state or previous
+               // random state by combining it with clock drift
+               $state = $this->driftHash( $state );
+
+               return $state;
+       }
+
+       /**
+        * Return a boolean indicating whether or not the source used for cryptographic
+        * random bytes generation in the previously run generate* call
+        * was cryptographically strong.
+        *
+        * @return bool Returns true if the source was strong, false if not.
+        */
+       public function wasStrong() {
+               if ( is_null( $this->strong ) ) {
+                       throw new RuntimeException( __METHOD__ . ' called before generation of random data' );
+               }
+
+               return $this->strong;
+       }
+
+       /**
+        * Generate a run of (ideally) cryptographically random data and return
+        * it in raw binary form.
+        * You can use CryptRand::wasStrong() if you wish to know if the source used
+        * was cryptographically strong.
+        *
+        * @param int $bytes The number of bytes of random data to generate
+        * @param bool $forceStrong Pass true if you want generate to prefer cryptographically
+        *                          strong sources of entropy even if reading from them may steal
+        *                          more entropy from the system than optimal.
+        * @return string Raw binary random data
+        */
+       public function generate( $bytes, $forceStrong = false ) {
+
+               $this->logger->debug( "Generating cryptographic random bytes for\n" );
+
+               $bytes = floor( $bytes );
+               static $buffer = '';
+               if ( is_null( $this->strong ) ) {
+                       // Set strength to false initially until we know what source data is coming from
+                       $this->strong = true;
+               }
+
+               if ( strlen( $buffer ) < $bytes ) {
+                       // If available make use of mcrypt_create_iv URANDOM source to generate randomness
+                       // On unix-like systems this reads from /dev/urandom but does it without any buffering
+                       // and bypasses openbasedir restrictions, so it's preferable to reading directly
+                       // On Windows starting in PHP 5.3.0 Windows' native CryptGenRandom is used to generate
+                       // entropy so this is also preferable to just trying to read urandom because it may work
+                       // on Windows systems as well.
+                       if ( function_exists( 'mcrypt_create_iv' ) ) {
+                               $rem = $bytes - strlen( $buffer );
+                               $iv = mcrypt_create_iv( $rem, MCRYPT_DEV_URANDOM );
+                               if ( $iv === false ) {
+                                       $this->logger->debug( "mcrypt_create_iv returned false.\n" );
+                               } else {
+                                       $buffer .= $iv;
+                                       $this->logger->debug( "mcrypt_create_iv generated " . strlen( $iv ) .
+                                               " bytes of randomness.\n" );
+                               }
+                       }
+               }
+
+               if ( strlen( $buffer ) < $bytes ) {
+                       if ( function_exists( 'openssl_random_pseudo_bytes' ) ) {
+                               $rem = $bytes - strlen( $buffer );
+                               $openssl_bytes = openssl_random_pseudo_bytes( $rem, $openssl_strong );
+                               if ( $openssl_bytes === false ) {
+                                       $this->logger->debug( "openssl_random_pseudo_bytes returned false.\n" );
+                               } else {
+                                       $buffer .= $openssl_bytes;
+                                       $this->logger->debug( "openssl_random_pseudo_bytes generated " .
+                                               strlen( $openssl_bytes ) . " bytes of " .
+                                               ( $openssl_strong ? "strong" : "weak" ) . " randomness.\n" );
+                               }
+                               if ( strlen( $buffer ) >= $bytes ) {
+                                       // openssl tells us if the random source was strong, if some of our data was generated
+                                       // using it use it's say on whether the randomness is strong
+                                       $this->strong = !!$openssl_strong;
+                               }
+                       }
+               }
+
+               // Only read from urandom if we can control the buffer size or were passed forceStrong
+               if ( strlen( $buffer ) < $bytes &&
+                       ( function_exists( 'stream_set_read_buffer' ) || $forceStrong )
+               ) {
+                       $rem = $bytes - strlen( $buffer );
+                       if ( !function_exists( 'stream_set_read_buffer' ) && $forceStrong ) {
+                               $this->logger->debug( "Was forced to read from /dev/urandom " .
+                                       "without control over the buffer size.\n" );
+                       }
+                       // /dev/urandom is generally considered the best possible commonly
+                       // available random source, and is available on most *nix systems.
+                       MediaWiki\suppressWarnings();
+                       $urandom = fopen( "/dev/urandom", "rb" );
+                       MediaWiki\restoreWarnings();
+
+                       // Attempt to read all our random data from urandom
+                       // php's fread always does buffered reads based on the stream's chunk_size
+                       // so in reality it will usually read more than the amount of data we're
+                       // asked for and not storing that risks depleting the system's random pool.
+                       // If stream_set_read_buffer is available set the chunk_size to the amount
+                       // of data we need. Otherwise read 8k, php's default chunk_size.
+                       if ( $urandom ) {
+                               // php's default chunk_size is 8k
+                               $chunk_size = 1024 * 8;
+                               if ( function_exists( 'stream_set_read_buffer' ) ) {
+                                       // If possible set the chunk_size to the amount of data we need
+                                       stream_set_read_buffer( $urandom, $rem );
+                                       $chunk_size = $rem;
+                               }
+                               $random_bytes = fread( $urandom, max( $chunk_size, $rem ) );
+                               $buffer .= $random_bytes;
+                               fclose( $urandom );
+                               $this->logger->debug( "/dev/urandom generated " . strlen( $random_bytes ) .
+                                       " bytes of randomness.\n" );
+
+                               if ( strlen( $buffer ) >= $bytes ) {
+                                       // urandom is always strong, set to true if all our data was generated using it
+                                       $this->strong = true;
+                               }
+                       } else {
+                               $this->logger->debug( "/dev/urandom could not be opened.\n" );
+                       }
+               }
+
+               // If we cannot use or generate enough data from a secure source
+               // use this loop to generate a good set of pseudo random data.
+               // This works by initializing a random state using a pile of unstable data
+               // and continually shoving it through a hash along with a variable salt.
+               // We hash the random state with more salt to avoid the state from leaking
+               // out and being used to predict the /randomness/ that follows.
+               if ( strlen( $buffer ) < $bytes ) {
+                       $this->logger->debug( __METHOD__ .
+                               ": Falling back to using a pseudo random state to generate randomness.\n" );
+               }
+               while ( strlen( $buffer ) < $bytes ) {
+                       $buffer .= MWCryptHash::hmac( $this->randomState(), strval( mt_rand() ) );
+                       // This code is never really cryptographically strong, if we use it
+                       // at all, then set strong to false.
+                       $this->strong = false;
+               }
+
+               // Once the buffer has been filled up with enough random data to fulfill
+               // the request shift off enough data to handle the request and leave the
+               // unused portion left inside the buffer for the next request for random data
+               $generated = substr( $buffer, 0, $bytes );
+               $buffer = substr( $buffer, $bytes );
+
+               $this->logger->debug( strlen( $buffer ) .
+                       " bytes of randomness leftover in the buffer.\n" );
+
+               return $generated;
+       }
+
+       /**
+        * Generate a run of (ideally) cryptographically random data and return
+        * it in hexadecimal string format.
+        * You can use CryptRand::wasStrong() if you wish to know if the source used
+        * was cryptographically strong.
+        *
+        * @param int $chars The number of hex chars of random data to generate
+        * @param bool $forceStrong Pass true if you want generate to prefer cryptographically
+        *                          strong sources of entropy even if reading from them may steal
+        *                          more entropy from the system than optimal.
+        * @return string Hexadecimal random data
+        */
+       public function generateHex( $chars, $forceStrong = false ) {
+               // hex strings are 2x the length of raw binary so we divide the length in half
+               // odd numbers will result in a .5 that leads the generate() being 1 character
+               // short, so we use ceil() to ensure that we always have enough bytes
+               $bytes = ceil( $chars / 2 );
+               // Generate the data and then convert it to a hex string
+               $hex = bin2hex( $this->generate( $bytes, $forceStrong ) );
+
+               // A bit of paranoia here, the caller asked for a specific length of string
+               // here, and it's possible (eg when given an odd number) that we may actually
+               // have at least 1 char more than they asked for. Just in case they made this
+               // call intending to insert it into a database that does truncation we don't
+               // want to give them too much and end up with their database and their live
+               // code having two different values because part of what we gave them is truncated
+               // hence, we strip out any run of characters longer than what we were asked for.
+               return substr( $hex, 0, $chars );
+       }
+}
diff --git a/includes/libs/IEContentAnalyzer.php b/includes/libs/IEContentAnalyzer.php
deleted file mode 100644 (file)
index 0d1e527..0000000
+++ /dev/null
@@ -1,851 +0,0 @@
-<?php
-/**
- * Simulation of Microsoft Internet Explorer's MIME type detection algorithm.
- *
- * @file
- * @todo Define the exact license of this file.
- */
-
-/**
- * This class simulates Microsoft Internet Explorer's terribly broken and
- * insecure MIME type detection algorithm. It can be used to check web uploads
- * with an apparently safe type, to see if IE will reinterpret them to produce
- * something dangerous.
- *
- * It is full of bugs and strange design choices should not under any
- * circumstances be used to determine a MIME type to present to a user or
- * client. (Apple Safari developers, this means you too.)
- *
- * This class is based on a disassembly of IE 5.0, 6.0 and 7.0. Although I have
- * attempted to ensure that this code works in exactly the same way as Internet
- * Explorer, it does not share any source code, or creative choices such as
- * variable names, thus I (Tim Starling) claim copyright on it.
- *
- * It may be redistributed without restriction. To aid reuse, this class does
- * not depend on any MediaWiki module.
- */
-class IEContentAnalyzer {
-       /**
-        * Relevant data taken from the type table in IE 5
-        */
-       protected $baseTypeTable = [
-               'ambiguous' /*1*/ => [
-                       'text/plain',
-                       'application/octet-stream',
-                       'application/x-netcdf', // [sic]
-               ],
-               'text' /*3*/ => [
-                       'text/richtext', 'image/x-bitmap', 'application/postscript', 'application/base64',
-                       'application/macbinhex40', 'application/x-cdf', 'text/scriptlet'
-               ],
-               'binary' /*4*/ => [
-                       'application/pdf', 'audio/x-aiff', 'audio/basic', 'audio/wav', 'image/gif',
-                       'image/pjpeg', 'image/jpeg', 'image/tiff', 'image/x-png', 'image/png', 'image/bmp',
-                       'image/x-jg', 'image/x-art', 'image/x-emf', 'image/x-wmf', 'video/avi',
-                       'video/x-msvideo', 'video/mpeg', 'application/x-compressed',
-                       'application/x-zip-compressed', 'application/x-gzip-compressed', 'application/java',
-                       'application/x-msdownload'
-               ],
-               'html' /*5*/ => [ 'text/html' ],
-       ];
-
-       /**
-        * Changes to the type table in later versions of IE
-        */
-       protected $addedTypes = [
-               'ie07' => [
-                       'text' => [ 'text/xml', 'application/xml' ]
-               ],
-       ];
-
-       /**
-        * An approximation of the "Content Type" values in HKEY_CLASSES_ROOT in a
-        * typical Windows installation.
-        *
-        * Used for extension to MIME type mapping if detection fails.
-        */
-       protected $registry = [
-               '.323' => 'text/h323',
-               '.3g2' => 'video/3gpp2',
-               '.3gp' => 'video/3gpp',
-               '.3gp2' => 'video/3gpp2',
-               '.3gpp' => 'video/3gpp',
-               '.aac' => 'audio/aac',
-               '.ac3' => 'audio/ac3',
-               '.accda' => 'application/msaccess',
-               '.accdb' => 'application/msaccess',
-               '.accdc' => 'application/msaccess',
-               '.accde' => 'application/msaccess',
-               '.accdr' => 'application/msaccess',
-               '.accdt' => 'application/msaccess',
-               '.ade' => 'application/msaccess',
-               '.adp' => 'application/msaccess',
-               '.adts' => 'audio/aac',
-               '.ai' => 'application/postscript',
-               '.aif' => 'audio/aiff',
-               '.aifc' => 'audio/aiff',
-               '.aiff' => 'audio/aiff',
-               '.amc' => 'application/x-mpeg',
-               '.application' => 'application/x-ms-application',
-               '.asf' => 'video/x-ms-asf',
-               '.asx' => 'video/x-ms-asf',
-               '.au' => 'audio/basic',
-               '.avi' => 'video/avi',
-               '.bmp' => 'image/bmp',
-               '.caf' => 'audio/x-caf',
-               '.cat' => 'application/vnd.ms-pki.seccat',
-               '.cbo' => 'application/sha',
-               '.cdda' => 'audio/aiff',
-               '.cer' => 'application/x-x509-ca-cert',
-               '.conf' => 'text/plain',
-               '.crl' => 'application/pkix-crl',
-               '.crt' => 'application/x-x509-ca-cert',
-               '.css' => 'text/css',
-               '.csv' => 'application/vnd.ms-excel',
-               '.der' => 'application/x-x509-ca-cert',
-               '.dib' => 'image/bmp',
-               '.dif' => 'video/x-dv',
-               '.dll' => 'application/x-msdownload',
-               '.doc' => 'application/msword',
-               '.docm' => 'application/vnd.ms-word.document.macroEnabled.12',
-               '.docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
-               '.dot' => 'application/msword',
-               '.dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
-               '.dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
-               '.dv' => 'video/x-dv',
-               '.dwfx' => 'model/vnd.dwfx+xps',
-               '.edn' => 'application/vnd.adobe.edn',
-               '.eml' => 'message/rfc822',
-               '.eps' => 'application/postscript',
-               '.etd' => 'application/x-ebx',
-               '.exe' => 'application/x-msdownload',
-               '.fdf' => 'application/vnd.fdf',
-               '.fif' => 'application/fractals',
-               '.gif' => 'image/gif',
-               '.gsm' => 'audio/x-gsm',
-               '.hqx' => 'application/mac-binhex40',
-               '.hta' => 'application/hta',
-               '.htc' => 'text/x-component',
-               '.htm' => 'text/html',
-               '.html' => 'text/html',
-               '.htt' => 'text/webviewhtml',
-               '.hxa' => 'application/xml',
-               '.hxc' => 'application/xml',
-               '.hxd' => 'application/octet-stream',
-               '.hxe' => 'application/xml',
-               '.hxf' => 'application/xml',
-               '.hxh' => 'application/octet-stream',
-               '.hxi' => 'application/octet-stream',
-               '.hxk' => 'application/xml',
-               '.hxq' => 'application/octet-stream',
-               '.hxr' => 'application/octet-stream',
-               '.hxs' => 'application/octet-stream',
-               '.hxt' => 'application/xml',
-               '.hxv' => 'application/xml',
-               '.hxw' => 'application/octet-stream',
-               '.ico' => 'image/x-icon',
-               '.iii' => 'application/x-iphone',
-               '.ins' => 'application/x-internet-signup',
-               '.iqy' => 'text/x-ms-iqy',
-               '.isp' => 'application/x-internet-signup',
-               '.jfif' => 'image/jpeg',
-               '.jnlp' => 'application/x-java-jnlp-file',
-               '.jpe' => 'image/jpeg',
-               '.jpeg' => 'image/jpeg',
-               '.jpg' => 'image/jpeg',
-               '.jtx' => 'application/x-jtx+xps',
-               '.latex' => 'application/x-latex',
-               '.log' => 'text/plain',
-               '.m1v' => 'video/mpeg',
-               '.m2v' => 'video/mpeg',
-               '.m3u' => 'audio/x-mpegurl',
-               '.mac' => 'image/x-macpaint',
-               '.man' => 'application/x-troff-man',
-               '.mda' => 'application/msaccess',
-               '.mdb' => 'application/msaccess',
-               '.mde' => 'application/msaccess',
-               '.mfp' => 'application/x-shockwave-flash',
-               '.mht' => 'message/rfc822',
-               '.mhtml' => 'message/rfc822',
-               '.mid' => 'audio/mid',
-               '.midi' => 'audio/mid',
-               '.mod' => 'video/mpeg',
-               '.mov' => 'video/quicktime',
-               '.mp2' => 'video/mpeg',
-               '.mp2v' => 'video/mpeg',
-               '.mp3' => 'audio/mpeg',
-               '.mp4' => 'video/mp4',
-               '.mpa' => 'video/mpeg',
-               '.mpe' => 'video/mpeg',
-               '.mpeg' => 'video/mpeg',
-               '.mpf' => 'application/vnd.ms-mediapackage',
-               '.mpg' => 'video/mpeg',
-               '.mpv2' => 'video/mpeg',
-               '.mqv' => 'video/quicktime',
-               '.NMW' => 'application/nmwb',
-               '.nws' => 'message/rfc822',
-               '.odc' => 'text/x-ms-odc',
-               '.ols' => 'application/vnd.ms-publisher',
-               '.p10' => 'application/pkcs10',
-               '.p12' => 'application/x-pkcs12',
-               '.p7b' => 'application/x-pkcs7-certificates',
-               '.p7c' => 'application/pkcs7-mime',
-               '.p7m' => 'application/pkcs7-mime',
-               '.p7r' => 'application/x-pkcs7-certreqresp',
-               '.p7s' => 'application/pkcs7-signature',
-               '.pct' => 'image/pict',
-               '.pdf' => 'application/pdf',
-               '.pdx' => 'application/vnd.adobe.pdx',
-               '.pfx' => 'application/x-pkcs12',
-               '.pic' => 'image/pict',
-               '.pict' => 'image/pict',
-               '.pinstall' => 'application/x-picasa-detect',
-               '.pko' => 'application/vnd.ms-pki.pko',
-               '.png' => 'image/png',
-               '.pnt' => 'image/x-macpaint',
-               '.pntg' => 'image/x-macpaint',
-               '.pot' => 'application/vnd.ms-powerpoint',
-               '.potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12',
-               '.potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
-               '.ppa' => 'application/vnd.ms-powerpoint',
-               '.ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
-               '.pps' => 'application/vnd.ms-powerpoint',
-               '.ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
-               '.ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
-               '.ppt' => 'application/vnd.ms-powerpoint',
-               '.pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
-               '.pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
-               '.prf' => 'application/pics-rules',
-               '.ps' => 'application/postscript',
-               '.pub' => 'application/vnd.ms-publisher',
-               '.pwz' => 'application/vnd.ms-powerpoint',
-               '.py' => 'text/plain',
-               '.pyw' => 'text/plain',
-               '.qht' => 'text/x-html-insertion',
-               '.qhtm' => 'text/x-html-insertion',
-               '.qt' => 'video/quicktime',
-               '.qti' => 'image/x-quicktime',
-               '.qtif' => 'image/x-quicktime',
-               '.qtl' => 'application/x-quicktimeplayer',
-               '.rat' => 'application/rat-file',
-               '.rmf' => 'application/vnd.adobe.rmf',
-               '.rmi' => 'audio/mid',
-               '.rqy' => 'text/x-ms-rqy',
-               '.rtf' => 'application/msword',
-               '.sct' => 'text/scriptlet',
-               '.sd2' => 'audio/x-sd2',
-               '.sdp' => 'application/sdp',
-               '.shtml' => 'text/html',
-               '.sit' => 'application/x-stuffit',
-               '.sldm' => 'application/vnd.ms-powerpoint.slide.macroEnabled.12',
-               '.sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
-               '.slk' => 'application/vnd.ms-excel',
-               '.snd' => 'audio/basic',
-               '.so' => 'application/x-apachemodule',
-               '.sol' => 'text/plain',
-               '.sor' => 'text/plain',
-               '.spc' => 'application/x-pkcs7-certificates',
-               '.spl' => 'application/futuresplash',
-               '.sst' => 'application/vnd.ms-pki.certstore',
-               '.stl' => 'application/vnd.ms-pki.stl',
-               '.swf' => 'application/x-shockwave-flash',
-               '.thmx' => 'application/vnd.ms-officetheme',
-               '.tif' => 'image/tiff',
-               '.tiff' => 'image/tiff',
-               '.txt' => 'text/plain',
-               '.uls' => 'text/iuls',
-               '.vcf' => 'text/x-vcard',
-               '.vdx' => 'application/vnd.ms-visio.viewer',
-               '.vsd' => 'application/vnd.ms-visio.viewer',
-               '.vss' => 'application/vnd.ms-visio.viewer',
-               '.vst' => 'application/vnd.ms-visio.viewer',
-               '.vsx' => 'application/vnd.ms-visio.viewer',
-               '.vtx' => 'application/vnd.ms-visio.viewer',
-               '.wav' => 'audio/wav',
-               '.wax' => 'audio/x-ms-wax',
-               '.wbk' => 'application/msword',
-               '.wdp' => 'image/vnd.ms-photo',
-               '.wiz' => 'application/msword',
-               '.wm' => 'video/x-ms-wm',
-               '.wma' => 'audio/x-ms-wma',
-               '.wmd' => 'application/x-ms-wmd',
-               '.wmv' => 'video/x-ms-wmv',
-               '.wmx' => 'video/x-ms-wmx',
-               '.wmz' => 'application/x-ms-wmz',
-               '.wpl' => 'application/vnd.ms-wpl',
-               '.wsc' => 'text/scriptlet',
-               '.wvx' => 'video/x-ms-wvx',
-               '.xaml' => 'application/xaml+xml',
-               '.xbap' => 'application/x-ms-xbap',
-               '.xdp' => 'application/vnd.adobe.xdp+xml',
-               '.xfdf' => 'application/vnd.adobe.xfdf',
-               '.xht' => 'application/xhtml+xml',
-               '.xhtml' => 'application/xhtml+xml',
-               '.xla' => 'application/vnd.ms-excel',
-               '.xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
-               '.xlk' => 'application/vnd.ms-excel',
-               '.xll' => 'application/vnd.ms-excel',
-               '.xlm' => 'application/vnd.ms-excel',
-               '.xls' => 'application/vnd.ms-excel',
-               '.xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
-               '.xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
-               '.xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
-               '.xlt' => 'application/vnd.ms-excel',
-               '.xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
-               '.xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
-               '.xlw' => 'application/vnd.ms-excel',
-               '.xml' => 'text/xml',
-               '.xps' => 'application/vnd.ms-xpsdocument',
-               '.xsl' => 'text/xml',
-       ];
-
-       /**
-        * IE versions which have been analysed to bring you this class, and for
-        * which some substantive difference exists. These will appear as keys
-        * in the return value of getRealMimesFromData(). The names are chosen to sort correctly.
-        */
-       protected $versions = [ 'ie05', 'ie06', 'ie07', 'ie07.strict', 'ie07.nohtml' ];
-
-       /**
-        * Type table with versions expanded
-        */
-       protected $typeTable = [];
-
-       /** constructor */
-       function __construct() {
-               // Construct versioned type arrays from the base type array plus additions
-               $types = $this->baseTypeTable;
-               foreach ( $this->versions as $version ) {
-                       if ( isset( $this->addedTypes[$version] ) ) {
-                               foreach ( $this->addedTypes[$version] as $format => $addedTypes ) {
-                                       $types[$format] = array_merge( $types[$format], $addedTypes );
-                               }
-                       }
-                       $this->typeTable[$version] = $types;
-               }
-       }
-
-       /**
-        * Get the MIME types from getMimesFromData(), but convert the result from IE's
-        * idiosyncratic private types into something other apps will understand.
-        *
-        * @param string $fileName the file name (unused at present)
-        * @param string $chunk the first 256 bytes of the file
-        * @param string $proposed the MIME type proposed by the server
-        *
-        * @return Array: map of IE version to detected MIME type
-        */
-       public function getRealMimesFromData( $fileName, $chunk, $proposed ) {
-               $types = $this->getMimesFromData( $fileName, $chunk, $proposed );
-               $types = array_map( [ $this, 'translateMimeType' ], $types );
-               return $types;
-       }
-
-       /**
-        * Translate a MIME type from IE's idiosyncratic private types into
-        * more commonly understood type strings
-        * @param $type
-        * @return string
-        */
-       public function translateMimeType( $type ) {
-               static $table = [
-                       'image/pjpeg' => 'image/jpeg',
-                       'image/x-png' => 'image/png',
-                       'image/x-wmf' => 'application/x-msmetafile',
-                       'image/bmp' => 'image/x-bmp',
-                       'application/x-zip-compressed' => 'application/zip',
-                       'application/x-compressed' => 'application/x-compress',
-                       'application/x-gzip-compressed' => 'application/x-gzip',
-                       'audio/mid' => 'audio/midi',
-               ];
-               if ( isset( $table[$type] ) ) {
-                       $type = $table[$type];
-               }
-               return $type;
-       }
-
-       /**
-        * Get the untranslated MIME types for all known versions
-        *
-        * @param string $fileName the file name (unused at present)
-        * @param string $chunk the first 256 bytes of the file
-        * @param string $proposed the MIME type proposed by the server
-        *
-        * @return Array: map of IE version to detected MIME type
-        */
-       public function getMimesFromData( $fileName, $chunk, $proposed ) {
-               $types = [];
-               foreach ( $this->versions as $version ) {
-                       $types[$version] = $this->getMimeTypeForVersion( $version, $fileName, $chunk, $proposed );
-               }
-               return $types;
-       }
-
-       /**
-        * Get the MIME type for a given named version
-        * @param $version
-        * @param $fileName
-        * @param $chunk
-        * @param $proposed
-        * @return bool|string
-        */
-       protected function getMimeTypeForVersion( $version, $fileName, $chunk, $proposed ) {
-               // Strip text after a semicolon
-               $semiPos = strpos( $proposed, ';' );
-               if ( $semiPos !== false ) {
-                       $proposed = substr( $proposed, 0, $semiPos );
-               }
-
-               $proposedFormat = $this->getDataFormat( $version, $proposed );
-               if ( $proposedFormat == 'unknown'
-                       && $proposed != 'multipart/mixed'
-                       && $proposed != 'multipart/x-mixed-replace' )
-               {
-                       return $proposed;
-               }
-               if ( strval( $chunk ) === '' ) {
-                       return $proposed;
-               }
-
-               // Truncate chunk at 255 bytes
-               $chunk = substr( $chunk, 0, 255 );
-
-               // IE does the Check*Headers() calls last, and instead does the following image
-               // type checks by directly looking for the magic numbers. What I do here should
-               // have the same effect since the magic number checks are identical in both cases.
-               $result = $this->sampleData( $version, $chunk );
-               $sampleFound = $result['found'];
-               $counters = $result['counters'];
-               $binaryType = $this->checkBinaryHeaders( $version, $chunk );
-               $textType = $this->checkTextHeaders( $version, $chunk );
-
-               if ( $proposed == 'text/html' && isset( $sampleFound['html'] ) ) {
-                       return 'text/html';
-               }
-               if ( $proposed == 'image/gif' && $binaryType == 'image/gif' ) {
-                       return 'image/gif';
-               }
-               if ( ( $proposed == 'image/pjpeg' || $proposed == 'image/jpeg' )
-                       && $binaryType == 'image/pjpeg' )
-               {
-                       return $proposed;
-               }
-               // PNG check added in IE 7
-               if ( $version >= 'ie07'
-                       && ( $proposed == 'image/x-png' || $proposed == 'image/png' )
-                       && $binaryType == 'image/x-png' )
-               {
-                       return $proposed;
-               }
-
-               // CDF was removed in IE 7 so it won't be in $sampleFound for later versions
-               if ( isset( $sampleFound['cdf'] ) ) {
-                       return 'application/x-cdf';
-               }
-
-               // RSS and Atom were added in IE 7 so they won't be in $sampleFound for
-               // previous versions
-               if ( isset( $sampleFound['rss'] ) ) {
-                       return 'application/rss+xml';
-               }
-               if ( isset( $sampleFound['rdf-tag'] )
-                       && isset( $sampleFound['rdf-url'] )
-                       && isset( $sampleFound['rdf-purl'] ) )
-               {
-                       return 'application/rss+xml';
-               }
-               if ( isset( $sampleFound['atom'] ) ) {
-                       return 'application/atom+xml';
-               }
-
-               if ( isset( $sampleFound['xml'] ) ) {
-                       // TODO: I'm not sure under what circumstances this flag is enabled
-                       if ( strpos( $version, 'strict' ) !== false ) {
-                               if ( $proposed == 'text/html' || $proposed == 'text/xml' ) {
-                                       return 'text/xml';
-                               }
-                       } else {
-                               return 'text/xml';
-                       }
-               }
-               if ( isset( $sampleFound['html'] ) ) {
-                       // TODO: I'm not sure under what circumstances this flag is enabled
-                       if ( strpos( $version, 'nohtml' ) !== false ) {
-                               if ( $proposed == 'text/plain' ) {
-                                       return 'text/html';
-                               }
-                       } else {
-                               return 'text/html';
-                       }
-               }
-               if ( isset( $sampleFound['xbm'] ) ) {
-                       return 'image/x-bitmap';
-               }
-               if ( isset( $sampleFound['binhex'] ) ) {
-                       return 'application/macbinhex40';
-               }
-               if ( isset( $sampleFound['scriptlet'] ) ) {
-                       if ( strpos( $version, 'strict' ) !== false ) {
-                               if ( $proposed == 'text/plain' || $proposed == 'text/scriptlet' ) {
-                                       return 'text/scriptlet';
-                               }
-                       } else {
-                               return 'text/scriptlet';
-                       }
-               }
-
-               // Freaky heuristics to determine if the data is text or binary
-               // The heuristic is of course broken for non-ASCII text
-               if ( $counters['ctrl'] != 0 && ( $counters['ff'] + $counters['low'] )
-                       < ( $counters['ctrl'] + $counters['high'] ) * 16 )
-               {
-                       $kindOfBinary = true;
-                       $type = $binaryType ? $binaryType : $textType;
-                       if ( $type === false ) {
-                               $type = 'application/octet-stream';
-                       }
-               } else {
-                       $kindOfBinary = false;
-                       $type = $textType ? $textType : $binaryType;
-                       if ( $type === false ) {
-                               $type = 'text/plain';
-                       }
-               }
-
-               // Check if the output format is ambiguous
-               // This generally means that detection failed, real types aren't ambiguous
-               $detectedFormat = $this->getDataFormat( $version, $type );
-               if ( $detectedFormat != 'ambiguous' ) {
-                       return $type;
-               }
-
-               if ( $proposedFormat != 'ambiguous' ) {
-                       // FormatAgreesWithData()
-                       if ( $proposedFormat == 'text' && !$kindOfBinary ) {
-                               return $proposed;
-                       }
-                       if ( $proposedFormat == 'binary' && $kindOfBinary ) {
-                               return $proposed;
-                       }
-                       if ( $proposedFormat == 'html' ) {
-                               return $proposed;
-                       }
-               }
-
-               // Find a MIME type by searching the registry for the file extension.
-               $dotPos = strrpos( $fileName, '.' );
-               if ( $dotPos === false ) {
-                       return $type;
-               }
-               $ext = substr( $fileName, $dotPos );
-               if ( isset( $this->registry[$ext] ) ) {
-                       return $this->registry[$ext];
-               }
-
-               // TODO: If the extension has an application registered to it, IE will return
-               // application/octet-stream. We'll skip that, so we could erroneously
-               // return text/plain or application/x-netcdf where application/octet-stream
-               // would be correct.
-
-               return $type;
-       }
-
-       /**
-        * Check for text headers at the start of the chunk
-        * Confirmed same in 5 and 7.
-        * @param $version
-        * @param $chunk
-        * @return bool|string
-        */
-       private function checkTextHeaders( $version, $chunk ) {
-               $chunk2 = substr( $chunk, 0, 2 );
-               $chunk4 = substr( $chunk, 0, 4 );
-               $chunk5 = substr( $chunk, 0, 5 );
-               if ( $chunk4 == '%PDF' ) {
-                       return 'application/pdf';
-               }
-               if ( $chunk2 == '%!' ) {
-                       return 'application/postscript';
-               }
-               if ( $chunk5 == '{\\rtf' ) {
-                       return 'text/richtext';
-               }
-               if ( $chunk5 == 'begin' ) {
-                       return 'application/base64';
-               }
-               return false;
-       }
-
-       /**
-        * Check for binary headers at the start of the chunk
-        * Confirmed same in 5 and 7.
-        * @param $version
-        * @param $chunk
-        * @return bool|string
-        */
-       private function checkBinaryHeaders( $version, $chunk ) {
-               $chunk2 = substr( $chunk, 0, 2 );
-               $chunk3 = substr( $chunk, 0, 3 );
-               $chunk4 = substr( $chunk, 0, 4 );
-               $chunk5 = substr( $chunk, 0, 5 );
-               $chunk5uc = strtoupper( $chunk5 );
-               $chunk8 = substr( $chunk, 0, 8 );
-               if ( $chunk5uc == 'GIF87' || $chunk5uc == 'GIF89' ) {
-                       return 'image/gif';
-               }
-               if ( $chunk2 == "\xff\xd8" ) {
-                       return 'image/pjpeg'; // actually plain JPEG but this is what IE returns
-               }
-
-               if ( $chunk2 == 'BM'
-                       && substr( $chunk, 6, 2 ) == "\000\000"
-                       && substr( $chunk, 8, 2 ) == "\000\000" )
-               {
-                       return 'image/bmp'; // another non-standard MIME
-               }
-               if ( $chunk4 == 'RIFF'
-                       && substr( $chunk, 8, 4 ) == 'WAVE' )
-               {
-                       return 'audio/wav';
-               }
-               // These were integer literals in IE
-               // Perhaps the author was not sure what the target endianness was
-               if ( $chunk4 == ".sd\000"
-                       || $chunk4 == ".snd"
-                       || $chunk4 == "\000ds."
-                       || $chunk4 == "dns." )
-               {
-                       return 'audio/basic';
-               }
-               if ( $chunk3 == "MM\000" ) {
-                       return 'image/tiff';
-               }
-               if ( $chunk2 == 'MZ' ) {
-                       return 'application/x-msdownload';
-               }
-               if ( $chunk8 == "\x89PNG\x0d\x0a\x1a\x0a" ) {
-                       return 'image/x-png'; // [sic]
-               }
-               if ( strlen( $chunk ) >= 5 ) {
-                       $byte2 = ord( $chunk[2] );
-                       $byte4 = ord( $chunk[4] );
-                       if ( $byte2 >= 3 && $byte2 <= 31 && $byte4 == 0 && $chunk2 == 'JG' ) {
-                               return 'image/x-jg';
-                       }
-               }
-               // More endian confusion?
-               if ( $chunk4 == 'MROF' ) {
-                       return 'audio/x-aiff';
-               }
-               $chunk4_8 = substr( $chunk, 8, 4 );
-               if ( $chunk4 == 'FORM' && ( $chunk4_8 == 'AIFF' || $chunk4_8 == 'AIFC' ) ) {
-                       return 'audio/x-aiff';
-               }
-               if ( $chunk4 == 'RIFF' && $chunk4_8 == 'AVI ' ) {
-                       return 'video/avi';
-               }
-               if ( $chunk4 == "\x00\x00\x01\xb3" || $chunk4 == "\x00\x00\x01\xba" ) {
-                       return 'video/mpeg';
-               }
-               if ( $chunk4 == "\001\000\000\000"
-                       && substr( $chunk, 40, 4 ) == ' EMF' )
-               {
-                       return 'image/x-emf';
-               }
-               if ( $chunk4 == "\xd7\xcd\xc6\x9a" ) {
-                       return 'image/x-wmf';
-               }
-               if ( $chunk4 == "\xca\xfe\xba\xbe" ) {
-                       return 'application/java';
-               }
-               if ( $chunk2 == 'PK' ) {
-                       return 'application/x-zip-compressed';
-               }
-               if ( $chunk2 == "\x1f\x9d" ) {
-                       return 'application/x-compressed';
-               }
-               if ( $chunk2 == "\x1f\x8b" ) {
-                       return 'application/x-gzip-compressed';
-               }
-               // Skip redundant check for ZIP
-               if ( $chunk5 == "MThd\000" ) {
-                       return 'audio/mid';
-               }
-               if ( $chunk4 == '%PDF' ) {
-                       return 'application/pdf';
-               }
-               return false;
-       }
-
-       /**
-        * Do heuristic checks on the bulk of the data sample.
-        * Search for HTML tags.
-        * @param $version
-        * @param $chunk
-        * @return array
-        */
-       protected function sampleData( $version, $chunk ) {
-               $found = [];
-               $counters = [
-                       'ctrl' => 0,
-                       'high' => 0,
-                       'low' => 0,
-                       'lf' => 0,
-                       'cr' => 0,
-                       'ff' => 0
-               ];
-               $htmlTags = [
-                       'html',
-                       'head',
-                       'title',
-                       'body',
-                       'script',
-                       'a href',
-                       'pre',
-                       'img',
-                       'plaintext',
-                       'table'
-               ];
-               $rdfUrl = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
-               $rdfPurl = 'http://purl.org/rss/1.0/';
-               $xbmMagic1 = '#define';
-               $xbmMagic2 = '_width';
-               $xbmMagic3 = '_bits';
-               $binhexMagic = 'converted with BinHex';
-               $chunkLength = strlen( $chunk );
-
-               for ( $offset = 0; $offset < $chunkLength; $offset++ ) {
-                       $curChar = $chunk[$offset];
-                       if ( $curChar == "\x0a" ) {
-                               $counters['lf']++;
-                               continue;
-                       } elseif ( $curChar == "\x0d" ) {
-                               $counters['cr']++;
-                               continue;
-                       } elseif ( $curChar == "\x0c" ) {
-                               $counters['ff']++;
-                               continue;
-                       } elseif ( $curChar == "\t" ) {
-                               $counters['low']++;
-                               continue;
-                       } elseif ( ord( $curChar ) < 32 ) {
-                               $counters['ctrl']++;
-                               continue;
-                       } elseif ( ord( $curChar ) >= 128 ) {
-                               $counters['high']++;
-                               continue;
-                       }
-
-                       $counters['low']++;
-                       if ( $curChar == '<' ) {
-                               // XML
-                               $remainder = substr( $chunk, $offset + 1 );
-                               if ( !strncasecmp( $remainder, '?XML', 4 ) ) {
-                                       $nextChar = substr( $chunk, $offset + 5, 1 );
-                                       if ( $nextChar == ':' || $nextChar == ' ' || $nextChar == "\t" ) {
-                                               $found['xml'] = true;
-                                       }
-                               }
-                               // Scriptlet (JSP)
-                               if ( !strncasecmp( $remainder, 'SCRIPTLET', 9 ) ) {
-                                       $found['scriptlet'] = true;
-                                       break;
-                               }
-                               // HTML
-                               foreach ( $htmlTags as $tag ) {
-                                       if ( !strncasecmp( $remainder, $tag, strlen( $tag ) ) ) {
-                                               $found['html'] = true;
-                                       }
-                               }
-                               // Skip broken check for additional tags (HR etc.)
-
-                               // CHANNEL replaced by RSS, RDF and FEED in IE 7
-                               if ( $version < 'ie07' ) {
-                                       if ( !strncasecmp( $remainder, 'CHANNEL', 7 ) ) {
-                                               $found['cdf'] = true;
-                                       }
-                               } else {
-                                       // RSS
-                                       if ( !strncasecmp( $remainder, 'RSS', 3 ) ) {
-                                               $found['rss'] = true;
-                                               break; // return from SampleData
-                                       }
-                                       if ( !strncasecmp( $remainder, 'rdf:RDF', 7 ) ) {
-                                               $found['rdf-tag'] = true;
-                                               // no break
-                                       }
-                                       if ( !strncasecmp( $remainder, 'FEED', 4 ) ) {
-                                               $found['atom'] = true;
-                                               break;
-                                       }
-                               }
-                               continue;
-                       }
-                       // Skip broken check for -->
-
-                       // RSS URL checks
-                       // For some reason both URLs must appear before it is recognised
-                       $remainder = substr( $chunk, $offset );
-                       if ( !strncasecmp( $remainder, $rdfUrl, strlen( $rdfUrl ) ) ) {
-                               $found['rdf-url'] = true;
-                               if ( isset( $found['rdf-tag'] )
-                                       && isset( $found['rdf-purl'] ) ) // [sic]
-                               {
-                                       break;
-                               }
-                               continue;
-                       }
-
-                       if ( !strncasecmp( $remainder, $rdfPurl, strlen( $rdfPurl ) ) ) {
-                               if ( isset( $found['rdf-tag'] )
-                                       && isset( $found['rdf-url'] ) ) // [sic]
-                               {
-                                       break;
-                               }
-                               continue;
-                       }
-
-                       // XBM checks
-                       if ( !strncasecmp( $remainder, $xbmMagic1, strlen( $xbmMagic1 ) ) ) {
-                               $found['xbm1'] = true;
-                               continue;
-                       }
-                       if ( $curChar == '_' ) {
-                               if ( isset( $found['xbm2'] ) ) {
-                                       if ( !strncasecmp( $remainder, $xbmMagic3, strlen( $xbmMagic3 ) ) ) {
-                                               $found['xbm'] = true;
-                                               break;
-                                       }
-                               } elseif ( isset( $found['xbm1'] ) ) {
-                                       if ( !strncasecmp( $remainder, $xbmMagic2, strlen( $xbmMagic2 ) ) ) {
-                                               $found['xbm2'] = true;
-                                       }
-                               }
-                       }
-
-                       // BinHex
-                       if ( !strncmp( $remainder, $binhexMagic, strlen( $binhexMagic ) ) ) {
-                               $found['binhex'] = true;
-                       }
-               }
-               return [ 'found' => $found, 'counters' => $counters ];
-       }
-
-       /**
-        * @param $version
-        * @param $type
-        * @return int|string
-        */
-       protected function getDataFormat( $version, $type ) {
-               $types = $this->typeTable[$version];
-               if ( $type == '(null)' || strval( $type ) === '' ) {
-                       return 'ambiguous';
-               }
-               foreach ( $types as $format => $list ) {
-                       if ( in_array( $type, $list ) ) {
-                               return $format;
-                       }
-               }
-               return 'unknown';
-       }
-}
diff --git a/includes/libs/IP.php b/includes/libs/IP.php
new file mode 100644 (file)
index 0000000..21203a4
--- /dev/null
@@ -0,0 +1,744 @@
+<?php
+/**
+ * Functions and constants to play with IP addresses and ranges
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Antoine Musso "<hashar at free dot fr>", Aaron Schulz
+ */
+
+use IPSet\IPSet;
+
+// Some regex definition to "play" with IP address and IP address blocks
+
+// An IPv4 address is made of 4 bytes from x00 to xFF which is d0 to d255
+define( 'RE_IP_BYTE', '(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|0?[0-9]?[0-9])' );
+define( 'RE_IP_ADD', RE_IP_BYTE . '\.' . RE_IP_BYTE . '\.' . RE_IP_BYTE . '\.' . RE_IP_BYTE );
+// An IPv4 block is an IP address and a prefix (d1 to d32)
+define( 'RE_IP_PREFIX', '(3[0-2]|[12]?\d)' );
+define( 'RE_IP_BLOCK', RE_IP_ADD . '\/' . RE_IP_PREFIX );
+
+// An IPv6 address is made up of 8 words (each x0000 to xFFFF).
+// However, the "::" abbreviation can be used on consecutive x0000 words.
+define( 'RE_IPV6_WORD', '([0-9A-Fa-f]{1,4})' );
+define( 'RE_IPV6_PREFIX', '(12[0-8]|1[01][0-9]|[1-9]?\d)' );
+define( 'RE_IPV6_ADD',
+       '(?:' . // starts with "::" (including "::")
+               ':(?::|(?::' . RE_IPV6_WORD . '){1,7})' .
+       '|' . // ends with "::" (except "::")
+               RE_IPV6_WORD . '(?::' . RE_IPV6_WORD . '){0,6}::' .
+       '|' . // contains one "::" in the middle (the ^ makes the test fail if none found)
+               RE_IPV6_WORD . '(?::((?(-1)|:))?' . RE_IPV6_WORD . '){1,6}(?(-2)|^)' .
+       '|' . // contains no "::"
+               RE_IPV6_WORD . '(?::' . RE_IPV6_WORD . '){7}' .
+       ')'
+);
+// An IPv6 block is an IP address and a prefix (d1 to d128)
+define( 'RE_IPV6_BLOCK', RE_IPV6_ADD . '\/' . RE_IPV6_PREFIX );
+// For IPv6 canonicalization (NOT for strict validation; these are quite lax!)
+define( 'RE_IPV6_GAP', ':(?:0+:)*(?::(?:0+:)*)?' );
+define( 'RE_IPV6_V4_PREFIX', '0*' . RE_IPV6_GAP . '(?:ffff:)?' );
+
+// This might be useful for regexps used elsewhere, matches any IPv4 or IPv6 address or network
+define( 'IP_ADDRESS_STRING',
+       '(?:' .
+               RE_IP_ADD . '(?:\/' . RE_IP_PREFIX . ')?' . // IPv4
+       '|' .
+               RE_IPV6_ADD . '(?:\/' . RE_IPV6_PREFIX . ')?' . // IPv6
+       ')'
+);
+
+/**
+ * A collection of public static functions to play with IP address
+ * and IP blocks.
+ */
+class IP {
+       /** @var IPSet */
+       private static $proxyIpSet = null;
+
+       /**
+        * Determine if a string is as valid IP address or network (CIDR prefix).
+        * SIIT IPv4-translated addresses are rejected.
+        * @note canonicalize() tries to convert translated addresses to IPv4.
+        *
+        * @param string $ip Possible IP address
+        * @return bool
+        */
+       public static function isIPAddress( $ip ) {
+               return (bool)preg_match( '/^' . IP_ADDRESS_STRING . '$/', $ip );
+       }
+
+       /**
+        * Given a string, determine if it as valid IP in IPv6 only.
+        * @note Unlike isValid(), this looks for networks too.
+        *
+        * @param string $ip Possible IP address
+        * @return bool
+        */
+       public static function isIPv6( $ip ) {
+               return (bool)preg_match( '/^' . RE_IPV6_ADD . '(?:\/' . RE_IPV6_PREFIX . ')?$/', $ip );
+       }
+
+       /**
+        * Given a string, determine if it as valid IP in IPv4 only.
+        * @note Unlike isValid(), this looks for networks too.
+        *
+        * @param string $ip Possible IP address
+        * @return bool
+        */
+       public static function isIPv4( $ip ) {
+               return (bool)preg_match( '/^' . RE_IP_ADD . '(?:\/' . RE_IP_PREFIX . ')?$/', $ip );
+       }
+
+       /**
+        * Validate an IP address. Ranges are NOT considered valid.
+        * SIIT IPv4-translated addresses are rejected.
+        * @note canonicalize() tries to convert translated addresses to IPv4.
+        *
+        * @param string $ip
+        * @return bool True if it is valid
+        */
+       public static function isValid( $ip ) {
+               return ( preg_match( '/^' . RE_IP_ADD . '$/', $ip )
+                       || preg_match( '/^' . RE_IPV6_ADD . '$/', $ip ) );
+       }
+
+       /**
+        * Validate an IP Block (valid address WITH a valid prefix).
+        * SIIT IPv4-translated addresses are rejected.
+        * @note canonicalize() tries to convert translated addresses to IPv4.
+        *
+        * @param string $ipblock
+        * @return bool True if it is valid
+        */
+       public static function isValidBlock( $ipblock ) {
+               return ( preg_match( '/^' . RE_IPV6_BLOCK . '$/', $ipblock )
+                       || preg_match( '/^' . RE_IP_BLOCK . '$/', $ipblock ) );
+       }
+
+       /**
+        * Convert an IP into a verbose, uppercase, normalized form.
+        * Both IPv4 and IPv6 addresses are trimmed. Additionally,
+        * IPv6 addresses in octet notation are expanded to 8 words;
+        * IPv4 addresses have leading zeros, in each octet, removed.
+        *
+        * @param string $ip IP address in quad or octet form (CIDR or not).
+        * @return string
+        */
+       public static function sanitizeIP( $ip ) {
+               $ip = trim( $ip );
+               if ( $ip === '' ) {
+                       return null;
+               }
+               /* If not an IP, just return trimmed value, since sanitizeIP() is called
+                * in a number of contexts where usernames are supplied as input.
+                */
+               if ( !self::isIPAddress( $ip ) ) {
+                       return $ip;
+               }
+               if ( self::isIPv4( $ip ) ) {
+                       // Remove leading 0's from octet representation of IPv4 address
+                       $ip = preg_replace( '/(?:^|(?<=\.))0+(?=[1-9]|0\.|0$)/', '', $ip );
+                       return $ip;
+               }
+               // Remove any whitespaces, convert to upper case
+               $ip = strtoupper( $ip );
+               // Expand zero abbreviations
+               $abbrevPos = strpos( $ip, '::' );
+               if ( $abbrevPos !== false ) {
+                       // We know this is valid IPv6. Find the last index of the
+                       // address before any CIDR number (e.g. "a:b:c::/24").
+                       $CIDRStart = strpos( $ip, "/" );
+                       $addressEnd = ( $CIDRStart !== false )
+                               ? $CIDRStart - 1
+                               : strlen( $ip ) - 1;
+                       // If the '::' is at the beginning...
+                       if ( $abbrevPos == 0 ) {
+                               $repeat = '0:';
+                               $extra = ( $ip == '::' ) ? '0' : ''; // for the address '::'
+                               $pad = 9; // 7+2 (due to '::')
+                       // If the '::' is at the end...
+                       } elseif ( $abbrevPos == ( $addressEnd - 1 ) ) {
+                               $repeat = ':0';
+                               $extra = '';
+                               $pad = 9; // 7+2 (due to '::')
+                       // If the '::' is in the middle...
+                       } else {
+                               $repeat = ':0';
+                               $extra = ':';
+                               $pad = 8; // 6+2 (due to '::')
+                       }
+                       $ip = str_replace( '::',
+                               str_repeat( $repeat, $pad - substr_count( $ip, ':' ) ) . $extra,
+                               $ip
+                       );
+               }
+               // Remove leading zeros from each bloc as needed
+               $ip = preg_replace( '/(^|:)0+(' . RE_IPV6_WORD . ')/', '$1$2', $ip );
+
+               return $ip;
+       }
+
+       /**
+        * Prettify an IP for display to end users.
+        * This will make it more compact and lower-case.
+        *
+        * @param string $ip
+        * @return string
+        */
+       public static function prettifyIP( $ip ) {
+               $ip = self::sanitizeIP( $ip ); // normalize (removes '::')
+               if ( self::isIPv6( $ip ) ) {
+                       // Split IP into an address and a CIDR
+                       if ( strpos( $ip, '/' ) !== false ) {
+                               list( $ip, $cidr ) = explode( '/', $ip, 2 );
+                       } else {
+                               list( $ip, $cidr ) = [ $ip, '' ];
+                       }
+                       // Get the largest slice of words with multiple zeros
+                       $offset = 0;
+                       $longest = $longestPos = false;
+                       while ( preg_match(
+                               '!(?:^|:)0(?::0)+(?:$|:)!', $ip, $m, PREG_OFFSET_CAPTURE, $offset
+                       ) ) {
+                               list( $match, $pos ) = $m[0]; // full match
+                               if ( strlen( $match ) > strlen( $longest ) ) {
+                                       $longest = $match;
+                                       $longestPos = $pos;
+                               }
+                               $offset = ( $pos + strlen( $match ) ); // advance
+                       }
+                       if ( $longest !== false ) {
+                               // Replace this portion of the string with the '::' abbreviation
+                               $ip = substr_replace( $ip, '::', $longestPos, strlen( $longest ) );
+                       }
+                       // Add any CIDR back on
+                       if ( $cidr !== '' ) {
+                               $ip = "{$ip}/{$cidr}";
+                       }
+                       // Convert to lower case to make it more readable
+                       $ip = strtolower( $ip );
+               }
+
+               return $ip;
+       }
+
+       /**
+        * Given a host/port string, like one might find in the host part of a URL
+        * per RFC 2732, split the hostname part and the port part and return an
+        * array with an element for each. If there is no port part, the array will
+        * have false in place of the port. If the string was invalid in some way,
+        * false is returned.
+        *
+        * This was easy with IPv4 and was generally done in an ad-hoc way, but
+        * with IPv6 it's somewhat more complicated due to the need to parse the
+        * square brackets and colons.
+        *
+        * A bare IPv6 address is accepted despite the lack of square brackets.
+        *
+        * @param string $both The string with the host and port
+        * @return array|false Array normally, false on certain failures
+        */
+       public static function splitHostAndPort( $both ) {
+               if ( substr( $both, 0, 1 ) === '[' ) {
+                       if ( preg_match( '/^\[(' . RE_IPV6_ADD . ')\](?::(?P<port>\d+))?$/', $both, $m ) ) {
+                               if ( isset( $m['port'] ) ) {
+                                       return [ $m[1], intval( $m['port'] ) ];
+                               } else {
+                                       return [ $m[1], false ];
+                               }
+                       } else {
+                               // Square bracket found but no IPv6
+                               return false;
+                       }
+               }
+               $numColons = substr_count( $both, ':' );
+               if ( $numColons >= 2 ) {
+                       // Is it a bare IPv6 address?
+                       if ( preg_match( '/^' . RE_IPV6_ADD . '$/', $both ) ) {
+                               return [ $both, false ];
+                       } else {
+                               // Not valid IPv6, but too many colons for anything else
+                               return false;
+                       }
+               }
+               if ( $numColons >= 1 ) {
+                       // Host:port?
+                       $bits = explode( ':', $both );
+                       if ( preg_match( '/^\d+/', $bits[1] ) ) {
+                               return [ $bits[0], intval( $bits[1] ) ];
+                       } else {
+                               // Not a valid port
+                               return false;
+                       }
+               }
+
+               // Plain hostname
+               return [ $both, false ];
+       }
+
+       /**
+        * Given a host name and a port, combine them into host/port string like
+        * you might find in a URL. If the host contains a colon, wrap it in square
+        * brackets like in RFC 2732. If the port matches the default port, omit
+        * the port specification
+        *
+        * @param string $host
+        * @param int $port
+        * @param bool|int $defaultPort
+        * @return string
+        */
+       public static function combineHostAndPort( $host, $port, $defaultPort = false ) {
+               if ( strpos( $host, ':' ) !== false ) {
+                       $host = "[$host]";
+               }
+               if ( $defaultPort !== false && $port == $defaultPort ) {
+                       return $host;
+               } else {
+                       return "$host:$port";
+               }
+       }
+
+       /**
+        * Convert an IPv4 or IPv6 hexadecimal representation back to readable format
+        *
+        * @param string $hex Number, with "v6-" prefix if it is IPv6
+        * @return string Quad-dotted (IPv4) or octet notation (IPv6)
+        */
+       public static function formatHex( $hex ) {
+               if ( substr( $hex, 0, 3 ) == 'v6-' ) { // IPv6
+                       return self::hexToOctet( substr( $hex, 3 ) );
+               } else { // IPv4
+                       return self::hexToQuad( $hex );
+               }
+       }
+
+       /**
+        * Converts a hexadecimal number to an IPv6 address in octet notation
+        *
+        * @param string $ip_hex Pure hex (no v6- prefix)
+        * @return string (of format a:b:c:d:e:f:g:h)
+        */
+       public static function hexToOctet( $ip_hex ) {
+               // Pad hex to 32 chars (128 bits)
+               $ip_hex = str_pad( strtoupper( $ip_hex ), 32, '0', STR_PAD_LEFT );
+               // Separate into 8 words
+               $ip_oct = substr( $ip_hex, 0, 4 );
+               for ( $n = 1; $n < 8; $n++ ) {
+                       $ip_oct .= ':' . substr( $ip_hex, 4 * $n, 4 );
+               }
+               // NO leading zeroes
+               $ip_oct = preg_replace( '/(^|:)0+(' . RE_IPV6_WORD . ')/', '$1$2', $ip_oct );
+
+               return $ip_oct;
+       }
+
+       /**
+        * Converts a hexadecimal number to an IPv4 address in quad-dotted notation
+        *
+        * @param string $ip_hex Pure hex
+        * @return string (of format a.b.c.d)
+        */
+       public static function hexToQuad( $ip_hex ) {
+               // Pad hex to 8 chars (32 bits)
+               $ip_hex = str_pad( strtoupper( $ip_hex ), 8, '0', STR_PAD_LEFT );
+               // Separate into four quads
+               $s = '';
+               for ( $i = 0; $i < 4; $i++ ) {
+                       if ( $s !== '' ) {
+                               $s .= '.';
+                       }
+                       $s .= base_convert( substr( $ip_hex, $i * 2, 2 ), 16, 10 );
+               }
+
+               return $s;
+       }
+
+       /**
+        * Determine if an IP address really is an IP address, and if it is public,
+        * i.e. not RFC 1918 or similar
+        *
+        * @param string $ip
+        * @return bool
+        */
+       public static function isPublic( $ip ) {
+               static $privateSet = null;
+               if ( !$privateSet ) {
+                       $privateSet = new IPSet( [
+                               '10.0.0.0/8', # RFC 1918 (private)
+                               '172.16.0.0/12', # RFC 1918 (private)
+                               '192.168.0.0/16', # RFC 1918 (private)
+                               '0.0.0.0/8', # this network
+                               '127.0.0.0/8', # loopback
+                               'fc00::/7', # RFC 4193 (local)
+                               '0:0:0:0:0:0:0:1', # loopback
+                               '169.254.0.0/16', # link-local
+                               'fe80::/10', # link-local
+                       ] );
+               }
+               return !$privateSet->match( $ip );
+       }
+
+       /**
+        * Return a zero-padded upper case hexadecimal representation of an IP address.
+        *
+        * Hexadecimal addresses are used because they can easily be extended to
+        * IPv6 support. To separate the ranges, the return value from this
+        * function for an IPv6 address will be prefixed with "v6-", a non-
+        * hexadecimal string which sorts after the IPv4 addresses.
+        *
+        * @param string $ip Quad dotted/octet IP address.
+        * @return string|bool False on failure
+        */
+       public static function toHex( $ip ) {
+               if ( self::isIPv6( $ip ) ) {
+                       $n = 'v6-' . self::IPv6ToRawHex( $ip );
+               } elseif ( self::isIPv4( $ip ) ) {
+                       // T62035/T97897: An IP with leading 0's fails in ip2long sometimes (e.g. *.08),
+                       // also double/triple 0 needs to be changed to just a single 0 for ip2long.
+                       $ip = self::sanitizeIP( $ip );
+                       $n = ip2long( $ip );
+                       if ( $n < 0 ) {
+                               $n += pow( 2, 32 );
+                               # On 32-bit platforms (and on Windows), 2^32 does not fit into an int,
+                               # so $n becomes a float. We convert it to string instead.
+                               if ( is_float( $n ) ) {
+                                       $n = (string)$n;
+                               }
+                       }
+                       if ( $n !== false ) {
+                               # Floating points can handle the conversion; faster than Wikimedia\base_convert()
+                               $n = strtoupper( str_pad( base_convert( $n, 10, 16 ), 8, '0', STR_PAD_LEFT ) );
+                       }
+               } else {
+                       $n = false;
+               }
+
+               return $n;
+       }
+
+       /**
+        * Given an IPv6 address in octet notation, returns a pure hex string.
+        *
+        * @param string $ip Octet ipv6 IP address.
+        * @return string|bool Pure hex (uppercase); false on failure
+        */
+       private static function IPv6ToRawHex( $ip ) {
+               $ip = self::sanitizeIP( $ip );
+               if ( !$ip ) {
+                       return false;
+               }
+               $r_ip = '';
+               foreach ( explode( ':', $ip ) as $v ) {
+                       $r_ip .= str_pad( $v, 4, 0, STR_PAD_LEFT );
+               }
+
+               return $r_ip;
+       }
+
+       /**
+        * Convert a network specification in CIDR notation
+        * to an integer network and a number of bits
+        *
+        * @param string $range IP with CIDR prefix
+        * @return array(int or string, int)
+        */
+       public static function parseCIDR( $range ) {
+               if ( self::isIPv6( $range ) ) {
+                       return self::parseCIDR6( $range );
+               }
+               $parts = explode( '/', $range, 2 );
+               if ( count( $parts ) != 2 ) {
+                       return [ false, false ];
+               }
+               list( $network, $bits ) = $parts;
+               $network = ip2long( $network );
+               if ( $network !== false && is_numeric( $bits ) && $bits >= 0 && $bits <= 32 ) {
+                       if ( $bits == 0 ) {
+                               $network = 0;
+                       } else {
+                               $network &= ~( ( 1 << ( 32 - $bits ) ) - 1 );
+                       }
+                       # Convert to unsigned
+                       if ( $network < 0 ) {
+                               $network += pow( 2, 32 );
+                       }
+               } else {
+                       $network = false;
+                       $bits = false;
+               }
+
+               return [ $network, $bits ];
+       }
+
+       /**
+        * Given a string range in a number of formats,
+        * return the start and end of the range in hexadecimal.
+        *
+        * Formats are:
+        *     1.2.3.4/24          CIDR
+        *     1.2.3.4 - 1.2.3.5   Explicit range
+        *     1.2.3.4             Single IP
+        *
+        *     2001:0db8:85a3::7344/96                       CIDR
+        *     2001:0db8:85a3::7344 - 2001:0db8:85a3::7344   Explicit range
+        *     2001:0db8:85a3::7344                          Single IP
+        * @param string $range IP range
+        * @return array(string, string)
+        */
+       public static function parseRange( $range ) {
+               // CIDR notation
+               if ( strpos( $range, '/' ) !== false ) {
+                       if ( self::isIPv6( $range ) ) {
+                               return self::parseRange6( $range );
+                       }
+                       list( $network, $bits ) = self::parseCIDR( $range );
+                       if ( $network === false ) {
+                               $start = $end = false;
+                       } else {
+                               $start = sprintf( '%08X', $network );
+                               $end = sprintf( '%08X', $network + pow( 2, ( 32 - $bits ) ) - 1 );
+                       }
+               // Explicit range
+               } elseif ( strpos( $range, '-' ) !== false ) {
+                       list( $start, $end ) = array_map( 'trim', explode( '-', $range, 2 ) );
+                       if ( self::isIPv6( $start ) && self::isIPv6( $end ) ) {
+                               return self::parseRange6( $range );
+                       }
+                       if ( self::isIPv4( $start ) && self::isIPv4( $end ) ) {
+                               $start = self::toHex( $start );
+                               $end = self::toHex( $end );
+                               if ( $start > $end ) {
+                                       $start = $end = false;
+                               }
+                       } else {
+                               $start = $end = false;
+                       }
+               } else {
+                       # Single IP
+                       $start = $end = self::toHex( $range );
+               }
+               if ( $start === false || $end === false ) {
+                       return [ false, false ];
+               } else {
+                       return [ $start, $end ];
+               }
+       }
+
+       /**
+        * Convert a network specification in IPv6 CIDR notation to an
+        * integer network and a number of bits
+        *
+        * @param string $range
+        *
+        * @return array(string, int)
+        */
+       private static function parseCIDR6( $range ) {
+               # Explode into <expanded IP,range>
+               $parts = explode( '/', IP::sanitizeIP( $range ), 2 );
+               if ( count( $parts ) != 2 ) {
+                       return [ false, false ];
+               }
+               list( $network, $bits ) = $parts;
+               $network = self::IPv6ToRawHex( $network );
+               if ( $network !== false && is_numeric( $bits ) && $bits >= 0 && $bits <= 128 ) {
+                       if ( $bits == 0 ) {
+                               $network = "0";
+                       } else {
+                               # Native 32 bit functions WONT work here!!!
+                               # Convert to a padded binary number
+                               $network = Wikimedia\base_convert( $network, 16, 2, 128 );
+                               # Truncate the last (128-$bits) bits and replace them with zeros
+                               $network = str_pad( substr( $network, 0, $bits ), 128, 0, STR_PAD_RIGHT );
+                               # Convert back to an integer
+                               $network = Wikimedia\base_convert( $network, 2, 10 );
+                       }
+               } else {
+                       $network = false;
+                       $bits = false;
+               }
+
+               return [ $network, (int)$bits ];
+       }
+
+       /**
+        * Given a string range in a number of formats, return the
+        * start and end of the range in hexadecimal. For IPv6.
+        *
+        * Formats are:
+        *     2001:0db8:85a3::7344/96                       CIDR
+        *     2001:0db8:85a3::7344 - 2001:0db8:85a3::7344   Explicit range
+        *     2001:0db8:85a3::7344/96                       Single IP
+        *
+        * @param string $range
+        *
+        * @return array(string, string)
+        */
+       private static function parseRange6( $range ) {
+               # Expand any IPv6 IP
+               $range = IP::sanitizeIP( $range );
+               // CIDR notation...
+               if ( strpos( $range, '/' ) !== false ) {
+                       list( $network, $bits ) = self::parseCIDR6( $range );
+                       if ( $network === false ) {
+                               $start = $end = false;
+                       } else {
+                               $start = Wikimedia\base_convert( $network, 10, 16, 32, false );
+                               # Turn network to binary (again)
+                               $end = Wikimedia\base_convert( $network, 10, 2, 128 );
+                               # Truncate the last (128-$bits) bits and replace them with ones
+                               $end = str_pad( substr( $end, 0, $bits ), 128, 1, STR_PAD_RIGHT );
+                               # Convert to hex
+                               $end = Wikimedia\base_convert( $end, 2, 16, 32, false );
+                               # see toHex() comment
+                               $start = "v6-$start";
+                               $end = "v6-$end";
+                       }
+               // Explicit range notation...
+               } elseif ( strpos( $range, '-' ) !== false ) {
+                       list( $start, $end ) = array_map( 'trim', explode( '-', $range, 2 ) );
+                       $start = self::toHex( $start );
+                       $end = self::toHex( $end );
+                       if ( $start > $end ) {
+                               $start = $end = false;
+                       }
+               } else {
+                       # Single IP
+                       $start = $end = self::toHex( $range );
+               }
+               if ( $start === false || $end === false ) {
+                       return [ false, false ];
+               } else {
+                       return [ $start, $end ];
+               }
+       }
+
+       /**
+        * Determine if a given IPv4/IPv6 address is in a given CIDR network
+        *
+        * @param string $addr The address to check against the given range.
+        * @param string $range The range to check the given address against.
+        * @return bool Whether or not the given address is in the given range.
+        *
+        * @note This can return unexpected results for invalid arguments!
+        *       Make sure you pass a valid IP address and IP range.
+        */
+       public static function isInRange( $addr, $range ) {
+               $hexIP = self::toHex( $addr );
+               list( $start, $end ) = self::parseRange( $range );
+
+               return ( strcmp( $hexIP, $start ) >= 0 &&
+                       strcmp( $hexIP, $end ) <= 0 );
+       }
+
+       /**
+        * Determines if an IP address is a list of CIDR a.b.c.d/n ranges.
+        *
+        * @since 1.25
+        *
+        * @param string $ip the IP to check
+        * @param array $ranges the IP ranges, each element a range
+        *
+        * @return bool true if the specified adress belongs to the specified range; otherwise, false.
+        */
+       public static function isInRanges( $ip, $ranges ) {
+               foreach ( $ranges as $range ) {
+                       if ( self::isInRange( $ip, $range ) ) {
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+       /**
+        * Convert some unusual representations of IPv4 addresses to their
+        * canonical dotted quad representation.
+        *
+        * This currently only checks a few IPV4-to-IPv6 related cases.  More
+        * unusual representations may be added later.
+        *
+        * @param string $addr Something that might be an IP address
+        * @return string|null Valid dotted quad IPv4 address or null
+        */
+       public static function canonicalize( $addr ) {
+               // remove zone info (bug 35738)
+               $addr = preg_replace( '/\%.*/', '', $addr );
+
+               if ( self::isValid( $addr ) ) {
+                       return $addr;
+               }
+               // Turn mapped addresses from ::ce:ffff:1.2.3.4 to 1.2.3.4
+               if ( strpos( $addr, ':' ) !== false && strpos( $addr, '.' ) !== false ) {
+                       $addr = substr( $addr, strrpos( $addr, ':' ) + 1 );
+                       if ( self::isIPv4( $addr ) ) {
+                               return $addr;
+                       }
+               }
+               // IPv6 loopback address
+               $m = [];
+               if ( preg_match( '/^0*' . RE_IPV6_GAP . '1$/', $addr, $m ) ) {
+                       return '127.0.0.1';
+               }
+               // IPv4-mapped and IPv4-compatible IPv6 addresses
+               if ( preg_match( '/^' . RE_IPV6_V4_PREFIX . '(' . RE_IP_ADD . ')$/i', $addr, $m ) ) {
+                       return $m[1];
+               }
+               if ( preg_match( '/^' . RE_IPV6_V4_PREFIX . RE_IPV6_WORD .
+                       ':' . RE_IPV6_WORD . '$/i', $addr, $m )
+               ) {
+                       return long2ip( ( hexdec( $m[1] ) << 16 ) + hexdec( $m[2] ) );
+               }
+
+               return null; // give up
+       }
+
+       /**
+        * Gets rid of unneeded numbers in quad-dotted/octet IP strings
+        * For example, 127.111.113.151/24 -> 127.111.113.0/24
+        * @param string $range IP address to normalize
+        * @return string
+        */
+       public static function sanitizeRange( $range ) {
+               list( /*...*/, $bits ) = self::parseCIDR( $range );
+               list( $start, /*...*/ ) = self::parseRange( $range );
+               $start = self::formatHex( $start );
+               if ( $bits === false ) {
+                       return $start; // wasn't actually a range
+               }
+
+               return "$start/$bits";
+       }
+
+       /**
+        * Returns the subnet of a given IP
+        *
+        * @param string $ip
+        * @return string|false
+        */
+       public static function getSubnet( $ip ) {
+               $matches = [];
+               $subnet = false;
+               if ( IP::isIPv6( $ip ) ) {
+                       $parts = IP::parseRange( "$ip/64" );
+                       $subnet = $parts[0];
+               } elseif ( preg_match( '/^(\d+\.\d+\.\d+)\.\d+$/', $ip, $matches ) ) {
+                       // IPv4
+                       $subnet = $matches[1];
+               }
+               return $subnet;
+       }
+}
diff --git a/includes/libs/MWCryptHash.php b/includes/libs/MWCryptHash.php
new file mode 100644 (file)
index 0000000..f9b7172
--- /dev/null
@@ -0,0 +1,114 @@
+<?php
+/**
+ * Utility functions for generating hashes
+ *
+ * This is based in part on Drupal code as well as what we used in our own code
+ * prior to introduction of this class, by way of MWCryptRand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+class MWCryptHash {
+       /**
+        * The hash algorithm being used
+        */
+       protected static $algo = null;
+
+       /**
+        * The number of bytes outputted by the hash algorithm
+        */
+       protected static $hashLength = [
+               true => null,
+               false => null,
+       ];
+
+       /**
+        * Decide on the best acceptable hash algorithm we have available for hash()
+        * @return string A hash algorithm
+        */
+       public static function hashAlgo() {
+               if ( !is_null( self::$algo ) ) {
+                       return self::$algo;
+               }
+
+               $algos = hash_algos();
+               $preference = [ 'whirlpool', 'sha256', 'sha1', 'md5' ];
+
+               foreach ( $preference as $algorithm ) {
+                       if ( in_array( $algorithm, $algos ) ) {
+                               self::$algo = $algorithm;
+
+                               return self::$algo;
+                       }
+               }
+
+               // We only reach here if no acceptable hash is found in the list, this should
+               // be a technical impossibility since most of php's hash list is fixed and
+               // some of the ones we list are available as their own native functions
+               // But since we already require at least 5.2 and hash() was default in
+               // 5.1.2 we don't bother falling back to methods like sha1 and md5.
+               throw new DomainException( "Could not find an acceptable hashing function in hash_algos()" );
+       }
+
+       /**
+        * Return the byte-length output of the hash algorithm we are
+        * using in self::hash and self::hmac.
+        *
+        * @param bool $raw True to return the length for binary data, false to
+        *   return for hex-encoded
+        * @return int Number of bytes the hash outputs
+        */
+       public static function hashLength( $raw = true ) {
+               $raw = (bool)$raw;
+               if ( is_null( self::$hashLength[$raw] ) ) {
+                       self::$hashLength[$raw] = strlen( self::hash( '', $raw ) );
+               }
+
+               return self::$hashLength[$raw];
+       }
+
+       /**
+        * Generate an acceptably unstable one-way-hash of some text
+        * making use of the best hash algorithm that we have available.
+        *
+        * @param string $data
+        * @param bool $raw True to return binary data, false to return it hex-encoded
+        * @return string A hash of the data
+        */
+       public static function hash( $data, $raw = true ) {
+               return hash( self::hashAlgo(), $data, $raw );
+       }
+
+       /**
+        * Generate an acceptably unstable one-way-hmac of some text
+        * making use of the best hash algorithm that we have available.
+        *
+        * @param string $data
+        * @param string $key
+        * @param bool $raw True to return binary data, false to return it hex-encoded
+        * @return string An hmac hash of the data + key
+        */
+       public static function hmac( $data, $key, $raw = true ) {
+               if ( !is_string( $key ) ) {
+                       // a fatal error in HHVM; an exception will at least give us a stack trace
+                       throw new InvalidArgumentException( 'Invalid key type: ' . gettype( $key ) );
+               }
+               return hash_hmac( self::hashAlgo(), $data, $key, $raw );
+       }
+
+}
index 50e9732..12a5cad 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * APC-backed function memoization
+ * APC-backed and APCu-backed function memoization
  *
  * This class provides memoization for pure functions. A function is pure
  * if its result value depends on nothing other than its input parameters
@@ -8,7 +8,7 @@
  *
  * The first invocation of the memoized callable with a particular set of
  * arguments will be delegated to the underlying callable. Repeat invocations
- * with the same input parameters will be served from APC.
+ * with the same input parameters will be served from APC or APCu.
  *
  * @par Example:
  * @code
@@ -70,7 +70,7 @@ class MemoizedCallable {
        }
 
        /**
-        * Fetch the result of a previous invocation from APC.
+        * Fetch the result of a previous invocation from APC or APCu.
         *
         * @param string $key
         * @param bool &$success
@@ -79,12 +79,14 @@ class MemoizedCallable {
                $success = false;
                if ( function_exists( 'apc_fetch' ) ) {
                        return apc_fetch( $key, $success );
+               } elseif ( function_exists( 'apcu_fetch' ) ) {
+                       return apcu_fetch( $key, $success );
                }
                return false;
        }
 
        /**
-        * Store the result of an invocation in APC.
+        * Store the result of an invocation in APC or APCu.
         *
         * @param string $key
         * @param mixed $result
@@ -92,6 +94,8 @@ class MemoizedCallable {
        protected function storeResult( $key, $result ) {
                if ( function_exists( 'apc_store' ) ) {
                        apc_store( $key, $result, $this->ttl );
+               } elseif ( function_exists( 'apcu_store' ) ) {
+                       apcu_store( $key, $result, $this->ttl );
                }
        }
 
index 320a0b6..a870204 100644 (file)
@@ -184,14 +184,12 @@ class MultiHttpClient {
                unset( $req ); // don't assign over this by accident
 
                $indexes = array_keys( $reqs );
-               if ( function_exists( 'curl_multi_setopt' ) ) { // PHP 5.5
-                       if ( isset( $opts['usePipelining'] ) ) {
-                               curl_multi_setopt( $chm, CURLMOPT_PIPELINING, (int)$opts['usePipelining'] );
-                       }
-                       if ( isset( $opts['maxConnsPerHost'] ) ) {
-                               // Keep these sockets around as they may be needed later in the request
-                               curl_multi_setopt( $chm, CURLMOPT_MAXCONNECTS, (int)$opts['maxConnsPerHost'] );
-                       }
+               if ( isset( $opts['usePipelining'] ) ) {
+                       curl_multi_setopt( $chm, CURLMOPT_PIPELINING, (int)$opts['usePipelining'] );
+               }
+               if ( isset( $opts['maxConnsPerHost'] ) ) {
+                       // Keep these sockets around as they may be needed later in the request
+                       curl_multi_setopt( $chm, CURLMOPT_MAXCONNECTS, (int)$opts['maxConnsPerHost'] );
                }
 
                // @TODO: use a per-host rolling handle window (e.g. CURLMOPT_MAX_HOST_CONNECTIONS)
@@ -258,10 +256,8 @@ class MultiHttpClient {
                unset( $req ); // don't assign over this by accident
 
                // Restore the default settings
-               if ( function_exists( 'curl_multi_setopt' ) ) { // PHP 5.5
-                       curl_multi_setopt( $chm, CURLMOPT_PIPELINING, (int)$this->usePipelining );
-                       curl_multi_setopt( $chm, CURLMOPT_MAXCONNECTS, (int)$this->maxConnsPerHost );
-               }
+               curl_multi_setopt( $chm, CURLMOPT_PIPELINING, (int)$this->usePipelining );
+               curl_multi_setopt( $chm, CURLMOPT_MAXCONNECTS, (int)$this->maxConnsPerHost );
 
                return $reqs;
        }
@@ -292,12 +288,7 @@ class MultiHttpClient {
                curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
 
                $url = $req['url'];
-               // PHP_QUERY_RFC3986 is PHP 5.4+ only
-               $query = str_replace(
-                       [ '+', '%7E' ],
-                       [ '%20', '~' ],
-                       http_build_query( $req['query'], '', '&' )
-               );
+               $query = http_build_query( $req['query'], '', '&', PHP_QUERY_RFC3986 );
                if ( $query != '' ) {
                        $url .= strpos( $req['url'], '?' ) === false ? "?$query" : "&$query";
                }
@@ -351,7 +342,7 @@ class MultiHttpClient {
                                // In PHP 5.2 and later, '@' is interpreted as a file upload if POSTFIELDS
                                // is an array, but not if it's a string. So convert $req['body'] to a string
                                // for safety.
-                               $req['body'] = wfArrayToCgi( $req['body'] );
+                               $req['body'] = http_build_query( $req['body'] );
                        }
                        curl_setopt( $ch, CURLOPT_POSTFIELDS, $req['body'] );
                } else {
@@ -422,10 +413,8 @@ class MultiHttpClient {
        protected function getCurlMulti() {
                if ( !$this->multiHandle ) {
                        $cmh = curl_multi_init();
-                       if ( function_exists( 'curl_multi_setopt' ) ) { // PHP 5.5
-                               curl_multi_setopt( $cmh, CURLMOPT_PIPELINING, (int)$this->usePipelining );
-                               curl_multi_setopt( $cmh, CURLMOPT_MAXCONNECTS, (int)$this->maxConnsPerHost );
-                       }
+                       curl_multi_setopt( $cmh, CURLMOPT_PIPELINING, (int)$this->usePipelining );
+                       curl_multi_setopt( $cmh, CURLMOPT_MAXCONNECTS, (int)$this->maxConnsPerHost );
                        $this->multiHandle = $cmh;
                }
                return $this->multiHandle;
diff --git a/includes/libs/SamplingStatsdClient.php b/includes/libs/SamplingStatsdClient.php
deleted file mode 100644 (file)
index dd1976c..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-<?php
-/**
- * Copyright 2015
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-use Liuggio\StatsdClient\StatsdClient;
-use Liuggio\StatsdClient\Entity\StatsdData;
-use Liuggio\StatsdClient\Entity\StatsdDataInterface;
-
-/**
- * A statsd client that applies the sampling rate to the data items before sending them.
- *
- * @since 1.26
- */
-class SamplingStatsdClient extends StatsdClient {
-       protected $samplingRates = [];
-
-       /**
-        * Sampling rates as an associative array of patterns and rates.
-        * Patterns are Unix shell patterns (e.g. 'MediaWiki.api.*').
-        * Rates are sampling probabilities (e.g. 0.1 means 1 in 10 events are sampled).
-        * @param array $samplingRates
-        * @since 1.28
-        */
-       public function setSamplingRates( array $samplingRates ) {
-               $this->samplingRates = $samplingRates;
-       }
-
-       /**
-        * Sets sampling rate for all items in $data.
-        * The sample rate specified in a StatsdData entity overrides the sample rate specified here.
-        *
-        * {@inheritDoc}
-        */
-       public function appendSampleRate( $data, $sampleRate = 1 ) {
-               $samplingRates = $this->samplingRates;
-               if ( !$samplingRates && $sampleRate !== 1 ) {
-                       $samplingRates = [ '*' => $sampleRate ];
-               }
-               if ( $samplingRates ) {
-                       array_walk( $data, function( $item ) use ( $samplingRates ) {
-                               /** @var $item StatsdData */
-                               foreach ( $samplingRates as $pattern => $rate ) {
-                                       if ( fnmatch( $pattern, $item->getKey(), FNM_NOESCAPE ) ) {
-                                               $item->setSampleRate( $item->getSampleRate() * $rate );
-                                               break;
-                                       }
-                               }
-                       } );
-               }
-
-               return $data;
-       }
-
-       /*
-        * Send the metrics over UDP
-        * Sample the metrics according to their sample rate and send the remaining ones.
-        *
-        * @param StatsdDataInterface|StatsdDataInterface[] $data message(s) to sent
-        *        strings are not allowed here as sampleData requires a StatsdDataInterface
-        * @param int $sampleRate
-        *
-        * @return integer the data sent in bytes
-        */
-       public function send( $data, $sampleRate = 1 ) {
-               if ( !is_array( $data ) ) {
-                       $data = [ $data ];
-               }
-               if ( !$data ) {
-                       return;
-               }
-               foreach ( $data as $item ) {
-                       if ( !( $item instanceof StatsdDataInterface ) ) {
-                               throw new InvalidArgumentException(
-                                       'SamplingStatsdClient does not accept stringified messages' );
-                       }
-               }
-
-               // add sampling
-               $data = $this->appendSampleRate( $data, $sampleRate );
-               $data = $this->sampleData( $data );
-
-               $data = array_map( 'strval', $data );
-
-               // reduce number of packets
-               if ( $this->getReducePacket() ) {
-                       $data = $this->reduceCount( $data );
-               }
-
-               // failures in any of this should be silently ignored if ..
-               $written = 0;
-               try {
-                       $fp = $this->getSender()->open();
-                       if ( !$fp ) {
-                               return;
-                       }
-                       foreach ( $data as $message ) {
-                               $written += $this->getSender()->write( $fp, $message );
-                       }
-                       $this->getSender()->close( $fp );
-               } catch ( Exception $e ) {
-                       $this->throwException( $e );
-               }
-
-               return $written;
-       }
-
-       /**
-        * Throw away some of the data according to the sample rate.
-        * @param StatsdDataInterface[] $data
-        * @return StatsdDataInterface[]
-        * @throws LogicException
-        */
-       protected function sampleData( $data ) {
-               $newData = [];
-               $mt_rand_max = mt_getrandmax();
-               foreach ( $data as $item ) {
-                       $samplingRate = $item->getSampleRate();
-                       if ( $samplingRate <= 0.0 || $samplingRate > 1.0 ) {
-                               throw new LogicException( 'Sampling rate shall be within ]0, 1]' );
-                       }
-                       if (
-                               $samplingRate === 1 ||
-                               ( mt_rand() / $mt_rand_max <= $samplingRate )
-                       ) {
-                               $newData[] = $item;
-                       }
-               }
-               return $newData;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       protected function throwException( Exception $exception ) {
-               if ( !$this->getFailSilently() ) {
-                       throw $exception;
-               }
-       }
-}
diff --git a/includes/libs/ScopedCallback.php b/includes/libs/ScopedCallback.php
deleted file mode 100644 (file)
index 96075aa..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-/**
- * This file deals with RAII style scoped callbacks.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-/**
- * Class for asserting that a callback happens when an dummy object leaves scope
- *
- * @since 1.21
- */
-class ScopedCallback {
-       /** @var callable */
-       protected $callback;
-       /** @var array */
-       protected $params;
-
-       /**
-        * @param callable|null $callback
-        * @param array $params Callback arguments (since 1.25)
-        * @throws Exception
-        */
-       public function __construct( $callback, array $params = [] ) {
-               if ( $callback !== null && !is_callable( $callback ) ) {
-                       throw new InvalidArgumentException( "Provided callback is not valid." );
-               }
-               $this->callback = $callback;
-               $this->params = $params;
-       }
-
-       /**
-        * Trigger a scoped callback and destroy it.
-        * This is the same is just setting it to null.
-        *
-        * @param ScopedCallback $sc
-        */
-       public static function consume( ScopedCallback &$sc = null ) {
-               $sc = null;
-       }
-
-       /**
-        * Destroy a scoped callback without triggering it
-        *
-        * @param ScopedCallback $sc
-        */
-       public static function cancel( ScopedCallback &$sc = null ) {
-               if ( $sc ) {
-                       $sc->callback = null;
-               }
-               $sc = null;
-       }
-
-       /**
-        * Trigger the callback when this leaves scope
-        */
-       function __destruct() {
-               if ( $this->callback !== null ) {
-                       call_user_func_array( $this->callback, $this->params );
-               }
-       }
-}
index 1d23f9d..db085da 100644 (file)
@@ -58,7 +58,7 @@ class StatusValue {
         * Factory function for fatal errors
         *
         * @param string|MessageSpecifier $message Message key or object
-        * @return StatusValue
+        * @return static
         */
        public static function newFatal( $message /*, parameters...*/ ) {
                $params = func_get_args();
@@ -71,7 +71,7 @@ class StatusValue {
         * Factory function for good results
         *
         * @param mixed $value
-        * @return StatusValue
+        * @return static
         */
        public static function newGood( $value = null ) {
                $result = new static();
@@ -79,6 +79,34 @@ class StatusValue {
                return $result;
        }
 
+       /**
+        * Splits this StatusValue object into two new StatusValue objects, one which contains only
+        * the error messages, and one that contains the warnings, only. The returned array is
+        * defined as:
+        * [
+        *     0 => object(StatusValue) # the StatusValue with error messages, only
+        *         1 => object(StatusValue) # The StatusValue with warning messages, only
+        * ]
+        *
+        * @return StatusValue[]
+        */
+       public function splitByErrorType() {
+               $errorsOnlyStatusValue = clone $this;
+               $warningsOnlyStatusValue = clone $this;
+               $warningsOnlyStatusValue->ok = true;
+
+               $errorsOnlyStatusValue->errors = $warningsOnlyStatusValue->errors = [];
+               foreach ( $this->errors as $item ) {
+                       if ( $item['type'] === 'warning' ) {
+                               $warningsOnlyStatusValue->errors[] = $item;
+                       } else {
+                               $errorsOnlyStatusValue->errors[] = $item;
+                       }
+               };
+
+               return [ $errorsOnlyStatusValue, $warningsOnlyStatusValue ];
+       }
+
        /**
         * Returns whether the operation completed and didn't have any error or
         * warnings
@@ -132,7 +160,7 @@ class StatusValue {
         * @param mixed $value
         */
        public function setResult( $ok, $value = null ) {
-               $this->ok = $ok;
+               $this->ok = (bool)$ok;
                $this->value = $value;
        }
 
@@ -246,8 +274,8 @@ class StatusValue {
         * Note, due to the lack of tools for comparing IStatusMessage objects, this
         * function will not work when using such an object as the search parameter.
         *
-        * @param IStatusMessage|string $source Message key or object to search for
-        * @param IStatusMessage|string $dest Replacement message key or object
+        * @param MessageSpecifier|string $source Message key or object to search for
+        * @param MessageSpecifier|string $dest Replacement message key or object
         * @return bool Return true if the replacement was done, false otherwise.
         */
        public function replaceMessage( $source, $dest ) {
diff --git a/includes/libs/WaitConditionLoop.php b/includes/libs/WaitConditionLoop.php
deleted file mode 100644 (file)
index 969e86e..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-<?php
-/**
- * Wait loop that reaches a condition or times out.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @author Aaron Schulz
- */
-
-/**
- * Wait loop that reaches a condition or times out
- * @since 1.28
- */
-class WaitConditionLoop {
-       /** @var callable */
-       private $condition;
-       /** @var callable[] */
-       private $busyCallbacks = [];
-       /** @var float Seconds */
-       private $timeout;
-       /** @var float Seconds */
-       private $lastWaitTime;
-       /** @var integer|null */
-       private $rusageMode;
-
-       const CONDITION_REACHED = 1;
-       const CONDITION_CONTINUE = 0; // evaluates as falsey
-       const CONDITION_FAILED = -1;
-       const CONDITION_TIMED_OUT = -2;
-       const CONDITION_ABORTED = -3;
-
-       /**
-        * @param callable $condition Callback that returns a WaitConditionLoop::CONDITION_ constant
-        * @param float $timeout Timeout in seconds
-        * @param array &$busyCallbacks List of callbacks to do useful work (by reference)
-        */
-       public function __construct( callable $condition, $timeout = 5.0, &$busyCallbacks = [] ) {
-               $this->condition = $condition;
-               $this->timeout = $timeout;
-               $this->busyCallbacks =& $busyCallbacks;
-
-               if ( defined( 'HHVM_VERSION' ) && PHP_OS === 'Linux' ) {
-                       $this->rusageMode = 2; // RUSAGE_THREAD
-               } elseif ( function_exists( 'getrusage' ) ) {
-                       $this->rusageMode = 0; // RUSAGE_SELF
-               }
-       }
-
-       /**
-        * Invoke the loop and continue until either:
-        *   - a) The condition callback returns neither CONDITION_CONTINUE nor false
-        *   - b) The timeout is reached
-        * This a condition callback can return true (stop) or false (continue) for convenience.
-        * In such cases, the halting result of "true" will be converted to CONDITION_REACHED.
-        *
-        * If $timeout is 0, then only the condition callback will be called (no busy callbacks),
-        * and this will immediately return CONDITION_FAILED if the condition was not met.
-        *
-        * Exceptions in callbacks will be caught and the callback will be swapped with
-        * one that simply rethrows that exception back to the caller when invoked.
-        *
-        * @return integer WaitConditionLoop::CONDITION_* constant
-        * @throws Exception Any error from the condition callback
-        */
-       public function invoke() {
-               $elapsed = 0.0; // seconds
-               $sleepUs = 0; // microseconds to sleep each time
-               $lastCheck = false;
-               $finalResult = self::CONDITION_TIMED_OUT;
-               do {
-                       $checkStartTime = $this->getWallTime();
-                       // Check if the condition is met yet
-                       $realStart = $this->getWallTime();
-                       $cpuStart = $this->getCpuTime();
-                       $checkResult = call_user_func( $this->condition );
-                       $cpu = $this->getCpuTime() - $cpuStart;
-                       $real = $this->getWallTime() - $realStart;
-                       // Exit if the condition is reached, and error occurs, or this is non-blocking
-                       if ( $this->timeout <= 0 ) {
-                               $finalResult = $checkResult ? self::CONDITION_REACHED : self::CONDITION_FAILED;
-                               break;
-                       } elseif ( (int)$checkResult !== self::CONDITION_CONTINUE ) {
-                               if ( is_int( $checkResult ) ) {
-                                       $finalResult = $checkResult;
-                               } else {
-                                       $finalResult = self::CONDITION_REACHED;
-                               }
-                               break;
-                       } elseif ( $lastCheck ) {
-                               break; // timeout reached
-                       }
-                       // Detect if condition callback seems to block or if justs burns CPU
-                       $conditionUsesInterrupts = ( $real > 0.100 && $cpu <= $real * .03 );
-                       if ( !$this->popAndRunBusyCallback() && !$conditionUsesInterrupts ) {
-                               // 10 queries = 10(10+100)/2 ms = 550ms, 14 queries = 1050ms
-                               $sleepUs = min( $sleepUs + 10 * 1e3, 1e6 ); // stop incrementing at ~1s
-                               $this->usleep( $sleepUs );
-                       }
-                       $checkEndTime = $this->getWallTime();
-                       // The max() protects against the clock getting set back
-                       $elapsed += max( $checkEndTime - $checkStartTime, 0.010 );
-                       // Do not let slow callbacks timeout without checking the condition one more time
-                       $lastCheck = ( $elapsed >= $this->timeout );
-               } while ( true );
-
-               $this->lastWaitTime = $elapsed;
-
-               return $finalResult;
-       }
-
-       /**
-        * @return float Seconds
-        */
-       public function getLastWaitTime() {
-               return $this->lastWaitTime;
-       }
-
-       /**
-        * @param integer $microseconds
-        */
-       protected function usleep( $microseconds ) {
-               usleep( $microseconds );
-       }
-
-       /**
-        * @return float
-        */
-       protected function getWallTime() {
-               return microtime( true );
-       }
-
-       /**
-        * @return float Returns 0.0 if not supported (Windows on PHP < 7)
-        */
-       protected function getCpuTime() {
-               if ( $this->rusageMode === null ) {
-                       return microtime( true ); // assume worst case (all time is CPU)
-               }
-
-               $ru = getrusage( $this->rusageMode );
-               $time = $ru['ru_utime.tv_sec'] + $ru['ru_utime.tv_usec'] / 1e6;
-               $time += $ru['ru_stime.tv_sec'] + $ru['ru_stime.tv_usec'] / 1e6;
-
-               return $time;
-       }
-
-       /**
-        * Run one of the callbacks that does work ahead of time for another caller
-        *
-        * @return bool Whether a callback was executed
-        */
-       private function popAndRunBusyCallback() {
-               if ( $this->busyCallbacks ) {
-                       reset( $this->busyCallbacks );
-                       $key = key( $this->busyCallbacks );
-                       /** @var callable $workCallback */
-                       $workCallback =& $this->busyCallbacks[$key];
-                       try {
-                               $workCallback();
-                       } catch ( Exception $e ) {
-                               $workCallback = function () use ( $e ) {
-                                       throw $e;
-                               };
-                       }
-                       unset( $this->busyCallbacks[$key] ); // consume
-
-                       return true;
-               }
-
-               return false;
-       }
-}
diff --git a/includes/libs/XmlTypeCheck.php b/includes/libs/XmlTypeCheck.php
deleted file mode 100644 (file)
index f057140..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-<?php
-/**
- * XML syntax and type checker.
- *
- * Since 1.24.2, it uses XMLReader instead of xml_parse, which gives us
- * more control over the expansion of XML entities. When passed to the
- * callback, entities will be fully expanded, but may report the XML is
- * invalid if expanding the entities are likely to cause a DoS.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-class XmlTypeCheck {
-       /**
-        * Will be set to true or false to indicate whether the file is
-        * well-formed XML. Note that this doesn't check schema validity.
-        */
-       public $wellFormed = null;
-
-       /**
-        * Will be set to true if the optional element filter returned
-        * a match at some point.
-        */
-       public $filterMatch = false;
-
-       /**
-        * Will contain the type of filter hit if the optional element filter returned
-        * a match at some point.
-        * @var mixed
-        */
-       public $filterMatchType = false;
-
-       /**
-        * Name of the document's root element, including any namespace
-        * as an expanded URL.
-        */
-       public $rootElement = '';
-
-       /**
-        * A stack of strings containing the data of each xml element as it's processed. Append
-        * data to the top string of the stack, then pop off the string and process it when the
-        * element is closed.
-        */
-       protected $elementData = [];
-
-       /**
-        * A stack of element names and attributes, as we process them.
-        */
-       protected $elementDataContext = [];
-
-       /**
-        * Current depth of the data stack.
-        */
-       protected $stackDepth = 0;
-
-       /**
-        * Additional parsing options
-        */
-       private $parserOptions = [
-               'processing_instruction_handler' => '',
-       ];
-
-       /**
-        * @param string $input a filename or string containing the XML element
-        * @param callable $filterCallback (optional)
-        *        Function to call to do additional custom validity checks from the
-        *        SAX element handler event. This gives you access to the element
-        *        namespace, name, attributes, and text contents.
-        *        Filter should return 'true' to toggle on $this->filterMatch
-        * @param bool $isFile (optional) indicates if the first parameter is a
-        *        filename (default, true) or if it is a string (false)
-        * @param array $options list of additional parsing options:
-        *        processing_instruction_handler: Callback for xml_set_processing_instruction_handler
-        */
-       function __construct( $input, $filterCallback = null, $isFile = true, $options = [] ) {
-               $this->filterCallback = $filterCallback;
-               $this->parserOptions = array_merge( $this->parserOptions, $options );
-               $this->validateFromInput( $input, $isFile );
-       }
-
-       /**
-        * Alternative constructor: from filename
-        *
-        * @param string $fname the filename of an XML document
-        * @param callable $filterCallback (optional)
-        *        Function to call to do additional custom validity checks from the
-        *        SAX element handler event. This gives you access to the element
-        *        namespace, name, and attributes, but not to text contents.
-        *        Filter should return 'true' to toggle on $this->filterMatch
-        * @return XmlTypeCheck
-        */
-       public static function newFromFilename( $fname, $filterCallback = null ) {
-               return new self( $fname, $filterCallback, true );
-       }
-
-       /**
-        * Alternative constructor: from string
-        *
-        * @param string $string a string containing an XML element
-        * @param callable $filterCallback (optional)
-        *        Function to call to do additional custom validity checks from the
-        *        SAX element handler event. This gives you access to the element
-        *        namespace, name, and attributes, but not to text contents.
-        *        Filter should return 'true' to toggle on $this->filterMatch
-        * @return XmlTypeCheck
-        */
-       public static function newFromString( $string, $filterCallback = null ) {
-               return new self( $string, $filterCallback, false );
-       }
-
-       /**
-        * Get the root element. Simple accessor to $rootElement
-        *
-        * @return string
-        */
-       public function getRootElement() {
-               return $this->rootElement;
-       }
-
-       /**
-        * @param string $fname the filename
-        */
-       private function validateFromInput( $xml, $isFile ) {
-               $reader = new XMLReader();
-               if ( $isFile ) {
-                       $s = $reader->open( $xml, null, LIBXML_NOERROR | LIBXML_NOWARNING );
-               } else {
-                       $s = $reader->XML( $xml, null, LIBXML_NOERROR | LIBXML_NOWARNING );
-               }
-               if ( $s !== true ) {
-                       // Couldn't open the XML
-                       $this->wellFormed = false;
-               } else {
-                       $oldDisable = libxml_disable_entity_loader( true );
-                       $reader->setParserProperty( XMLReader::SUBST_ENTITIES, true );
-                       try {
-                               $this->validate( $reader );
-                       } catch ( Exception $e ) {
-                               // Calling this malformed, because we didn't parse the whole
-                               // thing. Maybe just an external entity refernce.
-                               $this->wellFormed = false;
-                               $reader->close();
-                               libxml_disable_entity_loader( $oldDisable );
-                               throw $e;
-                       }
-                       $reader->close();
-                       libxml_disable_entity_loader( $oldDisable );
-               }
-       }
-
-       private function readNext( XMLReader $reader ) {
-               set_error_handler( [ $this, 'XmlErrorHandler' ] );
-               $ret = $reader->read();
-               restore_error_handler();
-               return $ret;
-       }
-
-       public function XmlErrorHandler( $errno, $errstr ) {
-               $this->wellFormed = false;
-       }
-
-       private function validate( $reader ) {
-
-               // First, move through anything that isn't an element, and
-               // handle any processing instructions with the callback
-               do {
-                       if ( !$this->readNext( $reader ) ) {
-                               // Hit the end of the document before any elements
-                               $this->wellFormed = false;
-                               return;
-                       }
-                       if ( $reader->nodeType === XMLReader::PI ) {
-                               $this->processingInstructionHandler( $reader->name, $reader->value );
-                       }
-               } while ( $reader->nodeType != XMLReader::ELEMENT );
-
-               // Process the rest of the document
-               do {
-                       switch ( $reader->nodeType ) {
-                               case XMLReader::ELEMENT:
-                                       $name = $this->expandNS(
-                                               $reader->name,
-                                               $reader->namespaceURI
-                                       );
-                                       if ( $this->rootElement === '' ) {
-                                               $this->rootElement = $name;
-                                       }
-                                       $empty = $reader->isEmptyElement;
-                                       $attrs = $this->getAttributesArray( $reader );
-                                       $this->elementOpen( $name, $attrs );
-                                       if ( $empty ) {
-                                               $this->elementClose();
-                                       }
-                                       break;
-
-                               case XMLReader::END_ELEMENT:
-                                       $this->elementClose();
-                                       break;
-
-                               case XMLReader::WHITESPACE:
-                               case XMLReader::SIGNIFICANT_WHITESPACE:
-                               case XMLReader::CDATA:
-                               case XMLReader::TEXT:
-                                       $this->elementData( $reader->value );
-                                       break;
-
-                               case XMLReader::ENTITY_REF:
-                                       // Unexpanded entity (maybe external?),
-                                       // don't send to the filter (xml_parse didn't)
-                                       break;
-
-                               case XMLReader::COMMENT:
-                                       // Don't send to the filter (xml_parse didn't)
-                                       break;
-
-                               case XMLReader::PI:
-                                       // Processing instructions can happen after the header too
-                                       $this->processingInstructionHandler(
-                                               $reader->name,
-                                               $reader->value
-                                       );
-                                       break;
-                               default:
-                                       // One of DOC, DOC_TYPE, ENTITY, END_ENTITY,
-                                       // NOTATION, or XML_DECLARATION
-                                       // xml_parse didn't send these to the filter, so we won't.
-                       }
-
-               } while ( $this->readNext( $reader ) );
-
-               if ( $this->stackDepth !== 0 ) {
-                       $this->wellFormed = false;
-               } elseif ( $this->wellFormed === null ) {
-                       $this->wellFormed = true;
-               }
-
-       }
-
-       /**
-        * Get all of the attributes for an XMLReader's current node
-        * @param $r XMLReader
-        * @return array of attributes
-        */
-       private function getAttributesArray( XMLReader $r ) {
-               $attrs = [];
-               while ( $r->moveToNextAttribute() ) {
-                       if ( $r->namespaceURI === 'http://www.w3.org/2000/xmlns/' ) {
-                               // XMLReader treats xmlns attributes as normal
-                               // attributes, while xml_parse doesn't
-                               continue;
-                       }
-                       $name = $this->expandNS( $r->name, $r->namespaceURI );
-                       $attrs[$name] = $r->value;
-               }
-               return $attrs;
-       }
-
-       /**
-        * @param $name element or attribute name, maybe with a full or short prefix
-        * @param $namespaceURI the namespaceURI
-        * @return string the name prefixed with namespaceURI
-        */
-       private function expandNS( $name, $namespaceURI ) {
-               if ( $namespaceURI ) {
-                       $parts = explode( ':', $name );
-                       $localname = array_pop( $parts );
-                       return "$namespaceURI:$localname";
-               }
-               return $name;
-       }
-
-       /**
-        * @param $name
-        * @param $attribs
-        */
-       private function elementOpen( $name, $attribs ) {
-               $this->elementDataContext[] = [ $name, $attribs ];
-               $this->elementData[] = '';
-               $this->stackDepth++;
-       }
-
-       /**
-        */
-       private function elementClose() {
-               list( $name, $attribs ) = array_pop( $this->elementDataContext );
-               $data = array_pop( $this->elementData );
-               $this->stackDepth--;
-               $callbackReturn = false;
-
-               if ( is_callable( $this->filterCallback ) ) {
-                       $callbackReturn = call_user_func(
-                               $this->filterCallback,
-                               $name,
-                               $attribs,
-                               $data
-                       );
-               }
-               if ( $callbackReturn ) {
-                       // Filter hit!
-                       $this->filterMatch = true;
-                       $this->filterMatchType = $callbackReturn;
-               }
-       }
-
-       /**
-        * @param $data
-        */
-       private function elementData( $data ) {
-               // Collect any data here, and we'll run the callback in elementClose
-               $this->elementData[ $this->stackDepth - 1 ] .= trim( $data );
-       }
-
-       /**
-        * @param $target
-        * @param $data
-        */
-       private function processingInstructionHandler( $target, $data ) {
-               $callbackReturn = false;
-               if ( $this->parserOptions['processing_instruction_handler'] ) {
-                       $callbackReturn = call_user_func(
-                               $this->parserOptions['processing_instruction_handler'],
-                               $target,
-                               $data
-                       );
-               }
-               if ( $callbackReturn ) {
-                       // Filter hit!
-                       $this->filterMatch = true;
-                       $this->filterMatchType = $callbackReturn;
-               }
-       }
-}
index 311508f..62231a8 100644 (file)
@@ -12,14 +12,9 @@ class ComposerJson {
         * @param string $location
         */
        public function __construct( $location ) {
-               $this->hash = md5_file( $location );
                $this->contents = json_decode( file_get_contents( $location ), true );
        }
 
-       public function getHash() {
-               return $this->hash;
-       }
-
        /**
         * Dependencies as specified by composer.json
         *
index e93127c..818ccdf 100644 (file)
@@ -15,10 +15,6 @@ class ComposerLock {
                $this->contents = json_decode( file_get_contents( $location ), true );
        }
 
-       public function getHash() {
-               return $this->contents['hash'];
-       }
-
        /**
         * Dependencies currently installed according to composer.lock
         *
diff --git a/includes/libs/filebackend/FSFileBackend.php b/includes/libs/filebackend/FSFileBackend.php
new file mode 100644 (file)
index 0000000..8afdce4
--- /dev/null
@@ -0,0 +1,984 @@
+<?php
+/**
+ * File system based backend.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * @brief Class for a file system (FS) based file backend.
+ *
+ * All "containers" each map to a directory under the backend's base directory.
+ * For backwards-compatibility, some container paths can be set to custom paths.
+ * The domain ID will not be used in any custom paths, so this should be avoided.
+ *
+ * Having directories with thousands of files will diminish performance.
+ * Sharding can be accomplished by using FileRepo-style hash paths.
+ *
+ * StatusValue messages should avoid mentioning the internal FS paths.
+ * PHP warnings are assumed to be logged rather than output.
+ *
+ * @ingroup FileBackend
+ * @since 1.19
+ */
+class FSFileBackend extends FileBackendStore {
+       /** @var string Directory holding the container directories */
+       protected $basePath;
+
+       /** @var array Map of container names to root paths for custom container paths */
+       protected $containerPaths = [];
+
+       /** @var int File permission mode */
+       protected $fileMode;
+       /** @var int File permission mode */
+       protected $dirMode;
+
+       /** @var string Required OS username to own files */
+       protected $fileOwner;
+
+       /** @var bool */
+       protected $isWindows;
+       /** @var string OS username running this script */
+       protected $currentUser;
+
+       /** @var array */
+       protected $hadWarningErrors = [];
+
+       /**
+        * @see FileBackendStore::__construct()
+        * Additional $config params include:
+        *   - basePath       : File system directory that holds containers.
+        *   - containerPaths : Map of container names to custom file system directories.
+        *                      This should only be used for backwards-compatibility.
+        *   - fileMode       : Octal UNIX file permissions to use on files stored.
+        *   - directoryMode  : Octal UNIX file permissions to use on directories created.
+        * @param array $config
+        */
+       public function __construct( array $config ) {
+               parent::__construct( $config );
+
+               $this->isWindows = ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' );
+               // Remove any possible trailing slash from directories
+               if ( isset( $config['basePath'] ) ) {
+                       $this->basePath = rtrim( $config['basePath'], '/' ); // remove trailing slash
+               } else {
+                       $this->basePath = null; // none; containers must have explicit paths
+               }
+
+               if ( isset( $config['containerPaths'] ) ) {
+                       $this->containerPaths = (array)$config['containerPaths'];
+                       foreach ( $this->containerPaths as &$path ) {
+                               $path = rtrim( $path, '/' ); // remove trailing slash
+                       }
+               }
+
+               $this->fileMode = isset( $config['fileMode'] ) ? $config['fileMode'] : 0644;
+               $this->dirMode = isset( $config['directoryMode'] ) ? $config['directoryMode'] : 0777;
+               if ( isset( $config['fileOwner'] ) && function_exists( 'posix_getuid' ) ) {
+                       $this->fileOwner = $config['fileOwner'];
+                       // cache this, assuming it doesn't change
+                       $this->currentUser = posix_getpwuid( posix_getuid() )['name'];
+               }
+       }
+
+       public function getFeatures() {
+               return !$this->isWindows ? FileBackend::ATTR_UNICODE_PATHS : 0;
+       }
+
+       protected function resolveContainerPath( $container, $relStoragePath ) {
+               // Check that container has a root directory
+               if ( isset( $this->containerPaths[$container] ) || isset( $this->basePath ) ) {
+                       // Check for sane relative paths (assume the base paths are OK)
+                       if ( $this->isLegalRelPath( $relStoragePath ) ) {
+                               return $relStoragePath;
+                       }
+               }
+
+               return null;
+       }
+
+       /**
+        * Sanity check a relative file system path for validity
+        *
+        * @param string $path Normalized relative path
+        * @return bool
+        */
+       protected function isLegalRelPath( $path ) {
+               // Check for file names longer than 255 chars
+               if ( preg_match( '![^/]{256}!', $path ) ) { // ext3/NTFS
+                       return false;
+               }
+               if ( $this->isWindows ) { // NTFS
+                       return !preg_match( '![:*?"<>|]!', $path );
+               } else {
+                       return true;
+               }
+       }
+
+       /**
+        * Given the short (unresolved) and full (resolved) name of
+        * a container, return the file system path of the container.
+        *
+        * @param string $shortCont
+        * @param string $fullCont
+        * @return string|null
+        */
+       protected function containerFSRoot( $shortCont, $fullCont ) {
+               if ( isset( $this->containerPaths[$shortCont] ) ) {
+                       return $this->containerPaths[$shortCont];
+               } elseif ( isset( $this->basePath ) ) {
+                       return "{$this->basePath}/{$fullCont}";
+               }
+
+               return null; // no container base path defined
+       }
+
+       /**
+        * Get the absolute file system path for a storage path
+        *
+        * @param string $storagePath Storage path
+        * @return string|null
+        */
+       protected function resolveToFSPath( $storagePath ) {
+               list( $fullCont, $relPath ) = $this->resolveStoragePathReal( $storagePath );
+               if ( $relPath === null ) {
+                       return null; // invalid
+               }
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $storagePath );
+               $fsPath = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
+               if ( $relPath != '' ) {
+                       $fsPath .= "/{$relPath}";
+               }
+
+               return $fsPath;
+       }
+
+       public function isPathUsableInternal( $storagePath ) {
+               $fsPath = $this->resolveToFSPath( $storagePath );
+               if ( $fsPath === null ) {
+                       return false; // invalid
+               }
+               $parentDir = dirname( $fsPath );
+
+               if ( file_exists( $fsPath ) ) {
+                       $ok = is_file( $fsPath ) && is_writable( $fsPath );
+               } else {
+                       $ok = is_dir( $parentDir ) && is_writable( $parentDir );
+               }
+
+               if ( $this->fileOwner !== null && $this->currentUser !== $this->fileOwner ) {
+                       $ok = false;
+                       trigger_error( __METHOD__ . ": PHP process owner is not '{$this->fileOwner}'." );
+               }
+
+               return $ok;
+       }
+
+       protected function doCreateInternal( array $params ) {
+               $status = $this->newStatus();
+
+               $dest = $this->resolveToFSPath( $params['dst'] );
+               if ( $dest === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $tempFile = TempFSFile::factory( 'create_', 'tmp', $this->tmpDirectory );
+                       if ( !$tempFile ) {
+                               $status->fatal( 'backend-fail-create', $params['dst'] );
+
+                               return $status;
+                       }
+                       $this->trapWarnings();
+                       $bytes = file_put_contents( $tempFile->getPath(), $params['content'] );
+                       $this->untrapWarnings();
+                       if ( $bytes === false ) {
+                               $status->fatal( 'backend-fail-create', $params['dst'] );
+
+                               return $status;
+                       }
+                       $cmd = implode( ' ', [
+                               $this->isWindows ? 'COPY /B /Y' : 'cp', // (binary, overwrite)
+                               escapeshellarg( $this->cleanPathSlashes( $tempFile->getPath() ) ),
+                               escapeshellarg( $this->cleanPathSlashes( $dest ) )
+                       ] );
+                       $handler = function ( $errors, StatusValue $status, array $params, $cmd ) {
+                               if ( $errors !== '' && !( $this->isWindows && $errors[0] === " " ) ) {
+                                       $status->fatal( 'backend-fail-create', $params['dst'] );
+                                       trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
+                               }
+                       };
+                       $status->value = new FSFileOpHandle( $this, $params, $handler, $cmd, $dest );
+                       $tempFile->bind( $status->value );
+               } else { // immediate write
+                       $this->trapWarnings();
+                       $bytes = file_put_contents( $dest, $params['content'] );
+                       $this->untrapWarnings();
+                       if ( $bytes === false ) {
+                               $status->fatal( 'backend-fail-create', $params['dst'] );
+
+                               return $status;
+                       }
+                       $this->chmod( $dest );
+               }
+
+               return $status;
+       }
+
+       protected function doStoreInternal( array $params ) {
+               $status = $this->newStatus();
+
+               $dest = $this->resolveToFSPath( $params['dst'] );
+               if ( $dest === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $cmd = implode( ' ', [
+                               $this->isWindows ? 'COPY /B /Y' : 'cp', // (binary, overwrite)
+                               escapeshellarg( $this->cleanPathSlashes( $params['src'] ) ),
+                               escapeshellarg( $this->cleanPathSlashes( $dest ) )
+                       ] );
+                       $handler = function ( $errors, StatusValue $status, array $params, $cmd ) {
+                               if ( $errors !== '' && !( $this->isWindows && $errors[0] === " " ) ) {
+                                       $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
+                                       trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
+                               }
+                       };
+                       $status->value = new FSFileOpHandle( $this, $params, $handler, $cmd, $dest );
+               } else { // immediate write
+                       $this->trapWarnings();
+                       $ok = copy( $params['src'], $dest );
+                       $this->untrapWarnings();
+                       // In some cases (at least over NFS), copy() returns true when it fails
+                       if ( !$ok || ( filesize( $params['src'] ) !== filesize( $dest ) ) ) {
+                               if ( $ok ) { // PHP bug
+                                       unlink( $dest ); // remove broken file
+                                       trigger_error( __METHOD__ . ": copy() failed but returned true." );
+                               }
+                               $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
+
+                               return $status;
+                       }
+                       $this->chmod( $dest );
+               }
+
+               return $status;
+       }
+
+       protected function doCopyInternal( array $params ) {
+               $status = $this->newStatus();
+
+               $source = $this->resolveToFSPath( $params['src'] );
+               if ( $source === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
+
+                       return $status;
+               }
+
+               $dest = $this->resolveToFSPath( $params['dst'] );
+               if ( $dest === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               if ( !is_file( $source ) ) {
+                       if ( empty( $params['ignoreMissingSource'] ) ) {
+                               $status->fatal( 'backend-fail-copy', $params['src'] );
+                       }
+
+                       return $status; // do nothing; either OK or bad status
+               }
+
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $cmd = implode( ' ', [
+                               $this->isWindows ? 'COPY /B /Y' : 'cp', // (binary, overwrite)
+                               escapeshellarg( $this->cleanPathSlashes( $source ) ),
+                               escapeshellarg( $this->cleanPathSlashes( $dest ) )
+                       ] );
+                       $handler = function ( $errors, StatusValue $status, array $params, $cmd ) {
+                               if ( $errors !== '' && !( $this->isWindows && $errors[0] === " " ) ) {
+                                       $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+                                       trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
+                               }
+                       };
+                       $status->value = new FSFileOpHandle( $this, $params, $handler, $cmd, $dest );
+               } else { // immediate write
+                       $this->trapWarnings();
+                       $ok = ( $source === $dest ) ? true : copy( $source, $dest );
+                       $this->untrapWarnings();
+                       // In some cases (at least over NFS), copy() returns true when it fails
+                       if ( !$ok || ( filesize( $source ) !== filesize( $dest ) ) ) {
+                               if ( $ok ) { // PHP bug
+                                       $this->trapWarnings();
+                                       unlink( $dest ); // remove broken file
+                                       $this->untrapWarnings();
+                                       trigger_error( __METHOD__ . ": copy() failed but returned true." );
+                               }
+                               $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+
+                               return $status;
+                       }
+                       $this->chmod( $dest );
+               }
+
+               return $status;
+       }
+
+       protected function doMoveInternal( array $params ) {
+               $status = $this->newStatus();
+
+               $source = $this->resolveToFSPath( $params['src'] );
+               if ( $source === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
+
+                       return $status;
+               }
+
+               $dest = $this->resolveToFSPath( $params['dst'] );
+               if ( $dest === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               if ( !is_file( $source ) ) {
+                       if ( empty( $params['ignoreMissingSource'] ) ) {
+                               $status->fatal( 'backend-fail-move', $params['src'] );
+                       }
+
+                       return $status; // do nothing; either OK or bad status
+               }
+
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $cmd = implode( ' ', [
+                               $this->isWindows ? 'MOVE /Y' : 'mv', // (overwrite)
+                               escapeshellarg( $this->cleanPathSlashes( $source ) ),
+                               escapeshellarg( $this->cleanPathSlashes( $dest ) )
+                       ] );
+                       $handler = function ( $errors, StatusValue $status, array $params, $cmd ) {
+                               if ( $errors !== '' && !( $this->isWindows && $errors[0] === " " ) ) {
+                                       $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+                                       trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
+                               }
+                       };
+                       $status->value = new FSFileOpHandle( $this, $params, $handler, $cmd );
+               } else { // immediate write
+                       $this->trapWarnings();
+                       $ok = ( $source === $dest ) ? true : rename( $source, $dest );
+                       $this->untrapWarnings();
+                       clearstatcache(); // file no longer at source
+                       if ( !$ok ) {
+                               $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+
+                               return $status;
+                       }
+               }
+
+               return $status;
+       }
+
+       protected function doDeleteInternal( array $params ) {
+               $status = $this->newStatus();
+
+               $source = $this->resolveToFSPath( $params['src'] );
+               if ( $source === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
+
+                       return $status;
+               }
+
+               if ( !is_file( $source ) ) {
+                       if ( empty( $params['ignoreMissingSource'] ) ) {
+                               $status->fatal( 'backend-fail-delete', $params['src'] );
+                       }
+
+                       return $status; // do nothing; either OK or bad status
+               }
+
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $cmd = implode( ' ', [
+                               $this->isWindows ? 'DEL' : 'unlink',
+                               escapeshellarg( $this->cleanPathSlashes( $source ) )
+                       ] );
+                       $handler = function ( $errors, StatusValue $status, array $params, $cmd ) {
+                               if ( $errors !== '' && !( $this->isWindows && $errors[0] === " " ) ) {
+                                       $status->fatal( 'backend-fail-delete', $params['src'] );
+                                       trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
+                               }
+                       };
+                       $status->value = new FSFileOpHandle( $this, $params, $handler, $cmd );
+               } else { // immediate write
+                       $this->trapWarnings();
+                       $ok = unlink( $source );
+                       $this->untrapWarnings();
+                       if ( !$ok ) {
+                               $status->fatal( 'backend-fail-delete', $params['src'] );
+
+                               return $status;
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @param string $fullCont
+        * @param string $dirRel
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function doPrepareInternal( $fullCont, $dirRel, array $params ) {
+               $status = $this->newStatus();
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
+               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
+               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
+               $existed = is_dir( $dir ); // already there?
+               // Create the directory and its parents as needed...
+               $this->trapWarnings();
+               if ( !$existed && !mkdir( $dir, $this->dirMode, true ) && !is_dir( $dir ) ) {
+                       $this->logger->error( __METHOD__ . ": cannot create directory $dir" );
+                       $status->fatal( 'directorycreateerror', $params['dir'] ); // fails on races
+               } elseif ( !is_writable( $dir ) ) {
+                       $this->logger->error( __METHOD__ . ": directory $dir is read-only" );
+                       $status->fatal( 'directoryreadonlyerror', $params['dir'] );
+               } elseif ( !is_readable( $dir ) ) {
+                       $this->logger->error( __METHOD__ . ": directory $dir is not readable" );
+                       $status->fatal( 'directorynotreadableerror', $params['dir'] );
+               }
+               $this->untrapWarnings();
+               // Respect any 'noAccess' or 'noListing' flags...
+               if ( is_dir( $dir ) && !$existed ) {
+                       $status->merge( $this->doSecureInternal( $fullCont, $dirRel, $params ) );
+               }
+
+               return $status;
+       }
+
+       protected function doSecureInternal( $fullCont, $dirRel, array $params ) {
+               $status = $this->newStatus();
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
+               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
+               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
+               // Seed new directories with a blank index.html, to prevent crawling...
+               if ( !empty( $params['noListing'] ) && !file_exists( "{$dir}/index.html" ) ) {
+                       $this->trapWarnings();
+                       $bytes = file_put_contents( "{$dir}/index.html", $this->indexHtmlPrivate() );
+                       $this->untrapWarnings();
+                       if ( $bytes === false ) {
+                               $status->fatal( 'backend-fail-create', $params['dir'] . '/index.html' );
+                       }
+               }
+               // Add a .htaccess file to the root of the container...
+               if ( !empty( $params['noAccess'] ) && !file_exists( "{$contRoot}/.htaccess" ) ) {
+                       $this->trapWarnings();
+                       $bytes = file_put_contents( "{$contRoot}/.htaccess", $this->htaccessPrivate() );
+                       $this->untrapWarnings();
+                       if ( $bytes === false ) {
+                               $storeDir = "mwstore://{$this->name}/{$shortCont}";
+                               $status->fatal( 'backend-fail-create', "{$storeDir}/.htaccess" );
+                       }
+               }
+
+               return $status;
+       }
+
+       protected function doPublishInternal( $fullCont, $dirRel, array $params ) {
+               $status = $this->newStatus();
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
+               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
+               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
+               // Unseed new directories with a blank index.html, to allow crawling...
+               if ( !empty( $params['listing'] ) && is_file( "{$dir}/index.html" ) ) {
+                       $exists = ( file_get_contents( "{$dir}/index.html" ) === $this->indexHtmlPrivate() );
+                       $this->trapWarnings();
+                       if ( $exists && !unlink( "{$dir}/index.html" ) ) { // reverse secure()
+                               $status->fatal( 'backend-fail-delete', $params['dir'] . '/index.html' );
+                       }
+                       $this->untrapWarnings();
+               }
+               // Remove the .htaccess file from the root of the container...
+               if ( !empty( $params['access'] ) && is_file( "{$contRoot}/.htaccess" ) ) {
+                       $exists = ( file_get_contents( "{$contRoot}/.htaccess" ) === $this->htaccessPrivate() );
+                       $this->trapWarnings();
+                       if ( $exists && !unlink( "{$contRoot}/.htaccess" ) ) { // reverse secure()
+                               $storeDir = "mwstore://{$this->name}/{$shortCont}";
+                               $status->fatal( 'backend-fail-delete', "{$storeDir}/.htaccess" );
+                       }
+                       $this->untrapWarnings();
+               }
+
+               return $status;
+       }
+
+       protected function doCleanInternal( $fullCont, $dirRel, array $params ) {
+               $status = $this->newStatus();
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
+               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
+               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
+               $this->trapWarnings();
+               if ( is_dir( $dir ) ) {
+                       rmdir( $dir ); // remove directory if empty
+               }
+               $this->untrapWarnings();
+
+               return $status;
+       }
+
+       protected function doGetFileStat( array $params ) {
+               $source = $this->resolveToFSPath( $params['src'] );
+               if ( $source === null ) {
+                       return false; // invalid storage path
+               }
+
+               $this->trapWarnings(); // don't trust 'false' if there were errors
+               $stat = is_file( $source ) ? stat( $source ) : false; // regular files only
+               $hadError = $this->untrapWarnings();
+
+               if ( $stat ) {
+                       $ct = new ConvertibleTimestamp( $stat['mtime'] );
+
+                       return [
+                               'mtime' => $ct->getTimestamp( TS_MW ),
+                               'size' => $stat['size']
+                       ];
+               } elseif ( !$hadError ) {
+                       return false; // file does not exist
+               } else {
+                       return null; // failure
+               }
+       }
+
+       protected function doClearCache( array $paths = null ) {
+               clearstatcache(); // clear the PHP file stat cache
+       }
+
+       protected function doDirectoryExists( $fullCont, $dirRel, array $params ) {
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
+               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
+               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
+
+               $this->trapWarnings(); // don't trust 'false' if there were errors
+               $exists = is_dir( $dir );
+               $hadError = $this->untrapWarnings();
+
+               return $hadError ? null : $exists;
+       }
+
+       /**
+        * @see FileBackendStore::getDirectoryListInternal()
+        * @param string $fullCont
+        * @param string $dirRel
+        * @param array $params
+        * @return array|FSFileBackendDirList|null
+        */
+       public function getDirectoryListInternal( $fullCont, $dirRel, array $params ) {
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
+               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
+               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
+               $exists = is_dir( $dir );
+               if ( !$exists ) {
+                       $this->logger->warning( __METHOD__ . "() given directory does not exist: '$dir'\n" );
+
+                       return []; // nothing under this dir
+               } elseif ( !is_readable( $dir ) ) {
+                       $this->logger->warning( __METHOD__ . "() given directory is unreadable: '$dir'\n" );
+
+                       return null; // bad permissions?
+               }
+
+               return new FSFileBackendDirList( $dir, $params );
+       }
+
+       /**
+        * @see FileBackendStore::getFileListInternal()
+        * @param string $fullCont
+        * @param string $dirRel
+        * @param array $params
+        * @return array|FSFileBackendFileList|null
+        */
+       public function getFileListInternal( $fullCont, $dirRel, array $params ) {
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
+               $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
+               $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
+               $exists = is_dir( $dir );
+               if ( !$exists ) {
+                       $this->logger->warning( __METHOD__ . "() given directory does not exist: '$dir'\n" );
+
+                       return []; // nothing under this dir
+               } elseif ( !is_readable( $dir ) ) {
+                       $this->logger->warning( __METHOD__ . "() given directory is unreadable: '$dir'\n" );
+
+                       return null; // bad permissions?
+               }
+
+               return new FSFileBackendFileList( $dir, $params );
+       }
+
+       protected function doGetLocalReferenceMulti( array $params ) {
+               $fsFiles = []; // (path => FSFile)
+
+               foreach ( $params['srcs'] as $src ) {
+                       $source = $this->resolveToFSPath( $src );
+                       if ( $source === null || !is_file( $source ) ) {
+                               $fsFiles[$src] = null; // invalid path or file does not exist
+                       } else {
+                               $fsFiles[$src] = new FSFile( $source );
+                       }
+               }
+
+               return $fsFiles;
+       }
+
+       protected function doGetLocalCopyMulti( array $params ) {
+               $tmpFiles = []; // (path => TempFSFile)
+
+               foreach ( $params['srcs'] as $src ) {
+                       $source = $this->resolveToFSPath( $src );
+                       if ( $source === null ) {
+                               $tmpFiles[$src] = null; // invalid path
+                       } else {
+                               // Create a new temporary file with the same extension...
+                               $ext = FileBackend::extensionFromPath( $src );
+                               $tmpFile = TempFSFile::factory( 'localcopy_', $ext, $this->tmpDirectory );
+                               if ( !$tmpFile ) {
+                                       $tmpFiles[$src] = null;
+                               } else {
+                                       $tmpPath = $tmpFile->getPath();
+                                       // Copy the source file over the temp file
+                                       $this->trapWarnings();
+                                       $ok = copy( $source, $tmpPath );
+                                       $this->untrapWarnings();
+                                       if ( !$ok ) {
+                                               $tmpFiles[$src] = null;
+                                       } else {
+                                               $this->chmod( $tmpPath );
+                                               $tmpFiles[$src] = $tmpFile;
+                                       }
+                               }
+                       }
+               }
+
+               return $tmpFiles;
+       }
+
+       protected function directoriesAreVirtual() {
+               return false;
+       }
+
+       /**
+        * @param FSFileOpHandle[] $fileOpHandles
+        *
+        * @return StatusValue[]
+        */
+       protected function doExecuteOpHandlesInternal( array $fileOpHandles ) {
+               $statuses = [];
+
+               $pipes = [];
+               foreach ( $fileOpHandles as $index => $fileOpHandle ) {
+                       $pipes[$index] = popen( "{$fileOpHandle->cmd} 2>&1", 'r' );
+               }
+
+               $errs = [];
+               foreach ( $pipes as $index => $pipe ) {
+                       // Result will be empty on success in *NIX. On Windows,
+                       // it may be something like "        1 file(s) [copied|moved].".
+                       $errs[$index] = stream_get_contents( $pipe );
+                       fclose( $pipe );
+               }
+
+               foreach ( $fileOpHandles as $index => $fileOpHandle ) {
+                       $status = $this->newStatus();
+                       $function = $fileOpHandle->call;
+                       $function( $errs[$index], $status, $fileOpHandle->params, $fileOpHandle->cmd );
+                       $statuses[$index] = $status;
+                       if ( $status->isOK() && $fileOpHandle->chmodPath ) {
+                               $this->chmod( $fileOpHandle->chmodPath );
+                       }
+               }
+
+               clearstatcache(); // files changed
+               return $statuses;
+       }
+
+       /**
+        * Chmod a file, suppressing the warnings
+        *
+        * @param string $path Absolute file system path
+        * @return bool Success
+        */
+       protected function chmod( $path ) {
+               $this->trapWarnings();
+               $ok = chmod( $path, $this->fileMode );
+               $this->untrapWarnings();
+
+               return $ok;
+       }
+
+       /**
+        * Return the text of an index.html file to hide directory listings
+        *
+        * @return string
+        */
+       protected function indexHtmlPrivate() {
+               return '';
+       }
+
+       /**
+        * Return the text of a .htaccess file to make a directory private
+        *
+        * @return string
+        */
+       protected function htaccessPrivate() {
+               return "Deny from all\n";
+       }
+
+       /**
+        * Clean up directory separators for the given OS
+        *
+        * @param string $path FS path
+        * @return string
+        */
+       protected function cleanPathSlashes( $path ) {
+               return $this->isWindows ? strtr( $path, '/', '\\' ) : $path;
+       }
+
+       /**
+        * Listen for E_WARNING errors and track whether any happen
+        */
+       protected function trapWarnings() {
+               $this->hadWarningErrors[] = false; // push to stack
+               set_error_handler( [ $this, 'handleWarning' ], E_WARNING );
+       }
+
+       /**
+        * Stop listening for E_WARNING errors and return true if any happened
+        *
+        * @return bool
+        */
+       protected function untrapWarnings() {
+               restore_error_handler(); // restore previous handler
+               return array_pop( $this->hadWarningErrors ); // pop from stack
+       }
+
+       /**
+        * @param int $errno
+        * @param string $errstr
+        * @return bool
+        * @access private
+        */
+       public function handleWarning( $errno, $errstr ) {
+               $this->logger->error( $errstr ); // more detailed error logging
+               $this->hadWarningErrors[count( $this->hadWarningErrors ) - 1] = true;
+
+               return true; // suppress from PHP handler
+       }
+}
+
+/**
+ * @see FileBackendStoreOpHandle
+ */
+class FSFileOpHandle extends FileBackendStoreOpHandle {
+       public $cmd; // string; shell command
+       public $chmodPath; // string; file to chmod
+
+       /**
+        * @param FSFileBackend $backend
+        * @param array $params
+        * @param callable $call
+        * @param string $cmd
+        * @param int|null $chmodPath
+        */
+       public function __construct(
+               FSFileBackend $backend, array $params, $call, $cmd, $chmodPath = null
+       ) {
+               $this->backend = $backend;
+               $this->params = $params;
+               $this->call = $call;
+               $this->cmd = $cmd;
+               $this->chmodPath = $chmodPath;
+       }
+}
+
+/**
+ * Wrapper around RecursiveDirectoryIterator/DirectoryIterator that
+ * catches exception or does any custom behavoir that we may want.
+ * Do not use this class from places outside FSFileBackend.
+ *
+ * @ingroup FileBackend
+ */
+abstract class FSFileBackendList implements Iterator {
+       /** @var Iterator */
+       protected $iter;
+
+       /** @var int */
+       protected $suffixStart;
+
+       /** @var int */
+       protected $pos = 0;
+
+       /** @var array */
+       protected $params = [];
+
+       /**
+        * @param string $dir File system directory
+        * @param array $params
+        */
+       public function __construct( $dir, array $params ) {
+               $path = realpath( $dir ); // normalize
+               if ( $path === false ) {
+                       $path = $dir;
+               }
+               $this->suffixStart = strlen( $path ) + 1; // size of "path/to/dir/"
+               $this->params = $params;
+
+               try {
+                       $this->iter = $this->initIterator( $path );
+               } catch ( UnexpectedValueException $e ) {
+                       $this->iter = null; // bad permissions? deleted?
+               }
+       }
+
+       /**
+        * Return an appropriate iterator object to wrap
+        *
+        * @param string $dir File system directory
+        * @return Iterator
+        */
+       protected function initIterator( $dir ) {
+               if ( !empty( $this->params['topOnly'] ) ) { // non-recursive
+                       # Get an iterator that will get direct sub-nodes
+                       return new DirectoryIterator( $dir );
+               } else { // recursive
+                       # Get an iterator that will return leaf nodes (non-directories)
+                       # RecursiveDirectoryIterator extends FilesystemIterator.
+                       # FilesystemIterator::SKIP_DOTS default is inconsistent in PHP 5.3.x.
+                       $flags = FilesystemIterator::CURRENT_AS_SELF | FilesystemIterator::SKIP_DOTS;
+
+                       return new RecursiveIteratorIterator(
+                               new RecursiveDirectoryIterator( $dir, $flags ),
+                               RecursiveIteratorIterator::CHILD_FIRST // include dirs
+                       );
+               }
+       }
+
+       /**
+        * @see Iterator::key()
+        * @return int
+        */
+       public function key() {
+               return $this->pos;
+       }
+
+       /**
+        * @see Iterator::current()
+        * @return string|bool String or false
+        */
+       public function current() {
+               return $this->getRelPath( $this->iter->current()->getPathname() );
+       }
+
+       /**
+        * @see Iterator::next()
+        * @throws FileBackendError
+        */
+       public function next() {
+               try {
+                       $this->iter->next();
+                       $this->filterViaNext();
+               } catch ( UnexpectedValueException $e ) { // bad permissions? deleted?
+                       throw new FileBackendError( "File iterator gave UnexpectedValueException." );
+               }
+               ++$this->pos;
+       }
+
+       /**
+        * @see Iterator::rewind()
+        * @throws FileBackendError
+        */
+       public function rewind() {
+               $this->pos = 0;
+               try {
+                       $this->iter->rewind();
+                       $this->filterViaNext();
+               } catch ( UnexpectedValueException $e ) { // bad permissions? deleted?
+                       throw new FileBackendError( "File iterator gave UnexpectedValueException." );
+               }
+       }
+
+       /**
+        * @see Iterator::valid()
+        * @return bool
+        */
+       public function valid() {
+               return $this->iter && $this->iter->valid();
+       }
+
+       /**
+        * Filter out items by advancing to the next ones
+        */
+       protected function filterViaNext() {
+       }
+
+       /**
+        * Return only the relative path and normalize slashes to FileBackend-style.
+        * Uses the "real path" since the suffix is based upon that.
+        *
+        * @param string $dir
+        * @return string
+        */
+       protected function getRelPath( $dir ) {
+               $path = realpath( $dir );
+               if ( $path === false ) {
+                       $path = $dir;
+               }
+
+               return strtr( substr( $path, $this->suffixStart ), '\\', '/' );
+       }
+}
+
+class FSFileBackendDirList extends FSFileBackendList {
+       protected function filterViaNext() {
+               while ( $this->iter->valid() ) {
+                       if ( $this->iter->current()->isDot() || !$this->iter->current()->isDir() ) {
+                               $this->iter->next(); // skip non-directories and dot files
+                       } else {
+                               break;
+                       }
+               }
+       }
+}
+
+class FSFileBackendFileList extends FSFileBackendList {
+       protected function filterViaNext() {
+               while ( $this->iter->valid() ) {
+                       if ( !$this->iter->current()->isFile() ) {
+                               $this->iter->next(); // skip non-files and dot files
+                       } else {
+                               break;
+                       }
+               }
+       }
+}
diff --git a/includes/libs/filebackend/FileBackend.php b/includes/libs/filebackend/FileBackend.php
new file mode 100644 (file)
index 0000000..5764cc3
--- /dev/null
@@ -0,0 +1,1639 @@
+<?php
+/**
+ * @defgroup FileBackend File backend
+ *
+ * File backend is used to interact with file storage systems,
+ * such as the local file system, NFS, or cloud storage systems.
+ */
+
+/**
+ * Base class for all file backends.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+use Wikimedia\ScopedCallback;
+
+/**
+ * @brief Base class for all file backend classes (including multi-write backends).
+ *
+ * This class defines the methods as abstract that subclasses must implement.
+ * Outside callers can assume that all backends will have these functions.
+ *
+ * All "storage paths" are of the format "mwstore://<backend>/<container>/<path>".
+ * The "backend" portion is unique name for the application to refer to a backend, while
+ * the "container" portion is a top-level directory of the backend. The "path" portion
+ * is a relative path that uses UNIX file system (FS) notation, though any particular
+ * backend may not actually be using a local filesystem. Therefore, the relative paths
+ * are only virtual.
+ *
+ * Backend contents are stored under "domain"-specific container names by default.
+ * A domain is simply a logical umbrella for entities, such as those belonging to a certain
+ * application or portion of a website, for example. A domain can be local or global.
+ * Global (qualified) backends are achieved by configuring the "domain ID" to a constant.
+ * Global domains are simpler, but local domains can be used by choosing a domain ID based on
+ * the current context, such as which language of a website is being used.
+ *
+ * For legacy reasons, the FSFileBackend class allows manually setting the paths of
+ * containers to ones that do not respect the "domain ID".
+ *
+ * In key/value (object) stores, containers are the only hierarchy (the rest is emulated).
+ * FS-based backends are somewhat more restrictive due to the existence of real
+ * directory files; a regular file cannot have the same name as a directory. Other
+ * backends with virtual directories may not have this limitation. Callers should
+ * store files in such a way that no files and directories are under the same path.
+ *
+ * In general, this class allows for callers to access storage through the same
+ * interface, without regard to the underlying storage system. However, calling code
+ * must follow certain patterns and be aware of certain things to ensure compatibility:
+ *   - a) Always call prepare() on the parent directory before trying to put a file there;
+ *        key/value stores only need the container to exist first, but filesystems need
+ *        all the parent directories to exist first (prepare() is aware of all this)
+ *   - b) Always call clean() on a directory when it might become empty to avoid empty
+ *        directory buildup on filesystems; key/value stores never have empty directories,
+ *        so doing this helps preserve consistency in both cases
+ *   - c) Likewise, do not rely on the existence of empty directories for anything;
+ *        calling directoryExists() on a path that prepare() was previously called on
+ *        will return false for key/value stores if there are no files under that path
+ *   - d) Never alter the resulting FSFile returned from getLocalReference(), as it could
+ *        either be a copy of the source file in /tmp or the original source file itself
+ *   - e) Use a file layout that results in never attempting to store files over directories
+ *        or directories over files; key/value stores allow this but filesystems do not
+ *   - f) Use ASCII file names (e.g. base32, IDs, hashes) to avoid Unicode issues in Windows
+ *   - g) Do not assume that move operations are atomic (difficult with key/value stores)
+ *   - h) Do not assume that file stat or read operations always have immediate consistency;
+ *        various methods have a "latest" flag that should always be used if up-to-date
+ *        information is required (this trades performance for correctness as needed)
+ *   - i) Do not assume that directory listings have immediate consistency
+ *
+ * Methods of subclasses should avoid throwing exceptions at all costs.
+ * As a corollary, external dependencies should be kept to a minimum.
+ *
+ * @ingroup FileBackend
+ * @since 1.19
+ */
+abstract class FileBackend implements LoggerAwareInterface {
+       /** @var string Unique backend name */
+       protected $name;
+
+       /** @var string Unique domain name */
+       protected $domainId;
+
+       /** @var string Read-only explanation message */
+       protected $readOnly;
+
+       /** @var string When to do operations in parallel */
+       protected $parallelize;
+
+       /** @var int How many operations can be done in parallel */
+       protected $concurrency;
+
+       /** @var string Temporary file directory */
+       protected $tmpDirectory;
+
+       /** @var LockManager */
+       protected $lockManager;
+       /** @var FileJournal */
+       protected $fileJournal;
+       /** @var LoggerInterface */
+       protected $logger;
+       /** @var object|string Class name or object With profileIn/profileOut methods */
+       protected $profiler;
+
+       /** @var callable */
+       protected $obResetFunc;
+       /** @var callable */
+       protected $streamMimeFunc;
+       /** @var callable */
+       protected $statusWrapper;
+
+       /** Bitfield flags for supported features */
+       const ATTR_HEADERS = 1; // files can be tagged with standard HTTP headers
+       const ATTR_METADATA = 2; // files can be stored with metadata key/values
+       const ATTR_UNICODE_PATHS = 4; // files can have Unicode paths (not just ASCII)
+
+       /**
+        * Create a new backend instance from configuration.
+        * This should only be called from within FileBackendGroup.
+        *
+        * @param array $config Parameters include:
+        *   - name : The unique name of this backend.
+        *      This should consist of alphanumberic, '-', and '_' characters.
+        *      This name should not be changed after use (e.g. with journaling).
+        *      Note that the name is *not* used in actual container names.
+        *   - domainId : Prefix to container names that is unique to this backend.
+        *      It should only consist of alphanumberic, '-', and '_' characters.
+        *      This ID is what avoids collisions if multiple logical backends
+        *      use the same storage system, so this should be set carefully.
+        *   - lockManager : LockManager object to use for any file locking.
+        *      If not provided, then no file locking will be enforced.
+        *   - fileJournal : FileJournal object to use for logging changes to files.
+        *      If not provided, then change journaling will be disabled.
+        *   - readOnly : Write operations are disallowed if this is a non-empty string.
+        *      It should be an explanation for the backend being read-only.
+        *   - parallelize : When to do file operations in parallel (when possible).
+        *      Allowed values are "implicit", "explicit" and "off".
+        *   - concurrency : How many file operations can be done in parallel.
+        *   - tmpDirectory : Directory to use for temporary files. If this is not set or null,
+        *      then the backend will try to discover a usable temporary directory.
+        *   - obResetFunc : alternative callback to clear the output buffer
+        *   - streamMimeFunc : alternative method to determine the content type from the path
+        *   - logger : Optional PSR logger object.
+        *   - profiler : Optional class name or object With profileIn/profileOut methods.
+        * @throws InvalidArgumentException
+        */
+       public function __construct( array $config ) {
+               $this->name = $config['name'];
+               $this->domainId = isset( $config['domainId'] )
+                       ? $config['domainId'] // e.g. "my_wiki-en_"
+                       : $config['wikiId']; // b/c alias
+               if ( !preg_match( '!^[a-zA-Z0-9-_]{1,255}$!', $this->name ) ) {
+                       throw new InvalidArgumentException( "Backend name '{$this->name}' is invalid." );
+               } elseif ( !is_string( $this->domainId ) ) {
+                       throw new InvalidArgumentException(
+                               "Backend domain ID not provided for '{$this->name}'." );
+               }
+               $this->lockManager = isset( $config['lockManager'] )
+                       ? $config['lockManager']
+                       : new NullLockManager( [] );
+               $this->fileJournal = isset( $config['fileJournal'] )
+                       ? $config['fileJournal']
+                       : FileJournal::factory( [ 'class' => 'NullFileJournal' ], $this->name );
+               $this->readOnly = isset( $config['readOnly'] )
+                       ? (string)$config['readOnly']
+                       : '';
+               $this->parallelize = isset( $config['parallelize'] )
+                       ? (string)$config['parallelize']
+                       : 'off';
+               $this->concurrency = isset( $config['concurrency'] )
+                       ? (int)$config['concurrency']
+                       : 50;
+               $this->obResetFunc = isset( $config['obResetFunc'] )
+                       ? $config['obResetFunc']
+                       : [ $this, 'resetOutputBuffer' ];
+               $this->streamMimeFunc = isset( $config['streamMimeFunc'] )
+                       ? $config['streamMimeFunc']
+                       : null;
+               $this->statusWrapper = isset( $config['statusWrapper'] ) ? $config['statusWrapper'] : null;
+
+               $this->profiler = isset( $config['profiler'] ) ? $config['profiler'] : null;
+               $this->logger = isset( $config['logger'] ) ? $config['logger'] : new \Psr\Log\NullLogger();
+               $this->statusWrapper = isset( $config['statusWrapper'] ) ? $config['statusWrapper'] : null;
+               $this->tmpDirectory = isset( $config['tmpDirectory'] ) ? $config['tmpDirectory'] : null;
+       }
+
+       public function setLogger( LoggerInterface $logger ) {
+               $this->logger = $logger;
+       }
+
+       /**
+        * Get the unique backend name.
+        * We may have multiple different backends of the same type.
+        * For example, we can have two Swift backends using different proxies.
+        *
+        * @return string
+        */
+       final public function getName() {
+               return $this->name;
+       }
+
+       /**
+        * Get the domain identifier used for this backend (possibly empty).
+        *
+        * @return string
+        * @since 1.28
+        */
+       final public function getDomainId() {
+               return $this->domainId;
+       }
+
+       /**
+        * Alias to getDomainId()
+        * @return string
+        * @since 1.20
+        */
+       final public function getWikiId() {
+               return $this->getDomainId();
+       }
+
+       /**
+        * Check if this backend is read-only
+        *
+        * @return bool
+        */
+       final public function isReadOnly() {
+               return ( $this->readOnly != '' );
+       }
+
+       /**
+        * Get an explanatory message if this backend is read-only
+        *
+        * @return string|bool Returns false if the backend is not read-only
+        */
+       final public function getReadOnlyReason() {
+               return ( $this->readOnly != '' ) ? $this->readOnly : false;
+       }
+
+       /**
+        * Get the a bitfield of extra features supported by the backend medium
+        *
+        * @return int Bitfield of FileBackend::ATTR_* flags
+        * @since 1.23
+        */
+       public function getFeatures() {
+               return self::ATTR_UNICODE_PATHS;
+       }
+
+       /**
+        * Check if the backend medium supports a field of extra features
+        *
+        * @param int $bitfield Bitfield of FileBackend::ATTR_* flags
+        * @return bool
+        * @since 1.23
+        */
+       final public function hasFeatures( $bitfield ) {
+               return ( $this->getFeatures() & $bitfield ) === $bitfield;
+       }
+
+       /**
+        * This is the main entry point into the backend for write operations.
+        * Callers supply an ordered list of operations to perform as a transaction.
+        * Files will be locked, the stat cache cleared, and then the operations attempted.
+        * If any serious errors occur, all attempted operations will be rolled back.
+        *
+        * $ops is an array of arrays. The outer array holds a list of operations.
+        * Each inner array is a set of key value pairs that specify an operation.
+        *
+        * Supported operations and their parameters. The supported actions are:
+        *  - create
+        *  - store
+        *  - copy
+        *  - move
+        *  - delete
+        *  - describe (since 1.21)
+        *  - null
+        *
+        * FSFile/TempFSFile object support was added in 1.27.
+        *
+        * a) Create a new file in storage with the contents of a string
+        * @code
+        *     [
+        *         'op'                  => 'create',
+        *         'dst'                 => <storage path>,
+        *         'content'             => <string of new file contents>,
+        *         'overwrite'           => <boolean>,
+        *         'overwriteSame'       => <boolean>,
+        *         'headers'             => <HTTP header name/value map> # since 1.21
+        *     ]
+        * @endcode
+        *
+        * b) Copy a file system file into storage
+        * @code
+        *     [
+        *         'op'                  => 'store',
+        *         'src'                 => <file system path, FSFile, or TempFSFile>,
+        *         'dst'                 => <storage path>,
+        *         'overwrite'           => <boolean>,
+        *         'overwriteSame'       => <boolean>,
+        *         'headers'             => <HTTP header name/value map> # since 1.21
+        *     ]
+        * @endcode
+        *
+        * c) Copy a file within storage
+        * @code
+        *     [
+        *         'op'                  => 'copy',
+        *         'src'                 => <storage path>,
+        *         'dst'                 => <storage path>,
+        *         'overwrite'           => <boolean>,
+        *         'overwriteSame'       => <boolean>,
+        *         'ignoreMissingSource' => <boolean>, # since 1.21
+        *         'headers'             => <HTTP header name/value map> # since 1.21
+        *     ]
+        * @endcode
+        *
+        * d) Move a file within storage
+        * @code
+        *     [
+        *         'op'                  => 'move',
+        *         'src'                 => <storage path>,
+        *         'dst'                 => <storage path>,
+        *         'overwrite'           => <boolean>,
+        *         'overwriteSame'       => <boolean>,
+        *         'ignoreMissingSource' => <boolean>, # since 1.21
+        *         'headers'             => <HTTP header name/value map> # since 1.21
+        *     ]
+        * @endcode
+        *
+        * e) Delete a file within storage
+        * @code
+        *     [
+        *         'op'                  => 'delete',
+        *         'src'                 => <storage path>,
+        *         'ignoreMissingSource' => <boolean>
+        *     ]
+        * @endcode
+        *
+        * f) Update metadata for a file within storage
+        * @code
+        *     [
+        *         'op'                  => 'describe',
+        *         'src'                 => <storage path>,
+        *         'headers'             => <HTTP header name/value map>
+        *     ]
+        * @endcode
+        *
+        * g) Do nothing (no-op)
+        * @code
+        *     [
+        *         'op'                  => 'null',
+        *     ]
+        * @endcode
+        *
+        * Boolean flags for operations (operation-specific):
+        *   - ignoreMissingSource : The operation will simply succeed and do
+        *                           nothing if the source file does not exist.
+        *   - overwrite           : Any destination file will be overwritten.
+        *   - overwriteSame       : If a file already exists at the destination with the
+        *                           same contents, then do nothing to the destination file
+        *                           instead of giving an error. This does not compare headers.
+        *                           This option is ignored if 'overwrite' is already provided.
+        *   - headers             : If supplied, the result of merging these headers with any
+        *                           existing source file headers (replacing conflicting ones)
+        *                           will be set as the destination file headers. Headers are
+        *                           deleted if their value is set to the empty string. When a
+        *                           file has headers they are included in responses to GET and
+        *                           HEAD requests to the backing store for that file.
+        *                           Header values should be no larger than 255 bytes, except for
+        *                           Content-Disposition. The system might ignore or truncate any
+        *                           headers that are too long to store (exact limits will vary).
+        *                           Backends that don't support metadata ignore this. (since 1.21)
+        *
+        * $opts is an associative of boolean flags, including:
+        *   - force               : Operation precondition errors no longer trigger an abort.
+        *                           Any remaining operations are still attempted. Unexpected
+        *                           failures may still cause remaining operations to be aborted.
+        *   - nonLocking          : No locks are acquired for the operations.
+        *                           This can increase performance for non-critical writes.
+        *                           This has no effect unless the 'force' flag is set.
+        *   - nonJournaled        : Don't log this operation batch in the file journal.
+        *                           This limits the ability of recovery scripts.
+        *   - parallelize         : Try to do operations in parallel when possible.
+        *   - bypassReadOnly      : Allow writes in read-only mode. (since 1.20)
+        *   - preserveCache       : Don't clear the process cache before checking files.
+        *                           This should only be used if all entries in the process
+        *                           cache were added after the files were already locked. (since 1.20)
+        *
+        * @remarks Remarks on locking:
+        * File system paths given to operations should refer to files that are
+        * already locked or otherwise safe from modification from other processes.
+        * Normally these files will be new temp files, which should be adequate.
+        *
+        * @par Return value:
+        *
+        * This returns a Status, which contains all warnings and fatals that occurred
+        * during the operation. The 'failCount', 'successCount', and 'success' members
+        * will reflect each operation attempted.
+        *
+        * The StatusValue will be "OK" unless:
+        *   - a) unexpected operation errors occurred (network partitions, disk full...)
+        *   - b) significant operation errors occurred and 'force' was not set
+        *
+        * @param array $ops List of operations to execute in order
+        * @param array $opts Batch operation options
+        * @return StatusValue
+        */
+       final public function doOperations( array $ops, array $opts = [] ) {
+               if ( empty( $opts['bypassReadOnly'] ) && $this->isReadOnly() ) {
+                       return $this->newStatus( 'backend-fail-readonly', $this->name, $this->readOnly );
+               }
+               if ( !count( $ops ) ) {
+                       return $this->newStatus(); // nothing to do
+               }
+
+               $ops = $this->resolveFSFileObjects( $ops );
+               if ( empty( $opts['force'] ) ) { // sanity
+                       unset( $opts['nonLocking'] );
+               }
+
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
+
+               return $this->doOperationsInternal( $ops, $opts );
+       }
+
+       /**
+        * @see FileBackend::doOperations()
+        * @param array $ops
+        * @param array $opts
+        */
+       abstract protected function doOperationsInternal( array $ops, array $opts );
+
+       /**
+        * Same as doOperations() except it takes a single operation.
+        * If you are doing a batch of operations that should either
+        * all succeed or all fail, then use that function instead.
+        *
+        * @see FileBackend::doOperations()
+        *
+        * @param array $op Operation
+        * @param array $opts Operation options
+        * @return StatusValue
+        */
+       final public function doOperation( array $op, array $opts = [] ) {
+               return $this->doOperations( [ $op ], $opts );
+       }
+
+       /**
+        * Performs a single create operation.
+        * This sets $params['op'] to 'create' and passes it to doOperation().
+        *
+        * @see FileBackend::doOperation()
+        *
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
+        * @return StatusValue
+        */
+       final public function create( array $params, array $opts = [] ) {
+               return $this->doOperation( [ 'op' => 'create' ] + $params, $opts );
+       }
+
+       /**
+        * Performs a single store operation.
+        * This sets $params['op'] to 'store' and passes it to doOperation().
+        *
+        * @see FileBackend::doOperation()
+        *
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
+        * @return StatusValue
+        */
+       final public function store( array $params, array $opts = [] ) {
+               return $this->doOperation( [ 'op' => 'store' ] + $params, $opts );
+       }
+
+       /**
+        * Performs a single copy operation.
+        * This sets $params['op'] to 'copy' and passes it to doOperation().
+        *
+        * @see FileBackend::doOperation()
+        *
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
+        * @return StatusValue
+        */
+       final public function copy( array $params, array $opts = [] ) {
+               return $this->doOperation( [ 'op' => 'copy' ] + $params, $opts );
+       }
+
+       /**
+        * Performs a single move operation.
+        * This sets $params['op'] to 'move' and passes it to doOperation().
+        *
+        * @see FileBackend::doOperation()
+        *
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
+        * @return StatusValue
+        */
+       final public function move( array $params, array $opts = [] ) {
+               return $this->doOperation( [ 'op' => 'move' ] + $params, $opts );
+       }
+
+       /**
+        * Performs a single delete operation.
+        * This sets $params['op'] to 'delete' and passes it to doOperation().
+        *
+        * @see FileBackend::doOperation()
+        *
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
+        * @return StatusValue
+        */
+       final public function delete( array $params, array $opts = [] ) {
+               return $this->doOperation( [ 'op' => 'delete' ] + $params, $opts );
+       }
+
+       /**
+        * Performs a single describe operation.
+        * This sets $params['op'] to 'describe' and passes it to doOperation().
+        *
+        * @see FileBackend::doOperation()
+        *
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
+        * @return StatusValue
+        * @since 1.21
+        */
+       final public function describe( array $params, array $opts = [] ) {
+               return $this->doOperation( [ 'op' => 'describe' ] + $params, $opts );
+       }
+
+       /**
+        * Perform a set of independent file operations on some files.
+        *
+        * This does no locking, nor journaling, and possibly no stat calls.
+        * Any destination files that already exist will be overwritten.
+        * This should *only* be used on non-original files, like cache files.
+        *
+        * Supported operations and their parameters:
+        *  - create
+        *  - store
+        *  - copy
+        *  - move
+        *  - delete
+        *  - describe (since 1.21)
+        *  - null
+        *
+        * FSFile/TempFSFile object support was added in 1.27.
+        *
+        * a) Create a new file in storage with the contents of a string
+        * @code
+        *     [
+        *         'op'                  => 'create',
+        *         'dst'                 => <storage path>,
+        *         'content'             => <string of new file contents>,
+        *         'headers'             => <HTTP header name/value map> # since 1.21
+        *     ]
+        * @endcode
+        *
+        * b) Copy a file system file into storage
+        * @code
+        *     [
+        *         'op'                  => 'store',
+        *         'src'                 => <file system path, FSFile, or TempFSFile>,
+        *         'dst'                 => <storage path>,
+        *         'headers'             => <HTTP header name/value map> # since 1.21
+        *     ]
+        * @endcode
+        *
+        * c) Copy a file within storage
+        * @code
+        *     [
+        *         'op'                  => 'copy',
+        *         'src'                 => <storage path>,
+        *         'dst'                 => <storage path>,
+        *         'ignoreMissingSource' => <boolean>, # since 1.21
+        *         'headers'             => <HTTP header name/value map> # since 1.21
+        *     ]
+        * @endcode
+        *
+        * d) Move a file within storage
+        * @code
+        *     [
+        *         'op'                  => 'move',
+        *         'src'                 => <storage path>,
+        *         'dst'                 => <storage path>,
+        *         'ignoreMissingSource' => <boolean>, # since 1.21
+        *         'headers'             => <HTTP header name/value map> # since 1.21
+        *     ]
+        * @endcode
+        *
+        * e) Delete a file within storage
+        * @code
+        *     [
+        *         'op'                  => 'delete',
+        *         'src'                 => <storage path>,
+        *         'ignoreMissingSource' => <boolean>
+        *     ]
+        * @endcode
+        *
+        * f) Update metadata for a file within storage
+        * @code
+        *     [
+        *         'op'                  => 'describe',
+        *         'src'                 => <storage path>,
+        *         'headers'             => <HTTP header name/value map>
+        *     ]
+        * @endcode
+        *
+        * g) Do nothing (no-op)
+        * @code
+        *     [
+        *         'op'                  => 'null',
+        *     ]
+        * @endcode
+        *
+        * @par Boolean flags for operations (operation-specific):
+        *   - ignoreMissingSource : The operation will simply succeed and do
+        *                           nothing if the source file does not exist.
+        *   - headers             : If supplied with a header name/value map, the backend will
+        *                           reply with these headers when GETs/HEADs of the destination
+        *                           file are made. Header values should be smaller than 256 bytes.
+        *                           Content-Disposition headers can be longer, though the system
+        *                           might ignore or truncate ones that are too long to store.
+        *                           Existing headers will remain, but these will replace any
+        *                           conflicting previous headers, and headers will be removed
+        *                           if they are set to an empty string.
+        *                           Backends that don't support metadata ignore this. (since 1.21)
+        *
+        * $opts is an associative of boolean flags, including:
+        *   - bypassReadOnly      : Allow writes in read-only mode (since 1.20)
+        *
+        * @par Return value:
+        * This returns a Status, which contains all warnings and fatals that occurred
+        * during the operation. The 'failCount', 'successCount', and 'success' members
+        * will reflect each operation attempted for the given files. The StatusValue will be
+        * considered "OK" as long as no fatal errors occurred.
+        *
+        * @param array $ops Set of operations to execute
+        * @param array $opts Batch operation options
+        * @return StatusValue
+        * @since 1.20
+        */
+       final public function doQuickOperations( array $ops, array $opts = [] ) {
+               if ( empty( $opts['bypassReadOnly'] ) && $this->isReadOnly() ) {
+                       return $this->newStatus( 'backend-fail-readonly', $this->name, $this->readOnly );
+               }
+               if ( !count( $ops ) ) {
+                       return $this->newStatus(); // nothing to do
+               }
+
+               $ops = $this->resolveFSFileObjects( $ops );
+               foreach ( $ops as &$op ) {
+                       $op['overwrite'] = true; // avoids RTTs in key/value stores
+               }
+
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
+
+               return $this->doQuickOperationsInternal( $ops );
+       }
+
+       /**
+        * @see FileBackend::doQuickOperations()
+        * @param array $ops
+        * @since 1.20
+        */
+       abstract protected function doQuickOperationsInternal( array $ops );
+
+       /**
+        * Same as doQuickOperations() except it takes a single operation.
+        * If you are doing a batch of operations, then use that function instead.
+        *
+        * @see FileBackend::doQuickOperations()
+        *
+        * @param array $op Operation
+        * @return StatusValue
+        * @since 1.20
+        */
+       final public function doQuickOperation( array $op ) {
+               return $this->doQuickOperations( [ $op ] );
+       }
+
+       /**
+        * Performs a single quick create operation.
+        * This sets $params['op'] to 'create' and passes it to doQuickOperation().
+        *
+        * @see FileBackend::doQuickOperation()
+        *
+        * @param array $params Operation parameters
+        * @return StatusValue
+        * @since 1.20
+        */
+       final public function quickCreate( array $params ) {
+               return $this->doQuickOperation( [ 'op' => 'create' ] + $params );
+       }
+
+       /**
+        * Performs a single quick store operation.
+        * This sets $params['op'] to 'store' and passes it to doQuickOperation().
+        *
+        * @see FileBackend::doQuickOperation()
+        *
+        * @param array $params Operation parameters
+        * @return StatusValue
+        * @since 1.20
+        */
+       final public function quickStore( array $params ) {
+               return $this->doQuickOperation( [ 'op' => 'store' ] + $params );
+       }
+
+       /**
+        * Performs a single quick copy operation.
+        * This sets $params['op'] to 'copy' and passes it to doQuickOperation().
+        *
+        * @see FileBackend::doQuickOperation()
+        *
+        * @param array $params Operation parameters
+        * @return StatusValue
+        * @since 1.20
+        */
+       final public function quickCopy( array $params ) {
+               return $this->doQuickOperation( [ 'op' => 'copy' ] + $params );
+       }
+
+       /**
+        * Performs a single quick move operation.
+        * This sets $params['op'] to 'move' and passes it to doQuickOperation().
+        *
+        * @see FileBackend::doQuickOperation()
+        *
+        * @param array $params Operation parameters
+        * @return StatusValue
+        * @since 1.20
+        */
+       final public function quickMove( array $params ) {
+               return $this->doQuickOperation( [ 'op' => 'move' ] + $params );
+       }
+
+       /**
+        * Performs a single quick delete operation.
+        * This sets $params['op'] to 'delete' and passes it to doQuickOperation().
+        *
+        * @see FileBackend::doQuickOperation()
+        *
+        * @param array $params Operation parameters
+        * @return StatusValue
+        * @since 1.20
+        */
+       final public function quickDelete( array $params ) {
+               return $this->doQuickOperation( [ 'op' => 'delete' ] + $params );
+       }
+
+       /**
+        * Performs a single quick describe operation.
+        * This sets $params['op'] to 'describe' and passes it to doQuickOperation().
+        *
+        * @see FileBackend::doQuickOperation()
+        *
+        * @param array $params Operation parameters
+        * @return StatusValue
+        * @since 1.21
+        */
+       final public function quickDescribe( array $params ) {
+               return $this->doQuickOperation( [ 'op' => 'describe' ] + $params );
+       }
+
+       /**
+        * Concatenate a list of storage files into a single file system file.
+        * The target path should refer to a file that is already locked or
+        * otherwise safe from modification from other processes. Normally,
+        * the file will be a new temp file, which should be adequate.
+        *
+        * @param array $params Operation parameters, include:
+        *   - srcs        : ordered source storage paths (e.g. chunk1, chunk2, ...)
+        *   - dst         : file system path to 0-byte temp file
+        *   - parallelize : try to do operations in parallel when possible
+        * @return StatusValue
+        */
+       abstract public function concatenate( array $params );
+
+       /**
+        * Prepare a storage directory for usage.
+        * This will create any required containers and parent directories.
+        * Backends using key/value stores only need to create the container.
+        *
+        * The 'noAccess' and 'noListing' parameters works the same as in secure(),
+        * except they are only applied *if* the directory/container had to be created.
+        * These flags should always be set for directories that have private files.
+        * However, setting them is not guaranteed to actually do anything.
+        * Additional server configuration may be needed to achieve the desired effect.
+        *
+        * @param array $params Parameters include:
+        *   - dir            : storage directory
+        *   - noAccess       : try to deny file access (since 1.20)
+        *   - noListing      : try to deny file listing (since 1.20)
+        *   - bypassReadOnly : allow writes in read-only mode (since 1.20)
+        * @return StatusValue
+        */
+       final public function prepare( array $params ) {
+               if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
+                       return $this->newStatus( 'backend-fail-readonly', $this->name, $this->readOnly );
+               }
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
+               return $this->doPrepare( $params );
+       }
+
+       /**
+        * @see FileBackend::prepare()
+        * @param array $params
+        */
+       abstract protected function doPrepare( array $params );
+
+       /**
+        * Take measures to block web access to a storage directory and
+        * the container it belongs to. FS backends might add .htaccess
+        * files whereas key/value store backends might revoke container
+        * access to the storage user representing end-users in web requests.
+        *
+        * This is not guaranteed to actually make files or listings publically hidden.
+        * Additional server configuration may be needed to achieve the desired effect.
+        *
+        * @param array $params Parameters include:
+        *   - dir            : storage directory
+        *   - noAccess       : try to deny file access
+        *   - noListing      : try to deny file listing
+        *   - bypassReadOnly : allow writes in read-only mode (since 1.20)
+        * @return StatusValue
+        */
+       final public function secure( array $params ) {
+               if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
+                       return $this->newStatus( 'backend-fail-readonly', $this->name, $this->readOnly );
+               }
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
+               return $this->doSecure( $params );
+       }
+
+       /**
+        * @see FileBackend::secure()
+        * @param array $params
+        */
+       abstract protected function doSecure( array $params );
+
+       /**
+        * Remove measures to block web access to a storage directory and
+        * the container it belongs to. FS backends might remove .htaccess
+        * files whereas key/value store backends might grant container
+        * access to the storage user representing end-users in web requests.
+        * This essentially can undo the result of secure() calls.
+        *
+        * This is not guaranteed to actually make files or listings publically viewable.
+        * Additional server configuration may be needed to achieve the desired effect.
+        *
+        * @param array $params Parameters include:
+        *   - dir            : storage directory
+        *   - access         : try to allow file access
+        *   - listing        : try to allow file listing
+        *   - bypassReadOnly : allow writes in read-only mode (since 1.20)
+        * @return StatusValue
+        * @since 1.20
+        */
+       final public function publish( array $params ) {
+               if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
+                       return $this->newStatus( 'backend-fail-readonly', $this->name, $this->readOnly );
+               }
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
+               return $this->doPublish( $params );
+       }
+
+       /**
+        * @see FileBackend::publish()
+        * @param array $params
+        */
+       abstract protected function doPublish( array $params );
+
+       /**
+        * Delete a storage directory if it is empty.
+        * Backends using key/value stores may do nothing unless the directory
+        * is that of an empty container, in which case it will be deleted.
+        *
+        * @param array $params Parameters include:
+        *   - dir            : storage directory
+        *   - recursive      : recursively delete empty subdirectories first (since 1.20)
+        *   - bypassReadOnly : allow writes in read-only mode (since 1.20)
+        * @return StatusValue
+        */
+       final public function clean( array $params ) {
+               if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
+                       return $this->newStatus( 'backend-fail-readonly', $this->name, $this->readOnly );
+               }
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
+               return $this->doClean( $params );
+       }
+
+       /**
+        * @see FileBackend::clean()
+        * @param array $params
+        */
+       abstract protected function doClean( array $params );
+
+       /**
+        * Enter file operation scope.
+        * This just makes PHP ignore user aborts/disconnects until the return
+        * value leaves scope. This returns null and does nothing in CLI mode.
+        *
+        * @return ScopedCallback|null
+        */
+       final protected function getScopedPHPBehaviorForOps() {
+               if ( PHP_SAPI != 'cli' ) { // http://bugs.php.net/bug.php?id=47540
+                       $old = ignore_user_abort( true ); // avoid half-finished operations
+                       return new ScopedCallback( function () use ( $old ) {
+                               ignore_user_abort( $old );
+                       } );
+               }
+
+               return null;
+       }
+
+       /**
+        * Check if a file exists at a storage path in the backend.
+        * This returns false if only a directory exists at the path.
+        *
+        * @param array $params Parameters include:
+        *   - src    : source storage path
+        *   - latest : use the latest available data
+        * @return bool|null Returns null on failure
+        */
+       abstract public function fileExists( array $params );
+
+       /**
+        * Get the last-modified timestamp of the file at a storage path.
+        *
+        * @param array $params Parameters include:
+        *   - src    : source storage path
+        *   - latest : use the latest available data
+        * @return string|bool TS_MW timestamp or false on failure
+        */
+       abstract public function getFileTimestamp( array $params );
+
+       /**
+        * Get the contents of a file at a storage path in the backend.
+        * This should be avoided for potentially large files.
+        *
+        * @param array $params Parameters include:
+        *   - src    : source storage path
+        *   - latest : use the latest available data
+        * @return string|bool Returns false on failure
+        */
+       final public function getFileContents( array $params ) {
+               $contents = $this->getFileContentsMulti(
+                       [ 'srcs' => [ $params['src'] ] ] + $params );
+
+               return $contents[$params['src']];
+       }
+
+       /**
+        * Like getFileContents() except it takes an array of storage paths
+        * and returns a map of storage paths to strings (or null on failure).
+        * The map keys (paths) are in the same order as the provided list of paths.
+        *
+        * @see FileBackend::getFileContents()
+        *
+        * @param array $params Parameters include:
+        *   - srcs        : list of source storage paths
+        *   - latest      : use the latest available data
+        *   - parallelize : try to do operations in parallel when possible
+        * @return array Map of (path name => string or false on failure)
+        * @since 1.20
+        */
+       abstract public function getFileContentsMulti( array $params );
+
+       /**
+        * Get metadata about a file at a storage path in the backend.
+        * If the file does not exist, then this returns false.
+        * Otherwise, the result is an associative array that includes:
+        *   - headers  : map of HTTP headers used for GET/HEAD requests (name => value)
+        *   - metadata : map of file metadata (name => value)
+        * Metadata keys and headers names will be returned in all lower-case.
+        * Additional values may be included for internal use only.
+        *
+        * Use FileBackend::hasFeatures() to check how well this is supported.
+        *
+        * @param array $params
+        * $params include:
+        *   - src    : source storage path
+        *   - latest : use the latest available data
+        * @return array|bool Returns false on failure
+        * @since 1.23
+        */
+       abstract public function getFileXAttributes( array $params );
+
+       /**
+        * Get the size (bytes) of a file at a storage path in the backend.
+        *
+        * @param array $params Parameters include:
+        *   - src    : source storage path
+        *   - latest : use the latest available data
+        * @return int|bool Returns false on failure
+        */
+       abstract public function getFileSize( array $params );
+
+       /**
+        * Get quick information about a file at a storage path in the backend.
+        * If the file does not exist, then this returns false.
+        * Otherwise, the result is an associative array that includes:
+        *   - mtime  : the last-modified timestamp (TS_MW)
+        *   - size   : the file size (bytes)
+        * Additional values may be included for internal use only.
+        *
+        * @param array $params Parameters include:
+        *   - src    : source storage path
+        *   - latest : use the latest available data
+        * @return array|bool|null Returns null on failure
+        */
+       abstract public function getFileStat( array $params );
+
+       /**
+        * Get a SHA-1 hash of the file at a storage path in the backend.
+        *
+        * @param array $params Parameters include:
+        *   - src    : source storage path
+        *   - latest : use the latest available data
+        * @return string|bool Hash string or false on failure
+        */
+       abstract public function getFileSha1Base36( array $params );
+
+       /**
+        * Get the properties of the file at a storage path in the backend.
+        * This gives the result of FSFile::getProps() on a local copy of the file.
+        *
+        * @param array $params Parameters include:
+        *   - src    : source storage path
+        *   - latest : use the latest available data
+        * @return array Returns FSFile::placeholderProps() on failure
+        */
+       abstract public function getFileProps( array $params );
+
+       /**
+        * Stream the file at a storage path in the backend.
+        *
+        * If the file does not exists, an HTTP 404 error will be given.
+        * Appropriate HTTP headers (Status, Content-Type, Content-Length)
+        * will be sent if streaming began, while none will be sent otherwise.
+        * Implementations should flush the output buffer before sending data.
+        *
+        * @param array $params Parameters include:
+        *   - src      : source storage path
+        *   - headers  : list of additional HTTP headers to send if the file exists
+        *   - options  : HTTP request header map with lower case keys (since 1.28). Supports:
+        *                range             : format is "bytes=(\d*-\d*)"
+        *                if-modified-since : format is an HTTP date
+        *   - headless : only include the body (and headers from "headers") (since 1.28)
+        *   - latest   : use the latest available data
+        *   - allowOB  : preserve any output buffers (since 1.28)
+        * @return StatusValue
+        */
+       abstract public function streamFile( array $params );
+
+       /**
+        * Returns a file system file, identical to the file at a storage path.
+        * The file returned is either:
+        *   - a) A local copy of the file at a storage path in the backend.
+        *        The temporary copy will have the same extension as the source.
+        *   - b) An original of the file at a storage path in the backend.
+        * Temporary files may be purged when the file object falls out of scope.
+        *
+        * Write operations should *never* be done on this file as some backends
+        * may do internal tracking or may be instances of FileBackendMultiWrite.
+        * In that latter case, there are copies of the file that must stay in sync.
+        * Additionally, further calls to this function may return the same file.
+        *
+        * @param array $params Parameters include:
+        *   - src    : source storage path
+        *   - latest : use the latest available data
+        * @return FSFile|null Returns null on failure
+        */
+       final public function getLocalReference( array $params ) {
+               $fsFiles = $this->getLocalReferenceMulti(
+                       [ 'srcs' => [ $params['src'] ] ] + $params );
+
+               return $fsFiles[$params['src']];
+       }
+
+       /**
+        * Like getLocalReference() except it takes an array of storage paths
+        * and returns a map of storage paths to FSFile objects (or null on failure).
+        * The map keys (paths) are in the same order as the provided list of paths.
+        *
+        * @see FileBackend::getLocalReference()
+        *
+        * @param array $params Parameters include:
+        *   - srcs        : list of source storage paths
+        *   - latest      : use the latest available data
+        *   - parallelize : try to do operations in parallel when possible
+        * @return array Map of (path name => FSFile or null on failure)
+        * @since 1.20
+        */
+       abstract public function getLocalReferenceMulti( array $params );
+
+       /**
+        * Get a local copy on disk of the file at a storage path in the backend.
+        * The temporary copy will have the same file extension as the source.
+        * Temporary files may be purged when the file object falls out of scope.
+        *
+        * @param array $params Parameters include:
+        *   - src    : source storage path
+        *   - latest : use the latest available data
+        * @return TempFSFile|null Returns null on failure
+        */
+       final public function getLocalCopy( array $params ) {
+               $tmpFiles = $this->getLocalCopyMulti(
+                       [ 'srcs' => [ $params['src'] ] ] + $params );
+
+               return $tmpFiles[$params['src']];
+       }
+
+       /**
+        * Like getLocalCopy() except it takes an array of storage paths and
+        * returns a map of storage paths to TempFSFile objects (or null on failure).
+        * The map keys (paths) are in the same order as the provided list of paths.
+        *
+        * @see FileBackend::getLocalCopy()
+        *
+        * @param array $params Parameters include:
+        *   - srcs        : list of source storage paths
+        *   - latest      : use the latest available data
+        *   - parallelize : try to do operations in parallel when possible
+        * @return array Map of (path name => TempFSFile or null on failure)
+        * @since 1.20
+        */
+       abstract public function getLocalCopyMulti( array $params );
+
+       /**
+        * Return an HTTP URL to a given file that requires no authentication to use.
+        * The URL may be pre-authenticated (via some token in the URL) and temporary.
+        * This will return null if the backend cannot make an HTTP URL for the file.
+        *
+        * This is useful for key/value stores when using scripts that seek around
+        * large files and those scripts (and the backend) support HTTP Range headers.
+        * Otherwise, one would need to use getLocalReference(), which involves loading
+        * the entire file on to local disk.
+        *
+        * @param array $params Parameters include:
+        *   - src : source storage path
+        *   - ttl : lifetime (seconds) if pre-authenticated; default is 1 day
+        * @return string|null
+        * @since 1.21
+        */
+       abstract public function getFileHttpUrl( array $params );
+
+       /**
+        * Check if a directory exists at a given storage path.
+        * Backends using key/value stores will check if the path is a
+        * virtual directory, meaning there are files under the given directory.
+        *
+        * Storage backends with eventual consistency might return stale data.
+        *
+        * @param array $params Parameters include:
+        *   - dir : storage directory
+        * @return bool|null Returns null on failure
+        * @since 1.20
+        */
+       abstract public function directoryExists( array $params );
+
+       /**
+        * Get an iterator to list *all* directories under a storage directory.
+        * If the directory is of the form "mwstore://backend/container",
+        * then all directories in the container will be listed.
+        * If the directory is of form "mwstore://backend/container/dir",
+        * then all directories directly under that directory will be listed.
+        * Results will be storage directories relative to the given directory.
+        *
+        * Storage backends with eventual consistency might return stale data.
+        *
+        * Failures during iteration can result in FileBackendError exceptions (since 1.22).
+        *
+        * @param array $params Parameters include:
+        *   - dir     : storage directory
+        *   - topOnly : only return direct child dirs of the directory
+        * @return Traversable|array|null Returns null on failure
+        * @since 1.20
+        */
+       abstract public function getDirectoryList( array $params );
+
+       /**
+        * Same as FileBackend::getDirectoryList() except only lists
+        * directories that are immediately under the given directory.
+        *
+        * Storage backends with eventual consistency might return stale data.
+        *
+        * Failures during iteration can result in FileBackendError exceptions (since 1.22).
+        *
+        * @param array $params Parameters include:
+        *   - dir : storage directory
+        * @return Traversable|array|null Returns null on failure
+        * @since 1.20
+        */
+       final public function getTopDirectoryList( array $params ) {
+               return $this->getDirectoryList( [ 'topOnly' => true ] + $params );
+       }
+
+       /**
+        * Get an iterator to list *all* stored files under a storage directory.
+        * If the directory is of the form "mwstore://backend/container",
+        * then all files in the container will be listed.
+        * If the directory is of form "mwstore://backend/container/dir",
+        * then all files under that directory will be listed.
+        * Results will be storage paths relative to the given directory.
+        *
+        * Storage backends with eventual consistency might return stale data.
+        *
+        * Failures during iteration can result in FileBackendError exceptions (since 1.22).
+        *
+        * @param array $params Parameters include:
+        *   - dir        : storage directory
+        *   - topOnly    : only return direct child files of the directory (since 1.20)
+        *   - adviseStat : set to true if stat requests will be made on the files (since 1.22)
+        * @return Traversable|array|null Returns null on failure
+        */
+       abstract public function getFileList( array $params );
+
+       /**
+        * Same as FileBackend::getFileList() except only lists
+        * files that are immediately under the given directory.
+        *
+        * Storage backends with eventual consistency might return stale data.
+        *
+        * Failures during iteration can result in FileBackendError exceptions (since 1.22).
+        *
+        * @param array $params Parameters include:
+        *   - dir        : storage directory
+        *   - adviseStat : set to true if stat requests will be made on the files (since 1.22)
+        * @return Traversable|array|null Returns null on failure
+        * @since 1.20
+        */
+       final public function getTopFileList( array $params ) {
+               return $this->getFileList( [ 'topOnly' => true ] + $params );
+       }
+
+       /**
+        * Preload persistent file stat cache and property cache into in-process cache.
+        * This should be used when stat calls will be made on a known list of a many files.
+        *
+        * @see FileBackend::getFileStat()
+        *
+        * @param array $paths Storage paths
+        */
+       abstract public function preloadCache( array $paths );
+
+       /**
+        * Invalidate any in-process file stat and property cache.
+        * If $paths is given, then only the cache for those files will be cleared.
+        *
+        * @see FileBackend::getFileStat()
+        *
+        * @param array $paths Storage paths (optional)
+        */
+       abstract public function clearCache( array $paths = null );
+
+       /**
+        * Preload file stat information (concurrently if possible) into in-process cache.
+        *
+        * This should be used when stat calls will be made on a known list of a many files.
+        * This does not make use of the persistent file stat cache.
+        *
+        * @see FileBackend::getFileStat()
+        *
+        * @param array $params Parameters include:
+        *   - srcs        : list of source storage paths
+        *   - latest      : use the latest available data
+        * @return bool All requests proceeded without I/O errors (since 1.24)
+        * @since 1.23
+        */
+       abstract public function preloadFileStat( array $params );
+
+       /**
+        * Lock the files at the given storage paths in the backend.
+        * This will either lock all the files or none (on failure).
+        *
+        * Callers should consider using getScopedFileLocks() instead.
+        *
+        * @param array $paths Storage paths
+        * @param int $type LockManager::LOCK_* constant
+        * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.24)
+        * @return StatusValue
+        */
+       final public function lockFiles( array $paths, $type, $timeout = 0 ) {
+               $paths = array_map( 'FileBackend::normalizeStoragePath', $paths );
+
+               return $this->wrapStatus( $this->lockManager->lock( $paths, $type, $timeout ) );
+       }
+
+       /**
+        * Unlock the files at the given storage paths in the backend.
+        *
+        * @param array $paths Storage paths
+        * @param int $type LockManager::LOCK_* constant
+        * @return StatusValue
+        */
+       final public function unlockFiles( array $paths, $type ) {
+               $paths = array_map( 'FileBackend::normalizeStoragePath', $paths );
+
+               return $this->wrapStatus( $this->lockManager->unlock( $paths, $type ) );
+       }
+
+       /**
+        * Lock the files at the given storage paths in the backend.
+        * This will either lock all the files or none (on failure).
+        * On failure, the StatusValue object will be updated with errors.
+        *
+        * Once the return value goes out scope, the locks will be released and
+        * the StatusValue updated. Unlock fatals will not change the StatusValue "OK" value.
+        *
+        * @see ScopedLock::factory()
+        *
+        * @param array $paths List of storage paths or map of lock types to path lists
+        * @param int|string $type LockManager::LOCK_* constant or "mixed"
+        * @param StatusValue $status StatusValue to update on lock/unlock
+        * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.24)
+        * @return ScopedLock|null Returns null on failure
+        */
+       final public function getScopedFileLocks(
+               array $paths, $type, StatusValue $status, $timeout = 0
+       ) {
+               if ( $type === 'mixed' ) {
+                       foreach ( $paths as &$typePaths ) {
+                               $typePaths = array_map( 'FileBackend::normalizeStoragePath', $typePaths );
+                       }
+               } else {
+                       $paths = array_map( 'FileBackend::normalizeStoragePath', $paths );
+               }
+
+               return ScopedLock::factory( $this->lockManager, $paths, $type, $status, $timeout );
+       }
+
+       /**
+        * Get an array of scoped locks needed for a batch of file operations.
+        *
+        * Normally, FileBackend::doOperations() handles locking, unless
+        * the 'nonLocking' param is passed in. This function is useful if you
+        * want the files to be locked for a broader scope than just when the
+        * files are changing. For example, if you need to update DB metadata,
+        * you may want to keep the files locked until finished.
+        *
+        * @see FileBackend::doOperations()
+        *
+        * @param array $ops List of file operations to FileBackend::doOperations()
+        * @param StatusValue $status StatusValue to update on lock/unlock
+        * @return ScopedLock|null
+        * @since 1.20
+        */
+       abstract public function getScopedLocksForOps( array $ops, StatusValue $status );
+
+       /**
+        * Get the root storage path of this backend.
+        * All container paths are "subdirectories" of this path.
+        *
+        * @return string Storage path
+        * @since 1.20
+        */
+       final public function getRootStoragePath() {
+               return "mwstore://{$this->name}";
+       }
+
+       /**
+        * Get the storage path for the given container for this backend
+        *
+        * @param string $container Container name
+        * @return string Storage path
+        * @since 1.21
+        */
+       final public function getContainerStoragePath( $container ) {
+               return $this->getRootStoragePath() . "/{$container}";
+       }
+
+       /**
+        * Get the file journal object for this backend
+        *
+        * @return FileJournal
+        */
+       final public function getJournal() {
+               return $this->fileJournal;
+       }
+
+       /**
+        * Convert FSFile 'src' paths to string paths (with an 'srcRef' field set to the FSFile)
+        *
+        * The 'srcRef' field keeps any TempFSFile objects in scope for the backend to have it
+        * around as long it needs (which may vary greatly depending on configuration)
+        *
+        * @param array $ops File operation batch for FileBaclend::doOperations()
+        * @return array File operation batch
+        */
+       protected function resolveFSFileObjects( array $ops ) {
+               foreach ( $ops as &$op ) {
+                       $src = isset( $op['src'] ) ? $op['src'] : null;
+                       if ( $src instanceof FSFile ) {
+                               $op['srcRef'] = $src;
+                               $op['src'] = $src->getPath();
+                       }
+               }
+               unset( $op );
+
+               return $ops;
+       }
+
+       /**
+        * Check if a given path is a "mwstore://" path.
+        * This does not do any further validation or any existence checks.
+        *
+        * @param string $path
+        * @return bool
+        */
+       final public static function isStoragePath( $path ) {
+               return ( strpos( $path, 'mwstore://' ) === 0 );
+       }
+
+       /**
+        * Split a storage path into a backend name, a container name,
+        * and a relative file path. The relative path may be the empty string.
+        * This does not do any path normalization or traversal checks.
+        *
+        * @param string $storagePath
+        * @return array (backend, container, rel object) or (null, null, null)
+        */
+       final public static function splitStoragePath( $storagePath ) {
+               if ( self::isStoragePath( $storagePath ) ) {
+                       // Remove the "mwstore://" prefix and split the path
+                       $parts = explode( '/', substr( $storagePath, 10 ), 3 );
+                       if ( count( $parts ) >= 2 && $parts[0] != '' && $parts[1] != '' ) {
+                               if ( count( $parts ) == 3 ) {
+                                       return $parts; // e.g. "backend/container/path"
+                               } else {
+                                       return [ $parts[0], $parts[1], '' ]; // e.g. "backend/container"
+                               }
+                       }
+               }
+
+               return [ null, null, null ];
+       }
+
+       /**
+        * Normalize a storage path by cleaning up directory separators.
+        * Returns null if the path is not of the format of a valid storage path.
+        *
+        * @param string $storagePath
+        * @return string|null
+        */
+       final public static function normalizeStoragePath( $storagePath ) {
+               list( $backend, $container, $relPath ) = self::splitStoragePath( $storagePath );
+               if ( $relPath !== null ) { // must be for this backend
+                       $relPath = self::normalizeContainerPath( $relPath );
+                       if ( $relPath !== null ) {
+                               return ( $relPath != '' )
+                                       ? "mwstore://{$backend}/{$container}/{$relPath}"
+                                       : "mwstore://{$backend}/{$container}";
+                       }
+               }
+
+               return null;
+       }
+
+       /**
+        * Get the parent storage directory of a storage path.
+        * This returns a path like "mwstore://backend/container",
+        * "mwstore://backend/container/...", or null if there is no parent.
+        *
+        * @param string $storagePath
+        * @return string|null
+        */
+       final public static function parentStoragePath( $storagePath ) {
+               $storagePath = dirname( $storagePath );
+               list( , , $rel ) = self::splitStoragePath( $storagePath );
+
+               return ( $rel === null ) ? null : $storagePath;
+       }
+
+       /**
+        * Get the final extension from a storage or FS path
+        *
+        * @param string $path
+        * @param string $case One of (rawcase, uppercase, lowercase) (since 1.24)
+        * @return string
+        */
+       final public static function extensionFromPath( $path, $case = 'lowercase' ) {
+               $i = strrpos( $path, '.' );
+               $ext = $i ? substr( $path, $i + 1 ) : '';
+
+               if ( $case === 'lowercase' ) {
+                       $ext = strtolower( $ext );
+               } elseif ( $case === 'uppercase' ) {
+                       $ext = strtoupper( $ext );
+               }
+
+               return $ext;
+       }
+
+       /**
+        * Check if a relative path has no directory traversals
+        *
+        * @param string $path
+        * @return bool
+        * @since 1.20
+        */
+       final public static function isPathTraversalFree( $path ) {
+               return ( self::normalizeContainerPath( $path ) !== null );
+       }
+
+       /**
+        * Build a Content-Disposition header value per RFC 6266.
+        *
+        * @param string $type One of (attachment, inline)
+        * @param string $filename Suggested file name (should not contain slashes)
+        * @throws FileBackendError
+        * @return string
+        * @since 1.20
+        */
+       final public static function makeContentDisposition( $type, $filename = '' ) {
+               $parts = [];
+
+               $type = strtolower( $type );
+               if ( !in_array( $type, [ 'inline', 'attachment' ] ) ) {
+                       throw new InvalidArgumentException( "Invalid Content-Disposition type '$type'." );
+               }
+               $parts[] = $type;
+
+               if ( strlen( $filename ) ) {
+                       $parts[] = "filename*=UTF-8''" . rawurlencode( basename( $filename ) );
+               }
+
+               return implode( ';', $parts );
+       }
+
+       /**
+        * Validate and normalize a relative storage path.
+        * Null is returned if the path involves directory traversal.
+        * Traversal is insecure for FS backends and broken for others.
+        *
+        * This uses the same traversal protection as Title::secureAndSplit().
+        *
+        * @param string $path Storage path relative to a container
+        * @return string|null
+        */
+       final protected static function normalizeContainerPath( $path ) {
+               // Normalize directory separators
+               $path = strtr( $path, '\\', '/' );
+               // Collapse any consecutive directory separators
+               $path = preg_replace( '![/]{2,}!', '/', $path );
+               // Remove any leading directory separator
+               $path = ltrim( $path, '/' );
+               // Use the same traversal protection as Title::secureAndSplit()
+               if ( strpos( $path, '.' ) !== false ) {
+                       if (
+                               $path === '.' ||
+                               $path === '..' ||
+                               strpos( $path, './' ) === 0 ||
+                               strpos( $path, '../' ) === 0 ||
+                               strpos( $path, '/./' ) !== false ||
+                               strpos( $path, '/../' ) !== false
+                       ) {
+                               return null;
+                       }
+               }
+
+               return $path;
+       }
+
+       /**
+        * Yields the result of the status wrapper callback on either:
+        *   - StatusValue::newGood() if this method is called without parameters
+        *   - StatusValue::newFatal() with all parameters to this method if passed in
+        *
+        * @param ... string
+        * @return StatusValue
+        */
+       final protected function newStatus() {
+               $args = func_get_args();
+               if ( count( $args ) ) {
+                       $sv = call_user_func_array( [ 'StatusValue', 'newFatal' ], $args );
+               } else {
+                       $sv = StatusValue::newGood();
+               }
+
+               return $this->wrapStatus( $sv );
+       }
+
+       /**
+        * @param StatusValue $sv
+        * @return StatusValue Modified status or StatusValue subclass
+        */
+       final protected function wrapStatus( StatusValue $sv ) {
+               return $this->statusWrapper ? call_user_func( $this->statusWrapper, $sv ) : $sv;
+       }
+
+       /**
+        * @param string $section
+        * @return ScopedCallback|null
+        */
+       protected function scopedProfileSection( $section ) {
+               if ( $this->profiler ) {
+                       call_user_func( [ $this->profiler, 'profileIn' ], $section );
+                       return new ScopedCallback( [ $this->profiler, 'profileOut' ], [ $section ] );
+               }
+
+               return null;
+       }
+
+       protected function resetOutputBuffer() {
+               while ( ob_get_status() ) {
+                       if ( !ob_end_clean() ) {
+                               // Could not remove output buffer handler; abort now
+                               // to avoid getting in some kind of infinite loop.
+                               break;
+                       }
+               }
+       }
+}
diff --git a/includes/libs/filebackend/FileBackendError.php b/includes/libs/filebackend/FileBackendError.php
new file mode 100644 (file)
index 0000000..e233535
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+/**
+ * File backend exception for checked exceptions (e.g. I/O errors)
+ *
+ * @ingroup FileBackend
+ * @since 1.22
+ */
+class FileBackendError extends Exception {
+}
diff --git a/includes/libs/filebackend/FileBackendMultiWrite.php b/includes/libs/filebackend/FileBackendMultiWrite.php
new file mode 100644 (file)
index 0000000..212e84f
--- /dev/null
@@ -0,0 +1,756 @@
+<?php
+/**
+ * Proxy backend that mirrors writes to several internal backends.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * @brief Proxy backend that mirrors writes to several internal backends.
+ *
+ * This class defines a multi-write backend. Multiple backends can be
+ * registered to this proxy backend and it will act as a single backend.
+ * Use this when all access to those backends is through this proxy backend.
+ * At least one of the backends must be declared the "master" backend.
+ *
+ * Only use this class when transitioning from one storage system to another.
+ *
+ * Read operations are only done on the 'master' backend for consistency.
+ * Write operations are performed on all backends, starting with the master.
+ * This makes a best-effort to have transactional semantics, but since requests
+ * may sometimes fail, the use of "autoResync" or background scripts to fix
+ * inconsistencies is important.
+ *
+ * @ingroup FileBackend
+ * @since 1.19
+ */
+class FileBackendMultiWrite extends FileBackend {
+       /** @var FileBackendStore[] Prioritized list of FileBackendStore objects */
+       protected $backends = [];
+
+       /** @var int Index of master backend */
+       protected $masterIndex = -1;
+       /** @var int Index of read affinity backend */
+       protected $readIndex = -1;
+
+       /** @var int Bitfield */
+       protected $syncChecks = 0;
+       /** @var string|bool */
+       protected $autoResync = false;
+
+       /** @var bool */
+       protected $asyncWrites = false;
+
+       /* Possible internal backend consistency checks */
+       const CHECK_SIZE = 1;
+       const CHECK_TIME = 2;
+       const CHECK_SHA1 = 4;
+
+       /**
+        * Construct a proxy backend that consists of several internal backends.
+        * Locking, journaling, and read-only checks are handled by the proxy backend.
+        *
+        * Additional $config params include:
+        *   - backends       : Array of backend config and multi-backend settings.
+        *                      Each value is the config used in the constructor of a
+        *                      FileBackendStore class, but with these additional settings:
+        *                        - class         : The name of the backend class
+        *                        - isMultiMaster : This must be set for one backend.
+        *                        - readAffinity  : Use this for reads without 'latest' set.
+        *   - syncChecks     : Integer bitfield of internal backend sync checks to perform.
+        *                      Possible bits include the FileBackendMultiWrite::CHECK_* constants.
+        *                      There are constants for SIZE, TIME, and SHA1.
+        *                      The checks are done before allowing any file operations.
+        *   - autoResync     : Automatically resync the clone backends to the master backend
+        *                      when pre-operation sync checks fail. This should only be used
+        *                      if the master backend is stable and not missing any files.
+        *                      Use "conservative" to limit resyncing to copying newer master
+        *                      backend files over older (or non-existing) clone backend files.
+        *                      Cases that cannot be handled will result in operation abortion.
+        *   - replication    : Set to 'async' to defer file operations on the non-master backends.
+        *                      This will apply such updates post-send for web requests. Note that
+        *                      any checks from "syncChecks" are still synchronous.
+        *
+        * @param array $config
+        * @throws FileBackendError
+        */
+       public function __construct( array $config ) {
+               parent::__construct( $config );
+               $this->syncChecks = isset( $config['syncChecks'] )
+                       ? $config['syncChecks']
+                       : self::CHECK_SIZE;
+               $this->autoResync = isset( $config['autoResync'] )
+                       ? $config['autoResync']
+                       : false;
+               $this->asyncWrites = isset( $config['replication'] ) && $config['replication'] === 'async';
+               // Construct backends here rather than via registration
+               // to keep these backends hidden from outside the proxy.
+               $namesUsed = [];
+               foreach ( $config['backends'] as $index => $config ) {
+                       $name = $config['name'];
+                       if ( isset( $namesUsed[$name] ) ) { // don't break FileOp predicates
+                               throw new LogicException( "Two or more backends defined with the name $name." );
+                       }
+                       $namesUsed[$name] = 1;
+                       // Alter certain sub-backend settings for sanity
+                       unset( $config['readOnly'] ); // use proxy backend setting
+                       unset( $config['fileJournal'] ); // use proxy backend journal
+                       unset( $config['lockManager'] ); // lock under proxy backend
+                       $config['domainId'] = $this->domainId; // use the proxy backend wiki ID
+                       if ( !empty( $config['isMultiMaster'] ) ) {
+                               if ( $this->masterIndex >= 0 ) {
+                                       throw new LogicException( 'More than one master backend defined.' );
+                               }
+                               $this->masterIndex = $index; // this is the "master"
+                               $config['fileJournal'] = $this->fileJournal; // log under proxy backend
+                       }
+                       if ( !empty( $config['readAffinity'] ) ) {
+                               $this->readIndex = $index; // prefer this for reads
+                       }
+                       // Create sub-backend object
+                       if ( !isset( $config['class'] ) ) {
+                               throw new InvalidArgumentException( 'No class given for a backend config.' );
+                       }
+                       $class = $config['class'];
+                       $this->backends[$index] = new $class( $config );
+               }
+               if ( $this->masterIndex < 0 ) { // need backends and must have a master
+                       throw new LogicException( 'No master backend defined.' );
+               }
+               if ( $this->readIndex < 0 ) {
+                       $this->readIndex = $this->masterIndex; // default
+               }
+       }
+
+       final protected function doOperationsInternal( array $ops, array $opts ) {
+               $status = $this->newStatus();
+
+               $mbe = $this->backends[$this->masterIndex]; // convenience
+
+               // Try to lock those files for the scope of this function...
+               $scopeLock = null;
+               if ( empty( $opts['nonLocking'] ) ) {
+                       // Try to lock those files for the scope of this function...
+                       /** @noinspection PhpUnusedLocalVariableInspection */
+                       $scopeLock = $this->getScopedLocksForOps( $ops, $status );
+                       if ( !$status->isOK() ) {
+                               return $status; // abort
+                       }
+               }
+               // Clear any cache entries (after locks acquired)
+               $this->clearCache();
+               $opts['preserveCache'] = true; // only locked files are cached
+               // Get the list of paths to read/write...
+               $relevantPaths = $this->fileStoragePathsForOps( $ops );
+               // Check if the paths are valid and accessible on all backends...
+               $status->merge( $this->accessibilityCheck( $relevantPaths ) );
+               if ( !$status->isOK() ) {
+                       return $status; // abort
+               }
+               // Do a consistency check to see if the backends are consistent...
+               $syncStatus = $this->consistencyCheck( $relevantPaths );
+               if ( !$syncStatus->isOK() ) {
+                       wfDebugLog( 'FileOperation', get_class( $this ) .
+                               " failed sync check: " . FormatJson::encode( $relevantPaths ) );
+                       // Try to resync the clone backends to the master on the spot...
+                       if ( $this->autoResync === false
+                               || !$this->resyncFiles( $relevantPaths, $this->autoResync )->isOK()
+                       ) {
+                               $status->merge( $syncStatus );
+
+                               return $status; // abort
+                       }
+               }
+               // Actually attempt the operation batch on the master backend...
+               $realOps = $this->substOpBatchPaths( $ops, $mbe );
+               $masterStatus = $mbe->doOperations( $realOps, $opts );
+               $status->merge( $masterStatus );
+               // Propagate the operations to the clone backends if there were no unexpected errors
+               // and if there were either no expected errors or if the 'force' option was used.
+               // However, if nothing succeeded at all, then don't replicate any of the operations.
+               // If $ops only had one operation, this might avoid backend sync inconsistencies.
+               if ( $masterStatus->isOK() && $masterStatus->successCount > 0 ) {
+                       foreach ( $this->backends as $index => $backend ) {
+                               if ( $index === $this->masterIndex ) {
+                                       continue; // done already
+                               }
+
+                               $realOps = $this->substOpBatchPaths( $ops, $backend );
+                               if ( $this->asyncWrites && !$this->hasVolatileSources( $ops ) ) {
+                                       // Bind $scopeLock to the callback to preserve locks
+                                       DeferredUpdates::addCallableUpdate(
+                                               function() use ( $backend, $realOps, $opts, $scopeLock, $relevantPaths ) {
+                                                       wfDebugLog( 'FileOperationReplication',
+                                                               "'{$backend->getName()}' async replication; paths: " .
+                                                               FormatJson::encode( $relevantPaths ) );
+                                                       $backend->doOperations( $realOps, $opts );
+                                               }
+                                       );
+                               } else {
+                                       wfDebugLog( 'FileOperationReplication',
+                                               "'{$backend->getName()}' sync replication; paths: " .
+                                               FormatJson::encode( $relevantPaths ) );
+                                       $status->merge( $backend->doOperations( $realOps, $opts ) );
+                               }
+                       }
+               }
+               // Make 'success', 'successCount', and 'failCount' fields reflect
+               // the overall operation, rather than all the batches for each backend.
+               // Do this by only using success values from the master backend's batch.
+               $status->success = $masterStatus->success;
+               $status->successCount = $masterStatus->successCount;
+               $status->failCount = $masterStatus->failCount;
+
+               return $status;
+       }
+
+       /**
+        * Check that a set of files are consistent across all internal backends
+        *
+        * @param array $paths List of storage paths
+        * @return StatusValue
+        */
+       public function consistencyCheck( array $paths ) {
+               $status = $this->newStatus();
+               if ( $this->syncChecks == 0 || count( $this->backends ) <= 1 ) {
+                       return $status; // skip checks
+               }
+
+               // Preload all of the stat info in as few round trips as possible...
+               foreach ( $this->backends as $backend ) {
+                       $realPaths = $this->substPaths( $paths, $backend );
+                       $backend->preloadFileStat( [ 'srcs' => $realPaths, 'latest' => true ] );
+               }
+
+               $mBackend = $this->backends[$this->masterIndex];
+               foreach ( $paths as $path ) {
+                       $params = [ 'src' => $path, 'latest' => true ];
+                       $mParams = $this->substOpPaths( $params, $mBackend );
+                       // Stat the file on the 'master' backend
+                       $mStat = $mBackend->getFileStat( $mParams );
+                       if ( $this->syncChecks & self::CHECK_SHA1 ) {
+                               $mSha1 = $mBackend->getFileSha1Base36( $mParams );
+                       } else {
+                               $mSha1 = false;
+                       }
+                       // Check if all clone backends agree with the master...
+                       foreach ( $this->backends as $index => $cBackend ) {
+                               if ( $index === $this->masterIndex ) {
+                                       continue; // master
+                               }
+                               $cParams = $this->substOpPaths( $params, $cBackend );
+                               $cStat = $cBackend->getFileStat( $cParams );
+                               if ( $mStat ) { // file is in master
+                                       if ( !$cStat ) { // file should exist
+                                               $status->fatal( 'backend-fail-synced', $path );
+                                               continue;
+                                       }
+                                       if ( $this->syncChecks & self::CHECK_SIZE ) {
+                                               if ( $cStat['size'] != $mStat['size'] ) { // wrong size
+                                                       $status->fatal( 'backend-fail-synced', $path );
+                                                       continue;
+                                               }
+                                       }
+                                       if ( $this->syncChecks & self::CHECK_TIME ) {
+                                               $mTs = wfTimestamp( TS_UNIX, $mStat['mtime'] );
+                                               $cTs = wfTimestamp( TS_UNIX, $cStat['mtime'] );
+                                               if ( abs( $mTs - $cTs ) > 30 ) { // outdated file somewhere
+                                                       $status->fatal( 'backend-fail-synced', $path );
+                                                       continue;
+                                               }
+                                       }
+                                       if ( $this->syncChecks & self::CHECK_SHA1 ) {
+                                               if ( $cBackend->getFileSha1Base36( $cParams ) !== $mSha1 ) { // wrong SHA1
+                                                       $status->fatal( 'backend-fail-synced', $path );
+                                                       continue;
+                                               }
+                                       }
+                               } else { // file is not in master
+                                       if ( $cStat ) { // file should not exist
+                                               $status->fatal( 'backend-fail-synced', $path );
+                                       }
+                               }
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * Check that a set of file paths are usable across all internal backends
+        *
+        * @param array $paths List of storage paths
+        * @return StatusValue
+        */
+       public function accessibilityCheck( array $paths ) {
+               $status = $this->newStatus();
+               if ( count( $this->backends ) <= 1 ) {
+                       return $status; // skip checks
+               }
+
+               foreach ( $paths as $path ) {
+                       foreach ( $this->backends as $backend ) {
+                               $realPath = $this->substPaths( $path, $backend );
+                               if ( !$backend->isPathUsableInternal( $realPath ) ) {
+                                       $status->fatal( 'backend-fail-usable', $path );
+                               }
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * Check that a set of files are consistent across all internal backends
+        * and re-synchronize those files against the "multi master" if needed.
+        *
+        * @param array $paths List of storage paths
+        * @param string|bool $resyncMode False, True, or "conservative"; see __construct()
+        * @return StatusValue
+        */
+       public function resyncFiles( array $paths, $resyncMode = true ) {
+               $status = $this->newStatus();
+
+               $mBackend = $this->backends[$this->masterIndex];
+               foreach ( $paths as $path ) {
+                       $mPath = $this->substPaths( $path, $mBackend );
+                       $mSha1 = $mBackend->getFileSha1Base36( [ 'src' => $mPath, 'latest' => true ] );
+                       $mStat = $mBackend->getFileStat( [ 'src' => $mPath, 'latest' => true ] );
+                       if ( $mStat === null || ( $mSha1 !== false && !$mStat ) ) { // sanity
+                               $status->fatal( 'backend-fail-internal', $this->name );
+                               wfDebugLog( 'FileOperation', __METHOD__
+                                       . ': File is not available on the master backend' );
+                               continue; // file is not available on the master backend...
+                       }
+                       // Check of all clone backends agree with the master...
+                       foreach ( $this->backends as $index => $cBackend ) {
+                               if ( $index === $this->masterIndex ) {
+                                       continue; // master
+                               }
+                               $cPath = $this->substPaths( $path, $cBackend );
+                               $cSha1 = $cBackend->getFileSha1Base36( [ 'src' => $cPath, 'latest' => true ] );
+                               $cStat = $cBackend->getFileStat( [ 'src' => $cPath, 'latest' => true ] );
+                               if ( $cStat === null || ( $cSha1 !== false && !$cStat ) ) { // sanity
+                                       $status->fatal( 'backend-fail-internal', $cBackend->getName() );
+                                       wfDebugLog( 'FileOperation', __METHOD__ .
+                                               ': File is not available on the clone backend' );
+                                       continue; // file is not available on the clone backend...
+                               }
+                               if ( $mSha1 === $cSha1 ) {
+                                       // already synced; nothing to do
+                               } elseif ( $mSha1 !== false ) { // file is in master
+                                       if ( $resyncMode === 'conservative'
+                                               && $cStat && $cStat['mtime'] > $mStat['mtime']
+                                       ) {
+                                               $status->fatal( 'backend-fail-synced', $path );
+                                               continue; // don't rollback data
+                                       }
+                                       $fsFile = $mBackend->getLocalReference(
+                                               [ 'src' => $mPath, 'latest' => true ] );
+                                       $status->merge( $cBackend->quickStore(
+                                               [ 'src' => $fsFile->getPath(), 'dst' => $cPath ]
+                                       ) );
+                               } elseif ( $mStat === false ) { // file is not in master
+                                       if ( $resyncMode === 'conservative' ) {
+                                               $status->fatal( 'backend-fail-synced', $path );
+                                               continue; // don't delete data
+                                       }
+                                       $status->merge( $cBackend->quickDelete( [ 'src' => $cPath ] ) );
+                               }
+                       }
+               }
+
+               if ( !$status->isOK() ) {
+                       wfDebugLog( 'FileOperation', get_class( $this ) .
+                               " failed to resync: " . FormatJson::encode( $paths ) );
+               }
+
+               return $status;
+       }
+
+       /**
+        * Get a list of file storage paths to read or write for a list of operations
+        *
+        * @param array $ops Same format as doOperations()
+        * @return array List of storage paths to files (does not include directories)
+        */
+       protected function fileStoragePathsForOps( array $ops ) {
+               $paths = [];
+               foreach ( $ops as $op ) {
+                       if ( isset( $op['src'] ) ) {
+                               // For things like copy/move/delete with "ignoreMissingSource" and there
+                               // is no source file, nothing should happen and there should be no errors.
+                               if ( empty( $op['ignoreMissingSource'] )
+                                       || $this->fileExists( [ 'src' => $op['src'] ] )
+                               ) {
+                                       $paths[] = $op['src'];
+                               }
+                       }
+                       if ( isset( $op['srcs'] ) ) {
+                               $paths = array_merge( $paths, $op['srcs'] );
+                       }
+                       if ( isset( $op['dst'] ) ) {
+                               $paths[] = $op['dst'];
+                       }
+               }
+
+               return array_values( array_unique( array_filter( $paths, 'FileBackend::isStoragePath' ) ) );
+       }
+
+       /**
+        * Substitute the backend name in storage path parameters
+        * for a set of operations with that of a given internal backend.
+        *
+        * @param array $ops List of file operation arrays
+        * @param FileBackendStore $backend
+        * @return array
+        */
+       protected function substOpBatchPaths( array $ops, FileBackendStore $backend ) {
+               $newOps = []; // operations
+               foreach ( $ops as $op ) {
+                       $newOp = $op; // operation
+                       foreach ( [ 'src', 'srcs', 'dst', 'dir' ] as $par ) {
+                               if ( isset( $newOp[$par] ) ) { // string or array
+                                       $newOp[$par] = $this->substPaths( $newOp[$par], $backend );
+                               }
+                       }
+                       $newOps[] = $newOp;
+               }
+
+               return $newOps;
+       }
+
+       /**
+        * Same as substOpBatchPaths() but for a single operation
+        *
+        * @param array $ops File operation array
+        * @param FileBackendStore $backend
+        * @return array
+        */
+       protected function substOpPaths( array $ops, FileBackendStore $backend ) {
+               $newOps = $this->substOpBatchPaths( [ $ops ], $backend );
+
+               return $newOps[0];
+       }
+
+       /**
+        * Substitute the backend of storage paths with an internal backend's name
+        *
+        * @param array|string $paths List of paths or single string path
+        * @param FileBackendStore $backend
+        * @return array|string
+        */
+       protected function substPaths( $paths, FileBackendStore $backend ) {
+               return preg_replace(
+                       '!^mwstore://' . preg_quote( $this->name, '!' ) . '/!',
+                       StringUtils::escapeRegexReplacement( "mwstore://{$backend->getName()}/" ),
+                       $paths // string or array
+               );
+       }
+
+       /**
+        * Substitute the backend of internal storage paths with the proxy backend's name
+        *
+        * @param array|string $paths List of paths or single string path
+        * @return array|string
+        */
+       protected function unsubstPaths( $paths ) {
+               return preg_replace(
+                       '!^mwstore://([^/]+)!',
+                       StringUtils::escapeRegexReplacement( "mwstore://{$this->name}" ),
+                       $paths // string or array
+               );
+       }
+
+       /**
+        * @param array $ops File operations for FileBackend::doOperations()
+        * @return bool Whether there are file path sources with outside lifetime/ownership
+        */
+       protected function hasVolatileSources( array $ops ) {
+               foreach ( $ops as $op ) {
+                       if ( $op['op'] === 'store' && !isset( $op['srcRef'] ) ) {
+                               return true; // source file might be deleted anytime after do*Operations()
+                       }
+               }
+
+               return false;
+       }
+
+       protected function doQuickOperationsInternal( array $ops ) {
+               $status = $this->newStatus();
+               // Do the operations on the master backend; setting StatusValue fields...
+               $realOps = $this->substOpBatchPaths( $ops, $this->backends[$this->masterIndex] );
+               $masterStatus = $this->backends[$this->masterIndex]->doQuickOperations( $realOps );
+               $status->merge( $masterStatus );
+               // Propagate the operations to the clone backends...
+               foreach ( $this->backends as $index => $backend ) {
+                       if ( $index === $this->masterIndex ) {
+                               continue; // done already
+                       }
+
+                       $realOps = $this->substOpBatchPaths( $ops, $backend );
+                       if ( $this->asyncWrites && !$this->hasVolatileSources( $ops ) ) {
+                               DeferredUpdates::addCallableUpdate(
+                                       function() use ( $backend, $realOps ) {
+                                               $backend->doQuickOperations( $realOps );
+                                       }
+                               );
+                       } else {
+                               $status->merge( $backend->doQuickOperations( $realOps ) );
+                       }
+               }
+               // Make 'success', 'successCount', and 'failCount' fields reflect
+               // the overall operation, rather than all the batches for each backend.
+               // Do this by only using success values from the master backend's batch.
+               $status->success = $masterStatus->success;
+               $status->successCount = $masterStatus->successCount;
+               $status->failCount = $masterStatus->failCount;
+
+               return $status;
+       }
+
+       protected function doPrepare( array $params ) {
+               return $this->doDirectoryOp( 'prepare', $params );
+       }
+
+       protected function doSecure( array $params ) {
+               return $this->doDirectoryOp( 'secure', $params );
+       }
+
+       protected function doPublish( array $params ) {
+               return $this->doDirectoryOp( 'publish', $params );
+       }
+
+       protected function doClean( array $params ) {
+               return $this->doDirectoryOp( 'clean', $params );
+       }
+
+       /**
+        * @param string $method One of (doPrepare,doSecure,doPublish,doClean)
+        * @param array $params Method arguments
+        * @return StatusValue
+        */
+       protected function doDirectoryOp( $method, array $params ) {
+               $status = $this->newStatus();
+
+               $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
+               $masterStatus = $this->backends[$this->masterIndex]->$method( $realParams );
+               $status->merge( $masterStatus );
+
+               foreach ( $this->backends as $index => $backend ) {
+                       if ( $index === $this->masterIndex ) {
+                               continue; // already done
+                       }
+
+                       $realParams = $this->substOpPaths( $params, $backend );
+                       if ( $this->asyncWrites ) {
+                               DeferredUpdates::addCallableUpdate(
+                                       function() use ( $backend, $method, $realParams ) {
+                                               $backend->$method( $realParams );
+                                       }
+                               );
+                       } else {
+                               $status->merge( $backend->$method( $realParams ) );
+                       }
+               }
+
+               return $status;
+       }
+
+       public function concatenate( array $params ) {
+               $status = $this->newStatus();
+               // We are writing to an FS file, so we don't need to do this per-backend
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               $status->merge( $this->backends[$index]->concatenate( $realParams ) );
+
+               return $status;
+       }
+
+       public function fileExists( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               return $this->backends[$index]->fileExists( $realParams );
+       }
+
+       public function getFileTimestamp( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               return $this->backends[$index]->getFileTimestamp( $realParams );
+       }
+
+       public function getFileSize( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               return $this->backends[$index]->getFileSize( $realParams );
+       }
+
+       public function getFileStat( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               return $this->backends[$index]->getFileStat( $realParams );
+       }
+
+       public function getFileXAttributes( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               return $this->backends[$index]->getFileXAttributes( $realParams );
+       }
+
+       public function getFileContentsMulti( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               $contentsM = $this->backends[$index]->getFileContentsMulti( $realParams );
+
+               $contents = []; // (path => FSFile) mapping using the proxy backend's name
+               foreach ( $contentsM as $path => $data ) {
+                       $contents[$this->unsubstPaths( $path )] = $data;
+               }
+
+               return $contents;
+       }
+
+       public function getFileSha1Base36( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               return $this->backends[$index]->getFileSha1Base36( $realParams );
+       }
+
+       public function getFileProps( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               return $this->backends[$index]->getFileProps( $realParams );
+       }
+
+       public function streamFile( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               return $this->backends[$index]->streamFile( $realParams );
+       }
+
+       public function getLocalReferenceMulti( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               $fsFilesM = $this->backends[$index]->getLocalReferenceMulti( $realParams );
+
+               $fsFiles = []; // (path => FSFile) mapping using the proxy backend's name
+               foreach ( $fsFilesM as $path => $fsFile ) {
+                       $fsFiles[$this->unsubstPaths( $path )] = $fsFile;
+               }
+
+               return $fsFiles;
+       }
+
+       public function getLocalCopyMulti( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               $tempFilesM = $this->backends[$index]->getLocalCopyMulti( $realParams );
+
+               $tempFiles = []; // (path => TempFSFile) mapping using the proxy backend's name
+               foreach ( $tempFilesM as $path => $tempFile ) {
+                       $tempFiles[$this->unsubstPaths( $path )] = $tempFile;
+               }
+
+               return $tempFiles;
+       }
+
+       public function getFileHttpUrl( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               return $this->backends[$index]->getFileHttpUrl( $realParams );
+       }
+
+       public function directoryExists( array $params ) {
+               $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
+
+               return $this->backends[$this->masterIndex]->directoryExists( $realParams );
+       }
+
+       public function getDirectoryList( array $params ) {
+               $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
+
+               return $this->backends[$this->masterIndex]->getDirectoryList( $realParams );
+       }
+
+       public function getFileList( array $params ) {
+               $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
+
+               return $this->backends[$this->masterIndex]->getFileList( $realParams );
+       }
+
+       public function getFeatures() {
+               return $this->backends[$this->masterIndex]->getFeatures();
+       }
+
+       public function clearCache( array $paths = null ) {
+               foreach ( $this->backends as $backend ) {
+                       $realPaths = is_array( $paths ) ? $this->substPaths( $paths, $backend ) : null;
+                       $backend->clearCache( $realPaths );
+               }
+       }
+
+       public function preloadCache( array $paths ) {
+               $realPaths = $this->substPaths( $paths, $this->backends[$this->readIndex] );
+               $this->backends[$this->readIndex]->preloadCache( $realPaths );
+       }
+
+       public function preloadFileStat( array $params ) {
+               $index = $this->getReadIndexFromParams( $params );
+               $realParams = $this->substOpPaths( $params, $this->backends[$index] );
+
+               return $this->backends[$index]->preloadFileStat( $realParams );
+       }
+
+       public function getScopedLocksForOps( array $ops, StatusValue $status ) {
+               $realOps = $this->substOpBatchPaths( $ops, $this->backends[$this->masterIndex] );
+               $fileOps = $this->backends[$this->masterIndex]->getOperationsInternal( $realOps );
+               // Get the paths to lock from the master backend
+               $paths = $this->backends[$this->masterIndex]->getPathsToLockForOpsInternal( $fileOps );
+               // Get the paths under the proxy backend's name
+               $pbPaths = [
+                       LockManager::LOCK_UW => $this->unsubstPaths( $paths[LockManager::LOCK_UW] ),
+                       LockManager::LOCK_EX => $this->unsubstPaths( $paths[LockManager::LOCK_EX] )
+               ];
+
+               // Actually acquire the locks
+               return $this->getScopedFileLocks( $pbPaths, 'mixed', $status );
+       }
+
+       /**
+        * @param array $params
+        * @return int The master or read affinity backend index, based on $params['latest']
+        */
+       protected function getReadIndexFromParams( array $params ) {
+               return !empty( $params['latest'] ) ? $this->masterIndex : $this->readIndex;
+       }
+}
diff --git a/includes/libs/filebackend/FileBackendStore.php b/includes/libs/filebackend/FileBackendStore.php
new file mode 100644 (file)
index 0000000..bd2ce5d
--- /dev/null
@@ -0,0 +1,1983 @@
+<?php
+/**
+ * Base class for all backends using particular storage medium.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * @brief Base class for all backends using particular storage medium.
+ *
+ * This class defines the methods as abstract that subclasses must implement.
+ * Outside callers should *not* use functions with "Internal" in the name.
+ *
+ * The FileBackend operations are implemented using basic functions
+ * such as storeInternal(), copyInternal(), deleteInternal() and the like.
+ * This class is also responsible for path resolution and sanitization.
+ *
+ * @ingroup FileBackend
+ * @since 1.19
+ */
+abstract class FileBackendStore extends FileBackend {
+       /** @var WANObjectCache */
+       protected $memCache;
+       /** @var BagOStuff */
+       protected $srvCache;
+       /** @var ProcessCacheLRU Map of paths to small (RAM/disk) cache items */
+       protected $cheapCache;
+       /** @var ProcessCacheLRU Map of paths to large (RAM/disk) cache items */
+       protected $expensiveCache;
+
+       /** @var array Map of container names to sharding config */
+       protected $shardViaHashLevels = [];
+
+       /** @var callable Method to get the MIME type of files */
+       protected $mimeCallback;
+
+       protected $maxFileSize = 4294967296; // integer bytes (4GiB)
+
+       const CACHE_TTL = 10; // integer; TTL in seconds for process cache entries
+       const CACHE_CHEAP_SIZE = 500; // integer; max entries in "cheap cache"
+       const CACHE_EXPENSIVE_SIZE = 5; // integer; max entries in "expensive cache"
+
+       /**
+        * @see FileBackend::__construct()
+        * Additional $config params include:
+        *   - srvCache     : BagOStuff cache to APC/XCache or the like.
+        *   - wanCache     : WANObjectCache object to use for persistent caching.
+        *   - mimeCallback : Callback that takes (storage path, content, file system path) and
+        *                    returns the MIME type of the file or 'unknown/unknown'. The file
+        *                    system path parameter should be used if the content one is null.
+        *
+        * @param array $config
+        */
+       public function __construct( array $config ) {
+               parent::__construct( $config );
+               $this->mimeCallback = isset( $config['mimeCallback'] )
+                       ? $config['mimeCallback']
+                       : null;
+               $this->srvCache = new EmptyBagOStuff(); // disabled by default
+               $this->memCache = WANObjectCache::newEmpty(); // disabled by default
+               $this->cheapCache = new ProcessCacheLRU( self::CACHE_CHEAP_SIZE );
+               $this->expensiveCache = new ProcessCacheLRU( self::CACHE_EXPENSIVE_SIZE );
+       }
+
+       /**
+        * Get the maximum allowable file size given backend
+        * medium restrictions and basic performance constraints.
+        * Do not call this function from places outside FileBackend and FileOp.
+        *
+        * @return int Bytes
+        */
+       final public function maxFileSizeInternal() {
+               return $this->maxFileSize;
+       }
+
+       /**
+        * Check if a file can be created or changed at a given storage path.
+        * FS backends should check if the parent directory exists, files can be
+        * written under it, and that any file already there is writable.
+        * Backends using key/value stores should check if the container exists.
+        *
+        * @param string $storagePath
+        * @return bool
+        */
+       abstract public function isPathUsableInternal( $storagePath );
+
+       /**
+        * Create a file in the backend with the given contents.
+        * This will overwrite any file that exists at the destination.
+        * Do not call this function from places outside FileBackend and FileOp.
+        *
+        * $params include:
+        *   - content     : the raw file contents
+        *   - dst         : destination storage path
+        *   - headers     : HTTP header name/value map
+        *   - async       : StatusValue will be returned immediately if supported.
+        *                   If the StatusValue is OK, then its value field will be
+        *                   set to a FileBackendStoreOpHandle object.
+        *   - dstExists   : Whether a file exists at the destination (optimization).
+        *                   Callers can use "false" if no existing file is being changed.
+        *
+        * @param array $params
+        * @return StatusValue
+        */
+       final public function createInternal( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               if ( strlen( $params['content'] ) > $this->maxFileSizeInternal() ) {
+                       $status = $this->newStatus( 'backend-fail-maxsize',
+                               $params['dst'], $this->maxFileSizeInternal() );
+               } else {
+                       $status = $this->doCreateInternal( $params );
+                       $this->clearCache( [ $params['dst'] ] );
+                       if ( !isset( $params['dstExists'] ) || $params['dstExists'] ) {
+                               $this->deleteFileCache( $params['dst'] ); // persistent cache
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::createInternal()
+        * @param array $params
+        * @return StatusValue
+        */
+       abstract protected function doCreateInternal( array $params );
+
+       /**
+        * Store a file into the backend from a file on disk.
+        * This will overwrite any file that exists at the destination.
+        * Do not call this function from places outside FileBackend and FileOp.
+        *
+        * $params include:
+        *   - src         : source path on disk
+        *   - dst         : destination storage path
+        *   - headers     : HTTP header name/value map
+        *   - async       : StatusValue will be returned immediately if supported.
+        *                   If the StatusValue is OK, then its value field will be
+        *                   set to a FileBackendStoreOpHandle object.
+        *   - dstExists   : Whether a file exists at the destination (optimization).
+        *                   Callers can use "false" if no existing file is being changed.
+        *
+        * @param array $params
+        * @return StatusValue
+        */
+       final public function storeInternal( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               if ( filesize( $params['src'] ) > $this->maxFileSizeInternal() ) {
+                       $status = $this->newStatus( 'backend-fail-maxsize',
+                               $params['dst'], $this->maxFileSizeInternal() );
+               } else {
+                       $status = $this->doStoreInternal( $params );
+                       $this->clearCache( [ $params['dst'] ] );
+                       if ( !isset( $params['dstExists'] ) || $params['dstExists'] ) {
+                               $this->deleteFileCache( $params['dst'] ); // persistent cache
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::storeInternal()
+        * @param array $params
+        * @return StatusValue
+        */
+       abstract protected function doStoreInternal( array $params );
+
+       /**
+        * Copy a file from one storage path to another in the backend.
+        * This will overwrite any file that exists at the destination.
+        * Do not call this function from places outside FileBackend and FileOp.
+        *
+        * $params include:
+        *   - src                 : source storage path
+        *   - dst                 : destination storage path
+        *   - ignoreMissingSource : do nothing if the source file does not exist
+        *   - headers             : HTTP header name/value map
+        *   - async               : StatusValue will be returned immediately if supported.
+        *                           If the StatusValue is OK, then its value field will be
+        *                           set to a FileBackendStoreOpHandle object.
+        *   - dstExists           : Whether a file exists at the destination (optimization).
+        *                           Callers can use "false" if no existing file is being changed.
+        *
+        * @param array $params
+        * @return StatusValue
+        */
+       final public function copyInternal( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->doCopyInternal( $params );
+               $this->clearCache( [ $params['dst'] ] );
+               if ( !isset( $params['dstExists'] ) || $params['dstExists'] ) {
+                       $this->deleteFileCache( $params['dst'] ); // persistent cache
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::copyInternal()
+        * @param array $params
+        * @return StatusValue
+        */
+       abstract protected function doCopyInternal( array $params );
+
+       /**
+        * Delete a file at the storage path.
+        * Do not call this function from places outside FileBackend and FileOp.
+        *
+        * $params include:
+        *   - src                 : source storage path
+        *   - ignoreMissingSource : do nothing if the source file does not exist
+        *   - async               : StatusValue will be returned immediately if supported.
+        *                           If the StatusValue is OK, then its value field will be
+        *                           set to a FileBackendStoreOpHandle object.
+        *
+        * @param array $params
+        * @return StatusValue
+        */
+       final public function deleteInternal( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->doDeleteInternal( $params );
+               $this->clearCache( [ $params['src'] ] );
+               $this->deleteFileCache( $params['src'] ); // persistent cache
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::deleteInternal()
+        * @param array $params
+        * @return StatusValue
+        */
+       abstract protected function doDeleteInternal( array $params );
+
+       /**
+        * Move a file from one storage path to another in the backend.
+        * This will overwrite any file that exists at the destination.
+        * Do not call this function from places outside FileBackend and FileOp.
+        *
+        * $params include:
+        *   - src                 : source storage path
+        *   - dst                 : destination storage path
+        *   - ignoreMissingSource : do nothing if the source file does not exist
+        *   - headers             : HTTP header name/value map
+        *   - async               : StatusValue will be returned immediately if supported.
+        *                           If the StatusValue is OK, then its value field will be
+        *                           set to a FileBackendStoreOpHandle object.
+        *   - dstExists           : Whether a file exists at the destination (optimization).
+        *                           Callers can use "false" if no existing file is being changed.
+        *
+        * @param array $params
+        * @return StatusValue
+        */
+       final public function moveInternal( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->doMoveInternal( $params );
+               $this->clearCache( [ $params['src'], $params['dst'] ] );
+               $this->deleteFileCache( $params['src'] ); // persistent cache
+               if ( !isset( $params['dstExists'] ) || $params['dstExists'] ) {
+                       $this->deleteFileCache( $params['dst'] ); // persistent cache
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::moveInternal()
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function doMoveInternal( array $params ) {
+               unset( $params['async'] ); // two steps, won't work here :)
+               $nsrc = FileBackend::normalizeStoragePath( $params['src'] );
+               $ndst = FileBackend::normalizeStoragePath( $params['dst'] );
+               // Copy source to dest
+               $status = $this->copyInternal( $params );
+               if ( $nsrc !== $ndst && $status->isOK() ) {
+                       // Delete source (only fails due to races or network problems)
+                       $status->merge( $this->deleteInternal( [ 'src' => $params['src'] ] ) );
+                       $status->setResult( true, $status->value ); // ignore delete() errors
+               }
+
+               return $status;
+       }
+
+       /**
+        * Alter metadata for a file at the storage path.
+        * Do not call this function from places outside FileBackend and FileOp.
+        *
+        * $params include:
+        *   - src           : source storage path
+        *   - headers       : HTTP header name/value map
+        *   - async         : StatusValue will be returned immediately if supported.
+        *                     If the StatusValue is OK, then its value field will be
+        *                     set to a FileBackendStoreOpHandle object.
+        *
+        * @param array $params
+        * @return StatusValue
+        */
+       final public function describeInternal( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               if ( count( $params['headers'] ) ) {
+                       $status = $this->doDescribeInternal( $params );
+                       $this->clearCache( [ $params['src'] ] );
+                       $this->deleteFileCache( $params['src'] ); // persistent cache
+               } else {
+                       $status = $this->newStatus(); // nothing to do
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::describeInternal()
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function doDescribeInternal( array $params ) {
+               return $this->newStatus();
+       }
+
+       /**
+        * No-op file operation that does nothing.
+        * Do not call this function from places outside FileBackend and FileOp.
+        *
+        * @param array $params
+        * @return StatusValue
+        */
+       final public function nullInternal( array $params ) {
+               return $this->newStatus();
+       }
+
+       final public function concatenate( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->newStatus();
+
+               // Try to lock the source files for the scope of this function
+               $scopeLockS = $this->getScopedFileLocks( $params['srcs'], LockManager::LOCK_UW, $status );
+               if ( $status->isOK() ) {
+                       // Actually do the file concatenation...
+                       $start_time = microtime( true );
+                       $status->merge( $this->doConcatenate( $params ) );
+                       $sec = microtime( true ) - $start_time;
+                       if ( !$status->isOK() ) {
+                               $this->logger->error( get_class( $this ) . "-{$this->name}" .
+                                       " failed to concatenate " . count( $params['srcs'] ) . " file(s) [$sec sec]" );
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::concatenate()
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function doConcatenate( array $params ) {
+               $status = $this->newStatus();
+               $tmpPath = $params['dst']; // convenience
+               unset( $params['latest'] ); // sanity
+
+               // Check that the specified temp file is valid...
+               MediaWiki\suppressWarnings();
+               $ok = ( is_file( $tmpPath ) && filesize( $tmpPath ) == 0 );
+               MediaWiki\restoreWarnings();
+               if ( !$ok ) { // not present or not empty
+                       $status->fatal( 'backend-fail-opentemp', $tmpPath );
+
+                       return $status;
+               }
+
+               // Get local FS versions of the chunks needed for the concatenation...
+               $fsFiles = $this->getLocalReferenceMulti( $params );
+               foreach ( $fsFiles as $path => &$fsFile ) {
+                       if ( !$fsFile ) { // chunk failed to download?
+                               $fsFile = $this->getLocalReference( [ 'src' => $path ] );
+                               if ( !$fsFile ) { // retry failed?
+                                       $status->fatal( 'backend-fail-read', $path );
+
+                                       return $status;
+                               }
+                       }
+               }
+               unset( $fsFile ); // unset reference so we can reuse $fsFile
+
+               // Get a handle for the destination temp file
+               $tmpHandle = fopen( $tmpPath, 'ab' );
+               if ( $tmpHandle === false ) {
+                       $status->fatal( 'backend-fail-opentemp', $tmpPath );
+
+                       return $status;
+               }
+
+               // Build up the temp file using the source chunks (in order)...
+               foreach ( $fsFiles as $virtualSource => $fsFile ) {
+                       // Get a handle to the local FS version
+                       $sourceHandle = fopen( $fsFile->getPath(), 'rb' );
+                       if ( $sourceHandle === false ) {
+                               fclose( $tmpHandle );
+                               $status->fatal( 'backend-fail-read', $virtualSource );
+
+                               return $status;
+                       }
+                       // Append chunk to file (pass chunk size to avoid magic quotes)
+                       if ( !stream_copy_to_stream( $sourceHandle, $tmpHandle ) ) {
+                               fclose( $sourceHandle );
+                               fclose( $tmpHandle );
+                               $status->fatal( 'backend-fail-writetemp', $tmpPath );
+
+                               return $status;
+                       }
+                       fclose( $sourceHandle );
+               }
+               if ( !fclose( $tmpHandle ) ) {
+                       $status->fatal( 'backend-fail-closetemp', $tmpPath );
+
+                       return $status;
+               }
+
+               clearstatcache(); // temp file changed
+
+               return $status;
+       }
+
+       final protected function doPrepare( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->newStatus();
+
+               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
+               if ( $dir === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dir'] );
+
+                       return $status; // invalid storage path
+               }
+
+               if ( $shard !== null ) { // confined to a single container/shard
+                       $status->merge( $this->doPrepareInternal( $fullCont, $dir, $params ) );
+               } else { // directory is on several shards
+                       $this->logger->debug( __METHOD__ . ": iterating over all container shards.\n" );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
+                       foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
+                               $status->merge( $this->doPrepareInternal( "{$fullCont}{$suffix}", $dir, $params ) );
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::doPrepare()
+        * @param string $container
+        * @param string $dir
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function doPrepareInternal( $container, $dir, array $params ) {
+               return $this->newStatus();
+       }
+
+       final protected function doSecure( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->newStatus();
+
+               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
+               if ( $dir === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dir'] );
+
+                       return $status; // invalid storage path
+               }
+
+               if ( $shard !== null ) { // confined to a single container/shard
+                       $status->merge( $this->doSecureInternal( $fullCont, $dir, $params ) );
+               } else { // directory is on several shards
+                       $this->logger->debug( __METHOD__ . ": iterating over all container shards.\n" );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
+                       foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
+                               $status->merge( $this->doSecureInternal( "{$fullCont}{$suffix}", $dir, $params ) );
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::doSecure()
+        * @param string $container
+        * @param string $dir
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function doSecureInternal( $container, $dir, array $params ) {
+               return $this->newStatus();
+       }
+
+       final protected function doPublish( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->newStatus();
+
+               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
+               if ( $dir === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dir'] );
+
+                       return $status; // invalid storage path
+               }
+
+               if ( $shard !== null ) { // confined to a single container/shard
+                       $status->merge( $this->doPublishInternal( $fullCont, $dir, $params ) );
+               } else { // directory is on several shards
+                       $this->logger->debug( __METHOD__ . ": iterating over all container shards.\n" );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
+                       foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
+                               $status->merge( $this->doPublishInternal( "{$fullCont}{$suffix}", $dir, $params ) );
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::doPublish()
+        * @param string $container
+        * @param string $dir
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function doPublishInternal( $container, $dir, array $params ) {
+               return $this->newStatus();
+       }
+
+       final protected function doClean( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->newStatus();
+
+               // Recursive: first delete all empty subdirs recursively
+               if ( !empty( $params['recursive'] ) && !$this->directoriesAreVirtual() ) {
+                       $subDirsRel = $this->getTopDirectoryList( [ 'dir' => $params['dir'] ] );
+                       if ( $subDirsRel !== null ) { // no errors
+                               foreach ( $subDirsRel as $subDirRel ) {
+                                       $subDir = $params['dir'] . "/{$subDirRel}"; // full path
+                                       $status->merge( $this->doClean( [ 'dir' => $subDir ] + $params ) );
+                               }
+                               unset( $subDirsRel ); // free directory for rmdir() on Windows (for FS backends)
+                       }
+               }
+
+               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
+               if ( $dir === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dir'] );
+
+                       return $status; // invalid storage path
+               }
+
+               // Attempt to lock this directory...
+               $filesLockEx = [ $params['dir'] ];
+               $scopedLockE = $this->getScopedFileLocks( $filesLockEx, LockManager::LOCK_EX, $status );
+               if ( !$status->isOK() ) {
+                       return $status; // abort
+               }
+
+               if ( $shard !== null ) { // confined to a single container/shard
+                       $status->merge( $this->doCleanInternal( $fullCont, $dir, $params ) );
+                       $this->deleteContainerCache( $fullCont ); // purge cache
+               } else { // directory is on several shards
+                       $this->logger->debug( __METHOD__ . ": iterating over all container shards.\n" );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
+                       foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
+                               $status->merge( $this->doCleanInternal( "{$fullCont}{$suffix}", $dir, $params ) );
+                               $this->deleteContainerCache( "{$fullCont}{$suffix}" ); // purge cache
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::doClean()
+        * @param string $container
+        * @param string $dir
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function doCleanInternal( $container, $dir, array $params ) {
+               return $this->newStatus();
+       }
+
+       final public function fileExists( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $stat = $this->getFileStat( $params );
+
+               return ( $stat === null ) ? null : (bool)$stat; // null => failure
+       }
+
+       final public function getFileTimestamp( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $stat = $this->getFileStat( $params );
+
+               return $stat ? $stat['mtime'] : false;
+       }
+
+       final public function getFileSize( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $stat = $this->getFileStat( $params );
+
+               return $stat ? $stat['size'] : false;
+       }
+
+       final public function getFileStat( array $params ) {
+               $path = self::normalizeStoragePath( $params['src'] );
+               if ( $path === null ) {
+                       return false; // invalid storage path
+               }
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $latest = !empty( $params['latest'] ); // use latest data?
+               if ( !$latest && !$this->cheapCache->has( $path, 'stat', self::CACHE_TTL ) ) {
+                       $this->primeFileCache( [ $path ] ); // check persistent cache
+               }
+               if ( $this->cheapCache->has( $path, 'stat', self::CACHE_TTL ) ) {
+                       $stat = $this->cheapCache->get( $path, 'stat' );
+                       // If we want the latest data, check that this cached
+                       // value was in fact fetched with the latest available data.
+                       if ( is_array( $stat ) ) {
+                               if ( !$latest || $stat['latest'] ) {
+                                       return $stat;
+                               }
+                       } elseif ( in_array( $stat, [ 'NOT_EXIST', 'NOT_EXIST_LATEST' ] ) ) {
+                               if ( !$latest || $stat === 'NOT_EXIST_LATEST' ) {
+                                       return false;
+                               }
+                       }
+               }
+               $stat = $this->doGetFileStat( $params );
+               if ( is_array( $stat ) ) { // file exists
+                       // Strongly consistent backends can automatically set "latest"
+                       $stat['latest'] = isset( $stat['latest'] ) ? $stat['latest'] : $latest;
+                       $this->cheapCache->set( $path, 'stat', $stat );
+                       $this->setFileCache( $path, $stat ); // update persistent cache
+                       if ( isset( $stat['sha1'] ) ) { // some backends store SHA-1 as metadata
+                               $this->cheapCache->set( $path, 'sha1',
+                                       [ 'hash' => $stat['sha1'], 'latest' => $latest ] );
+                       }
+                       if ( isset( $stat['xattr'] ) ) { // some backends store headers/metadata
+                               $stat['xattr'] = self::normalizeXAttributes( $stat['xattr'] );
+                               $this->cheapCache->set( $path, 'xattr',
+                                       [ 'map' => $stat['xattr'], 'latest' => $latest ] );
+                       }
+               } elseif ( $stat === false ) { // file does not exist
+                       $this->cheapCache->set( $path, 'stat', $latest ? 'NOT_EXIST_LATEST' : 'NOT_EXIST' );
+                       $this->cheapCache->set( $path, 'xattr', [ 'map' => false, 'latest' => $latest ] );
+                       $this->cheapCache->set( $path, 'sha1', [ 'hash' => false, 'latest' => $latest ] );
+                       $this->logger->debug( __METHOD__ . ": File $path does not exist.\n" );
+               } else { // an error occurred
+                       $this->logger->warning( __METHOD__ . ": Could not stat file $path.\n" );
+               }
+
+               return $stat;
+       }
+
+       /**
+        * @see FileBackendStore::getFileStat()
+        * @param array $params
+        */
+       abstract protected function doGetFileStat( array $params );
+
+       public function getFileContentsMulti( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+
+               $params = $this->setConcurrencyFlags( $params );
+               $contents = $this->doGetFileContentsMulti( $params );
+
+               return $contents;
+       }
+
+       /**
+        * @see FileBackendStore::getFileContentsMulti()
+        * @param array $params
+        * @return array
+        */
+       protected function doGetFileContentsMulti( array $params ) {
+               $contents = [];
+               foreach ( $this->doGetLocalReferenceMulti( $params ) as $path => $fsFile ) {
+                       MediaWiki\suppressWarnings();
+                       $contents[$path] = $fsFile ? file_get_contents( $fsFile->getPath() ) : false;
+                       MediaWiki\restoreWarnings();
+               }
+
+               return $contents;
+       }
+
+       final public function getFileXAttributes( array $params ) {
+               $path = self::normalizeStoragePath( $params['src'] );
+               if ( $path === null ) {
+                       return false; // invalid storage path
+               }
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $latest = !empty( $params['latest'] ); // use latest data?
+               if ( $this->cheapCache->has( $path, 'xattr', self::CACHE_TTL ) ) {
+                       $stat = $this->cheapCache->get( $path, 'xattr' );
+                       // If we want the latest data, check that this cached
+                       // value was in fact fetched with the latest available data.
+                       if ( !$latest || $stat['latest'] ) {
+                               return $stat['map'];
+                       }
+               }
+               $fields = $this->doGetFileXAttributes( $params );
+               $fields = is_array( $fields ) ? self::normalizeXAttributes( $fields ) : false;
+               $this->cheapCache->set( $path, 'xattr', [ 'map' => $fields, 'latest' => $latest ] );
+
+               return $fields;
+       }
+
+       /**
+        * @see FileBackendStore::getFileXAttributes()
+        * @param array $params
+        * @return bool|string
+        */
+       protected function doGetFileXAttributes( array $params ) {
+               return [ 'headers' => [], 'metadata' => [] ]; // not supported
+       }
+
+       final public function getFileSha1Base36( array $params ) {
+               $path = self::normalizeStoragePath( $params['src'] );
+               if ( $path === null ) {
+                       return false; // invalid storage path
+               }
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $latest = !empty( $params['latest'] ); // use latest data?
+               if ( $this->cheapCache->has( $path, 'sha1', self::CACHE_TTL ) ) {
+                       $stat = $this->cheapCache->get( $path, 'sha1' );
+                       // If we want the latest data, check that this cached
+                       // value was in fact fetched with the latest available data.
+                       if ( !$latest || $stat['latest'] ) {
+                               return $stat['hash'];
+                       }
+               }
+               $hash = $this->doGetFileSha1Base36( $params );
+               $this->cheapCache->set( $path, 'sha1', [ 'hash' => $hash, 'latest' => $latest ] );
+
+               return $hash;
+       }
+
+       /**
+        * @see FileBackendStore::getFileSha1Base36()
+        * @param array $params
+        * @return bool|string
+        */
+       protected function doGetFileSha1Base36( array $params ) {
+               $fsFile = $this->getLocalReference( $params );
+               if ( !$fsFile ) {
+                       return false;
+               } else {
+                       return $fsFile->getSha1Base36();
+               }
+       }
+
+       final public function getFileProps( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $fsFile = $this->getLocalReference( $params );
+               $props = $fsFile ? $fsFile->getProps() : FSFile::placeholderProps();
+
+               return $props;
+       }
+
+       final public function getLocalReferenceMulti( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+
+               $params = $this->setConcurrencyFlags( $params );
+
+               $fsFiles = []; // (path => FSFile)
+               $latest = !empty( $params['latest'] ); // use latest data?
+               // Reuse any files already in process cache...
+               foreach ( $params['srcs'] as $src ) {
+                       $path = self::normalizeStoragePath( $src );
+                       if ( $path === null ) {
+                               $fsFiles[$src] = null; // invalid storage path
+                       } elseif ( $this->expensiveCache->has( $path, 'localRef' ) ) {
+                               $val = $this->expensiveCache->get( $path, 'localRef' );
+                               // If we want the latest data, check that this cached
+                               // value was in fact fetched with the latest available data.
+                               if ( !$latest || $val['latest'] ) {
+                                       $fsFiles[$src] = $val['object'];
+                               }
+                       }
+               }
+               // Fetch local references of any remaning files...
+               $params['srcs'] = array_diff( $params['srcs'], array_keys( $fsFiles ) );
+               foreach ( $this->doGetLocalReferenceMulti( $params ) as $path => $fsFile ) {
+                       $fsFiles[$path] = $fsFile;
+                       if ( $fsFile ) { // update the process cache...
+                               $this->expensiveCache->set( $path, 'localRef',
+                                       [ 'object' => $fsFile, 'latest' => $latest ] );
+                       }
+               }
+
+               return $fsFiles;
+       }
+
+       /**
+        * @see FileBackendStore::getLocalReferenceMulti()
+        * @param array $params
+        * @return array
+        */
+       protected function doGetLocalReferenceMulti( array $params ) {
+               return $this->doGetLocalCopyMulti( $params );
+       }
+
+       final public function getLocalCopyMulti( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+
+               $params = $this->setConcurrencyFlags( $params );
+               $tmpFiles = $this->doGetLocalCopyMulti( $params );
+
+               return $tmpFiles;
+       }
+
+       /**
+        * @see FileBackendStore::getLocalCopyMulti()
+        * @param array $params
+        * @return array
+        */
+       abstract protected function doGetLocalCopyMulti( array $params );
+
+       /**
+        * @see FileBackend::getFileHttpUrl()
+        * @param array $params
+        * @return string|null
+        */
+       public function getFileHttpUrl( array $params ) {
+               return null; // not supported
+       }
+
+       final public function streamFile( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->newStatus();
+
+               // Always set some fields for subclass convenience
+               $params['options'] = isset( $params['options'] ) ? $params['options'] : [];
+               $params['headers'] = isset( $params['headers'] ) ? $params['headers'] : [];
+
+               // Don't stream it out as text/html if there was a PHP error
+               if ( ( empty( $params['headless'] ) || $params['headers'] ) && headers_sent() ) {
+                       print "Headers already sent, terminating.\n";
+                       $status->fatal( 'backend-fail-stream', $params['src'] );
+                       return $status;
+               }
+
+               $status->merge( $this->doStreamFile( $params ) );
+
+               return $status;
+       }
+
+       /**
+        * @see FileBackendStore::streamFile()
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function doStreamFile( array $params ) {
+               $status = $this->newStatus();
+
+               $flags = 0;
+               $flags |= !empty( $params['headless'] ) ? HTTPFileStreamer::STREAM_HEADLESS : 0;
+               $flags |= !empty( $params['allowOB'] ) ? HTTPFileStreamer::STREAM_ALLOW_OB : 0;
+
+               $fsFile = $this->getLocalReference( $params );
+               if ( $fsFile ) {
+                       $streamer = new HTTPFileStreamer(
+                               $fsFile->getPath(),
+                               [
+                                       'obResetFunc' => $this->obResetFunc,
+                                       'streamMimeFunc' => $this->streamMimeFunc
+                               ]
+                       );
+                       $res = $streamer->stream( $params['headers'], true, $params['options'], $flags );
+               } else {
+                       $res = false;
+                       HTTPFileStreamer::send404Message( $params['src'], $flags );
+               }
+
+               if ( !$res ) {
+                       $status->fatal( 'backend-fail-stream', $params['src'] );
+               }
+
+               return $status;
+       }
+
+       final public function directoryExists( array $params ) {
+               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
+               if ( $dir === null ) {
+                       return false; // invalid storage path
+               }
+               if ( $shard !== null ) { // confined to a single container/shard
+                       return $this->doDirectoryExists( $fullCont, $dir, $params );
+               } else { // directory is on several shards
+                       $this->logger->debug( __METHOD__ . ": iterating over all container shards.\n" );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
+                       $res = false; // response
+                       foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
+                               $exists = $this->doDirectoryExists( "{$fullCont}{$suffix}", $dir, $params );
+                               if ( $exists ) {
+                                       $res = true;
+                                       break; // found one!
+                               } elseif ( $exists === null ) { // error?
+                                       $res = null; // if we don't find anything, it is indeterminate
+                               }
+                       }
+
+                       return $res;
+               }
+       }
+
+       /**
+        * @see FileBackendStore::directoryExists()
+        *
+        * @param string $container Resolved container name
+        * @param string $dir Resolved path relative to container
+        * @param array $params
+        * @return bool|null
+        */
+       abstract protected function doDirectoryExists( $container, $dir, array $params );
+
+       final public function getDirectoryList( array $params ) {
+               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
+               if ( $dir === null ) { // invalid storage path
+                       return null;
+               }
+               if ( $shard !== null ) {
+                       // File listing is confined to a single container/shard
+                       return $this->getDirectoryListInternal( $fullCont, $dir, $params );
+               } else {
+                       $this->logger->debug( __METHOD__ . ": iterating over all container shards.\n" );
+                       // File listing spans multiple containers/shards
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
+
+                       return new FileBackendStoreShardDirIterator( $this,
+                               $fullCont, $dir, $this->getContainerSuffixes( $shortCont ), $params );
+               }
+       }
+
+       /**
+        * Do not call this function from places outside FileBackend
+        *
+        * @see FileBackendStore::getDirectoryList()
+        *
+        * @param string $container Resolved container name
+        * @param string $dir Resolved path relative to container
+        * @param array $params
+        * @return Traversable|array|null Returns null on failure
+        */
+       abstract public function getDirectoryListInternal( $container, $dir, array $params );
+
+       final public function getFileList( array $params ) {
+               list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
+               if ( $dir === null ) { // invalid storage path
+                       return null;
+               }
+               if ( $shard !== null ) {
+                       // File listing is confined to a single container/shard
+                       return $this->getFileListInternal( $fullCont, $dir, $params );
+               } else {
+                       $this->logger->debug( __METHOD__ . ": iterating over all container shards.\n" );
+                       // File listing spans multiple containers/shards
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
+
+                       return new FileBackendStoreShardFileIterator( $this,
+                               $fullCont, $dir, $this->getContainerSuffixes( $shortCont ), $params );
+               }
+       }
+
+       /**
+        * Do not call this function from places outside FileBackend
+        *
+        * @see FileBackendStore::getFileList()
+        *
+        * @param string $container Resolved container name
+        * @param string $dir Resolved path relative to container
+        * @param array $params
+        * @return Traversable|array|null Returns null on failure
+        */
+       abstract public function getFileListInternal( $container, $dir, array $params );
+
+       /**
+        * Return a list of FileOp objects from a list of operations.
+        * Do not call this function from places outside FileBackend.
+        *
+        * The result must have the same number of items as the input.
+        * An exception is thrown if an unsupported operation is requested.
+        *
+        * @param array $ops Same format as doOperations()
+        * @return FileOp[] List of FileOp objects
+        * @throws FileBackendError
+        */
+       final public function getOperationsInternal( array $ops ) {
+               $supportedOps = [
+                       'store' => 'StoreFileOp',
+                       'copy' => 'CopyFileOp',
+                       'move' => 'MoveFileOp',
+                       'delete' => 'DeleteFileOp',
+                       'create' => 'CreateFileOp',
+                       'describe' => 'DescribeFileOp',
+                       'null' => 'NullFileOp'
+               ];
+
+               $performOps = []; // array of FileOp objects
+               // Build up ordered array of FileOps...
+               foreach ( $ops as $operation ) {
+                       $opName = $operation['op'];
+                       if ( isset( $supportedOps[$opName] ) ) {
+                               $class = $supportedOps[$opName];
+                               // Get params for this operation
+                               $params = $operation;
+                               // Append the FileOp class
+                               $performOps[] = new $class( $this, $params, $this->logger );
+                       } else {
+                               throw new FileBackendError( "Operation '$opName' is not supported." );
+                       }
+               }
+
+               return $performOps;
+       }
+
+       /**
+        * Get a list of storage paths to lock for a list of operations
+        * Returns an array with LockManager::LOCK_UW (shared locks) and
+        * LockManager::LOCK_EX (exclusive locks) keys, each corresponding
+        * to a list of storage paths to be locked. All returned paths are
+        * normalized.
+        *
+        * @param array $performOps List of FileOp objects
+        * @return array (LockManager::LOCK_UW => path list, LockManager::LOCK_EX => path list)
+        */
+       final public function getPathsToLockForOpsInternal( array $performOps ) {
+               // Build up a list of files to lock...
+               $paths = [ 'sh' => [], 'ex' => [] ];
+               foreach ( $performOps as $fileOp ) {
+                       $paths['sh'] = array_merge( $paths['sh'], $fileOp->storagePathsRead() );
+                       $paths['ex'] = array_merge( $paths['ex'], $fileOp->storagePathsChanged() );
+               }
+               // Optimization: if doing an EX lock anyway, don't also set an SH one
+               $paths['sh'] = array_diff( $paths['sh'], $paths['ex'] );
+               // Get a shared lock on the parent directory of each path changed
+               $paths['sh'] = array_merge( $paths['sh'], array_map( 'dirname', $paths['ex'] ) );
+
+               return [
+                       LockManager::LOCK_UW => $paths['sh'],
+                       LockManager::LOCK_EX => $paths['ex']
+               ];
+       }
+
+       public function getScopedLocksForOps( array $ops, StatusValue $status ) {
+               $paths = $this->getPathsToLockForOpsInternal( $this->getOperationsInternal( $ops ) );
+
+               return $this->getScopedFileLocks( $paths, 'mixed', $status );
+       }
+
+       final protected function doOperationsInternal( array $ops, array $opts ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->newStatus();
+
+               // Fix up custom header name/value pairs...
+               $ops = array_map( [ $this, 'sanitizeOpHeaders' ], $ops );
+
+               // Build up a list of FileOps...
+               $performOps = $this->getOperationsInternal( $ops );
+
+               // Acquire any locks as needed...
+               if ( empty( $opts['nonLocking'] ) ) {
+                       // Build up a list of files to lock...
+                       $paths = $this->getPathsToLockForOpsInternal( $performOps );
+                       // Try to lock those files for the scope of this function...
+
+                       $scopeLock = $this->getScopedFileLocks( $paths, 'mixed', $status );
+                       if ( !$status->isOK() ) {
+                               return $status; // abort
+                       }
+               }
+
+               // Clear any file cache entries (after locks acquired)
+               if ( empty( $opts['preserveCache'] ) ) {
+                       $this->clearCache();
+               }
+
+               // Build the list of paths involved
+               $paths = [];
+               foreach ( $performOps as $performOp ) {
+                       $paths = array_merge( $paths, $performOp->storagePathsRead() );
+                       $paths = array_merge( $paths, $performOp->storagePathsChanged() );
+               }
+
+               // Enlarge the cache to fit the stat entries of these files
+               $this->cheapCache->resize( max( 2 * count( $paths ), self::CACHE_CHEAP_SIZE ) );
+
+               // Load from the persistent container caches
+               $this->primeContainerCache( $paths );
+               // Get the latest stat info for all the files (having locked them)
+               $ok = $this->preloadFileStat( [ 'srcs' => $paths, 'latest' => true ] );
+
+               if ( $ok ) {
+                       // Actually attempt the operation batch...
+                       $opts = $this->setConcurrencyFlags( $opts );
+                       $subStatus = FileOpBatch::attempt( $performOps, $opts, $this->fileJournal );
+               } else {
+                       // If we could not even stat some files, then bail out...
+                       $subStatus = $this->newStatus( 'backend-fail-internal', $this->name );
+                       foreach ( $ops as $i => $op ) { // mark each op as failed
+                               $subStatus->success[$i] = false;
+                               ++$subStatus->failCount;
+                       }
+                       $this->logger->error( get_class( $this ) . "-{$this->name} " .
+                               " stat failure; aborted operations: " . FormatJson::encode( $ops ) );
+               }
+
+               // Merge errors into StatusValue fields
+               $status->merge( $subStatus );
+               $status->success = $subStatus->success; // not done in merge()
+
+               // Shrink the stat cache back to normal size
+               $this->cheapCache->resize( self::CACHE_CHEAP_SIZE );
+
+               return $status;
+       }
+
+       final protected function doQuickOperationsInternal( array $ops ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $status = $this->newStatus();
+
+               // Fix up custom header name/value pairs...
+               $ops = array_map( [ $this, 'sanitizeOpHeaders' ], $ops );
+
+               // Clear any file cache entries
+               $this->clearCache();
+
+               $supportedOps = [ 'create', 'store', 'copy', 'move', 'delete', 'describe', 'null' ];
+               // Parallel ops may be disabled in config due to dependencies (e.g. needing popen())
+               $async = ( $this->parallelize === 'implicit' && count( $ops ) > 1 );
+               $maxConcurrency = $this->concurrency; // throttle
+               /** @var StatusValue[] $statuses */
+               $statuses = []; // array of (index => StatusValue)
+               $fileOpHandles = []; // list of (index => handle) arrays
+               $curFileOpHandles = []; // current handle batch
+               // Perform the sync-only ops and build up op handles for the async ops...
+               foreach ( $ops as $index => $params ) {
+                       if ( !in_array( $params['op'], $supportedOps ) ) {
+                               throw new FileBackendError( "Operation '{$params['op']}' is not supported." );
+                       }
+                       $method = $params['op'] . 'Internal'; // e.g. "storeInternal"
+                       $subStatus = $this->$method( [ 'async' => $async ] + $params );
+                       if ( $subStatus->value instanceof FileBackendStoreOpHandle ) { // async
+                               if ( count( $curFileOpHandles ) >= $maxConcurrency ) {
+                                       $fileOpHandles[] = $curFileOpHandles; // push this batch
+                                       $curFileOpHandles = [];
+                               }
+                               $curFileOpHandles[$index] = $subStatus->value; // keep index
+                       } else { // error or completed
+                               $statuses[$index] = $subStatus; // keep index
+                       }
+               }
+               if ( count( $curFileOpHandles ) ) {
+                       $fileOpHandles[] = $curFileOpHandles; // last batch
+               }
+               // Do all the async ops that can be done concurrently...
+               foreach ( $fileOpHandles as $fileHandleBatch ) {
+                       $statuses = $statuses + $this->executeOpHandlesInternal( $fileHandleBatch );
+               }
+               // Marshall and merge all the responses...
+               foreach ( $statuses as $index => $subStatus ) {
+                       $status->merge( $subStatus );
+                       if ( $subStatus->isOK() ) {
+                               $status->success[$index] = true;
+                               ++$status->successCount;
+                       } else {
+                               $status->success[$index] = false;
+                               ++$status->failCount;
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * Execute a list of FileBackendStoreOpHandle handles in parallel.
+        * The resulting StatusValue object fields will correspond
+        * to the order in which the handles where given.
+        *
+        * @param FileBackendStoreOpHandle[] $fileOpHandles
+        *
+        * @throws FileBackendError
+        * @return StatusValue[] Map of StatusValue objects
+        */
+       final public function executeOpHandlesInternal( array $fileOpHandles ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+
+               foreach ( $fileOpHandles as $fileOpHandle ) {
+                       if ( !( $fileOpHandle instanceof FileBackendStoreOpHandle ) ) {
+                               throw new InvalidArgumentException( "Got a non-FileBackendStoreOpHandle object." );
+                       } elseif ( $fileOpHandle->backend->getName() !== $this->getName() ) {
+                               throw new InvalidArgumentException(
+                                       "Got a FileBackendStoreOpHandle for the wrong backend." );
+                       }
+               }
+               $res = $this->doExecuteOpHandlesInternal( $fileOpHandles );
+               foreach ( $fileOpHandles as $fileOpHandle ) {
+                       $fileOpHandle->closeResources();
+               }
+
+               return $res;
+       }
+
+       /**
+        * @see FileBackendStore::executeOpHandlesInternal()
+        *
+        * @param FileBackendStoreOpHandle[] $fileOpHandles
+        *
+        * @throws FileBackendError
+        * @return StatusValue[] List of corresponding StatusValue objects
+        */
+       protected function doExecuteOpHandlesInternal( array $fileOpHandles ) {
+               if ( count( $fileOpHandles ) ) {
+                       throw new LogicException( "Backend does not support asynchronous operations." );
+               }
+
+               return [];
+       }
+
+       /**
+        * Normalize and filter HTTP headers from a file operation
+        *
+        * This normalizes and strips long HTTP headers from a file operation.
+        * Most headers are just numbers, but some are allowed to be long.
+        * This function is useful for cleaning up headers and avoiding backend
+        * specific errors, especially in the middle of batch file operations.
+        *
+        * @param array $op Same format as doOperation()
+        * @return array
+        */
+       protected function sanitizeOpHeaders( array $op ) {
+               static $longs = [ 'content-disposition' ];
+
+               if ( isset( $op['headers'] ) ) { // op sets HTTP headers
+                       $newHeaders = [];
+                       foreach ( $op['headers'] as $name => $value ) {
+                               $name = strtolower( $name );
+                               $maxHVLen = in_array( $name, $longs ) ? INF : 255;
+                               if ( strlen( $name ) > 255 || strlen( $value ) > $maxHVLen ) {
+                                       trigger_error( "Header '$name: $value' is too long." );
+                               } else {
+                                       $newHeaders[$name] = strlen( $value ) ? $value : ''; // null/false => ""
+                               }
+                       }
+                       $op['headers'] = $newHeaders;
+               }
+
+               return $op;
+       }
+
+       final public function preloadCache( array $paths ) {
+               $fullConts = []; // full container names
+               foreach ( $paths as $path ) {
+                       list( $fullCont, , ) = $this->resolveStoragePath( $path );
+                       $fullConts[] = $fullCont;
+               }
+               // Load from the persistent file and container caches
+               $this->primeContainerCache( $fullConts );
+               $this->primeFileCache( $paths );
+       }
+
+       final public function clearCache( array $paths = null ) {
+               if ( is_array( $paths ) ) {
+                       $paths = array_map( 'FileBackend::normalizeStoragePath', $paths );
+                       $paths = array_filter( $paths, 'strlen' ); // remove nulls
+               }
+               if ( $paths === null ) {
+                       $this->cheapCache->clear();
+                       $this->expensiveCache->clear();
+               } else {
+                       foreach ( $paths as $path ) {
+                               $this->cheapCache->clear( $path );
+                               $this->expensiveCache->clear( $path );
+                       }
+               }
+               $this->doClearCache( $paths );
+       }
+
+       /**
+        * Clears any additional stat caches for storage paths
+        *
+        * @see FileBackend::clearCache()
+        *
+        * @param array $paths Storage paths (optional)
+        */
+       protected function doClearCache( array $paths = null ) {
+       }
+
+       final public function preloadFileStat( array $params ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $success = true; // no network errors
+
+               $params['concurrency'] = ( $this->parallelize !== 'off' ) ? $this->concurrency : 1;
+               $stats = $this->doGetFileStatMulti( $params );
+               if ( $stats === null ) {
+                       return true; // not supported
+               }
+
+               $latest = !empty( $params['latest'] ); // use latest data?
+               foreach ( $stats as $path => $stat ) {
+                       $path = FileBackend::normalizeStoragePath( $path );
+                       if ( $path === null ) {
+                               continue; // this shouldn't happen
+                       }
+                       if ( is_array( $stat ) ) { // file exists
+                               // Strongly consistent backends can automatically set "latest"
+                               $stat['latest'] = isset( $stat['latest'] ) ? $stat['latest'] : $latest;
+                               $this->cheapCache->set( $path, 'stat', $stat );
+                               $this->setFileCache( $path, $stat ); // update persistent cache
+                               if ( isset( $stat['sha1'] ) ) { // some backends store SHA-1 as metadata
+                                       $this->cheapCache->set( $path, 'sha1',
+                                               [ 'hash' => $stat['sha1'], 'latest' => $latest ] );
+                               }
+                               if ( isset( $stat['xattr'] ) ) { // some backends store headers/metadata
+                                       $stat['xattr'] = self::normalizeXAttributes( $stat['xattr'] );
+                                       $this->cheapCache->set( $path, 'xattr',
+                                               [ 'map' => $stat['xattr'], 'latest' => $latest ] );
+                               }
+                       } elseif ( $stat === false ) { // file does not exist
+                               $this->cheapCache->set( $path, 'stat',
+                                       $latest ? 'NOT_EXIST_LATEST' : 'NOT_EXIST' );
+                               $this->cheapCache->set( $path, 'xattr',
+                                       [ 'map' => false, 'latest' => $latest ] );
+                               $this->cheapCache->set( $path, 'sha1',
+                                       [ 'hash' => false, 'latest' => $latest ] );
+                               $this->logger->debug( __METHOD__ . ": File $path does not exist.\n" );
+                       } else { // an error occurred
+                               $success = false;
+                               $this->logger->warning( __METHOD__ . ": Could not stat file $path.\n" );
+                       }
+               }
+
+               return $success;
+       }
+
+       /**
+        * Get file stat information (concurrently if possible) for several files
+        *
+        * @see FileBackend::getFileStat()
+        *
+        * @param array $params Parameters include:
+        *   - srcs        : list of source storage paths
+        *   - latest      : use the latest available data
+        * @return array|null Map of storage paths to array|bool|null (returns null if not supported)
+        * @since 1.23
+        */
+       protected function doGetFileStatMulti( array $params ) {
+               return null; // not supported
+       }
+
+       /**
+        * Is this a key/value store where directories are just virtual?
+        * Virtual directories exists in so much as files exists that are
+        * prefixed with the directory path followed by a forward slash.
+        *
+        * @return bool
+        */
+       abstract protected function directoriesAreVirtual();
+
+       /**
+        * Check if a short container name is valid
+        *
+        * This checks for length and illegal characters.
+        * This may disallow certain characters that can appear
+        * in the prefix used to make the full container name.
+        *
+        * @param string $container
+        * @return bool
+        */
+       final protected static function isValidShortContainerName( $container ) {
+               // Suffixes like '.xxx' (hex shard chars) or '.seg' (file segments)
+               // might be used by subclasses. Reserve the dot character for sanity.
+               // The only way dots end up in containers (e.g. resolveStoragePath)
+               // is due to the wikiId container prefix or the above suffixes.
+               return self::isValidContainerName( $container ) && !preg_match( '/[.]/', $container );
+       }
+
+       /**
+        * Check if a full container name is valid
+        *
+        * This checks for length and illegal characters.
+        * Limiting the characters makes migrations to other stores easier.
+        *
+        * @param string $container
+        * @return bool
+        */
+       final protected static function isValidContainerName( $container ) {
+               // This accounts for NTFS, Swift, and Ceph restrictions
+               // and disallows directory separators or traversal characters.
+               // Note that matching strings URL encode to the same string;
+               // in Swift/Ceph, the length restriction is *after* URL encoding.
+               return (bool)preg_match( '/^[a-z0-9][a-z0-9-_.]{0,199}$/i', $container );
+       }
+
+       /**
+        * Splits a storage path into an internal container name,
+        * an internal relative file name, and a container shard suffix.
+        * Any shard suffix is already appended to the internal container name.
+        * This also checks that the storage path is valid and within this backend.
+        *
+        * If the container is sharded but a suffix could not be determined,
+        * this means that the path can only refer to a directory and can only
+        * be scanned by looking in all the container shards.
+        *
+        * @param string $storagePath
+        * @return array (container, path, container suffix) or (null, null, null) if invalid
+        */
+       final protected function resolveStoragePath( $storagePath ) {
+               list( $backend, $shortCont, $relPath ) = self::splitStoragePath( $storagePath );
+               if ( $backend === $this->name ) { // must be for this backend
+                       $relPath = self::normalizeContainerPath( $relPath );
+                       if ( $relPath !== null && self::isValidShortContainerName( $shortCont ) ) {
+                               // Get shard for the normalized path if this container is sharded
+                               $cShard = $this->getContainerShard( $shortCont, $relPath );
+                               // Validate and sanitize the relative path (backend-specific)
+                               $relPath = $this->resolveContainerPath( $shortCont, $relPath );
+                               if ( $relPath !== null ) {
+                                       // Prepend any wiki ID prefix to the container name
+                                       $container = $this->fullContainerName( $shortCont );
+                                       if ( self::isValidContainerName( $container ) ) {
+                                               // Validate and sanitize the container name (backend-specific)
+                                               $container = $this->resolveContainerName( "{$container}{$cShard}" );
+                                               if ( $container !== null ) {
+                                                       return [ $container, $relPath, $cShard ];
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               return [ null, null, null ];
+       }
+
+       /**
+        * Like resolveStoragePath() except null values are returned if
+        * the container is sharded and the shard could not be determined
+        * or if the path ends with '/'. The latter case is illegal for FS
+        * backends and can confuse listings for object store backends.
+        *
+        * This function is used when resolving paths that must be valid
+        * locations for files. Directory and listing functions should
+        * generally just use resolveStoragePath() instead.
+        *
+        * @see FileBackendStore::resolveStoragePath()
+        *
+        * @param string $storagePath
+        * @return array (container, path) or (null, null) if invalid
+        */
+       final protected function resolveStoragePathReal( $storagePath ) {
+               list( $container, $relPath, $cShard ) = $this->resolveStoragePath( $storagePath );
+               if ( $cShard !== null && substr( $relPath, -1 ) !== '/' ) {
+                       return [ $container, $relPath ];
+               }
+
+               return [ null, null ];
+       }
+
+       /**
+        * Get the container name shard suffix for a given path.
+        * Any empty suffix means the container is not sharded.
+        *
+        * @param string $container Container name
+        * @param string $relPath Storage path relative to the container
+        * @return string|null Returns null if shard could not be determined
+        */
+       final protected function getContainerShard( $container, $relPath ) {
+               list( $levels, $base, $repeat ) = $this->getContainerHashLevels( $container );
+               if ( $levels == 1 || $levels == 2 ) {
+                       // Hash characters are either base 16 or 36
+                       $char = ( $base == 36 ) ? '[0-9a-z]' : '[0-9a-f]';
+                       // Get a regex that represents the shard portion of paths.
+                       // The concatenation of the captures gives us the shard.
+                       if ( $levels === 1 ) { // 16 or 36 shards per container
+                               $hashDirRegex = '(' . $char . ')';
+                       } else { // 256 or 1296 shards per container
+                               if ( $repeat ) { // verbose hash dir format (e.g. "a/ab/abc")
+                                       $hashDirRegex = $char . '/(' . $char . '{2})';
+                               } else { // short hash dir format (e.g. "a/b/c")
+                                       $hashDirRegex = '(' . $char . ')/(' . $char . ')';
+                               }
+                       }
+                       // Allow certain directories to be above the hash dirs so as
+                       // to work with FileRepo (e.g. "archive/a/ab" or "temp/a/ab").
+                       // They must be 2+ chars to avoid any hash directory ambiguity.
+                       $m = [];
+                       if ( preg_match( "!^(?:[^/]{2,}/)*$hashDirRegex(?:/|$)!", $relPath, $m ) ) {
+                               return '.' . implode( '', array_slice( $m, 1 ) );
+                       }
+
+                       return null; // failed to match
+               }
+
+               return ''; // no sharding
+       }
+
+       /**
+        * Check if a storage path maps to a single shard.
+        * Container dirs like "a", where the container shards on "x/xy",
+        * can reside on several shards. Such paths are tricky to handle.
+        *
+        * @param string $storagePath Storage path
+        * @return bool
+        */
+       final public function isSingleShardPathInternal( $storagePath ) {
+               list( , , $shard ) = $this->resolveStoragePath( $storagePath );
+
+               return ( $shard !== null );
+       }
+
+       /**
+        * Get the sharding config for a container.
+        * If greater than 0, then all file storage paths within
+        * the container are required to be hashed accordingly.
+        *
+        * @param string $container
+        * @return array (integer levels, integer base, repeat flag) or (0, 0, false)
+        */
+       final protected function getContainerHashLevels( $container ) {
+               if ( isset( $this->shardViaHashLevels[$container] ) ) {
+                       $config = $this->shardViaHashLevels[$container];
+                       $hashLevels = (int)$config['levels'];
+                       if ( $hashLevels == 1 || $hashLevels == 2 ) {
+                               $hashBase = (int)$config['base'];
+                               if ( $hashBase == 16 || $hashBase == 36 ) {
+                                       return [ $hashLevels, $hashBase, $config['repeat'] ];
+                               }
+                       }
+               }
+
+               return [ 0, 0, false ]; // no sharding
+       }
+
+       /**
+        * Get a list of full container shard suffixes for a container
+        *
+        * @param string $container
+        * @return array
+        */
+       final protected function getContainerSuffixes( $container ) {
+               $shards = [];
+               list( $digits, $base ) = $this->getContainerHashLevels( $container );
+               if ( $digits > 0 ) {
+                       $numShards = pow( $base, $digits );
+                       for ( $index = 0; $index < $numShards; $index++ ) {
+                               $shards[] = '.' . Wikimedia\base_convert( $index, 10, $base, $digits );
+                       }
+               }
+
+               return $shards;
+       }
+
+       /**
+        * Get the full container name, including the wiki ID prefix
+        *
+        * @param string $container
+        * @return string
+        */
+       final protected function fullContainerName( $container ) {
+               if ( $this->domainId != '' ) {
+                       return "{$this->domainId}-$container";
+               } else {
+                       return $container;
+               }
+       }
+
+       /**
+        * Resolve a container name, checking if it's allowed by the backend.
+        * This is intended for internal use, such as encoding illegal chars.
+        * Subclasses can override this to be more restrictive.
+        *
+        * @param string $container
+        * @return string|null
+        */
+       protected function resolveContainerName( $container ) {
+               return $container;
+       }
+
+       /**
+        * Resolve a relative storage path, checking if it's allowed by the backend.
+        * This is intended for internal use, such as encoding illegal chars or perhaps
+        * getting absolute paths (e.g. FS based backends). Note that the relative path
+        * may be the empty string (e.g. the path is simply to the container).
+        *
+        * @param string $container Container name
+        * @param string $relStoragePath Storage path relative to the container
+        * @return string|null Path or null if not valid
+        */
+       protected function resolveContainerPath( $container, $relStoragePath ) {
+               return $relStoragePath;
+       }
+
+       /**
+        * Get the cache key for a container
+        *
+        * @param string $container Resolved container name
+        * @return string
+        */
+       private function containerCacheKey( $container ) {
+               return "filebackend:{$this->name}:{$this->domainId}:container:{$container}";
+       }
+
+       /**
+        * Set the cached info for a container
+        *
+        * @param string $container Resolved container name
+        * @param array $val Information to cache
+        */
+       final protected function setContainerCache( $container, array $val ) {
+               $this->memCache->set( $this->containerCacheKey( $container ), $val, 14 * 86400 );
+       }
+
+       /**
+        * Delete the cached info for a container.
+        * The cache key is salted for a while to prevent race conditions.
+        *
+        * @param string $container Resolved container name
+        */
+       final protected function deleteContainerCache( $container ) {
+               if ( !$this->memCache->delete( $this->containerCacheKey( $container ), 300 ) ) {
+                       trigger_error( "Unable to delete stat cache for container $container." );
+               }
+       }
+
+       /**
+        * Do a batch lookup from cache for container stats for all containers
+        * used in a list of container names or storage paths objects.
+        * This loads the persistent cache values into the process cache.
+        *
+        * @param array $items
+        */
+       final protected function primeContainerCache( array $items ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+
+               $paths = []; // list of storage paths
+               $contNames = []; // (cache key => resolved container name)
+               // Get all the paths/containers from the items...
+               foreach ( $items as $item ) {
+                       if ( self::isStoragePath( $item ) ) {
+                               $paths[] = $item;
+                       } elseif ( is_string( $item ) ) { // full container name
+                               $contNames[$this->containerCacheKey( $item )] = $item;
+                       }
+               }
+               // Get all the corresponding cache keys for paths...
+               foreach ( $paths as $path ) {
+                       list( $fullCont, , ) = $this->resolveStoragePath( $path );
+                       if ( $fullCont !== null ) { // valid path for this backend
+                               $contNames[$this->containerCacheKey( $fullCont )] = $fullCont;
+                       }
+               }
+
+               $contInfo = []; // (resolved container name => cache value)
+               // Get all cache entries for these container cache keys...
+               $values = $this->memCache->getMulti( array_keys( $contNames ) );
+               foreach ( $values as $cacheKey => $val ) {
+                       $contInfo[$contNames[$cacheKey]] = $val;
+               }
+
+               // Populate the container process cache for the backend...
+               $this->doPrimeContainerCache( array_filter( $contInfo, 'is_array' ) );
+       }
+
+       /**
+        * Fill the backend-specific process cache given an array of
+        * resolved container names and their corresponding cached info.
+        * Only containers that actually exist should appear in the map.
+        *
+        * @param array $containerInfo Map of resolved container names to cached info
+        */
+       protected function doPrimeContainerCache( array $containerInfo ) {
+       }
+
+       /**
+        * Get the cache key for a file path
+        *
+        * @param string $path Normalized storage path
+        * @return string
+        */
+       private function fileCacheKey( $path ) {
+               return "filebackend:{$this->name}:{$this->domainId}:file:" . sha1( $path );
+       }
+
+       /**
+        * Set the cached stat info for a file path.
+        * Negatives (404s) are not cached. By not caching negatives, we can skip cache
+        * salting for the case when a file is created at a path were there was none before.
+        *
+        * @param string $path Storage path
+        * @param array $val Stat information to cache
+        */
+       final protected function setFileCache( $path, array $val ) {
+               $path = FileBackend::normalizeStoragePath( $path );
+               if ( $path === null ) {
+                       return; // invalid storage path
+               }
+               $mtime = ConvertibleTimestamp::convert( TS_UNIX, $val['mtime'] );
+               $ttl = $this->memCache->adaptiveTTL( $mtime, 7 * 86400, 300, .1 );
+               $key = $this->fileCacheKey( $path );
+               // Set the cache unless it is currently salted.
+               $this->memCache->set( $key, $val, $ttl );
+       }
+
+       /**
+        * Delete the cached stat info for a file path.
+        * The cache key is salted for a while to prevent race conditions.
+        * Since negatives (404s) are not cached, this does not need to be called when
+        * a file is created at a path were there was none before.
+        *
+        * @param string $path Storage path
+        */
+       final protected function deleteFileCache( $path ) {
+               $path = FileBackend::normalizeStoragePath( $path );
+               if ( $path === null ) {
+                       return; // invalid storage path
+               }
+               if ( !$this->memCache->delete( $this->fileCacheKey( $path ), 300 ) ) {
+                       trigger_error( "Unable to delete stat cache for file $path." );
+               }
+       }
+
+       /**
+        * Do a batch lookup from cache for file stats for all paths
+        * used in a list of storage paths or FileOp objects.
+        * This loads the persistent cache values into the process cache.
+        *
+        * @param array $items List of storage paths
+        */
+       final protected function primeFileCache( array $items ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+
+               $paths = []; // list of storage paths
+               $pathNames = []; // (cache key => storage path)
+               // Get all the paths/containers from the items...
+               foreach ( $items as $item ) {
+                       if ( self::isStoragePath( $item ) ) {
+                               $paths[] = FileBackend::normalizeStoragePath( $item );
+                       }
+               }
+               // Get rid of any paths that failed normalization...
+               $paths = array_filter( $paths, 'strlen' ); // remove nulls
+               // Get all the corresponding cache keys for paths...
+               foreach ( $paths as $path ) {
+                       list( , $rel, ) = $this->resolveStoragePath( $path );
+                       if ( $rel !== null ) { // valid path for this backend
+                               $pathNames[$this->fileCacheKey( $path )] = $path;
+                       }
+               }
+               // Get all cache entries for these file cache keys...
+               $values = $this->memCache->getMulti( array_keys( $pathNames ) );
+               foreach ( $values as $cacheKey => $val ) {
+                       $path = $pathNames[$cacheKey];
+                       if ( is_array( $val ) ) {
+                               $val['latest'] = false; // never completely trust cache
+                               $this->cheapCache->set( $path, 'stat', $val );
+                               if ( isset( $val['sha1'] ) ) { // some backends store SHA-1 as metadata
+                                       $this->cheapCache->set( $path, 'sha1',
+                                               [ 'hash' => $val['sha1'], 'latest' => false ] );
+                               }
+                               if ( isset( $val['xattr'] ) ) { // some backends store headers/metadata
+                                       $val['xattr'] = self::normalizeXAttributes( $val['xattr'] );
+                                       $this->cheapCache->set( $path, 'xattr',
+                                               [ 'map' => $val['xattr'], 'latest' => false ] );
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Normalize file headers/metadata to the FileBackend::getFileXAttributes() format
+        *
+        * @param array $xattr
+        * @return array
+        * @since 1.22
+        */
+       final protected static function normalizeXAttributes( array $xattr ) {
+               $newXAttr = [ 'headers' => [], 'metadata' => [] ];
+
+               foreach ( $xattr['headers'] as $name => $value ) {
+                       $newXAttr['headers'][strtolower( $name )] = $value;
+               }
+
+               foreach ( $xattr['metadata'] as $name => $value ) {
+                       $newXAttr['metadata'][strtolower( $name )] = $value;
+               }
+
+               return $newXAttr;
+       }
+
+       /**
+        * Set the 'concurrency' option from a list of operation options
+        *
+        * @param array $opts Map of operation options
+        * @return array
+        */
+       final protected function setConcurrencyFlags( array $opts ) {
+               $opts['concurrency'] = 1; // off
+               if ( $this->parallelize === 'implicit' ) {
+                       if ( !isset( $opts['parallelize'] ) || $opts['parallelize'] ) {
+                               $opts['concurrency'] = $this->concurrency;
+                       }
+               } elseif ( $this->parallelize === 'explicit' ) {
+                       if ( !empty( $opts['parallelize'] ) ) {
+                               $opts['concurrency'] = $this->concurrency;
+                       }
+               }
+
+               return $opts;
+       }
+
+       /**
+        * Get the content type to use in HEAD/GET requests for a file
+        *
+        * @param string $storagePath
+        * @param string|null $content File data
+        * @param string|null $fsPath File system path
+        * @return string MIME type
+        */
+       protected function getContentType( $storagePath, $content, $fsPath ) {
+               if ( $this->mimeCallback ) {
+                       return call_user_func_array( $this->mimeCallback, func_get_args() );
+               }
+
+               $mime = null;
+               if ( $fsPath !== null && function_exists( 'finfo_file' ) ) {
+                       $finfo = finfo_open( FILEINFO_MIME_TYPE );
+                       $mime = finfo_file( $finfo, $fsPath );
+                       finfo_close( $finfo );
+               }
+
+               return is_string( $mime ) ? $mime : 'unknown/unknown';
+       }
+}
+
+/**
+ * FileBackendStore helper class for performing asynchronous file operations.
+ *
+ * For example, calling FileBackendStore::createInternal() with the "async"
+ * param flag may result in a StatusValue that contains this object as a value.
+ * This class is largely backend-specific and is mostly just "magic" to be
+ * passed to FileBackendStore::executeOpHandlesInternal().
+ */
+abstract class FileBackendStoreOpHandle {
+       /** @var array */
+       public $params = []; // params to caller functions
+       /** @var FileBackendStore */
+       public $backend;
+       /** @var array */
+       public $resourcesToClose = [];
+
+       public $call; // string; name that identifies the function called
+
+       /**
+        * Close all open file handles
+        */
+       public function closeResources() {
+               array_map( 'fclose', $this->resourcesToClose );
+       }
+}
+
+/**
+ * FileBackendStore helper function to handle listings that span container shards.
+ * Do not use this class from places outside of FileBackendStore.
+ *
+ * @ingroup FileBackend
+ */
+abstract class FileBackendStoreShardListIterator extends FilterIterator {
+       /** @var FileBackendStore */
+       protected $backend;
+
+       /** @var array */
+       protected $params;
+
+       /** @var string Full container name */
+       protected $container;
+
+       /** @var string Resolved relative path */
+       protected $directory;
+
+       /** @var array */
+       protected $multiShardPaths = []; // (rel path => 1)
+
+       /**
+        * @param FileBackendStore $backend
+        * @param string $container Full storage container name
+        * @param string $dir Storage directory relative to container
+        * @param array $suffixes List of container shard suffixes
+        * @param array $params
+        */
+       public function __construct(
+               FileBackendStore $backend, $container, $dir, array $suffixes, array $params
+       ) {
+               $this->backend = $backend;
+               $this->container = $container;
+               $this->directory = $dir;
+               $this->params = $params;
+
+               $iter = new AppendIterator();
+               foreach ( $suffixes as $suffix ) {
+                       $iter->append( $this->listFromShard( $this->container . $suffix ) );
+               }
+
+               parent::__construct( $iter );
+       }
+
+       public function accept() {
+               $rel = $this->getInnerIterator()->current(); // path relative to given directory
+               $path = $this->params['dir'] . "/{$rel}"; // full storage path
+               if ( $this->backend->isSingleShardPathInternal( $path ) ) {
+                       return true; // path is only on one shard; no issue with duplicates
+               } elseif ( isset( $this->multiShardPaths[$rel] ) ) {
+                       // Don't keep listing paths that are on multiple shards
+                       return false;
+               } else {
+                       $this->multiShardPaths[$rel] = 1;
+
+                       return true;
+               }
+       }
+
+       public function rewind() {
+               parent::rewind();
+               $this->multiShardPaths = [];
+       }
+
+       /**
+        * Get the list for a given container shard
+        *
+        * @param string $container Resolved container name
+        * @return Iterator
+        */
+       abstract protected function listFromShard( $container );
+}
+
+/**
+ * Iterator for listing directories
+ */
+class FileBackendStoreShardDirIterator extends FileBackendStoreShardListIterator {
+       protected function listFromShard( $container ) {
+               $list = $this->backend->getDirectoryListInternal(
+                       $container, $this->directory, $this->params );
+               if ( $list === null ) {
+                       return new ArrayIterator( [] );
+               } else {
+                       return is_array( $list ) ? new ArrayIterator( $list ) : $list;
+               }
+       }
+}
+
+/**
+ * Iterator for listing regular files
+ */
+class FileBackendStoreShardFileIterator extends FileBackendStoreShardListIterator {
+       protected function listFromShard( $container ) {
+               $list = $this->backend->getFileListInternal(
+                       $container, $this->directory, $this->params );
+               if ( $list === null ) {
+                       return new ArrayIterator( [] );
+               } else {
+                       return is_array( $list ) ? new ArrayIterator( $list ) : $list;
+               }
+       }
+}
diff --git a/includes/libs/filebackend/FileOpBatch.php b/includes/libs/filebackend/FileOpBatch.php
new file mode 100644 (file)
index 0000000..71b5c7d
--- /dev/null
@@ -0,0 +1,205 @@
+<?php
+/**
+ * Helper class for representing batch file operations.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * Helper class for representing batch file operations.
+ * Do not use this class from places outside FileBackend.
+ *
+ * Methods should avoid throwing exceptions at all costs.
+ *
+ * @ingroup FileBackend
+ * @since 1.20
+ */
+class FileOpBatch {
+       /* Timeout related parameters */
+       const MAX_BATCH_SIZE = 1000; // integer
+
+       /**
+        * Attempt to perform a series of file operations.
+        * Callers are responsible for handling file locking.
+        *
+        * $opts is an array of options, including:
+        *   - force        : Errors that would normally cause a rollback do not.
+        *                    The remaining operations are still attempted if any fail.
+        *   - nonJournaled : Don't log this operation batch in the file journal.
+        *   - concurrency  : Try to do this many operations in parallel when possible.
+        *
+        * The resulting StatusValue will be "OK" unless:
+        *   - a) unexpected operation errors occurred (network partitions, disk full...)
+        *   - b) significant operation errors occurred and 'force' was not set
+        *
+        * @param FileOp[] $performOps List of FileOp operations
+        * @param array $opts Batch operation options
+        * @param FileJournal $journal Journal to log operations to
+        * @return StatusValue
+        */
+       public static function attempt( array $performOps, array $opts, FileJournal $journal ) {
+               $status = StatusValue::newGood();
+
+               $n = count( $performOps );
+               if ( $n > self::MAX_BATCH_SIZE ) {
+                       $status->fatal( 'backend-fail-batchsize', $n, self::MAX_BATCH_SIZE );
+
+                       return $status;
+               }
+
+               $batchId = $journal->getTimestampedUUID();
+               $ignoreErrors = !empty( $opts['force'] );
+               $journaled = empty( $opts['nonJournaled'] );
+               $maxConcurrency = isset( $opts['concurrency'] ) ? $opts['concurrency'] : 1;
+
+               $entries = []; // file journal entry list
+               $predicates = FileOp::newPredicates(); // account for previous ops in prechecks
+               $curBatch = []; // concurrent FileOp sub-batch accumulation
+               $curBatchDeps = FileOp::newDependencies(); // paths used in FileOp sub-batch
+               $pPerformOps = []; // ordered list of concurrent FileOp sub-batches
+               $lastBackend = null; // last op backend name
+               // Do pre-checks for each operation; abort on failure...
+               foreach ( $performOps as $index => $fileOp ) {
+                       $backendName = $fileOp->getBackend()->getName();
+                       $fileOp->setBatchId( $batchId ); // transaction ID
+                       // Decide if this op can be done concurrently within this sub-batch
+                       // or if a new concurrent sub-batch must be started after this one...
+                       if ( $fileOp->dependsOn( $curBatchDeps )
+                               || count( $curBatch ) >= $maxConcurrency
+                               || ( $backendName !== $lastBackend && count( $curBatch ) )
+                       ) {
+                               $pPerformOps[] = $curBatch; // push this batch
+                               $curBatch = []; // start a new sub-batch
+                               $curBatchDeps = FileOp::newDependencies();
+                       }
+                       $lastBackend = $backendName;
+                       $curBatch[$index] = $fileOp; // keep index
+                       // Update list of affected paths in this batch
+                       $curBatchDeps = $fileOp->applyDependencies( $curBatchDeps );
+                       // Simulate performing the operation...
+                       $oldPredicates = $predicates;
+                       $subStatus = $fileOp->precheck( $predicates ); // updates $predicates
+                       $status->merge( $subStatus );
+                       if ( $subStatus->isOK() ) {
+                               if ( $journaled ) { // journal log entries
+                                       $entries = array_merge( $entries,
+                                               $fileOp->getJournalEntries( $oldPredicates, $predicates ) );
+                               }
+                       } else { // operation failed?
+                               $status->success[$index] = false;
+                               ++$status->failCount;
+                               if ( !$ignoreErrors ) {
+                                       return $status; // abort
+                               }
+                       }
+               }
+               // Push the last sub-batch
+               if ( count( $curBatch ) ) {
+                       $pPerformOps[] = $curBatch;
+               }
+
+               // Log the operations in the file journal...
+               if ( count( $entries ) ) {
+                       $subStatus = $journal->logChangeBatch( $entries, $batchId );
+                       if ( !$subStatus->isOK() ) {
+                               $status->merge( $subStatus );
+
+                               return $status; // abort
+                       }
+               }
+
+               if ( $ignoreErrors ) { // treat precheck() fatals as mere warnings
+                       $status->setResult( true, $status->value );
+               }
+
+               // Attempt each operation (in parallel if allowed and possible)...
+               self::runParallelBatches( $pPerformOps, $status );
+
+               return $status;
+       }
+
+       /**
+        * Attempt a list of file operations sub-batches in series.
+        *
+        * The operations *in* each sub-batch will be done in parallel.
+        * The caller is responsible for making sure the operations
+        * within any given sub-batch do not depend on each other.
+        * This will abort remaining ops on failure.
+        *
+        * @param array $pPerformOps Batches of file ops (batches use original indexes)
+        * @param StatusValue $status
+        */
+       protected static function runParallelBatches( array $pPerformOps, StatusValue $status ) {
+               $aborted = false; // set to true on unexpected errors
+               foreach ( $pPerformOps as $performOpsBatch ) {
+                       /** @var FileOp[] $performOpsBatch */
+                       if ( $aborted ) { // check batch op abort flag...
+                               // We can't continue (even with $ignoreErrors) as $predicates is wrong.
+                               // Log the remaining ops as failed for recovery...
+                               foreach ( $performOpsBatch as $i => $fileOp ) {
+                                       $status->success[$i] = false;
+                                       ++$status->failCount;
+                                       $performOpsBatch[$i]->logFailure( 'attempt_aborted' );
+                               }
+                               continue;
+                       }
+                       /** @var StatusValue[] $statuses */
+                       $statuses = [];
+                       $opHandles = [];
+                       // Get the backend; all sub-batch ops belong to a single backend
+                       /** @var FileBackendStore $backend */
+                       $backend = reset( $performOpsBatch )->getBackend();
+                       // Get the operation handles or actually do it if there is just one.
+                       // If attemptAsync() returns a StatusValue, it was either due to an error
+                       // or the backend does not support async ops and did it synchronously.
+                       foreach ( $performOpsBatch as $i => $fileOp ) {
+                               if ( !isset( $status->success[$i] ) ) { // didn't already fail in precheck()
+                                       // Parallel ops may be disabled in config due to missing dependencies,
+                                       // (e.g. needing popen()). When they are, $performOpsBatch has size 1.
+                                       $subStatus = ( count( $performOpsBatch ) > 1 )
+                                               ? $fileOp->attemptAsync()
+                                               : $fileOp->attempt();
+                                       if ( $subStatus->value instanceof FileBackendStoreOpHandle ) {
+                                               $opHandles[$i] = $subStatus->value; // deferred
+                                       } else {
+                                               $statuses[$i] = $subStatus; // done already
+                                       }
+                               }
+                       }
+                       // Try to do all the operations concurrently...
+                       $statuses = $statuses + $backend->executeOpHandlesInternal( $opHandles );
+                       // Marshall and merge all the responses (blocking)...
+                       foreach ( $performOpsBatch as $i => $fileOp ) {
+                               if ( !isset( $status->success[$i] ) ) { // didn't already fail in precheck()
+                                       $subStatus = $statuses[$i];
+                                       $status->merge( $subStatus );
+                                       if ( $subStatus->isOK() ) {
+                                               $status->success[$i] = true;
+                                               ++$status->successCount;
+                                       } else {
+                                               $status->success[$i] = false;
+                                               ++$status->failCount;
+                                               $aborted = true; // set abort flag; we can't continue
+                                       }
+                               }
+                       }
+               }
+       }
+}
diff --git a/includes/libs/filebackend/HTTPFileStreamer.php b/includes/libs/filebackend/HTTPFileStreamer.php
new file mode 100644 (file)
index 0000000..800fdfa
--- /dev/null
@@ -0,0 +1,268 @@
+<?php
+/**
+ * Functions related to the output of file content.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * Functions related to the output of file content
+ *
+ * @since 1.28
+ */
+class HTTPFileStreamer {
+       /** @var string */
+       protected $path;
+       /** @var callable */
+       protected $obResetFunc;
+       /** @var callable */
+       protected $streamMimeFunc;
+
+       // Do not send any HTTP headers unless requested by caller (e.g. body only)
+       const STREAM_HEADLESS = 1;
+       // Do not try to tear down any PHP output buffers
+       const STREAM_ALLOW_OB = 2;
+
+       /**
+        * @param string $path Local filesystem path to a file
+        * @param array $params Options map, which includes:
+        *   - obResetFunc : alternative callback to clear the output buffer
+        *   - streamMimeFunc : alternative method to determine the content type from the path
+        */
+       public function __construct( $path, array $params = [] ) {
+               $this->path = $path;
+               $this->obResetFunc = isset( $params['obResetFunc'] )
+                       ? $params['obResetFunc']
+                       : [ __CLASS__, 'resetOutputBuffers' ];
+               $this->streamMimeFunc = isset( $params['streamMimeFunc'] )
+                       ? $params['streamMimeFunc']
+                       : [ __CLASS__, 'contentTypeFromPath' ];
+       }
+
+       /**
+        * Stream a file to the browser, adding all the headings and fun stuff.
+        * Headers sent include: Content-type, Content-Length, Last-Modified,
+        * and Content-Disposition.
+        *
+        * @param array $headers Any additional headers to send if the file exists
+        * @param bool $sendErrors Send error messages if errors occur (like 404)
+        * @param array $optHeaders HTTP request header map (e.g. "range") (use lowercase keys)
+        * @param integer $flags Bitfield of STREAM_* constants
+        * @throws MWException
+        * @return bool Success
+        */
+       public function stream(
+               $headers = [], $sendErrors = true, $optHeaders = [], $flags = 0
+       ) {
+               // Don't stream it out as text/html if there was a PHP error
+               if ( ( ( $flags & self::STREAM_HEADLESS ) == 0 || $headers ) && headers_sent() ) {
+                       echo "Headers already sent, terminating.\n";
+                       return false;
+               }
+
+               $headerFunc = ( $flags & self::STREAM_HEADLESS )
+                       ? function ( $header ) {
+                               // no-op
+                       }
+                       : function ( $header ) {
+                               is_int( $header ) ? HttpStatus::header( $header ) : header( $header );
+                       };
+
+               MediaWiki\suppressWarnings();
+               $info = stat( $this->path );
+               MediaWiki\restoreWarnings();
+
+               if ( !is_array( $info ) ) {
+                       if ( $sendErrors ) {
+                               self::send404Message( $this->path, $flags );
+                       }
+                       return false;
+               }
+
+               // Send Last-Modified HTTP header for client-side caching
+               $mtimeCT = new ConvertibleTimestamp( $info['mtime'] );
+               $headerFunc( 'Last-Modified: ' . $mtimeCT->getTimestamp( TS_RFC2822 ) );
+
+               if ( ( $flags & self::STREAM_ALLOW_OB ) == 0 ) {
+                       call_user_func( $this->obResetFunc );
+               }
+
+               $type = call_user_func( $this->streamMimeFunc, $this->path );
+               if ( $type && $type != 'unknown/unknown' ) {
+                       $headerFunc( "Content-type: $type" );
+               } else {
+                       // Send a content type which is not known to Internet Explorer, to
+                       // avoid triggering IE's content type detection. Sending a standard
+                       // unknown content type here essentially gives IE license to apply
+                       // whatever content type it likes.
+                       $headerFunc( 'Content-type: application/x-wiki' );
+               }
+
+               // Don't send if client has up to date cache
+               if ( isset( $optHeaders['if-modified-since'] ) ) {
+                       $modsince = preg_replace( '/;.*$/', '', $optHeaders['if-modified-since'] );
+                       if ( $mtimeCT->getTimestamp( TS_UNIX ) <= strtotime( $modsince ) ) {
+                               ini_set( 'zlib.output_compression', 0 );
+                               $headerFunc( 304 );
+                               return true; // ok
+                       }
+               }
+
+               // Send additional headers
+               foreach ( $headers as $header ) {
+                       header( $header ); // always use header(); specifically requested
+               }
+
+               if ( isset( $optHeaders['range'] ) ) {
+                       $range = self::parseRange( $optHeaders['range'], $info['size'] );
+                       if ( is_array( $range ) ) {
+                               $headerFunc( 206 );
+                               $headerFunc( 'Content-Length: ' . $range[2] );
+                               $headerFunc( "Content-Range: bytes {$range[0]}-{$range[1]}/{$info['size']}" );
+                       } elseif ( $range === 'invalid' ) {
+                               if ( $sendErrors ) {
+                                       $headerFunc( 416 );
+                                       $headerFunc( 'Cache-Control: no-cache' );
+                                       $headerFunc( 'Content-Type: text/html; charset=utf-8' );
+                                       $headerFunc( 'Content-Range: bytes */' . $info['size'] );
+                               }
+                               return false;
+                       } else { // unsupported Range request (e.g. multiple ranges)
+                               $range = null;
+                               $headerFunc( 'Content-Length: ' . $info['size'] );
+                       }
+               } else {
+                       $range = null;
+                       $headerFunc( 'Content-Length: ' . $info['size'] );
+               }
+
+               if ( is_array( $range ) ) {
+                       $handle = fopen( $this->path, 'rb' );
+                       if ( $handle ) {
+                               $ok = true;
+                               fseek( $handle, $range[0] );
+                               $remaining = $range[2];
+                               while ( $remaining > 0 && $ok ) {
+                                       $bytes = min( $remaining, 8 * 1024 );
+                                       $data = fread( $handle, $bytes );
+                                       $remaining -= $bytes;
+                                       $ok = ( $data !== false );
+                                       print $data;
+                               }
+                       } else {
+                               return false;
+                       }
+               } else {
+                       return readfile( $this->path ) !== false; // faster
+               }
+
+               return true;
+       }
+
+       /**
+        * Send out a standard 404 message for a file
+        *
+        * @param string $fname Full name and path of the file to stream
+        * @param integer $flags Bitfield of STREAM_* constants
+        * @since 1.24
+        */
+       public static function send404Message( $fname, $flags = 0 ) {
+               if ( ( $flags & self::STREAM_HEADLESS ) == 0 ) {
+                       HttpStatus::header( 404 );
+                       header( 'Cache-Control: no-cache' );
+                       header( 'Content-Type: text/html; charset=utf-8' );
+               }
+               $encFile = htmlspecialchars( $fname );
+               $encScript = htmlspecialchars( $_SERVER['SCRIPT_NAME'] );
+               echo "<!DOCTYPE html><html><body>
+                       <h1>File not found</h1>
+                       <p>Although this PHP script ($encScript) exists, the file requested for output
+                       ($encFile) does not.</p>
+                       </body></html>
+                       ";
+       }
+
+       /**
+        * Convert a Range header value to an absolute (start, end) range tuple
+        *
+        * @param string $range Range header value
+        * @param integer $size File size
+        * @return array|string Returns error string on failure (start, end, length)
+        * @since 1.24
+        */
+       public static function parseRange( $range, $size ) {
+               $m = [];
+               if ( preg_match( '#^bytes=(\d*)-(\d*)$#', $range, $m ) ) {
+                       list( , $start, $end ) = $m;
+                       if ( $start === '' && $end === '' ) {
+                               $absRange = [ 0, $size - 1 ];
+                       } elseif ( $start === '' ) {
+                               $absRange = [ $size - $end, $size - 1 ];
+                       } elseif ( $end === '' ) {
+                               $absRange = [ $start, $size - 1 ];
+                       } else {
+                               $absRange = [ $start, $end ];
+                       }
+                       if ( $absRange[0] >= 0 && $absRange[1] >= $absRange[0] ) {
+                               if ( $absRange[0] < $size ) {
+                                       $absRange[1] = min( $absRange[1], $size - 1 ); // stop at EOF
+                                       $absRange[2] = $absRange[1] - $absRange[0] + 1;
+                                       return $absRange;
+                               } elseif ( $absRange[0] == 0 && $size == 0 ) {
+                                       return 'unrecognized'; // the whole file should just be sent
+                               }
+                       }
+                       return 'invalid';
+               }
+               return 'unrecognized';
+       }
+
+       protected static function resetOutputBuffers() {
+               while ( ob_get_status() ) {
+                       if ( !ob_end_clean() ) {
+                               // Could not remove output buffer handler; abort now
+                               // to avoid getting in some kind of infinite loop.
+                               break;
+                       }
+               }
+       }
+
+       /**
+        * Determine the file type of a file based on the path
+        *
+        * @param string $filename Storage path or file system path
+        * @return null|string
+        */
+       protected static function contentTypeFromPath( $filename ) {
+               $ext = strrchr( $filename, '.' );
+               $ext = $ext === false ? '' : strtolower( substr( $ext, 1 ) );
+
+               switch ( $ext ) {
+                       case 'gif':
+                               return 'image/gif';
+                       case 'png':
+                               return 'image/png';
+                       case 'jpg':
+                               return 'image/jpeg';
+                       case 'jpeg':
+                               return 'image/jpeg';
+               }
+
+               return 'unknown/unknown';
+       }
+}
diff --git a/includes/libs/filebackend/MemoryFileBackend.php b/includes/libs/filebackend/MemoryFileBackend.php
new file mode 100644 (file)
index 0000000..44fe2cb
--- /dev/null
@@ -0,0 +1,263 @@
+<?php
+/**
+ * Simulation of a backend storage in memory.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * Simulation of a backend storage in memory.
+ *
+ * All data in the backend is automatically deleted at the end of PHP execution.
+ * Since the data stored here is volatile, this is only useful for staging or testing.
+ *
+ * @ingroup FileBackend
+ * @since 1.23
+ */
+class MemoryFileBackend extends FileBackendStore {
+       /** @var array Map of (file path => (data,mtime) */
+       protected $files = [];
+
+       public function getFeatures() {
+               return self::ATTR_UNICODE_PATHS;
+       }
+
+       public function isPathUsableInternal( $storagePath ) {
+               return true;
+       }
+
+       protected function doCreateInternal( array $params ) {
+               $status = $this->newStatus();
+
+               $dst = $this->resolveHashKey( $params['dst'] );
+               if ( $dst === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               $this->files[$dst] = [
+                       'data' => $params['content'],
+                       'mtime' => wfTimestamp( TS_MW, time() )
+               ];
+
+               return $status;
+       }
+
+       protected function doStoreInternal( array $params ) {
+               $status = $this->newStatus();
+
+               $dst = $this->resolveHashKey( $params['dst'] );
+               if ( $dst === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               MediaWiki\suppressWarnings();
+               $data = file_get_contents( $params['src'] );
+               MediaWiki\restoreWarnings();
+               if ( $data === false ) { // source doesn't exist?
+                       $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
+
+                       return $status;
+               }
+
+               $this->files[$dst] = [
+                       'data' => $data,
+                       'mtime' => wfTimestamp( TS_MW, time() )
+               ];
+
+               return $status;
+       }
+
+       protected function doCopyInternal( array $params ) {
+               $status = $this->newStatus();
+
+               $src = $this->resolveHashKey( $params['src'] );
+               if ( $src === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
+
+                       return $status;
+               }
+
+               $dst = $this->resolveHashKey( $params['dst'] );
+               if ( $dst === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               if ( !isset( $this->files[$src] ) ) {
+                       if ( empty( $params['ignoreMissingSource'] ) ) {
+                               $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+                       }
+
+                       return $status;
+               }
+
+               $this->files[$dst] = [
+                       'data' => $this->files[$src]['data'],
+                       'mtime' => wfTimestamp( TS_MW, time() )
+               ];
+
+               return $status;
+       }
+
+       protected function doDeleteInternal( array $params ) {
+               $status = $this->newStatus();
+
+               $src = $this->resolveHashKey( $params['src'] );
+               if ( $src === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
+
+                       return $status;
+               }
+
+               if ( !isset( $this->files[$src] ) ) {
+                       if ( empty( $params['ignoreMissingSource'] ) ) {
+                               $status->fatal( 'backend-fail-delete', $params['src'] );
+                       }
+
+                       return $status;
+               }
+
+               unset( $this->files[$src] );
+
+               return $status;
+       }
+
+       protected function doGetFileStat( array $params ) {
+               $src = $this->resolveHashKey( $params['src'] );
+               if ( $src === null ) {
+                       return null;
+               }
+
+               if ( isset( $this->files[$src] ) ) {
+                       return [
+                               'mtime' => $this->files[$src]['mtime'],
+                               'size' => strlen( $this->files[$src]['data'] ),
+                       ];
+               }
+
+               return false;
+       }
+
+       protected function doGetLocalCopyMulti( array $params ) {
+               $tmpFiles = []; // (path => TempFSFile)
+               foreach ( $params['srcs'] as $srcPath ) {
+                       $src = $this->resolveHashKey( $srcPath );
+                       if ( $src === null || !isset( $this->files[$src] ) ) {
+                               $fsFile = null;
+                       } else {
+                               // Create a new temporary file with the same extension...
+                               $ext = FileBackend::extensionFromPath( $src );
+                               $fsFile = TempFSFile::factory( 'localcopy_', $ext, $this->tmpDirectory );
+                               if ( $fsFile ) {
+                                       $bytes = file_put_contents( $fsFile->getPath(), $this->files[$src]['data'] );
+                                       if ( $bytes !== strlen( $this->files[$src]['data'] ) ) {
+                                               $fsFile = null;
+                                       }
+                               }
+                       }
+                       $tmpFiles[$srcPath] = $fsFile;
+               }
+
+               return $tmpFiles;
+       }
+
+       protected function doDirectoryExists( $container, $dir, array $params ) {
+               $prefix = rtrim( "$container/$dir", '/' ) . '/';
+               foreach ( $this->files as $path => $data ) {
+                       if ( strpos( $path, $prefix ) === 0 ) {
+                               return true;
+                       }
+               }
+
+               return false;
+       }
+
+       public function getDirectoryListInternal( $container, $dir, array $params ) {
+               $dirs = [];
+               $prefix = rtrim( "$container/$dir", '/' ) . '/';
+               $prefixLen = strlen( $prefix );
+               foreach ( $this->files as $path => $data ) {
+                       if ( strpos( $path, $prefix ) === 0 ) {
+                               $relPath = substr( $path, $prefixLen );
+                               if ( $relPath === false ) {
+                                       continue;
+                               } elseif ( strpos( $relPath, '/' ) === false ) {
+                                       continue; // just a file
+                               }
+                               $parts = array_slice( explode( '/', $relPath ), 0, -1 ); // last part is file name
+                               if ( !empty( $params['topOnly'] ) ) {
+                                       $dirs[$parts[0]] = 1; // top directory
+                               } else {
+                                       $current = '';
+                                       foreach ( $parts as $part ) { // all directories
+                                               $dir = ( $current === '' ) ? $part : "$current/$part";
+                                               $dirs[$dir] = 1;
+                                               $current = $dir;
+                                       }
+                               }
+                       }
+               }
+
+               return array_keys( $dirs );
+       }
+
+       public function getFileListInternal( $container, $dir, array $params ) {
+               $files = [];
+               $prefix = rtrim( "$container/$dir", '/' ) . '/';
+               $prefixLen = strlen( $prefix );
+               foreach ( $this->files as $path => $data ) {
+                       if ( strpos( $path, $prefix ) === 0 ) {
+                               $relPath = substr( $path, $prefixLen );
+                               if ( $relPath === false ) {
+                                       continue;
+                               } elseif ( !empty( $params['topOnly'] ) && strpos( $relPath, '/' ) !== false ) {
+                                       continue;
+                               }
+                               $files[] = $relPath;
+                       }
+               }
+
+               return $files;
+       }
+
+       protected function directoriesAreVirtual() {
+               return true;
+       }
+
+       /**
+        * Get the absolute file system path for a storage path
+        *
+        * @param string $storagePath Storage path
+        * @return string|null
+        */
+       protected function resolveHashKey( $storagePath ) {
+               list( $fullCont, $relPath ) = $this->resolveStoragePathReal( $storagePath );
+               if ( $relPath === null ) {
+                       return null; // invalid
+               }
+
+               return ( $relPath !== '' ) ? "$fullCont/$relPath" : $fullCont;
+       }
+}
diff --git a/includes/libs/filebackend/SwiftFileBackend.php b/includes/libs/filebackend/SwiftFileBackend.php
new file mode 100644 (file)
index 0000000..4bc0ce6
--- /dev/null
@@ -0,0 +1,1937 @@
+<?php
+/**
+ * OpenStack Swift based file backend.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Russ Nelson
+ * @author Aaron Schulz
+ */
+
+/**
+ * @brief Class for an OpenStack Swift (or Ceph RGW) based file backend.
+ *
+ * StatusValue messages should avoid mentioning the Swift account name.
+ * Likewise, error suppression should be used to avoid path disclosure.
+ *
+ * @ingroup FileBackend
+ * @since 1.19
+ */
+class SwiftFileBackend extends FileBackendStore {
+       /** @var MultiHttpClient */
+       protected $http;
+
+       /** @var int TTL in seconds */
+       protected $authTTL;
+
+       /** @var string Authentication base URL (without version) */
+       protected $swiftAuthUrl;
+
+       /** @var string Swift user (account:user) to authenticate as */
+       protected $swiftUser;
+
+       /** @var string Secret key for user */
+       protected $swiftKey;
+
+       /** @var string Shared secret value for making temp URLs */
+       protected $swiftTempUrlKey;
+
+       /** @var string S3 access key (RADOS Gateway) */
+       protected $rgwS3AccessKey;
+
+       /** @var string S3 authentication key (RADOS Gateway) */
+       protected $rgwS3SecretKey;
+
+       /** @var BagOStuff */
+       protected $srvCache;
+
+       /** @var ProcessCacheLRU Container stat cache */
+       protected $containerStatCache;
+
+       /** @var array */
+       protected $authCreds;
+
+       /** @var int UNIX timestamp */
+       protected $authSessionTimestamp = 0;
+
+       /** @var int UNIX timestamp */
+       protected $authErrorTimestamp = null;
+
+       /** @var bool Whether the server is an Ceph RGW */
+       protected $isRGW = false;
+
+       /**
+        * @see FileBackendStore::__construct()
+        * Additional $config params include:
+        *   - swiftAuthUrl       : Swift authentication server URL
+        *   - swiftUser          : Swift user used by MediaWiki (account:username)
+        *   - swiftKey           : Swift authentication key for the above user
+        *   - swiftAuthTTL       : Swift authentication TTL (seconds)
+        *   - swiftTempUrlKey    : Swift "X-Account-Meta-Temp-URL-Key" value on the account.
+        *                          Do not set this until it has been set in the backend.
+        *   - shardViaHashLevels : Map of container names to sharding config with:
+        *                             - base   : base of hash characters, 16 or 36
+        *                             - levels : the number of hash levels (and digits)
+        *                             - repeat : hash subdirectories are prefixed with all the
+        *                                        parent hash directory names (e.g. "a/ab/abc")
+        *   - cacheAuthInfo      : Whether to cache authentication tokens in APC, XCache, ect.
+        *                          If those are not available, then the main cache will be used.
+        *                          This is probably insecure in shared hosting environments.
+        *   - rgwS3AccessKey     : Rados Gateway S3 "access key" value on the account.
+        *                          Do not set this until it has been set in the backend.
+        *                          This is used for generating expiring pre-authenticated URLs.
+        *                          Only use this when using rgw and to work around
+        *                          http://tracker.newdream.net/issues/3454.
+        *   - rgwS3SecretKey     : Rados Gateway S3 "secret key" value on the account.
+        *                          Do not set this until it has been set in the backend.
+        *                          This is used for generating expiring pre-authenticated URLs.
+        *                          Only use this when using rgw and to work around
+        *                          http://tracker.newdream.net/issues/3454.
+        */
+       public function __construct( array $config ) {
+               parent::__construct( $config );
+               // Required settings
+               $this->swiftAuthUrl = $config['swiftAuthUrl'];
+               $this->swiftUser = $config['swiftUser'];
+               $this->swiftKey = $config['swiftKey'];
+               // Optional settings
+               $this->authTTL = isset( $config['swiftAuthTTL'] )
+                       ? $config['swiftAuthTTL']
+                       : 15 * 60; // some sane number
+               $this->swiftTempUrlKey = isset( $config['swiftTempUrlKey'] )
+                       ? $config['swiftTempUrlKey']
+                       : '';
+               $this->shardViaHashLevels = isset( $config['shardViaHashLevels'] )
+                       ? $config['shardViaHashLevels']
+                       : '';
+               $this->rgwS3AccessKey = isset( $config['rgwS3AccessKey'] )
+                       ? $config['rgwS3AccessKey']
+                       : '';
+               $this->rgwS3SecretKey = isset( $config['rgwS3SecretKey'] )
+                       ? $config['rgwS3SecretKey']
+                       : '';
+               // HTTP helper client
+               $this->http = new MultiHttpClient( [] );
+               // Cache container information to mask latency
+               if ( isset( $config['wanCache'] ) && $config['wanCache'] instanceof WANObjectCache ) {
+                       $this->memCache = $config['wanCache'];
+               }
+               // Process cache for container info
+               $this->containerStatCache = new ProcessCacheLRU( 300 );
+               // Cache auth token information to avoid RTTs
+               if ( !empty( $config['cacheAuthInfo'] ) && isset( $config['srvCache'] ) ) {
+                       $this->srvCache = $config['srvCache'];
+               } else {
+                       $this->srvCache = new EmptyBagOStuff();
+               }
+       }
+
+       public function getFeatures() {
+               return ( FileBackend::ATTR_UNICODE_PATHS |
+                       FileBackend::ATTR_HEADERS | FileBackend::ATTR_METADATA );
+       }
+
+       protected function resolveContainerPath( $container, $relStoragePath ) {
+               if ( !mb_check_encoding( $relStoragePath, 'UTF-8' ) ) {
+                       return null; // not UTF-8, makes it hard to use CF and the swift HTTP API
+               } elseif ( strlen( urlencode( $relStoragePath ) ) > 1024 ) {
+                       return null; // too long for Swift
+               }
+
+               return $relStoragePath;
+       }
+
+       public function isPathUsableInternal( $storagePath ) {
+               list( $container, $rel ) = $this->resolveStoragePathReal( $storagePath );
+               if ( $rel === null ) {
+                       return false; // invalid
+               }
+
+               return is_array( $this->getContainerStat( $container ) );
+       }
+
+       /**
+        * Sanitize and filter the custom headers from a $params array.
+        * Only allows certain "standard" Content- and X-Content- headers.
+        *
+        * @param array $params
+        * @return array Sanitized value of 'headers' field in $params
+        */
+       protected function sanitizeHdrs( array $params ) {
+               return isset( $params['headers'] )
+                       ? $this->getCustomHeaders( $params['headers'] )
+                       : [];
+
+       }
+
+       /**
+        * @param array $rawHeaders
+        * @return array Custom non-metadata HTTP headers
+        */
+       protected function getCustomHeaders( array $rawHeaders ) {
+               $headers = [];
+
+               // Normalize casing, and strip out illegal headers
+               foreach ( $rawHeaders as $name => $value ) {
+                       $name = strtolower( $name );
+                       if ( preg_match( '/^content-(type|length)$/', $name ) ) {
+                               continue; // blacklisted
+                       } elseif ( preg_match( '/^(x-)?content-/', $name ) ) {
+                               $headers[$name] = $value; // allowed
+                       } elseif ( preg_match( '/^content-(disposition)/', $name ) ) {
+                               $headers[$name] = $value; // allowed
+                       }
+               }
+               // By default, Swift has annoyingly low maximum header value limits
+               if ( isset( $headers['content-disposition'] ) ) {
+                       $disposition = '';
+                       // @note: assume FileBackend::makeContentDisposition() already used
+                       foreach ( explode( ';', $headers['content-disposition'] ) as $part ) {
+                               $part = trim( $part );
+                               $new = ( $disposition === '' ) ? $part : "{$disposition};{$part}";
+                               if ( strlen( $new ) <= 255 ) {
+                                       $disposition = $new;
+                               } else {
+                                       break; // too long; sigh
+                               }
+                       }
+                       $headers['content-disposition'] = $disposition;
+               }
+
+               return $headers;
+       }
+
+       /**
+        * @param array $rawHeaders
+        * @return array Custom metadata headers
+        */
+       protected function getMetadataHeaders( array $rawHeaders ) {
+               $headers = [];
+               foreach ( $rawHeaders as $name => $value ) {
+                       $name = strtolower( $name );
+                       if ( strpos( $name, 'x-object-meta-' ) === 0 ) {
+                               $headers[$name] = $value;
+                       }
+               }
+
+               return $headers;
+       }
+
+       /**
+        * @param array $rawHeaders
+        * @return array Custom metadata headers with prefix removed
+        */
+       protected function getMetadata( array $rawHeaders ) {
+               $metadata = [];
+               foreach ( $this->getMetadataHeaders( $rawHeaders ) as $name => $value ) {
+                       $metadata[substr( $name, strlen( 'x-object-meta-' ) )] = $value;
+               }
+
+               return $metadata;
+       }
+
+       protected function doCreateInternal( array $params ) {
+               $status = $this->newStatus();
+
+               list( $dstCont, $dstRel ) = $this->resolveStoragePathReal( $params['dst'] );
+               if ( $dstRel === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               $sha1Hash = Wikimedia\base_convert( sha1( $params['content'] ), 16, 36, 31 );
+               $contentType = isset( $params['headers']['content-type'] )
+                       ? $params['headers']['content-type']
+                       : $this->getContentType( $params['dst'], $params['content'], null );
+
+               $reqs = [ [
+                       'method' => 'PUT',
+                       'url' => [ $dstCont, $dstRel ],
+                       'headers' => [
+                               'content-length' => strlen( $params['content'] ),
+                               'etag' => md5( $params['content'] ),
+                               'content-type' => $contentType,
+                               'x-object-meta-sha1base36' => $sha1Hash
+                       ] + $this->sanitizeHdrs( $params ),
+                       'body' => $params['content']
+               ] ];
+
+               $method = __METHOD__;
+               $handler = function ( array $request, StatusValue $status ) use ( $method, $params ) {
+                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
+                       if ( $rcode === 201 ) {
+                               // good
+                       } elseif ( $rcode === 412 ) {
+                               $status->fatal( 'backend-fail-contenttype', $params['dst'] );
+                       } else {
+                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                       }
+               };
+
+               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $status->value = $opHandle;
+               } else { // actually write the object in Swift
+                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+               }
+
+               return $status;
+       }
+
+       protected function doStoreInternal( array $params ) {
+               $status = $this->newStatus();
+
+               list( $dstCont, $dstRel ) = $this->resolveStoragePathReal( $params['dst'] );
+               if ( $dstRel === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               MediaWiki\suppressWarnings();
+               $sha1Hash = sha1_file( $params['src'] );
+               MediaWiki\restoreWarnings();
+               if ( $sha1Hash === false ) { // source doesn't exist?
+                       $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
+
+                       return $status;
+               }
+               $sha1Hash = Wikimedia\base_convert( $sha1Hash, 16, 36, 31 );
+               $contentType = isset( $params['headers']['content-type'] )
+                       ? $params['headers']['content-type']
+                       : $this->getContentType( $params['dst'], null, $params['src'] );
+
+               $handle = fopen( $params['src'], 'rb' );
+               if ( $handle === false ) { // source doesn't exist?
+                       $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
+
+                       return $status;
+               }
+
+               $reqs = [ [
+                       'method' => 'PUT',
+                       'url' => [ $dstCont, $dstRel ],
+                       'headers' => [
+                               'content-length' => filesize( $params['src'] ),
+                               'etag' => md5_file( $params['src'] ),
+                               'content-type' => $contentType,
+                               'x-object-meta-sha1base36' => $sha1Hash
+                       ] + $this->sanitizeHdrs( $params ),
+                       'body' => $handle // resource
+               ] ];
+
+               $method = __METHOD__;
+               $handler = function ( array $request, StatusValue $status ) use ( $method, $params ) {
+                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
+                       if ( $rcode === 201 ) {
+                               // good
+                       } elseif ( $rcode === 412 ) {
+                               $status->fatal( 'backend-fail-contenttype', $params['dst'] );
+                       } else {
+                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                       }
+               };
+
+               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $status->value = $opHandle;
+               } else { // actually write the object in Swift
+                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+               }
+
+               return $status;
+       }
+
+       protected function doCopyInternal( array $params ) {
+               $status = $this->newStatus();
+
+               list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
+               if ( $srcRel === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
+
+                       return $status;
+               }
+
+               list( $dstCont, $dstRel ) = $this->resolveStoragePathReal( $params['dst'] );
+               if ( $dstRel === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               $reqs = [ [
+                       'method' => 'PUT',
+                       'url' => [ $dstCont, $dstRel ],
+                       'headers' => [
+                               'x-copy-from' => '/' . rawurlencode( $srcCont ) .
+                                       '/' . str_replace( "%2F", "/", rawurlencode( $srcRel ) )
+                       ] + $this->sanitizeHdrs( $params ), // extra headers merged into object
+               ] ];
+
+               $method = __METHOD__;
+               $handler = function ( array $request, StatusValue $status ) use ( $method, $params ) {
+                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
+                       if ( $rcode === 201 ) {
+                               // good
+                       } elseif ( $rcode === 404 ) {
+                               $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+                       } else {
+                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                       }
+               };
+
+               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $status->value = $opHandle;
+               } else { // actually write the object in Swift
+                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+               }
+
+               return $status;
+       }
+
+       protected function doMoveInternal( array $params ) {
+               $status = $this->newStatus();
+
+               list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
+               if ( $srcRel === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
+
+                       return $status;
+               }
+
+               list( $dstCont, $dstRel ) = $this->resolveStoragePathReal( $params['dst'] );
+               if ( $dstRel === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['dst'] );
+
+                       return $status;
+               }
+
+               $reqs = [
+                       [
+                               'method' => 'PUT',
+                               'url' => [ $dstCont, $dstRel ],
+                               'headers' => [
+                                       'x-copy-from' => '/' . rawurlencode( $srcCont ) .
+                                               '/' . str_replace( "%2F", "/", rawurlencode( $srcRel ) )
+                               ] + $this->sanitizeHdrs( $params ) // extra headers merged into object
+                       ]
+               ];
+               if ( "{$srcCont}/{$srcRel}" !== "{$dstCont}/{$dstRel}" ) {
+                       $reqs[] = [
+                               'method' => 'DELETE',
+                               'url' => [ $srcCont, $srcRel ],
+                               'headers' => []
+                       ];
+               }
+
+               $method = __METHOD__;
+               $handler = function ( array $request, StatusValue $status ) use ( $method, $params ) {
+                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
+                       if ( $request['method'] === 'PUT' && $rcode === 201 ) {
+                               // good
+                       } elseif ( $request['method'] === 'DELETE' && $rcode === 204 ) {
+                               // good
+                       } elseif ( $rcode === 404 ) {
+                               $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+                       } else {
+                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                       }
+               };
+
+               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $status->value = $opHandle;
+               } else { // actually move the object in Swift
+                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+               }
+
+               return $status;
+       }
+
+       protected function doDeleteInternal( array $params ) {
+               $status = $this->newStatus();
+
+               list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
+               if ( $srcRel === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
+
+                       return $status;
+               }
+
+               $reqs = [ [
+                       'method' => 'DELETE',
+                       'url' => [ $srcCont, $srcRel ],
+                       'headers' => []
+               ] ];
+
+               $method = __METHOD__;
+               $handler = function ( array $request, StatusValue $status ) use ( $method, $params ) {
+                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
+                       if ( $rcode === 204 ) {
+                               // good
+                       } elseif ( $rcode === 404 ) {
+                               if ( empty( $params['ignoreMissingSource'] ) ) {
+                                       $status->fatal( 'backend-fail-delete', $params['src'] );
+                               }
+                       } else {
+                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                       }
+               };
+
+               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $status->value = $opHandle;
+               } else { // actually delete the object in Swift
+                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+               }
+
+               return $status;
+       }
+
+       protected function doDescribeInternal( array $params ) {
+               $status = $this->newStatus();
+
+               list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
+               if ( $srcRel === null ) {
+                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
+
+                       return $status;
+               }
+
+               // Fetch the old object headers/metadata...this should be in stat cache by now
+               $stat = $this->getFileStat( [ 'src' => $params['src'], 'latest' => 1 ] );
+               if ( $stat && !isset( $stat['xattr'] ) ) { // older cache entry
+                       $stat = $this->doGetFileStat( [ 'src' => $params['src'], 'latest' => 1 ] );
+               }
+               if ( !$stat ) {
+                       $status->fatal( 'backend-fail-describe', $params['src'] );
+
+                       return $status;
+               }
+
+               // POST clears prior headers, so we need to merge the changes in to the old ones
+               $metaHdrs = [];
+               foreach ( $stat['xattr']['metadata'] as $name => $value ) {
+                       $metaHdrs["x-object-meta-$name"] = $value;
+               }
+               $customHdrs = $this->sanitizeHdrs( $params ) + $stat['xattr']['headers'];
+
+               $reqs = [ [
+                       'method' => 'POST',
+                       'url' => [ $srcCont, $srcRel ],
+                       'headers' => $metaHdrs + $customHdrs
+               ] ];
+
+               $method = __METHOD__;
+               $handler = function ( array $request, StatusValue $status ) use ( $method, $params ) {
+                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
+                       if ( $rcode === 202 ) {
+                               // good
+                       } elseif ( $rcode === 404 ) {
+                               $status->fatal( 'backend-fail-describe', $params['src'] );
+                       } else {
+                               $this->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                       }
+               };
+
+               $opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $status->value = $opHandle;
+               } else { // actually change the object in Swift
+                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+               }
+
+               return $status;
+       }
+
+       protected function doPrepareInternal( $fullCont, $dir, array $params ) {
+               $status = $this->newStatus();
+
+               // (a) Check if container already exists
+               $stat = $this->getContainerStat( $fullCont );
+               if ( is_array( $stat ) ) {
+                       return $status; // already there
+               } elseif ( $stat === null ) {
+                       $status->fatal( 'backend-fail-internal', $this->name );
+                       $this->logger->error( __METHOD__ . ': cannot get container stat' );
+
+                       return $status;
+               }
+
+               // (b) Create container as needed with proper ACLs
+               if ( $stat === false ) {
+                       $params['op'] = 'prepare';
+                       $status->merge( $this->createContainer( $fullCont, $params ) );
+               }
+
+               return $status;
+       }
+
+       protected function doSecureInternal( $fullCont, $dir, array $params ) {
+               $status = $this->newStatus();
+               if ( empty( $params['noAccess'] ) ) {
+                       return $status; // nothing to do
+               }
+
+               $stat = $this->getContainerStat( $fullCont );
+               if ( is_array( $stat ) ) {
+                       // Make container private to end-users...
+                       $status->merge( $this->setContainerAccess(
+                               $fullCont,
+                               [ $this->swiftUser ], // read
+                               [ $this->swiftUser ] // write
+                       ) );
+               } elseif ( $stat === false ) {
+                       $status->fatal( 'backend-fail-usable', $params['dir'] );
+               } else {
+                       $status->fatal( 'backend-fail-internal', $this->name );
+                       $this->logger->error( __METHOD__ . ': cannot get container stat' );
+               }
+
+               return $status;
+       }
+
+       protected function doPublishInternal( $fullCont, $dir, array $params ) {
+               $status = $this->newStatus();
+
+               $stat = $this->getContainerStat( $fullCont );
+               if ( is_array( $stat ) ) {
+                       // Make container public to end-users...
+                       $status->merge( $this->setContainerAccess(
+                               $fullCont,
+                               [ $this->swiftUser, '.r:*' ], // read
+                               [ $this->swiftUser ] // write
+                       ) );
+               } elseif ( $stat === false ) {
+                       $status->fatal( 'backend-fail-usable', $params['dir'] );
+               } else {
+                       $status->fatal( 'backend-fail-internal', $this->name );
+                       $this->logger->error( __METHOD__ . ': cannot get container stat' );
+               }
+
+               return $status;
+       }
+
+       protected function doCleanInternal( $fullCont, $dir, array $params ) {
+               $status = $this->newStatus();
+
+               // Only containers themselves can be removed, all else is virtual
+               if ( $dir != '' ) {
+                       return $status; // nothing to do
+               }
+
+               // (a) Check the container
+               $stat = $this->getContainerStat( $fullCont, true );
+               if ( $stat === false ) {
+                       return $status; // ok, nothing to do
+               } elseif ( !is_array( $stat ) ) {
+                       $status->fatal( 'backend-fail-internal', $this->name );
+                       $this->logger->error( __METHOD__ . ': cannot get container stat' );
+
+                       return $status;
+               }
+
+               // (b) Delete the container if empty
+               if ( $stat['count'] == 0 ) {
+                       $params['op'] = 'clean';
+                       $status->merge( $this->deleteContainer( $fullCont, $params ) );
+               }
+
+               return $status;
+       }
+
+       protected function doGetFileStat( array $params ) {
+               $params = [ 'srcs' => [ $params['src'] ], 'concurrency' => 1 ] + $params;
+               unset( $params['src'] );
+               $stats = $this->doGetFileStatMulti( $params );
+
+               return reset( $stats );
+       }
+
+       /**
+        * Convert dates like "Tue, 03 Jan 2012 22:01:04 GMT"/"2013-05-11T07:37:27.678360Z".
+        * Dates might also come in like "2013-05-11T07:37:27.678360" from Swift listings,
+        * missing the timezone suffix (though Ceph RGW does not appear to have this bug).
+        *
+        * @param string $ts
+        * @param int $format Output format (TS_* constant)
+        * @return string
+        * @throws FileBackendError
+        */
+       protected function convertSwiftDate( $ts, $format = TS_MW ) {
+               try {
+                       $timestamp = new MWTimestamp( $ts );
+
+                       return $timestamp->getTimestamp( $format );
+               } catch ( Exception $e ) {
+                       throw new FileBackendError( $e->getMessage() );
+               }
+       }
+
+       /**
+        * Fill in any missing object metadata and save it to Swift
+        *
+        * @param array $objHdrs Object response headers
+        * @param string $path Storage path to object
+        * @return array New headers
+        */
+       protected function addMissingMetadata( array $objHdrs, $path ) {
+               if ( isset( $objHdrs['x-object-meta-sha1base36'] ) ) {
+                       return $objHdrs; // nothing to do
+               }
+
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+               $this->logger->error( __METHOD__ . ": $path was not stored with SHA-1 metadata." );
+
+               $objHdrs['x-object-meta-sha1base36'] = false;
+
+               $auth = $this->getAuthentication();
+               if ( !$auth ) {
+                       return $objHdrs; // failed
+               }
+
+               // Find prior custom HTTP headers
+               $postHeaders = $this->getCustomHeaders( $objHdrs );
+               // Find prior metadata headers
+               $postHeaders += $this->getMetadataHeaders( $objHdrs );
+
+               $status = $this->newStatus();
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $scopeLockS = $this->getScopedFileLocks( [ $path ], LockManager::LOCK_UW, $status );
+               if ( $status->isOK() ) {
+                       $tmpFile = $this->getLocalCopy( [ 'src' => $path, 'latest' => 1 ] );
+                       if ( $tmpFile ) {
+                               $hash = $tmpFile->getSha1Base36();
+                               if ( $hash !== false ) {
+                                       $objHdrs['x-object-meta-sha1base36'] = $hash;
+                                       // Merge new SHA1 header into the old ones
+                                       $postHeaders['x-object-meta-sha1base36'] = $hash;
+                                       list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $path );
+                                       list( $rcode ) = $this->http->run( [
+                                               'method' => 'POST',
+                                               'url' => $this->storageUrl( $auth, $srcCont, $srcRel ),
+                                               'headers' => $this->authTokenHeaders( $auth ) + $postHeaders
+                                       ] );
+                                       if ( $rcode >= 200 && $rcode <= 299 ) {
+                                               $this->deleteFileCache( $path );
+
+                                               return $objHdrs; // success
+                                       }
+                               }
+                       }
+               }
+
+               $this->logger->error( __METHOD__ . ": unable to set SHA-1 metadata for $path" );
+
+               return $objHdrs; // failed
+       }
+
+       protected function doGetFileContentsMulti( array $params ) {
+               $contents = [];
+
+               $auth = $this->getAuthentication();
+
+               $ep = array_diff_key( $params, [ 'srcs' => 1 ] ); // for error logging
+               // Blindly create tmp files and stream to them, catching any exception if the file does
+               // not exist. Doing stats here is useless and will loop infinitely in addMissingMetadata().
+               $reqs = []; // (path => op)
+
+               foreach ( $params['srcs'] as $path ) { // each path in this concurrent batch
+                       list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $path );
+                       if ( $srcRel === null || !$auth ) {
+                               $contents[$path] = false;
+                               continue;
+                       }
+                       // Create a new temporary memory file...
+                       $handle = fopen( 'php://temp', 'wb' );
+                       if ( $handle ) {
+                               $reqs[$path] = [
+                                       'method'  => 'GET',
+                                       'url'     => $this->storageUrl( $auth, $srcCont, $srcRel ),
+                                       'headers' => $this->authTokenHeaders( $auth )
+                                               + $this->headersFromParams( $params ),
+                                       'stream'  => $handle,
+                               ];
+                       }
+                       $contents[$path] = false;
+               }
+
+               $opts = [ 'maxConnsPerHost' => $params['concurrency'] ];
+               $reqs = $this->http->runMulti( $reqs, $opts );
+               foreach ( $reqs as $path => $op ) {
+                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $op['response'];
+                       if ( $rcode >= 200 && $rcode <= 299 ) {
+                               rewind( $op['stream'] ); // start from the beginning
+                               $contents[$path] = stream_get_contents( $op['stream'] );
+                       } elseif ( $rcode === 404 ) {
+                               $contents[$path] = false;
+                       } else {
+                               $this->onError( null, __METHOD__,
+                                       [ 'src' => $path ] + $ep, $rerr, $rcode, $rdesc );
+                       }
+                       fclose( $op['stream'] ); // close open handle
+               }
+
+               return $contents;
+       }
+
+       protected function doDirectoryExists( $fullCont, $dir, array $params ) {
+               $prefix = ( $dir == '' ) ? null : "{$dir}/";
+               $status = $this->objectListing( $fullCont, 'names', 1, null, $prefix );
+               if ( $status->isOK() ) {
+                       return ( count( $status->value ) ) > 0;
+               }
+
+               return null; // error
+       }
+
+       /**
+        * @see FileBackendStore::getDirectoryListInternal()
+        * @param string $fullCont
+        * @param string $dir
+        * @param array $params
+        * @return SwiftFileBackendDirList
+        */
+       public function getDirectoryListInternal( $fullCont, $dir, array $params ) {
+               return new SwiftFileBackendDirList( $this, $fullCont, $dir, $params );
+       }
+
+       /**
+        * @see FileBackendStore::getFileListInternal()
+        * @param string $fullCont
+        * @param string $dir
+        * @param array $params
+        * @return SwiftFileBackendFileList
+        */
+       public function getFileListInternal( $fullCont, $dir, array $params ) {
+               return new SwiftFileBackendFileList( $this, $fullCont, $dir, $params );
+       }
+
+       /**
+        * Do not call this function outside of SwiftFileBackendFileList
+        *
+        * @param string $fullCont Resolved container name
+        * @param string $dir Resolved storage directory with no trailing slash
+        * @param string|null $after Resolved container relative path to list items after
+        * @param int $limit Max number of items to list
+        * @param array $params Parameters for getDirectoryList()
+        * @return array List of container relative resolved paths of directories directly under $dir
+        * @throws FileBackendError
+        */
+       public function getDirListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) {
+               $dirs = [];
+               if ( $after === INF ) {
+                       return $dirs; // nothing more
+               }
+
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+
+               $prefix = ( $dir == '' ) ? null : "{$dir}/";
+               // Non-recursive: only list dirs right under $dir
+               if ( !empty( $params['topOnly'] ) ) {
+                       $status = $this->objectListing( $fullCont, 'names', $limit, $after, $prefix, '/' );
+                       if ( !$status->isOK() ) {
+                               throw new FileBackendError( "Iterator page I/O error." );
+                       }
+                       $objects = $status->value;
+                       foreach ( $objects as $object ) { // files and directories
+                               if ( substr( $object, -1 ) === '/' ) {
+                                       $dirs[] = $object; // directories end in '/'
+                               }
+                       }
+               } else {
+                       // Recursive: list all dirs under $dir and its subdirs
+                       $getParentDir = function ( $path ) {
+                               return ( strpos( $path, '/' ) !== false ) ? dirname( $path ) : false;
+                       };
+
+                       // Get directory from last item of prior page
+                       $lastDir = $getParentDir( $after ); // must be first page
+                       $status = $this->objectListing( $fullCont, 'names', $limit, $after, $prefix );
+
+                       if ( !$status->isOK() ) {
+                               throw new FileBackendError( "Iterator page I/O error." );
+                       }
+
+                       $objects = $status->value;
+
+                       foreach ( $objects as $object ) { // files
+                               $objectDir = $getParentDir( $object ); // directory of object
+
+                               if ( $objectDir !== false && $objectDir !== $dir ) {
+                                       // Swift stores paths in UTF-8, using binary sorting.
+                                       // See function "create_container_table" in common/db.py.
+                                       // If a directory is not "greater" than the last one,
+                                       // then it was already listed by the calling iterator.
+                                       if ( strcmp( $objectDir, $lastDir ) > 0 ) {
+                                               $pDir = $objectDir;
+                                               do { // add dir and all its parent dirs
+                                                       $dirs[] = "{$pDir}/";
+                                                       $pDir = $getParentDir( $pDir );
+                                               } while ( $pDir !== false // sanity
+                                                       && strcmp( $pDir, $lastDir ) > 0 // not done already
+                                                       && strlen( $pDir ) > strlen( $dir ) // within $dir
+                                               );
+                                       }
+                                       $lastDir = $objectDir;
+                               }
+                       }
+               }
+               // Page on the unfiltered directory listing (what is returned may be filtered)
+               if ( count( $objects ) < $limit ) {
+                       $after = INF; // avoid a second RTT
+               } else {
+                       $after = end( $objects ); // update last item
+               }
+
+               return $dirs;
+       }
+
+       /**
+        * Do not call this function outside of SwiftFileBackendFileList
+        *
+        * @param string $fullCont Resolved container name
+        * @param string $dir Resolved storage directory with no trailing slash
+        * @param string|null $after Resolved container relative path of file to list items after
+        * @param int $limit Max number of items to list
+        * @param array $params Parameters for getDirectoryList()
+        * @return array List of resolved container relative paths of files under $dir
+        * @throws FileBackendError
+        */
+       public function getFileListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) {
+               $files = []; // list of (path, stat array or null) entries
+               if ( $after === INF ) {
+                       return $files; // nothing more
+               }
+
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+
+               $prefix = ( $dir == '' ) ? null : "{$dir}/";
+               // $objects will contain a list of unfiltered names or CF_Object items
+               // Non-recursive: only list files right under $dir
+               if ( !empty( $params['topOnly'] ) ) {
+                       if ( !empty( $params['adviseStat'] ) ) {
+                               $status = $this->objectListing( $fullCont, 'info', $limit, $after, $prefix, '/' );
+                       } else {
+                               $status = $this->objectListing( $fullCont, 'names', $limit, $after, $prefix, '/' );
+                       }
+               } else {
+                       // Recursive: list all files under $dir and its subdirs
+                       if ( !empty( $params['adviseStat'] ) ) {
+                               $status = $this->objectListing( $fullCont, 'info', $limit, $after, $prefix );
+                       } else {
+                               $status = $this->objectListing( $fullCont, 'names', $limit, $after, $prefix );
+                       }
+               }
+
+               // Reformat this list into a list of (name, stat array or null) entries
+               if ( !$status->isOK() ) {
+                       throw new FileBackendError( "Iterator page I/O error." );
+               }
+
+               $objects = $status->value;
+               $files = $this->buildFileObjectListing( $params, $dir, $objects );
+
+               // Page on the unfiltered object listing (what is returned may be filtered)
+               if ( count( $objects ) < $limit ) {
+                       $after = INF; // avoid a second RTT
+               } else {
+                       $after = end( $objects ); // update last item
+                       $after = is_object( $after ) ? $after->name : $after;
+               }
+
+               return $files;
+       }
+
+       /**
+        * Build a list of file objects, filtering out any directories
+        * and extracting any stat info if provided in $objects (for CF_Objects)
+        *
+        * @param array $params Parameters for getDirectoryList()
+        * @param string $dir Resolved container directory path
+        * @param array $objects List of CF_Object items or object names
+        * @return array List of (names,stat array or null) entries
+        */
+       private function buildFileObjectListing( array $params, $dir, array $objects ) {
+               $names = [];
+               foreach ( $objects as $object ) {
+                       if ( is_object( $object ) ) {
+                               if ( isset( $object->subdir ) || !isset( $object->name ) ) {
+                                       continue; // virtual directory entry; ignore
+                               }
+                               $stat = [
+                                       // Convert various random Swift dates to TS_MW
+                                       'mtime'  => $this->convertSwiftDate( $object->last_modified, TS_MW ),
+                                       'size'   => (int)$object->bytes,
+                                       'sha1'   => null,
+                                       // Note: manifiest ETags are not an MD5 of the file
+                                       'md5'    => ctype_xdigit( $object->hash ) ? $object->hash : null,
+                                       'latest' => false // eventually consistent
+                               ];
+                               $names[] = [ $object->name, $stat ];
+                       } elseif ( substr( $object, -1 ) !== '/' ) {
+                               // Omit directories, which end in '/' in listings
+                               $names[] = [ $object, null ];
+                       }
+               }
+
+               return $names;
+       }
+
+       /**
+        * Do not call this function outside of SwiftFileBackendFileList
+        *
+        * @param string $path Storage path
+        * @param array $val Stat value
+        */
+       public function loadListingStatInternal( $path, array $val ) {
+               $this->cheapCache->set( $path, 'stat', $val );
+       }
+
+       protected function doGetFileXAttributes( array $params ) {
+               $stat = $this->getFileStat( $params );
+               if ( $stat ) {
+                       if ( !isset( $stat['xattr'] ) ) {
+                               // Stat entries filled by file listings don't include metadata/headers
+                               $this->clearCache( [ $params['src'] ] );
+                               $stat = $this->getFileStat( $params );
+                       }
+
+                       return $stat['xattr'];
+               } else {
+                       return false;
+               }
+       }
+
+       protected function doGetFileSha1base36( array $params ) {
+               $stat = $this->getFileStat( $params );
+               if ( $stat ) {
+                       if ( !isset( $stat['sha1'] ) ) {
+                               // Stat entries filled by file listings don't include SHA1
+                               $this->clearCache( [ $params['src'] ] );
+                               $stat = $this->getFileStat( $params );
+                       }
+
+                       return $stat['sha1'];
+               } else {
+                       return false;
+               }
+       }
+
+       protected function doStreamFile( array $params ) {
+               $status = $this->newStatus();
+
+               $flags = !empty( $params['headless'] ) ? StreamFile::STREAM_HEADLESS : 0;
+
+               list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
+               if ( $srcRel === null ) {
+                       StreamFile::send404Message( $params['src'], $flags );
+                       $status->fatal( 'backend-fail-invalidpath', $params['src'] );
+
+                       return $status;
+               }
+
+               $auth = $this->getAuthentication();
+               if ( !$auth || !is_array( $this->getContainerStat( $srcCont ) ) ) {
+                       StreamFile::send404Message( $params['src'], $flags );
+                       $status->fatal( 'backend-fail-stream', $params['src'] );
+
+                       return $status;
+               }
+
+               // If "headers" is set, we only want to send them if the file is there.
+               // Do not bother checking if the file exists if headers are not set though.
+               if ( $params['headers'] && !$this->fileExists( $params ) ) {
+                       StreamFile::send404Message( $params['src'], $flags );
+                       $status->fatal( 'backend-fail-stream', $params['src'] );
+
+                       return $status;
+               }
+
+               // Send the requested additional headers
+               foreach ( $params['headers'] as $header ) {
+                       header( $header ); // aways send
+               }
+
+               if ( empty( $params['allowOB'] ) ) {
+                       // Cancel output buffering and gzipping if set
+                       call_user_func( $this->obResetFunc );
+               }
+
+               $handle = fopen( 'php://output', 'wb' );
+               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
+                       'method' => 'GET',
+                       'url' => $this->storageUrl( $auth, $srcCont, $srcRel ),
+                       'headers' => $this->authTokenHeaders( $auth )
+                               + $this->headersFromParams( $params ) + $params['options'],
+                       'stream' => $handle,
+                       'flags'  => [ 'relayResponseHeaders' => empty( $params['headless'] ) ]
+               ] );
+
+               if ( $rcode >= 200 && $rcode <= 299 ) {
+                       // good
+               } elseif ( $rcode === 404 ) {
+                       $status->fatal( 'backend-fail-stream', $params['src'] );
+                       // Per bug 41113, nasty things can happen if bad cache entries get
+                       // stuck in cache. It's also possible that this error can come up
+                       // with simple race conditions. Clear out the stat cache to be safe.
+                       $this->clearCache( [ $params['src'] ] );
+                       $this->deleteFileCache( $params['src'] );
+               } else {
+                       $this->onError( $status, __METHOD__, $params, $rerr, $rcode, $rdesc );
+               }
+
+               return $status;
+       }
+
+       protected function doGetLocalCopyMulti( array $params ) {
+               /** @var TempFSFile[] $tmpFiles */
+               $tmpFiles = [];
+
+               $auth = $this->getAuthentication();
+
+               $ep = array_diff_key( $params, [ 'srcs' => 1 ] ); // for error logging
+               // Blindly create tmp files and stream to them, catching any exception if the file does
+               // not exist. Doing a stat here is useless causes infinite loops in addMissingMetadata().
+               $reqs = []; // (path => op)
+
+               foreach ( $params['srcs'] as $path ) { // each path in this concurrent batch
+                       list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $path );
+                       if ( $srcRel === null || !$auth ) {
+                               $tmpFiles[$path] = null;
+                               continue;
+                       }
+                       // Get source file extension
+                       $ext = FileBackend::extensionFromPath( $path );
+                       // Create a new temporary file...
+                       $tmpFile = TempFSFile::factory( 'localcopy_', $ext, $this->tmpDirectory );
+                       if ( $tmpFile ) {
+                               $handle = fopen( $tmpFile->getPath(), 'wb' );
+                               if ( $handle ) {
+                                       $reqs[$path] = [
+                                               'method'  => 'GET',
+                                               'url'     => $this->storageUrl( $auth, $srcCont, $srcRel ),
+                                               'headers' => $this->authTokenHeaders( $auth )
+                                                       + $this->headersFromParams( $params ),
+                                               'stream'  => $handle,
+                                       ];
+                               } else {
+                                       $tmpFile = null;
+                               }
+                       }
+                       $tmpFiles[$path] = $tmpFile;
+               }
+
+               $isLatest = ( $this->isRGW || !empty( $params['latest'] ) );
+               $opts = [ 'maxConnsPerHost' => $params['concurrency'] ];
+               $reqs = $this->http->runMulti( $reqs, $opts );
+               foreach ( $reqs as $path => $op ) {
+                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $op['response'];
+                       fclose( $op['stream'] ); // close open handle
+                       if ( $rcode >= 200 && $rcode <= 299 ) {
+                               $size = $tmpFiles[$path] ? $tmpFiles[$path]->getSize() : 0;
+                               // Double check that the disk is not full/broken
+                               if ( $size != $rhdrs['content-length'] ) {
+                                       $tmpFiles[$path] = null;
+                                       $rerr = "Got {$size}/{$rhdrs['content-length']} bytes";
+                                       $this->onError( null, __METHOD__,
+                                               [ 'src' => $path ] + $ep, $rerr, $rcode, $rdesc );
+                               }
+                               // Set the file stat process cache in passing
+                               $stat = $this->getStatFromHeaders( $rhdrs );
+                               $stat['latest'] = $isLatest;
+                               $this->cheapCache->set( $path, 'stat', $stat );
+                       } elseif ( $rcode === 404 ) {
+                               $tmpFiles[$path] = false;
+                       } else {
+                               $tmpFiles[$path] = null;
+                               $this->onError( null, __METHOD__,
+                                       [ 'src' => $path ] + $ep, $rerr, $rcode, $rdesc );
+                       }
+               }
+
+               return $tmpFiles;
+       }
+
+       public function getFileHttpUrl( array $params ) {
+               if ( $this->swiftTempUrlKey != '' ||
+                       ( $this->rgwS3AccessKey != '' && $this->rgwS3SecretKey != '' )
+               ) {
+                       list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
+                       if ( $srcRel === null ) {
+                               return null; // invalid path
+                       }
+
+                       $auth = $this->getAuthentication();
+                       if ( !$auth ) {
+                               return null;
+                       }
+
+                       $ttl = isset( $params['ttl'] ) ? $params['ttl'] : 86400;
+                       $expires = time() + $ttl;
+
+                       if ( $this->swiftTempUrlKey != '' ) {
+                               $url = $this->storageUrl( $auth, $srcCont, $srcRel );
+                               // Swift wants the signature based on the unencoded object name
+                               $contPath = parse_url( $this->storageUrl( $auth, $srcCont ), PHP_URL_PATH );
+                               $signature = hash_hmac( 'sha1',
+                                       "GET\n{$expires}\n{$contPath}/{$srcRel}",
+                                       $this->swiftTempUrlKey
+                               );
+
+                               return "{$url}?temp_url_sig={$signature}&temp_url_expires={$expires}";
+                       } else { // give S3 API URL for rgw
+                               // Path for signature starts with the bucket
+                               $spath = '/' . rawurlencode( $srcCont ) . '/' .
+                                       str_replace( '%2F', '/', rawurlencode( $srcRel ) );
+                               // Calculate the hash
+                               $signature = base64_encode( hash_hmac(
+                                       'sha1',
+                                       "GET\n\n\n{$expires}\n{$spath}",
+                                       $this->rgwS3SecretKey,
+                                       true // raw
+                               ) );
+                               // See http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html.
+                               // Note: adding a newline for empty CanonicalizedAmzHeaders does not work.
+                               // Note: S3 API is the rgw default; remove the /swift/ URL bit.
+                               return str_replace( '/swift/v1', '', $this->storageUrl( $auth ) . $spath ) .
+                                       '?' .
+                                       http_build_query( [
+                                               'Signature' => $signature,
+                                               'Expires' => $expires,
+                                               'AWSAccessKeyId' => $this->rgwS3AccessKey
+                                       ] );
+                       }
+               }
+
+               return null;
+       }
+
+       protected function directoriesAreVirtual() {
+               return true;
+       }
+
+       /**
+        * Get headers to send to Swift when reading a file based
+        * on a FileBackend params array, e.g. that of getLocalCopy().
+        * $params is currently only checked for a 'latest' flag.
+        *
+        * @param array $params
+        * @return array
+        */
+       protected function headersFromParams( array $params ) {
+               $hdrs = [];
+               if ( !empty( $params['latest'] ) ) {
+                       $hdrs['x-newest'] = 'true';
+               }
+
+               return $hdrs;
+       }
+
+       /**
+        * @param FileBackendStoreOpHandle[] $fileOpHandles
+        *
+        * @return StatusValue[]
+        */
+       protected function doExecuteOpHandlesInternal( array $fileOpHandles ) {
+               /** @var $statuses StatusValue[] */
+               $statuses = [];
+
+               $auth = $this->getAuthentication();
+               if ( !$auth ) {
+                       foreach ( $fileOpHandles as $index => $fileOpHandle ) {
+                               $statuses[$index] = $this->newStatus( 'backend-fail-connect', $this->name );
+                       }
+
+                       return $statuses;
+               }
+
+               // Split the HTTP requests into stages that can be done concurrently
+               $httpReqsByStage = []; // map of (stage => index => HTTP request)
+               foreach ( $fileOpHandles as $index => $fileOpHandle ) {
+                       /** @var SwiftFileOpHandle $fileOpHandle */
+                       $reqs = $fileOpHandle->httpOp;
+                       // Convert the 'url' parameter to an actual URL using $auth
+                       foreach ( $reqs as $stage => &$req ) {
+                               list( $container, $relPath ) = $req['url'];
+                               $req['url'] = $this->storageUrl( $auth, $container, $relPath );
+                               $req['headers'] = isset( $req['headers'] ) ? $req['headers'] : [];
+                               $req['headers'] = $this->authTokenHeaders( $auth ) + $req['headers'];
+                               $httpReqsByStage[$stage][$index] = $req;
+                       }
+                       $statuses[$index] = $this->newStatus();
+               }
+
+               // Run all requests for the first stage, then the next, and so on
+               $reqCount = count( $httpReqsByStage );
+               for ( $stage = 0; $stage < $reqCount; ++$stage ) {
+                       $httpReqs = $this->http->runMulti( $httpReqsByStage[$stage] );
+                       foreach ( $httpReqs as $index => $httpReq ) {
+                               // Run the callback for each request of this operation
+                               $callback = $fileOpHandles[$index]->callback;
+                               call_user_func_array( $callback, [ $httpReq, $statuses[$index] ] );
+                               // On failure, abort all remaining requests for this operation
+                               // (e.g. abort the DELETE request if the COPY request fails for a move)
+                               if ( !$statuses[$index]->isOK() ) {
+                                       $stages = count( $fileOpHandles[$index]->httpOp );
+                                       for ( $s = ( $stage + 1 ); $s < $stages; ++$s ) {
+                                               unset( $httpReqsByStage[$s][$index] );
+                                       }
+                               }
+                       }
+               }
+
+               return $statuses;
+       }
+
+       /**
+        * Set read/write permissions for a Swift container.
+        *
+        * @see http://swift.openstack.org/misc.html#acls
+        *
+        * In general, we don't allow listings to end-users. It's not useful, isn't well-defined
+        * (lists are truncated to 10000 item with no way to page), and is just a performance risk.
+        *
+        * @param string $container Resolved Swift container
+        * @param array $readGrps List of the possible criteria for a request to have
+        * access to read a container. Each item is one of the following formats:
+        *   - account:user        : Grants access if the request is by the given user
+        *   - ".r:<regex>"        : Grants access if the request is from a referrer host that
+        *                           matches the expression and the request is not for a listing.
+        *                           Setting this to '*' effectively makes a container public.
+        *   -".rlistings:<regex>" : Grants access if the request is from a referrer host that
+        *                           matches the expression and the request is for a listing.
+        * @param array $writeGrps A list of the possible criteria for a request to have
+        * access to write to a container. Each item is of the following format:
+        *   - account:user       : Grants access if the request is by the given user
+        * @return StatusValue
+        */
+       protected function setContainerAccess( $container, array $readGrps, array $writeGrps ) {
+               $status = $this->newStatus();
+               $auth = $this->getAuthentication();
+
+               if ( !$auth ) {
+                       $status->fatal( 'backend-fail-connect', $this->name );
+
+                       return $status;
+               }
+
+               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
+                       'method' => 'POST',
+                       'url' => $this->storageUrl( $auth, $container ),
+                       'headers' => $this->authTokenHeaders( $auth ) + [
+                               'x-container-read' => implode( ',', $readGrps ),
+                               'x-container-write' => implode( ',', $writeGrps )
+                       ]
+               ] );
+
+               if ( $rcode != 204 && $rcode !== 202 ) {
+                       $status->fatal( 'backend-fail-internal', $this->name );
+                       $this->logger->error( __METHOD__ . ': unexpected rcode value (' . $rcode . ')' );
+               }
+
+               return $status;
+       }
+
+       /**
+        * Get a Swift container stat array, possibly from process cache.
+        * Use $reCache if the file count or byte count is needed.
+        *
+        * @param string $container Container name
+        * @param bool $bypassCache Bypass all caches and load from Swift
+        * @return array|bool|null False on 404, null on failure
+        */
+       protected function getContainerStat( $container, $bypassCache = false ) {
+               $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
+
+               if ( $bypassCache ) { // purge cache
+                       $this->containerStatCache->clear( $container );
+               } elseif ( !$this->containerStatCache->has( $container, 'stat' ) ) {
+                       $this->primeContainerCache( [ $container ] ); // check persistent cache
+               }
+               if ( !$this->containerStatCache->has( $container, 'stat' ) ) {
+                       $auth = $this->getAuthentication();
+                       if ( !$auth ) {
+                               return null;
+                       }
+
+                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
+                               'method' => 'HEAD',
+                               'url' => $this->storageUrl( $auth, $container ),
+                               'headers' => $this->authTokenHeaders( $auth )
+                       ] );
+
+                       if ( $rcode === 204 ) {
+                               $stat = [
+                                       'count' => $rhdrs['x-container-object-count'],
+                                       'bytes' => $rhdrs['x-container-bytes-used']
+                               ];
+                               if ( $bypassCache ) {
+                                       return $stat;
+                               } else {
+                                       $this->containerStatCache->set( $container, 'stat', $stat ); // cache it
+                                       $this->setContainerCache( $container, $stat ); // update persistent cache
+                               }
+                       } elseif ( $rcode === 404 ) {
+                               return false;
+                       } else {
+                               $this->onError( null, __METHOD__,
+                                       [ 'cont' => $container ], $rerr, $rcode, $rdesc );
+
+                               return null;
+                       }
+               }
+
+               return $this->containerStatCache->get( $container, 'stat' );
+       }
+
+       /**
+        * Create a Swift container
+        *
+        * @param string $container Container name
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function createContainer( $container, array $params ) {
+               $status = $this->newStatus();
+
+               $auth = $this->getAuthentication();
+               if ( !$auth ) {
+                       $status->fatal( 'backend-fail-connect', $this->name );
+
+                       return $status;
+               }
+
+               // @see SwiftFileBackend::setContainerAccess()
+               if ( empty( $params['noAccess'] ) ) {
+                       $readGrps = [ '.r:*', $this->swiftUser ]; // public
+               } else {
+                       $readGrps = [ $this->swiftUser ]; // private
+               }
+               $writeGrps = [ $this->swiftUser ]; // sanity
+
+               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
+                       'method' => 'PUT',
+                       'url' => $this->storageUrl( $auth, $container ),
+                       'headers' => $this->authTokenHeaders( $auth ) + [
+                               'x-container-read' => implode( ',', $readGrps ),
+                               'x-container-write' => implode( ',', $writeGrps )
+                       ]
+               ] );
+
+               if ( $rcode === 201 ) { // new
+                       // good
+               } elseif ( $rcode === 202 ) { // already there
+                       // this shouldn't really happen, but is OK
+               } else {
+                       $this->onError( $status, __METHOD__, $params, $rerr, $rcode, $rdesc );
+               }
+
+               return $status;
+       }
+
+       /**
+        * Delete a Swift container
+        *
+        * @param string $container Container name
+        * @param array $params
+        * @return StatusValue
+        */
+       protected function deleteContainer( $container, array $params ) {
+               $status = $this->newStatus();
+
+               $auth = $this->getAuthentication();
+               if ( !$auth ) {
+                       $status->fatal( 'backend-fail-connect', $this->name );
+
+                       return $status;
+               }
+
+               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
+                       'method' => 'DELETE',
+                       'url' => $this->storageUrl( $auth, $container ),
+                       'headers' => $this->authTokenHeaders( $auth )
+               ] );
+
+               if ( $rcode >= 200 && $rcode <= 299 ) { // deleted
+                       $this->containerStatCache->clear( $container ); // purge
+               } elseif ( $rcode === 404 ) { // not there
+                       // this shouldn't really happen, but is OK
+               } elseif ( $rcode === 409 ) { // not empty
+                       $this->onError( $status, __METHOD__, $params, $rerr, $rcode, $rdesc ); // race?
+               } else {
+                       $this->onError( $status, __METHOD__, $params, $rerr, $rcode, $rdesc );
+               }
+
+               return $status;
+       }
+
+       /**
+        * Get a list of objects under a container.
+        * Either just the names or a list of stdClass objects with details can be returned.
+        *
+        * @param string $fullCont
+        * @param string $type ('info' for a list of object detail maps, 'names' for names only)
+        * @param int $limit
+        * @param string|null $after
+        * @param string|null $prefix
+        * @param string|null $delim
+        * @return StatusValue With the list as value
+        */
+       private function objectListing(
+               $fullCont, $type, $limit, $after = null, $prefix = null, $delim = null
+       ) {
+               $status = $this->newStatus();
+
+               $auth = $this->getAuthentication();
+               if ( !$auth ) {
+                       $status->fatal( 'backend-fail-connect', $this->name );
+
+                       return $status;
+               }
+
+               $query = [ 'limit' => $limit ];
+               if ( $type === 'info' ) {
+                       $query['format'] = 'json';
+               }
+               if ( $after !== null ) {
+                       $query['marker'] = $after;
+               }
+               if ( $prefix !== null ) {
+                       $query['prefix'] = $prefix;
+               }
+               if ( $delim !== null ) {
+                       $query['delimiter'] = $delim;
+               }
+
+               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
+                       'method' => 'GET',
+                       'url' => $this->storageUrl( $auth, $fullCont ),
+                       'query' => $query,
+                       'headers' => $this->authTokenHeaders( $auth )
+               ] );
+
+               $params = [ 'cont' => $fullCont, 'prefix' => $prefix, 'delim' => $delim ];
+               if ( $rcode === 200 ) { // good
+                       if ( $type === 'info' ) {
+                               $status->value = FormatJson::decode( trim( $rbody ) );
+                       } else {
+                               $status->value = explode( "\n", trim( $rbody ) );
+                       }
+               } elseif ( $rcode === 204 ) {
+                       $status->value = []; // empty container
+               } elseif ( $rcode === 404 ) {
+                       $status->value = []; // no container
+               } else {
+                       $this->onError( $status, __METHOD__, $params, $rerr, $rcode, $rdesc );
+               }
+
+               return $status;
+       }
+
+       protected function doPrimeContainerCache( array $containerInfo ) {
+               foreach ( $containerInfo as $container => $info ) {
+                       $this->containerStatCache->set( $container, 'stat', $info );
+               }
+       }
+
+       protected function doGetFileStatMulti( array $params ) {
+               $stats = [];
+
+               $auth = $this->getAuthentication();
+
+               $reqs = [];
+               foreach ( $params['srcs'] as $path ) {
+                       list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $path );
+                       if ( $srcRel === null ) {
+                               $stats[$path] = false;
+                               continue; // invalid storage path
+                       } elseif ( !$auth ) {
+                               $stats[$path] = null;
+                               continue;
+                       }
+
+                       // (a) Check the container
+                       $cstat = $this->getContainerStat( $srcCont );
+                       if ( $cstat === false ) {
+                               $stats[$path] = false;
+                               continue; // ok, nothing to do
+                       } elseif ( !is_array( $cstat ) ) {
+                               $stats[$path] = null;
+                               continue;
+                       }
+
+                       $reqs[$path] = [
+                               'method'  => 'HEAD',
+                               'url'     => $this->storageUrl( $auth, $srcCont, $srcRel ),
+                               'headers' => $this->authTokenHeaders( $auth ) + $this->headersFromParams( $params )
+                       ];
+               }
+
+               $opts = [ 'maxConnsPerHost' => $params['concurrency'] ];
+               $reqs = $this->http->runMulti( $reqs, $opts );
+
+               foreach ( $params['srcs'] as $path ) {
+                       if ( array_key_exists( $path, $stats ) ) {
+                               continue; // some sort of failure above
+                       }
+                       // (b) Check the file
+                       list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $reqs[$path]['response'];
+                       if ( $rcode === 200 || $rcode === 204 ) {
+                               // Update the object if it is missing some headers
+                               $rhdrs = $this->addMissingMetadata( $rhdrs, $path );
+                               // Load the stat array from the headers
+                               $stat = $this->getStatFromHeaders( $rhdrs );
+                               if ( $this->isRGW ) {
+                                       $stat['latest'] = true; // strong consistency
+                               }
+                       } elseif ( $rcode === 404 ) {
+                               $stat = false;
+                       } else {
+                               $stat = null;
+                               $this->onError( null, __METHOD__, $params, $rerr, $rcode, $rdesc );
+                       }
+                       $stats[$path] = $stat;
+               }
+
+               return $stats;
+       }
+
+       /**
+        * @param array $rhdrs
+        * @return array
+        */
+       protected function getStatFromHeaders( array $rhdrs ) {
+               // Fetch all of the custom metadata headers
+               $metadata = $this->getMetadata( $rhdrs );
+               // Fetch all of the custom raw HTTP headers
+               $headers = $this->sanitizeHdrs( [ 'headers' => $rhdrs ] );
+
+               return [
+                       // Convert various random Swift dates to TS_MW
+                       'mtime' => $this->convertSwiftDate( $rhdrs['last-modified'], TS_MW ),
+                       // Empty objects actually return no content-length header in Ceph
+                       'size'  => isset( $rhdrs['content-length'] ) ? (int)$rhdrs['content-length'] : 0,
+                       'sha1'  => isset( $metadata['sha1base36'] ) ? $metadata['sha1base36'] : null,
+                       // Note: manifiest ETags are not an MD5 of the file
+                       'md5'   => ctype_xdigit( $rhdrs['etag'] ) ? $rhdrs['etag'] : null,
+                       'xattr' => [ 'metadata' => $metadata, 'headers' => $headers ]
+               ];
+       }
+
+       /**
+        * @return array|null Credential map
+        */
+       protected function getAuthentication() {
+               if ( $this->authErrorTimestamp !== null ) {
+                       if ( ( time() - $this->authErrorTimestamp ) < 60 ) {
+                               return null; // failed last attempt; don't bother
+                       } else { // actually retry this time
+                               $this->authErrorTimestamp = null;
+                       }
+               }
+               // Session keys expire after a while, so we renew them periodically
+               $reAuth = ( ( time() - $this->authSessionTimestamp ) > $this->authTTL );
+               // Authenticate with proxy and get a session key...
+               if ( !$this->authCreds || $reAuth ) {
+                       $this->authSessionTimestamp = 0;
+                       $cacheKey = $this->getCredsCacheKey( $this->swiftUser );
+                       $creds = $this->srvCache->get( $cacheKey ); // credentials
+                       // Try to use the credential cache
+                       if ( isset( $creds['auth_token'] ) && isset( $creds['storage_url'] ) ) {
+                               $this->authCreds = $creds;
+                               // Skew the timestamp for worst case to avoid using stale credentials
+                               $this->authSessionTimestamp = time() - ceil( $this->authTTL / 2 );
+                       } else { // cache miss
+                               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
+                                       'method' => 'GET',
+                                       'url' => "{$this->swiftAuthUrl}/v1.0",
+                                       'headers' => [
+                                               'x-auth-user' => $this->swiftUser,
+                                               'x-auth-key' => $this->swiftKey
+                                       ]
+                               ] );
+
+                               if ( $rcode >= 200 && $rcode <= 299 ) { // OK
+                                       $this->authCreds = [
+                                               'auth_token' => $rhdrs['x-auth-token'],
+                                               'storage_url' => $rhdrs['x-storage-url']
+                                       ];
+                                       $this->srvCache->set( $cacheKey, $this->authCreds, ceil( $this->authTTL / 2 ) );
+                                       $this->authSessionTimestamp = time();
+                               } elseif ( $rcode === 401 ) {
+                                       $this->onError( null, __METHOD__, [], "Authentication failed.", $rcode );
+                                       $this->authErrorTimestamp = time();
+
+                                       return null;
+                               } else {
+                                       $this->onError( null, __METHOD__, [], "HTTP return code: $rcode", $rcode );
+                                       $this->authErrorTimestamp = time();
+
+                                       return null;
+                               }
+                       }
+                       // Ceph RGW does not use <account> in URLs (OpenStack Swift uses "/v1/<account>")
+                       if ( substr( $this->authCreds['storage_url'], -3 ) === '/v1' ) {
+                               $this->isRGW = true; // take advantage of strong consistency in Ceph
+                       }
+               }
+
+               return $this->authCreds;
+       }
+
+       /**
+        * @param array $creds From getAuthentication()
+        * @param string $container
+        * @param string $object
+        * @return array
+        */
+       protected function storageUrl( array $creds, $container = null, $object = null ) {
+               $parts = [ $creds['storage_url'] ];
+               if ( strlen( $container ) ) {
+                       $parts[] = rawurlencode( $container );
+               }
+               if ( strlen( $object ) ) {
+                       $parts[] = str_replace( "%2F", "/", rawurlencode( $object ) );
+               }
+
+               return implode( '/', $parts );
+       }
+
+       /**
+        * @param array $creds From getAuthentication()
+        * @return array
+        */
+       protected function authTokenHeaders( array $creds ) {
+               return [ 'x-auth-token' => $creds['auth_token'] ];
+       }
+
+       /**
+        * Get the cache key for a container
+        *
+        * @param string $username
+        * @return string
+        */
+       private function getCredsCacheKey( $username ) {
+               return 'swiftcredentials:' . md5( $username . ':' . $this->swiftAuthUrl );
+       }
+
+       /**
+        * Log an unexpected exception for this backend.
+        * This also sets the StatusValue object to have a fatal error.
+        *
+        * @param StatusValue|null $status
+        * @param string $func
+        * @param array $params
+        * @param string $err Error string
+        * @param int $code HTTP status
+        * @param string $desc HTTP StatusValue description
+        */
+       public function onError( $status, $func, array $params, $err = '', $code = 0, $desc = '' ) {
+               if ( $status instanceof StatusValue ) {
+                       $status->fatal( 'backend-fail-internal', $this->name );
+               }
+               if ( $code == 401 ) { // possibly a stale token
+                       $this->srvCache->delete( $this->getCredsCacheKey( $this->swiftUser ) );
+               }
+               $this->logger->error(
+                       "HTTP $code ($desc) in '{$func}' (given '" . FormatJson::encode( $params ) . "')" .
+                       ( $err ? ": $err" : "" )
+               );
+       }
+}
+
+/**
+ * @see FileBackendStoreOpHandle
+ */
+class SwiftFileOpHandle extends FileBackendStoreOpHandle {
+       /** @var array List of Requests for MultiHttpClient */
+       public $httpOp;
+       /** @var Closure */
+       public $callback;
+
+       /**
+        * @param SwiftFileBackend $backend
+        * @param Closure $callback Function that takes (HTTP request array, status)
+        * @param array $httpOp MultiHttpClient op
+        */
+       public function __construct( SwiftFileBackend $backend, Closure $callback, array $httpOp ) {
+               $this->backend = $backend;
+               $this->callback = $callback;
+               $this->httpOp = $httpOp;
+       }
+}
+
+/**
+ * SwiftFileBackend helper class to page through listings.
+ * Swift also has a listing limit of 10,000 objects for sanity.
+ * Do not use this class from places outside SwiftFileBackend.
+ *
+ * @ingroup FileBackend
+ */
+abstract class SwiftFileBackendList implements Iterator {
+       /** @var array List of path or (path,stat array) entries */
+       protected $bufferIter = [];
+
+       /** @var string List items *after* this path */
+       protected $bufferAfter = null;
+
+       /** @var int */
+       protected $pos = 0;
+
+       /** @var array */
+       protected $params = [];
+
+       /** @var SwiftFileBackend */
+       protected $backend;
+
+       /** @var string Container name */
+       protected $container;
+
+       /** @var string Storage directory */
+       protected $dir;
+
+       /** @var int */
+       protected $suffixStart;
+
+       const PAGE_SIZE = 9000; // file listing buffer size
+
+       /**
+        * @param SwiftFileBackend $backend
+        * @param string $fullCont Resolved container name
+        * @param string $dir Resolved directory relative to container
+        * @param array $params
+        */
+       public function __construct( SwiftFileBackend $backend, $fullCont, $dir, array $params ) {
+               $this->backend = $backend;
+               $this->container = $fullCont;
+               $this->dir = $dir;
+               if ( substr( $this->dir, -1 ) === '/' ) {
+                       $this->dir = substr( $this->dir, 0, -1 ); // remove trailing slash
+               }
+               if ( $this->dir == '' ) { // whole container
+                       $this->suffixStart = 0;
+               } else { // dir within container
+                       $this->suffixStart = strlen( $this->dir ) + 1; // size of "path/to/dir/"
+               }
+               $this->params = $params;
+       }
+
+       /**
+        * @see Iterator::key()
+        * @return int
+        */
+       public function key() {
+               return $this->pos;
+       }
+
+       /**
+        * @see Iterator::next()
+        */
+       public function next() {
+               // Advance to the next file in the page
+               next( $this->bufferIter );
+               ++$this->pos;
+               // Check if there are no files left in this page and
+               // advance to the next page if this page was not empty.
+               if ( !$this->valid() && count( $this->bufferIter ) ) {
+                       $this->bufferIter = $this->pageFromList(
+                               $this->container, $this->dir, $this->bufferAfter, self::PAGE_SIZE, $this->params
+                       ); // updates $this->bufferAfter
+               }
+       }
+
+       /**
+        * @see Iterator::rewind()
+        */
+       public function rewind() {
+               $this->pos = 0;
+               $this->bufferAfter = null;
+               $this->bufferIter = $this->pageFromList(
+                       $this->container, $this->dir, $this->bufferAfter, self::PAGE_SIZE, $this->params
+               ); // updates $this->bufferAfter
+       }
+
+       /**
+        * @see Iterator::valid()
+        * @return bool
+        */
+       public function valid() {
+               if ( $this->bufferIter === null ) {
+                       return false; // some failure?
+               } else {
+                       return ( current( $this->bufferIter ) !== false ); // no paths can have this value
+               }
+       }
+
+       /**
+        * Get the given list portion (page)
+        *
+        * @param string $container Resolved container name
+        * @param string $dir Resolved path relative to container
+        * @param string $after
+        * @param int $limit
+        * @param array $params
+        * @return Traversable|array
+        */
+       abstract protected function pageFromList( $container, $dir, &$after, $limit, array $params );
+}
+
+/**
+ * Iterator for listing directories
+ */
+class SwiftFileBackendDirList extends SwiftFileBackendList {
+       /**
+        * @see Iterator::current()
+        * @return string|bool String (relative path) or false
+        */
+       public function current() {
+               return substr( current( $this->bufferIter ), $this->suffixStart, -1 );
+       }
+
+       protected function pageFromList( $container, $dir, &$after, $limit, array $params ) {
+               return $this->backend->getDirListPageInternal( $container, $dir, $after, $limit, $params );
+       }
+}
+
+/**
+ * Iterator for listing regular files
+ */
+class SwiftFileBackendFileList extends SwiftFileBackendList {
+       /**
+        * @see Iterator::current()
+        * @return string|bool String (relative path) or false
+        */
+       public function current() {
+               list( $path, $stat ) = current( $this->bufferIter );
+               $relPath = substr( $path, $this->suffixStart );
+               if ( is_array( $stat ) ) {
+                       $storageDir = rtrim( $this->params['dir'], '/' );
+                       $this->backend->loadListingStatInternal( "$storageDir/$relPath", $stat );
+               }
+
+               return $relPath;
+       }
+
+       protected function pageFromList( $container, $dir, &$after, $limit, array $params ) {
+               return $this->backend->getFileListPageInternal( $container, $dir, $after, $limit, $params );
+       }
+}
diff --git a/includes/libs/filebackend/filejournal/FileJournal.php b/includes/libs/filebackend/filejournal/FileJournal.php
new file mode 100644 (file)
index 0000000..116c303
--- /dev/null
@@ -0,0 +1,200 @@
+<?php
+/**
+ * @defgroup FileJournal File journal
+ * @ingroup FileBackend
+ */
+
+/**
+ * File operation journaling.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileJournal
+ * @author Aaron Schulz
+ */
+
+/**
+ * @brief Class for handling file operation journaling.
+ *
+ * Subclasses should avoid throwing exceptions at all costs.
+ *
+ * @ingroup FileJournal
+ * @since 1.20
+ */
+abstract class FileJournal {
+       /** @var string */
+       protected $backend;
+
+       /** @var int */
+       protected $ttlDays;
+
+       /**
+        * Construct a new instance from configuration.
+        *
+        * @param array $config Includes:
+        *     'ttlDays' : days to keep log entries around (false means "forever")
+        */
+       protected function __construct( array $config ) {
+               $this->ttlDays = isset( $config['ttlDays'] ) ? $config['ttlDays'] : false;
+       }
+
+       /**
+        * Create an appropriate FileJournal object from config
+        *
+        * @param array $config
+        * @param string $backend A registered file backend name
+        * @throws Exception
+        * @return FileJournal
+        */
+       final public static function factory( array $config, $backend ) {
+               $class = $config['class'];
+               $jrn = new $class( $config );
+               if ( !$jrn instanceof self ) {
+                       throw new InvalidArgumentException( "Class given is not an instance of FileJournal." );
+               }
+               $jrn->backend = $backend;
+
+               return $jrn;
+       }
+
+       /**
+        * Get a statistically unique ID string
+        *
+        * @return string <9 char TS_MW timestamp in base 36><22 random base 36 chars>
+        */
+       final public function getTimestampedUUID() {
+               $s = '';
+               for ( $i = 0; $i < 5; $i++ ) {
+                       $s .= mt_rand( 0, 2147483647 );
+               }
+               $s = Wikimedia\base_convert( sha1( $s ), 16, 36, 31 );
+
+               return substr( Wikimedia\base_convert( wfTimestamp( TS_MW ), 10, 36, 9 ) . $s, 0, 31 );
+       }
+
+       /**
+        * Log changes made by a batch file operation.
+        *
+        * @param array $entries List of file operations (each an array of parameters) which contain:
+        *     op      : Basic operation name (create, update, delete)
+        *     path    : The storage path of the file
+        *     newSha1 : The final base 36 SHA-1 of the file
+        *   Note that 'false' should be used as the SHA-1 for non-existing files.
+        * @param string $batchId UUID string that identifies the operation batch
+        * @return StatusValue
+        */
+       final public function logChangeBatch( array $entries, $batchId ) {
+               if ( !count( $entries ) ) {
+                       return StatusValue::newGood();
+               }
+
+               return $this->doLogChangeBatch( $entries, $batchId );
+       }
+
+       /**
+        * @see FileJournal::logChangeBatch()
+        *
+        * @param array $entries List of file operations (each an array of parameters)
+        * @param string $batchId UUID string that identifies the operation batch
+        * @return StatusValue
+        */
+       abstract protected function doLogChangeBatch( array $entries, $batchId );
+
+       /**
+        * Get the position ID of the latest journal entry
+        *
+        * @return int|bool
+        */
+       final public function getCurrentPosition() {
+               return $this->doGetCurrentPosition();
+       }
+
+       /**
+        * @see FileJournal::getCurrentPosition()
+        * @return int|bool
+        */
+       abstract protected function doGetCurrentPosition();
+
+       /**
+        * Get the position ID of the latest journal entry at some point in time
+        *
+        * @param int|string $time Timestamp
+        * @return int|bool
+        */
+       final public function getPositionAtTime( $time ) {
+               return $this->doGetPositionAtTime( $time );
+       }
+
+       /**
+        * @see FileJournal::getPositionAtTime()
+        * @param int|string $time Timestamp
+        * @return int|bool
+        */
+       abstract protected function doGetPositionAtTime( $time );
+
+       /**
+        * Get an array of file change log entries.
+        * A starting change ID and/or limit can be specified.
+        *
+        * @param int $start Starting change ID or null
+        * @param int $limit Maximum number of items to return
+        * @param string &$next Updated to the ID of the next entry.
+        * @return array List of associative arrays, each having:
+        *     id         : unique, monotonic, ID for this change
+        *     batch_uuid : UUID for an operation batch
+        *     backend    : the backend name
+        *     op         : primitive operation (create,update,delete,null)
+        *     path       : affected storage path
+        *     new_sha1   : base 36 sha1 of the new file had the operation succeeded
+        *     timestamp  : TS_MW timestamp of the batch change
+        *   Also, $next is updated to the ID of the next entry.
+        */
+       final public function getChangeEntries( $start = null, $limit = 0, &$next = null ) {
+               $entries = $this->doGetChangeEntries( $start, $limit ? $limit + 1 : 0 );
+               if ( $limit && count( $entries ) > $limit ) {
+                       $last = array_pop( $entries ); // remove the extra entry
+                       $next = $last['id']; // update for next call
+               } else {
+                       $next = null; // end of list
+               }
+
+               return $entries;
+       }
+
+       /**
+        * @see FileJournal::getChangeEntries()
+        * @param int $start
+        * @param int $limit
+        * @return array
+        */
+       abstract protected function doGetChangeEntries( $start, $limit );
+
+       /**
+        * Purge any old log entries
+        *
+        * @return StatusValue
+        */
+       final public function purgeOldLogs() {
+               return $this->doPurgeOldLogs();
+       }
+
+       /**
+        * @see FileJournal::purgeOldLogs()
+        * @return StatusValue
+        */
+       abstract protected function doPurgeOldLogs();
+}
diff --git a/includes/libs/filebackend/filejournal/NullFileJournal.php b/includes/libs/filebackend/filejournal/NullFileJournal.php
new file mode 100644 (file)
index 0000000..8d472ab
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Simple version of FileJournal that does nothing
+ * @since 1.20
+ */
+class NullFileJournal extends FileJournal {
+       /**
+        * @see FileJournal::doLogChangeBatch()
+        * @param array $entries
+        * @param string $batchId
+        * @return StatusValue
+        */
+       protected function doLogChangeBatch( array $entries, $batchId ) {
+               return StatusValue::newGood();
+       }
+
+       /**
+        * @see FileJournal::doGetCurrentPosition()
+        * @return int|bool
+        */
+       protected function doGetCurrentPosition() {
+               return false;
+       }
+
+       /**
+        * @see FileJournal::doGetPositionAtTime()
+        * @param int|string $time Timestamp
+        * @return int|bool
+        */
+       protected function doGetPositionAtTime( $time ) {
+               return false;
+       }
+
+       /**
+        * @see FileJournal::doGetChangeEntries()
+        * @param int $start
+        * @param int $limit
+        * @return array
+        */
+       protected function doGetChangeEntries( $start, $limit ) {
+               return [];
+       }
+
+       /**
+        * @see FileJournal::doPurgeOldLogs()
+        * @return StatusValue
+        */
+       protected function doPurgeOldLogs() {
+               return StatusValue::newGood();
+       }
+}
diff --git a/includes/libs/filebackend/fileop/CopyFileOp.php b/includes/libs/filebackend/fileop/CopyFileOp.php
new file mode 100644 (file)
index 0000000..e3b8c51
--- /dev/null
@@ -0,0 +1,97 @@
+<?php
+/**
+ * Helper class for representing operations with transaction support.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * Copy a file from one storage path to another in the backend.
+ * Parameters for this operation are outlined in FileBackend::doOperations().
+ */
+class CopyFileOp extends FileOp {
+       protected function allowedParams() {
+               return [
+                       [ 'src', 'dst' ],
+                       [ 'overwrite', 'overwriteSame', 'ignoreMissingSource', 'headers' ],
+                       [ 'src', 'dst' ]
+               ];
+       }
+
+       protected function doPrecheck( array &$predicates ) {
+               $status = StatusValue::newGood();
+               // Check if the source file exists
+               if ( !$this->fileExists( $this->params['src'], $predicates ) ) {
+                       if ( $this->getParam( 'ignoreMissingSource' ) ) {
+                               $this->doOperation = false; // no-op
+                               // Update file existence predicates (cache 404s)
+                               $predicates['exists'][$this->params['src']] = false;
+                               $predicates['sha1'][$this->params['src']] = false;
+
+                               return $status; // nothing to do
+                       } else {
+                               $status->fatal( 'backend-fail-notexists', $this->params['src'] );
+
+                               return $status;
+                       }
+                       // Check if a file can be placed/changed at the destination
+               } elseif ( !$this->backend->isPathUsableInternal( $this->params['dst'] ) ) {
+                       $status->fatal( 'backend-fail-usable', $this->params['dst'] );
+                       $status->fatal( 'backend-fail-copy', $this->params['src'], $this->params['dst'] );
+
+                       return $status;
+               }
+               // Check if destination file exists
+               $status->merge( $this->precheckDestExistence( $predicates ) );
+               $this->params['dstExists'] = $this->destExists; // see FileBackendStore::setFileCache()
+               if ( $status->isOK() ) {
+                       // Update file existence predicates
+                       $predicates['exists'][$this->params['dst']] = true;
+                       $predicates['sha1'][$this->params['dst']] = $this->sourceSha1;
+               }
+
+               return $status; // safe to call attempt()
+       }
+
+       protected function doAttempt() {
+               if ( $this->overwriteSameCase ) {
+                       $status = StatusValue::newGood(); // nothing to do
+               } elseif ( $this->params['src'] === $this->params['dst'] ) {
+                       // Just update the destination file headers
+                       $headers = $this->getParam( 'headers' ) ?: [];
+                       $status = $this->backend->describeInternal( $this->setFlags( [
+                               'src' => $this->params['dst'], 'headers' => $headers
+                       ] ) );
+               } else {
+                       // Copy the file to the destination
+                       $status = $this->backend->copyInternal( $this->setFlags( $this->params ) );
+               }
+
+               return $status;
+       }
+
+       public function storagePathsRead() {
+               return [ $this->params['src'] ];
+       }
+
+       public function storagePathsChanged() {
+               return [ $this->params['dst'] ];
+       }
+}
diff --git a/includes/libs/filebackend/fileop/CreateFileOp.php b/includes/libs/filebackend/fileop/CreateFileOp.php
new file mode 100644 (file)
index 0000000..120ca2b
--- /dev/null
@@ -0,0 +1,80 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * Create a file in the backend with the given content.
+ * Parameters for this operation are outlined in FileBackend::doOperations().
+ */
+class CreateFileOp extends FileOp {
+       protected function allowedParams() {
+               return [
+                       [ 'content', 'dst' ],
+                       [ 'overwrite', 'overwriteSame', 'headers' ],
+                       [ 'dst' ]
+               ];
+       }
+
+       protected function doPrecheck( array &$predicates ) {
+               $status = StatusValue::newGood();
+               // Check if the source data is too big
+               if ( strlen( $this->getParam( 'content' ) ) > $this->backend->maxFileSizeInternal() ) {
+                       $status->fatal( 'backend-fail-maxsize',
+                               $this->params['dst'], $this->backend->maxFileSizeInternal() );
+                       $status->fatal( 'backend-fail-create', $this->params['dst'] );
+
+                       return $status;
+                       // Check if a file can be placed/changed at the destination
+               } elseif ( !$this->backend->isPathUsableInternal( $this->params['dst'] ) ) {
+                       $status->fatal( 'backend-fail-usable', $this->params['dst'] );
+                       $status->fatal( 'backend-fail-create', $this->params['dst'] );
+
+                       return $status;
+               }
+               // Check if destination file exists
+               $status->merge( $this->precheckDestExistence( $predicates ) );
+               $this->params['dstExists'] = $this->destExists; // see FileBackendStore::setFileCache()
+               if ( $status->isOK() ) {
+                       // Update file existence predicates
+                       $predicates['exists'][$this->params['dst']] = true;
+                       $predicates['sha1'][$this->params['dst']] = $this->sourceSha1;
+               }
+
+               return $status; // safe to call attempt()
+       }
+
+       protected function doAttempt() {
+               if ( !$this->overwriteSameCase ) {
+                       // Create the file at the destination
+                       return $this->backend->createInternal( $this->setFlags( $this->params ) );
+               }
+
+               return StatusValue::newGood();
+       }
+
+       protected function getSourceSha1Base36() {
+               return Wikimedia\base_convert( sha1( $this->params['content'] ), 16, 36, 31 );
+       }
+
+       public function storagePathsChanged() {
+               return [ $this->params['dst'] ];
+       }
+}
diff --git a/includes/libs/filebackend/fileop/DeleteFileOp.php b/includes/libs/filebackend/fileop/DeleteFileOp.php
new file mode 100644 (file)
index 0000000..0ccb1e3
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+/**
+* Helper class for representing operations with transaction support.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License along
+* with this program; if not, write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+* http://www.gnu.org/copyleft/gpl.html
+*
+* @file
+* @ingroup FileBackend
+* @author Aaron Schulz
+*/
+
+/**
+ * Delete a file at the given storage path from the backend.
+ * Parameters for this operation are outlined in FileBackend::doOperations().
+ */
+class DeleteFileOp extends FileOp {
+       protected function allowedParams() {
+               return [ [ 'src' ], [ 'ignoreMissingSource' ], [ 'src' ] ];
+       }
+
+       protected function doPrecheck( array &$predicates ) {
+               $status = StatusValue::newGood();
+               // Check if the source file exists
+               if ( !$this->fileExists( $this->params['src'], $predicates ) ) {
+                       if ( $this->getParam( 'ignoreMissingSource' ) ) {
+                               $this->doOperation = false; // no-op
+                               // Update file existence predicates (cache 404s)
+                               $predicates['exists'][$this->params['src']] = false;
+                               $predicates['sha1'][$this->params['src']] = false;
+
+                               return $status; // nothing to do
+                       } else {
+                               $status->fatal( 'backend-fail-notexists', $this->params['src'] );
+
+                               return $status;
+                       }
+                       // Check if a file can be placed/changed at the source
+               } elseif ( !$this->backend->isPathUsableInternal( $this->params['src'] ) ) {
+                       $status->fatal( 'backend-fail-usable', $this->params['src'] );
+                       $status->fatal( 'backend-fail-delete', $this->params['src'] );
+
+                       return $status;
+               }
+               // Update file existence predicates
+               $predicates['exists'][$this->params['src']] = false;
+               $predicates['sha1'][$this->params['src']] = false;
+
+               return $status; // safe to call attempt()
+       }
+
+       protected function doAttempt() {
+               // Delete the source file
+               return $this->backend->deleteInternal( $this->setFlags( $this->params ) );
+       }
+
+       public function storagePathsChanged() {
+               return [ $this->params['src'] ];
+       }
+}
diff --git a/includes/libs/filebackend/fileop/DescribeFileOp.php b/includes/libs/filebackend/fileop/DescribeFileOp.php
new file mode 100644 (file)
index 0000000..9b53222
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Helper class for representing operations with transaction support.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * Change metadata for a file at the given storage path in the backend.
+ * Parameters for this operation are outlined in FileBackend::doOperations().
+ */
+class DescribeFileOp extends FileOp {
+       protected function allowedParams() {
+               return [ [ 'src' ], [ 'headers' ], [ 'src' ] ];
+       }
+
+       protected function doPrecheck( array &$predicates ) {
+               $status = StatusValue::newGood();
+               // Check if the source file exists
+               if ( !$this->fileExists( $this->params['src'], $predicates ) ) {
+                       $status->fatal( 'backend-fail-notexists', $this->params['src'] );
+
+                       return $status;
+                       // Check if a file can be placed/changed at the source
+               } elseif ( !$this->backend->isPathUsableInternal( $this->params['src'] ) ) {
+                       $status->fatal( 'backend-fail-usable', $this->params['src'] );
+                       $status->fatal( 'backend-fail-describe', $this->params['src'] );
+
+                       return $status;
+               }
+               // Update file existence predicates
+               $predicates['exists'][$this->params['src']] =
+                       $this->fileExists( $this->params['src'], $predicates );
+               $predicates['sha1'][$this->params['src']] =
+                       $this->fileSha1( $this->params['src'], $predicates );
+
+               return $status; // safe to call attempt()
+       }
+
+       protected function doAttempt() {
+               // Update the source file's metadata
+               return $this->backend->describeInternal( $this->setFlags( $this->params ) );
+       }
+
+       public function storagePathsChanged() {
+               return [ $this->params['src'] ];
+       }
+}
diff --git a/includes/libs/filebackend/fileop/FileOp.php b/includes/libs/filebackend/fileop/FileOp.php
new file mode 100644 (file)
index 0000000..fab5a37
--- /dev/null
@@ -0,0 +1,470 @@
+<?php
+/**
+ * Helper class for representing operations with transaction support.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+use Psr\Log\LoggerInterface;
+
+/**
+ * FileBackend helper class for representing operations.
+ * Do not use this class from places outside FileBackend.
+ *
+ * Methods called from FileOpBatch::attempt() should avoid throwing
+ * exceptions at all costs. FileOp objects should be lightweight in order
+ * to support large arrays in memory and serialization.
+ *
+ * @ingroup FileBackend
+ * @since 1.19
+ */
+abstract class FileOp {
+       /** @var array */
+       protected $params = [];
+
+       /** @var FileBackendStore */
+       protected $backend;
+       /** @var LoggerInterface */
+       protected $logger;
+
+       /** @var int */
+       protected $state = self::STATE_NEW;
+
+       /** @var bool */
+       protected $failed = false;
+
+       /** @var bool */
+       protected $async = false;
+
+       /** @var string */
+       protected $batchId;
+
+       /** @var bool Operation is not a no-op */
+       protected $doOperation = true;
+
+       /** @var string */
+       protected $sourceSha1;
+
+       /** @var bool */
+       protected $overwriteSameCase;
+
+       /** @var bool */
+       protected $destExists;
+
+       /* Object life-cycle */
+       const STATE_NEW = 1;
+       const STATE_CHECKED = 2;
+       const STATE_ATTEMPTED = 3;
+
+       /**
+        * Build a new batch file operation transaction
+        *
+        * @param FileBackendStore $backend
+        * @param array $params
+        * @param LoggerInterface $logger PSR logger instance
+        * @throws FileBackendError
+        */
+       final public function __construct(
+               FileBackendStore $backend, array $params, LoggerInterface $logger
+       ) {
+               $this->backend = $backend;
+               $this->logger = $logger;
+               list( $required, $optional, $paths ) = $this->allowedParams();
+               foreach ( $required as $name ) {
+                       if ( isset( $params[$name] ) ) {
+                               $this->params[$name] = $params[$name];
+                       } else {
+                               throw new InvalidArgumentException( "File operation missing parameter '$name'." );
+                       }
+               }
+               foreach ( $optional as $name ) {
+                       if ( isset( $params[$name] ) ) {
+                               $this->params[$name] = $params[$name];
+                       }
+               }
+               foreach ( $paths as $name ) {
+                       if ( isset( $this->params[$name] ) ) {
+                               // Normalize paths so the paths to the same file have the same string
+                               $this->params[$name] = self::normalizeIfValidStoragePath( $this->params[$name] );
+                       }
+               }
+       }
+
+       /**
+        * Normalize a string if it is a valid storage path
+        *
+        * @param string $path
+        * @return string
+        */
+       protected static function normalizeIfValidStoragePath( $path ) {
+               if ( FileBackend::isStoragePath( $path ) ) {
+                       $res = FileBackend::normalizeStoragePath( $path );
+
+                       return ( $res !== null ) ? $res : $path;
+               }
+
+               return $path;
+       }
+
+       /**
+        * Set the batch UUID this operation belongs to
+        *
+        * @param string $batchId
+        */
+       final public function setBatchId( $batchId ) {
+               $this->batchId = $batchId;
+       }
+
+       /**
+        * Get the value of the parameter with the given name
+        *
+        * @param string $name
+        * @return mixed Returns null if the parameter is not set
+        */
+       final public function getParam( $name ) {
+               return isset( $this->params[$name] ) ? $this->params[$name] : null;
+       }
+
+       /**
+        * Check if this operation failed precheck() or attempt()
+        *
+        * @return bool
+        */
+       final public function failed() {
+               return $this->failed;
+       }
+
+       /**
+        * Get a new empty predicates array for precheck()
+        *
+        * @return array
+        */
+       final public static function newPredicates() {
+               return [ 'exists' => [], 'sha1' => [] ];
+       }
+
+       /**
+        * Get a new empty dependency tracking array for paths read/written to
+        *
+        * @return array
+        */
+       final public static function newDependencies() {
+               return [ 'read' => [], 'write' => [] ];
+       }
+
+       /**
+        * Update a dependency tracking array to account for this operation
+        *
+        * @param array $deps Prior path reads/writes; format of FileOp::newPredicates()
+        * @return array
+        */
+       final public function applyDependencies( array $deps ) {
+               $deps['read'] += array_fill_keys( $this->storagePathsRead(), 1 );
+               $deps['write'] += array_fill_keys( $this->storagePathsChanged(), 1 );
+
+               return $deps;
+       }
+
+       /**
+        * Check if this operation changes files listed in $paths
+        *
+        * @param array $deps Prior path reads/writes; format of FileOp::newPredicates()
+        * @return bool
+        */
+       final public function dependsOn( array $deps ) {
+               foreach ( $this->storagePathsChanged() as $path ) {
+                       if ( isset( $deps['read'][$path] ) || isset( $deps['write'][$path] ) ) {
+                               return true; // "output" or "anti" dependency
+                       }
+               }
+               foreach ( $this->storagePathsRead() as $path ) {
+                       if ( isset( $deps['write'][$path] ) ) {
+                               return true; // "flow" dependency
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Get the file journal entries for this file operation
+        *
+        * @param array $oPredicates Pre-op info about files (format of FileOp::newPredicates)
+        * @param array $nPredicates Post-op info about files (format of FileOp::newPredicates)
+        * @return array
+        */
+       final public function getJournalEntries( array $oPredicates, array $nPredicates ) {
+               if ( !$this->doOperation ) {
+                       return []; // this is a no-op
+               }
+               $nullEntries = [];
+               $updateEntries = [];
+               $deleteEntries = [];
+               $pathsUsed = array_merge( $this->storagePathsRead(), $this->storagePathsChanged() );
+               foreach ( array_unique( $pathsUsed ) as $path ) {
+                       $nullEntries[] = [ // assertion for recovery
+                               'op' => 'null',
+                               'path' => $path,
+                               'newSha1' => $this->fileSha1( $path, $oPredicates )
+                       ];
+               }
+               foreach ( $this->storagePathsChanged() as $path ) {
+                       if ( $nPredicates['sha1'][$path] === false ) { // deleted
+                               $deleteEntries[] = [
+                                       'op' => 'delete',
+                                       'path' => $path,
+                                       'newSha1' => ''
+                               ];
+                       } else { // created/updated
+                               $updateEntries[] = [
+                                       'op' => $this->fileExists( $path, $oPredicates ) ? 'update' : 'create',
+                                       'path' => $path,
+                                       'newSha1' => $nPredicates['sha1'][$path]
+                               ];
+                       }
+               }
+
+               return array_merge( $nullEntries, $updateEntries, $deleteEntries );
+       }
+
+       /**
+        * Check preconditions of the operation without writing anything.
+        * This must update $predicates for each path that the op can change
+        * except when a failing StatusValue object is returned.
+        *
+        * @param array $predicates
+        * @return StatusValue
+        */
+       final public function precheck( array &$predicates ) {
+               if ( $this->state !== self::STATE_NEW ) {
+                       return StatusValue::newFatal( 'fileop-fail-state', self::STATE_NEW, $this->state );
+               }
+               $this->state = self::STATE_CHECKED;
+               $status = $this->doPrecheck( $predicates );
+               if ( !$status->isOK() ) {
+                       $this->failed = true;
+               }
+
+               return $status;
+       }
+
+       /**
+        * @param array $predicates
+        * @return StatusValue
+        */
+       protected function doPrecheck( array &$predicates ) {
+               return StatusValue::newGood();
+       }
+
+       /**
+        * Attempt the operation
+        *
+        * @return StatusValue
+        */
+       final public function attempt() {
+               if ( $this->state !== self::STATE_CHECKED ) {
+                       return StatusValue::newFatal( 'fileop-fail-state', self::STATE_CHECKED, $this->state );
+               } elseif ( $this->failed ) { // failed precheck
+                       return StatusValue::newFatal( 'fileop-fail-attempt-precheck' );
+               }
+               $this->state = self::STATE_ATTEMPTED;
+               if ( $this->doOperation ) {
+                       $status = $this->doAttempt();
+                       if ( !$status->isOK() ) {
+                               $this->failed = true;
+                               $this->logFailure( 'attempt' );
+                       }
+               } else { // no-op
+                       $status = StatusValue::newGood();
+               }
+
+               return $status;
+       }
+
+       /**
+        * @return StatusValue
+        */
+       protected function doAttempt() {
+               return StatusValue::newGood();
+       }
+
+       /**
+        * Attempt the operation in the background
+        *
+        * @return StatusValue
+        */
+       final public function attemptAsync() {
+               $this->async = true;
+               $result = $this->attempt();
+               $this->async = false;
+
+               return $result;
+       }
+
+       /**
+        * Get the file operation parameters
+        *
+        * @return array (required params list, optional params list, list of params that are paths)
+        */
+       protected function allowedParams() {
+               return [ [], [], [] ];
+       }
+
+       /**
+        * Adjust params to FileBackendStore internal file calls
+        *
+        * @param array $params
+        * @return array (required params list, optional params list)
+        */
+       protected function setFlags( array $params ) {
+               return [ 'async' => $this->async ] + $params;
+       }
+
+       /**
+        * Get a list of storage paths read from for this operation
+        *
+        * @return array
+        */
+       public function storagePathsRead() {
+               return [];
+       }
+
+       /**
+        * Get a list of storage paths written to for this operation
+        *
+        * @return array
+        */
+       public function storagePathsChanged() {
+               return [];
+       }
+
+       /**
+        * Check for errors with regards to the destination file already existing.
+        * Also set the destExists, overwriteSameCase and sourceSha1 member variables.
+        * A bad StatusValue will be returned if there is no chance it can be overwritten.
+        *
+        * @param array $predicates
+        * @return StatusValue
+        */
+       protected function precheckDestExistence( array $predicates ) {
+               $status = StatusValue::newGood();
+               // Get hash of source file/string and the destination file
+               $this->sourceSha1 = $this->getSourceSha1Base36(); // FS file or data string
+               if ( $this->sourceSha1 === null ) { // file in storage?
+                       $this->sourceSha1 = $this->fileSha1( $this->params['src'], $predicates );
+               }
+               $this->overwriteSameCase = false;
+               $this->destExists = $this->fileExists( $this->params['dst'], $predicates );
+               if ( $this->destExists ) {
+                       if ( $this->getParam( 'overwrite' ) ) {
+                               return $status; // OK
+                       } elseif ( $this->getParam( 'overwriteSame' ) ) {
+                               $dhash = $this->fileSha1( $this->params['dst'], $predicates );
+                               // Check if hashes are valid and match each other...
+                               if ( !strlen( $this->sourceSha1 ) || !strlen( $dhash ) ) {
+                                       $status->fatal( 'backend-fail-hashes' );
+                               } elseif ( $this->sourceSha1 !== $dhash ) {
+                                       // Give an error if the files are not identical
+                                       $status->fatal( 'backend-fail-notsame', $this->params['dst'] );
+                               } else {
+                                       $this->overwriteSameCase = true; // OK
+                               }
+
+                               return $status; // do nothing; either OK or bad status
+                       } else {
+                               $status->fatal( 'backend-fail-alreadyexists', $this->params['dst'] );
+
+                               return $status;
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * precheckDestExistence() helper function to get the source file SHA-1.
+        * Subclasses should overwride this if the source is not in storage.
+        *
+        * @return string|bool Returns false on failure
+        */
+       protected function getSourceSha1Base36() {
+               return null; // N/A
+       }
+
+       /**
+        * Check if a file will exist in storage when this operation is attempted
+        *
+        * @param string $source Storage path
+        * @param array $predicates
+        * @return bool
+        */
+       final protected function fileExists( $source, array $predicates ) {
+               if ( isset( $predicates['exists'][$source] ) ) {
+                       return $predicates['exists'][$source]; // previous op assures this
+               } else {
+                       $params = [ 'src' => $source, 'latest' => true ];
+
+                       return $this->backend->fileExists( $params );
+               }
+       }
+
+       /**
+        * Get the SHA-1 of a file in storage when this operation is attempted
+        *
+        * @param string $source Storage path
+        * @param array $predicates
+        * @return string|bool False on failure
+        */
+       final protected function fileSha1( $source, array $predicates ) {
+               if ( isset( $predicates['sha1'][$source] ) ) {
+                       return $predicates['sha1'][$source]; // previous op assures this
+               } elseif ( isset( $predicates['exists'][$source] ) && !$predicates['exists'][$source] ) {
+                       return false; // previous op assures this
+               } else {
+                       $params = [ 'src' => $source, 'latest' => true ];
+
+                       return $this->backend->getFileSha1Base36( $params );
+               }
+       }
+
+       /**
+        * Get the backend this operation is for
+        *
+        * @return FileBackendStore
+        */
+       public function getBackend() {
+               return $this->backend;
+       }
+
+       /**
+        * Log a file operation failure and preserve any temp files
+        *
+        * @param string $action
+        */
+       final public function logFailure( $action ) {
+               $params = $this->params;
+               $params['failedAction'] = $action;
+               try {
+                       $this->logger->error( get_class( $this ) .
+                               " failed (batch #{$this->batchId}): " . FormatJson::encode( $params ) );
+               } catch ( Exception $e ) {
+                       // bad config? debug log error?
+               }
+       }
+}
diff --git a/includes/libs/filebackend/fileop/MoveFileOp.php b/includes/libs/filebackend/fileop/MoveFileOp.php
new file mode 100644 (file)
index 0000000..fee3f4a
--- /dev/null
@@ -0,0 +1,107 @@
+<?php
+/**
+ * Helper class for representing operations with transaction support.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * Move a file from one storage path to another in the backend.
+ * Parameters for this operation are outlined in FileBackend::doOperations().
+ */
+class MoveFileOp extends FileOp {
+       protected function allowedParams() {
+               return [
+                       [ 'src', 'dst' ],
+                       [ 'overwrite', 'overwriteSame', 'ignoreMissingSource', 'headers' ],
+                       [ 'src', 'dst' ]
+               ];
+       }
+
+       protected function doPrecheck( array &$predicates ) {
+               $status = StatusValue::newGood();
+               // Check if the source file exists
+               if ( !$this->fileExists( $this->params['src'], $predicates ) ) {
+                       if ( $this->getParam( 'ignoreMissingSource' ) ) {
+                               $this->doOperation = false; // no-op
+                               // Update file existence predicates (cache 404s)
+                               $predicates['exists'][$this->params['src']] = false;
+                               $predicates['sha1'][$this->params['src']] = false;
+
+                               return $status; // nothing to do
+                       } else {
+                               $status->fatal( 'backend-fail-notexists', $this->params['src'] );
+
+                               return $status;
+                       }
+                       // Check if a file can be placed/changed at the destination
+               } elseif ( !$this->backend->isPathUsableInternal( $this->params['dst'] ) ) {
+                       $status->fatal( 'backend-fail-usable', $this->params['dst'] );
+                       $status->fatal( 'backend-fail-move', $this->params['src'], $this->params['dst'] );
+
+                       return $status;
+               }
+               // Check if destination file exists
+               $status->merge( $this->precheckDestExistence( $predicates ) );
+               $this->params['dstExists'] = $this->destExists; // see FileBackendStore::setFileCache()
+               if ( $status->isOK() ) {
+                       // Update file existence predicates
+                       $predicates['exists'][$this->params['src']] = false;
+                       $predicates['sha1'][$this->params['src']] = false;
+                       $predicates['exists'][$this->params['dst']] = true;
+                       $predicates['sha1'][$this->params['dst']] = $this->sourceSha1;
+               }
+
+               return $status; // safe to call attempt()
+       }
+
+       protected function doAttempt() {
+               if ( $this->overwriteSameCase ) {
+                       if ( $this->params['src'] === $this->params['dst'] ) {
+                               // Do nothing to the destination (which is also the source)
+                               $status = StatusValue::newGood();
+                       } else {
+                               // Just delete the source as the destination file needs no changes
+                               $status = $this->backend->deleteInternal( $this->setFlags(
+                                       [ 'src' => $this->params['src'] ]
+                               ) );
+                       }
+               } elseif ( $this->params['src'] === $this->params['dst'] ) {
+                       // Just update the destination file headers
+                       $headers = $this->getParam( 'headers' ) ?: [];
+                       $status = $this->backend->describeInternal( $this->setFlags(
+                               [ 'src' => $this->params['dst'], 'headers' => $headers ]
+                       ) );
+               } else {
+                       // Move the file to the destination
+                       $status = $this->backend->moveInternal( $this->setFlags( $this->params ) );
+               }
+
+               return $status;
+       }
+
+       public function storagePathsRead() {
+               return [ $this->params['src'] ];
+       }
+
+       public function storagePathsChanged() {
+               return [ $this->params['src'], $this->params['dst'] ];
+       }
+}
diff --git a/includes/libs/filebackend/fileop/NullFileOp.php b/includes/libs/filebackend/fileop/NullFileOp.php
new file mode 100644 (file)
index 0000000..ed23e81
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Helper class for representing operations with transaction support.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * Placeholder operation that has no params and does nothing
+ */
+class NullFileOp extends FileOp {
+}
diff --git a/includes/libs/filebackend/fileop/StoreFileOp.php b/includes/libs/filebackend/fileop/StoreFileOp.php
new file mode 100644 (file)
index 0000000..b97b410
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Helper class for representing operations with transaction support.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ * @author Aaron Schulz
+ */
+
+/**
+ * Store a file into the backend from a file on the file system.
+ * Parameters for this operation are outlined in FileBackend::doOperations().
+ */
+class StoreFileOp extends FileOp {
+       protected function allowedParams() {
+               return [
+                       [ 'src', 'dst' ],
+                       [ 'overwrite', 'overwriteSame', 'headers' ],
+                       [ 'src', 'dst' ]
+               ];
+       }
+
+       protected function doPrecheck( array &$predicates ) {
+               $status = StatusValue::newGood();
+               // Check if the source file exists on the file system
+               if ( !is_file( $this->params['src'] ) ) {
+                       $status->fatal( 'backend-fail-notexists', $this->params['src'] );
+
+                       return $status;
+                       // Check if the source file is too big
+               } elseif ( filesize( $this->params['src'] ) > $this->backend->maxFileSizeInternal() ) {
+                       $status->fatal( 'backend-fail-maxsize',
+                               $this->params['dst'], $this->backend->maxFileSizeInternal() );
+                       $status->fatal( 'backend-fail-store', $this->params['src'], $this->params['dst'] );
+
+                       return $status;
+                       // Check if a file can be placed/changed at the destination
+               } elseif ( !$this->backend->isPathUsableInternal( $this->params['dst'] ) ) {
+                       $status->fatal( 'backend-fail-usable', $this->params['dst'] );
+                       $status->fatal( 'backend-fail-store', $this->params['src'], $this->params['dst'] );
+
+                       return $status;
+               }
+               // Check if destination file exists
+               $status->merge( $this->precheckDestExistence( $predicates ) );
+               $this->params['dstExists'] = $this->destExists; // see FileBackendStore::setFileCache()
+               if ( $status->isOK() ) {
+                       // Update file existence predicates
+                       $predicates['exists'][$this->params['dst']] = true;
+                       $predicates['sha1'][$this->params['dst']] = $this->sourceSha1;
+               }
+
+               return $status; // safe to call attempt()
+       }
+
+       protected function doAttempt() {
+               if ( !$this->overwriteSameCase ) {
+                       // Store the file at the destination
+                       return $this->backend->storeInternal( $this->setFlags( $this->params ) );
+               }
+
+               return StatusValue::newGood();
+       }
+
+       protected function getSourceSha1Base36() {
+               MediaWiki\suppressWarnings();
+               $hash = sha1_file( $this->params['src'] );
+               MediaWiki\restoreWarnings();
+               if ( $hash !== false ) {
+                       $hash = Wikimedia\base_convert( $hash, 16, 36, 31 );
+               }
+
+               return $hash;
+       }
+
+       public function storagePathsChanged() {
+               return [ $this->params['dst'] ];
+       }
+}
diff --git a/includes/libs/filebackend/fsfile/FSFile.php b/includes/libs/filebackend/fsfile/FSFile.php
new file mode 100644 (file)
index 0000000..dacad1c
--- /dev/null
@@ -0,0 +1,223 @@
+<?php
+/**
+ * Non-directory file on the file system.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ */
+
+/**
+ * Class representing a non-directory file on the file system
+ *
+ * @ingroup FileBackend
+ */
+class FSFile {
+       /** @var string Path to file */
+       protected $path;
+
+       /** @var string File SHA-1 in base 36 */
+       protected $sha1Base36;
+
+       /**
+        * Sets up the file object
+        *
+        * @param string $path Path to temporary file on local disk
+        */
+       public function __construct( $path ) {
+               $this->path = $path;
+       }
+
+       /**
+        * Returns the file system path
+        *
+        * @return string
+        */
+       public function getPath() {
+               return $this->path;
+       }
+
+       /**
+        * Checks if the file exists
+        *
+        * @return bool
+        */
+       public function exists() {
+               return is_file( $this->path );
+       }
+
+       /**
+        * Get the file size in bytes
+        *
+        * @return int|bool
+        */
+       public function getSize() {
+               return filesize( $this->path );
+       }
+
+       /**
+        * Get the file's last-modified timestamp
+        *
+        * @return string|bool TS_MW timestamp or false on failure
+        */
+       public function getTimestamp() {
+               MediaWiki\suppressWarnings();
+               $timestamp = filemtime( $this->path );
+               MediaWiki\restoreWarnings();
+               if ( $timestamp !== false ) {
+                       $timestamp = wfTimestamp( TS_MW, $timestamp );
+               }
+
+               return $timestamp;
+       }
+
+       /**
+        * Get an associative array containing information about
+        * a file with the given storage path.
+        *
+        * Resulting array fields include:
+        *   - fileExists
+        *   - size (filesize in bytes)
+        *   - mime (as major/minor)
+        *   - file-mime (as major/minor)
+        *   - sha1 (in base 36)
+        *   - major_mime
+        *   - minor_mime
+        *
+        * @param string|bool $ext The file extension, or true to extract it from the filename.
+        *             Set it to false to ignore the extension. Currently unused.
+        * @return array
+        */
+       public function getProps( $ext = true ) {
+               $info = self::placeholderProps();
+               $info['fileExists'] = $this->exists();
+
+               if ( $info['fileExists'] ) {
+                       $info['size'] = $this->getSize(); // bytes
+                       $info['sha1'] = $this->getSha1Base36();
+
+                       $mime = mime_content_type( $this->path );
+                       # MIME type according to file contents
+                       $info['file-mime'] = ( $mime === false ) ? 'unknown/unknown' : $mime;
+                       # logical MIME type
+                       $info['mime'] = $mime;
+
+                       if ( strpos( $mime, '/' ) !== false ) {
+                               list( $info['major_mime'], $info['minor_mime'] ) = explode( '/', $mime, 2 );
+                       } else {
+                               list( $info['major_mime'], $info['minor_mime'] ) = [ $mime, 'unknown' ];
+                       }
+               }
+
+               return $info;
+       }
+
+       /**
+        * Placeholder file properties to use for files that don't exist
+        *
+        * Resulting array fields include:
+        *   - fileExists
+        *   - size (filesize in bytes)
+        *   - mime (as major/minor)
+        *   - file-mime (as major/minor)
+        *   - sha1 (in base 36)
+        *   - major_mime
+        *   - minor_mime
+        *
+        * @return array
+        */
+       public static function placeholderProps() {
+               $info = [];
+               $info['fileExists'] = false;
+               $info['size'] = 0;
+               $info['file-mime'] = null;
+               $info['major_mime'] = null;
+               $info['minor_mime'] = null;
+               $info['mime'] = null;
+               $info['sha1'] = '';
+
+               return $info;
+       }
+
+       /**
+        * Get a SHA-1 hash of a file in the local filesystem, in base-36 lower case
+        * encoding, zero padded to 31 digits.
+        *
+        * 160 log 2 / log 36 = 30.95, so the 160-bit hash fills 31 digits in base 36
+        * fairly neatly.
+        *
+        * @param bool $recache
+        * @return bool|string False on failure
+        */
+       public function getSha1Base36( $recache = false ) {
+               if ( $this->sha1Base36 !== null && !$recache ) {
+                       return $this->sha1Base36;
+               }
+
+               MediaWiki\suppressWarnings();
+               $this->sha1Base36 = sha1_file( $this->path );
+               MediaWiki\restoreWarnings();
+
+               if ( $this->sha1Base36 !== false ) {
+                       $this->sha1Base36 = Wikimedia\base_convert( $this->sha1Base36, 16, 36, 31 );
+               }
+
+               return $this->sha1Base36;
+       }
+
+       /**
+        * Get the final file extension from a file system path
+        *
+        * @param string $path
+        * @return string
+        */
+       public static function extensionFromPath( $path ) {
+               $i = strrpos( $path, '.' );
+
+               return strtolower( $i ? substr( $path, $i + 1 ) : '' );
+       }
+
+       /**
+        * Get an associative array containing information about a file in the local filesystem.
+        *
+        * @param string $path Absolute local filesystem path
+        * @param string|bool $ext The file extension, or true to extract it from the filename.
+        *   Set it to false to ignore the extension.
+        * @return array
+        */
+       public static function getPropsFromPath( $path, $ext = true ) {
+               $fsFile = new self( $path );
+
+               return $fsFile->getProps( $ext );
+       }
+
+       /**
+        * Get a SHA-1 hash of a file in the local filesystem, in base-36 lower case
+        * encoding, zero padded to 31 digits.
+        *
+        * 160 log 2 / log 36 = 30.95, so the 160-bit hash fills 31 digits in base 36
+        * fairly neatly.
+        *
+        * @param string $path
+        * @return bool|string False on failure
+        */
+       public static function getSha1Base36FromPath( $path ) {
+               $fsFile = new self( $path );
+
+               return $fsFile->getSha1Base36();
+       }
+}
diff --git a/includes/libs/filebackend/fsfile/TempFSFile.php b/includes/libs/filebackend/fsfile/TempFSFile.php
new file mode 100644 (file)
index 0000000..fed6812
--- /dev/null
@@ -0,0 +1,196 @@
+<?php
+/**
+ * Location holder of files stored temporarily
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup FileBackend
+ */
+
+/**
+ * This class is used to hold the location and do limited manipulation
+ * of files stored temporarily (this will be whatever wfTempDir() returns)
+ *
+ * @ingroup FileBackend
+ */
+class TempFSFile extends FSFile {
+       /** @var bool Garbage collect the temp file */
+       protected $canDelete = false;
+
+       /** @var array Map of (path => 1) for paths to delete on shutdown */
+       protected static $pathsCollect = null;
+
+       public function __construct( $path ) {
+               parent::__construct( $path );
+
+               if ( self::$pathsCollect === null ) {
+                       self::$pathsCollect = [];
+                       register_shutdown_function( [ __CLASS__, 'purgeAllOnShutdown' ] );
+               }
+       }
+
+       /**
+        * Make a new temporary file on the file system.
+        * Temporary files may be purged when the file object falls out of scope.
+        *
+        * @param string $prefix
+        * @param string $extension Optional file extension
+        * @param string|null $tmpDirectory Optional parent directory
+        * @return TempFSFile|null
+        */
+       public static function factory( $prefix, $extension = '', $tmpDirectory = null ) {
+               $ext = ( $extension != '' ) ? ".{$extension}" : '';
+
+               $attempts = 5;
+               while ( $attempts-- ) {
+                       $hex = sprintf( '%06x%06x', mt_rand( 0, 0xffffff ), mt_rand( 0, 0xffffff ) );
+                       if ( !is_string( $tmpDirectory ) ) {
+                               $tmpDirectory = self::getUsableTempDirectory();
+                       }
+                       $path = wfTempDir() . '/' . $prefix . $hex . $ext;
+                       MediaWiki\suppressWarnings();
+                       $newFileHandle = fopen( $path, 'x' );
+                       MediaWiki\restoreWarnings();
+                       if ( $newFileHandle ) {
+                               fclose( $newFileHandle );
+                               $tmpFile = new self( $path );
+                               $tmpFile->autocollect();
+                               // Safely instantiated, end loop.
+                               return $tmpFile;
+                       }
+               }
+
+               // Give up
+               return null;
+       }
+
+       /**
+        * @return string Filesystem path to a temporary directory
+        * @throws RuntimeException
+        */
+       public static function getUsableTempDirectory() {
+               $tmpDir = array_map( 'getenv', [ 'TMPDIR', 'TMP', 'TEMP' ] );
+               $tmpDir[] = sys_get_temp_dir();
+               $tmpDir[] = ini_get( 'upload_tmp_dir' );
+               foreach ( $tmpDir as $tmp ) {
+                       if ( $tmp != '' && is_dir( $tmp ) && is_writable( $tmp ) ) {
+                               return $tmp;
+                       }
+               }
+
+               // PHP on Windows will detect C:\Windows\Temp as not writable even though PHP can write to
+               // it so create a directory within that called 'mwtmp' with a suffix of the user running
+               // the current process.
+               // The user is included as if various scripts are run by different users they will likely
+               // not be able to access each others temporary files.
+               if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' ) {
+                       $tmp = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'mwtmp-' . get_current_user();
+                       if ( !file_exists( $tmp ) ) {
+                               mkdir( $tmp );
+                       }
+                       if ( is_dir( $tmp ) && is_writable( $tmp ) ) {
+                               return $tmp;
+                       }
+               }
+
+               throw new RuntimeException(
+                       'No writable temporary directory could be found. ' .
+                       'Please explicitly specify a writable directory in configuration.' );
+       }
+
+       /**
+        * Purge this file off the file system
+        *
+        * @return bool Success
+        */
+       public function purge() {
+               $this->canDelete = false; // done
+               MediaWiki\suppressWarnings();
+               $ok = unlink( $this->path );
+               MediaWiki\restoreWarnings();
+
+               unset( self::$pathsCollect[$this->path] );
+
+               return $ok;
+       }
+
+       /**
+        * Clean up the temporary file only after an object goes out of scope
+        *
+        * @param object $object
+        * @return TempFSFile This object
+        */
+       public function bind( $object ) {
+               if ( is_object( $object ) ) {
+                       if ( !isset( $object->tempFSFileReferences ) ) {
+                               // Init first since $object might use __get() and return only a copy variable
+                               $object->tempFSFileReferences = [];
+                       }
+                       $object->tempFSFileReferences[] = $this;
+               }
+
+               return $this;
+       }
+
+       /**
+        * Set flag to not clean up after the temporary file
+        *
+        * @return TempFSFile This object
+        */
+       public function preserve() {
+               $this->canDelete = false;
+
+               unset( self::$pathsCollect[$this->path] );
+
+               return $this;
+       }
+
+       /**
+        * Set flag clean up after the temporary file
+        *
+        * @return TempFSFile This object
+        */
+       public function autocollect() {
+               $this->canDelete = true;
+
+               self::$pathsCollect[$this->path] = 1;
+
+               return $this;
+       }
+
+       /**
+        * Try to make sure that all files are purged on error
+        *
+        * This method should only be called internally
+        */
+       public static function purgeAllOnShutdown() {
+               foreach ( self::$pathsCollect as $path ) {
+                       MediaWiki\suppressWarnings();
+                       unlink( $path );
+                       MediaWiki\restoreWarnings();
+               }
+       }
+
+       /**
+        * Cleans up after the temporary file by deleting it
+        */
+       function __destruct() {
+               if ( $this->canDelete ) {
+                       $this->purge();
+               }
+       }
+}
diff --git a/includes/libs/iterators/IteratorDecorator.php b/includes/libs/iterators/IteratorDecorator.php
new file mode 100644 (file)
index 0000000..c1b5020
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Allows extending classes to decorate an Iterator with
+ * reduced boilerplate.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+abstract class IteratorDecorator implements Iterator {
+       protected $iterator;
+
+       public function __construct( Iterator $iterator ) {
+               $this->iterator = $iterator;
+       }
+
+       public function current() {
+               return $this->iterator->current();
+       }
+
+       public function key() {
+               return $this->iterator->key();
+       }
+
+       public function next() {
+               $this->iterator->next();
+       }
+
+       public function rewind() {
+               $this->iterator->rewind();
+       }
+
+       public function valid() {
+               return $this->iterator->valid();
+       }
+}
diff --git a/includes/libs/iterators/NotRecursiveIterator.php b/includes/libs/iterators/NotRecursiveIterator.php
new file mode 100644 (file)
index 0000000..52ca61b
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Wraps a non-recursive iterator with methods to be recursive
+ * without children.
+ *
+ * Alternatively wraps a recursive iterator to prevent recursing deeper
+ * than the wrapped iterator.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+class NotRecursiveIterator extends IteratorDecorator implements RecursiveIterator {
+       public function hasChildren() {
+               return false;
+       }
+
+       public function getChildren() {
+               return null;
+       }
+}
diff --git a/includes/libs/lockmanager/DBLockManager.php b/includes/libs/lockmanager/DBLockManager.php
new file mode 100644 (file)
index 0000000..b17b1a0
--- /dev/null
@@ -0,0 +1,227 @@
+<?php
+/**
+ * Version of LockManager based on using DB table locks.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup LockManager
+ */
+
+/**
+ * Version of LockManager based on using named/row DB locks.
+ *
+ * This is meant for multi-wiki systems that may share files.
+ *
+ * All lock requests for a resource, identified by a hash string, will map to one bucket.
+ * Each bucket maps to one or several peer DBs, each on their own server.
+ * A majority of peer DBs must agree for a lock to be acquired.
+ *
+ * Caching is used to avoid hitting servers that are down.
+ *
+ * @ingroup LockManager
+ * @since 1.19
+ */
+abstract class DBLockManager extends QuorumLockManager {
+       /** @var array[]|IDatabase[] Map of (DB names => server config or IDatabase) */
+       protected $dbServers; // (DB name => server config array)
+       /** @var BagOStuff */
+       protected $statusCache;
+
+       protected $lockExpiry; // integer number of seconds
+       protected $safeDelay; // integer number of seconds
+       /** @var IDatabase[] Map Database connections (DB name => Database) */
+       protected $conns = [];
+
+       /**
+        * Construct a new instance from configuration.
+        *
+        * @param array $config Parameters include:
+        *   - dbServers   : Associative array of DB names to server configuration.
+        *                   Configuration is an associative array that includes:
+        *                     - host        : DB server name
+        *                     - dbname      : DB name
+        *                     - type        : DB type (mysql,postgres,...)
+        *                     - user        : DB user
+        *                     - password    : DB user password
+        *                     - tablePrefix : DB table prefix
+        *                     - flags       : DB flags; bitfield of IDatabase::DBO_* constants
+        *   - dbsByBucket : Array of 1-16 consecutive integer keys, starting from 0,
+        *                   each having an odd-numbered list of DB names (peers) as values.
+        *   - lockExpiry  : Lock timeout (seconds) for dropped connections. [optional]
+        *                   This tells the DB server how long to wait before assuming
+        *                   connection failure and releasing all the locks for a session.
+        *   - srvCache    : A BagOStuff instance using APC or the like.
+        */
+       public function __construct( array $config ) {
+               parent::__construct( $config );
+
+               $this->dbServers = $config['dbServers'];
+               // Sanitize srvsByBucket config to prevent PHP errors
+               $this->srvsByBucket = array_filter( $config['dbsByBucket'], 'is_array' );
+               $this->srvsByBucket = array_values( $this->srvsByBucket ); // consecutive
+
+               if ( isset( $config['lockExpiry'] ) ) {
+                       $this->lockExpiry = $config['lockExpiry'];
+               } else {
+                       $met = ini_get( 'max_execution_time' );
+                       $this->lockExpiry = $met ? $met : 60; // use some sane amount if 0
+               }
+               $this->safeDelay = ( $this->lockExpiry <= 0 )
+                       ? 60 // pick a safe-ish number to match DB timeout default
+                       : $this->lockExpiry; // cover worst case
+
+               // Tracks peers that couldn't be queried recently to avoid lengthy
+               // connection timeouts. This is useless if each bucket has one peer.
+               $this->statusCache = isset( $config['srvCache'] )
+                       ? $config['srvCache']
+                       : new HashBagOStuff();
+       }
+
+       /**
+        * @TODO change this code to work in one batch
+        * @param string $lockSrv
+        * @param array $pathsByType
+        * @return StatusValue
+        */
+       protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
+               $status = StatusValue::newGood();
+               foreach ( $pathsByType as $type => $paths ) {
+                       $status->merge( $this->doGetLocksOnServer( $lockSrv, $paths, $type ) );
+               }
+
+               return $status;
+       }
+
+       abstract protected function doGetLocksOnServer( $lockSrv, array $paths, $type );
+
+       protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
+               return StatusValue::newGood();
+       }
+
+       /**
+        * @see QuorumLockManager::isServerUp()
+        * @param string $lockSrv
+        * @return bool
+        */
+       protected function isServerUp( $lockSrv ) {
+               if ( !$this->cacheCheckFailures( $lockSrv ) ) {
+                       return false; // recent failure to connect
+               }
+               try {
+                       $this->getConnection( $lockSrv );
+               } catch ( DBError $e ) {
+                       $this->cacheRecordFailure( $lockSrv );
+
+                       return false; // failed to connect
+               }
+
+               return true;
+       }
+
+       /**
+        * Get (or reuse) a connection to a lock DB
+        *
+        * @param string $lockDb
+        * @return IDatabase
+        * @throws DBError
+        * @throws UnexpectedValueException
+        */
+       protected function getConnection( $lockDb ) {
+               if ( !isset( $this->conns[$lockDb] ) ) {
+                       if ( $this->dbServers[$lockDb] instanceof IDatabase ) {
+                               // Direct injected connection hande for $lockDB
+                               $db = $this->dbServers[$lockDb];
+                       } elseif ( is_array( $this->dbServers[$lockDb] ) ) {
+                               // Parameters to construct a new database connection
+                               $config = $this->dbServers[$lockDb];
+                               $db = Database::factory( $config['type'], $config );
+                       } else {
+                               throw new UnexpectedValueException( "No server called '$lockDb'." );
+                       }
+
+                       $db->clearFlag( DBO_TRX );
+                       # If the connection drops, try to avoid letting the DB rollback
+                       # and release the locks before the file operations are finished.
+                       # This won't handle the case of DB server restarts however.
+                       $options = [];
+                       if ( $this->lockExpiry > 0 ) {
+                               $options['connTimeout'] = $this->lockExpiry;
+                       }
+                       $db->setSessionOptions( $options );
+                       $this->initConnection( $lockDb, $db );
+
+                       $this->conns[$lockDb] = $db;
+               }
+
+               return $this->conns[$lockDb];
+       }
+
+       /**
+        * Do additional initialization for new lock DB connection
+        *
+        * @param string $lockDb
+        * @param IDatabase $db
+        * @throws DBError
+        */
+       protected function initConnection( $lockDb, IDatabase $db ) {
+       }
+
+       /**
+        * Checks if the DB has not recently had connection/query errors.
+        * This just avoids wasting time on doomed connection attempts.
+        *
+        * @param string $lockDb
+        * @return bool
+        */
+       protected function cacheCheckFailures( $lockDb ) {
+               return ( $this->safeDelay > 0 )
+                       ? !$this->statusCache->get( $this->getMissKey( $lockDb ) )
+                       : true;
+       }
+
+       /**
+        * Log a lock request failure to the cache
+        *
+        * @param string $lockDb
+        * @return bool Success
+        */
+       protected function cacheRecordFailure( $lockDb ) {
+               return ( $this->safeDelay > 0 )
+                       ? $this->statusCache->set( $this->getMissKey( $lockDb ), 1, $this->safeDelay )
+                       : true;
+       }
+
+       /**
+        * Get a cache key for recent query misses for a DB
+        *
+        * @param string $lockDb
+        * @return string
+        */
+       protected function getMissKey( $lockDb ) {
+               return 'dblockmanager:downservers:' . str_replace( ' ', '_', $lockDb );
+       }
+
+       /**
+        * Make sure remaining locks get cleared for sanity
+        */
+       function __destruct() {
+               $this->releaseAllLocks();
+               foreach ( $this->conns as $db ) {
+                       $db->close();
+               }
+       }
+}
diff --git a/includes/libs/lockmanager/FSLockManager.php b/includes/libs/lockmanager/FSLockManager.php
new file mode 100644 (file)
index 0000000..7f33a0a
--- /dev/null
@@ -0,0 +1,253 @@
+<?php
+/**
+ * Simple version of LockManager based on using FS lock files.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup LockManager
+ */
+
+/**
+ * Simple version of LockManager based on using FS lock files.
+ * All locks are non-blocking, which avoids deadlocks.
+ *
+ * This should work fine for small sites running off one server.
+ * Do not use this with 'lockDirectory' set to an NFS mount unless the
+ * NFS client is at least version 2.6.12. Otherwise, the BSD flock()
+ * locks will be ignored; see http://nfs.sourceforge.net/#section_d.
+ *
+ * @ingroup LockManager
+ * @since 1.19
+ */
+class FSLockManager extends LockManager {
+       /** @var array Mapping of lock types to the type actually used */
+       protected $lockTypeMap = [
+               self::LOCK_SH => self::LOCK_SH,
+               self::LOCK_UW => self::LOCK_SH,
+               self::LOCK_EX => self::LOCK_EX
+       ];
+
+       /** @var string Global dir for all servers */
+       protected $lockDir;
+
+       /** @var array Map of (locked key => lock file handle) */
+       protected $handles = [];
+
+       /** @var bool */
+       protected $isWindows;
+
+       /**
+        * Construct a new instance from configuration.
+        *
+        * @param array $config Includes:
+        *   - lockDirectory : Directory containing the lock files
+        */
+       function __construct( array $config ) {
+               parent::__construct( $config );
+
+               $this->lockDir = $config['lockDirectory'];
+               $this->isWindows = ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' );
+       }
+
+       /**
+        * @see LockManager::doLock()
+        * @param array $paths
+        * @param int $type
+        * @return StatusValue
+        */
+       protected function doLock( array $paths, $type ) {
+               $status = StatusValue::newGood();
+
+               $lockedPaths = []; // files locked in this attempt
+               foreach ( $paths as $path ) {
+                       $status->merge( $this->doSingleLock( $path, $type ) );
+                       if ( $status->isOK() ) {
+                               $lockedPaths[] = $path;
+                       } else {
+                               // Abort and unlock everything
+                               $status->merge( $this->doUnlock( $lockedPaths, $type ) );
+
+                               return $status;
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see LockManager::doUnlock()
+        * @param array $paths
+        * @param int $type
+        * @return StatusValue
+        */
+       protected function doUnlock( array $paths, $type ) {
+               $status = StatusValue::newGood();
+
+               foreach ( $paths as $path ) {
+                       $status->merge( $this->doSingleUnlock( $path, $type ) );
+               }
+
+               return $status;
+       }
+
+       /**
+        * Lock a single resource key
+        *
+        * @param string $path
+        * @param int $type
+        * @return StatusValue
+        */
+       protected function doSingleLock( $path, $type ) {
+               $status = StatusValue::newGood();
+
+               if ( isset( $this->locksHeld[$path][$type] ) ) {
+                       ++$this->locksHeld[$path][$type];
+               } elseif ( isset( $this->locksHeld[$path][self::LOCK_EX] ) ) {
+                       $this->locksHeld[$path][$type] = 1;
+               } else {
+                       if ( isset( $this->handles[$path] ) ) {
+                               $handle = $this->handles[$path];
+                       } else {
+                               MediaWiki\suppressWarnings();
+                               $handle = fopen( $this->getLockPath( $path ), 'a+' );
+                               if ( !$handle ) { // lock dir missing?
+                                       mkdir( $this->lockDir, 0777, true );
+                                       $handle = fopen( $this->getLockPath( $path ), 'a+' ); // try again
+                               }
+                               MediaWiki\restoreWarnings();
+                       }
+                       if ( $handle ) {
+                               // Either a shared or exclusive lock
+                               $lock = ( $type == self::LOCK_SH ) ? LOCK_SH : LOCK_EX;
+                               if ( flock( $handle, $lock | LOCK_NB ) ) {
+                                       // Record this lock as active
+                                       $this->locksHeld[$path][$type] = 1;
+                                       $this->handles[$path] = $handle;
+                               } else {
+                                       fclose( $handle );
+                                       $status->fatal( 'lockmanager-fail-acquirelock', $path );
+                               }
+                       } else {
+                               $status->fatal( 'lockmanager-fail-openlock', $path );
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * Unlock a single resource key
+        *
+        * @param string $path
+        * @param int $type
+        * @return StatusValue
+        */
+       protected function doSingleUnlock( $path, $type ) {
+               $status = StatusValue::newGood();
+
+               if ( !isset( $this->locksHeld[$path] ) ) {
+                       $status->warning( 'lockmanager-notlocked', $path );
+               } elseif ( !isset( $this->locksHeld[$path][$type] ) ) {
+                       $status->warning( 'lockmanager-notlocked', $path );
+               } else {
+                       $handlesToClose = [];
+                       --$this->locksHeld[$path][$type];
+                       if ( $this->locksHeld[$path][$type] <= 0 ) {
+                               unset( $this->locksHeld[$path][$type] );
+                       }
+                       if ( !count( $this->locksHeld[$path] ) ) {
+                               unset( $this->locksHeld[$path] ); // no locks on this path
+                               if ( isset( $this->handles[$path] ) ) {
+                                       $handlesToClose[] = $this->handles[$path];
+                                       unset( $this->handles[$path] );
+                               }
+                       }
+                       // Unlock handles to release locks and delete
+                       // any lock files that end up with no locks on them...
+                       if ( $this->isWindows ) {
+                               // Windows: for any process, including this one,
+                               // calling unlink() on a locked file will fail
+                               $status->merge( $this->closeLockHandles( $path, $handlesToClose ) );
+                               $status->merge( $this->pruneKeyLockFiles( $path ) );
+                       } else {
+                               // Unix: unlink() can be used on files currently open by this
+                               // process and we must do so in order to avoid race conditions
+                               $status->merge( $this->pruneKeyLockFiles( $path ) );
+                               $status->merge( $this->closeLockHandles( $path, $handlesToClose ) );
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @param string $path
+        * @param array $handlesToClose
+        * @return StatusValue
+        */
+       private function closeLockHandles( $path, array $handlesToClose ) {
+               $status = StatusValue::newGood();
+               foreach ( $handlesToClose as $handle ) {
+                       if ( !flock( $handle, LOCK_UN ) ) {
+                               $status->fatal( 'lockmanager-fail-releaselock', $path );
+                       }
+                       if ( !fclose( $handle ) ) {
+                               $status->warning( 'lockmanager-fail-closelock', $path );
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @param string $path
+        * @return StatusValue
+        */
+       private function pruneKeyLockFiles( $path ) {
+               $status = StatusValue::newGood();
+               if ( !isset( $this->locksHeld[$path] ) ) {
+                       # No locks are held for the lock file anymore
+                       if ( !unlink( $this->getLockPath( $path ) ) ) {
+                               $status->warning( 'lockmanager-fail-deletelock', $path );
+                       }
+                       unset( $this->handles[$path] );
+               }
+
+               return $status;
+       }
+
+       /**
+        * Get the path to the lock file for a key
+        * @param string $path
+        * @return string
+        */
+       protected function getLockPath( $path ) {
+               return "{$this->lockDir}/{$this->sha1Base36Absolute( $path )}.lock";
+       }
+
+       /**
+        * Make sure remaining locks get cleared for sanity
+        */
+       function __destruct() {
+               while ( count( $this->locksHeld ) ) {
+                       foreach ( $this->locksHeld as $path => $locks ) {
+                               $this->doSingleUnlock( $path, self::LOCK_EX );
+                               $this->doSingleUnlock( $path, self::LOCK_SH );
+                       }
+               }
+       }
+}
diff --git a/includes/libs/lockmanager/LockManager.php b/includes/libs/lockmanager/LockManager.php
new file mode 100644 (file)
index 0000000..bee34dc
--- /dev/null
@@ -0,0 +1,268 @@
+<?php
+/**
+ * @defgroup LockManager Lock management
+ * @ingroup FileBackend
+ */
+use Psr\Log\LoggerInterface;
+use Wikimedia\WaitConditionLoop;
+
+/**
+ * Resource locking handling.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup LockManager
+ * @author Aaron Schulz
+ */
+
+/**
+ * @brief Class for handling resource locking.
+ *
+ * Locks on resource keys can either be shared or exclusive.
+ *
+ * Implementations must keep track of what is locked by this proccess
+ * in-memory and support nested locking calls (using reference counting).
+ * At least LOCK_UW and LOCK_EX must be implemented. LOCK_SH can be a no-op.
+ * Locks should either be non-blocking or have low wait timeouts.
+ *
+ * Subclasses should avoid throwing exceptions at all costs.
+ *
+ * @ingroup LockManager
+ * @since 1.19
+ */
+abstract class LockManager {
+       /** @var LoggerInterface */
+       protected $logger;
+
+       /** @var array Mapping of lock types to the type actually used */
+       protected $lockTypeMap = [
+               self::LOCK_SH => self::LOCK_SH,
+               self::LOCK_UW => self::LOCK_EX, // subclasses may use self::LOCK_SH
+               self::LOCK_EX => self::LOCK_EX
+       ];
+
+       /** @var array Map of (resource path => lock type => count) */
+       protected $locksHeld = [];
+
+       protected $domain; // string; domain (usually wiki ID)
+       protected $lockTTL; // integer; maximum time locks can be held
+
+       /** @var string Random 32-char hex number */
+       protected $session;
+
+       /** Lock types; stronger locks have higher values */
+       const LOCK_SH = 1; // shared lock (for reads)
+       const LOCK_UW = 2; // shared lock (for reads used to write elsewhere)
+       const LOCK_EX = 3; // exclusive lock (for writes)
+
+       /** @var int Max expected lock expiry in any context */
+       const MAX_LOCK_TTL = 7200; // 2 hours
+
+       /**
+        * Construct a new instance from configuration
+        *
+        * @param array $config Parameters include:
+        *   - domain  : Domain (usually wiki ID) that all resources are relative to [optional]
+        *   - lockTTL : Age (in seconds) at which resource locks should expire.
+        *               This only applies if locks are not tied to a connection/process.
+        */
+       public function __construct( array $config ) {
+               $this->domain = isset( $config['domain'] ) ? $config['domain'] : 'global';
+               if ( isset( $config['lockTTL'] ) ) {
+                       $this->lockTTL = max( 5, $config['lockTTL'] );
+               } elseif ( PHP_SAPI === 'cli' ) {
+                       $this->lockTTL = 3600;
+               } else {
+                       $met = ini_get( 'max_execution_time' ); // this is 0 in CLI mode
+                       $this->lockTTL = max( 5 * 60, 2 * (int)$met );
+               }
+
+               // Upper bound on how long to keep lock structures around. This is useful when setting
+               // TTLs, as the "lockTTL" value may vary based on CLI mode and app server group. This is
+               // a "safe" value that can be used to avoid clobbering other locks that use high TTLs.
+               $this->lockTTL = min( $this->lockTTL, self::MAX_LOCK_TTL );
+
+               $random = [];
+               for ( $i = 1; $i <= 5; ++$i ) {
+                       $random[] = mt_rand( 0, 0xFFFFFFF );
+               }
+               $this->session = md5( implode( '-', $random ) );
+
+               $this->logger = isset( $config['logger'] ) ? $config['logger'] : new \Psr\Log\NullLogger();
+       }
+
+       /**
+        * Lock the resources at the given abstract paths
+        *
+        * @param array $paths List of resource names
+        * @param int $type LockManager::LOCK_* constant
+        * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.21)
+        * @return StatusValue
+        */
+       final public function lock( array $paths, $type = self::LOCK_EX, $timeout = 0 ) {
+               return $this->lockByType( [ $type => $paths ], $timeout );
+       }
+
+       /**
+        * Lock the resources at the given abstract paths
+        *
+        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
+        * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.21)
+        * @return StatusValue
+        * @since 1.22
+        */
+       final public function lockByType( array $pathsByType, $timeout = 0 ) {
+               $pathsByType = $this->normalizePathsByType( $pathsByType );
+
+               $status = null;
+               $loop = new WaitConditionLoop(
+                       function () use ( &$status, $pathsByType ) {
+                               $status = $this->doLockByType( $pathsByType );
+
+                               return $status->isOK() ?: WaitConditionLoop::CONDITION_CONTINUE;
+                       },
+                       $timeout
+               );
+               $loop->invoke();
+
+               return $status;
+       }
+
+       /**
+        * Unlock the resources at the given abstract paths
+        *
+        * @param array $paths List of paths
+        * @param int $type LockManager::LOCK_* constant
+        * @return StatusValue
+        */
+       final public function unlock( array $paths, $type = self::LOCK_EX ) {
+               return $this->unlockByType( [ $type => $paths ] );
+       }
+
+       /**
+        * Unlock the resources at the given abstract paths
+        *
+        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
+        * @return StatusValue
+        * @since 1.22
+        */
+       final public function unlockByType( array $pathsByType ) {
+               $pathsByType = $this->normalizePathsByType( $pathsByType );
+               $status = $this->doUnlockByType( $pathsByType );
+
+               return $status;
+       }
+
+       /**
+        * Get the base 36 SHA-1 of a string, padded to 31 digits.
+        * Before hashing, the path will be prefixed with the domain ID.
+        * This should be used interally for lock key or file names.
+        *
+        * @param string $path
+        * @return string
+        */
+       final protected function sha1Base36Absolute( $path ) {
+               return Wikimedia\base_convert( sha1( "{$this->domain}:{$path}" ), 16, 36, 31 );
+       }
+
+       /**
+        * Get the base 16 SHA-1 of a string, padded to 31 digits.
+        * Before hashing, the path will be prefixed with the domain ID.
+        * This should be used interally for lock key or file names.
+        *
+        * @param string $path
+        * @return string
+        */
+       final protected function sha1Base16Absolute( $path ) {
+               return sha1( "{$this->domain}:{$path}" );
+       }
+
+       /**
+        * Normalize the $paths array by converting LOCK_UW locks into the
+        * appropriate type and removing any duplicated paths for each lock type.
+        *
+        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
+        * @return array
+        * @since 1.22
+        */
+       final protected function normalizePathsByType( array $pathsByType ) {
+               $res = [];
+               foreach ( $pathsByType as $type => $paths ) {
+                       $res[$this->lockTypeMap[$type]] = array_unique( $paths );
+               }
+
+               return $res;
+       }
+
+       /**
+        * @see LockManager::lockByType()
+        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
+        * @return StatusValue
+        * @since 1.22
+        */
+       protected function doLockByType( array $pathsByType ) {
+               $status = StatusValue::newGood();
+               $lockedByType = []; // map of (type => paths)
+               foreach ( $pathsByType as $type => $paths ) {
+                       $status->merge( $this->doLock( $paths, $type ) );
+                       if ( $status->isOK() ) {
+                               $lockedByType[$type] = $paths;
+                       } else {
+                               // Release the subset of locks that were acquired
+                               foreach ( $lockedByType as $lType => $lPaths ) {
+                                       $status->merge( $this->doUnlock( $lPaths, $lType ) );
+                               }
+                               break;
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * Lock resources with the given keys and lock type
+        *
+        * @param array $paths List of paths
+        * @param int $type LockManager::LOCK_* constant
+        * @return StatusValue
+        */
+       abstract protected function doLock( array $paths, $type );
+
+       /**
+        * @see LockManager::unlockByType()
+        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
+        * @return StatusValue
+        * @since 1.22
+        */
+       protected function doUnlockByType( array $pathsByType ) {
+               $status = StatusValue::newGood();
+               foreach ( $pathsByType as $type => $paths ) {
+                       $status->merge( $this->doUnlock( $paths, $type ) );
+               }
+
+               return $status;
+       }
+
+       /**
+        * Unlock resources with the given keys and lock type
+        *
+        * @param array $paths List of paths
+        * @param int $type LockManager::LOCK_* constant
+        * @return StatusValue
+        */
+       abstract protected function doUnlock( array $paths, $type );
+}
diff --git a/includes/libs/lockmanager/MemcLockManager.php b/includes/libs/lockmanager/MemcLockManager.php
new file mode 100644 (file)
index 0000000..aecdf60
--- /dev/null
@@ -0,0 +1,356 @@
+<?php
+/**
+ * Version of LockManager based on using memcached servers.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup LockManager
+ */
+use Wikimedia\WaitConditionLoop;
+
+/**
+ * Manage locks using memcached servers.
+ *
+ * Version of LockManager based on using memcached servers.
+ * This is meant for multi-wiki systems that may share files.
+ * All locks are non-blocking, which avoids deadlocks.
+ *
+ * All lock requests for a resource, identified by a hash string, will map to one
+ * bucket. Each bucket maps to one or several peer servers, each running memcached.
+ * A majority of peers must agree for a lock to be acquired.
+ *
+ * @ingroup LockManager
+ * @since 1.20
+ */
+class MemcLockManager extends QuorumLockManager {
+       /** @var array Mapping of lock types to the type actually used */
+       protected $lockTypeMap = [
+               self::LOCK_SH => self::LOCK_SH,
+               self::LOCK_UW => self::LOCK_SH,
+               self::LOCK_EX => self::LOCK_EX
+       ];
+
+       /** @var MemcachedBagOStuff[] Map of (server name => MemcachedBagOStuff) */
+       protected $cacheServers = [];
+       /** @var HashBagOStuff Server status cache */
+       protected $statusCache;
+
+       /**
+        * Construct a new instance from configuration.
+        *
+        * @param array $config Parameters include:
+        *   - lockServers  : Associative array of server names to "<IP>:<port>" strings.
+        *   - srvsByBucket : Array of 1-16 consecutive integer keys, starting from 0,
+        *                    each having an odd-numbered list of server names (peers) as values.
+        *   - memcConfig   : Configuration array for MemcachedBagOStuff::construct() with an
+        *                    additional 'class' parameter specifying which MemcachedBagOStuff
+        *                    subclass to use. The server names will be injected. [optional]
+        * @throws Exception
+        */
+       public function __construct( array $config ) {
+               parent::__construct( $config );
+
+               // Sanitize srvsByBucket config to prevent PHP errors
+               $this->srvsByBucket = array_filter( $config['srvsByBucket'], 'is_array' );
+               $this->srvsByBucket = array_values( $this->srvsByBucket ); // consecutive
+
+               $memcConfig = isset( $config['memcConfig'] ) ? $config['memcConfig'] : [];
+               $memcConfig += [ 'class' => 'MemcachedPhpBagOStuff' ]; // default
+
+               $class = $memcConfig['class'];
+               if ( !is_subclass_of( $class, 'MemcachedBagOStuff' ) ) {
+                       throw new InvalidArgumentException( "$class is not of type MemcachedBagOStuff." );
+               }
+
+               foreach ( $config['lockServers'] as $name => $address ) {
+                       $params = [ 'servers' => [ $address ] ] + $memcConfig;
+                       $this->cacheServers[$name] = new $class( $params );
+               }
+
+               $this->statusCache = new HashBagOStuff();
+       }
+
+       protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
+               $status = StatusValue::newGood();
+
+               $memc = $this->getCache( $lockSrv );
+               // List of affected paths
+               $paths = call_user_func_array( 'array_merge', array_values( $pathsByType ) );
+               $paths = array_unique( $paths );
+               // List of affected lock record keys
+               $keys = array_map( [ $this, 'recordKeyForPath' ], $paths );
+
+               // Lock all of the active lock record keys...
+               if ( !$this->acquireMutexes( $memc, $keys ) ) {
+                       foreach ( $paths as $path ) {
+                               $status->fatal( 'lockmanager-fail-acquirelock', $path );
+                       }
+
+                       return $status;
+               }
+
+               // Fetch all the existing lock records...
+               $lockRecords = $memc->getMulti( $keys );
+
+               $now = time();
+               // Check if the requested locks conflict with existing ones...
+               foreach ( $pathsByType as $type => $paths ) {
+                       foreach ( $paths as $path ) {
+                               $locksKey = $this->recordKeyForPath( $path );
+                               $locksHeld = isset( $lockRecords[$locksKey] )
+                                       ? self::sanitizeLockArray( $lockRecords[$locksKey] )
+                                       : self::newLockArray(); // init
+                               foreach ( $locksHeld[self::LOCK_EX] as $session => $expiry ) {
+                                       if ( $expiry < $now ) { // stale?
+                                               unset( $locksHeld[self::LOCK_EX][$session] );
+                                       } elseif ( $session !== $this->session ) {
+                                               $status->fatal( 'lockmanager-fail-acquirelock', $path );
+                                       }
+                               }
+                               if ( $type === self::LOCK_EX ) {
+                                       foreach ( $locksHeld[self::LOCK_SH] as $session => $expiry ) {
+                                               if ( $expiry < $now ) { // stale?
+                                                       unset( $locksHeld[self::LOCK_SH][$session] );
+                                               } elseif ( $session !== $this->session ) {
+                                                       $status->fatal( 'lockmanager-fail-acquirelock', $path );
+                                               }
+                                       }
+                               }
+                               if ( $status->isOK() ) {
+                                       // Register the session in the lock record array
+                                       $locksHeld[$type][$this->session] = $now + $this->lockTTL;
+                                       // We will update this record if none of the other locks conflict
+                                       $lockRecords[$locksKey] = $locksHeld;
+                               }
+                       }
+               }
+
+               // If there were no lock conflicts, update all the lock records...
+               if ( $status->isOK() ) {
+                       foreach ( $paths as $path ) {
+                               $locksKey = $this->recordKeyForPath( $path );
+                               $locksHeld = $lockRecords[$locksKey];
+                               $ok = $memc->set( $locksKey, $locksHeld, self::MAX_LOCK_TTL );
+                               if ( !$ok ) {
+                                       $status->fatal( 'lockmanager-fail-acquirelock', $path );
+                               } else {
+                                       $this->logger->debug( __METHOD__ . ": acquired lock on key $locksKey.\n" );
+                               }
+                       }
+               }
+
+               // Unlock all of the active lock record keys...
+               $this->releaseMutexes( $memc, $keys );
+
+               return $status;
+       }
+
+       protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
+               $status = StatusValue::newGood();
+
+               $memc = $this->getCache( $lockSrv );
+               // List of affected paths
+               $paths = call_user_func_array( 'array_merge', array_values( $pathsByType ) );
+               $paths = array_unique( $paths );
+               // List of affected lock record keys
+               $keys = array_map( [ $this, 'recordKeyForPath' ], $paths );
+
+               // Lock all of the active lock record keys...
+               if ( !$this->acquireMutexes( $memc, $keys ) ) {
+                       foreach ( $paths as $path ) {
+                               $status->fatal( 'lockmanager-fail-releaselock', $path );
+                       }
+
+                       return $status;
+               }
+
+               // Fetch all the existing lock records...
+               $lockRecords = $memc->getMulti( $keys );
+
+               // Remove the requested locks from all records...
+               foreach ( $pathsByType as $type => $paths ) {
+                       foreach ( $paths as $path ) {
+                               $locksKey = $this->recordKeyForPath( $path ); // lock record
+                               if ( !isset( $lockRecords[$locksKey] ) ) {
+                                       $status->warning( 'lockmanager-fail-releaselock', $path );
+                                       continue; // nothing to do
+                               }
+                               $locksHeld = $this->sanitizeLockArray( $lockRecords[$locksKey] );
+                               if ( isset( $locksHeld[$type][$this->session] ) ) {
+                                       unset( $locksHeld[$type][$this->session] ); // unregister this session
+                                       $lockRecords[$locksKey] = $locksHeld;
+                               } else {
+                                       $status->warning( 'lockmanager-fail-releaselock', $path );
+                               }
+                       }
+               }
+
+               // Persist the new lock record values...
+               foreach ( $paths as $path ) {
+                       $locksKey = $this->recordKeyForPath( $path );
+                       if ( !isset( $lockRecords[$locksKey] ) ) {
+                               continue; // nothing to do
+                       }
+                       $locksHeld = $lockRecords[$locksKey];
+                       if ( $locksHeld === $this->newLockArray() ) {
+                               $ok = $memc->delete( $locksKey );
+                       } else {
+                               $ok = $memc->set( $locksKey, $locksHeld, self::MAX_LOCK_TTL );
+                       }
+                       if ( $ok ) {
+                               $this->logger->debug( __METHOD__ . ": released lock on key $locksKey.\n" );
+                       } else {
+                               $status->fatal( 'lockmanager-fail-releaselock', $path );
+                       }
+               }
+
+               // Unlock all of the active lock record keys...
+               $this->releaseMutexes( $memc, $keys );
+
+               return $status;
+       }
+
+       /**
+        * @see QuorumLockManager::releaseAllLocks()
+        * @return StatusValue
+        */
+       protected function releaseAllLocks() {
+               return StatusValue::newGood(); // not supported
+       }
+
+       /**
+        * @see QuorumLockManager::isServerUp()
+        * @param string $lockSrv
+        * @return bool
+        */
+       protected function isServerUp( $lockSrv ) {
+               return (bool)$this->getCache( $lockSrv );
+       }
+
+       /**
+        * Get the MemcachedBagOStuff object for a $lockSrv
+        *
+        * @param string $lockSrv Server name
+        * @return MemcachedBagOStuff|null
+        */
+       protected function getCache( $lockSrv ) {
+               if ( !isset( $this->cacheServers[$lockSrv] ) ) {
+                       throw new InvalidArgumentException( "Invalid cache server '$lockSrv'." );
+               }
+
+               $online = $this->statusCache->get( "online:$lockSrv" );
+               if ( $online === false ) {
+                       $online = $this->cacheServers[$lockSrv]->set( __CLASS__ . ':ping', 1, 1 );
+                       if ( !$online ) { // server down?
+                               $this->logger->warning( __METHOD__ . ": Could not contact $lockSrv." );
+                       }
+                       $this->statusCache->set( "online:$lockSrv", (int)$online, 30 );
+               }
+
+               return $online ? $this->cacheServers[$lockSrv] : null;
+       }
+
+       /**
+        * @param string $path
+        * @return string
+        */
+       protected function recordKeyForPath( $path ) {
+               return implode( ':', [ __CLASS__, 'locks', $this->sha1Base36Absolute( $path ) ] );
+       }
+
+       /**
+        * @return array An empty lock structure for a key
+        */
+       protected function newLockArray() {
+               return [ self::LOCK_SH => [], self::LOCK_EX => [] ];
+       }
+
+       /**
+        * @param array $a
+        * @return array An empty lock structure for a key
+        */
+       protected function sanitizeLockArray( $a ) {
+               if ( is_array( $a ) && isset( $a[self::LOCK_EX] ) && isset( $a[self::LOCK_SH] ) ) {
+                       return $a;
+               }
+
+               $this->logger->error( __METHOD__ . ": reset invalid lock array." );
+
+               return $this->newLockArray();
+       }
+
+       /**
+        * @param MemcachedBagOStuff $memc
+        * @param array $keys List of keys to acquire
+        * @return bool
+        */
+       protected function acquireMutexes( MemcachedBagOStuff $memc, array $keys ) {
+               $lockedKeys = [];
+
+               // Acquire the keys in lexicographical order, to avoid deadlock problems.
+               // If P1 is waiting to acquire a key P2 has, P2 can't also be waiting for a key P1 has.
+               sort( $keys );
+
+               // Try to quickly loop to acquire the keys, but back off after a few rounds.
+               // This reduces memcached spam, especially in the rare case where a server acquires
+               // some lock keys and dies without releasing them. Lock keys expire after a few minutes.
+               $loop = new WaitConditionLoop(
+                       function () use ( $memc, $keys, &$lockedKeys ) {
+                               foreach ( array_diff( $keys, $lockedKeys ) as $key ) {
+                                       if ( $memc->add( "$key:mutex", 1, 180 ) ) { // lock record
+                                               $lockedKeys[] = $key;
+                                       }
+                               }
+
+                               return array_diff( $keys, $lockedKeys )
+                                       ? WaitConditionLoop::CONDITION_CONTINUE
+                                       : true;
+                       },
+                       3.0 // timeout
+               );
+               $loop->invoke();
+
+               if ( count( $lockedKeys ) != count( $keys ) ) {
+                       $this->releaseMutexes( $memc, $lockedKeys ); // failed; release what was locked
+                       return false;
+               }
+
+               return true;
+       }
+
+       /**
+        * @param MemcachedBagOStuff $memc
+        * @param array $keys List of acquired keys
+        */
+       protected function releaseMutexes( MemcachedBagOStuff $memc, array $keys ) {
+               foreach ( $keys as $key ) {
+                       $memc->delete( "$key:mutex" );
+               }
+       }
+
+       /**
+        * Make sure remaining locks get cleared for sanity
+        */
+       function __destruct() {
+               while ( count( $this->locksHeld ) ) {
+                       foreach ( $this->locksHeld as $path => $locks ) {
+                               $this->doUnlock( [ $path ], self::LOCK_EX );
+                               $this->doUnlock( [ $path ], self::LOCK_SH );
+                       }
+               }
+       }
+}
diff --git a/includes/libs/lockmanager/NullLockManager.php b/includes/libs/lockmanager/NullLockManager.php
new file mode 100644 (file)
index 0000000..5ad558f
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Resource locking handling.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup LockManager
+ * @author Aaron Schulz
+ */
+
+/**
+ * Simple version of LockManager that does nothing
+ * @since 1.19
+ */
+class NullLockManager extends LockManager {
+       protected function doLock( array $paths, $type ) {
+               return StatusValue::newGood();
+       }
+
+       protected function doUnlock( array $paths, $type ) {
+               return StatusValue::newGood();
+       }
+}
diff --git a/includes/libs/lockmanager/PostgreSqlLockManager.php b/includes/libs/lockmanager/PostgreSqlLockManager.php
new file mode 100644 (file)
index 0000000..d6b1ce8
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+/**
+ * PostgreSQL version of DBLockManager that supports shared locks.
+ * All locks are non-blocking, which avoids deadlocks.
+ *
+ * @ingroup LockManager
+ */
+class PostgreSqlLockManager extends DBLockManager {
+       /** @var array Mapping of lock types to the type actually used */
+       protected $lockTypeMap = [
+               self::LOCK_SH => self::LOCK_SH,
+               self::LOCK_UW => self::LOCK_SH,
+               self::LOCK_EX => self::LOCK_EX
+       ];
+
+       protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
+               $status = StatusValue::newGood();
+               if ( !count( $paths ) ) {
+                       return $status; // nothing to lock
+               }
+
+               $db = $this->getConnection( $lockSrv ); // checked in isServerUp()
+               $bigints = array_unique( array_map(
+                       function ( $key ) {
+                               return Wikimedia\base_convert( substr( $key, 0, 15 ), 16, 10 );
+                       },
+                       array_map( [ $this, 'sha1Base16Absolute' ], $paths )
+               ) );
+
+               // Try to acquire all the locks...
+               $fields = [];
+               foreach ( $bigints as $bigint ) {
+                       $fields[] = ( $type == self::LOCK_SH )
+                               ? "pg_try_advisory_lock_shared({$db->addQuotes( $bigint )}) AS K$bigint"
+                               : "pg_try_advisory_lock({$db->addQuotes( $bigint )}) AS K$bigint";
+               }
+               $res = $db->query( 'SELECT ' . implode( ', ', $fields ), __METHOD__ );
+               $row = $res->fetchRow();
+
+               if ( in_array( 'f', $row ) ) {
+                       // Release any acquired locks if some could not be acquired...
+                       $fields = [];
+                       foreach ( $row as $kbigint => $ok ) {
+                               if ( $ok === 't' ) { // locked
+                                       $bigint = substr( $kbigint, 1 ); // strip off the "K"
+                                       $fields[] = ( $type == self::LOCK_SH )
+                                               ? "pg_advisory_unlock_shared({$db->addQuotes( $bigint )})"
+                                               : "pg_advisory_unlock({$db->addQuotes( $bigint )})";
+                               }
+                       }
+                       if ( count( $fields ) ) {
+                               $db->query( 'SELECT ' . implode( ', ', $fields ), __METHOD__ );
+                       }
+                       foreach ( $paths as $path ) {
+                               $status->fatal( 'lockmanager-fail-acquirelock', $path );
+                       }
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see QuorumLockManager::releaseAllLocks()
+        * @return StatusValue
+        */
+       protected function releaseAllLocks() {
+               $status = StatusValue::newGood();
+
+               foreach ( $this->conns as $lockDb => $db ) {
+                       try {
+                               $db->query( "SELECT pg_advisory_unlock_all()", __METHOD__ );
+                       } catch ( DBError $e ) {
+                               $status->fatal( 'lockmanager-fail-db-release', $lockDb );
+                       }
+               }
+
+               return $status;
+       }
+}
diff --git a/includes/libs/lockmanager/QuorumLockManager.php b/includes/libs/lockmanager/QuorumLockManager.php
new file mode 100644 (file)
index 0000000..a89d864
--- /dev/null
@@ -0,0 +1,248 @@
+<?php
+/**
+ * Version of LockManager that uses a quorum from peer servers for locks.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup LockManager
+ */
+
+/**
+ * Version of LockManager that uses a quorum from peer servers for locks.
+ * The resource space can also be sharded into separate peer groups.
+ *
+ * @ingroup LockManager
+ * @since 1.20
+ */
+abstract class QuorumLockManager extends LockManager {
+       /** @var array Map of bucket indexes to peer server lists */
+       protected $srvsByBucket = []; // (bucket index => (lsrv1, lsrv2, ...))
+
+       /** @var array Map of degraded buckets */
+       protected $degradedBuckets = []; // (bucket index => UNIX timestamp)
+
+       final protected function doLock( array $paths, $type ) {
+               return $this->doLockByType( [ $type => $paths ] );
+       }
+
+       final protected function doUnlock( array $paths, $type ) {
+               return $this->doUnlockByType( [ $type => $paths ] );
+       }
+
+       protected function doLockByType( array $pathsByType ) {
+               $status = StatusValue::newGood();
+
+               $pathsToLock = []; // (bucket => type => paths)
+               // Get locks that need to be acquired (buckets => locks)...
+               foreach ( $pathsByType as $type => $paths ) {
+                       foreach ( $paths as $path ) {
+                               if ( isset( $this->locksHeld[$path][$type] ) ) {
+                                       ++$this->locksHeld[$path][$type];
+                               } else {
+                                       $bucket = $this->getBucketFromPath( $path );
+                                       $pathsToLock[$bucket][$type][] = $path;
+                               }
+                       }
+               }
+
+               $lockedPaths = []; // files locked in this attempt (type => paths)
+               // Attempt to acquire these locks...
+               foreach ( $pathsToLock as $bucket => $pathsToLockByType ) {
+                       // Try to acquire the locks for this bucket
+                       $status->merge( $this->doLockingRequestBucket( $bucket, $pathsToLockByType ) );
+                       if ( !$status->isOK() ) {
+                               $status->merge( $this->doUnlockByType( $lockedPaths ) );
+
+                               return $status;
+                       }
+                       // Record these locks as active
+                       foreach ( $pathsToLockByType as $type => $paths ) {
+                               foreach ( $paths as $path ) {
+                                       $this->locksHeld[$path][$type] = 1; // locked
+                                       // Keep track of what locks were made in this attempt
+                                       $lockedPaths[$type][] = $path;
+                               }
+                       }
+               }
+
+               return $status;
+       }
+
+       protected function doUnlockByType( array $pathsByType ) {
+               $status = StatusValue::newGood();
+
+               $pathsToUnlock = []; // (bucket => type => paths)
+               foreach ( $pathsByType as $type => $paths ) {
+                       foreach ( $paths as $path ) {
+                               if ( !isset( $this->locksHeld[$path][$type] ) ) {
+                                       $status->warning( 'lockmanager-notlocked', $path );
+                               } else {
+                                       --$this->locksHeld[$path][$type];
+                                       // Reference count the locks held and release locks when zero
+                                       if ( $this->locksHeld[$path][$type] <= 0 ) {
+                                               unset( $this->locksHeld[$path][$type] );
+                                               $bucket = $this->getBucketFromPath( $path );
+                                               $pathsToUnlock[$bucket][$type][] = $path;
+                                       }
+                                       if ( !count( $this->locksHeld[$path] ) ) {
+                                               unset( $this->locksHeld[$path] ); // no SH or EX locks left for key
+                                       }
+                               }
+                       }
+               }
+
+               // Remove these specific locks if possible, or at least release
+               // all locks once this process is currently not holding any locks.
+               foreach ( $pathsToUnlock as $bucket => $pathsToUnlockByType ) {
+                       $status->merge( $this->doUnlockingRequestBucket( $bucket, $pathsToUnlockByType ) );
+               }
+               if ( !count( $this->locksHeld ) ) {
+                       $status->merge( $this->releaseAllLocks() );
+                       $this->degradedBuckets = []; // safe to retry the normal quorum
+               }
+
+               return $status;
+       }
+
+       /**
+        * Attempt to acquire locks with the peers for a bucket.
+        * This is all or nothing; if any key is locked then this totally fails.
+        *
+        * @param int $bucket
+        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
+        * @return StatusValue
+        */
+       final protected function doLockingRequestBucket( $bucket, array $pathsByType ) {
+               $status = StatusValue::newGood();
+
+               $yesVotes = 0; // locks made on trustable servers
+               $votesLeft = count( $this->srvsByBucket[$bucket] ); // remaining peers
+               $quorum = floor( $votesLeft / 2 + 1 ); // simple majority
+               // Get votes for each peer, in order, until we have enough...
+               foreach ( $this->srvsByBucket[$bucket] as $lockSrv ) {
+                       if ( !$this->isServerUp( $lockSrv ) ) {
+                               --$votesLeft;
+                               $status->warning( 'lockmanager-fail-svr-acquire', $lockSrv );
+                               $this->degradedBuckets[$bucket] = time();
+                               continue; // server down?
+                       }
+                       // Attempt to acquire the lock on this peer
+                       $status->merge( $this->getLocksOnServer( $lockSrv, $pathsByType ) );
+                       if ( !$status->isOK() ) {
+                               return $status; // vetoed; resource locked
+                       }
+                       ++$yesVotes; // success for this peer
+                       if ( $yesVotes >= $quorum ) {
+                               return $status; // lock obtained
+                       }
+                       --$votesLeft;
+                       $votesNeeded = $quorum - $yesVotes;
+                       if ( $votesNeeded > $votesLeft ) {
+                               break; // short-circuit
+                       }
+               }
+               // At this point, we must not have met the quorum
+               $status->setResult( false );
+
+               return $status;
+       }
+
+       /**
+        * Attempt to release locks with the peers for a bucket
+        *
+        * @param int $bucket
+        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
+        * @return StatusValue
+        */
+       final protected function doUnlockingRequestBucket( $bucket, array $pathsByType ) {
+               $status = StatusValue::newGood();
+
+               $yesVotes = 0; // locks freed on trustable servers
+               $votesLeft = count( $this->srvsByBucket[$bucket] ); // remaining peers
+               $quorum = floor( $votesLeft / 2 + 1 ); // simple majority
+               $isDegraded = isset( $this->degradedBuckets[$bucket] ); // not the normal quorum?
+               foreach ( $this->srvsByBucket[$bucket] as $lockSrv ) {
+                       if ( !$this->isServerUp( $lockSrv ) ) {
+                               $status->warning( 'lockmanager-fail-svr-release', $lockSrv );
+                       } else {
+                               // Attempt to release the lock on this peer
+                               $status->merge( $this->freeLocksOnServer( $lockSrv, $pathsByType ) );
+                               ++$yesVotes; // success for this peer
+                               // Normally the first peers form the quorum, and the others are ignored.
+                               // Ignore them in this case, but not when an alternative quorum was used.
+                               if ( $yesVotes >= $quorum && !$isDegraded ) {
+                                       break; // lock released
+                               }
+                       }
+               }
+               // Set a bad StatusValue if the quorum was not met.
+               // Assumes the same "up" servers as during the acquire step.
+               $status->setResult( $yesVotes >= $quorum );
+
+               return $status;
+       }
+
+       /**
+        * Get the bucket for resource path.
+        * This should avoid throwing any exceptions.
+        *
+        * @param string $path
+        * @return int
+        */
+       protected function getBucketFromPath( $path ) {
+               $prefix = substr( sha1( $path ), 0, 2 ); // first 2 hex chars (8 bits)
+               return (int)base_convert( $prefix, 16, 10 ) % count( $this->srvsByBucket );
+       }
+
+       /**
+        * Check if a lock server is up.
+        * This should process cache results to reduce RTT.
+        *
+        * @param string $lockSrv
+        * @return bool
+        */
+       abstract protected function isServerUp( $lockSrv );
+
+       /**
+        * Get a connection to a lock server and acquire locks
+        *
+        * @param string $lockSrv
+        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
+        * @return StatusValue
+        */
+       abstract protected function getLocksOnServer( $lockSrv, array $pathsByType );
+
+       /**
+        * Get a connection to a lock server and release locks on $paths.
+        *
+        * Subclasses must effectively implement this or releaseAllLocks().
+        *
+        * @param string $lockSrv
+        * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
+        * @return StatusValue
+        */
+       abstract protected function freeLocksOnServer( $lockSrv, array $pathsByType );
+
+       /**
+        * Release all locks that this session is holding.
+        *
+        * Subclasses must effectively implement this or freeLocksOnServer().
+        *
+        * @return StatusValue
+        */
+       abstract protected function releaseAllLocks();
+}
diff --git a/includes/libs/lockmanager/RedisLockManager.php b/includes/libs/lockmanager/RedisLockManager.php
new file mode 100644 (file)
index 0000000..ea9dde7
--- /dev/null
@@ -0,0 +1,276 @@
+<?php
+/**
+ * Version of LockManager based on using redis servers.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup LockManager
+ */
+
+/**
+ * Manage locks using redis servers.
+ *
+ * Version of LockManager based on using redis servers.
+ * This is meant for multi-wiki systems that may share files.
+ * All locks are non-blocking, which avoids deadlocks.
+ *
+ * All lock requests for a resource, identified by a hash string, will map to one
+ * bucket. Each bucket maps to one or several peer servers, each running redis.
+ * A majority of peers must agree for a lock to be acquired.
+ *
+ * This class requires Redis 2.6 as it makes use Lua scripts for fast atomic operations.
+ *
+ * @ingroup LockManager
+ * @since 1.22
+ */
+class RedisLockManager extends QuorumLockManager {
+       /** @var array Mapping of lock types to the type actually used */
+       protected $lockTypeMap = [
+               self::LOCK_SH => self::LOCK_SH,
+               self::LOCK_UW => self::LOCK_SH,
+               self::LOCK_EX => self::LOCK_EX
+       ];
+
+       /** @var RedisConnectionPool */
+       protected $redisPool;
+
+       /** @var array Map server names to hostname/IP and port numbers */
+       protected $lockServers = [];
+
+       /**
+        * Construct a new instance from configuration.
+        *
+        * @param array $config Parameters include:
+        *   - lockServers  : Associative array of server names to "<IP>:<port>" strings.
+        *   - srvsByBucket : Array of 1-16 consecutive integer keys, starting from 0,
+        *                    each having an odd-numbered list of server names (peers) as values.
+        *   - redisConfig  : Configuration for RedisConnectionPool::__construct().
+        * @throws Exception
+        */
+       public function __construct( array $config ) {
+               parent::__construct( $config );
+
+               $this->lockServers = $config['lockServers'];
+               // Sanitize srvsByBucket config to prevent PHP errors
+               $this->srvsByBucket = array_filter( $config['srvsByBucket'], 'is_array' );
+               $this->srvsByBucket = array_values( $this->srvsByBucket ); // consecutive
+
+               $config['redisConfig']['serializer'] = 'none';
+               $this->redisPool = RedisConnectionPool::singleton( $config['redisConfig'] );
+       }
+
+       protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
+               $status = StatusValue::newGood();
+
+               $pathList = call_user_func_array( 'array_merge', array_values( $pathsByType ) );
+
+               $server = $this->lockServers[$lockSrv];
+               $conn = $this->redisPool->getConnection( $server, $this->logger );
+               if ( !$conn ) {
+                       foreach ( $pathList as $path ) {
+                               $status->fatal( 'lockmanager-fail-acquirelock', $path );
+                       }
+
+                       return $status;
+               }
+
+               $pathsByKey = []; // (type:hash => path) map
+               foreach ( $pathsByType as $type => $paths ) {
+                       $typeString = ( $type == LockManager::LOCK_SH ) ? 'SH' : 'EX';
+                       foreach ( $paths as $path ) {
+                               $pathsByKey[$this->recordKeyForPath( $path, $typeString )] = $path;
+                       }
+               }
+
+               try {
+                       static $script =
+                       /** @lang Lua */
+<<<LUA
+                       local failed = {}
+                       -- Load input params (e.g. session, ttl, time of request)
+                       local rSession, rTTL, rMaxTTL, rTime = unpack(ARGV)
+                       -- Check that all the locks can be acquired
+                       for i,requestKey in ipairs(KEYS) do
+                               local _, _, rType, resourceKey = string.find(requestKey,"(%w+):(%w+)$")
+                               local keyIsFree = true
+                               local currentLocks = redis.call('hKeys',resourceKey)
+                               for i,lockKey in ipairs(currentLocks) do
+                                       -- Get the type and session of this lock
+                                       local _, _, type, session = string.find(lockKey,"(%w+):(%w+)")
+                                       -- Check any locks that are not owned by this session
+                                       if session ~= rSession then
+                                               local lockExpiry = redis.call('hGet',resourceKey,lockKey)
+                                               if 1*lockExpiry < 1*rTime then
+                                                       -- Lock is stale, so just prune it out
+                                                       redis.call('hDel',resourceKey,lockKey)
+                                               elseif rType == 'EX' or type == 'EX' then
+                                                       keyIsFree = false
+                                                       break
+                                               end
+                                       end
+                               end
+                               if not keyIsFree then
+                                       failed[#failed+1] = requestKey
+                               end
+                       end
+                       -- If all locks could be acquired, then do so
+                       if #failed == 0 then
+                               for i,requestKey in ipairs(KEYS) do
+                                       local _, _, rType, resourceKey = string.find(requestKey,"(%w+):(%w+)$")
+                                       redis.call('hSet',resourceKey,rType .. ':' .. rSession,rTime + rTTL)
+                                       -- In addition to invalidation logic, be sure to garbage collect
+                                       redis.call('expire',resourceKey,rMaxTTL)
+                               end
+                       end
+                       return failed
+LUA;
+                       $res = $conn->luaEval( $script,
+                               array_merge(
+                                       array_keys( $pathsByKey ), // KEYS[0], KEYS[1],...,KEYS[N]
+                                       [
+                                               $this->session, // ARGV[1]
+                                               $this->lockTTL, // ARGV[2]
+                                               self::MAX_LOCK_TTL, // ARGV[3]
+                                               time() // ARGV[4]
+                                       ]
+                               ),
+                               count( $pathsByKey ) # number of first argument(s) that are keys
+                       );
+               } catch ( RedisException $e ) {
+                       $res = false;
+                       $this->redisPool->handleError( $conn, $e );
+               }
+
+               if ( $res === false ) {
+                       foreach ( $pathList as $path ) {
+                               $status->fatal( 'lockmanager-fail-acquirelock', $path );
+                       }
+               } else {
+                       foreach ( $res as $key ) {
+                               $status->fatal( 'lockmanager-fail-acquirelock', $pathsByKey[$key] );
+                       }
+               }
+
+               return $status;
+       }
+
+       protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
+               $status = StatusValue::newGood();
+
+               $pathList = call_user_func_array( 'array_merge', array_values( $pathsByType ) );
+
+               $server = $this->lockServers[$lockSrv];
+               $conn = $this->redisPool->getConnection( $server, $this->logger );
+               if ( !$conn ) {
+                       foreach ( $pathList as $path ) {
+                               $status->fatal( 'lockmanager-fail-releaselock', $path );
+                       }
+
+                       return $status;
+               }
+
+               $pathsByKey = []; // (type:hash => path) map
+               foreach ( $pathsByType as $type => $paths ) {
+                       $typeString = ( $type == LockManager::LOCK_SH ) ? 'SH' : 'EX';
+                       foreach ( $paths as $path ) {
+                               $pathsByKey[$this->recordKeyForPath( $path, $typeString )] = $path;
+                       }
+               }
+
+               try {
+                       static $script =
+                       /** @lang Lua */
+<<<LUA
+                       local failed = {}
+                       -- Load input params (e.g. session)
+                       local rSession = unpack(ARGV)
+                       for i,requestKey in ipairs(KEYS) do
+                               local _, _, rType, resourceKey = string.find(requestKey,"(%w+):(%w+)$")
+                               local released = redis.call('hDel',resourceKey,rType .. ':' .. rSession)
+                               if released > 0 then
+                                       -- Remove the whole structure if it is now empty
+                                       if redis.call('hLen',resourceKey) == 0 then
+                                               redis.call('del',resourceKey)
+                                       end
+                               else
+                                       failed[#failed+1] = requestKey
+                               end
+                       end
+                       return failed
+LUA;
+                       $res = $conn->luaEval( $script,
+                               array_merge(
+                                       array_keys( $pathsByKey ), // KEYS[0], KEYS[1],...,KEYS[N]
+                                       [
+                                               $this->session, // ARGV[1]
+                                       ]
+                               ),
+                               count( $pathsByKey ) # number of first argument(s) that are keys
+                       );
+               } catch ( RedisException $e ) {
+                       $res = false;
+                       $this->redisPool->handleError( $conn, $e );
+               }
+
+               if ( $res === false ) {
+                       foreach ( $pathList as $path ) {
+                               $status->fatal( 'lockmanager-fail-releaselock', $path );
+                       }
+               } else {
+                       foreach ( $res as $key ) {
+                               $status->fatal( 'lockmanager-fail-releaselock', $pathsByKey[$key] );
+                       }
+               }
+
+               return $status;
+       }
+
+       protected function releaseAllLocks() {
+               return StatusValue::newGood(); // not supported
+       }
+
+       protected function isServerUp( $lockSrv ) {
+               $conn = $this->redisPool->getConnection( $this->lockServers[$lockSrv], $this->logger );
+
+               return (bool)$conn;
+       }
+
+       /**
+        * @param string $path
+        * @param string $type One of (EX,SH)
+        * @return string
+        */
+       protected function recordKeyForPath( $path, $type ) {
+               return implode( ':',
+                       [ __CLASS__, 'locks', "$type:" . $this->sha1Base36Absolute( $path ) ] );
+       }
+
+       /**
+        * Make sure remaining locks get cleared for sanity
+        */
+       function __destruct() {
+               while ( count( $this->locksHeld ) ) {
+                       $pathsByType = [];
+                       foreach ( $this->locksHeld as $path => $locks ) {
+                               foreach ( $locks as $type => $count ) {
+                                       $pathsByType[$type][] = $path;
+                               }
+                       }
+                       $this->unlockByType( $pathsByType );
+               }
+       }
+}
diff --git a/includes/libs/lockmanager/ScopedLock.php b/includes/libs/lockmanager/ScopedLock.php
new file mode 100644 (file)
index 0000000..ac8bee8
--- /dev/null
@@ -0,0 +1,107 @@
+<?php
+/**
+ * Resource locking handling.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup LockManager
+ * @author Aaron Schulz
+ */
+
+/**
+ * Self-releasing locks
+ *
+ * LockManager helper class to handle scoped locks, which
+ * release when an object is destroyed or goes out of scope.
+ *
+ * @ingroup LockManager
+ * @since 1.19
+ */
+class ScopedLock {
+       /** @var LockManager */
+       protected $manager;
+
+       /** @var StatusValue */
+       protected $status;
+
+       /** @var array Map of lock types to resource paths */
+       protected $pathsByType;
+
+       /**
+        * @param LockManager $manager
+        * @param array $pathsByType Map of lock types to path lists
+        * @param StatusValue $status
+        */
+       protected function __construct(
+               LockManager $manager, array $pathsByType, StatusValue $status
+       ) {
+               $this->manager = $manager;
+               $this->pathsByType = $pathsByType;
+               $this->status = $status;
+       }
+
+       /**
+        * Get a ScopedLock object representing a lock on resource paths.
+        * Any locks are released once this object goes out of scope.
+        * The StatusValue object is updated with any errors or warnings.
+        *
+        * @param LockManager $manager
+        * @param array $paths List of storage paths or map of lock types to path lists
+        * @param int|string $type LockManager::LOCK_* constant or "mixed" and $paths
+        *   can be a map of types to paths (since 1.22). Otherwise $type should be an
+        *   integer and $paths should be a list of paths.
+        * @param StatusValue $status
+        * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.22)
+        * @return ScopedLock|null Returns null on failure
+        */
+       public static function factory(
+               LockManager $manager, array $paths, $type, StatusValue $status, $timeout = 0
+       ) {
+               $pathsByType = is_integer( $type ) ? [ $type => $paths ] : $paths;
+               $lockStatus = $manager->lockByType( $pathsByType, $timeout );
+               $status->merge( $lockStatus );
+               if ( $lockStatus->isOK() ) {
+                       return new self( $manager, $pathsByType, $status );
+               }
+
+               return null;
+       }
+
+       /**
+        * Release a scoped lock and set any errors in the attatched StatusValue object.
+        * This is useful for early release of locks before function scope is destroyed.
+        * This is the same as setting the lock object to null.
+        *
+        * @param ScopedLock $lock
+        * @since 1.21
+        */
+       public static function release( ScopedLock &$lock = null ) {
+               $lock = null;
+       }
+
+       /**
+        * Release the locks when this goes out of scope
+        */
+       function __destruct() {
+               $wasOk = $this->status->isOK();
+               $this->status->merge( $this->manager->unlockByType( $this->pathsByType ) );
+               if ( $wasOk ) {
+                       // Make sure StatusValue is OK, despite any unlockFiles() fatals
+                       $this->status->setResult( true, $this->status->value );
+               }
+       }
+}
diff --git a/includes/libs/mime/IEContentAnalyzer.php b/includes/libs/mime/IEContentAnalyzer.php
new file mode 100644 (file)
index 0000000..0d1e527
--- /dev/null
@@ -0,0 +1,851 @@
+<?php
+/**
+ * Simulation of Microsoft Internet Explorer's MIME type detection algorithm.
+ *
+ * @file
+ * @todo Define the exact license of this file.
+ */
+
+/**
+ * This class simulates Microsoft Internet Explorer's terribly broken and
+ * insecure MIME type detection algorithm. It can be used to check web uploads
+ * with an apparently safe type, to see if IE will reinterpret them to produce
+ * something dangerous.
+ *
+ * It is full of bugs and strange design choices should not under any
+ * circumstances be used to determine a MIME type to present to a user or
+ * client. (Apple Safari developers, this means you too.)
+ *
+ * This class is based on a disassembly of IE 5.0, 6.0 and 7.0. Although I have
+ * attempted to ensure that this code works in exactly the same way as Internet
+ * Explorer, it does not share any source code, or creative choices such as
+ * variable names, thus I (Tim Starling) claim copyright on it.
+ *
+ * It may be redistributed without restriction. To aid reuse, this class does
+ * not depend on any MediaWiki module.
+ */
+class IEContentAnalyzer {
+       /**
+        * Relevant data taken from the type table in IE 5
+        */
+       protected $baseTypeTable = [
+               'ambiguous' /*1*/ => [
+                       'text/plain',
+                       'application/octet-stream',
+                       'application/x-netcdf', // [sic]
+               ],
+               'text' /*3*/ => [
+                       'text/richtext', 'image/x-bitmap', 'application/postscript', 'application/base64',
+                       'application/macbinhex40', 'application/x-cdf', 'text/scriptlet'
+               ],
+               'binary' /*4*/ => [
+                       'application/pdf', 'audio/x-aiff', 'audio/basic', 'audio/wav', 'image/gif',
+                       'image/pjpeg', 'image/jpeg', 'image/tiff', 'image/x-png', 'image/png', 'image/bmp',
+                       'image/x-jg', 'image/x-art', 'image/x-emf', 'image/x-wmf', 'video/avi',
+                       'video/x-msvideo', 'video/mpeg', 'application/x-compressed',
+                       'application/x-zip-compressed', 'application/x-gzip-compressed', 'application/java',
+                       'application/x-msdownload'
+               ],
+               'html' /*5*/ => [ 'text/html' ],
+       ];
+
+       /**
+        * Changes to the type table in later versions of IE
+        */
+       protected $addedTypes = [
+               'ie07' => [
+                       'text' => [ 'text/xml', 'application/xml' ]
+               ],
+       ];
+
+       /**
+        * An approximation of the "Content Type" values in HKEY_CLASSES_ROOT in a
+        * typical Windows installation.
+        *
+        * Used for extension to MIME type mapping if detection fails.
+        */
+       protected $registry = [
+               '.323' => 'text/h323',
+               '.3g2' => 'video/3gpp2',
+               '.3gp' => 'video/3gpp',
+               '.3gp2' => 'video/3gpp2',
+               '.3gpp' => 'video/3gpp',
+               '.aac' => 'audio/aac',
+               '.ac3' => 'audio/ac3',
+               '.accda' => 'application/msaccess',
+               '.accdb' => 'application/msaccess',
+               '.accdc' => 'application/msaccess',
+               '.accde' => 'application/msaccess',
+               '.accdr' => 'application/msaccess',
+               '.accdt' => 'application/msaccess',
+               '.ade' => 'application/msaccess',
+               '.adp' => 'application/msaccess',
+               '.adts' => 'audio/aac',
+               '.ai' => 'application/postscript',
+               '.aif' => 'audio/aiff',
+               '.aifc' => 'audio/aiff',
+               '.aiff' => 'audio/aiff',
+               '.amc' => 'application/x-mpeg',
+               '.application' => 'application/x-ms-application',
+               '.asf' => 'video/x-ms-asf',
+               '.asx' => 'video/x-ms-asf',
+               '.au' => 'audio/basic',
+               '.avi' => 'video/avi',
+               '.bmp' => 'image/bmp',
+               '.caf' => 'audio/x-caf',
+               '.cat' => 'application/vnd.ms-pki.seccat',
+               '.cbo' => 'application/sha',
+               '.cdda' => 'audio/aiff',
+               '.cer' => 'application/x-x509-ca-cert',
+               '.conf' => 'text/plain',
+               '.crl' => 'application/pkix-crl',
+               '.crt' => 'application/x-x509-ca-cert',
+               '.css' => 'text/css',
+               '.csv' => 'application/vnd.ms-excel',
+               '.der' => 'application/x-x509-ca-cert',
+               '.dib' => 'image/bmp',
+               '.dif' => 'video/x-dv',
+               '.dll' => 'application/x-msdownload',
+               '.doc' => 'application/msword',
+               '.docm' => 'application/vnd.ms-word.document.macroEnabled.12',
+               '.docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+               '.dot' => 'application/msword',
+               '.dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
+               '.dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
+               '.dv' => 'video/x-dv',
+               '.dwfx' => 'model/vnd.dwfx+xps',
+               '.edn' => 'application/vnd.adobe.edn',
+               '.eml' => 'message/rfc822',
+               '.eps' => 'application/postscript',
+               '.etd' => 'application/x-ebx',
+               '.exe' => 'application/x-msdownload',
+               '.fdf' => 'application/vnd.fdf',
+               '.fif' => 'application/fractals',
+               '.gif' => 'image/gif',
+               '.gsm' => 'audio/x-gsm',
+               '.hqx' => 'application/mac-binhex40',
+               '.hta' => 'application/hta',
+               '.htc' => 'text/x-component',
+               '.htm' => 'text/html',
+               '.html' => 'text/html',
+               '.htt' => 'text/webviewhtml',
+               '.hxa' => 'application/xml',
+               '.hxc' => 'application/xml',
+               '.hxd' => 'application/octet-stream',
+               '.hxe' => 'application/xml',
+               '.hxf' => 'application/xml',
+               '.hxh' => 'application/octet-stream',
+               '.hxi' => 'application/octet-stream',
+               '.hxk' => 'application/xml',
+               '.hxq' => 'application/octet-stream',
+               '.hxr' => 'application/octet-stream',
+               '.hxs' => 'application/octet-stream',
+               '.hxt' => 'application/xml',
+               '.hxv' => 'application/xml',
+               '.hxw' => 'application/octet-stream',
+               '.ico' => 'image/x-icon',
+               '.iii' => 'application/x-iphone',
+               '.ins' => 'application/x-internet-signup',
+               '.iqy' => 'text/x-ms-iqy',
+               '.isp' => 'application/x-internet-signup',
+               '.jfif' => 'image/jpeg',
+               '.jnlp' => 'application/x-java-jnlp-file',
+               '.jpe' => 'image/jpeg',
+               '.jpeg' => 'image/jpeg',
+               '.jpg' => 'image/jpeg',
+               '.jtx' => 'application/x-jtx+xps',
+               '.latex' => 'application/x-latex',
+               '.log' => 'text/plain',
+               '.m1v' => 'video/mpeg',
+               '.m2v' => 'video/mpeg',
+               '.m3u' => 'audio/x-mpegurl',
+               '.mac' => 'image/x-macpaint',
+               '.man' => 'application/x-troff-man',
+               '.mda' => 'application/msaccess',
+               '.mdb' => 'application/msaccess',
+               '.mde' => 'application/msaccess',
+               '.mfp' => 'application/x-shockwave-flash',
+               '.mht' => 'message/rfc822',
+               '.mhtml' => 'message/rfc822',
+               '.mid' => 'audio/mid',
+               '.midi' => 'audio/mid',
+               '.mod' => 'video/mpeg',
+               '.mov' => 'video/quicktime',
+               '.mp2' => 'video/mpeg',
+               '.mp2v' => 'video/mpeg',
+               '.mp3' => 'audio/mpeg',
+               '.mp4' => 'video/mp4',
+               '.mpa' => 'video/mpeg',
+               '.mpe' => 'video/mpeg',
+               '.mpeg' => 'video/mpeg',
+               '.mpf' => 'application/vnd.ms-mediapackage',
+               '.mpg' => 'video/mpeg',
+               '.mpv2' => 'video/mpeg',
+               '.mqv' => 'video/quicktime',
+               '.NMW' => 'application/nmwb',
+               '.nws' => 'message/rfc822',
+               '.odc' => 'text/x-ms-odc',
+               '.ols' => 'application/vnd.ms-publisher',
+               '.p10' => 'application/pkcs10',
+               '.p12' => 'application/x-pkcs12',
+               '.p7b' => 'application/x-pkcs7-certificates',
+               '.p7c' => 'application/pkcs7-mime',
+               '.p7m' => 'application/pkcs7-mime',
+               '.p7r' => 'application/x-pkcs7-certreqresp',
+               '.p7s' => 'application/pkcs7-signature',
+               '.pct' => 'image/pict',
+               '.pdf' => 'application/pdf',
+               '.pdx' => 'application/vnd.adobe.pdx',
+               '.pfx' => 'application/x-pkcs12',
+               '.pic' => 'image/pict',
+               '.pict' => 'image/pict',
+               '.pinstall' => 'application/x-picasa-detect',
+               '.pko' => 'application/vnd.ms-pki.pko',
+               '.png' => 'image/png',
+               '.pnt' => 'image/x-macpaint',
+               '.pntg' => 'image/x-macpaint',
+               '.pot' => 'application/vnd.ms-powerpoint',
+               '.potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12',
+               '.potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
+               '.ppa' => 'application/vnd.ms-powerpoint',
+               '.ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
+               '.pps' => 'application/vnd.ms-powerpoint',
+               '.ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
+               '.ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
+               '.ppt' => 'application/vnd.ms-powerpoint',
+               '.pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
+               '.pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+               '.prf' => 'application/pics-rules',
+               '.ps' => 'application/postscript',
+               '.pub' => 'application/vnd.ms-publisher',
+               '.pwz' => 'application/vnd.ms-powerpoint',
+               '.py' => 'text/plain',
+               '.pyw' => 'text/plain',
+               '.qht' => 'text/x-html-insertion',
+               '.qhtm' => 'text/x-html-insertion',
+               '.qt' => 'video/quicktime',
+               '.qti' => 'image/x-quicktime',
+               '.qtif' => 'image/x-quicktime',
+               '.qtl' => 'application/x-quicktimeplayer',
+               '.rat' => 'application/rat-file',
+               '.rmf' => 'application/vnd.adobe.rmf',
+               '.rmi' => 'audio/mid',
+               '.rqy' => 'text/x-ms-rqy',
+               '.rtf' => 'application/msword',
+               '.sct' => 'text/scriptlet',
+               '.sd2' => 'audio/x-sd2',
+               '.sdp' => 'application/sdp',
+               '.shtml' => 'text/html',
+               '.sit' => 'application/x-stuffit',
+               '.sldm' => 'application/vnd.ms-powerpoint.slide.macroEnabled.12',
+               '.sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
+               '.slk' => 'application/vnd.ms-excel',
+               '.snd' => 'audio/basic',
+               '.so' => 'application/x-apachemodule',
+               '.sol' => 'text/plain',
+               '.sor' => 'text/plain',
+               '.spc' => 'application/x-pkcs7-certificates',
+               '.spl' => 'application/futuresplash',
+               '.sst' => 'application/vnd.ms-pki.certstore',
+               '.stl' => 'application/vnd.ms-pki.stl',
+               '.swf' => 'application/x-shockwave-flash',
+               '.thmx' => 'application/vnd.ms-officetheme',
+               '.tif' => 'image/tiff',
+               '.tiff' => 'image/tiff',
+               '.txt' => 'text/plain',
+               '.uls' => 'text/iuls',
+               '.vcf' => 'text/x-vcard',
+               '.vdx' => 'application/vnd.ms-visio.viewer',
+               '.vsd' => 'application/vnd.ms-visio.viewer',
+               '.vss' => 'application/vnd.ms-visio.viewer',
+               '.vst' => 'application/vnd.ms-visio.viewer',
+               '.vsx' => 'application/vnd.ms-visio.viewer',
+               '.vtx' => 'application/vnd.ms-visio.viewer',
+               '.wav' => 'audio/wav',
+               '.wax' => 'audio/x-ms-wax',
+               '.wbk' => 'application/msword',
+               '.wdp' => 'image/vnd.ms-photo',
+               '.wiz' => 'application/msword',
+               '.wm' => 'video/x-ms-wm',
+               '.wma' => 'audio/x-ms-wma',
+               '.wmd' => 'application/x-ms-wmd',
+               '.wmv' => 'video/x-ms-wmv',
+               '.wmx' => 'video/x-ms-wmx',
+               '.wmz' => 'application/x-ms-wmz',
+               '.wpl' => 'application/vnd.ms-wpl',
+               '.wsc' => 'text/scriptlet',
+               '.wvx' => 'video/x-ms-wvx',
+               '.xaml' => 'application/xaml+xml',
+               '.xbap' => 'application/x-ms-xbap',
+               '.xdp' => 'application/vnd.adobe.xdp+xml',
+               '.xfdf' => 'application/vnd.adobe.xfdf',
+               '.xht' => 'application/xhtml+xml',
+               '.xhtml' => 'application/xhtml+xml',
+               '.xla' => 'application/vnd.ms-excel',
+               '.xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
+               '.xlk' => 'application/vnd.ms-excel',
+               '.xll' => 'application/vnd.ms-excel',
+               '.xlm' => 'application/vnd.ms-excel',
+               '.xls' => 'application/vnd.ms-excel',
+               '.xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
+               '.xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
+               '.xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+               '.xlt' => 'application/vnd.ms-excel',
+               '.xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
+               '.xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
+               '.xlw' => 'application/vnd.ms-excel',
+               '.xml' => 'text/xml',
+               '.xps' => 'application/vnd.ms-xpsdocument',
+               '.xsl' => 'text/xml',
+       ];
+
+       /**
+        * IE versions which have been analysed to bring you this class, and for
+        * which some substantive difference exists. These will appear as keys
+        * in the return value of getRealMimesFromData(). The names are chosen to sort correctly.
+        */
+       protected $versions = [ 'ie05', 'ie06', 'ie07', 'ie07.strict', 'ie07.nohtml' ];
+
+       /**
+        * Type table with versions expanded
+        */
+       protected $typeTable = [];
+
+       /** constructor */
+       function __construct() {
+               // Construct versioned type arrays from the base type array plus additions
+               $types = $this->baseTypeTable;
+               foreach ( $this->versions as $version ) {
+                       if ( isset( $this->addedTypes[$version] ) ) {
+                               foreach ( $this->addedTypes[$version] as $format => $addedTypes ) {
+                                       $types[$format] = array_merge( $types[$format], $addedTypes );
+                               }
+                       }
+                       $this->typeTable[$version] = $types;
+               }
+       }
+
+       /**
+        * Get the MIME types from getMimesFromData(), but convert the result from IE's
+        * idiosyncratic private types into something other apps will understand.
+        *
+        * @param string $fileName the file name (unused at present)
+        * @param string $chunk the first 256 bytes of the file
+        * @param string $proposed the MIME type proposed by the server
+        *
+        * @return Array: map of IE version to detected MIME type
+        */
+       public function getRealMimesFromData( $fileName, $chunk, $proposed ) {
+               $types = $this->getMimesFromData( $fileName, $chunk, $proposed );
+               $types = array_map( [ $this, 'translateMimeType' ], $types );
+               return $types;
+       }
+
+       /**
+        * Translate a MIME type from IE's idiosyncratic private types into
+        * more commonly understood type strings
+        * @param $type
+        * @return string
+        */
+       public function translateMimeType( $type ) {
+               static $table = [
+                       'image/pjpeg' => 'image/jpeg',
+                       'image/x-png' => 'image/png',
+                       'image/x-wmf' => 'application/x-msmetafile',
+                       'image/bmp' => 'image/x-bmp',
+                       'application/x-zip-compressed' => 'application/zip',
+                       'application/x-compressed' => 'application/x-compress',
+                       'application/x-gzip-compressed' => 'application/x-gzip',
+                       'audio/mid' => 'audio/midi',
+               ];
+               if ( isset( $table[$type] ) ) {
+                       $type = $table[$type];
+               }
+               return $type;
+       }
+
+       /**
+        * Get the untranslated MIME types for all known versions
+        *
+        * @param string $fileName the file name (unused at present)
+        * @param string $chunk the first 256 bytes of the file
+        * @param string $proposed the MIME type proposed by the server
+        *
+        * @return Array: map of IE version to detected MIME type
+        */
+       public function getMimesFromData( $fileName, $chunk, $proposed ) {
+               $types = [];
+               foreach ( $this->versions as $version ) {
+                       $types[$version] = $this->getMimeTypeForVersion( $version, $fileName, $chunk, $proposed );
+               }
+               return $types;
+       }
+
+       /**
+        * Get the MIME type for a given named version
+        * @param $version
+        * @param $fileName
+        * @param $chunk
+        * @param $proposed
+        * @return bool|string
+        */
+       protected function getMimeTypeForVersion( $version, $fileName, $chunk, $proposed ) {
+               // Strip text after a semicolon
+               $semiPos = strpos( $proposed, ';' );
+               if ( $semiPos !== false ) {
+                       $proposed = substr( $proposed, 0, $semiPos );
+               }
+
+               $proposedFormat = $this->getDataFormat( $version, $proposed );
+               if ( $proposedFormat == 'unknown'
+                       && $proposed != 'multipart/mixed'
+                       && $proposed != 'multipart/x-mixed-replace' )
+               {
+                       return $proposed;
+               }
+               if ( strval( $chunk ) === '' ) {
+                       return $proposed;
+               }
+
+               // Truncate chunk at 255 bytes
+               $chunk = substr( $chunk, 0, 255 );
+
+               // IE does the Check*Headers() calls last, and instead does the following image
+               // type checks by directly looking for the magic numbers. What I do here should
+               // have the same effect since the magic number checks are identical in both cases.
+               $result = $this->sampleData( $version, $chunk );
+               $sampleFound = $result['found'];
+               $counters = $result['counters'];
+               $binaryType = $this->checkBinaryHeaders( $version, $chunk );
+               $textType = $this->checkTextHeaders( $version, $chunk );
+
+               if ( $proposed == 'text/html' && isset( $sampleFound['html'] ) ) {
+                       return 'text/html';
+               }
+               if ( $proposed == 'image/gif' && $binaryType == 'image/gif' ) {
+                       return 'image/gif';
+               }
+               if ( ( $proposed == 'image/pjpeg' || $proposed == 'image/jpeg' )
+                       && $binaryType == 'image/pjpeg' )
+               {
+                       return $proposed;
+               }
+               // PNG check added in IE 7
+               if ( $version >= 'ie07'
+                       && ( $proposed == 'image/x-png' || $proposed == 'image/png' )
+                       && $binaryType == 'image/x-png' )
+               {
+                       return $proposed;
+               }
+
+               // CDF was removed in IE 7 so it won't be in $sampleFound for later versions
+               if ( isset( $sampleFound['cdf'] ) ) {
+                       return 'application/x-cdf';
+               }
+
+               // RSS and Atom were added in IE 7 so they won't be in $sampleFound for
+               // previous versions
+               if ( isset( $sampleFound['rss'] ) ) {
+                       return 'application/rss+xml';
+               }
+               if ( isset( $sampleFound['rdf-tag'] )
+                       && isset( $sampleFound['rdf-url'] )
+                       && isset( $sampleFound['rdf-purl'] ) )
+               {
+                       return 'application/rss+xml';
+               }
+               if ( isset( $sampleFound['atom'] ) ) {
+                       return 'application/atom+xml';
+               }
+
+               if ( isset( $sampleFound['xml'] ) ) {
+                       // TODO: I'm not sure under what circumstances this flag is enabled
+                       if ( strpos( $version, 'strict' ) !== false ) {
+                               if ( $proposed == 'text/html' || $proposed == 'text/xml' ) {
+                                       return 'text/xml';
+                               }
+                       } else {
+                               return 'text/xml';
+                       }
+               }
+               if ( isset( $sampleFound['html'] ) ) {
+                       // TODO: I'm not sure under what circumstances this flag is enabled
+                       if ( strpos( $version, 'nohtml' ) !== false ) {
+                               if ( $proposed == 'text/plain' ) {
+                                       return 'text/html';
+                               }
+                       } else {
+                               return 'text/html';
+                       }
+               }
+               if ( isset( $sampleFound['xbm'] ) ) {
+                       return 'image/x-bitmap';
+               }
+               if ( isset( $sampleFound['binhex'] ) ) {
+                       return 'application/macbinhex40';
+               }
+               if ( isset( $sampleFound['scriptlet'] ) ) {
+                       if ( strpos( $version, 'strict' ) !== false ) {
+                               if ( $proposed == 'text/plain' || $proposed == 'text/scriptlet' ) {
+                                       return 'text/scriptlet';
+                               }
+                       } else {
+                               return 'text/scriptlet';
+                       }
+               }
+
+               // Freaky heuristics to determine if the data is text or binary
+               // The heuristic is of course broken for non-ASCII text
+               if ( $counters['ctrl'] != 0 && ( $counters['ff'] + $counters['low'] )
+                       < ( $counters['ctrl'] + $counters['high'] ) * 16 )
+               {
+                       $kindOfBinary = true;
+                       $type = $binaryType ? $binaryType : $textType;
+                       if ( $type === false ) {
+                               $type = 'application/octet-stream';
+                       }
+               } else {
+                       $kindOfBinary = false;
+                       $type = $textType ? $textType : $binaryType;
+                       if ( $type === false ) {
+                               $type = 'text/plain';
+                       }
+               }
+
+               // Check if the output format is ambiguous
+               // This generally means that detection failed, real types aren't ambiguous
+               $detectedFormat = $this->getDataFormat( $version, $type );
+               if ( $detectedFormat != 'ambiguous' ) {
+                       return $type;
+               }
+
+               if ( $proposedFormat != 'ambiguous' ) {
+                       // FormatAgreesWithData()
+                       if ( $proposedFormat == 'text' && !$kindOfBinary ) {
+                               return $proposed;
+                       }
+                       if ( $proposedFormat == 'binary' && $kindOfBinary ) {
+                               return $proposed;
+                       }
+                       if ( $proposedFormat == 'html' ) {
+                               return $proposed;
+                       }
+               }
+
+               // Find a MIME type by searching the registry for the file extension.
+               $dotPos = strrpos( $fileName, '.' );
+               if ( $dotPos === false ) {
+                       return $type;
+               }
+               $ext = substr( $fileName, $dotPos );
+               if ( isset( $this->registry[$ext] ) ) {
+                       return $this->registry[$ext];
+               }
+
+               // TODO: If the extension has an application registered to it, IE will return
+               // application/octet-stream. We'll skip that, so we could erroneously
+               // return text/plain or application/x-netcdf where application/octet-stream
+               // would be correct.
+
+               return $type;
+       }
+
+       /**
+        * Check for text headers at the start of the chunk
+        * Confirmed same in 5 and 7.
+        * @param $version
+        * @param $chunk
+        * @return bool|string
+        */
+       private function checkTextHeaders( $version, $chunk ) {
+               $chunk2 = substr( $chunk, 0, 2 );
+               $chunk4 = substr( $chunk, 0, 4 );
+               $chunk5 = substr( $chunk, 0, 5 );
+               if ( $chunk4 == '%PDF' ) {
+                       return 'application/pdf';
+               }
+               if ( $chunk2 == '%!' ) {
+                       return 'application/postscript';
+               }
+               if ( $chunk5 == '{\\rtf' ) {
+                       return 'text/richtext';
+               }
+               if ( $chunk5 == 'begin' ) {
+                       return 'application/base64';
+               }
+               return false;
+       }
+
+       /**
+        * Check for binary headers at the start of the chunk
+        * Confirmed same in 5 and 7.
+        * @param $version
+        * @param $chunk
+        * @return bool|string
+        */
+       private function checkBinaryHeaders( $version, $chunk ) {
+               $chunk2 = substr( $chunk, 0, 2 );
+               $chunk3 = substr( $chunk, 0, 3 );
+               $chunk4 = substr( $chunk, 0, 4 );
+               $chunk5 = substr( $chunk, 0, 5 );
+               $chunk5uc = strtoupper( $chunk5 );
+               $chunk8 = substr( $chunk, 0, 8 );
+               if ( $chunk5uc == 'GIF87' || $chunk5uc == 'GIF89' ) {
+                       return 'image/gif';
+               }
+               if ( $chunk2 == "\xff\xd8" ) {
+                       return 'image/pjpeg'; // actually plain JPEG but this is what IE returns
+               }
+
+               if ( $chunk2 == 'BM'
+                       && substr( $chunk, 6, 2 ) == "\000\000"
+                       && substr( $chunk, 8, 2 ) == "\000\000" )
+               {
+                       return 'image/bmp'; // another non-standard MIME
+               }
+               if ( $chunk4 == 'RIFF'
+                       && substr( $chunk, 8, 4 ) == 'WAVE' )
+               {
+                       return 'audio/wav';
+               }
+               // These were integer literals in IE
+               // Perhaps the author was not sure what the target endianness was
+               if ( $chunk4 == ".sd\000"
+                       || $chunk4 == ".snd"
+                       || $chunk4 == "\000ds."
+                       || $chunk4 == "dns." )
+               {
+                       return 'audio/basic';
+               }
+               if ( $chunk3 == "MM\000" ) {
+                       return 'image/tiff';
+               }
+               if ( $chunk2 == 'MZ' ) {
+                       return 'application/x-msdownload';
+               }
+               if ( $chunk8 == "\x89PNG\x0d\x0a\x1a\x0a" ) {
+                       return 'image/x-png'; // [sic]
+               }
+               if ( strlen( $chunk ) >= 5 ) {
+                       $byte2 = ord( $chunk[2] );
+                       $byte4 = ord( $chunk[4] );
+                       if ( $byte2 >= 3 && $byte2 <= 31 && $byte4 == 0 && $chunk2 == 'JG' ) {
+                               return 'image/x-jg';
+                       }
+               }
+               // More endian confusion?
+               if ( $chunk4 == 'MROF' ) {
+                       return 'audio/x-aiff';
+               }
+               $chunk4_8 = substr( $chunk, 8, 4 );
+               if ( $chunk4 == 'FORM' && ( $chunk4_8 == 'AIFF' || $chunk4_8 == 'AIFC' ) ) {
+                       return 'audio/x-aiff';
+               }
+               if ( $chunk4 == 'RIFF' && $chunk4_8 == 'AVI ' ) {
+                       return 'video/avi';
+               }
+               if ( $chunk4 == "\x00\x00\x01\xb3" || $chunk4 == "\x00\x00\x01\xba" ) {
+                       return 'video/mpeg';
+               }
+               if ( $chunk4 == "\001\000\000\000"
+                       && substr( $chunk, 40, 4 ) == ' EMF' )
+               {
+                       return 'image/x-emf';
+               }
+               if ( $chunk4 == "\xd7\xcd\xc6\x9a" ) {
+                       return 'image/x-wmf';
+               }
+               if ( $chunk4 == "\xca\xfe\xba\xbe" ) {
+                       return 'application/java';
+               }
+               if ( $chunk2 == 'PK' ) {
+                       return 'application/x-zip-compressed';
+               }
+               if ( $chunk2 == "\x1f\x9d" ) {
+                       return 'application/x-compressed';
+               }
+               if ( $chunk2 == "\x1f\x8b" ) {
+                       return 'application/x-gzip-compressed';
+               }
+               // Skip redundant check for ZIP
+               if ( $chunk5 == "MThd\000" ) {
+                       return 'audio/mid';
+               }
+               if ( $chunk4 == '%PDF' ) {
+                       return 'application/pdf';
+               }
+               return false;
+       }
+
+       /**
+        * Do heuristic checks on the bulk of the data sample.
+        * Search for HTML tags.
+        * @param $version
+        * @param $chunk
+        * @return array
+        */
+       protected function sampleData( $version, $chunk ) {
+               $found = [];
+               $counters = [
+                       'ctrl' => 0,
+                       'high' => 0,
+                       'low' => 0,
+                       'lf' => 0,
+                       'cr' => 0,
+                       'ff' => 0
+               ];
+               $htmlTags = [
+                       'html',
+                       'head',
+                       'title',
+                       'body',
+                       'script',
+                       'a href',
+                       'pre',
+                       'img',
+                       'plaintext',
+                       'table'
+               ];
+               $rdfUrl = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
+               $rdfPurl = 'http://purl.org/rss/1.0/';
+               $xbmMagic1 = '#define';
+               $xbmMagic2 = '_width';
+               $xbmMagic3 = '_bits';
+               $binhexMagic = 'converted with BinHex';
+               $chunkLength = strlen( $chunk );
+
+               for ( $offset = 0; $offset < $chunkLength; $offset++ ) {
+                       $curChar = $chunk[$offset];
+                       if ( $curChar == "\x0a" ) {
+                               $counters['lf']++;
+                               continue;
+                       } elseif ( $curChar == "\x0d" ) {
+                               $counters['cr']++;
+                               continue;
+                       } elseif ( $curChar == "\x0c" ) {
+                               $counters['ff']++;
+                               continue;
+                       } elseif ( $curChar == "\t" ) {
+                               $counters['low']++;
+                               continue;
+                       } elseif ( ord( $curChar ) < 32 ) {
+                               $counters['ctrl']++;
+                               continue;
+                       } elseif ( ord( $curChar ) >= 128 ) {
+                               $counters['high']++;
+                               continue;
+                       }
+
+                       $counters['low']++;
+                       if ( $curChar == '<' ) {
+                               // XML
+                               $remainder = substr( $chunk, $offset + 1 );
+                               if ( !strncasecmp( $remainder, '?XML', 4 ) ) {
+                                       $nextChar = substr( $chunk, $offset + 5, 1 );
+                                       if ( $nextChar == ':' || $nextChar == ' ' || $nextChar == "\t" ) {
+                                               $found['xml'] = true;
+                                       }
+                               }
+                               // Scriptlet (JSP)
+                               if ( !strncasecmp( $remainder, 'SCRIPTLET', 9 ) ) {
+                                       $found['scriptlet'] = true;
+                                       break;
+                               }
+                               // HTML
+                               foreach ( $htmlTags as $tag ) {
+                                       if ( !strncasecmp( $remainder, $tag, strlen( $tag ) ) ) {
+                                               $found['html'] = true;
+                                       }
+                               }
+                               // Skip broken check for additional tags (HR etc.)
+
+                               // CHANNEL replaced by RSS, RDF and FEED in IE 7
+                               if ( $version < 'ie07' ) {
+                                       if ( !strncasecmp( $remainder, 'CHANNEL', 7 ) ) {
+                                               $found['cdf'] = true;
+                                       }
+                               } else {
+                                       // RSS
+                                       if ( !strncasecmp( $remainder, 'RSS', 3 ) ) {
+                                               $found['rss'] = true;
+                                               break; // return from SampleData
+                                       }
+                                       if ( !strncasecmp( $remainder, 'rdf:RDF', 7 ) ) {
+                                               $found['rdf-tag'] = true;
+                                               // no break
+                                       }
+                                       if ( !strncasecmp( $remainder, 'FEED', 4 ) ) {
+                                               $found['atom'] = true;
+                                               break;
+                                       }
+                               }
+                               continue;
+                       }
+                       // Skip broken check for -->
+
+                       // RSS URL checks
+                       // For some reason both URLs must appear before it is recognised
+                       $remainder = substr( $chunk, $offset );
+                       if ( !strncasecmp( $remainder, $rdfUrl, strlen( $rdfUrl ) ) ) {
+                               $found['rdf-url'] = true;
+                               if ( isset( $found['rdf-tag'] )
+                                       && isset( $found['rdf-purl'] ) ) // [sic]
+                               {
+                                       break;
+                               }
+                               continue;
+                       }
+
+                       if ( !strncasecmp( $remainder, $rdfPurl, strlen( $rdfPurl ) ) ) {
+                               if ( isset( $found['rdf-tag'] )
+                                       && isset( $found['rdf-url'] ) ) // [sic]
+                               {
+                                       break;
+                               }
+                               continue;
+                       }
+
+                       // XBM checks
+                       if ( !strncasecmp( $remainder, $xbmMagic1, strlen( $xbmMagic1 ) ) ) {
+                               $found['xbm1'] = true;
+                               continue;
+                       }
+                       if ( $curChar == '_' ) {
+                               if ( isset( $found['xbm2'] ) ) {
+                                       if ( !strncasecmp( $remainder, $xbmMagic3, strlen( $xbmMagic3 ) ) ) {
+                                               $found['xbm'] = true;
+                                               break;
+                                       }
+                               } elseif ( isset( $found['xbm1'] ) ) {
+                                       if ( !strncasecmp( $remainder, $xbmMagic2, strlen( $xbmMagic2 ) ) ) {
+                                               $found['xbm2'] = true;
+                                       }
+                               }
+                       }
+
+                       // BinHex
+                       if ( !strncmp( $remainder, $binhexMagic, strlen( $binhexMagic ) ) ) {
+                               $found['binhex'] = true;
+                       }
+               }
+               return [ 'found' => $found, 'counters' => $counters ];
+       }
+
+       /**
+        * @param $version
+        * @param $type
+        * @return int|string
+        */
+       protected function getDataFormat( $version, $type ) {
+               $types = $this->typeTable[$version];
+               if ( $type == '(null)' || strval( $type ) === '' ) {
+                       return 'ambiguous';
+               }
+               foreach ( $types as $format => $list ) {
+                       if ( in_array( $type, $list ) ) {
+                               return $format;
+                       }
+               }
+               return 'unknown';
+       }
+}
diff --git a/includes/libs/mime/MimeAnalyzer.php b/includes/libs/mime/MimeAnalyzer.php
new file mode 100644 (file)
index 0000000..5f4d7c9
--- /dev/null
@@ -0,0 +1,1166 @@
+<?php
+/**
+ * Module defining helper functions for detecting and dealing with MIME types.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Implements functions related to MIME types such as detection and mapping to file extension
+ *
+ * @since 1.28
+ */
+class MimeAnalyzer implements LoggerAwareInterface {
+       /** @var string */
+       protected $typeFile;
+       /** @var string */
+       protected $infoFile;
+       /** @var string */
+       protected $xmlTypes;
+       /** @var callable */
+       protected $initCallback;
+       /** @var callable */
+       protected $detectCallback;
+       /** @var callable */
+       protected $guessCallback;
+       /** @var callable */
+       protected $extCallback;
+       /** @var array Mapping of media types to arrays of MIME types */
+       protected $mediaTypes = null;
+       /** @var array Map of MIME type aliases */
+       protected $mimeTypeAliases = null;
+       /** @var array Map of MIME types to file extensions (as a space separated list) */
+       protected $mimetoExt = null;
+
+       /** @var array Map of file extensions types to MIME types (as a space separated list) */
+       public $mExtToMime = null; // legacy name; field accessed by hooks
+
+       /** @var IEContentAnalyzer */
+       protected $IEAnalyzer;
+
+       /** @var string Extra MIME types, set for example by media handling extensions */
+       private $extraTypes = '';
+       /** @var string Extra MIME info, set for example by media handling extensions */
+       private $extraInfo = '';
+
+       /** @var LoggerInterface */
+       private $logger;
+
+       /**
+        * Defines a set of well known MIME types
+        * This is used as a fallback to mime.types files.
+        * An extensive list of well known MIME types is provided by
+        * the file mime.types in the includes directory.
+        *
+        * This list concatenated with mime.types is used to create a MIME <-> ext
+        * map. Each line contains a MIME type followed by a space separated list of
+        * extensions. If multiple extensions for a single MIME type exist or if
+        * multiple MIME types exist for a single extension then in most cases
+        * MediaWiki assumes that the first extension following the MIME type is the
+        * canonical extension, and the first time a MIME type appears for a certain
+        * extension is considered the canonical MIME type.
+        *
+        * (Note that appending the type file list to the end of self::$wellKnownTypes
+        * sucks because you can't redefine canonical types. This could be fixed by
+        * appending self::$wellKnownTypes behind type file list, but who knows
+        * what will break? In practice this probably isn't a problem anyway -- Bryan)
+        */
+       protected static $wellKnownTypes = <<<EOT
+application/ogg ogx ogg ogm ogv oga spx
+application/pdf pdf
+application/vnd.oasis.opendocument.chart odc
+application/vnd.oasis.opendocument.chart-template otc
+application/vnd.oasis.opendocument.database odb
+application/vnd.oasis.opendocument.formula odf
+application/vnd.oasis.opendocument.formula-template otf
+application/vnd.oasis.opendocument.graphics odg
+application/vnd.oasis.opendocument.graphics-template otg
+application/vnd.oasis.opendocument.image odi
+application/vnd.oasis.opendocument.image-template oti
+application/vnd.oasis.opendocument.presentation odp
+application/vnd.oasis.opendocument.presentation-template otp
+application/vnd.oasis.opendocument.spreadsheet ods
+application/vnd.oasis.opendocument.spreadsheet-template ots
+application/vnd.oasis.opendocument.text odt
+application/vnd.oasis.opendocument.text-master otm
+application/vnd.oasis.opendocument.text-template ott
+application/vnd.oasis.opendocument.text-web oth
+application/javascript js
+application/x-shockwave-flash swf
+audio/midi mid midi kar
+audio/mpeg mpga mpa mp2 mp3
+audio/x-aiff aif aiff aifc
+audio/x-wav wav
+audio/ogg oga spx ogg
+image/x-bmp bmp
+image/gif gif
+image/jpeg jpeg jpg jpe
+image/png png
+image/svg+xml svg
+image/svg svg
+image/tiff tiff tif
+image/vnd.djvu djvu
+image/x.djvu djvu
+image/x-djvu djvu
+image/x-portable-pixmap ppm
+image/x-xcf xcf
+text/plain txt
+text/html html htm
+video/ogg ogv ogm ogg
+video/mpeg mpg mpeg
+EOT;
+
+       /**
+        * Defines a set of well known MIME info entries
+        * This is used as a fallback to mime.info files.
+        * An extensive list of well known MIME types is provided by
+        * the file mime.info in the includes directory.
+        */
+       protected static $wellKnownInfo = <<<EOT
+application/pdf [OFFICE]
+application/vnd.oasis.opendocument.chart [OFFICE]
+application/vnd.oasis.opendocument.chart-template [OFFICE]
+application/vnd.oasis.opendocument.database [OFFICE]
+application/vnd.oasis.opendocument.formula [OFFICE]
+application/vnd.oasis.opendocument.formula-template [OFFICE]
+application/vnd.oasis.opendocument.graphics [OFFICE]
+application/vnd.oasis.opendocument.graphics-template [OFFICE]
+application/vnd.oasis.opendocument.image [OFFICE]
+application/vnd.oasis.opendocument.image-template [OFFICE]
+application/vnd.oasis.opendocument.presentation [OFFICE]
+application/vnd.oasis.opendocument.presentation-template [OFFICE]
+application/vnd.oasis.opendocument.spreadsheet [OFFICE]
+application/vnd.oasis.opendocument.spreadsheet-template [OFFICE]
+application/vnd.oasis.opendocument.text [OFFICE]
+application/vnd.oasis.opendocument.text-template [OFFICE]
+application/vnd.oasis.opendocument.text-master [OFFICE]
+application/vnd.oasis.opendocument.text-web [OFFICE]
+application/javascript text/javascript application/x-javascript [EXECUTABLE]
+application/x-shockwave-flash [MULTIMEDIA]
+audio/midi [AUDIO]
+audio/x-aiff [AUDIO]
+audio/x-wav [AUDIO]
+audio/mp3 audio/mpeg [AUDIO]
+application/ogg audio/ogg video/ogg [MULTIMEDIA]
+image/x-bmp image/x-ms-bmp image/bmp [BITMAP]
+image/gif [BITMAP]
+image/jpeg [BITMAP]
+image/png [BITMAP]
+image/svg+xml [DRAWING]
+image/tiff [BITMAP]
+image/vnd.djvu [BITMAP]
+image/x-xcf [BITMAP]
+image/x-portable-pixmap [BITMAP]
+text/plain [TEXT]
+text/html [TEXT]
+video/ogg [VIDEO]
+video/mpeg [VIDEO]
+unknown/unknown application/octet-stream application/x-empty [UNKNOWN]
+EOT;
+
+       /**
+        * @param array $params Configuration map, includes:
+        *   - typeFile: path to file with the list of known MIME types
+        *   - infoFile: path to file with the MIME type info
+        *   - xmlTypes: map of root element names to XML MIME types
+        *   - initCallback: initialization callback that is passed this object [optional]
+        *   - detectCallback: alternative to finfo that returns the mime type for a file.
+        *      For example, the callback can return the output of "file -bi". [optional]
+        *   - guessCallback: callback to improve the guessed MIME type using the file data.
+        *      This is intended for fixing mistakes in fileinfo or "detectCallback". [optional]
+        *   - extCallback: callback to improve the guessed MIME type using the extension. [optional]
+        *   - logger: PSR-3 logger [optional]
+        * @note Constructing these instances is expensive due to file reads.
+        *  A service or singleton pattern should be used to avoid creating instances again and again.
+        */
+       public function __construct( array $params ) {
+               $this->typeFile = $params['typeFile'];
+               $this->infoFile = $params['infoFile'];
+               $this->xmlTypes = $params['xmlTypes'];
+               $this->initCallback = isset( $params['initCallback'] )
+                       ? $params['initCallback']
+                       : null;
+               $this->detectCallback = isset( $params['detectCallback'] )
+                       ? $params['detectCallback']
+                       : null;
+               $this->guessCallback = isset( $params['guessCallback'] )
+                       ? $params['guessCallback']
+                       : null;
+               $this->extCallback = isset( $params['extCallback'] )
+                       ? $params['extCallback']
+                       : null;
+               $this->logger = isset( $params['logger'] )
+                       ? $params['logger']
+                       : new \Psr\Log\NullLogger();
+
+               $this->loadFiles();
+       }
+
+       protected function loadFiles() {
+               /**
+                *   --- load mime.types ---
+                */
+
+               # Allow media handling extensions adding MIME-types and MIME-info
+               if ( $this->initCallback ) {
+                       call_user_func( $this->initCallback, $this );
+               }
+
+               $types = self::$wellKnownTypes;
+
+               $mimeTypeFile = $this->typeFile;
+               if ( $mimeTypeFile ) {
+                       if ( is_file( $mimeTypeFile ) && is_readable( $mimeTypeFile ) ) {
+                               $this->logger->info( __METHOD__ . ": loading mime types from $mimeTypeFile\n" );
+                               $types .= "\n";
+                               $types .= file_get_contents( $mimeTypeFile );
+                       } else {
+                               $this->logger->info( __METHOD__ . ": can't load mime types from $mimeTypeFile\n" );
+                       }
+               } else {
+                       $this->logger->info( __METHOD__ .
+                               ": no mime types file defined, using built-ins only.\n" );
+               }
+
+               $types .= "\n" . $this->extraTypes;
+
+               $types = str_replace( [ "\r\n", "\n\r", "\n\n", "\r\r", "\r" ], "\n", $types );
+               $types = str_replace( "\t", " ", $types );
+
+               $this->mimetoExt = [];
+               $this->mExtToMime = [];
+
+               $lines = explode( "\n", $types );
+               foreach ( $lines as $s ) {
+                       $s = trim( $s );
+                       if ( empty( $s ) ) {
+                               continue;
+                       }
+                       if ( strpos( $s, '#' ) === 0 ) {
+                               continue;
+                       }
+
+                       $s = strtolower( $s );
+                       $i = strpos( $s, ' ' );
+
+                       if ( $i === false ) {
+                               continue;
+                       }
+
+                       $mime = substr( $s, 0, $i );
+                       $ext = trim( substr( $s, $i + 1 ) );
+
+                       if ( empty( $ext ) ) {
+                               continue;
+                       }
+
+                       if ( !empty( $this->mimetoExt[$mime] ) ) {
+                               $this->mimetoExt[$mime] .= ' ' . $ext;
+                       } else {
+                               $this->mimetoExt[$mime] = $ext;
+                       }
+
+                       $extensions = explode( ' ', $ext );
+
+                       foreach ( $extensions as $e ) {
+                               $e = trim( $e );
+                               if ( empty( $e ) ) {
+                                       continue;
+                               }
+
+                               if ( !empty( $this->mExtToMime[$e] ) ) {
+                                       $this->mExtToMime[$e] .= ' ' . $mime;
+                               } else {
+                                       $this->mExtToMime[$e] = $mime;
+                               }
+                       }
+               }
+
+               /**
+                *   --- load mime.info ---
+                */
+
+               $mimeInfoFile = $this->infoFile;
+
+               $info = self::$wellKnownInfo;
+
+               if ( $mimeInfoFile ) {
+                       if ( is_file( $mimeInfoFile ) && is_readable( $mimeInfoFile ) ) {
+                               $this->logger->info( __METHOD__ . ": loading mime info from $mimeInfoFile\n" );
+                               $info .= "\n";
+                               $info .= file_get_contents( $mimeInfoFile );
+                       } else {
+                               $this->logger->info( __METHOD__ . ": can't load mime info from $mimeInfoFile\n" );
+                       }
+               } else {
+                       $this->logger->info( __METHOD__ .
+                               ": no mime info file defined, using built-ins only.\n" );
+               }
+
+               $info .= "\n" . $this->extraInfo;
+
+               $info = str_replace( [ "\r\n", "\n\r", "\n\n", "\r\r", "\r" ], "\n", $info );
+               $info = str_replace( "\t", " ", $info );
+
+               $this->mimeTypeAliases = [];
+               $this->mediaTypes = [];
+
+               $lines = explode( "\n", $info );
+               foreach ( $lines as $s ) {
+                       $s = trim( $s );
+                       if ( empty( $s ) ) {
+                               continue;
+                       }
+                       if ( strpos( $s, '#' ) === 0 ) {
+                               continue;
+                       }
+
+                       $s = strtolower( $s );
+                       $i = strpos( $s, ' ' );
+
+                       if ( $i === false ) {
+                               continue;
+                       }
+
+                       # print "processing MIME INFO line $s<br>";
+
+                       $match = [];
+                       if ( preg_match( '!\[\s*(\w+)\s*\]!', $s, $match ) ) {
+                               $s = preg_replace( '!\[\s*(\w+)\s*\]!', '', $s );
+                               $mtype = trim( strtoupper( $match[1] ) );
+                       } else {
+                               $mtype = MEDIATYPE_UNKNOWN;
+                       }
+
+                       $m = explode( ' ', $s );
+
+                       if ( !isset( $this->mediaTypes[$mtype] ) ) {
+                               $this->mediaTypes[$mtype] = [];
+                       }
+
+                       foreach ( $m as $mime ) {
+                               $mime = trim( $mime );
+                               if ( empty( $mime ) ) {
+                                       continue;
+                               }
+
+                               $this->mediaTypes[$mtype][] = $mime;
+                       }
+
+                       if ( count( $m ) > 1 ) {
+                               $main = $m[0];
+                               $mCount = count( $m );
+                               for ( $i = 1; $i < $mCount; $i += 1 ) {
+                                       $mime = $m[$i];
+                                       $this->mimeTypeAliases[$mime] = $main;
+                               }
+                       }
+               }
+       }
+
+       public function setLogger( LoggerInterface $logger ) {
+               $this->logger = $logger;
+       }
+
+       /**
+        * Adds to the list mapping MIME to file extensions.
+        * As an extension author, you are encouraged to submit patches to
+        * MediaWiki's core to add new MIME types to mime.types.
+        * @param string $types
+        */
+       public function addExtraTypes( $types ) {
+               $this->extraTypes .= "\n" . $types;
+       }
+
+       /**
+        * Adds to the list mapping MIME to media type.
+        * As an extension author, you are encouraged to submit patches to
+        * MediaWiki's core to add new MIME info to mime.info.
+        * @param string $info
+        */
+       public function addExtraInfo( $info ) {
+               $this->extraInfo .= "\n" . $info;
+       }
+
+       /**
+        * Returns a list of file extensions for a given MIME type as a space
+        * separated string or null if the MIME type was unrecognized. Resolves
+        * MIME type aliases.
+        *
+        * @param string $mime
+        * @return string|null
+        */
+       public function getExtensionsForType( $mime ) {
+               $mime = strtolower( $mime );
+
+               // Check the mime-to-ext map
+               if ( isset( $this->mimetoExt[$mime] ) ) {
+                       return $this->mimetoExt[$mime];
+               }
+
+               // Resolve the MIME type to the canonical type
+               if ( isset( $this->mimeTypeAliases[$mime] ) ) {
+                       $mime = $this->mimeTypeAliases[$mime];
+                       if ( isset( $this->mimetoExt[$mime] ) ) {
+                               return $this->mimetoExt[$mime];
+                       }
+               }
+
+               return null;
+       }
+
+       /**
+        * Returns a list of MIME types for a given file extension as a space
+        * separated string or null if the extension was unrecognized.
+        *
+        * @param string $ext
+        * @return string|null
+        */
+       public function getTypesForExtension( $ext ) {
+               $ext = strtolower( $ext );
+
+               $r = isset( $this->mExtToMime[$ext] ) ? $this->mExtToMime[$ext] : null;
+               return $r;
+       }
+
+       /**
+        * Returns a single MIME type for a given file extension or null if unknown.
+        * This is always the first type from the list returned by getTypesForExtension($ext).
+        *
+        * @param string $ext
+        * @return string|null
+        */
+       public function guessTypesForExtension( $ext ) {
+               $m = $this->getTypesForExtension( $ext );
+               if ( is_null( $m ) ) {
+                       return null;
+               }
+
+               // TODO: Check if this is needed; strtok( $m, ' ' ) should be sufficient
+               $m = trim( $m );
+               $m = preg_replace( '/\s.*$/', '', $m );
+
+               return $m;
+       }
+
+       /**
+        * Tests if the extension matches the given MIME type. Returns true if a
+        * match was found, null if the MIME type is unknown, and false if the
+        * MIME type is known but no matches where found.
+        *
+        * @param string $extension
+        * @param string $mime
+        * @return bool|null
+        */
+       public function isMatchingExtension( $extension, $mime ) {
+               $ext = $this->getExtensionsForType( $mime );
+
+               if ( !$ext ) {
+                       return null; // Unknown MIME type
+               }
+
+               $ext = explode( ' ', $ext );
+
+               $extension = strtolower( $extension );
+               return in_array( $extension, $ext );
+       }
+
+       /**
+        * Returns true if the MIME type is known to represent an image format
+        * supported by the PHP GD library.
+        *
+        * @param string $mime
+        *
+        * @return bool
+        */
+       public function isPHPImageType( $mime ) {
+               // As defined by imagegetsize and image_type_to_mime
+               static $types = [
+                       'image/gif', 'image/jpeg', 'image/png',
+                       'image/x-bmp', 'image/xbm', 'image/tiff',
+                       'image/jp2', 'image/jpeg2000', 'image/iff',
+                       'image/xbm', 'image/x-xbitmap',
+                       'image/vnd.wap.wbmp', 'image/vnd.xiff',
+                       'image/x-photoshop',
+                       'application/x-shockwave-flash',
+               ];
+
+               return in_array( $mime, $types );
+       }
+
+       /**
+        * Returns true if the extension represents a type which can
+        * be reliably detected from its content. Use this to determine
+        * whether strict content checks should be applied to reject
+        * invalid uploads; if we can't identify the type we won't
+        * be able to say if it's invalid.
+        *
+        * @todo Be more accurate when using fancy MIME detector plugins;
+        *       right now this is the bare minimum getimagesize() list.
+        * @param string $extension
+        * @return bool
+        */
+       function isRecognizableExtension( $extension ) {
+               static $types = [
+                       // Types recognized by getimagesize()
+                       'gif', 'jpeg', 'jpg', 'png', 'swf', 'psd',
+                       'bmp', 'tiff', 'tif', 'jpc', 'jp2',
+                       'jpx', 'jb2', 'swc', 'iff', 'wbmp',
+                       'xbm',
+
+                       // Formats we recognize magic numbers for
+                       'djvu', 'ogx', 'ogg', 'ogv', 'oga', 'spx',
+                       'mid', 'pdf', 'wmf', 'xcf', 'webm', 'mkv', 'mka',
+                       'webp',
+
+                       // XML formats we sure hope we recognize reliably
+                       'svg',
+               ];
+               return in_array( strtolower( $extension ), $types );
+       }
+
+       /**
+        * Improves a MIME type using the file extension. Some file formats are very generic,
+        * so their MIME type is not very meaningful. A more useful MIME type can be derived
+        * by looking at the file extension. Typically, this method would be called on the
+        * result of guessMimeType().
+        *
+        * @param string $mime The MIME type, typically guessed from a file's content.
+        * @param string $ext The file extension, as taken from the file name
+        *
+        * @return string The MIME type
+        */
+       public function improveTypeFromExtension( $mime, $ext ) {
+               if ( $mime === 'unknown/unknown' ) {
+                       if ( $this->isRecognizableExtension( $ext ) ) {
+                               $this->logger->info( __METHOD__ . ': refusing to guess mime type for .' .
+                                       "$ext file, we should have recognized it\n" );
+                       } else {
+                               // Not something we can detect, so simply
+                               // trust the file extension
+                               $mime = $this->guessTypesForExtension( $ext );
+                       }
+               } elseif ( $mime === 'application/x-opc+zip' ) {
+                       if ( $this->isMatchingExtension( $ext, $mime ) ) {
+                               // A known file extension for an OPC file,
+                               // find the proper MIME type for that file extension
+                               $mime = $this->guessTypesForExtension( $ext );
+                       } else {
+                               $this->logger->info( __METHOD__ .
+                                       ": refusing to guess better type for $mime file, " .
+                                       ".$ext is not a known OPC extension.\n" );
+                               $mime = 'application/zip';
+                       }
+               } elseif ( $mime === 'text/plain' && $this->findMediaType( ".$ext" ) === MEDIATYPE_TEXT ) {
+                       // Textual types are sometimes not recognized properly.
+                       // If detected as text/plain, and has an extension which is textual
+                       // improve to the extension's type. For example, csv and json are often
+                       // misdetected as text/plain.
+                       $mime = $this->guessTypesForExtension( $ext );
+               }
+
+               # Media handling extensions can improve the MIME detected
+               $callback = $this->extCallback;
+               if ( $callback ) {
+                       $callback( $this, $ext, $mime /* by reference */ );
+               }
+
+               if ( isset( $this->mimeTypeAliases[$mime] ) ) {
+                       $mime = $this->mimeTypeAliases[$mime];
+               }
+
+               $this->logger->info( __METHOD__ . ": improved mime type for .$ext: $mime\n" );
+               return $mime;
+       }
+
+       /**
+        * MIME type detection. This uses detectMimeType to detect the MIME type
+        * of the file, but applies additional checks to determine some well known
+        * file formats that may be missed or misinterpreted by the default MIME
+        * detection (namely XML based formats like XHTML or SVG, as well as ZIP
+        * based formats like OPC/ODF files).
+        *
+        * @param string $file The file to check
+        * @param string|bool $ext The file extension, or true (default) to extract
+        *   it from the filename. Set it to false to ignore the extension. DEPRECATED!
+        *   Set to false, use improveTypeFromExtension($mime, $ext) later to improve MIME type.
+        *
+        * @return string The MIME type of $file
+        */
+       public function guessMimeType( $file, $ext = true ) {
+               if ( $ext ) { // TODO: make $ext default to false. Or better, remove it.
+                       $this->logger->info( __METHOD__ .
+                               ": WARNING: use of the \$ext parameter is deprecated. " .
+                               "Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
+               }
+
+               $mime = $this->doGuessMimeType( $file, $ext );
+
+               if ( !$mime ) {
+                       $this->logger->info( __METHOD__ .
+                               ": internal type detection failed for $file (.$ext)...\n" );
+                       $mime = $this->detectMimeType( $file, $ext );
+               }
+
+               if ( isset( $this->mimeTypeAliases[$mime] ) ) {
+                       $mime = $this->mimeTypeAliases[$mime];
+               }
+
+               $this->logger->info( __METHOD__ . ": guessed mime type of $file: $mime\n" );
+               return $mime;
+       }
+
+       /**
+        * Guess the MIME type from the file contents.
+        *
+        * @todo Remove $ext param
+        *
+        * @param string $file
+        * @param mixed $ext
+        * @return bool|string
+        * @throws UnexpectedValueException
+        */
+       private function doGuessMimeType( $file, $ext ) {
+               // Read a chunk of the file
+               MediaWiki\suppressWarnings();
+               $f = fopen( $file, 'rb' );
+               MediaWiki\restoreWarnings();
+
+               if ( !$f ) {
+                       return 'unknown/unknown';
+               }
+
+               $fsize = filesize( $file );
+               if ( $fsize === false ) {
+                       return 'unknown/unknown';
+               }
+
+               $head = fread( $f, 1024 );
+               $tailLength = min( 65558, $fsize ); // 65558 = maximum size of a zip EOCDR
+               if ( fseek( $f, -1 * $tailLength, SEEK_END ) === -1 ) {
+                       throw new UnexpectedValueException(
+                               "Seeking $tailLength bytes from EOF failed in " . __METHOD__ );
+               }
+               $tail = $tailLength ? fread( $f, $tailLength ) : '';
+               fclose( $f );
+
+               $this->logger->info( __METHOD__ .
+                       ": analyzing head and tail of $file for magic numbers.\n" );
+
+               // Hardcode a few magic number checks...
+               $headers = [
+                       // Multimedia...
+                       'MThd'             => 'audio/midi',
+                       'OggS'             => 'application/ogg',
+
+                       // Image formats...
+                       // Note that WMF may have a bare header, no magic number.
+                       "\x01\x00\x09\x00" => 'application/x-msmetafile', // Possibly prone to false positives?
+                       "\xd7\xcd\xc6\x9a" => 'application/x-msmetafile',
+                       '%PDF'             => 'application/pdf',
+                       'gimp xcf'         => 'image/x-xcf',
+
+                       // Some forbidden fruit...
+                       'MZ'               => 'application/octet-stream', // DOS/Windows executable
+                       "\xca\xfe\xba\xbe" => 'application/octet-stream', // Mach-O binary
+                       "\x7fELF"          => 'application/octet-stream', // ELF binary
+               ];
+
+               foreach ( $headers as $magic => $candidate ) {
+                       if ( strncmp( $head, $magic, strlen( $magic ) ) == 0 ) {
+                               $this->logger->info( __METHOD__ .
+                                       ": magic header in $file recognized as $candidate\n" );
+                               return $candidate;
+                       }
+               }
+
+               /* Look for WebM and Matroska files */
+               if ( strncmp( $head, pack( "C4", 0x1a, 0x45, 0xdf, 0xa3 ), 4 ) == 0 ) {
+                       $doctype = strpos( $head, "\x42\x82" );
+                       if ( $doctype ) {
+                               // Next byte is datasize, then data (sizes larger than 1 byte are stupid muxers)
+                               $data = substr( $head, $doctype + 3, 8 );
+                               if ( strncmp( $data, "matroska", 8 ) == 0 ) {
+                                       $this->logger->info( __METHOD__ . ": recognized file as video/x-matroska\n" );
+                                       return "video/x-matroska";
+                               } elseif ( strncmp( $data, "webm", 4 ) == 0 ) {
+                                       $this->logger->info( __METHOD__ . ": recognized file as video/webm\n" );
+                                       return "video/webm";
+                               }
+                       }
+                       $this->logger->info( __METHOD__ . ": unknown EBML file\n" );
+                       return "unknown/unknown";
+               }
+
+               /* Look for WebP */
+               if ( strncmp( $head, "RIFF", 4 ) == 0 &&
+                       strncmp( substr( $head, 8, 7 ), "WEBPVP8", 7 ) == 0
+               ) {
+                       $this->logger->info( __METHOD__ . ": recognized file as image/webp\n" );
+                       return "image/webp";
+               }
+
+               /**
+                * Look for PHP.  Check for this before HTML/XML...  Warning: this is a
+                * heuristic, and won't match a file with a lot of non-PHP before.  It
+                * will also match text files which could be PHP. :)
+                *
+                * @todo FIXME: For this reason, the check is probably useless -- an attacker
+                * could almost certainly just pad the file with a lot of nonsense to
+                * circumvent the check in any case where it would be a security
+                * problem.  On the other hand, it causes harmful false positives (bug
+                * 16583).  The heuristic has been cut down to exclude three-character
+                * strings like "<? ", but should it be axed completely?
+                */
+               if ( ( strpos( $head, '<?php' ) !== false ) ||
+                       ( strpos( $head, "<\x00?\x00p\x00h\x00p" ) !== false ) ||
+                       ( strpos( $head, "<\x00?\x00 " ) !== false ) ||
+                       ( strpos( $head, "<\x00?\x00\n" ) !== false ) ||
+                       ( strpos( $head, "<\x00?\x00\t" ) !== false ) ||
+                       ( strpos( $head, "<\x00?\x00=" ) !== false ) ) {
+
+                       $this->logger->info( __METHOD__ . ": recognized $file as application/x-php\n" );
+                       return 'application/x-php';
+               }
+
+               /**
+                * look for XML formats (XHTML and SVG)
+                */
+               $xml = new XmlTypeCheck( $file );
+               if ( $xml->wellFormed ) {
+                       $xmlTypes = $this->xmlTypes;
+                       if ( isset( $xmlTypes[$xml->getRootElement()] ) ) {
+                               return $xmlTypes[$xml->getRootElement()];
+                       } else {
+                               return 'application/xml';
+                       }
+               }
+
+               /**
+                * look for shell scripts
+                */
+               $script_type = null;
+
+               # detect by shebang
+               if ( substr( $head, 0, 2 ) == "#!" ) {
+                       $script_type = "ASCII";
+               } elseif ( substr( $head, 0, 5 ) == "\xef\xbb\xbf#!" ) {
+                       $script_type = "UTF-8";
+               } elseif ( substr( $head, 0, 7 ) == "\xfe\xff\x00#\x00!" ) {
+                       $script_type = "UTF-16BE";
+               } elseif ( substr( $head, 0, 7 ) == "\xff\xfe#\x00!" ) {
+                       $script_type = "UTF-16LE";
+               }
+
+               if ( $script_type ) {
+                       if ( $script_type !== "UTF-8" && $script_type !== "ASCII" ) {
+                               // Quick and dirty fold down to ASCII!
+                               $pack = [ 'UTF-16BE' => 'n*', 'UTF-16LE' => 'v*' ];
+                               $chars = unpack( $pack[$script_type], substr( $head, 2 ) );
+                               $head = '';
+                               foreach ( $chars as $codepoint ) {
+                                       if ( $codepoint < 128 ) {
+                                               $head .= chr( $codepoint );
+                                       } else {
+                                               $head .= '?';
+                                       }
+                               }
+                       }
+
+                       $match = [];
+
+                       if ( preg_match( '%/?([^\s]+/)(\w+)%', $head, $match ) ) {
+                               $mime = "application/x-{$match[2]}";
+                               $this->logger->info( __METHOD__ . ": shell script recognized as $mime\n" );
+                               return $mime;
+                       }
+               }
+
+               // Check for ZIP variants (before getimagesize)
+               if ( strpos( $tail, "PK\x05\x06" ) !== false ) {
+                       $this->logger->info( __METHOD__ . ": ZIP header present in $file\n" );
+                       return $this->detectZipType( $head, $tail, $ext );
+               }
+
+               MediaWiki\suppressWarnings();
+               $gis = getimagesize( $file );
+               MediaWiki\restoreWarnings();
+
+               if ( $gis && isset( $gis['mime'] ) ) {
+                       $mime = $gis['mime'];
+                       $this->logger->info( __METHOD__ . ": getimagesize detected $file as $mime\n" );
+                       return $mime;
+               }
+
+               # Media handling extensions can guess the MIME by content
+               # It's intentionally here so that if core is wrong about a type (false positive),
+               # people will hopefully nag and submit patches :)
+               $mime = false;
+               # Some strings by reference for performance - assuming well-behaved hooks
+               $callback = $this->guessCallback;
+               if ( $callback ) {
+                       $callback( $this, $head, $tail, $file, $mime /* by reference */ );
+               };
+
+               return $mime;
+       }
+
+       /**
+        * Detect application-specific file type of a given ZIP file from its
+        * header data.  Currently works for OpenDocument and OpenXML types...
+        * If can't tell, returns 'application/zip'.
+        *
+        * @param string $header Some reasonably-sized chunk of file header
+        * @param string|null $tail The tail of the file
+        * @param string|bool $ext The file extension, or true to extract it from the filename.
+        *   Set it to false (default) to ignore the extension. DEPRECATED! Set to false,
+        *   use improveTypeFromExtension($mime, $ext) later to improve MIME type.
+        *
+        * @return string
+        */
+       function detectZipType( $header, $tail = null, $ext = false ) {
+               if ( $ext ) { # TODO: remove $ext param
+                       $this->logger->info( __METHOD__ .
+                               ": WARNING: use of the \$ext parameter is deprecated. " .
+                               "Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
+               }
+
+               $mime = 'application/zip';
+               $opendocTypes = [
+                       'chart-template',
+                       'chart',
+                       'formula-template',
+                       'formula',
+                       'graphics-template',
+                       'graphics',
+                       'image-template',
+                       'image',
+                       'presentation-template',
+                       'presentation',
+                       'spreadsheet-template',
+                       'spreadsheet',
+                       'text-template',
+                       'text-master',
+                       'text-web',
+                       'text' ];
+
+               // http://lists.oasis-open.org/archives/office/200505/msg00006.html
+               $types = '(?:' . implode( '|', $opendocTypes ) . ')';
+               $opendocRegex = "/^mimetype(application\/vnd\.oasis\.opendocument\.$types)/";
+
+               $openxmlRegex = "/^\[Content_Types\].xml/";
+
+               if ( preg_match( $opendocRegex, substr( $header, 30 ), $matches ) ) {
+                       $mime = $matches[1];
+                       $this->logger->info( __METHOD__ . ": detected $mime from ZIP archive\n" );
+               } elseif ( preg_match( $openxmlRegex, substr( $header, 30 ) ) ) {
+                       $mime = "application/x-opc+zip";
+                       # TODO: remove the block below, as soon as improveTypeFromExtension is used everywhere
+                       if ( $ext !== true && $ext !== false ) {
+                               /** This is the mode used by getPropsFromPath
+                                * These MIME's are stored in the database, where we don't really want
+                                * x-opc+zip, because we use it only for internal purposes
+                                */
+                               if ( $this->isMatchingExtension( $ext, $mime ) ) {
+                                       /* A known file extension for an OPC file,
+                                        * find the proper mime type for that file extension
+                                        */
+                                       $mime = $this->guessTypesForExtension( $ext );
+                               } else {
+                                       $mime = "application/zip";
+                               }
+                       }
+                       $this->logger->info( __METHOD__ .
+                               ": detected an Open Packaging Conventions archive: $mime\n" );
+               } elseif ( substr( $header, 0, 8 ) == "\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" &&
+                       ( $headerpos = strpos( $tail, "PK\x03\x04" ) ) !== false &&
+                       preg_match( $openxmlRegex, substr( $tail, $headerpos + 30 ) ) ) {
+                       if ( substr( $header, 512, 4 ) == "\xEC\xA5\xC1\x00" ) {
+                               $mime = "application/msword";
+                       }
+                       switch ( substr( $header, 512, 6 ) ) {
+                               case "\xEC\xA5\xC1\x00\x0E\x00":
+                               case "\xEC\xA5\xC1\x00\x1C\x00":
+                               case "\xEC\xA5\xC1\x00\x43\x00":
+                                       $mime = "application/vnd.ms-powerpoint";
+                                       break;
+                               case "\xFD\xFF\xFF\xFF\x10\x00":
+                               case "\xFD\xFF\xFF\xFF\x1F\x00":
+                               case "\xFD\xFF\xFF\xFF\x22\x00":
+                               case "\xFD\xFF\xFF\xFF\x23\x00":
+                               case "\xFD\xFF\xFF\xFF\x28\x00":
+                               case "\xFD\xFF\xFF\xFF\x29\x00":
+                               case "\xFD\xFF\xFF\xFF\x10\x02":
+                               case "\xFD\xFF\xFF\xFF\x1F\x02":
+                               case "\xFD\xFF\xFF\xFF\x22\x02":
+                               case "\xFD\xFF\xFF\xFF\x23\x02":
+                               case "\xFD\xFF\xFF\xFF\x28\x02":
+                               case "\xFD\xFF\xFF\xFF\x29\x02":
+                                       $mime = "application/vnd.msexcel";
+                                       break;
+                       }
+
+                       $this->logger->info( __METHOD__ .
+                               ": detected a MS Office document with OPC trailer\n" );
+               } else {
+                       $this->logger->info( __METHOD__ . ": unable to identify type of ZIP archive\n" );
+               }
+               return $mime;
+       }
+
+       /**
+        * Internal MIME type detection. Detection is done using the fileinfo
+        * extension if it is available. It can be overriden by callback, which could
+        * use an external program, for example. If detection fails and $ext is not false,
+        * the MIME type is guessed from the file extension, using guessTypesForExtension.
+        *
+        * If the MIME type is still unknown, getimagesize is used to detect the
+        * MIME type if the file is an image. If no MIME type can be determined,
+        * this function returns 'unknown/unknown'.
+        *
+        * @param string $file The file to check
+        * @param string|bool $ext The file extension, or true (default) to extract it from the filename.
+        *   Set it to false to ignore the extension. DEPRECATED! Set to false, use
+        *   improveTypeFromExtension($mime, $ext) later to improve MIME type.
+        *
+        * @return string The MIME type of $file
+        */
+       private function detectMimeType( $file, $ext = true ) {
+               /** @todo Make $ext default to false. Or better, remove it. */
+               if ( $ext ) {
+                       $this->logger->info( __METHOD__ .
+                               ": WARNING: use of the \$ext parameter is deprecated. "
+                               . "Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
+               }
+
+               $callback = $this->detectCallback;
+               $m = null;
+               if ( $callback ) {
+                       $m = $callback( $file );
+               } elseif ( function_exists( "finfo_open" ) && function_exists( "finfo_file" ) ) {
+                       $mime_magic_resource = finfo_open( FILEINFO_MIME );
+
+                       if ( $mime_magic_resource ) {
+                               $m = finfo_file( $mime_magic_resource, $file );
+                               finfo_close( $mime_magic_resource );
+                       } else {
+                               $this->logger->info( __METHOD__ .
+                                       ": finfo_open failed on " . FILEINFO_MIME . "!\n" );
+                       }
+               } else {
+                       $this->logger->info( __METHOD__ . ": no magic mime detector found!\n" );
+               }
+
+               if ( $m ) {
+                       # normalize
+                       $m = preg_replace( '![;, ].*$!', '', $m ); # strip charset, etc
+                       $m = trim( $m );
+                       $m = strtolower( $m );
+
+                       if ( strpos( $m, 'unknown' ) !== false ) {
+                               $m = null;
+                       } else {
+                               $this->logger->info( __METHOD__ . ": magic mime type of $file: $m\n" );
+                               return $m;
+                       }
+               }
+
+               // If desired, look at extension as a fallback.
+               if ( $ext === true ) {
+                       $i = strrpos( $file, '.' );
+                       $ext = strtolower( $i ? substr( $file, $i + 1 ) : '' );
+               }
+               if ( $ext ) {
+                       if ( $this->isRecognizableExtension( $ext ) ) {
+                               $this->logger->info( __METHOD__ . ": refusing to guess mime type for .$ext file, "
+                                       . "we should have recognized it\n" );
+                       } else {
+                               $m = $this->guessTypesForExtension( $ext );
+                               if ( $m ) {
+                                       $this->logger->info( __METHOD__ . ": extension mime type of $file: $m\n" );
+                                       return $m;
+                               }
+                       }
+               }
+
+               // Unknown type
+               $this->logger->info( __METHOD__ . ": failed to guess mime type for $file!\n" );
+               return 'unknown/unknown';
+       }
+
+       /**
+        * Determine the media type code for a file, using its MIME type, name and
+        * possibly its contents.
+        *
+        * This function relies on the findMediaType(), mapping extensions and MIME
+        * types to media types.
+        *
+        * @todo analyse file if need be
+        * @todo look at multiple extension, separately and together.
+        *
+        * @param string $path Full path to the image file, in case we have to look at the contents
+        *        (if null, only the MIME type is used to determine the media type code).
+        * @param string $mime MIME type. If null it will be guessed using guessMimeType.
+        *
+        * @return string A value to be used with the MEDIATYPE_xxx constants.
+        */
+       function getMediaType( $path = null, $mime = null ) {
+               if ( !$mime && !$path ) {
+                       return MEDIATYPE_UNKNOWN;
+               }
+
+               // If MIME type is unknown, guess it
+               if ( !$mime ) {
+                       $mime = $this->guessMimeType( $path, false );
+               }
+
+               // Special code for ogg - detect if it's video (theora),
+               // else label it as sound.
+               if ( $mime == 'application/ogg' && file_exists( $path ) ) {
+
+                       // Read a chunk of the file
+                       $f = fopen( $path, "rt" );
+                       if ( !$f ) {
+                               return MEDIATYPE_UNKNOWN;
+                       }
+                       $head = fread( $f, 256 );
+                       fclose( $f );
+
+                       $head = str_replace( 'ffmpeg2theora', '', strtolower( $head ) );
+
+                       // This is an UGLY HACK, file should be parsed correctly
+                       if ( strpos( $head, 'theora' ) !== false ) {
+                               return MEDIATYPE_VIDEO;
+                       } elseif ( strpos( $head, 'vorbis' ) !== false ) {
+                               return MEDIATYPE_AUDIO;
+                       } elseif ( strpos( $head, 'flac' ) !== false ) {
+                               return MEDIATYPE_AUDIO;
+                       } elseif ( strpos( $head, 'speex' ) !== false ) {
+                               return MEDIATYPE_AUDIO;
+                       } else {
+                               return MEDIATYPE_MULTIMEDIA;
+                       }
+               }
+
+               $type = null;
+               // Check for entry for full MIME type
+               if ( $mime ) {
+                       $type = $this->findMediaType( $mime );
+                       if ( $type !== MEDIATYPE_UNKNOWN ) {
+                               return $type;
+                       }
+               }
+
+               // Check for entry for file extension
+               if ( $path ) {
+                       $i = strrpos( $path, '.' );
+                       $e = strtolower( $i ? substr( $path, $i + 1 ) : '' );
+
+                       // TODO: look at multi-extension if this fails, parse from full path
+                       $type = $this->findMediaType( '.' . $e );
+                       if ( $type !== MEDIATYPE_UNKNOWN ) {
+                               return $type;
+                       }
+               }
+
+               // Check major MIME type
+               if ( $mime ) {
+                       $i = strpos( $mime, '/' );
+                       if ( $i !== false ) {
+                               $major = substr( $mime, 0, $i );
+                               $type = $this->findMediaType( $major );
+                               if ( $type !== MEDIATYPE_UNKNOWN ) {
+                                       return $type;
+                               }
+                       }
+               }
+
+               if ( !$type ) {
+                       $type = MEDIATYPE_UNKNOWN;
+               }
+
+               return $type;
+       }
+
+       /**
+        * Returns a media code matching the given MIME type or file extension.
+        * File extensions are represented by a string starting with a dot (.) to
+        * distinguish them from MIME types.
+        *
+        * This function relies on the mapping defined by $this->mMediaTypes
+        * @access private
+        * @param string $extMime
+        * @return int|string
+        */
+       function findMediaType( $extMime ) {
+               if ( strpos( $extMime, '.' ) === 0 ) {
+                       // If it's an extension, look up the MIME types
+                       $m = $this->getTypesForExtension( substr( $extMime, 1 ) );
+                       if ( !$m ) {
+                               return MEDIATYPE_UNKNOWN;
+                       }
+
+                       $m = explode( ' ', $m );
+               } else {
+                       // Normalize MIME type
+                       if ( isset( $this->mimeTypeAliases[$extMime] ) ) {
+                               $extMime = $this->mimeTypeAliases[$extMime];
+                       }
+
+                       $m = [ $extMime ];
+               }
+
+               foreach ( $m as $mime ) {
+                       foreach ( $this->mediaTypes as $type => $codes ) {
+                               if ( in_array( $mime, $codes, true ) ) {
+                                       return $type;
+                               }
+                       }
+               }
+
+               return MEDIATYPE_UNKNOWN;
+       }
+
+       /**
+        * Get the MIME types that various versions of Internet Explorer would
+        * detect from a chunk of the content.
+        *
+        * @param string $fileName The file name (unused at present)
+        * @param string $chunk The first 256 bytes of the file
+        * @param string $proposed The MIME type proposed by the server
+        * @return array
+        */
+       public function getIEMimeTypes( $fileName, $chunk, $proposed ) {
+               $ca = $this->getIEContentAnalyzer();
+               return $ca->getRealMimesFromData( $fileName, $chunk, $proposed );
+       }
+
+       /**
+        * Get a cached instance of IEContentAnalyzer
+        *
+        * @return IEContentAnalyzer
+        */
+       protected function getIEContentAnalyzer() {
+               if ( is_null( $this->IEAnalyzer ) ) {
+                       $this->IEAnalyzer = new IEContentAnalyzer;
+               }
+               return $this->IEAnalyzer;
+       }
+}
diff --git a/includes/libs/mime/XmlTypeCheck.php b/includes/libs/mime/XmlTypeCheck.php
new file mode 100644 (file)
index 0000000..f057140
--- /dev/null
@@ -0,0 +1,347 @@
+<?php
+/**
+ * XML syntax and type checker.
+ *
+ * Since 1.24.2, it uses XMLReader instead of xml_parse, which gives us
+ * more control over the expansion of XML entities. When passed to the
+ * callback, entities will be fully expanded, but may report the XML is
+ * invalid if expanding the entities are likely to cause a DoS.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+class XmlTypeCheck {
+       /**
+        * Will be set to true or false to indicate whether the file is
+        * well-formed XML. Note that this doesn't check schema validity.
+        */
+       public $wellFormed = null;
+
+       /**
+        * Will be set to true if the optional element filter returned
+        * a match at some point.
+        */
+       public $filterMatch = false;
+
+       /**
+        * Will contain the type of filter hit if the optional element filter returned
+        * a match at some point.
+        * @var mixed
+        */
+       public $filterMatchType = false;
+
+       /**
+        * Name of the document's root element, including any namespace
+        * as an expanded URL.
+        */
+       public $rootElement = '';
+
+       /**
+        * A stack of strings containing the data of each xml element as it's processed. Append
+        * data to the top string of the stack, then pop off the string and process it when the
+        * element is closed.
+        */
+       protected $elementData = [];
+
+       /**
+        * A stack of element names and attributes, as we process them.
+        */
+       protected $elementDataContext = [];
+
+       /**
+        * Current depth of the data stack.
+        */
+       protected $stackDepth = 0;
+
+       /**
+        * Additional parsing options
+        */
+       private $parserOptions = [
+               'processing_instruction_handler' => '',
+       ];
+
+       /**
+        * @param string $input a filename or string containing the XML element
+        * @param callable $filterCallback (optional)
+        *        Function to call to do additional custom validity checks from the
+        *        SAX element handler event. This gives you access to the element
+        *        namespace, name, attributes, and text contents.
+        *        Filter should return 'true' to toggle on $this->filterMatch
+        * @param bool $isFile (optional) indicates if the first parameter is a
+        *        filename (default, true) or if it is a string (false)
+        * @param array $options list of additional parsing options:
+        *        processing_instruction_handler: Callback for xml_set_processing_instruction_handler
+        */
+       function __construct( $input, $filterCallback = null, $isFile = true, $options = [] ) {
+               $this->filterCallback = $filterCallback;
+               $this->parserOptions = array_merge( $this->parserOptions, $options );
+               $this->validateFromInput( $input, $isFile );
+       }
+
+       /**
+        * Alternative constructor: from filename
+        *
+        * @param string $fname the filename of an XML document
+        * @param callable $filterCallback (optional)
+        *        Function to call to do additional custom validity checks from the
+        *        SAX element handler event. This gives you access to the element
+        *        namespace, name, and attributes, but not to text contents.
+        *        Filter should return 'true' to toggle on $this->filterMatch
+        * @return XmlTypeCheck
+        */
+       public static function newFromFilename( $fname, $filterCallback = null ) {
+               return new self( $fname, $filterCallback, true );
+       }
+
+       /**
+        * Alternative constructor: from string
+        *
+        * @param string $string a string containing an XML element
+        * @param callable $filterCallback (optional)
+        *        Function to call to do additional custom validity checks from the
+        *        SAX element handler event. This gives you access to the element
+        *        namespace, name, and attributes, but not to text contents.
+        *        Filter should return 'true' to toggle on $this->filterMatch
+        * @return XmlTypeCheck
+        */
+       public static function newFromString( $string, $filterCallback = null ) {
+               return new self( $string, $filterCallback, false );
+       }
+
+       /**
+        * Get the root element. Simple accessor to $rootElement
+        *
+        * @return string
+        */
+       public function getRootElement() {
+               return $this->rootElement;
+       }
+
+       /**
+        * @param string $fname the filename
+        */
+       private function validateFromInput( $xml, $isFile ) {
+               $reader = new XMLReader();
+               if ( $isFile ) {
+                       $s = $reader->open( $xml, null, LIBXML_NOERROR | LIBXML_NOWARNING );
+               } else {
+                       $s = $reader->XML( $xml, null, LIBXML_NOERROR | LIBXML_NOWARNING );
+               }
+               if ( $s !== true ) {
+                       // Couldn't open the XML
+                       $this->wellFormed = false;
+               } else {
+                       $oldDisable = libxml_disable_entity_loader( true );
+                       $reader->setParserProperty( XMLReader::SUBST_ENTITIES, true );
+                       try {
+                               $this->validate( $reader );
+                       } catch ( Exception $e ) {
+                               // Calling this malformed, because we didn't parse the whole
+                               // thing. Maybe just an external entity refernce.
+                               $this->wellFormed = false;
+                               $reader->close();
+                               libxml_disable_entity_loader( $oldDisable );
+                               throw $e;
+                       }
+                       $reader->close();
+                       libxml_disable_entity_loader( $oldDisable );
+               }
+       }
+
+       private function readNext( XMLReader $reader ) {
+               set_error_handler( [ $this, 'XmlErrorHandler' ] );
+               $ret = $reader->read();
+               restore_error_handler();
+               return $ret;
+       }
+
+       public function XmlErrorHandler( $errno, $errstr ) {
+               $this->wellFormed = false;
+       }
+
+       private function validate( $reader ) {
+
+               // First, move through anything that isn't an element, and
+               // handle any processing instructions with the callback
+               do {
+                       if ( !$this->readNext( $reader ) ) {
+                               // Hit the end of the document before any elements
+                               $this->wellFormed = false;
+                               return;
+                       }
+                       if ( $reader->nodeType === XMLReader::PI ) {
+                               $this->processingInstructionHandler( $reader->name, $reader->value );
+                       }
+               } while ( $reader->nodeType != XMLReader::ELEMENT );
+
+               // Process the rest of the document
+               do {
+                       switch ( $reader->nodeType ) {
+                               case XMLReader::ELEMENT:
+                                       $name = $this->expandNS(
+                                               $reader->name,
+                                               $reader->namespaceURI
+                                       );
+                                       if ( $this->rootElement === '' ) {
+                                               $this->rootElement = $name;
+                                       }
+                                       $empty = $reader->isEmptyElement;
+                                       $attrs = $this->getAttributesArray( $reader );
+                                       $this->elementOpen( $name, $attrs );
+                                       if ( $empty ) {
+                                               $this->elementClose();
+                                       }
+                                       break;
+
+                               case XMLReader::END_ELEMENT:
+                                       $this->elementClose();
+                                       break;
+
+                               case XMLReader::WHITESPACE:
+                               case XMLReader::SIGNIFICANT_WHITESPACE:
+                               case XMLReader::CDATA:
+                               case XMLReader::TEXT:
+                                       $this->elementData( $reader->value );
+                                       break;
+
+                               case XMLReader::ENTITY_REF:
+                                       // Unexpanded entity (maybe external?),
+                                       // don't send to the filter (xml_parse didn't)
+                                       break;
+
+                               case XMLReader::COMMENT:
+                                       // Don't send to the filter (xml_parse didn't)
+                                       break;
+
+                               case XMLReader::PI:
+                                       // Processing instructions can happen after the header too
+                                       $this->processingInstructionHandler(
+                                               $reader->name,
+                                               $reader->value
+                                       );
+                                       break;
+                               default:
+                                       // One of DOC, DOC_TYPE, ENTITY, END_ENTITY,
+                                       // NOTATION, or XML_DECLARATION
+                                       // xml_parse didn't send these to the filter, so we won't.
+                       }
+
+               } while ( $this->readNext( $reader ) );
+
+               if ( $this->stackDepth !== 0 ) {
+                       $this->wellFormed = false;
+               } elseif ( $this->wellFormed === null ) {
+                       $this->wellFormed = true;
+               }
+
+       }
+
+       /**
+        * Get all of the attributes for an XMLReader's current node
+        * @param $r XMLReader
+        * @return array of attributes
+        */
+       private function getAttributesArray( XMLReader $r ) {
+               $attrs = [];
+               while ( $r->moveToNextAttribute() ) {
+                       if ( $r->namespaceURI === 'http://www.w3.org/2000/xmlns/' ) {
+                               // XMLReader treats xmlns attributes as normal
+                               // attributes, while xml_parse doesn't
+                               continue;
+                       }
+                       $name = $this->expandNS( $r->name, $r->namespaceURI );
+                       $attrs[$name] = $r->value;
+               }
+               return $attrs;
+       }
+
+       /**
+        * @param $name element or attribute name, maybe with a full or short prefix
+        * @param $namespaceURI the namespaceURI
+        * @return string the name prefixed with namespaceURI
+        */
+       private function expandNS( $name, $namespaceURI ) {
+               if ( $namespaceURI ) {
+                       $parts = explode( ':', $name );
+                       $localname = array_pop( $parts );
+                       return "$namespaceURI:$localname";
+               }
+               return $name;
+       }
+
+       /**
+        * @param $name
+        * @param $attribs
+        */
+       private function elementOpen( $name, $attribs ) {
+               $this->elementDataContext[] = [ $name, $attribs ];
+               $this->elementData[] = '';
+               $this->stackDepth++;
+       }
+
+       /**
+        */
+       private function elementClose() {
+               list( $name, $attribs ) = array_pop( $this->elementDataContext );
+               $data = array_pop( $this->elementData );
+               $this->stackDepth--;
+               $callbackReturn = false;
+
+               if ( is_callable( $this->filterCallback ) ) {
+                       $callbackReturn = call_user_func(
+                               $this->filterCallback,
+                               $name,
+                               $attribs,
+                               $data
+                       );
+               }
+               if ( $callbackReturn ) {
+                       // Filter hit!
+                       $this->filterMatch = true;
+                       $this->filterMatchType = $callbackReturn;
+               }
+       }
+
+       /**
+        * @param $data
+        */
+       private function elementData( $data ) {
+               // Collect any data here, and we'll run the callback in elementClose
+               $this->elementData[ $this->stackDepth - 1 ] .= trim( $data );
+       }
+
+       /**
+        * @param $target
+        * @param $data
+        */
+       private function processingInstructionHandler( $target, $data ) {
+               $callbackReturn = false;
+               if ( $this->parserOptions['processing_instruction_handler'] ) {
+                       $callbackReturn = call_user_func(
+                               $this->parserOptions['processing_instruction_handler'],
+                               $target,
+                               $data
+                       );
+               }
+               if ( $callbackReturn ) {
+                       // Filter hit!
+                       $this->filterMatch = true;
+                       $this->filterMatchType = $callbackReturn;
+               }
+       }
+}
diff --git a/includes/libs/mime/defines.php b/includes/libs/mime/defines.php
new file mode 100644 (file)
index 0000000..ae0b5f8
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**@{
+ * Media types.
+ * This defines constants for the value returned by File::getMediaType()
+ */
+// unknown format
+define( 'MEDIATYPE_UNKNOWN', 'UNKNOWN' );
+// some bitmap image or image source (like psd, etc). Can't scale up.
+define( 'MEDIATYPE_BITMAP', 'BITMAP' );
+// some vector drawing (SVG, WMF, PS, ...) or image source (oo-draw, etc). Can scale up.
+define( 'MEDIATYPE_DRAWING', 'DRAWING' );
+// simple audio file (ogg, mp3, wav, midi, whatever)
+define( 'MEDIATYPE_AUDIO', 'AUDIO' );
+// simple video file (ogg, mpg, etc;
+// no not include formats here that may contain executable sections or scripts!)
+define( 'MEDIATYPE_VIDEO', 'VIDEO' );
+// Scriptable Multimedia (flash, advanced video container formats, etc)
+define( 'MEDIATYPE_MULTIMEDIA', 'MULTIMEDIA' );
+// Office Documents, Spreadsheets (office formats possibly containing apples, scripts, etc)
+define( 'MEDIATYPE_OFFICE', 'OFFICE' );
+// Plain text (possibly containing program code or scripts)
+define( 'MEDIATYPE_TEXT', 'TEXT' );
+// binary executable
+define( 'MEDIATYPE_EXECUTABLE', 'EXECUTABLE' );
+// archive file (zip, tar, etc)
+define( 'MEDIATYPE_ARCHIVE', 'ARCHIVE' );
+/**@}*/
diff --git a/includes/libs/mime/mime.info b/includes/libs/mime/mime.info
new file mode 100644 (file)
index 0000000..b04d3c6
--- /dev/null
@@ -0,0 +1,119 @@
+# MIME type info file.
+# the first MIME type in each line is the "main" MIME type,
+# the others are aliases for this type
+# the media type is given in upper case and square brackets,
+# like [BITMAP], and must indicate a media type as defined by
+# the MEDIATYPE_xxx constants in Defines.php
+
+
+image/gif      [BITMAP]
+image/png image/x-png  [BITMAP]
+image/ief      [BITMAP]
+image/jpeg image/pjpeg [BITMAP]
+image/jp2      [BITMAP]
+image/xbm      [BITMAP]
+image/tiff     [BITMAP]
+image/x-icon image/x-ico image/vnd.microsoft.icon      [BITMAP]
+image/x-rgb    [BITMAP]
+image/x-portable-pixmap                [BITMAP]
+image/x-portable-graymap image/x-portable-greymap      [BITMAP]
+image/x-bmp image/x-ms-bmp image/bmp application/x-bmp application/bmp [BITMAP]
+image/x-photoshop image/psd image/x-psd image/photoshop image/vnd.adobe.photoshop      [BITMAP]
+image/vnd.djvu image/x.djvu image/x-djvu [BITMAP]
+image/webp     [BITMAP]
+
+image/svg+xml application/svg+xml application/svg image/svg    [DRAWING]
+application/postscript [DRAWING]
+application/x-latex    [DRAWING]
+application/x-tex      [DRAWING]
+application/x-dia-diagram [DRAWING]
+
+
+audio/mpeg audio/mp3 audio/mpeg3       [AUDIO]
+audio/mp4                              [AUDIO]
+audio/wav audio/x-wav audio/wave       [AUDIO]
+audio/midi audio/mid   [AUDIO]
+audio/basic            [AUDIO]
+audio/ogg              [AUDIO]
+audio/x-aiff           [AUDIO]
+audio/x-pn-realaudio   [AUDIO]
+audio/x-realaudio      [AUDIO]
+audio/webm             [AUDIO]
+audio/x-matroska       [AUDIO]
+audio/x-flac           [AUDIO]
+audio/flac             [AUDIO]
+
+video/mpeg application/mpeg    [VIDEO]
+video/ogg                      [VIDEO]
+video/x-sgi-video              [VIDEO]
+video/x-flv                    [VIDEO]
+video/webm                     [VIDEO]
+video/x-matroska               [VIDEO]
+video/mp4                      [VIDEO]
+
+application/ogg application/x-ogg audio/ogg audio/x-ogg video/ogg video/x-ogg          [MULTIMEDIA]
+
+application/x-shockwave-flash  [MULTIMEDIA]
+audio/x-pn-realaudio-plugin    [MULTIMEDIA]
+model/iges     [MULTIMEDIA]
+model/mesh     [MULTIMEDIA]
+model/vrml     [MULTIMEDIA]
+video/quicktime        [MULTIMEDIA]
+video/x-msvideo        [MULTIMEDIA]
+
+text/plain     [TEXT]
+text/html application/xhtml+xml        [TEXT]
+application/xml text/xml       [TEXT]
+text   [TEXT]
+application/json       [TEXT]
+text/csv       [TEXT]
+text/tab-separated-values      [TEXT]
+
+application/zip application/x-zip      [ARCHIVE]
+application/x-gzip     [ARCHIVE]
+application/x-bzip     [ARCHIVE]
+application/x-bzip2    [ARCHIVE]
+application/x-tar      [ARCHIVE]
+application/x-stuffit  [ARCHIVE]
+application/x-opc+zip  [ARCHIVE]
+application/x-7z-compressed [ARCHIVE]
+
+application/javascript text/javascript application/x-javascript application/x-ecmascript text/ecmascript       [EXECUTABLE]
+application/x-bash     [EXECUTABLE]
+application/x-sh       [EXECUTABLE]
+application/x-csh      [EXECUTABLE]
+application/x-tcsh     [EXECUTABLE]
+application/x-tcl      [EXECUTABLE]
+application/x-perl     [EXECUTABLE]
+application/x-python   [EXECUTABLE]
+
+application/pdf application/acrobat    [OFFICE]
+application/msword             [OFFICE]
+application/vnd.ms-excel       [OFFICE]
+application/vnd.ms-powerpoint  [OFFICE]
+application/x-director         [OFFICE]
+text/rtf                       [OFFICE]
+
+application/vnd.openxmlformats-officedocument.wordprocessingml.document        [OFFICE]
+application/vnd.openxmlformats-officedocument.wordprocessingml.template                [OFFICE]
+application/vnd.ms-word.document.macroEnabled.12                               [OFFICE]
+application/vnd.ms-word.template.macroEnabled.12                               [OFFICE]
+application/vnd.openxmlformats-officedocument.presentationml.template          [OFFICE]
+application/vnd.openxmlformats-officedocument.presentationml.slideshow         [OFFICE]
+application/vnd.openxmlformats-officedocument.presentationml.presentation      [OFFICE]
+application/vnd.ms-powerpoint.addin.macroEnabled.12                            [OFFICE]
+application/vnd.ms-powerpoint.presentation.macroEnabled.12                     [OFFICE]
+application/vnd.ms-powerpoint.presentation.macroEnabled.12                     [OFFICE]
+application/vnd.ms-powerpoint.slideshow.macroEnabled.12                                [OFFICE]
+application/vnd.openxmlformats-officedocument.spreadsheetml.sheet              [OFFICE]
+application/vnd.openxmlformats-officedocument.spreadsheetml.template           [OFFICE]
+application/vnd.ms-excel.sheet.macroEnabled.12                                 [OFFICE]
+application/vnd.ms-excel.template.macroEnabled.12                              [OFFICE]
+application/vnd.ms-excel.addin.macroEnabled.12                                 [OFFICE]
+application/vnd.ms-excel.sheet.binary.macroEnabled.12                          [OFFICE]
+application/acad application/x-acad application/autocad_dwg image/x-dwg application/dwg application/x-dwg application/x-autocad image/vnd.dwg drawing/dwg [DRAWING]
+chemical/x-mdl-molfile     [DRAWING]
+chemical/x-mdl-sdfile      [DRAWING]
+chemical/x-mdl-rxnfile     [DRAWING]
+chemical/x-mdl-rdfile      [DRAWING]
+chemical/x-mdl-rgfile      [DRAWING]
diff --git a/includes/libs/mime/mime.types b/includes/libs/mime/mime.types
new file mode 100644 (file)
index 0000000..b4f515a
--- /dev/null
@@ -0,0 +1,188 @@
+application/acad dwg
+application/andrew-inset ez
+application/mac-binhex40 hqx
+application/mac-compactpro cpt
+application/mathml+xml mathml
+application/msword doc dot
+application/octet-stream bin dms lha lzh exe class so dll
+application/oda oda
+application/ogg ogx ogg ogm ogv oga spx opus
+application/pdf pdf
+application/postscript ai eps ps
+application/rdf+xml rdf
+application/smil smi smil
+application/srgs gram
+application/srgs+xml grxml
+application/vnd.mif mif
+application/vnd.ms-excel xls xlt xla
+application/vnd.ms-powerpoint ppt pot pps ppa
+application/vnd.wap.wbxml wbxml
+application/vnd.wap.wmlc wmlc
+application/vnd.wap.wmlscriptc wmlsc
+application/voicexml+xml vxml
+application/x-7z-compressed 7z
+application/x-bcpio bcpio
+application/x-bzip bz
+application/x-bzip2 bz2
+application/x-cdlink vcd
+application/x-chess-pgn pgn
+application/x-cpio cpio
+application/x-csh csh
+application/x-dia-diagram dia
+application/x-director dcr dir dxr
+application/x-dvi dvi
+application/x-futuresplash spl
+application/x-gtar gtar tar
+application/x-gzip gz
+application/x-hdf hdf
+application/x-jar jar
+application/javascript js
+application/json json
+application/x-koan skp skd skt skm
+application/x-latex latex
+application/x-netcdf nc cdf
+application/x-sh sh
+application/x-shar shar
+application/x-shockwave-flash swf
+application/x-stuffit sit
+application/x-sv4cpio sv4cpio
+application/x-sv4crc sv4crc
+application/x-tar tar
+application/x-tcl tcl
+application/x-tex tex
+application/x-texinfo texinfo texi
+application/x-troff t tr roff
+application/x-troff-man man
+application/x-troff-me me
+application/x-troff-ms ms
+application/x-ustar ustar
+application/x-wais-source src
+application/x-xpinstall xpi
+application/xhtml+xml xhtml xht
+application/xslt+xml xslt
+application/xml xml xsl xsd kml
+application/xml-dtd dtd
+application/zip zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw
+application/x-rar rar
+application/font-woff woff
+application/font-woff2 woff2
+application/vnd.ms-fontobject eot
+application/x-font-ttf ttf
+audio/basic au snd
+audio/midi mid midi kar
+audio/mpeg mpga mp2 mp3
+audio/ogg oga ogg spx opus
+video/webm webm
+audio/webm webm
+audio/x-aiff aif aiff aifc
+audio/x-matroska mka mkv
+audio/x-mpegurl m3u
+audio/x-ogg oga ogg spx opus
+audio/x-pn-realaudio ram rm
+audio/x-pn-realaudio-plugin rpm
+audio/x-realaudio ra
+audio/x-wav wav
+audio/wav wav
+audio/x-flac flac
+audio/flac flac
+chemical/x-pdb pdb
+chemical/x-xyz xyz
+image/bmp bmp
+image/cgm cgm
+image/gif gif
+image/ief ief
+image/jp2 j2k jp2 jpg2
+image/jpeg jpeg jpg jpe
+image/png png apng
+image/svg+xml svg
+image/tiff tiff tif
+image/vnd.djvu djvu djv
+image/vnd.microsoft.icon ico
+image/vnd.wap.wbmp wbmp
+image/webp webp
+image/x-cmu-raster ras
+image/x-icon ico
+image/x-ms-bmp bmp
+image/x-portable-anymap pnm
+image/x-portable-bitmap pbm
+image/x-portable-graymap pgm
+image/x-portable-pixmap ppm
+image/x-rgb rgb
+image/x-photoshop psd
+image/x-xbitmap xbm
+image/x-xpixmap xpm
+image/x-xwindowdump xwd
+model/iges igs iges
+model/mesh msh mesh silo
+model/vrml wrl vrml
+text/calendar ics ifb
+text/css css
+text/csv csv
+text/html html htm
+text/plain txt
+text/richtext rtx
+text/rtf rtf
+text/sgml sgml sgm
+text/tab-separated-values tsv
+text/vnd.wap.wml wml
+text/vnd.wap.wmlscript wmls
+text/xml xml xsl xslt rss rdf
+text/x-component htc
+text/x-setext etx
+text/x-sawfish jl
+video/mpeg mpeg mpg mpe
+video/mp4 mp4 m4a m4p m4b m4r m4v
+audio/mp4 m4a
+video/ogg ogv ogm ogg
+video/quicktime qt mov
+video/vnd.mpegurl mxu
+video/x-flv flv
+video/x-matroska mkv mka
+video/x-msvideo avi
+video/x-ogg ogv ogm ogg
+video/x-sgi-movie movie
+x-conference/x-cooltalk ice
+application/vnd.oasis.opendocument.chart odc
+application/vnd.oasis.opendocument.chart-template otc
+application/vnd.oasis.opendocument.database odb
+application/vnd.oasis.opendocument.formula odf
+application/vnd.oasis.opendocument.formula-template otf
+application/vnd.oasis.opendocument.graphics odg
+application/vnd.oasis.opendocument.graphics-template otg
+application/vnd.oasis.opendocument.image odi
+application/vnd.oasis.opendocument.image-template oti
+application/vnd.oasis.opendocument.presentation odp
+application/vnd.oasis.opendocument.presentation-template otp
+application/vnd.oasis.opendocument.spreadsheet ods
+application/vnd.oasis.opendocument.spreadsheet-template ots
+application/vnd.oasis.opendocument.text odt
+application/vnd.oasis.opendocument.text-master odm
+application/vnd.oasis.opendocument.text-template ott
+application/vnd.oasis.opendocument.text-web oth
+application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
+application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
+application/vnd.ms-word.document.macroEnabled.12 docm
+application/vnd.ms-word.template.macroEnabled.12 dotm
+application/vnd.openxmlformats-officedocument.presentationml.template potx
+application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
+application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
+application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
+application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
+application/vnd.ms-powerpoint.presentation.macroEnabled.12 potm
+application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
+application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
+application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
+application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
+application/vnd.ms-excel.template.macroEnabled.12 xltm
+application/vnd.ms-excel.addin.macroEnabled.12 xlam
+application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
+model/vnd.dwfx+xps dwfx
+application/vnd.ms-xpsdocument xps
+application/x-opc+zip docx dotx docm dotm potx ppsx pptx ppam pptm potm ppsm xlsx xltx xlsm xltm xlam xlsb dwfx xps
+chemical/x-mdl-molfile mol
+chemical/x-mdl-sdfile sdf
+chemical/x-mdl-rxnfile rxn
+chemical/x-mdl-rdfile rd
+chemical/x-mdl-rgfile rg
+application/x-amf amf
+application/sla stl
index 8f70fc7..9bfcee7 100644 (file)
@@ -75,25 +75,35 @@ class APCBagOStuff extends BagOStuff {
        }
 
        protected function doGet( $key, $flags = 0 ) {
-               $val = apc_fetch( $key . self::KEY_SUFFIX );
+               return $this->getUnserialize(
+                       apc_fetch( $key . self::KEY_SUFFIX )
+               );
+       }
 
-               if ( is_string( $val ) && !$this->nativeSerialize ) {
-                       $val = $this->isInteger( $val )
-                               ? intval( $val )
-                               : unserialize( $val );
+       protected function getUnserialize( $value ) {
+               if ( is_string( $value ) && !$this->nativeSerialize ) {
+                       $value = $this->isInteger( $value )
+                               ? intval( $value )
+                               : unserialize( $value );
                }
-
-               return $val;
+               return $value;
        }
 
        public function set( $key, $value, $exptime = 0, $flags = 0 ) {
+               apc_store(
+                       $key . self::KEY_SUFFIX,
+                       $this->setSerialize( $value ),
+                       $exptime
+               );
+
+               return true;
+       }
+
+       protected function setSerialize( $value ) {
                if ( !$this->nativeSerialize && !$this->isInteger( $value ) ) {
                        $value = serialize( $value );
                }
-
-               apc_store( $key . self::KEY_SUFFIX, $value, $exptime );
-
-               return true;
+               return $value;
        }
 
        public function delete( $key ) {
diff --git a/includes/libs/objectcache/APCUBagOStuff.php b/includes/libs/objectcache/APCUBagOStuff.php
new file mode 100644 (file)
index 0000000..02b3c92
--- /dev/null
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Object caching using PHP's APCU accelerator.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Cache
+ */
+
+/**
+ * This is a wrapper for APCU's shared memory functions
+ *
+ * @ingroup Cache
+ */
+class APCUBagOStuff extends APCBagOStuff {
+       /**
+        * Constructor
+        *
+        * Available parameters are:
+        *   - nativeSerialize:     If true, pass objects to apcu_store(), and trust it
+        *                          to serialize them correctly. If false, serialize
+        *                          all values in PHP.
+        *
+        * @param array $params
+        */
+       public function __construct( array $params = [] ) {
+               parent::__construct( $params );
+       }
+
+       protected function doGet( $key, $flags = 0 ) {
+               return $this->getUnserialize(
+                       apcu_fetch( $key . self::KEY_SUFFIX )
+               );
+       }
+
+       public function set( $key, $value, $exptime = 0, $flags = 0 ) {
+               apcu_store(
+                       $key . self::KEY_SUFFIX,
+                       $this->setSerialize( $value ),
+                       $exptime
+               );
+
+               return true;
+       }
+
+       public function delete( $key ) {
+               apcu_delete( $key . self::KEY_SUFFIX );
+
+               return true;
+       }
+
+       public function incr( $key, $value = 1 ) {
+               /**
+                * @todo When we only support php 7 or higher remove this hack
+                *
+                * https://github.com/krakjoe/apcu/issues/166
+                */
+               if ( apcu_exists( $key . self::KEY_SUFFIX ) ) {
+                       return apcu_inc( $key . self::KEY_SUFFIX, $value );
+               } else {
+                       return apcu_set( $key . self::KEY_SUFFIX, $value );
+               }
+       }
+
+       public function decr( $key, $value = 1 ) {
+               /**
+                * @todo When we only support php 7 or higher remove this hack
+                *
+                * https://github.com/krakjoe/apcu/issues/166
+                */
+               if ( apcu_exists( $key . self::KEY_SUFFIX ) ) {
+                       return apcu_dec( $key . self::KEY_SUFFIX, $value );
+               } else {
+                       return apcu_set( $key . self::KEY_SUFFIX, -$value );
+               }
+       }
+}
index cd79b67..d0b68bc 100644 (file)
@@ -29,6 +29,8 @@
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
 use Psr\Log\NullLogger;
+use Wikimedia\ScopedCallback;
+use Wikimedia\WaitConditionLoop;
 
 /**
  * interface is intended to be more or less compatible with
index e03cec6..baa3c32 100644 (file)
@@ -20,7 +20,6 @@
  * @file
  * @ingroup Cache
  */
-use Wikimedia\Assert\Assert;
 
 /**
  * Simple store for keeping values in an associative array for the current process.
@@ -46,7 +45,9 @@ class HashBagOStuff extends BagOStuff {
                parent::__construct( $params );
 
                $this->maxCacheKeys = isset( $params['maxKeys'] ) ? $params['maxKeys'] : INF;
-               Assert::parameter( $this->maxCacheKeys > 0, 'maxKeys', 'must be above zero' );
+               if ( $this->maxCacheKeys <= 0 ) {
+                       throw new InvalidArgumentException( '$maxKeys parameter must be above zero' );
+               }
        }
 
        protected function expire( $key ) {
index 6973392..5128d82 100644 (file)
@@ -43,13 +43,11 @@ class MemcachedBagOStuff extends BagOStuff {
         * @return array
         */
        protected function applyDefaultParams( $params ) {
-               if ( !isset( $params['compress_threshold'] ) ) {
-                       $params['compress_threshold'] = 1500;
-               }
-               if ( !isset( $params['connect_timeout'] ) ) {
-                       $params['connect_timeout'] = 0.5;
-               }
-               return $params;
+               return $params + [
+                       'compress_threshold' => 1500,
+                       'connect_timeout' => .5,
+                       'debug' => false
+               ];
        }
 
        protected function doGet( $key, $flags = 0 ) {
diff --git a/includes/libs/objectcache/RedisBagOStuff.php b/includes/libs/objectcache/RedisBagOStuff.php
new file mode 100644 (file)
index 0000000..d852f82
--- /dev/null
@@ -0,0 +1,433 @@
+<?php
+/**
+ * Object caching using Redis (http://redis.io/).
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * Redis-based caching module for redis server >= 2.6.12
+ *
+ * @note: avoid use of Redis::MULTI transactions for twemproxy support
+ */
+class RedisBagOStuff extends BagOStuff {
+       /** @var RedisConnectionPool */
+       protected $redisPool;
+       /** @var array List of server names */
+       protected $servers;
+       /** @var array Map of (tag => server name) */
+       protected $serverTagMap;
+       /** @var bool */
+       protected $automaticFailover;
+
+       /**
+        * Construct a RedisBagOStuff object. Parameters are:
+        *
+        *   - servers: An array of server names. A server name may be a hostname,
+        *     a hostname/port combination or the absolute path of a UNIX socket.
+        *     If a hostname is specified but no port, the standard port number
+        *     6379 will be used. Arrays keys can be used to specify the tag to
+        *     hash on in place of the host/port. Required.
+        *
+        *   - connectTimeout: The timeout for new connections, in seconds. Optional,
+        *     default is 1 second.
+        *
+        *   - persistent: Set this to true to allow connections to persist across
+        *     multiple web requests. False by default.
+        *
+        *   - password: The authentication password, will be sent to Redis in
+        *     clear text. Optional, if it is unspecified, no AUTH command will be
+        *     sent.
+        *
+        *   - automaticFailover: If this is false, then each key will be mapped to
+        *     a single server, and if that server is down, any requests for that key
+        *     will fail. If this is true, a connection failure will cause the client
+        *     to immediately try the next server in the list (as determined by a
+        *     consistent hashing algorithm). True by default. This has the
+        *     potential to create consistency issues if a server is slow enough to
+        *     flap, for example if it is in swap death.
+        * @param array $params
+        */
+       function __construct( $params ) {
+               parent::__construct( $params );
+               $redisConf = [ 'serializer' => 'none' ]; // manage that in this class
+               foreach ( [ 'connectTimeout', 'persistent', 'password' ] as $opt ) {
+                       if ( isset( $params[$opt] ) ) {
+                               $redisConf[$opt] = $params[$opt];
+                       }
+               }
+               $this->redisPool = RedisConnectionPool::singleton( $redisConf );
+
+               $this->servers = $params['servers'];
+               foreach ( $this->servers as $key => $server ) {
+                       $this->serverTagMap[is_int( $key ) ? $server : $key] = $server;
+               }
+
+               if ( isset( $params['automaticFailover'] ) ) {
+                       $this->automaticFailover = $params['automaticFailover'];
+               } else {
+                       $this->automaticFailover = true;
+               }
+
+               $this->attrMap[self::ATTR_SYNCWRITES] = self::QOS_SYNCWRITES_NONE;
+       }
+
+       protected function doGet( $key, $flags = 0 ) {
+               list( $server, $conn ) = $this->getConnection( $key );
+               if ( !$conn ) {
+                       return false;
+               }
+               try {
+                       $value = $conn->get( $key );
+                       $result = $this->unserialize( $value );
+               } catch ( RedisException $e ) {
+                       $result = false;
+                       $this->handleException( $conn, $e );
+               }
+
+               $this->logRequest( 'get', $key, $server, $result );
+               return $result;
+       }
+
+       public function set( $key, $value, $expiry = 0, $flags = 0 ) {
+               list( $server, $conn ) = $this->getConnection( $key );
+               if ( !$conn ) {
+                       return false;
+               }
+               $expiry = $this->convertToRelative( $expiry );
+               try {
+                       if ( $expiry ) {
+                               $result = $conn->setex( $key, $expiry, $this->serialize( $value ) );
+                       } else {
+                               // No expiry, that is very different from zero expiry in Redis
+                               $result = $conn->set( $key, $this->serialize( $value ) );
+                       }
+               } catch ( RedisException $e ) {
+                       $result = false;
+                       $this->handleException( $conn, $e );
+               }
+
+               $this->logRequest( 'set', $key, $server, $result );
+               return $result;
+       }
+
+       public function delete( $key ) {
+               list( $server, $conn ) = $this->getConnection( $key );
+               if ( !$conn ) {
+                       return false;
+               }
+               try {
+                       $conn->delete( $key );
+                       // Return true even if the key didn't exist
+                       $result = true;
+               } catch ( RedisException $e ) {
+                       $result = false;
+                       $this->handleException( $conn, $e );
+               }
+
+               $this->logRequest( 'delete', $key, $server, $result );
+               return $result;
+       }
+
+       public function getMulti( array $keys, $flags = 0 ) {
+               $batches = [];
+               $conns = [];
+               foreach ( $keys as $key ) {
+                       list( $server, $conn ) = $this->getConnection( $key );
+                       if ( !$conn ) {
+                               continue;
+                       }
+                       $conns[$server] = $conn;
+                       $batches[$server][] = $key;
+               }
+               $result = [];
+               foreach ( $batches as $server => $batchKeys ) {
+                       $conn = $conns[$server];
+                       try {
+                               $conn->multi( Redis::PIPELINE );
+                               foreach ( $batchKeys as $key ) {
+                                       $conn->get( $key );
+                               }
+                               $batchResult = $conn->exec();
+                               if ( $batchResult === false ) {
+                                       $this->debug( "multi request to $server failed" );
+                                       continue;
+                               }
+                               foreach ( $batchResult as $i => $value ) {
+                                       if ( $value !== false ) {
+                                               $result[$batchKeys[$i]] = $this->unserialize( $value );
+                                       }
+                               }
+                       } catch ( RedisException $e ) {
+                               $this->handleException( $conn, $e );
+                       }
+               }
+
+               $this->debug( "getMulti for " . count( $keys ) . " keys " .
+                       "returned " . count( $result ) . " results" );
+               return $result;
+       }
+
+       /**
+        * @param array $data
+        * @param int $expiry
+        * @return bool
+        */
+       public function setMulti( array $data, $expiry = 0 ) {
+               $batches = [];
+               $conns = [];
+               foreach ( $data as $key => $value ) {
+                       list( $server, $conn ) = $this->getConnection( $key );
+                       if ( !$conn ) {
+                               continue;
+                       }
+                       $conns[$server] = $conn;
+                       $batches[$server][] = $key;
+               }
+
+               $expiry = $this->convertToRelative( $expiry );
+               $result = true;
+               foreach ( $batches as $server => $batchKeys ) {
+                       $conn = $conns[$server];
+                       try {
+                               $conn->multi( Redis::PIPELINE );
+                               foreach ( $batchKeys as $key ) {
+                                       if ( $expiry ) {
+                                               $conn->setex( $key, $expiry, $this->serialize( $data[$key] ) );
+                                       } else {
+                                               $conn->set( $key, $this->serialize( $data[$key] ) );
+                                       }
+                               }
+                               $batchResult = $conn->exec();
+                               if ( $batchResult === false ) {
+                                       $this->debug( "setMulti request to $server failed" );
+                                       continue;
+                               }
+                               foreach ( $batchResult as $value ) {
+                                       if ( $value === false ) {
+                                               $result = false;
+                                       }
+                               }
+                       } catch ( RedisException $e ) {
+                               $this->handleException( $server, $conn, $e );
+                               $result = false;
+                       }
+               }
+
+               return $result;
+       }
+
+       public function add( $key, $value, $expiry = 0 ) {
+               list( $server, $conn ) = $this->getConnection( $key );
+               if ( !$conn ) {
+                       return false;
+               }
+               $expiry = $this->convertToRelative( $expiry );
+               try {
+                       if ( $expiry ) {
+                               $result = $conn->set(
+                                       $key,
+                                       $this->serialize( $value ),
+                                       [ 'nx', 'ex' => $expiry ]
+                               );
+                       } else {
+                               $result = $conn->setnx( $key, $this->serialize( $value ) );
+                       }
+               } catch ( RedisException $e ) {
+                       $result = false;
+                       $this->handleException( $conn, $e );
+               }
+
+               $this->logRequest( 'add', $key, $server, $result );
+               return $result;
+       }
+
+       /**
+        * Non-atomic implementation of incr().
+        *
+        * Probably all callers actually want incr() to atomically initialise
+        * values to zero if they don't exist, as provided by the Redis INCR
+        * command. But we are constrained by the memcached-like interface to
+        * return null in that case. Once the key exists, further increments are
+        * atomic.
+        * @param string $key Key to increase
+        * @param int $value Value to add to $key (Default 1)
+        * @return int|bool New value or false on failure
+        */
+       public function incr( $key, $value = 1 ) {
+               list( $server, $conn ) = $this->getConnection( $key );
+               if ( !$conn ) {
+                       return false;
+               }
+               try {
+                       if ( !$conn->exists( $key ) ) {
+                               return null;
+                       }
+                       // @FIXME: on races, the key may have a 0 TTL
+                       $result = $conn->incrBy( $key, $value );
+               } catch ( RedisException $e ) {
+                       $result = false;
+                       $this->handleException( $conn, $e );
+               }
+
+               $this->logRequest( 'incr', $key, $server, $result );
+               return $result;
+       }
+
+       public function changeTTL( $key, $expiry = 0 ) {
+               list( $server, $conn ) = $this->getConnection( $key );
+               if ( !$conn ) {
+                       return false;
+               }
+
+               $expiry = $this->convertToRelative( $expiry );
+               try {
+                       $result = $conn->expire( $key, $expiry );
+               } catch ( RedisException $e ) {
+                       $result = false;
+                       $this->handleException( $conn, $e );
+               }
+
+               $this->logRequest( 'expire', $key, $server, $result );
+               return $result;
+       }
+
+       public function modifySimpleRelayEvent( array $event ) {
+               if ( array_key_exists( 'val', $event ) ) {
+                       $event['val'] = serialize( $event['val'] ); // this class uses PHP serialization
+               }
+
+               return $event;
+       }
+
+       /**
+        * @param mixed $data
+        * @return string
+        */
+       protected function serialize( $data ) {
+               // Serialize anything but integers so INCR/DECR work
+               // Do not store integer-like strings as integers to avoid type confusion (bug 60563)
+               return is_int( $data ) ? $data : serialize( $data );
+       }
+
+       /**
+        * @param string $data
+        * @return mixed
+        */
+       protected function unserialize( $data ) {
+               $int = intval( $data );
+               return $data === (string)$int ? $int : unserialize( $data );
+       }
+
+       /**
+        * Get a Redis object with a connection suitable for fetching the specified key
+        * @param string $key
+        * @return array (server, RedisConnRef) or (false, false)
+        */
+       protected function getConnection( $key ) {
+               $candidates = array_keys( $this->serverTagMap );
+
+               if ( count( $this->servers ) > 1 ) {
+                       ArrayUtils::consistentHashSort( $candidates, $key, '/' );
+                       if ( !$this->automaticFailover ) {
+                               $candidates = array_slice( $candidates, 0, 1 );
+                       }
+               }
+
+               while ( ( $tag = array_shift( $candidates ) ) !== null ) {
+                       $server = $this->serverTagMap[$tag];
+                       $conn = $this->redisPool->getConnection( $server, $this->logger );
+                       if ( !$conn ) {
+                               continue;
+                       }
+
+                       // If automatic failover is enabled, check that the server's link
+                       // to its master (if any) is up -- but only if there are other
+                       // viable candidates left to consider. Also, getMasterLinkStatus()
+                       // does not work with twemproxy, though $candidates will be empty
+                       // by now in such cases.
+                       if ( $this->automaticFailover && $candidates ) {
+                               try {
+                                       if ( $this->getMasterLinkStatus( $conn ) === 'down' ) {
+                                               // If the master cannot be reached, fail-over to the next server.
+                                               // If masters are in data-center A, and replica DBs in data-center B,
+                                               // this helps avoid the case were fail-over happens in A but not
+                                               // to the corresponding server in B (e.g. read/write mismatch).
+                                               continue;
+                                       }
+                               } catch ( RedisException $e ) {
+                                       // Server is not accepting commands
+                                       $this->handleException( $conn, $e );
+                                       continue;
+                               }
+                       }
+
+                       return [ $server, $conn ];
+               }
+
+               $this->setLastError( BagOStuff::ERR_UNREACHABLE );
+
+               return [ false, false ];
+       }
+
+       /**
+        * Check the master link status of a Redis server that is configured as a replica DB.
+        * @param RedisConnRef $conn
+        * @return string|null Master link status (either 'up' or 'down'), or null
+        *  if the server is not a replica DB.
+        */
+       protected function getMasterLinkStatus( RedisConnRef $conn ) {
+               $info = $conn->info();
+               return isset( $info['master_link_status'] )
+                       ? $info['master_link_status']
+                       : null;
+       }
+
+       /**
+        * Log a fatal error
+        * @param string $msg
+        */
+       protected function logError( $msg ) {
+               $this->logger->error( "Redis error: $msg" );
+       }
+
+       /**
+        * The redis extension throws an exception in response to various read, write
+        * and protocol errors. Sometimes it also closes the connection, sometimes
+        * not. The safest response for us is to explicitly destroy the connection
+        * object and let it be reopened during the next request.
+        * @param RedisConnRef $conn
+        * @param Exception $e
+        */
+       protected function handleException( RedisConnRef $conn, $e ) {
+               $this->setLastError( BagOStuff::ERR_UNEXPECTED );
+               $this->redisPool->handleError( $conn, $e );
+       }
+
+       /**
+        * Send information about a single request to the debug log
+        * @param string $method
+        * @param string $key
+        * @param string $server
+        * @param bool $result
+        */
+       public function logRequest( $method, $key, $server, $result ) {
+               $this->debug( "$method $key on $server: " .
+                       ( $result === false ? "failure" : "success" ) );
+       }
+}
index 5f6e324..8d3c6d9 100644 (file)
@@ -88,6 +88,11 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
        /** @var int ERR_* constant for the "last error" registry */
        protected $lastRelayError = self::ERR_NONE;
 
+       /** @var integer Callback stack depth for getWithSetCallback() */
+       private $callbackDepth = 0;
+       /** @var mixed[] Temporary warm-up cache */
+       private $warmupCache = [];
+
        /** Max time expected to pass between delete() and DB commit finishing */
        const MAX_COMMIT_DELAY = 3;
        /** Max replication+snapshot lag before applying TTL_LAGGED or disallowing set() */
@@ -284,7 +289,14 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                }
 
                // Fetch all of the raw values
-               $wrappedValues = $this->cache->getMulti( array_merge( $valueKeys, $checkKeysFlat ) );
+               $keysGet = array_merge( $valueKeys, $checkKeysFlat );
+               if ( $this->warmupCache ) {
+                       $wrappedValues = array_intersect_key( $this->warmupCache, array_flip( $keysGet ) );
+                       $keysGet = array_diff( $keysGet, array_keys( $wrappedValues ) ); // keys left to fetch
+               } else {
+                       $wrappedValues = [];
+               }
+               $wrappedValues += $this->cache->getMulti( $keysGet );
                // Time used to compare/init "check" keys (derived after getMulti() to be pessimistic)
                $now = microtime( true );
 
@@ -837,8 +849,10 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
        final public function getWithSetCallback( $key, $ttl, $callback, array $opts = [] ) {
                $pcTTL = isset( $opts['pcTTL'] ) ? $opts['pcTTL'] : self::TTL_UNCACHEABLE;
 
-               // Try the process cache if enabled
-               if ( $pcTTL >= 0 ) {
+               // Try the process cache if enabled and the cache callback is not within a cache callback.
+               // Process cache use in nested callbacks is not lag-safe with regard to HOLDOFF_TTL since
+               // the in-memory value is further lagged than the shared one since it uses a blind TTL.
+               if ( $pcTTL >= 0 && $this->callbackDepth == 0 ) {
                        $group = isset( $opts['pcGroup'] ) ? $opts['pcGroup'] : self::PC_PRIMARY;
                        $procCache = $this->getProcessCache( $group );
                        $value = $procCache->get( $key );
@@ -929,12 +943,13 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                $cValue = $this->get( $key, $curTTL, $checkKeys, $asOf ); // current value
                $value = $cValue; // return value
 
-               // Determine if a regeneration is desired
+               $preCallbackTime = microtime( true );
+               // Determine if a cached value regeneration is needed or desired
                if ( $value !== false
                        && $curTTL > 0
                        && $this->isValid( $value, $versioned, $asOf, $minTime )
                        && !$this->worthRefreshExpiring( $curTTL, $lowTTL )
-                       && !$this->worthRefreshPopular( $asOf, $ageNew, $popWindow )
+                       && !$this->worthRefreshPopular( $asOf, $ageNew, $popWindow, $preCallbackTime )
                ) {
                        return $value;
                }
@@ -984,7 +999,12 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
 
                // Generate the new value from the callback...
                $setOpts = [];
-               $value = call_user_func_array( $callback, [ $cValue, &$ttl, &$setOpts, $asOf ] );
+               ++$this->callbackDepth;
+               try {
+                       $value = call_user_func_array( $callback, [ $cValue, &$ttl, &$setOpts, $asOf ] );
+               } finally {
+                       --$this->callbackDepth;
+               }
                // When delete() is called, writes are write-holed by the tombstone,
                // so use a special INTERIM key to pass the new value around threads.
                if ( ( $isTombstone && $lockTSE > 0 ) && $value !== false && $ttl >= 0 ) {
@@ -1003,8 +1023,10 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                }
 
                if ( $value !== false && $ttl >= 0 ) {
-                       // Update the cache; this will fail if the key is tombstoned
                        $setOpts['lockTSE'] = $lockTSE;
+                       // Use best known "since" timestamp if not provided
+                       $setOpts += [ 'since' => $preCallbackTime ];
+                       // Update the cache; this will fail if the key is tombstoned
                        $this->set( $key, $value, $ttl, $setOpts );
                }
 
@@ -1016,6 +1038,95 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                return $value;
        }
 
+       /**
+        * Method to fetch/regenerate multiple cache keys at once
+        *
+        * This works the same as getWithSetCallback() except:
+        *   - a) The $keys argument expects the result of WANObjectCache::makeMultiKeys()
+        *   - b) The $callback argument expects a callback taking the following arguments:
+        *         - $id: ID of an entity to query
+        *         - $oldValue : the prior cache value or false if none was present
+        *         - &$ttl : a reference to the new value TTL in seconds
+        *         - &$setOpts : a reference to options for set() which can be altered
+        *         - $oldAsOf : generation UNIX timestamp of $oldValue or null if not present
+        *        Aside from the additional $id argument, the other arguments function the same
+        *        way they do in getWithSetCallback().
+        *   - c) The return value is a map of (cache key => value) in the order of $keyedIds
+        *
+        * @see WANObjectCache::getWithSetCallback()
+        *
+        * Example usage:
+        * @code
+        *     $rows = $cache->getMultiWithSetCallback(
+        *         // Map of cache keys to entity IDs
+        *         $cache->makeMultiKeys(
+        *             $this->fileVersionIds(),
+        *             function ( $id, WANObjectCache $cache ) {
+        *                 return $cache->makeKey( 'file-version', $id );
+        *             }
+        *         ),
+        *         // Time-to-live (in seconds)
+        *         $cache::TTL_DAY,
+        *         // Function that derives the new key value
+        *         return function ( $id, $oldValue, &$ttl, array &$setOpts ) {
+        *             $dbr = wfGetDB( DB_REPLICA );
+        *             // Account for any snapshot/replica DB lag
+        *             $setOpts += Database::getCacheSetOptions( $dbr );
+        *
+        *             // Load the row for this file
+        *             $row = $dbr->selectRow( 'file', '*', [ 'id' => $id ], __METHOD__ );
+        *
+        *             return $row ? (array)$row : false;
+        *         },
+        *         [
+        *             // Process cache for 30 seconds
+        *             'pcTTL' => 30,
+        *             // Use a dedicated 500 item cache (initialized on-the-fly)
+        *             'pcGroup' => 'file-versions:500'
+        *         ]
+        *     );
+        *     $files = array_map( [ __CLASS__, 'newFromRow' ], $rows );
+        * @endcode
+        *
+        * @param ArrayIterator $keyedIds Result of WANObjectCache::makeMultiKeys()
+        * @param integer $ttl Seconds to live for key updates
+        * @param callable $callback Callback the yields entity regeneration callbacks
+        * @param array $opts Options map
+        * @return array Map of (cache key => value) in the same order as $keyedIds
+        * @since 1.28
+        */
+       final public function getMultiWithSetCallback(
+               ArrayIterator $keyedIds, $ttl, callable $callback, array $opts = []
+       ) {
+               $keysWarmUp = iterator_to_array( $keyedIds, true );
+               $checkKeys = isset( $opts['checkKeys'] ) ? $opts['checkKeys'] : [];
+               foreach ( $checkKeys as $i => $checkKeyOrKeys ) {
+                       if ( is_int( $i ) ) {
+                               $keysWarmUp[] = $checkKeyOrKeys;
+                       } else {
+                               $keysWarmUp = array_merge( $keysWarmUp, $checkKeyOrKeys );
+                       }
+               }
+
+               $this->warmupCache = $this->cache->getMulti( $keysWarmUp );
+               $this->warmupCache += array_fill_keys( $keysWarmUp, false );
+
+               // Wrap $callback to match the getWithSetCallback() format while passing $id to $callback
+               $id = null;
+               $func = function ( $oldValue, &$ttl, array $setOpts, $oldAsOf ) use ( $callback, &$id ) {
+                       return $callback( $id, $oldValue, $ttl, $setOpts, $oldAsOf );
+               };
+
+               $values = [];
+               foreach ( $keyedIds as $key => $id ) {
+                       $values[$key] = $this->getWithSetCallback( $key, $ttl, $func, $opts );
+               }
+
+               $this->warmupCache = [];
+
+               return $values;
+       }
+
        /**
         * @see BagOStuff::makeKey()
         * @param string ... Key component
@@ -1036,6 +1147,21 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                return call_user_func_array( [ $this->cache, __FUNCTION__ ], func_get_args() );
        }
 
+       /**
+        * @param array $entities List of entity IDs
+        * @param callable $keyFunc Callback yielding a key from (entity ID, this WANObjectCache)
+        * @return ArrayIterator Iterator yielding (cache key => entity ID) in $entities order
+        * @since 1.28
+        */
+       public function makeMultiKeys( array $entities, callable $keyFunc ) {
+               $map = [];
+               foreach ( $entities as $entity ) {
+                       $map[$keyFunc( $entity, $this )] = $entity;
+               }
+
+               return new ArrayIterator( $map );
+       }
+
        /**
         * Get the "last error" registered; clearLastError() should be called manually
         * @return int ERR_* class constant for the "last error" registry
@@ -1222,10 +1348,11 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
         * @param float $asOf UNIX timestamp of the value
         * @param integer $ageNew Age of key when this might recommend refreshing (seconds)
         * @param integer $timeTillRefresh Age of key when it should be refreshed if popular (seconds)
+        * @param float $now The current UNIX timestamp
         * @return bool
         */
-       protected function worthRefreshPopular( $asOf, $ageNew, $timeTillRefresh ) {
-               $age = microtime( true ) - $asOf;
+       protected function worthRefreshPopular( $asOf, $ageNew, $timeTillRefresh, $now ) {
+               $age = $now - $asOf;
                $timeOld = $age - $ageNew;
                if ( $timeOld <= 0 ) {
                        return false;
index 19cc66a..6996ce5 100644 (file)
@@ -65,6 +65,13 @@ class WinCacheBagOStuff extends BagOStuff {
        }
 
        public function merge( $key, callable $callback, $exptime = 0, $attempts = 10, $flags = 0 ) {
-               return $this->mergeViaCas( $key, $callback, $exptime, $attempts );
+               if ( wincache_lock( $key ) ) { // optimize with FIFO lock
+                       $ok = $this->mergeViaLock( $key, $callback, $exptime, $attempts, $flags );
+                       wincache_unlock( $key );
+               } else {
+                       $ok = false;
+               }
+
+               return $ok;
        }
 }
diff --git a/includes/libs/rdbms/ChronologyProtector.php b/includes/libs/rdbms/ChronologyProtector.php
new file mode 100644 (file)
index 0000000..88af1db
--- /dev/null
@@ -0,0 +1,326 @@
+<?php
+/**
+ * Generator of database load balancing objects.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+use Wikimedia\WaitConditionLoop;
+
+/**
+ * Class for ensuring a consistent ordering of events as seen by the user, despite replication.
+ * Kind of like Hawking's [[Chronology Protection Agency]].
+ */
+class ChronologyProtector implements LoggerAwareInterface {
+       /** @var BagOStuff */
+       protected $store;
+       /** @var LoggerInterface */
+       protected $logger;
+
+       /** @var string Storage key name */
+       protected $key;
+       /** @var string Hash of client parameters */
+       protected $clientId;
+       /** @var float|null Minimum UNIX timestamp of 1+ expected startup positions */
+       protected $waitForPosTime;
+       /** @var int Max seconds to wait on positions to appear */
+       protected $waitForPosTimeout = self::POS_WAIT_TIMEOUT;
+       /** @var bool Whether to no-op all method calls */
+       protected $enabled = true;
+       /** @var bool Whether to check and wait on positions */
+       protected $wait = true;
+
+       /** @var bool Whether the client data was loaded */
+       protected $initialized = false;
+       /** @var DBMasterPos[] Map of (DB master name => position) */
+       protected $startupPositions = [];
+       /** @var DBMasterPos[] Map of (DB master name => position) */
+       protected $shutdownPositions = [];
+       /** @var float[] Map of (DB master name => 1) */
+       protected $shutdownTouchDBs = [];
+
+       /** @var integer Seconds to store positions */
+       const POSITION_TTL = 60;
+       /** @var integer Max time to wait for positions to appear */
+       const POS_WAIT_TIMEOUT = 5;
+
+       /**
+        * @param BagOStuff $store
+        * @param array $client Map of (ip: <IP>, agent: <user-agent>)
+        * @param float $posTime UNIX timestamp
+        * @since 1.27
+        */
+       public function __construct( BagOStuff $store, array $client, $posTime = null ) {
+               $this->store = $store;
+               $this->clientId = md5( $client['ip'] . "\n" . $client['agent'] );
+               $this->key = $store->makeGlobalKey( __CLASS__, $this->clientId );
+               $this->waitForPosTime = $posTime;
+               $this->logger = new \Psr\Log\NullLogger();
+       }
+
+       public function setLogger( LoggerInterface $logger ) {
+               $this->logger = $logger;
+       }
+
+       /**
+        * @param bool $enabled Whether to no-op all method calls
+        * @since 1.27
+        */
+       public function setEnabled( $enabled ) {
+               $this->enabled = $enabled;
+       }
+
+       /**
+        * @param bool $enabled Whether to check and wait on positions
+        * @since 1.27
+        */
+       public function setWaitEnabled( $enabled ) {
+               $this->wait = $enabled;
+       }
+
+       /**
+        * Initialise a ILoadBalancer to give it appropriate chronology protection.
+        *
+        * If the stash has a previous master position recorded, this will try to
+        * make sure that the next query to a replica DB of that master will see changes up
+        * to that position by delaying execution. The delay may timeout and allow stale
+        * data if no non-lagged replica DBs are available.
+        *
+        * @param ILoadBalancer $lb
+        * @return void
+        */
+       public function initLB( ILoadBalancer $lb ) {
+               if ( !$this->enabled || $lb->getServerCount() <= 1 ) {
+                       return; // non-replicated setup or disabled
+               }
+
+               $this->initPositions();
+
+               $masterName = $lb->getServerName( $lb->getWriterIndex() );
+               if ( !empty( $this->startupPositions[$masterName] ) ) {
+                       $pos = $this->startupPositions[$masterName];
+                       $this->logger->info( __METHOD__ . ": LB for '$masterName' set to pos $pos\n" );
+                       $lb->waitFor( $pos );
+               }
+       }
+
+       /**
+        * Notify the ChronologyProtector that the ILoadBalancer is about to shut
+        * down. Saves replication positions.
+        *
+        * @param ILoadBalancer $lb
+        * @return void
+        */
+       public function shutdownLB( ILoadBalancer $lb ) {
+               if ( !$this->enabled ) {
+                       return; // not enabled
+               } elseif ( !$lb->hasOrMadeRecentMasterChanges( INF ) ) {
+                       // Only save the position if writes have been done on the connection
+                       return;
+               }
+
+               $masterName = $lb->getServerName( $lb->getWriterIndex() );
+               if ( $lb->getServerCount() > 1 ) {
+                       $pos = $lb->getMasterPos();
+                       $this->logger->info( __METHOD__ . ": LB for '$masterName' has pos $pos\n" );
+                       $this->shutdownPositions[$masterName] = $pos;
+               } else {
+                       $this->logger->info( __METHOD__ . ": DB '$masterName' touched\n" );
+               }
+               $this->shutdownTouchDBs[$masterName] = 1;
+       }
+
+       /**
+        * Notify the ChronologyProtector that the LBFactory is done calling shutdownLB() for now.
+        * May commit chronology data to persistent storage.
+        *
+        * @param callable|null $workCallback Work to do instead of waiting on syncing positions
+        * @param string $mode One of (sync, async); whether to wait on remote datacenters
+        * @return DBMasterPos[] Empty on success; returns the (db name => position) map on failure
+        */
+       public function shutdown( callable $workCallback = null, $mode = 'sync' ) {
+               if ( !$this->enabled ) {
+                       return [];
+               }
+
+               $store = $this->store;
+               // Some callers might want to know if a user recently touched a DB.
+               // These writes do not need to block on all datacenters receiving them.
+               foreach ( $this->shutdownTouchDBs as $dbName => $unused ) {
+                       $store->set(
+                               $this->getTouchedKey( $this->store, $dbName ),
+                               microtime( true ),
+                               $store::TTL_DAY
+                       );
+               }
+
+               if ( !count( $this->shutdownPositions ) ) {
+                       return []; // nothing to save
+               }
+
+               $this->logger->info( __METHOD__ . ": saving master pos for " .
+                       implode( ', ', array_keys( $this->shutdownPositions ) ) . "\n"
+               );
+
+               // CP-protected writes should overwhemingly go to the master datacenter, so get DC-local
+               // lock to merge the values. Use a DC-local get() and a synchronous all-DC set(). This
+               // makes it possible for the BagOStuff class to write in parallel to all DCs with one RTT.
+               if ( $store->lock( $this->key, 3 ) ) {
+                       if ( $workCallback ) {
+                               // Let the store run the work before blocking on a replication sync barrier. By the
+                               // time it's done with the work, the barrier should be fast if replication caught up.
+                               $store->addBusyCallback( $workCallback );
+                       }
+                       $ok = $store->set(
+                               $this->key,
+                               self::mergePositions( $store->get( $this->key ), $this->shutdownPositions ),
+                               self::POSITION_TTL,
+                               ( $mode === 'sync' ) ? $store::WRITE_SYNC : 0
+                       );
+                       $store->unlock( $this->key );
+               } else {
+                       $ok = false;
+               }
+
+               if ( !$ok ) {
+                       $bouncedPositions = $this->shutdownPositions;
+                       // Raced out too many times or stash is down
+                       $this->logger->warning( __METHOD__ . ": failed to save master pos for " .
+                               implode( ', ', array_keys( $this->shutdownPositions ) ) . "\n"
+                       );
+               } elseif ( $mode === 'sync' &&
+                       $store->getQoS( $store::ATTR_SYNCWRITES ) < $store::QOS_SYNCWRITES_BE
+               ) {
+                       // Positions may not be in all datacenters, force LBFactory to play it safe
+                       $this->logger->info( __METHOD__ . ": store may not support synchronous writes." );
+                       $bouncedPositions = $this->shutdownPositions;
+               } else {
+                       $bouncedPositions = [];
+               }
+
+               return $bouncedPositions;
+       }
+
+       /**
+        * @param string $dbName DB master name (e.g. "db1052")
+        * @return float|bool UNIX timestamp when client last touched the DB; false if not on record
+        * @since 1.28
+        */
+       public function getTouched( $dbName ) {
+               return $this->store->get( $this->getTouchedKey( $this->store, $dbName ) );
+       }
+
+       /**
+        * @param BagOStuff $store
+        * @param string $dbName
+        * @return string
+        */
+       private function getTouchedKey( BagOStuff $store, $dbName ) {
+               return $store->makeGlobalKey( __CLASS__, 'mtime', $this->clientId, $dbName );
+       }
+
+       /**
+        * Load in previous master positions for the client
+        */
+       protected function initPositions() {
+               if ( $this->initialized ) {
+                       return;
+               }
+
+               $this->initialized = true;
+               if ( $this->wait ) {
+                       // If there is an expectation to see master positions with a certain min
+                       // timestamp, then block until they appear, or until a timeout is reached.
+                       if ( $this->waitForPosTime > 0.0 ) {
+                               $data = null;
+                               $loop = new WaitConditionLoop(
+                                       function () use ( &$data ) {
+                                               $data = $this->store->get( $this->key );
+
+                                               return ( self::minPosTime( $data ) >= $this->waitForPosTime )
+                                                       ? WaitConditionLoop::CONDITION_REACHED
+                                                       : WaitConditionLoop::CONDITION_CONTINUE;
+                                       },
+                                       $this->waitForPosTimeout
+                               );
+                               $result = $loop->invoke();
+                               $waitedMs = $loop->getLastWaitTime() * 1e3;
+
+                               if ( $result == $loop::CONDITION_REACHED ) {
+                                       $msg = "expected and found pos time {$this->waitForPosTime} ({$waitedMs}ms)";
+                                       $this->logger->debug( $msg );
+                               } else {
+                                       $msg = "expected but missed pos time {$this->waitForPosTime} ({$waitedMs}ms)";
+                                       $this->logger->info( $msg );
+                               }
+                       } else {
+                               $data = $this->store->get( $this->key );
+                       }
+
+                       $this->startupPositions = $data ? $data['positions'] : [];
+                       $this->logger->info( __METHOD__ . ": key is {$this->key} (read)\n" );
+               } else {
+                       $this->startupPositions = [];
+                       $this->logger->info( __METHOD__ . ": key is {$this->key} (unread)\n" );
+               }
+       }
+
+       /**
+        * @param array|bool $data
+        * @return float|null
+        */
+       private static function minPosTime( $data ) {
+               if ( !isset( $data['positions'] ) ) {
+                       return null;
+               }
+
+               $min = null;
+               foreach ( $data['positions'] as $pos ) {
+                       /** @var DBMasterPos $pos */
+                       $min = $min ? min( $pos->asOfTime(), $min ) : $pos->asOfTime();
+               }
+
+               return $min;
+       }
+
+       /**
+        * @param array|bool $curValue
+        * @param DBMasterPos[] $shutdownPositions
+        * @return array
+        */
+       private static function mergePositions( $curValue, array $shutdownPositions ) {
+               /** @var $curPositions DBMasterPos[] */
+               if ( $curValue === false ) {
+                       $curPositions = $shutdownPositions;
+               } else {
+                       $curPositions = $curValue['positions'];
+                       // Use the newest positions for each DB master
+                       foreach ( $shutdownPositions as $db => $pos ) {
+                               if ( !isset( $curPositions[$db] )
+                                       || $pos->asOfTime() > $curPositions[$db]->asOfTime()
+                               ) {
+                                       $curPositions[$db] = $pos;
+                               }
+                       }
+               }
+
+               return [ 'positions' => $curPositions ];
+       }
+}
diff --git a/includes/libs/rdbms/TransactionProfiler.php b/includes/libs/rdbms/TransactionProfiler.php
new file mode 100644 (file)
index 0000000..bf5e299
--- /dev/null
@@ -0,0 +1,335 @@
+<?php
+/**
+ * Transaction profiling for contention
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Profiler
+ * @author Aaron Schulz
+ */
+
+use Psr\Log\LoggerInterface;
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\NullLogger;
+
+/**
+ * Helper class that detects high-contention DB queries via profiling calls
+ *
+ * This class is meant to work with an IDatabase object, which manages queries
+ *
+ * @since 1.24
+ */
+class TransactionProfiler implements LoggerAwareInterface {
+       /** @var float Seconds */
+       protected $dbLockThreshold = 3.0;
+       /** @var float Seconds */
+       protected $eventThreshold = .25;
+       /** @var bool */
+       protected $silenced = false;
+
+       /** @var array transaction ID => (write start time, list of DBs involved) */
+       protected $dbTrxHoldingLocks = [];
+       /** @var array transaction ID => list of (query name, start time, end time) */
+       protected $dbTrxMethodTimes = [];
+
+       /** @var array */
+       protected $hits = [
+               'writes'      => 0,
+               'queries'     => 0,
+               'conns'       => 0,
+               'masterConns' => 0
+       ];
+       /** @var array */
+       protected $expect = [
+               'writes'         => INF,
+               'queries'        => INF,
+               'conns'          => INF,
+               'masterConns'    => INF,
+               'maxAffected'    => INF,
+               'readQueryTime'  => INF,
+               'writeQueryTime' => INF
+       ];
+       /** @var array */
+       protected $expectBy = [];
+
+       /**
+        * @var LoggerInterface
+        */
+       private $logger;
+
+       public function __construct() {
+               $this->setLogger( new NullLogger() );
+       }
+
+       public function setLogger( LoggerInterface $logger ) {
+               $this->logger = $logger;
+       }
+
+       /**
+        * @param bool $value New value
+        * @return bool Old value
+        * @since 1.28
+        */
+       public function setSilenced( $value ) {
+               $old = $this->silenced;
+               $this->silenced = $value;
+
+               return $old;
+       }
+
+       /**
+        * Set performance expectations
+        *
+        * With conflicting expectations, the most narrow ones will be used
+        *
+        * @param string $event (writes,queries,conns,mConns)
+        * @param integer $value Maximum count of the event
+        * @param string $fname Caller
+        * @since 1.25
+        */
+       public function setExpectation( $event, $value, $fname ) {
+               $this->expect[$event] = isset( $this->expect[$event] )
+                       ? min( $this->expect[$event], $value )
+                       : $value;
+               if ( $this->expect[$event] == $value ) {
+                       $this->expectBy[$event] = $fname;
+               }
+       }
+
+       /**
+        * Set multiple performance expectations
+        *
+        * With conflicting expectations, the most narrow ones will be used
+        *
+        * @param array $expects Map of (event => limit)
+        * @param $fname
+        * @since 1.26
+        */
+       public function setExpectations( array $expects, $fname ) {
+               foreach ( $expects as $event => $value ) {
+                       $this->setExpectation( $event, $value, $fname );
+               }
+       }
+
+       /**
+        * Reset performance expectations and hit counters
+        *
+        * @since 1.25
+        */
+       public function resetExpectations() {
+               foreach ( $this->hits as &$val ) {
+                       $val = 0;
+               }
+               unset( $val );
+               foreach ( $this->expect as &$val ) {
+                       $val = INF;
+               }
+               unset( $val );
+               $this->expectBy = [];
+       }
+
+       /**
+        * Mark a DB as having been connected to with a new handle
+        *
+        * Note that there can be multiple connections to a single DB.
+        *
+        * @param string $server DB server
+        * @param string $db DB name
+        * @param bool $isMaster
+        */
+       public function recordConnection( $server, $db, $isMaster ) {
+               // Report when too many connections happen...
+               if ( $this->hits['conns']++ == $this->expect['conns'] ) {
+                       $this->reportExpectationViolated( 'conns', "[connect to $server ($db)]" );
+               }
+               if ( $isMaster && $this->hits['masterConns']++ == $this->expect['masterConns'] ) {
+                       $this->reportExpectationViolated( 'masterConns', "[connect to $server ($db)]" );
+               }
+       }
+
+       /**
+        * Mark a DB as in a transaction with one or more writes pending
+        *
+        * Note that there can be multiple connections to a single DB.
+        *
+        * @param string $server DB server
+        * @param string $db DB name
+        * @param string $id ID string of transaction
+        */
+       public function transactionWritingIn( $server, $db, $id ) {
+               $name = "{$server} ({$db}) (TRX#$id)";
+               if ( isset( $this->dbTrxHoldingLocks[$name] ) ) {
+                       $this->logger->info( "Nested transaction for '$name' - out of sync." );
+               }
+               $this->dbTrxHoldingLocks[$name] = [
+                       'start' => microtime( true ),
+                       'conns' => [], // all connections involved
+               ];
+               $this->dbTrxMethodTimes[$name] = [];
+
+               foreach ( $this->dbTrxHoldingLocks as $name => &$info ) {
+                       // Track all DBs in transactions for this transaction
+                       $info['conns'][$name] = 1;
+               }
+       }
+
+       /**
+        * Register the name and time of a method for slow DB trx detection
+        *
+        * This assumes that all queries are synchronous (non-overlapping)
+        *
+        * @param string $query Function name or generalized SQL
+        * @param float $sTime Starting UNIX wall time
+        * @param bool $isWrite Whether this is a write query
+        * @param integer $n Number of affected rows
+        */
+       public function recordQueryCompletion( $query, $sTime, $isWrite = false, $n = 0 ) {
+               $eTime = microtime( true );
+               $elapsed = ( $eTime - $sTime );
+
+               if ( $isWrite && $n > $this->expect['maxAffected'] ) {
+                       $this->logger->info(
+                               "Query affected $n row(s):\n" . $query . "\n" .
+                               ( new RuntimeException() )->getTraceAsString() );
+               }
+
+               // Report when too many writes/queries happen...
+               if ( $this->hits['queries']++ == $this->expect['queries'] ) {
+                       $this->reportExpectationViolated( 'queries', $query );
+               }
+               if ( $isWrite && $this->hits['writes']++ == $this->expect['writes'] ) {
+                       $this->reportExpectationViolated( 'writes', $query );
+               }
+               // Report slow queries...
+               if ( !$isWrite && $elapsed > $this->expect['readQueryTime'] ) {
+                       $this->reportExpectationViolated( 'readQueryTime', $query, $elapsed );
+               }
+               if ( $isWrite && $elapsed > $this->expect['writeQueryTime'] ) {
+                       $this->reportExpectationViolated( 'writeQueryTime', $query, $elapsed );
+               }
+
+               if ( !$this->dbTrxHoldingLocks ) {
+                       // Short-circuit
+                       return;
+               } elseif ( !$isWrite && $elapsed < $this->eventThreshold ) {
+                       // Not an important query nor slow enough
+                       return;
+               }
+
+               foreach ( $this->dbTrxHoldingLocks as $name => $info ) {
+                       $lastQuery = end( $this->dbTrxMethodTimes[$name] );
+                       if ( $lastQuery ) {
+                               // Additional query in the trx...
+                               $lastEnd = $lastQuery[2];
+                               if ( $sTime >= $lastEnd ) { // sanity check
+                                       if ( ( $sTime - $lastEnd ) > $this->eventThreshold ) {
+                                               // Add an entry representing the time spent doing non-queries
+                                               $this->dbTrxMethodTimes[$name][] = [ '...delay...', $lastEnd, $sTime ];
+                                       }
+                                       $this->dbTrxMethodTimes[$name][] = [ $query, $sTime, $eTime ];
+                               }
+                       } else {
+                               // First query in the trx...
+                               if ( $sTime >= $info['start'] ) { // sanity check
+                                       $this->dbTrxMethodTimes[$name][] = [ $query, $sTime, $eTime ];
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Mark a DB as no longer in a transaction
+        *
+        * This will check if locks are possibly held for longer than
+        * needed and log any affected transactions to a special DB log.
+        * Note that there can be multiple connections to a single DB.
+        *
+        * @param string $server DB server
+        * @param string $db DB name
+        * @param string $id ID string of transaction
+        * @param float $writeTime Time spent in write queries
+        */
+       public function transactionWritingOut( $server, $db, $id, $writeTime = 0.0 ) {
+               $name = "{$server} ({$db}) (TRX#$id)";
+               if ( !isset( $this->dbTrxMethodTimes[$name] ) ) {
+                       $this->logger->info( "Detected no transaction for '$name' - out of sync." );
+                       return;
+               }
+
+               $slow = false;
+
+               // Warn if too much time was spend writing...
+               if ( $writeTime > $this->expect['writeQueryTime'] ) {
+                       $this->reportExpectationViolated(
+                               'writeQueryTime',
+                               "[transaction $id writes to {$server} ({$db})]",
+                               $writeTime
+                       );
+                       $slow = true;
+               }
+               // Fill in the last non-query period...
+               $lastQuery = end( $this->dbTrxMethodTimes[$name] );
+               if ( $lastQuery ) {
+                       $now = microtime( true );
+                       $lastEnd = $lastQuery[2];
+                       if ( ( $now - $lastEnd ) > $this->eventThreshold ) {
+                               $this->dbTrxMethodTimes[$name][] = [ '...delay...', $lastEnd, $now ];
+                       }
+               }
+               // Check for any slow queries or non-query periods...
+               foreach ( $this->dbTrxMethodTimes[$name] as $info ) {
+                       $elapsed = ( $info[2] - $info[1] );
+                       if ( $elapsed >= $this->dbLockThreshold ) {
+                               $slow = true;
+                               break;
+                       }
+               }
+               if ( $slow ) {
+                       $trace = '';
+                       foreach ( $this->dbTrxMethodTimes[$name] as $i => $info ) {
+                               list( $query, $sTime, $end ) = $info;
+                               $trace .= sprintf( "%d\t%.6f\t%s\n", $i, ( $end - $sTime ), $query );
+                       }
+                       $this->logger->info( "Sub-optimal transaction on DB(s) [{dbs}]: \n{trace}", [
+                               'dbs' => implode( ', ', array_keys( $this->dbTrxHoldingLocks[$name]['conns'] ) ),
+                               'trace' => $trace
+                       ] );
+               }
+               unset( $this->dbTrxHoldingLocks[$name] );
+               unset( $this->dbTrxMethodTimes[$name] );
+       }
+
+       /**
+        * @param string $expect
+        * @param string $query
+        * @param string|float|int $actual [optional]
+        */
+       protected function reportExpectationViolated( $expect, $query, $actual = null ) {
+               if ( $this->silenced ) {
+                       return;
+               }
+
+               $n = $this->expect[$expect];
+               $by = $this->expectBy[$expect];
+               $actual = ( $actual !== null ) ? " (actual: $actual)" : "";
+
+               $this->logger->info(
+                       "Expectation ($expect <= $n) by $by not met$actual:\n$query\n" .
+                       ( new RuntimeException() )->getTraceAsString()
+               );
+       }
+}
diff --git a/includes/libs/rdbms/database/DBConnRef.php b/includes/libs/rdbms/database/DBConnRef.php
new file mode 100644 (file)
index 0000000..20198bf
--- /dev/null
@@ -0,0 +1,602 @@
+<?php
+/**
+ * Helper class to handle automatically marking connections as reusable (via RAII pattern)
+ * as well handling deferring the actual network connection until the handle is used
+ *
+ * @note: proxy methods are defined explicity to avoid interface errors
+ * @ingroup Database
+ * @since 1.22
+ */
+class DBConnRef implements IDatabase {
+       /** @var ILoadBalancer */
+       private $lb;
+
+       /** @var IDatabase|null Live connection handle */
+       private $conn;
+
+       /** @var array|null N-tuple of (server index, group, DatabaseDomain|string) */
+       private $params;
+
+       const FLD_INDEX = 0;
+       const FLD_GROUP = 1;
+       const FLD_DOMAIN = 2;
+
+       /**
+        * @param ILoadBalancer $lb
+        * @param IDatabase|array $conn Connection or (server index, group, DatabaseDomain|string)
+        */
+       public function __construct( ILoadBalancer $lb, $conn ) {
+               $this->lb = $lb;
+               if ( $conn instanceof IDatabase ) {
+                       $this->conn = $conn; // live handle
+               } elseif ( count( $conn ) >= 3 && $conn[self::FLD_DOMAIN] !== false ) {
+                       $this->params = $conn;
+               } else {
+                       throw new InvalidArgumentException( "Missing lazy connection arguments." );
+               }
+       }
+
+       function __call( $name, array $arguments ) {
+               if ( $this->conn === null ) {
+                       list( $db, $groups, $wiki ) = $this->params;
+                       $this->conn = $this->lb->getConnection( $db, $groups, $wiki );
+               }
+
+               return call_user_func_array( [ $this->conn, $name ], $arguments );
+       }
+
+       public function getServerInfo() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function bufferResults( $buffer = null ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function trxLevel() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function trxTimestamp() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function explicitTrxActive() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function tablePrefix( $prefix = null ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function dbSchema( $schema = null ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getLBInfo( $name = null ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function setLBInfo( $name, $value = null ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function setLazyMasterHandle( IDatabase $conn ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function implicitGroupby() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function implicitOrderby() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function lastQuery() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function doneWrites() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function lastDoneWrites() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function writesPending() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function writesOrCallbacksPending() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function pendingWriteCallers() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function isOpen() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function setFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function restoreFlags( $state = self::RESTORE_PRIOR ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getFlag( $flag ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getProperty( $name ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getDomainID() {
+               if ( $this->conn === null ) {
+                       $domain = $this->params[self::FLD_DOMAIN];
+                       // Avoid triggering a database connection
+                       return $domain instanceof DatabaseDomain ? $domain->getId() : $domain;
+               }
+
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getWikiID() {
+               return $this->getDomainID();
+       }
+
+       public function getType() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function open( $server, $user, $password, $dbName ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function fetchObject( $res ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function fetchRow( $res ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function numRows( $res ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function numFields( $res ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function fieldName( $res, $n ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function insertId() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function dataSeek( $res, $row ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function lastErrno() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function lastError() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function fieldInfo( $table, $field ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function affectedRows() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getSoftwareLink() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getServerVersion() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function close() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function reportConnectionError( $error = 'Unknown error' ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function query( $sql, $fname = __METHOD__, $tempIgnore = false ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function freeResult( $res ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function selectField(
+               $table, $var, $cond = '', $fname = __METHOD__, $options = []
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function selectFieldValues(
+               $table, $var, $cond = '', $fname = __METHOD__, $options = []
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function select(
+               $table, $vars, $conds = '', $fname = __METHOD__,
+               $options = [], $join_conds = []
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function selectSQLText(
+               $table, $vars, $conds = '', $fname = __METHOD__,
+               $options = [], $join_conds = []
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function selectRow(
+               $table, $vars, $conds, $fname = __METHOD__,
+               $options = [], $join_conds = []
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function estimateRowCount(
+               $table, $vars = '*', $conds = '', $fname = __METHOD__, $options = []
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function selectRowCount(
+               $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function fieldExists( $table, $field, $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function indexExists( $table, $index, $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function tableExists( $table, $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function indexUnique( $table, $index ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function insert( $table, $a, $fname = __METHOD__, $options = [] ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function update( $table, $values, $conds, $fname = __METHOD__, $options = [] ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function makeList( $a, $mode = self::LIST_COMMA ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function makeWhereFrom2d( $data, $baseKey, $subKey ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function aggregateValue( $valuedata, $valuename = 'value' ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function bitNot( $field ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function bitAnd( $fieldLeft, $fieldRight ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function bitOr( $fieldLeft, $fieldRight ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function buildConcat( $stringList ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function buildGroupConcatField(
+               $delim, $table, $field, $conds = '', $join_conds = []
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function buildStringCast( $field ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function selectDB( $db ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getDBname() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getServer() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function addQuotes( $s ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function buildLike() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function anyChar() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function anyString() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function nextSequenceValue( $seqName ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function upsert(
+               $table, array $rows, array $uniqueIndexes, array $set, $fname = __METHOD__
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function deleteJoin(
+               $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = __METHOD__
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function delete( $table, $conds, $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function insertSelect(
+               $destTable, $srcTable, $varMap, $conds,
+               $fname = __METHOD__, $insertOptions = [], $selectOptions = []
+       ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function unionSupportsOrderAndLimit() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function unionQueries( $sqls, $all ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function conditional( $cond, $trueVal, $falseVal ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function strreplace( $orig, $old, $new ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getServerUptime() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function wasDeadlock() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function wasLockTimeout() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function wasErrorReissuable() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function wasReadOnlyError() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function masterPosWait( DBMasterPos $pos, $timeout ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getReplicaPos() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getMasterPos() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function serverIsReadOnly() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function onTransactionResolution( callable $callback, $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function onTransactionIdle( callable $callback, $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function onTransactionPreCommitOrIdle( callable $callback, $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function setTransactionListener( $name, callable $callback = null ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function startAtomic( $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function endAtomic( $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function doAtomicSection( $fname, callable $callback ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function begin( $fname = __METHOD__, $mode = IDatabase::TRANSACTION_EXPLICIT ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function commit( $fname = __METHOD__, $flush = '' ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function rollback( $fname = __METHOD__, $flush = '' ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function flushSnapshot( $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function listTables( $prefix = null, $fname = __METHOD__ ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function timestamp( $ts = 0 ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function timestampOrNull( $ts = null ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function ping( &$rtt = null ) {
+               return func_num_args()
+                       ? $this->__call( __FUNCTION__, [ &$rtt ] )
+                       : $this->__call( __FUNCTION__, [] ); // method cares about null vs missing
+       }
+
+       public function getLag() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getSessionLagStatus() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function maxListLen() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function encodeBlob( $b ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function decodeBlob( $b ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function setSessionOptions( array $options ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function setSchemaVars( $vars ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function lockIsFree( $lockName, $method ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function lock( $lockName, $method, $timeout = 5 ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function unlock( $lockName, $method ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getScopedLockAndFlush( $lockKey, $fname, $timeout ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function namedLocksEnqueue() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function getInfinity() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function encodeExpiry( $expiry ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function decodeExpiry( $expiry, $format = TS_MW ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function setBigSelects( $value = true ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function isReadOnly() {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       public function setTableAliases( array $aliases ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
+       /**
+        * Clean up the connection when out of scope
+        */
+       function __destruct() {
+               if ( $this->conn !== null ) {
+                       $this->lb->reuseConnection( $this->conn );
+               }
+       }
+}
diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php
new file mode 100644 (file)
index 0000000..ba63432
--- /dev/null
@@ -0,0 +1,3475 @@
+<?php
+/**
+ * @defgroup Database Database
+ *
+ * This file deals with database interface functions
+ * and query specifics/optimisations.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+use Wikimedia\ScopedCallback;
+
+/**
+ * Relational database abstraction object
+ *
+ * @ingroup Database
+ * @since 1.28
+ */
+abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAwareInterface {
+       /** Number of times to re-try an operation in case of deadlock */
+       const DEADLOCK_TRIES = 4;
+       /** Minimum time to wait before retry, in microseconds */
+       const DEADLOCK_DELAY_MIN = 500000;
+       /** Maximum time to wait before retry */
+       const DEADLOCK_DELAY_MAX = 1500000;
+
+       /** How long before it is worth doing a dummy query to test the connection */
+       const PING_TTL = 1.0;
+       const PING_QUERY = 'SELECT 1 AS ping';
+
+       const TINY_WRITE_SEC = .010;
+       const SLOW_WRITE_SEC = .500;
+       const SMALL_WRITE_ROWS = 100;
+
+       /** @var string SQL query */
+       protected $mLastQuery = '';
+       /** @var float|bool UNIX timestamp of last write query */
+       protected $mLastWriteTime = false;
+       /** @var string|bool */
+       protected $mPHPError = false;
+       /** @var string */
+       protected $mServer;
+       /** @var string */
+       protected $mUser;
+       /** @var string */
+       protected $mPassword;
+       /** @var string */
+       protected $mDBname;
+       /** @var array[] $aliases Map of (table => (dbname, schema, prefix) map) */
+       protected $tableAliases = [];
+       /** @var bool Whether this PHP instance is for a CLI script */
+       protected $cliMode;
+       /** @var string Agent name for query profiling */
+       protected $agent;
+
+       /** @var BagOStuff APC cache */
+       protected $srvCache;
+       /** @var LoggerInterface */
+       protected $connLogger;
+       /** @var LoggerInterface */
+       protected $queryLogger;
+       /** @var callback Error logging callback */
+       protected $errorLogger;
+
+       /** @var resource|null Database connection */
+       protected $mConn = null;
+       /** @var bool */
+       protected $mOpened = false;
+
+       /** @var array[] List of (callable, method name) */
+       protected $mTrxIdleCallbacks = [];
+       /** @var array[] List of (callable, method name) */
+       protected $mTrxPreCommitCallbacks = [];
+       /** @var array[] List of (callable, method name) */
+       protected $mTrxEndCallbacks = [];
+       /** @var callable[] Map of (name => callable) */
+       protected $mTrxRecurringCallbacks = [];
+       /** @var bool Whether to suppress triggering of transaction end callbacks */
+       protected $mTrxEndCallbacksSuppressed = false;
+
+       /** @var string */
+       protected $mTablePrefix = '';
+       /** @var string */
+       protected $mSchema = '';
+       /** @var integer */
+       protected $mFlags;
+       /** @var array */
+       protected $mLBInfo = [];
+       /** @var bool|null */
+       protected $mDefaultBigSelects = null;
+       /** @var array|bool */
+       protected $mSchemaVars = false;
+       /** @var array */
+       protected $mSessionVars = [];
+       /** @var array|null */
+       protected $preparedArgs;
+       /** @var string|bool|null Stashed value of html_errors INI setting */
+       protected $htmlErrors;
+       /** @var string */
+       protected $delimiter = ';';
+       /** @var DatabaseDomain */
+       protected $currentDomain;
+
+       /**
+        * Either 1 if a transaction is active or 0 otherwise.
+        * The other Trx fields may not be meaningfull if this is 0.
+        *
+        * @var int
+        */
+       protected $mTrxLevel = 0;
+       /**
+        * Either a short hexidecimal string if a transaction is active or ""
+        *
+        * @var string
+        * @see Database::mTrxLevel
+        */
+       protected $mTrxShortId = '';
+       /**
+        * The UNIX time that the transaction started. Callers can assume that if
+        * snapshot isolation is used, then the data is *at least* up to date to that
+        * point (possibly more up-to-date since the first SELECT defines the snapshot).
+        *
+        * @var float|null
+        * @see Database::mTrxLevel
+        */
+       private $mTrxTimestamp = null;
+       /** @var float Lag estimate at the time of BEGIN */
+       private $mTrxReplicaLag = null;
+       /**
+        * Remembers the function name given for starting the most recent transaction via begin().
+        * Used to provide additional context for error reporting.
+        *
+        * @var string
+        * @see Database::mTrxLevel
+        */
+       private $mTrxFname = null;
+       /**
+        * Record if possible write queries were done in the last transaction started
+        *
+        * @var bool
+        * @see Database::mTrxLevel
+        */
+       private $mTrxDoneWrites = false;
+       /**
+        * Record if the current transaction was started implicitly due to DBO_TRX being set.
+        *
+        * @var bool
+        * @see Database::mTrxLevel
+        */
+       private $mTrxAutomatic = false;
+       /**
+        * Array of levels of atomicity within transactions
+        *
+        * @var array
+        */
+       private $mTrxAtomicLevels = [];
+       /**
+        * Record if the current transaction was started implicitly by Database::startAtomic
+        *
+        * @var bool
+        */
+       private $mTrxAutomaticAtomic = false;
+       /**
+        * Track the write query callers of the current transaction
+        *
+        * @var string[]
+        */
+       private $mTrxWriteCallers = [];
+       /**
+        * @var float Seconds spent in write queries for the current transaction
+        */
+       private $mTrxWriteDuration = 0.0;
+       /**
+        * @var integer Number of write queries for the current transaction
+        */
+       private $mTrxWriteQueryCount = 0;
+       /**
+        * @var float Like mTrxWriteQueryCount but excludes lock-bound, easy to replicate, queries
+        */
+       private $mTrxWriteAdjDuration = 0.0;
+       /**
+        * @var integer Number of write queries counted in mTrxWriteAdjDuration
+        */
+       private $mTrxWriteAdjQueryCount = 0;
+       /**
+        * @var float RTT time estimate
+        */
+       private $mRTTEstimate = 0.0;
+
+       /** @var array Map of (name => 1) for locks obtained via lock() */
+       private $mNamedLocksHeld = [];
+       /** @var array Map of (table name => 1) for TEMPORARY tables */
+       protected $mSessionTempTables = [];
+
+       /** @var IDatabase|null Lazy handle to the master DB this server replicates from */
+       private $lazyMasterHandle;
+
+       /** @var float UNIX timestamp */
+       protected $lastPing = 0.0;
+
+       /** @var int[] Prior mFlags values */
+       private $priorFlags = [];
+
+       /** @var object|string Class name or object With profileIn/profileOut methods */
+       protected $profiler;
+       /** @var TransactionProfiler */
+       protected $trxProfiler;
+
+       /**
+        * Constructor and database handle and attempt to connect to the DB server
+        *
+        * IDatabase classes should not be constructed directly in external
+        * code. Database::factory() should be used instead.
+        *
+        * @param array $params Parameters passed from Database::factory()
+        */
+       function __construct( array $params ) {
+               $server = $params['host'];
+               $user = $params['user'];
+               $password = $params['password'];
+               $dbName = $params['dbname'];
+
+               $this->mSchema = $params['schema'];
+               $this->mTablePrefix = $params['tablePrefix'];
+
+               $this->cliMode = $params['cliMode'];
+               // Agent name is added to SQL queries in a comment, so make sure it can't break out
+               $this->agent = str_replace( '/', '-', $params['agent'] );
+
+               $this->mFlags = $params['flags'];
+               if ( $this->mFlags & self::DBO_DEFAULT ) {
+                       if ( $this->cliMode ) {
+                               $this->mFlags &= ~self::DBO_TRX;
+                       } else {
+                               $this->mFlags |= self::DBO_TRX;
+                       }
+               }
+
+               $this->mSessionVars = $params['variables'];
+
+               $this->srvCache = isset( $params['srvCache'] )
+                       ? $params['srvCache']
+                       : new HashBagOStuff();
+
+               $this->profiler = $params['profiler'];
+               $this->trxProfiler = $params['trxProfiler'];
+               $this->connLogger = $params['connLogger'];
+               $this->queryLogger = $params['queryLogger'];
+               $this->errorLogger = $params['errorLogger'];
+
+               // Set initial dummy domain until open() sets the final DB/prefix
+               $this->currentDomain = DatabaseDomain::newUnspecified();
+
+               if ( $user ) {
+                       $this->open( $server, $user, $password, $dbName );
+               } elseif ( $this->requiresDatabaseUser() ) {
+                       throw new InvalidArgumentException( "No database user provided." );
+               }
+
+               // Set the domain object after open() sets the relevant fields
+               if ( $this->mDBname != '' ) {
+                       // Domains with server scope but a table prefix are not used by IDatabase classes
+                       $this->currentDomain = new DatabaseDomain( $this->mDBname, null, $this->mTablePrefix );
+               }
+       }
+
+       /**
+        * Construct a Database subclass instance given a database type and parameters
+        *
+        * This also connects to the database immediately upon object construction
+        *
+        * @param string $dbType A possible DB type (sqlite, mysql, postgres)
+        * @param array $p Parameter map with keys:
+        *   - host : The hostname of the DB server
+        *   - user : The name of the database user the client operates under
+        *   - password : The password for the database user
+        *   - dbname : The name of the database to use where queries do not specify one.
+        *      The database must exist or an error might be thrown. Setting this to the empty string
+        *      will avoid any such errors and make the handle have no implicit database scope. This is
+        *      useful for queries like SHOW STATUS, CREATE DATABASE, or DROP DATABASE. Note that a
+        *      "database" in Postgres is rougly equivalent to an entire MySQL server. This the domain
+        *      in which user names and such are defined, e.g. users are database-specific in Postgres.
+        *   - schema : The database schema to use (if supported). A "schema" in Postgres is roughly
+        *      equivalent to a "database" in MySQL. Note that MySQL and SQLite do not use schemas.
+        *   - tablePrefix : Optional table prefix that is implicitly added on to all table names
+        *      recognized in queries. This can be used in place of schemas for handle site farms.
+        *   - flags : Optional bitfield of DBO_* constants that define connection, protocol,
+        *      buffering, and transaction behavior. It is STRONGLY adviced to leave the DBO_DEFAULT
+        *      flag in place UNLESS this this database simply acts as a key/value store.
+        *   - driver: Optional name of a specific DB client driver. For MySQL, there is the old
+        *      'mysql' driver and the newer 'mysqli' driver.
+        *   - variables: Optional map of session variables to set after connecting. This can be
+        *      used to adjust lock timeouts or encoding modes and the like.
+        *   - connLogger: Optional PSR-3 logger interface instance.
+        *   - queryLogger: Optional PSR-3 logger interface instance.
+        *   - profiler: Optional class name or object with profileIn()/profileOut() methods.
+        *      These will be called in query(), using a simplified version of the SQL that also
+        *      includes the agent as a SQL comment.
+        *   - trxProfiler: Optional TransactionProfiler instance.
+        *   - errorLogger: Optional callback that takes an Exception and logs it.
+        *   - cliMode: Whether to consider the execution context that of a CLI script.
+        *   - agent: Optional name used to identify the end-user in query profiling/logging.
+        *   - srvCache: Optional BagOStuff instance to an APC-style cache.
+        * @return Database|null If the database driver or extension cannot be found
+        * @throws InvalidArgumentException If the database driver or extension cannot be found
+        * @since 1.18
+        */
+       final public static function factory( $dbType, $p = [] ) {
+               static $canonicalDBTypes = [
+                       'mysql' => [ 'mysqli', 'mysql' ],
+                       'postgres' => [],
+                       'sqlite' => [],
+                       'oracle' => [],
+                       'mssql' => [],
+               ];
+
+               $driver = false;
+               $dbType = strtolower( $dbType );
+               if ( isset( $canonicalDBTypes[$dbType] ) && $canonicalDBTypes[$dbType] ) {
+                       $possibleDrivers = $canonicalDBTypes[$dbType];
+                       if ( !empty( $p['driver'] ) ) {
+                               if ( in_array( $p['driver'], $possibleDrivers ) ) {
+                                       $driver = $p['driver'];
+                               } else {
+                                       throw new InvalidArgumentException( __METHOD__ .
+                                               " type '$dbType' does not support driver '{$p['driver']}'" );
+                               }
+                       } else {
+                               foreach ( $possibleDrivers as $posDriver ) {
+                                       if ( extension_loaded( $posDriver ) ) {
+                                               $driver = $posDriver;
+                                               break;
+                                       }
+                               }
+                       }
+               } else {
+                       $driver = $dbType;
+               }
+               if ( $driver === false || $driver === '' ) {
+                       throw new InvalidArgumentException( __METHOD__ .
+                               " no viable database extension found for type '$dbType'" );
+               }
+
+               $class = 'Database' . ucfirst( $driver );
+               if ( class_exists( $class ) && is_subclass_of( $class, 'IDatabase' ) ) {
+                       // Resolve some defaults for b/c
+                       $p['host'] = isset( $p['host'] ) ? $p['host'] : false;
+                       $p['user'] = isset( $p['user'] ) ? $p['user'] : false;
+                       $p['password'] = isset( $p['password'] ) ? $p['password'] : false;
+                       $p['dbname'] = isset( $p['dbname'] ) ? $p['dbname'] : false;
+                       $p['flags'] = isset( $p['flags'] ) ? $p['flags'] : 0;
+                       $p['variables'] = isset( $p['variables'] ) ? $p['variables'] : [];
+                       $p['tablePrefix'] = isset( $p['tablePrefix'] ) ? $p['tablePrefix'] : '';
+                       $p['schema'] = isset( $p['schema'] ) ? $p['schema'] : '';
+                       $p['cliMode'] = isset( $p['cliMode'] ) ? $p['cliMode'] : ( PHP_SAPI === 'cli' );
+                       $p['agent'] = isset( $p['agent'] ) ? $p['agent'] : '';
+                       if ( !isset( $p['connLogger'] ) ) {
+                               $p['connLogger'] = new \Psr\Log\NullLogger();
+                       }
+                       if ( !isset( $p['queryLogger'] ) ) {
+                               $p['queryLogger'] = new \Psr\Log\NullLogger();
+                       }
+                       $p['profiler'] = isset( $p['profiler'] ) ? $p['profiler'] : null;
+                       if ( !isset( $p['trxProfiler'] ) ) {
+                               $p['trxProfiler'] = new TransactionProfiler();
+                       }
+                       if ( !isset( $p['errorLogger'] ) ) {
+                               $p['errorLogger'] = function ( Exception $e ) {
+                                       trigger_error( get_class( $e ) . ': ' . $e->getMessage(), E_USER_WARNING );
+                               };
+                       }
+
+                       $conn = new $class( $p );
+               } else {
+                       $conn = null;
+               }
+
+               return $conn;
+       }
+
+       public function setLogger( LoggerInterface $logger ) {
+               $this->queryLogger = $logger;
+       }
+
+       public function getServerInfo() {
+               return $this->getServerVersion();
+       }
+
+       public function bufferResults( $buffer = null ) {
+               $res = !$this->getFlag( self::DBO_NOBUFFER );
+               if ( $buffer !== null ) {
+                       $buffer
+                               ? $this->clearFlag( self::DBO_NOBUFFER )
+                               : $this->setFlag( self::DBO_NOBUFFER );
+               }
+
+               return $res;
+       }
+
+       /**
+        * Turns on (false) or off (true) the automatic generation and sending
+        * of a "we're sorry, but there has been a database error" page on
+        * database errors. Default is on (false). When turned off, the
+        * code should use lastErrno() and lastError() to handle the
+        * situation as appropriate.
+        *
+        * Do not use this function outside of the Database classes.
+        *
+        * @param null|bool $ignoreErrors
+        * @return bool The previous value of the flag.
+        */
+       protected function ignoreErrors( $ignoreErrors = null ) {
+               $res = $this->getFlag( self::DBO_IGNORE );
+               if ( $ignoreErrors !== null ) {
+                       $ignoreErrors
+                               ? $this->setFlag( self::DBO_IGNORE )
+                               : $this->clearFlag( self::DBO_IGNORE );
+               }
+
+               return $res;
+       }
+
+       public function trxLevel() {
+               return $this->mTrxLevel;
+       }
+
+       public function trxTimestamp() {
+               return $this->mTrxLevel ? $this->mTrxTimestamp : null;
+       }
+
+       public function tablePrefix( $prefix = null ) {
+               $old = $this->mTablePrefix;
+               if ( $prefix !== null ) {
+                       $this->mTablePrefix = $prefix;
+                       $this->currentDomain = ( $this->mDBname != '' )
+                               ? new DatabaseDomain( $this->mDBname, null, $this->mTablePrefix )
+                               : DatabaseDomain::newUnspecified();
+               }
+
+               return $old;
+       }
+
+       public function dbSchema( $schema = null ) {
+               $old = $this->mSchema;
+               if ( $schema !== null ) {
+                       $this->mSchema = $schema;
+               }
+
+               return $old;
+       }
+
+       public function getLBInfo( $name = null ) {
+               if ( is_null( $name ) ) {
+                       return $this->mLBInfo;
+               } else {
+                       if ( array_key_exists( $name, $this->mLBInfo ) ) {
+                               return $this->mLBInfo[$name];
+                       } else {
+                               return null;
+                       }
+               }
+       }
+
+       public function setLBInfo( $name, $value = null ) {
+               if ( is_null( $value ) ) {
+                       $this->mLBInfo = $name;
+               } else {
+                       $this->mLBInfo[$name] = $value;
+               }
+       }
+
+       public function setLazyMasterHandle( IDatabase $conn ) {
+               $this->lazyMasterHandle = $conn;
+       }
+
+       /**
+        * @return IDatabase|null
+        * @see setLazyMasterHandle()
+        * @since 1.27
+        */
+       protected function getLazyMasterHandle() {
+               return $this->lazyMasterHandle;
+       }
+
+       public function implicitGroupby() {
+               return true;
+       }
+
+       public function implicitOrderby() {
+               return true;
+       }
+
+       public function lastQuery() {
+               return $this->mLastQuery;
+       }
+
+       public function doneWrites() {
+               return (bool)$this->mLastWriteTime;
+       }
+
+       public function lastDoneWrites() {
+               return $this->mLastWriteTime ?: false;
+       }
+
+       public function writesPending() {
+               return $this->mTrxLevel && $this->mTrxDoneWrites;
+       }
+
+       public function writesOrCallbacksPending() {
+               return $this->mTrxLevel && (
+                       $this->mTrxDoneWrites || $this->mTrxIdleCallbacks || $this->mTrxPreCommitCallbacks
+               );
+       }
+
+       public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL ) {
+               if ( !$this->mTrxLevel ) {
+                       return false;
+               } elseif ( !$this->mTrxDoneWrites ) {
+                       return 0.0;
+               }
+
+               switch ( $type ) {
+                       case self::ESTIMATE_DB_APPLY:
+                               $this->ping( $rtt );
+                               $rttAdjTotal = $this->mTrxWriteAdjQueryCount * $rtt;
+                               $applyTime = max( $this->mTrxWriteAdjDuration - $rttAdjTotal, 0 );
+                               // For omitted queries, make them count as something at least
+                               $omitted = $this->mTrxWriteQueryCount - $this->mTrxWriteAdjQueryCount;
+                               $applyTime += self::TINY_WRITE_SEC * $omitted;
+
+                               return $applyTime;
+                       default: // everything
+                               return $this->mTrxWriteDuration;
+               }
+       }
+
+       public function pendingWriteCallers() {
+               return $this->mTrxLevel ? $this->mTrxWriteCallers : [];
+       }
+
+       protected function pendingWriteAndCallbackCallers() {
+               if ( !$this->mTrxLevel ) {
+                       return [];
+               }
+
+               $fnames = $this->mTrxWriteCallers;
+               foreach ( [
+                       $this->mTrxIdleCallbacks,
+                       $this->mTrxPreCommitCallbacks,
+                       $this->mTrxEndCallbacks
+               ] as $callbacks ) {
+                       foreach ( $callbacks as $callback ) {
+                               $fnames[] = $callback[1];
+                       }
+               }
+
+               return $fnames;
+       }
+
+       public function isOpen() {
+               return $this->mOpened;
+       }
+
+       public function setFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
+               if ( $remember === self::REMEMBER_PRIOR ) {
+                       array_push( $this->priorFlags, $this->mFlags );
+               }
+               $this->mFlags |= $flag;
+       }
+
+       public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
+               if ( $remember === self::REMEMBER_PRIOR ) {
+                       array_push( $this->priorFlags, $this->mFlags );
+               }
+               $this->mFlags &= ~$flag;
+       }
+
+       public function restoreFlags( $state = self::RESTORE_PRIOR ) {
+               if ( !$this->priorFlags ) {
+                       return;
+               }
+
+               if ( $state === self::RESTORE_INITIAL ) {
+                       $this->mFlags = reset( $this->priorFlags );
+                       $this->priorFlags = [];
+               } else {
+                       $this->mFlags = array_pop( $this->priorFlags );
+               }
+       }
+
+       public function getFlag( $flag ) {
+               return !!( $this->mFlags & $flag );
+       }
+
+       /**
+        * @param string $name Class field name
+        * @return mixed
+        * @deprecated Since 1.28
+        */
+       public function getProperty( $name ) {
+               return $this->$name;
+       }
+
+       public function getDomainID() {
+               return $this->currentDomain->getId();
+       }
+
+       final public function getWikiID() {
+               return $this->getDomainID();
+       }
+
+       /**
+        * Get information about an index into an object
+        * @param string $table Table name
+        * @param string $index Index name
+        * @param string $fname Calling function name
+        * @return mixed Database-specific index description class or false if the index does not exist
+        */
+       abstract function indexInfo( $table, $index, $fname = __METHOD__ );
+
+       /**
+        * Wrapper for addslashes()
+        *
+        * @param string $s String to be slashed.
+        * @return string Slashed string.
+        */
+       abstract function strencode( $s );
+
+       protected function installErrorHandler() {
+               $this->mPHPError = false;
+               $this->htmlErrors = ini_set( 'html_errors', '0' );
+               set_error_handler( [ $this, 'connectionErrorLogger' ] );
+       }
+
+       /**
+        * @return bool|string
+        */
+       protected function restoreErrorHandler() {
+               restore_error_handler();
+               if ( $this->htmlErrors !== false ) {
+                       ini_set( 'html_errors', $this->htmlErrors );
+               }
+
+               return $this->getLastPHPError();
+       }
+
+       /**
+        * @return string|bool Last PHP error for this DB (typically connection errors)
+        */
+       protected function getLastPHPError() {
+               if ( $this->mPHPError ) {
+                       $error = preg_replace( '!\[<a.*</a>\]!', '', $this->mPHPError );
+                       $error = preg_replace( '!^.*?:\s?(.*)$!', '$1', $error );
+
+                       return $error;
+               }
+
+               return false;
+       }
+
+       /**
+        * This method should not be used outside of Database classes
+        *
+        * @param int $errno
+        * @param string $errstr
+        */
+       public function connectionErrorLogger( $errno, $errstr ) {
+               $this->mPHPError = $errstr;
+       }
+
+       /**
+        * Create a log context to pass to PSR-3 logger functions.
+        *
+        * @param array $extras Additional data to add to context
+        * @return array
+        */
+       protected function getLogContext( array $extras = [] ) {
+               return array_merge(
+                       [
+                               'db_server' => $this->mServer,
+                               'db_name' => $this->mDBname,
+                               'db_user' => $this->mUser,
+                       ],
+                       $extras
+               );
+       }
+
+       public function close() {
+               if ( $this->mConn ) {
+                       if ( $this->trxLevel() ) {
+                               $this->commit( __METHOD__, self::FLUSHING_INTERNAL );
+                       }
+
+                       $closed = $this->closeConnection();
+                       $this->mConn = false;
+               } elseif ( $this->mTrxIdleCallbacks || $this->mTrxEndCallbacks ) { // sanity
+                       throw new RuntimeException( "Transaction callbacks still pending." );
+               } else {
+                       $closed = true;
+               }
+               $this->mOpened = false;
+
+               return $closed;
+       }
+
+       /**
+        * Make sure isOpen() returns true as a sanity check
+        *
+        * @throws DBUnexpectedError
+        */
+       protected function assertOpen() {
+               if ( !$this->isOpen() ) {
+                       throw new DBUnexpectedError( $this, "DB connection was already closed." );
+               }
+       }
+
+       /**
+        * Closes underlying database connection
+        * @since 1.20
+        * @return bool Whether connection was closed successfully
+        */
+       abstract protected function closeConnection();
+
+       public function reportConnectionError( $error = 'Unknown error' ) {
+               $myError = $this->lastError();
+               if ( $myError ) {
+                       $error = $myError;
+               }
+
+               # New method
+               throw new DBConnectionError( $this, $error );
+       }
+
+       /**
+        * The DBMS-dependent part of query()
+        *
+        * @param string $sql SQL query.
+        * @return ResultWrapper|bool Result object to feed to fetchObject,
+        *   fetchRow, ...; or false on failure
+        */
+       abstract protected function doQuery( $sql );
+
+       /**
+        * Determine whether a query writes to the DB.
+        * Should return true if unsure.
+        *
+        * @param string $sql
+        * @return bool
+        */
+       protected function isWriteQuery( $sql ) {
+               return !preg_match(
+                       '/^(?:SELECT|BEGIN|ROLLBACK|COMMIT|SET|SHOW|EXPLAIN|\(SELECT)\b/i', $sql );
+       }
+
+       /**
+        * @param $sql
+        * @return string|null
+        */
+       protected function getQueryVerb( $sql ) {
+               return preg_match( '/^\s*([a-z]+)/i', $sql, $m ) ? strtoupper( $m[1] ) : null;
+       }
+
+       /**
+        * Determine whether a SQL statement is sensitive to isolation level.
+        * A SQL statement is considered transactable if its result could vary
+        * depending on the transaction isolation level. Operational commands
+        * such as 'SET' and 'SHOW' are not considered to be transactable.
+        *
+        * @param string $sql
+        * @return bool
+        */
+       protected function isTransactableQuery( $sql ) {
+               return !in_array(
+                       $this->getQueryVerb( $sql ),
+                       [ 'BEGIN', 'COMMIT', 'ROLLBACK', 'SHOW', 'SET', 'CREATE', 'ALTER' ],
+                       true
+               );
+       }
+
+       /**
+        * @param string $sql A SQL query
+        * @return bool Whether $sql is SQL for creating/dropping a new TEMPORARY table
+        */
+       protected function registerTempTableOperation( $sql ) {
+               if ( preg_match(
+                       '/^CREATE\s+TEMPORARY\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?[`"\']?(\w+)[`"\']?/i',
+                       $sql,
+                       $matches
+               ) ) {
+                       $this->mSessionTempTables[$matches[1]] = 1;
+
+                       return true;
+               } elseif ( preg_match(
+                       '/^DROP\s+(?:TEMPORARY\s+)?TABLE\s+(?:IF\s+EXISTS\s+)?[`"\']?(\w+)[`"\']?/i',
+                       $sql,
+                       $matches
+               ) ) {
+                       unset( $this->mSessionTempTables[$matches[1]] );
+
+                       return true;
+               } elseif ( preg_match(
+                       '/^(?:INSERT\s+(?:\w+\s+)?INTO|UPDATE|DELETE\s+FROM)\s+[`"\']?(\w+)[`"\']?/i',
+                       $sql,
+                       $matches
+               ) ) {
+                       return isset( $this->mSessionTempTables[$matches[1]] );
+               }
+
+               return false;
+       }
+
+       public function query( $sql, $fname = __METHOD__, $tempIgnore = false ) {
+               $priorWritesPending = $this->writesOrCallbacksPending();
+               $this->mLastQuery = $sql;
+
+               $isWrite = $this->isWriteQuery( $sql ) && !$this->registerTempTableOperation( $sql );
+               if ( $isWrite ) {
+                       $reason = $this->getReadOnlyReason();
+                       if ( $reason !== false ) {
+                               throw new DBReadOnlyError( $this, "Database is read-only: $reason" );
+                       }
+                       # Set a flag indicating that writes have been done
+                       $this->mLastWriteTime = microtime( true );
+               }
+
+               // Add trace comment to the begin of the sql string, right after the operator.
+               // Or, for one-word queries (like "BEGIN" or COMMIT") add it to the end (bug 42598)
+               $commentedSql = preg_replace( '/\s|$/', " /* $fname {$this->agent} */ ", $sql, 1 );
+
+               # Start implicit transactions that wrap the request if DBO_TRX is enabled
+               if ( !$this->mTrxLevel && $this->getFlag( self::DBO_TRX )
+                       && $this->isTransactableQuery( $sql )
+               ) {
+                       $this->begin( __METHOD__ . " ($fname)", self::TRANSACTION_INTERNAL );
+                       $this->mTrxAutomatic = true;
+               }
+
+               # Keep track of whether the transaction has write queries pending
+               if ( $this->mTrxLevel && !$this->mTrxDoneWrites && $isWrite ) {
+                       $this->mTrxDoneWrites = true;
+                       $this->trxProfiler->transactionWritingIn(
+                               $this->mServer, $this->mDBname, $this->mTrxShortId );
+               }
+
+               if ( $this->getFlag( self::DBO_DEBUG ) ) {
+                       $this->queryLogger->debug( "{$this->mDBname} {$commentedSql}" );
+               }
+
+               # Avoid fatals if close() was called
+               $this->assertOpen();
+
+               # Send the query to the server
+               $ret = $this->doProfiledQuery( $sql, $commentedSql, $isWrite, $fname );
+
+               # Try reconnecting if the connection was lost
+               if ( false === $ret && $this->wasErrorReissuable() ) {
+                       $recoverable = $this->canRecoverFromDisconnect( $sql, $priorWritesPending );
+                       # Stash the last error values before anything might clear them
+                       $lastError = $this->lastError();
+                       $lastErrno = $this->lastErrno();
+                       # Update state tracking to reflect transaction loss due to disconnection
+                       $this->handleSessionLoss();
+                       if ( $this->reconnect() ) {
+                               $msg = __METHOD__ . ": lost connection to {$this->getServer()}; reconnected";
+                               $this->connLogger->warning( $msg );
+                               $this->queryLogger->warning(
+                                       "$msg:\n" . ( new RuntimeException() )->getTraceAsString() );
+
+                               if ( !$recoverable ) {
+                                       # Callers may catch the exception and continue to use the DB
+                                       $this->reportQueryError( $lastError, $lastErrno, $sql, $fname );
+                               } else {
+                                       # Should be safe to silently retry the query
+                                       $ret = $this->doProfiledQuery( $sql, $commentedSql, $isWrite, $fname );
+                               }
+                       } else {
+                               $msg = __METHOD__ . ": lost connection to {$this->getServer()} permanently";
+                               $this->connLogger->error( $msg );
+                       }
+               }
+
+               if ( false === $ret ) {
+                       # Deadlocks cause the entire transaction to abort, not just the statement.
+                       # http://dev.mysql.com/doc/refman/5.7/en/innodb-error-handling.html
+                       # https://www.postgresql.org/docs/9.1/static/explicit-locking.html
+                       if ( $this->wasDeadlock() ) {
+                               if ( $this->explicitTrxActive() || $priorWritesPending ) {
+                                       $tempIgnore = false; // not recoverable
+                               }
+                               # Update state tracking to reflect transaction loss
+                               $this->handleSessionLoss();
+                       }
+
+                       $this->reportQueryError(
+                               $this->lastError(), $this->lastErrno(), $sql, $fname, $tempIgnore );
+               }
+
+               $res = $this->resultObject( $ret );
+
+               return $res;
+       }
+
+       private function doProfiledQuery( $sql, $commentedSql, $isWrite, $fname ) {
+               $isMaster = !is_null( $this->getLBInfo( 'master' ) );
+               # generalizeSQL() will probably cut down the query to reasonable
+               # logging size most of the time. The substr is really just a sanity check.
+               if ( $isMaster ) {
+                       $queryProf = 'query-m: ' . substr( self::generalizeSQL( $sql ), 0, 255 );
+               } else {
+                       $queryProf = 'query: ' . substr( self::generalizeSQL( $sql ), 0, 255 );
+               }
+
+               # Include query transaction state
+               $queryProf .= $this->mTrxShortId ? " [TRX#{$this->mTrxShortId}]" : "";
+
+               $startTime = microtime( true );
+               if ( $this->profiler ) {
+                       call_user_func( [ $this->profiler, 'profileIn' ], $queryProf );
+               }
+               $ret = $this->doQuery( $commentedSql );
+               if ( $this->profiler ) {
+                       call_user_func( [ $this->profiler, 'profileOut' ], $queryProf );
+               }
+               $queryRuntime = max( microtime( true ) - $startTime, 0.0 );
+
+               unset( $queryProfSection ); // profile out (if set)
+
+               if ( $ret !== false ) {
+                       $this->lastPing = $startTime;
+                       if ( $isWrite && $this->mTrxLevel ) {
+                               $this->updateTrxWriteQueryTime( $sql, $queryRuntime );
+                               $this->mTrxWriteCallers[] = $fname;
+                       }
+               }
+
+               if ( $sql === self::PING_QUERY ) {
+                       $this->mRTTEstimate = $queryRuntime;
+               }
+
+               $this->trxProfiler->recordQueryCompletion(
+                       $queryProf, $startTime, $isWrite, $this->affectedRows()
+               );
+               $this->queryLogger->debug( $sql, [
+                       'method' => $fname,
+                       'master' => $isMaster,
+                       'runtime' => $queryRuntime,
+               ] );
+
+               return $ret;
+       }
+
+       /**
+        * Update the estimated run-time of a query, not counting large row lock times
+        *
+        * LoadBalancer can be set to rollback transactions that will create huge replication
+        * lag. It bases this estimate off of pendingWriteQueryDuration(). Certain simple
+        * queries, like inserting a row can take a long time due to row locking. This method
+        * uses some simple heuristics to discount those cases.
+        *
+        * @param string $sql A SQL write query
+        * @param float $runtime Total runtime, including RTT
+        */
+       private function updateTrxWriteQueryTime( $sql, $runtime ) {
+               // Whether this is indicative of replica DB runtime (except for RBR or ws_repl)
+               $indicativeOfReplicaRuntime = true;
+               if ( $runtime > self::SLOW_WRITE_SEC ) {
+                       $verb = $this->getQueryVerb( $sql );
+                       // insert(), upsert(), replace() are fast unless bulky in size or blocked on locks
+                       if ( $verb === 'INSERT' ) {
+                               $indicativeOfReplicaRuntime = $this->affectedRows() > self::SMALL_WRITE_ROWS;
+                       } elseif ( $verb === 'REPLACE' ) {
+                               $indicativeOfReplicaRuntime = $this->affectedRows() > self::SMALL_WRITE_ROWS / 2;
+                       }
+               }
+
+               $this->mTrxWriteDuration += $runtime;
+               $this->mTrxWriteQueryCount += 1;
+               if ( $indicativeOfReplicaRuntime ) {
+                       $this->mTrxWriteAdjDuration += $runtime;
+                       $this->mTrxWriteAdjQueryCount += 1;
+               }
+       }
+
+       private function canRecoverFromDisconnect( $sql, $priorWritesPending ) {
+               # Transaction dropped; this can mean lost writes, or REPEATABLE-READ snapshots.
+               # Dropped connections also mean that named locks are automatically released.
+               # Only allow error suppression in autocommit mode or when the lost transaction
+               # didn't matter anyway (aside from DBO_TRX snapshot loss).
+               if ( $this->mNamedLocksHeld ) {
+                       return false; // possible critical section violation
+               } elseif ( $sql === 'COMMIT' ) {
+                       return !$priorWritesPending; // nothing written anyway? (T127428)
+               } elseif ( $sql === 'ROLLBACK' ) {
+                       return true; // transaction lost...which is also what was requested :)
+               } elseif ( $this->explicitTrxActive() ) {
+                       return false; // don't drop atomocity
+               } elseif ( $priorWritesPending ) {
+                       return false; // prior writes lost from implicit transaction
+               }
+
+               return true;
+       }
+
+       private function handleSessionLoss() {
+               $this->mTrxLevel = 0;
+               $this->mTrxIdleCallbacks = []; // bug 65263
+               $this->mTrxPreCommitCallbacks = []; // bug 65263
+               $this->mSessionTempTables = [];
+               $this->mNamedLocksHeld = [];
+               try {
+                       // Handle callbacks in mTrxEndCallbacks
+                       $this->runOnTransactionIdleCallbacks( self::TRIGGER_ROLLBACK );
+                       $this->runTransactionListenerCallbacks( self::TRIGGER_ROLLBACK );
+                       return null;
+               } catch ( Exception $e ) {
+                       // Already logged; move on...
+                       return $e;
+               }
+       }
+
+       public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
+               if ( $this->ignoreErrors() || $tempIgnore ) {
+                       $this->queryLogger->debug( "SQL ERROR (ignored): $error\n" );
+               } else {
+                       $sql1line = mb_substr( str_replace( "\n", "\\n", $sql ), 0, 5 * 1024 );
+                       $this->queryLogger->error(
+                               "{fname}\t{db_server}\t{errno}\t{error}\t{sql1line}",
+                               $this->getLogContext( [
+                                       'method' => __METHOD__,
+                                       'errno' => $errno,
+                                       'error' => $error,
+                                       'sql1line' => $sql1line,
+                                       'fname' => $fname,
+                               ] )
+                       );
+                       $this->queryLogger->debug( "SQL ERROR: " . $error . "\n" );
+                       throw new DBQueryError( $this, $error, $errno, $sql, $fname );
+               }
+       }
+
+       public function freeResult( $res ) {
+       }
+
+       public function selectField(
+               $table, $var, $cond = '', $fname = __METHOD__, $options = []
+       ) {
+               if ( $var === '*' ) { // sanity
+                       throw new DBUnexpectedError( $this, "Cannot use a * field: got '$var'" );
+               }
+
+               if ( !is_array( $options ) ) {
+                       $options = [ $options ];
+               }
+
+               $options['LIMIT'] = 1;
+
+               $res = $this->select( $table, $var, $cond, $fname, $options );
+               if ( $res === false || !$this->numRows( $res ) ) {
+                       return false;
+               }
+
+               $row = $this->fetchRow( $res );
+
+               if ( $row !== false ) {
+                       return reset( $row );
+               } else {
+                       return false;
+               }
+       }
+
+       public function selectFieldValues(
+               $table, $var, $cond = '', $fname = __METHOD__, $options = [], $join_conds = []
+       ) {
+               if ( $var === '*' ) { // sanity
+                       throw new DBUnexpectedError( $this, "Cannot use a * field" );
+               } elseif ( !is_string( $var ) ) { // sanity
+                       throw new DBUnexpectedError( $this, "Cannot use an array of fields" );
+               }
+
+               if ( !is_array( $options ) ) {
+                       $options = [ $options ];
+               }
+
+               $res = $this->select( $table, $var, $cond, $fname, $options, $join_conds );
+               if ( $res === false ) {
+                       return false;
+               }
+
+               $values = [];
+               foreach ( $res as $row ) {
+                       $values[] = $row->$var;
+               }
+
+               return $values;
+       }
+
+       /**
+        * Returns an optional USE INDEX clause to go after the table, and a
+        * string to go at the end of the query.
+        *
+        * @param array $options Associative array of options to be turned into
+        *   an SQL query, valid keys are listed in the function.
+        * @return array
+        * @see Database::select()
+        */
+       protected function makeSelectOptions( $options ) {
+               $preLimitTail = $postLimitTail = '';
+               $startOpts = '';
+
+               $noKeyOptions = [];
+
+               foreach ( $options as $key => $option ) {
+                       if ( is_numeric( $key ) ) {
+                               $noKeyOptions[$option] = true;
+                       }
+               }
+
+               $preLimitTail .= $this->makeGroupByWithHaving( $options );
+
+               $preLimitTail .= $this->makeOrderBy( $options );
+
+               // if (isset($options['LIMIT'])) {
+               //      $tailOpts .= $this->limitResult('', $options['LIMIT'],
+               //              isset($options['OFFSET']) ? $options['OFFSET']
+               //              : false);
+               // }
+
+               if ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
+                       $postLimitTail .= ' FOR UPDATE';
+               }
+
+               if ( isset( $noKeyOptions['LOCK IN SHARE MODE'] ) ) {
+                       $postLimitTail .= ' LOCK IN SHARE MODE';
+               }
+
+               if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) {
+                       $startOpts .= 'DISTINCT';
+               }
+
+               # Various MySQL extensions
+               if ( isset( $noKeyOptions['STRAIGHT_JOIN'] ) ) {
+                       $startOpts .= ' /*! STRAIGHT_JOIN */';
+               }
+
+               if ( isset( $noKeyOptions['HIGH_PRIORITY'] ) ) {
+                       $startOpts .= ' HIGH_PRIORITY';
+               }
+
+               if ( isset( $noKeyOptions['SQL_BIG_RESULT'] ) ) {
+                       $startOpts .= ' SQL_BIG_RESULT';
+               }
+
+               if ( isset( $noKeyOptions['SQL_BUFFER_RESULT'] ) ) {
+                       $startOpts .= ' SQL_BUFFER_RESULT';
+               }
+
+               if ( isset( $noKeyOptions['SQL_SMALL_RESULT'] ) ) {
+                       $startOpts .= ' SQL_SMALL_RESULT';
+               }
+
+               if ( isset( $noKeyOptions['SQL_CALC_FOUND_ROWS'] ) ) {
+                       $startOpts .= ' SQL_CALC_FOUND_ROWS';
+               }
+
+               if ( isset( $noKeyOptions['SQL_CACHE'] ) ) {
+                       $startOpts .= ' SQL_CACHE';
+               }
+
+               if ( isset( $noKeyOptions['SQL_NO_CACHE'] ) ) {
+                       $startOpts .= ' SQL_NO_CACHE';
+               }
+
+               if ( isset( $options['USE INDEX'] ) && is_string( $options['USE INDEX'] ) ) {
+                       $useIndex = $this->useIndexClause( $options['USE INDEX'] );
+               } else {
+                       $useIndex = '';
+               }
+               if ( isset( $options['IGNORE INDEX'] ) && is_string( $options['IGNORE INDEX'] ) ) {
+                       $ignoreIndex = $this->ignoreIndexClause( $options['IGNORE INDEX'] );
+               } else {
+                       $ignoreIndex = '';
+               }
+
+               return [ $startOpts, $useIndex, $preLimitTail, $postLimitTail, $ignoreIndex ];
+       }
+
+       /**
+        * Returns an optional GROUP BY with an optional HAVING
+        *
+        * @param array $options Associative array of options
+        * @return string
+        * @see Database::select()
+        * @since 1.21
+        */
+       protected function makeGroupByWithHaving( $options ) {
+               $sql = '';
+               if ( isset( $options['GROUP BY'] ) ) {
+                       $gb = is_array( $options['GROUP BY'] )
+                               ? implode( ',', $options['GROUP BY'] )
+                               : $options['GROUP BY'];
+                       $sql .= ' GROUP BY ' . $gb;
+               }
+               if ( isset( $options['HAVING'] ) ) {
+                       $having = is_array( $options['HAVING'] )
+                               ? $this->makeList( $options['HAVING'], self::LIST_AND )
+                               : $options['HAVING'];
+                       $sql .= ' HAVING ' . $having;
+               }
+
+               return $sql;
+       }
+
+       /**
+        * Returns an optional ORDER BY
+        *
+        * @param array $options Associative array of options
+        * @return string
+        * @see Database::select()
+        * @since 1.21
+        */
+       protected function makeOrderBy( $options ) {
+               if ( isset( $options['ORDER BY'] ) ) {
+                       $ob = is_array( $options['ORDER BY'] )
+                               ? implode( ',', $options['ORDER BY'] )
+                               : $options['ORDER BY'];
+
+                       return ' ORDER BY ' . $ob;
+               }
+
+               return '';
+       }
+
+       public function select( $table, $vars, $conds = '', $fname = __METHOD__,
+               $options = [], $join_conds = [] ) {
+               $sql = $this->selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds );
+
+               return $this->query( $sql, $fname );
+       }
+
+       public function selectSQLText( $table, $vars, $conds = '', $fname = __METHOD__,
+               $options = [], $join_conds = []
+       ) {
+               if ( is_array( $vars ) ) {
+                       $vars = implode( ',', $this->fieldNamesWithAlias( $vars ) );
+               }
+
+               $options = (array)$options;
+               $useIndexes = ( isset( $options['USE INDEX'] ) && is_array( $options['USE INDEX'] ) )
+                       ? $options['USE INDEX']
+                       : [];
+               $ignoreIndexes = (
+                       isset( $options['IGNORE INDEX'] ) &&
+                       is_array( $options['IGNORE INDEX'] )
+               )
+                       ? $options['IGNORE INDEX']
+                       : [];
+
+               if ( is_array( $table ) ) {
+                       $from = ' FROM ' .
+                               $this->tableNamesWithIndexClauseOrJOIN(
+                                       $table, $useIndexes, $ignoreIndexes, $join_conds );
+               } elseif ( $table != '' ) {
+                       if ( $table[0] == ' ' ) {
+                               $from = ' FROM ' . $table;
+                       } else {
+                               $from = ' FROM ' .
+                                       $this->tableNamesWithIndexClauseOrJOIN(
+                                               [ $table ], $useIndexes, $ignoreIndexes, [] );
+                       }
+               } else {
+                       $from = '';
+               }
+
+               list( $startOpts, $useIndex, $preLimitTail, $postLimitTail, $ignoreIndex ) =
+                       $this->makeSelectOptions( $options );
+
+               if ( !empty( $conds ) ) {
+                       if ( is_array( $conds ) ) {
+                               $conds = $this->makeList( $conds, self::LIST_AND );
+                       }
+                       $sql = "SELECT $startOpts $vars $from $useIndex $ignoreIndex " .
+                               "WHERE $conds $preLimitTail";
+               } else {
+                       $sql = "SELECT $startOpts $vars $from $useIndex $ignoreIndex $preLimitTail";
+               }
+
+               if ( isset( $options['LIMIT'] ) ) {
+                       $sql = $this->limitResult( $sql, $options['LIMIT'],
+                               isset( $options['OFFSET'] ) ? $options['OFFSET'] : false );
+               }
+               $sql = "$sql $postLimitTail";
+
+               if ( isset( $options['EXPLAIN'] ) ) {
+                       $sql = 'EXPLAIN ' . $sql;
+               }
+
+               return $sql;
+       }
+
+       public function selectRow( $table, $vars, $conds, $fname = __METHOD__,
+               $options = [], $join_conds = []
+       ) {
+               $options = (array)$options;
+               $options['LIMIT'] = 1;
+               $res = $this->select( $table, $vars, $conds, $fname, $options, $join_conds );
+
+               if ( $res === false ) {
+                       return false;
+               }
+
+               if ( !$this->numRows( $res ) ) {
+                       return false;
+               }
+
+               $obj = $this->fetchObject( $res );
+
+               return $obj;
+       }
+
+       public function estimateRowCount(
+               $table, $vars = '*', $conds = '', $fname = __METHOD__, $options = []
+       ) {
+               $rows = 0;
+               $res = $this->select( $table, [ 'rowcount' => 'COUNT(*)' ], $conds, $fname, $options );
+
+               if ( $res ) {
+                       $row = $this->fetchRow( $res );
+                       $rows = ( isset( $row['rowcount'] ) ) ? (int)$row['rowcount'] : 0;
+               }
+
+               return $rows;
+       }
+
+       public function selectRowCount(
+               $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
+       ) {
+               $rows = 0;
+               $sql = $this->selectSQLText( $tables, '1', $conds, $fname, $options, $join_conds );
+               $res = $this->query( "SELECT COUNT(*) AS rowcount FROM ($sql) tmp_count", $fname );
+
+               if ( $res ) {
+                       $row = $this->fetchRow( $res );
+                       $rows = ( isset( $row['rowcount'] ) ) ? (int)$row['rowcount'] : 0;
+               }
+
+               return $rows;
+       }
+
+       /**
+        * Removes most variables from an SQL query and replaces them with X or N for numbers.
+        * It's only slightly flawed. Don't use for anything important.
+        *
+        * @param string $sql A SQL Query
+        *
+        * @return string
+        */
+       protected static function generalizeSQL( $sql ) {
+               # This does the same as the regexp below would do, but in such a way
+               # as to avoid crashing php on some large strings.
+               # $sql = preg_replace( "/'([^\\\\']|\\\\.)*'|\"([^\\\\\"]|\\\\.)*\"/", "'X'", $sql );
+
+               $sql = str_replace( "\\\\", '', $sql );
+               $sql = str_replace( "\\'", '', $sql );
+               $sql = str_replace( "\\\"", '', $sql );
+               $sql = preg_replace( "/'.*'/s", "'X'", $sql );
+               $sql = preg_replace( '/".*"/s', "'X'", $sql );
+
+               # All newlines, tabs, etc replaced by single space
+               $sql = preg_replace( '/\s+/', ' ', $sql );
+
+               # All numbers => N,
+               # except the ones surrounded by characters, e.g. l10n
+               $sql = preg_replace( '/-?\d+(,-?\d+)+/s', 'N,...,N', $sql );
+               $sql = preg_replace( '/(?<![a-zA-Z])-?\d+(?![a-zA-Z])/s', 'N', $sql );
+
+               return $sql;
+       }
+
+       public function fieldExists( $table, $field, $fname = __METHOD__ ) {
+               $info = $this->fieldInfo( $table, $field );
+
+               return (bool)$info;
+       }
+
+       public function indexExists( $table, $index, $fname = __METHOD__ ) {
+               if ( !$this->tableExists( $table ) ) {
+                       return null;
+               }
+
+               $info = $this->indexInfo( $table, $index, $fname );
+               if ( is_null( $info ) ) {
+                       return null;
+               } else {
+                       return $info !== false;
+               }
+       }
+
+       public function tableExists( $table, $fname = __METHOD__ ) {
+               $tableRaw = $this->tableName( $table, 'raw' );
+               if ( isset( $this->mSessionTempTables[$tableRaw] ) ) {
+                       return true; // already known to exist
+               }
+
+               $table = $this->tableName( $table );
+               $old = $this->ignoreErrors( true );
+               $res = $this->query( "SELECT 1 FROM $table LIMIT 1", $fname );
+               $this->ignoreErrors( $old );
+
+               return (bool)$res;
+       }
+
+       public function indexUnique( $table, $index ) {
+               $indexInfo = $this->indexInfo( $table, $index );
+
+               if ( !$indexInfo ) {
+                       return null;
+               }
+
+               return !$indexInfo[0]->Non_unique;
+       }
+
+       /**
+        * Helper for Database::insert().
+        *
+        * @param array $options
+        * @return string
+        */
+       protected function makeInsertOptions( $options ) {
+               return implode( ' ', $options );
+       }
+
+       public function insert( $table, $a, $fname = __METHOD__, $options = [] ) {
+               # No rows to insert, easy just return now
+               if ( !count( $a ) ) {
+                       return true;
+               }
+
+               $table = $this->tableName( $table );
+
+               if ( !is_array( $options ) ) {
+                       $options = [ $options ];
+               }
+
+               $fh = null;
+               if ( isset( $options['fileHandle'] ) ) {
+                       $fh = $options['fileHandle'];
+               }
+               $options = $this->makeInsertOptions( $options );
+
+               if ( isset( $a[0] ) && is_array( $a[0] ) ) {
+                       $multi = true;
+                       $keys = array_keys( $a[0] );
+               } else {
+                       $multi = false;
+                       $keys = array_keys( $a );
+               }
+
+               $sql = 'INSERT ' . $options .
+                       " INTO $table (" . implode( ',', $keys ) . ') VALUES ';
+
+               if ( $multi ) {
+                       $first = true;
+                       foreach ( $a as $row ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $sql .= ',';
+                               }
+                               $sql .= '(' . $this->makeList( $row ) . ')';
+                       }
+               } else {
+                       $sql .= '(' . $this->makeList( $a ) . ')';
+               }
+
+               if ( $fh !== null && false === fwrite( $fh, $sql ) ) {
+                       return false;
+               } elseif ( $fh !== null ) {
+                       return true;
+               }
+
+               return (bool)$this->query( $sql, $fname );
+       }
+
+       /**
+        * Make UPDATE options array for Database::makeUpdateOptions
+        *
+        * @param array $options
+        * @return array
+        */
+       protected function makeUpdateOptionsArray( $options ) {
+               if ( !is_array( $options ) ) {
+                       $options = [ $options ];
+               }
+
+               $opts = [];
+
+               if ( in_array( 'IGNORE', $options ) ) {
+                       $opts[] = 'IGNORE';
+               }
+
+               return $opts;
+       }
+
+       /**
+        * Make UPDATE options for the Database::update function
+        *
+        * @param array $options The options passed to Database::update
+        * @return string
+        */
+       protected function makeUpdateOptions( $options ) {
+               $opts = $this->makeUpdateOptionsArray( $options );
+
+               return implode( ' ', $opts );
+       }
+
+       public function update( $table, $values, $conds, $fname = __METHOD__, $options = [] ) {
+               $table = $this->tableName( $table );
+               $opts = $this->makeUpdateOptions( $options );
+               $sql = "UPDATE $opts $table SET " . $this->makeList( $values, self::LIST_SET );
+
+               if ( $conds !== [] && $conds !== '*' ) {
+                       $sql .= " WHERE " . $this->makeList( $conds, self::LIST_AND );
+               }
+
+               return $this->query( $sql, $fname );
+       }
+
+       public function makeList( $a, $mode = self::LIST_COMMA ) {
+               if ( !is_array( $a ) ) {
+                       throw new DBUnexpectedError( $this, __METHOD__ . ' called with incorrect parameters' );
+               }
+
+               $first = true;
+               $list = '';
+
+               foreach ( $a as $field => $value ) {
+                       if ( !$first ) {
+                               if ( $mode == self::LIST_AND ) {
+                                       $list .= ' AND ';
+                               } elseif ( $mode == self::LIST_OR ) {
+                                       $list .= ' OR ';
+                               } else {
+                                       $list .= ',';
+                               }
+                       } else {
+                               $first = false;
+                       }
+
+                       if ( ( $mode == self::LIST_AND || $mode == self::LIST_OR ) && is_numeric( $field ) ) {
+                               $list .= "($value)";
+                       } elseif ( $mode == self::LIST_SET && is_numeric( $field ) ) {
+                               $list .= "$value";
+                       } elseif (
+                               ( $mode == self::LIST_AND || $mode == self::LIST_OR ) && is_array( $value )
+                       ) {
+                               // Remove null from array to be handled separately if found
+                               $includeNull = false;
+                               foreach ( array_keys( $value, null, true ) as $nullKey ) {
+                                       $includeNull = true;
+                                       unset( $value[$nullKey] );
+                               }
+                               if ( count( $value ) == 0 && !$includeNull ) {
+                                       throw new InvalidArgumentException(
+                                               __METHOD__ . ": empty input for field $field" );
+                               } elseif ( count( $value ) == 0 ) {
+                                       // only check if $field is null
+                                       $list .= "$field IS NULL";
+                               } else {
+                                       // IN clause contains at least one valid element
+                                       if ( $includeNull ) {
+                                               // Group subconditions to ensure correct precedence
+                                               $list .= '(';
+                                       }
+                                       if ( count( $value ) == 1 ) {
+                                               // Special-case single values, as IN isn't terribly efficient
+                                               // Don't necessarily assume the single key is 0; we don't
+                                               // enforce linear numeric ordering on other arrays here.
+                                               $value = array_values( $value )[0];
+                                               $list .= $field . " = " . $this->addQuotes( $value );
+                                       } else {
+                                               $list .= $field . " IN (" . $this->makeList( $value ) . ") ";
+                                       }
+                                       // if null present in array, append IS NULL
+                                       if ( $includeNull ) {
+                                               $list .= " OR $field IS NULL)";
+                                       }
+                               }
+                       } elseif ( $value === null ) {
+                               if ( $mode == self::LIST_AND || $mode == self::LIST_OR ) {
+                                       $list .= "$field IS ";
+                               } elseif ( $mode == self::LIST_SET ) {
+                                       $list .= "$field = ";
+                               }
+                               $list .= 'NULL';
+                       } else {
+                               if (
+                                       $mode == self::LIST_AND || $mode == self::LIST_OR || $mode == self::LIST_SET
+                               ) {
+                                       $list .= "$field = ";
+                               }
+                               $list .= $mode == self::LIST_NAMES ? $value : $this->addQuotes( $value );
+                       }
+               }
+
+               return $list;
+       }
+
+       public function makeWhereFrom2d( $data, $baseKey, $subKey ) {
+               $conds = [];
+
+               foreach ( $data as $base => $sub ) {
+                       if ( count( $sub ) ) {
+                               $conds[] = $this->makeList(
+                                       [ $baseKey => $base, $subKey => array_keys( $sub ) ],
+                                       self::LIST_AND );
+                       }
+               }
+
+               if ( $conds ) {
+                       return $this->makeList( $conds, self::LIST_OR );
+               } else {
+                       // Nothing to search for...
+                       return false;
+               }
+       }
+
+       public function aggregateValue( $valuedata, $valuename = 'value' ) {
+               return $valuename;
+       }
+
+       public function bitNot( $field ) {
+               return "(~$field)";
+       }
+
+       public function bitAnd( $fieldLeft, $fieldRight ) {
+               return "($fieldLeft & $fieldRight)";
+       }
+
+       public function bitOr( $fieldLeft, $fieldRight ) {
+               return "($fieldLeft | $fieldRight)";
+       }
+
+       public function buildConcat( $stringList ) {
+               return 'CONCAT(' . implode( ',', $stringList ) . ')';
+       }
+
+       public function buildGroupConcatField(
+               $delim, $table, $field, $conds = '', $join_conds = []
+       ) {
+               $fld = "GROUP_CONCAT($field SEPARATOR " . $this->addQuotes( $delim ) . ')';
+
+               return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
+       }
+
+       public function buildStringCast( $field ) {
+               return $field;
+       }
+
+       public function selectDB( $db ) {
+               # Stub. Shouldn't cause serious problems if it's not overridden, but
+               # if your database engine supports a concept similar to MySQL's
+               # databases you may as well.
+               $this->mDBname = $db;
+
+               return true;
+       }
+
+       public function getDBname() {
+               return $this->mDBname;
+       }
+
+       public function getServer() {
+               return $this->mServer;
+       }
+
+       public function tableName( $name, $format = 'quoted' ) {
+               # Skip the entire process when we have a string quoted on both ends.
+               # Note that we check the end so that we will still quote any use of
+               # use of `database`.table. But won't break things if someone wants
+               # to query a database table with a dot in the name.
+               if ( $this->isQuotedIdentifier( $name ) ) {
+                       return $name;
+               }
+
+               # Lets test for any bits of text that should never show up in a table
+               # name. Basically anything like JOIN or ON which are actually part of
+               # SQL queries, but may end up inside of the table value to combine
+               # sql. Such as how the API is doing.
+               # Note that we use a whitespace test rather than a \b test to avoid
+               # any remote case where a word like on may be inside of a table name
+               # surrounded by symbols which may be considered word breaks.
+               if ( preg_match( '/(^|\s)(DISTINCT|JOIN|ON|AS)(\s|$)/i', $name ) !== 0 ) {
+                       return $name;
+               }
+
+               # Split database and table into proper variables.
+               # We reverse the explode so that database.table and table both output
+               # the correct table.
+               $dbDetails = explode( '.', $name, 3 );
+               if ( count( $dbDetails ) == 3 ) {
+                       list( $database, $schema, $table ) = $dbDetails;
+                       # We don't want any prefix added in this case
+                       $prefix = '';
+               } elseif ( count( $dbDetails ) == 2 ) {
+                       list( $database, $table ) = $dbDetails;
+                       # We don't want any prefix added in this case
+                       # In dbs that support it, $database may actually be the schema
+                       # but that doesn't affect any of the functionality here
+                       $prefix = '';
+                       $schema = '';
+               } else {
+                       list( $table ) = $dbDetails;
+                       if ( isset( $this->tableAliases[$table] ) ) {
+                               $database = $this->tableAliases[$table]['dbname'];
+                               $schema = is_string( $this->tableAliases[$table]['schema'] )
+                                       ? $this->tableAliases[$table]['schema']
+                                       : $this->mSchema;
+                               $prefix = is_string( $this->tableAliases[$table]['prefix'] )
+                                       ? $this->tableAliases[$table]['prefix']
+                                       : $this->mTablePrefix;
+                       } else {
+                               $database = '';
+                               $schema = $this->mSchema; # Default schema
+                               $prefix = $this->mTablePrefix; # Default prefix
+                       }
+               }
+
+               # Quote $table and apply the prefix if not quoted.
+               # $tableName might be empty if this is called from Database::replaceVars()
+               $tableName = "{$prefix}{$table}";
+               if ( $format == 'quoted'
+                       && !$this->isQuotedIdentifier( $tableName ) && $tableName !== ''
+               ) {
+                       $tableName = $this->addIdentifierQuotes( $tableName );
+               }
+
+               # Quote $schema and merge it with the table name if needed
+               if ( strlen( $schema ) ) {
+                       if ( $format == 'quoted' && !$this->isQuotedIdentifier( $schema ) ) {
+                               $schema = $this->addIdentifierQuotes( $schema );
+                       }
+                       $tableName = $schema . '.' . $tableName;
+               }
+
+               # Quote $database and merge it with the table name if needed
+               if ( $database !== '' ) {
+                       if ( $format == 'quoted' && !$this->isQuotedIdentifier( $database ) ) {
+                               $database = $this->addIdentifierQuotes( $database );
+                       }
+                       $tableName = $database . '.' . $tableName;
+               }
+
+               return $tableName;
+       }
+
+       public function tableNames() {
+               $inArray = func_get_args();
+               $retVal = [];
+
+               foreach ( $inArray as $name ) {
+                       $retVal[$name] = $this->tableName( $name );
+               }
+
+               return $retVal;
+       }
+
+       public function tableNamesN() {
+               $inArray = func_get_args();
+               $retVal = [];
+
+               foreach ( $inArray as $name ) {
+                       $retVal[] = $this->tableName( $name );
+               }
+
+               return $retVal;
+       }
+
+       /**
+        * Get an aliased table name
+        * e.g. tableName AS newTableName
+        *
+        * @param string $name Table name, see tableName()
+        * @param string|bool $alias Alias (optional)
+        * @return string SQL name for aliased table. Will not alias a table to its own name
+        */
+       protected function tableNameWithAlias( $name, $alias = false ) {
+               if ( !$alias || $alias == $name ) {
+                       return $this->tableName( $name );
+               } else {
+                       return $this->tableName( $name ) . ' ' . $this->addIdentifierQuotes( $alias );
+               }
+       }
+
+       /**
+        * Gets an array of aliased table names
+        *
+        * @param array $tables [ [alias] => table ]
+        * @return string[] See tableNameWithAlias()
+        */
+       protected function tableNamesWithAlias( $tables ) {
+               $retval = [];
+               foreach ( $tables as $alias => $table ) {
+                       if ( is_numeric( $alias ) ) {
+                               $alias = $table;
+                       }
+                       $retval[] = $this->tableNameWithAlias( $table, $alias );
+               }
+
+               return $retval;
+       }
+
+       /**
+        * Get an aliased field name
+        * e.g. fieldName AS newFieldName
+        *
+        * @param string $name Field name
+        * @param string|bool $alias Alias (optional)
+        * @return string SQL name for aliased field. Will not alias a field to its own name
+        */
+       protected function fieldNameWithAlias( $name, $alias = false ) {
+               if ( !$alias || (string)$alias === (string)$name ) {
+                       return $name;
+               } else {
+                       return $name . ' AS ' . $this->addIdentifierQuotes( $alias ); // PostgreSQL needs AS
+               }
+       }
+
+       /**
+        * Gets an array of aliased field names
+        *
+        * @param array $fields [ [alias] => field ]
+        * @return string[] See fieldNameWithAlias()
+        */
+       protected function fieldNamesWithAlias( $fields ) {
+               $retval = [];
+               foreach ( $fields as $alias => $field ) {
+                       if ( is_numeric( $alias ) ) {
+                               $alias = $field;
+                       }
+                       $retval[] = $this->fieldNameWithAlias( $field, $alias );
+               }
+
+               return $retval;
+       }
+
+       /**
+        * Get the aliased table name clause for a FROM clause
+        * which might have a JOIN and/or USE INDEX or IGNORE INDEX clause
+        *
+        * @param array $tables ( [alias] => table )
+        * @param array $use_index Same as for select()
+        * @param array $ignore_index Same as for select()
+        * @param array $join_conds Same as for select()
+        * @return string
+        */
+       protected function tableNamesWithIndexClauseOrJOIN(
+               $tables, $use_index = [], $ignore_index = [], $join_conds = []
+       ) {
+               $ret = [];
+               $retJOIN = [];
+               $use_index = (array)$use_index;
+               $ignore_index = (array)$ignore_index;
+               $join_conds = (array)$join_conds;
+
+               foreach ( $tables as $alias => $table ) {
+                       if ( !is_string( $alias ) ) {
+                               // No alias? Set it equal to the table name
+                               $alias = $table;
+                       }
+                       // Is there a JOIN clause for this table?
+                       if ( isset( $join_conds[$alias] ) ) {
+                               list( $joinType, $conds ) = $join_conds[$alias];
+                               $tableClause = $joinType;
+                               $tableClause .= ' ' . $this->tableNameWithAlias( $table, $alias );
+                               if ( isset( $use_index[$alias] ) ) { // has USE INDEX?
+                                       $use = $this->useIndexClause( implode( ',', (array)$use_index[$alias] ) );
+                                       if ( $use != '' ) {
+                                               $tableClause .= ' ' . $use;
+                                       }
+                               }
+                               if ( isset( $ignore_index[$alias] ) ) { // has IGNORE INDEX?
+                                       $ignore = $this->ignoreIndexClause(
+                                               implode( ',', (array)$ignore_index[$alias] ) );
+                                       if ( $ignore != '' ) {
+                                               $tableClause .= ' ' . $ignore;
+                                       }
+                               }
+                               $on = $this->makeList( (array)$conds, self::LIST_AND );
+                               if ( $on != '' ) {
+                                       $tableClause .= ' ON (' . $on . ')';
+                               }
+
+                               $retJOIN[] = $tableClause;
+                       } elseif ( isset( $use_index[$alias] ) ) {
+                               // Is there an INDEX clause for this table?
+                               $tableClause = $this->tableNameWithAlias( $table, $alias );
+                               $tableClause .= ' ' . $this->useIndexClause(
+                                               implode( ',', (array)$use_index[$alias] )
+                                       );
+
+                               $ret[] = $tableClause;
+                       } elseif ( isset( $ignore_index[$alias] ) ) {
+                               // Is there an INDEX clause for this table?
+                               $tableClause = $this->tableNameWithAlias( $table, $alias );
+                               $tableClause .= ' ' . $this->ignoreIndexClause(
+                                               implode( ',', (array)$ignore_index[$alias] )
+                                       );
+
+                               $ret[] = $tableClause;
+                       } else {
+                               $tableClause = $this->tableNameWithAlias( $table, $alias );
+
+                               $ret[] = $tableClause;
+                       }
+               }
+
+               // We can't separate explicit JOIN clauses with ',', use ' ' for those
+               $implicitJoins = !empty( $ret ) ? implode( ',', $ret ) : "";
+               $explicitJoins = !empty( $retJOIN ) ? implode( ' ', $retJOIN ) : "";
+
+               // Compile our final table clause
+               return implode( ' ', [ $implicitJoins, $explicitJoins ] );
+       }
+
+       /**
+        * Get the name of an index in a given table.
+        *
+        * @param string $index
+        * @return string
+        */
+       protected function indexName( $index ) {
+               return $index;
+       }
+
+       public function addQuotes( $s ) {
+               if ( $s instanceof Blob ) {
+                       $s = $s->fetch();
+               }
+               if ( $s === null ) {
+                       return 'NULL';
+               } elseif ( is_bool( $s ) ) {
+                       return (int)$s;
+               } else {
+                       # This will also quote numeric values. This should be harmless,
+                       # and protects against weird problems that occur when they really
+                       # _are_ strings such as article titles and string->number->string
+                       # conversion is not 1:1.
+                       return "'" . $this->strencode( $s ) . "'";
+               }
+       }
+
+       /**
+        * Quotes an identifier using `backticks` or "double quotes" depending on the database type.
+        * MySQL uses `backticks` while basically everything else uses double quotes.
+        * Since MySQL is the odd one out here the double quotes are our generic
+        * and we implement backticks in DatabaseMysql.
+        *
+        * @param string $s
+        * @return string
+        */
+       public function addIdentifierQuotes( $s ) {
+               return '"' . str_replace( '"', '""', $s ) . '"';
+       }
+
+       /**
+        * Returns if the given identifier looks quoted or not according to
+        * the database convention for quoting identifiers .
+        *
+        * @note Do not use this to determine if untrusted input is safe.
+        *   A malicious user can trick this function.
+        * @param string $name
+        * @return bool
+        */
+       public function isQuotedIdentifier( $name ) {
+               return $name[0] == '"' && substr( $name, -1, 1 ) == '"';
+       }
+
+       /**
+        * @param string $s
+        * @return string
+        */
+       protected function escapeLikeInternal( $s ) {
+               return addcslashes( $s, '\%_' );
+       }
+
+       public function buildLike() {
+               $params = func_get_args();
+
+               if ( count( $params ) > 0 && is_array( $params[0] ) ) {
+                       $params = $params[0];
+               }
+
+               $s = '';
+
+               foreach ( $params as $value ) {
+                       if ( $value instanceof LikeMatch ) {
+                               $s .= $value->toString();
+                       } else {
+                               $s .= $this->escapeLikeInternal( $value );
+                       }
+               }
+
+               return " LIKE {$this->addQuotes( $s )} ";
+       }
+
+       public function anyChar() {
+               return new LikeMatch( '_' );
+       }
+
+       public function anyString() {
+               return new LikeMatch( '%' );
+       }
+
+       public function nextSequenceValue( $seqName ) {
+               return null;
+       }
+
+       /**
+        * USE INDEX clause. Unlikely to be useful for anything but MySQL. This
+        * is only needed because a) MySQL must be as efficient as possible due to
+        * its use on Wikipedia, and b) MySQL 4.0 is kind of dumb sometimes about
+        * which index to pick. Anyway, other databases might have different
+        * indexes on a given table. So don't bother overriding this unless you're
+        * MySQL.
+        * @param string $index
+        * @return string
+        */
+       public function useIndexClause( $index ) {
+               return '';
+       }
+
+       /**
+        * IGNORE INDEX clause. Unlikely to be useful for anything but MySQL. This
+        * is only needed because a) MySQL must be as efficient as possible due to
+        * its use on Wikipedia, and b) MySQL 4.0 is kind of dumb sometimes about
+        * which index to pick. Anyway, other databases might have different
+        * indexes on a given table. So don't bother overriding this unless you're
+        * MySQL.
+        * @param string $index
+        * @return string
+        */
+       public function ignoreIndexClause( $index ) {
+               return '';
+       }
+
+       public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
+               $quotedTable = $this->tableName( $table );
+
+               if ( count( $rows ) == 0 ) {
+                       return;
+               }
+
+               # Single row case
+               if ( !is_array( reset( $rows ) ) ) {
+                       $rows = [ $rows ];
+               }
+
+               // @FXIME: this is not atomic, but a trx would break affectedRows()
+               foreach ( $rows as $row ) {
+                       # Delete rows which collide
+                       if ( $uniqueIndexes ) {
+                               $sql = "DELETE FROM $quotedTable WHERE ";
+                               $first = true;
+                               foreach ( $uniqueIndexes as $index ) {
+                                       if ( $first ) {
+                                               $first = false;
+                                               $sql .= '( ';
+                                       } else {
+                                               $sql .= ' ) OR ( ';
+                                       }
+                                       if ( is_array( $index ) ) {
+                                               $first2 = true;
+                                               foreach ( $index as $col ) {
+                                                       if ( $first2 ) {
+                                                               $first2 = false;
+                                                       } else {
+                                                               $sql .= ' AND ';
+                                                       }
+                                                       $sql .= $col . '=' . $this->addQuotes( $row[$col] );
+                                               }
+                                       } else {
+                                               $sql .= $index . '=' . $this->addQuotes( $row[$index] );
+                                       }
+                               }
+                               $sql .= ' )';
+                               $this->query( $sql, $fname );
+                       }
+
+                       # Now insert the row
+                       $this->insert( $table, $row, $fname );
+               }
+       }
+
+       /**
+        * REPLACE query wrapper for MySQL and SQLite, which have a native REPLACE
+        * statement.
+        *
+        * @param string $table Table name
+        * @param array|string $rows Row(s) to insert
+        * @param string $fname Caller function name
+        *
+        * @return ResultWrapper
+        */
+       protected function nativeReplace( $table, $rows, $fname ) {
+               $table = $this->tableName( $table );
+
+               # Single row case
+               if ( !is_array( reset( $rows ) ) ) {
+                       $rows = [ $rows ];
+               }
+
+               $sql = "REPLACE INTO $table (" . implode( ',', array_keys( $rows[0] ) ) . ') VALUES ';
+               $first = true;
+
+               foreach ( $rows as $row ) {
+                       if ( $first ) {
+                               $first = false;
+                       } else {
+                               $sql .= ',';
+                       }
+
+                       $sql .= '(' . $this->makeList( $row ) . ')';
+               }
+
+               return $this->query( $sql, $fname );
+       }
+
+       public function upsert( $table, array $rows, array $uniqueIndexes, array $set,
+               $fname = __METHOD__
+       ) {
+               if ( !count( $rows ) ) {
+                       return true; // nothing to do
+               }
+
+               if ( !is_array( reset( $rows ) ) ) {
+                       $rows = [ $rows ];
+               }
+
+               if ( count( $uniqueIndexes ) ) {
+                       $clauses = []; // list WHERE clauses that each identify a single row
+                       foreach ( $rows as $row ) {
+                               foreach ( $uniqueIndexes as $index ) {
+                                       $index = is_array( $index ) ? $index : [ $index ]; // columns
+                                       $rowKey = []; // unique key to this row
+                                       foreach ( $index as $column ) {
+                                               $rowKey[$column] = $row[$column];
+                                       }
+                                       $clauses[] = $this->makeList( $rowKey, self::LIST_AND );
+                               }
+                       }
+                       $where = [ $this->makeList( $clauses, self::LIST_OR ) ];
+               } else {
+                       $where = false;
+               }
+
+               $useTrx = !$this->mTrxLevel;
+               if ( $useTrx ) {
+                       $this->begin( $fname, self::TRANSACTION_INTERNAL );
+               }
+               try {
+                       # Update any existing conflicting row(s)
+                       if ( $where !== false ) {
+                               $ok = $this->update( $table, $set, $where, $fname );
+                       } else {
+                               $ok = true;
+                       }
+                       # Now insert any non-conflicting row(s)
+                       $ok = $this->insert( $table, $rows, $fname, [ 'IGNORE' ] ) && $ok;
+               } catch ( Exception $e ) {
+                       if ( $useTrx ) {
+                               $this->rollback( $fname, self::FLUSHING_INTERNAL );
+                       }
+                       throw $e;
+               }
+               if ( $useTrx ) {
+                       $this->commit( $fname, self::FLUSHING_INTERNAL );
+               }
+
+               return $ok;
+       }
+
+       public function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds,
+               $fname = __METHOD__
+       ) {
+               if ( !$conds ) {
+                       throw new DBUnexpectedError( $this, __METHOD__ . ' called with empty $conds' );
+               }
+
+               $delTable = $this->tableName( $delTable );
+               $joinTable = $this->tableName( $joinTable );
+               $sql = "DELETE FROM $delTable WHERE $delVar IN (SELECT $joinVar FROM $joinTable ";
+               if ( $conds != '*' ) {
+                       $sql .= 'WHERE ' . $this->makeList( $conds, self::LIST_AND );
+               }
+               $sql .= ')';
+
+               $this->query( $sql, $fname );
+       }
+
+       public function textFieldSize( $table, $field ) {
+               $table = $this->tableName( $table );
+               $sql = "SHOW COLUMNS FROM $table LIKE \"$field\";";
+               $res = $this->query( $sql, __METHOD__ );
+               $row = $this->fetchObject( $res );
+
+               $m = [];
+
+               if ( preg_match( '/\((.*)\)/', $row->Type, $m ) ) {
+                       $size = $m[1];
+               } else {
+                       $size = -1;
+               }
+
+               return $size;
+       }
+
+       public function delete( $table, $conds, $fname = __METHOD__ ) {
+               if ( !$conds ) {
+                       throw new DBUnexpectedError( $this, __METHOD__ . ' called with no conditions' );
+               }
+
+               $table = $this->tableName( $table );
+               $sql = "DELETE FROM $table";
+
+               if ( $conds != '*' ) {
+                       if ( is_array( $conds ) ) {
+                               $conds = $this->makeList( $conds, self::LIST_AND );
+                       }
+                       $sql .= ' WHERE ' . $conds;
+               }
+
+               return $this->query( $sql, $fname );
+       }
+
+       public function insertSelect(
+               $destTable, $srcTable, $varMap, $conds,
+               $fname = __METHOD__, $insertOptions = [], $selectOptions = []
+       ) {
+               if ( $this->cliMode ) {
+                       // For massive migrations with downtime, we don't want to select everything
+                       // into memory and OOM, so do all this native on the server side if possible.
+                       return $this->nativeInsertSelect(
+                               $destTable,
+                               $srcTable,
+                               $varMap,
+                               $conds,
+                               $fname,
+                               $insertOptions,
+                               $selectOptions
+                       );
+               }
+
+               // For web requests, do a locking SELECT and then INSERT. This puts the SELECT burden
+               // on only the master (without needing row-based-replication). It also makes it easy to
+               // know how big the INSERT is going to be.
+               $fields = [];
+               foreach ( $varMap as $dstColumn => $sourceColumnOrSql ) {
+                       $fields[] = $this->fieldNameWithAlias( $sourceColumnOrSql, $dstColumn );
+               }
+               $selectOptions[] = 'FOR UPDATE';
+               $res = $this->select( $srcTable, implode( ',', $fields ), $conds, $fname, $selectOptions );
+               if ( !$res ) {
+                       return false;
+               }
+
+               $rows = [];
+               foreach ( $res as $row ) {
+                       $rows[] = (array)$row;
+               }
+
+               return $this->insert( $destTable, $rows, $fname, $insertOptions );
+       }
+
+       protected function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds,
+               $fname = __METHOD__,
+               $insertOptions = [], $selectOptions = []
+       ) {
+               $destTable = $this->tableName( $destTable );
+
+               if ( !is_array( $insertOptions ) ) {
+                       $insertOptions = [ $insertOptions ];
+               }
+
+               $insertOptions = $this->makeInsertOptions( $insertOptions );
+
+               if ( !is_array( $selectOptions ) ) {
+                       $selectOptions = [ $selectOptions ];
+               }
+
+               list( $startOpts, $useIndex, $tailOpts, $ignoreIndex ) = $this->makeSelectOptions(
+                       $selectOptions );
+
+               if ( is_array( $srcTable ) ) {
+                       $srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
+               } else {
+                       $srcTable = $this->tableName( $srcTable );
+               }
+
+               $sql = "INSERT $insertOptions" .
+                       " INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ')' .
+                       " SELECT $startOpts " . implode( ',', $varMap ) .
+                       " FROM $srcTable $useIndex $ignoreIndex ";
+
+               if ( $conds != '*' ) {
+                       if ( is_array( $conds ) ) {
+                               $conds = $this->makeList( $conds, self::LIST_AND );
+                       }
+                       $sql .= " WHERE $conds";
+               }
+
+               $sql .= " $tailOpts";
+
+               return $this->query( $sql, $fname );
+       }
+
+       /**
+        * Construct a LIMIT query with optional offset. This is used for query
+        * pages. The SQL should be adjusted so that only the first $limit rows
+        * are returned. If $offset is provided as well, then the first $offset
+        * rows should be discarded, and the next $limit rows should be returned.
+        * If the result of the query is not ordered, then the rows to be returned
+        * are theoretically arbitrary.
+        *
+        * $sql is expected to be a SELECT, if that makes a difference.
+        *
+        * The version provided by default works in MySQL and SQLite. It will very
+        * likely need to be overridden for most other DBMSes.
+        *
+        * @param string $sql SQL query we will append the limit too
+        * @param int $limit The SQL limit
+        * @param int|bool $offset The SQL offset (default false)
+        * @throws DBUnexpectedError
+        * @return string
+        */
+       public function limitResult( $sql, $limit, $offset = false ) {
+               if ( !is_numeric( $limit ) ) {
+                       throw new DBUnexpectedError( $this,
+                               "Invalid non-numeric limit passed to limitResult()\n" );
+               }
+
+               return "$sql LIMIT "
+               . ( ( is_numeric( $offset ) && $offset != 0 ) ? "{$offset}," : "" )
+               . "{$limit} ";
+       }
+
+       public function unionSupportsOrderAndLimit() {
+               return true; // True for almost every DB supported
+       }
+
+       public function unionQueries( $sqls, $all ) {
+               $glue = $all ? ') UNION ALL (' : ') UNION (';
+
+               return '(' . implode( $glue, $sqls ) . ')';
+       }
+
+       public function conditional( $cond, $trueVal, $falseVal ) {
+               if ( is_array( $cond ) ) {
+                       $cond = $this->makeList( $cond, self::LIST_AND );
+               }
+
+               return " (CASE WHEN $cond THEN $trueVal ELSE $falseVal END) ";
+       }
+
+       public function strreplace( $orig, $old, $new ) {
+               return "REPLACE({$orig}, {$old}, {$new})";
+       }
+
+       public function getServerUptime() {
+               return 0;
+       }
+
+       public function wasDeadlock() {
+               return false;
+       }
+
+       public function wasLockTimeout() {
+               return false;
+       }
+
+       public function wasErrorReissuable() {
+               return false;
+       }
+
+       public function wasReadOnlyError() {
+               return false;
+       }
+
+       /**
+        * Do not use this method outside of Database/DBError classes
+        *
+        * @param integer|string $errno
+        * @return bool Whether the given query error was a connection drop
+        */
+       public function wasConnectionError( $errno ) {
+               return false;
+       }
+
+       public function deadlockLoop() {
+               $args = func_get_args();
+               $function = array_shift( $args );
+               $tries = self::DEADLOCK_TRIES;
+
+               $this->begin( __METHOD__ );
+
+               $retVal = null;
+               /** @var Exception $e */
+               $e = null;
+               do {
+                       try {
+                               $retVal = call_user_func_array( $function, $args );
+                               break;
+                       } catch ( DBQueryError $e ) {
+                               if ( $this->wasDeadlock() ) {
+                                       // Retry after a randomized delay
+                                       usleep( mt_rand( self::DEADLOCK_DELAY_MIN, self::DEADLOCK_DELAY_MAX ) );
+                               } else {
+                                       // Throw the error back up
+                                       throw $e;
+                               }
+                       }
+               } while ( --$tries > 0 );
+
+               if ( $tries <= 0 ) {
+                       // Too many deadlocks; give up
+                       $this->rollback( __METHOD__ );
+                       throw $e;
+               } else {
+                       $this->commit( __METHOD__ );
+
+                       return $retVal;
+               }
+       }
+
+       public function masterPosWait( DBMasterPos $pos, $timeout ) {
+               # Real waits are implemented in the subclass.
+               return 0;
+       }
+
+       public function getReplicaPos() {
+               # Stub
+               return false;
+       }
+
+       public function getMasterPos() {
+               # Stub
+               return false;
+       }
+
+       public function serverIsReadOnly() {
+               return false;
+       }
+
+       final public function onTransactionResolution( callable $callback, $fname = __METHOD__ ) {
+               if ( !$this->mTrxLevel ) {
+                       throw new DBUnexpectedError( $this, "No transaction is active." );
+               }
+               $this->mTrxEndCallbacks[] = [ $callback, $fname ];
+       }
+
+       final public function onTransactionIdle( callable $callback, $fname = __METHOD__ ) {
+               $this->mTrxIdleCallbacks[] = [ $callback, $fname ];
+               if ( !$this->mTrxLevel ) {
+                       $this->runOnTransactionIdleCallbacks( self::TRIGGER_IDLE );
+               }
+       }
+
+       final public function onTransactionPreCommitOrIdle( callable $callback, $fname = __METHOD__ ) {
+               if ( $this->mTrxLevel ) {
+                       $this->mTrxPreCommitCallbacks[] = [ $callback, $fname ];
+               } else {
+                       // If no transaction is active, then make one for this callback
+                       $this->startAtomic( __METHOD__ );
+                       try {
+                               call_user_func( $callback );
+                               $this->endAtomic( __METHOD__ );
+                       } catch ( Exception $e ) {
+                               $this->rollback( __METHOD__, self::FLUSHING_INTERNAL );
+                               throw $e;
+                       }
+               }
+       }
+
+       final public function setTransactionListener( $name, callable $callback = null ) {
+               if ( $callback ) {
+                       $this->mTrxRecurringCallbacks[$name] = $callback;
+               } else {
+                       unset( $this->mTrxRecurringCallbacks[$name] );
+               }
+       }
+
+       /**
+        * Whether to disable running of post-COMMIT/ROLLBACK callbacks
+        *
+        * This method should not be used outside of Database/LoadBalancer
+        *
+        * @param bool $suppress
+        * @since 1.28
+        */
+       final public function setTrxEndCallbackSuppression( $suppress ) {
+               $this->mTrxEndCallbacksSuppressed = $suppress;
+       }
+
+       /**
+        * Actually run and consume any "on transaction idle/resolution" callbacks.
+        *
+        * This method should not be used outside of Database/LoadBalancer
+        *
+        * @param integer $trigger IDatabase::TRIGGER_* constant
+        * @since 1.20
+        * @throws Exception
+        */
+       public function runOnTransactionIdleCallbacks( $trigger ) {
+               if ( $this->mTrxEndCallbacksSuppressed ) {
+                       return;
+               }
+
+               $autoTrx = $this->getFlag( self::DBO_TRX ); // automatic begin() enabled?
+               /** @var Exception $e */
+               $e = null; // first exception
+               do { // callbacks may add callbacks :)
+                       $callbacks = array_merge(
+                               $this->mTrxIdleCallbacks,
+                               $this->mTrxEndCallbacks // include "transaction resolution" callbacks
+                       );
+                       $this->mTrxIdleCallbacks = []; // consumed (and recursion guard)
+                       $this->mTrxEndCallbacks = []; // consumed (recursion guard)
+                       foreach ( $callbacks as $callback ) {
+                               try {
+                                       list( $phpCallback ) = $callback;
+                                       $this->clearFlag( self::DBO_TRX ); // make each query its own transaction
+                                       call_user_func_array( $phpCallback, [ $trigger ] );
+                                       if ( $autoTrx ) {
+                                               $this->setFlag( self::DBO_TRX ); // restore automatic begin()
+                                       } else {
+                                               $this->clearFlag( self::DBO_TRX ); // restore auto-commit
+                                       }
+                               } catch ( Exception $ex ) {
+                                       call_user_func( $this->errorLogger, $ex );
+                                       $e = $e ?: $ex;
+                                       // Some callbacks may use startAtomic/endAtomic, so make sure
+                                       // their transactions are ended so other callbacks don't fail
+                                       if ( $this->trxLevel() ) {
+                                               $this->rollback( __METHOD__, self::FLUSHING_INTERNAL );
+                                       }
+                               }
+                       }
+               } while ( count( $this->mTrxIdleCallbacks ) );
+
+               if ( $e instanceof Exception ) {
+                       throw $e; // re-throw any first exception
+               }
+       }
+
+       /**
+        * Actually run and consume any "on transaction pre-commit" callbacks.
+        *
+        * This method should not be used outside of Database/LoadBalancer
+        *
+        * @since 1.22
+        * @throws Exception
+        */
+       public function runOnTransactionPreCommitCallbacks() {
+               $e = null; // first exception
+               do { // callbacks may add callbacks :)
+                       $callbacks = $this->mTrxPreCommitCallbacks;
+                       $this->mTrxPreCommitCallbacks = []; // consumed (and recursion guard)
+                       foreach ( $callbacks as $callback ) {
+                               try {
+                                       list( $phpCallback ) = $callback;
+                                       call_user_func( $phpCallback );
+                               } catch ( Exception $ex ) {
+                                       call_user_func( $this->errorLogger, $ex );
+                                       $e = $e ?: $ex;
+                               }
+                       }
+               } while ( count( $this->mTrxPreCommitCallbacks ) );
+
+               if ( $e instanceof Exception ) {
+                       throw $e; // re-throw any first exception
+               }
+       }
+
+       /**
+        * Actually run any "transaction listener" callbacks.
+        *
+        * This method should not be used outside of Database/LoadBalancer
+        *
+        * @param integer $trigger IDatabase::TRIGGER_* constant
+        * @throws Exception
+        * @since 1.20
+        */
+       public function runTransactionListenerCallbacks( $trigger ) {
+               if ( $this->mTrxEndCallbacksSuppressed ) {
+                       return;
+               }
+
+               /** @var Exception $e */
+               $e = null; // first exception
+
+               foreach ( $this->mTrxRecurringCallbacks as $phpCallback ) {
+                       try {
+                               $phpCallback( $trigger, $this );
+                       } catch ( Exception $ex ) {
+                               call_user_func( $this->errorLogger, $ex );
+                               $e = $e ?: $ex;
+                       }
+               }
+
+               if ( $e instanceof Exception ) {
+                       throw $e; // re-throw any first exception
+               }
+       }
+
+       final public function startAtomic( $fname = __METHOD__ ) {
+               if ( !$this->mTrxLevel ) {
+                       $this->begin( $fname, self::TRANSACTION_INTERNAL );
+                       // If DBO_TRX is set, a series of startAtomic/endAtomic pairs will result
+                       // in all changes being in one transaction to keep requests transactional.
+                       if ( !$this->getFlag( self::DBO_TRX ) ) {
+                               $this->mTrxAutomaticAtomic = true;
+                       }
+               }
+
+               $this->mTrxAtomicLevels[] = $fname;
+       }
+
+       final public function endAtomic( $fname = __METHOD__ ) {
+               if ( !$this->mTrxLevel ) {
+                       throw new DBUnexpectedError( $this, "No atomic transaction is open (got $fname)." );
+               }
+               if ( !$this->mTrxAtomicLevels ||
+                       array_pop( $this->mTrxAtomicLevels ) !== $fname
+               ) {
+                       throw new DBUnexpectedError( $this, "Invalid atomic section ended (got $fname)." );
+               }
+
+               if ( !$this->mTrxAtomicLevels && $this->mTrxAutomaticAtomic ) {
+                       $this->commit( $fname, self::FLUSHING_INTERNAL );
+               }
+       }
+
+       final public function doAtomicSection( $fname, callable $callback ) {
+               $this->startAtomic( $fname );
+               try {
+                       $res = call_user_func_array( $callback, [ $this, $fname ] );
+               } catch ( Exception $e ) {
+                       $this->rollback( $fname, self::FLUSHING_INTERNAL );
+                       throw $e;
+               }
+               $this->endAtomic( $fname );
+
+               return $res;
+       }
+
+       final public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT ) {
+               // Protect against mismatched atomic section, transaction nesting, and snapshot loss
+               if ( $this->mTrxLevel ) {
+                       if ( $this->mTrxAtomicLevels ) {
+                               $levels = implode( ', ', $this->mTrxAtomicLevels );
+                               $msg = "$fname: Got explicit BEGIN while atomic section(s) $levels are open.";
+                               throw new DBUnexpectedError( $this, $msg );
+                       } elseif ( !$this->mTrxAutomatic ) {
+                               $msg = "$fname: Explicit transaction already active (from {$this->mTrxFname}).";
+                               throw new DBUnexpectedError( $this, $msg );
+                       } else {
+                               // @TODO: make this an exception at some point
+                               $msg = "$fname: Implicit transaction already active (from {$this->mTrxFname}).";
+                               $this->queryLogger->error( $msg );
+                               return; // join the main transaction set
+                       }
+               } elseif ( $this->getFlag( self::DBO_TRX ) && $mode !== self::TRANSACTION_INTERNAL ) {
+                       // @TODO: make this an exception at some point
+                       $msg = "$fname: Implicit transaction expected (DBO_TRX set).";
+                       $this->queryLogger->error( $msg );
+                       return; // let any writes be in the main transaction
+               }
+
+               // Avoid fatals if close() was called
+               $this->assertOpen();
+
+               $this->doBegin( $fname );
+               $this->mTrxTimestamp = microtime( true );
+               $this->mTrxFname = $fname;
+               $this->mTrxDoneWrites = false;
+               $this->mTrxAutomaticAtomic = false;
+               $this->mTrxAtomicLevels = [];
+               $this->mTrxShortId = sprintf( '%06x', mt_rand( 0, 0xffffff ) );
+               $this->mTrxWriteDuration = 0.0;
+               $this->mTrxWriteQueryCount = 0;
+               $this->mTrxWriteAdjDuration = 0.0;
+               $this->mTrxWriteAdjQueryCount = 0;
+               $this->mTrxWriteCallers = [];
+               // First SELECT after BEGIN will establish the snapshot in REPEATABLE-READ.
+               // Get an estimate of the replica DB lag before then, treating estimate staleness
+               // as lag itself just to be safe
+               $status = $this->getApproximateLagStatus();
+               $this->mTrxReplicaLag = $status['lag'] + ( microtime( true ) - $status['since'] );
+               // T147697: make explicitTrxActive() return true until begin() finishes. This way, no
+               // caller will think its OK to muck around with the transaction just because startAtomic()
+               // has not yet completed (e.g. setting mTrxAtomicLevels).
+               $this->mTrxAutomatic = ( $mode === self::TRANSACTION_INTERNAL );
+       }
+
+       /**
+        * Issues the BEGIN command to the database server.
+        *
+        * @see Database::begin()
+        * @param string $fname
+        */
+       protected function doBegin( $fname ) {
+               $this->query( 'BEGIN', $fname );
+               $this->mTrxLevel = 1;
+       }
+
+       final public function commit( $fname = __METHOD__, $flush = '' ) {
+               if ( $this->mTrxLevel && $this->mTrxAtomicLevels ) {
+                       // There are still atomic sections open. This cannot be ignored
+                       $levels = implode( ', ', $this->mTrxAtomicLevels );
+                       throw new DBUnexpectedError(
+                               $this,
+                               "$fname: Got COMMIT while atomic sections $levels are still open."
+                       );
+               }
+
+               if ( $flush === self::FLUSHING_INTERNAL || $flush === self::FLUSHING_ALL_PEERS ) {
+                       if ( !$this->mTrxLevel ) {
+                               return; // nothing to do
+                       } elseif ( !$this->mTrxAutomatic ) {
+                               throw new DBUnexpectedError(
+                                       $this,
+                                       "$fname: Flushing an explicit transaction, getting out of sync."
+                               );
+                       }
+               } else {
+                       if ( !$this->mTrxLevel ) {
+                               $this->queryLogger->error(
+                                       "$fname: No transaction to commit, something got out of sync." );
+                               return; // nothing to do
+                       } elseif ( $this->mTrxAutomatic ) {
+                               // @TODO: make this an exception at some point
+                               $msg = "$fname: Explicit commit of implicit transaction.";
+                               $this->queryLogger->error( $msg );
+                               return; // wait for the main transaction set commit round
+                       }
+               }
+
+               // Avoid fatals if close() was called
+               $this->assertOpen();
+
+               $this->runOnTransactionPreCommitCallbacks();
+               $writeTime = $this->pendingWriteQueryDuration( self::ESTIMATE_DB_APPLY );
+               $this->doCommit( $fname );
+               if ( $this->mTrxDoneWrites ) {
+                       $this->mLastWriteTime = microtime( true );
+                       $this->trxProfiler->transactionWritingOut(
+                               $this->mServer, $this->mDBname, $this->mTrxShortId, $writeTime );
+               }
+
+               $this->runOnTransactionIdleCallbacks( self::TRIGGER_COMMIT );
+               $this->runTransactionListenerCallbacks( self::TRIGGER_COMMIT );
+       }
+
+       /**
+        * Issues the COMMIT command to the database server.
+        *
+        * @see Database::commit()
+        * @param string $fname
+        */
+       protected function doCommit( $fname ) {
+               if ( $this->mTrxLevel ) {
+                       $this->query( 'COMMIT', $fname );
+                       $this->mTrxLevel = 0;
+               }
+       }
+
+       final public function rollback( $fname = __METHOD__, $flush = '' ) {
+               if ( $flush === self::FLUSHING_INTERNAL || $flush === self::FLUSHING_ALL_PEERS ) {
+                       if ( !$this->mTrxLevel ) {
+                               return; // nothing to do
+                       }
+               } else {
+                       if ( !$this->mTrxLevel ) {
+                               $this->queryLogger->error(
+                                       "$fname: No transaction to rollback, something got out of sync." );
+                               return; // nothing to do
+                       } elseif ( $this->getFlag( self::DBO_TRX ) ) {
+                               throw new DBUnexpectedError(
+                                       $this,
+                                       "$fname: Expected mass rollback of all peer databases (DBO_TRX set)."
+                               );
+                       }
+               }
+
+               // Avoid fatals if close() was called
+               $this->assertOpen();
+
+               $this->doRollback( $fname );
+               $this->mTrxAtomicLevels = [];
+               if ( $this->mTrxDoneWrites ) {
+                       $this->trxProfiler->transactionWritingOut(
+                               $this->mServer, $this->mDBname, $this->mTrxShortId );
+               }
+
+               $this->mTrxIdleCallbacks = []; // clear
+               $this->mTrxPreCommitCallbacks = []; // clear
+               $this->runOnTransactionIdleCallbacks( self::TRIGGER_ROLLBACK );
+               $this->runTransactionListenerCallbacks( self::TRIGGER_ROLLBACK );
+       }
+
+       /**
+        * Issues the ROLLBACK command to the database server.
+        *
+        * @see Database::rollback()
+        * @param string $fname
+        */
+       protected function doRollback( $fname ) {
+               if ( $this->mTrxLevel ) {
+                       # Disconnects cause rollback anyway, so ignore those errors
+                       $ignoreErrors = true;
+                       $this->query( 'ROLLBACK', $fname, $ignoreErrors );
+                       $this->mTrxLevel = 0;
+               }
+       }
+
+       public function flushSnapshot( $fname = __METHOD__ ) {
+               if ( $this->writesOrCallbacksPending() || $this->explicitTrxActive() ) {
+                       // This only flushes transactions to clear snapshots, not to write data
+                       $fnames = implode( ', ', $this->pendingWriteAndCallbackCallers() );
+                       throw new DBUnexpectedError(
+                               $this,
+                               "$fname: Cannot flush snapshot because writes are pending ($fnames)."
+                       );
+               }
+
+               $this->commit( $fname, self::FLUSHING_INTERNAL );
+       }
+
+       public function explicitTrxActive() {
+               return $this->mTrxLevel && ( $this->mTrxAtomicLevels || !$this->mTrxAutomatic );
+       }
+
+       /**
+        * Creates a new table with structure copied from existing table
+        * Note that unlike most database abstraction functions, this function does not
+        * automatically append database prefix, because it works at a lower
+        * abstraction level.
+        * The table names passed to this function shall not be quoted (this
+        * function calls addIdentifierQuotes when needed).
+        *
+        * @param string $oldName Name of table whose structure should be copied
+        * @param string $newName Name of table to be created
+        * @param bool $temporary Whether the new table should be temporary
+        * @param string $fname Calling function name
+        * @throws RuntimeException
+        * @return bool True if operation was successful
+        */
+       public function duplicateTableStructure( $oldName, $newName, $temporary = false,
+               $fname = __METHOD__
+       ) {
+               throw new RuntimeException( __METHOD__ . ' is not implemented in descendant class' );
+       }
+
+       public function listTables( $prefix = null, $fname = __METHOD__ ) {
+               throw new RuntimeException( __METHOD__ . ' is not implemented in descendant class' );
+       }
+
+       public function listViews( $prefix = null, $fname = __METHOD__ ) {
+               throw new RuntimeException( __METHOD__ . ' is not implemented in descendant class' );
+       }
+
+       public function timestamp( $ts = 0 ) {
+               $t = new ConvertibleTimestamp( $ts );
+               // Let errors bubble up to avoid putting garbage in the DB
+               return $t->getTimestamp( TS_MW );
+       }
+
+       public function timestampOrNull( $ts = null ) {
+               if ( is_null( $ts ) ) {
+                       return null;
+               } else {
+                       return $this->timestamp( $ts );
+               }
+       }
+
+       /**
+        * Take the result from a query, and wrap it in a ResultWrapper if
+        * necessary. Boolean values are passed through as is, to indicate success
+        * of write queries or failure.
+        *
+        * Once upon a time, Database::query() returned a bare MySQL result
+        * resource, and it was necessary to call this function to convert it to
+        * a wrapper. Nowadays, raw database objects are never exposed to external
+        * callers, so this is unnecessary in external code.
+        *
+        * @param bool|ResultWrapper|resource|object $result
+        * @return bool|ResultWrapper
+        */
+       protected function resultObject( $result ) {
+               if ( !$result ) {
+                       return false;
+               } elseif ( $result instanceof ResultWrapper ) {
+                       return $result;
+               } elseif ( $result === true ) {
+                       // Successful write query
+                       return $result;
+               } else {
+                       return new ResultWrapper( $this, $result );
+               }
+       }
+
+       public function ping( &$rtt = null ) {
+               // Avoid hitting the server if it was hit recently
+               if ( $this->isOpen() && ( microtime( true ) - $this->lastPing ) < self::PING_TTL ) {
+                       if ( !func_num_args() || $this->mRTTEstimate > 0 ) {
+                               $rtt = $this->mRTTEstimate;
+                               return true; // don't care about $rtt
+                       }
+               }
+
+               // This will reconnect if possible or return false if not
+               $this->clearFlag( self::DBO_TRX, self::REMEMBER_PRIOR );
+               $ok = ( $this->query( self::PING_QUERY, __METHOD__, true ) !== false );
+               $this->restoreFlags( self::RESTORE_PRIOR );
+
+               if ( $ok ) {
+                       $rtt = $this->mRTTEstimate;
+               }
+
+               return $ok;
+       }
+
+       /**
+        * @return bool
+        */
+       protected function reconnect() {
+               $this->closeConnection();
+               $this->mOpened = false;
+               $this->mConn = false;
+               try {
+                       $this->open( $this->mServer, $this->mUser, $this->mPassword, $this->mDBname );
+                       $this->lastPing = microtime( true );
+                       $ok = true;
+               } catch ( DBConnectionError $e ) {
+                       $ok = false;
+               }
+
+               return $ok;
+       }
+
+       public function getSessionLagStatus() {
+               return $this->getTransactionLagStatus() ?: $this->getApproximateLagStatus();
+       }
+
+       /**
+        * Get the replica DB lag when the current transaction started
+        *
+        * This is useful when transactions might use snapshot isolation
+        * (e.g. REPEATABLE-READ in innodb), so the "real" lag of that data
+        * is this lag plus transaction duration. If they don't, it is still
+        * safe to be pessimistic. This returns null if there is no transaction.
+        *
+        * @return array|null ('lag': seconds or false on error, 'since': UNIX timestamp of BEGIN)
+        * @since 1.27
+        */
+       protected function getTransactionLagStatus() {
+               return $this->mTrxLevel
+                       ? [ 'lag' => $this->mTrxReplicaLag, 'since' => $this->trxTimestamp() ]
+                       : null;
+       }
+
+       /**
+        * Get a replica DB lag estimate for this server
+        *
+        * @return array ('lag': seconds or false on error, 'since': UNIX timestamp of estimate)
+        * @since 1.27
+        */
+       protected function getApproximateLagStatus() {
+               return [
+                       'lag'   => $this->getLBInfo( 'replica' ) ? $this->getLag() : 0,
+                       'since' => microtime( true )
+               ];
+       }
+
+       /**
+        * Merge the result of getSessionLagStatus() for several DBs
+        * using the most pessimistic values to estimate the lag of
+        * any data derived from them in combination
+        *
+        * This is information is useful for caching modules
+        *
+        * @see WANObjectCache::set()
+        * @see WANObjectCache::getWithSetCallback()
+        *
+        * @param IDatabase $db1
+        * @param IDatabase ...
+        * @return array Map of values:
+        *   - lag: highest lag of any of the DBs or false on error (e.g. replication stopped)
+        *   - since: oldest UNIX timestamp of any of the DB lag estimates
+        *   - pending: whether any of the DBs have uncommitted changes
+        * @since 1.27
+        */
+       public static function getCacheSetOptions( IDatabase $db1 ) {
+               $res = [ 'lag' => 0, 'since' => INF, 'pending' => false ];
+               foreach ( func_get_args() as $db ) {
+                       /** @var IDatabase $db */
+                       $status = $db->getSessionLagStatus();
+                       if ( $status['lag'] === false ) {
+                               $res['lag'] = false;
+                       } elseif ( $res['lag'] !== false ) {
+                               $res['lag'] = max( $res['lag'], $status['lag'] );
+                       }
+                       $res['since'] = min( $res['since'], $status['since'] );
+                       $res['pending'] = $res['pending'] ?: $db->writesPending();
+               }
+
+               return $res;
+       }
+
+       public function getLag() {
+               return 0;
+       }
+
+       public function maxListLen() {
+               return 0;
+       }
+
+       public function encodeBlob( $b ) {
+               return $b;
+       }
+
+       public function decodeBlob( $b ) {
+               if ( $b instanceof Blob ) {
+                       $b = $b->fetch();
+               }
+               return $b;
+       }
+
+       public function setSessionOptions( array $options ) {
+       }
+
+       public function sourceFile(
+               $filename,
+               callable $lineCallback = null,
+               callable $resultCallback = null,
+               $fname = false,
+               callable $inputCallback = null
+       ) {
+               MediaWiki\suppressWarnings();
+               $fp = fopen( $filename, 'r' );
+               MediaWiki\restoreWarnings();
+
+               if ( false === $fp ) {
+                       throw new RuntimeException( "Could not open \"{$filename}\".\n" );
+               }
+
+               if ( !$fname ) {
+                       $fname = __METHOD__ . "( $filename )";
+               }
+
+               try {
+                       $error = $this->sourceStream(
+                               $fp, $lineCallback, $resultCallback, $fname, $inputCallback );
+               } catch ( Exception $e ) {
+                       fclose( $fp );
+                       throw $e;
+               }
+
+               fclose( $fp );
+
+               return $error;
+       }
+
+       public function setSchemaVars( $vars ) {
+               $this->mSchemaVars = $vars;
+       }
+
+       public function sourceStream(
+               $fp,
+               callable $lineCallback = null,
+               callable $resultCallback = null,
+               $fname = __METHOD__,
+               callable $inputCallback = null
+       ) {
+               $cmd = '';
+
+               while ( !feof( $fp ) ) {
+                       if ( $lineCallback ) {
+                               call_user_func( $lineCallback );
+                       }
+
+                       $line = trim( fgets( $fp ) );
+
+                       if ( $line == '' ) {
+                               continue;
+                       }
+
+                       if ( '-' == $line[0] && '-' == $line[1] ) {
+                               continue;
+                       }
+
+                       if ( $cmd != '' ) {
+                               $cmd .= ' ';
+                       }
+
+                       $done = $this->streamStatementEnd( $cmd, $line );
+
+                       $cmd .= "$line\n";
+
+                       if ( $done || feof( $fp ) ) {
+                               $cmd = $this->replaceVars( $cmd );
+
+                               if ( !$inputCallback || call_user_func( $inputCallback, $cmd ) ) {
+                                       $res = $this->query( $cmd, $fname );
+
+                                       if ( $resultCallback ) {
+                                               call_user_func( $resultCallback, $res, $this );
+                                       }
+
+                                       if ( false === $res ) {
+                                               $err = $this->lastError();
+
+                                               return "Query \"{$cmd}\" failed with error code \"$err\".\n";
+                                       }
+                               }
+                               $cmd = '';
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Called by sourceStream() to check if we've reached a statement end
+        *
+        * @param string &$sql SQL assembled so far
+        * @param string &$newLine New line about to be added to $sql
+        * @return bool Whether $newLine contains end of the statement
+        */
+       public function streamStatementEnd( &$sql, &$newLine ) {
+               if ( $this->delimiter ) {
+                       $prev = $newLine;
+                       $newLine = preg_replace(
+                               '/' . preg_quote( $this->delimiter, '/' ) . '$/', '', $newLine );
+                       if ( $newLine != $prev ) {
+                               return true;
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Database independent variable replacement. Replaces a set of variables
+        * in an SQL statement with their contents as given by $this->getSchemaVars().
+        *
+        * Supports '{$var}' `{$var}` and / *$var* / (without the spaces) style variables.
+        *
+        * - '{$var}' should be used for text and is passed through the database's
+        *   addQuotes method.
+        * - `{$var}` should be used for identifiers (e.g. table and database names).
+        *   It is passed through the database's addIdentifierQuotes method which
+        *   can be overridden if the database uses something other than backticks.
+        * - / *_* / or / *$wgDBprefix* / passes the name that follows through the
+        *   database's tableName method.
+        * - / *i* / passes the name that follows through the database's indexName method.
+        * - In all other cases, / *$var* / is left unencoded. Except for table options,
+        *   its use should be avoided. In 1.24 and older, string encoding was applied.
+        *
+        * @param string $ins SQL statement to replace variables in
+        * @return string The new SQL statement with variables replaced
+        */
+       protected function replaceVars( $ins ) {
+               $vars = $this->getSchemaVars();
+               return preg_replace_callback(
+                       '!
+                               /\* (\$wgDBprefix|[_i]) \*/ (\w*) | # 1-2. tableName, indexName
+                               \'\{\$ (\w+) }\'                  | # 3. addQuotes
+                               `\{\$ (\w+) }`                    | # 4. addIdentifierQuotes
+                               /\*\$ (\w+) \*/                     # 5. leave unencoded
+                       !x',
+                       function ( $m ) use ( $vars ) {
+                               // Note: Because of <https://bugs.php.net/bug.php?id=51881>,
+                               // check for both nonexistent keys *and* the empty string.
+                               if ( isset( $m[1] ) && $m[1] !== '' ) {
+                                       if ( $m[1] === 'i' ) {
+                                               return $this->indexName( $m[2] );
+                                       } else {
+                                               return $this->tableName( $m[2] );
+                                       }
+                               } elseif ( isset( $m[3] ) && $m[3] !== '' && array_key_exists( $m[3], $vars ) ) {
+                                       return $this->addQuotes( $vars[$m[3]] );
+                               } elseif ( isset( $m[4] ) && $m[4] !== '' && array_key_exists( $m[4], $vars ) ) {
+                                       return $this->addIdentifierQuotes( $vars[$m[4]] );
+                               } elseif ( isset( $m[5] ) && $m[5] !== '' && array_key_exists( $m[5], $vars ) ) {
+                                       return $vars[$m[5]];
+                               } else {
+                                       return $m[0];
+                               }
+                       },
+                       $ins
+               );
+       }
+
+       /**
+        * Get schema variables. If none have been set via setSchemaVars(), then
+        * use some defaults from the current object.
+        *
+        * @return array
+        */
+       protected function getSchemaVars() {
+               if ( $this->mSchemaVars ) {
+                       return $this->mSchemaVars;
+               } else {
+                       return $this->getDefaultSchemaVars();
+               }
+       }
+
+       /**
+        * Get schema variables to use if none have been set via setSchemaVars().
+        *
+        * Override this in derived classes to provide variables for tables.sql
+        * and SQL patch files.
+        *
+        * @return array
+        */
+       protected function getDefaultSchemaVars() {
+               return [];
+       }
+
+       public function lockIsFree( $lockName, $method ) {
+               return true;
+       }
+
+       public function lock( $lockName, $method, $timeout = 5 ) {
+               $this->mNamedLocksHeld[$lockName] = 1;
+
+               return true;
+       }
+
+       public function unlock( $lockName, $method ) {
+               unset( $this->mNamedLocksHeld[$lockName] );
+
+               return true;
+       }
+
+       public function getScopedLockAndFlush( $lockKey, $fname, $timeout ) {
+               if ( $this->writesOrCallbacksPending() ) {
+                       // This only flushes transactions to clear snapshots, not to write data
+                       $fnames = implode( ', ', $this->pendingWriteAndCallbackCallers() );
+                       throw new DBUnexpectedError(
+                               $this,
+                               "$fname: Cannot flush pre-lock snapshot because writes are pending ($fnames)."
+                       );
+               }
+
+               if ( !$this->lock( $lockKey, $fname, $timeout ) ) {
+                       return null;
+               }
+
+               $unlocker = new ScopedCallback( function () use ( $lockKey, $fname ) {
+                       if ( $this->trxLevel() ) {
+                               // There is a good chance an exception was thrown, causing any early return
+                               // from the caller. Let any error handler get a chance to issue rollback().
+                               // If there isn't one, let the error bubble up and trigger server-side rollback.
+                               $this->onTransactionResolution(
+                                       function () use ( $lockKey, $fname ) {
+                                               $this->unlock( $lockKey, $fname );
+                                       },
+                                       $fname
+                               );
+                       } else {
+                               $this->unlock( $lockKey, $fname );
+                       }
+               } );
+
+               $this->commit( $fname, self::FLUSHING_INTERNAL );
+
+               return $unlocker;
+       }
+
+       public function namedLocksEnqueue() {
+               return false;
+       }
+
+       /**
+        * Lock specific tables
+        *
+        * @param array $read Array of tables to lock for read access
+        * @param array $write Array of tables to lock for write access
+        * @param string $method Name of caller
+        * @param bool $lowPriority Whether to indicate writes to be LOW PRIORITY
+        * @return bool
+        */
+       public function lockTables( $read, $write, $method, $lowPriority = true ) {
+               return true;
+       }
+
+       /**
+        * Unlock specific tables
+        *
+        * @param string $method The caller
+        * @return bool
+        */
+       public function unlockTables( $method ) {
+               return true;
+       }
+
+       /**
+        * Delete a table
+        * @param string $tableName
+        * @param string $fName
+        * @return bool|ResultWrapper
+        * @since 1.18
+        */
+       public function dropTable( $tableName, $fName = __METHOD__ ) {
+               if ( !$this->tableExists( $tableName, $fName ) ) {
+                       return false;
+               }
+               $sql = "DROP TABLE " . $this->tableName( $tableName ) . " CASCADE";
+
+               return $this->query( $sql, $fName );
+       }
+
+       public function getInfinity() {
+               return 'infinity';
+       }
+
+       public function encodeExpiry( $expiry ) {
+               return ( $expiry == '' || $expiry == 'infinity' || $expiry == $this->getInfinity() )
+                       ? $this->getInfinity()
+                       : $this->timestamp( $expiry );
+       }
+
+       public function decodeExpiry( $expiry, $format = TS_MW ) {
+               if ( $expiry == '' || $expiry == 'infinity' || $expiry == $this->getInfinity() ) {
+                       return 'infinity';
+               }
+
+               return ConvertibleTimestamp::convert( $format, $expiry );
+       }
+
+       public function setBigSelects( $value = true ) {
+               // no-op
+       }
+
+       public function isReadOnly() {
+               return ( $this->getReadOnlyReason() !== false );
+       }
+
+       /**
+        * @return string|bool Reason this DB is read-only or false if it is not
+        */
+       protected function getReadOnlyReason() {
+               $reason = $this->getLBInfo( 'readOnlyReason' );
+
+               return is_string( $reason ) ? $reason : false;
+       }
+
+       public function setTableAliases( array $aliases ) {
+               $this->tableAliases = $aliases;
+       }
+
+       /**
+        * @return bool Whether a DB user is required to access the DB
+        * @since 1.28
+        */
+       protected function requiresDatabaseUser() {
+               return true;
+       }
+
+       /**
+        * Get the underlying binding handle, mConn
+        *
+        * Makes sure that mConn is set (disconnects and ping() failure can unset it).
+        * This catches broken callers than catch and ignore disconnection exceptions.
+        * Unlike checking isOpen(), this is safe to call inside of open().
+        *
+        * @return resource|object
+        * @throws DBUnexpectedError
+        * @since 1.26
+        */
+       protected function getBindingHandle() {
+               if ( !$this->mConn ) {
+                       throw new DBUnexpectedError(
+                               $this,
+                               'DB connection was already closed or the connection dropped.'
+                       );
+               }
+
+               return $this->mConn;
+       }
+
+       /**
+        * @since 1.19
+        * @return string
+        */
+       public function __toString() {
+               return (string)$this->mConn;
+       }
+
+       /**
+        * Make sure that copies do not share the same client binding handle
+        * @throws DBConnectionError
+        */
+       public function __clone() {
+               $this->connLogger->warning(
+                       "Cloning " . get_class( $this ) . " is not recomended; forking connection:\n" .
+                       ( new RuntimeException() )->getTraceAsString()
+               );
+
+               if ( $this->isOpen() ) {
+                       // Open a new connection resource without messing with the old one
+                       $this->mOpened = false;
+                       $this->mConn = false;
+                       $this->mTrxEndCallbacks = []; // don't copy
+                       $this->handleSessionLoss(); // no trx or locks anymore
+                       $this->open( $this->mServer, $this->mUser, $this->mPassword, $this->mDBname );
+                       $this->lastPing = microtime( true );
+               }
+       }
+
+       /**
+        * Called by serialize. Throw an exception when DB connection is serialized.
+        * This causes problems on some database engines because the connection is
+        * not restored on unserialize.
+        */
+       public function __sleep() {
+               throw new RuntimeException( 'Database serialization may cause problems, since ' .
+                       'the connection is not restored on wakeup.' );
+       }
+
+       /**
+        * Run a few simple sanity checks and close dangling connections
+        */
+       public function __destruct() {
+               if ( $this->mTrxLevel && $this->mTrxDoneWrites ) {
+                       trigger_error( "Uncommitted DB writes (transaction from {$this->mTrxFname})." );
+               }
+
+               $danglingWriters = $this->pendingWriteAndCallbackCallers();
+               if ( $danglingWriters ) {
+                       $fnames = implode( ', ', $danglingWriters );
+                       trigger_error( "DB transaction writes or callbacks still pending ($fnames)." );
+               }
+
+               if ( $this->mConn ) {
+                       // Avoid connection leaks for sanity. Normally, resources close at script completion.
+                       // The connection might already be closed in zend/hhvm by now, so suppress warnings.
+                       \MediaWiki\suppressWarnings();
+                       $this->closeConnection();
+                       \MediaWiki\restoreWarnings();
+                       $this->mConn = false;
+                       $this->mOpened = false;
+               }
+       }
+}
+
+class_alias( 'Database', 'DatabaseBase' );
diff --git a/includes/libs/rdbms/database/DatabaseDomain.php b/includes/libs/rdbms/database/DatabaseDomain.php
new file mode 100644 (file)
index 0000000..a3ae6f1
--- /dev/null
@@ -0,0 +1,206 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * Class to handle database/prefix specification for IDatabase domains
+ */
+class DatabaseDomain {
+       /** @var string|null */
+       private $database;
+       /** @var string|null */
+       private $schema;
+       /** @var string */
+       private $prefix;
+
+       /** @var string Cache of convertToString() */
+       private $equivalentString;
+
+       /**
+        * @param string|null $database Database name
+        * @param string|null $schema Schema name
+        * @param string $prefix Table prefix
+        */
+       public function __construct( $database, $schema, $prefix ) {
+               if ( $database !== null && ( !is_string( $database ) || !strlen( $database ) ) ) {
+                       throw new InvalidArgumentException( "Database must be null or a non-empty string." );
+               }
+               $this->database = $database;
+               if ( $schema !== null && ( !is_string( $schema ) || !strlen( $schema ) ) ) {
+                       throw new InvalidArgumentException( "Schema must be null or a non-empty string." );
+               }
+               $this->schema = $schema;
+               if ( !is_string( $prefix ) ) {
+                       throw new InvalidArgumentException( "Prefix must be a string." );
+               }
+               $this->prefix = $prefix;
+       }
+
+       /**
+        * @param DatabaseDomain|string $domain Result of DatabaseDomain::toString()
+        * @return DatabaseDomain
+        */
+       public static function newFromId( $domain ) {
+               if ( $domain instanceof self ) {
+                       return $domain;
+               }
+
+               $parts = array_map( [ __CLASS__, 'decode' ], explode( '-', $domain ) );
+
+               $schema = null;
+               $prefix = '';
+
+               if ( count( $parts ) == 1 ) {
+                       $database = $parts[0];
+               } elseif ( count( $parts ) == 2 ) {
+                       list( $database, $prefix ) = $parts;
+               } elseif ( count( $parts ) == 3 ) {
+                       list( $database, $schema, $prefix ) = $parts;
+               } else {
+                       throw new InvalidArgumentException( "Domain has too few or too many parts." );
+               }
+
+               if ( $database === '' ) {
+                       $database = null;
+               }
+
+               return new self( $database, $schema, $prefix );
+       }
+
+       /**
+        * @return DatabaseDomain
+        */
+       public static function newUnspecified() {
+               return new self( null, null, '' );
+       }
+
+       /**
+        * @param DatabaseDomain|string $other
+        * @return bool
+        */
+       public function equals( $other ) {
+               if ( $other instanceof DatabaseDomain ) {
+                       return (
+                               $this->database === $other->database &&
+                               $this->schema === $other->schema &&
+                               $this->prefix === $other->prefix
+                       );
+               }
+
+               return ( $this->getId() === $other );
+       }
+
+       /**
+        * @return string|null Database name
+        */
+       public function getDatabase() {
+               return $this->database;
+       }
+
+       /**
+        * @return string|null Database schema
+        */
+       public function getSchema() {
+               return $this->schema;
+       }
+
+       /**
+        * @return string Table prefix
+        */
+       public function getTablePrefix() {
+               return $this->prefix;
+       }
+
+       /**
+        * @return string
+        */
+       public function getId() {
+               if ( $this->equivalentString === null ) {
+                       $this->equivalentString = $this->convertToString();
+               }
+
+               return $this->equivalentString;
+       }
+
+       /**
+        * @return string
+        */
+       private function convertToString() {
+               $parts = [ $this->database ];
+               if ( $this->schema !== null ) {
+                       $parts[] = $this->schema;
+               }
+               if ( $this->prefix != '' ) {
+                       $parts[] = $this->prefix;
+               }
+
+               return implode( '-', array_map( [ __CLASS__, 'encode' ], $parts ) );
+       }
+
+       private static function encode( $decoded ) {
+               $encoded = '';
+
+               $length = strlen( $decoded );
+               for ( $i = 0; $i < $length; ++$i ) {
+                       $char = $decoded[$i];
+                       if ( $char === '-' ) {
+                               $encoded .= '?h';
+                       } elseif ( $char === '?' ) {
+                               $encoded .= '??';
+                       } else {
+                               $encoded .= $char;
+                       }
+               }
+
+               return $encoded;
+       }
+
+       private static function decode( $encoded ) {
+               $decoded = '';
+
+               $length = strlen( $encoded );
+               for ( $i = 0; $i < $length; ++$i ) {
+                       $char = $encoded[$i];
+                       if ( $char === '?' ) {
+                               $nextChar = isset( $encoded[$i + 1] ) ? $encoded[$i + 1] : null;
+                               if ( $nextChar === 'h' ) {
+                                       $decoded .= '-';
+                                       ++$i;
+                               } elseif ( $nextChar === '?' ) {
+                                       $decoded .= '?';
+                                       ++$i;
+                               } else {
+                                       $decoded .= $char;
+                               }
+                       } else {
+                               $decoded .= $char;
+                       }
+               }
+
+               return $decoded;
+       }
+
+       /**
+        * @return string
+        */
+       function __toString() {
+               return $this->getId();
+       }
+}
diff --git a/includes/libs/rdbms/database/DatabaseMysql.php b/includes/libs/rdbms/database/DatabaseMysql.php
new file mode 100644 (file)
index 0000000..9ab7c64
--- /dev/null
@@ -0,0 +1,204 @@
+<?php
+/**
+ * This is the MySQL database abstraction layer.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * Database abstraction object for PHP extension mysql.
+ *
+ * @ingroup Database
+ * @see Database
+ */
+class DatabaseMysql extends DatabaseMysqlBase {
+       /**
+        * @param string $sql
+        * @return resource False on error
+        */
+       protected function doQuery( $sql ) {
+               $conn = $this->getBindingHandle();
+
+               if ( $this->bufferResults() ) {
+                       $ret = mysql_query( $sql, $conn );
+               } else {
+                       $ret = mysql_unbuffered_query( $sql, $conn );
+               }
+
+               return $ret;
+       }
+
+       /**
+        * @param string $realServer
+        * @return bool|resource MySQL Database connection or false on failure to connect
+        * @throws DBConnectionError
+        */
+       protected function mysqlConnect( $realServer ) {
+               # Avoid a suppressed fatal error, which is very hard to track down
+               if ( !extension_loaded( 'mysql' ) ) {
+                       throw new DBConnectionError(
+                               $this,
+                               "MySQL functions missing, have you compiled PHP with the --with-mysql option?\n"
+                       );
+               }
+
+               $connFlags = 0;
+               if ( $this->mFlags & self::DBO_SSL ) {
+                       $connFlags |= MYSQL_CLIENT_SSL;
+               }
+               if ( $this->mFlags & self::DBO_COMPRESS ) {
+                       $connFlags |= MYSQL_CLIENT_COMPRESS;
+               }
+
+               if ( ini_get( 'mysql.connect_timeout' ) <= 3 ) {
+                       $numAttempts = 2;
+               } else {
+                       $numAttempts = 1;
+               }
+
+               $conn = false;
+
+               # The kernel's default SYN retransmission period is far too slow for us,
+               # so we use a short timeout plus a manual retry. Retrying means that a small
+               # but finite rate of SYN packet loss won't cause user-visible errors.
+               for ( $i = 0; $i < $numAttempts && !$conn; $i++ ) {
+                       if ( $i > 1 ) {
+                               usleep( 1000 );
+                       }
+                       if ( $this->mFlags & self::DBO_PERSISTENT ) {
+                               $conn = mysql_pconnect( $realServer, $this->mUser, $this->mPassword, $connFlags );
+                       } else {
+                               # Create a new connection...
+                               $conn = mysql_connect( $realServer, $this->mUser, $this->mPassword, true, $connFlags );
+                       }
+               }
+
+               return $conn;
+       }
+
+       /**
+        * @param string $charset
+        * @return bool
+        */
+       protected function mysqlSetCharset( $charset ) {
+               $conn = $this->getBindingHandle();
+
+               if ( function_exists( 'mysql_set_charset' ) ) {
+                       return mysql_set_charset( $charset, $conn );
+               } else {
+                       return $this->query( 'SET NAMES ' . $charset, __METHOD__ );
+               }
+       }
+
+       /**
+        * @return bool
+        */
+       protected function closeConnection() {
+               $conn = $this->getBindingHandle();
+
+               return mysql_close( $conn );
+       }
+
+       /**
+        * @return int
+        */
+       function insertId() {
+               $conn = $this->getBindingHandle();
+
+               return mysql_insert_id( $conn );
+       }
+
+       /**
+        * @return int
+        */
+       function lastErrno() {
+               if ( $this->mConn ) {
+                       return mysql_errno( $this->mConn );
+               } else {
+                       return mysql_errno();
+               }
+       }
+
+       /**
+        * @return int
+        */
+       function affectedRows() {
+               $conn = $this->getBindingHandle();
+
+               return mysql_affected_rows( $conn );
+       }
+
+       /**
+        * @param string $db
+        * @return bool
+        */
+       function selectDB( $db ) {
+               $conn = $this->getBindingHandle();
+
+               $this->mDBname = $db;
+
+               return mysql_select_db( $db, $conn );
+       }
+
+       protected function mysqlFreeResult( $res ) {
+               return mysql_free_result( $res );
+       }
+
+       protected function mysqlFetchObject( $res ) {
+               return mysql_fetch_object( $res );
+       }
+
+       protected function mysqlFetchArray( $res ) {
+               return mysql_fetch_array( $res );
+       }
+
+       protected function mysqlNumRows( $res ) {
+               return mysql_num_rows( $res );
+       }
+
+       protected function mysqlNumFields( $res ) {
+               return mysql_num_fields( $res );
+       }
+
+       protected function mysqlFetchField( $res, $n ) {
+               return mysql_fetch_field( $res, $n );
+       }
+
+       protected function mysqlFieldName( $res, $n ) {
+               return mysql_field_name( $res, $n );
+       }
+
+       protected function mysqlFieldType( $res, $n ) {
+               return mysql_field_type( $res, $n );
+       }
+
+       protected function mysqlDataSeek( $res, $row ) {
+               return mysql_data_seek( $res, $row );
+       }
+
+       protected function mysqlError( $conn = null ) {
+               return ( $conn !== null ) ? mysql_error( $conn ) : mysql_error(); // avoid warning
+       }
+
+       protected function mysqlRealEscapeString( $s ) {
+               $conn = $this->getBindingHandle();
+
+               return mysql_real_escape_string( $s, $conn );
+       }
+}
diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php
new file mode 100644 (file)
index 0000000..3b7681e
--- /dev/null
@@ -0,0 +1,1324 @@
+<?php
+/**
+ * This is the MySQL database abstraction layer.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * Database abstraction object for MySQL.
+ * Defines methods independent on used MySQL extension.
+ *
+ * @ingroup Database
+ * @since 1.22
+ * @see Database
+ */
+abstract class DatabaseMysqlBase extends Database {
+       /** @var MysqlMasterPos */
+       protected $lastKnownReplicaPos;
+       /** @var string Method to detect replica DB lag */
+       protected $lagDetectionMethod;
+       /** @var array Method to detect replica DB lag */
+       protected $lagDetectionOptions = [];
+       /** @var bool bool Whether to use GTID methods */
+       protected $useGTIDs = false;
+       /** @var string|null */
+       protected $sslKeyPath;
+       /** @var string|null */
+       protected $sslCertPath;
+       /** @var string|null */
+       protected $sslCAPath;
+       /** @var string[]|null */
+       protected $sslCiphers;
+       /** @var string sql_mode value to send on connection */
+       protected $sqlMode;
+       /** @var bool Use experimental UTF-8 transmission encoding */
+       protected $utf8Mode;
+
+       /** @var string|null */
+       private $serverVersion = null;
+
+       /**
+        * Additional $params include:
+        *   - lagDetectionMethod : set to one of (Seconds_Behind_Master,pt-heartbeat).
+        *       pt-heartbeat assumes the table is at heartbeat.heartbeat
+        *       and uses UTC timestamps in the heartbeat.ts column.
+        *       (https://www.percona.com/doc/percona-toolkit/2.2/pt-heartbeat.html)
+        *   - lagDetectionOptions : if using pt-heartbeat, this can be set to an array map to change
+        *       the default behavior. Normally, the heartbeat row with the server
+        *       ID of this server's master will be used. Set the "conds" field to
+        *       override the query conditions, e.g. ['shard' => 's1'].
+        *   - useGTIDs : use GTID methods like MASTER_GTID_WAIT() when possible.
+        *   - sslKeyPath : path to key file [default: null]
+        *   - sslCertPath : path to certificate file [default: null]
+        *   - sslCAPath : parth to certificate authority PEM files [default: null]
+        *   - sslCiphers : array list of allowable ciphers [default: null]
+        * @param array $params
+        */
+       function __construct( array $params ) {
+               $this->lagDetectionMethod = isset( $params['lagDetectionMethod'] )
+                       ? $params['lagDetectionMethod']
+                       : 'Seconds_Behind_Master';
+               $this->lagDetectionOptions = isset( $params['lagDetectionOptions'] )
+                       ? $params['lagDetectionOptions']
+                       : [];
+               $this->useGTIDs = !empty( $params['useGTIDs' ] );
+               foreach ( [ 'KeyPath', 'CertPath', 'CAPath', 'Ciphers' ] as $name ) {
+                       $var = "ssl{$name}";
+                       if ( isset( $params[$var] ) ) {
+                               $this->$var = $params[$var];
+                       }
+               }
+               $this->sqlMode = isset( $params['sqlMode'] ) ? $params['sqlMode'] : '';
+               $this->utf8Mode = !empty( $params['utf8Mode'] );
+
+               parent::__construct( $params );
+       }
+
+       /**
+        * @return string
+        */
+       function getType() {
+               return 'mysql';
+       }
+
+       /**
+        * @param string $server
+        * @param string $user
+        * @param string $password
+        * @param string $dbName
+        * @throws Exception|DBConnectionError
+        * @return bool
+        */
+       function open( $server, $user, $password, $dbName ) {
+               # Close/unset connection handle
+               $this->close();
+
+               $this->mServer = $server;
+               $this->mUser = $user;
+               $this->mPassword = $password;
+               $this->mDBname = $dbName;
+
+               $this->installErrorHandler();
+               try {
+                       $this->mConn = $this->mysqlConnect( $this->mServer );
+               } catch ( Exception $ex ) {
+                       $this->restoreErrorHandler();
+                       throw $ex;
+               }
+               $error = $this->restoreErrorHandler();
+
+               # Always log connection errors
+               if ( !$this->mConn ) {
+                       if ( !$error ) {
+                               $error = $this->lastError();
+                       }
+                       $this->connLogger->error(
+                               "Error connecting to {db_server}: {error}",
+                               $this->getLogContext( [
+                                       'method' => __METHOD__,
+                                       'error' => $error,
+                               ] )
+                       );
+                       $this->connLogger->debug( "DB connection error\n" .
+                               "Server: $server, User: $user, Password: " .
+                               substr( $password, 0, 3 ) . "..., error: " . $error . "\n" );
+
+                       $this->reportConnectionError( $error );
+               }
+
+               if ( $dbName != '' ) {
+                       MediaWiki\suppressWarnings();
+                       $success = $this->selectDB( $dbName );
+                       MediaWiki\restoreWarnings();
+                       if ( !$success ) {
+                               $this->queryLogger->error(
+                                       "Error selecting database {db_name} on server {db_server}",
+                                       $this->getLogContext( [
+                                               'method' => __METHOD__,
+                                       ] )
+                               );
+                               $this->queryLogger->debug(
+                                       "Error selecting database $dbName on server {$this->mServer}" );
+
+                               $this->reportConnectionError( "Error selecting database $dbName" );
+                       }
+               }
+
+               // Tell the server what we're communicating with
+               if ( !$this->connectInitCharset() ) {
+                       $this->reportConnectionError( "Error setting character set" );
+               }
+
+               // Abstract over any insane MySQL defaults
+               $set = [ 'group_concat_max_len = 262144' ];
+               // Set SQL mode, default is turning them all off, can be overridden or skipped with null
+               if ( is_string( $this->sqlMode ) ) {
+                       $set[] = 'sql_mode = ' . $this->addQuotes( $this->sqlMode );
+               }
+               // Set any custom settings defined by site config
+               // (e.g. https://dev.mysql.com/doc/refman/4.1/en/innodb-parameters.html)
+               foreach ( $this->mSessionVars as $var => $val ) {
+                       // Escape strings but not numbers to avoid MySQL complaining
+                       if ( !is_int( $val ) && !is_float( $val ) ) {
+                               $val = $this->addQuotes( $val );
+                       }
+                       $set[] = $this->addIdentifierQuotes( $var ) . ' = ' . $val;
+               }
+
+               if ( $set ) {
+                       // Use doQuery() to avoid opening implicit transactions (DBO_TRX)
+                       $success = $this->doQuery( 'SET ' . implode( ', ', $set ) );
+                       if ( !$success ) {
+                               $this->queryLogger->error(
+                                       'Error setting MySQL variables on server {db_server} (check $wgSQLMode)',
+                                       $this->getLogContext( [
+                                               'method' => __METHOD__,
+                                       ] )
+                               );
+                               $this->reportConnectionError(
+                                       'Error setting MySQL variables on server {db_server} (check $wgSQLMode)' );
+                       }
+               }
+
+               $this->mOpened = true;
+
+               return true;
+       }
+
+       /**
+        * Set the character set information right after connection
+        * @return bool
+        */
+       protected function connectInitCharset() {
+               if ( $this->utf8Mode ) {
+                       // Tell the server we're communicating with it in UTF-8.
+                       // This may engage various charset conversions.
+                       return $this->mysqlSetCharset( 'utf8' );
+               } else {
+                       return $this->mysqlSetCharset( 'binary' );
+               }
+       }
+
+       /**
+        * Open a connection to a MySQL server
+        *
+        * @param string $realServer
+        * @return mixed Raw connection
+        * @throws DBConnectionError
+        */
+       abstract protected function mysqlConnect( $realServer );
+
+       /**
+        * Set the character set of the MySQL link
+        *
+        * @param string $charset
+        * @return bool
+        */
+       abstract protected function mysqlSetCharset( $charset );
+
+       /**
+        * @param ResultWrapper|resource $res
+        * @throws DBUnexpectedError
+        */
+       function freeResult( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+               MediaWiki\suppressWarnings();
+               $ok = $this->mysqlFreeResult( $res );
+               MediaWiki\restoreWarnings();
+               if ( !$ok ) {
+                       throw new DBUnexpectedError( $this, "Unable to free MySQL result" );
+               }
+       }
+
+       /**
+        * Free result memory
+        *
+        * @param resource $res Raw result
+        * @return bool
+        */
+       abstract protected function mysqlFreeResult( $res );
+
+       /**
+        * @param ResultWrapper|resource $res
+        * @return stdClass|bool
+        * @throws DBUnexpectedError
+        */
+       function fetchObject( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+               MediaWiki\suppressWarnings();
+               $row = $this->mysqlFetchObject( $res );
+               MediaWiki\restoreWarnings();
+
+               $errno = $this->lastErrno();
+               // Unfortunately, mysql_fetch_object does not reset the last errno.
+               // Only check for CR_SERVER_LOST and CR_UNKNOWN_ERROR, as
+               // these are the only errors mysql_fetch_object can cause.
+               // See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
+               if ( $errno == 2000 || $errno == 2013 ) {
+                       throw new DBUnexpectedError(
+                               $this,
+                               'Error in fetchObject(): ' . htmlspecialchars( $this->lastError() )
+                       );
+               }
+
+               return $row;
+       }
+
+       /**
+        * Fetch a result row as an object
+        *
+        * @param resource $res Raw result
+        * @return stdClass
+        */
+       abstract protected function mysqlFetchObject( $res );
+
+       /**
+        * @param ResultWrapper|resource $res
+        * @return array|bool
+        * @throws DBUnexpectedError
+        */
+       function fetchRow( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+               MediaWiki\suppressWarnings();
+               $row = $this->mysqlFetchArray( $res );
+               MediaWiki\restoreWarnings();
+
+               $errno = $this->lastErrno();
+               // Unfortunately, mysql_fetch_array does not reset the last errno.
+               // Only check for CR_SERVER_LOST and CR_UNKNOWN_ERROR, as
+               // these are the only errors mysql_fetch_array can cause.
+               // See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
+               if ( $errno == 2000 || $errno == 2013 ) {
+                       throw new DBUnexpectedError(
+                               $this,
+                               'Error in fetchRow(): ' . htmlspecialchars( $this->lastError() )
+                       );
+               }
+
+               return $row;
+       }
+
+       /**
+        * Fetch a result row as an associative and numeric array
+        *
+        * @param resource $res Raw result
+        * @return array
+        */
+       abstract protected function mysqlFetchArray( $res );
+
+       /**
+        * @throws DBUnexpectedError
+        * @param ResultWrapper|resource $res
+        * @return int
+        */
+       function numRows( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+               MediaWiki\suppressWarnings();
+               $n = $this->mysqlNumRows( $res );
+               MediaWiki\restoreWarnings();
+
+               // Unfortunately, mysql_num_rows does not reset the last errno.
+               // We are not checking for any errors here, since
+               // these are no errors mysql_num_rows can cause.
+               // See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
+               // See https://phabricator.wikimedia.org/T44430
+               return $n;
+       }
+
+       /**
+        * Get number of rows in result
+        *
+        * @param resource $res Raw result
+        * @return int
+        */
+       abstract protected function mysqlNumRows( $res );
+
+       /**
+        * @param ResultWrapper|resource $res
+        * @return int
+        */
+       function numFields( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+
+               return $this->mysqlNumFields( $res );
+       }
+
+       /**
+        * Get number of fields in result
+        *
+        * @param resource $res Raw result
+        * @return int
+        */
+       abstract protected function mysqlNumFields( $res );
+
+       /**
+        * @param ResultWrapper|resource $res
+        * @param int $n
+        * @return string
+        */
+       function fieldName( $res, $n ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+
+               return $this->mysqlFieldName( $res, $n );
+       }
+
+       /**
+        * Get the name of the specified field in a result
+        *
+        * @param ResultWrapper|resource $res
+        * @param int $n
+        * @return string
+        */
+       abstract protected function mysqlFieldName( $res, $n );
+
+       /**
+        * mysql_field_type() wrapper
+        * @param ResultWrapper|resource $res
+        * @param int $n
+        * @return string
+        */
+       public function fieldType( $res, $n ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+
+               return $this->mysqlFieldType( $res, $n );
+       }
+
+       /**
+        * Get the type of the specified field in a result
+        *
+        * @param ResultWrapper|resource $res
+        * @param int $n
+        * @return string
+        */
+       abstract protected function mysqlFieldType( $res, $n );
+
+       /**
+        * @param ResultWrapper|resource $res
+        * @param int $row
+        * @return bool
+        */
+       function dataSeek( $res, $row ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+
+               return $this->mysqlDataSeek( $res, $row );
+       }
+
+       /**
+        * Move internal result pointer
+        *
+        * @param ResultWrapper|resource $res
+        * @param int $row
+        * @return bool
+        */
+       abstract protected function mysqlDataSeek( $res, $row );
+
+       /**
+        * @return string
+        */
+       function lastError() {
+               if ( $this->mConn ) {
+                       # Even if it's non-zero, it can still be invalid
+                       MediaWiki\suppressWarnings();
+                       $error = $this->mysqlError( $this->mConn );
+                       if ( !$error ) {
+                               $error = $this->mysqlError();
+                       }
+                       MediaWiki\restoreWarnings();
+               } else {
+                       $error = $this->mysqlError();
+               }
+               if ( $error ) {
+                       $error .= ' (' . $this->mServer . ')';
+               }
+
+               return $error;
+       }
+
+       /**
+        * Returns the text of the error message from previous MySQL operation
+        *
+        * @param resource $conn Raw connection
+        * @return string
+        */
+       abstract protected function mysqlError( $conn = null );
+
+       /**
+        * @param string $table
+        * @param array $uniqueIndexes
+        * @param array $rows
+        * @param string $fname
+        * @return ResultWrapper
+        */
+       function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
+               return $this->nativeReplace( $table, $rows, $fname );
+       }
+
+       /**
+        * Estimate rows in dataset
+        * Returns estimated count, based on EXPLAIN output
+        * Takes same arguments as Database::select()
+        *
+        * @param string|array $table
+        * @param string|array $vars
+        * @param string|array $conds
+        * @param string $fname
+        * @param string|array $options
+        * @return bool|int
+        */
+       public function estimateRowCount( $table, $vars = '*', $conds = '',
+               $fname = __METHOD__, $options = []
+       ) {
+               $options['EXPLAIN'] = true;
+               $res = $this->select( $table, $vars, $conds, $fname, $options );
+               if ( $res === false ) {
+                       return false;
+               }
+               if ( !$this->numRows( $res ) ) {
+                       return 0;
+               }
+
+               $rows = 1;
+               foreach ( $res as $plan ) {
+                       $rows *= $plan->rows > 0 ? $plan->rows : 1; // avoid resetting to zero
+               }
+
+               return (int)$rows;
+       }
+
+       function tableExists( $table, $fname = __METHOD__ ) {
+               $table = $this->tableName( $table, 'raw' );
+               if ( isset( $this->mSessionTempTables[$table] ) ) {
+                       return true; // already known to exist and won't show in SHOW TABLES anyway
+               }
+
+               $encLike = $this->buildLike( $table );
+
+               return $this->query( "SHOW TABLES $encLike", $fname )->numRows() > 0;
+       }
+
+       /**
+        * @param string $table
+        * @param string $field
+        * @return bool|MySQLField
+        */
+       function fieldInfo( $table, $field ) {
+               $table = $this->tableName( $table );
+               $res = $this->query( "SELECT * FROM $table LIMIT 1", __METHOD__, true );
+               if ( !$res ) {
+                       return false;
+               }
+               $n = $this->mysqlNumFields( $res->result );
+               for ( $i = 0; $i < $n; $i++ ) {
+                       $meta = $this->mysqlFetchField( $res->result, $i );
+                       if ( $field == $meta->name ) {
+                               return new MySQLField( $meta );
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Get column information from a result
+        *
+        * @param resource $res Raw result
+        * @param int $n
+        * @return stdClass
+        */
+       abstract protected function mysqlFetchField( $res, $n );
+
+       /**
+        * Get information about an index into an object
+        * Returns false if the index does not exist
+        *
+        * @param string $table
+        * @param string $index
+        * @param string $fname
+        * @return bool|array|null False or null on failure
+        */
+       function indexInfo( $table, $index, $fname = __METHOD__ ) {
+               # SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not.
+               # SHOW INDEX should work for 3.x and up:
+               # http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html
+               $table = $this->tableName( $table );
+               $index = $this->indexName( $index );
+
+               $sql = 'SHOW INDEX FROM ' . $table;
+               $res = $this->query( $sql, $fname );
+
+               if ( !$res ) {
+                       return null;
+               }
+
+               $result = [];
+
+               foreach ( $res as $row ) {
+                       if ( $row->Key_name == $index ) {
+                               $result[] = $row;
+                       }
+               }
+
+               return empty( $result ) ? false : $result;
+       }
+
+       /**
+        * @param string $s
+        * @return string
+        */
+       function strencode( $s ) {
+               return $this->mysqlRealEscapeString( $s );
+       }
+
+       /**
+        * @param string $s
+        * @return mixed
+        */
+       abstract protected function mysqlRealEscapeString( $s );
+
+       public function addQuotes( $s ) {
+               if ( is_bool( $s ) ) {
+                       // Parent would transform to int, which does not play nice with MySQL type juggling.
+                       // When searching for an int in a string column, the strings are cast to int, which
+                       // means false would match any string not starting with a number.
+                       $s = (string)(int)$s;
+               }
+               return parent::addQuotes( $s );
+       }
+
+       /**
+        * MySQL uses `backticks` for identifier quoting instead of the sql standard "double quotes".
+        *
+        * @param string $s
+        * @return string
+        */
+       public function addIdentifierQuotes( $s ) {
+               // Characters in the range \u0001-\uFFFF are valid in a quoted identifier
+               // Remove NUL bytes and escape backticks by doubling
+               return '`' . str_replace( [ "\0", '`' ], [ '', '``' ], $s ) . '`';
+       }
+
+       /**
+        * @param string $name
+        * @return bool
+        */
+       public function isQuotedIdentifier( $name ) {
+               return strlen( $name ) && $name[0] == '`' && substr( $name, -1, 1 ) == '`';
+       }
+
+       function getLag() {
+               if ( $this->getLagDetectionMethod() === 'pt-heartbeat' ) {
+                       return $this->getLagFromPtHeartbeat();
+               } else {
+                       return $this->getLagFromSlaveStatus();
+               }
+       }
+
+       /**
+        * @return string
+        */
+       protected function getLagDetectionMethod() {
+               return $this->lagDetectionMethod;
+       }
+
+       /**
+        * @return bool|int
+        */
+       protected function getLagFromSlaveStatus() {
+               $res = $this->query( 'SHOW SLAVE STATUS', __METHOD__ );
+               $row = $res ? $res->fetchObject() : false;
+               if ( $row && strval( $row->Seconds_Behind_Master ) !== '' ) {
+                       return intval( $row->Seconds_Behind_Master );
+               }
+
+               return false;
+       }
+
+       /**
+        * @return bool|float
+        */
+       protected function getLagFromPtHeartbeat() {
+               $options = $this->lagDetectionOptions;
+
+               if ( isset( $options['conds'] ) ) {
+                       // Best method for multi-DC setups: use logical channel names
+                       $data = $this->getHeartbeatData( $options['conds'] );
+               } else {
+                       // Standard method: use master server ID (works with stock pt-heartbeat)
+                       $masterInfo = $this->getMasterServerInfo();
+                       if ( !$masterInfo ) {
+                               $this->queryLogger->error(
+                                       "Unable to query master of {db_server} for server ID",
+                                       $this->getLogContext( [
+                                               'method' => __METHOD__
+                                       ] )
+                               );
+
+                               return false; // could not get master server ID
+                       }
+
+                       $conds = [ 'server_id' => intval( $masterInfo['serverId'] ) ];
+                       $data = $this->getHeartbeatData( $conds );
+               }
+
+               list( $time, $nowUnix ) = $data;
+               if ( $time !== null ) {
+                       // @time is in ISO format like "2015-09-25T16:48:10.000510"
+                       $dateTime = new DateTime( $time, new DateTimeZone( 'UTC' ) );
+                       $timeUnix = (int)$dateTime->format( 'U' ) + $dateTime->format( 'u' ) / 1e6;
+
+                       return max( $nowUnix - $timeUnix, 0.0 );
+               }
+
+               $this->queryLogger->error(
+                       "Unable to find pt-heartbeat row for {db_server}",
+                       $this->getLogContext( [
+                               'method' => __METHOD__
+                       ] )
+               );
+
+               return false;
+       }
+
+       protected function getMasterServerInfo() {
+               $cache = $this->srvCache;
+               $key = $cache->makeGlobalKey(
+                       'mysql',
+                       'master-info',
+                       // Using one key for all cluster replica DBs is preferable
+                       $this->getLBInfo( 'clusterMasterHost' ) ?: $this->getServer()
+               );
+
+               return $cache->getWithSetCallback(
+                       $key,
+                       $cache::TTL_INDEFINITE,
+                       function () use ( $cache, $key ) {
+                               // Get and leave a lock key in place for a short period
+                               if ( !$cache->lock( $key, 0, 10 ) ) {
+                                       return false; // avoid master connection spike slams
+                               }
+
+                               $conn = $this->getLazyMasterHandle();
+                               if ( !$conn ) {
+                                       return false; // something is misconfigured
+                               }
+
+                               // Connect to and query the master; catch errors to avoid outages
+                               try {
+                                       $res = $conn->query( 'SELECT @@server_id AS id', __METHOD__ );
+                                       $row = $res ? $res->fetchObject() : false;
+                                       $id = $row ? (int)$row->id : 0;
+                               } catch ( DBError $e ) {
+                                       $id = 0;
+                               }
+
+                               // Cache the ID if it was retrieved
+                               return $id ? [ 'serverId' => $id, 'asOf' => time() ] : false;
+                       }
+               );
+       }
+
+       /**
+        * @param array $conds WHERE clause conditions to find a row
+        * @return array (heartbeat `ts` column value or null, UNIX timestamp) for the newest beat
+        * @see https://www.percona.com/doc/percona-toolkit/2.1/pt-heartbeat.html
+        */
+       protected function getHeartbeatData( array $conds ) {
+               $whereSQL = $this->makeList( $conds, self::LIST_AND );
+               // Use ORDER BY for channel based queries since that field might not be UNIQUE.
+               // Note: this would use "TIMESTAMPDIFF(MICROSECOND,ts,UTC_TIMESTAMP(6))" but the
+               // percision field is not supported in MySQL <= 5.5.
+               $res = $this->query(
+                       "SELECT ts FROM heartbeat.heartbeat WHERE $whereSQL ORDER BY ts DESC LIMIT 1"
+               );
+               $row = $res ? $res->fetchObject() : false;
+
+               return [ $row ? $row->ts : null, microtime( true ) ];
+       }
+
+       public function getApproximateLagStatus() {
+               if ( $this->getLagDetectionMethod() === 'pt-heartbeat' ) {
+                       // Disable caching since this is fast enough and we don't wan't
+                       // to be *too* pessimistic by having both the cache TTL and the
+                       // pt-heartbeat interval count as lag in getSessionLagStatus()
+                       return parent::getApproximateLagStatus();
+               }
+
+               $key = $this->srvCache->makeGlobalKey( 'mysql-lag', $this->getServer() );
+               $approxLag = $this->srvCache->get( $key );
+               if ( !$approxLag ) {
+                       $approxLag = parent::getApproximateLagStatus();
+                       $this->srvCache->set( $key, $approxLag, 1 );
+               }
+
+               return $approxLag;
+       }
+
+       function masterPosWait( DBMasterPos $pos, $timeout ) {
+               if ( !( $pos instanceof MySQLMasterPos ) ) {
+                       throw new InvalidArgumentException( "Position not an instance of MySQLMasterPos" );
+               }
+
+               if ( $this->getLBInfo( 'is static' ) === true ) {
+                       return 0; // this is a copy of a read-only dataset with no master DB
+               } elseif ( $this->lastKnownReplicaPos && $this->lastKnownReplicaPos->hasReached( $pos ) ) {
+                       return 0; // already reached this point for sure
+               }
+
+               // Call doQuery() directly, to avoid opening a transaction if DBO_TRX is set
+               if ( $this->useGTIDs && $pos->gtids ) {
+                       // Wait on the GTID set (MariaDB only)
+                       $gtidArg = $this->addQuotes( implode( ',', $pos->gtids ) );
+                       $res = $this->doQuery( "SELECT MASTER_GTID_WAIT($gtidArg, $timeout)" );
+               } else {
+                       // Wait on the binlog coordinates
+                       $encFile = $this->addQuotes( $pos->file );
+                       $encPos = intval( $pos->pos );
+                       $res = $this->doQuery( "SELECT MASTER_POS_WAIT($encFile, $encPos, $timeout)" );
+               }
+
+               $row = $res ? $this->fetchRow( $res ) : false;
+               if ( !$row ) {
+                       throw new DBExpectedError( $this, "Failed to query MASTER_POS_WAIT()" );
+               }
+
+               // Result can be NULL (error), -1 (timeout), or 0+ per the MySQL manual
+               $status = ( $row[0] !== null ) ? intval( $row[0] ) : null;
+               if ( $status === null ) {
+                       // T126436: jobs programmed to wait on master positions might be referencing binlogs
+                       // with an old master hostname. Such calls make MASTER_POS_WAIT() return null. Try
+                       // to detect this and treat the replica DB as having reached the position; a proper master
+                       // switchover already requires that the new master be caught up before the switch.
+                       $replicationPos = $this->getReplicaPos();
+                       if ( $replicationPos && !$replicationPos->channelsMatch( $pos ) ) {
+                               $this->lastKnownReplicaPos = $replicationPos;
+                               $status = 0;
+                       }
+               } elseif ( $status >= 0 ) {
+                       // Remember that this position was reached to save queries next time
+                       $this->lastKnownReplicaPos = $pos;
+               }
+
+               return $status;
+       }
+
+       /**
+        * Get the position of the master from SHOW SLAVE STATUS
+        *
+        * @return MySQLMasterPos|bool
+        */
+       function getReplicaPos() {
+               $res = $this->query( 'SHOW SLAVE STATUS', __METHOD__ );
+               $row = $this->fetchObject( $res );
+
+               if ( $row ) {
+                       $pos = isset( $row->Exec_master_log_pos )
+                               ? $row->Exec_master_log_pos
+                               : $row->Exec_Master_Log_Pos;
+                       // Also fetch the last-applied GTID set (MariaDB)
+                       if ( $this->useGTIDs ) {
+                               $res = $this->query( "SHOW GLOBAL VARIABLES LIKE 'gtid_slave_pos'", __METHOD__ );
+                               $gtidRow = $this->fetchObject( $res );
+                               $gtidSet = $gtidRow ? $gtidRow->Value : '';
+                       } else {
+                               $gtidSet = '';
+                       }
+
+                       return new MySQLMasterPos( $row->Relay_Master_Log_File, $pos, $gtidSet );
+               } else {
+                       return false;
+               }
+       }
+
+       /**
+        * Get the position of the master from SHOW MASTER STATUS
+        *
+        * @return MySQLMasterPos|bool
+        */
+       function getMasterPos() {
+               $res = $this->query( 'SHOW MASTER STATUS', __METHOD__ );
+               $row = $this->fetchObject( $res );
+
+               if ( $row ) {
+                       // Also fetch the last-written GTID set (MariaDB)
+                       if ( $this->useGTIDs ) {
+                               $res = $this->query( "SHOW GLOBAL VARIABLES LIKE 'gtid_binlog_pos'", __METHOD__ );
+                               $gtidRow = $this->fetchObject( $res );
+                               $gtidSet = $gtidRow ? $gtidRow->Value : '';
+                       } else {
+                               $gtidSet = '';
+                       }
+
+                       return new MySQLMasterPos( $row->File, $row->Position, $gtidSet );
+               } else {
+                       return false;
+               }
+       }
+
+       public function serverIsReadOnly() {
+               $res = $this->query( "SHOW GLOBAL VARIABLES LIKE 'read_only'", __METHOD__ );
+               $row = $this->fetchObject( $res );
+
+               return $row ? ( strtolower( $row->Value ) === 'on' ) : false;
+       }
+
+       /**
+        * @param string $index
+        * @return string
+        */
+       function useIndexClause( $index ) {
+               return "FORCE INDEX (" . $this->indexName( $index ) . ")";
+       }
+
+       /**
+        * @param string $index
+        * @return string
+        */
+       function ignoreIndexClause( $index ) {
+               return "IGNORE INDEX (" . $this->indexName( $index ) . ")";
+       }
+
+       /**
+        * @return string
+        */
+       function lowPriorityOption() {
+               return 'LOW_PRIORITY';
+       }
+
+       /**
+        * @return string
+        */
+       public function getSoftwareLink() {
+               // MariaDB includes its name in its version string; this is how MariaDB's version of
+               // the mysql command-line client identifies MariaDB servers (see mariadb_connection()
+               // in libmysql/libmysql.c).
+               $version = $this->getServerVersion();
+               if ( strpos( $version, 'MariaDB' ) !== false || strpos( $version, '-maria-' ) !== false ) {
+                       return '[{{int:version-db-mariadb-url}} MariaDB]';
+               }
+
+               // Percona Server's version suffix is not very distinctive, and @@version_comment
+               // doesn't give the necessary info for source builds, so assume the server is MySQL.
+               // (Even Percona's version of mysql doesn't try to make the distinction.)
+               return '[{{int:version-db-mysql-url}} MySQL]';
+       }
+
+       /**
+        * @return string
+        */
+       public function getServerVersion() {
+               // Not using mysql_get_server_info() or similar for consistency: in the handshake,
+               // MariaDB 10 adds the prefix "5.5.5-", and only some newer client libraries strip
+               // it off (see RPL_VERSION_HACK in include/mysql_com.h).
+               if ( $this->serverVersion === null ) {
+                       $this->serverVersion = $this->selectField( '', 'VERSION()', '', __METHOD__ );
+               }
+               return $this->serverVersion;
+       }
+
+       /**
+        * @param array $options
+        */
+       public function setSessionOptions( array $options ) {
+               if ( isset( $options['connTimeout'] ) ) {
+                       $timeout = (int)$options['connTimeout'];
+                       $this->query( "SET net_read_timeout=$timeout" );
+                       $this->query( "SET net_write_timeout=$timeout" );
+               }
+       }
+
+       /**
+        * @param string $sql
+        * @param string $newLine
+        * @return bool
+        */
+       public function streamStatementEnd( &$sql, &$newLine ) {
+               if ( strtoupper( substr( $newLine, 0, 9 ) ) == 'DELIMITER' ) {
+                       preg_match( '/^DELIMITER\s+(\S+)/', $newLine, $m );
+                       $this->delimiter = $m[1];
+                       $newLine = '';
+               }
+
+               return parent::streamStatementEnd( $sql, $newLine );
+       }
+
+       /**
+        * Check to see if a named lock is available. This is non-blocking.
+        *
+        * @param string $lockName Name of lock to poll
+        * @param string $method Name of method calling us
+        * @return bool
+        * @since 1.20
+        */
+       public function lockIsFree( $lockName, $method ) {
+               $encName = $this->addQuotes( $this->makeLockName( $lockName ) );
+               $result = $this->query( "SELECT IS_FREE_LOCK($encName) AS lockstatus", $method );
+               $row = $this->fetchObject( $result );
+
+               return ( $row->lockstatus == 1 );
+       }
+
+       /**
+        * @param string $lockName
+        * @param string $method
+        * @param int $timeout
+        * @return bool
+        */
+       public function lock( $lockName, $method, $timeout = 5 ) {
+               $encName = $this->addQuotes( $this->makeLockName( $lockName ) );
+               $result = $this->query( "SELECT GET_LOCK($encName, $timeout) AS lockstatus", $method );
+               $row = $this->fetchObject( $result );
+
+               if ( $row->lockstatus == 1 ) {
+                       parent::lock( $lockName, $method, $timeout ); // record
+                       return true;
+               }
+
+               $this->queryLogger->warning( __METHOD__ . " failed to acquire lock '$lockName'\n" );
+
+               return false;
+       }
+
+       /**
+        * FROM MYSQL DOCS:
+        * http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_release-lock
+        * @param string $lockName
+        * @param string $method
+        * @return bool
+        */
+       public function unlock( $lockName, $method ) {
+               $encName = $this->addQuotes( $this->makeLockName( $lockName ) );
+               $result = $this->query( "SELECT RELEASE_LOCK($encName) as lockstatus", $method );
+               $row = $this->fetchObject( $result );
+
+               if ( $row->lockstatus == 1 ) {
+                       parent::unlock( $lockName, $method ); // record
+                       return true;
+               }
+
+               $this->queryLogger->warning( __METHOD__ . " failed to release lock '$lockName'\n" );
+
+               return false;
+       }
+
+       private function makeLockName( $lockName ) {
+               // http://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock
+               // Newer version enforce a 64 char length limit.
+               return ( strlen( $lockName ) > 64 ) ? sha1( $lockName ) : $lockName;
+       }
+
+       public function namedLocksEnqueue() {
+               return true;
+       }
+
+       /**
+        * @param array $read
+        * @param array $write
+        * @param string $method
+        * @param bool $lowPriority
+        * @return bool
+        */
+       public function lockTables( $read, $write, $method, $lowPriority = true ) {
+               $items = [];
+
+               foreach ( $write as $table ) {
+                       $tbl = $this->tableName( $table ) .
+                               ( $lowPriority ? ' LOW_PRIORITY' : '' ) .
+                               ' WRITE';
+                       $items[] = $tbl;
+               }
+               foreach ( $read as $table ) {
+                       $items[] = $this->tableName( $table ) . ' READ';
+               }
+               $sql = "LOCK TABLES " . implode( ',', $items );
+               $this->query( $sql, $method );
+
+               return true;
+       }
+
+       /**
+        * @param string $method
+        * @return bool
+        */
+       public function unlockTables( $method ) {
+               $this->query( "UNLOCK TABLES", $method );
+
+               return true;
+       }
+
+       /**
+        * @param bool $value
+        */
+       public function setBigSelects( $value = true ) {
+               if ( $value === 'default' ) {
+                       if ( $this->mDefaultBigSelects === null ) {
+                               # Function hasn't been called before so it must already be set to the default
+                               return;
+                       } else {
+                               $value = $this->mDefaultBigSelects;
+                       }
+               } elseif ( $this->mDefaultBigSelects === null ) {
+                       $this->mDefaultBigSelects =
+                               (bool)$this->selectField( false, '@@sql_big_selects', '', __METHOD__ );
+               }
+               $encValue = $value ? '1' : '0';
+               $this->query( "SET sql_big_selects=$encValue", __METHOD__ );
+       }
+
+       /**
+        * DELETE where the condition is a join. MySql uses multi-table deletes.
+        * @param string $delTable
+        * @param string $joinTable
+        * @param string $delVar
+        * @param string $joinVar
+        * @param array|string $conds
+        * @param bool|string $fname
+        * @throws DBUnexpectedError
+        * @return bool|ResultWrapper
+        */
+       function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = __METHOD__ ) {
+               if ( !$conds ) {
+                       throw new DBUnexpectedError( $this, __METHOD__ . ' called with empty $conds' );
+               }
+
+               $delTable = $this->tableName( $delTable );
+               $joinTable = $this->tableName( $joinTable );
+               $sql = "DELETE $delTable FROM $delTable, $joinTable WHERE $delVar=$joinVar ";
+
+               if ( $conds != '*' ) {
+                       $sql .= ' AND ' . $this->makeList( $conds, self::LIST_AND );
+               }
+
+               return $this->query( $sql, $fname );
+       }
+
+       /**
+        * @param string $table
+        * @param array $rows
+        * @param array $uniqueIndexes
+        * @param array $set
+        * @param string $fname
+        * @return bool
+        */
+       public function upsert( $table, array $rows, array $uniqueIndexes,
+               array $set, $fname = __METHOD__
+       ) {
+               if ( !count( $rows ) ) {
+                       return true; // nothing to do
+               }
+
+               if ( !is_array( reset( $rows ) ) ) {
+                       $rows = [ $rows ];
+               }
+
+               $table = $this->tableName( $table );
+               $columns = array_keys( $rows[0] );
+
+               $sql = "INSERT INTO $table (" . implode( ',', $columns ) . ') VALUES ';
+               $rowTuples = [];
+               foreach ( $rows as $row ) {
+                       $rowTuples[] = '(' . $this->makeList( $row ) . ')';
+               }
+               $sql .= implode( ',', $rowTuples );
+               $sql .= " ON DUPLICATE KEY UPDATE " . $this->makeList( $set, self::LIST_SET );
+
+               return (bool)$this->query( $sql, $fname );
+       }
+
+       /**
+        * Determines how long the server has been up
+        *
+        * @return int
+        */
+       function getServerUptime() {
+               $vars = $this->getMysqlStatus( 'Uptime' );
+
+               return (int)$vars['Uptime'];
+       }
+
+       /**
+        * Determines if the last failure was due to a deadlock
+        *
+        * @return bool
+        */
+       function wasDeadlock() {
+               return $this->lastErrno() == 1213;
+       }
+
+       /**
+        * Determines if the last failure was due to a lock timeout
+        *
+        * @return bool
+        */
+       function wasLockTimeout() {
+               return $this->lastErrno() == 1205;
+       }
+
+       function wasErrorReissuable() {
+               return $this->lastErrno() == 2013 || $this->lastErrno() == 2006;
+       }
+
+       /**
+        * Determines if the last failure was due to the database being read-only.
+        *
+        * @return bool
+        */
+       function wasReadOnlyError() {
+               return $this->lastErrno() == 1223 ||
+                       ( $this->lastErrno() == 1290 && strpos( $this->lastError(), '--read-only' ) !== false );
+       }
+
+       function wasConnectionError( $errno ) {
+               return $errno == 2013 || $errno == 2006;
+       }
+
+       /**
+        * @param string $oldName
+        * @param string $newName
+        * @param bool $temporary
+        * @param string $fname
+        * @return bool
+        */
+       function duplicateTableStructure( $oldName, $newName, $temporary = false, $fname = __METHOD__ ) {
+               $tmp = $temporary ? 'TEMPORARY ' : '';
+               $newName = $this->addIdentifierQuotes( $newName );
+               $oldName = $this->addIdentifierQuotes( $oldName );
+               $query = "CREATE $tmp TABLE $newName (LIKE $oldName)";
+
+               return $this->query( $query, $fname );
+       }
+
+       /**
+        * List all tables on the database
+        *
+        * @param string $prefix Only show tables with this prefix, e.g. mw_
+        * @param string $fname Calling function name
+        * @return array
+        */
+       function listTables( $prefix = null, $fname = __METHOD__ ) {
+               $result = $this->query( "SHOW TABLES", $fname );
+
+               $endArray = [];
+
+               foreach ( $result as $table ) {
+                       $vars = get_object_vars( $table );
+                       $table = array_pop( $vars );
+
+                       if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
+                               $endArray[] = $table;
+                       }
+               }
+
+               return $endArray;
+       }
+
+       /**
+        * @param string $tableName
+        * @param string $fName
+        * @return bool|ResultWrapper
+        */
+       public function dropTable( $tableName, $fName = __METHOD__ ) {
+               if ( !$this->tableExists( $tableName, $fName ) ) {
+                       return false;
+               }
+
+               return $this->query( "DROP TABLE IF EXISTS " . $this->tableName( $tableName ), $fName );
+       }
+
+       /**
+        * Get status information from SHOW STATUS in an associative array
+        *
+        * @param string $which
+        * @return array
+        */
+       function getMysqlStatus( $which = "%" ) {
+               $res = $this->query( "SHOW STATUS LIKE '{$which}'" );
+               $status = [];
+
+               foreach ( $res as $row ) {
+                       $status[$row->Variable_name] = $row->Value;
+               }
+
+               return $status;
+       }
+
+       /**
+        * Lists VIEWs in the database
+        *
+        * @param string $prefix Only show VIEWs with this prefix, eg.
+        * unit_test_, or $wgDBprefix. Default: null, would return all views.
+        * @param string $fname Name of calling function
+        * @return array
+        * @since 1.22
+        */
+       public function listViews( $prefix = null, $fname = __METHOD__ ) {
+               // The name of the column containing the name of the VIEW
+               $propertyName = 'Tables_in_' . $this->mDBname;
+
+               // Query for the VIEWS
+               $res = $this->query( 'SHOW FULL TABLES WHERE TABLE_TYPE = "VIEW"' );
+               $allViews = [];
+               foreach ( $res as $row ) {
+                       array_push( $allViews, $row->$propertyName );
+               }
+
+               if ( is_null( $prefix ) || $prefix === '' ) {
+                       return $allViews;
+               }
+
+               $filteredViews = [];
+               foreach ( $allViews as $viewName ) {
+                       // Does the name of this VIEW start with the table-prefix?
+                       if ( strpos( $viewName, $prefix ) === 0 ) {
+                               array_push( $filteredViews, $viewName );
+                       }
+               }
+
+               return $filteredViews;
+       }
+
+       /**
+        * Differentiates between a TABLE and a VIEW.
+        *
+        * @param string $name Name of the TABLE/VIEW to test
+        * @param string $prefix
+        * @return bool
+        * @since 1.22
+        */
+       public function isView( $name, $prefix = null ) {
+               return in_array( $name, $this->listViews( $prefix ) );
+       }
+}
+
diff --git a/includes/libs/rdbms/database/DatabaseMysqli.php b/includes/libs/rdbms/database/DatabaseMysqli.php
new file mode 100644 (file)
index 0000000..2f27ff9
--- /dev/null
@@ -0,0 +1,331 @@
+<?php
+/**
+ * This is the MySQLi database abstraction layer.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * Database abstraction object for PHP extension mysqli.
+ *
+ * @ingroup Database
+ * @since 1.22
+ * @see Database
+ */
+class DatabaseMysqli extends DatabaseMysqlBase {
+       /** @var $mConn mysqli */
+
+       /**
+        * @param string $sql
+        * @return resource
+        */
+       protected function doQuery( $sql ) {
+               $conn = $this->getBindingHandle();
+
+               if ( $this->bufferResults() ) {
+                       $ret = $conn->query( $sql );
+               } else {
+                       $ret = $conn->query( $sql, MYSQLI_USE_RESULT );
+               }
+
+               return $ret;
+       }
+
+       /**
+        * @param string $realServer
+        * @return bool|mysqli
+        * @throws DBConnectionError
+        */
+       protected function mysqlConnect( $realServer ) {
+               # Avoid suppressed fatal error, which is very hard to track down
+               if ( !function_exists( 'mysqli_init' ) ) {
+                       throw new DBConnectionError( $this, "MySQLi functions missing,"
+                               . " have you compiled PHP with the --with-mysqli option?\n" );
+               }
+
+               // Other than mysql_connect, mysqli_real_connect expects an explicit port
+               // and socket parameters. So we need to parse the port and socket out of
+               // $realServer
+               $port = null;
+               $socket = null;
+               $hostAndPort = IP::splitHostAndPort( $realServer );
+               if ( $hostAndPort ) {
+                       $realServer = $hostAndPort[0];
+                       if ( $hostAndPort[1] ) {
+                               $port = $hostAndPort[1];
+                       }
+               } elseif ( substr_count( $realServer, ':' ) == 1 ) {
+                       // If we have a colon and something that's not a port number
+                       // inside the hostname, assume it's the socket location
+                       $hostAndSocket = explode( ':', $realServer );
+                       $realServer = $hostAndSocket[0];
+                       $socket = $hostAndSocket[1];
+               }
+
+               $mysqli = mysqli_init();
+
+               $connFlags = 0;
+               if ( $this->mFlags & self::DBO_SSL ) {
+                       $connFlags |= MYSQLI_CLIENT_SSL;
+                       $mysqli->ssl_set(
+                               $this->sslKeyPath,
+                               $this->sslCertPath,
+                               null,
+                               $this->sslCAPath,
+                               $this->sslCiphers
+                       );
+               }
+               if ( $this->mFlags & self::DBO_COMPRESS ) {
+                       $connFlags |= MYSQLI_CLIENT_COMPRESS;
+               }
+               if ( $this->mFlags & self::DBO_PERSISTENT ) {
+                       $realServer = 'p:' . $realServer;
+               }
+
+               if ( $this->utf8Mode ) {
+                       // Tell the server we're communicating with it in UTF-8.
+                       // This may engage various charset conversions.
+                       $mysqli->options( MYSQLI_SET_CHARSET_NAME, 'utf8' );
+               } else {
+                       $mysqli->options( MYSQLI_SET_CHARSET_NAME, 'binary' );
+               }
+               $mysqli->options( MYSQLI_OPT_CONNECT_TIMEOUT, 3 );
+
+               if ( $mysqli->real_connect( $realServer, $this->mUser,
+                       $this->mPassword, $this->mDBname, $port, $socket, $connFlags )
+               ) {
+                       return $mysqli;
+               }
+
+               return false;
+       }
+
+       protected function connectInitCharset() {
+               // already done in mysqlConnect()
+               return true;
+       }
+
+       /**
+        * @param string $charset
+        * @return bool
+        */
+       protected function mysqlSetCharset( $charset ) {
+               $conn = $this->getBindingHandle();
+
+               if ( method_exists( $conn, 'set_charset' ) ) {
+                       return $conn->set_charset( $charset );
+               } else {
+                       return $this->query( 'SET NAMES ' . $charset, __METHOD__ );
+               }
+       }
+
+       /**
+        * @return bool
+        */
+       protected function closeConnection() {
+               $conn = $this->getBindingHandle();
+
+               return $conn->close();
+       }
+
+       /**
+        * @return int
+        */
+       function insertId() {
+               $conn = $this->getBindingHandle();
+
+               return (int)$conn->insert_id;
+       }
+
+       /**
+        * @return int
+        */
+       function lastErrno() {
+               if ( $this->mConn ) {
+                       return $this->mConn->errno;
+               } else {
+                       return mysqli_connect_errno();
+               }
+       }
+
+       /**
+        * @return int
+        */
+       function affectedRows() {
+               $conn = $this->getBindingHandle();
+
+               return $conn->affected_rows;
+       }
+
+       /**
+        * @param string $db
+        * @return bool
+        */
+       function selectDB( $db ) {
+               $conn = $this->getBindingHandle();
+
+               $this->mDBname = $db;
+
+               return $conn->select_db( $db );
+       }
+
+       /**
+        * @param mysqli $res
+        * @return bool
+        */
+       protected function mysqlFreeResult( $res ) {
+               $res->free_result();
+
+               return true;
+       }
+
+       /**
+        * @param mysqli $res
+        * @return bool
+        */
+       protected function mysqlFetchObject( $res ) {
+               $object = $res->fetch_object();
+               if ( $object === null ) {
+                       return false;
+               }
+
+               return $object;
+       }
+
+       /**
+        * @param mysqli $res
+        * @return bool
+        */
+       protected function mysqlFetchArray( $res ) {
+               $array = $res->fetch_array();
+               if ( $array === null ) {
+                       return false;
+               }
+
+               return $array;
+       }
+
+       /**
+        * @param mysqli $res
+        * @return mixed
+        */
+       protected function mysqlNumRows( $res ) {
+               return $res->num_rows;
+       }
+
+       /**
+        * @param mysqli $res
+        * @return mixed
+        */
+       protected function mysqlNumFields( $res ) {
+               return $res->field_count;
+       }
+
+       /**
+        * @param mysqli $res
+        * @param int $n
+        * @return mixed
+        */
+       protected function mysqlFetchField( $res, $n ) {
+               $field = $res->fetch_field_direct( $n );
+
+               // Add missing properties to result (using flags property)
+               // which will be part of function mysql-fetch-field for backward compatibility
+               $field->not_null = $field->flags & MYSQLI_NOT_NULL_FLAG;
+               $field->primary_key = $field->flags & MYSQLI_PRI_KEY_FLAG;
+               $field->unique_key = $field->flags & MYSQLI_UNIQUE_KEY_FLAG;
+               $field->multiple_key = $field->flags & MYSQLI_MULTIPLE_KEY_FLAG;
+               $field->binary = $field->flags & MYSQLI_BINARY_FLAG;
+               $field->numeric = $field->flags & MYSQLI_NUM_FLAG;
+               $field->blob = $field->flags & MYSQLI_BLOB_FLAG;
+               $field->unsigned = $field->flags & MYSQLI_UNSIGNED_FLAG;
+               $field->zerofill = $field->flags & MYSQLI_ZEROFILL_FLAG;
+
+               return $field;
+       }
+
+       /**
+        * @param resource|ResultWrapper $res
+        * @param int $n
+        * @return mixed
+        */
+       protected function mysqlFieldName( $res, $n ) {
+               $field = $res->fetch_field_direct( $n );
+
+               return $field->name;
+       }
+
+       /**
+        * @param resource|ResultWrapper $res
+        * @param int $n
+        * @return mixed
+        */
+       protected function mysqlFieldType( $res, $n ) {
+               $field = $res->fetch_field_direct( $n );
+
+               return $field->type;
+       }
+
+       /**
+        * @param resource|ResultWrapper $res
+        * @param int $row
+        * @return mixed
+        */
+       protected function mysqlDataSeek( $res, $row ) {
+               return $res->data_seek( $row );
+       }
+
+       /**
+        * @param mysqli $conn Optional connection object
+        * @return string
+        */
+       protected function mysqlError( $conn = null ) {
+               if ( $conn === null ) {
+                       return mysqli_connect_error();
+               } else {
+                       return $conn->error;
+               }
+       }
+
+       /**
+        * Escapes special characters in a string for use in an SQL statement
+        * @param string $s
+        * @return string
+        */
+       protected function mysqlRealEscapeString( $s ) {
+               $conn = $this->getBindingHandle();
+
+               return $conn->real_escape_string( $s );
+       }
+
+       /**
+        * Give an id for the connection
+        *
+        * mysql driver used resource id, but mysqli objects cannot be cast to string.
+        * @return string
+        */
+       public function __toString() {
+               if ( $this->mConn instanceof mysqli ) {
+                       return (string)$this->mConn->thread_id;
+               } else {
+                       // mConn might be false or something.
+                       return (string)$this->mConn;
+               }
+       }
+}
diff --git a/includes/libs/rdbms/database/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php
new file mode 100644 (file)
index 0000000..b72557a
--- /dev/null
@@ -0,0 +1,1448 @@
+<?php
+/**
+ * This is the Postgres database abstraction layer.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+use Wikimedia\WaitConditionLoop;
+
+/**
+ * @ingroup Database
+ */
+class DatabasePostgres extends Database {
+       /** @var int|bool */
+       protected $port;
+
+       /** @var resource */
+       protected $mLastResult = null;
+       /** @var int The number of rows affected as an integer */
+       protected $mAffectedRows = null;
+
+       /** @var int */
+       private $mInsertId = null;
+       /** @var float|string */
+       private $numericVersion = null;
+       /** @var string Connect string to open a PostgreSQL connection */
+       private $connectString;
+       /** @var string */
+       private $mCoreSchema;
+
+       public function __construct( array $params ) {
+               $this->port = isset( $params['port'] ) ? $params['port'] : false;
+               parent::__construct( $params );
+       }
+
+       function getType() {
+               return 'postgres';
+       }
+
+       function implicitGroupby() {
+               return false;
+       }
+
+       function implicitOrderby() {
+               return false;
+       }
+
+       function hasConstraint( $name ) {
+               $conn = $this->getBindingHandle();
+
+               $sql = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n " .
+                       "WHERE c.connamespace = n.oid AND conname = '" .
+                       pg_escape_string( $conn, $name ) . "' AND n.nspname = '" .
+                       pg_escape_string( $conn, $this->getCoreSchema() ) . "'";
+               $res = $this->doQuery( $sql );
+
+               return $this->numRows( $res );
+       }
+
+       /**
+        * Usually aborts on failure
+        * @param string $server
+        * @param string $user
+        * @param string $password
+        * @param string $dbName
+        * @throws DBConnectionError|Exception
+        * @return resource|bool|null
+        */
+       function open( $server, $user, $password, $dbName ) {
+               # Test for Postgres support, to avoid suppressed fatal error
+               if ( !function_exists( 'pg_connect' ) ) {
+                       throw new DBConnectionError(
+                               $this,
+                               "Postgres functions missing, have you compiled PHP with the --with-pgsql\n" .
+                               "option? (Note: if you recently installed PHP, you may need to restart your\n" .
+                               "webserver and database)\n"
+                       );
+               }
+
+               $this->mServer = $server;
+               $this->mUser = $user;
+               $this->mPassword = $password;
+               $this->mDBname = $dbName;
+
+               $connectVars = [
+                       'dbname' => $dbName,
+                       'user' => $user,
+                       'password' => $password
+               ];
+               if ( $server != false && $server != '' ) {
+                       $connectVars['host'] = $server;
+               }
+               if ( (int)$this->port > 0 ) {
+                       $connectVars['port'] = (int)$this->port;
+               }
+               if ( $this->mFlags & self::DBO_SSL ) {
+                       $connectVars['sslmode'] = 1;
+               }
+
+               $this->connectString = $this->makeConnectionString( $connectVars );
+               $this->close();
+               $this->installErrorHandler();
+
+               try {
+                       // Use new connections to let LoadBalancer/LBFactory handle reuse
+                       $this->mConn = pg_connect( $this->connectString, PGSQL_CONNECT_FORCE_NEW );
+               } catch ( Exception $ex ) {
+                       $this->restoreErrorHandler();
+                       throw $ex;
+               }
+
+               $phpError = $this->restoreErrorHandler();
+
+               if ( !$this->mConn ) {
+                       $this->queryLogger->debug(
+                               "DB connection error\n" .
+                               "Server: $server, Database: $dbName, User: $user, Password: " .
+                               substr( $password, 0, 3 ) . "...\n"
+                       );
+                       $this->queryLogger->debug( $this->lastError() . "\n" );
+                       throw new DBConnectionError( $this, str_replace( "\n", ' ', $phpError ) );
+               }
+
+               $this->mOpened = true;
+
+               # If called from the command-line (e.g. importDump), only show errors
+               if ( $this->cliMode ) {
+                       $this->doQuery( "SET client_min_messages = 'ERROR'" );
+               }
+
+               $this->query( "SET client_encoding='UTF8'", __METHOD__ );
+               $this->query( "SET datestyle = 'ISO, YMD'", __METHOD__ );
+               $this->query( "SET timezone = 'GMT'", __METHOD__ );
+               $this->query( "SET standard_conforming_strings = on", __METHOD__ );
+               if ( $this->getServerVersion() >= 9.0 ) {
+                       $this->query( "SET bytea_output = 'escape'", __METHOD__ ); // PHP bug 53127
+               }
+
+               $this->determineCoreSchema( $this->mSchema );
+
+               return $this->mConn;
+       }
+
+       /**
+        * Postgres doesn't support selectDB in the same way MySQL does. So if the
+        * DB name doesn't match the open connection, open a new one
+        * @param string $db
+        * @return bool
+        */
+       function selectDB( $db ) {
+               if ( $this->mDBname !== $db ) {
+                       return (bool)$this->open( $this->mServer, $this->mUser, $this->mPassword, $db );
+               } else {
+                       return true;
+               }
+       }
+
+       function makeConnectionString( $vars ) {
+               $s = '';
+               foreach ( $vars as $name => $value ) {
+                       $s .= "$name='" . str_replace( "'", "\\'", $value ) . "' ";
+               }
+
+               return $s;
+       }
+
+       /**
+        * Closes a database connection, if it is open
+        * Returns success, true if already closed
+        * @return bool
+        */
+       protected function closeConnection() {
+               return $this->mConn ? pg_close( $this->mConn ) : true;
+       }
+
+       public function doQuery( $sql ) {
+               $conn = $this->getBindingHandle();
+
+               $sql = mb_convert_encoding( $sql, 'UTF-8' );
+               // Clear previously left over PQresult
+               while ( $res = pg_get_result( $conn ) ) {
+                       pg_free_result( $res );
+               }
+               if ( pg_send_query( $conn, $sql ) === false ) {
+                       throw new DBUnexpectedError( $this, "Unable to post new query to PostgreSQL\n" );
+               }
+               $this->mLastResult = pg_get_result( $conn );
+               $this->mAffectedRows = null;
+               if ( pg_result_error( $this->mLastResult ) ) {
+                       return false;
+               }
+
+               return $this->mLastResult;
+       }
+
+       protected function dumpError() {
+               $diags = [
+                       PGSQL_DIAG_SEVERITY,
+                       PGSQL_DIAG_SQLSTATE,
+                       PGSQL_DIAG_MESSAGE_PRIMARY,
+                       PGSQL_DIAG_MESSAGE_DETAIL,
+                       PGSQL_DIAG_MESSAGE_HINT,
+                       PGSQL_DIAG_STATEMENT_POSITION,
+                       PGSQL_DIAG_INTERNAL_POSITION,
+                       PGSQL_DIAG_INTERNAL_QUERY,
+                       PGSQL_DIAG_CONTEXT,
+                       PGSQL_DIAG_SOURCE_FILE,
+                       PGSQL_DIAG_SOURCE_LINE,
+                       PGSQL_DIAG_SOURCE_FUNCTION
+               ];
+               foreach ( $diags as $d ) {
+                       $this->queryLogger->debug( sprintf( "PgSQL ERROR(%d): %s\n",
+                               $d, pg_result_error_field( $this->mLastResult, $d ) ) );
+               }
+       }
+
+       function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
+               if ( $tempIgnore ) {
+                       /* Check for constraint violation */
+                       if ( $errno === '23505' ) {
+                               parent::reportQueryError( $error, $errno, $sql, $fname, $tempIgnore );
+
+                               return;
+                       }
+               }
+               /* Transaction stays in the ERROR state until rolled back */
+               if ( $this->mTrxLevel ) {
+                       $ignore = $this->ignoreErrors( true );
+                       $this->rollback( __METHOD__ );
+                       $this->ignoreErrors( $ignore );
+               }
+               parent::reportQueryError( $error, $errno, $sql, $fname, false );
+       }
+
+       function queryIgnore( $sql, $fname = __METHOD__ ) {
+               return $this->query( $sql, $fname, true );
+       }
+
+       /**
+        * @param stdClass|ResultWrapper $res
+        * @throws DBUnexpectedError
+        */
+       function freeResult( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+               MediaWiki\suppressWarnings();
+               $ok = pg_free_result( $res );
+               MediaWiki\restoreWarnings();
+               if ( !$ok ) {
+                       throw new DBUnexpectedError( $this, "Unable to free Postgres result\n" );
+               }
+       }
+
+       /**
+        * @param ResultWrapper|stdClass $res
+        * @return stdClass
+        * @throws DBUnexpectedError
+        */
+       function fetchObject( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+               MediaWiki\suppressWarnings();
+               $row = pg_fetch_object( $res );
+               MediaWiki\restoreWarnings();
+               # @todo FIXME: HACK HACK HACK HACK debug
+
+               # @todo hashar: not sure if the following test really trigger if the object
+               #          fetching failed.
+               $conn = $this->getBindingHandle();
+               if ( pg_last_error( $conn ) ) {
+                       throw new DBUnexpectedError(
+                               $this,
+                               'SQL error: ' . htmlspecialchars( pg_last_error( $conn ) )
+                       );
+               }
+
+               return $row;
+       }
+
+       function fetchRow( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+               MediaWiki\suppressWarnings();
+               $row = pg_fetch_array( $res );
+               MediaWiki\restoreWarnings();
+
+               $conn = $this->getBindingHandle();
+               if ( pg_last_error( $conn ) ) {
+                       throw new DBUnexpectedError(
+                               $this,
+                               'SQL error: ' . htmlspecialchars( pg_last_error( $conn ) )
+                       );
+               }
+
+               return $row;
+       }
+
+       function numRows( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+               MediaWiki\suppressWarnings();
+               $n = pg_num_rows( $res );
+               MediaWiki\restoreWarnings();
+
+               $conn = $this->getBindingHandle();
+               if ( pg_last_error( $conn ) ) {
+                       throw new DBUnexpectedError(
+                               $this,
+                               'SQL error: ' . htmlspecialchars( pg_last_error( $conn ) )
+                       );
+               }
+
+               return $n;
+       }
+
+       function numFields( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+
+               return pg_num_fields( $res );
+       }
+
+       function fieldName( $res, $n ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+
+               return pg_field_name( $res, $n );
+       }
+
+       /**
+        * Return the result of the last call to nextSequenceValue();
+        * This must be called after nextSequenceValue().
+        *
+        * @return int|null
+        */
+       function insertId() {
+               return $this->mInsertId;
+       }
+
+       /**
+        * @param mixed $res
+        * @param int $row
+        * @return bool
+        */
+       function dataSeek( $res, $row ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+
+               return pg_result_seek( $res, $row );
+       }
+
+       function lastError() {
+               if ( $this->mConn ) {
+                       if ( $this->mLastResult ) {
+                               return pg_result_error( $this->mLastResult );
+                       } else {
+                               return pg_last_error();
+                       }
+               }
+
+               return $this->getLastPHPError() ?: 'No database connection';
+       }
+
+       function lastErrno() {
+               if ( $this->mLastResult ) {
+                       return pg_result_error_field( $this->mLastResult, PGSQL_DIAG_SQLSTATE );
+               } else {
+                       return false;
+               }
+       }
+
+       function affectedRows() {
+               if ( !is_null( $this->mAffectedRows ) ) {
+                       // Forced result for simulated queries
+                       return $this->mAffectedRows;
+               }
+               if ( empty( $this->mLastResult ) ) {
+                       return 0;
+               }
+
+               return pg_affected_rows( $this->mLastResult );
+       }
+
+       /**
+        * Estimate rows in dataset
+        * Returns estimated count, based on EXPLAIN output
+        * This is not necessarily an accurate estimate, so use sparingly
+        * Returns -1 if count cannot be found
+        * Takes same arguments as Database::select()
+        *
+        * @param string $table
+        * @param string $vars
+        * @param string $conds
+        * @param string $fname
+        * @param array $options
+        * @return int
+        */
+       function estimateRowCount( $table, $vars = '*', $conds = '',
+               $fname = __METHOD__, $options = []
+       ) {
+               $options['EXPLAIN'] = true;
+               $res = $this->select( $table, $vars, $conds, $fname, $options );
+               $rows = -1;
+               if ( $res ) {
+                       $row = $this->fetchRow( $res );
+                       $count = [];
+                       if ( preg_match( '/rows=(\d+)/', $row[0], $count ) ) {
+                               $rows = (int)$count[1];
+                       }
+               }
+
+               return $rows;
+       }
+
+       /**
+        * Returns information about an index
+        * If errors are explicitly ignored, returns NULL on failure
+        *
+        * @param string $table
+        * @param string $index
+        * @param string $fname
+        * @return bool|null
+        */
+       function indexInfo( $table, $index, $fname = __METHOD__ ) {
+               $sql = "SELECT indexname FROM pg_indexes WHERE tablename='$table'";
+               $res = $this->query( $sql, $fname );
+               if ( !$res ) {
+                       return null;
+               }
+               foreach ( $res as $row ) {
+                       if ( $row->indexname == $this->indexName( $index ) ) {
+                               return $row;
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Returns is of attributes used in index
+        *
+        * @since 1.19
+        * @param string $index
+        * @param bool|string $schema
+        * @return array
+        */
+       function indexAttributes( $index, $schema = false ) {
+               if ( $schema === false ) {
+                       $schema = $this->getCoreSchema();
+               }
+               /*
+                * A subquery would be not needed if we didn't care about the order
+                * of attributes, but we do
+                */
+               $sql = <<<__INDEXATTR__
+
+                       SELECT opcname,
+                               attname,
+                               i.indoption[s.g] as option,
+                               pg_am.amname
+                       FROM
+                               (SELECT generate_series(array_lower(isub.indkey,1), array_upper(isub.indkey,1)) AS g
+                                       FROM
+                                               pg_index isub
+                                       JOIN pg_class cis
+                                               ON cis.oid=isub.indexrelid
+                                       JOIN pg_namespace ns
+                                               ON cis.relnamespace = ns.oid
+                                       WHERE cis.relname='$index' AND ns.nspname='$schema') AS s,
+                               pg_attribute,
+                               pg_opclass opcls,
+                               pg_am,
+                               pg_class ci
+                               JOIN pg_index i
+                                       ON ci.oid=i.indexrelid
+                               JOIN pg_class ct
+                                       ON ct.oid = i.indrelid
+                               JOIN pg_namespace n
+                                       ON ci.relnamespace = n.oid
+                               WHERE
+                                       ci.relname='$index' AND n.nspname='$schema'
+                                       AND     attrelid = ct.oid
+                                       AND     i.indkey[s.g] = attnum
+                                       AND     i.indclass[s.g] = opcls.oid
+                                       AND     pg_am.oid = opcls.opcmethod
+__INDEXATTR__;
+               $res = $this->query( $sql, __METHOD__ );
+               $a = [];
+               if ( $res ) {
+                       foreach ( $res as $row ) {
+                               $a[] = [
+                                       $row->attname,
+                                       $row->opcname,
+                                       $row->amname,
+                                       $row->option ];
+                       }
+               } else {
+                       return null;
+               }
+
+               return $a;
+       }
+
+       function indexUnique( $table, $index, $fname = __METHOD__ ) {
+               $sql = "SELECT indexname FROM pg_indexes WHERE tablename='{$table}'" .
+                       " AND indexdef LIKE 'CREATE UNIQUE%(" .
+                       $this->strencode( $this->indexName( $index ) ) .
+                       ")'";
+               $res = $this->query( $sql, $fname );
+               if ( !$res ) {
+                       return null;
+               }
+
+               return $res->numRows() > 0;
+       }
+
+       function selectSQLText(
+               $table, $vars, $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
+       ) {
+               // Change the FOR UPDATE option as necessary based on the join conditions. Then pass
+               // to the parent function to get the actual SQL text.
+               // In Postgres when using FOR UPDATE, only the main table and tables that are inner joined
+               // can be locked. That means tables in an outer join cannot be FOR UPDATE locked. Trying to
+               // do so causes a DB error. This wrapper checks which tables can be locked and adjusts it
+               // accordingly.
+               // MySQL uses "ORDER BY NULL" as an optimization hint, but that is illegal in PostgreSQL.
+               if ( is_array( $options ) ) {
+                       $forUpdateKey = array_search( 'FOR UPDATE', $options, true );
+                       if ( $forUpdateKey !== false && $join_conds ) {
+                               unset( $options[$forUpdateKey] );
+
+                               foreach ( $join_conds as $table_cond => $join_cond ) {
+                                       if ( 0 === preg_match( '/^(?:LEFT|RIGHT|FULL)(?: OUTER)? JOIN$/i', $join_cond[0] ) ) {
+                                               $options['FOR UPDATE'][] = $table_cond;
+                                       }
+                               }
+                       }
+
+                       if ( isset( $options['ORDER BY'] ) && $options['ORDER BY'] == 'NULL' ) {
+                               unset( $options['ORDER BY'] );
+                       }
+               }
+
+               return parent::selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds );
+       }
+
+       /**
+        * INSERT wrapper, inserts an array into a table
+        *
+        * $args may be a single associative array, or an array of these with numeric keys,
+        * for multi-row insert (Postgres version 8.2 and above only).
+        *
+        * @param string $table Name of the table to insert to.
+        * @param array $args Items to insert into the table.
+        * @param string $fname Name of the function, for profiling
+        * @param array|string $options String or array. Valid options: IGNORE
+        * @return bool Success of insert operation. IGNORE always returns true.
+        */
+       function insert( $table, $args, $fname = __METHOD__, $options = [] ) {
+               if ( !count( $args ) ) {
+                       return true;
+               }
+
+               $table = $this->tableName( $table );
+               if ( !isset( $this->numericVersion ) ) {
+                       $this->getServerVersion();
+               }
+
+               if ( !is_array( $options ) ) {
+                       $options = [ $options ];
+               }
+
+               if ( isset( $args[0] ) && is_array( $args[0] ) ) {
+                       $multi = true;
+                       $keys = array_keys( $args[0] );
+               } else {
+                       $multi = false;
+                       $keys = array_keys( $args );
+               }
+
+               // If IGNORE is set, we use savepoints to emulate mysql's behavior
+               $savepoint = $olde = null;
+               $numrowsinserted = 0;
+               if ( in_array( 'IGNORE', $options ) ) {
+                       $savepoint = new SavepointPostgres( $this, 'mw', $this->queryLogger );
+                       $olde = error_reporting( 0 );
+                       // For future use, we may want to track the number of actual inserts
+                       // Right now, insert (all writes) simply return true/false
+               }
+
+               $sql = "INSERT INTO $table (" . implode( ',', $keys ) . ') VALUES ';
+
+               if ( $multi ) {
+                       if ( $this->numericVersion >= 8.2 && !$savepoint ) {
+                               $first = true;
+                               foreach ( $args as $row ) {
+                                       if ( $first ) {
+                                               $first = false;
+                                       } else {
+                                               $sql .= ',';
+                                       }
+                                       $sql .= '(' . $this->makeList( $row ) . ')';
+                               }
+                               $res = (bool)$this->query( $sql, $fname, $savepoint );
+                       } else {
+                               $res = true;
+                               $origsql = $sql;
+                               foreach ( $args as $row ) {
+                                       $tempsql = $origsql;
+                                       $tempsql .= '(' . $this->makeList( $row ) . ')';
+
+                                       if ( $savepoint ) {
+                                               $savepoint->savepoint();
+                                       }
+
+                                       $tempres = (bool)$this->query( $tempsql, $fname, $savepoint );
+
+                                       if ( $savepoint ) {
+                                               $bar = pg_result_error( $this->mLastResult );
+                                               if ( $bar != false ) {
+                                                       $savepoint->rollback();
+                                               } else {
+                                                       $savepoint->release();
+                                                       $numrowsinserted++;
+                                               }
+                                       }
+
+                                       // If any of them fail, we fail overall for this function call
+                                       // Note that this will be ignored if IGNORE is set
+                                       if ( !$tempres ) {
+                                               $res = false;
+                                       }
+                               }
+                       }
+               } else {
+                       // Not multi, just a lone insert
+                       if ( $savepoint ) {
+                               $savepoint->savepoint();
+                       }
+
+                       $sql .= '(' . $this->makeList( $args ) . ')';
+                       $res = (bool)$this->query( $sql, $fname, $savepoint );
+                       if ( $savepoint ) {
+                               $bar = pg_result_error( $this->mLastResult );
+                               if ( $bar != false ) {
+                                       $savepoint->rollback();
+                               } else {
+                                       $savepoint->release();
+                                       $numrowsinserted++;
+                               }
+                       }
+               }
+               if ( $savepoint ) {
+                       error_reporting( $olde );
+                       $savepoint->commit();
+
+                       // Set the affected row count for the whole operation
+                       $this->mAffectedRows = $numrowsinserted;
+
+                       // IGNORE always returns true
+                       return true;
+               }
+
+               return $res;
+       }
+
+       /**
+        * INSERT SELECT wrapper
+        * $varMap must be an associative array of the form [ 'dest1' => 'source1', ... ]
+        * Source items may be literals rather then field names, but strings should
+        * be quoted with Database::addQuotes()
+        * $conds may be "*" to copy the whole table
+        * srcTable may be an array of tables.
+        * @todo FIXME: Implement this a little better (seperate select/insert)?
+        *
+        * @param string $destTable
+        * @param array|string $srcTable
+        * @param array $varMap
+        * @param array $conds
+        * @param string $fname
+        * @param array $insertOptions
+        * @param array $selectOptions
+        * @return bool
+        */
+       function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds, $fname = __METHOD__,
+               $insertOptions = [], $selectOptions = [] ) {
+               $destTable = $this->tableName( $destTable );
+
+               if ( !is_array( $insertOptions ) ) {
+                       $insertOptions = [ $insertOptions ];
+               }
+
+               /*
+                * If IGNORE is set, we use savepoints to emulate mysql's behavior
+                * Ignore LOW PRIORITY option, since it is MySQL-specific
+                */
+               $savepoint = $olde = null;
+               $numrowsinserted = 0;
+               if ( in_array( 'IGNORE', $insertOptions ) ) {
+                       $savepoint = new SavepointPostgres( $this, 'mw', $this->queryLogger );
+                       $olde = error_reporting( 0 );
+                       $savepoint->savepoint();
+               }
+
+               if ( !is_array( $selectOptions ) ) {
+                       $selectOptions = [ $selectOptions ];
+               }
+               list( $startOpts, $useIndex, $tailOpts, $ignoreIndex ) =
+                       $this->makeSelectOptions( $selectOptions );
+               if ( is_array( $srcTable ) ) {
+                       $srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
+               } else {
+                       $srcTable = $this->tableName( $srcTable );
+               }
+
+               $sql = "INSERT INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ')' .
+                       " SELECT $startOpts " . implode( ',', $varMap ) .
+                       " FROM $srcTable $useIndex $ignoreIndex ";
+
+               if ( $conds != '*' ) {
+                       $sql .= ' WHERE ' . $this->makeList( $conds, LIST_AND );
+               }
+
+               $sql .= " $tailOpts";
+
+               $res = (bool)$this->query( $sql, $fname, $savepoint );
+               if ( $savepoint ) {
+                       $bar = pg_result_error( $this->mLastResult );
+                       if ( $bar != false ) {
+                               $savepoint->rollback();
+                       } else {
+                               $savepoint->release();
+                               $numrowsinserted++;
+                       }
+                       error_reporting( $olde );
+                       $savepoint->commit();
+
+                       // Set the affected row count for the whole operation
+                       $this->mAffectedRows = $numrowsinserted;
+
+                       // IGNORE always returns true
+                       return true;
+               }
+
+               return $res;
+       }
+
+       function tableName( $name, $format = 'quoted' ) {
+               # Replace reserved words with better ones
+               switch ( $name ) {
+                       case 'user':
+                               return $this->realTableName( 'mwuser', $format );
+                       case 'text':
+                               return $this->realTableName( 'pagecontent', $format );
+                       default:
+                               return $this->realTableName( $name, $format );
+               }
+       }
+
+       /* Don't cheat on installer */
+       function realTableName( $name, $format = 'quoted' ) {
+               return parent::tableName( $name, $format );
+       }
+
+       /**
+        * Return the next in a sequence, save the value for retrieval via insertId()
+        *
+        * @param string $seqName
+        * @return int|null
+        */
+       function nextSequenceValue( $seqName ) {
+               $safeseq = str_replace( "'", "''", $seqName );
+               $res = $this->query( "SELECT nextval('$safeseq')" );
+               $row = $this->fetchRow( $res );
+               $this->mInsertId = $row[0];
+
+               return $this->mInsertId;
+       }
+
+       /**
+        * Return the current value of a sequence. Assumes it has been nextval'ed in this session.
+        *
+        * @param string $seqName
+        * @return int
+        */
+       function currentSequenceValue( $seqName ) {
+               $safeseq = str_replace( "'", "''", $seqName );
+               $res = $this->query( "SELECT currval('$safeseq')" );
+               $row = $this->fetchRow( $res );
+               $currval = $row[0];
+
+               return $currval;
+       }
+
+       # Returns the size of a text field, or -1 for "unlimited"
+       function textFieldSize( $table, $field ) {
+               $table = $this->tableName( $table );
+               $sql = "SELECT t.typname as ftype,a.atttypmod as size
+                       FROM pg_class c, pg_attribute a, pg_type t
+                       WHERE relname='$table' AND a.attrelid=c.oid AND
+                               a.atttypid=t.oid and a.attname='$field'";
+               $res = $this->query( $sql );
+               $row = $this->fetchObject( $res );
+               if ( $row->ftype == 'varchar' ) {
+                       $size = $row->size - 4;
+               } else {
+                       $size = $row->size;
+               }
+
+               return $size;
+       }
+
+       function limitResult( $sql, $limit, $offset = false ) {
+               return "$sql LIMIT $limit " . ( is_numeric( $offset ) ? " OFFSET {$offset} " : '' );
+       }
+
+       function wasDeadlock() {
+               return $this->lastErrno() == '40P01';
+       }
+
+       function duplicateTableStructure(
+               $oldName, $newName, $temporary = false, $fname = __METHOD__
+       ) {
+               $newName = $this->addIdentifierQuotes( $newName );
+               $oldName = $this->addIdentifierQuotes( $oldName );
+
+               return $this->query( 'CREATE ' . ( $temporary ? 'TEMPORARY ' : '' ) . " TABLE $newName " .
+                       "(LIKE $oldName INCLUDING DEFAULTS)", $fname );
+       }
+
+       function listTables( $prefix = null, $fname = __METHOD__ ) {
+               $eschema = $this->addQuotes( $this->getCoreSchema() );
+               $result = $this->query(
+                       "SELECT tablename FROM pg_tables WHERE schemaname = $eschema", $fname );
+               $endArray = [];
+
+               foreach ( $result as $table ) {
+                       $vars = get_object_vars( $table );
+                       $table = array_pop( $vars );
+                       if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
+                               $endArray[] = $table;
+                       }
+               }
+
+               return $endArray;
+       }
+
+       function timestamp( $ts = 0 ) {
+               $ct = new ConvertibleTimestamp( $ts );
+
+               return $ct->getTimestamp( TS_POSTGRES );
+       }
+
+       /**
+        * Posted by cc[plus]php[at]c2se[dot]com on 25-Mar-2009 09:12
+        * to http://www.php.net/manual/en/ref.pgsql.php
+        *
+        * Parsing a postgres array can be a tricky problem, he's my
+        * take on this, it handles multi-dimensional arrays plus
+        * escaping using a nasty regexp to determine the limits of each
+        * data-item.
+        *
+        * This should really be handled by PHP PostgreSQL module
+        *
+        * @since 1.19
+        * @param string $text Postgreql array returned in a text form like {a,b}
+        * @param string $output
+        * @param int|bool $limit
+        * @param int $offset
+        * @return string
+        */
+       function pg_array_parse( $text, &$output, $limit = false, $offset = 1 ) {
+               if ( false === $limit ) {
+                       $limit = strlen( $text ) - 1;
+                       $output = [];
+               }
+               if ( '{}' == $text ) {
+                       return $output;
+               }
+               do {
+                       if ( '{' != $text[$offset] ) {
+                               preg_match( "/(\\{?\"([^\"\\\\]|\\\\.)*\"|[^,{}]+)+([,}]+)/",
+                                       $text, $match, 0, $offset );
+                               $offset += strlen( $match[0] );
+                               $output[] = ( '"' != $match[1][0]
+                                       ? $match[1]
+                                       : stripcslashes( substr( $match[1], 1, -1 ) ) );
+                               if ( '},' == $match[3] ) {
+                                       return $output;
+                               }
+                       } else {
+                               $offset = $this->pg_array_parse( $text, $output, $limit, $offset + 1 );
+                       }
+               } while ( $limit > $offset );
+
+               return $output;
+       }
+
+       /**
+        * Return aggregated value function call
+        * @param array $valuedata
+        * @param string $valuename
+        * @return array
+        */
+       public function aggregateValue( $valuedata, $valuename = 'value' ) {
+               return $valuedata;
+       }
+
+       /**
+        * @return string Wikitext of a link to the server software's web site
+        */
+       public function getSoftwareLink() {
+               return '[{{int:version-db-postgres-url}} PostgreSQL]';
+       }
+
+       /**
+        * Return current schema (executes SELECT current_schema())
+        * Needs transaction
+        *
+        * @since 1.19
+        * @return string Default schema for the current session
+        */
+       function getCurrentSchema() {
+               $res = $this->query( "SELECT current_schema()", __METHOD__ );
+               $row = $this->fetchRow( $res );
+
+               return $row[0];
+       }
+
+       /**
+        * Return list of schemas which are accessible without schema name
+        * This is list does not contain magic keywords like "$user"
+        * Needs transaction
+        *
+        * @see getSearchPath()
+        * @see setSearchPath()
+        * @since 1.19
+        * @return array List of actual schemas for the current sesson
+        */
+       function getSchemas() {
+               $res = $this->query( "SELECT current_schemas(false)", __METHOD__ );
+               $row = $this->fetchRow( $res );
+               $schemas = [];
+
+               /* PHP pgsql support does not support array type, "{a,b}" string is returned */
+
+               return $this->pg_array_parse( $row[0], $schemas );
+       }
+
+       /**
+        * Return search patch for schemas
+        * This is different from getSchemas() since it contain magic keywords
+        * (like "$user").
+        * Needs transaction
+        *
+        * @since 1.19
+        * @return array How to search for table names schemas for the current user
+        */
+       function getSearchPath() {
+               $res = $this->query( "SHOW search_path", __METHOD__ );
+               $row = $this->fetchRow( $res );
+
+               /* PostgreSQL returns SHOW values as strings */
+
+               return explode( ",", $row[0] );
+       }
+
+       /**
+        * Update search_path, values should already be sanitized
+        * Values may contain magic keywords like "$user"
+        * @since 1.19
+        *
+        * @param array $search_path List of schemas to be searched by default
+        */
+       function setSearchPath( $search_path ) {
+               $this->query( "SET search_path = " . implode( ", ", $search_path ) );
+       }
+
+       /**
+        * Determine default schema for the current application
+        * Adjust this session schema search path if desired schema exists
+        * and is not alread there.
+        *
+        * We need to have name of the core schema stored to be able
+        * to query database metadata.
+        *
+        * This will be also called by the installer after the schema is created
+        *
+        * @since 1.19
+        *
+        * @param string $desiredSchema
+        */
+       function determineCoreSchema( $desiredSchema ) {
+               $this->begin( __METHOD__, self::TRANSACTION_INTERNAL );
+               if ( $this->schemaExists( $desiredSchema ) ) {
+                       if ( in_array( $desiredSchema, $this->getSchemas() ) ) {
+                               $this->mCoreSchema = $desiredSchema;
+                               $this->queryLogger->debug(
+                                       "Schema \"" . $desiredSchema . "\" already in the search path\n" );
+                       } else {
+                               /**
+                                * Prepend our schema (e.g. 'mediawiki') in front
+                                * of the search path
+                                * Fixes bug 15816
+                                */
+                               $search_path = $this->getSearchPath();
+                               array_unshift( $search_path,
+                                       $this->addIdentifierQuotes( $desiredSchema ) );
+                               $this->setSearchPath( $search_path );
+                               $this->mCoreSchema = $desiredSchema;
+                               $this->queryLogger->debug(
+                                       "Schema \"" . $desiredSchema . "\" added to the search path\n" );
+                       }
+               } else {
+                       $this->mCoreSchema = $this->getCurrentSchema();
+                       $this->queryLogger->debug(
+                               "Schema \"" . $desiredSchema . "\" not found, using current \"" .
+                               $this->mCoreSchema . "\"\n" );
+               }
+               /* Commit SET otherwise it will be rollbacked on error or IGNORE SELECT */
+               $this->commit( __METHOD__, self::FLUSHING_INTERNAL );
+       }
+
+       /**
+        * Return schema name for core application tables
+        *
+        * @since 1.19
+        * @return string Core schema name
+        */
+       function getCoreSchema() {
+               return $this->mCoreSchema;
+       }
+
+       /**
+        * @return string Version information from the database
+        */
+       function getServerVersion() {
+               if ( !isset( $this->numericVersion ) ) {
+                       $conn = $this->getBindingHandle();
+                       $versionInfo = pg_version( $conn );
+                       if ( version_compare( $versionInfo['client'], '7.4.0', 'lt' ) ) {
+                               // Old client, abort install
+                               $this->numericVersion = '7.3 or earlier';
+                       } elseif ( isset( $versionInfo['server'] ) ) {
+                               // Normal client
+                               $this->numericVersion = $versionInfo['server'];
+                       } else {
+                               // Bug 16937: broken pgsql extension from PHP<5.3
+                               $this->numericVersion = pg_parameter_status( $conn, 'server_version' );
+                       }
+               }
+
+               return $this->numericVersion;
+       }
+
+       /**
+        * Query whether a given relation exists (in the given schema, or the
+        * default mw one if not given)
+        * @param string $table
+        * @param array|string $types
+        * @param bool|string $schema
+        * @return bool
+        */
+       function relationExists( $table, $types, $schema = false ) {
+               if ( !is_array( $types ) ) {
+                       $types = [ $types ];
+               }
+               if ( $schema === false ) {
+                       $schema = $this->getCoreSchema();
+               }
+               $table = $this->realTableName( $table, 'raw' );
+               $etable = $this->addQuotes( $table );
+               $eschema = $this->addQuotes( $schema );
+               $sql = "SELECT 1 FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n "
+                       . "WHERE c.relnamespace = n.oid AND c.relname = $etable AND n.nspname = $eschema "
+                       . "AND c.relkind IN ('" . implode( "','", $types ) . "')";
+               $res = $this->query( $sql );
+               $count = $res ? $res->numRows() : 0;
+
+               return (bool)$count;
+       }
+
+       /**
+        * For backward compatibility, this function checks both tables and
+        * views.
+        * @param string $table
+        * @param string $fname
+        * @param bool|string $schema
+        * @return bool
+        */
+       function tableExists( $table, $fname = __METHOD__, $schema = false ) {
+               return $this->relationExists( $table, [ 'r', 'v' ], $schema );
+       }
+
+       function sequenceExists( $sequence, $schema = false ) {
+               return $this->relationExists( $sequence, 'S', $schema );
+       }
+
+       function triggerExists( $table, $trigger ) {
+               $q = <<<SQL
+       SELECT 1 FROM pg_class, pg_namespace, pg_trigger
+               WHERE relnamespace=pg_namespace.oid AND relkind='r'
+                         AND tgrelid=pg_class.oid
+                         AND nspname=%s AND relname=%s AND tgname=%s
+SQL;
+               $res = $this->query(
+                       sprintf(
+                               $q,
+                               $this->addQuotes( $this->getCoreSchema() ),
+                               $this->addQuotes( $table ),
+                               $this->addQuotes( $trigger )
+                       )
+               );
+               if ( !$res ) {
+                       return null;
+               }
+               $rows = $res->numRows();
+
+               return $rows;
+       }
+
+       function ruleExists( $table, $rule ) {
+               $exists = $this->selectField( 'pg_rules', 'rulename',
+                       [
+                               'rulename' => $rule,
+                               'tablename' => $table,
+                               'schemaname' => $this->getCoreSchema()
+                       ]
+               );
+
+               return $exists === $rule;
+       }
+
+       function constraintExists( $table, $constraint ) {
+               $sql = sprintf( "SELECT 1 FROM information_schema.table_constraints " .
+                       "WHERE constraint_schema = %s AND table_name = %s AND constraint_name = %s",
+                       $this->addQuotes( $this->getCoreSchema() ),
+                       $this->addQuotes( $table ),
+                       $this->addQuotes( $constraint )
+               );
+               $res = $this->query( $sql );
+               if ( !$res ) {
+                       return null;
+               }
+               $rows = $res->numRows();
+
+               return $rows;
+       }
+
+       /**
+        * Query whether a given schema exists. Returns true if it does, false if it doesn't.
+        * @param string $schema
+        * @return bool
+        */
+       function schemaExists( $schema ) {
+               if ( !strlen( $schema ) ) {
+                       return false; // short-circuit
+               }
+
+               $exists = $this->selectField(
+                       '"pg_catalog"."pg_namespace"', 1, [ 'nspname' => $schema ], __METHOD__ );
+
+               return (bool)$exists;
+       }
+
+       /**
+        * Returns true if a given role (i.e. user) exists, false otherwise.
+        * @param string $roleName
+        * @return bool
+        */
+       function roleExists( $roleName ) {
+               $exists = $this->selectField( '"pg_catalog"."pg_roles"', 1,
+                       [ 'rolname' => $roleName ], __METHOD__ );
+
+               return (bool)$exists;
+       }
+
+       /**
+        * @var string $table
+        * @var string $field
+        * @return PostgresField|null
+        */
+       function fieldInfo( $table, $field ) {
+               return PostgresField::fromText( $this, $table, $field );
+       }
+
+       /**
+        * pg_field_type() wrapper
+        * @param ResultWrapper|resource $res ResultWrapper or PostgreSQL query result resource
+        * @param int $index Field number, starting from 0
+        * @return string
+        */
+       function fieldType( $res, $index ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+
+               return pg_field_type( $res, $index );
+       }
+
+       /**
+        * @param string $b
+        * @return Blob
+        */
+       function encodeBlob( $b ) {
+               return new PostgresBlob( pg_escape_bytea( $b ) );
+       }
+
+       function decodeBlob( $b ) {
+               if ( $b instanceof PostgresBlob ) {
+                       $b = $b->fetch();
+               } elseif ( $b instanceof Blob ) {
+                       return $b->fetch();
+               }
+
+               return pg_unescape_bytea( $b );
+       }
+
+       function strencode( $s ) {
+               // Should not be called by us
+               return pg_escape_string( $this->getBindingHandle(), $s );
+       }
+
+       /**
+        * @param string|int|null|bool|Blob $s
+        * @return string|int
+        */
+       function addQuotes( $s ) {
+               $conn = $this->getBindingHandle();
+
+               if ( is_null( $s ) ) {
+                       return 'NULL';
+               } elseif ( is_bool( $s ) ) {
+                       return intval( $s );
+               } elseif ( $s instanceof Blob ) {
+                       if ( $s instanceof PostgresBlob ) {
+                               $s = $s->fetch();
+                       } else {
+                               $s = pg_escape_bytea( $conn, $s->fetch() );
+                       }
+                       return "'$s'";
+               }
+
+               return "'" . pg_escape_string( $conn, $s ) . "'";
+       }
+
+       /**
+        * Postgres specific version of replaceVars.
+        * Calls the parent version in Database.php
+        *
+        * @param string $ins SQL string, read from a stream (usually tables.sql)
+        * @return string SQL string
+        */
+       protected function replaceVars( $ins ) {
+               $ins = parent::replaceVars( $ins );
+
+               if ( $this->numericVersion >= 8.3 ) {
+                       // Thanks for not providing backwards-compatibility, 8.3
+                       $ins = preg_replace( "/to_tsvector\s*\(\s*'default'\s*,/", 'to_tsvector(', $ins );
+               }
+
+               if ( $this->numericVersion <= 8.1 ) { // Our minimum version
+                       $ins = str_replace( 'USING gin', 'USING gist', $ins );
+               }
+
+               return $ins;
+       }
+
+       /**
+        * Various select options
+        *
+        * @param array $options An associative array of options to be turned into
+        *   an SQL query, valid keys are listed in the function.
+        * @return array
+        */
+       function makeSelectOptions( $options ) {
+               $preLimitTail = $postLimitTail = '';
+               $startOpts = $useIndex = $ignoreIndex = '';
+
+               $noKeyOptions = [];
+               foreach ( $options as $key => $option ) {
+                       if ( is_numeric( $key ) ) {
+                               $noKeyOptions[$option] = true;
+                       }
+               }
+
+               $preLimitTail .= $this->makeGroupByWithHaving( $options );
+
+               $preLimitTail .= $this->makeOrderBy( $options );
+
+               // if ( isset( $options['LIMIT'] ) ) {
+               //      $tailOpts .= $this->limitResult( '', $options['LIMIT'],
+               //              isset( $options['OFFSET'] ) ? $options['OFFSET']
+               //              : false );
+               // }
+
+               if ( isset( $options['FOR UPDATE'] ) ) {
+                       $postLimitTail .= ' FOR UPDATE OF ' .
+                               implode( ', ', array_map( [ &$this, 'tableName' ], $options['FOR UPDATE'] ) );
+               } elseif ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
+                       $postLimitTail .= ' FOR UPDATE';
+               }
+
+               if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) {
+                       $startOpts .= 'DISTINCT';
+               }
+
+               return [ $startOpts, $useIndex, $preLimitTail, $postLimitTail, $ignoreIndex ];
+       }
+
+       function getDBname() {
+               return $this->mDBname;
+       }
+
+       function getServer() {
+               return $this->mServer;
+       }
+
+       function buildConcat( $stringList ) {
+               return implode( ' || ', $stringList );
+       }
+
+       public function buildGroupConcatField(
+               $delimiter, $table, $field, $conds = '', $options = [], $join_conds = []
+       ) {
+               $fld = "array_to_string(array_agg($field)," . $this->addQuotes( $delimiter ) . ')';
+
+               return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
+       }
+
+       /**
+        * @param string $field Field or column to cast
+        * @return string
+        * @since 1.28
+        */
+       public function buildStringCast( $field ) {
+               return $field . '::text';
+       }
+
+       public function streamStatementEnd( &$sql, &$newLine ) {
+               # Allow dollar quoting for function declarations
+               if ( substr( $newLine, 0, 4 ) == '$mw$' ) {
+                       if ( $this->delimiter ) {
+                               $this->delimiter = false;
+                       } else {
+                               $this->delimiter = ';';
+                       }
+               }
+
+               return parent::streamStatementEnd( $sql, $newLine );
+       }
+
+       /**
+        * Check to see if a named lock is available. This is non-blocking.
+        * See http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS
+        *
+        * @param string $lockName Name of lock to poll
+        * @param string $method Name of method calling us
+        * @return bool
+        * @since 1.20
+        */
+       public function lockIsFree( $lockName, $method ) {
+               $key = $this->addQuotes( $this->bigintFromLockName( $lockName ) );
+               $result = $this->query( "SELECT (CASE(pg_try_advisory_lock($key))
+                       WHEN 'f' THEN 'f' ELSE pg_advisory_unlock($key) END) AS lockstatus", $method );
+               $row = $this->fetchObject( $result );
+
+               return ( $row->lockstatus === 't' );
+       }
+
+       /**
+        * See http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS
+        * @param string $lockName
+        * @param string $method
+        * @param int $timeout
+        * @return bool
+        */
+       public function lock( $lockName, $method, $timeout = 5 ) {
+               $key = $this->addQuotes( $this->bigintFromLockName( $lockName ) );
+               $loop = new WaitConditionLoop(
+                       function () use ( $lockName, $key, $timeout, $method ) {
+                               $res = $this->query( "SELECT pg_try_advisory_lock($key) AS lockstatus", $method );
+                               $row = $this->fetchObject( $res );
+                               if ( $row->lockstatus === 't' ) {
+                                       parent::lock( $lockName, $method, $timeout ); // record
+                                       return true;
+                               }
+
+                               return WaitConditionLoop::CONDITION_CONTINUE;
+                       },
+                       $timeout
+               );
+
+               return ( $loop->invoke() === $loop::CONDITION_REACHED );
+       }
+
+       /**
+        * See http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKSFROM
+        * PG DOCS: http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS
+        * @param string $lockName
+        * @param string $method
+        * @return bool
+        */
+       public function unlock( $lockName, $method ) {
+               $key = $this->addQuotes( $this->bigintFromLockName( $lockName ) );
+               $result = $this->query( "SELECT pg_advisory_unlock($key) as lockstatus", $method );
+               $row = $this->fetchObject( $result );
+
+               if ( $row->lockstatus === 't' ) {
+                       parent::unlock( $lockName, $method ); // record
+                       return true;
+               }
+
+               $this->queryLogger->debug( __METHOD__ . " failed to release lock\n" );
+
+               return false;
+       }
+
+       /**
+        * @param string $lockName
+        * @return string Integer
+        */
+       private function bigintFromLockName( $lockName ) {
+               return Wikimedia\base_convert( substr( sha1( $lockName ), 0, 15 ), 16, 10 );
+       }
+}
diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php b/includes/libs/rdbms/database/DatabaseSqlite.php
new file mode 100644 (file)
index 0000000..46f7a5b
--- /dev/null
@@ -0,0 +1,1043 @@
+<?php
+/**
+ * This is the SQLite database abstraction layer.
+ * See maintenance/sqlite/README for development notes and other specific information
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * @ingroup Database
+ */
+class DatabaseSqlite extends Database {
+       /** @var bool Whether full text is enabled */
+       private static $fulltextEnabled = null;
+
+       /** @var string Directory */
+       protected $dbDir;
+       /** @var string File name for SQLite database file */
+       protected $dbPath;
+       /** @var string Transaction mode */
+       protected $trxMode;
+
+       /** @var int The number of rows affected as an integer */
+       protected $mAffectedRows;
+       /** @var resource */
+       protected $mLastResult;
+
+       /** @var $mConn PDO */
+       protected $mConn;
+
+       /** @var FSLockManager (hopefully on the same server as the DB) */
+       protected $lockMgr;
+
+       /**
+        * Additional params include:
+        *   - dbDirectory : directory containing the DB and the lock file directory
+        *                   [defaults to $wgSQLiteDataDir]
+        *   - dbFilePath  : use this to force the path of the DB file
+        *   - trxMode     : one of (deferred, immediate, exclusive)
+        * @param array $p
+        */
+       function __construct( array $p ) {
+               if ( isset( $p['dbFilePath'] ) ) {
+                       parent::__construct( $p );
+                       // Standalone .sqlite file mode.
+                       // Super doesn't open when $user is false, but we can work with $dbName,
+                       // which is derived from the file path in this case.
+                       $this->openFile( $p['dbFilePath'] );
+                       $lockDomain = md5( $p['dbFilePath'] );
+               } elseif ( !isset( $p['dbDirectory'] ) ) {
+                       throw new InvalidArgumentException( "Need 'dbDirectory' or 'dbFilePath' parameter." );
+               } else {
+                       $this->dbDir = $p['dbDirectory'];
+                       $this->mDBname = $p['dbname'];
+                       $lockDomain = $this->mDBname;
+                       // Stock wiki mode using standard file names per DB.
+                       parent::__construct( $p );
+                       // Super doesn't open when $user is false, but we can work with $dbName
+                       if ( $p['dbname'] && !$this->isOpen() ) {
+                               if ( $this->open( $p['host'], $p['user'], $p['password'], $p['dbname'] ) ) {
+                                       $done = [];
+                                       foreach ( $this->tableAliases as $params ) {
+                                               if ( isset( $done[$params['dbname']] ) ) {
+                                                       continue;
+                                               }
+                                               $this->attachDatabase( $params['dbname'] );
+                                               $done[$params['dbname']] = 1;
+                                       }
+                               }
+                       }
+               }
+
+               $this->trxMode = isset( $p['trxMode'] ) ? strtoupper( $p['trxMode'] ) : null;
+               if ( $this->trxMode &&
+                       !in_array( $this->trxMode, [ 'DEFERRED', 'IMMEDIATE', 'EXCLUSIVE' ] )
+               ) {
+                       $this->trxMode = null;
+                       $this->queryLogger->warning( "Invalid SQLite transaction mode provided." );
+               }
+
+               $this->lockMgr = new FSLockManager( [
+                       'domain' => $lockDomain,
+                       'lockDirectory' => "{$this->dbDir}/locks"
+               ] );
+       }
+
+       /**
+        * @param string $filename
+        * @param array $p Options map; supports:
+        *   - flags       : (same as __construct counterpart)
+        *   - trxMode     : (same as __construct counterpart)
+        *   - dbDirectory : (same as __construct counterpart)
+        * @return DatabaseSqlite
+        * @since 1.25
+        */
+       public static function newStandaloneInstance( $filename, array $p = [] ) {
+               $p['dbFilePath'] = $filename;
+               $p['schema'] = false;
+               $p['tablePrefix'] = '';
+
+               return Database::factory( 'sqlite', $p );
+       }
+
+       /**
+        * @return string
+        */
+       function getType() {
+               return 'sqlite';
+       }
+
+       /**
+        * @todo Check if it should be true like parent class
+        *
+        * @return bool
+        */
+       function implicitGroupby() {
+               return false;
+       }
+
+       /** Open an SQLite database and return a resource handle to it
+        *  NOTE: only $dbName is used, the other parameters are irrelevant for SQLite databases
+        *
+        * @param string $server
+        * @param string $user
+        * @param string $pass
+        * @param string $dbName
+        *
+        * @throws DBConnectionError
+        * @return bool
+        */
+       function open( $server, $user, $pass, $dbName ) {
+               $this->close();
+               $fileName = self::generateFileName( $this->dbDir, $dbName );
+               if ( !is_readable( $fileName ) ) {
+                       $this->mConn = false;
+                       throw new DBConnectionError( $this, "SQLite database not accessible" );
+               }
+               $this->openFile( $fileName );
+
+               return (bool)$this->mConn;
+       }
+
+       /**
+        * Opens a database file
+        *
+        * @param string $fileName
+        * @throws DBConnectionError
+        * @return PDO|bool SQL connection or false if failed
+        */
+       protected function openFile( $fileName ) {
+               $err = false;
+
+               $this->dbPath = $fileName;
+               try {
+                       if ( $this->mFlags & self::DBO_PERSISTENT ) {
+                               $this->mConn = new PDO( "sqlite:$fileName", '', '',
+                                       [ PDO::ATTR_PERSISTENT => true ] );
+                       } else {
+                               $this->mConn = new PDO( "sqlite:$fileName", '', '' );
+                       }
+               } catch ( PDOException $e ) {
+                       $err = $e->getMessage();
+               }
+
+               if ( !$this->mConn ) {
+                       $this->queryLogger->debug( "DB connection error: $err\n" );
+                       throw new DBConnectionError( $this, $err );
+               }
+
+               $this->mOpened = !!$this->mConn;
+               if ( $this->mOpened ) {
+                       # Set error codes only, don't raise exceptions
+                       $this->mConn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT );
+                       # Enforce LIKE to be case sensitive, just like MySQL
+                       $this->query( 'PRAGMA case_sensitive_like = 1' );
+
+                       return $this->mConn;
+               }
+
+               return false;
+       }
+
+       /**
+        * @return string SQLite DB file path
+        * @since 1.25
+        */
+       public function getDbFilePath() {
+               return $this->dbPath;
+       }
+
+       /**
+        * Does not actually close the connection, just destroys the reference for GC to do its work
+        * @return bool
+        */
+       protected function closeConnection() {
+               $this->mConn = null;
+
+               return true;
+       }
+
+       /**
+        * Generates a database file name. Explicitly public for installer.
+        * @param string $dir Directory where database resides
+        * @param string $dbName Database name
+        * @return string
+        */
+       public static function generateFileName( $dir, $dbName ) {
+               return "$dir/$dbName.sqlite";
+       }
+
+       /**
+        * Check if the searchindext table is FTS enabled.
+        * @return bool False if not enabled.
+        */
+       function checkForEnabledSearch() {
+               if ( self::$fulltextEnabled === null ) {
+                       self::$fulltextEnabled = false;
+                       $table = $this->tableName( 'searchindex' );
+                       $res = $this->query( "SELECT sql FROM sqlite_master WHERE tbl_name = '$table'", __METHOD__ );
+                       if ( $res ) {
+                               $row = $res->fetchRow();
+                               self::$fulltextEnabled = stristr( $row['sql'], 'fts' ) !== false;
+                       }
+               }
+
+               return self::$fulltextEnabled;
+       }
+
+       /**
+        * Returns version of currently supported SQLite fulltext search module or false if none present.
+        * @return string
+        */
+       static function getFulltextSearchModule() {
+               static $cachedResult = null;
+               if ( $cachedResult !== null ) {
+                       return $cachedResult;
+               }
+               $cachedResult = false;
+               $table = 'dummy_search_test';
+
+               $db = self::newStandaloneInstance( ':memory:' );
+               if ( $db->query( "CREATE VIRTUAL TABLE $table USING FTS3(dummy_field)", __METHOD__, true ) ) {
+                       $cachedResult = 'FTS3';
+               }
+               $db->close();
+
+               return $cachedResult;
+       }
+
+       /**
+        * Attaches external database to our connection, see http://sqlite.org/lang_attach.html
+        * for details.
+        *
+        * @param string $name Database name to be used in queries like
+        *   SELECT foo FROM dbname.table
+        * @param bool|string $file Database file name. If omitted, will be generated
+        *   using $name and configured data directory
+        * @param string $fname Calling function name
+        * @return ResultWrapper
+        */
+       function attachDatabase( $name, $file = false, $fname = __METHOD__ ) {
+               if ( !$file ) {
+                       $file = self::generateFileName( $this->dbDir, $name );
+               }
+               $file = $this->addQuotes( $file );
+
+               return $this->query( "ATTACH DATABASE $file AS $name", $fname );
+       }
+
+       function isWriteQuery( $sql ) {
+               return parent::isWriteQuery( $sql ) && !preg_match( '/^(ATTACH|PRAGMA)\b/i', $sql );
+       }
+
+       /**
+        * SQLite doesn't allow buffered results or data seeking etc, so we'll use fetchAll as the result
+        *
+        * @param string $sql
+        * @return bool|ResultWrapper
+        */
+       protected function doQuery( $sql ) {
+               $res = $this->mConn->query( $sql );
+               if ( $res === false ) {
+                       return false;
+               }
+
+               $r = $res instanceof ResultWrapper ? $res->result : $res;
+               $this->mAffectedRows = $r->rowCount();
+               $res = new ResultWrapper( $this, $r->fetchAll() );
+
+               return $res;
+       }
+
+       /**
+        * @param ResultWrapper|mixed $res
+        */
+       function freeResult( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res->result = null;
+               } else {
+                       $res = null;
+               }
+       }
+
+       /**
+        * @param ResultWrapper|array $res
+        * @return stdClass|bool
+        */
+       function fetchObject( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $r =& $res->result;
+               } else {
+                       $r =& $res;
+               }
+
+               $cur = current( $r );
+               if ( is_array( $cur ) ) {
+                       next( $r );
+                       $obj = new stdClass;
+                       foreach ( $cur as $k => $v ) {
+                               if ( !is_numeric( $k ) ) {
+                                       $obj->$k = $v;
+                               }
+                       }
+
+                       return $obj;
+               }
+
+               return false;
+       }
+
+       /**
+        * @param ResultWrapper|mixed $res
+        * @return array|bool
+        */
+       function fetchRow( $res ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $r =& $res->result;
+               } else {
+                       $r =& $res;
+               }
+               $cur = current( $r );
+               if ( is_array( $cur ) ) {
+                       next( $r );
+
+                       return $cur;
+               }
+
+               return false;
+       }
+
+       /**
+        * The PDO::Statement class implements the array interface so count() will work
+        *
+        * @param ResultWrapper|array $res
+        * @return int
+        */
+       function numRows( $res ) {
+               $r = $res instanceof ResultWrapper ? $res->result : $res;
+
+               return count( $r );
+       }
+
+       /**
+        * @param ResultWrapper $res
+        * @return int
+        */
+       function numFields( $res ) {
+               $r = $res instanceof ResultWrapper ? $res->result : $res;
+               if ( is_array( $r ) && count( $r ) > 0 ) {
+                       // The size of the result array is twice the number of fields. (Bug: 65578)
+                       return count( $r[0] ) / 2;
+               } else {
+                       // If the result is empty return 0
+                       return 0;
+               }
+       }
+
+       /**
+        * @param ResultWrapper $res
+        * @param int $n
+        * @return bool
+        */
+       function fieldName( $res, $n ) {
+               $r = $res instanceof ResultWrapper ? $res->result : $res;
+               if ( is_array( $r ) ) {
+                       $keys = array_keys( $r[0] );
+
+                       return $keys[$n];
+               }
+
+               return false;
+       }
+
+       /**
+        * Use MySQL's naming (accounts for prefix etc) but remove surrounding backticks
+        *
+        * @param string $name
+        * @param string $format
+        * @return string
+        */
+       function tableName( $name, $format = 'quoted' ) {
+               // table names starting with sqlite_ are reserved
+               if ( strpos( $name, 'sqlite_' ) === 0 ) {
+                       return $name;
+               }
+
+               return str_replace( '"', '', parent::tableName( $name, $format ) );
+       }
+
+       /**
+        * This must be called after nextSequenceVal
+        *
+        * @return int
+        */
+       function insertId() {
+               // PDO::lastInsertId yields a string :(
+               return intval( $this->mConn->lastInsertId() );
+       }
+
+       /**
+        * @param ResultWrapper|array $res
+        * @param int $row
+        */
+       function dataSeek( $res, $row ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $r =& $res->result;
+               } else {
+                       $r =& $res;
+               }
+               reset( $r );
+               if ( $row > 0 ) {
+                       for ( $i = 0; $i < $row; $i++ ) {
+                               next( $r );
+                       }
+               }
+       }
+
+       /**
+        * @return string
+        */
+       function lastError() {
+               if ( !is_object( $this->mConn ) ) {
+                       return "Cannot return last error, no db connection";
+               }
+               $e = $this->mConn->errorInfo();
+
+               return isset( $e[2] ) ? $e[2] : '';
+       }
+
+       /**
+        * @return string
+        */
+       function lastErrno() {
+               if ( !is_object( $this->mConn ) ) {
+                       return "Cannot return last error, no db connection";
+               } else {
+                       $info = $this->mConn->errorInfo();
+
+                       return $info[1];
+               }
+       }
+
+       /**
+        * @return int
+        */
+       function affectedRows() {
+               return $this->mAffectedRows;
+       }
+
+       /**
+        * Returns information about an index
+        * Returns false if the index does not exist
+        * - if errors are explicitly ignored, returns NULL on failure
+        *
+        * @param string $table
+        * @param string $index
+        * @param string $fname
+        * @return array|false
+        */
+       function indexInfo( $table, $index, $fname = __METHOD__ ) {
+               $sql = 'PRAGMA index_info(' . $this->addQuotes( $this->indexName( $index ) ) . ')';
+               $res = $this->query( $sql, $fname );
+               if ( !$res || $res->numRows() == 0 ) {
+                       return false;
+               }
+               $info = [];
+               foreach ( $res as $row ) {
+                       $info[] = $row->name;
+               }
+
+               return $info;
+       }
+
+       /**
+        * @param string $table
+        * @param string $index
+        * @param string $fname
+        * @return bool|null
+        */
+       function indexUnique( $table, $index, $fname = __METHOD__ ) {
+               $row = $this->selectRow( 'sqlite_master', '*',
+                       [
+                               'type' => 'index',
+                               'name' => $this->indexName( $index ),
+                       ], $fname );
+               if ( !$row || !isset( $row->sql ) ) {
+                       return null;
+               }
+
+               // $row->sql will be of the form CREATE [UNIQUE] INDEX ...
+               $indexPos = strpos( $row->sql, 'INDEX' );
+               if ( $indexPos === false ) {
+                       return null;
+               }
+               $firstPart = substr( $row->sql, 0, $indexPos );
+               $options = explode( ' ', $firstPart );
+
+               return in_array( 'UNIQUE', $options );
+       }
+
+       /**
+        * Filter the options used in SELECT statements
+        *
+        * @param array $options
+        * @return array
+        */
+       function makeSelectOptions( $options ) {
+               foreach ( $options as $k => $v ) {
+                       if ( is_numeric( $k ) && ( $v == 'FOR UPDATE' || $v == 'LOCK IN SHARE MODE' ) ) {
+                               $options[$k] = '';
+                       }
+               }
+
+               return parent::makeSelectOptions( $options );
+       }
+
+       /**
+        * @param array $options
+        * @return string
+        */
+       protected function makeUpdateOptionsArray( $options ) {
+               $options = parent::makeUpdateOptionsArray( $options );
+               $options = self::fixIgnore( $options );
+
+               return $options;
+       }
+
+       /**
+        * @param array $options
+        * @return array
+        */
+       static function fixIgnore( $options ) {
+               # SQLite uses OR IGNORE not just IGNORE
+               foreach ( $options as $k => $v ) {
+                       if ( $v == 'IGNORE' ) {
+                               $options[$k] = 'OR IGNORE';
+                       }
+               }
+
+               return $options;
+       }
+
+       /**
+        * @param array $options
+        * @return string
+        */
+       function makeInsertOptions( $options ) {
+               $options = self::fixIgnore( $options );
+
+               return parent::makeInsertOptions( $options );
+       }
+
+       /**
+        * Based on generic method (parent) with some prior SQLite-sepcific adjustments
+        * @param string $table
+        * @param array $a
+        * @param string $fname
+        * @param array $options
+        * @return bool
+        */
+       function insert( $table, $a, $fname = __METHOD__, $options = [] ) {
+               if ( !count( $a ) ) {
+                       return true;
+               }
+
+               # SQLite can't handle multi-row inserts, so divide up into multiple single-row inserts
+               if ( isset( $a[0] ) && is_array( $a[0] ) ) {
+                       $ret = true;
+                       foreach ( $a as $v ) {
+                               if ( !parent::insert( $table, $v, "$fname/multi-row", $options ) ) {
+                                       $ret = false;
+                               }
+                       }
+               } else {
+                       $ret = parent::insert( $table, $a, "$fname/single-row", $options );
+               }
+
+               return $ret;
+       }
+
+       /**
+        * @param string $table
+        * @param array $uniqueIndexes Unused
+        * @param string|array $rows
+        * @param string $fname
+        * @return bool|ResultWrapper
+        */
+       function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
+               if ( !count( $rows ) ) {
+                       return true;
+               }
+
+               # SQLite can't handle multi-row replaces, so divide up into multiple single-row queries
+               if ( isset( $rows[0] ) && is_array( $rows[0] ) ) {
+                       $ret = true;
+                       foreach ( $rows as $v ) {
+                               if ( !$this->nativeReplace( $table, $v, "$fname/multi-row" ) ) {
+                                       $ret = false;
+                               }
+                       }
+               } else {
+                       $ret = $this->nativeReplace( $table, $rows, "$fname/single-row" );
+               }
+
+               return $ret;
+       }
+
+       /**
+        * Returns the size of a text field, or -1 for "unlimited"
+        * In SQLite this is SQLITE_MAX_LENGTH, by default 1GB. No way to query it though.
+        *
+        * @param string $table
+        * @param string $field
+        * @return int
+        */
+       function textFieldSize( $table, $field ) {
+               return -1;
+       }
+
+       /**
+        * @return bool
+        */
+       function unionSupportsOrderAndLimit() {
+               return false;
+       }
+
+       /**
+        * @param string $sqls
+        * @param bool $all Whether to "UNION ALL" or not
+        * @return string
+        */
+       function unionQueries( $sqls, $all ) {
+               $glue = $all ? ' UNION ALL ' : ' UNION ';
+
+               return implode( $glue, $sqls );
+       }
+
+       /**
+        * @return bool
+        */
+       function wasDeadlock() {
+               return $this->lastErrno() == 5; // SQLITE_BUSY
+       }
+
+       /**
+        * @return bool
+        */
+       function wasErrorReissuable() {
+               return $this->lastErrno() == 17; // SQLITE_SCHEMA;
+       }
+
+       /**
+        * @return bool
+        */
+       function wasReadOnlyError() {
+               return $this->lastErrno() == 8; // SQLITE_READONLY;
+       }
+
+       /**
+        * @return string Wikitext of a link to the server software's web site
+        */
+       public function getSoftwareLink() {
+               return "[{{int:version-db-sqlite-url}} SQLite]";
+       }
+
+       /**
+        * @return string Version information from the database
+        */
+       function getServerVersion() {
+               $ver = $this->mConn->getAttribute( PDO::ATTR_SERVER_VERSION );
+
+               return $ver;
+       }
+
+       /**
+        * Get information about a given field
+        * Returns false if the field does not exist.
+        *
+        * @param string $table
+        * @param string $field
+        * @return SQLiteField|bool False on failure
+        */
+       function fieldInfo( $table, $field ) {
+               $tableName = $this->tableName( $table );
+               $sql = 'PRAGMA table_info(' . $this->addQuotes( $tableName ) . ')';
+               $res = $this->query( $sql, __METHOD__ );
+               foreach ( $res as $row ) {
+                       if ( $row->name == $field ) {
+                               return new SQLiteField( $row, $tableName );
+                       }
+               }
+
+               return false;
+       }
+
+       protected function doBegin( $fname = '' ) {
+               if ( $this->trxMode ) {
+                       $this->query( "BEGIN {$this->trxMode}", $fname );
+               } else {
+                       $this->query( 'BEGIN', $fname );
+               }
+               $this->mTrxLevel = 1;
+       }
+
+       /**
+        * @param string $s
+        * @return string
+        */
+       function strencode( $s ) {
+               return substr( $this->addQuotes( $s ), 1, -1 );
+       }
+
+       /**
+        * @param string $b
+        * @return Blob
+        */
+       function encodeBlob( $b ) {
+               return new Blob( $b );
+       }
+
+       /**
+        * @param Blob|string $b
+        * @return string
+        */
+       function decodeBlob( $b ) {
+               if ( $b instanceof Blob ) {
+                       $b = $b->fetch();
+               }
+
+               return $b;
+       }
+
+       /**
+        * @param string|int|null|bool|Blob $s
+        * @return string|int
+        */
+       function addQuotes( $s ) {
+               if ( $s instanceof Blob ) {
+                       return "x'" . bin2hex( $s->fetch() ) . "'";
+               } elseif ( is_bool( $s ) ) {
+                       return (int)$s;
+               } elseif ( strpos( $s, "\0" ) !== false ) {
+                       // SQLite doesn't support \0 in strings, so use the hex representation as a workaround.
+                       // This is a known limitation of SQLite's mprintf function which PDO
+                       // should work around, but doesn't. I have reported this to php.net as bug #63419:
+                       // https://bugs.php.net/bug.php?id=63419
+                       // There was already a similar report for SQLite3::escapeString, bug #62361:
+                       // https://bugs.php.net/bug.php?id=62361
+                       // There is an additional bug regarding sorting this data after insert
+                       // on older versions of sqlite shipped with ubuntu 12.04
+                       // https://phabricator.wikimedia.org/T74367
+                       $this->queryLogger->debug(
+                               __FUNCTION__ .
+                               ': Quoting value containing null byte. ' .
+                               'For consistency all binary data should have been ' .
+                               'first processed with self::encodeBlob()'
+                       );
+                       return "x'" . bin2hex( $s ) . "'";
+               } else {
+                       return $this->mConn->quote( $s );
+               }
+       }
+
+       /**
+        * @return string
+        */
+       function buildLike() {
+               $params = func_get_args();
+               if ( count( $params ) > 0 && is_array( $params[0] ) ) {
+                       $params = $params[0];
+               }
+
+               return parent::buildLike( $params ) . "ESCAPE '\' ";
+       }
+
+       /**
+        * @param string $field Field or column to cast
+        * @return string
+        * @since 1.28
+        */
+       public function buildStringCast( $field ) {
+               return 'CAST ( ' . $field . ' AS TEXT )';
+       }
+
+       /**
+        * No-op version of deadlockLoop
+        *
+        * @return mixed
+        */
+       public function deadlockLoop( /*...*/ ) {
+               $args = func_get_args();
+               $function = array_shift( $args );
+
+               return call_user_func_array( $function, $args );
+       }
+
+       /**
+        * @param string $s
+        * @return string
+        */
+       protected function replaceVars( $s ) {
+               $s = parent::replaceVars( $s );
+               if ( preg_match( '/^\s*(CREATE|ALTER) TABLE/i', $s ) ) {
+                       // CREATE TABLE hacks to allow schema file sharing with MySQL
+
+                       // binary/varbinary column type -> blob
+                       $s = preg_replace( '/\b(var)?binary(\(\d+\))/i', 'BLOB', $s );
+                       // no such thing as unsigned
+                       $s = preg_replace( '/\b(un)?signed\b/i', '', $s );
+                       // INT -> INTEGER
+                       $s = preg_replace( '/\b(tiny|small|medium|big|)int(\s*\(\s*\d+\s*\)|\b)/i', 'INTEGER', $s );
+                       // floating point types -> REAL
+                       $s = preg_replace(
+                               '/\b(float|double(\s+precision)?)(\s*\(\s*\d+\s*(,\s*\d+\s*)?\)|\b)/i',
+                               'REAL',
+                               $s
+                       );
+                       // varchar -> TEXT
+                       $s = preg_replace( '/\b(var)?char\s*\(.*?\)/i', 'TEXT', $s );
+                       // TEXT normalization
+                       $s = preg_replace( '/\b(tiny|medium|long)text\b/i', 'TEXT', $s );
+                       // BLOB normalization
+                       $s = preg_replace( '/\b(tiny|small|medium|long|)blob\b/i', 'BLOB', $s );
+                       // BOOL -> INTEGER
+                       $s = preg_replace( '/\bbool(ean)?\b/i', 'INTEGER', $s );
+                       // DATETIME -> TEXT
+                       $s = preg_replace( '/\b(datetime|timestamp)\b/i', 'TEXT', $s );
+                       // No ENUM type
+                       $s = preg_replace( '/\benum\s*\([^)]*\)/i', 'TEXT', $s );
+                       // binary collation type -> nothing
+                       $s = preg_replace( '/\bbinary\b/i', '', $s );
+                       // auto_increment -> autoincrement
+                       $s = preg_replace( '/\bauto_increment\b/i', 'AUTOINCREMENT', $s );
+                       // No explicit options
+                       $s = preg_replace( '/\)[^);]*(;?)\s*$/', ')\1', $s );
+                       // AUTOINCREMENT should immedidately follow PRIMARY KEY
+                       $s = preg_replace( '/primary key (.*?) autoincrement/i', 'PRIMARY KEY AUTOINCREMENT $1', $s );
+               } elseif ( preg_match( '/^\s*CREATE (\s*(?:UNIQUE|FULLTEXT)\s+)?INDEX/i', $s ) ) {
+                       // No truncated indexes
+                       $s = preg_replace( '/\(\d+\)/', '', $s );
+                       // No FULLTEXT
+                       $s = preg_replace( '/\bfulltext\b/i', '', $s );
+               } elseif ( preg_match( '/^\s*DROP INDEX/i', $s ) ) {
+                       // DROP INDEX is database-wide, not table-specific, so no ON <table> clause.
+                       $s = preg_replace( '/\sON\s+[^\s]*/i', '', $s );
+               } elseif ( preg_match( '/^\s*INSERT IGNORE\b/i', $s ) ) {
+                       // INSERT IGNORE --> INSERT OR IGNORE
+                       $s = preg_replace( '/^\s*INSERT IGNORE\b/i', 'INSERT OR IGNORE', $s );
+               }
+
+               return $s;
+       }
+
+       public function lock( $lockName, $method, $timeout = 5 ) {
+               if ( !is_dir( "{$this->dbDir}/locks" ) ) { // create dir as needed
+                       if ( !is_writable( $this->dbDir ) || !mkdir( "{$this->dbDir}/locks" ) ) {
+                               throw new DBError( $this, "Cannot create directory \"{$this->dbDir}/locks\"." );
+                       }
+               }
+
+               return $this->lockMgr->lock( [ $lockName ], LockManager::LOCK_EX, $timeout )->isOK();
+       }
+
+       public function unlock( $lockName, $method ) {
+               return $this->lockMgr->unlock( [ $lockName ], LockManager::LOCK_EX )->isOK();
+       }
+
+       /**
+        * Build a concatenation list to feed into a SQL query
+        *
+        * @param string[] $stringList
+        * @return string
+        */
+       function buildConcat( $stringList ) {
+               return '(' . implode( ') || (', $stringList ) . ')';
+       }
+
+       public function buildGroupConcatField(
+               $delim, $table, $field, $conds = '', $join_conds = []
+       ) {
+               $fld = "group_concat($field," . $this->addQuotes( $delim ) . ')';
+
+               return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
+       }
+
+       /**
+        * @param string $oldName
+        * @param string $newName
+        * @param bool $temporary
+        * @param string $fname
+        * @return bool|ResultWrapper
+        * @throws RuntimeException
+        */
+       function duplicateTableStructure( $oldName, $newName, $temporary = false, $fname = __METHOD__ ) {
+               $res = $this->query( "SELECT sql FROM sqlite_master WHERE tbl_name=" .
+                       $this->addQuotes( $oldName ) . " AND type='table'", $fname );
+               $obj = $this->fetchObject( $res );
+               if ( !$obj ) {
+                       throw new RuntimeException( "Couldn't retrieve structure for table $oldName" );
+               }
+               $sql = $obj->sql;
+               $sql = preg_replace(
+                       '/(?<=\W)"?' . preg_quote( trim( $this->addIdentifierQuotes( $oldName ), '"' ) ) . '"?(?=\W)/',
+                       $this->addIdentifierQuotes( $newName ),
+                       $sql,
+                       1
+               );
+               if ( $temporary ) {
+                       if ( preg_match( '/^\\s*CREATE\\s+VIRTUAL\\s+TABLE\b/i', $sql ) ) {
+                               $this->queryLogger->debug(
+                                       "Table $oldName is virtual, can't create a temporary duplicate.\n" );
+                       } else {
+                               $sql = str_replace( 'CREATE TABLE', 'CREATE TEMPORARY TABLE', $sql );
+                       }
+               }
+
+               $res = $this->query( $sql, $fname );
+
+               // Take over indexes
+               $indexList = $this->query( 'PRAGMA INDEX_LIST(' . $this->addQuotes( $oldName ) . ')' );
+               foreach ( $indexList as $index ) {
+                       if ( strpos( $index->name, 'sqlite_autoindex' ) === 0 ) {
+                               continue;
+                       }
+
+                       if ( $index->unique ) {
+                               $sql = 'CREATE UNIQUE INDEX';
+                       } else {
+                               $sql = 'CREATE INDEX';
+                       }
+                       // Try to come up with a new index name, given indexes have database scope in SQLite
+                       $indexName = $newName . '_' . $index->name;
+                       $sql .= ' ' . $indexName . ' ON ' . $newName;
+
+                       $indexInfo = $this->query( 'PRAGMA INDEX_INFO(' . $this->addQuotes( $index->name ) . ')' );
+                       $fields = [];
+                       foreach ( $indexInfo as $indexInfoRow ) {
+                               $fields[$indexInfoRow->seqno] = $indexInfoRow->name;
+                       }
+
+                       $sql .= '(' . implode( ',', $fields ) . ')';
+
+                       $this->query( $sql );
+               }
+
+               return $res;
+       }
+
+       /**
+        * List all tables on the database
+        *
+        * @param string $prefix Only show tables with this prefix, e.g. mw_
+        * @param string $fname Calling function name
+        *
+        * @return array
+        */
+       function listTables( $prefix = null, $fname = __METHOD__ ) {
+               $result = $this->select(
+                       'sqlite_master',
+                       'name',
+                       "type='table'"
+               );
+
+               $endArray = [];
+
+               foreach ( $result as $table ) {
+                       $vars = get_object_vars( $table );
+                       $table = array_pop( $vars );
+
+                       if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
+                               if ( strpos( $table, 'sqlite_' ) !== 0 ) {
+                                       $endArray[] = $table;
+                               }
+                       }
+               }
+
+               return $endArray;
+       }
+
+       /**
+        * Override due to no CASCADE support
+        *
+        * @param string $tableName
+        * @param string $fName
+        * @return bool|ResultWrapper
+        * @throws DBReadOnlyError
+        */
+       public function dropTable( $tableName, $fName = __METHOD__ ) {
+               if ( !$this->tableExists( $tableName, $fName ) ) {
+                       return false;
+               }
+               $sql = "DROP TABLE " . $this->tableName( $tableName );
+
+               return $this->query( $sql, $fName );
+       }
+
+       protected function requiresDatabaseUser() {
+               return false; // just a file
+       }
+
+       /**
+        * @return string
+        */
+       public function __toString() {
+               return 'SQLite ' . (string)$this->mConn->getAttribute( PDO::ATTR_SERVER_VERSION );
+       }
+}
diff --git a/includes/libs/rdbms/database/IDatabase.php b/includes/libs/rdbms/database/IDatabase.php
new file mode 100644 (file)
index 0000000..c80fdec
--- /dev/null
@@ -0,0 +1,1795 @@
+<?php
+/**
+ * @defgroup Database Database
+ *
+ * This file deals with database interface functions
+ * and query specifics/optimisations.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+use Wikimedia\ScopedCallback;
+
+/**
+ * Basic database interface for live and lazy-loaded relation database handles
+ *
+ * @note: IDatabase and DBConnRef should be updated to reflect any changes
+ * @ingroup Database
+ */
+interface IDatabase {
+       /** @var int Callback triggered immediately due to no active transaction */
+       const TRIGGER_IDLE = 1;
+       /** @var int Callback triggered by COMMIT */
+       const TRIGGER_COMMIT = 2;
+       /** @var int Callback triggered by ROLLBACK */
+       const TRIGGER_ROLLBACK = 3;
+
+       /** @var string Transaction is requested by regular caller outside of the DB layer */
+       const TRANSACTION_EXPLICIT = '';
+       /** @var string Transaction is requested internally via DBO_TRX/startAtomic() */
+       const TRANSACTION_INTERNAL = 'implicit';
+
+       /** @var string Transaction operation comes from service managing all DBs */
+       const FLUSHING_ALL_PEERS = 'flush';
+       /** @var string Transaction operation comes from the database class internally */
+       const FLUSHING_INTERNAL = 'flush';
+
+       /** @var string Do not remember the prior flags */
+       const REMEMBER_NOTHING = '';
+       /** @var string Remember the prior flags */
+       const REMEMBER_PRIOR = 'remember';
+       /** @var string Restore to the prior flag state */
+       const RESTORE_PRIOR = 'prior';
+       /** @var string Restore to the initial flag state */
+       const RESTORE_INITIAL = 'initial';
+
+       /** @var string Estimate total time (RTT, scanning, waiting on locks, applying) */
+       const ESTIMATE_TOTAL = 'total';
+       /** @var string Estimate time to apply (scanning, applying) */
+       const ESTIMATE_DB_APPLY = 'apply';
+
+       /** @var int Combine list with comma delimeters */
+       const LIST_COMMA = 0;
+       /** @var int Combine list with AND clauses */
+       const LIST_AND = 1;
+       /** @var int Convert map into a SET clause */
+       const LIST_SET = 2;
+       /** @var int Treat as field name and do not apply value escaping */
+       const LIST_NAMES = 3;
+       /** @var int Combine list with OR clauses */
+       const LIST_OR = 4;
+
+       /** @var int Enable debug logging */
+       const DBO_DEBUG = 1;
+       /** @var int Disable query buffering (only one result set can be iterated at a time) */
+       const DBO_NOBUFFER = 2;
+       /** @var int Ignore query errors (internal use only!) */
+       const DBO_IGNORE = 4;
+       /** @var int Autoatically start transaction on first query (work with ILoadBalancer rounds) */
+       const DBO_TRX = 8;
+       /** @var int Use DBO_TRX in non-CLI mode */
+       const DBO_DEFAULT = 16;
+       /** @var int Use DB persistent connections if possible */
+       const DBO_PERSISTENT = 32;
+       /** @var int DBA session mode; mostly for Oracle */
+       const DBO_SYSDBA = 64;
+       /** @var int Schema file mode; mostly for Oracle */
+       const DBO_DDLMODE = 128;
+       /** @var int Enable SSL/TLS in connection protocol */
+       const DBO_SSL = 256;
+       /** @var int Enable compression in connection protocol */
+       const DBO_COMPRESS = 512;
+
+       /**
+        * A string describing the current software version, and possibly
+        * other details in a user-friendly way. Will be listed on Special:Version, etc.
+        * Use getServerVersion() to get machine-friendly information.
+        *
+        * @return string Version information from the database server
+        */
+       public function getServerInfo();
+
+       /**
+        * Turns buffering of SQL result sets on (true) or off (false). Default is "on".
+        *
+        * Unbuffered queries are very troublesome in MySQL:
+        *
+        *   - If another query is executed while the first query is being read
+        *     out, the first query is killed. This means you can't call normal
+        *     Database functions while you are reading an unbuffered query result
+        *     from a normal Database connection.
+        *
+        *   - Unbuffered queries cause the MySQL server to use large amounts of
+        *     memory and to hold broad locks which block other queries.
+        *
+        * If you want to limit client-side memory, it's almost always better to
+        * split up queries into batches using a LIMIT clause than to switch off
+        * buffering.
+        *
+        * @param null|bool $buffer
+        * @return null|bool The previous value of the flag
+        */
+       public function bufferResults( $buffer = null );
+
+       /**
+        * Gets the current transaction level.
+        *
+        * Historically, transactions were allowed to be "nested". This is no
+        * longer supported, so this function really only returns a boolean.
+        *
+        * @return int The previous value
+        */
+       public function trxLevel();
+
+       /**
+        * Get the UNIX timestamp of the time that the transaction was established
+        *
+        * This can be used to reason about the staleness of SELECT data
+        * in REPEATABLE-READ transaction isolation level.
+        *
+        * @return float|null Returns null if there is not active transaction
+        * @since 1.25
+        */
+       public function trxTimestamp();
+
+       /**
+        * @return bool Whether an explicit transaction or atomic sections are still open
+        * @since 1.28
+        */
+       public function explicitTrxActive();
+
+       /**
+        * Get/set the table prefix.
+        * @param string $prefix The table prefix to set, or omitted to leave it unchanged.
+        * @return string The previous table prefix.
+        */
+       public function tablePrefix( $prefix = null );
+
+       /**
+        * Get/set the db schema.
+        * @param string $schema The database schema to set, or omitted to leave it unchanged.
+        * @return string The previous db schema.
+        */
+       public function dbSchema( $schema = null );
+
+       /**
+        * Get properties passed down from the server info array of the load
+        * balancer.
+        *
+        * @param string $name The entry of the info array to get, or null to get the
+        *   whole array
+        *
+        * @return array|mixed|null
+        */
+       public function getLBInfo( $name = null );
+
+       /**
+        * Set the LB info array, or a member of it. If called with one parameter,
+        * the LB info array is set to that parameter. If it is called with two
+        * parameters, the member with the given name is set to the given value.
+        *
+        * @param string $name
+        * @param array $value
+        */
+       public function setLBInfo( $name, $value = null );
+
+       /**
+        * Set a lazy-connecting DB handle to the master DB (for replication status purposes)
+        *
+        * @param IDatabase $conn
+        * @since 1.27
+        */
+       public function setLazyMasterHandle( IDatabase $conn );
+
+       /**
+        * Returns true if this database does an implicit sort when doing GROUP BY
+        *
+        * @return bool
+        */
+       public function implicitGroupby();
+
+       /**
+        * Returns true if this database does an implicit order by when the column has an index
+        * For example: SELECT page_title FROM page LIMIT 1
+        *
+        * @return bool
+        */
+       public function implicitOrderby();
+
+       /**
+        * Return the last query that went through IDatabase::query()
+        * @return string
+        */
+       public function lastQuery();
+
+       /**
+        * Returns true if the connection may have been used for write queries.
+        * Should return true if unsure.
+        *
+        * @return bool
+        */
+       public function doneWrites();
+
+       /**
+        * Returns the last time the connection may have been used for write queries.
+        * Should return a timestamp if unsure.
+        *
+        * @return int|float UNIX timestamp or false
+        * @since 1.24
+        */
+       public function lastDoneWrites();
+
+       /**
+        * @return bool Whether there is a transaction open with possible write queries
+        * @since 1.27
+        */
+       public function writesPending();
+
+       /**
+        * Returns true if there is a transaction open with possible write
+        * queries or transaction pre-commit/idle callbacks waiting on it to finish.
+        * This does *not* count recurring callbacks, e.g. from setTransactionListener().
+        *
+        * @return bool
+        */
+       public function writesOrCallbacksPending();
+
+       /**
+        * Get the time spend running write queries for this transaction
+        *
+        * High times could be due to scanning, updates, locking, and such
+        *
+        * @param string $type IDatabase::ESTIMATE_* constant [default: ESTIMATE_ALL]
+        * @return float|bool Returns false if not transaction is active
+        * @since 1.26
+        */
+       public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL );
+
+       /**
+        * Get the list of method names that did write queries for this transaction
+        *
+        * @return array
+        * @since 1.27
+        */
+       public function pendingWriteCallers();
+
+       /**
+        * Is a connection to the database open?
+        * @return bool
+        */
+       public function isOpen();
+
+       /**
+        * Set a flag for this connection
+        *
+        * @param int $flag DBO_* constants from Defines.php:
+        *   - DBO_DEBUG: output some debug info (same as debug())
+        *   - DBO_NOBUFFER: don't buffer results (inverse of bufferResults())
+        *   - DBO_TRX: automatically start transactions
+        *   - DBO_DEFAULT: automatically sets DBO_TRX if not in command line mode
+        *       and removes it in command line mode
+        *   - DBO_PERSISTENT: use persistant database connection
+        * @param string $remember IDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING]
+        */
+       public function setFlag( $flag, $remember = self::REMEMBER_NOTHING );
+
+       /**
+        * Clear a flag for this connection
+        *
+        * @param int $flag DBO_* constants from Defines.php:
+        *   - DBO_DEBUG: output some debug info (same as debug())
+        *   - DBO_NOBUFFER: don't buffer results (inverse of bufferResults())
+        *   - DBO_TRX: automatically start transactions
+        *   - DBO_DEFAULT: automatically sets DBO_TRX if not in command line mode
+        *       and removes it in command line mode
+        *   - DBO_PERSISTENT: use persistant database connection
+        * @param string $remember IDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING]
+        */
+       public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING );
+
+       /**
+        * Restore the flags to their prior state before the last setFlag/clearFlag call
+        *
+        * @param string $state IDatabase::RESTORE_* constant. [default: RESTORE_PRIOR]
+        * @since 1.28
+        */
+       public function restoreFlags( $state = self::RESTORE_PRIOR );
+
+       /**
+        * Returns a boolean whether the flag $flag is set for this connection
+        *
+        * @param int $flag DBO_* constants from Defines.php:
+        *   - DBO_DEBUG: output some debug info (same as debug())
+        *   - DBO_NOBUFFER: don't buffer results (inverse of bufferResults())
+        *   - DBO_TRX: automatically start transactions
+        *   - DBO_PERSISTENT: use persistant database connection
+        * @return bool
+        */
+       public function getFlag( $flag );
+
+       /**
+        * @return string
+        */
+       public function getDomainID();
+
+       /**
+        * Alias for getDomainID()
+        *
+        * @return string
+        */
+       public function getWikiID();
+
+       /**
+        * Get the type of the DBMS, as it appears in $wgDBtype.
+        *
+        * @return string
+        */
+       public function getType();
+
+       /**
+        * Open a connection to the database. Usually aborts on failure
+        *
+        * @param string $server Database server host
+        * @param string $user Database user name
+        * @param string $password Database user password
+        * @param string $dbName Database name
+        * @return bool
+        * @throws DBConnectionError
+        */
+       public function open( $server, $user, $password, $dbName );
+
+       /**
+        * Fetch the next row from the given result object, in object form.
+        * Fields can be retrieved with $row->fieldname, with fields acting like
+        * member variables.
+        * If no more rows are available, false is returned.
+        *
+        * @param ResultWrapper|stdClass $res Object as returned from IDatabase::query(), etc.
+        * @return stdClass|bool
+        * @throws DBUnexpectedError Thrown if the database returns an error
+        */
+       public function fetchObject( $res );
+
+       /**
+        * Fetch the next row from the given result object, in associative array
+        * form. Fields are retrieved with $row['fieldname'].
+        * If no more rows are available, false is returned.
+        *
+        * @param ResultWrapper $res Result object as returned from IDatabase::query(), etc.
+        * @return array|bool
+        * @throws DBUnexpectedError Thrown if the database returns an error
+        */
+       public function fetchRow( $res );
+
+       /**
+        * Get the number of rows in a result object
+        *
+        * @param mixed $res A SQL result
+        * @return int
+        */
+       public function numRows( $res );
+
+       /**
+        * Get the number of fields in a result object
+        * @see http://www.php.net/mysql_num_fields
+        *
+        * @param mixed $res A SQL result
+        * @return int
+        */
+       public function numFields( $res );
+
+       /**
+        * Get a field name in a result object
+        * @see http://www.php.net/mysql_field_name
+        *
+        * @param mixed $res A SQL result
+        * @param int $n
+        * @return string
+        */
+       public function fieldName( $res, $n );
+
+       /**
+        * Get the inserted value of an auto-increment row
+        *
+        * The value inserted should be fetched from nextSequenceValue()
+        *
+        * Example:
+        * $id = $dbw->nextSequenceValue( 'page_page_id_seq' );
+        * $dbw->insert( 'page', [ 'page_id' => $id ] );
+        * $id = $dbw->insertId();
+        *
+        * @return int
+        */
+       public function insertId();
+
+       /**
+        * Change the position of the cursor in a result object
+        * @see http://www.php.net/mysql_data_seek
+        *
+        * @param mixed $res A SQL result
+        * @param int $row
+        */
+       public function dataSeek( $res, $row );
+
+       /**
+        * Get the last error number
+        * @see http://www.php.net/mysql_errno
+        *
+        * @return int
+        */
+       public function lastErrno();
+
+       /**
+        * Get a description of the last error
+        * @see http://www.php.net/mysql_error
+        *
+        * @return string
+        */
+       public function lastError();
+
+       /**
+        * mysql_fetch_field() wrapper
+        * Returns false if the field doesn't exist
+        *
+        * @param string $table Table name
+        * @param string $field Field name
+        *
+        * @return Field
+        */
+       public function fieldInfo( $table, $field );
+
+       /**
+        * Get the number of rows affected by the last write query
+        * @see http://www.php.net/mysql_affected_rows
+        *
+        * @return int
+        */
+       public function affectedRows();
+
+       /**
+        * Returns a wikitext link to the DB's website, e.g.,
+        *   return "[http://www.mysql.com/ MySQL]";
+        * Should at least contain plain text, if for some reason
+        * your database has no website.
+        *
+        * @return string Wikitext of a link to the server software's web site
+        */
+       public function getSoftwareLink();
+
+       /**
+        * A string describing the current software version, like from
+        * mysql_get_server_info().
+        *
+        * @return string Version information from the database server.
+        */
+       public function getServerVersion();
+
+       /**
+        * Closes a database connection.
+        * if it is open : commits any open transactions
+        *
+        * @throws DBError
+        * @return bool Operation success. true if already closed.
+        */
+       public function close();
+
+       /**
+        * @param string $error Fallback error message, used if none is given by DB
+        * @throws DBConnectionError
+        */
+       public function reportConnectionError( $error = 'Unknown error' );
+
+       /**
+        * Run an SQL query and return the result. Normally throws a DBQueryError
+        * on failure. If errors are ignored, returns false instead.
+        *
+        * In new code, the query wrappers select(), insert(), update(), delete(),
+        * etc. should be used where possible, since they give much better DBMS
+        * independence and automatically quote or validate user input in a variety
+        * of contexts. This function is generally only useful for queries which are
+        * explicitly DBMS-dependent and are unsupported by the query wrappers, such
+        * as CREATE TABLE.
+        *
+        * However, the query wrappers themselves should call this function.
+        *
+        * @param string $sql SQL query
+        * @param string $fname Name of the calling function, for profiling/SHOW PROCESSLIST
+        *     comment (you can use __METHOD__ or add some extra info)
+        * @param bool $tempIgnore Whether to avoid throwing an exception on errors...
+        *     maybe best to catch the exception instead?
+        * @throws DBError
+        * @return bool|ResultWrapper True for a successful write query, ResultWrapper object
+        *     for a successful read query, or false on failure if $tempIgnore set
+        */
+       public function query( $sql, $fname = __METHOD__, $tempIgnore = false );
+
+       /**
+        * Report a query error. Log the error, and if neither the object ignore
+        * flag nor the $tempIgnore flag is set, throw a DBQueryError.
+        *
+        * @param string $error
+        * @param int $errno
+        * @param string $sql
+        * @param string $fname
+        * @param bool $tempIgnore
+        * @throws DBQueryError
+        */
+       public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false );
+
+       /**
+        * Free a result object returned by query() or select(). It's usually not
+        * necessary to call this, just use unset() or let the variable holding
+        * the result object go out of scope.
+        *
+        * @param mixed $res A SQL result
+        */
+       public function freeResult( $res );
+
+       /**
+        * A SELECT wrapper which returns a single field from a single result row.
+        *
+        * Usually throws a DBQueryError on failure. If errors are explicitly
+        * ignored, returns false on failure.
+        *
+        * If no result rows are returned from the query, false is returned.
+        *
+        * @param string|array $table Table name. See IDatabase::select() for details.
+        * @param string $var The field name to select. This must be a valid SQL
+        *   fragment: do not use unvalidated user input.
+        * @param string|array $cond The condition array. See IDatabase::select() for details.
+        * @param string $fname The function name of the caller.
+        * @param string|array $options The query options. See IDatabase::select() for details.
+        *
+        * @return bool|mixed The value from the field, or false on failure.
+        */
+       public function selectField(
+               $table, $var, $cond = '', $fname = __METHOD__, $options = []
+       );
+
+       /**
+        * A SELECT wrapper which returns a list of single field values from result rows.
+        *
+        * Usually throws a DBQueryError on failure. If errors are explicitly
+        * ignored, returns false on failure.
+        *
+        * If no result rows are returned from the query, false is returned.
+        *
+        * @param string|array $table Table name. See IDatabase::select() for details.
+        * @param string $var The field name to select. This must be a valid SQL
+        *   fragment: do not use unvalidated user input.
+        * @param string|array $cond The condition array. See IDatabase::select() for details.
+        * @param string $fname The function name of the caller.
+        * @param string|array $options The query options. See IDatabase::select() for details.
+        *
+        * @return bool|array The values from the field, or false on failure
+        * @since 1.25
+        */
+       public function selectFieldValues(
+               $table, $var, $cond = '', $fname = __METHOD__, $options = []
+       );
+
+       /**
+        * Execute a SELECT query constructed using the various parameters provided.
+        * See below for full details of the parameters.
+        *
+        * @param string|array $table Table name
+        * @param string|array $vars Field names
+        * @param string|array $conds Conditions
+        * @param string $fname Caller function name
+        * @param array $options Query options
+        * @param array $join_conds Join conditions
+        *
+        *
+        * @param string|array $table
+        *
+        * May be either an array of table names, or a single string holding a table
+        * name. If an array is given, table aliases can be specified, for example:
+        *
+        *    [ 'a' => 'user' ]
+        *
+        * This includes the user table in the query, with the alias "a" available
+        * for use in field names (e.g. a.user_name).
+        *
+        * All of the table names given here are automatically run through
+        * Database::tableName(), which causes the table prefix (if any) to be
+        * added, and various other table name mappings to be performed.
+        *
+        * Do not use untrusted user input as a table name. Alias names should
+        * not have characters outside of the Basic multilingual plane.
+        *
+        * @param string|array $vars
+        *
+        * May be either a field name or an array of field names. The field names
+        * can be complete fragments of SQL, for direct inclusion into the SELECT
+        * query. If an array is given, field aliases can be specified, for example:
+        *
+        *   [ 'maxrev' => 'MAX(rev_id)' ]
+        *
+        * This includes an expression with the alias "maxrev" in the query.
+        *
+        * If an expression is given, care must be taken to ensure that it is
+        * DBMS-independent.
+        *
+        * Untrusted user input must not be passed to this parameter.
+        *
+        * @param string|array $conds
+        *
+        * May be either a string containing a single condition, or an array of
+        * conditions. If an array is given, the conditions constructed from each
+        * element are combined with AND.
+        *
+        * Array elements may take one of two forms:
+        *
+        *   - Elements with a numeric key are interpreted as raw SQL fragments.
+        *   - Elements with a string key are interpreted as equality conditions,
+        *     where the key is the field name.
+        *     - If the value of such an array element is a scalar (such as a
+        *       string), it will be treated as data and thus quoted appropriately.
+        *       If it is null, an IS NULL clause will be added.
+        *     - If the value is an array, an IN (...) clause will be constructed
+        *       from its non-null elements, and an IS NULL clause will be added
+        *       if null is present, such that the field may match any of the
+        *       elements in the array. The non-null elements will be quoted.
+        *
+        * Note that expressions are often DBMS-dependent in their syntax.
+        * DBMS-independent wrappers are provided for constructing several types of
+        * expression commonly used in condition queries. See:
+        *    - IDatabase::buildLike()
+        *    - IDatabase::conditional()
+        *
+        * Untrusted user input is safe in the values of string keys, however untrusted
+        * input must not be used in the array key names or in the values of numeric keys.
+        * Escaping of untrusted input used in values of numeric keys should be done via
+        * IDatabase::addQuotes()
+        *
+        * @param string|array $options
+        *
+        * Optional: Array of query options. Boolean options are specified by
+        * including them in the array as a string value with a numeric key, for
+        * example:
+        *
+        *    [ 'FOR UPDATE' ]
+        *
+        * The supported options are:
+        *
+        *   - OFFSET: Skip this many rows at the start of the result set. OFFSET
+        *     with LIMIT can theoretically be used for paging through a result set,
+        *     but this is discouraged for performance reasons.
+        *
+        *   - LIMIT: Integer: return at most this many rows. The rows are sorted
+        *     and then the first rows are taken until the limit is reached. LIMIT
+        *     is applied to a result set after OFFSET.
+        *
+        *   - FOR UPDATE: Boolean: lock the returned rows so that they can't be
+        *     changed until the next COMMIT.
+        *
+        *   - DISTINCT: Boolean: return only unique result rows.
+        *
+        *   - GROUP BY: May be either an SQL fragment string naming a field or
+        *     expression to group by, or an array of such SQL fragments.
+        *
+        *   - HAVING: May be either an string containing a HAVING clause or an array of
+        *     conditions building the HAVING clause. If an array is given, the conditions
+        *     constructed from each element are combined with AND.
+        *
+        *   - ORDER BY: May be either an SQL fragment giving a field name or
+        *     expression to order by, or an array of such SQL fragments.
+        *
+        *   - USE INDEX: This may be either a string giving the index name to use
+        *     for the query, or an array. If it is an associative array, each key
+        *     gives the table name (or alias), each value gives the index name to
+        *     use for that table. All strings are SQL fragments and so should be
+        *     validated by the caller.
+        *
+        *   - EXPLAIN: In MySQL, this causes an EXPLAIN SELECT query to be run,
+        *     instead of SELECT.
+        *
+        * And also the following boolean MySQL extensions, see the MySQL manual
+        * for documentation:
+        *
+        *    - LOCK IN SHARE MODE
+        *    - STRAIGHT_JOIN
+        *    - HIGH_PRIORITY
+        *    - SQL_BIG_RESULT
+        *    - SQL_BUFFER_RESULT
+        *    - SQL_SMALL_RESULT
+        *    - SQL_CALC_FOUND_ROWS
+        *    - SQL_CACHE
+        *    - SQL_NO_CACHE
+        *
+        *
+        * @param string|array $join_conds
+        *
+        * Optional associative array of table-specific join conditions. In the
+        * most common case, this is unnecessary, since the join condition can be
+        * in $conds. However, it is useful for doing a LEFT JOIN.
+        *
+        * The key of the array contains the table name or alias. The value is an
+        * array with two elements, numbered 0 and 1. The first gives the type of
+        * join, the second is the same as the $conds parameter. Thus it can be
+        * an SQL fragment, or an array where the string keys are equality and the
+        * numeric keys are SQL fragments all AND'd together. For example:
+        *
+        *    [ 'page' => [ 'LEFT JOIN', 'page_latest=rev_id' ] ]
+        *
+        * @return ResultWrapper|bool If the query returned no rows, a ResultWrapper
+        *   with no rows in it will be returned. If there was a query error, a
+        *   DBQueryError exception will be thrown, except if the "ignore errors"
+        *   option was set, in which case false will be returned.
+        */
+       public function select(
+               $table, $vars, $conds = '', $fname = __METHOD__,
+               $options = [], $join_conds = []
+       );
+
+       /**
+        * The equivalent of IDatabase::select() except that the constructed SQL
+        * is returned, instead of being immediately executed. This can be useful for
+        * doing UNION queries, where the SQL text of each query is needed. In general,
+        * however, callers outside of Database classes should just use select().
+        *
+        * @param string|array $table Table name
+        * @param string|array $vars Field names
+        * @param string|array $conds Conditions
+        * @param string $fname Caller function name
+        * @param string|array $options Query options
+        * @param string|array $join_conds Join conditions
+        *
+        * @return string SQL query string.
+        * @see IDatabase::select()
+        */
+       public function selectSQLText(
+               $table, $vars, $conds = '', $fname = __METHOD__,
+               $options = [], $join_conds = []
+       );
+
+       /**
+        * Single row SELECT wrapper. Equivalent to IDatabase::select(), except
+        * that a single row object is returned. If the query returns no rows,
+        * false is returned.
+        *
+        * @param string|array $table Table name
+        * @param string|array $vars Field names
+        * @param array $conds Conditions
+        * @param string $fname Caller function name
+        * @param string|array $options Query options
+        * @param array|string $join_conds Join conditions
+        *
+        * @return stdClass|bool
+        */
+       public function selectRow( $table, $vars, $conds, $fname = __METHOD__,
+               $options = [], $join_conds = []
+       );
+
+       /**
+        * Estimate the number of rows in dataset
+        *
+        * MySQL allows you to estimate the number of rows that would be returned
+        * by a SELECT query, using EXPLAIN SELECT. The estimate is provided using
+        * index cardinality statistics, and is notoriously inaccurate, especially
+        * when large numbers of rows have recently been added or deleted.
+        *
+        * For DBMSs that don't support fast result size estimation, this function
+        * will actually perform the SELECT COUNT(*).
+        *
+        * Takes the same arguments as IDatabase::select().
+        *
+        * @param string $table Table name
+        * @param string $vars Unused
+        * @param array|string $conds Filters on the table
+        * @param string $fname Function name for profiling
+        * @param array $options Options for select
+        * @return int Row count
+        */
+       public function estimateRowCount(
+               $table, $vars = '*', $conds = '', $fname = __METHOD__, $options = []
+       );
+
+       /**
+        * Get the number of rows in dataset
+        *
+        * This is useful when trying to do COUNT(*) but with a LIMIT for performance.
+        *
+        * Takes the same arguments as IDatabase::select().
+        *
+        * @since 1.27 Added $join_conds parameter
+        *
+        * @param array|string $tables Table names
+        * @param string $vars Unused
+        * @param array|string $conds Filters on the table
+        * @param string $fname Function name for profiling
+        * @param array $options Options for select
+        * @param array $join_conds Join conditions (since 1.27)
+        * @return int Row count
+        */
+       public function selectRowCount(
+               $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
+       );
+
+       /**
+        * Determines whether a field exists in a table
+        *
+        * @param string $table Table name
+        * @param string $field Filed to check on that table
+        * @param string $fname Calling function name (optional)
+        * @return bool Whether $table has filed $field
+        */
+       public function fieldExists( $table, $field, $fname = __METHOD__ );
+
+       /**
+        * Determines whether an index exists
+        * Usually throws a DBQueryError on failure
+        * If errors are explicitly ignored, returns NULL on failure
+        *
+        * @param string $table
+        * @param string $index
+        * @param string $fname
+        * @return bool|null
+        */
+       public function indexExists( $table, $index, $fname = __METHOD__ );
+
+       /**
+        * Query whether a given table exists
+        *
+        * @param string $table
+        * @param string $fname
+        * @return bool
+        */
+       public function tableExists( $table, $fname = __METHOD__ );
+
+       /**
+        * Determines if a given index is unique
+        *
+        * @param string $table
+        * @param string $index
+        *
+        * @return bool
+        */
+       public function indexUnique( $table, $index );
+
+       /**
+        * INSERT wrapper, inserts an array into a table.
+        *
+        * $a may be either:
+        *
+        *   - A single associative array. The array keys are the field names, and
+        *     the values are the values to insert. The values are treated as data
+        *     and will be quoted appropriately. If NULL is inserted, this will be
+        *     converted to a database NULL.
+        *   - An array with numeric keys, holding a list of associative arrays.
+        *     This causes a multi-row INSERT on DBMSs that support it. The keys in
+        *     each subarray must be identical to each other, and in the same order.
+        *
+        * Usually throws a DBQueryError on failure. If errors are explicitly ignored,
+        * returns success.
+        *
+        * $options is an array of options, with boolean options encoded as values
+        * with numeric keys, in the same style as $options in
+        * IDatabase::select(). Supported options are:
+        *
+        *   - IGNORE: Boolean: if present, duplicate key errors are ignored, and
+        *     any rows which cause duplicate key errors are not inserted. It's
+        *     possible to determine how many rows were successfully inserted using
+        *     IDatabase::affectedRows().
+        *
+        * @param string $table Table name. This will be passed through
+        *   Database::tableName().
+        * @param array $a Array of rows to insert
+        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
+        * @param array $options Array of options
+        *
+        * @return bool
+        */
+       public function insert( $table, $a, $fname = __METHOD__, $options = [] );
+
+       /**
+        * UPDATE wrapper. Takes a condition array and a SET array.
+        *
+        * @param string $table Name of the table to UPDATE. This will be passed through
+        *   Database::tableName().
+        * @param array $values An array of values to SET. For each array element,
+        *   the key gives the field name, and the value gives the data to set
+        *   that field to. The data will be quoted by IDatabase::addQuotes().
+        * @param array $conds An array of conditions (WHERE). See
+        *   IDatabase::select() for the details of the format of condition
+        *   arrays. Use '*' to update all rows.
+        * @param string $fname The function name of the caller (from __METHOD__),
+        *   for logging and profiling.
+        * @param array $options An array of UPDATE options, can be:
+        *   - IGNORE: Ignore unique key conflicts
+        *   - LOW_PRIORITY: MySQL-specific, see MySQL manual.
+        * @return bool
+        */
+       public function update( $table, $values, $conds, $fname = __METHOD__, $options = [] );
+
+       /**
+        * Makes an encoded list of strings from an array
+        *
+        * These can be used to make conjunctions or disjunctions on SQL condition strings
+        * derived from an array (see IDatabase::select() $conds documentation).
+        *
+        * Example usage:
+        * @code
+        *     $sql = $db->makeList( [
+        *         'rev_user' => $id,
+        *         $db->makeList( [ 'rev_minor' => 1, 'rev_len' < 500 ], $db::LIST_OR ] )
+        *     ], $db::LIST_AND );
+        * @endcode
+        * This would set $sql to "rev_user = '$id' AND (rev_minor = '1' OR rev_len < '500')"
+        *
+        * @param array $a Containing the data
+        * @param int $mode IDatabase class constant:
+        *    - IDatabase::LIST_COMMA: Comma separated, no field names
+        *    - IDatabase::LIST_AND:   ANDed WHERE clause (without the WHERE).
+        *    - IDatabase::LIST_OR:    ORed WHERE clause (without the WHERE)
+        *    - IDatabase::LIST_SET:   Comma separated with field names, like a SET clause
+        *    - IDatabase::LIST_NAMES: Comma separated field names
+        * @throws DBError
+        * @return string
+        */
+       public function makeList( $a, $mode = self::LIST_COMMA );
+
+       /**
+        * Build a partial where clause from a 2-d array such as used for LinkBatch.
+        * The keys on each level may be either integers or strings.
+        *
+        * @param array $data Organized as 2-d
+        *    [ baseKeyVal => [ subKeyVal => [ignored], ... ], ... ]
+        * @param string $baseKey Field name to match the base-level keys to (eg 'pl_namespace')
+        * @param string $subKey Field name to match the sub-level keys to (eg 'pl_title')
+        * @return string|bool SQL fragment, or false if no items in array
+        */
+       public function makeWhereFrom2d( $data, $baseKey, $subKey );
+
+       /**
+        * Return aggregated value alias
+        *
+        * @param array $valuedata
+        * @param string $valuename
+        *
+        * @return string
+        */
+       public function aggregateValue( $valuedata, $valuename = 'value' );
+
+       /**
+        * @param string $field
+        * @return string
+        */
+       public function bitNot( $field );
+
+       /**
+        * @param string $fieldLeft
+        * @param string $fieldRight
+        * @return string
+        */
+       public function bitAnd( $fieldLeft, $fieldRight );
+
+       /**
+        * @param string $fieldLeft
+        * @param string $fieldRight
+        * @return string
+        */
+       public function bitOr( $fieldLeft, $fieldRight );
+
+       /**
+        * Build a concatenation list to feed into a SQL query
+        * @param array $stringList List of raw SQL expressions; caller is
+        *   responsible for any quoting
+        * @return string
+        */
+       public function buildConcat( $stringList );
+
+       /**
+        * Build a GROUP_CONCAT or equivalent statement for a query.
+        *
+        * This is useful for combining a field for several rows into a single string.
+        * NULL values will not appear in the output, duplicated values will appear,
+        * and the resulting delimiter-separated values have no defined sort order.
+        * Code using the results may need to use the PHP unique() or sort() methods.
+        *
+        * @param string $delim Glue to bind the results together
+        * @param string|array $table Table name
+        * @param string $field Field name
+        * @param string|array $conds Conditions
+        * @param string|array $join_conds Join conditions
+        * @return string SQL text
+        * @since 1.23
+        */
+       public function buildGroupConcatField(
+               $delim, $table, $field, $conds = '', $join_conds = []
+       );
+
+       /**
+        * @param string $field Field or column to cast
+        * @return string
+        * @since 1.28
+        */
+       public function buildStringCast( $field );
+
+       /**
+        * Change the current database
+        *
+        * @param string $db
+        * @return bool Success or failure
+        */
+       public function selectDB( $db );
+
+       /**
+        * Get the current DB name
+        * @return string
+        */
+       public function getDBname();
+
+       /**
+        * Get the server hostname or IP address
+        * @return string
+        */
+       public function getServer();
+
+       /**
+        * Adds quotes and backslashes.
+        *
+        * @param string|int|null|bool|Blob $s
+        * @return string|int
+        */
+       public function addQuotes( $s );
+
+       /**
+        * LIKE statement wrapper, receives a variable-length argument list with
+        * parts of pattern to match containing either string literals that will be
+        * escaped or tokens returned by anyChar() or anyString(). Alternatively,
+        * the function could be provided with an array of aforementioned
+        * parameters.
+        *
+        * Example: $dbr->buildLike( 'My_page_title/', $dbr->anyString() ) returns
+        * a LIKE clause that searches for subpages of 'My page title'.
+        * Alternatively:
+        *   $pattern = [ 'My_page_title/', $dbr->anyString() ];
+        *   $query .= $dbr->buildLike( $pattern );
+        *
+        * @since 1.16
+        * @return string Fully built LIKE statement
+        */
+       public function buildLike();
+
+       /**
+        * Returns a token for buildLike() that denotes a '_' to be used in a LIKE query
+        *
+        * @return LikeMatch
+        */
+       public function anyChar();
+
+       /**
+        * Returns a token for buildLike() that denotes a '%' to be used in a LIKE query
+        *
+        * @return LikeMatch
+        */
+       public function anyString();
+
+       /**
+        * Returns an appropriately quoted sequence value for inserting a new row.
+        * MySQL has autoincrement fields, so this is just NULL. But the PostgreSQL
+        * subclass will return an integer, and save the value for insertId()
+        *
+        * Any implementation of this function should *not* involve reusing
+        * sequence numbers created for rolled-back transactions.
+        * See http://bugs.mysql.com/bug.php?id=30767 for details.
+        * @param string $seqName
+        * @return null|int
+        */
+       public function nextSequenceValue( $seqName );
+
+       /**
+        * REPLACE query wrapper.
+        *
+        * REPLACE is a very handy MySQL extension, which functions like an INSERT
+        * except that when there is a duplicate key error, the old row is deleted
+        * and the new row is inserted in its place.
+        *
+        * We simulate this with standard SQL with a DELETE followed by INSERT. To
+        * perform the delete, we need to know what the unique indexes are so that
+        * we know how to find the conflicting rows.
+        *
+        * It may be more efficient to leave off unique indexes which are unlikely
+        * to collide. However if you do this, you run the risk of encountering
+        * errors which wouldn't have occurred in MySQL.
+        *
+        * @param string $table The table to replace the row(s) in.
+        * @param array $uniqueIndexes Is an array of indexes. Each element may be either
+        *    a field name or an array of field names
+        * @param array $rows Can be either a single row to insert, or multiple rows,
+        *    in the same format as for IDatabase::insert()
+        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
+        */
+       public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ );
+
+       /**
+        * INSERT ON DUPLICATE KEY UPDATE wrapper, upserts an array into a table.
+        *
+        * This updates any conflicting rows (according to the unique indexes) using
+        * the provided SET clause and inserts any remaining (non-conflicted) rows.
+        *
+        * $rows may be either:
+        *   - A single associative array. The array keys are the field names, and
+        *     the values are the values to insert. The values are treated as data
+        *     and will be quoted appropriately. If NULL is inserted, this will be
+        *     converted to a database NULL.
+        *   - An array with numeric keys, holding a list of associative arrays.
+        *     This causes a multi-row INSERT on DBMSs that support it. The keys in
+        *     each subarray must be identical to each other, and in the same order.
+        *
+        * It may be more efficient to leave off unique indexes which are unlikely
+        * to collide. However if you do this, you run the risk of encountering
+        * errors which wouldn't have occurred in MySQL.
+        *
+        * Usually throws a DBQueryError on failure. If errors are explicitly ignored,
+        * returns success.
+        *
+        * @since 1.22
+        *
+        * @param string $table Table name. This will be passed through Database::tableName().
+        * @param array $rows A single row or list of rows to insert
+        * @param array $uniqueIndexes List of single field names or field name tuples
+        * @param array $set An array of values to SET. For each array element, the
+        *   key gives the field name, and the value gives the data to set that
+        *   field to. The data will be quoted by IDatabase::addQuotes().
+        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
+        * @throws Exception
+        * @return bool
+        */
+       public function upsert(
+               $table, array $rows, array $uniqueIndexes, array $set, $fname = __METHOD__
+       );
+
+       /**
+        * DELETE where the condition is a join.
+        *
+        * MySQL overrides this to use a multi-table DELETE syntax, in other databases
+        * we use sub-selects
+        *
+        * For safety, an empty $conds will not delete everything. If you want to
+        * delete all rows where the join condition matches, set $conds='*'.
+        *
+        * DO NOT put the join condition in $conds.
+        *
+        * @param string $delTable The table to delete from.
+        * @param string $joinTable The other table.
+        * @param string $delVar The variable to join on, in the first table.
+        * @param string $joinVar The variable to join on, in the second table.
+        * @param array $conds Condition array of field names mapped to variables,
+        *   ANDed together in the WHERE clause
+        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
+        * @throws DBUnexpectedError
+        */
+       public function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds,
+               $fname = __METHOD__
+       );
+
+       /**
+        * DELETE query wrapper.
+        *
+        * @param array $table Table name
+        * @param string|array $conds Array of conditions. See $conds in IDatabase::select()
+        *   for the format. Use $conds == "*" to delete all rows
+        * @param string $fname Name of the calling function
+        * @throws DBUnexpectedError
+        * @return bool|ResultWrapper
+        */
+       public function delete( $table, $conds, $fname = __METHOD__ );
+
+       /**
+        * INSERT SELECT wrapper. Takes data from a SELECT query and inserts it
+        * into another table.
+        *
+        * @param string $destTable The table name to insert into
+        * @param string|array $srcTable May be either a table name, or an array of table names
+        *    to include in a join.
+        *
+        * @param array $varMap Must be an associative array of the form
+        *    [ 'dest1' => 'source1', ... ]. Source items may be literals
+        *    rather than field names, but strings should be quoted with
+        *    IDatabase::addQuotes()
+        *
+        * @param array $conds Condition array. See $conds in IDatabase::select() for
+        *    the details of the format of condition arrays. May be "*" to copy the
+        *    whole table.
+        *
+        * @param string $fname The function name of the caller, from __METHOD__
+        *
+        * @param array $insertOptions Options for the INSERT part of the query, see
+        *    IDatabase::insert() for details.
+        * @param array $selectOptions Options for the SELECT part of the query, see
+        *    IDatabase::select() for details.
+        *
+        * @return ResultWrapper
+        */
+       public function insertSelect( $destTable, $srcTable, $varMap, $conds,
+               $fname = __METHOD__,
+               $insertOptions = [], $selectOptions = []
+       );
+
+       /**
+        * Returns true if current database backend supports ORDER BY or LIMIT for separate subqueries
+        * within the UNION construct.
+        * @return bool
+        */
+       public function unionSupportsOrderAndLimit();
+
+       /**
+        * Construct a UNION query
+        * This is used for providing overload point for other DB abstractions
+        * not compatible with the MySQL syntax.
+        * @param array $sqls SQL statements to combine
+        * @param bool $all Use UNION ALL
+        * @return string SQL fragment
+        */
+       public function unionQueries( $sqls, $all );
+
+       /**
+        * Returns an SQL expression for a simple conditional. This doesn't need
+        * to be overridden unless CASE isn't supported in your DBMS.
+        *
+        * @param string|array $cond SQL expression which will result in a boolean value
+        * @param string $trueVal SQL expression to return if true
+        * @param string $falseVal SQL expression to return if false
+        * @return string SQL fragment
+        */
+       public function conditional( $cond, $trueVal, $falseVal );
+
+       /**
+        * Returns a comand for str_replace function in SQL query.
+        * Uses REPLACE() in MySQL
+        *
+        * @param string $orig Column to modify
+        * @param string $old Column to seek
+        * @param string $new Column to replace with
+        *
+        * @return string
+        */
+       public function strreplace( $orig, $old, $new );
+
+       /**
+        * Determines how long the server has been up
+        *
+        * @return int
+        */
+       public function getServerUptime();
+
+       /**
+        * Determines if the last failure was due to a deadlock
+        *
+        * @return bool
+        */
+       public function wasDeadlock();
+
+       /**
+        * Determines if the last failure was due to a lock timeout
+        *
+        * @return bool
+        */
+       public function wasLockTimeout();
+
+       /**
+        * Determines if the last query error was due to a dropped connection and should
+        * be dealt with by pinging the connection and reissuing the query.
+        *
+        * @return bool
+        */
+       public function wasErrorReissuable();
+
+       /**
+        * Determines if the last failure was due to the database being read-only.
+        *
+        * @return bool
+        */
+       public function wasReadOnlyError();
+
+       /**
+        * Wait for the replica DB to catch up to a given master position
+        *
+        * @param DBMasterPos $pos
+        * @param int $timeout The maximum number of seconds to wait for synchronisation
+        * @return int|null Zero if the replica DB was past that position already,
+        *   greater than zero if we waited for some period of time, less than
+        *   zero if it timed out, and null on error
+        */
+       public function masterPosWait( DBMasterPos $pos, $timeout );
+
+       /**
+        * Get the replication position of this replica DB
+        *
+        * @return DBMasterPos|bool False if this is not a replica DB.
+        */
+       public function getReplicaPos();
+
+       /**
+        * Get the position of this master
+        *
+        * @return DBMasterPos|bool False if this is not a master
+        */
+       public function getMasterPos();
+
+       /**
+        * @return bool Whether the DB is marked as read-only server-side
+        * @since 1.28
+        */
+       public function serverIsReadOnly();
+
+       /**
+        * Run a callback as soon as the current transaction commits or rolls back.
+        * An error is thrown if no transaction is pending. Queries in the function will run in
+        * AUTO-COMMIT mode unless there are begin() calls. Callbacks must commit any transactions
+        * that they begin.
+        *
+        * This is useful for combining cooperative locks and DB transactions.
+        *
+        * The callback takes one argument:
+        *   - How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_ROLLBACK)
+        *
+        * @param callable $callback
+        * @param string $fname Caller name
+        * @return mixed
+        * @since 1.28
+        */
+       public function onTransactionResolution( callable $callback, $fname = __METHOD__ );
+
+       /**
+        * Run a callback as soon as there is no transaction pending.
+        * If there is a transaction and it is rolled back, then the callback is cancelled.
+        * Queries in the function will run in AUTO-COMMIT mode unless there are begin() calls.
+        * Callbacks must commit any transactions that they begin.
+        *
+        * This is useful for updates to different systems or when separate transactions are needed.
+        * For example, one might want to enqueue jobs into a system outside the database, but only
+        * after the database is updated so that the jobs will see the data when they actually run.
+        * It can also be used for updates that easily cause deadlocks if locks are held too long.
+        *
+        * Updates will execute in the order they were enqueued.
+        *
+        * The callback takes one argument:
+        *   - How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_IDLE)
+        *
+        * @param callable $callback
+        * @param string $fname Caller name
+        * @since 1.20
+        */
+       public function onTransactionIdle( callable $callback, $fname = __METHOD__ );
+
+       /**
+        * Run a callback before the current transaction commits or now if there is none.
+        * If there is a transaction and it is rolled back, then the callback is cancelled.
+        * Callbacks must not start nor commit any transactions. If no transaction is active,
+        * then a transaction will wrap the callback.
+        *
+        * This is useful for updates that easily cause deadlocks if locks are held too long
+        * but where atomicity is strongly desired for these updates and some related updates.
+        *
+        * Updates will execute in the order they were enqueued.
+        *
+        * @param callable $callback
+        * @param string $fname Caller name
+        * @since 1.22
+        */
+       public function onTransactionPreCommitOrIdle( callable $callback, $fname = __METHOD__ );
+
+       /**
+        * Run a callback each time any transaction commits or rolls back
+        *
+        * The callback takes two arguments:
+        *   - IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_ROLLBACK
+        *   - This IDatabase object
+        * Callbacks must commit any transactions that they begin.
+        *
+        * Registering a callback here will not affect writesOrCallbacks() pending
+        *
+        * @param string $name Callback name
+        * @param callable|null $callback Use null to unset a listener
+        * @return mixed
+        * @since 1.28
+        */
+       public function setTransactionListener( $name, callable $callback = null );
+
+       /**
+        * Begin an atomic section of statements
+        *
+        * If a transaction has been started already, just keep track of the given
+        * section name to make sure the transaction is not committed pre-maturely.
+        * This function can be used in layers (with sub-sections), so use a stack
+        * to keep track of the different atomic sections. If there is no transaction,
+        * start one implicitly.
+        *
+        * The goal of this function is to create an atomic section of SQL queries
+        * without having to start a new transaction if it already exists.
+        *
+        * All atomic levels *must* be explicitly closed using IDatabase::endAtomic(),
+        * and any database transactions cannot be began or committed until all atomic
+        * levels are closed. There is no such thing as implicitly opening or closing
+        * an atomic section.
+        *
+        * @since 1.23
+        * @param string $fname
+        * @throws DBError
+        */
+       public function startAtomic( $fname = __METHOD__ );
+
+       /**
+        * Ends an atomic section of SQL statements
+        *
+        * Ends the next section of atomic SQL statements and commits the transaction
+        * if necessary.
+        *
+        * @since 1.23
+        * @see IDatabase::startAtomic
+        * @param string $fname
+        * @throws DBError
+        */
+       public function endAtomic( $fname = __METHOD__ );
+
+       /**
+        * Run a callback to do an atomic set of updates for this database
+        *
+        * The $callback takes the following arguments:
+        *   - This database object
+        *   - The value of $fname
+        *
+        * If any exception occurs in the callback, then rollback() will be called and the error will
+        * be re-thrown. It may also be that the rollback itself fails with an exception before then.
+        * In any case, such errors are expected to terminate the request, without any outside caller
+        * attempting to catch errors and commit anyway. Note that any rollback undoes all prior
+        * atomic section and uncommitted updates, which trashes the current request, requiring an
+        * error to be displayed.
+        *
+        * This can be an alternative to explicit startAtomic()/endAtomic() calls.
+        *
+        * @see Database::startAtomic
+        * @see Database::endAtomic
+        *
+        * @param string $fname Caller name (usually __METHOD__)
+        * @param callable $callback Callback that issues DB updates
+        * @return mixed $res Result of the callback (since 1.28)
+        * @throws DBError
+        * @throws RuntimeException
+        * @throws UnexpectedValueException
+        * @since 1.27
+        */
+       public function doAtomicSection( $fname, callable $callback );
+
+       /**
+        * Begin a transaction. If a transaction is already in progress,
+        * that transaction will be committed before the new transaction is started.
+        *
+        * Only call this from code with outer transcation scope.
+        * See https://www.mediawiki.org/wiki/Database_transactions for details.
+        * Nesting of transactions is not supported.
+        *
+        * Note that when the DBO_TRX flag is set (which is usually the case for web
+        * requests, but not for maintenance scripts), any previous database query
+        * will have started a transaction automatically.
+        *
+        * Nesting of transactions is not supported. Attempts to nest transactions
+        * will cause a warning, unless the current transaction was started
+        * automatically because of the DBO_TRX flag.
+        *
+        * @param string $fname Calling function name
+        * @param string $mode A situationally valid IDatabase::TRANSACTION_* constant [optional]
+        * @throws DBError
+        */
+       public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT );
+
+       /**
+        * Commits a transaction previously started using begin().
+        * If no transaction is in progress, a warning is issued.
+        *
+        * Only call this from code with outer transcation scope.
+        * See https://www.mediawiki.org/wiki/Database_transactions for details.
+        * Nesting of transactions is not supported.
+        *
+        * @param string $fname
+        * @param string $flush Flush flag, set to situationally valid IDatabase::FLUSHING_*
+        *   constant to disable warnings about explicitly committing implicit transactions,
+        *   or calling commit when no transaction is in progress.
+        *
+        *   This will trigger an exception if there is an ongoing explicit transaction.
+        *
+        *   Only set the flush flag if you are sure that these warnings are not applicable,
+        *   and no explicit transactions are open.
+        *
+        * @throws DBUnexpectedError
+        */
+       public function commit( $fname = __METHOD__, $flush = '' );
+
+       /**
+        * Rollback a transaction previously started using begin().
+        * If no transaction is in progress, a warning is issued.
+        *
+        * Only call this from code with outer transcation scope.
+        * See https://www.mediawiki.org/wiki/Database_transactions for details.
+        * Nesting of transactions is not supported. If a serious unexpected error occurs,
+        * throwing an Exception is preferrable, using a pre-installed error handler to trigger
+        * rollback (in any case, failure to issue COMMIT will cause rollback server-side).
+        *
+        * @param string $fname Calling function name
+        * @param string $flush Flush flag, set to a situationally valid IDatabase::FLUSHING_*
+        *   constant to disable warnings about calling rollback when no transaction is in
+        *   progress. This will silently break any ongoing explicit transaction. Only set the
+        *   flush flag if you are sure that it is safe to ignore these warnings in your context.
+        * @throws DBUnexpectedError
+        * @since 1.23 Added $flush parameter
+        */
+       public function rollback( $fname = __METHOD__, $flush = '' );
+
+       /**
+        * Commit any transaction but error out if writes or callbacks are pending
+        *
+        * This is intended for clearing out REPEATABLE-READ snapshots so that callers can
+        * see a new point-in-time of the database. This is useful when one of many transaction
+        * rounds finished and significant time will pass in the script's lifetime. It is also
+        * useful to call on a replica DB after waiting on replication to catch up to the master.
+        *
+        * @param string $fname Calling function name
+        * @throws DBUnexpectedError
+        * @since 1.28
+        */
+       public function flushSnapshot( $fname = __METHOD__ );
+
+       /**
+        * List all tables on the database
+        *
+        * @param string $prefix Only show tables with this prefix, e.g. mw_
+        * @param string $fname Calling function name
+        * @throws DBError
+        * @return array
+        */
+       public function listTables( $prefix = null, $fname = __METHOD__ );
+
+       /**
+        * Convert a timestamp in one of the formats accepted by wfTimestamp()
+        * to the format used for inserting into timestamp fields in this DBMS.
+        *
+        * The result is unquoted, and needs to be passed through addQuotes()
+        * before it can be included in raw SQL.
+        *
+        * @param string|int $ts
+        *
+        * @return string
+        */
+       public function timestamp( $ts = 0 );
+
+       /**
+        * Convert a timestamp in one of the formats accepted by wfTimestamp()
+        * to the format used for inserting into timestamp fields in this DBMS. If
+        * NULL is input, it is passed through, allowing NULL values to be inserted
+        * into timestamp fields.
+        *
+        * The result is unquoted, and needs to be passed through addQuotes()
+        * before it can be included in raw SQL.
+        *
+        * @param string|int $ts
+        *
+        * @return string
+        */
+       public function timestampOrNull( $ts = null );
+
+       /**
+        * Ping the server and try to reconnect if it there is no connection
+        *
+        * @param float|null &$rtt Value to store the estimated RTT [optional]
+        * @return bool Success or failure
+        */
+       public function ping( &$rtt = null );
+
+       /**
+        * Get replica DB lag. Currently supported only by MySQL.
+        *
+        * Note that this function will generate a fatal error on many
+        * installations. Most callers should use LoadBalancer::safeGetLag()
+        * instead.
+        *
+        * @return int|bool Database replication lag in seconds or false on error
+        */
+       public function getLag();
+
+       /**
+        * Get the replica DB lag when the current transaction started
+        * or a general lag estimate if not transaction is active
+        *
+        * This is useful when transactions might use snapshot isolation
+        * (e.g. REPEATABLE-READ in innodb), so the "real" lag of that data
+        * is this lag plus transaction duration. If they don't, it is still
+        * safe to be pessimistic. In AUTO-COMMIT mode, this still gives an
+        * indication of the staleness of subsequent reads.
+        *
+        * @return array ('lag': seconds or false on error, 'since': UNIX timestamp of BEGIN)
+        * @since 1.27
+        */
+       public function getSessionLagStatus();
+
+       /**
+        * Return the maximum number of items allowed in a list, or 0 for unlimited.
+        *
+        * @return int
+        */
+       public function maxListLen();
+
+       /**
+        * Some DBMSs have a special format for inserting into blob fields, they
+        * don't allow simple quoted strings to be inserted. To insert into such
+        * a field, pass the data through this function before passing it to
+        * IDatabase::insert().
+        *
+        * @param string $b
+        * @return string
+        */
+       public function encodeBlob( $b );
+
+       /**
+        * Some DBMSs return a special placeholder object representing blob fields
+        * in result objects. Pass the object through this function to return the
+        * original string.
+        *
+        * @param string|Blob $b
+        * @return string
+        */
+       public function decodeBlob( $b );
+
+       /**
+        * Override database's default behavior. $options include:
+        *     'connTimeout' : Set the connection timeout value in seconds.
+        *                     May be useful for very long batch queries such as
+        *                     full-wiki dumps, where a single query reads out over
+        *                     hours or days.
+        *
+        * @param array $options
+        * @return void
+        */
+       public function setSessionOptions( array $options );
+
+       /**
+        * Set variables to be used in sourceFile/sourceStream, in preference to the
+        * ones in $GLOBALS. If an array is set here, $GLOBALS will not be used at
+        * all. If it's set to false, $GLOBALS will be used.
+        *
+        * @param bool|array $vars Mapping variable name to value.
+        */
+       public function setSchemaVars( $vars );
+
+       /**
+        * Check to see if a named lock is available (non-blocking)
+        *
+        * @param string $lockName Name of lock to poll
+        * @param string $method Name of method calling us
+        * @return bool
+        * @since 1.20
+        */
+       public function lockIsFree( $lockName, $method );
+
+       /**
+        * Acquire a named lock
+        *
+        * Named locks are not related to transactions
+        *
+        * @param string $lockName Name of lock to aquire
+        * @param string $method Name of the calling method
+        * @param int $timeout Acquisition timeout in seconds
+        * @return bool
+        */
+       public function lock( $lockName, $method, $timeout = 5 );
+
+       /**
+        * Release a lock
+        *
+        * Named locks are not related to transactions
+        *
+        * @param string $lockName Name of lock to release
+        * @param string $method Name of the calling method
+        *
+        * @return int Returns 1 if the lock was released, 0 if the lock was not established
+        * by this thread (in which case the lock is not released), and NULL if the named
+        * lock did not exist
+        */
+       public function unlock( $lockName, $method );
+
+       /**
+        * Acquire a named lock, flush any transaction, and return an RAII style unlocker object
+        *
+        * Only call this from outer transcation scope and when only one DB will be affected.
+        * See https://www.mediawiki.org/wiki/Database_transactions for details.
+        *
+        * This is suitiable for transactions that need to be serialized using cooperative locks,
+        * where each transaction can see each others' changes. Any transaction is flushed to clear
+        * out stale REPEATABLE-READ snapshot data. Once the returned object falls out of PHP scope,
+        * the lock will be released unless a transaction is active. If one is active, then the lock
+        * will be released when it either commits or rolls back.
+        *
+        * If the lock acquisition failed, then no transaction flush happens, and null is returned.
+        *
+        * @param string $lockKey Name of lock to release
+        * @param string $fname Name of the calling method
+        * @param int $timeout Acquisition timeout in seconds
+        * @return ScopedCallback|null
+        * @throws DBUnexpectedError
+        * @since 1.27
+        */
+       public function getScopedLockAndFlush( $lockKey, $fname, $timeout );
+
+       /**
+        * Check to see if a named lock used by lock() use blocking queues
+        *
+        * @return bool
+        * @since 1.26
+        */
+       public function namedLocksEnqueue();
+
+       /**
+        * Find out when 'infinity' is. Most DBMSes support this. This is a special
+        * keyword for timestamps in PostgreSQL, and works with CHAR(14) as well
+        * because "i" sorts after all numbers.
+        *
+        * @return string
+        */
+       public function getInfinity();
+
+       /**
+        * Encode an expiry time into the DBMS dependent format
+        *
+        * @param string $expiry Timestamp for expiry, or the 'infinity' string
+        * @return string
+        */
+       public function encodeExpiry( $expiry );
+
+       /**
+        * Decode an expiry time into a DBMS independent format
+        *
+        * @param string $expiry DB timestamp field value for expiry
+        * @param int $format TS_* constant, defaults to TS_MW
+        * @return string
+        */
+       public function decodeExpiry( $expiry, $format = TS_MW );
+
+       /**
+        * Allow or deny "big selects" for this session only. This is done by setting
+        * the sql_big_selects session variable.
+        *
+        * This is a MySQL-specific feature.
+        *
+        * @param bool|string $value True for allow, false for deny, or "default" to
+        *   restore the initial value
+        */
+       public function setBigSelects( $value = true );
+
+       /**
+        * @return bool Whether this DB is read-only
+        * @since 1.27
+        */
+       public function isReadOnly();
+
+       /**
+        * Make certain table names use their own database, schema, and table prefix
+        * when passed into SQL queries pre-escaped and without a qualified database name
+        *
+        * For example, "user" can be converted to "myschema.mydbname.user" for convenience.
+        * Appearances like `user`, somedb.user, somedb.someschema.user will used literally.
+        *
+        * Calling this twice will completely clear any old table aliases. Also, note that
+        * callers are responsible for making sure the schemas and databases actually exist.
+        *
+        * @param array[] $aliases Map of (table => (dbname, schema, prefix) map)
+        * @since 1.28
+        */
+       public function setTableAliases( array $aliases );
+}
diff --git a/includes/libs/rdbms/database/IMaintainableDatabase.php b/includes/libs/rdbms/database/IMaintainableDatabase.php
new file mode 100644 (file)
index 0000000..8395359
--- /dev/null
@@ -0,0 +1,189 @@
+<?php
+
+/**
+ * This file deals with database interface functions
+ * and query specifics/optimisations.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * Advanced database interface for IDatabase handles that include maintenance methods
+ *
+ * This is useful for type-hints used by installer, upgrader, and background scripts
+ * that will make use of lower-level and longer-running queries, including schema changes.
+ *
+ * @ingroup Database
+ * @since 1.28
+ */
+interface IMaintainableDatabase extends IDatabase {
+       /**
+        * Format a table name ready for use in constructing an SQL query
+        *
+        * This does two important things: it quotes the table names to clean them up,
+        * and it adds a table prefix if only given a table name with no quotes.
+        *
+        * All functions of this object which require a table name call this function
+        * themselves. Pass the canonical name to such functions. This is only needed
+        * when calling query() directly.
+        *
+        * @note This function does not sanitize user input. It is not safe to use
+        *   this function to escape user input.
+        * @param string $name Database table name
+        * @param string $format One of:
+        *   quoted - Automatically pass the table name through addIdentifierQuotes()
+        *            so that it can be used in a query.
+        *   raw - Do not add identifier quotes to the table name
+        * @return string Full database name
+        */
+       public function tableName( $name, $format = 'quoted' );
+
+       /**
+        * Fetch a number of table names into an array
+        * This is handy when you need to construct SQL for joins
+        *
+        * Example:
+        * extract( $dbr->tableNames( 'user', 'watchlist' ) );
+        * $sql = "SELECT wl_namespace,wl_title FROM $watchlist,$user
+        *         WHERE wl_user=user_id AND wl_user=$nameWithQuotes";
+        *
+        * @return array
+        */
+       public function tableNames();
+
+       /**
+        * Fetch a number of table names into an zero-indexed numerical array
+        * This is handy when you need to construct SQL for joins
+        *
+        * Example:
+        * list( $user, $watchlist ) = $dbr->tableNamesN( 'user', 'watchlist' );
+        * $sql = "SELECT wl_namespace,wl_title FROM $watchlist,$user
+        *         WHERE wl_user=user_id AND wl_user=$nameWithQuotes";
+        *
+        * @return array
+        */
+       public function tableNamesN();
+
+       /**
+        * Returns the size of a text field, or -1 for "unlimited"
+        *
+        * @param string $table
+        * @param string $field
+        * @return int
+        */
+       public function textFieldSize( $table, $field );
+
+       /**
+        * Read and execute SQL commands from a file.
+        *
+        * Returns true on success, error string or exception on failure (depending
+        * on object's error ignore settings).
+        *
+        * @param string $filename File name to open
+        * @param callable|null $lineCallback Optional function called before reading each line
+        * @param callable|null $resultCallback Optional function called for each MySQL result
+        * @param bool|string $fname Calling function name or false if name should be
+        *   generated dynamically using $filename
+        * @param callable|null $inputCallback Optional function called for each
+        *   complete line sent
+        * @return bool|string
+        * @throws Exception
+        */
+       public function sourceFile(
+               $filename,
+               callable $lineCallback = null,
+               callable $resultCallback = null,
+               $fname = false,
+               callable $inputCallback = null
+       );
+
+       /**
+        * Read and execute commands from an open file handle.
+        *
+        * Returns true on success, error string or exception on failure (depending
+        * on object's error ignore settings).
+        *
+        * @param resource $fp File handle
+        * @param callable|null $lineCallback Optional function called before reading each query
+        * @param callable|null $resultCallback Optional function called for each MySQL result
+        * @param string $fname Calling function name
+        * @param callable|null $inputCallback Optional function called for each complete query sent
+        * @return bool|string
+        */
+       public function sourceStream(
+               $fp,
+               callable $lineCallback = null,
+               callable $resultCallback = null,
+               $fname = __METHOD__,
+               callable $inputCallback = null
+       );
+
+       /**
+        * Called by sourceStream() to check if we've reached a statement end
+        *
+        * @param string &$sql SQL assembled so far
+        * @param string &$newLine New line about to be added to $sql
+        * @return bool Whether $newLine contains end of the statement
+        */
+       public function streamStatementEnd( &$sql, &$newLine );
+
+       /**
+        * Delete a table
+        * @param string $tableName
+        * @param string $fName
+        * @return bool|ResultWrapper
+        */
+       public function dropTable( $tableName, $fName = __METHOD__ );
+
+       /**
+        * Perform a deadlock-prone transaction.
+        *
+        * This function invokes a callback function to perform a set of write
+        * queries. If a deadlock occurs during the processing, the transaction
+        * will be rolled back and the callback function will be called again.
+        *
+        * Avoid using this method outside of Job or Maintenance classes.
+        *
+        * Usage:
+        *   $dbw->deadlockLoop( callback, ... );
+        *
+        * Extra arguments are passed through to the specified callback function.
+        * This method requires that no transactions are already active to avoid
+        * causing premature commits or exceptions.
+        *
+        * Returns whatever the callback function returned on its successful,
+        * iteration, or false on error, for example if the retry limit was
+        * reached.
+        *
+        * @return mixed
+        * @throws DBUnexpectedError
+        * @throws Exception
+        */
+       public function deadlockLoop();
+
+       /**
+        * Lists all the VIEWs in the database
+        *
+        * @param string $prefix Only show VIEWs with this prefix, eg. unit_test_
+        * @param string $fname Name of calling function
+        * @throws RuntimeException
+        * @return array
+        */
+       public function listViews( $prefix = null, $fname = __METHOD__ );
+}
diff --git a/includes/libs/rdbms/database/position/DBMasterPos.php b/includes/libs/rdbms/database/position/DBMasterPos.php
new file mode 100644 (file)
index 0000000..eda0ff3
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * An object representing a master or replica DB position in a replicated setup.
+ *
+ * The implementation details of this opaque type are up to the database subclass.
+ */
+interface DBMasterPos {
+       /**
+        * @return float UNIX timestamp
+        * @since 1.25
+        */
+       public function asOfTime();
+
+       /**
+        * @param DBMasterPos $pos
+        * @return bool Whether this position is at or higher than $pos
+        * @since 1.27
+        */
+       public function hasReached( DBMasterPos $pos );
+
+       /**
+        * @param DBMasterPos $pos
+        * @return bool Whether this position appears to be for the same channel as another
+        * @since 1.27
+        */
+       public function channelsMatch( DBMasterPos $pos );
+
+       /**
+        * @return string
+        * @since 1.27
+        */
+       public function __toString();
+}
diff --git a/includes/libs/rdbms/database/position/MySQLMasterPos.php b/includes/libs/rdbms/database/position/MySQLMasterPos.php
new file mode 100644 (file)
index 0000000..71fbe7e
--- /dev/null
@@ -0,0 +1,132 @@
+<?php
+/**
+ * DBMasterPos class for MySQL/MariaDB
+ *
+ * Note that master positions and sync logic here make some assumptions:
+ *  - Binlog-based usage assumes single-source replication and non-hierarchical replication.
+ *  - GTID-based usage allows getting/syncing with multi-source replication. It is assumed
+ *    that GTID sets are complete (e.g. include all domains on the server).
+ */
+class MySQLMasterPos implements DBMasterPos {
+       /** @var string Binlog file */
+       public $file;
+       /** @var int Binglog file position */
+       public $pos;
+       /** @var string[] GTID list */
+       public $gtids = [];
+       /** @var float UNIX timestamp */
+       public $asOfTime = 0.0;
+
+       /**
+        * @param string $file Binlog file name
+        * @param integer $pos Binlog position
+        * @param string $gtid Comma separated GTID set [optional]
+        */
+       function __construct( $file, $pos, $gtid = '' ) {
+               $this->file = $file;
+               $this->pos = $pos;
+               $this->gtids = array_map( 'trim', explode( ',', $gtid ) );
+               $this->asOfTime = microtime( true );
+       }
+
+       /**
+        * @return string <binlog file>/<position>, e.g db1034-bin.000976/843431247
+        */
+       function __toString() {
+               return "{$this->file}/{$this->pos}";
+       }
+
+       function asOfTime() {
+               return $this->asOfTime;
+       }
+
+       function hasReached( DBMasterPos $pos ) {
+               if ( !( $pos instanceof self ) ) {
+                       throw new InvalidArgumentException( "Position not an instance of " . __CLASS__ );
+               }
+
+               // Prefer GTID comparisons, which work with multi-tier replication
+               $thisPosByDomain = $this->getGtidCoordinates();
+               $thatPosByDomain = $pos->getGtidCoordinates();
+               if ( $thisPosByDomain && $thatPosByDomain ) {
+                       $reached = true;
+                       // Check that this has positions GTE all of those in $pos for all domains in $pos
+                       foreach ( $thatPosByDomain as $domain => $thatPos ) {
+                               $thisPos = isset( $thisPosByDomain[$domain] ) ? $thisPosByDomain[$domain] : -1;
+                               $reached = $reached && ( $thatPos <= $thisPos );
+                       }
+
+                       return $reached;
+               }
+
+               // Fallback to the binlog file comparisons
+               $thisBinPos = $this->getBinlogCoordinates();
+               $thatBinPos = $pos->getBinlogCoordinates();
+               if ( $thisBinPos && $thatBinPos && $thisBinPos['binlog'] === $thatBinPos['binlog'] ) {
+                       return ( $thisBinPos['pos'] >= $thatBinPos['pos'] );
+               }
+
+               // Comparing totally different binlogs does not make sense
+               return false;
+       }
+
+       function channelsMatch( DBMasterPos $pos ) {
+               if ( !( $pos instanceof self ) ) {
+                       throw new InvalidArgumentException( "Position not an instance of " . __CLASS__ );
+               }
+
+               // Prefer GTID comparisons, which work with multi-tier replication
+               $thisPosDomains = array_keys( $this->getGtidCoordinates() );
+               $thatPosDomains = array_keys( $pos->getGtidCoordinates() );
+               if ( $thisPosDomains && $thatPosDomains ) {
+                       // Check that this has GTIDs for all domains in $pos
+                       return !array_diff( $thatPosDomains, $thisPosDomains );
+               }
+
+               // Fallback to the binlog file comparisons
+               $thisBinPos = $this->getBinlogCoordinates();
+               $thatBinPos = $pos->getBinlogCoordinates();
+
+               return ( $thisBinPos && $thatBinPos && $thisBinPos['binlog'] === $thatBinPos['binlog'] );
+       }
+
+       /**
+        * @note: this returns false for multi-source replication GTID sets
+        * @see https://mariadb.com/kb/en/mariadb/gtid
+        * @see https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-concepts.html
+        * @return array Map of (domain => integer position) or false
+        */
+       protected function getGtidCoordinates() {
+               $gtidInfos = [];
+               foreach ( $this->gtids as $gtid ) {
+                       $m = [];
+                       // MariaDB style: <domain>-<server id>-<sequence number>
+                       if ( preg_match( '!^(\d+)-\d+-(\d+)$!', $gtid, $m ) ) {
+                               $gtidInfos[(int)$m[1]] = (int)$m[2];
+                               // MySQL style: <UUID domain>:<sequence number>
+                       } elseif ( preg_match( '!^(\w{8}-\w{4}-\w{4}-\w{4}-\w{12}):(\d+)$!', $gtid, $m ) ) {
+                               $gtidInfos[$m[1]] = (int)$m[2];
+                       } else {
+                               $gtidInfos = [];
+                               break; // unrecognized GTID
+                       }
+
+               }
+
+               return $gtidInfos;
+       }
+
+       /**
+        * @see http://dev.mysql.com/doc/refman/5.7/en/show-master-status.html
+        * @see http://dev.mysql.com/doc/refman/5.7/en/show-slave-status.html
+        * @return array|bool (binlog, (integer file number, integer position)) or false
+        */
+       protected function getBinlogCoordinates() {
+               $m = [];
+               if ( preg_match( '!^(.+)\.(\d+)/(\d+)$!', (string)$this, $m ) ) {
+                       return [ 'binlog' => $m[1], 'pos' => [ (int)$m[2], (int)$m[3] ] ];
+               }
+
+               return false;
+       }
+}
diff --git a/includes/libs/rdbms/database/resultwrapper/FakeResultWrapper.php b/includes/libs/rdbms/database/resultwrapper/FakeResultWrapper.php
new file mode 100644 (file)
index 0000000..1a046cf
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Overloads the relevant methods of the real ResultsWrapper so it
+ * doesn't go anywhere near an actual database.
+ */
+class FakeResultWrapper extends ResultWrapper {
+       /** @var $result stdClass[] */
+
+       /**
+        * @param stdClass[] $rows
+        */
+       function __construct( array $rows ) {
+               parent::__construct( null, $rows );
+       }
+
+       function numRows() {
+               return count( $this->result );
+       }
+
+       function fetchRow() {
+               if ( $this->pos < count( $this->result ) ) {
+                       $this->currentRow = $this->result[$this->pos];
+               } else {
+                       $this->currentRow = false;
+               }
+               $this->pos++;
+               if ( is_object( $this->currentRow ) ) {
+                       return get_object_vars( $this->currentRow );
+               } else {
+                       return $this->currentRow;
+               }
+       }
+
+       function seek( $row ) {
+               $this->pos = $row;
+       }
+
+       function free() {
+       }
+
+       function fetchObject() {
+               $this->fetchRow();
+               if ( $this->currentRow ) {
+                       return (object)$this->currentRow;
+               } else {
+                       return false;
+               }
+       }
+
+       function rewind() {
+               $this->pos = 0;
+               $this->currentRow = null;
+       }
+
+       function next() {
+               return $this->fetchObject();
+       }
+}
diff --git a/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php b/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php
new file mode 100644 (file)
index 0000000..b591f4f
--- /dev/null
@@ -0,0 +1,71 @@
+<?php
+class MssqlResultWrapper extends ResultWrapper {
+       /** @var integer|null */
+       private $mSeekTo = null;
+
+       /**
+        * @return stdClass|bool
+        */
+       public function fetchObject() {
+               $res = $this->result;
+
+               if ( $this->mSeekTo !== null ) {
+                       $result = sqlsrv_fetch_object( $res, 'stdClass', [],
+                               SQLSRV_SCROLL_ABSOLUTE, $this->mSeekTo );
+                       $this->mSeekTo = null;
+               } else {
+                       $result = sqlsrv_fetch_object( $res );
+               }
+
+               // Return boolean false when there are no more rows instead of null
+               if ( $result === null ) {
+                       return false;
+               }
+
+               return $result;
+       }
+
+       /**
+        * @return array|bool
+        */
+       public function fetchRow() {
+               $res = $this->result;
+
+               if ( $this->mSeekTo !== null ) {
+                       $result = sqlsrv_fetch_array( $res, SQLSRV_FETCH_BOTH,
+                               SQLSRV_SCROLL_ABSOLUTE, $this->mSeekTo );
+                       $this->mSeekTo = null;
+               } else {
+                       $result = sqlsrv_fetch_array( $res );
+               }
+
+               // Return boolean false when there are no more rows instead of null
+               if ( $result === null ) {
+                       return false;
+               }
+
+               return $result;
+       }
+
+       /**
+        * @param int $row
+        * @return bool
+        */
+       public function seek( $row ) {
+               $res = $this->result;
+
+               // check bounds
+               $numRows = $this->db->numRows( $res );
+               $row = intval( $row );
+
+               if ( $numRows === 0 ) {
+                       return false;
+               } elseif ( $row < 0 || $row > $numRows - 1 ) {
+                       return false;
+               }
+
+               // Unlike MySQL, the seek actually happens on the next access
+               $this->mSeekTo = $row;
+               return true;
+       }
+}
diff --git a/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php b/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php
new file mode 100644 (file)
index 0000000..53109c8
--- /dev/null
@@ -0,0 +1,155 @@
+<?php
+/**
+ * Result wrapper for grabbing data queried from an IDatabase object
+ *
+ * Note that using the Iterator methods in combination with the non-Iterator
+ * DB result iteration functions may cause rows to be skipped or repeated.
+ *
+ * By default, this will use the iteration methods of the IDatabase handle if provided.
+ * Subclasses can override methods to make it solely work on the result resource instead.
+ * If no database is provided, and the subclass does not override the DB iteration methods,
+ * then a RuntimeException will be thrown when iteration is attempted.
+ *
+ * The result resource field should not be accessed from non-Database related classes.
+ * It is database class specific and is stored here to associate iterators with queries.
+ *
+ * @ingroup Database
+ */
+class ResultWrapper implements Iterator {
+       /** @var resource|array|null Optional underlying result handle for subclass usage */
+       public $result;
+
+       /** @var IDatabase|null */
+       protected $db;
+
+       /** @var int */
+       protected $pos = 0;
+       /** @var stdClass|null */
+       protected $currentRow = null;
+
+       /**
+        * Create a row iterator from a result resource and an optional Database object
+        *
+        * Only Database-related classes should construct ResultWrapper. Other code may
+        * use the FakeResultWrapper subclass for convenience or compatibility shims, however.
+        *
+        * @param IDatabase|null $db Optional database handle
+        * @param ResultWrapper|array|resource $result Optional underlying result handle
+        */
+       public function __construct( IDatabase $db = null, $result ) {
+               $this->db = $db;
+               if ( $result instanceof ResultWrapper ) {
+                       $this->result = $result->result;
+               } else {
+                       $this->result = $result;
+               }
+       }
+
+       /**
+        * Get the number of rows in a result object
+        *
+        * @return int
+        */
+       public function numRows() {
+               return $this->getDB()->numRows( $this );
+       }
+
+       /**
+        * Fetch the next row from the given result object, in object form. Fields can be retrieved with
+        * $row->fieldname, with fields acting like member variables. If no more rows are available,
+        * false is returned.
+        *
+        * @return stdClass|bool
+        * @throws DBUnexpectedError Thrown if the database returns an error
+        */
+       public function fetchObject() {
+               return $this->getDB()->fetchObject( $this );
+       }
+
+       /**
+        * Fetch the next row from the given result object, in associative array form. Fields are
+        * retrieved with $row['fieldname']. If no more rows are available, false is returned.
+        *
+        * @return array|bool
+        * @throws DBUnexpectedError Thrown if the database returns an error
+        */
+       public function fetchRow() {
+               return $this->getDB()->fetchRow( $this );
+       }
+
+       /**
+        * Change the position of the cursor in a result object.
+        * See mysql_data_seek()
+        *
+        * @param int $row
+        */
+       public function seek( $row ) {
+               $this->getDB()->dataSeek( $this, $row );
+       }
+
+       /**
+        * Free a result object
+        *
+        * This either saves memory in PHP (buffered queries) or on the server (unbuffered queries).
+        * In general, queries are not large enough in result sets for this to be worth calling.
+        */
+       public function free() {
+               if ( $this->db ) {
+                       $this->db->freeResult( $this );
+                       $this->db = null;
+               }
+               $this->result = null;
+       }
+
+       /**
+        * @return IDatabase
+        * @throws RuntimeException
+        */
+       private function getDB() {
+               if ( !$this->db ) {
+                       throw new RuntimeException( get_class( $this ) . ' needs a DB handle for iteration.' );
+               }
+
+               return $this->db;
+       }
+
+       function rewind() {
+               if ( $this->numRows() ) {
+                       $this->getDB()->dataSeek( $this, 0 );
+               }
+               $this->pos = 0;
+               $this->currentRow = null;
+       }
+
+       /**
+        * @return stdClass|array|bool
+        */
+       function current() {
+               if ( is_null( $this->currentRow ) ) {
+                       $this->next();
+               }
+
+               return $this->currentRow;
+       }
+
+       /**
+        * @return int
+        */
+       function key() {
+               return $this->pos;
+       }
+
+       /**
+        * @return stdClass
+        */
+       function next() {
+               $this->pos++;
+               $this->currentRow = $this->fetchObject();
+
+               return $this->currentRow;
+       }
+
+       function valid() {
+               return $this->current() !== false;
+       }
+}
diff --git a/includes/libs/rdbms/database/utils/SavepointPostgres.php b/includes/libs/rdbms/database/utils/SavepointPostgres.php
new file mode 100644 (file)
index 0000000..ec4d09f
--- /dev/null
@@ -0,0 +1,101 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+use Psr\Log\LoggerInterface;
+
+/**
+ * Manage savepoints within a transaction
+ * @ingroup Database
+ * @since 1.19
+ */
+class SavepointPostgres {
+       /** @var DatabasePostgres Establish a savepoint within a transaction */
+       protected $dbw;
+       /** @var LoggerInterface */
+       protected $logger;
+       /** @var int */
+       protected $id;
+       /** @var bool */
+       protected $didbegin;
+
+       /**
+        * @param DatabasePostgres $dbw
+        * @param int $id
+        * @param LoggerInterface $logger
+        */
+       public function __construct( DatabasePostgres $dbw, $id, LoggerInterface $logger ) {
+               $this->dbw = $dbw;
+               $this->logger = $logger;
+               $this->id = $id;
+               $this->didbegin = false;
+               /* If we are not in a transaction, we need to be for savepoint trickery */
+               if ( !$dbw->trxLevel() ) {
+                       $dbw->begin( "FOR SAVEPOINT", DatabasePostgres::TRANSACTION_INTERNAL );
+                       $this->didbegin = true;
+               }
+       }
+
+       public function __destruct() {
+               if ( $this->didbegin ) {
+                       $this->dbw->rollback();
+                       $this->didbegin = false;
+               }
+       }
+
+       public function commit() {
+               if ( $this->didbegin ) {
+                       $this->dbw->commit();
+                       $this->didbegin = false;
+               }
+       }
+
+       protected function query( $keyword, $msg_ok, $msg_failed ) {
+               if ( $this->dbw->doQuery( $keyword . " " . $this->id ) !== false ) {
+                       $this->logger->debug( sprintf( $msg_ok, $this->id ) );
+               } else {
+                       $this->logger->debug( sprintf( $msg_failed, $this->id ) );
+               }
+       }
+
+       public function savepoint() {
+               $this->query( "SAVEPOINT",
+                       "Transaction state: savepoint \"%s\" established.\n",
+                       "Transaction state: establishment of savepoint \"%s\" FAILED.\n"
+               );
+       }
+
+       public function release() {
+               $this->query( "RELEASE",
+                       "Transaction state: savepoint \"%s\" released.\n",
+                       "Transaction state: release of savepoint \"%s\" FAILED.\n"
+               );
+       }
+
+       public function rollback() {
+               $this->query( "ROLLBACK TO",
+                       "Transaction state: savepoint \"%s\" rolled back.\n",
+                       "Transaction state: rollback of savepoint \"%s\" FAILED.\n"
+               );
+       }
+
+       public function __toString() {
+               return (string)$this->id;
+       }
+}
diff --git a/includes/libs/rdbms/defines.php b/includes/libs/rdbms/defines.php
new file mode 100644 (file)
index 0000000..692a704
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+/**@{
+ * Database related constants
+ */
+define( 'DBO_DEBUG', IDatabase::DBO_DEBUG );
+define( 'DBO_NOBUFFER', IDatabase::DBO_NOBUFFER );
+define( 'DBO_IGNORE', IDatabase::DBO_IGNORE );
+define( 'DBO_TRX', IDatabase::DBO_TRX );
+define( 'DBO_DEFAULT', IDatabase::DBO_DEFAULT );
+define( 'DBO_PERSISTENT', IDatabase::DBO_PERSISTENT );
+define( 'DBO_SYSDBA', IDatabase::DBO_SYSDBA );
+define( 'DBO_DDLMODE', IDatabase::DBO_DDLMODE );
+define( 'DBO_SSL', IDatabase::DBO_SSL );
+define( 'DBO_COMPRESS', IDatabase::DBO_COMPRESS );
+/**@}*/
+
+/**@{
+ * Valid database indexes
+ * Operation-based indexes
+ */
+define( 'DB_REPLICA', ILoadBalancer::DB_REPLICA );
+define( 'DB_MASTER', ILoadBalancer::DB_MASTER );
+/**@}*/
diff --git a/includes/libs/rdbms/encasing/Blob.php b/includes/libs/rdbms/encasing/Blob.php
new file mode 100644 (file)
index 0000000..bd90330
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Utility class
+ * @ingroup Database
+ *
+ * This allows us to distinguish a blob from a normal string and an array of strings
+ */
+class Blob {
+       /** @var string */
+       protected $mData;
+
+       function __construct( $data ) {
+               $this->mData = $data;
+       }
+
+       function fetch() {
+               return $this->mData;
+       }
+}
diff --git a/includes/libs/rdbms/encasing/LikeMatch.php b/includes/libs/rdbms/encasing/LikeMatch.php
new file mode 100644 (file)
index 0000000..b0b3c87
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Used by Database::buildLike() to represent characters that have special
+ * meaning in SQL LIKE clauses and thus need no escaping. Don't instantiate it
+ * manually, use Database::anyChar() and anyString() instead.
+ */
+class LikeMatch {
+       /** @var string */
+       private $str;
+
+       /**
+        * Store a string into a LikeMatch marker object.
+        *
+        * @param string $s
+        */
+       public function __construct( $s ) {
+               $this->str = $s;
+       }
+
+       /**
+        * Return the original stored string.
+        *
+        * @return string
+        */
+       public function toString() {
+               return $this->str;
+       }
+}
diff --git a/includes/libs/rdbms/encasing/MssqlBlob.php b/includes/libs/rdbms/encasing/MssqlBlob.php
new file mode 100644 (file)
index 0000000..35be65c
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+class MssqlBlob extends Blob {
+       public function __construct( $data ) {
+               if ( $data instanceof MssqlBlob ) {
+                       return $data;
+               } elseif ( $data instanceof Blob ) {
+                       $this->mData = $data->fetch();
+               } elseif ( is_array( $data ) && is_object( $data ) ) {
+                       $this->mData = serialize( $data );
+               } else {
+                       $this->mData = $data;
+               }
+       }
+
+       /**
+        * Returns an unquoted hex representation of a binary string
+        * for insertion into varbinary-type fields
+        * @return string
+        */
+       public function fetch() {
+               if ( $this->mData === null ) {
+                       return 'null';
+               }
+
+               $ret = '0x';
+               $dataLength = strlen( $this->mData );
+               for ( $i = 0; $i < $dataLength; $i++ ) {
+                       $ret .= bin2hex( pack( 'C', ord( $this->mData[$i] ) ) );
+               }
+
+               return $ret;
+       }
+}
diff --git a/includes/libs/rdbms/encasing/PostgresBlob.php b/includes/libs/rdbms/encasing/PostgresBlob.php
new file mode 100644 (file)
index 0000000..cc52336
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+class PostgresBlob extends Blob {
+
+}
diff --git a/includes/libs/rdbms/exception/DBAccessError.php b/includes/libs/rdbms/exception/DBAccessError.php
new file mode 100644 (file)
index 0000000..c00082c
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * Exception class for attempted DB access
+ * @ingroup Database
+ */
+class DBAccessError extends DBUnexpectedError {
+       public function __construct() {
+               parent::__construct( "Database access has been disabled." );
+       }
+}
diff --git a/includes/libs/rdbms/exception/DBConnectionError.php b/includes/libs/rdbms/exception/DBConnectionError.php
new file mode 100644 (file)
index 0000000..47f8c96
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * @ingroup Database
+ */
+class DBConnectionError extends DBExpectedError {
+       /**
+        * @param IDatabase $db Object throwing the error
+        * @param string $error Error text
+        */
+       function __construct( IDatabase $db = null, $error = 'unknown error' ) {
+               $msg = 'Cannot access the database';
+               if ( trim( $error ) != '' ) {
+                       $msg .= ": $error";
+               }
+
+               parent::__construct( $db, $msg );
+       }
+}
diff --git a/includes/libs/rdbms/exception/DBError.php b/includes/libs/rdbms/exception/DBError.php
new file mode 100644 (file)
index 0000000..526596d
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * Database error base class
+ * @ingroup Database
+ */
+class DBError extends Exception {
+       /** @var IDatabase|null */
+       public $db;
+
+       /**
+        * Construct a database error
+        * @param IDatabase $db Object which threw the error
+        * @param string $error A simple error message to be used for debugging
+        */
+       function __construct( IDatabase $db = null, $error ) {
+               $this->db = $db;
+               parent::__construct( $error );
+       }
+}
diff --git a/includes/libs/rdbms/exception/DBExpectedError.php b/includes/libs/rdbms/exception/DBExpectedError.php
new file mode 100644 (file)
index 0000000..9e10884
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * Base class for the more common types of database errors. These are known to occur
+ * frequently, so we try to give friendly error messages for them.
+ *
+ * @ingroup Database
+ * @since 1.23
+ */
+class DBExpectedError extends DBError implements MessageSpecifier {
+       /** @var string[] Message parameters */
+       protected $params;
+
+       function __construct( IDatabase $db = null, $error, array $params = [] ) {
+               parent::__construct( $db, $error );
+               $this->params = $params;
+       }
+
+       public function getKey() {
+               return 'databaseerror-text';
+       }
+
+       public function getParams() {
+               return $this->params;
+       }
+}
diff --git a/includes/libs/rdbms/exception/DBQueryError.php b/includes/libs/rdbms/exception/DBQueryError.php
new file mode 100644 (file)
index 0000000..002d253
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * @ingroup Database
+ */
+class DBQueryError extends DBExpectedError {
+       /** @var string */
+       public $error;
+       /** @var integer */
+       public $errno;
+       /** @var string */
+       public $sql;
+       /** @var string */
+       public $fname;
+
+       /**
+        * @param IDatabase $db
+        * @param string $error
+        * @param int|string $errno
+        * @param string $sql
+        * @param string $fname
+        */
+       function __construct( IDatabase $db, $error, $errno, $sql, $fname ) {
+               if ( $db instanceof Database && $db->wasConnectionError( $errno ) ) {
+                       $message = "A connection error occured. \n" .
+                               "Query: $sql\n" .
+                               "Function: $fname\n" .
+                               "Error: $errno $error\n";
+               } else {
+                       $message = "A database query error has occurred. Did you forget to run " .
+                               "your application's database schema updater after upgrading? \n" .
+                               "Query: $sql\n" .
+                               "Function: $fname\n" .
+                               "Error: $errno $error\n";
+               }
+
+               parent::__construct( $db, $message );
+
+               $this->error = $error;
+               $this->errno = $errno;
+               $this->sql = $sql;
+               $this->fname = $fname;
+       }
+}
diff --git a/includes/libs/rdbms/exception/DBReadOnlyError.php b/includes/libs/rdbms/exception/DBReadOnlyError.php
new file mode 100644 (file)
index 0000000..d4dce1e
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * @ingroup Database
+ */
+class DBReadOnlyError extends DBExpectedError {
+}
diff --git a/includes/libs/rdbms/exception/DBReplicationWaitError.php b/includes/libs/rdbms/exception/DBReplicationWaitError.php
new file mode 100644 (file)
index 0000000..f1dabd5
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * Exception class for replica DB wait timeouts
+ * @ingroup Database
+ */
+class DBReplicationWaitError extends DBExpectedError {
+}
+
diff --git a/includes/libs/rdbms/exception/DBTransactionError.php b/includes/libs/rdbms/exception/DBTransactionError.php
new file mode 100644 (file)
index 0000000..a488667
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * @ingroup Database
+ */
+class DBTransactionError extends DBExpectedError {
+}
diff --git a/includes/libs/rdbms/exception/DBTransactionSizeError.php b/includes/libs/rdbms/exception/DBTransactionSizeError.php
new file mode 100644 (file)
index 0000000..4e467b2
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * @ingroup Database
+ */
+class DBTransactionSizeError extends DBTransactionError {
+       function getKey() {
+               return 'transaction-duration-limit-exceeded';
+       }
+}
diff --git a/includes/libs/rdbms/exception/DBUnexpectedError.php b/includes/libs/rdbms/exception/DBUnexpectedError.php
new file mode 100644 (file)
index 0000000..5a12671
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * @ingroup Database
+ */
+class DBUnexpectedError extends DBError {
+}
diff --git a/includes/libs/rdbms/field/Field.php b/includes/libs/rdbms/field/Field.php
new file mode 100644 (file)
index 0000000..ed102f4
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Base for all database-specific classes representing information about database fields
+ * @ingroup Database
+ */
+interface Field {
+       /**
+        * Field name
+        * @return string
+        */
+       function name();
+
+       /**
+        * Name of table this field belongs to
+        * @return string
+        */
+       function tableName();
+
+       /**
+        * Database type
+        * @return string
+        */
+       function type();
+
+       /**
+        * Whether this field can store NULL values
+        * @return bool
+        */
+       function isNullable();
+}
diff --git a/includes/libs/rdbms/field/MssqlField.php b/includes/libs/rdbms/field/MssqlField.php
new file mode 100644 (file)
index 0000000..80e1924
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+class MssqlField implements Field {
+       private $name, $tableName, $default, $max_length, $nullable, $type;
+
+       function __construct( $info ) {
+               $this->name = $info['COLUMN_NAME'];
+               $this->tableName = $info['TABLE_NAME'];
+               $this->default = $info['COLUMN_DEFAULT'];
+               $this->max_length = $info['CHARACTER_MAXIMUM_LENGTH'];
+               $this->nullable = !( strtolower( $info['IS_NULLABLE'] ) == 'no' );
+               $this->type = $info['DATA_TYPE'];
+       }
+
+       function name() {
+               return $this->name;
+       }
+
+       function tableName() {
+               return $this->tableName;
+       }
+
+       function defaultValue() {
+               return $this->default;
+       }
+
+       function maxLength() {
+               return $this->max_length;
+       }
+
+       function isNullable() {
+               return $this->nullable;
+       }
+
+       function type() {
+               return $this->type;
+       }
+}
+
diff --git a/includes/libs/rdbms/field/MySQLField.php b/includes/libs/rdbms/field/MySQLField.php
new file mode 100644 (file)
index 0000000..8cf964c
--- /dev/null
@@ -0,0 +1,106 @@
+<?php
+class MySQLField implements Field {
+       private $name, $tablename, $default, $max_length, $nullable,
+               $is_pk, $is_unique, $is_multiple, $is_key, $type, $binary,
+               $is_numeric, $is_blob, $is_unsigned, $is_zerofill;
+
+       function __construct( $info ) {
+               $this->name = $info->name;
+               $this->tablename = $info->table;
+               $this->default = $info->def;
+               $this->max_length = $info->max_length;
+               $this->nullable = !$info->not_null;
+               $this->is_pk = $info->primary_key;
+               $this->is_unique = $info->unique_key;
+               $this->is_multiple = $info->multiple_key;
+               $this->is_key = ( $this->is_pk || $this->is_unique || $this->is_multiple );
+               $this->type = $info->type;
+               $this->binary = isset( $info->binary ) ? $info->binary : false;
+               $this->is_numeric = isset( $info->numeric ) ? $info->numeric : false;
+               $this->is_blob = isset( $info->blob ) ? $info->blob : false;
+               $this->is_unsigned = isset( $info->unsigned ) ? $info->unsigned : false;
+               $this->is_zerofill = isset( $info->zerofill ) ? $info->zerofill : false;
+       }
+
+       /**
+        * @return string
+        */
+       function name() {
+               return $this->name;
+       }
+
+       /**
+        * @return string
+        */
+       function tableName() {
+               return $this->tablename;
+       }
+
+       /**
+        * @return string
+        */
+       function type() {
+               return $this->type;
+       }
+
+       /**
+        * @return bool
+        */
+       function isNullable() {
+               return $this->nullable;
+       }
+
+       function defaultValue() {
+               return $this->default;
+       }
+
+       /**
+        * @return bool
+        */
+       function isKey() {
+               return $this->is_key;
+       }
+
+       /**
+        * @return bool
+        */
+       function isMultipleKey() {
+               return $this->is_multiple;
+       }
+
+       /**
+        * @return bool
+        */
+       function isBinary() {
+               return $this->binary;
+       }
+
+       /**
+        * @return bool
+        */
+       function isNumeric() {
+               return $this->is_numeric;
+       }
+
+       /**
+        * @return bool
+        */
+       function isBlob() {
+               return $this->is_blob;
+       }
+
+       /**
+        * @return bool
+        */
+       function isUnsigned() {
+               return $this->is_unsigned;
+       }
+
+       /**
+        * @return bool
+        */
+       function isZerofill() {
+               return $this->is_zerofill;
+       }
+}
+
diff --git a/includes/libs/rdbms/field/ORAField.php b/includes/libs/rdbms/field/ORAField.php
new file mode 100644 (file)
index 0000000..e48310d
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+class ORAField implements Field {
+       private $name, $tablename, $default, $max_length, $nullable,
+               $is_pk, $is_unique, $is_multiple, $is_key, $type;
+
+       function __construct( $info ) {
+               $this->name = $info['column_name'];
+               $this->tablename = $info['table_name'];
+               $this->default = $info['data_default'];
+               $this->max_length = $info['data_length'];
+               $this->nullable = $info['not_null'];
+               $this->is_pk = isset( $info['prim'] ) && $info['prim'] == 1 ? 1 : 0;
+               $this->is_unique = isset( $info['uniq'] ) && $info['uniq'] == 1 ? 1 : 0;
+               $this->is_multiple = isset( $info['nonuniq'] ) && $info['nonuniq'] == 1 ? 1 : 0;
+               $this->is_key = ( $this->is_pk || $this->is_unique || $this->is_multiple );
+               $this->type = $info['data_type'];
+       }
+
+       function name() {
+               return $this->name;
+       }
+
+       function tableName() {
+               return $this->tablename;
+       }
+
+       function defaultValue() {
+               return $this->default;
+       }
+
+       function maxLength() {
+               return $this->max_length;
+       }
+
+       function isNullable() {
+               return $this->nullable;
+       }
+
+       function isKey() {
+               return $this->is_key;
+       }
+
+       function isMultipleKey() {
+               return $this->is_multiple;
+       }
+
+       function type() {
+               return $this->type;
+       }
+}
diff --git a/includes/libs/rdbms/field/PostgresField.php b/includes/libs/rdbms/field/PostgresField.php
new file mode 100644 (file)
index 0000000..36337e2
--- /dev/null
@@ -0,0 +1,107 @@
+<?php
+class PostgresField implements Field {
+       private $name, $tablename, $type, $nullable, $max_length, $deferred, $deferrable, $conname,
+               $has_default, $default;
+
+       /**
+        * @param DatabasePostgres $db
+        * @param string $table
+        * @param string $field
+        * @return null|PostgresField
+        */
+       static function fromText( $db, $table, $field ) {
+               $q = <<<SQL
+SELECT
+ attnotnull, attlen, conname AS conname,
+ atthasdef,
+ adsrc,
+ COALESCE(condeferred, 'f') AS deferred,
+ COALESCE(condeferrable, 'f') AS deferrable,
+ CASE WHEN typname = 'int2' THEN 'smallint'
+  WHEN typname = 'int4' THEN 'integer'
+  WHEN typname = 'int8' THEN 'bigint'
+  WHEN typname = 'bpchar' THEN 'char'
+ ELSE typname END AS typname
+FROM pg_class c
+JOIN pg_namespace n ON (n.oid = c.relnamespace)
+JOIN pg_attribute a ON (a.attrelid = c.oid)
+JOIN pg_type t ON (t.oid = a.atttypid)
+LEFT JOIN pg_constraint o ON (o.conrelid = c.oid AND a.attnum = ANY(o.conkey) AND o.contype = 'f')
+LEFT JOIN pg_attrdef d on c.oid=d.adrelid and a.attnum=d.adnum
+WHERE relkind = 'r'
+AND nspname=%s
+AND relname=%s
+AND attname=%s;
+SQL;
+
+               $table = $db->tableName( $table, 'raw' );
+               $res = $db->query(
+                       sprintf( $q,
+                               $db->addQuotes( $db->getCoreSchema() ),
+                               $db->addQuotes( $table ),
+                               $db->addQuotes( $field )
+                       )
+               );
+               $row = $db->fetchObject( $res );
+               if ( !$row ) {
+                       return null;
+               }
+               $n = new PostgresField;
+               $n->type = $row->typname;
+               $n->nullable = ( $row->attnotnull == 'f' );
+               $n->name = $field;
+               $n->tablename = $table;
+               $n->max_length = $row->attlen;
+               $n->deferrable = ( $row->deferrable == 't' );
+               $n->deferred = ( $row->deferred == 't' );
+               $n->conname = $row->conname;
+               $n->has_default = ( $row->atthasdef === 't' );
+               $n->default = $row->adsrc;
+
+               return $n;
+       }
+
+       function name() {
+               return $this->name;
+       }
+
+       function tableName() {
+               return $this->tablename;
+       }
+
+       function type() {
+               return $this->type;
+       }
+
+       function isNullable() {
+               return $this->nullable;
+       }
+
+       function maxLength() {
+               return $this->max_length;
+       }
+
+       function is_deferrable() {
+               return $this->deferrable;
+       }
+
+       function is_deferred() {
+               return $this->deferred;
+       }
+
+       function conname() {
+               return $this->conname;
+       }
+
+       /**
+        * @since 1.19
+        * @return bool|mixed
+        */
+       function defaultValue() {
+               if ( $this->has_default ) {
+                       return $this->default;
+               } else {
+                       return false;
+               }
+       }
+}
diff --git a/includes/libs/rdbms/field/SQLiteField.php b/includes/libs/rdbms/field/SQLiteField.php
new file mode 100644 (file)
index 0000000..0a2389b
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+class SQLiteField implements Field {
+       private $info, $tableName;
+
+       function __construct( $info, $tableName ) {
+               $this->info = $info;
+               $this->tableName = $tableName;
+       }
+
+       function name() {
+               return $this->info->name;
+       }
+
+       function tableName() {
+               return $this->tableName;
+       }
+
+       function defaultValue() {
+               if ( is_string( $this->info->dflt_value ) ) {
+                       // Typically quoted
+                       if ( preg_match( '/^\'(.*)\'$', $this->info->dflt_value ) ) {
+                               return str_replace( "''", "'", $this->info->dflt_value );
+                       }
+               }
+
+               return $this->info->dflt_value;
+       }
+
+       /**
+        * @return bool
+        */
+       function isNullable() {
+               return !$this->info->notnull;
+       }
+
+       function type() {
+               return $this->info->type;
+       }
+}
diff --git a/includes/libs/rdbms/lbfactory/ILBFactory.php b/includes/libs/rdbms/lbfactory/ILBFactory.php
new file mode 100644 (file)
index 0000000..ff1bd43
--- /dev/null
@@ -0,0 +1,297 @@
+<?php
+/**
+ * Generator and manager of database load balancing objects
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * An interface for generating database load balancers
+ * @ingroup Database
+ * @since 1.28
+ */
+interface ILBFactory {
+       const SHUTDOWN_NO_CHRONPROT = 0; // don't save DB positions at all
+       const SHUTDOWN_CHRONPROT_ASYNC = 1; // save DB positions, but don't wait on remote DCs
+       const SHUTDOWN_CHRONPROT_SYNC = 2; // save DB positions, waiting on all DCs
+
+       /**
+        * Construct a manager of ILoadBalancer objects
+        *
+        * Sub-classes will extend the required keys in $conf with additional parameters
+        *
+        * @param $conf $params Array with keys:
+        *  - localDomain: A DatabaseDomain or domain ID string.
+        *  - readOnlyReason : Reason the master DB is read-only if so [optional]
+        *  - srvCache : BagOStuff object for server cache [optional]
+        *  - memCache : BagOStuff object for cluster memory cache [optional]
+        *  - wanCache : WANObjectCache object [optional]
+        *  - hostname : The name of the current server [optional]
+        *  - cliMode: Whether the execution context is a CLI script. [optional]
+        *  - profiler : Class name or instance with profileIn()/profileOut() methods. [optional]
+        *  - trxProfiler: TransactionProfiler instance. [optional]
+        *  - replLogger: PSR-3 logger instance. [optional]
+        *  - connLogger: PSR-3 logger instance. [optional]
+        *  - queryLogger: PSR-3 logger instance. [optional]
+        *  - perfLogger: PSR-3 logger instance. [optional]
+        *  - errorLogger : Callback that takes an Exception and logs it. [optional]
+        * @throws InvalidArgumentException
+        */
+       public function __construct( array $conf );
+
+       /**
+        * Disables all load balancers. All connections are closed, and any attempt to
+        * open a new connection will result in a DBAccessError.
+        * @see ILoadBalancer::disable()
+        */
+       public function destroy();
+
+       /**
+        * Create a new load balancer object. The resulting object will be untracked,
+        * not chronology-protected, and the caller is responsible for cleaning it up.
+        *
+        * This method is for only advanced usage and callers should almost always use
+        * getMainLB() instead. This method can be useful when a table is used as a key/value
+        * store. In that cases, one might want to query it in autocommit mode (DBO_TRX off)
+        * but still use DBO_TRX transaction rounds on other tables.
+        *
+        * @param bool|string $domain Domain ID, or false for the current domain
+        * @return ILoadBalancer
+        */
+       public function newMainLB( $domain = false );
+
+       /**
+        * Get a cached (tracked) load balancer object.
+        *
+        * @param bool|string $domain Domain ID, or false for the current domain
+        * @return ILoadBalancer
+        */
+       public function getMainLB( $domain = false );
+
+       /**
+        * Create a new load balancer for external storage. The resulting object will be
+        * untracked, not chronology-protected, and the caller is responsible for cleaning it up.
+        *
+        * This method is for only advanced usage and callers should almost always use
+        * getExternalLB() instead. This method can be useful when a table is used as a
+        * key/value store. In that cases, one might want to query it in autocommit mode
+        * (DBO_TRX off) but still use DBO_TRX transaction rounds on other tables.
+        *
+        * @param string $cluster External storage cluster name
+        * @return ILoadBalancer
+        */
+       public function newExternalLB( $cluster );
+
+       /**
+        * Get a cached (tracked) load balancer for external storage
+        *
+        * @param string $cluster External storage cluster name
+        * @return ILoadBalancer
+        */
+       public function getExternalLB( $cluster );
+
+       /**
+        * Execute a function for each tracked load balancer
+        * The callback is called with the load balancer as the first parameter,
+        * and $params passed as the subsequent parameters.
+        *
+        * @param callable $callback
+        * @param array $params
+        */
+       public function forEachLB( $callback, array $params = [] );
+
+       /**
+        * Prepare all tracked load balancers for shutdown
+        * @param integer $mode One of the class SHUTDOWN_* constants
+        * @param callable|null $workCallback Work to mask ChronologyProtector writes
+        */
+       public function shutdown(
+               $mode = self::SHUTDOWN_CHRONPROT_SYNC, callable $workCallback = null
+       );
+
+       /**
+        * Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshot
+        *
+        * @param string $fname Caller name
+        */
+       public function flushReplicaSnapshots( $fname = __METHOD__ );
+
+       /**
+        * Commit open transactions on all connections. This is useful for two main cases:
+        *   - a) To commit changes to the masters.
+        *   - b) To release the snapshot on all connections, master and replica DBs.
+        * @param string $fname Caller name
+        * @param array $options Options map:
+        *   - maxWriteDuration: abort if more than this much time was spent in write queries
+        */
+       public function commitAll( $fname = __METHOD__, array $options = [] );
+
+       /**
+        * Flush any master transaction snapshots and set DBO_TRX (if DBO_DEFAULT is set)
+        *
+        * The DBO_TRX setting will be reverted to the default in each of these methods:
+        *   - commitMasterChanges()
+        *   - rollbackMasterChanges()
+        *   - commitAll()
+        *
+        * This allows for custom transaction rounds from any outer transaction scope.
+        *
+        * @param string $fname
+        * @throws DBTransactionError
+        */
+       public function beginMasterChanges( $fname = __METHOD__ );
+
+       /**
+        * Commit changes on all master connections
+        * @param string $fname Caller name
+        * @param array $options Options map:
+        *   - maxWriteDuration: abort if more than this much time was spent in write queries
+        * @throws Exception
+        */
+       public function commitMasterChanges( $fname = __METHOD__, array $options = [] );
+
+       /**
+        * Rollback changes on all master connections
+        * @param string $fname Caller name
+        */
+       public function rollbackMasterChanges( $fname = __METHOD__ );
+
+       /**
+        * Determine if any master connection has pending changes
+        * @return bool
+        */
+       public function hasMasterChanges();
+
+       /**
+        * Detemine if any lagged replica DB connection was used
+        * @return bool
+        */
+       public function laggedReplicaUsed();
+
+       /**
+        * Determine if any master connection has pending/written changes from this request
+        * @param float $age How many seconds ago is "recent" [defaults to LB lag wait timeout]
+        * @return bool
+        */
+       public function hasOrMadeRecentMasterChanges( $age = null );
+
+       /**
+        * Waits for the replica DBs to catch up to the current master position
+        *
+        * Use this when updating very large numbers of rows, as in maintenance scripts,
+        * to avoid causing too much lag. Of course, this is a no-op if there are no replica DBs.
+        *
+        * By default this waits on all DB clusters actually used in this request.
+        * This makes sense when lag being waiting on is caused by the code that does this check.
+        * In that case, setting "ifWritesSince" can avoid the overhead of waiting for clusters
+        * that were not changed since the last wait check. To forcefully wait on a specific cluster
+        * for a given domain, use the 'domain' parameter. To forcefully wait on an "external" cluster,
+        * use the "cluster" parameter.
+        *
+        * Never call this function after a large DB write that is *still* in a transaction.
+        * It only makes sense to call this after the possible lag inducing changes were committed.
+        *
+        * @param array $opts Optional fields that include:
+        *   - domain : wait on the load balancer DBs that handles the given domain ID
+        *   - cluster : wait on the given external load balancer DBs
+        *   - timeout : Max wait time. Default: ~60 seconds
+        *   - ifWritesSince: Only wait if writes were done since this UNIX timestamp
+        * @throws DBReplicationWaitError If a timeout or error occured waiting on a DB cluster
+        */
+       public function waitForReplication( array $opts = [] );
+
+       /**
+        * Add a callback to be run in every call to waitForReplication() before waiting
+        *
+        * Callbacks must clear any transactions that they start
+        *
+        * @param string $name Callback name
+        * @param callable|null $callback Use null to unset a callback
+        */
+       public function setWaitForReplicationListener( $name, callable $callback = null );
+
+       /**
+        * Get a token asserting that no transaction writes are active
+        *
+        * @param string $fname Caller name (e.g. __METHOD__)
+        * @return mixed A value to pass to commitAndWaitForReplication()
+        */
+       public function getEmptyTransactionTicket( $fname );
+
+       /**
+        * Convenience method for safely running commitMasterChanges()/waitForReplication()
+        *
+        * This will commit and wait unless $ticket indicates it is unsafe to do so
+        *
+        * @param string $fname Caller name (e.g. __METHOD__)
+        * @param mixed $ticket Result of getEmptyTransactionTicket()
+        * @param array $opts Options to waitForReplication()
+        * @throws DBReplicationWaitError
+        */
+       public function commitAndWaitForReplication( $fname, $ticket, array $opts = [] );
+
+       /**
+        * @param string $dbName DB master name (e.g. "db1052")
+        * @return float|bool UNIX timestamp when client last touched the DB or false if not recent
+        */
+       public function getChronologyProtectorTouched( $dbName );
+
+       /**
+        * Disable the ChronologyProtector for all load balancers
+        *
+        * This can be called at the start of special API entry points
+        */
+       public function disableChronologyProtection();
+
+       /**
+        * Set a new table prefix for the existing local domain ID for testing
+        *
+        * @param string $prefix
+        */
+       public function setDomainPrefix( $prefix );
+
+       /**
+        * Close all open database connections on all open load balancers.
+        */
+       public function closeAll();
+
+       /**
+        * @param string $agent Agent name for query profiling
+        */
+       public function setAgentName( $agent );
+
+       /**
+        * Append ?cpPosTime parameter to a URL for ChronologyProtector purposes if needed
+        *
+        * Note that unlike cookies, this works accross domains
+        *
+        * @param string $url
+        * @param float $time UNIX timestamp just before shutdown() was called
+        * @return string
+        */
+       public function appendPreShutdownTimeAsQuery( $url, $time );
+
+       /**
+        * @param array $info Map of fields, including:
+        *   - IPAddress : IP address
+        *   - UserAgent : User-Agent HTTP header
+        *   - ChronologyProtection : cookie/header value specifying ChronologyProtector usage
+        */
+       public function setRequestInfo( array $info );
+}
diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php
new file mode 100644 (file)
index 0000000..d21289b
--- /dev/null
@@ -0,0 +1,570 @@
+<?php
+/**
+ * Generator and manager of database load balancing objects
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+use Psr\Log\LoggerInterface;
+use Wikimedia\ScopedCallback;
+
+/**
+ * An interface for generating database load balancers
+ * @ingroup Database
+ */
+abstract class LBFactory implements ILBFactory {
+       /** @var ChronologyProtector */
+       protected $chronProt;
+       /** @var object|string Class name or object With profileIn/profileOut methods */
+       protected $profiler;
+       /** @var TransactionProfiler */
+       protected $trxProfiler;
+       /** @var LoggerInterface */
+       protected $replLogger;
+       /** @var LoggerInterface */
+       protected $connLogger;
+       /** @var LoggerInterface */
+       protected $queryLogger;
+       /** @var LoggerInterface */
+       protected $perfLogger;
+       /** @var callable Error logger */
+       protected $errorLogger;
+       /** @var BagOStuff */
+       protected $srvCache;
+       /** @var BagOStuff */
+       protected $memCache;
+       /** @var WANObjectCache */
+       protected $wanCache;
+
+       /** @var DatabaseDomain Local domain */
+       protected $localDomain;
+       /** @var string Local hostname of the app server */
+       protected $hostname;
+       /** @var array Web request information about the client */
+       protected $requestInfo;
+
+       /** @var mixed */
+       protected $ticket;
+       /** @var string|bool String if a requested DBO_TRX transaction round is active */
+       protected $trxRoundId = false;
+       /** @var string|bool Reason all LBs are read-only or false if not */
+       protected $readOnlyReason = false;
+       /** @var callable[] */
+       protected $replicationWaitCallbacks = [];
+
+       /** @var bool Whether this PHP instance is for a CLI script */
+       protected $cliMode;
+       /** @var string Agent name for query profiling */
+       protected $agent;
+
+       private static $loggerFields =
+               [ 'replLogger', 'connLogger', 'queryLogger', 'perfLogger' ];
+
+       public function __construct( array $conf ) {
+               $this->localDomain = isset( $conf['localDomain'] )
+                       ? DatabaseDomain::newFromId( $conf['localDomain'] )
+                       : DatabaseDomain::newUnspecified();
+
+               if ( isset( $conf['readOnlyReason'] ) && is_string( $conf['readOnlyReason'] ) ) {
+                       $this->readOnlyReason = $conf['readOnlyReason'];
+               }
+
+               $this->srvCache = isset( $conf['srvCache'] ) ? $conf['srvCache'] : new EmptyBagOStuff();
+               $this->memCache = isset( $conf['memCache'] ) ? $conf['memCache'] : new EmptyBagOStuff();
+               $this->wanCache = isset( $conf['wanCache'] )
+                       ? $conf['wanCache']
+                       : WANObjectCache::newEmpty();
+
+               foreach ( self::$loggerFields as $key ) {
+                       $this->$key = isset( $conf[$key] ) ? $conf[$key] : new \Psr\Log\NullLogger();
+               }
+               $this->errorLogger = isset( $conf['errorLogger'] )
+                       ? $conf['errorLogger']
+                       : function ( Exception $e ) {
+                               trigger_error( E_USER_WARNING, get_class( $e ) . ': ' . $e->getMessage() );
+                       };
+
+               $this->profiler = isset( $params['profiler'] ) ? $params['profiler'] : null;
+               $this->trxProfiler = isset( $conf['trxProfiler'] )
+                       ? $conf['trxProfiler']
+                       : new TransactionProfiler();
+
+               $this->requestInfo = [
+                       'IPAddress' => isset( $_SERVER[ 'REMOTE_ADDR' ] ) ? $_SERVER[ 'REMOTE_ADDR' ] : '',
+                       'UserAgent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '',
+                       'ChronologyProtection' => 'true'
+               ];
+
+               $this->cliMode = isset( $params['cliMode'] ) ? $params['cliMode'] : PHP_SAPI === 'cli';
+               $this->hostname = isset( $conf['hostname'] ) ? $conf['hostname'] : gethostname();
+               $this->agent = isset( $params['agent'] ) ? $params['agent'] : '';
+
+               $this->ticket = mt_rand();
+       }
+
+       public function destroy() {
+               $this->shutdown( self::SHUTDOWN_NO_CHRONPROT );
+               $this->forEachLBCallMethod( 'disable' );
+       }
+
+       public function shutdown(
+               $mode = self::SHUTDOWN_CHRONPROT_SYNC, callable $workCallback = null
+       ) {
+               $chronProt = $this->getChronologyProtector();
+               if ( $mode === self::SHUTDOWN_CHRONPROT_SYNC ) {
+                       $this->shutdownChronologyProtector( $chronProt, $workCallback, 'sync' );
+               } elseif ( $mode === self::SHUTDOWN_CHRONPROT_ASYNC ) {
+                       $this->shutdownChronologyProtector( $chronProt, null, 'async' );
+               }
+
+               $this->commitMasterChanges( __METHOD__ ); // sanity
+       }
+
+       /**
+        * @see ILBFactory::newMainLB()
+        * @param bool $domain
+        * @return LoadBalancer
+        */
+       abstract public function newMainLB( $domain = false );
+
+       /**
+        * @see ILBFactory::getMainLB()
+        * @param bool $domain
+        * @return LoadBalancer
+        */
+       abstract public function getMainLB( $domain = false );
+
+       /**
+        * @see ILBFactory::newExternalLB()
+        * @param string $cluster
+        * @return LoadBalancer
+        */
+       abstract public function newExternalLB( $cluster );
+
+       /**
+        * @see ILBFactory::getExternalLB()
+        * @param string $cluster
+        * @return LoadBalancer
+        */
+       abstract public function getExternalLB( $cluster );
+
+       /**
+        * Call a method of each tracked load balancer
+        *
+        * @param string $methodName
+        * @param array $args
+        */
+       protected function forEachLBCallMethod( $methodName, array $args = [] ) {
+               $this->forEachLB(
+                       function ( ILoadBalancer $loadBalancer, $methodName, array $args ) {
+                               call_user_func_array( [ $loadBalancer, $methodName ], $args );
+                       },
+                       [ $methodName, $args ]
+               );
+       }
+
+       public function flushReplicaSnapshots( $fname = __METHOD__ ) {
+               $this->forEachLBCallMethod( 'flushReplicaSnapshots', [ $fname ] );
+       }
+
+       public function commitAll( $fname = __METHOD__, array $options = [] ) {
+               $this->commitMasterChanges( $fname, $options );
+               $this->forEachLBCallMethod( 'commitAll', [ $fname ] );
+       }
+
+       public function beginMasterChanges( $fname = __METHOD__ ) {
+               if ( $this->trxRoundId !== false ) {
+                       throw new DBTransactionError(
+                               null,
+                               "$fname: transaction round '{$this->trxRoundId}' already started."
+                       );
+               }
+               $this->trxRoundId = $fname;
+               // Set DBO_TRX flags on all appropriate DBs
+               $this->forEachLBCallMethod( 'beginMasterChanges', [ $fname ] );
+       }
+
+       public function commitMasterChanges( $fname = __METHOD__, array $options = [] ) {
+               if ( $this->trxRoundId !== false && $this->trxRoundId !== $fname ) {
+                       throw new DBTransactionError(
+                               null,
+                               "$fname: transaction round '{$this->trxRoundId}' still running."
+                       );
+               }
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $scope = $this->getScopedPHPBehaviorForCommit(); // try to ignore client aborts
+               // Run pre-commit callbacks and suppress post-commit callbacks, aborting on failure
+               $this->forEachLBCallMethod( 'finalizeMasterChanges' );
+               $this->trxRoundId = false;
+               // Perform pre-commit checks, aborting on failure
+               $this->forEachLBCallMethod( 'approveMasterChanges', [ $options ] );
+               // Log the DBs and methods involved in multi-DB transactions
+               $this->logIfMultiDbTransaction();
+               // Actually perform the commit on all master DB connections and revert DBO_TRX
+               $this->forEachLBCallMethod( 'commitMasterChanges', [ $fname ] );
+               // Run all post-commit callbacks
+               /** @var Exception $e */
+               $e = null; // first callback exception
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$e ) {
+                       $ex = $lb->runMasterPostTrxCallbacks( IDatabase::TRIGGER_COMMIT );
+                       $e = $e ?: $ex;
+               } );
+               // Commit any dangling DBO_TRX transactions from callbacks on one DB to another DB
+               $this->forEachLBCallMethod( 'commitMasterChanges', [ $fname ] );
+               // Throw any last post-commit callback error
+               if ( $e instanceof Exception ) {
+                       throw $e;
+               }
+       }
+
+       public function rollbackMasterChanges( $fname = __METHOD__ ) {
+               $this->trxRoundId = false;
+               $this->forEachLBCallMethod( 'suppressTransactionEndCallbacks' );
+               $this->forEachLBCallMethod( 'rollbackMasterChanges', [ $fname ] );
+               // Run all post-rollback callbacks
+               $this->forEachLB( function ( ILoadBalancer $lb ) {
+                       $lb->runMasterPostTrxCallbacks( IDatabase::TRIGGER_ROLLBACK );
+               } );
+       }
+
+       /**
+        * Log query info if multi DB transactions are going to be committed now
+        */
+       private function logIfMultiDbTransaction() {
+               $callersByDB = [];
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$callersByDB ) {
+                       $masterName = $lb->getServerName( $lb->getWriterIndex() );
+                       $callers = $lb->pendingMasterChangeCallers();
+                       if ( $callers ) {
+                               $callersByDB[$masterName] = $callers;
+                       }
+               } );
+
+               if ( count( $callersByDB ) >= 2 ) {
+                       $dbs = implode( ', ', array_keys( $callersByDB ) );
+                       $msg = "Multi-DB transaction [{$dbs}]:\n";
+                       foreach ( $callersByDB as $db => $callers ) {
+                               $msg .= "$db: " . implode( '; ', $callers ) . "\n";
+                       }
+                       $this->queryLogger->info( $msg );
+               }
+       }
+
+       public function hasMasterChanges() {
+               $ret = false;
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$ret ) {
+                       $ret = $ret || $lb->hasMasterChanges();
+               } );
+
+               return $ret;
+       }
+
+       public function laggedReplicaUsed() {
+               $ret = false;
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$ret ) {
+                       $ret = $ret || $lb->laggedReplicaUsed();
+               } );
+
+               return $ret;
+       }
+
+       public function hasOrMadeRecentMasterChanges( $age = null ) {
+               $ret = false;
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( $age, &$ret ) {
+                       $ret = $ret || $lb->hasOrMadeRecentMasterChanges( $age );
+               } );
+               return $ret;
+       }
+
+       public function waitForReplication( array $opts = [] ) {
+               $opts += [
+                       'domain' => false,
+                       'cluster' => false,
+                       'timeout' => 60,
+                       'ifWritesSince' => null
+               ];
+
+               if ( $opts['domain'] === false && isset( $opts['wiki'] ) ) {
+                       $opts['domain'] = $opts['wiki']; // b/c
+               }
+
+               // Figure out which clusters need to be checked
+               /** @var ILoadBalancer[] $lbs */
+               $lbs = [];
+               if ( $opts['cluster'] !== false ) {
+                       $lbs[] = $this->getExternalLB( $opts['cluster'] );
+               } elseif ( $opts['domain'] !== false ) {
+                       $lbs[] = $this->getMainLB( $opts['domain'] );
+               } else {
+                       $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$lbs ) {
+                               $lbs[] = $lb;
+                       } );
+                       if ( !$lbs ) {
+                               return; // nothing actually used
+                       }
+               }
+
+               // Get all the master positions of applicable DBs right now.
+               // This can be faster since waiting on one cluster reduces the
+               // time needed to wait on the next clusters.
+               $masterPositions = array_fill( 0, count( $lbs ), false );
+               foreach ( $lbs as $i => $lb ) {
+                       if ( $lb->getServerCount() <= 1 ) {
+                               // Bug 27975 - Don't try to wait for replica DBs if there are none
+                               // Prevents permission error when getting master position
+                               continue;
+                       } elseif ( $opts['ifWritesSince']
+                               && $lb->lastMasterChangeTimestamp() < $opts['ifWritesSince']
+                       ) {
+                               continue; // no writes since the last wait
+                       }
+                       $masterPositions[$i] = $lb->getMasterPos();
+               }
+
+               // Run any listener callbacks *after* getting the DB positions. The more
+               // time spent in the callbacks, the less time is spent in waitForAll().
+               foreach ( $this->replicationWaitCallbacks as $callback ) {
+                       $callback();
+               }
+
+               $failed = [];
+               foreach ( $lbs as $i => $lb ) {
+                       if ( $masterPositions[$i] ) {
+                               // The DBMS may not support getMasterPos()
+                               if ( !$lb->waitForAll( $masterPositions[$i], $opts['timeout'] ) ) {
+                                       $failed[] = $lb->getServerName( $lb->getWriterIndex() );
+                               }
+                       }
+               }
+
+               if ( $failed ) {
+                       throw new DBReplicationWaitError(
+                               "Could not wait for replica DBs to catch up to " .
+                               implode( ', ', $failed )
+                       );
+               }
+       }
+
+       public function setWaitForReplicationListener( $name, callable $callback = null ) {
+               if ( $callback ) {
+                       $this->replicationWaitCallbacks[$name] = $callback;
+               } else {
+                       unset( $this->replicationWaitCallbacks[$name] );
+               }
+       }
+
+       public function getEmptyTransactionTicket( $fname ) {
+               if ( $this->hasMasterChanges() ) {
+                       $this->queryLogger->error( __METHOD__ . ": $fname does not have outer scope.\n" .
+                               ( new RuntimeException() )->getTraceAsString() );
+
+                       return null;
+               }
+
+               return $this->ticket;
+       }
+
+       public function commitAndWaitForReplication( $fname, $ticket, array $opts = [] ) {
+               if ( $ticket !== $this->ticket ) {
+                       $this->perfLogger->error( __METHOD__ . ": $fname does not have outer scope.\n" .
+                               ( new RuntimeException() )->getTraceAsString() );
+
+                       return;
+               }
+
+               // The transaction owner and any caller with the empty transaction ticket can commit
+               // so that getEmptyTransactionTicket() callers don't risk seeing DBTransactionError.
+               if ( $this->trxRoundId !== false && $fname !== $this->trxRoundId ) {
+                       $this->queryLogger->info( "$fname: committing on behalf of {$this->trxRoundId}." );
+                       $fnameEffective = $this->trxRoundId;
+               } else {
+                       $fnameEffective = $fname;
+               }
+
+               $this->commitMasterChanges( $fnameEffective );
+               $this->waitForReplication( $opts );
+               // If a nested caller committed on behalf of $fname, start another empty $fname
+               // transaction, leaving the caller with the same empty transaction state as before.
+               if ( $fnameEffective !== $fname ) {
+                       $this->beginMasterChanges( $fnameEffective );
+               }
+       }
+
+       public function getChronologyProtectorTouched( $dbName ) {
+               return $this->getChronologyProtector()->getTouched( $dbName );
+       }
+
+       public function disableChronologyProtection() {
+               $this->getChronologyProtector()->setEnabled( false );
+       }
+
+       /**
+        * @return ChronologyProtector
+        */
+       protected function getChronologyProtector() {
+               if ( $this->chronProt ) {
+                       return $this->chronProt;
+               }
+
+               $this->chronProt = new ChronologyProtector(
+                       $this->memCache,
+                       [
+                               'ip' => $this->requestInfo['IPAddress'],
+                               'agent' => $this->requestInfo['UserAgent'],
+                       ],
+                       isset( $_GET['cpPosTime'] ) ? $_GET['cpPosTime'] : null
+               );
+               $this->chronProt->setLogger( $this->replLogger );
+
+               if ( $this->cliMode ) {
+                       $this->chronProt->setEnabled( false );
+               } elseif ( $this->requestInfo['ChronologyProtection'] === 'false' ) {
+                       // Request opted out of using position wait logic. This is useful for requests
+                       // done by the job queue or background ETL that do not have a meaningful session.
+                       $this->chronProt->setWaitEnabled( false );
+               }
+
+               $this->replLogger->debug( __METHOD__ . ': using request info ' .
+                       json_encode( $this->requestInfo, JSON_PRETTY_PRINT ) );
+
+               return $this->chronProt;
+       }
+
+       /**
+        * Get and record all of the staged DB positions into persistent memory storage
+        *
+        * @param ChronologyProtector $cp
+        * @param callable|null $workCallback Work to do instead of waiting on syncing positions
+        * @param string $mode One of (sync, async); whether to wait on remote datacenters
+        */
+       protected function shutdownChronologyProtector(
+               ChronologyProtector $cp, $workCallback, $mode
+       ) {
+               // Record all the master positions needed
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( $cp ) {
+                       $cp->shutdownLB( $lb );
+               } );
+               // Write them to the persistent stash. Try to do something useful by running $work
+               // while ChronologyProtector waits for the stash write to replicate to all DCs.
+               $unsavedPositions = $cp->shutdown( $workCallback, $mode );
+               if ( $unsavedPositions && $workCallback ) {
+                       // Invoke callback in case it did not cache the result yet
+                       $workCallback(); // work now to block for less time in waitForAll()
+               }
+               // If the positions failed to write to the stash, at least wait on local datacenter
+               // replica DBs to catch up before responding. Even if there are several DCs, this increases
+               // the chance that the user will see their own changes immediately afterwards. As long
+               // as the sticky DC cookie applies (same domain), this is not even an issue.
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( $unsavedPositions ) {
+                       $masterName = $lb->getServerName( $lb->getWriterIndex() );
+                       if ( isset( $unsavedPositions[$masterName] ) ) {
+                               $lb->waitForAll( $unsavedPositions[$masterName] );
+                       }
+               } );
+       }
+
+       /**
+        * Base parameters to LoadBalancer::__construct()
+        * @return array
+        */
+       final protected function baseLoadBalancerParams() {
+               return [
+                       'localDomain' => $this->localDomain,
+                       'readOnlyReason' => $this->readOnlyReason,
+                       'srvCache' => $this->srvCache,
+                       'wanCache' => $this->wanCache,
+                       'profiler' => $this->profiler,
+                       'trxProfiler' => $this->trxProfiler,
+                       'queryLogger' => $this->queryLogger,
+                       'connLogger' => $this->connLogger,
+                       'replLogger' => $this->replLogger,
+                       'errorLogger' => $this->errorLogger,
+                       'hostname' => $this->hostname,
+                       'cliMode' => $this->cliMode,
+                       'agent' => $this->agent
+               ];
+       }
+
+       /**
+        * @param ILoadBalancer $lb
+        */
+       protected function initLoadBalancer( ILoadBalancer $lb ) {
+               if ( $this->trxRoundId !== false ) {
+                       $lb->beginMasterChanges( $this->trxRoundId ); // set DBO_TRX
+               }
+       }
+
+       public function setDomainPrefix( $prefix ) {
+               $this->localDomain = new DatabaseDomain(
+                       $this->localDomain->getDatabase(),
+                       null,
+                       $prefix
+               );
+
+               $this->forEachLB( function( ILoadBalancer $lb ) use ( $prefix ) {
+                       $lb->setDomainPrefix( $prefix );
+               } );
+       }
+
+       public function closeAll() {
+               $this->forEachLBCallMethod( 'closeAll', [] );
+       }
+
+       public function setAgentName( $agent ) {
+               $this->agent = $agent;
+       }
+
+       public function appendPreShutdownTimeAsQuery( $url, $time ) {
+               $usedCluster = 0;
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$usedCluster ) {
+                       $usedCluster |= ( $lb->getServerCount() > 1 );
+               } );
+
+               if ( !$usedCluster ) {
+                       return $url; // no master/replica clusters touched
+               }
+
+               return strpos( $url, '?' ) === false ? "$url?cpPosTime=$time" : "$url&cpPosTime=$time";
+       }
+
+       public function setRequestInfo( array $info ) {
+               $this->requestInfo = $info + $this->requestInfo;
+       }
+
+       /**
+        * Make PHP ignore user aborts/disconnects until the returned
+        * value leaves scope. This returns null and does nothing in CLI mode.
+        *
+        * @return ScopedCallback|null
+        */
+       final protected function getScopedPHPBehaviorForCommit() {
+               if ( PHP_SAPI != 'cli' ) { // http://bugs.php.net/bug.php?id=47540
+                       $old = ignore_user_abort( true ); // avoid half-finished operations
+                       return new ScopedCallback( function () use ( $old ) {
+                               ignore_user_abort( $old );
+                       } );
+               }
+
+               return null;
+       }
+
+       function __destruct() {
+               $this->destroy();
+       }
+}
diff --git a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php b/includes/libs/rdbms/lbfactory/LBFactoryMulti.php
new file mode 100644 (file)
index 0000000..a7cc16c
--- /dev/null
@@ -0,0 +1,402 @@
+<?php
+/**
+ * Advanced generator of database load balancing objects for database farms.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * A multi-database, multi-master factory for Wikimedia and similar installations.
+ * Ignores the old configuration globals.
+ *
+ * @ingroup Database
+ */
+class LBFactoryMulti extends LBFactory {
+       /** @var array A map of database names to section names */
+       private $sectionsByDB;
+
+       /**
+        * @var array A 2-d map. For each section, gives a map of server names to
+        * load ratios
+        */
+       private $sectionLoads;
+
+       /**
+        * @var array[] Server info associative array
+        * @note The host, hostName and load entries will be overridden
+        */
+       private $serverTemplate;
+
+       // Optional settings
+
+       /** @var array A 3-d map giving server load ratios for each section and group */
+       private $groupLoadsBySection = [];
+
+       /** @var array A 3-d map giving server load ratios by DB name */
+       private $groupLoadsByDB = [];
+
+       /** @var array A map of hostname to IP address */
+       private $hostsByName = [];
+
+       /** @var array A map of external storage cluster name to server load map */
+       private $externalLoads = [];
+
+       /**
+        * @var array A set of server info keys overriding serverTemplate for
+        * external storage
+        */
+       private $externalTemplateOverrides;
+
+       /**
+        * @var array A 2-d map overriding serverTemplate and
+        * externalTemplateOverrides on a server-by-server basis. Applies to both
+        * core and external storage
+        */
+       private $templateOverridesByServer;
+
+       /** @var array A 2-d map overriding the server info by section */
+       private $templateOverridesBySection;
+
+       /** @var array A 2-d map overriding the server info by external storage cluster */
+       private $templateOverridesByCluster;
+
+       /** @var array An override array for all master servers */
+       private $masterTemplateOverrides;
+
+       /**
+        * @var array|bool A map of section name to read-only message. Missing or
+        * false for read/write
+        */
+       private $readOnlyBySection = [];
+
+       /** @var array Load balancer factory configuration */
+       private $conf;
+
+       /** @var LoadBalancer[] */
+       private $mainLBs = [];
+
+       /** @var LoadBalancer[] */
+       private $extLBs = [];
+
+       /** @var string */
+       private $loadMonitorClass = 'LoadMonitor';
+
+       /** @var string */
+       private $lastDomain;
+
+       /** @var string */
+       private $lastSection;
+
+       /**
+        * @see LBFactory::__construct()
+        *
+        * Template override precedence (highest => lowest):
+        *   - templateOverridesByServer
+        *   - masterTemplateOverrides
+        *   - templateOverridesBySection/templateOverridesByCluster
+        *   - externalTemplateOverrides
+        *   - serverTemplate
+        * Overrides only work on top level keys (so nested values will not be merged).
+        *
+        * Server configuration maps should be of the format Database::factory() requires.
+        * Additionally, a 'max lag' key should also be set on server maps, indicating how stale the
+        * data can be before the load balancer tries to avoid using it. The map can have 'is static'
+        * set to disable blocking  replication sync checks (intended for archive servers with
+        * unchanging data).
+        *
+        * @param array $conf Parameters of LBFactory::__construct() as well as:
+        *   - sectionsByDB                Map of database names to section names.
+        *   - sectionLoads                2-d map. For each section, gives a map of server names to
+        *                                 load ratios. For example:
+        *                                 [
+        *                                     'section1' => [
+        *                                         'db1' => 100,
+        *                                         'db2' => 100
+        *                                     ]
+        *                                 ]
+        *   - serverTemplate              Server configuration map intended for Database::factory().
+        *                                 Note that "host", "hostName" and "load" entries will be
+        *                                 overridden by "sectionLoads" and "hostsByName".
+        *   - groupLoadsBySection         3-d map giving server load ratios for each section/group.
+        *                                 For example:
+        *                                 [
+        *                                     'section1' => [
+        *                                         'group1' => [
+        *                                             'db1' => 100,
+        *                                             'db2' => 100
+        *                                         ]
+        *                                     ]
+        *                                 ]
+        *   - groupLoadsByDB              3-d map giving server load ratios by DB name.
+        *   - hostsByName                 Map of hostname to IP address.
+        *   - externalLoads               Map of external storage cluster name to server load map.
+        *   - externalTemplateOverrides   Set of server configuration maps overriding
+        *                                 "serverTemplate" for external storage.
+        *   - templateOverridesByServer   2-d map overriding "serverTemplate" and
+        *                                 "externalTemplateOverrides" on a server-by-server basis.
+        *                                 Applies to both core and external storage.
+        *   - templateOverridesBySection  2-d map overriding the server configuration maps by section.
+        *   - templateOverridesByCluster  2-d map overriding the server configuration maps by external
+        *                                 storage cluster.
+        *   - masterTemplateOverrides     Server configuration map overrides for all master servers.
+        *   - loadMonitorClass            Name of the LoadMonitor class to always use.
+        *   - readOnlyBySection           A map of section name to read-only message.
+        *                                 Missing or false for read/write.
+        */
+       public function __construct( array $conf ) {
+               parent::__construct( $conf );
+
+               $this->conf = $conf;
+               $required = [ 'sectionsByDB', 'sectionLoads', 'serverTemplate' ];
+               $optional = [ 'groupLoadsBySection', 'groupLoadsByDB', 'hostsByName',
+                       'externalLoads', 'externalTemplateOverrides', 'templateOverridesByServer',
+                       'templateOverridesByCluster', 'templateOverridesBySection', 'masterTemplateOverrides',
+                       'readOnlyBySection', 'loadMonitorClass' ];
+
+               foreach ( $required as $key ) {
+                       if ( !isset( $conf[$key] ) ) {
+                               throw new InvalidArgumentException( __CLASS__ . ": $key is required." );
+                       }
+                       $this->$key = $conf[$key];
+               }
+
+               foreach ( $optional as $key ) {
+                       if ( isset( $conf[$key] ) ) {
+                               $this->$key = $conf[$key];
+                       }
+               }
+       }
+
+       /**
+        * @param bool|string $domain
+        * @return string
+        */
+       private function getSectionForDomain( $domain = false ) {
+               if ( $this->lastDomain === $domain ) {
+                       return $this->lastSection;
+               }
+               list( $dbName, ) = $this->getDBNameAndPrefix( $domain );
+               if ( isset( $this->sectionsByDB[$dbName] ) ) {
+                       $section = $this->sectionsByDB[$dbName];
+               } else {
+                       $section = 'DEFAULT';
+               }
+               $this->lastSection = $section;
+               $this->lastDomain = $domain;
+
+               return $section;
+       }
+
+       /**
+        * @param bool|string $domain
+        * @return LoadBalancer
+        */
+       public function newMainLB( $domain = false ) {
+               list( $dbName, ) = $this->getDBNameAndPrefix( $domain );
+               $section = $this->getSectionForDomain( $domain );
+               if ( isset( $this->groupLoadsByDB[$dbName] ) ) {
+                       $groupLoads = $this->groupLoadsByDB[$dbName];
+               } else {
+                       $groupLoads = [];
+               }
+
+               if ( isset( $this->groupLoadsBySection[$section] ) ) {
+                       $groupLoads = array_merge_recursive(
+                               $groupLoads, $this->groupLoadsBySection[$section] );
+               }
+
+               $readOnlyReason = $this->readOnlyReason;
+               // Use the LB-specific read-only reason if everything isn't already read-only
+               if ( $readOnlyReason === false && isset( $this->readOnlyBySection[$section] ) ) {
+                       $readOnlyReason = $this->readOnlyBySection[$section];
+               }
+
+               $template = $this->serverTemplate;
+               if ( isset( $this->templateOverridesBySection[$section] ) ) {
+                       $template = $this->templateOverridesBySection[$section] + $template;
+               }
+
+               return $this->newLoadBalancer(
+                       $template,
+                       $this->sectionLoads[$section],
+                       $groupLoads,
+                       $readOnlyReason
+               );
+       }
+
+       /**
+        * @param DatabaseDomain|string|bool $domain Domain ID, or false for the current domain
+        * @return LoadBalancer
+        */
+       public function getMainLB( $domain = false ) {
+               $section = $this->getSectionForDomain( $domain );
+               if ( !isset( $this->mainLBs[$section] ) ) {
+                       $lb = $this->newMainLB( $domain );
+                       $this->getChronologyProtector()->initLB( $lb );
+                       $this->mainLBs[$section] = $lb;
+               }
+
+               return $this->mainLBs[$section];
+       }
+
+       public function newExternalLB( $cluster ) {
+               if ( !isset( $this->externalLoads[$cluster] ) ) {
+                       throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"" );
+               }
+               $template = $this->serverTemplate;
+               if ( isset( $this->externalTemplateOverrides ) ) {
+                       $template = $this->externalTemplateOverrides + $template;
+               }
+               if ( isset( $this->templateOverridesByCluster[$cluster] ) ) {
+                       $template = $this->templateOverridesByCluster[$cluster] + $template;
+               }
+
+               return $this->newLoadBalancer(
+                       $template,
+                       $this->externalLoads[$cluster],
+                       [],
+                       $this->readOnlyReason
+               );
+       }
+
+       public function getExternalLB( $cluster ) {
+               if ( !isset( $this->extLBs[$cluster] ) ) {
+                       $this->extLBs[$cluster] = $this->newExternalLB( $cluster );
+                       $this->getChronologyProtector()->initLB( $this->extLBs[$cluster] );
+               }
+
+               return $this->extLBs[$cluster];
+       }
+
+       /**
+        * Make a new load balancer object based on template and load array
+        *
+        * @param array $template
+        * @param array $loads
+        * @param array $groupLoads
+        * @param string|bool $readOnlyReason
+        * @return LoadBalancer
+        */
+       private function newLoadBalancer( $template, $loads, $groupLoads, $readOnlyReason ) {
+               $lb = new LoadBalancer( array_merge(
+                       $this->baseLoadBalancerParams(),
+                       [
+                               'servers' => $this->makeServerArray( $template, $loads, $groupLoads ),
+                               'loadMonitor' => [ 'class' => $this->loadMonitorClass ],
+                               'readOnlyReason' => $readOnlyReason
+                       ]
+               ) );
+               $this->initLoadBalancer( $lb );
+
+               return $lb;
+       }
+
+       /**
+        * Make a server array as expected by LoadBalancer::__construct, using a template and load array
+        *
+        * @param array $template
+        * @param array $loads
+        * @param array $groupLoads
+        * @return array
+        */
+       private function makeServerArray( $template, $loads, $groupLoads ) {
+               $servers = [];
+               $master = true;
+               $groupLoadsByServer = $this->reindexGroupLoads( $groupLoads );
+               foreach ( $groupLoadsByServer as $server => $stuff ) {
+                       if ( !isset( $loads[$server] ) ) {
+                               $loads[$server] = 0;
+                       }
+               }
+               foreach ( $loads as $serverName => $load ) {
+                       $serverInfo = $template;
+                       if ( $master ) {
+                               $serverInfo['master'] = true;
+                               if ( isset( $this->masterTemplateOverrides ) ) {
+                                       $serverInfo = $this->masterTemplateOverrides + $serverInfo;
+                               }
+                               $master = false;
+                       } else {
+                               $serverInfo['replica'] = true;
+                       }
+                       if ( isset( $this->templateOverridesByServer[$serverName] ) ) {
+                               $serverInfo = $this->templateOverridesByServer[$serverName] + $serverInfo;
+                       }
+                       if ( isset( $groupLoadsByServer[$serverName] ) ) {
+                               $serverInfo['groupLoads'] = $groupLoadsByServer[$serverName];
+                       }
+                       if ( isset( $this->hostsByName[$serverName] ) ) {
+                               $serverInfo['host'] = $this->hostsByName[$serverName];
+                       } else {
+                               $serverInfo['host'] = $serverName;
+                       }
+                       $serverInfo['hostName'] = $serverName;
+                       $serverInfo['load'] = $load;
+                       $serverInfo += [ 'flags' => IDatabase::DBO_DEFAULT ];
+
+                       $servers[] = $serverInfo;
+               }
+
+               return $servers;
+       }
+
+       /**
+        * Take a group load array indexed by group then server, and reindex it by server then group
+        * @param array $groupLoads
+        * @return array
+        */
+       private function reindexGroupLoads( $groupLoads ) {
+               $reindexed = [];
+               foreach ( $groupLoads as $group => $loads ) {
+                       foreach ( $loads as $server => $load ) {
+                               $reindexed[$server][$group] = $load;
+                       }
+               }
+
+               return $reindexed;
+       }
+
+       /**
+        * @param DatabaseDomain|string|bool $domain Domain ID, or false for the current domain
+        * @return array [database name, table prefix]
+        */
+       private function getDBNameAndPrefix( $domain = false ) {
+               $domain = ( $domain === false )
+                       ? $this->localDomain
+                       : DatabaseDomain::newFromId( $domain );
+
+               return [ $domain->getDatabase(), $domain->getTablePrefix() ];
+       }
+
+       /**
+        * Execute a function for each tracked load balancer
+        * The callback is called with the load balancer as the first parameter,
+        * and $params passed as the subsequent parameters.
+        * @param callable $callback
+        * @param array $params
+        */
+       public function forEachLB( $callback, array $params = [] ) {
+               foreach ( $this->mainLBs as $lb ) {
+                       call_user_func_array( $callback, array_merge( [ $lb ], $params ) );
+               }
+               foreach ( $this->extLBs as $lb ) {
+                       call_user_func_array( $callback, array_merge( [ $lb ], $params ) );
+               }
+       }
+}
diff --git a/includes/libs/rdbms/lbfactory/LBFactorySimple.php b/includes/libs/rdbms/lbfactory/LBFactorySimple.php
new file mode 100644 (file)
index 0000000..1e69d8f
--- /dev/null
@@ -0,0 +1,140 @@
+<?php
+/**
+ * Generator of database load balancing objects.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * A simple single-master LBFactory that gets its configuration from the b/c globals
+ */
+class LBFactorySimple extends LBFactory {
+       /** @var LoadBalancer */
+       private $mainLB;
+       /** @var LoadBalancer[] */
+       private $extLBs = [];
+
+       /** @var array[] Map of (server index => server config) */
+       private $servers = [];
+       /** @var array[] Map of (cluster => (server index => server config)) */
+       private $externalClusters = [];
+
+       /** @var string */
+       private $loadMonitorClass;
+
+       /**
+        * @see LBFactory::__construct()
+        * @param array $conf Parameters of LBFactory::__construct() as well as:
+        *   - servers : list of server configuration maps to Database::factory().
+        *      Additionally, the server maps should have a 'load' key, which is used to decide
+        *      how often clients connect to one server verses the others. A 'max lag' key should
+        *      also be set on server maps, indicating how stale the data can be before the load
+        *      balancer tries to avoid using it. The map can have 'is static' set to disable blocking
+        *      replication sync checks (intended for archive servers with unchanging data).
+        *   - externalClusters : map of cluster names to server arrays. The servers arrays have the
+        *      same format as "servers" above.
+        */
+       public function __construct( array $conf ) {
+               parent::__construct( $conf );
+
+               $this->servers = isset( $conf['servers'] ) ? $conf['servers'] : [];
+               foreach ( $this->servers as $i => $server ) {
+                       if ( $i == 0 ) {
+                               $this->servers[$i]['master'] = true;
+                       } else {
+                               $this->servers[$i]['replica'] = true;
+                       }
+               }
+
+               $this->externalClusters = isset( $conf['externalClusters'] )
+                       ? $conf['externalClusters']
+                       : [];
+               $this->loadMonitorClass = isset( $conf['loadMonitorClass'] )
+                       ? $conf['loadMonitorClass']
+                       : 'LoadMonitor';
+       }
+
+       /**
+        * @param bool|string $domain
+        * @return LoadBalancer
+        */
+       public function newMainLB( $domain = false ) {
+               return $this->newLoadBalancer( $this->servers );
+       }
+
+       /**
+        * @param bool|string $domain
+        * @return LoadBalancer
+        */
+       public function getMainLB( $domain = false ) {
+               if ( !isset( $this->mainLB ) ) {
+                       $this->mainLB = $this->newMainLB( $domain );
+                       $this->getChronologyProtector()->initLB( $this->mainLB );
+               }
+
+               return $this->mainLB;
+       }
+
+       public function newExternalLB( $cluster ) {
+               if ( !isset( $this->externalClusters[$cluster] ) ) {
+                       throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"." );
+               }
+
+               return $this->newLoadBalancer( $this->externalClusters[$cluster] );
+       }
+
+       public function getExternalLB( $cluster ) {
+               if ( !isset( $this->extLBs[$cluster] ) ) {
+                       $this->extLBs[$cluster] = $this->newExternalLB( $cluster );
+                       $this->getChronologyProtector()->initLB( $this->extLBs[$cluster] );
+               }
+
+               return $this->extLBs[$cluster];
+       }
+
+       private function newLoadBalancer( array $servers ) {
+               $lb = new LoadBalancer( array_merge(
+                       $this->baseLoadBalancerParams(),
+                       [
+                               'servers' => $servers,
+                               'loadMonitor' => [ 'class' => $this->loadMonitorClass ],
+                       ]
+               ) );
+               $this->initLoadBalancer( $lb );
+
+               return $lb;
+       }
+
+       /**
+        * Execute a function for each tracked load balancer
+        * The callback is called with the load balancer as the first parameter,
+        * and $params passed as the subsequent parameters.
+        *
+        * @param callable $callback
+        * @param array $params
+        */
+       public function forEachLB( $callback, array $params = [] ) {
+               if ( isset( $this->mainLB ) ) {
+                       call_user_func_array( $callback, array_merge( [ $this->mainLB ], $params ) );
+               }
+               foreach ( $this->extLBs as $lb ) {
+                       call_user_func_array( $callback, array_merge( [ $lb ], $params ) );
+               }
+       }
+}
diff --git a/includes/libs/rdbms/lbfactory/LBFactorySingle.php b/includes/libs/rdbms/lbfactory/LBFactorySingle.php
new file mode 100644 (file)
index 0000000..e116888
--- /dev/null
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Simple generator of database connections that always returns the same object.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * An LBFactory class that always returns a single database object.
+ */
+class LBFactorySingle extends LBFactory {
+       /** @var LoadBalancerSingle */
+       private $lb;
+
+       /**
+        * @param array $conf An associative array with one member:
+        *  - connection: The IDatabase connection object
+        */
+       public function __construct( array $conf ) {
+               parent::__construct( $conf );
+
+               if ( !isset( $conf['connection'] ) ) {
+                       throw new InvalidArgumentException( "Missing 'connection' argument." );
+               }
+
+               $lb = new LoadBalancerSingle( array_merge( $this->baseLoadBalancerParams(), $conf ) );
+               $this->initLoadBalancer( $lb );
+               $this->lb = $lb;
+       }
+
+       /**
+        * @param IDatabase $db Live connection handle
+        * @param array $params Parameter map to LBFactorySingle::__constructs()
+        * @return LBFactorySingle
+        * @since 1.28
+        */
+       public static function newFromConnection( IDatabase $db, array $params = [] ) {
+               return new static( [ 'connection' => $db ] + $params );
+       }
+
+       /**
+        * @param bool|string $domain (unused)
+        * @return LoadBalancerSingle
+        */
+       public function newMainLB( $domain = false ) {
+               return $this->lb;
+       }
+
+       /**
+        * @param bool|string $domain (unused)
+        * @return LoadBalancerSingle
+        */
+       public function getMainLB( $domain = false ) {
+               return $this->lb;
+       }
+
+       /**
+        * @param string $cluster External storage cluster name (unused)
+        * @return LoadBalancerSingle
+        */
+       public function newExternalLB( $cluster ) {
+               return $this->lb;
+       }
+
+       /**
+        * @param string $cluster External storage cluster name (unused)
+        * @return LoadBalancerSingle
+        */
+       public function getExternalLB( $cluster ) {
+               return $this->lb;
+       }
+
+       /**
+        * @param string|callable $callback
+        * @param array $params
+        */
+       public function forEachLB( $callback, array $params = [] ) {
+               call_user_func_array( $callback, array_merge( [ $this->lb ], $params ) );
+       }
+}
diff --git a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
new file mode 100644 (file)
index 0000000..8854479
--- /dev/null
@@ -0,0 +1,552 @@
+<?php
+/**
+ * Database load balancing interface
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ * @author Aaron Schulz
+ */
+
+/**
+ * Database cluster connection, tracking, load balancing, and transaction manager interface
+ *
+ * A "cluster" is considered to be one master database and zero or more replica databases.
+ * Typically, the replica DBs replicate from the master asynchronously. The first node in the
+ * "servers" configuration array is always considered the "master". However, this class can still
+ * be used when all or some of the "replica" DBs are multi-master peers of the master or even
+ * when all the DBs are non-replicating clones of each other holding read-only data. Thus, the
+ * role of "master" is in some cases merely nominal.
+ *
+ * By default, each DB server uses DBO_DEFAULT for its 'flags' setting, unless explicitly set
+ * otherwise in configuration. DBO_DEFAULT behavior depends on whether 'cliMode' is set:
+ *   - In CLI mode, the flag has no effect with regards to LoadBalancer.
+ *   - In non-CLI mode, the flag causes implicit transactions to be used; the first query on
+ *     a database starts a transaction on that database. The transactions are meant to remain
+ *     pending until either commitMasterChanges() or rollbackMasterChanges() is called. The
+ *     application must have some point where it calls commitMasterChanges() near the end of
+ *     the PHP request.
+ * Every iteration of beginMasterChanges()/commitMasterChanges() is called a "transaction round".
+ * Rounds are useful on the master DB connections because they make single-DB (and by and large
+ * multi-DB) updates in web requests all-or-nothing. Also, transactions on replica DBs are useful
+ * when REPEATABLE-READ or SERIALIZABLE isolation is used because all foriegn keys and constraints
+ * hold across separate queries in the DB transaction since the data appears within a consistent
+ * point-in-time snapshot.
+ *
+ * The typical caller will use LoadBalancer::getConnection( DB_* ) to yield a live database
+ * connection handle. The choice of which DB server to use is based on pre-defined loads for
+ * weighted random selection, adjustments thereof by LoadMonitor, and the amount of replication
+ * lag on each DB server. Lag checks might cause problems in certain setups, so they should be
+ * tuned in the server configuration maps as follows:
+ *   - Master + N Replica(s): set 'max lag' to an appropriate threshold for avoiding any database
+ *      lagged by this much or more. If all DBs are this lagged, then the load balancer considers
+ *      the cluster to be read-only.
+ *   - Galera Cluster: Seconds_Behind_Master will be 0, so there probably is nothing to tune.
+ *      Note that lag is still possible depending on how wsrep-sync-wait is set server-side.
+ *   - Read-only archive clones: set 'is static' in the server configuration maps. This will
+ *      treat all such DBs as having 0 lag.
+ *   - SQL load balancing proxy: any proxy should handle lag checks on its own, so the 'max lag'
+ *      parameter should probably be set to INF in the server configuration maps. This will make
+ *      the load balancer ignore whatever it detects as the lag of the logical replica is (which
+ *      would probably just randomly bounce around).
+ *
+ * If using a SQL proxy service, it would probably be best to have two proxy hosts for the
+ * load balancer to talk to. One would be the 'host' of the master server entry and another for
+ * the (logical) replica server entry. The proxy could map the load balancer's "replica" DB to
+ * any number of physical replica DBs.
+ *
+ * @since 1.28
+ * @ingroup Database
+ */
+interface ILoadBalancer {
+       /** @var integer Request a replica DB connection */
+       const DB_REPLICA = -1;
+       /** @var integer Request a master DB connection */
+       const DB_MASTER = -2;
+
+       /** @var string Domain specifier when no specific database needs to be selected */
+       const DOMAIN_ANY = '';
+
+       /**
+        * Construct a manager of IDatabase connection objects
+        *
+        * @param array $params Parameter map with keys:
+        *  - servers : Required. Array of server info structures.
+        *  - localDomain: A DatabaseDomain or domain ID string.
+        *  - loadMonitor : Name of a class used to fetch server lag and load.
+        *  - readOnlyReason : Reason the master DB is read-only if so [optional]
+        *  - waitTimeout : Maximum time to wait for replicas for consistency [optional]
+        *  - srvCache : BagOStuff object for server cache [optional]
+        *  - memCache : BagOStuff object for cluster memory cache [optional]
+        *  - wanCache : WANObjectCache object [optional]
+        *  - hostname : The name of the current server [optional]
+        *  - cliMode: Whether the execution context is a CLI script. [optional]
+        *  - profiler : Class name or instance with profileIn()/profileOut() methods. [optional]
+        *  - trxProfiler: TransactionProfiler instance. [optional]
+        *  - replLogger: PSR-3 logger instance. [optional]
+        *  - connLogger: PSR-3 logger instance. [optional]
+        *  - queryLogger: PSR-3 logger instance. [optional]
+        *  - perfLogger: PSR-3 logger instance. [optional]
+        *  - errorLogger : Callback that takes an Exception and logs it. [optional]
+        * @throws InvalidArgumentException
+        */
+       public function __construct( array $params );
+
+       /**
+        * Get the index of the reader connection, which may be a replica DB
+        * This takes into account load ratios and lag times. It should
+        * always return a consistent index during a given invocation
+        *
+        * Side effect: opens connections to databases
+        * @param string|bool $group Query group, or false for the generic reader
+        * @param string|bool $domain Domain ID, or false for the current domain
+        * @throws DBError
+        * @return bool|int|string
+        */
+       public function getReaderIndex( $group = false, $domain = false );
+
+       /**
+        * Set the master wait position
+        * If a DB_REPLICA connection has been opened already, waits
+        * Otherwise sets a variable telling it to wait if such a connection is opened
+        * @param DBMasterPos $pos
+        */
+       public function waitFor( $pos );
+
+       /**
+        * Set the master wait position and wait for a "generic" replica DB to catch up to it
+        *
+        * This can be used a faster proxy for waitForAll()
+        *
+        * @param DBMasterPos $pos
+        * @param int $timeout Max seconds to wait; default is mWaitTimeout
+        * @return bool Success (able to connect and no timeouts reached)
+        */
+       public function waitForOne( $pos, $timeout = null );
+
+       /**
+        * Set the master wait position and wait for ALL replica DBs to catch up to it
+        * @param DBMasterPos $pos
+        * @param int $timeout Max seconds to wait; default is mWaitTimeout
+        * @return bool Success (able to connect and no timeouts reached)
+        */
+       public function waitForAll( $pos, $timeout = null );
+
+       /**
+        * Get any open connection to a given server index, local or foreign
+        * Returns false if there is no connection open
+        *
+        * @param int $i Server index
+        * @return IDatabase|bool False on failure
+        */
+       public function getAnyOpenConnection( $i );
+
+       /**
+        * Get a connection by index
+        * This is the main entry point for this class.
+        *
+        * @param int $i Server index
+        * @param array|string|bool $groups Query group(s), or false for the generic reader
+        * @param string|bool $domain Domain ID, or false for the current domain
+        *
+        * @throws DBError
+        * @return IDatabase
+        */
+       public function getConnection( $i, $groups = [], $domain = false );
+
+       /**
+        * Mark a foreign connection as being available for reuse under a different
+        * DB name or prefix. This mechanism is reference-counted, and must be called
+        * the same number of times as getConnection() to work.
+        *
+        * @param IDatabase $conn
+        * @throws InvalidArgumentException
+        */
+       public function reuseConnection( $conn );
+
+       /**
+        * Get a database connection handle reference
+        *
+        * The handle's methods wrap simply wrap those of a IDatabase handle
+        *
+        * @see LoadBalancer::getConnection() for parameter information
+        *
+        * @param int $db
+        * @param array|string|bool $groups Query group(s), or false for the generic reader
+        * @param string|bool $domain Domain ID, or false for the current domain
+        * @return DBConnRef
+        */
+       public function getConnectionRef( $db, $groups = [], $domain = false );
+
+       /**
+        * Get a database connection handle reference without connecting yet
+        *
+        * The handle's methods wrap simply wrap those of a IDatabase handle
+        *
+        * @see LoadBalancer::getConnection() for parameter information
+        *
+        * @param int $db
+        * @param array|string|bool $groups Query group(s), or false for the generic reader
+        * @param string|bool $domain Domain ID, or false for the current domain
+        * @return DBConnRef
+        */
+       public function getLazyConnectionRef( $db, $groups = [], $domain = false );
+
+       /**
+        * Open a connection to the server given by the specified index
+        * Index must be an actual index into the array.
+        * If the server is already open, returns it.
+        *
+        * On error, returns false, and the connection which caused the
+        * error will be available via $this->mErrorConnection.
+        *
+        * @note If disable() was called on this LoadBalancer, this method will throw a DBAccessError.
+        *
+        * @param int $i Server index
+        * @param string|bool $domain Domain ID, or false for the current domain
+        * @return IDatabase|bool Returns false on errors
+        * @throws DBAccessError
+        */
+       public function openConnection( $i, $domain = false );
+
+       /**
+        * @return int
+        */
+       public function getWriterIndex();
+
+       /**
+        * Returns true if the specified index is a valid server index
+        *
+        * @param string $i
+        * @return bool
+        */
+       public function haveIndex( $i );
+
+       /**
+        * Returns true if the specified index is valid and has non-zero load
+        *
+        * @param string $i
+        * @return bool
+        */
+       public function isNonZeroLoad( $i );
+
+       /**
+        * Get the number of defined servers (not the number of open connections)
+        *
+        * @return int
+        */
+       public function getServerCount();
+
+       /**
+        * Get the host name or IP address of the server with the specified index
+        * Prefer a readable name if available.
+        * @param string $i
+        * @return string
+        */
+       public function getServerName( $i );
+
+       /**
+        * Return the server info structure for a given index, or false if the index is invalid.
+        * @param int $i
+        * @return array|bool
+        */
+       public function getServerInfo( $i );
+
+       /**
+        * Sets the server info structure for the given index. Entry at index $i
+        * is created if it doesn't exist
+        * @param int $i
+        * @param array $serverInfo
+        */
+       public function setServerInfo( $i, array $serverInfo );
+
+       /**
+        * Get the current master position for chronology control purposes
+        * @return DBMasterPos|bool Returns false if not applicable
+        */
+       public function getMasterPos();
+
+       /**
+        * Disable this load balancer. All connections are closed, and any attempt to
+        * open a new connection will result in a DBAccessError.
+        */
+       public function disable();
+
+       /**
+        * Close all open connections
+        */
+       public function closeAll();
+
+       /**
+        * Close a connection
+        *
+        * Using this function makes sure the LoadBalancer knows the connection is closed.
+        * If you use $conn->close() directly, the load balancer won't update its state.
+        *
+        * @param IDatabase $conn
+        */
+       public function closeConnection( IDatabase $conn );
+
+       /**
+        * Commit transactions on all open connections
+        * @param string $fname Caller name
+        * @throws DBExpectedError
+        */
+       public function commitAll( $fname = __METHOD__ );
+
+       /**
+        * Perform all pre-commit callbacks that remain part of the atomic transactions
+        * and disable any post-commit callbacks until runMasterPostTrxCallbacks()
+        *
+        * Use this only for mutli-database commits
+        */
+       public function finalizeMasterChanges();
+
+       /**
+        * Perform all pre-commit checks for things like replication safety
+        *
+        * Use this only for mutli-database commits
+        *
+        * @param array $options Includes:
+        *   - maxWriteDuration : max write query duration time in seconds
+        * @throws DBTransactionError
+        */
+       public function approveMasterChanges( array $options );
+
+       /**
+        * Flush any master transaction snapshots and set DBO_TRX (if DBO_DEFAULT is set)
+        *
+        * The DBO_TRX setting will be reverted to the default in each of these methods:
+        *   - commitMasterChanges()
+        *   - rollbackMasterChanges()
+        *   - commitAll()
+        * This allows for custom transaction rounds from any outer transaction scope.
+        *
+        * @param string $fname
+        * @throws DBExpectedError
+        */
+       public function beginMasterChanges( $fname = __METHOD__ );
+
+       /**
+        * Issue COMMIT on all master connections where writes where done
+        * @param string $fname Caller name
+        * @throws DBExpectedError
+        */
+       public function commitMasterChanges( $fname = __METHOD__ );
+
+       /**
+        * Issue all pending post-COMMIT/ROLLBACK callbacks
+        *
+        * Use this only for mutli-database commits
+        *
+        * @param integer $type IDatabase::TRIGGER_* constant
+        * @return Exception|null The first exception or null if there were none
+        */
+       public function runMasterPostTrxCallbacks( $type );
+
+       /**
+        * Issue ROLLBACK only on master, only if queries were done on connection
+        * @param string $fname Caller name
+        * @throws DBExpectedError
+        */
+       public function rollbackMasterChanges( $fname = __METHOD__ );
+
+       /**
+        * Suppress all pending post-COMMIT/ROLLBACK callbacks
+        *
+        * Use this only for mutli-database commits
+        *
+        * @return Exception|null The first exception or null if there were none
+        */
+       public function suppressTransactionEndCallbacks();
+
+       /**
+        * Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshot
+        *
+        * @param string $fname Caller name
+        */
+       public function flushReplicaSnapshots( $fname = __METHOD__ );
+
+       /**
+        * @return bool Whether a master connection is already open
+        */
+       public function hasMasterConnection();
+
+       /**
+        * Determine if there are pending changes in a transaction by this thread
+        * @return bool
+        */
+       public function hasMasterChanges();
+
+       /**
+        * Get the timestamp of the latest write query done by this thread
+        * @return float|bool UNIX timestamp or false
+        */
+       public function lastMasterChangeTimestamp();
+
+       /**
+        * Check if this load balancer object had any recent or still
+        * pending writes issued against it by this PHP thread
+        *
+        * @param float $age How many seconds ago is "recent" [defaults to mWaitTimeout]
+        * @return bool
+        */
+       public function hasOrMadeRecentMasterChanges( $age = null );
+
+       /**
+        * Get the list of callers that have pending master changes
+        *
+        * @return string[] List of method names
+        */
+       public function pendingMasterChangeCallers();
+
+       /**
+        * @note This method will trigger a DB connection if not yet done
+        * @param string|bool $domain Domain ID, or false for the current domain
+        * @return bool Whether the generic connection for reads is highly "lagged"
+        */
+       public function getLaggedReplicaMode( $domain = false );
+
+       /**
+        * @note This method will never cause a new DB connection
+        * @return bool Whether any generic connection used for reads was highly "lagged"
+        */
+       public function laggedReplicaUsed();
+
+       /**
+        * @note This method may trigger a DB connection if not yet done
+        * @param string|bool $domain Domain ID, or false for the current domain
+        * @param IDatabase|null DB master connection; used to avoid loops [optional]
+        * @return string|bool Reason the master is read-only or false if it is not
+        */
+       public function getReadOnlyReason( $domain = false, IDatabase $conn = null );
+
+       /**
+        * Disables/enables lag checks
+        * @param null|bool $mode
+        * @return bool
+        */
+       public function allowLagged( $mode = null );
+
+       /**
+        * @return bool
+        */
+       public function pingAll();
+
+       /**
+        * Call a function with each open connection object
+        * @param callable $callback
+        * @param array $params
+        */
+       public function forEachOpenConnection( $callback, array $params = [] );
+
+       /**
+        * Call a function with each open connection object to a master
+        * @param callable $callback
+        * @param array $params
+        */
+       public function forEachOpenMasterConnection( $callback, array $params = [] );
+
+       /**
+        * Call a function with each open replica DB connection object
+        * @param callable $callback
+        * @param array $params
+        */
+       public function forEachOpenReplicaConnection( $callback, array $params = [] );
+
+       /**
+        * Get the hostname and lag time of the most-lagged replica DB
+        *
+        * This is useful for maintenance scripts that need to throttle their updates.
+        * May attempt to open connections to replica DBs on the default DB. If there is
+        * no lag, the maximum lag will be reported as -1.
+        *
+        * @param bool|string $domain Domain ID, or false for the default database
+        * @return array ( host, max lag, index of max lagged host )
+        */
+       public function getMaxLag( $domain = false );
+
+       /**
+        * Get an estimate of replication lag (in seconds) for each server
+        *
+        * Results are cached for a short time in memcached/process cache
+        *
+        * Values may be "false" if replication is too broken to estimate
+        *
+        * @param string|bool $domain
+        * @return int[] Map of (server index => float|int|bool)
+        */
+       public function getLagTimes( $domain = false );
+
+       /**
+        * Get the lag in seconds for a given connection, or zero if this load
+        * balancer does not have replication enabled.
+        *
+        * This should be used in preference to Database::getLag() in cases where
+        * replication may not be in use, since there is no way to determine if
+        * replication is in use at the connection level without running
+        * potentially restricted queries such as SHOW SLAVE STATUS. Using this
+        * function instead of Database::getLag() avoids a fatal error in this
+        * case on many installations.
+        *
+        * @param IDatabase $conn
+        * @return int|bool Returns false on error
+        */
+       public function safeGetLag( IDatabase $conn );
+
+       /**
+        * Wait for a replica DB to reach a specified master position
+        *
+        * This will connect to the master to get an accurate position if $pos is not given
+        *
+        * @param IDatabase $conn Replica DB
+        * @param DBMasterPos|bool $pos Master position; default: current position
+        * @param integer|null $timeout Timeout in seconds [optional]
+        * @return bool Success
+        */
+       public function safeWaitForMasterPos( IDatabase $conn, $pos = false, $timeout = null );
+
+       /**
+        * Set a callback via IDatabase::setTransactionListener() on
+        * all current and future master connections of this load balancer
+        *
+        * @param string $name Callback name
+        * @param callable|null $callback
+        */
+       public function setTransactionListener( $name, callable $callback = null );
+
+       /**
+        * Set a new table prefix for the existing local domain ID for testing
+        *
+        * @param string $prefix
+        */
+       public function setDomainPrefix( $prefix );
+
+       /**
+        * Make certain table names use their own database, schema, and table prefix
+        * when passed into SQL queries pre-escaped and without a qualified database name
+        *
+        * For example, "user" can be converted to "myschema.mydbname.user" for convenience.
+        * Appearances like `user`, somedb.user, somedb.someschema.user will used literally.
+        *
+        * Calling this twice will completely clear any old table aliases. Also, note that
+        * callers are responsible for making sure the schemas and databases actually exist.
+        *
+        * @param array[] $aliases Map of (table => (dbname, schema, prefix) map)
+        */
+       public function setTableAliases( array $aliases );
+}
diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
new file mode 100644 (file)
index 0000000..a86e1de
--- /dev/null
@@ -0,0 +1,1546 @@
+<?php
+/**
+ * Database load balancing manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+use Psr\Log\LoggerInterface;
+use Wikimedia\ScopedCallback;
+
+/**
+ * Database connection, tracking, load balancing, and transaction manager for a cluster
+ *
+ * @ingroup Database
+ */
+class LoadBalancer implements ILoadBalancer {
+       /** @var array[] Map of (server index => server config array) */
+       private $mServers;
+       /** @var array[] Map of (local/foreignUsed/foreignFree => server index => IDatabase array) */
+       private $mConns;
+       /** @var float[] Map of (server index => weight) */
+       private $mLoads;
+       /** @var array[] Map of (group => server index => weight) */
+       private $mGroupLoads;
+       /** @var bool Whether to disregard replica DB lag as a factor in replica DB selection */
+       private $mAllowLagged;
+       /** @var integer Seconds to spend waiting on replica DB lag to resolve */
+       private $mWaitTimeout;
+       /** @var array The LoadMonitor configuration */
+       private $loadMonitorConfig;
+       /** @var array[] $aliases Map of (table => (dbname, schema, prefix) map) */
+       private $tableAliases = [];
+
+       /** @var ILoadMonitor */
+       private $loadMonitor;
+       /** @var BagOStuff */
+       private $srvCache;
+       /** @var BagOStuff */
+       private $memCache;
+       /** @var WANObjectCache */
+       private $wanCache;
+       /** @var object|string Class name or object With profileIn/profileOut methods */
+       protected $profiler;
+       /** @var TransactionProfiler */
+       protected $trxProfiler;
+       /** @var LoggerInterface */
+       protected $replLogger;
+       /** @var LoggerInterface */
+       protected $connLogger;
+       /** @var LoggerInterface */
+       protected $queryLogger;
+       /** @var LoggerInterface */
+       protected $perfLogger;
+
+       /** @var bool|IDatabase Database connection that caused a problem */
+       private $mErrorConnection;
+       /** @var integer The generic (not query grouped) replica DB index (of $mServers) */
+       private $mReadIndex;
+       /** @var bool|DBMasterPos False if not set */
+       private $mWaitForPos;
+       /** @var bool Whether the generic reader fell back to a lagged replica DB */
+       private $laggedReplicaMode = false;
+       /** @var bool Whether the generic reader fell back to a lagged replica DB */
+       private $allReplicasDownMode = false;
+       /** @var string The last DB selection or connection error */
+       private $mLastError = 'Unknown error';
+       /** @var string|bool Reason the LB is read-only or false if not */
+       private $readOnlyReason = false;
+       /** @var integer Total connections opened */
+       private $connsOpened = 0;
+       /** @var string|bool String if a requested DBO_TRX transaction round is active */
+       private $trxRoundId = false;
+       /** @var array[] Map of (name => callable) */
+       private $trxRecurringCallbacks = [];
+       /** @var DatabaseDomain Local Domain ID and default for selectDB() calls */
+       private $localDomain;
+       /** @var string Alternate ID string for the domain instead of DatabaseDomain::getId() */
+       private $localDomainIdAlias;
+       /** @var string Current server name */
+       private $host;
+       /** @var bool Whether this PHP instance is for a CLI script */
+       protected $cliMode;
+       /** @var string Agent name for query profiling */
+       protected $agent;
+
+       /** @var callable Exception logger */
+       private $errorLogger;
+
+       /** @var boolean */
+       private $disabled = false;
+
+       /** @var integer Warn when this many connection are held */
+       const CONN_HELD_WARN_THRESHOLD = 10;
+
+       /** @var integer Default 'max lag' when unspecified */
+       const MAX_LAG_DEFAULT = 10;
+       /** @var integer Seconds to cache master server read-only status */
+       const TTL_CACHE_READONLY = 5;
+
+       public function __construct( array $params ) {
+               if ( !isset( $params['servers'] ) ) {
+                       throw new InvalidArgumentException( __CLASS__ . ': missing servers parameter' );
+               }
+               $this->mServers = $params['servers'];
+
+               $this->localDomain = isset( $params['localDomain'] )
+                       ? DatabaseDomain::newFromId( $params['localDomain'] )
+                       : DatabaseDomain::newUnspecified();
+               // In case a caller assumes that the domain ID is simply <db>-<prefix>, which is almost
+               // always true, gracefully handle the case when they fail to account for escaping.
+               if ( $this->localDomain->getTablePrefix() != '' ) {
+                       $this->localDomainIdAlias =
+                               $this->localDomain->getDatabase() . '-' . $this->localDomain->getTablePrefix();
+               } else {
+                       $this->localDomainIdAlias = $this->localDomain->getDatabase();
+               }
+
+               $this->mWaitTimeout = isset( $params['waitTimeout'] ) ? $params['waitTimeout'] : 10;
+
+               $this->mReadIndex = -1;
+               $this->mConns = [
+                       'local'       => [],
+                       'foreignUsed' => [],
+                       'foreignFree' => []
+               ];
+               $this->mLoads = [];
+               $this->mWaitForPos = false;
+               $this->mErrorConnection = false;
+               $this->mAllowLagged = false;
+
+               if ( isset( $params['readOnlyReason'] ) && is_string( $params['readOnlyReason'] ) ) {
+                       $this->readOnlyReason = $params['readOnlyReason'];
+               }
+
+               if ( isset( $params['loadMonitor'] ) ) {
+                       $this->loadMonitorConfig = $params['loadMonitor'];
+               } else {
+                       $this->loadMonitorConfig = [ 'class' => 'LoadMonitorNull' ];
+               }
+
+               foreach ( $params['servers'] as $i => $server ) {
+                       $this->mLoads[$i] = $server['load'];
+                       if ( isset( $server['groupLoads'] ) ) {
+                               foreach ( $server['groupLoads'] as $group => $ratio ) {
+                                       if ( !isset( $this->mGroupLoads[$group] ) ) {
+                                               $this->mGroupLoads[$group] = [];
+                                       }
+                                       $this->mGroupLoads[$group][$i] = $ratio;
+                               }
+                       }
+               }
+
+               if ( isset( $params['srvCache'] ) ) {
+                       $this->srvCache = $params['srvCache'];
+               } else {
+                       $this->srvCache = new EmptyBagOStuff();
+               }
+               if ( isset( $params['memCache'] ) ) {
+                       $this->memCache = $params['memCache'];
+               } else {
+                       $this->memCache = new EmptyBagOStuff();
+               }
+               if ( isset( $params['wanCache'] ) ) {
+                       $this->wanCache = $params['wanCache'];
+               } else {
+                       $this->wanCache = WANObjectCache::newEmpty();
+               }
+               $this->profiler = isset( $params['profiler'] ) ? $params['profiler'] : null;
+               if ( isset( $params['trxProfiler'] ) ) {
+                       $this->trxProfiler = $params['trxProfiler'];
+               } else {
+                       $this->trxProfiler = new TransactionProfiler();
+               }
+
+               $this->errorLogger = isset( $params['errorLogger'] )
+                       ? $params['errorLogger']
+                       : function ( Exception $e ) {
+                               trigger_error( get_class( $e ) . ': ' . $e->getMessage(), E_USER_WARNING );
+                       };
+
+               foreach ( [ 'replLogger', 'connLogger', 'queryLogger', 'perfLogger' ] as $key ) {
+                       $this->$key = isset( $params[$key] ) ? $params[$key] : new \Psr\Log\NullLogger();
+               }
+
+               $this->host = isset( $params['hostname'] )
+                       ? $params['hostname']
+                       : ( gethostname() ?: 'unknown' );
+               $this->cliMode = isset( $params['cliMode'] ) ? $params['cliMode'] : PHP_SAPI === 'cli';
+               $this->agent = isset( $params['agent'] ) ? $params['agent'] : '';
+       }
+
+       /**
+        * Get a LoadMonitor instance
+        *
+        * @return ILoadMonitor
+        */
+       private function getLoadMonitor() {
+               if ( !isset( $this->loadMonitor ) ) {
+                       $class = $this->loadMonitorConfig['class'];
+                       $this->loadMonitor = new $class(
+                               $this, $this->srvCache, $this->memCache, $this->loadMonitorConfig );
+                       $this->loadMonitor->setLogger( $this->replLogger );
+               }
+
+               return $this->loadMonitor;
+       }
+
+       /**
+        * @param array $loads
+        * @param bool|string $domain Domain to get non-lagged for
+        * @param int $maxLag Restrict the maximum allowed lag to this many seconds
+        * @return bool|int|string
+        */
+       private function getRandomNonLagged( array $loads, $domain = false, $maxLag = INF ) {
+               $lags = $this->getLagTimes( $domain );
+
+               # Unset excessively lagged servers
+               foreach ( $lags as $i => $lag ) {
+                       if ( $i != 0 ) {
+                               # How much lag this server nominally is allowed to have
+                               $maxServerLag = isset( $this->mServers[$i]['max lag'] )
+                                       ? $this->mServers[$i]['max lag']
+                                       : self::MAX_LAG_DEFAULT; // default
+                               # Constrain that futher by $maxLag argument
+                               $maxServerLag = min( $maxServerLag, $maxLag );
+
+                               $host = $this->getServerName( $i );
+                               if ( $lag === false && !is_infinite( $maxServerLag ) ) {
+                                       $this->replLogger->error( "Server $host (#$i) is not replicating?" );
+                                       unset( $loads[$i] );
+                               } elseif ( $lag > $maxServerLag ) {
+                                       $this->replLogger->warning( "Server $host (#$i) has >= $lag seconds of lag" );
+                                       unset( $loads[$i] );
+                               }
+                       }
+               }
+
+               # Find out if all the replica DBs with non-zero load are lagged
+               $sum = 0;
+               foreach ( $loads as $load ) {
+                       $sum += $load;
+               }
+               if ( $sum == 0 ) {
+                       # No appropriate DB servers except maybe the master and some replica DBs with zero load
+                       # Do NOT use the master
+                       # Instead, this function will return false, triggering read-only mode,
+                       # and a lagged replica DB will be used instead.
+                       return false;
+               }
+
+               if ( count( $loads ) == 0 ) {
+                       return false;
+               }
+
+               # Return a random representative of the remainder
+               return ArrayUtils::pickRandom( $loads );
+       }
+
+       public function getReaderIndex( $group = false, $domain = false ) {
+               if ( count( $this->mServers ) == 1 ) {
+                       # Skip the load balancing if there's only one server
+                       return $this->getWriterIndex();
+               } elseif ( $group === false && $this->mReadIndex >= 0 ) {
+                       # Shortcut if generic reader exists already
+                       return $this->mReadIndex;
+               }
+
+               # Find the relevant load array
+               if ( $group !== false ) {
+                       if ( isset( $this->mGroupLoads[$group] ) ) {
+                               $nonErrorLoads = $this->mGroupLoads[$group];
+                       } else {
+                               # No loads for this group, return false and the caller can use some other group
+                               $this->connLogger->info( __METHOD__ . ": no loads for group $group" );
+
+                               return false;
+                       }
+               } else {
+                       $nonErrorLoads = $this->mLoads;
+               }
+
+               if ( !count( $nonErrorLoads ) ) {
+                       throw new InvalidArgumentException( "Empty server array given to LoadBalancer" );
+               }
+
+               # Scale the configured load ratios according to the dynamic load if supported
+               $this->getLoadMonitor()->scaleLoads( $nonErrorLoads, $domain );
+
+               $laggedReplicaMode = false;
+
+               # No server found yet
+               $i = false;
+               # First try quickly looking through the available servers for a server that
+               # meets our criteria
+               $currentLoads = $nonErrorLoads;
+               while ( count( $currentLoads ) ) {
+                       if ( $this->mAllowLagged || $laggedReplicaMode ) {
+                               $i = ArrayUtils::pickRandom( $currentLoads );
+                       } else {
+                               $i = false;
+                               if ( $this->mWaitForPos && $this->mWaitForPos->asOfTime() ) {
+                                       # ChronologyProtecter causes mWaitForPos to be set via sessions.
+                                       # This triggers doWait() after connect, so it's especially good to
+                                       # avoid lagged servers so as to avoid just blocking in that method.
+                                       $ago = microtime( true ) - $this->mWaitForPos->asOfTime();
+                                       # Aim for <= 1 second of waiting (being too picky can backfire)
+                                       $i = $this->getRandomNonLagged( $currentLoads, $domain, $ago + 1 );
+                               }
+                               if ( $i === false ) {
+                                       # Any server with less lag than it's 'max lag' param is preferable
+                                       $i = $this->getRandomNonLagged( $currentLoads, $domain );
+                               }
+                               if ( $i === false && count( $currentLoads ) != 0 ) {
+                                       # All replica DBs lagged. Switch to read-only mode
+                                       $this->replLogger->error( "All replica DBs lagged. Switch to read-only mode" );
+                                       $i = ArrayUtils::pickRandom( $currentLoads );
+                                       $laggedReplicaMode = true;
+                               }
+                       }
+
+                       if ( $i === false ) {
+                               # pickRandom() returned false
+                               # This is permanent and means the configuration or the load monitor
+                               # wants us to return false.
+                               $this->connLogger->debug( __METHOD__ . ": pickRandom() returned false" );
+
+                               return false;
+                       }
+
+                       $serverName = $this->getServerName( $i );
+                       $this->connLogger->debug( __METHOD__ . ": Using reader #$i: $serverName..." );
+
+                       $conn = $this->openConnection( $i, $domain );
+                       if ( !$conn ) {
+                               $this->connLogger->warning( __METHOD__ . ": Failed connecting to $i/$domain" );
+                               unset( $nonErrorLoads[$i] );
+                               unset( $currentLoads[$i] );
+                               $i = false;
+                               continue;
+                       }
+
+                       // Decrement reference counter, we are finished with this connection.
+                       // It will be incremented for the caller later.
+                       if ( $domain !== false ) {
+                               $this->reuseConnection( $conn );
+                       }
+
+                       # Return this server
+                       break;
+               }
+
+               # If all servers were down, quit now
+               if ( !count( $nonErrorLoads ) ) {
+                       $this->connLogger->error( "All servers down" );
+               }
+
+               if ( $i !== false ) {
+                       # Replica DB connection successful.
+                       # Wait for the session master pos for a short time.
+                       if ( $this->mWaitForPos && $i > 0 ) {
+                               $this->doWait( $i );
+                       }
+                       if ( $this->mReadIndex <= 0 && $this->mLoads[$i] > 0 && $group === false ) {
+                               $this->mReadIndex = $i;
+                               # Record if the generic reader index is in "lagged replica DB" mode
+                               if ( $laggedReplicaMode ) {
+                                       $this->laggedReplicaMode = true;
+                               }
+                       }
+                       $serverName = $this->getServerName( $i );
+                       $this->connLogger->debug(
+                               __METHOD__ . ": using server $serverName for group '$group'" );
+               }
+
+               return $i;
+       }
+
+       public function waitFor( $pos ) {
+               $this->mWaitForPos = $pos;
+               $i = $this->mReadIndex;
+
+               if ( $i > 0 ) {
+                       if ( !$this->doWait( $i ) ) {
+                               $this->laggedReplicaMode = true;
+                       }
+               }
+       }
+
+       public function waitForOne( $pos, $timeout = null ) {
+               $this->mWaitForPos = $pos;
+
+               $i = $this->mReadIndex;
+               if ( $i <= 0 ) {
+                       // Pick a generic replica DB if there isn't one yet
+                       $readLoads = $this->mLoads;
+                       unset( $readLoads[$this->getWriterIndex()] ); // replica DBs only
+                       $readLoads = array_filter( $readLoads ); // with non-zero load
+                       $i = ArrayUtils::pickRandom( $readLoads );
+               }
+
+               if ( $i > 0 ) {
+                       $ok = $this->doWait( $i, true, $timeout );
+               } else {
+                       $ok = true; // no applicable loads
+               }
+
+               return $ok;
+       }
+
+       public function waitForAll( $pos, $timeout = null ) {
+               $this->mWaitForPos = $pos;
+               $serverCount = count( $this->mServers );
+
+               $ok = true;
+               for ( $i = 1; $i < $serverCount; $i++ ) {
+                       if ( $this->mLoads[$i] > 0 ) {
+                               $ok = $this->doWait( $i, true, $timeout ) && $ok;
+                       }
+               }
+
+               return $ok;
+       }
+
+       public function getAnyOpenConnection( $i ) {
+               foreach ( $this->mConns as $connsByServer ) {
+                       if ( !empty( $connsByServer[$i] ) ) {
+                               return reset( $connsByServer[$i] );
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Wait for a given replica DB to catch up to the master pos stored in $this
+        * @param int $index Server index
+        * @param bool $open Check the server even if a new connection has to be made
+        * @param int $timeout Max seconds to wait; default is mWaitTimeout
+        * @return bool
+        */
+       protected function doWait( $index, $open = false, $timeout = null ) {
+               $close = false; // close the connection afterwards
+
+               // Check if we already know that the DB has reached this point
+               $server = $this->getServerName( $index );
+               $key = $this->srvCache->makeGlobalKey( __CLASS__, 'last-known-pos', $server );
+               /** @var DBMasterPos $knownReachedPos */
+               $knownReachedPos = $this->srvCache->get( $key );
+               if ( $knownReachedPos && $knownReachedPos->hasReached( $this->mWaitForPos ) ) {
+                       $this->replLogger->debug( __METHOD__ .
+                               ": replica DB $server known to be caught up (pos >= $knownReachedPos)." );
+                       return true;
+               }
+
+               // Find a connection to wait on, creating one if needed and allowed
+               $conn = $this->getAnyOpenConnection( $index );
+               if ( !$conn ) {
+                       if ( !$open ) {
+                               $this->replLogger->debug( __METHOD__ . ": no connection open for $server" );
+
+                               return false;
+                       } else {
+                               $conn = $this->openConnection( $index, self::DOMAIN_ANY );
+                               if ( !$conn ) {
+                                       $this->replLogger->warning( __METHOD__ . ": failed to connect to $server" );
+
+                                       return false;
+                               }
+                               // Avoid connection spam in waitForAll() when connections
+                               // are made just for the sake of doing this lag check.
+                               $close = true;
+                       }
+               }
+
+               $this->replLogger->info( __METHOD__ . ": Waiting for replica DB $server to catch up..." );
+               $timeout = $timeout ?: $this->mWaitTimeout;
+               $result = $conn->masterPosWait( $this->mWaitForPos, $timeout );
+
+               if ( $result == -1 || is_null( $result ) ) {
+                       // Timed out waiting for replica DB, use master instead
+                       $msg = __METHOD__ . ": Timed out waiting on $server pos {$this->mWaitForPos}";
+                       $this->replLogger->warning( "$msg" );
+                       $ok = false;
+               } else {
+                       $this->replLogger->info( __METHOD__ . ": Done" );
+                       $ok = true;
+                       // Remember that the DB reached this point
+                       $this->srvCache->set( $key, $this->mWaitForPos, BagOStuff::TTL_DAY );
+               }
+
+               if ( $close ) {
+                       $this->closeConnection( $conn );
+               }
+
+               return $ok;
+       }
+
+       /**
+        * @see ILoadBalancer::getConnection()
+        *
+        * @param int $i
+        * @param array $groups
+        * @param bool $domain
+        * @return Database
+        * @throws DBConnectionError
+        */
+       public function getConnection( $i, $groups = [], $domain = false ) {
+               if ( $i === null || $i === false ) {
+                       throw new InvalidArgumentException( 'Attempt to call ' . __METHOD__ .
+                               ' with invalid server index' );
+               }
+
+               if ( $this->localDomain->equals( $domain ) || $domain === $this->localDomainIdAlias ) {
+                       $domain = false; // local connection requested
+               }
+
+               $groups = ( $groups === false || $groups === [] )
+                       ? [ false ] // check one "group": the generic pool
+                       : (array)$groups;
+
+               $masterOnly = ( $i == self::DB_MASTER || $i == $this->getWriterIndex() );
+               $oldConnsOpened = $this->connsOpened; // connections open now
+
+               if ( $i == self::DB_MASTER ) {
+                       $i = $this->getWriterIndex();
+               } else {
+                       # Try to find an available server in any the query groups (in order)
+                       foreach ( $groups as $group ) {
+                               $groupIndex = $this->getReaderIndex( $group, $domain );
+                               if ( $groupIndex !== false ) {
+                                       $i = $groupIndex;
+                                       break;
+                               }
+                       }
+               }
+
+               # Operation-based index
+               if ( $i == self::DB_REPLICA ) {
+                       $this->mLastError = 'Unknown error'; // reset error string
+                       # Try the general server pool if $groups are unavailable.
+                       $i = ( $groups === [ false ] )
+                               ? false // don't bother with this if that is what was tried above
+                               : $this->getReaderIndex( false, $domain );
+                       # Couldn't find a working server in getReaderIndex()?
+                       if ( $i === false ) {
+                               $this->mLastError = 'No working replica DB server: ' . $this->mLastError;
+                               // Throw an exception
+                               $this->reportConnectionError();
+                               return null; // not reached
+                       }
+               }
+
+               # Now we have an explicit index into the servers array
+               $conn = $this->openConnection( $i, $domain );
+               if ( !$conn ) {
+                       // Throw an exception
+                       $this->reportConnectionError();
+                       return null; // not reached
+               }
+
+               # Profile any new connections that happen
+               if ( $this->connsOpened > $oldConnsOpened ) {
+                       $host = $conn->getServer();
+                       $dbname = $conn->getDBname();
+                       $this->trxProfiler->recordConnection( $host, $dbname, $masterOnly );
+               }
+
+               if ( $masterOnly ) {
+                       # Make master-requested DB handles inherit any read-only mode setting
+                       $conn->setLBInfo( 'readOnlyReason', $this->getReadOnlyReason( $domain, $conn ) );
+               }
+
+               return $conn;
+       }
+
+       public function reuseConnection( $conn ) {
+               $serverIndex = $conn->getLBInfo( 'serverIndex' );
+               $refCount = $conn->getLBInfo( 'foreignPoolRefCount' );
+               if ( $serverIndex === null || $refCount === null ) {
+                       /**
+                        * This can happen in code like:
+                        *   foreach ( $dbs as $db ) {
+                        *     $conn = $lb->getConnection( $lb::DB_REPLICA, [], $db );
+                        *     ...
+                        *     $lb->reuseConnection( $conn );
+                        *   }
+                        * When a connection to the local DB is opened in this way, reuseConnection()
+                        * should be ignored
+                        */
+                       return;
+               } elseif ( $conn instanceof DBConnRef ) {
+                       // DBConnRef already handles calling reuseConnection() and only passes the live
+                       // Database instance to this method. Any caller passing in a DBConnRef is broken.
+                       $this->connLogger->error( __METHOD__ . ": got DBConnRef instance.\n" .
+                               ( new RuntimeException() )->getTraceAsString() );
+
+                       return;
+               }
+
+               if ( $this->disabled ) {
+                       return; // DBConnRef handle probably survived longer than the LoadBalancer
+               }
+
+               $domain = $conn->getDomainID();
+               if ( !isset( $this->mConns['foreignUsed'][$serverIndex][$domain] ) ) {
+                       throw new InvalidArgumentException( __METHOD__ .
+                               ": connection $serverIndex/$domain not found; it may have already been freed." );
+               } elseif ( $this->mConns['foreignUsed'][$serverIndex][$domain] !== $conn ) {
+                       throw new InvalidArgumentException( __METHOD__ .
+                               ": connection $serverIndex/$domain mismatched; it may have already been freed." );
+               }
+               $conn->setLBInfo( 'foreignPoolRefCount', --$refCount );
+               if ( $refCount <= 0 ) {
+                       $this->mConns['foreignFree'][$serverIndex][$domain] = $conn;
+                       unset( $this->mConns['foreignUsed'][$serverIndex][$domain] );
+                       if ( !$this->mConns['foreignUsed'][$serverIndex] ) {
+                               unset( $this->mConns[ 'foreignUsed' ][$serverIndex] ); // clean up
+                       }
+                       $this->connLogger->debug( __METHOD__ . ": freed connection $serverIndex/$domain" );
+               } else {
+                       $this->connLogger->debug( __METHOD__ .
+                               ": reference count for $serverIndex/$domain reduced to $refCount" );
+               }
+       }
+
+       public function getConnectionRef( $db, $groups = [], $domain = false ) {
+               $domain = ( $domain !== false ) ? $domain : $this->localDomain;
+
+               return new DBConnRef( $this, $this->getConnection( $db, $groups, $domain ) );
+       }
+
+       public function getLazyConnectionRef( $db, $groups = [], $domain = false ) {
+               $domain = ( $domain !== false ) ? $domain : $this->localDomain;
+
+               return new DBConnRef( $this, [ $db, $groups, $domain ] );
+       }
+
+       /**
+        * @see ILoadBalancer::openConnection()
+        *
+        * @param int $i
+        * @param bool $domain
+        * @return bool|Database
+        * @throws DBAccessError
+        */
+       public function openConnection( $i, $domain = false ) {
+               if ( $this->localDomain->equals( $domain ) || $domain === $this->localDomainIdAlias ) {
+                       $domain = false; // local connection requested
+               }
+
+               if ( $domain !== false ) {
+                       $conn = $this->openForeignConnection( $i, $domain );
+               } elseif ( isset( $this->mConns['local'][$i][0] ) ) {
+                       $conn = $this->mConns['local'][$i][0];
+               } else {
+                       if ( !isset( $this->mServers[$i] ) || !is_array( $this->mServers[$i] ) ) {
+                               throw new InvalidArgumentException( "No server with index '$i'." );
+                       }
+                       // Open a new connection
+                       $server = $this->mServers[$i];
+                       $server['serverIndex'] = $i;
+                       $conn = $this->reallyOpenConnection( $server, false );
+                       $serverName = $this->getServerName( $i );
+                       if ( $conn->isOpen() ) {
+                               $this->connLogger->debug( "Connected to database $i at '$serverName'." );
+                               $this->mConns['local'][$i][0] = $conn;
+                       } else {
+                               $this->connLogger->warning( "Failed to connect to database $i at '$serverName'." );
+                               $this->mErrorConnection = $conn;
+                               $conn = false;
+                       }
+               }
+
+               if ( $conn && !$conn->isOpen() ) {
+                       // Connection was made but later unrecoverably lost for some reason.
+                       // Do not return a handle that will just throw exceptions on use,
+                       // but let the calling code (e.g. getReaderIndex) try another server.
+                       // See DatabaseMyslBase::ping() for how this can happen.
+                       $this->mErrorConnection = $conn;
+                       $conn = false;
+               }
+
+               return $conn;
+       }
+
+       /**
+        * Open a connection to a foreign DB, or return one if it is already open.
+        *
+        * Increments a reference count on the returned connection which locks the
+        * connection to the requested domain. This reference count can be
+        * decremented by calling reuseConnection().
+        *
+        * If a connection is open to the appropriate server already, but with the wrong
+        * database, it will be switched to the right database and returned, as long as
+        * it has been freed first with reuseConnection().
+        *
+        * On error, returns false, and the connection which caused the
+        * error will be available via $this->mErrorConnection.
+        *
+        * @note If disable() was called on this LoadBalancer, this method will throw a DBAccessError.
+        *
+        * @param int $i Server index
+        * @param string $domain Domain ID to open
+        * @return Database
+        */
+       private function openForeignConnection( $i, $domain ) {
+               $domainInstance = DatabaseDomain::newFromId( $domain );
+               $dbName = $domainInstance->getDatabase();
+               $prefix = $domainInstance->getTablePrefix();
+
+               if ( isset( $this->mConns['foreignUsed'][$i][$domain] ) ) {
+                       // Reuse an already-used connection
+                       $conn = $this->mConns['foreignUsed'][$i][$domain];
+                       $this->connLogger->debug( __METHOD__ . ": reusing connection $i/$domain" );
+               } elseif ( isset( $this->mConns['foreignFree'][$i][$domain] ) ) {
+                       // Reuse a free connection for the same domain
+                       $conn = $this->mConns['foreignFree'][$i][$domain];
+                       unset( $this->mConns['foreignFree'][$i][$domain] );
+                       $this->mConns['foreignUsed'][$i][$domain] = $conn;
+                       $this->connLogger->debug( __METHOD__ . ": reusing free connection $i/$domain" );
+               } elseif ( !empty( $this->mConns['foreignFree'][$i] ) ) {
+                       // Reuse a connection from another domain
+                       $conn = reset( $this->mConns['foreignFree'][$i] );
+                       $oldDomain = key( $this->mConns['foreignFree'][$i] );
+                       // The empty string as a DB name means "don't care".
+                       // DatabaseMysqlBase::open() already handle this on connection.
+                       if ( strlen( $dbName ) && !$conn->selectDB( $dbName ) ) {
+                               $this->mLastError = "Error selecting database '$dbName' on server " .
+                                       $conn->getServer() . " from client host {$this->host}";
+                               $this->mErrorConnection = $conn;
+                               $conn = false;
+                       } else {
+                               $conn->tablePrefix( $prefix );
+                               unset( $this->mConns['foreignFree'][$i][$oldDomain] );
+                               $this->mConns['foreignUsed'][$i][$domain] = $conn;
+                               $this->connLogger->debug( __METHOD__ .
+                                       ": reusing free connection from $oldDomain for $domain" );
+                       }
+               } else {
+                       if ( !isset( $this->mServers[$i] ) || !is_array( $this->mServers[$i] ) ) {
+                               throw new InvalidArgumentException( "No server with index '$i'." );
+                       }
+                       // Open a new connection
+                       $server = $this->mServers[$i];
+                       $server['serverIndex'] = $i;
+                       $server['foreignPoolRefCount'] = 0;
+                       $server['foreign'] = true;
+                       $conn = $this->reallyOpenConnection( $server, $dbName );
+                       if ( !$conn->isOpen() ) {
+                               $this->connLogger->warning( __METHOD__ . ": connection error for $i/$domain" );
+                               $this->mErrorConnection = $conn;
+                               $conn = false;
+                       } else {
+                               $conn->tablePrefix( $prefix );
+                               $this->mConns['foreignUsed'][$i][$domain] = $conn;
+                               $this->connLogger->debug( __METHOD__ . ": opened new connection for $i/$domain" );
+                       }
+               }
+
+               // Increment reference count
+               if ( $conn ) {
+                       $refCount = $conn->getLBInfo( 'foreignPoolRefCount' );
+                       $conn->setLBInfo( 'foreignPoolRefCount', $refCount + 1 );
+               }
+
+               return $conn;
+       }
+
+       /**
+        * Test if the specified index represents an open connection
+        *
+        * @param int $index Server index
+        * @access private
+        * @return bool
+        */
+       private function isOpen( $index ) {
+               if ( !is_integer( $index ) ) {
+                       return false;
+               }
+
+               return (bool)$this->getAnyOpenConnection( $index );
+       }
+
+       /**
+        * Really opens a connection. Uncached.
+        * Returns a Database object whether or not the connection was successful.
+        * @access private
+        *
+        * @param array $server
+        * @param string|bool $dbNameOverride Use "" to not select any database
+        * @return Database
+        * @throws DBAccessError
+        * @throws InvalidArgumentException
+        */
+       protected function reallyOpenConnection( array $server, $dbNameOverride = false ) {
+               if ( $this->disabled ) {
+                       throw new DBAccessError();
+               }
+
+               if ( $dbNameOverride !== false ) {
+                       $server['dbname'] = $dbNameOverride;
+               }
+
+               // Let the handle know what the cluster master is (e.g. "db1052")
+               $masterName = $this->getServerName( $this->getWriterIndex() );
+               $server['clusterMasterHost'] = $masterName;
+
+               // Log when many connection are made on requests
+               if ( ++$this->connsOpened >= self::CONN_HELD_WARN_THRESHOLD ) {
+                       $this->perfLogger->warning( __METHOD__ . ": " .
+                               "{$this->connsOpened}+ connections made (master=$masterName)" );
+               }
+
+               $server['srvCache'] = $this->srvCache;
+               // Set loggers and profilers
+               $server['connLogger'] = $this->connLogger;
+               $server['queryLogger'] = $this->queryLogger;
+               $server['errorLogger'] = $this->errorLogger;
+               $server['profiler'] = $this->profiler;
+               $server['trxProfiler'] = $this->trxProfiler;
+               // Use the same agent and PHP mode for all DB handles
+               $server['cliMode'] = $this->cliMode;
+               $server['agent'] = $this->agent;
+               // Use DBO_DEFAULT flags by default for LoadBalancer managed databases. Assume that the
+               // application calls LoadBalancer::commitMasterChanges() before the PHP script completes.
+               $server['flags'] = isset( $server['flags'] ) ? $server['flags'] : IDatabase::DBO_DEFAULT;
+
+               // Create a live connection object
+               try {
+                       $db = Database::factory( $server['type'], $server );
+               } catch ( DBConnectionError $e ) {
+                       // FIXME: This is probably the ugliest thing I have ever done to
+                       // PHP. I'm half-expecting it to segfault, just out of disgust. -- TS
+                       $db = $e->db;
+               }
+
+               $db->setLBInfo( $server );
+               $db->setLazyMasterHandle(
+                       $this->getLazyConnectionRef( self::DB_MASTER, [], $db->getDomainID() )
+               );
+               $db->setTableAliases( $this->tableAliases );
+
+               if ( $server['serverIndex'] === $this->getWriterIndex() ) {
+                       if ( $this->trxRoundId !== false ) {
+                               $this->applyTransactionRoundFlags( $db );
+                       }
+                       foreach ( $this->trxRecurringCallbacks as $name => $callback ) {
+                               $db->setTransactionListener( $name, $callback );
+                       }
+               }
+
+               return $db;
+       }
+
+       /**
+        * @throws DBConnectionError
+        */
+       private function reportConnectionError() {
+               $conn = $this->mErrorConnection; // the connection which caused the error
+               $context = [
+                       'method' => __METHOD__,
+                       'last_error' => $this->mLastError,
+               ];
+
+               if ( !is_object( $conn ) ) {
+                       // No last connection, probably due to all servers being too busy
+                       $this->connLogger->error(
+                               "LB failure with no last connection. Connection error: {last_error}",
+                               $context
+                       );
+
+                       // If all servers were busy, mLastError will contain something sensible
+                       throw new DBConnectionError( null, $this->mLastError );
+               } else {
+                       $context['db_server'] = $conn->getServer();
+                       $this->connLogger->warning(
+                               "Connection error: {last_error} ({db_server})",
+                               $context
+                       );
+
+                       // throws DBConnectionError
+                       $conn->reportConnectionError( "{$this->mLastError} ({$context['db_server']})" );
+               }
+       }
+
+       public function getWriterIndex() {
+               return 0;
+       }
+
+       public function haveIndex( $i ) {
+               return array_key_exists( $i, $this->mServers );
+       }
+
+       public function isNonZeroLoad( $i ) {
+               return array_key_exists( $i, $this->mServers ) && $this->mLoads[$i] != 0;
+       }
+
+       public function getServerCount() {
+               return count( $this->mServers );
+       }
+
+       public function getServerName( $i ) {
+               if ( isset( $this->mServers[$i]['hostName'] ) ) {
+                       $name = $this->mServers[$i]['hostName'];
+               } elseif ( isset( $this->mServers[$i]['host'] ) ) {
+                       $name = $this->mServers[$i]['host'];
+               } else {
+                       $name = '';
+               }
+
+               return ( $name != '' ) ? $name : 'localhost';
+       }
+
+       public function getServerInfo( $i ) {
+               if ( isset( $this->mServers[$i] ) ) {
+                       return $this->mServers[$i];
+               } else {
+                       return false;
+               }
+       }
+
+       public function setServerInfo( $i, array $serverInfo ) {
+               $this->mServers[$i] = $serverInfo;
+       }
+
+       public function getMasterPos() {
+               # If this entire request was served from a replica DB without opening a connection to the
+               # master (however unlikely that may be), then we can fetch the position from the replica DB.
+               $masterConn = $this->getAnyOpenConnection( $this->getWriterIndex() );
+               if ( !$masterConn ) {
+                       $serverCount = count( $this->mServers );
+                       for ( $i = 1; $i < $serverCount; $i++ ) {
+                               $conn = $this->getAnyOpenConnection( $i );
+                               if ( $conn ) {
+                                       return $conn->getReplicaPos();
+                               }
+                       }
+               } else {
+                       return $masterConn->getMasterPos();
+               }
+
+               return false;
+       }
+
+       public function disable() {
+               $this->closeAll();
+               $this->disabled = true;
+       }
+
+       public function closeAll() {
+               $this->forEachOpenConnection( function ( IDatabase $conn ) {
+                       $host = $conn->getServer();
+                       $this->connLogger->debug( "Closing connection to database '$host'." );
+                       $conn->close();
+               } );
+
+               $this->mConns = [
+                       'local' => [],
+                       'foreignFree' => [],
+                       'foreignUsed' => [],
+               ];
+               $this->connsOpened = 0;
+       }
+
+       public function closeConnection( IDatabase $conn ) {
+               $serverIndex = $conn->getLBInfo( 'serverIndex' ); // second index level of mConns
+               foreach ( $this->mConns as $type => $connsByServer ) {
+                       if ( !isset( $connsByServer[$serverIndex] ) ) {
+                               continue;
+                       }
+
+                       foreach ( $connsByServer[$serverIndex] as $i => $trackedConn ) {
+                               if ( $conn === $trackedConn ) {
+                                       $host = $this->getServerName( $i );
+                                       $this->connLogger->debug( "Closing connection to database $i at '$host'." );
+                                       unset( $this->mConns[$type][$serverIndex][$i] );
+                                       --$this->connsOpened;
+                                       break 2;
+                               }
+                       }
+               }
+
+               $conn->close();
+       }
+
+       public function commitAll( $fname = __METHOD__ ) {
+               $failures = [];
+
+               $restore = ( $this->trxRoundId !== false );
+               $this->trxRoundId = false;
+               $this->forEachOpenConnection(
+                       function ( IDatabase $conn ) use ( $fname, $restore, &$failures ) {
+                               try {
+                                       $conn->commit( $fname, $conn::FLUSHING_ALL_PEERS );
+                               } catch ( DBError $e ) {
+                                       call_user_func( $this->errorLogger, $e );
+                                       $failures[] = "{$conn->getServer()}: {$e->getMessage()}";
+                               }
+                               if ( $restore && $conn->getLBInfo( 'master' ) ) {
+                                       $this->undoTransactionRoundFlags( $conn );
+                               }
+                       }
+               );
+
+               if ( $failures ) {
+                       throw new DBExpectedError(
+                               null,
+                               "Commit failed on server(s) " . implode( "\n", array_unique( $failures ) )
+                       );
+               }
+       }
+
+       public function finalizeMasterChanges() {
+               $this->forEachOpenMasterConnection( function ( Database $conn ) {
+                       // Any error should cause all DB transactions to be rolled back together
+                       $conn->setTrxEndCallbackSuppression( false );
+                       $conn->runOnTransactionPreCommitCallbacks();
+                       // Defer post-commit callbacks until COMMIT finishes for all DBs
+                       $conn->setTrxEndCallbackSuppression( true );
+               } );
+       }
+
+       public function approveMasterChanges( array $options ) {
+               $limit = isset( $options['maxWriteDuration'] ) ? $options['maxWriteDuration'] : 0;
+               $this->forEachOpenMasterConnection( function ( IDatabase $conn ) use ( $limit ) {
+                       // If atomic sections or explicit transactions are still open, some caller must have
+                       // caught an exception but failed to properly rollback any changes. Detect that and
+                       // throw and error (causing rollback).
+                       if ( $conn->explicitTrxActive() ) {
+                               throw new DBTransactionError(
+                                       $conn,
+                                       "Explicit transaction still active. A caller may have caught an error."
+                               );
+                       }
+                       // Assert that the time to replicate the transaction will be sane.
+                       // If this fails, then all DB transactions will be rollback back together.
+                       $time = $conn->pendingWriteQueryDuration( $conn::ESTIMATE_DB_APPLY );
+                       if ( $limit > 0 && $time > $limit ) {
+                               throw new DBTransactionSizeError(
+                                       $conn,
+                                       "Transaction spent $time second(s) in writes, exceeding the $limit limit.",
+                                       [ $time, $limit ]
+                               );
+                       }
+                       // If a connection sits idle while slow queries execute on another, that connection
+                       // may end up dropped before the commit round is reached. Ping servers to detect this.
+                       if ( $conn->writesOrCallbacksPending() && !$conn->ping() ) {
+                               throw new DBTransactionError(
+                                       $conn,
+                                       "A connection to the {$conn->getDBname()} database was lost before commit."
+                               );
+                       }
+               } );
+       }
+
+       public function beginMasterChanges( $fname = __METHOD__ ) {
+               if ( $this->trxRoundId !== false ) {
+                       throw new DBTransactionError(
+                               null,
+                               "$fname: Transaction round '{$this->trxRoundId}' already started."
+                       );
+               }
+               $this->trxRoundId = $fname;
+
+               $failures = [];
+               $this->forEachOpenMasterConnection(
+                       function ( Database $conn ) use ( $fname, &$failures ) {
+                               $conn->setTrxEndCallbackSuppression( true );
+                               try {
+                                       $conn->flushSnapshot( $fname );
+                               } catch ( DBError $e ) {
+                                       call_user_func( $this->errorLogger, $e );
+                                       $failures[] = "{$conn->getServer()}: {$e->getMessage()}";
+                               }
+                               $conn->setTrxEndCallbackSuppression( false );
+                               $this->applyTransactionRoundFlags( $conn );
+                       }
+               );
+
+               if ( $failures ) {
+                       throw new DBExpectedError(
+                               null,
+                               "$fname: Flush failed on server(s) " . implode( "\n", array_unique( $failures ) )
+                       );
+               }
+       }
+
+       public function commitMasterChanges( $fname = __METHOD__ ) {
+               $failures = [];
+
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $scope = $this->getScopedPHPBehaviorForCommit(); // try to ignore client aborts
+
+               $restore = ( $this->trxRoundId !== false );
+               $this->trxRoundId = false;
+               $this->forEachOpenMasterConnection(
+                       function ( IDatabase $conn ) use ( $fname, $restore, &$failures ) {
+                               try {
+                                       if ( $conn->writesOrCallbacksPending() ) {
+                                               $conn->commit( $fname, $conn::FLUSHING_ALL_PEERS );
+                                       } elseif ( $restore ) {
+                                               $conn->flushSnapshot( $fname );
+                                       }
+                               } catch ( DBError $e ) {
+                                       call_user_func( $this->errorLogger, $e );
+                                       $failures[] = "{$conn->getServer()}: {$e->getMessage()}";
+                               }
+                               if ( $restore ) {
+                                       $this->undoTransactionRoundFlags( $conn );
+                               }
+                       }
+               );
+
+               if ( $failures ) {
+                       throw new DBExpectedError(
+                               null,
+                               "$fname: Commit failed on server(s) " . implode( "\n", array_unique( $failures ) )
+                       );
+               }
+       }
+
+       public function runMasterPostTrxCallbacks( $type ) {
+               $e = null; // first exception
+               $this->forEachOpenMasterConnection( function ( Database $conn ) use ( $type, &$e ) {
+                       $conn->setTrxEndCallbackSuppression( false );
+                       if ( $conn->writesOrCallbacksPending() ) {
+                               // This happens if onTransactionIdle() callbacks leave callbacks on *another* DB
+                               // (which finished its callbacks already). Warn and recover in this case. Let the
+                               // callbacks run in the final commitMasterChanges() in LBFactory::shutdown().
+                               $this->queryLogger->error( __METHOD__ . ": found writes/callbacks pending." );
+                               return;
+                       } elseif ( $conn->trxLevel() ) {
+                               // This happens for single-DB setups where DB_REPLICA uses the master DB,
+                               // thus leaving an implicit read-only transaction open at this point. It
+                               // also happens if onTransactionIdle() callbacks leave implicit transactions
+                               // open on *other* DBs (which is slightly improper). Let these COMMIT on the
+                               // next call to commitMasterChanges(), possibly in LBFactory::shutdown().
+                               return;
+                       }
+                       try {
+                               $conn->runOnTransactionIdleCallbacks( $type );
+                       } catch ( Exception $ex ) {
+                               $e = $e ?: $ex;
+                       }
+                       try {
+                               $conn->runTransactionListenerCallbacks( $type );
+                       } catch ( Exception $ex ) {
+                               $e = $e ?: $ex;
+                       }
+               } );
+
+               return $e;
+       }
+
+       public function rollbackMasterChanges( $fname = __METHOD__ ) {
+               $restore = ( $this->trxRoundId !== false );
+               $this->trxRoundId = false;
+               $this->forEachOpenMasterConnection(
+                       function ( IDatabase $conn ) use ( $fname, $restore ) {
+                               if ( $conn->writesOrCallbacksPending() ) {
+                                       $conn->rollback( $fname, $conn::FLUSHING_ALL_PEERS );
+                               }
+                               if ( $restore ) {
+                                       $this->undoTransactionRoundFlags( $conn );
+                               }
+                       }
+               );
+       }
+
+       public function suppressTransactionEndCallbacks() {
+               $this->forEachOpenMasterConnection( function ( Database $conn ) {
+                       $conn->setTrxEndCallbackSuppression( true );
+               } );
+       }
+
+       /**
+        * @param IDatabase $conn
+        */
+       private function applyTransactionRoundFlags( IDatabase $conn ) {
+               if ( $conn->getFlag( $conn::DBO_DEFAULT ) ) {
+                       // DBO_TRX is controlled entirely by CLI mode presence with DBO_DEFAULT.
+                       // Force DBO_TRX even in CLI mode since a commit round is expected soon.
+                       $conn->setFlag( $conn::DBO_TRX, $conn::REMEMBER_PRIOR );
+                       // If config has explicitly requested DBO_TRX be either on or off by not
+                       // setting DBO_DEFAULT, then respect that. Forcing no transactions is useful
+                       // for things like blob stores (ExternalStore) which want auto-commit mode.
+               }
+       }
+
+       /**
+        * @param IDatabase $conn
+        */
+       private function undoTransactionRoundFlags( IDatabase $conn ) {
+               if ( $conn->getFlag( $conn::DBO_DEFAULT ) ) {
+                       $conn->restoreFlags( $conn::RESTORE_PRIOR );
+               }
+       }
+
+       public function flushReplicaSnapshots( $fname = __METHOD__ ) {
+               $this->forEachOpenReplicaConnection( function ( IDatabase $conn ) {
+                       $conn->flushSnapshot( __METHOD__ );
+               } );
+       }
+
+       public function hasMasterConnection() {
+               return $this->isOpen( $this->getWriterIndex() );
+       }
+
+       public function hasMasterChanges() {
+               $pending = 0;
+               $this->forEachOpenMasterConnection( function ( IDatabase $conn ) use ( &$pending ) {
+                       $pending |= $conn->writesOrCallbacksPending();
+               } );
+
+               return (bool)$pending;
+       }
+
+       public function lastMasterChangeTimestamp() {
+               $lastTime = false;
+               $this->forEachOpenMasterConnection( function ( IDatabase $conn ) use ( &$lastTime ) {
+                       $lastTime = max( $lastTime, $conn->lastDoneWrites() );
+               } );
+
+               return $lastTime;
+       }
+
+       public function hasOrMadeRecentMasterChanges( $age = null ) {
+               $age = ( $age === null ) ? $this->mWaitTimeout : $age;
+
+               return ( $this->hasMasterChanges()
+                       || $this->lastMasterChangeTimestamp() > microtime( true ) - $age );
+       }
+
+       public function pendingMasterChangeCallers() {
+               $fnames = [];
+               $this->forEachOpenMasterConnection( function ( IDatabase $conn ) use ( &$fnames ) {
+                       $fnames = array_merge( $fnames, $conn->pendingWriteCallers() );
+               } );
+
+               return $fnames;
+       }
+
+       public function getLaggedReplicaMode( $domain = false ) {
+               // No-op if there is only one DB (also avoids recursion)
+               if ( !$this->laggedReplicaMode && $this->getServerCount() > 1 ) {
+                       try {
+                               // See if laggedReplicaMode gets set
+                               $conn = $this->getConnection( self::DB_REPLICA, false, $domain );
+                               $this->reuseConnection( $conn );
+                       } catch ( DBConnectionError $e ) {
+                               // Avoid expensive re-connect attempts and failures
+                               $this->allReplicasDownMode = true;
+                               $this->laggedReplicaMode = true;
+                       }
+               }
+
+               return $this->laggedReplicaMode;
+       }
+
+       /**
+        * @param bool $domain
+        * @return bool
+        * @deprecated 1.28; use getLaggedReplicaMode()
+        */
+       public function getLaggedSlaveMode( $domain = false ) {
+               return $this->getLaggedReplicaMode( $domain );
+       }
+
+       public function laggedReplicaUsed() {
+               return $this->laggedReplicaMode;
+       }
+
+       /**
+        * @return bool
+        * @since 1.27
+        * @deprecated Since 1.28; use laggedReplicaUsed()
+        */
+       public function laggedSlaveUsed() {
+               return $this->laggedReplicaUsed();
+       }
+
+       public function getReadOnlyReason( $domain = false, IDatabase $conn = null ) {
+               if ( $this->readOnlyReason !== false ) {
+                       return $this->readOnlyReason;
+               } elseif ( $this->getLaggedReplicaMode( $domain ) ) {
+                       if ( $this->allReplicasDownMode ) {
+                               return 'The database has been automatically locked ' .
+                                       'until the replica database servers become available';
+                       } else {
+                               return 'The database has been automatically locked ' .
+                                       'while the replica database servers catch up to the master.';
+                       }
+               } elseif ( $this->masterRunningReadOnly( $domain, $conn ) ) {
+                       return 'The database master is running in read-only mode.';
+               }
+
+               return false;
+       }
+
+       /**
+        * @param string $domain Domain ID, or false for the current domain
+        * @param IDatabase|null DB master connectionl used to avoid loops [optional]
+        * @return bool
+        */
+       private function masterRunningReadOnly( $domain, IDatabase $conn = null ) {
+               $cache = $this->wanCache;
+               $masterServer = $this->getServerName( $this->getWriterIndex() );
+
+               return (bool)$cache->getWithSetCallback(
+                       $cache->makeGlobalKey( __CLASS__, 'server-read-only', $masterServer ),
+                       self::TTL_CACHE_READONLY,
+                       function () use ( $domain, $conn ) {
+                               $old = $this->trxProfiler->setSilenced( true );
+                               try {
+                                       $dbw = $conn ?: $this->getConnection( self::DB_MASTER, [], $domain );
+                                       $readOnly = (int)$dbw->serverIsReadOnly();
+                                       if ( !$conn ) {
+                                               $this->reuseConnection( $dbw );
+                                       }
+                               } catch ( DBError $e ) {
+                                       $readOnly = 0;
+                               }
+                               $this->trxProfiler->setSilenced( $old );
+                               return $readOnly;
+                       },
+                       [ 'pcTTL' => $cache::TTL_PROC_LONG, 'busyValue' => 0 ]
+               );
+       }
+
+       public function allowLagged( $mode = null ) {
+               if ( $mode === null ) {
+                       return $this->mAllowLagged;
+               }
+               $this->mAllowLagged = $mode;
+
+               return $this->mAllowLagged;
+       }
+
+       public function pingAll() {
+               $success = true;
+               $this->forEachOpenConnection( function ( IDatabase $conn ) use ( &$success ) {
+                       if ( !$conn->ping() ) {
+                               $success = false;
+                       }
+               } );
+
+               return $success;
+       }
+
+       public function forEachOpenConnection( $callback, array $params = [] ) {
+               foreach ( $this->mConns as $connsByServer ) {
+                       foreach ( $connsByServer as $serverConns ) {
+                               foreach ( $serverConns as $conn ) {
+                                       $mergedParams = array_merge( [ $conn ], $params );
+                                       call_user_func_array( $callback, $mergedParams );
+                               }
+                       }
+               }
+       }
+
+       public function forEachOpenMasterConnection( $callback, array $params = [] ) {
+               $masterIndex = $this->getWriterIndex();
+               foreach ( $this->mConns as $connsByServer ) {
+                       if ( isset( $connsByServer[$masterIndex] ) ) {
+                               /** @var IDatabase $conn */
+                               foreach ( $connsByServer[$masterIndex] as $conn ) {
+                                       $mergedParams = array_merge( [ $conn ], $params );
+                                       call_user_func_array( $callback, $mergedParams );
+                               }
+                       }
+               }
+       }
+
+       public function forEachOpenReplicaConnection( $callback, array $params = [] ) {
+               foreach ( $this->mConns as $connsByServer ) {
+                       foreach ( $connsByServer as $i => $serverConns ) {
+                               if ( $i === $this->getWriterIndex() ) {
+                                       continue; // skip master
+                               }
+                               foreach ( $serverConns as $conn ) {
+                                       $mergedParams = array_merge( [ $conn ], $params );
+                                       call_user_func_array( $callback, $mergedParams );
+                               }
+                       }
+               }
+       }
+
+       public function getMaxLag( $domain = false ) {
+               $maxLag = -1;
+               $host = '';
+               $maxIndex = 0;
+
+               if ( $this->getServerCount() <= 1 ) {
+                       return [ $host, $maxLag, $maxIndex ]; // no replication = no lag
+               }
+
+               $lagTimes = $this->getLagTimes( $domain );
+               foreach ( $lagTimes as $i => $lag ) {
+                       if ( $this->mLoads[$i] > 0 && $lag > $maxLag ) {
+                               $maxLag = $lag;
+                               $host = $this->mServers[$i]['host'];
+                               $maxIndex = $i;
+                       }
+               }
+
+               return [ $host, $maxLag, $maxIndex ];
+       }
+
+       public function getLagTimes( $domain = false ) {
+               if ( $this->getServerCount() <= 1 ) {
+                       return [ $this->getWriterIndex() => 0 ]; // no replication = no lag
+               }
+
+               $knownLagTimes = []; // map of (server index => 0 seconds)
+               $indexesWithLag = [];
+               foreach ( $this->mServers as $i => $server ) {
+                       if ( empty( $server['is static'] ) ) {
+                               $indexesWithLag[] = $i; // DB server might have replication lag
+                       } else {
+                               $knownLagTimes[$i] = 0; // DB server is a non-replicating and read-only archive
+                       }
+               }
+
+               return $this->getLoadMonitor()->getLagTimes( $indexesWithLag, $domain ) + $knownLagTimes;
+       }
+
+       public function safeGetLag( IDatabase $conn ) {
+               if ( $this->getServerCount() <= 1 ) {
+                       return 0;
+               } else {
+                       return $conn->getLag();
+               }
+       }
+
+       public function safeWaitForMasterPos( IDatabase $conn, $pos = false, $timeout = 10 ) {
+               if ( $this->getServerCount() <= 1 || !$conn->getLBInfo( 'replica' ) ) {
+                       return true; // server is not a replica DB
+               }
+
+               if ( !$pos ) {
+                       // Get the current master position, opening a connection if needed
+                       $masterConn = $this->getAnyOpenConnection( $this->getWriterIndex() );
+                       if ( $masterConn ) {
+                               $pos = $masterConn->getMasterPos();
+                       } else {
+                               $masterConn = $this->openConnection( $this->getWriterIndex(), self::DOMAIN_ANY );
+                               $pos = $masterConn->getMasterPos();
+                               $this->closeConnection( $masterConn );
+                       }
+               }
+
+               if ( $pos instanceof DBMasterPos ) {
+                       $result = $conn->masterPosWait( $pos, $timeout );
+                       if ( $result == -1 || is_null( $result ) ) {
+                               $msg = __METHOD__ . ": Timed out waiting on {$conn->getServer()} pos {$pos}";
+                               $this->replLogger->warning( "$msg" );
+                               $ok = false;
+                       } else {
+                               $this->replLogger->info( __METHOD__ . ": Done" );
+                               $ok = true;
+                       }
+               } else {
+                       $ok = false; // something is misconfigured
+                       $this->replLogger->error( "Could not get master pos for {$conn->getServer()}." );
+               }
+
+               return $ok;
+       }
+
+       public function setTransactionListener( $name, callable $callback = null ) {
+               if ( $callback ) {
+                       $this->trxRecurringCallbacks[$name] = $callback;
+               } else {
+                       unset( $this->trxRecurringCallbacks[$name] );
+               }
+               $this->forEachOpenMasterConnection(
+                       function ( IDatabase $conn ) use ( $name, $callback ) {
+                               $conn->setTransactionListener( $name, $callback );
+                       }
+               );
+       }
+
+       public function setTableAliases( array $aliases ) {
+               $this->tableAliases = $aliases;
+       }
+
+       public function setDomainPrefix( $prefix ) {
+               if ( $this->mConns['foreignUsed'] ) {
+                       // Do not switch connections to explicit foreign domains unless marked as free
+                       $domains = [];
+                       foreach ( $this->mConns['foreignUsed'] as $i => $connsByDomain ) {
+                               $domains = array_merge( $domains, array_keys( $connsByDomain ) );
+                       }
+                       $domains = implode( ', ', $domains );
+                       throw new DBUnexpectedError( null,
+                               "Foreign domain connections are still in use ($domains)." );
+               }
+
+               $this->localDomain = new DatabaseDomain(
+                       $this->localDomain->getDatabase(),
+                       null,
+                       $prefix
+               );
+
+               $this->forEachOpenConnection( function ( IDatabase $db ) use ( $prefix ) {
+                       $db->tablePrefix( $prefix );
+               } );
+       }
+
+       /**
+        * Make PHP ignore user aborts/disconnects until the returned
+        * value leaves scope. This returns null and does nothing in CLI mode.
+        *
+        * @return ScopedCallback|null
+        */
+       final protected function getScopedPHPBehaviorForCommit() {
+               if ( PHP_SAPI != 'cli' ) { // http://bugs.php.net/bug.php?id=47540
+                       $old = ignore_user_abort( true ); // avoid half-finished operations
+                       return new ScopedCallback( function () use ( $old ) {
+                               ignore_user_abort( $old );
+                       } );
+               }
+
+               return null;
+       }
+
+       function __destruct() {
+               // Avoid connection leaks for sanity
+               $this->disable();
+       }
+}
diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php b/includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php
new file mode 100644 (file)
index 0000000..0a05202
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Simple generator of database connections that always returns the same object.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+/**
+ * Trivial LoadBalancer that always returns an injected connection handle
+ */
+class LoadBalancerSingle extends LoadBalancer {
+       /** @var IDatabase */
+       private $db;
+
+       /**
+        * @param array $params An associative array with one member:
+        *   - connection: An IDatabase connection object
+        */
+       public function __construct( array $params ) {
+               if ( !isset( $params['connection'] ) ) {
+                       throw new InvalidArgumentException( "Missing 'connection' argument." );
+               }
+
+               $this->db = $params['connection'];
+
+               parent::__construct( [
+                       'servers' => [
+                               [
+                                       'type' => $this->db->getType(),
+                                       'host' => $this->db->getServer(),
+                                       'dbname' => $this->db->getDBname(),
+                                       'load' => 1,
+                               ]
+                       ],
+                       'trxProfiler' => isset( $params['trxProfiler'] ) ? $params['trxProfiler'] : null,
+                       'srvCache' => isset( $params['srvCache'] ) ? $params['srvCache'] : null,
+                       'wanCache' => isset( $params['wanCache'] ) ? $params['wanCache'] : null
+               ] );
+
+               if ( isset( $params['readOnlyReason'] ) ) {
+                       $this->db->setLBInfo( 'readOnlyReason', $params['readOnlyReason'] );
+               }
+       }
+
+       /**
+        * @param IDatabase $db Live connection handle
+        * @param array $params Parameter map to LoadBalancerSingle::__constructs()
+        * @return LoadBalancerSingle
+        * @since 1.28
+        */
+       public static function newFromConnection( IDatabase $db, array $params = [] ) {
+               return new static( [ 'connection' => $db ] + $params );
+       }
+
+       protected function reallyOpenConnection( array $server, $dbNameOverride = false ) {
+               return $this->db;
+       }
+}
diff --git a/includes/libs/rdbms/loadmonitor/ILoadMonitor.php b/includes/libs/rdbms/loadmonitor/ILoadMonitor.php
new file mode 100644 (file)
index 0000000..14a52c5
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+/**
+ * Database load monitoring interface
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+use Psr\Log\LoggerAwareInterface;
+
+/**
+ * An interface for database load monitoring
+ *
+ * @ingroup Database
+ */
+interface ILoadMonitor extends LoggerAwareInterface {
+       /**
+        * Construct a new LoadMonitor with a given LoadBalancer parent
+        *
+        * @param ILoadBalancer $lb LoadBalancer this instance serves
+        * @param BagOStuff $sCache Local server memory cache
+        * @param BagOStuff $cCache Local cluster memory cache
+        * @param array $options Options map
+        */
+       public function __construct(
+               ILoadBalancer $lb, BagOStuff $sCache, BagOStuff $cCache, array $options = []
+       );
+
+       /**
+        * Perform load ratio adjustment before deciding which server to use
+        *
+        * @param int[] &$weightByServer Map of (server index => float weight)
+        * @param string|bool $domain
+        */
+       public function scaleLoads( array &$weightByServer, $domain );
+
+       /**
+        * Get an estimate of replication lag (in seconds) for each server
+        *
+        * Values may be "false" if replication is too broken to estimate
+        *
+        * @param integer[] $serverIndexes
+        * @param string $domain
+        * @return array Map of (server index => float|int|bool)
+        */
+       public function getLagTimes( array $serverIndexes, $domain );
+}
index 46af068..da4909d 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * Database load monitoring.
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * @file
  * @ingroup Database
  */
-use Psr\Log\LoggerAwareInterface;
+
+use Psr\Log\LoggerInterface;
+use Wikimedia\ScopedCallback;
 
 /**
- * An interface for database load monitoring
+ * Basic DB load monitor with no external dependencies
+ * Uses memcached to cache the replication lag for a short time
  *
  * @ingroup Database
  */
-interface LoadMonitor extends LoggerAwareInterface {
-       /**
-        * Construct a new LoadMonitor with a given LoadBalancer parent
-        *
-        * @param BagOStuff $sCache Server local memory cache
-        * @param BagOStuff $cCache Server local memory cache
-        * @param ILoadBalancer $parent LoadBalancer this instance serves
-        */
-       public function __construct( ILoadBalancer $parent, BagOStuff $sCache, BagOStuff $cCache );
+class LoadMonitor implements ILoadMonitor {
+       /** @var ILoadBalancer */
+       protected $parent;
+       /** @var BagOStuff */
+       protected $srvCache;
+       /** @var BagOStuff */
+       protected $mainCache;
+       /** @var LoggerInterface */
+       protected $replLogger;
 
-       /**
-        * Perform pre-connection load ratio adjustment.
-        * @param int[] &$loads
-        * @param string|bool $group The selected query group. Default: false
-        * @param string|bool $domain Default: false
-        */
-       public function scaleLoads( &$loads, $group = false, $domain = false );
+       /** @var float Moving average ratio (e.g. 0.1 for 10% weight to new weight) */
+       private $movingAveRatio;
 
-       /**
-        * Get an estimate of replication lag (in seconds) for each server
-        *
-        * Values may be "false" if replication is too broken to estimate
-        *
-        * @param integer[] $serverIndexes
-        * @param string $domain
-        *
-        * @return array Map of (server index => float|int|bool)
-        */
-       public function getLagTimes( $serverIndexes, $domain );
+       const VERSION = 1; // cache key version
+
+       public function __construct(
+               ILoadBalancer $lb, BagOStuff $srvCache, BagOStuff $cache, array $options = []
+       ) {
+               $this->parent = $lb;
+               $this->srvCache = $srvCache;
+               $this->mainCache = $cache;
+               $this->replLogger = new \Psr\Log\NullLogger();
+
+               $this->movingAveRatio = isset( $options['movingAveRatio'] )
+                       ? $options['movingAveRatio']
+                       : 0.1;
+       }
+
+       public function setLogger( LoggerInterface $logger ) {
+               $this->replLogger = $logger;
+       }
+
+       public function scaleLoads( array &$weightByServer, $domain ) {
+               $serverIndexes = array_keys( $weightByServer );
+               $states = $this->getServerStates( $serverIndexes, $domain );
+               $coefficientsByServer = $states['weightScales'];
+               foreach ( $weightByServer as $i => $weight ) {
+                       if ( isset( $coefficientsByServer[$i] ) ) {
+                               $weightByServer[$i] = $weight * $coefficientsByServer[$i];
+                       } else { // server recently added to config?
+                               $host = $this->parent->getServerName( $i );
+                               $this->replLogger->error( __METHOD__ . ": host $host not in cache" );
+                       }
+               }
+       }
+
+       public function getLagTimes( array $serverIndexes, $domain ) {
+               $states = $this->getServerStates( $serverIndexes, $domain );
+
+               return $states['lagTimes'];
+       }
+
+       protected function getServerStates( array $serverIndexes, $domain ) {
+               $writerIndex = $this->parent->getWriterIndex();
+               if ( count( $serverIndexes ) == 1 && reset( $serverIndexes ) == $writerIndex ) {
+                       # Single server only, just return zero without caching
+                       return [
+                               'lagTimes' => [ $writerIndex => 0 ],
+                               'weightScales' => [ $writerIndex => 1.0 ]
+                       ];
+               }
+
+               $key = $this->getCacheKey( $serverIndexes );
+               # Randomize TTLs to reduce stampedes (4.0 - 5.0 sec)
+               $ttl = mt_rand( 4e6, 5e6 ) / 1e6;
+               # Keep keys around longer as fallbacks
+               $staleTTL = 60;
+
+               # (a) Check the local APC cache
+               $value = $this->srvCache->get( $key );
+               if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) {
+                       $this->replLogger->debug( __METHOD__ . ": got lag times ($key) from local cache" );
+                       return $value; // cache hit
+               }
+               $staleValue = $value ?: false;
+
+               # (b) Check the shared cache and backfill APC
+               $value = $this->mainCache->get( $key );
+               if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) {
+                       $this->srvCache->set( $key, $value, $staleTTL );
+                       $this->replLogger->debug( __METHOD__ . ": got lag times ($key) from main cache" );
+
+                       return $value; // cache hit
+               }
+               $staleValue = $value ?: $staleValue;
+
+               # (c) Cache key missing or expired; regenerate and backfill
+               if ( $this->mainCache->lock( $key, 0, 10 ) ) {
+                       # Let this process alone update the cache value
+                       $cache = $this->mainCache;
+                       /** @noinspection PhpUnusedLocalVariableInspection */
+                       $unlocker = new ScopedCallback( function () use ( $cache, $key ) {
+                               $cache->unlock( $key );
+                       } );
+               } elseif ( $staleValue ) {
+                       # Could not acquire lock but an old cache exists, so use it
+                       return $staleValue;
+               }
+
+               $lagTimes = [];
+               $weightScales = [];
+               $movAveRatio = $this->movingAveRatio;
+               foreach ( $serverIndexes as $i ) {
+                       if ( $i == $this->parent->getWriterIndex() ) {
+                               $lagTimes[$i] = 0; // master always has no lag
+                               $weightScales[$i] = 1.0; // nominal weight
+                               continue;
+                       }
+
+                       $conn = $this->parent->getAnyOpenConnection( $i );
+                       if ( $conn ) {
+                               $close = false; // already open
+                       } else {
+                               $conn = $this->parent->openConnection( $i, $domain );
+                               $close = true; // new connection
+                       }
+
+                       $lastWeight = isset( $staleValue['weightScales'][$i] )
+                               ? $staleValue['weightScales'][$i]
+                               : 1.0;
+                       $coefficient = $this->getWeightScale( $i, $conn ?: null );
+                       $newWeight = $movAveRatio * $coefficient + ( 1 - $movAveRatio ) * $lastWeight;
+
+                       // Scale from 10% to 100% of nominal weight
+                       $weightScales[$i] = max( $newWeight, .10 );
+
+                       if ( !$conn ) {
+                               $lagTimes[$i] = false;
+                               $host = $this->parent->getServerName( $i );
+                               $this->replLogger->error( __METHOD__ . ": host $host is unreachable" );
+                               continue;
+                       }
+
+                       if ( $conn->getLBInfo( 'is static' ) ) {
+                               $lagTimes[$i] = 0;
+                       } else {
+                               $lagTimes[$i] = $conn->getLag();
+                               if ( $lagTimes[$i] === false ) {
+                                       $host = $this->parent->getServerName( $i );
+                                       $this->replLogger->error( __METHOD__ . ": host $host is not replicating?" );
+                               }
+                       }
+
+                       if ( $close ) {
+                               # Close the connection to avoid sleeper connections piling up.
+                               # Note that the caller will pick one of these DBs and reconnect,
+                               # which is slightly inefficient, but this only matters for the lag
+                               # time cache miss cache, which is far less common that cache hits.
+                               $this->parent->closeConnection( $conn );
+                       }
+               }
+
+               # Add a timestamp key so we know when it was cached
+               $value = [
+                       'lagTimes' => $lagTimes,
+                       'weightScales' => $weightScales,
+                       'timestamp' => microtime( true )
+               ];
+               $this->mainCache->set( $key, $value, $staleTTL );
+               $this->srvCache->set( $key, $value, $staleTTL );
+               $this->replLogger->info( __METHOD__ . ": re-calculated lag times ($key)" );
+
+               return $value;
+       }
 
        /**
-        * Clear any process and persistent cache of lag times
-        * @since 1.27
+        * @param integer $index Server index
+        * @param IDatabase|null $conn Connection handle or null on connection failure
+        * @return float
         */
-       public function clearCaches();
+       protected function getWeightScale( $index, IDatabase $conn = null ) {
+               return $conn ? 1.0 : 0.0;
+       }
+
+       private function getCacheKey( array $serverIndexes ) {
+               sort( $serverIndexes );
+               // Lag is per-server, not per-DB, so key on the master DB name
+               return $this->srvCache->makeGlobalKey(
+                       'lag-times',
+                       self::VERSION,
+                       $this->parent->getServerName( $this->parent->getWriterIndex() ),
+                       implode( '-', $serverIndexes )
+               );
+       }
 }
index 83f4462..babd609 100644 (file)
  * @ingroup Database
  */
 
-use Psr\Log\LoggerInterface;
-
 /**
  * Basic MySQL load monitor with no external dependencies
  * Uses memcached to cache the replication lag for a short time
  *
  * @ingroup Database
  */
-class LoadMonitorMySQL implements LoadMonitor {
-       /** @var ILoadBalancer */
-       protected $parent;
-       /** @var BagOStuff */
-       protected $srvCache;
-       /** @var BagOStuff */
-       protected $mainCache;
-       /** @var LoggerInterface */
-       protected $replLogger;
-
-       public function __construct( ILoadBalancer $parent, BagOStuff $sCache, BagOStuff $cCache ) {
-               $this->parent = $parent;
-               $this->srvCache = $sCache;
-               $this->mainCache = $cCache;
-               $this->replLogger = new \Psr\Log\NullLogger();
-       }
-
-       public function setLogger( LoggerInterface $logger ) {
-               $this->replLogger = $logger;
+class LoadMonitorMySQL extends LoadMonitor {
+       /** @var float What buffer pool use ratio counts as "warm" (e.g. 0.5 for 50% usage) */
+       private $warmCacheRatio;
+
+       public function __construct(
+               ILoadBalancer $lb, BagOStuff $srvCache, BagOStuff $cache, array $options = []
+       ) {
+               parent::__construct( $lb, $srvCache, $cache, $options );
+
+               $this->warmCacheRatio = isset( $options['warmCacheRatio'] )
+                       ? $options['warmCacheRatio']
+                       : 0.0;
        }
 
-       public function scaleLoads( &$loads, $group = false, $wiki = false ) {
-       }
-
-       public function getLagTimes( $serverIndexes, $wiki ) {
-               if ( count( $serverIndexes ) == 1 && reset( $serverIndexes ) == 0 ) {
-                       # Single server only, just return zero without caching
-                       return [ 0 => 0 ];
-               }
-
-               $key = $this->getLagTimeCacheKey();
-               # Randomize TTLs to reduce stampedes (4.0 - 5.0 sec)
-               $ttl = mt_rand( 4e6, 5e6 ) / 1e6;
-               # Keep keys around longer as fallbacks
-               $staleTTL = 60;
-
-               # (a) Check the local APC cache
-               $value = $this->srvCache->get( $key );
-               if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) {
-                       $this->replLogger->debug( __METHOD__ . ": got lag times ($key) from local cache" );
-                       return $value['lagTimes']; // cache hit
-               }
-               $staleValue = $value ?: false;
-
-               # (b) Check the shared cache and backfill APC
-               $value = $this->mainCache->get( $key );
-               if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) {
-                       $this->srvCache->set( $key, $value, $staleTTL );
-                       $this->replLogger->debug( __METHOD__ . ": got lag times ($key) from main cache" );
-
-                       return $value['lagTimes']; // cache hit
-               }
-               $staleValue = $value ?: $staleValue;
-
-               # (c) Cache key missing or expired; regenerate and backfill
-               if ( $this->mainCache->lock( $key, 0, 10 ) ) {
-                       # Let this process alone update the cache value
-                       $cache = $this->mainCache;
-                       /** @noinspection PhpUnusedLocalVariableInspection */
-                       $unlocker = new ScopedCallback( function () use ( $cache, $key ) {
-                               $cache->unlock( $key );
-                       } );
-               } elseif ( $staleValue ) {
-                       # Could not acquire lock but an old cache exists, so use it
-                       return $staleValue['lagTimes'];
+       protected function getWeightScale( $index, IDatabase $conn = null ) {
+               if ( !$conn ) {
+                       return 0.0;
                }
 
-               $lagTimes = [];
-               foreach ( $serverIndexes as $i ) {
-                       if ( $i == $this->parent->getWriterIndex() ) {
-                               $lagTimes[$i] = 0; // master always has no lag
-                               continue;
-                       }
-
-                       $conn = $this->parent->getAnyOpenConnection( $i );
-                       if ( $conn ) {
-                               $close = false; // already open
+               $weight = 1.0;
+               if ( $this->warmCacheRatio > 0 ) {
+                       $res = $conn->query( 'SHOW STATUS', false );
+                       $s = $res ? $conn->fetchObject( $res ) : false;
+                       if ( $s === false ) {
+                               $host = $this->parent->getServerName( $index );
+                               $this->replLogger->error( __METHOD__ . ": could not get status for $host" );
                        } else {
-                               $conn = $this->parent->openConnection( $i, $wiki );
-                               $close = true; // new connection
-                       }
-
-                       if ( !$conn ) {
-                               $lagTimes[$i] = false;
-                               $host = $this->parent->getServerName( $i );
-                               $this->replLogger->error( __METHOD__ . ": host $host (#$i) is unreachable" );
-                               continue;
-                       }
-
-                       $lagTimes[$i] = $conn->getLag();
-                       if ( $lagTimes[$i] === false ) {
-                               $host = $this->parent->getServerName( $i );
-                               $this->replLogger->error( __METHOD__ . ": host $host (#$i) is not replicating?" );
-                       }
-
-                       if ( $close ) {
-                               # Close the connection to avoid sleeper connections piling up.
-                               # Note that the caller will pick one of these DBs and reconnect,
-                               # which is slightly inefficient, but this only matters for the lag
-                               # time cache miss cache, which is far less common that cache hits.
-                               $this->parent->closeConnection( $conn );
+                               // http://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html
+                               if ( $s->Innodb_buffer_pool_pages_total > 0 ) {
+                                       $ratio = $s->Innodb_buffer_pool_pages_data / $s->Innodb_buffer_pool_pages_total;
+                               } elseif ( $s->Qcache_total_blocks > 0 ) {
+                                       $ratio = 1.0 - $s->Qcache_free_blocks / $s->Qcache_total_blocks;
+                               } else {
+                                       $ratio = 1.0;
+                               }
+                               // Stop caring once $ratio >= $this->warmCacheRatio
+                               $weight *= min( $ratio / $this->warmCacheRatio, 1.0 );
                        }
                }
 
-               # Add a timestamp key so we know when it was cached
-               $value = [ 'lagTimes' => $lagTimes, 'timestamp' => microtime( true ) ];
-               $this->mainCache->set( $key, $value, $staleTTL );
-               $this->srvCache->set( $key, $value, $staleTTL );
-               $this->replLogger->info( __METHOD__ . ": re-calculated lag times ($key)" );
-
-               return $value['lagTimes'];
-       }
-
-       public function clearCaches() {
-               $key = $this->getLagTimeCacheKey();
-               $this->srvCache->delete( $key );
-               $this->mainCache->delete( $key );
-       }
-
-       private function getLagTimeCacheKey() {
-               $writerIndex = $this->parent->getWriterIndex();
-               // Lag is per-server, not per-DB, so key on the master DB name
-               return $this->srvCache->makeGlobalKey(
-                       'lag-times',
-                       $this->parent->getServerName( $writerIndex )
-               );
+               return $weight;
        }
 }
index df95b0a..c4e25dc 100644 (file)
  */
 use Psr\Log\LoggerInterface;
 
-class LoadMonitorNull implements LoadMonitor {
-       public function __construct( ILoadBalancer $parent, BagOStuff $sCache, BagOStuff $cCache ) {
+class LoadMonitorNull implements ILoadMonitor {
+       public function __construct(
+               ILoadBalancer $lb, BagOStuff $sCache, BagOStuff $cCache, array $options = []
+       ) {
+
        }
 
        public function setLogger( LoggerInterface $logger ) {
        }
 
-       public function scaleLoads( &$loads, $group = false, $wiki = false ) {
+       public function scaleLoads( array &$loads, $domain ) {
+
        }
 
-       public function getLagTimes( $serverIndexes, $wiki ) {
+       public function getLagTimes( array $serverIndexes, $domain ) {
                return array_fill_keys( $serverIndexes, 0 );
        }
 
diff --git a/includes/libs/redis/RedisConnRef.php b/includes/libs/redis/RedisConnRef.php
new file mode 100644 (file)
index 0000000..f2bb855
--- /dev/null
@@ -0,0 +1,182 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Aaron Schulz
+ */
+use Psr\Log\LoggerInterface;
+use Psr\Log\LoggerAwareInterface;
+
+/**
+ * Helper class to handle automatically marking connectons as reusable (via RAII pattern)
+ *
+ * This class simply wraps the Redis class and can be used the same way
+ *
+ * @ingroup Redis
+ * @since 1.21
+ */
+class RedisConnRef implements LoggerAwareInterface {
+       /** @var RedisConnectionPool */
+       protected $pool;
+       /** @var Redis */
+       protected $conn;
+
+       protected $server; // string
+       protected $lastError; // string
+
+       /**
+        * @var LoggerInterface
+        */
+       protected $logger;
+
+       /**
+        * @param RedisConnectionPool $pool
+        * @param string $server
+        * @param Redis $conn
+        * @param LoggerInterface $logger
+        */
+       public function __construct(
+               RedisConnectionPool $pool, $server, Redis $conn, LoggerInterface $logger
+       ) {
+               $this->pool = $pool;
+               $this->server = $server;
+               $this->conn = $conn;
+               $this->logger = $logger;
+       }
+
+       public function setLogger( LoggerInterface $logger ) {
+               $this->logger = $logger;
+       }
+
+       /**
+        * @return string
+        * @since 1.23
+        */
+       public function getServer() {
+               return $this->server;
+       }
+
+       public function getLastError() {
+               return $this->lastError;
+       }
+
+       public function clearLastError() {
+               $this->lastError = null;
+       }
+
+       public function __call( $name, $arguments ) {
+               $conn = $this->conn; // convenience
+
+               // Work around https://github.com/nicolasff/phpredis/issues/70
+               $lname = strtolower( $name );
+               if ( ( $lname === 'blpop' || $lname == 'brpop' )
+                       && is_array( $arguments[0] ) && isset( $arguments[1] )
+               ) {
+                       $this->pool->resetTimeout( $conn, $arguments[1] + 1 );
+               } elseif ( $lname === 'brpoplpush' && isset( $arguments[2] ) ) {
+                       $this->pool->resetTimeout( $conn, $arguments[2] + 1 );
+               }
+
+               $conn->clearLastError();
+               try {
+                       $res = call_user_func_array( [ $conn, $name ], $arguments );
+                       if ( preg_match( '/^ERR operation not permitted\b/', $conn->getLastError() ) ) {
+                               $this->pool->reauthenticateConnection( $this->server, $conn );
+                               $conn->clearLastError();
+                               $res = call_user_func_array( [ $conn, $name ], $arguments );
+                               $this->logger->info(
+                                       "Used automatic re-authentication for method '$name'.",
+                                       [ 'redis_server' => $this->server ]
+                               );
+                       }
+               } catch ( RedisException $e ) {
+                       $this->pool->resetTimeout( $conn ); // restore
+                       throw $e;
+               }
+
+               $this->lastError = $conn->getLastError() ?: $this->lastError;
+
+               $this->pool->resetTimeout( $conn ); // restore
+
+               return $res;
+       }
+
+       /**
+        * @param string $script
+        * @param array $params
+        * @param int $numKeys
+        * @return mixed
+        * @throws RedisException
+        */
+       public function luaEval( $script, array $params, $numKeys ) {
+               $sha1 = sha1( $script ); // 40 char hex
+               $conn = $this->conn; // convenience
+               $server = $this->server; // convenience
+
+               // Try to run the server-side cached copy of the script
+               $conn->clearLastError();
+               $res = $conn->evalSha( $sha1, $params, $numKeys );
+               // If we got a permission error reply that means that (a) we are not in
+               // multi()/pipeline() and (b) some connection problem likely occurred. If
+               // the password the client gave was just wrong, an exception should have
+               // been thrown back in getConnection() previously.
+               if ( preg_match( '/^ERR operation not permitted\b/', $conn->getLastError() ) ) {
+                       $this->pool->reauthenticateConnection( $server, $conn );
+                       $conn->clearLastError();
+                       $res = $conn->eval( $script, $params, $numKeys );
+                       $this->logger->info(
+                               "Used automatic re-authentication for Lua script '$sha1'.",
+                               [ 'redis_server' => $server ]
+                       );
+               }
+               // If the script is not in cache, use eval() to retry and cache it
+               if ( preg_match( '/^NOSCRIPT/', $conn->getLastError() ) ) {
+                       $conn->clearLastError();
+                       $res = $conn->eval( $script, $params, $numKeys );
+                       $this->logger->info(
+                               "Used eval() for Lua script '$sha1'.",
+                               [ 'redis_server' => $server ]
+                       );
+               }
+
+               if ( $conn->getLastError() ) { // script bug?
+                       $this->logger->error(
+                               'Lua script error on server "{redis_server}": {lua_error}',
+                               [
+                                       'redis_server' => $server,
+                                       'lua_error' => $conn->getLastError()
+                               ]
+                       );
+               }
+
+               $this->lastError = $conn->getLastError() ?: $this->lastError;
+
+               return $res;
+       }
+
+       /**
+        * @param Redis $conn
+        * @return bool
+        */
+       public function isConnIdentical( Redis $conn ) {
+               return $this->conn === $conn;
+       }
+
+       function __destruct() {
+               $this->pool->freeConnection( $this->server, $this->conn );
+       }
+}
diff --git a/includes/libs/redis/RedisConnectionPool.php b/includes/libs/redis/RedisConnectionPool.php
new file mode 100644 (file)
index 0000000..49d09a9
--- /dev/null
@@ -0,0 +1,417 @@
+<?php
+/**
+ * Redis client connection pooling manager.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @defgroup Redis Redis
+ * @author Aaron Schulz
+ */
+
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Helper class to manage Redis connections.
+ *
+ * This can be used to get handle wrappers that free the handle when the wrapper
+ * leaves scope. The maximum number of free handles (connections) is configurable.
+ * This provides an easy way to cache connection handles that may also have state,
+ * such as a handle does between multi() and exec(), and without hoarding connections.
+ * The wrappers use PHP magic methods so that calling functions on them calls the
+ * function of the actual Redis object handle.
+ *
+ * @ingroup Redis
+ * @since 1.21
+ */
+class RedisConnectionPool implements LoggerAwareInterface {
+       /** @var string Connection timeout in seconds */
+       protected $connectTimeout;
+       /** @var string Read timeout in seconds */
+       protected $readTimeout;
+       /** @var string Plaintext auth password */
+       protected $password;
+       /** @var bool Whether connections persist */
+       protected $persistent;
+       /** @var int Serializer to use (Redis::SERIALIZER_*) */
+       protected $serializer;
+
+       /** @var int Current idle pool size */
+       protected $idlePoolSize = 0;
+
+       /** @var array (server name => ((connection info array),...) */
+       protected $connections = [];
+       /** @var array (server name => UNIX timestamp) */
+       protected $downServers = [];
+
+       /** @var array (pool ID => RedisConnectionPool) */
+       protected static $instances = [];
+
+       /** integer; seconds to cache servers as "down". */
+       const SERVER_DOWN_TTL = 30;
+
+       /**
+        * @var LoggerInterface
+        */
+       protected $logger;
+
+       /**
+        * @param array $options
+        * @throws Exception
+        */
+       protected function __construct( array $options ) {
+               if ( !class_exists( 'Redis' ) ) {
+                       throw new RuntimeException(
+                               __CLASS__ . ' requires a Redis client library. ' .
+                               'See https://www.mediawiki.org/wiki/Redis#Setup' );
+               }
+               $this->logger = isset( $options['logger'] )
+                       ? $options['logger']
+                       : new \Psr\Log\NullLogger();
+               $this->connectTimeout = $options['connectTimeout'];
+               $this->readTimeout = $options['readTimeout'];
+               $this->persistent = $options['persistent'];
+               $this->password = $options['password'];
+               if ( !isset( $options['serializer'] ) || $options['serializer'] === 'php' ) {
+                       $this->serializer = Redis::SERIALIZER_PHP;
+               } elseif ( $options['serializer'] === 'igbinary' ) {
+                       $this->serializer = Redis::SERIALIZER_IGBINARY;
+               } elseif ( $options['serializer'] === 'none' ) {
+                       $this->serializer = Redis::SERIALIZER_NONE;
+               } else {
+                       throw new InvalidArgumentException( "Invalid serializer specified." );
+               }
+       }
+
+       /**
+        * @param LoggerInterface $logger
+        * @return null
+        */
+       public function setLogger( LoggerInterface $logger ) {
+               $this->logger = $logger;
+       }
+
+       /**
+        * @param array $options
+        * @return array
+        */
+       protected static function applyDefaultConfig( array $options ) {
+               if ( !isset( $options['connectTimeout'] ) ) {
+                       $options['connectTimeout'] = 1;
+               }
+               if ( !isset( $options['readTimeout'] ) ) {
+                       $options['readTimeout'] = 1;
+               }
+               if ( !isset( $options['persistent'] ) ) {
+                       $options['persistent'] = false;
+               }
+               if ( !isset( $options['password'] ) ) {
+                       $options['password'] = null;
+               }
+
+               return $options;
+       }
+
+       /**
+        * @param array $options
+        * $options include:
+        *   - connectTimeout : The timeout for new connections, in seconds.
+        *                      Optional, default is 1 second.
+        *   - readTimeout    : The timeout for operation reads, in seconds.
+        *                      Commands like BLPOP can fail if told to wait longer than this.
+        *                      Optional, default is 1 second.
+        *   - persistent     : Set this to true to allow connections to persist across
+        *                      multiple web requests. False by default.
+        *   - password       : The authentication password, will be sent to Redis in clear text.
+        *                      Optional, if it is unspecified, no AUTH command will be sent.
+        *   - serializer     : Set to "php", "igbinary", or "none". Default is "php".
+        * @return RedisConnectionPool
+        */
+       public static function singleton( array $options ) {
+               $options = self::applyDefaultConfig( $options );
+               // Map the options to a unique hash...
+               ksort( $options ); // normalize to avoid pool fragmentation
+               $id = sha1( serialize( $options ) );
+               // Initialize the object at the hash as needed...
+               if ( !isset( self::$instances[$id] ) ) {
+                       self::$instances[$id] = new self( $options );
+               }
+
+               return self::$instances[$id];
+       }
+
+       /**
+        * Destroy all singleton() instances
+        * @since 1.27
+        */
+       public static function destroySingletons() {
+               self::$instances = [];
+       }
+
+       /**
+        * Get a connection to a redis server. Based on code in RedisBagOStuff.php.
+        *
+        * @param string $server A hostname/port combination or the absolute path of a UNIX socket.
+        *                       If a hostname is specified but no port, port 6379 will be used.
+        * @param LoggerInterface $logger PSR-3 logger intance. [optional]
+        * @return RedisConnRef|bool Returns false on failure
+        * @throws MWException
+        */
+       public function getConnection( $server, LoggerInterface $logger = null ) {
+               $logger = $logger ?: $this->logger;
+               // Check the listing "dead" servers which have had a connection errors.
+               // Servers are marked dead for a limited period of time, to
+               // avoid excessive overhead from repeated connection timeouts.
+               if ( isset( $this->downServers[$server] ) ) {
+                       $now = time();
+                       if ( $now > $this->downServers[$server] ) {
+                               // Dead time expired
+                               unset( $this->downServers[$server] );
+                       } else {
+                               // Server is dead
+                               $logger->debug(
+                                       'Server "{redis_server}" is marked down for another ' .
+                                       ( $this->downServers[$server] - $now ) . 'seconds',
+                                       [ 'redis_server' => $server ]
+                               );
+
+                               return false;
+                       }
+               }
+
+               // Check if a connection is already free for use
+               if ( isset( $this->connections[$server] ) ) {
+                       foreach ( $this->connections[$server] as &$connection ) {
+                               if ( $connection['free'] ) {
+                                       $connection['free'] = false;
+                                       --$this->idlePoolSize;
+
+                                       return new RedisConnRef(
+                                               $this, $server, $connection['conn'], $logger
+                                       );
+                               }
+                       }
+               }
+
+               if ( !$server ) {
+                       throw new InvalidArgumentException(
+                               __CLASS__ . ": invalid configured server \"$server\"" );
+               } elseif ( substr( $server, 0, 1 ) === '/' ) {
+                       // UNIX domain socket
+                       // These are required by the redis extension to start with a slash, but
+                       // we still need to set the port to a special value to make it work.
+                       $host = $server;
+                       $port = 0;
+               } else {
+                       // TCP connection
+                       if ( preg_match( '/^\[(.+)\]:(\d+)$/', $server, $m ) ) {
+                               list( $host, $port ) = [ $m[1], (int)$m[2] ]; // (ip, port)
+                       } elseif ( preg_match( '/^([^:]+):(\d+)$/', $server, $m ) ) {
+                               list( $host, $port ) = [ $m[1], (int)$m[2] ]; // (ip or path, port)
+                       } else {
+                               list( $host, $port ) = [ $server, 6379 ]; // (ip or path, port)
+                       }
+               }
+
+               $conn = new Redis();
+               try {
+                       if ( $this->persistent ) {
+                               $result = $conn->pconnect( $host, $port, $this->connectTimeout );
+                       } else {
+                               $result = $conn->connect( $host, $port, $this->connectTimeout );
+                       }
+                       if ( !$result ) {
+                               $logger->error(
+                                       'Could not connect to server "{redis_server}"',
+                                       [ 'redis_server' => $server ]
+                               );
+                               // Mark server down for some time to avoid further timeouts
+                               $this->downServers[$server] = time() + self::SERVER_DOWN_TTL;
+
+                               return false;
+                       }
+                       if ( $this->password !== null ) {
+                               if ( !$conn->auth( $this->password ) ) {
+                                       $logger->error(
+                                               'Authentication error connecting to "{redis_server}"',
+                                               [ 'redis_server' => $server ]
+                                       );
+                               }
+                       }
+               } catch ( RedisException $e ) {
+                       $this->downServers[$server] = time() + self::SERVER_DOWN_TTL;
+                       $logger->error(
+                               'Redis exception connecting to "{redis_server}"',
+                               [
+                                       'redis_server' => $server,
+                                       'exception' => $e,
+                               ]
+                       );
+
+                       return false;
+               }
+
+               if ( $conn ) {
+                       $conn->setOption( Redis::OPT_READ_TIMEOUT, $this->readTimeout );
+                       $conn->setOption( Redis::OPT_SERIALIZER, $this->serializer );
+                       $this->connections[$server][] = [ 'conn' => $conn, 'free' => false ];
+
+                       return new RedisConnRef( $this, $server, $conn, $logger );
+               } else {
+                       return false;
+               }
+       }
+
+       /**
+        * Mark a connection to a server as free to return to the pool
+        *
+        * @param string $server
+        * @param Redis $conn
+        * @return bool
+        */
+       public function freeConnection( $server, Redis $conn ) {
+               $found = false;
+
+               foreach ( $this->connections[$server] as &$connection ) {
+                       if ( $connection['conn'] === $conn && !$connection['free'] ) {
+                               $connection['free'] = true;
+                               ++$this->idlePoolSize;
+                               break;
+                       }
+               }
+
+               $this->closeExcessIdleConections();
+
+               return $found;
+       }
+
+       /**
+        * Close any extra idle connections if there are more than the limit
+        */
+       protected function closeExcessIdleConections() {
+               if ( $this->idlePoolSize <= count( $this->connections ) ) {
+                       return; // nothing to do (no more connections than servers)
+               }
+
+               foreach ( $this->connections as &$serverConnections ) {
+                       foreach ( $serverConnections as $key => &$connection ) {
+                               if ( $connection['free'] ) {
+                                       unset( $serverConnections[$key] );
+                                       if ( --$this->idlePoolSize <= count( $this->connections ) ) {
+                                               return; // done (no more connections than servers)
+                                       }
+                               }
+                       }
+               }
+       }
+
+       /**
+        * The redis extension throws an exception in response to various read, write
+        * and protocol errors. Sometimes it also closes the connection, sometimes
+        * not. The safest response for us is to explicitly destroy the connection
+        * object and let it be reopened during the next request.
+        *
+        * @param string $server
+        * @param RedisConnRef $cref
+        * @param RedisException $e
+        * @deprecated since 1.23
+        */
+       public function handleException( $server, RedisConnRef $cref, RedisException $e ) {
+               $this->handleError( $cref, $e );
+       }
+
+       /**
+        * The redis extension throws an exception in response to various read, write
+        * and protocol errors. Sometimes it also closes the connection, sometimes
+        * not. The safest response for us is to explicitly destroy the connection
+        * object and let it be reopened during the next request.
+        *
+        * @param RedisConnRef $cref
+        * @param RedisException $e
+        */
+       public function handleError( RedisConnRef $cref, RedisException $e ) {
+               $server = $cref->getServer();
+               $this->logger->error(
+                       'Redis exception on server "{redis_server}"',
+                       [
+                               'redis_server' => $server,
+                               'exception' => $e,
+                       ]
+               );
+               foreach ( $this->connections[$server] as $key => $connection ) {
+                       if ( $cref->isConnIdentical( $connection['conn'] ) ) {
+                               $this->idlePoolSize -= $connection['free'] ? 1 : 0;
+                               unset( $this->connections[$server][$key] );
+                               break;
+                       }
+               }
+       }
+
+       /**
+        * Re-send an AUTH request to the redis server (useful after disconnects).
+        *
+        * This works around an upstream bug in phpredis. phpredis hides disconnects by transparently
+        * reconnecting, but it neglects to re-authenticate the new connection. To the user of the
+        * phpredis client API this manifests as a seemingly random tendency of connections to lose
+        * their authentication status.
+        *
+        * This method is for internal use only.
+        *
+        * @see https://github.com/nicolasff/phpredis/issues/403
+        *
+        * @param string $server
+        * @param Redis $conn
+        * @return bool Success
+        */
+       public function reauthenticateConnection( $server, Redis $conn ) {
+               if ( $this->password !== null ) {
+                       if ( !$conn->auth( $this->password ) ) {
+                               $this->logger->error(
+                                       'Authentication error connecting to "{redis_server}"',
+                                       [ 'redis_server' => $server ]
+                               );
+
+                               return false;
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Adjust or reset the connection handle read timeout value
+        *
+        * @param Redis $conn
+        * @param int $timeout Optional
+        */
+       public function resetTimeout( Redis $conn, $timeout = null ) {
+               $conn->setOption( Redis::OPT_READ_TIMEOUT, $timeout ?: $this->readTimeout );
+       }
+
+       /**
+        * Make sure connections are closed for sanity
+        */
+       function __destruct() {
+               foreach ( $this->connections as $server => &$serverConnections ) {
+                       foreach ( $serverConnections as $key => &$connection ) {
+                               /** @var Redis $conn */
+                               $conn = $connection['conn'];
+                               $conn->close();
+                       }
+               }
+       }
+}
diff --git a/includes/libs/stats/SamplingStatsdClient.php b/includes/libs/stats/SamplingStatsdClient.php
new file mode 100644 (file)
index 0000000..dd1976c
--- /dev/null
@@ -0,0 +1,157 @@
+<?php
+/**
+ * Copyright 2015
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+use Liuggio\StatsdClient\StatsdClient;
+use Liuggio\StatsdClient\Entity\StatsdData;
+use Liuggio\StatsdClient\Entity\StatsdDataInterface;
+
+/**
+ * A statsd client that applies the sampling rate to the data items before sending them.
+ *
+ * @since 1.26
+ */
+class SamplingStatsdClient extends StatsdClient {
+       protected $samplingRates = [];
+
+       /**
+        * Sampling rates as an associative array of patterns and rates.
+        * Patterns are Unix shell patterns (e.g. 'MediaWiki.api.*').
+        * Rates are sampling probabilities (e.g. 0.1 means 1 in 10 events are sampled).
+        * @param array $samplingRates
+        * @since 1.28
+        */
+       public function setSamplingRates( array $samplingRates ) {
+               $this->samplingRates = $samplingRates;
+       }
+
+       /**
+        * Sets sampling rate for all items in $data.
+        * The sample rate specified in a StatsdData entity overrides the sample rate specified here.
+        *
+        * {@inheritDoc}
+        */
+       public function appendSampleRate( $data, $sampleRate = 1 ) {
+               $samplingRates = $this->samplingRates;
+               if ( !$samplingRates && $sampleRate !== 1 ) {
+                       $samplingRates = [ '*' => $sampleRate ];
+               }
+               if ( $samplingRates ) {
+                       array_walk( $data, function( $item ) use ( $samplingRates ) {
+                               /** @var $item StatsdData */
+                               foreach ( $samplingRates as $pattern => $rate ) {
+                                       if ( fnmatch( $pattern, $item->getKey(), FNM_NOESCAPE ) ) {
+                                               $item->setSampleRate( $item->getSampleRate() * $rate );
+                                               break;
+                                       }
+                               }
+                       } );
+               }
+
+               return $data;
+       }
+
+       /*
+        * Send the metrics over UDP
+        * Sample the metrics according to their sample rate and send the remaining ones.
+        *
+        * @param StatsdDataInterface|StatsdDataInterface[] $data message(s) to sent
+        *        strings are not allowed here as sampleData requires a StatsdDataInterface
+        * @param int $sampleRate
+        *
+        * @return integer the data sent in bytes
+        */
+       public function send( $data, $sampleRate = 1 ) {
+               if ( !is_array( $data ) ) {
+                       $data = [ $data ];
+               }
+               if ( !$data ) {
+                       return;
+               }
+               foreach ( $data as $item ) {
+                       if ( !( $item instanceof StatsdDataInterface ) ) {
+                               throw new InvalidArgumentException(
+                                       'SamplingStatsdClient does not accept stringified messages' );
+                       }
+               }
+
+               // add sampling
+               $data = $this->appendSampleRate( $data, $sampleRate );
+               $data = $this->sampleData( $data );
+
+               $data = array_map( 'strval', $data );
+
+               // reduce number of packets
+               if ( $this->getReducePacket() ) {
+                       $data = $this->reduceCount( $data );
+               }
+
+               // failures in any of this should be silently ignored if ..
+               $written = 0;
+               try {
+                       $fp = $this->getSender()->open();
+                       if ( !$fp ) {
+                               return;
+                       }
+                       foreach ( $data as $message ) {
+                               $written += $this->getSender()->write( $fp, $message );
+                       }
+                       $this->getSender()->close( $fp );
+               } catch ( Exception $e ) {
+                       $this->throwException( $e );
+               }
+
+               return $written;
+       }
+
+       /**
+        * Throw away some of the data according to the sample rate.
+        * @param StatsdDataInterface[] $data
+        * @return StatsdDataInterface[]
+        * @throws LogicException
+        */
+       protected function sampleData( $data ) {
+               $newData = [];
+               $mt_rand_max = mt_getrandmax();
+               foreach ( $data as $item ) {
+                       $samplingRate = $item->getSampleRate();
+                       if ( $samplingRate <= 0.0 || $samplingRate > 1.0 ) {
+                               throw new LogicException( 'Sampling rate shall be within ]0, 1]' );
+                       }
+                       if (
+                               $samplingRate === 1 ||
+                               ( mt_rand() / $mt_rand_max <= $samplingRate )
+                       ) {
+                               $newData[] = $item;
+                       }
+               }
+               return $newData;
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       protected function throwException( Exception $exception ) {
+               if ( !$this->getFailSilently() ) {
+                       throw $exception;
+               }
+       }
+}
diff --git a/includes/libs/time/ConvertibleTimestamp.php b/includes/libs/time/ConvertibleTimestamp.php
new file mode 100644 (file)
index 0000000..b02985a
--- /dev/null
@@ -0,0 +1,269 @@
+<?php
+/**
+ * Creation, parsing, and conversion of timestamps.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @since 1.20
+ * @author Tyler Romeo, 2012
+ */
+
+/**
+ * Library for creating, parsing, and converting timestamps. Based on the JS
+ * library that does the same thing.
+ *
+ * @since 1.28
+ */
+class ConvertibleTimestamp {
+       /**
+        * Standard gmdate() formats for the different timestamp types.
+        */
+       private static $formats = [
+               TS_UNIX => 'U',
+               TS_MW => 'YmdHis',
+               TS_DB => 'Y-m-d H:i:s',
+               TS_ISO_8601 => 'Y-m-d\TH:i:s\Z',
+               TS_ISO_8601_BASIC => 'Ymd\THis\Z',
+               TS_EXIF => 'Y:m:d H:i:s', // This shouldn't ever be used, but is included for completeness
+               TS_RFC2822 => 'D, d M Y H:i:s',
+               TS_ORACLE => 'd-m-Y H:i:s.000000', // Was 'd-M-y h.i.s A' . ' +00:00' before r51500
+               TS_POSTGRES => 'Y-m-d H:i:s',
+       ];
+
+       /**
+        * The actual timestamp being wrapped (DateTime object).
+        * @var DateTime
+        */
+       public $timestamp;
+
+       /**
+        * Make a new timestamp and set it to the specified time,
+        * or the current time if unspecified.
+        *
+        * @param bool|string|int|float|DateTime $timestamp Timestamp to set, or false for current time
+        */
+       public function __construct( $timestamp = false ) {
+               if ( $timestamp instanceof DateTime ) {
+                       $this->timestamp = $timestamp;
+               } else {
+                       $this->setTimestamp( $timestamp );
+               }
+       }
+
+       /**
+        * Set the timestamp to the specified time, or the current time if unspecified.
+        *
+        * Parse the given timestamp into either a DateTime object or a Unix timestamp,
+        * and then store it.
+        *
+        * @param string|bool $ts Timestamp to store, or false for now
+        * @throws TimestampException
+        */
+       public function setTimestamp( $ts = false ) {
+               $m = [];
+               $da = [];
+               $strtime = '';
+
+               // We want to catch 0, '', null... but not date strings starting with a letter.
+               if ( !$ts || $ts === "\0\0\0\0\0\0\0\0\0\0\0\0\0\0" ) {
+                       $uts = time();
+                       $strtime = "@$uts";
+               } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {
+                       # TS_DB
+               } elseif ( preg_match( '/^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {
+                       # TS_EXIF
+               } elseif ( preg_match( '/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/D', $ts, $da ) ) {
+                       # TS_MW
+               } elseif ( preg_match( '/^(-?\d{1,13})(\.\d+)?$/D', $ts, $m ) ) {
+                       # TS_UNIX
+                       $strtime = "@{$m[1]}"; // http://php.net/manual/en/datetime.formats.compound.php
+               } elseif ( preg_match( '/^\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}.\d{6}$/', $ts ) ) {
+                       # TS_ORACLE // session altered to DD-MM-YYYY HH24:MI:SS.FF6
+                       $strtime = preg_replace( '/(\d\d)\.(\d\d)\.(\d\d)(\.(\d+))?/', "$1:$2:$3",
+                               str_replace( '+00:00', 'UTC', $ts ) );
+               } elseif ( preg_match(
+                       '/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.*\d*)?Z?$/',
+                       $ts,
+                       $da
+               ) ) {
+                       # TS_ISO_8601
+               } elseif ( preg_match(
+                       '/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(?:\.*\d*)?Z?$/',
+                       $ts,
+                       $da
+               ) ) {
+                       # TS_ISO_8601_BASIC
+               } elseif ( preg_match(
+                       '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d*[\+\- ](\d\d)$/',
+                       $ts,
+                       $da
+               ) ) {
+                       # TS_POSTGRES
+               } elseif ( preg_match(
+                       '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d* GMT$/',
+                       $ts,
+                       $da
+               ) ) {
+                       # TS_POSTGRES
+               } elseif ( preg_match(
+               # Day of week
+                       '/^[ \t\r\n]*([A-Z][a-z]{2},[ \t\r\n]*)?' .
+                       # dd Mon yyyy
+                       '\d\d?[ \t\r\n]*[A-Z][a-z]{2}[ \t\r\n]*\d{2}(?:\d{2})?' .
+                       # hh:mm:ss
+                       '[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d/S',
+                       $ts
+               ) ) {
+                       # TS_RFC2822, accepting a trailing comment.
+                       # See http://www.squid-cache.org/mail-archive/squid-users/200307/0122.html / r77171
+                       # The regex is a superset of rfc2822 for readability
+                       $strtime = strtok( $ts, ';' );
+               } elseif ( preg_match( '/^[A-Z][a-z]{5,8}, \d\d-[A-Z][a-z]{2}-\d{2} \d\d:\d\d:\d\d/', $ts ) ) {
+                       # TS_RFC850
+                       $strtime = $ts;
+               } elseif ( preg_match( '/^[A-Z][a-z]{2} [A-Z][a-z]{2} +\d{1,2} \d\d:\d\d:\d\d \d{4}/', $ts ) ) {
+                       # asctime
+                       $strtime = $ts;
+               } else {
+                       throw new TimestampException( __METHOD__ . ": Invalid timestamp - $ts" );
+               }
+
+               if ( !$strtime ) {
+                       $da = array_map( 'intval', $da );
+                       $da[0] = "%04d-%02d-%02dT%02d:%02d:%02d.00+00:00";
+                       $strtime = call_user_func_array( "sprintf", $da );
+               }
+
+               try {
+                       $final = new DateTime( $strtime, new DateTimeZone( 'GMT' ) );
+               } catch ( Exception $e ) {
+                       throw new TimestampException( __METHOD__ . ': Invalid timestamp format.', $e->getCode(), $e );
+               }
+
+               if ( $final === false ) {
+                       throw new TimestampException( __METHOD__ . ': Invalid timestamp format.' );
+               }
+
+               $this->timestamp = $final;
+       }
+
+       /**
+        * Convert a timestamp string to a given format.
+        *
+        * @param int $style Constant Output format for timestamp
+        * @param string $ts Timestamp
+        * @return string|bool Formatted timestamp or false on failure
+        */
+       public static function convert( $style = TS_UNIX, $ts ) {
+               try {
+                       $ct = new static( $ts );
+                       return $ct->getTimestamp( $style );
+               } catch ( TimestampException $e ) {
+                       return false;
+               }
+       }
+
+       /**
+        * Get the current time in the given format
+        *
+        * @param int $style Constant Output format for timestamp
+        * @return string
+        */
+       public static function now( $style = TS_MW ) {
+               return static::convert( $style, time() );
+       }
+
+       /**
+        * Get the timestamp represented by this object in a certain form.
+        *
+        * Convert the internal timestamp to the specified format and then
+        * return it.
+        *
+        * @param int $style Constant Output format for timestamp
+        * @throws TimestampException
+        * @return string The formatted timestamp
+        */
+       public function getTimestamp( $style = TS_UNIX ) {
+               if ( !isset( self::$formats[$style] ) ) {
+                       throw new TimestampException( __METHOD__ . ': Illegal timestamp output type.' );
+               }
+
+               $output = $this->timestamp->format( self::$formats[$style] );
+
+               if ( ( $style == TS_RFC2822 ) || ( $style == TS_POSTGRES ) ) {
+                       $output .= ' GMT';
+               }
+
+               if ( $style == TS_MW && strlen( $output ) !== 14 ) {
+                       throw new TimestampException( __METHOD__ . ': The timestamp cannot be represented in ' .
+                               'the specified format' );
+               }
+
+               return $output;
+       }
+
+       /**
+        * @return string
+        */
+       public function __toString() {
+               return $this->getTimestamp();
+       }
+
+       /**
+        * Calculate the difference between two ConvertibleTimestamp objects.
+        *
+        * @param ConvertibleTimestamp $relativeTo Base time to calculate difference from
+        * @return DateInterval|bool The DateInterval object representing the
+        *   difference between the two dates or false on failure
+        */
+       public function diff( ConvertibleTimestamp $relativeTo ) {
+               return $this->timestamp->diff( $relativeTo->timestamp );
+       }
+
+       /**
+        * Set the timezone of this timestamp to the specified timezone.
+        *
+        * @param string $timezone Timezone to set
+        * @throws TimestampException
+        */
+       public function setTimezone( $timezone ) {
+               try {
+                       $this->timestamp->setTimezone( new DateTimeZone( $timezone ) );
+               } catch ( Exception $e ) {
+                       throw new TimestampException( __METHOD__ . ': Invalid timezone.', $e->getCode(), $e );
+               }
+       }
+
+       /**
+        * Get the timezone of this timestamp.
+        *
+        * @return DateTimeZone The timezone
+        */
+       public function getTimezone() {
+               return $this->timestamp->getTimezone();
+       }
+
+       /**
+        * Format the timestamp in a given format.
+        *
+        * @param string $format Pattern to format in
+        * @return string The formatted timestamp
+        */
+       public function format( $format ) {
+               return $this->timestamp->format( $format );
+       }
+}
diff --git a/includes/libs/time/TimestampException.php b/includes/libs/time/TimestampException.php
new file mode 100644 (file)
index 0000000..36ffdee
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+/**
+ * @since 1.20
+ */
+class TimestampException extends Exception {
+}
diff --git a/includes/libs/time/defines.php b/includes/libs/time/defines.php
new file mode 100644 (file)
index 0000000..ff4dde8
--- /dev/null
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * Unix time - the number of seconds since 1970-01-01 00:00:00 UTC
+ */
+define( 'TS_UNIX', 0 );
+
+/**
+ * MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS)
+ */
+define( 'TS_MW', 1 );
+
+/**
+ * MySQL DATETIME (YYYY-MM-DD HH:MM:SS)
+ */
+define( 'TS_DB', 2 );
+
+/**
+ * RFC 2822 format, for E-mail and HTTP headers
+ */
+define( 'TS_RFC2822', 3 );
+
+/**
+ * ISO 8601 format with no timezone: 1986-02-09T20:00:00Z
+ *
+ * This is used by Special:Export
+ */
+define( 'TS_ISO_8601', 4 );
+
+/**
+ * An Exif timestamp (YYYY:MM:DD HH:MM:SS)
+ *
+ * @see http://exif.org/Exif2-2.PDF The Exif 2.2 spec, see page 28 for the
+ *       DateTime tag and page 36 for the DateTimeOriginal and
+ *       DateTimeDigitized tags.
+ */
+define( 'TS_EXIF', 5 );
+
+/**
+ * Oracle format time.
+ */
+define( 'TS_ORACLE', 6 );
+
+/**
+ * Postgres format time.
+ */
+define( 'TS_POSTGRES', 7 );
+
+/**
+ * ISO 8601 basic format with no timezone: 19860209T200000Z.  This is used by ResourceLoader
+ */
+define( 'TS_ISO_8601_BASIC', 9 );
index 0864e5c..1b7545a 100644 (file)
@@ -304,7 +304,7 @@ class VirtualRESTServiceClient {
         */
        private function getInstance( $prefix ) {
                if ( !isset( $this->instances[$prefix] ) ) {
-                       throw new RunTimeException( "No service registered at prefix '{$prefix}'." );
+                       throw new RuntimeException( "No service registered at prefix '{$prefix}'." );
                }
 
                if ( !( $this->instances[$prefix] instanceof VirtualRESTService ) ) {
diff --git a/includes/libs/xmp/XMP.php b/includes/libs/xmp/XMP.php
new file mode 100644 (file)
index 0000000..29bbf40
--- /dev/null
@@ -0,0 +1,1384 @@
+<?php
+/**
+ * Reader for XMP data containing properties relevant to images.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Media
+ */
+
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+use Psr\Log\NullLogger;
+use Wikimedia\ScopedCallback;
+
+/**
+ * Class for reading xmp data containing properties relevant to
+ * images, and spitting out an array that FormatMetadata accepts.
+ *
+ * Note, this is not meant to recognize every possible thing you can
+ * encode in XMP. It should recognize all the properties we want.
+ * For example it doesn't have support for structures with multiple
+ * nesting levels, as none of the properties we're supporting use that
+ * feature. If it comes across properties it doesn't recognize, it should
+ * ignore them.
+ *
+ * The public methods one would call in this class are
+ * - parse( $content )
+ *    Reads in xmp content.
+ *    Can potentially be called multiple times with partial data each time.
+ * - parseExtended( $content )
+ *    Reads XMPExtended blocks (jpeg files only).
+ * - getResults
+ *    Outputs a results array.
+ *
+ * Note XMP kind of looks like rdf. They are not the same thing - XMP is
+ * encoded as a specific subset of rdf. This class can read XMP. It cannot
+ * read rdf.
+ *
+ */
+class XMPReader implements LoggerAwareInterface {
+       /** @var array XMP item configuration array */
+       protected $items;
+
+       /** @var array Array to hold the current element (and previous element, and so on) */
+       private $curItem = [];
+
+       /** @var bool|string The structure name when processing nested structures. */
+       private $ancestorStruct = false;
+
+       /** @var bool|string Temporary holder for character data that appears in xmp doc. */
+       private $charContent = false;
+
+       /** @var array Stores the state the xmpreader is in (see MODE_FOO constants) */
+       private $mode = [];
+
+       /** @var array Array to hold results */
+       private $results = [];
+
+       /** @var bool If we're doing a seq or bag. */
+       private $processingArray = false;
+
+       /** @var bool|string Used for lang alts only */
+       private $itemLang = false;
+
+       /** @var resource A resource handle for the XML parser */
+       private $xmlParser;
+
+       /** @var bool|string Character set like 'UTF-8' */
+       private $charset = false;
+
+       /** @var int */
+       private $extendedXMPOffset = 0;
+
+       /** @var int Flag determining if the XMP is safe to parse **/
+       private $parsable = 0;
+
+       /** @var string Buffer of XML to parse **/
+       private $xmlParsableBuffer = '';
+
+       /**
+        * These are various mode constants.
+        * they are used to figure out what to do
+        * with an element when its encountered.
+        *
+        * For example, MODE_IGNORE is used when processing
+        * a property we're not interested in. So if a new
+        * element pops up when we're in that mode, we ignore it.
+        */
+       const MODE_INITIAL = 0;
+       const MODE_IGNORE = 1;
+       const MODE_LI = 2;
+       const MODE_LI_LANG = 3;
+       const MODE_QDESC = 4;
+
+       // The following MODE constants are also used in the
+       // $items array to denote what type of property the item is.
+       const MODE_SIMPLE = 10;
+       const MODE_STRUCT = 11; // structure (associative array)
+       const MODE_SEQ = 12; // ordered list
+       const MODE_BAG = 13; // unordered list
+       const MODE_LANG = 14;
+       const MODE_ALT = 15; // non-language alt. Currently not implemented, and not needed atm.
+       const MODE_BAGSTRUCT = 16; // A BAG of Structs.
+
+       const NS_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
+       const NS_XML = 'http://www.w3.org/XML/1998/namespace';
+
+       // States used while determining if XML is safe to parse
+       const PARSABLE_UNKNOWN = 0;
+       const PARSABLE_OK = 1;
+       const PARSABLE_BUFFERING = 2;
+       const PARSABLE_NO = 3;
+
+       /**
+        * @var LoggerInterface
+        */
+       private $logger;
+
+       /**
+        * Constructor.
+        *
+        * Primary job is to initialize the XMLParser
+        */
+       function __construct( LoggerInterface $logger = null ) {
+
+               if ( !function_exists( 'xml_parser_create_ns' ) ) {
+                       // this should already be checked by this point
+                       throw new RuntimeException( 'XMP support requires XML Parser' );
+               }
+               if ( $logger ) {
+                       $this->setLogger( $logger );
+               } else {
+                       $this->setLogger( new NullLogger() );
+               }
+
+               $this->items = XMPInfo::getItems();
+
+               $this->resetXMLParser();
+       }
+
+       public function setLogger( LoggerInterface $logger ) {
+               $this->logger = $logger;
+       }
+
+       /**
+        * free the XML parser.
+        *
+        * @note It is unclear to me if we really need to do this ourselves
+        *  or if php garbage collection will automatically free the xmlParser
+        *  when it is no longer needed.
+        */
+       private function destroyXMLParser() {
+               if ( $this->xmlParser ) {
+                       xml_parser_free( $this->xmlParser );
+                       $this->xmlParser = null;
+               }
+       }
+
+       /**
+        * Main use is if a single item has multiple xmp documents describing it.
+        * For example in jpeg's with extendedXMP
+        */
+       private function resetXMLParser() {
+
+               $this->destroyXMLParser();
+
+               $this->xmlParser = xml_parser_create_ns( 'UTF-8', ' ' );
+               xml_parser_set_option( $this->xmlParser, XML_OPTION_CASE_FOLDING, 0 );
+               xml_parser_set_option( $this->xmlParser, XML_OPTION_SKIP_WHITE, 1 );
+
+               xml_set_element_handler( $this->xmlParser,
+                       [ $this, 'startElement' ],
+                       [ $this, 'endElement' ] );
+
+               xml_set_character_data_handler( $this->xmlParser, [ $this, 'char' ] );
+
+               $this->parsable = self::PARSABLE_UNKNOWN;
+               $this->xmlParsableBuffer = '';
+       }
+
+       /**
+        * Check if this instance supports using this class
+        */
+       public static function isSupported() {
+               return function_exists( 'xml_parser_create_ns' ) && class_exists( 'XMLReader' );
+       }
+
+       /** Get the result array. Do some post-processing before returning
+        * the array, and transform any metadata that is special-cased.
+        *
+        * @return array Array of results as an array of arrays suitable for
+        *    FormatMetadata::getFormattedData().
+        */
+       public function getResults() {
+               // xmp-special is for metadata that affects how stuff
+               // is extracted. For example xmpNote:HasExtendedXMP.
+
+               // It is also used to handle photoshop:AuthorsPosition
+               // which is weird and really part of another property,
+               // see 2:85 in IPTC. See also pg 21 of IPTC4XMP standard.
+               // The location fields also use it.
+
+               $data = $this->results;
+
+               if ( isset( $data['xmp-special']['AuthorsPosition'] )
+                       && is_string( $data['xmp-special']['AuthorsPosition'] )
+                       && isset( $data['xmp-general']['Artist'][0] )
+               ) {
+                       // Note, if there is more than one creator,
+                       // this only applies to first. This also will
+                       // only apply to the dc:Creator prop, not the
+                       // exif:Artist prop.
+
+                       $data['xmp-general']['Artist'][0] =
+                               $data['xmp-special']['AuthorsPosition'] . ', '
+                               . $data['xmp-general']['Artist'][0];
+               }
+
+               // Go through the LocationShown and LocationCreated
+               // changing it to the non-hierarchal form used by
+               // the other location fields.
+
+               if ( isset( $data['xmp-special']['LocationShown'][0] )
+                       && is_array( $data['xmp-special']['LocationShown'][0] )
+               ) {
+                       // the is_array is just paranoia. It should always
+                       // be an array.
+                       foreach ( $data['xmp-special']['LocationShown'] as $loc ) {
+                               if ( !is_array( $loc ) ) {
+                                       // To avoid copying over the _type meta-fields.
+                                       continue;
+                               }
+                               foreach ( $loc as $field => $val ) {
+                                       $data['xmp-general'][$field . 'Dest'][] = $val;
+                               }
+                       }
+               }
+               if ( isset( $data['xmp-special']['LocationCreated'][0] )
+                       && is_array( $data['xmp-special']['LocationCreated'][0] )
+               ) {
+                       // the is_array is just paranoia. It should always
+                       // be an array.
+                       foreach ( $data['xmp-special']['LocationCreated'] as $loc ) {
+                               if ( !is_array( $loc ) ) {
+                                       // To avoid copying over the _type meta-fields.
+                                       continue;
+                               }
+                               foreach ( $loc as $field => $val ) {
+                                       $data['xmp-general'][$field . 'Created'][] = $val;
+                               }
+                       }
+               }
+
+               // We don't want to return the special values, since they're
+               // special and not info to be stored about the file.
+               unset( $data['xmp-special'] );
+
+               // Convert GPSAltitude to negative if below sea level.
+               if ( isset( $data['xmp-exif']['GPSAltitudeRef'] )
+                       && isset( $data['xmp-exif']['GPSAltitude'] )
+               ) {
+
+                       // Must convert to a real before multiplying by -1
+                       // XMPValidate guarantees there will always be a '/' in this value.
+                       list( $nom, $denom ) = explode( '/', $data['xmp-exif']['GPSAltitude'] );
+                       $data['xmp-exif']['GPSAltitude'] = $nom / $denom;
+
+                       if ( $data['xmp-exif']['GPSAltitudeRef'] == '1' ) {
+                               $data['xmp-exif']['GPSAltitude'] *= -1;
+                       }
+                       unset( $data['xmp-exif']['GPSAltitudeRef'] );
+               }
+
+               return $data;
+       }
+
+       /**
+        * Main function to call to parse XMP. Use getResults to
+        * get results.
+        *
+        * Also catches any errors during processing, writes them to
+        * debug log, blanks result array and returns false.
+        *
+        * @param string $content XMP data
+        * @param bool $allOfIt If this is all the data (true) or if its split up (false). Default true
+        * @throws RuntimeException
+        * @return bool Success.
+        */
+       public function parse( $content, $allOfIt = true ) {
+               if ( !$this->xmlParser ) {
+                       $this->resetXMLParser();
+               }
+               try {
+
+                       // detect encoding by looking for BOM which is supposed to be in processing instruction.
+                       // see page 12 of http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart3.pdf
+                       if ( !$this->charset ) {
+                               $bom = [];
+                               if ( preg_match( '/\xEF\xBB\xBF|\xFE\xFF|\x00\x00\xFE\xFF|\xFF\xFE\x00\x00|\xFF\xFE/',
+                                       $content, $bom )
+                               ) {
+                                       switch ( $bom[0] ) {
+                                               case "\xFE\xFF":
+                                                       $this->charset = 'UTF-16BE';
+                                                       break;
+                                               case "\xFF\xFE":
+                                                       $this->charset = 'UTF-16LE';
+                                                       break;
+                                               case "\x00\x00\xFE\xFF":
+                                                       $this->charset = 'UTF-32BE';
+                                                       break;
+                                               case "\xFF\xFE\x00\x00":
+                                                       $this->charset = 'UTF-32LE';
+                                                       break;
+                                               case "\xEF\xBB\xBF":
+                                                       $this->charset = 'UTF-8';
+                                                       break;
+                                               default:
+                                                       // this should be impossible to get to
+                                                       throw new RuntimeException( "Invalid BOM" );
+                                       }
+                               } else {
+                                       // standard specifically says, if no bom assume utf-8
+                                       $this->charset = 'UTF-8';
+                               }
+                       }
+                       if ( $this->charset !== 'UTF-8' ) {
+                               // don't convert if already utf-8
+                               MediaWiki\suppressWarnings();
+                               $content = iconv( $this->charset, 'UTF-8//IGNORE', $content );
+                               MediaWiki\restoreWarnings();
+                       }
+
+                       // Ensure the XMP block does not have an xml doctype declaration, which
+                       // could declare entities unsafe to parse with xml_parse (T85848/T71210).
+                       if ( $this->parsable !== self::PARSABLE_OK ) {
+                               if ( $this->parsable === self::PARSABLE_NO ) {
+                                       throw new RuntimeException( 'Unsafe doctype declaration in XML.' );
+                               }
+
+                               $content = $this->xmlParsableBuffer . $content;
+                               if ( !$this->checkParseSafety( $content ) ) {
+                                       if ( !$allOfIt && $this->parsable !== self::PARSABLE_NO ) {
+                                               // parse wasn't Unsuccessful yet, so return true
+                                               // in this case.
+                                               return true;
+                                       }
+                                       $msg = ( $this->parsable === self::PARSABLE_NO ) ?
+                                               'Unsafe doctype declaration in XML.' :
+                                               'No root element found in XML.';
+                                       throw new RuntimeException( $msg );
+                               }
+                       }
+
+                       $ok = xml_parse( $this->xmlParser, $content, $allOfIt );
+                       if ( !$ok ) {
+                               $code = xml_get_error_code( $this->xmlParser );
+                               $error = xml_error_string( $code );
+                               $line = xml_get_current_line_number( $this->xmlParser );
+                               $col = xml_get_current_column_number( $this->xmlParser );
+                               $offset = xml_get_current_byte_index( $this->xmlParser );
+
+                               $this->logger->warning(
+                                       '{method} : Error reading XMP content: {error} ' .
+                                       '(line: {line} column: {column} byte offset: {offset})',
+                                       [
+                                               'method' => __METHOD__,
+                                               'error_code' => $code,
+                                               'error' => $error,
+                                               'line' => $line,
+                                               'column' => $col,
+                                               'offset' => $offset,
+                                               'content' => $content,
+                               ] );
+                               $this->results = []; // blank if error.
+                               $this->destroyXMLParser();
+                               return false;
+                       }
+               } catch ( Exception $e ) {
+                       $this->logger->warning(
+                               '{method} Exception caught while parsing: ' . $e->getMessage(),
+                               [
+                                       'method' => __METHOD__,
+                                       'exception' => $e,
+                                       'content' => $content,
+                               ]
+                       );
+                       $this->results = [];
+                       return false;
+               }
+               if ( $allOfIt ) {
+                       $this->destroyXMLParser();
+               }
+
+               return true;
+       }
+
+       /** Entry point for XMPExtended blocks in jpeg files
+        *
+        * @todo In serious need of testing
+        * @see http://www.adobe.ge/devnet/xmp/pdfs/XMPSpecificationPart3.pdf XMP spec part 3 page 20
+        * @param string $content XMPExtended block minus the namespace signature
+        * @return bool If it succeeded.
+        */
+       public function parseExtended( $content ) {
+               // @todo FIXME: This is untested. Hard to find example files
+               // or programs that make such files..
+               $guid = substr( $content, 0, 32 );
+               if ( !isset( $this->results['xmp-special']['HasExtendedXMP'] )
+                       || $this->results['xmp-special']['HasExtendedXMP'] !== $guid
+               ) {
+                       $this->logger->info( __METHOD__ .
+                               " Ignoring XMPExtended block due to wrong guid (guid= '$guid')" );
+
+                       return false;
+               }
+               $len = unpack( 'Nlength/Noffset', substr( $content, 32, 8 ) );
+
+               if ( !$len ||
+                       $len['length'] < 4 ||
+                       $len['offset'] < 0 ||
+                       $len['offset'] > $len['length']
+               ) {
+                       $this->logger->info(
+                               __METHOD__ . 'Error reading extended XMP block, invalid length or offset.'
+                       );
+
+                       return false;
+               }
+
+               // we're not very robust here. we should accept it in the wrong order.
+               // To quote the XMP standard:
+               // "A JPEG writer should write the ExtendedXMP marker segments in order,
+               // immediately following the StandardXMP. However, the JPEG standard
+               // does not require preservation of marker segment order. A robust JPEG
+               // reader should tolerate the marker segments in any order."
+               // On the other hand, the probability that an image will have more than
+               // 128k of metadata is rather low... so the probability that it will have
+               // > 128k, and be in the wrong order is very low...
+
+               if ( $len['offset'] !== $this->extendedXMPOffset ) {
+                       $this->logger->info( __METHOD__ . 'Ignoring XMPExtended block due to wrong order. (Offset was '
+                               . $len['offset'] . ' but expected ' . $this->extendedXMPOffset . ')' );
+
+                       return false;
+               }
+
+               if ( $len['offset'] === 0 ) {
+                       // if we're starting the extended block, we've probably already
+                       // done the XMPStandard block, so reset.
+                       $this->resetXMLParser();
+               }
+
+               $this->extendedXMPOffset += $len['length'];
+
+               $actualContent = substr( $content, 40 );
+
+               if ( $this->extendedXMPOffset === strlen( $actualContent ) ) {
+                       $atEnd = true;
+               } else {
+                       $atEnd = false;
+               }
+
+               $this->logger->debug( __METHOD__ . 'Parsing a XMPExtended block' );
+
+               return $this->parse( $actualContent, $atEnd );
+       }
+
+       /**
+        * Character data handler
+        * Called whenever character data is found in the xmp document.
+        *
+        * does nothing if we're in MODE_IGNORE or if the data is whitespace
+        * throws an error if we're not in MODE_SIMPLE (as we're not allowed to have character
+        * data in the other modes).
+        *
+        * As an example, this happens when we encounter XMP like:
+        * <exif:DigitalZoomRatio>0/10</exif:DigitalZoomRatio>
+        * and are processing the 0/10 bit.
+        *
+        * @param XMLParser $parser XMLParser reference to the xml parser
+        * @param string $data Character data
+        * @throws RuntimeException On invalid data
+        */
+       function char( $parser, $data ) {
+
+               $data = trim( $data );
+               if ( trim( $data ) === "" ) {
+                       return;
+               }
+
+               if ( !isset( $this->mode[0] ) ) {
+                       throw new RuntimeException( 'Unexpected character data before first rdf:Description element' );
+               }
+
+               if ( $this->mode[0] === self::MODE_IGNORE ) {
+                       return;
+               }
+
+               if ( $this->mode[0] !== self::MODE_SIMPLE
+                       && $this->mode[0] !== self::MODE_QDESC
+               ) {
+                       throw new RuntimeException( 'character data where not expected. (mode ' . $this->mode[0] . ')' );
+               }
+
+               // to check, how does this handle w.s.
+               if ( $this->charContent === false ) {
+                       $this->charContent = $data;
+               } else {
+                       $this->charContent .= $data;
+               }
+       }
+
+       /**
+        * Check if a block of XML is safe to pass to xml_parse, i.e. doesn't
+        * contain a doctype declaration which could contain a dos attack if we
+        * parse it and expand internal entities (T85848).
+        *
+        * @param string $content xml string to check for parse safety
+        * @return bool true if the xml is safe to parse, false otherwise
+        */
+       private function checkParseSafety( $content ) {
+               $reader = new XMLReader();
+               $result = null;
+
+               // For XMLReader to parse incomplete/invalid XML, it has to be open()'ed
+               // instead of using XML().
+               $reader->open(
+                       'data://text/plain,' . urlencode( $content ),
+                       null,
+                       LIBXML_NOERROR | LIBXML_NOWARNING | LIBXML_NONET
+               );
+
+               $oldDisable = libxml_disable_entity_loader( true );
+               /** @noinspection PhpUnusedLocalVariableInspection */
+               $reset = new ScopedCallback(
+                       'libxml_disable_entity_loader',
+                       [ $oldDisable ]
+               );
+               $reader->setParserProperty( XMLReader::SUBST_ENTITIES, false );
+
+               // Even with LIBXML_NOWARNING set, XMLReader::read gives a warning
+               // when parsing truncated XML, which causes unit tests to fail.
+               MediaWiki\suppressWarnings();
+               while ( $reader->read() ) {
+                       if ( $reader->nodeType === XMLReader::ELEMENT ) {
+                               // Reached the first element without hitting a doctype declaration
+                               $this->parsable = self::PARSABLE_OK;
+                               $result = true;
+                               break;
+                       }
+                       if ( $reader->nodeType === XMLReader::DOC_TYPE ) {
+                               $this->parsable = self::PARSABLE_NO;
+                               $result = false;
+                               break;
+                       }
+               }
+               MediaWiki\restoreWarnings();
+
+               if ( !is_null( $result ) ) {
+                       return $result;
+               }
+
+               // Reached the end of the parsable xml without finding an element
+               // or doctype. Buffer and try again.
+               $this->parsable = self::PARSABLE_BUFFERING;
+               $this->xmlParsableBuffer = $content;
+               return false;
+       }
+
+       /** When we hit a closing element in MODE_IGNORE
+        * Check to see if this is the element we started to ignore,
+        * in which case we get out of MODE_IGNORE
+        *
+        * @param string $elm Namespace of element followed by a space and then tag name of element.
+        */
+       private function endElementModeIgnore( $elm ) {
+               if ( $this->curItem[0] === $elm ) {
+                       array_shift( $this->curItem );
+                       array_shift( $this->mode );
+               }
+       }
+
+       /**
+        * Hit a closing element when in MODE_SIMPLE.
+        * This generally means that we finished processing a
+        * property value, and now have to save the result to the
+        * results array
+        *
+        * For example, when processing:
+        * <exif:DigitalZoomRatio>0/10</exif:DigitalZoomRatio>
+        * this deals with when we hit </exif:DigitalZoomRatio>.
+        *
+        * Or it could be if we hit the end element of a property
+        * of a compound data structure (like a member of an array).
+        *
+        * @param string $elm Namespace, space, and tag name.
+        */
+       private function endElementModeSimple( $elm ) {
+               if ( $this->charContent !== false ) {
+                       if ( $this->processingArray ) {
+                               // if we're processing an array, use the original element
+                               // name instead of rdf:li.
+                               list( $ns, $tag ) = explode( ' ', $this->curItem[0], 2 );
+                       } else {
+                               list( $ns, $tag ) = explode( ' ', $elm, 2 );
+                       }
+                       $this->saveValue( $ns, $tag, $this->charContent );
+
+                       $this->charContent = false; // reset
+               }
+               array_shift( $this->curItem );
+               array_shift( $this->mode );
+       }
+
+       /**
+        * Hit a closing element in MODE_STRUCT, MODE_SEQ, MODE_BAG
+        * generally means we've finished processing a nested structure.
+        * resets some internal variables to indicate that.
+        *
+        * Note this means we hit the closing element not the "</rdf:Seq>".
+        *
+        * @par For example, when processing:
+        * @code{,xml}
+        * <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>64</rdf:li>
+        *   </rdf:Seq> </exif:ISOSpeedRatings>
+        * @endcode
+        *
+        * This method is called when we hit the "</exif:ISOSpeedRatings>" tag.
+        *
+        * @param string $elm Namespace . space . tag name.
+        * @throws RuntimeException
+        */
+       private function endElementNested( $elm ) {
+
+               /* cur item must be the same as $elm, unless if in MODE_STRUCT
+                  in which case it could also be rdf:Description */
+               if ( $this->curItem[0] !== $elm
+                       && !( $elm === self::NS_RDF . ' Description'
+                               && $this->mode[0] === self::MODE_STRUCT )
+               ) {
+                       throw new RuntimeException( "nesting mismatch. got a </$elm> but expected a </" .
+                               $this->curItem[0] . '>' );
+               }
+
+               // Validate structures.
+               list( $ns, $tag ) = explode( ' ', $elm, 2 );
+               if ( isset( $this->items[$ns][$tag]['validate'] ) ) {
+                       $info =& $this->items[$ns][$tag];
+                       $finalName = isset( $info['map_name'] )
+                               ? $info['map_name'] : $tag;
+
+                       if ( is_array( $info['validate'] ) ) {
+                               $validate = $info['validate'];
+                       } else {
+                               $validator = new XMPValidate( $this->logger );
+                               $validate = [ $validator, $info['validate'] ];
+                       }
+
+                       if ( !isset( $this->results['xmp-' . $info['map_group']][$finalName] ) ) {
+                               // This can happen if all the members of the struct failed validation.
+                               $this->logger->debug( __METHOD__ . " <$ns:$tag> has no valid members." );
+                       } elseif ( is_callable( $validate ) ) {
+                               $val =& $this->results['xmp-' . $info['map_group']][$finalName];
+                               call_user_func_array( $validate, [ $info, &$val, false ] );
+                               if ( is_null( $val ) ) {
+                                       // the idea being the validation function will unset the variable if
+                                       // its invalid.
+                                       $this->logger->info( __METHOD__ . " <$ns:$tag> failed validation." );
+                                       unset( $this->results['xmp-' . $info['map_group']][$finalName] );
+                               }
+                       } else {
+                               $this->logger->warning( __METHOD__ . " Validation function for $finalName ("
+                                       . $validate[0] . '::' . $validate[1] . '()) is not callable.' );
+                       }
+               }
+
+               array_shift( $this->curItem );
+               array_shift( $this->mode );
+               $this->ancestorStruct = false;
+               $this->processingArray = false;
+               $this->itemLang = false;
+       }
+
+       /**
+        * Hit a closing element in MODE_LI (either rdf:Seq, or rdf:Bag )
+        * Add information about what type of element this is.
+        *
+        * Note we still have to hit the outer "</property>"
+        *
+        * @par For example, when processing:
+        * @code{,xml}
+        * <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>64</rdf:li>
+        *   </rdf:Seq> </exif:ISOSpeedRatings>
+        * @endcode
+        *
+        * This method is called when we hit the "</rdf:Seq>".
+        * (For comparison, we call endElementModeSimple when we
+        * hit the "</rdf:li>")
+        *
+        * @param string $elm Namespace . ' ' . element name
+        * @throws RuntimeException
+        */
+       private function endElementModeLi( $elm ) {
+               list( $ns, $tag ) = explode( ' ', $this->curItem[0], 2 );
+               $info = $this->items[$ns][$tag];
+               $finalName = isset( $info['map_name'] )
+                       ? $info['map_name'] : $tag;
+
+               array_shift( $this->mode );
+
+               if ( !isset( $this->results['xmp-' . $info['map_group']][$finalName] ) ) {
+                       $this->logger->debug( __METHOD__ . " Empty compund element $finalName." );
+
+                       return;
+               }
+
+               if ( $elm === self::NS_RDF . ' Seq' ) {
+                       $this->results['xmp-' . $info['map_group']][$finalName]['_type'] = 'ol';
+               } elseif ( $elm === self::NS_RDF . ' Bag' ) {
+                       $this->results['xmp-' . $info['map_group']][$finalName]['_type'] = 'ul';
+               } elseif ( $elm === self::NS_RDF . ' Alt' ) {
+                       // extra if needed as you could theoretically have a non-language alt.
+                       if ( $info['mode'] === self::MODE_LANG ) {
+                               $this->results['xmp-' . $info['map_group']][$finalName]['_type'] = 'lang';
+                       }
+               } else {
+                       throw new RuntimeException(
+                               __METHOD__ . " expected </rdf:seq> or </rdf:bag> but instead got $elm."
+                       );
+               }
+       }
+
+       /**
+        * End element while in MODE_QDESC
+        * mostly when ending an element when we have a simple value
+        * that has qualifiers.
+        *
+        * Qualifiers aren't all that common, and we don't do anything
+        * with them.
+        *
+        * @param string $elm Namespace and element
+        */
+       private function endElementModeQDesc( $elm ) {
+
+               if ( $elm === self::NS_RDF . ' value' ) {
+                       list( $ns, $tag ) = explode( ' ', $this->curItem[0], 2 );
+                       $this->saveValue( $ns, $tag, $this->charContent );
+
+                       return;
+               } else {
+                       array_shift( $this->mode );
+                       array_shift( $this->curItem );
+               }
+       }
+
+       /**
+        * Handler for hitting a closing element.
+        *
+        * generally just calls a helper function depending on what
+        * mode we're in.
+        *
+        * Ignores the outer wrapping elements that are optional in
+        * xmp and have no meaning.
+        *
+        * @param XMLParser $parser
+        * @param string $elm Namespace . ' ' . element name
+        * @throws RuntimeException
+        */
+       function endElement( $parser, $elm ) {
+               if ( $elm === ( self::NS_RDF . ' RDF' )
+                       || $elm === 'adobe:ns:meta/ xmpmeta'
+                       || $elm === 'adobe:ns:meta/ xapmeta'
+               ) {
+                       // ignore these.
+                       return;
+               }
+
+               if ( $elm === self::NS_RDF . ' type' ) {
+                       // these aren't really supported properly yet.
+                       // However, it appears they almost never used.
+                       $this->logger->info( __METHOD__ . ' encountered <rdf:type>' );
+               }
+
+               if ( strpos( $elm, ' ' ) === false ) {
+                       // This probably shouldn't happen.
+                       // However, there is a bug in an adobe product
+                       // that forgets the namespace on some things.
+                       // (Luckily they are unimportant things).
+                       $this->logger->info( __METHOD__ . " Encountered </$elm> which has no namespace. Skipping." );
+
+                       return;
+               }
+
+               if ( count( $this->mode[0] ) === 0 ) {
+                       // This should never ever happen and means
+                       // there is a pretty major bug in this class.
+                       throw new RuntimeException( 'Encountered end element with no mode' );
+               }
+
+               if ( count( $this->curItem ) == 0 && $this->mode[0] !== self::MODE_INITIAL ) {
+                       // just to be paranoid. Should always have a curItem, except for initially
+                       // (aka during MODE_INITAL).
+                       throw new RuntimeException( "Hit end element </$elm> but no curItem" );
+               }
+
+               switch ( $this->mode[0] ) {
+                       case self::MODE_IGNORE:
+                               $this->endElementModeIgnore( $elm );
+                               break;
+                       case self::MODE_SIMPLE:
+                               $this->endElementModeSimple( $elm );
+                               break;
+                       case self::MODE_STRUCT:
+                       case self::MODE_SEQ:
+                       case self::MODE_BAG:
+                       case self::MODE_LANG:
+                       case self::MODE_BAGSTRUCT:
+                               $this->endElementNested( $elm );
+                               break;
+                       case self::MODE_INITIAL:
+                               if ( $elm === self::NS_RDF . ' Description' ) {
+                                       array_shift( $this->mode );
+                               } else {
+                                       throw new RuntimeException( 'Element ended unexpectedly while in MODE_INITIAL' );
+                               }
+                               break;
+                       case self::MODE_LI:
+                       case self::MODE_LI_LANG:
+                               $this->endElementModeLi( $elm );
+                               break;
+                       case self::MODE_QDESC:
+                               $this->endElementModeQDesc( $elm );
+                               break;
+                       default:
+                               $this->logger->warning( __METHOD__ . " no mode (elm = $elm)" );
+                               break;
+               }
+       }
+
+       /**
+        * Hit an opening element while in MODE_IGNORE
+        *
+        * XMP is extensible, so ignore any tag we don't understand.
+        *
+        * Mostly ignores, unless we encounter the element that we are ignoring.
+        * in which case we add it to the item stack, so we can ignore things
+        * that are nested, correctly.
+        *
+        * @param string $elm Namespace . ' ' . tag name
+        */
+       private function startElementModeIgnore( $elm ) {
+               if ( $elm === $this->curItem[0] ) {
+                       array_unshift( $this->curItem, $elm );
+                       array_unshift( $this->mode, self::MODE_IGNORE );
+               }
+       }
+
+       /**
+        *  Start element in MODE_BAG (unordered array)
+        * this should always be <rdf:Bag>
+        *
+        * @param string $elm Namespace . ' ' . tag
+        * @throws RuntimeException If we have an element that's not <rdf:Bag>
+        */
+       private function startElementModeBag( $elm ) {
+               if ( $elm === self::NS_RDF . ' Bag' ) {
+                       array_unshift( $this->mode, self::MODE_LI );
+               } else {
+                       throw new RuntimeException( "Expected <rdf:Bag> but got $elm." );
+               }
+       }
+
+       /**
+        * Start element in MODE_SEQ (ordered array)
+        * this should always be <rdf:Seq>
+        *
+        * @param string $elm Namespace . ' ' . tag
+        * @throws RuntimeException If we have an element that's not <rdf:Seq>
+        */
+       private function startElementModeSeq( $elm ) {
+               if ( $elm === self::NS_RDF . ' Seq' ) {
+                       array_unshift( $this->mode, self::MODE_LI );
+               } elseif ( $elm === self::NS_RDF . ' Bag' ) {
+                       # bug 27105
+                       $this->logger->info( __METHOD__ . ' Expected an rdf:Seq, but got an rdf:Bag. Pretending'
+                               . ' it is a Seq, since some buggy software is known to screw this up.' );
+                       array_unshift( $this->mode, self::MODE_LI );
+               } else {
+                       throw new RuntimeException( "Expected <rdf:Seq> but got $elm." );
+               }
+       }
+
+       /**
+        * Start element in MODE_LANG (language alternative)
+        * this should always be <rdf:Alt>
+        *
+        * This tag tends to be used for metadata like describe this
+        * picture, which can be translated into multiple languages.
+        *
+        * XMP supports non-linguistic alternative selections,
+        * which are really only used for thumbnails, which
+        * we don't care about.
+        *
+        * @param string $elm Namespace . ' ' . tag
+        * @throws RuntimeException If we have an element that's not <rdf:Alt>
+        */
+       private function startElementModeLang( $elm ) {
+               if ( $elm === self::NS_RDF . ' Alt' ) {
+                       array_unshift( $this->mode, self::MODE_LI_LANG );
+               } else {
+                       throw new RuntimeException( "Expected <rdf:Seq> but got $elm." );
+               }
+       }
+
+       /**
+        * Handle an opening element when in MODE_SIMPLE
+        *
+        * This should not happen often. This is for if a simple element
+        * already opened has a child element. Could happen for a
+        * qualified element.
+        *
+        * For example:
+        * <exif:DigitalZoomRatio><rdf:Description><rdf:value>0/10</rdf:value>
+        *   <foo:someQualifier>Bar</foo:someQualifier> </rdf:Description>
+        *   </exif:DigitalZoomRatio>
+        *
+        * This method is called when processing the <rdf:Description> element
+        *
+        * @param string $elm Namespace and tag names separated by space.
+        * @param array $attribs Attributes of the element.
+        * @throws RuntimeException
+        */
+       private function startElementModeSimple( $elm, $attribs ) {
+               if ( $elm === self::NS_RDF . ' Description' ) {
+                       // If this value has qualifiers
+                       array_unshift( $this->mode, self::MODE_QDESC );
+                       array_unshift( $this->curItem, $this->curItem[0] );
+
+                       if ( isset( $attribs[self::NS_RDF . ' value'] ) ) {
+                               list( $ns, $tag ) = explode( ' ', $this->curItem[0], 2 );
+                               $this->saveValue( $ns, $tag, $attribs[self::NS_RDF . ' value'] );
+                       }
+               } elseif ( $elm === self::NS_RDF . ' value' ) {
+                       // This should not be here.
+                       throw new RuntimeException( __METHOD__ . ' Encountered <rdf:value> where it was unexpected.' );
+               } else {
+                       // something else we don't recognize, like a qualifier maybe.
+                       $this->logger->info( __METHOD__ .
+                               " Encountered element <$elm> where only expecting character data as value of " .
+                               $this->curItem[0] );
+                       array_unshift( $this->mode, self::MODE_IGNORE );
+                       array_unshift( $this->curItem, $elm );
+               }
+       }
+
+       /**
+        * Start an element when in MODE_QDESC.
+        * This generally happens when a simple element has an inner
+        * rdf:Description to hold qualifier elements.
+        *
+        * For example in:
+        * <exif:DigitalZoomRatio><rdf:Description><rdf:value>0/10</rdf:value>
+        *   <foo:someQualifier>Bar</foo:someQualifier> </rdf:Description>
+        *   </exif:DigitalZoomRatio>
+        * Called when processing the <rdf:value> or <foo:someQualifier>.
+        *
+        * @param string $elm Namespace and tag name separated by a space.
+        *
+        */
+       private function startElementModeQDesc( $elm ) {
+               if ( $elm === self::NS_RDF . ' value' ) {
+                       return; // do nothing
+               } else {
+                       // otherwise its a qualifier, which we ignore
+                       array_unshift( $this->mode, self::MODE_IGNORE );
+                       array_unshift( $this->curItem, $elm );
+               }
+       }
+
+       /**
+        * Starting an element when in MODE_INITIAL
+        * This usually happens when we hit an element inside
+        * the outer rdf:Description
+        *
+        * This is generally where most properties start.
+        *
+        * @param string $ns Namespace
+        * @param string $tag Tag name (without namespace prefix)
+        * @param array $attribs Array of attributes
+        * @throws RuntimeException
+        */
+       private function startElementModeInitial( $ns, $tag, $attribs ) {
+               if ( $ns !== self::NS_RDF ) {
+
+                       if ( isset( $this->items[$ns][$tag] ) ) {
+                               if ( isset( $this->items[$ns][$tag]['structPart'] ) ) {
+                                       // If this element is supposed to appear only as
+                                       // a child of a structure, but appears here (not as
+                                       // a child of a struct), then something weird is
+                                       // happening, so ignore this element and its children.
+
+                                       $this->logger->warning( "Encountered <$ns:$tag> outside"
+                                               . " of its expected parent. Ignoring." );
+
+                                       array_unshift( $this->mode, self::MODE_IGNORE );
+                                       array_unshift( $this->curItem, $ns . ' ' . $tag );
+
+                                       return;
+                               }
+                               $mode = $this->items[$ns][$tag]['mode'];
+                               array_unshift( $this->mode, $mode );
+                               array_unshift( $this->curItem, $ns . ' ' . $tag );
+                               if ( $mode === self::MODE_STRUCT ) {
+                                       $this->ancestorStruct = isset( $this->items[$ns][$tag]['map_name'] )
+                                               ? $this->items[$ns][$tag]['map_name'] : $tag;
+                               }
+                               if ( $this->charContent !== false ) {
+                                       // Something weird.
+                                       // Should not happen in valid XMP.
+                                       throw new RuntimeException( 'tag nested in non-whitespace characters.' );
+                               }
+                       } else {
+                               // This element is not on our list of allowed elements so ignore.
+                               $this->logger->debug( __METHOD__ . " Ignoring unrecognized element <$ns:$tag>." );
+                               array_unshift( $this->mode, self::MODE_IGNORE );
+                               array_unshift( $this->curItem, $ns . ' ' . $tag );
+
+                               return;
+                       }
+               }
+               // process attributes
+               $this->doAttribs( $attribs );
+       }
+
+       /**
+        * Hit an opening element when in a Struct (MODE_STRUCT)
+        * This is generally for fields of a compound property.
+        *
+        * Example of a struct (abbreviated; flash has more properties):
+        *
+        * <exif:Flash> <rdf:Description> <exif:Fired>True</exif:Fired>
+        *  <exif:Mode>1</exif:Mode></rdf:Description></exif:Flash>
+        *
+        * or:
+        *
+        * <exif:Flash rdf:parseType='Resource'> <exif:Fired>True</exif:Fired>
+        *  <exif:Mode>1</exif:Mode></exif:Flash>
+        *
+        * @param string $ns Namespace
+        * @param string $tag Tag name (no ns)
+        * @param array $attribs Array of attribs w/ values.
+        * @throws RuntimeException
+        */
+       private function startElementModeStruct( $ns, $tag, $attribs ) {
+               if ( $ns !== self::NS_RDF ) {
+
+                       if ( isset( $this->items[$ns][$tag] ) ) {
+                               if ( isset( $this->items[$ns][$this->ancestorStruct]['children'] )
+                                       && !isset( $this->items[$ns][$this->ancestorStruct]['children'][$tag] )
+                               ) {
+                                       // This assumes that we don't have inter-namespace nesting
+                                       // which we don't in all the properties we're interested in.
+                                       throw new RuntimeException( " <$tag> appeared nested in <" . $this->ancestorStruct
+                                               . "> where it is not allowed." );
+                               }
+                               array_unshift( $this->mode, $this->items[$ns][$tag]['mode'] );
+                               array_unshift( $this->curItem, $ns . ' ' . $tag );
+                               if ( $this->charContent !== false ) {
+                                       // Something weird.
+                                       // Should not happen in valid XMP.
+                                       throw new RuntimeException( "tag <$tag> nested in non-whitespace characters (" .
+                                               $this->charContent . ")." );
+                               }
+                       } else {
+                               array_unshift( $this->mode, self::MODE_IGNORE );
+                               array_unshift( $this->curItem, $elm );
+
+                               return;
+                       }
+               }
+
+               if ( $ns === self::NS_RDF && $tag === 'Description' ) {
+                       $this->doAttribs( $attribs );
+                       array_unshift( $this->mode, self::MODE_STRUCT );
+                       array_unshift( $this->curItem, $this->curItem[0] );
+               }
+       }
+
+       /**
+        * opening element in MODE_LI
+        * process elements of arrays.
+        *
+        * Example:
+        * <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>64</rdf:li>
+        *   </rdf:Seq> </exif:ISOSpeedRatings>
+        * This method is called when we hit the <rdf:li> element.
+        *
+        * @param string $elm Namespace . ' ' . tagname
+        * @param array $attribs Attributes. (needed for BAGSTRUCTS)
+        * @throws RuntimeException If gets a tag other than <rdf:li>
+        */
+       private function startElementModeLi( $elm, $attribs ) {
+               if ( ( $elm ) !== self::NS_RDF . ' li' ) {
+                       throw new RuntimeException( "<rdf:li> expected but got $elm." );
+               }
+
+               if ( !isset( $this->mode[1] ) ) {
+                       // This should never ever ever happen. Checking for it
+                       // to be paranoid.
+                       throw new RuntimeException( 'In mode Li, but no 2xPrevious mode!' );
+               }
+
+               if ( $this->mode[1] === self::MODE_BAGSTRUCT ) {
+                       // This list item contains a compound (STRUCT) value.
+                       array_unshift( $this->mode, self::MODE_STRUCT );
+                       array_unshift( $this->curItem, $elm );
+                       $this->processingArray = true;
+
+                       if ( !isset( $this->curItem[1] ) ) {
+                               // be paranoid.
+                               throw new RuntimeException( 'Can not find parent of BAGSTRUCT.' );
+                       }
+                       list( $curNS, $curTag ) = explode( ' ', $this->curItem[1] );
+                       $this->ancestorStruct = isset( $this->items[$curNS][$curTag]['map_name'] )
+                               ? $this->items[$curNS][$curTag]['map_name'] : $curTag;
+
+                       $this->doAttribs( $attribs );
+               } else {
+                       // Normal BAG or SEQ containing simple values.
+                       array_unshift( $this->mode, self::MODE_SIMPLE );
+                       // need to add curItem[0] on again since one is for the specific item
+                       // and one is for the entire group.
+                       array_unshift( $this->curItem, $this->curItem[0] );
+                       $this->processingArray = true;
+               }
+       }
+
+       /**
+        * Opening element in MODE_LI_LANG.
+        * process elements of language alternatives
+        *
+        * Example:
+        * <dc:title> <rdf:Alt> <rdf:li xml:lang="x-default">My house
+        *  </rdf:li> </rdf:Alt> </dc:title>
+        *
+        * This method is called when we hit the <rdf:li> element.
+        *
+        * @param string $elm Namespace . ' ' . tag
+        * @param array $attribs Array of elements (most importantly xml:lang)
+        * @throws RuntimeException If gets a tag other than <rdf:li> or if no xml:lang
+        */
+       private function startElementModeLiLang( $elm, $attribs ) {
+               if ( $elm !== self::NS_RDF . ' li' ) {
+                       throw new RuntimeException( __METHOD__ . " <rdf:li> expected but got $elm." );
+               }
+               if ( !isset( $attribs[self::NS_XML . ' lang'] )
+                       || !preg_match( '/^[-A-Za-z0-9]{2,}$/D', $attribs[self::NS_XML . ' lang'] )
+               ) {
+                       throw new RuntimeException( __METHOD__
+                               . " <rdf:li> did not contain, or has invalid xml:lang attribute in lang alternative" );
+               }
+
+               // Lang is case-insensitive.
+               $this->itemLang = strtolower( $attribs[self::NS_XML . ' lang'] );
+
+               // need to add curItem[0] on again since one is for the specific item
+               // and one is for the entire group.
+               array_unshift( $this->curItem, $this->curItem[0] );
+               array_unshift( $this->mode, self::MODE_SIMPLE );
+               $this->processingArray = true;
+       }
+
+       /**
+        * Hits an opening element.
+        * Generally just calls a helper based on what MODE we're in.
+        * Also does some initial set up for the wrapper element
+        *
+        * @param XMLParser $parser
+        * @param string $elm Namespace "<space>" element
+        * @param array $attribs Attribute name => value
+        * @throws RuntimeException
+        */
+       function startElement( $parser, $elm, $attribs ) {
+
+               if ( $elm === self::NS_RDF . ' RDF'
+                       || $elm === 'adobe:ns:meta/ xmpmeta'
+                       || $elm === 'adobe:ns:meta/ xapmeta'
+               ) {
+                       /* ignore. */
+                       return;
+               } elseif ( $elm === self::NS_RDF . ' Description' ) {
+                       if ( count( $this->mode ) === 0 ) {
+                               // outer rdf:desc
+                               array_unshift( $this->mode, self::MODE_INITIAL );
+                       }
+               } elseif ( $elm === self::NS_RDF . ' type' ) {
+                       // This doesn't support rdf:type properly.
+                       // In practise I have yet to see a file that
+                       // uses this element, however it is mentioned
+                       // on page 25 of part 1 of the xmp standard.
+                       // Also it seems as if exiv2 and exiftool do not support
+                       // this either (That or I misunderstand the standard)
+                       $this->logger->info( __METHOD__ . ' Encountered <rdf:type> which isn\'t currently supported' );
+               }
+
+               if ( strpos( $elm, ' ' ) === false ) {
+                       // This probably shouldn't happen.
+                       $this->logger->info( __METHOD__ . " Encountered <$elm> which has no namespace. Skipping." );
+
+                       return;
+               }
+
+               list( $ns, $tag ) = explode( ' ', $elm, 2 );
+
+               if ( count( $this->mode ) === 0 ) {
+                       // This should not happen.
+                       throw new RuntimeException( 'Error extracting XMP, '
+                               . "encountered <$elm> with no mode" );
+               }
+
+               switch ( $this->mode[0] ) {
+                       case self::MODE_IGNORE:
+                               $this->startElementModeIgnore( $elm );
+                               break;
+                       case self::MODE_SIMPLE:
+                               $this->startElementModeSimple( $elm, $attribs );
+                               break;
+                       case self::MODE_INITIAL:
+                               $this->startElementModeInitial( $ns, $tag, $attribs );
+                               break;
+                       case self::MODE_STRUCT:
+                               $this->startElementModeStruct( $ns, $tag, $attribs );
+                               break;
+                       case self::MODE_BAG:
+                       case self::MODE_BAGSTRUCT:
+                               $this->startElementModeBag( $elm );
+                               break;
+                       case self::MODE_SEQ:
+                               $this->startElementModeSeq( $elm );
+                               break;
+                       case self::MODE_LANG:
+                               $this->startElementModeLang( $elm );
+                               break;
+                       case self::MODE_LI_LANG:
+                               $this->startElementModeLiLang( $elm, $attribs );
+                               break;
+                       case self::MODE_LI:
+                               $this->startElementModeLi( $elm, $attribs );
+                               break;
+                       case self::MODE_QDESC:
+                               $this->startElementModeQDesc( $elm );
+                               break;
+                       default:
+                               throw new RuntimeException( 'StartElement in unknown mode: ' . $this->mode[0] );
+               }
+       }
+
+       // @codingStandardsIgnoreStart Generic.Files.LineLength
+       /**
+        * Process attributes.
+        * Simple values can be stored as either a tag or attribute
+        *
+        * Often the initial "<rdf:Description>" tag just has all the simple
+        * properties as attributes.
+        *
+        * @par Example:
+        * @code
+        * <rdf:Description rdf:about="" xmlns:exif="http://ns.adobe.com/exif/1.0/" exif:DigitalZoomRatio="0/10">
+        * @endcode
+        *
+        * @param array $attribs Array attribute=>value
+        * @throws RuntimeException
+        */
+       // @codingStandardsIgnoreEnd
+       private function doAttribs( $attribs ) {
+               // first check for rdf:parseType attribute, as that can change
+               // how the attributes are interperted.
+
+               if ( isset( $attribs[self::NS_RDF . ' parseType'] )
+                       && $attribs[self::NS_RDF . ' parseType'] === 'Resource'
+                       && $this->mode[0] === self::MODE_SIMPLE
+               ) {
+                       // this is equivalent to having an inner rdf:Description
+                       $this->mode[0] = self::MODE_QDESC;
+               }
+               foreach ( $attribs as $name => $val ) {
+                       if ( strpos( $name, ' ' ) === false ) {
+                               // This shouldn't happen, but so far some old software forgets namespace
+                               // on rdf:about.
+                               $this->logger->info( __METHOD__ . ' Encountered non-namespaced attribute: '
+                                       . " $name=\"$val\". Skipping. " );
+                               continue;
+                       }
+                       list( $ns, $tag ) = explode( ' ', $name, 2 );
+                       if ( $ns === self::NS_RDF ) {
+                               if ( $tag === 'value' || $tag === 'resource' ) {
+                                       // resource is for url.
+                                       // value attribute is a weird way of just putting the contents.
+                                       $this->char( $this->xmlParser, $val );
+                               }
+                       } elseif ( isset( $this->items[$ns][$tag] ) ) {
+                               if ( $this->mode[0] === self::MODE_SIMPLE ) {
+                                       throw new RuntimeException( __METHOD__
+                                               . " $ns:$tag found as attribute where not allowed" );
+                               }
+                               $this->saveValue( $ns, $tag, $val );
+                       } else {
+                               $this->logger->debug( __METHOD__ . " Ignoring unrecognized element <$ns:$tag>." );
+                       }
+               }
+       }
+
+       /**
+        * Given an extracted value, save it to results array
+        *
+        * note also uses $this->ancestorStruct and
+        * $this->processingArray to determine what name to
+        * save the value under. (in addition to $tag).
+        *
+        * @param string $ns Namespace of tag this is for
+        * @param string $tag Tag name
+        * @param string $val Value to save
+        */
+       private function saveValue( $ns, $tag, $val ) {
+
+               $info =& $this->items[$ns][$tag];
+               $finalName = isset( $info['map_name'] )
+                       ? $info['map_name'] : $tag;
+               if ( isset( $info['validate'] ) ) {
+                       if ( is_array( $info['validate'] ) ) {
+                               $validate = $info['validate'];
+                       } else {
+                               $validator = new XMPValidate( $this->logger );
+                               $validate = [ $validator, $info['validate'] ];
+                       }
+
+                       if ( is_callable( $validate ) ) {
+                               call_user_func_array( $validate, [ $info, &$val, true ] );
+                               // the reasoning behind using &$val instead of using the return value
+                               // is to be consistent between here and validating structures.
+                               if ( is_null( $val ) ) {
+                                       $this->logger->info( __METHOD__ . " <$ns:$tag> failed validation." );
+
+                                       return;
+                               }
+                       } else {
+                               $this->logger->warning( __METHOD__ . " Validation function for $finalName ("
+                                       . $validate[0] . '::' . $validate[1] . '()) is not callable.' );
+                       }
+               }
+
+               if ( $this->ancestorStruct && $this->processingArray ) {
+                       // Aka both an array and a struct. ( self::MODE_BAGSTRUCT )
+                       $this->results['xmp-' . $info['map_group']][$this->ancestorStruct][][$finalName] = $val;
+               } elseif ( $this->ancestorStruct ) {
+                       $this->results['xmp-' . $info['map_group']][$this->ancestorStruct][$finalName] = $val;
+               } elseif ( $this->processingArray ) {
+                       if ( $this->itemLang === false ) {
+                               // normal array
+                               $this->results['xmp-' . $info['map_group']][$finalName][] = $val;
+                       } else {
+                               // lang array.
+                               $this->results['xmp-' . $info['map_group']][$finalName][$this->itemLang] = $val;
+                       }
+               } else {
+                       $this->results['xmp-' . $info['map_group']][$finalName] = $val;
+               }
+       }
+}
diff --git a/includes/libs/xmp/XMPInfo.php b/includes/libs/xmp/XMPInfo.php
new file mode 100644 (file)
index 0000000..052be33
--- /dev/null
@@ -0,0 +1,1168 @@
+<?php
+/**
+ * Definitions for XMPReader class.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Media
+ */
+
+/**
+ * This class is just a container for a big array
+ * used by XMPReader to determine which XMP items to
+ * extract.
+ */
+class XMPInfo {
+       /** Get the items array
+        * @return array XMP item configuration array.
+        */
+       public static function getItems() {
+               return self::$items;
+       }
+
+       /**
+        * XMPInfo::$items keeps a list of all the items
+        * we are interested to extract, as well as
+        * information about the item like what type
+        * it is.
+        *
+        * Format is an array of namespaces,
+        * each containing an array of tags
+        * each tag is an array of information about the
+        * tag, including:
+        *   * map_group - What group (used for precedence during conflicts).
+        *   * mode - What type of item (self::MODE_SIMPLE usually, see above for
+        *     all values).
+        *   * validate - Method to validate input. Could also post-process the
+        *     input. A string value is assumed to be a method of
+        *     XMPValidate. Can also take a array( 'className', 'methodName' ).
+        *   * choices - Array of potential values (format of 'value' => true ).
+        *     Only used with validateClosed.
+        *   * rangeLow and rangeHigh - Alternative to choices for numeric ranges.
+        *     Again for validateClosed only.
+        *   * children - For MODE_STRUCT items, allowed children.
+        *   * structPart - Indicates that this element can only appear as a member
+        *     of a structure.
+        *
+        * Currently this just has a bunch of EXIF values as this class is only half-done.
+        */
+       static private $items = [
+               'http://ns.adobe.com/exif/1.0/' => [
+                       'ApertureValue' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'BrightnessValue' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'CompressedBitsPerPixel' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'DigitalZoomRatio' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'ExposureBiasValue' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'ExposureIndex' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'ExposureTime' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'FlashEnergy' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational',
+                       ],
+                       'FNumber' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'FocalLength' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'FocalPlaneXResolution' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'FocalPlaneYResolution' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'GPSAltitude' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational',
+                       ],
+                       'GPSDestBearing' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'GPSDestDistance' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'GPSDOP' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'GPSImgDirection' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'GPSSpeed' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'GPSTrack' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'MaxApertureValue' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'ShutterSpeedValue' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       'SubjectDistance' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational'
+                       ],
+                       /* Flash */
+                       'Flash' => [
+                               'mode' => XMPReader::MODE_STRUCT,
+                               'children' => [
+                                       'Fired' => true,
+                                       'Function' => true,
+                                       'Mode' => true,
+                                       'RedEyeMode' => true,
+                                       'Return' => true,
+                               ],
+                               'validate' => 'validateFlash',
+                               'map_group' => 'exif',
+                       ],
+                       'Fired' => [
+                               'map_group' => 'exif',
+                               'validate' => 'validateBoolean',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'Function' => [
+                               'map_group' => 'exif',
+                               'validate' => 'validateBoolean',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'Mode' => [
+                               'map_group' => 'exif',
+                               'validate' => 'validateClosed',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'choices' => [ '0' => true, '1' => true,
+                                       '2' => true, '3' => true ],
+                               'structPart' => true,
+                       ],
+                       'Return' => [
+                               'map_group' => 'exif',
+                               'validate' => 'validateClosed',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'choices' => [ '0' => true,
+                                       '2' => true, '3' => true ],
+                               'structPart' => true,
+                       ],
+                       'RedEyeMode' => [
+                               'map_group' => 'exif',
+                               'validate' => 'validateBoolean',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       /* End Flash */
+                       'ISOSpeedRatings' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SEQ,
+                               'validate' => 'validateInteger'
+                       ],
+                       /* end rational things */
+                       'ColorSpace' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '1' => true, '65535' => true ],
+                       ],
+                       'ComponentsConfiguration' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SEQ,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '1' => true, '2' => true, '3' => true, '4' => true,
+                                       '5' => true, '6' => true ]
+                       ],
+                       'Contrast' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '0' => true, '1' => true, '2' => true ]
+                       ],
+                       'CustomRendered' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '0' => true, '1' => true ]
+                       ],
+                       'DateTimeOriginal' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateDate',
+                       ],
+                       'DateTimeDigitized' => [ /* xmp:CreateDate */
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateDate',
+                       ],
+                       /* todo: there might be interesting information in
+                        * exif:DeviceSettingDescription, but need to find an
+                        * example
+                        */
+                       'ExifVersion' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'ExposureMode' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'rangeLow' => 0,
+                               'rangeHigh' => 2,
+                       ],
+                       'ExposureProgram' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'rangeLow' => 0,
+                               'rangeHigh' => 8,
+                       ],
+                       'FileSource' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '3' => true ]
+                       ],
+                       'FlashpixVersion' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'FocalLengthIn35mmFilm' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateInteger',
+                       ],
+                       'FocalPlaneResolutionUnit' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '2' => true, '3' => true ],
+                       ],
+                       'GainControl' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'rangeLow' => 0,
+                               'rangeHigh' => 4,
+                       ],
+                       /* this value is post-processed out later */
+                       'GPSAltitudeRef' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '0' => true, '1' => true ],
+                       ],
+                       'GPSAreaInformation' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'GPSDestBearingRef' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ 'T' => true, 'M' => true ],
+                       ],
+                       'GPSDestDistanceRef' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ 'K' => true, 'M' => true,
+                                       'N' => true ],
+                       ],
+                       'GPSDestLatitude' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateGPS',
+                       ],
+                       'GPSDestLongitude' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateGPS',
+                       ],
+                       'GPSDifferential' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '0' => true, '1' => true ],
+                       ],
+                       'GPSImgDirectionRef' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ 'T' => true, 'M' => true ],
+                       ],
+                       'GPSLatitude' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateGPS',
+                       ],
+                       'GPSLongitude' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateGPS',
+                       ],
+                       'GPSMapDatum' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'GPSMeasureMode' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '2' => true, '3' => true ]
+                       ],
+                       'GPSProcessingMethod' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'GPSSatellites' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'GPSSpeedRef' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ 'K' => true, 'M' => true,
+                                       'N' => true ],
+                       ],
+                       'GPSStatus' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ 'A' => true, 'V' => true ]
+                       ],
+                       'GPSTimeStamp' => [
+                               'map_group' => 'exif',
+                               // Note: in exif, GPSDateStamp does not include
+                               // the time, where here it does.
+                               'map_name' => 'GPSDateStamp',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateDate',
+                       ],
+                       'GPSTrackRef' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ 'T' => true, 'M' => true ]
+                       ],
+                       'GPSVersionID' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'ImageUniqueID' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'LightSource' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               /* can't use a range, as it skips... */
+                               'choices' => [ '0' => true, '1' => true,
+                                       '2' => true, '3' => true, '4' => true,
+                                       '9' => true, '10' => true, '11' => true,
+                                       '12' => true, '13' => true,
+                                       '14' => true, '15' => true,
+                                       '17' => true, '18' => true,
+                                       '19' => true, '20' => true,
+                                       '21' => true, '22' => true,
+                                       '23' => true, '24' => true,
+                                       '255' => true,
+                               ],
+                       ],
+                       'MeteringMode' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'rangeLow' => 0,
+                               'rangeHigh' => 6,
+                               'choices' => [ '255' => true ],
+                       ],
+                       /* Pixel(X|Y)Dimension are rather useless, but for
+                        * completeness since we do it with exif.
+                        */
+                       'PixelXDimension' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateInteger',
+                       ],
+                       'PixelYDimension' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateInteger',
+                       ],
+                       'Saturation' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'rangeLow' => 0,
+                               'rangeHigh' => 2,
+                       ],
+                       'SceneCaptureType' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'rangeLow' => 0,
+                               'rangeHigh' => 3,
+                       ],
+                       'SceneType' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '1' => true ],
+                       ],
+                       // Note, 6 is not valid SensingMethod.
+                       'SensingMethod' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'rangeLow' => 1,
+                               'rangeHigh' => 5,
+                               'choices' => [ '7' => true, 8 => true ],
+                       ],
+                       'Sharpness' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'rangeLow' => 0,
+                               'rangeHigh' => 2,
+                       ],
+                       'SpectralSensitivity' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       // This tag should perhaps be displayed to user better.
+                       'SubjectArea' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SEQ,
+                               'validate' => 'validateInteger',
+                       ],
+                       'SubjectDistanceRange' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'rangeLow' => 0,
+                               'rangeHigh' => 3,
+                       ],
+                       'SubjectLocation' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SEQ,
+                               'validate' => 'validateInteger',
+                       ],
+                       'UserComment' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_LANG,
+                       ],
+                       'WhiteBalance' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '0' => true, '1' => true ]
+                       ],
+               ],
+               'http://ns.adobe.com/tiff/1.0/' => [
+                       'Artist' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'BitsPerSample' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SEQ,
+                               'validate' => 'validateInteger',
+                       ],
+                       'Compression' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '1' => true, '6' => true ],
+                       ],
+                       /* this prop should not be used in XMP. dc:rights is the correct prop */
+                       'Copyright' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_LANG,
+                       ],
+                       'DateTime' => [ /* proper prop is xmp:ModifyDate */
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateDate',
+                       ],
+                       'ImageDescription' => [ /* proper one is dc:description */
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_LANG,
+                       ],
+                       'ImageLength' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateInteger',
+                       ],
+                       'ImageWidth' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateInteger',
+                       ],
+                       'Make' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'Model' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       /**** Do not extract this property
+                        * It interferes with auto exif rotation.
+                        * 'Orientation'       => array(
+                        *    'map_group' => 'exif',
+                        *    'mode'      => XMPReader::MODE_SIMPLE,
+                        *    'validate'  => 'validateClosed',
+                        *    'choices'   => array( '1' => true, '2' => true, '3' => true, '4' => true, 5 => true,
+                        *            '6' => true, '7' => true, '8' => true ),
+                        *),
+                        ******/
+                       'PhotometricInterpretation' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '2' => true, '6' => true ],
+                       ],
+                       'PlanerConfiguration' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '1' => true, '2' => true ],
+                       ],
+                       'PrimaryChromaticities' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SEQ,
+                               'validate' => 'validateRational',
+                       ],
+                       'ReferenceBlackWhite' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SEQ,
+                               'validate' => 'validateRational',
+                       ],
+                       'ResolutionUnit' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '2' => true, '3' => true ],
+                       ],
+                       'SamplesPerPixel' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateInteger',
+                       ],
+                       'Software' => [ /* see xmp:CreatorTool */
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       /* ignore TransferFunction */
+                       'WhitePoint' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SEQ,
+                               'validate' => 'validateRational',
+                       ],
+                       'XResolution' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational',
+                       ],
+                       'YResolution' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRational',
+                       ],
+                       'YCbCrCoefficients' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SEQ,
+                               'validate' => 'validateRational',
+                       ],
+                       'YCbCrPositioning' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateClosed',
+                               'choices' => [ '1' => true, '2' => true ],
+                       ],
+                       /********
+                        * Disable extracting this property (bug 31944)
+                        * Several files have a string instead of a Seq
+                        * for this property. XMPReader doesn't handle
+                        * mismatched types very gracefully (it marks
+                        * the entire file as invalid, instead of just
+                        * the relavent prop). Since this prop
+                        * doesn't communicate all that useful information
+                        * just disable this prop for now, until such
+                        * XMPReader is more graceful (bug 32172)
+                        * 'YCbCrSubSampling'  => array(
+                        *    'map_group' => 'exif',
+                        *    'mode'      => XMPReader::MODE_SEQ,
+                        *    'validate'  => 'validateClosed',
+                        *    'choices'   => array( '1' => true, '2' => true ),
+                        * ),
+                        */
+               ],
+               'http://ns.adobe.com/exif/1.0/aux/' => [
+                       'Lens' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'SerialNumber' => [
+                               'map_group' => 'exif',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'OwnerName' => [
+                               'map_group' => 'exif',
+                               'map_name' => 'CameraOwnerName',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+               ],
+               'http://purl.org/dc/elements/1.1/' => [
+                       'title' => [
+                               'map_group' => 'general',
+                               'map_name' => 'ObjectName',
+                               'mode' => XMPReader::MODE_LANG
+                       ],
+                       'description' => [
+                               'map_group' => 'general',
+                               'map_name' => 'ImageDescription',
+                               'mode' => XMPReader::MODE_LANG
+                       ],
+                       'contributor' => [
+                               'map_group' => 'general',
+                               'map_name' => 'dc-contributor',
+                               'mode' => XMPReader::MODE_BAG
+                       ],
+                       'coverage' => [
+                               'map_group' => 'general',
+                               'map_name' => 'dc-coverage',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'creator' => [
+                               'map_group' => 'general',
+                               'map_name' => 'Artist', // map with exif Artist, iptc byline (2:80)
+                               'mode' => XMPReader::MODE_SEQ,
+                       ],
+                       'date' => [
+                               'map_group' => 'general',
+                               // Note, not mapped with other date properties, as this type of date is
+                               // non-specific: "A point or period of time associated with an event in
+                               //  the lifecycle of the resource"
+                               'map_name' => 'dc-date',
+                               'mode' => XMPReader::MODE_SEQ,
+                               'validate' => 'validateDate',
+                       ],
+                       /* Do not extract dc:format, as we've got better ways to determine MIME type */
+                       'identifier' => [
+                               'map_group' => 'deprecated',
+                               'map_name' => 'Identifier',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'language' => [
+                               'map_group' => 'general',
+                               'map_name' => 'LanguageCode', /* mapped with iptc 2:135 */
+                               'mode' => XMPReader::MODE_BAG,
+                               'validate' => 'validateLangCode',
+                       ],
+                       'publisher' => [
+                               'map_group' => 'general',
+                               'map_name' => 'dc-publisher',
+                               'mode' => XMPReader::MODE_BAG,
+                       ],
+                       // for related images/resources
+                       'relation' => [
+                               'map_group' => 'general',
+                               'map_name' => 'dc-relation',
+                               'mode' => XMPReader::MODE_BAG,
+                       ],
+                       'rights' => [
+                               'map_group' => 'general',
+                               'map_name' => 'Copyright',
+                               'mode' => XMPReader::MODE_LANG,
+                       ],
+                       // Note: source is not mapped with iptc source, since iptc
+                       // source describes the source of the image in terms of a person
+                       // who provided the image, where this is to describe an image that the
+                       // current one is based on.
+                       'source' => [
+                               'map_group' => 'general',
+                               'map_name' => 'dc-source',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'subject' => [
+                               'map_group' => 'general',
+                               'map_name' => 'Keywords', /* maps to iptc 2:25 */
+                               'mode' => XMPReader::MODE_BAG,
+                       ],
+                       'type' => [
+                               'map_group' => 'general',
+                               'map_name' => 'dc-type',
+                               'mode' => XMPReader::MODE_BAG,
+                       ],
+               ],
+               'http://ns.adobe.com/xap/1.0/' => [
+                       'CreateDate' => [
+                               'map_group' => 'general',
+                               'map_name' => 'DateTimeDigitized',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateDate',
+                       ],
+                       'CreatorTool' => [
+                               'map_group' => 'general',
+                               'map_name' => 'Software',
+                               'mode' => XMPReader::MODE_SIMPLE
+                       ],
+                       'Identifier' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_BAG,
+                       ],
+                       'Label' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'ModifyDate' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'DateTime',
+                               'validate' => 'validateDate',
+                       ],
+                       'MetadataDate' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               // map_name to be consistent with other date names.
+                               'map_name' => 'DateTimeMetadata',
+                               'validate' => 'validateDate',
+                       ],
+                       'Nickname' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'Rating' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateRating',
+                       ],
+               ],
+               'http://ns.adobe.com/xap/1.0/rights/' => [
+                       'Certificate' => [
+                               'map_group' => 'general',
+                               'map_name' => 'RightsCertificate',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'Marked' => [
+                               'map_group' => 'general',
+                               'map_name' => 'Copyrighted',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateBoolean',
+                       ],
+                       'Owner' => [
+                               'map_group' => 'general',
+                               'map_name' => 'CopyrightOwner',
+                               'mode' => XMPReader::MODE_BAG,
+                       ],
+                       // this seems similar to dc:rights.
+                       'UsageTerms' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_LANG,
+                       ],
+                       'WebStatement' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+               ],
+               // XMP media management.
+               'http://ns.adobe.com/xap/1.0/mm/' => [
+                       // if we extract the exif UniqueImageID, might
+                       // as well do this too.
+                       'OriginalDocumentID' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       // It might also be useful to do xmpMM:LastURL
+                       // and xmpMM:DerivedFrom as you can potentially,
+                       // get the url of this document/source for this
+                       // document. However whats more likely is you'd
+                       // get a file:// url for the path of the doc,
+                       // which is somewhat of a privacy issue.
+               ],
+               'http://creativecommons.org/ns#' => [
+                       'license' => [
+                               'map_name' => 'LicenseUrl',
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'morePermissions' => [
+                               'map_name' => 'MorePermissionsUrl',
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'attributionURL' => [
+                               'map_group' => 'general',
+                               'map_name' => 'AttributionUrl',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'attributionName' => [
+                               'map_group' => 'general',
+                               'map_name' => 'PreferredAttributionName',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+               ],
+               // Note, this property affects how jpeg metadata is extracted.
+               'http://ns.adobe.com/xmp/note/' => [
+                       'HasExtendedXMP' => [
+                               'map_group' => 'special',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+               ],
+               /* Note, in iptc schemas, the legacy properties are denoted
+                * as deprecated, since other properties should used instead,
+                * and properties marked as deprecated in the standard are
+                * are marked as general here as they don't have replacements
+                */
+               'http://ns.adobe.com/photoshop/1.0/' => [
+                       'City' => [
+                               'map_group' => 'deprecated',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'CityDest',
+                       ],
+                       'Country' => [
+                               'map_group' => 'deprecated',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'CountryDest',
+                       ],
+                       'State' => [
+                               'map_group' => 'deprecated',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'ProvinceOrStateDest',
+                       ],
+                       'DateCreated' => [
+                               'map_group' => 'deprecated',
+                               // marking as deprecated as the xmp prop preferred
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'DateTimeOriginal',
+                               'validate' => 'validateDate',
+                               // note this prop is an XMP, not IPTC date
+                       ],
+                       'CaptionWriter' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'Writer',
+                       ],
+                       'Instructions' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'SpecialInstructions',
+                       ],
+                       'TransmissionReference' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'OriginalTransmissionRef',
+                       ],
+                       'AuthorsPosition' => [
+                               /* This corresponds with 2:85
+                                * By-line Title, which needs to be
+                                * handled weirdly to correspond
+                                * with iptc/exif. */
+                               'map_group' => 'special',
+                               'mode' => XMPReader::MODE_SIMPLE
+                       ],
+                       'Credit' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'Source' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'Urgency' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'Category' => [
+                               // Note, this prop is deprecated, but in general
+                               // group since it doesn't have a replacement.
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'iimCategory',
+                       ],
+                       'SupplementalCategories' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_BAG,
+                               'map_name' => 'iimSupplementalCategory',
+                       ],
+                       'Headline' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE
+                       ],
+               ],
+               'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/' => [
+                       'CountryCode' => [
+                               'map_group' => 'deprecated',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'CountryCodeDest',
+                       ],
+                       'IntellectualGenre' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       // Note, this is a six digit code.
+                       // See: http://cv.iptc.org/newscodes/scene/
+                       // Since these aren't really all that common,
+                       // we just show the number.
+                       'Scene' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_BAG,
+                               'validate' => 'validateInteger',
+                               'map_name' => 'SceneCode',
+                       ],
+                       /* Note: SubjectCode should be an 8 ascii digits.
+                        * it is not really an integer (has leading 0's,
+                        * cannot have a +/- sign), but validateInteger
+                        * will let it through.
+                        */
+                       'SubjectCode' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_BAG,
+                               'map_name' => 'SubjectNewsCode',
+                               'validate' => 'validateInteger'
+                       ],
+                       'Location' => [
+                               'map_group' => 'deprecated',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'map_name' => 'SublocationDest',
+                       ],
+                       'CreatorContactInfo' => [
+                               /* Note this maps to 2:118 in iim
+                                * (Contact) field. However those field
+                                * types are slightly different - 2:118
+                                * is free form text field, where this
+                                * is more structured.
+                                */
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_STRUCT,
+                               'map_name' => 'Contact',
+                               'children' => [
+                                       'CiAdrExtadr' => true,
+                                       'CiAdrCity' => true,
+                                       'CiAdrCtry' => true,
+                                       'CiEmailWork' => true,
+                                       'CiTelWork' => true,
+                                       'CiAdrPcode' => true,
+                                       'CiAdrRegion' => true,
+                                       'CiUrlWork' => true,
+                               ],
+                       ],
+                       'CiAdrExtadr' => [ /* address */
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'CiAdrCity' => [ /* city */
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'CiAdrCtry' => [ /* country */
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'CiEmailWork' => [ /* email (possibly separated by ',') */
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'CiTelWork' => [ /* telephone */
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'CiAdrPcode' => [ /* postal code */
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'CiAdrRegion' => [ /* province/state */
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'CiUrlWork' => [ /* url. Multiple may be separated by comma. */
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       /* End contact info struct properties */
+               ],
+               'http://iptc.org/std/Iptc4xmpExt/2008-02-29/' => [
+                       'Event' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                       ],
+                       'OrganisationInImageName' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_BAG,
+                               'map_name' => 'OrganisationInImage'
+                       ],
+                       'PersonInImage' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_BAG,
+                       ],
+                       'MaxAvailHeight' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateInteger',
+                               'map_name' => 'OriginalImageHeight',
+                       ],
+                       'MaxAvailWidth' => [
+                               'map_group' => 'general',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'validate' => 'validateInteger',
+                               'map_name' => 'OriginalImageWidth',
+                       ],
+                       // LocationShown and LocationCreated are handled
+                       // specially because they are hierarchical, but we
+                       // also want to merge with the old non-hierarchical.
+                       'LocationShown' => [
+                               'map_group' => 'special',
+                               'mode' => XMPReader::MODE_BAGSTRUCT,
+                               'children' => [
+                                       'WorldRegion' => true,
+                                       'CountryCode' => true, /* iso code */
+                                       'CountryName' => true,
+                                       'ProvinceState' => true,
+                                       'City' => true,
+                                       'Sublocation' => true,
+                               ],
+                       ],
+                       'LocationCreated' => [
+                               'map_group' => 'special',
+                               'mode' => XMPReader::MODE_BAGSTRUCT,
+                               'children' => [
+                                       'WorldRegion' => true,
+                                       'CountryCode' => true, /* iso code */
+                                       'CountryName' => true,
+                                       'ProvinceState' => true,
+                                       'City' => true,
+                                       'Sublocation' => true,
+                               ],
+                       ],
+                       'WorldRegion' => [
+                               'map_group' => 'special',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'CountryCode' => [
+                               'map_group' => 'special',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'CountryName' => [
+                               'map_group' => 'special',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                               'map_name' => 'Country',
+                       ],
+                       'ProvinceState' => [
+                               'map_group' => 'special',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                               'map_name' => 'ProvinceOrState',
+                       ],
+                       'City' => [
+                               'map_group' => 'special',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+                       'Sublocation' => [
+                               'map_group' => 'special',
+                               'mode' => XMPReader::MODE_SIMPLE,
+                               'structPart' => true,
+                       ],
+
+                       /* Other props that might be interesting but
+                        * Not currently extracted:
+                        * ArtworkOrObject, (info about objects in picture)
+                        * DigitalSourceType
+                        * RegistryId
+                        */
+               ],
+
+               /* Plus props we might want to consider:
+                * (Note: some of these have unclear/incomplete definitions
+                * from the iptc4xmp standard).
+                * ImageSupplier (kind of like iptc source field)
+                * ImageSupplierId (id code for image from supplier)
+                * CopyrightOwner
+                * ImageCreator
+                * Licensor
+                * Various model release fields
+                * Property release fields.
+                */
+       ];
+}
diff --git a/includes/libs/xmp/XMPValidate.php b/includes/libs/xmp/XMPValidate.php
new file mode 100644 (file)
index 0000000..31eaa3b
--- /dev/null
@@ -0,0 +1,400 @@
+<?php
+/**
+ * Methods for validating XMP properties.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Media
+ */
+
+use Psr\Log\LoggerInterface;
+use Psr\Log\LoggerAwareInterface;
+
+/**
+ * This contains some static methods for
+ * validating XMP properties. See XMPInfo and XMPReader classes.
+ *
+ * Each of these functions take the same parameters
+ * * an info array which is a subset of the XMPInfo::items array
+ * * A value (passed as reference) to validate. This can be either a
+ *    simple value or an array
+ * * A boolean to determine if this is validating a simple or complex values
+ *
+ * It should be noted that when an array is being validated, typically the validation
+ * function is called once for each value, and then once at the end for the entire array.
+ *
+ * These validation functions can also be used to modify the data. See the gps and flash one's
+ * for example.
+ *
+ * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart1.pdf starting at pg 28
+ * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart2.pdf starting at pg 11
+ */
+class XMPValidate implements LoggerAwareInterface {
+
+       /**
+        * @var LoggerInterface
+        */
+       private $logger;
+
+       public function __construct( LoggerInterface $logger ) {
+               $this->setLogger( $logger );
+       }
+
+       public function setLogger( LoggerInterface $logger ) {
+               $this->logger = $logger;
+       }
+       /**
+        * Function to validate boolean properties ( True or False )
+        *
+        * @param array $info Information about current property
+        * @param mixed &$val Current value to validate
+        * @param bool $standalone If this is a simple property or array
+        */
+       public function validateBoolean( $info, &$val, $standalone ) {
+               if ( !$standalone ) {
+                       // this only validates standalone properties, not arrays, etc
+                       return;
+               }
+               if ( $val !== 'True' && $val !== 'False' ) {
+                       $this->logger->info( __METHOD__ . " Expected True or False but got $val" );
+                       $val = null;
+               }
+       }
+
+       /**
+        * function to validate rational properties ( 12/10 )
+        *
+        * @param array $info Information about current property
+        * @param mixed &$val Current value to validate
+        * @param bool $standalone If this is a simple property or array
+        */
+       public function validateRational( $info, &$val, $standalone ) {
+               if ( !$standalone ) {
+                       // this only validates standalone properties, not arrays, etc
+                       return;
+               }
+               if ( !preg_match( '/^(?:-?\d+)\/(?:\d+[1-9]|[1-9]\d*)$/D', $val ) ) {
+                       $this->logger->info( __METHOD__ . " Expected rational but got $val" );
+                       $val = null;
+               }
+       }
+
+       /**
+        * function to validate rating properties -1, 0-5
+        *
+        * if its outside of range put it into range.
+        *
+        * @see MWG spec
+        * @param array $info Information about current property
+        * @param mixed &$val Current value to validate
+        * @param bool $standalone If this is a simple property or array
+        */
+       public function validateRating( $info, &$val, $standalone ) {
+               if ( !$standalone ) {
+                       // this only validates standalone properties, not arrays, etc
+                       return;
+               }
+               if ( !preg_match( '/^[-+]?\d*(?:\.?\d*)$/D', $val )
+                       || !is_numeric( $val )
+               ) {
+                       $this->logger->info( __METHOD__ . " Expected rating but got $val" );
+                       $val = null;
+
+                       return;
+               } else {
+                       $nVal = (float)$val;
+                       if ( $nVal < 0 ) {
+                               // We do < 0 here instead of < -1 here, since
+                               // the values between 0 and -1 are also illegal
+                               // as -1 is meant as a special reject rating.
+                               $this->logger->info( __METHOD__ . " Rating too low, setting to -1 (Rejected)" );
+                               $val = '-1';
+
+                               return;
+                       }
+                       if ( $nVal > 5 ) {
+                               $this->logger->info( __METHOD__ . " Rating too high, setting to 5" );
+                               $val = '5';
+
+                               return;
+                       }
+               }
+       }
+
+       /**
+        * function to validate integers
+        *
+        * @param array $info Information about current property
+        * @param mixed &$val Current value to validate
+        * @param bool $standalone If this is a simple property or array
+        */
+       public function validateInteger( $info, &$val, $standalone ) {
+               if ( !$standalone ) {
+                       // this only validates standalone properties, not arrays, etc
+                       return;
+               }
+               if ( !preg_match( '/^[-+]?\d+$/D', $val ) ) {
+                       $this->logger->info( __METHOD__ . " Expected integer but got $val" );
+                       $val = null;
+               }
+       }
+
+       /**
+        * function to validate properties with a fixed number of allowed
+        * choices. (closed choice)
+        *
+        * @param array $info Information about current property
+        * @param mixed &$val Current value to validate
+        * @param bool $standalone If this is a simple property or array
+        */
+       public function validateClosed( $info, &$val, $standalone ) {
+               if ( !$standalone ) {
+                       // this only validates standalone properties, not arrays, etc
+                       return;
+               }
+
+               // check if its in a numeric range
+               $inRange = false;
+               if ( isset( $info['rangeLow'] )
+                       && isset( $info['rangeHigh'] )
+                       && is_numeric( $val )
+                       && ( intval( $val ) <= $info['rangeHigh'] )
+                       && ( intval( $val ) >= $info['rangeLow'] )
+               ) {
+                       $inRange = true;
+               }
+
+               if ( !isset( $info['choices'][$val] ) && !$inRange ) {
+                       $this->logger->info( __METHOD__ . " Expected closed choice, but got $val" );
+                       $val = null;
+               }
+       }
+
+       /**
+        * function to validate and modify flash structure
+        *
+        * @param array $info Information about current property
+        * @param mixed &$val Current value to validate
+        * @param bool $standalone If this is a simple property or array
+        */
+       public function validateFlash( $info, &$val, $standalone ) {
+               if ( $standalone ) {
+                       // this only validates flash structs, not individual properties
+                       return;
+               }
+               if ( !( isset( $val['Fired'] )
+                       && isset( $val['Function'] )
+                       && isset( $val['Mode'] )
+                       && isset( $val['RedEyeMode'] )
+                       && isset( $val['Return'] )
+               ) ) {
+                       $this->logger->info( __METHOD__ . " Flash structure did not have all the required components" );
+                       $val = null;
+               } else {
+                       $val = ( "\0" | ( $val['Fired'] === 'True' )
+                               | ( intval( $val['Return'] ) << 1 )
+                               | ( intval( $val['Mode'] ) << 3 )
+                               | ( ( $val['Function'] === 'True' ) << 5 )
+                               | ( ( $val['RedEyeMode'] === 'True' ) << 6 ) );
+               }
+       }
+
+       /**
+        * function to validate LangCode properties ( en-GB, etc )
+        *
+        * This is just a naive check to make sure it somewhat looks like a lang code.
+        *
+        * @see BCP 47
+        * @see https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/
+        *      XMP%20SDK%20Release%20cc-2014-12/XMPSpecificationPart1.pdf page 22 (section 8.2.2.4)
+        *
+        * @param array $info Information about current property
+        * @param mixed &$val Current value to validate
+        * @param bool $standalone If this is a simple property or array
+        */
+       public function validateLangCode( $info, &$val, $standalone ) {
+               if ( !$standalone ) {
+                       // this only validates standalone properties, not arrays, etc
+                       return;
+               }
+               if ( !preg_match( '/^[-A-Za-z0-9]{2,}$/D', $val ) ) {
+                       // this is a rather naive check.
+                       $this->logger->info( __METHOD__ . " Expected Lang code but got $val" );
+                       $val = null;
+               }
+       }
+
+       /**
+        * function to validate date properties, and convert to (partial) Exif format.
+        *
+        * Dates can be one of the following formats:
+        * YYYY
+        * YYYY-MM
+        * YYYY-MM-DD
+        * YYYY-MM-DDThh:mmTZD
+        * YYYY-MM-DDThh:mm:ssTZD
+        * YYYY-MM-DDThh:mm:ss.sTZD
+        *
+        * @param array $info Information about current property
+        * @param mixed &$val Current value to validate. Converts to TS_EXIF as a side-effect.
+        *    in cases where there's only a partial date, it will give things like
+        *    2011:04.
+        * @param bool $standalone If this is a simple property or array
+        */
+       public function validateDate( $info, &$val, $standalone ) {
+               if ( !$standalone ) {
+                       // this only validates standalone properties, not arrays, etc
+                       return;
+               }
+               $res = [];
+               // @codingStandardsIgnoreStart Long line that cannot be broken
+               if ( !preg_match(
+                       /* ahh! scary regex... */
+                       '/^([0-3]\d{3})(?:-([01]\d)(?:-([0-3]\d)(?:T([0-2]\d):([0-6]\d)(?::([0-6]\d)(?:\.\d+)?)?([-+]\d{2}:\d{2}|Z)?)?)?)?$/D',
+                       $val, $res )
+               ) {
+                       // @codingStandardsIgnoreEnd
+
+                       $this->logger->info( __METHOD__ . " Expected date but got $val" );
+                       $val = null;
+               } else {
+                       /*
+                        * $res is formatted as follows:
+                        * 0 -> full date.
+                        * 1 -> year, 2-> month, 3-> day, 4-> hour, 5-> minute, 6->second
+                        * 7-> Timezone specifier (Z or something like +12:30 )
+                        * many parts are optional, some aren't. For example if you specify
+                        * minute, you must specify hour, day, month, and year but not second or TZ.
+                        */
+
+                       /*
+                        * First of all, if year = 0000, Something is wrongish,
+                        * so don't extract. This seems to happen when
+                        * some programs convert between metadata formats.
+                        */
+                       if ( $res[1] === '0000' ) {
+                               $this->logger->info( __METHOD__ . " Invalid date (year 0): $val" );
+                               $val = null;
+
+                               return;
+                       }
+
+                       if ( !isset( $res[4] ) ) { // hour
+                               // just have the year month day (if that)
+                               $val = $res[1];
+                               if ( isset( $res[2] ) ) {
+                                       $val .= ':' . $res[2];
+                               }
+                               if ( isset( $res[3] ) ) {
+                                       $val .= ':' . $res[3];
+                               }
+
+                               return;
+                       }
+
+                       if ( !isset( $res[7] ) || $res[7] === 'Z' ) {
+                               // if hour is set, then minute must also be or regex above will fail.
+                               $val = $res[1] . ':' . $res[2] . ':' . $res[3]
+                                       . ' ' . $res[4] . ':' . $res[5];
+                               if ( isset( $res[6] ) && $res[6] !== '' ) {
+                                       $val .= ':' . $res[6];
+                               }
+
+                               return;
+                       }
+
+                       // Extra check for empty string necessary due to TZ but no second case.
+                       $stripSeconds = false;
+                       if ( !isset( $res[6] ) || $res[6] === '' ) {
+                               $res[6] = '00';
+                               $stripSeconds = true;
+                       }
+
+                       // Do timezone processing. We've already done the case that tz = Z.
+
+                       // We know that if we got to this step, year, month day hour and min must be set
+                       // by virtue of regex not failing.
+
+                       $unix = ConvertibleTimestamp::convert( TS_UNIX,
+                               $res[1] . $res[2] . $res[3] . $res[4] . $res[5] . $res[6]
+                       );
+                       $offset = intval( substr( $res[7], 1, 2 ) ) * 60 * 60;
+                       $offset += intval( substr( $res[7], 4, 2 ) ) * 60;
+                       if ( substr( $res[7], 0, 1 ) === '-' ) {
+                               $offset = -$offset;
+                       }
+                       $val = ConvertibleTimestamp::convert( TS_EXIF, $unix + $offset );
+
+                       if ( $stripSeconds ) {
+                               // If seconds weren't specified, remove the trailing ':00'.
+                               $val = substr( $val, 0, -3 );
+                       }
+               }
+       }
+
+       /** function to validate, and more importantly
+        * translate the XMP DMS form of gps coords to
+        * the decimal form we use.
+        *
+        * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart2.pdf
+        *        section 1.2.7.4 on page 23
+        *
+        * @param array $info Unused (info about prop)
+        * @param string &$val GPS string in either DDD,MM,SSk or
+        *   or DDD,MM.mmk form
+        * @param bool $standalone If its a simple prop (should always be true)
+        */
+       public function validateGPS( $info, &$val, $standalone ) {
+               if ( !$standalone ) {
+                       return;
+               }
+
+               $m = [];
+               if ( preg_match(
+                       '/(\d{1,3}),(\d{1,2}),(\d{1,2})([NWSE])/D',
+                       $val, $m )
+               ) {
+                       $coord = intval( $m[1] );
+                       $coord += intval( $m[2] ) * ( 1 / 60 );
+                       $coord += intval( $m[3] ) * ( 1 / 3600 );
+                       if ( $m[4] === 'S' || $m[4] === 'W' ) {
+                               $coord = -$coord;
+                       }
+                       $val = $coord;
+
+                       return;
+               } elseif ( preg_match(
+                       '/(\d{1,3}),(\d{1,2}(?:.\d*)?)([NWSE])/D',
+                       $val, $m )
+               ) {
+                       $coord = intval( $m[1] );
+                       $coord += floatval( $m[2] ) * ( 1 / 60 );
+                       if ( $m[3] === 'S' || $m[3] === 'W' ) {
+                               $coord = -$coord;
+                       }
+                       $val = $coord;
+
+                       return;
+               } else {
+                       $this->logger->info( __METHOD__
+                               . " Expected GPSCoordinate, but got $val." );
+                       $val = null;
+
+                       return;
+               }
+       }
+}
index 7746d99..21864ee 100644 (file)
@@ -714,6 +714,12 @@ class ManualLogEntry extends LogEntryBase {
                                        $rc = $this->getRecentChange( $newId );
 
                                        if ( $to === 'rc' || $to === 'rcandudp' ) {
+                                               // save RC, passing tags so they are applied there
+                                               $tags = $this->getTags();
+                                               if ( is_null( $tags ) ) {
+                                                       $tags = [];
+                                               }
+                                               $rc->addTags( $tags );
                                                $rc->save( 'pleasedontudp' );
                                        }
 
@@ -727,14 +733,6 @@ class ManualLogEntry extends LogEntryBase {
                                        ) {
                                                PatrolLog::record( $rc, true, $this->getPerformer() );
                                        }
-
-                                       // Add change tags to the log entry and (if applicable) the associated revision
-                                       $tags = $this->getTags();
-                                       if ( !is_null( $tags ) ) {
-                                               $rcId = $rc->getAttribute( 'rc_id' );
-                                               $revId = $this->getAssociatedRevId(); // Use null if $revId is 0
-                                               ChangeTags::addTags( $tags, $rcId, $revId > 0 ? $revId : null, $newId );
-                                       }
                                }
                        },
                        DeferredUpdates::POSTSEND,
index f29c9e4..0cf584b 100644 (file)
@@ -310,7 +310,7 @@ class LogEventsList extends ContextSource {
                        return '';
                }
                $html = '';
-               $html .= xml::label( wfMessage( 'log-action-filter-' . $types[0] )->text(),
+               $html .= Xml::label( wfMessage( 'log-action-filter-' . $types[0] )->text(),
                        'action-filter-' .$types[0] ) . "\n";
                $select = new XmlSelect( 'subtype' );
                $select->addOption( wfMessage( 'log-action-filter-all' )->text(), '' );
@@ -319,7 +319,7 @@ class LogEventsList extends ContextSource {
                        $select->addOption( wfMessage( $msgKey )->text(), $value );
                }
                $select->setDefault( $action );
-               $html .= $select->getHtml();
+               $html .= $select->getHTML();
                return $html;
        }
 
index 4b9b268..0229ac1 100644 (file)
@@ -51,7 +51,7 @@ class BmpHandler extends BitmapHandler {
        /**
         * Get width and height from the bmp header.
         *
-        * @param File $image
+        * @param File|FSFile $image
         * @param string $filename
         * @return array
         */
index ccd345c..c86eabd 100644 (file)
@@ -276,7 +276,7 @@ class BitmapHandler extends TransformationalImageHandler {
         */
        protected function transformImageMagickExt( $image, $params ) {
                global $wgSharpenReductionThreshold, $wgSharpenParameter, $wgMaxAnimatedGifArea,
-                       $wgMaxInterlacingAreas, $wgJpegPixelFormat;
+                       $wgJpegPixelFormat;
 
                try {
                        $im = new Imagick();
index 9add138..18f75ec 100644 (file)
@@ -235,7 +235,7 @@ class DjVuHandler extends ImageHandler {
        /**
         * Cache an instance of DjVuImage in an Image object, return that instance
         *
-        * @param File $image
+        * @param File|FSFile $image
         * @param string $path
         * @return DjVuImage
         */
@@ -335,11 +335,6 @@ class DjVuHandler extends ImageHandler {
                }
        }
 
-       /**
-        * @param File $image
-        * @param string $path
-        * @return bool|array False on failure
-        */
        function getImageSize( $image, $path ) {
                return $this->getDjVuImage( $image, $path )->getImageSize();
        }
index 732be3d..7aeefa0 100644 (file)
@@ -165,7 +165,7 @@ class ExifBitmapHandler extends BitmapHandler {
         * Wrapper for base classes ImageHandler::getImageSize() that checks for
         * rotation reported from metadata and swaps the sizes to match.
         *
-        * @param File $image
+        * @param File|FSFile $image
         * @param string $path
         * @return array
         */
index 81722c6..67c957a 100644 (file)
@@ -82,9 +82,10 @@ class JpegMetadataExtractor {
                                // this is just a sanity check
                                throw new MWException( 'Too many jpeg segments. Aborting' );
                        }
-                       if ( $buffer !== "\xFF" ) {
-                               throw new MWException( "Error reading jpeg file marker. " .
-                                       "Expected 0xFF but got " . bin2hex( $buffer ) );
+                       while ( $buffer !== "\xFF" ) {
+                               // In theory JPEG files are not allowed to contain anything between the sections,
+                               // but in practice they sometimes do. It's customary to ignore the garbage data.
+                               $buffer = fread( $fh, 1 );
                        }
 
                        $buffer = fread( $fh, 1 );
@@ -155,7 +156,7 @@ class JpegMetadataExtractor {
                        } else {
                                // segment we don't care about, so skip
                                $size = wfUnpack( "nint", fread( $fh, 2 ), 2 );
-                               if ( $size['int'] <= 2 ) {
+                               if ( $size['int'] < 2 ) {
                                        throw new MWException( "invalid marker size in jpeg" );
                                }
                                fseek( $fh, $size['int'] - 2, SEEK_CUR );
@@ -173,9 +174,13 @@ class JpegMetadataExtractor {
         */
        private static function jpegExtractMarker( &$fh ) {
                $size = wfUnpack( "nint", fread( $fh, 2 ), 2 );
-               if ( $size['int'] <= 2 ) {
+               if ( $size['int'] < 2 ) {
                        throw new MWException( "invalid marker size in jpeg" );
                }
+               if ( $size['int'] === 2 ) {
+                       // fread( ..., 0 ) generates a warning
+                       return '';
+               }
                $segment = fread( $fh, $size['int'] - 2 );
                if ( strlen( $segment ) !== $size['int'] - 2 ) {
                        throw new MWException( "Segment shorter than expected" );
index 70a43f2..4bc36ba 100644 (file)
@@ -100,21 +100,22 @@ abstract class MediaHandler {
         * @note If this is a multipage file, return the width and height of the
         *  first page.
         *
-        * @param File $image The image object, or false if there isn't one
+        * @param File|FSFile $image The image object, or false if there isn't one.
+        *   Warning, FSFile::getPropsFromPath might pass an FSFile instead of File (!)
         * @param string $path The filename
-        * @return array Follow the format of PHP getimagesize() internal function.
+        * @return array|bool Follow the format of PHP getimagesize() internal function.
         *   See http://www.php.net/getimagesize. MediaWiki will only ever use the
         *   first two array keys (the width and height), and the 'bits' associative
         *   key. All other array keys are ignored. Returning a 'bits' key is optional
-        *   as not all formats have a notion of "bitdepth".
+        *   as not all formats have a notion of "bitdepth". Returns false on failure.
         */
        abstract function getImageSize( $image, $path );
 
        /**
         * Get handler-specific metadata which will be saved in the img_metadata field.
         *
-        * @param File $image The image object, or false if there isn't one.
-        *   Warning, FSFile::getPropsFromPath might pass an (object)array() instead (!)
+        * @param File|FSFile $image The image object, or false if there isn't one.
+        *   Warning, FSFile::getPropsFromPath might pass an FSFile instead of File (!)
         * @param string $path The filename
         * @return string A string of metadata in php serialized form (Run through serialize())
         */
@@ -462,16 +463,16 @@ abstract class MediaHandler {
        /**
         * Get an array structure that looks like this:
         *
-        * array(
-        *    'visible' => array(
+        * [
+        *    'visible' => [
         *       'Human-readable name' => 'Human readable value',
         *       ...
-        *    ),
-        *    'collapsed' => array(
+        *    ],
+        *    'collapsed' => [
         *       'Human-readable name' => 'Human readable value',
         *       ...
-        *    )
-        * )
+        *    ]
+        * ]
         * The UI will format this into a table where the visible fields are always
         * visible, and the collapsed fields are optionally visible.
         *
@@ -842,11 +843,11 @@ abstract class MediaHandler {
        /**
         * Gets configuration for the file warning message. Return value of
         * the following structure:
-        *   array(
+        *   [
         *     // Required, module with messages loaded for the client
         *     'module' => 'example.filewarning.messages',
         *     // Required, array of names of messages
-        *     'messages' => array(
+        *     'messages' => [
         *       // Required, main warning message
         *       'main' => 'example-filewarning-main',
         *       // Optional, header for warning dialog
@@ -855,10 +856,10 @@ abstract class MediaHandler {
         *       'footer' => 'example-filewarning-footer',
         *       // Optional, text for more-information link (see below)
         *       'info' => 'example-filewarning-info',
-        *     ),
+        *     ],
         *     // Optional, link for more information
         *     'link' => 'http://example.com',
-        *   )
+        *   ]
         *
         * Returns null if no warning is necessary.
         * @param File $file
index 8a3e001..294abb3 100644 (file)
@@ -30,7 +30,7 @@ class PNGHandler extends BitmapHandler {
        const BROKEN_FILE = '0';
 
        /**
-        * @param File $image
+        * @param File|FSFile $image
         * @param string $filename
         * @return string
         */
index 2bb6d13..f3b33ac 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Media
  */
+use Wikimedia\ScopedCallback;
 
 /**
  * Handler for SVG images.
@@ -301,13 +302,13 @@ class SvgHandler extends ImageHandler {
        }
 
        /**
-        * @param File $file
+        * @param File|FSFile $file
         * @param string $path Unused
         * @param bool|array $metadata
         * @return array
         */
        function getImageSize( $file, $path, $metadata = false ) {
-               if ( $metadata === false ) {
+               if ( $metadata === false && $file instanceof File ) {
                        $metadata = $file->getMetadata();
                }
                $metadata = $this->unpackMetadata( $metadata );
@@ -355,7 +356,7 @@ class SvgHandler extends ImageHandler {
        }
 
        /**
-        * @param File $file
+        * @param File|FSFile $file
         * @param string $filename
         * @return string Serialised metadata
         */
index 2e73249..f0f4cda 100644 (file)
@@ -71,13 +71,14 @@ class TiffHandler extends ExifBitmapHandler {
        }
 
        /**
-        * @param File $image
+        * @param File|FSFile $image
         * @param string $filename
         * @throws MWException
         * @return string
         */
        function getMetadata( $image, $filename ) {
                global $wgShowEXIF;
+
                if ( $wgShowEXIF ) {
                        try {
                                $meta = BitmapMetadataHandler::Tiff( $filename );
index 3287fac..11c4d42 100644 (file)
@@ -25,6 +25,7 @@
  * @file
  * @ingroup Media
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Handler for images that need to be transformed
@@ -302,7 +303,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
         * Values can be one of client, im, custom, gd, imext, or an array
         * of object, method-name to call that specific method.
         *
-        * If specifying a custom scaler command with array( Obj, method ),
+        * If specifying a custom scaler command with [ Obj, method ],
         * the method in question should take 2 parameters, a File object,
         * and a $scalerParams array with various options (See doTransform
         * for what is in $scalerParams). On error it should return a
@@ -509,7 +510,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
         * @return string|bool Representing the IM version; false on error
         */
        protected function getMagickVersion() {
-               $cache = ObjectCache::getLocalServerInstance( CACHE_NONE );
+               $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
                return $cache->getWithSetCallback(
                        'imagemagick-version',
                        $cache::TTL_HOUR,
index 35e885f..e2c2d2d 100644 (file)
@@ -230,7 +230,7 @@ class WebPHandler extends BitmapHandler {
                if ( $file === null ) {
                        $metadata = self::getMetadata( $file, $path );
                }
-               if ( $metadata === false ) {
+               if ( $metadata === false && $file instanceof File ) {
                        $metadata = $file->getMetadata();
                }
 
index 6ac675e..108d6fb 100644 (file)
@@ -56,7 +56,7 @@ class XCFHandler extends BitmapHandler {
        /**
         * Get width and height from the XCF header.
         *
-        * @param File $image
+        * @param File|FSFile $image
         * @param string $filename
         * @return array
         */
@@ -149,7 +149,7 @@ class XCFHandler extends BitmapHandler {
         *
         * Greyscale files need different command line options.
         *
-        * @param File $file The image object, or false if there isn't one.
+        * @param File|FSFile $file The image object, or false if there isn't one.
         *   Warning, FSFile::getPropsFromPath might pass an (object)array() instead (!)
         * @param string $filename The filename
         * @return string
diff --git a/includes/media/XMP.php b/includes/media/XMP.php
deleted file mode 100644 (file)
index 70f67b7..0000000
+++ /dev/null
@@ -1,1383 +0,0 @@
-<?php
-/**
- * Reader for XMP data containing properties relevant to images.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Media
- */
-
-use Psr\Log\LoggerAwareInterface;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-
-/**
- * Class for reading xmp data containing properties relevant to
- * images, and spitting out an array that FormatMetadata accepts.
- *
- * Note, this is not meant to recognize every possible thing you can
- * encode in XMP. It should recognize all the properties we want.
- * For example it doesn't have support for structures with multiple
- * nesting levels, as none of the properties we're supporting use that
- * feature. If it comes across properties it doesn't recognize, it should
- * ignore them.
- *
- * The public methods one would call in this class are
- * - parse( $content )
- *    Reads in xmp content.
- *    Can potentially be called multiple times with partial data each time.
- * - parseExtended( $content )
- *    Reads XMPExtended blocks (jpeg files only).
- * - getResults
- *    Outputs a results array.
- *
- * Note XMP kind of looks like rdf. They are not the same thing - XMP is
- * encoded as a specific subset of rdf. This class can read XMP. It cannot
- * read rdf.
- *
- */
-class XMPReader implements LoggerAwareInterface {
-       /** @var array XMP item configuration array */
-       protected $items;
-
-       /** @var array Array to hold the current element (and previous element, and so on) */
-       private $curItem = [];
-
-       /** @var bool|string The structure name when processing nested structures. */
-       private $ancestorStruct = false;
-
-       /** @var bool|string Temporary holder for character data that appears in xmp doc. */
-       private $charContent = false;
-
-       /** @var array Stores the state the xmpreader is in (see MODE_FOO constants) */
-       private $mode = [];
-
-       /** @var array Array to hold results */
-       private $results = [];
-
-       /** @var bool If we're doing a seq or bag. */
-       private $processingArray = false;
-
-       /** @var bool|string Used for lang alts only */
-       private $itemLang = false;
-
-       /** @var resource A resource handle for the XML parser */
-       private $xmlParser;
-
-       /** @var bool|string Character set like 'UTF-8' */
-       private $charset = false;
-
-       /** @var int */
-       private $extendedXMPOffset = 0;
-
-       /** @var int Flag determining if the XMP is safe to parse **/
-       private $parsable = 0;
-
-       /** @var string Buffer of XML to parse **/
-       private $xmlParsableBuffer = '';
-
-       /**
-        * These are various mode constants.
-        * they are used to figure out what to do
-        * with an element when its encountered.
-        *
-        * For example, MODE_IGNORE is used when processing
-        * a property we're not interested in. So if a new
-        * element pops up when we're in that mode, we ignore it.
-        */
-       const MODE_INITIAL = 0;
-       const MODE_IGNORE = 1;
-       const MODE_LI = 2;
-       const MODE_LI_LANG = 3;
-       const MODE_QDESC = 4;
-
-       // The following MODE constants are also used in the
-       // $items array to denote what type of property the item is.
-       const MODE_SIMPLE = 10;
-       const MODE_STRUCT = 11; // structure (associative array)
-       const MODE_SEQ = 12; // ordered list
-       const MODE_BAG = 13; // unordered list
-       const MODE_LANG = 14;
-       const MODE_ALT = 15; // non-language alt. Currently not implemented, and not needed atm.
-       const MODE_BAGSTRUCT = 16; // A BAG of Structs.
-
-       const NS_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
-       const NS_XML = 'http://www.w3.org/XML/1998/namespace';
-
-       // States used while determining if XML is safe to parse
-       const PARSABLE_UNKNOWN = 0;
-       const PARSABLE_OK = 1;
-       const PARSABLE_BUFFERING = 2;
-       const PARSABLE_NO = 3;
-
-       /**
-        * @var LoggerInterface
-        */
-       private $logger;
-
-       /**
-        * Constructor.
-        *
-        * Primary job is to initialize the XMLParser
-        */
-       function __construct( LoggerInterface $logger = null ) {
-
-               if ( !function_exists( 'xml_parser_create_ns' ) ) {
-                       // this should already be checked by this point
-                       throw new RuntimeException( 'XMP support requires XML Parser' );
-               }
-               if ( $logger ) {
-                       $this->setLogger( $logger );
-               } else {
-                       $this->setLogger( new NullLogger() );
-               }
-
-               $this->items = XMPInfo::getItems();
-
-               $this->resetXMLParser();
-       }
-
-       public function setLogger( LoggerInterface $logger ) {
-               $this->logger = $logger;
-       }
-
-       /**
-        * free the XML parser.
-        *
-        * @note It is unclear to me if we really need to do this ourselves
-        *  or if php garbage collection will automatically free the xmlParser
-        *  when it is no longer needed.
-        */
-       private function destroyXMLParser() {
-               if ( $this->xmlParser ) {
-                       xml_parser_free( $this->xmlParser );
-                       $this->xmlParser = null;
-               }
-       }
-
-       /**
-        * Main use is if a single item has multiple xmp documents describing it.
-        * For example in jpeg's with extendedXMP
-        */
-       private function resetXMLParser() {
-
-               $this->destroyXMLParser();
-
-               $this->xmlParser = xml_parser_create_ns( 'UTF-8', ' ' );
-               xml_parser_set_option( $this->xmlParser, XML_OPTION_CASE_FOLDING, 0 );
-               xml_parser_set_option( $this->xmlParser, XML_OPTION_SKIP_WHITE, 1 );
-
-               xml_set_element_handler( $this->xmlParser,
-                       [ $this, 'startElement' ],
-                       [ $this, 'endElement' ] );
-
-               xml_set_character_data_handler( $this->xmlParser, [ $this, 'char' ] );
-
-               $this->parsable = self::PARSABLE_UNKNOWN;
-               $this->xmlParsableBuffer = '';
-       }
-
-       /**
-        * Check if this instance supports using this class
-        */
-       public static function isSupported() {
-               return function_exists( 'xml_parser_create_ns' ) && class_exists( 'XMLReader' );
-       }
-
-       /** Get the result array. Do some post-processing before returning
-        * the array, and transform any metadata that is special-cased.
-        *
-        * @return array Array of results as an array of arrays suitable for
-        *    FormatMetadata::getFormattedData().
-        */
-       public function getResults() {
-               // xmp-special is for metadata that affects how stuff
-               // is extracted. For example xmpNote:HasExtendedXMP.
-
-               // It is also used to handle photoshop:AuthorsPosition
-               // which is weird and really part of another property,
-               // see 2:85 in IPTC. See also pg 21 of IPTC4XMP standard.
-               // The location fields also use it.
-
-               $data = $this->results;
-
-               if ( isset( $data['xmp-special']['AuthorsPosition'] )
-                       && is_string( $data['xmp-special']['AuthorsPosition'] )
-                       && isset( $data['xmp-general']['Artist'][0] )
-               ) {
-                       // Note, if there is more than one creator,
-                       // this only applies to first. This also will
-                       // only apply to the dc:Creator prop, not the
-                       // exif:Artist prop.
-
-                       $data['xmp-general']['Artist'][0] =
-                               $data['xmp-special']['AuthorsPosition'] . ', '
-                               . $data['xmp-general']['Artist'][0];
-               }
-
-               // Go through the LocationShown and LocationCreated
-               // changing it to the non-hierarchal form used by
-               // the other location fields.
-
-               if ( isset( $data['xmp-special']['LocationShown'][0] )
-                       && is_array( $data['xmp-special']['LocationShown'][0] )
-               ) {
-                       // the is_array is just paranoia. It should always
-                       // be an array.
-                       foreach ( $data['xmp-special']['LocationShown'] as $loc ) {
-                               if ( !is_array( $loc ) ) {
-                                       // To avoid copying over the _type meta-fields.
-                                       continue;
-                               }
-                               foreach ( $loc as $field => $val ) {
-                                       $data['xmp-general'][$field . 'Dest'][] = $val;
-                               }
-                       }
-               }
-               if ( isset( $data['xmp-special']['LocationCreated'][0] )
-                       && is_array( $data['xmp-special']['LocationCreated'][0] )
-               ) {
-                       // the is_array is just paranoia. It should always
-                       // be an array.
-                       foreach ( $data['xmp-special']['LocationCreated'] as $loc ) {
-                               if ( !is_array( $loc ) ) {
-                                       // To avoid copying over the _type meta-fields.
-                                       continue;
-                               }
-                               foreach ( $loc as $field => $val ) {
-                                       $data['xmp-general'][$field . 'Created'][] = $val;
-                               }
-                       }
-               }
-
-               // We don't want to return the special values, since they're
-               // special and not info to be stored about the file.
-               unset( $data['xmp-special'] );
-
-               // Convert GPSAltitude to negative if below sea level.
-               if ( isset( $data['xmp-exif']['GPSAltitudeRef'] )
-                       && isset( $data['xmp-exif']['GPSAltitude'] )
-               ) {
-
-                       // Must convert to a real before multiplying by -1
-                       // XMPValidate guarantees there will always be a '/' in this value.
-                       list( $nom, $denom ) = explode( '/', $data['xmp-exif']['GPSAltitude'] );
-                       $data['xmp-exif']['GPSAltitude'] = $nom / $denom;
-
-                       if ( $data['xmp-exif']['GPSAltitudeRef'] == '1' ) {
-                               $data['xmp-exif']['GPSAltitude'] *= -1;
-                       }
-                       unset( $data['xmp-exif']['GPSAltitudeRef'] );
-               }
-
-               return $data;
-       }
-
-       /**
-        * Main function to call to parse XMP. Use getResults to
-        * get results.
-        *
-        * Also catches any errors during processing, writes them to
-        * debug log, blanks result array and returns false.
-        *
-        * @param string $content XMP data
-        * @param bool $allOfIt If this is all the data (true) or if its split up (false). Default true
-        * @throws RuntimeException
-        * @return bool Success.
-        */
-       public function parse( $content, $allOfIt = true ) {
-               if ( !$this->xmlParser ) {
-                       $this->resetXMLParser();
-               }
-               try {
-
-                       // detect encoding by looking for BOM which is supposed to be in processing instruction.
-                       // see page 12 of http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart3.pdf
-                       if ( !$this->charset ) {
-                               $bom = [];
-                               if ( preg_match( '/\xEF\xBB\xBF|\xFE\xFF|\x00\x00\xFE\xFF|\xFF\xFE\x00\x00|\xFF\xFE/',
-                                       $content, $bom )
-                               ) {
-                                       switch ( $bom[0] ) {
-                                               case "\xFE\xFF":
-                                                       $this->charset = 'UTF-16BE';
-                                                       break;
-                                               case "\xFF\xFE":
-                                                       $this->charset = 'UTF-16LE';
-                                                       break;
-                                               case "\x00\x00\xFE\xFF":
-                                                       $this->charset = 'UTF-32BE';
-                                                       break;
-                                               case "\xFF\xFE\x00\x00":
-                                                       $this->charset = 'UTF-32LE';
-                                                       break;
-                                               case "\xEF\xBB\xBF":
-                                                       $this->charset = 'UTF-8';
-                                                       break;
-                                               default:
-                                                       // this should be impossible to get to
-                                                       throw new RuntimeException( "Invalid BOM" );
-                                       }
-                               } else {
-                                       // standard specifically says, if no bom assume utf-8
-                                       $this->charset = 'UTF-8';
-                               }
-                       }
-                       if ( $this->charset !== 'UTF-8' ) {
-                               // don't convert if already utf-8
-                               MediaWiki\suppressWarnings();
-                               $content = iconv( $this->charset, 'UTF-8//IGNORE', $content );
-                               MediaWiki\restoreWarnings();
-                       }
-
-                       // Ensure the XMP block does not have an xml doctype declaration, which
-                       // could declare entities unsafe to parse with xml_parse (T85848/T71210).
-                       if ( $this->parsable !== self::PARSABLE_OK ) {
-                               if ( $this->parsable === self::PARSABLE_NO ) {
-                                       throw new RuntimeException( 'Unsafe doctype declaration in XML.' );
-                               }
-
-                               $content = $this->xmlParsableBuffer . $content;
-                               if ( !$this->checkParseSafety( $content ) ) {
-                                       if ( !$allOfIt && $this->parsable !== self::PARSABLE_NO ) {
-                                               // parse wasn't Unsuccessful yet, so return true
-                                               // in this case.
-                                               return true;
-                                       }
-                                       $msg = ( $this->parsable === self::PARSABLE_NO ) ?
-                                               'Unsafe doctype declaration in XML.' :
-                                               'No root element found in XML.';
-                                       throw new RuntimeException( $msg );
-                               }
-                       }
-
-                       $ok = xml_parse( $this->xmlParser, $content, $allOfIt );
-                       if ( !$ok ) {
-                               $code = xml_get_error_code( $this->xmlParser );
-                               $error = xml_error_string( $code );
-                               $line = xml_get_current_line_number( $this->xmlParser );
-                               $col = xml_get_current_column_number( $this->xmlParser );
-                               $offset = xml_get_current_byte_index( $this->xmlParser );
-
-                               $this->logger->warning(
-                                       '{method} : Error reading XMP content: {error} ' .
-                                       '(line: {line} column: {column} byte offset: {offset})',
-                                       [
-                                               'method' => __METHOD__,
-                                               'error_code' => $code,
-                                               'error' => $error,
-                                               'line' => $line,
-                                               'column' => $col,
-                                               'offset' => $offset,
-                                               'content' => $content,
-                               ] );
-                               $this->results = []; // blank if error.
-                               $this->destroyXMLParser();
-                               return false;
-                       }
-               } catch ( Exception $e ) {
-                       $this->logger->warning(
-                               '{method} Exception caught while parsing: ' . $e->getMessage(),
-                               [
-                                       'method' => __METHOD__,
-                                       'exception' => $e,
-                                       'content' => $content,
-                               ]
-                       );
-                       $this->results = [];
-                       return false;
-               }
-               if ( $allOfIt ) {
-                       $this->destroyXMLParser();
-               }
-
-               return true;
-       }
-
-       /** Entry point for XMPExtended blocks in jpeg files
-        *
-        * @todo In serious need of testing
-        * @see http://www.adobe.ge/devnet/xmp/pdfs/XMPSpecificationPart3.pdf XMP spec part 3 page 20
-        * @param string $content XMPExtended block minus the namespace signature
-        * @return bool If it succeeded.
-        */
-       public function parseExtended( $content ) {
-               // @todo FIXME: This is untested. Hard to find example files
-               // or programs that make such files..
-               $guid = substr( $content, 0, 32 );
-               if ( !isset( $this->results['xmp-special']['HasExtendedXMP'] )
-                       || $this->results['xmp-special']['HasExtendedXMP'] !== $guid
-               ) {
-                       $this->logger->info( __METHOD__ .
-                               " Ignoring XMPExtended block due to wrong guid (guid= '$guid')" );
-
-                       return false;
-               }
-               $len = unpack( 'Nlength/Noffset', substr( $content, 32, 8 ) );
-
-               if ( !$len ||
-                       $len['length'] < 4 ||
-                       $len['offset'] < 0 ||
-                       $len['offset'] > $len['length']
-               ) {
-                       $this->logger->info(
-                               __METHOD__ . 'Error reading extended XMP block, invalid length or offset.'
-                       );
-
-                       return false;
-               }
-
-               // we're not very robust here. we should accept it in the wrong order.
-               // To quote the XMP standard:
-               // "A JPEG writer should write the ExtendedXMP marker segments in order,
-               // immediately following the StandardXMP. However, the JPEG standard
-               // does not require preservation of marker segment order. A robust JPEG
-               // reader should tolerate the marker segments in any order."
-               // On the other hand, the probability that an image will have more than
-               // 128k of metadata is rather low... so the probability that it will have
-               // > 128k, and be in the wrong order is very low...
-
-               if ( $len['offset'] !== $this->extendedXMPOffset ) {
-                       $this->logger->info( __METHOD__ . 'Ignoring XMPExtended block due to wrong order. (Offset was '
-                               . $len['offset'] . ' but expected ' . $this->extendedXMPOffset . ')' );
-
-                       return false;
-               }
-
-               if ( $len['offset'] === 0 ) {
-                       // if we're starting the extended block, we've probably already
-                       // done the XMPStandard block, so reset.
-                       $this->resetXMLParser();
-               }
-
-               $this->extendedXMPOffset += $len['length'];
-
-               $actualContent = substr( $content, 40 );
-
-               if ( $this->extendedXMPOffset === strlen( $actualContent ) ) {
-                       $atEnd = true;
-               } else {
-                       $atEnd = false;
-               }
-
-               $this->logger->debug( __METHOD__ . 'Parsing a XMPExtended block' );
-
-               return $this->parse( $actualContent, $atEnd );
-       }
-
-       /**
-        * Character data handler
-        * Called whenever character data is found in the xmp document.
-        *
-        * does nothing if we're in MODE_IGNORE or if the data is whitespace
-        * throws an error if we're not in MODE_SIMPLE (as we're not allowed to have character
-        * data in the other modes).
-        *
-        * As an example, this happens when we encounter XMP like:
-        * <exif:DigitalZoomRatio>0/10</exif:DigitalZoomRatio>
-        * and are processing the 0/10 bit.
-        *
-        * @param XMLParser $parser XMLParser reference to the xml parser
-        * @param string $data Character data
-        * @throws RuntimeException On invalid data
-        */
-       function char( $parser, $data ) {
-
-               $data = trim( $data );
-               if ( trim( $data ) === "" ) {
-                       return;
-               }
-
-               if ( !isset( $this->mode[0] ) ) {
-                       throw new RuntimeException( 'Unexpected character data before first rdf:Description element' );
-               }
-
-               if ( $this->mode[0] === self::MODE_IGNORE ) {
-                       return;
-               }
-
-               if ( $this->mode[0] !== self::MODE_SIMPLE
-                       && $this->mode[0] !== self::MODE_QDESC
-               ) {
-                       throw new RuntimeException( 'character data where not expected. (mode ' . $this->mode[0] . ')' );
-               }
-
-               // to check, how does this handle w.s.
-               if ( $this->charContent === false ) {
-                       $this->charContent = $data;
-               } else {
-                       $this->charContent .= $data;
-               }
-       }
-
-       /**
-        * Check if a block of XML is safe to pass to xml_parse, i.e. doesn't
-        * contain a doctype declaration which could contain a dos attack if we
-        * parse it and expand internal entities (T85848).
-        *
-        * @param string $content xml string to check for parse safety
-        * @return bool true if the xml is safe to parse, false otherwise
-        */
-       private function checkParseSafety( $content ) {
-               $reader = new XMLReader();
-               $result = null;
-
-               // For XMLReader to parse incomplete/invalid XML, it has to be open()'ed
-               // instead of using XML().
-               $reader->open(
-                       'data://text/plain,' . urlencode( $content ),
-                       null,
-                       LIBXML_NOERROR | LIBXML_NOWARNING | LIBXML_NONET
-               );
-
-               $oldDisable = libxml_disable_entity_loader( true );
-               /** @noinspection PhpUnusedLocalVariableInspection */
-               $reset = new ScopedCallback(
-                       'libxml_disable_entity_loader',
-                       [ $oldDisable ]
-               );
-               $reader->setParserProperty( XMLReader::SUBST_ENTITIES, false );
-
-               // Even with LIBXML_NOWARNING set, XMLReader::read gives a warning
-               // when parsing truncated XML, which causes unit tests to fail.
-               MediaWiki\suppressWarnings();
-               while ( $reader->read() ) {
-                       if ( $reader->nodeType === XMLReader::ELEMENT ) {
-                               // Reached the first element without hitting a doctype declaration
-                               $this->parsable = self::PARSABLE_OK;
-                               $result = true;
-                               break;
-                       }
-                       if ( $reader->nodeType === XMLReader::DOC_TYPE ) {
-                               $this->parsable = self::PARSABLE_NO;
-                               $result = false;
-                               break;
-                       }
-               }
-               MediaWiki\restoreWarnings();
-
-               if ( !is_null( $result ) ) {
-                       return $result;
-               }
-
-               // Reached the end of the parsable xml without finding an element
-               // or doctype. Buffer and try again.
-               $this->parsable = self::PARSABLE_BUFFERING;
-               $this->xmlParsableBuffer = $content;
-               return false;
-       }
-
-       /** When we hit a closing element in MODE_IGNORE
-        * Check to see if this is the element we started to ignore,
-        * in which case we get out of MODE_IGNORE
-        *
-        * @param string $elm Namespace of element followed by a space and then tag name of element.
-        */
-       private function endElementModeIgnore( $elm ) {
-               if ( $this->curItem[0] === $elm ) {
-                       array_shift( $this->curItem );
-                       array_shift( $this->mode );
-               }
-       }
-
-       /**
-        * Hit a closing element when in MODE_SIMPLE.
-        * This generally means that we finished processing a
-        * property value, and now have to save the result to the
-        * results array
-        *
-        * For example, when processing:
-        * <exif:DigitalZoomRatio>0/10</exif:DigitalZoomRatio>
-        * this deals with when we hit </exif:DigitalZoomRatio>.
-        *
-        * Or it could be if we hit the end element of a property
-        * of a compound data structure (like a member of an array).
-        *
-        * @param string $elm Namespace, space, and tag name.
-        */
-       private function endElementModeSimple( $elm ) {
-               if ( $this->charContent !== false ) {
-                       if ( $this->processingArray ) {
-                               // if we're processing an array, use the original element
-                               // name instead of rdf:li.
-                               list( $ns, $tag ) = explode( ' ', $this->curItem[0], 2 );
-                       } else {
-                               list( $ns, $tag ) = explode( ' ', $elm, 2 );
-                       }
-                       $this->saveValue( $ns, $tag, $this->charContent );
-
-                       $this->charContent = false; // reset
-               }
-               array_shift( $this->curItem );
-               array_shift( $this->mode );
-       }
-
-       /**
-        * Hit a closing element in MODE_STRUCT, MODE_SEQ, MODE_BAG
-        * generally means we've finished processing a nested structure.
-        * resets some internal variables to indicate that.
-        *
-        * Note this means we hit the closing element not the "</rdf:Seq>".
-        *
-        * @par For example, when processing:
-        * @code{,xml}
-        * <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>64</rdf:li>
-        *   </rdf:Seq> </exif:ISOSpeedRatings>
-        * @endcode
-        *
-        * This method is called when we hit the "</exif:ISOSpeedRatings>" tag.
-        *
-        * @param string $elm Namespace . space . tag name.
-        * @throws RuntimeException
-        */
-       private function endElementNested( $elm ) {
-
-               /* cur item must be the same as $elm, unless if in MODE_STRUCT
-                  in which case it could also be rdf:Description */
-               if ( $this->curItem[0] !== $elm
-                       && !( $elm === self::NS_RDF . ' Description'
-                               && $this->mode[0] === self::MODE_STRUCT )
-               ) {
-                       throw new RuntimeException( "nesting mismatch. got a </$elm> but expected a </" .
-                               $this->curItem[0] . '>' );
-               }
-
-               // Validate structures.
-               list( $ns, $tag ) = explode( ' ', $elm, 2 );
-               if ( isset( $this->items[$ns][$tag]['validate'] ) ) {
-                       $info =& $this->items[$ns][$tag];
-                       $finalName = isset( $info['map_name'] )
-                               ? $info['map_name'] : $tag;
-
-                       if ( is_array( $info['validate'] ) ) {
-                               $validate = $info['validate'];
-                       } else {
-                               $validator = new XMPValidate( $this->logger );
-                               $validate = [ $validator, $info['validate'] ];
-                       }
-
-                       if ( !isset( $this->results['xmp-' . $info['map_group']][$finalName] ) ) {
-                               // This can happen if all the members of the struct failed validation.
-                               $this->logger->debug( __METHOD__ . " <$ns:$tag> has no valid members." );
-                       } elseif ( is_callable( $validate ) ) {
-                               $val =& $this->results['xmp-' . $info['map_group']][$finalName];
-                               call_user_func_array( $validate, [ $info, &$val, false ] );
-                               if ( is_null( $val ) ) {
-                                       // the idea being the validation function will unset the variable if
-                                       // its invalid.
-                                       $this->logger->info( __METHOD__ . " <$ns:$tag> failed validation." );
-                                       unset( $this->results['xmp-' . $info['map_group']][$finalName] );
-                               }
-                       } else {
-                               $this->logger->warning( __METHOD__ . " Validation function for $finalName ("
-                                       . $validate[0] . '::' . $validate[1] . '()) is not callable.' );
-                       }
-               }
-
-               array_shift( $this->curItem );
-               array_shift( $this->mode );
-               $this->ancestorStruct = false;
-               $this->processingArray = false;
-               $this->itemLang = false;
-       }
-
-       /**
-        * Hit a closing element in MODE_LI (either rdf:Seq, or rdf:Bag )
-        * Add information about what type of element this is.
-        *
-        * Note we still have to hit the outer "</property>"
-        *
-        * @par For example, when processing:
-        * @code{,xml}
-        * <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>64</rdf:li>
-        *   </rdf:Seq> </exif:ISOSpeedRatings>
-        * @endcode
-        *
-        * This method is called when we hit the "</rdf:Seq>".
-        * (For comparison, we call endElementModeSimple when we
-        * hit the "</rdf:li>")
-        *
-        * @param string $elm Namespace . ' ' . element name
-        * @throws RuntimeException
-        */
-       private function endElementModeLi( $elm ) {
-               list( $ns, $tag ) = explode( ' ', $this->curItem[0], 2 );
-               $info = $this->items[$ns][$tag];
-               $finalName = isset( $info['map_name'] )
-                       ? $info['map_name'] : $tag;
-
-               array_shift( $this->mode );
-
-               if ( !isset( $this->results['xmp-' . $info['map_group']][$finalName] ) ) {
-                       $this->logger->debug( __METHOD__ . " Empty compund element $finalName." );
-
-                       return;
-               }
-
-               if ( $elm === self::NS_RDF . ' Seq' ) {
-                       $this->results['xmp-' . $info['map_group']][$finalName]['_type'] = 'ol';
-               } elseif ( $elm === self::NS_RDF . ' Bag' ) {
-                       $this->results['xmp-' . $info['map_group']][$finalName]['_type'] = 'ul';
-               } elseif ( $elm === self::NS_RDF . ' Alt' ) {
-                       // extra if needed as you could theoretically have a non-language alt.
-                       if ( $info['mode'] === self::MODE_LANG ) {
-                               $this->results['xmp-' . $info['map_group']][$finalName]['_type'] = 'lang';
-                       }
-               } else {
-                       throw new RuntimeException(
-                               __METHOD__ . " expected </rdf:seq> or </rdf:bag> but instead got $elm."
-                       );
-               }
-       }
-
-       /**
-        * End element while in MODE_QDESC
-        * mostly when ending an element when we have a simple value
-        * that has qualifiers.
-        *
-        * Qualifiers aren't all that common, and we don't do anything
-        * with them.
-        *
-        * @param string $elm Namespace and element
-        */
-       private function endElementModeQDesc( $elm ) {
-
-               if ( $elm === self::NS_RDF . ' value' ) {
-                       list( $ns, $tag ) = explode( ' ', $this->curItem[0], 2 );
-                       $this->saveValue( $ns, $tag, $this->charContent );
-
-                       return;
-               } else {
-                       array_shift( $this->mode );
-                       array_shift( $this->curItem );
-               }
-       }
-
-       /**
-        * Handler for hitting a closing element.
-        *
-        * generally just calls a helper function depending on what
-        * mode we're in.
-        *
-        * Ignores the outer wrapping elements that are optional in
-        * xmp and have no meaning.
-        *
-        * @param XMLParser $parser
-        * @param string $elm Namespace . ' ' . element name
-        * @throws RuntimeException
-        */
-       function endElement( $parser, $elm ) {
-               if ( $elm === ( self::NS_RDF . ' RDF' )
-                       || $elm === 'adobe:ns:meta/ xmpmeta'
-                       || $elm === 'adobe:ns:meta/ xapmeta'
-               ) {
-                       // ignore these.
-                       return;
-               }
-
-               if ( $elm === self::NS_RDF . ' type' ) {
-                       // these aren't really supported properly yet.
-                       // However, it appears they almost never used.
-                       $this->logger->info( __METHOD__ . ' encountered <rdf:type>' );
-               }
-
-               if ( strpos( $elm, ' ' ) === false ) {
-                       // This probably shouldn't happen.
-                       // However, there is a bug in an adobe product
-                       // that forgets the namespace on some things.
-                       // (Luckily they are unimportant things).
-                       $this->logger->info( __METHOD__ . " Encountered </$elm> which has no namespace. Skipping." );
-
-                       return;
-               }
-
-               if ( count( $this->mode[0] ) === 0 ) {
-                       // This should never ever happen and means
-                       // there is a pretty major bug in this class.
-                       throw new RuntimeException( 'Encountered end element with no mode' );
-               }
-
-               if ( count( $this->curItem ) == 0 && $this->mode[0] !== self::MODE_INITIAL ) {
-                       // just to be paranoid. Should always have a curItem, except for initially
-                       // (aka during MODE_INITAL).
-                       throw new RuntimeException( "Hit end element </$elm> but no curItem" );
-               }
-
-               switch ( $this->mode[0] ) {
-                       case self::MODE_IGNORE:
-                               $this->endElementModeIgnore( $elm );
-                               break;
-                       case self::MODE_SIMPLE:
-                               $this->endElementModeSimple( $elm );
-                               break;
-                       case self::MODE_STRUCT:
-                       case self::MODE_SEQ:
-                       case self::MODE_BAG:
-                       case self::MODE_LANG:
-                       case self::MODE_BAGSTRUCT:
-                               $this->endElementNested( $elm );
-                               break;
-                       case self::MODE_INITIAL:
-                               if ( $elm === self::NS_RDF . ' Description' ) {
-                                       array_shift( $this->mode );
-                               } else {
-                                       throw new RuntimeException( 'Element ended unexpectedly while in MODE_INITIAL' );
-                               }
-                               break;
-                       case self::MODE_LI:
-                       case self::MODE_LI_LANG:
-                               $this->endElementModeLi( $elm );
-                               break;
-                       case self::MODE_QDESC:
-                               $this->endElementModeQDesc( $elm );
-                               break;
-                       default:
-                               $this->logger->warning( __METHOD__ . " no mode (elm = $elm)" );
-                               break;
-               }
-       }
-
-       /**
-        * Hit an opening element while in MODE_IGNORE
-        *
-        * XMP is extensible, so ignore any tag we don't understand.
-        *
-        * Mostly ignores, unless we encounter the element that we are ignoring.
-        * in which case we add it to the item stack, so we can ignore things
-        * that are nested, correctly.
-        *
-        * @param string $elm Namespace . ' ' . tag name
-        */
-       private function startElementModeIgnore( $elm ) {
-               if ( $elm === $this->curItem[0] ) {
-                       array_unshift( $this->curItem, $elm );
-                       array_unshift( $this->mode, self::MODE_IGNORE );
-               }
-       }
-
-       /**
-        *  Start element in MODE_BAG (unordered array)
-        * this should always be <rdf:Bag>
-        *
-        * @param string $elm Namespace . ' ' . tag
-        * @throws RuntimeException If we have an element that's not <rdf:Bag>
-        */
-       private function startElementModeBag( $elm ) {
-               if ( $elm === self::NS_RDF . ' Bag' ) {
-                       array_unshift( $this->mode, self::MODE_LI );
-               } else {
-                       throw new RuntimeException( "Expected <rdf:Bag> but got $elm." );
-               }
-       }
-
-       /**
-        * Start element in MODE_SEQ (ordered array)
-        * this should always be <rdf:Seq>
-        *
-        * @param string $elm Namespace . ' ' . tag
-        * @throws RuntimeException If we have an element that's not <rdf:Seq>
-        */
-       private function startElementModeSeq( $elm ) {
-               if ( $elm === self::NS_RDF . ' Seq' ) {
-                       array_unshift( $this->mode, self::MODE_LI );
-               } elseif ( $elm === self::NS_RDF . ' Bag' ) {
-                       # bug 27105
-                       $this->logger->info( __METHOD__ . ' Expected an rdf:Seq, but got an rdf:Bag. Pretending'
-                               . ' it is a Seq, since some buggy software is known to screw this up.' );
-                       array_unshift( $this->mode, self::MODE_LI );
-               } else {
-                       throw new RuntimeException( "Expected <rdf:Seq> but got $elm." );
-               }
-       }
-
-       /**
-        * Start element in MODE_LANG (language alternative)
-        * this should always be <rdf:Alt>
-        *
-        * This tag tends to be used for metadata like describe this
-        * picture, which can be translated into multiple languages.
-        *
-        * XMP supports non-linguistic alternative selections,
-        * which are really only used for thumbnails, which
-        * we don't care about.
-        *
-        * @param string $elm Namespace . ' ' . tag
-        * @throws RuntimeException If we have an element that's not <rdf:Alt>
-        */
-       private function startElementModeLang( $elm ) {
-               if ( $elm === self::NS_RDF . ' Alt' ) {
-                       array_unshift( $this->mode, self::MODE_LI_LANG );
-               } else {
-                       throw new RuntimeException( "Expected <rdf:Seq> but got $elm." );
-               }
-       }
-
-       /**
-        * Handle an opening element when in MODE_SIMPLE
-        *
-        * This should not happen often. This is for if a simple element
-        * already opened has a child element. Could happen for a
-        * qualified element.
-        *
-        * For example:
-        * <exif:DigitalZoomRatio><rdf:Description><rdf:value>0/10</rdf:value>
-        *   <foo:someQualifier>Bar</foo:someQualifier> </rdf:Description>
-        *   </exif:DigitalZoomRatio>
-        *
-        * This method is called when processing the <rdf:Description> element
-        *
-        * @param string $elm Namespace and tag names separated by space.
-        * @param array $attribs Attributes of the element.
-        * @throws RuntimeException
-        */
-       private function startElementModeSimple( $elm, $attribs ) {
-               if ( $elm === self::NS_RDF . ' Description' ) {
-                       // If this value has qualifiers
-                       array_unshift( $this->mode, self::MODE_QDESC );
-                       array_unshift( $this->curItem, $this->curItem[0] );
-
-                       if ( isset( $attribs[self::NS_RDF . ' value'] ) ) {
-                               list( $ns, $tag ) = explode( ' ', $this->curItem[0], 2 );
-                               $this->saveValue( $ns, $tag, $attribs[self::NS_RDF . ' value'] );
-                       }
-               } elseif ( $elm === self::NS_RDF . ' value' ) {
-                       // This should not be here.
-                       throw new RuntimeException( __METHOD__ . ' Encountered <rdf:value> where it was unexpected.' );
-               } else {
-                       // something else we don't recognize, like a qualifier maybe.
-                       $this->logger->info( __METHOD__ .
-                               " Encountered element <$elm> where only expecting character data as value of " .
-                               $this->curItem[0] );
-                       array_unshift( $this->mode, self::MODE_IGNORE );
-                       array_unshift( $this->curItem, $elm );
-               }
-       }
-
-       /**
-        * Start an element when in MODE_QDESC.
-        * This generally happens when a simple element has an inner
-        * rdf:Description to hold qualifier elements.
-        *
-        * For example in:
-        * <exif:DigitalZoomRatio><rdf:Description><rdf:value>0/10</rdf:value>
-        *   <foo:someQualifier>Bar</foo:someQualifier> </rdf:Description>
-        *   </exif:DigitalZoomRatio>
-        * Called when processing the <rdf:value> or <foo:someQualifier>.
-        *
-        * @param string $elm Namespace and tag name separated by a space.
-        *
-        */
-       private function startElementModeQDesc( $elm ) {
-               if ( $elm === self::NS_RDF . ' value' ) {
-                       return; // do nothing
-               } else {
-                       // otherwise its a qualifier, which we ignore
-                       array_unshift( $this->mode, self::MODE_IGNORE );
-                       array_unshift( $this->curItem, $elm );
-               }
-       }
-
-       /**
-        * Starting an element when in MODE_INITIAL
-        * This usually happens when we hit an element inside
-        * the outer rdf:Description
-        *
-        * This is generally where most properties start.
-        *
-        * @param string $ns Namespace
-        * @param string $tag Tag name (without namespace prefix)
-        * @param array $attribs Array of attributes
-        * @throws RuntimeException
-        */
-       private function startElementModeInitial( $ns, $tag, $attribs ) {
-               if ( $ns !== self::NS_RDF ) {
-
-                       if ( isset( $this->items[$ns][$tag] ) ) {
-                               if ( isset( $this->items[$ns][$tag]['structPart'] ) ) {
-                                       // If this element is supposed to appear only as
-                                       // a child of a structure, but appears here (not as
-                                       // a child of a struct), then something weird is
-                                       // happening, so ignore this element and its children.
-
-                                       $this->logger->warning( "Encountered <$ns:$tag> outside"
-                                               . " of its expected parent. Ignoring." );
-
-                                       array_unshift( $this->mode, self::MODE_IGNORE );
-                                       array_unshift( $this->curItem, $ns . ' ' . $tag );
-
-                                       return;
-                               }
-                               $mode = $this->items[$ns][$tag]['mode'];
-                               array_unshift( $this->mode, $mode );
-                               array_unshift( $this->curItem, $ns . ' ' . $tag );
-                               if ( $mode === self::MODE_STRUCT ) {
-                                       $this->ancestorStruct = isset( $this->items[$ns][$tag]['map_name'] )
-                                               ? $this->items[$ns][$tag]['map_name'] : $tag;
-                               }
-                               if ( $this->charContent !== false ) {
-                                       // Something weird.
-                                       // Should not happen in valid XMP.
-                                       throw new RuntimeException( 'tag nested in non-whitespace characters.' );
-                               }
-                       } else {
-                               // This element is not on our list of allowed elements so ignore.
-                               $this->logger->debug( __METHOD__ . " Ignoring unrecognized element <$ns:$tag>." );
-                               array_unshift( $this->mode, self::MODE_IGNORE );
-                               array_unshift( $this->curItem, $ns . ' ' . $tag );
-
-                               return;
-                       }
-               }
-               // process attributes
-               $this->doAttribs( $attribs );
-       }
-
-       /**
-        * Hit an opening element when in a Struct (MODE_STRUCT)
-        * This is generally for fields of a compound property.
-        *
-        * Example of a struct (abbreviated; flash has more properties):
-        *
-        * <exif:Flash> <rdf:Description> <exif:Fired>True</exif:Fired>
-        *  <exif:Mode>1</exif:Mode></rdf:Description></exif:Flash>
-        *
-        * or:
-        *
-        * <exif:Flash rdf:parseType='Resource'> <exif:Fired>True</exif:Fired>
-        *  <exif:Mode>1</exif:Mode></exif:Flash>
-        *
-        * @param string $ns Namespace
-        * @param string $tag Tag name (no ns)
-        * @param array $attribs Array of attribs w/ values.
-        * @throws RuntimeException
-        */
-       private function startElementModeStruct( $ns, $tag, $attribs ) {
-               if ( $ns !== self::NS_RDF ) {
-
-                       if ( isset( $this->items[$ns][$tag] ) ) {
-                               if ( isset( $this->items[$ns][$this->ancestorStruct]['children'] )
-                                       && !isset( $this->items[$ns][$this->ancestorStruct]['children'][$tag] )
-                               ) {
-                                       // This assumes that we don't have inter-namespace nesting
-                                       // which we don't in all the properties we're interested in.
-                                       throw new RuntimeException( " <$tag> appeared nested in <" . $this->ancestorStruct
-                                               . "> where it is not allowed." );
-                               }
-                               array_unshift( $this->mode, $this->items[$ns][$tag]['mode'] );
-                               array_unshift( $this->curItem, $ns . ' ' . $tag );
-                               if ( $this->charContent !== false ) {
-                                       // Something weird.
-                                       // Should not happen in valid XMP.
-                                       throw new RuntimeException( "tag <$tag> nested in non-whitespace characters (" .
-                                               $this->charContent . ")." );
-                               }
-                       } else {
-                               array_unshift( $this->mode, self::MODE_IGNORE );
-                               array_unshift( $this->curItem, $elm );
-
-                               return;
-                       }
-               }
-
-               if ( $ns === self::NS_RDF && $tag === 'Description' ) {
-                       $this->doAttribs( $attribs );
-                       array_unshift( $this->mode, self::MODE_STRUCT );
-                       array_unshift( $this->curItem, $this->curItem[0] );
-               }
-       }
-
-       /**
-        * opening element in MODE_LI
-        * process elements of arrays.
-        *
-        * Example:
-        * <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>64</rdf:li>
-        *   </rdf:Seq> </exif:ISOSpeedRatings>
-        * This method is called when we hit the <rdf:li> element.
-        *
-        * @param string $elm Namespace . ' ' . tagname
-        * @param array $attribs Attributes. (needed for BAGSTRUCTS)
-        * @throws RuntimeException If gets a tag other than <rdf:li>
-        */
-       private function startElementModeLi( $elm, $attribs ) {
-               if ( ( $elm ) !== self::NS_RDF . ' li' ) {
-                       throw new RuntimeException( "<rdf:li> expected but got $elm." );
-               }
-
-               if ( !isset( $this->mode[1] ) ) {
-                       // This should never ever ever happen. Checking for it
-                       // to be paranoid.
-                       throw new RuntimeException( 'In mode Li, but no 2xPrevious mode!' );
-               }
-
-               if ( $this->mode[1] === self::MODE_BAGSTRUCT ) {
-                       // This list item contains a compound (STRUCT) value.
-                       array_unshift( $this->mode, self::MODE_STRUCT );
-                       array_unshift( $this->curItem, $elm );
-                       $this->processingArray = true;
-
-                       if ( !isset( $this->curItem[1] ) ) {
-                               // be paranoid.
-                               throw new RuntimeException( 'Can not find parent of BAGSTRUCT.' );
-                       }
-                       list( $curNS, $curTag ) = explode( ' ', $this->curItem[1] );
-                       $this->ancestorStruct = isset( $this->items[$curNS][$curTag]['map_name'] )
-                               ? $this->items[$curNS][$curTag]['map_name'] : $curTag;
-
-                       $this->doAttribs( $attribs );
-               } else {
-                       // Normal BAG or SEQ containing simple values.
-                       array_unshift( $this->mode, self::MODE_SIMPLE );
-                       // need to add curItem[0] on again since one is for the specific item
-                       // and one is for the entire group.
-                       array_unshift( $this->curItem, $this->curItem[0] );
-                       $this->processingArray = true;
-               }
-       }
-
-       /**
-        * Opening element in MODE_LI_LANG.
-        * process elements of language alternatives
-        *
-        * Example:
-        * <dc:title> <rdf:Alt> <rdf:li xml:lang="x-default">My house
-        *  </rdf:li> </rdf:Alt> </dc:title>
-        *
-        * This method is called when we hit the <rdf:li> element.
-        *
-        * @param string $elm Namespace . ' ' . tag
-        * @param array $attribs Array of elements (most importantly xml:lang)
-        * @throws RuntimeException If gets a tag other than <rdf:li> or if no xml:lang
-        */
-       private function startElementModeLiLang( $elm, $attribs ) {
-               if ( $elm !== self::NS_RDF . ' li' ) {
-                       throw new RuntimeException( __METHOD__ . " <rdf:li> expected but got $elm." );
-               }
-               if ( !isset( $attribs[self::NS_XML . ' lang'] )
-                       || !preg_match( '/^[-A-Za-z0-9]{2,}$/D', $attribs[self::NS_XML . ' lang'] )
-               ) {
-                       throw new RuntimeException( __METHOD__
-                               . " <rdf:li> did not contain, or has invalid xml:lang attribute in lang alternative" );
-               }
-
-               // Lang is case-insensitive.
-               $this->itemLang = strtolower( $attribs[self::NS_XML . ' lang'] );
-
-               // need to add curItem[0] on again since one is for the specific item
-               // and one is for the entire group.
-               array_unshift( $this->curItem, $this->curItem[0] );
-               array_unshift( $this->mode, self::MODE_SIMPLE );
-               $this->processingArray = true;
-       }
-
-       /**
-        * Hits an opening element.
-        * Generally just calls a helper based on what MODE we're in.
-        * Also does some initial set up for the wrapper element
-        *
-        * @param XMLParser $parser
-        * @param string $elm Namespace "<space>" element
-        * @param array $attribs Attribute name => value
-        * @throws RuntimeException
-        */
-       function startElement( $parser, $elm, $attribs ) {
-
-               if ( $elm === self::NS_RDF . ' RDF'
-                       || $elm === 'adobe:ns:meta/ xmpmeta'
-                       || $elm === 'adobe:ns:meta/ xapmeta'
-               ) {
-                       /* ignore. */
-                       return;
-               } elseif ( $elm === self::NS_RDF . ' Description' ) {
-                       if ( count( $this->mode ) === 0 ) {
-                               // outer rdf:desc
-                               array_unshift( $this->mode, self::MODE_INITIAL );
-                       }
-               } elseif ( $elm === self::NS_RDF . ' type' ) {
-                       // This doesn't support rdf:type properly.
-                       // In practise I have yet to see a file that
-                       // uses this element, however it is mentioned
-                       // on page 25 of part 1 of the xmp standard.
-                       // Also it seems as if exiv2 and exiftool do not support
-                       // this either (That or I misunderstand the standard)
-                       $this->logger->info( __METHOD__ . ' Encountered <rdf:type> which isn\'t currently supported' );
-               }
-
-               if ( strpos( $elm, ' ' ) === false ) {
-                       // This probably shouldn't happen.
-                       $this->logger->info( __METHOD__ . " Encountered <$elm> which has no namespace. Skipping." );
-
-                       return;
-               }
-
-               list( $ns, $tag ) = explode( ' ', $elm, 2 );
-
-               if ( count( $this->mode ) === 0 ) {
-                       // This should not happen.
-                       throw new RuntimeException( 'Error extracting XMP, '
-                               . "encountered <$elm> with no mode" );
-               }
-
-               switch ( $this->mode[0] ) {
-                       case self::MODE_IGNORE:
-                               $this->startElementModeIgnore( $elm );
-                               break;
-                       case self::MODE_SIMPLE:
-                               $this->startElementModeSimple( $elm, $attribs );
-                               break;
-                       case self::MODE_INITIAL:
-                               $this->startElementModeInitial( $ns, $tag, $attribs );
-                               break;
-                       case self::MODE_STRUCT:
-                               $this->startElementModeStruct( $ns, $tag, $attribs );
-                               break;
-                       case self::MODE_BAG:
-                       case self::MODE_BAGSTRUCT:
-                               $this->startElementModeBag( $elm );
-                               break;
-                       case self::MODE_SEQ:
-                               $this->startElementModeSeq( $elm );
-                               break;
-                       case self::MODE_LANG:
-                               $this->startElementModeLang( $elm );
-                               break;
-                       case self::MODE_LI_LANG:
-                               $this->startElementModeLiLang( $elm, $attribs );
-                               break;
-                       case self::MODE_LI:
-                               $this->startElementModeLi( $elm, $attribs );
-                               break;
-                       case self::MODE_QDESC:
-                               $this->startElementModeQDesc( $elm );
-                               break;
-                       default:
-                               throw new RuntimeException( 'StartElement in unknown mode: ' . $this->mode[0] );
-               }
-       }
-
-       // @codingStandardsIgnoreStart Generic.Files.LineLength
-       /**
-        * Process attributes.
-        * Simple values can be stored as either a tag or attribute
-        *
-        * Often the initial "<rdf:Description>" tag just has all the simple
-        * properties as attributes.
-        *
-        * @par Example:
-        * @code
-        * <rdf:Description rdf:about="" xmlns:exif="http://ns.adobe.com/exif/1.0/" exif:DigitalZoomRatio="0/10">
-        * @endcode
-        *
-        * @param array $attribs Array attribute=>value
-        * @throws RuntimeException
-        */
-       // @codingStandardsIgnoreEnd
-       private function doAttribs( $attribs ) {
-               // first check for rdf:parseType attribute, as that can change
-               // how the attributes are interperted.
-
-               if ( isset( $attribs[self::NS_RDF . ' parseType'] )
-                       && $attribs[self::NS_RDF . ' parseType'] === 'Resource'
-                       && $this->mode[0] === self::MODE_SIMPLE
-               ) {
-                       // this is equivalent to having an inner rdf:Description
-                       $this->mode[0] = self::MODE_QDESC;
-               }
-               foreach ( $attribs as $name => $val ) {
-                       if ( strpos( $name, ' ' ) === false ) {
-                               // This shouldn't happen, but so far some old software forgets namespace
-                               // on rdf:about.
-                               $this->logger->info( __METHOD__ . ' Encountered non-namespaced attribute: '
-                                       . " $name=\"$val\". Skipping. " );
-                               continue;
-                       }
-                       list( $ns, $tag ) = explode( ' ', $name, 2 );
-                       if ( $ns === self::NS_RDF ) {
-                               if ( $tag === 'value' || $tag === 'resource' ) {
-                                       // resource is for url.
-                                       // value attribute is a weird way of just putting the contents.
-                                       $this->char( $this->xmlParser, $val );
-                               }
-                       } elseif ( isset( $this->items[$ns][$tag] ) ) {
-                               if ( $this->mode[0] === self::MODE_SIMPLE ) {
-                                       throw new RuntimeException( __METHOD__
-                                               . " $ns:$tag found as attribute where not allowed" );
-                               }
-                               $this->saveValue( $ns, $tag, $val );
-                       } else {
-                               $this->logger->debug( __METHOD__ . " Ignoring unrecognized element <$ns:$tag>." );
-                       }
-               }
-       }
-
-       /**
-        * Given an extracted value, save it to results array
-        *
-        * note also uses $this->ancestorStruct and
-        * $this->processingArray to determine what name to
-        * save the value under. (in addition to $tag).
-        *
-        * @param string $ns Namespace of tag this is for
-        * @param string $tag Tag name
-        * @param string $val Value to save
-        */
-       private function saveValue( $ns, $tag, $val ) {
-
-               $info =& $this->items[$ns][$tag];
-               $finalName = isset( $info['map_name'] )
-                       ? $info['map_name'] : $tag;
-               if ( isset( $info['validate'] ) ) {
-                       if ( is_array( $info['validate'] ) ) {
-                               $validate = $info['validate'];
-                       } else {
-                               $validator = new XMPValidate( $this->logger );
-                               $validate = [ $validator, $info['validate'] ];
-                       }
-
-                       if ( is_callable( $validate ) ) {
-                               call_user_func_array( $validate, [ $info, &$val, true ] );
-                               // the reasoning behind using &$val instead of using the return value
-                               // is to be consistent between here and validating structures.
-                               if ( is_null( $val ) ) {
-                                       $this->logger->info( __METHOD__ . " <$ns:$tag> failed validation." );
-
-                                       return;
-                               }
-                       } else {
-                               $this->logger->warning( __METHOD__ . " Validation function for $finalName ("
-                                       . $validate[0] . '::' . $validate[1] . '()) is not callable.' );
-                       }
-               }
-
-               if ( $this->ancestorStruct && $this->processingArray ) {
-                       // Aka both an array and a struct. ( self::MODE_BAGSTRUCT )
-                       $this->results['xmp-' . $info['map_group']][$this->ancestorStruct][][$finalName] = $val;
-               } elseif ( $this->ancestorStruct ) {
-                       $this->results['xmp-' . $info['map_group']][$this->ancestorStruct][$finalName] = $val;
-               } elseif ( $this->processingArray ) {
-                       if ( $this->itemLang === false ) {
-                               // normal array
-                               $this->results['xmp-' . $info['map_group']][$finalName][] = $val;
-                       } else {
-                               // lang array.
-                               $this->results['xmp-' . $info['map_group']][$finalName][$this->itemLang] = $val;
-                       }
-               } else {
-                       $this->results['xmp-' . $info['map_group']][$finalName] = $val;
-               }
-       }
-}
diff --git a/includes/media/XMPInfo.php b/includes/media/XMPInfo.php
deleted file mode 100644 (file)
index 052be33..0000000
+++ /dev/null
@@ -1,1168 +0,0 @@
-<?php
-/**
- * Definitions for XMPReader class.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Media
- */
-
-/**
- * This class is just a container for a big array
- * used by XMPReader to determine which XMP items to
- * extract.
- */
-class XMPInfo {
-       /** Get the items array
-        * @return array XMP item configuration array.
-        */
-       public static function getItems() {
-               return self::$items;
-       }
-
-       /**
-        * XMPInfo::$items keeps a list of all the items
-        * we are interested to extract, as well as
-        * information about the item like what type
-        * it is.
-        *
-        * Format is an array of namespaces,
-        * each containing an array of tags
-        * each tag is an array of information about the
-        * tag, including:
-        *   * map_group - What group (used for precedence during conflicts).
-        *   * mode - What type of item (self::MODE_SIMPLE usually, see above for
-        *     all values).
-        *   * validate - Method to validate input. Could also post-process the
-        *     input. A string value is assumed to be a method of
-        *     XMPValidate. Can also take a array( 'className', 'methodName' ).
-        *   * choices - Array of potential values (format of 'value' => true ).
-        *     Only used with validateClosed.
-        *   * rangeLow and rangeHigh - Alternative to choices for numeric ranges.
-        *     Again for validateClosed only.
-        *   * children - For MODE_STRUCT items, allowed children.
-        *   * structPart - Indicates that this element can only appear as a member
-        *     of a structure.
-        *
-        * Currently this just has a bunch of EXIF values as this class is only half-done.
-        */
-       static private $items = [
-               'http://ns.adobe.com/exif/1.0/' => [
-                       'ApertureValue' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'BrightnessValue' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'CompressedBitsPerPixel' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'DigitalZoomRatio' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'ExposureBiasValue' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'ExposureIndex' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'ExposureTime' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'FlashEnergy' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational',
-                       ],
-                       'FNumber' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'FocalLength' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'FocalPlaneXResolution' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'FocalPlaneYResolution' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'GPSAltitude' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational',
-                       ],
-                       'GPSDestBearing' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'GPSDestDistance' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'GPSDOP' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'GPSImgDirection' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'GPSSpeed' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'GPSTrack' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'MaxApertureValue' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'ShutterSpeedValue' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       'SubjectDistance' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational'
-                       ],
-                       /* Flash */
-                       'Flash' => [
-                               'mode' => XMPReader::MODE_STRUCT,
-                               'children' => [
-                                       'Fired' => true,
-                                       'Function' => true,
-                                       'Mode' => true,
-                                       'RedEyeMode' => true,
-                                       'Return' => true,
-                               ],
-                               'validate' => 'validateFlash',
-                               'map_group' => 'exif',
-                       ],
-                       'Fired' => [
-                               'map_group' => 'exif',
-                               'validate' => 'validateBoolean',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'Function' => [
-                               'map_group' => 'exif',
-                               'validate' => 'validateBoolean',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'Mode' => [
-                               'map_group' => 'exif',
-                               'validate' => 'validateClosed',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'choices' => [ '0' => true, '1' => true,
-                                       '2' => true, '3' => true ],
-                               'structPart' => true,
-                       ],
-                       'Return' => [
-                               'map_group' => 'exif',
-                               'validate' => 'validateClosed',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'choices' => [ '0' => true,
-                                       '2' => true, '3' => true ],
-                               'structPart' => true,
-                       ],
-                       'RedEyeMode' => [
-                               'map_group' => 'exif',
-                               'validate' => 'validateBoolean',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       /* End Flash */
-                       'ISOSpeedRatings' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SEQ,
-                               'validate' => 'validateInteger'
-                       ],
-                       /* end rational things */
-                       'ColorSpace' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '1' => true, '65535' => true ],
-                       ],
-                       'ComponentsConfiguration' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SEQ,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '1' => true, '2' => true, '3' => true, '4' => true,
-                                       '5' => true, '6' => true ]
-                       ],
-                       'Contrast' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '0' => true, '1' => true, '2' => true ]
-                       ],
-                       'CustomRendered' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '0' => true, '1' => true ]
-                       ],
-                       'DateTimeOriginal' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateDate',
-                       ],
-                       'DateTimeDigitized' => [ /* xmp:CreateDate */
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateDate',
-                       ],
-                       /* todo: there might be interesting information in
-                        * exif:DeviceSettingDescription, but need to find an
-                        * example
-                        */
-                       'ExifVersion' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'ExposureMode' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'rangeLow' => 0,
-                               'rangeHigh' => 2,
-                       ],
-                       'ExposureProgram' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'rangeLow' => 0,
-                               'rangeHigh' => 8,
-                       ],
-                       'FileSource' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '3' => true ]
-                       ],
-                       'FlashpixVersion' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'FocalLengthIn35mmFilm' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateInteger',
-                       ],
-                       'FocalPlaneResolutionUnit' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '2' => true, '3' => true ],
-                       ],
-                       'GainControl' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'rangeLow' => 0,
-                               'rangeHigh' => 4,
-                       ],
-                       /* this value is post-processed out later */
-                       'GPSAltitudeRef' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '0' => true, '1' => true ],
-                       ],
-                       'GPSAreaInformation' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'GPSDestBearingRef' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ 'T' => true, 'M' => true ],
-                       ],
-                       'GPSDestDistanceRef' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ 'K' => true, 'M' => true,
-                                       'N' => true ],
-                       ],
-                       'GPSDestLatitude' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateGPS',
-                       ],
-                       'GPSDestLongitude' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateGPS',
-                       ],
-                       'GPSDifferential' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '0' => true, '1' => true ],
-                       ],
-                       'GPSImgDirectionRef' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ 'T' => true, 'M' => true ],
-                       ],
-                       'GPSLatitude' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateGPS',
-                       ],
-                       'GPSLongitude' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateGPS',
-                       ],
-                       'GPSMapDatum' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'GPSMeasureMode' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '2' => true, '3' => true ]
-                       ],
-                       'GPSProcessingMethod' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'GPSSatellites' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'GPSSpeedRef' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ 'K' => true, 'M' => true,
-                                       'N' => true ],
-                       ],
-                       'GPSStatus' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ 'A' => true, 'V' => true ]
-                       ],
-                       'GPSTimeStamp' => [
-                               'map_group' => 'exif',
-                               // Note: in exif, GPSDateStamp does not include
-                               // the time, where here it does.
-                               'map_name' => 'GPSDateStamp',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateDate',
-                       ],
-                       'GPSTrackRef' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ 'T' => true, 'M' => true ]
-                       ],
-                       'GPSVersionID' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'ImageUniqueID' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'LightSource' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               /* can't use a range, as it skips... */
-                               'choices' => [ '0' => true, '1' => true,
-                                       '2' => true, '3' => true, '4' => true,
-                                       '9' => true, '10' => true, '11' => true,
-                                       '12' => true, '13' => true,
-                                       '14' => true, '15' => true,
-                                       '17' => true, '18' => true,
-                                       '19' => true, '20' => true,
-                                       '21' => true, '22' => true,
-                                       '23' => true, '24' => true,
-                                       '255' => true,
-                               ],
-                       ],
-                       'MeteringMode' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'rangeLow' => 0,
-                               'rangeHigh' => 6,
-                               'choices' => [ '255' => true ],
-                       ],
-                       /* Pixel(X|Y)Dimension are rather useless, but for
-                        * completeness since we do it with exif.
-                        */
-                       'PixelXDimension' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateInteger',
-                       ],
-                       'PixelYDimension' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateInteger',
-                       ],
-                       'Saturation' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'rangeLow' => 0,
-                               'rangeHigh' => 2,
-                       ],
-                       'SceneCaptureType' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'rangeLow' => 0,
-                               'rangeHigh' => 3,
-                       ],
-                       'SceneType' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '1' => true ],
-                       ],
-                       // Note, 6 is not valid SensingMethod.
-                       'SensingMethod' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'rangeLow' => 1,
-                               'rangeHigh' => 5,
-                               'choices' => [ '7' => true, 8 => true ],
-                       ],
-                       'Sharpness' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'rangeLow' => 0,
-                               'rangeHigh' => 2,
-                       ],
-                       'SpectralSensitivity' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       // This tag should perhaps be displayed to user better.
-                       'SubjectArea' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SEQ,
-                               'validate' => 'validateInteger',
-                       ],
-                       'SubjectDistanceRange' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'rangeLow' => 0,
-                               'rangeHigh' => 3,
-                       ],
-                       'SubjectLocation' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SEQ,
-                               'validate' => 'validateInteger',
-                       ],
-                       'UserComment' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_LANG,
-                       ],
-                       'WhiteBalance' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '0' => true, '1' => true ]
-                       ],
-               ],
-               'http://ns.adobe.com/tiff/1.0/' => [
-                       'Artist' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'BitsPerSample' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SEQ,
-                               'validate' => 'validateInteger',
-                       ],
-                       'Compression' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '1' => true, '6' => true ],
-                       ],
-                       /* this prop should not be used in XMP. dc:rights is the correct prop */
-                       'Copyright' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_LANG,
-                       ],
-                       'DateTime' => [ /* proper prop is xmp:ModifyDate */
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateDate',
-                       ],
-                       'ImageDescription' => [ /* proper one is dc:description */
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_LANG,
-                       ],
-                       'ImageLength' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateInteger',
-                       ],
-                       'ImageWidth' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateInteger',
-                       ],
-                       'Make' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'Model' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       /**** Do not extract this property
-                        * It interferes with auto exif rotation.
-                        * 'Orientation'       => array(
-                        *    'map_group' => 'exif',
-                        *    'mode'      => XMPReader::MODE_SIMPLE,
-                        *    'validate'  => 'validateClosed',
-                        *    'choices'   => array( '1' => true, '2' => true, '3' => true, '4' => true, 5 => true,
-                        *            '6' => true, '7' => true, '8' => true ),
-                        *),
-                        ******/
-                       'PhotometricInterpretation' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '2' => true, '6' => true ],
-                       ],
-                       'PlanerConfiguration' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '1' => true, '2' => true ],
-                       ],
-                       'PrimaryChromaticities' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SEQ,
-                               'validate' => 'validateRational',
-                       ],
-                       'ReferenceBlackWhite' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SEQ,
-                               'validate' => 'validateRational',
-                       ],
-                       'ResolutionUnit' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '2' => true, '3' => true ],
-                       ],
-                       'SamplesPerPixel' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateInteger',
-                       ],
-                       'Software' => [ /* see xmp:CreatorTool */
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       /* ignore TransferFunction */
-                       'WhitePoint' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SEQ,
-                               'validate' => 'validateRational',
-                       ],
-                       'XResolution' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational',
-                       ],
-                       'YResolution' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRational',
-                       ],
-                       'YCbCrCoefficients' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SEQ,
-                               'validate' => 'validateRational',
-                       ],
-                       'YCbCrPositioning' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateClosed',
-                               'choices' => [ '1' => true, '2' => true ],
-                       ],
-                       /********
-                        * Disable extracting this property (bug 31944)
-                        * Several files have a string instead of a Seq
-                        * for this property. XMPReader doesn't handle
-                        * mismatched types very gracefully (it marks
-                        * the entire file as invalid, instead of just
-                        * the relavent prop). Since this prop
-                        * doesn't communicate all that useful information
-                        * just disable this prop for now, until such
-                        * XMPReader is more graceful (bug 32172)
-                        * 'YCbCrSubSampling'  => array(
-                        *    'map_group' => 'exif',
-                        *    'mode'      => XMPReader::MODE_SEQ,
-                        *    'validate'  => 'validateClosed',
-                        *    'choices'   => array( '1' => true, '2' => true ),
-                        * ),
-                        */
-               ],
-               'http://ns.adobe.com/exif/1.0/aux/' => [
-                       'Lens' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'SerialNumber' => [
-                               'map_group' => 'exif',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'OwnerName' => [
-                               'map_group' => 'exif',
-                               'map_name' => 'CameraOwnerName',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-               ],
-               'http://purl.org/dc/elements/1.1/' => [
-                       'title' => [
-                               'map_group' => 'general',
-                               'map_name' => 'ObjectName',
-                               'mode' => XMPReader::MODE_LANG
-                       ],
-                       'description' => [
-                               'map_group' => 'general',
-                               'map_name' => 'ImageDescription',
-                               'mode' => XMPReader::MODE_LANG
-                       ],
-                       'contributor' => [
-                               'map_group' => 'general',
-                               'map_name' => 'dc-contributor',
-                               'mode' => XMPReader::MODE_BAG
-                       ],
-                       'coverage' => [
-                               'map_group' => 'general',
-                               'map_name' => 'dc-coverage',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'creator' => [
-                               'map_group' => 'general',
-                               'map_name' => 'Artist', // map with exif Artist, iptc byline (2:80)
-                               'mode' => XMPReader::MODE_SEQ,
-                       ],
-                       'date' => [
-                               'map_group' => 'general',
-                               // Note, not mapped with other date properties, as this type of date is
-                               // non-specific: "A point or period of time associated with an event in
-                               //  the lifecycle of the resource"
-                               'map_name' => 'dc-date',
-                               'mode' => XMPReader::MODE_SEQ,
-                               'validate' => 'validateDate',
-                       ],
-                       /* Do not extract dc:format, as we've got better ways to determine MIME type */
-                       'identifier' => [
-                               'map_group' => 'deprecated',
-                               'map_name' => 'Identifier',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'language' => [
-                               'map_group' => 'general',
-                               'map_name' => 'LanguageCode', /* mapped with iptc 2:135 */
-                               'mode' => XMPReader::MODE_BAG,
-                               'validate' => 'validateLangCode',
-                       ],
-                       'publisher' => [
-                               'map_group' => 'general',
-                               'map_name' => 'dc-publisher',
-                               'mode' => XMPReader::MODE_BAG,
-                       ],
-                       // for related images/resources
-                       'relation' => [
-                               'map_group' => 'general',
-                               'map_name' => 'dc-relation',
-                               'mode' => XMPReader::MODE_BAG,
-                       ],
-                       'rights' => [
-                               'map_group' => 'general',
-                               'map_name' => 'Copyright',
-                               'mode' => XMPReader::MODE_LANG,
-                       ],
-                       // Note: source is not mapped with iptc source, since iptc
-                       // source describes the source of the image in terms of a person
-                       // who provided the image, where this is to describe an image that the
-                       // current one is based on.
-                       'source' => [
-                               'map_group' => 'general',
-                               'map_name' => 'dc-source',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'subject' => [
-                               'map_group' => 'general',
-                               'map_name' => 'Keywords', /* maps to iptc 2:25 */
-                               'mode' => XMPReader::MODE_BAG,
-                       ],
-                       'type' => [
-                               'map_group' => 'general',
-                               'map_name' => 'dc-type',
-                               'mode' => XMPReader::MODE_BAG,
-                       ],
-               ],
-               'http://ns.adobe.com/xap/1.0/' => [
-                       'CreateDate' => [
-                               'map_group' => 'general',
-                               'map_name' => 'DateTimeDigitized',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateDate',
-                       ],
-                       'CreatorTool' => [
-                               'map_group' => 'general',
-                               'map_name' => 'Software',
-                               'mode' => XMPReader::MODE_SIMPLE
-                       ],
-                       'Identifier' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_BAG,
-                       ],
-                       'Label' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'ModifyDate' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'DateTime',
-                               'validate' => 'validateDate',
-                       ],
-                       'MetadataDate' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               // map_name to be consistent with other date names.
-                               'map_name' => 'DateTimeMetadata',
-                               'validate' => 'validateDate',
-                       ],
-                       'Nickname' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'Rating' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateRating',
-                       ],
-               ],
-               'http://ns.adobe.com/xap/1.0/rights/' => [
-                       'Certificate' => [
-                               'map_group' => 'general',
-                               'map_name' => 'RightsCertificate',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'Marked' => [
-                               'map_group' => 'general',
-                               'map_name' => 'Copyrighted',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateBoolean',
-                       ],
-                       'Owner' => [
-                               'map_group' => 'general',
-                               'map_name' => 'CopyrightOwner',
-                               'mode' => XMPReader::MODE_BAG,
-                       ],
-                       // this seems similar to dc:rights.
-                       'UsageTerms' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_LANG,
-                       ],
-                       'WebStatement' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-               ],
-               // XMP media management.
-               'http://ns.adobe.com/xap/1.0/mm/' => [
-                       // if we extract the exif UniqueImageID, might
-                       // as well do this too.
-                       'OriginalDocumentID' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       // It might also be useful to do xmpMM:LastURL
-                       // and xmpMM:DerivedFrom as you can potentially,
-                       // get the url of this document/source for this
-                       // document. However whats more likely is you'd
-                       // get a file:// url for the path of the doc,
-                       // which is somewhat of a privacy issue.
-               ],
-               'http://creativecommons.org/ns#' => [
-                       'license' => [
-                               'map_name' => 'LicenseUrl',
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'morePermissions' => [
-                               'map_name' => 'MorePermissionsUrl',
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'attributionURL' => [
-                               'map_group' => 'general',
-                               'map_name' => 'AttributionUrl',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'attributionName' => [
-                               'map_group' => 'general',
-                               'map_name' => 'PreferredAttributionName',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-               ],
-               // Note, this property affects how jpeg metadata is extracted.
-               'http://ns.adobe.com/xmp/note/' => [
-                       'HasExtendedXMP' => [
-                               'map_group' => 'special',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-               ],
-               /* Note, in iptc schemas, the legacy properties are denoted
-                * as deprecated, since other properties should used instead,
-                * and properties marked as deprecated in the standard are
-                * are marked as general here as they don't have replacements
-                */
-               'http://ns.adobe.com/photoshop/1.0/' => [
-                       'City' => [
-                               'map_group' => 'deprecated',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'CityDest',
-                       ],
-                       'Country' => [
-                               'map_group' => 'deprecated',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'CountryDest',
-                       ],
-                       'State' => [
-                               'map_group' => 'deprecated',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'ProvinceOrStateDest',
-                       ],
-                       'DateCreated' => [
-                               'map_group' => 'deprecated',
-                               // marking as deprecated as the xmp prop preferred
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'DateTimeOriginal',
-                               'validate' => 'validateDate',
-                               // note this prop is an XMP, not IPTC date
-                       ],
-                       'CaptionWriter' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'Writer',
-                       ],
-                       'Instructions' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'SpecialInstructions',
-                       ],
-                       'TransmissionReference' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'OriginalTransmissionRef',
-                       ],
-                       'AuthorsPosition' => [
-                               /* This corresponds with 2:85
-                                * By-line Title, which needs to be
-                                * handled weirdly to correspond
-                                * with iptc/exif. */
-                               'map_group' => 'special',
-                               'mode' => XMPReader::MODE_SIMPLE
-                       ],
-                       'Credit' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'Source' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'Urgency' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'Category' => [
-                               // Note, this prop is deprecated, but in general
-                               // group since it doesn't have a replacement.
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'iimCategory',
-                       ],
-                       'SupplementalCategories' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_BAG,
-                               'map_name' => 'iimSupplementalCategory',
-                       ],
-                       'Headline' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE
-                       ],
-               ],
-               'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/' => [
-                       'CountryCode' => [
-                               'map_group' => 'deprecated',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'CountryCodeDest',
-                       ],
-                       'IntellectualGenre' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       // Note, this is a six digit code.
-                       // See: http://cv.iptc.org/newscodes/scene/
-                       // Since these aren't really all that common,
-                       // we just show the number.
-                       'Scene' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_BAG,
-                               'validate' => 'validateInteger',
-                               'map_name' => 'SceneCode',
-                       ],
-                       /* Note: SubjectCode should be an 8 ascii digits.
-                        * it is not really an integer (has leading 0's,
-                        * cannot have a +/- sign), but validateInteger
-                        * will let it through.
-                        */
-                       'SubjectCode' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_BAG,
-                               'map_name' => 'SubjectNewsCode',
-                               'validate' => 'validateInteger'
-                       ],
-                       'Location' => [
-                               'map_group' => 'deprecated',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'map_name' => 'SublocationDest',
-                       ],
-                       'CreatorContactInfo' => [
-                               /* Note this maps to 2:118 in iim
-                                * (Contact) field. However those field
-                                * types are slightly different - 2:118
-                                * is free form text field, where this
-                                * is more structured.
-                                */
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_STRUCT,
-                               'map_name' => 'Contact',
-                               'children' => [
-                                       'CiAdrExtadr' => true,
-                                       'CiAdrCity' => true,
-                                       'CiAdrCtry' => true,
-                                       'CiEmailWork' => true,
-                                       'CiTelWork' => true,
-                                       'CiAdrPcode' => true,
-                                       'CiAdrRegion' => true,
-                                       'CiUrlWork' => true,
-                               ],
-                       ],
-                       'CiAdrExtadr' => [ /* address */
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'CiAdrCity' => [ /* city */
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'CiAdrCtry' => [ /* country */
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'CiEmailWork' => [ /* email (possibly separated by ',') */
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'CiTelWork' => [ /* telephone */
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'CiAdrPcode' => [ /* postal code */
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'CiAdrRegion' => [ /* province/state */
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'CiUrlWork' => [ /* url. Multiple may be separated by comma. */
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       /* End contact info struct properties */
-               ],
-               'http://iptc.org/std/Iptc4xmpExt/2008-02-29/' => [
-                       'Event' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                       ],
-                       'OrganisationInImageName' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_BAG,
-                               'map_name' => 'OrganisationInImage'
-                       ],
-                       'PersonInImage' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_BAG,
-                       ],
-                       'MaxAvailHeight' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateInteger',
-                               'map_name' => 'OriginalImageHeight',
-                       ],
-                       'MaxAvailWidth' => [
-                               'map_group' => 'general',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'validate' => 'validateInteger',
-                               'map_name' => 'OriginalImageWidth',
-                       ],
-                       // LocationShown and LocationCreated are handled
-                       // specially because they are hierarchical, but we
-                       // also want to merge with the old non-hierarchical.
-                       'LocationShown' => [
-                               'map_group' => 'special',
-                               'mode' => XMPReader::MODE_BAGSTRUCT,
-                               'children' => [
-                                       'WorldRegion' => true,
-                                       'CountryCode' => true, /* iso code */
-                                       'CountryName' => true,
-                                       'ProvinceState' => true,
-                                       'City' => true,
-                                       'Sublocation' => true,
-                               ],
-                       ],
-                       'LocationCreated' => [
-                               'map_group' => 'special',
-                               'mode' => XMPReader::MODE_BAGSTRUCT,
-                               'children' => [
-                                       'WorldRegion' => true,
-                                       'CountryCode' => true, /* iso code */
-                                       'CountryName' => true,
-                                       'ProvinceState' => true,
-                                       'City' => true,
-                                       'Sublocation' => true,
-                               ],
-                       ],
-                       'WorldRegion' => [
-                               'map_group' => 'special',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'CountryCode' => [
-                               'map_group' => 'special',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'CountryName' => [
-                               'map_group' => 'special',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                               'map_name' => 'Country',
-                       ],
-                       'ProvinceState' => [
-                               'map_group' => 'special',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                               'map_name' => 'ProvinceOrState',
-                       ],
-                       'City' => [
-                               'map_group' => 'special',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-                       'Sublocation' => [
-                               'map_group' => 'special',
-                               'mode' => XMPReader::MODE_SIMPLE,
-                               'structPart' => true,
-                       ],
-
-                       /* Other props that might be interesting but
-                        * Not currently extracted:
-                        * ArtworkOrObject, (info about objects in picture)
-                        * DigitalSourceType
-                        * RegistryId
-                        */
-               ],
-
-               /* Plus props we might want to consider:
-                * (Note: some of these have unclear/incomplete definitions
-                * from the iptc4xmp standard).
-                * ImageSupplier (kind of like iptc source field)
-                * ImageSupplierId (id code for image from supplier)
-                * CopyrightOwner
-                * ImageCreator
-                * Licensor
-                * Various model release fields
-                * Property release fields.
-                */
-       ];
-}
diff --git a/includes/media/XMPValidate.php b/includes/media/XMPValidate.php
deleted file mode 100644 (file)
index fe47f47..0000000
+++ /dev/null
@@ -1,398 +0,0 @@
-<?php
-/**
- * Methods for validating XMP properties.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Media
- */
-
-use Psr\Log\LoggerInterface;
-use Psr\Log\LoggerAwareInterface;
-
-/**
- * This contains some static methods for
- * validating XMP properties. See XMPInfo and XMPReader classes.
- *
- * Each of these functions take the same parameters
- * * an info array which is a subset of the XMPInfo::items array
- * * A value (passed as reference) to validate. This can be either a
- *    simple value or an array
- * * A boolean to determine if this is validating a simple or complex values
- *
- * It should be noted that when an array is being validated, typically the validation
- * function is called once for each value, and then once at the end for the entire array.
- *
- * These validation functions can also be used to modify the data. See the gps and flash one's
- * for example.
- *
- * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart1.pdf starting at pg 28
- * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart2.pdf starting at pg 11
- */
-class XMPValidate implements LoggerAwareInterface {
-
-       /**
-        * @var LoggerInterface
-        */
-       private $logger;
-
-       public function __construct( LoggerInterface $logger ) {
-               $this->setLogger( $logger );
-       }
-
-       public function setLogger( LoggerInterface $logger ) {
-               $this->logger = $logger;
-       }
-       /**
-        * Function to validate boolean properties ( True or False )
-        *
-        * @param array $info Information about current property
-        * @param mixed &$val Current value to validate
-        * @param bool $standalone If this is a simple property or array
-        */
-       public function validateBoolean( $info, &$val, $standalone ) {
-               if ( !$standalone ) {
-                       // this only validates standalone properties, not arrays, etc
-                       return;
-               }
-               if ( $val !== 'True' && $val !== 'False' ) {
-                       $this->logger->info( __METHOD__ . " Expected True or False but got $val" );
-                       $val = null;
-               }
-       }
-
-       /**
-        * function to validate rational properties ( 12/10 )
-        *
-        * @param array $info Information about current property
-        * @param mixed &$val Current value to validate
-        * @param bool $standalone If this is a simple property or array
-        */
-       public function validateRational( $info, &$val, $standalone ) {
-               if ( !$standalone ) {
-                       // this only validates standalone properties, not arrays, etc
-                       return;
-               }
-               if ( !preg_match( '/^(?:-?\d+)\/(?:\d+[1-9]|[1-9]\d*)$/D', $val ) ) {
-                       $this->logger->info( __METHOD__ . " Expected rational but got $val" );
-                       $val = null;
-               }
-       }
-
-       /**
-        * function to validate rating properties -1, 0-5
-        *
-        * if its outside of range put it into range.
-        *
-        * @see MWG spec
-        * @param array $info Information about current property
-        * @param mixed &$val Current value to validate
-        * @param bool $standalone If this is a simple property or array
-        */
-       public function validateRating( $info, &$val, $standalone ) {
-               if ( !$standalone ) {
-                       // this only validates standalone properties, not arrays, etc
-                       return;
-               }
-               if ( !preg_match( '/^[-+]?\d*(?:\.?\d*)$/D', $val )
-                       || !is_numeric( $val )
-               ) {
-                       $this->logger->info( __METHOD__ . " Expected rating but got $val" );
-                       $val = null;
-
-                       return;
-               } else {
-                       $nVal = (float)$val;
-                       if ( $nVal < 0 ) {
-                               // We do < 0 here instead of < -1 here, since
-                               // the values between 0 and -1 are also illegal
-                               // as -1 is meant as a special reject rating.
-                               $this->logger->info( __METHOD__ . " Rating too low, setting to -1 (Rejected)" );
-                               $val = '-1';
-
-                               return;
-                       }
-                       if ( $nVal > 5 ) {
-                               $this->logger->info( __METHOD__ . " Rating too high, setting to 5" );
-                               $val = '5';
-
-                               return;
-                       }
-               }
-       }
-
-       /**
-        * function to validate integers
-        *
-        * @param array $info Information about current property
-        * @param mixed &$val Current value to validate
-        * @param bool $standalone If this is a simple property or array
-        */
-       public function validateInteger( $info, &$val, $standalone ) {
-               if ( !$standalone ) {
-                       // this only validates standalone properties, not arrays, etc
-                       return;
-               }
-               if ( !preg_match( '/^[-+]?\d+$/D', $val ) ) {
-                       $this->logger->info( __METHOD__ . " Expected integer but got $val" );
-                       $val = null;
-               }
-       }
-
-       /**
-        * function to validate properties with a fixed number of allowed
-        * choices. (closed choice)
-        *
-        * @param array $info Information about current property
-        * @param mixed &$val Current value to validate
-        * @param bool $standalone If this is a simple property or array
-        */
-       public function validateClosed( $info, &$val, $standalone ) {
-               if ( !$standalone ) {
-                       // this only validates standalone properties, not arrays, etc
-                       return;
-               }
-
-               // check if its in a numeric range
-               $inRange = false;
-               if ( isset( $info['rangeLow'] )
-                       && isset( $info['rangeHigh'] )
-                       && is_numeric( $val )
-                       && ( intval( $val ) <= $info['rangeHigh'] )
-                       && ( intval( $val ) >= $info['rangeLow'] )
-               ) {
-                       $inRange = true;
-               }
-
-               if ( !isset( $info['choices'][$val] ) && !$inRange ) {
-                       $this->logger->info( __METHOD__ . " Expected closed choice, but got $val" );
-                       $val = null;
-               }
-       }
-
-       /**
-        * function to validate and modify flash structure
-        *
-        * @param array $info Information about current property
-        * @param mixed &$val Current value to validate
-        * @param bool $standalone If this is a simple property or array
-        */
-       public function validateFlash( $info, &$val, $standalone ) {
-               if ( $standalone ) {
-                       // this only validates flash structs, not individual properties
-                       return;
-               }
-               if ( !( isset( $val['Fired'] )
-                       && isset( $val['Function'] )
-                       && isset( $val['Mode'] )
-                       && isset( $val['RedEyeMode'] )
-                       && isset( $val['Return'] )
-               ) ) {
-                       $this->logger->info( __METHOD__ . " Flash structure did not have all the required components" );
-                       $val = null;
-               } else {
-                       $val = ( "\0" | ( $val['Fired'] === 'True' )
-                               | ( intval( $val['Return'] ) << 1 )
-                               | ( intval( $val['Mode'] ) << 3 )
-                               | ( ( $val['Function'] === 'True' ) << 5 )
-                               | ( ( $val['RedEyeMode'] === 'True' ) << 6 ) );
-               }
-       }
-
-       /**
-        * function to validate LangCode properties ( en-GB, etc )
-        *
-        * This is just a naive check to make sure it somewhat looks like a lang code.
-        *
-        * @see BCP 47
-        * @see https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/
-        *      XMP%20SDK%20Release%20cc-2014-12/XMPSpecificationPart1.pdf page 22 (section 8.2.2.4)
-        *
-        * @param array $info Information about current property
-        * @param mixed &$val Current value to validate
-        * @param bool $standalone If this is a simple property or array
-        */
-       public function validateLangCode( $info, &$val, $standalone ) {
-               if ( !$standalone ) {
-                       // this only validates standalone properties, not arrays, etc
-                       return;
-               }
-               if ( !preg_match( '/^[-A-Za-z0-9]{2,}$/D', $val ) ) {
-                       // this is a rather naive check.
-                       $this->logger->info( __METHOD__ . " Expected Lang code but got $val" );
-                       $val = null;
-               }
-       }
-
-       /**
-        * function to validate date properties, and convert to (partial) Exif format.
-        *
-        * Dates can be one of the following formats:
-        * YYYY
-        * YYYY-MM
-        * YYYY-MM-DD
-        * YYYY-MM-DDThh:mmTZD
-        * YYYY-MM-DDThh:mm:ssTZD
-        * YYYY-MM-DDThh:mm:ss.sTZD
-        *
-        * @param array $info Information about current property
-        * @param mixed &$val Current value to validate. Converts to TS_EXIF as a side-effect.
-        *    in cases where there's only a partial date, it will give things like
-        *    2011:04.
-        * @param bool $standalone If this is a simple property or array
-        */
-       public function validateDate( $info, &$val, $standalone ) {
-               if ( !$standalone ) {
-                       // this only validates standalone properties, not arrays, etc
-                       return;
-               }
-               $res = [];
-               // @codingStandardsIgnoreStart Long line that cannot be broken
-               if ( !preg_match(
-                       /* ahh! scary regex... */
-                       '/^([0-3]\d{3})(?:-([01]\d)(?:-([0-3]\d)(?:T([0-2]\d):([0-6]\d)(?::([0-6]\d)(?:\.\d+)?)?([-+]\d{2}:\d{2}|Z)?)?)?)?$/D',
-                       $val, $res )
-               ) {
-                       // @codingStandardsIgnoreEnd
-
-                       $this->logger->info( __METHOD__ . " Expected date but got $val" );
-                       $val = null;
-               } else {
-                       /*
-                        * $res is formatted as follows:
-                        * 0 -> full date.
-                        * 1 -> year, 2-> month, 3-> day, 4-> hour, 5-> minute, 6->second
-                        * 7-> Timezone specifier (Z or something like +12:30 )
-                        * many parts are optional, some aren't. For example if you specify
-                        * minute, you must specify hour, day, month, and year but not second or TZ.
-                        */
-
-                       /*
-                        * First of all, if year = 0000, Something is wrongish,
-                        * so don't extract. This seems to happen when
-                        * some programs convert between metadata formats.
-                        */
-                       if ( $res[1] === '0000' ) {
-                               $this->logger->info( __METHOD__ . " Invalid date (year 0): $val" );
-                               $val = null;
-
-                               return;
-                       }
-
-                       if ( !isset( $res[4] ) ) { // hour
-                               // just have the year month day (if that)
-                               $val = $res[1];
-                               if ( isset( $res[2] ) ) {
-                                       $val .= ':' . $res[2];
-                               }
-                               if ( isset( $res[3] ) ) {
-                                       $val .= ':' . $res[3];
-                               }
-
-                               return;
-                       }
-
-                       if ( !isset( $res[7] ) || $res[7] === 'Z' ) {
-                               // if hour is set, then minute must also be or regex above will fail.
-                               $val = $res[1] . ':' . $res[2] . ':' . $res[3]
-                                       . ' ' . $res[4] . ':' . $res[5];
-                               if ( isset( $res[6] ) && $res[6] !== '' ) {
-                                       $val .= ':' . $res[6];
-                               }
-
-                               return;
-                       }
-
-                       // Extra check for empty string necessary due to TZ but no second case.
-                       $stripSeconds = false;
-                       if ( !isset( $res[6] ) || $res[6] === '' ) {
-                               $res[6] = '00';
-                               $stripSeconds = true;
-                       }
-
-                       // Do timezone processing. We've already done the case that tz = Z.
-
-                       // We know that if we got to this step, year, month day hour and min must be set
-                       // by virtue of regex not failing.
-
-                       $unix = wfTimestamp( TS_UNIX, $res[1] . $res[2] . $res[3] . $res[4] . $res[5] . $res[6] );
-                       $offset = intval( substr( $res[7], 1, 2 ) ) * 60 * 60;
-                       $offset += intval( substr( $res[7], 4, 2 ) ) * 60;
-                       if ( substr( $res[7], 0, 1 ) === '-' ) {
-                               $offset = -$offset;
-                       }
-                       $val = wfTimestamp( TS_EXIF, $unix + $offset );
-
-                       if ( $stripSeconds ) {
-                               // If seconds weren't specified, remove the trailing ':00'.
-                               $val = substr( $val, 0, -3 );
-                       }
-               }
-       }
-
-       /** function to validate, and more importantly
-        * translate the XMP DMS form of gps coords to
-        * the decimal form we use.
-        *
-        * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart2.pdf
-        *        section 1.2.7.4 on page 23
-        *
-        * @param array $info Unused (info about prop)
-        * @param string &$val GPS string in either DDD,MM,SSk or
-        *   or DDD,MM.mmk form
-        * @param bool $standalone If its a simple prop (should always be true)
-        */
-       public function validateGPS( $info, &$val, $standalone ) {
-               if ( !$standalone ) {
-                       return;
-               }
-
-               $m = [];
-               if ( preg_match(
-                       '/(\d{1,3}),(\d{1,2}),(\d{1,2})([NWSE])/D',
-                       $val, $m )
-               ) {
-                       $coord = intval( $m[1] );
-                       $coord += intval( $m[2] ) * ( 1 / 60 );
-                       $coord += intval( $m[3] ) * ( 1 / 3600 );
-                       if ( $m[4] === 'S' || $m[4] === 'W' ) {
-                               $coord = -$coord;
-                       }
-                       $val = $coord;
-
-                       return;
-               } elseif ( preg_match(
-                       '/(\d{1,3}),(\d{1,2}(?:.\d*)?)([NWSE])/D',
-                       $val, $m )
-               ) {
-                       $coord = intval( $m[1] );
-                       $coord += floatval( $m[2] ) * ( 1 / 60 );
-                       if ( $m[3] === 'S' || $m[3] === 'W' ) {
-                               $coord = -$coord;
-                       }
-                       $val = $coord;
-
-                       return;
-               } else {
-                       $this->logger->info( __METHOD__
-                               . " Expected GPSCoordinate, but got $val." );
-                       $val = null;
-
-                       return;
-               }
-       }
-}
diff --git a/includes/mime.info b/includes/mime.info
deleted file mode 100644 (file)
index b04d3c6..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-# MIME type info file.
-# the first MIME type in each line is the "main" MIME type,
-# the others are aliases for this type
-# the media type is given in upper case and square brackets,
-# like [BITMAP], and must indicate a media type as defined by
-# the MEDIATYPE_xxx constants in Defines.php
-
-
-image/gif      [BITMAP]
-image/png image/x-png  [BITMAP]
-image/ief      [BITMAP]
-image/jpeg image/pjpeg [BITMAP]
-image/jp2      [BITMAP]
-image/xbm      [BITMAP]
-image/tiff     [BITMAP]
-image/x-icon image/x-ico image/vnd.microsoft.icon      [BITMAP]
-image/x-rgb    [BITMAP]
-image/x-portable-pixmap                [BITMAP]
-image/x-portable-graymap image/x-portable-greymap      [BITMAP]
-image/x-bmp image/x-ms-bmp image/bmp application/x-bmp application/bmp [BITMAP]
-image/x-photoshop image/psd image/x-psd image/photoshop image/vnd.adobe.photoshop      [BITMAP]
-image/vnd.djvu image/x.djvu image/x-djvu [BITMAP]
-image/webp     [BITMAP]
-
-image/svg+xml application/svg+xml application/svg image/svg    [DRAWING]
-application/postscript [DRAWING]
-application/x-latex    [DRAWING]
-application/x-tex      [DRAWING]
-application/x-dia-diagram [DRAWING]
-
-
-audio/mpeg audio/mp3 audio/mpeg3       [AUDIO]
-audio/mp4                              [AUDIO]
-audio/wav audio/x-wav audio/wave       [AUDIO]
-audio/midi audio/mid   [AUDIO]
-audio/basic            [AUDIO]
-audio/ogg              [AUDIO]
-audio/x-aiff           [AUDIO]
-audio/x-pn-realaudio   [AUDIO]
-audio/x-realaudio      [AUDIO]
-audio/webm             [AUDIO]
-audio/x-matroska       [AUDIO]
-audio/x-flac           [AUDIO]
-audio/flac             [AUDIO]
-
-video/mpeg application/mpeg    [VIDEO]
-video/ogg                      [VIDEO]
-video/x-sgi-video              [VIDEO]
-video/x-flv                    [VIDEO]
-video/webm                     [VIDEO]
-video/x-matroska               [VIDEO]
-video/mp4                      [VIDEO]
-
-application/ogg application/x-ogg audio/ogg audio/x-ogg video/ogg video/x-ogg          [MULTIMEDIA]
-
-application/x-shockwave-flash  [MULTIMEDIA]
-audio/x-pn-realaudio-plugin    [MULTIMEDIA]
-model/iges     [MULTIMEDIA]
-model/mesh     [MULTIMEDIA]
-model/vrml     [MULTIMEDIA]
-video/quicktime        [MULTIMEDIA]
-video/x-msvideo        [MULTIMEDIA]
-
-text/plain     [TEXT]
-text/html application/xhtml+xml        [TEXT]
-application/xml text/xml       [TEXT]
-text   [TEXT]
-application/json       [TEXT]
-text/csv       [TEXT]
-text/tab-separated-values      [TEXT]
-
-application/zip application/x-zip      [ARCHIVE]
-application/x-gzip     [ARCHIVE]
-application/x-bzip     [ARCHIVE]
-application/x-bzip2    [ARCHIVE]
-application/x-tar      [ARCHIVE]
-application/x-stuffit  [ARCHIVE]
-application/x-opc+zip  [ARCHIVE]
-application/x-7z-compressed [ARCHIVE]
-
-application/javascript text/javascript application/x-javascript application/x-ecmascript text/ecmascript       [EXECUTABLE]
-application/x-bash     [EXECUTABLE]
-application/x-sh       [EXECUTABLE]
-application/x-csh      [EXECUTABLE]
-application/x-tcsh     [EXECUTABLE]
-application/x-tcl      [EXECUTABLE]
-application/x-perl     [EXECUTABLE]
-application/x-python   [EXECUTABLE]
-
-application/pdf application/acrobat    [OFFICE]
-application/msword             [OFFICE]
-application/vnd.ms-excel       [OFFICE]
-application/vnd.ms-powerpoint  [OFFICE]
-application/x-director         [OFFICE]
-text/rtf                       [OFFICE]
-
-application/vnd.openxmlformats-officedocument.wordprocessingml.document        [OFFICE]
-application/vnd.openxmlformats-officedocument.wordprocessingml.template                [OFFICE]
-application/vnd.ms-word.document.macroEnabled.12                               [OFFICE]
-application/vnd.ms-word.template.macroEnabled.12                               [OFFICE]
-application/vnd.openxmlformats-officedocument.presentationml.template          [OFFICE]
-application/vnd.openxmlformats-officedocument.presentationml.slideshow         [OFFICE]
-application/vnd.openxmlformats-officedocument.presentationml.presentation      [OFFICE]
-application/vnd.ms-powerpoint.addin.macroEnabled.12                            [OFFICE]
-application/vnd.ms-powerpoint.presentation.macroEnabled.12                     [OFFICE]
-application/vnd.ms-powerpoint.presentation.macroEnabled.12                     [OFFICE]
-application/vnd.ms-powerpoint.slideshow.macroEnabled.12                                [OFFICE]
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet              [OFFICE]
-application/vnd.openxmlformats-officedocument.spreadsheetml.template           [OFFICE]
-application/vnd.ms-excel.sheet.macroEnabled.12                                 [OFFICE]
-application/vnd.ms-excel.template.macroEnabled.12                              [OFFICE]
-application/vnd.ms-excel.addin.macroEnabled.12                                 [OFFICE]
-application/vnd.ms-excel.sheet.binary.macroEnabled.12                          [OFFICE]
-application/acad application/x-acad application/autocad_dwg image/x-dwg application/dwg application/x-dwg application/x-autocad image/vnd.dwg drawing/dwg [DRAWING]
-chemical/x-mdl-molfile     [DRAWING]
-chemical/x-mdl-sdfile      [DRAWING]
-chemical/x-mdl-rxnfile     [DRAWING]
-chemical/x-mdl-rdfile      [DRAWING]
-chemical/x-mdl-rgfile      [DRAWING]
diff --git a/includes/mime.types b/includes/mime.types
deleted file mode 100644 (file)
index b4f515a..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-application/acad dwg
-application/andrew-inset ez
-application/mac-binhex40 hqx
-application/mac-compactpro cpt
-application/mathml+xml mathml
-application/msword doc dot
-application/octet-stream bin dms lha lzh exe class so dll
-application/oda oda
-application/ogg ogx ogg ogm ogv oga spx opus
-application/pdf pdf
-application/postscript ai eps ps
-application/rdf+xml rdf
-application/smil smi smil
-application/srgs gram
-application/srgs+xml grxml
-application/vnd.mif mif
-application/vnd.ms-excel xls xlt xla
-application/vnd.ms-powerpoint ppt pot pps ppa
-application/vnd.wap.wbxml wbxml
-application/vnd.wap.wmlc wmlc
-application/vnd.wap.wmlscriptc wmlsc
-application/voicexml+xml vxml
-application/x-7z-compressed 7z
-application/x-bcpio bcpio
-application/x-bzip bz
-application/x-bzip2 bz2
-application/x-cdlink vcd
-application/x-chess-pgn pgn
-application/x-cpio cpio
-application/x-csh csh
-application/x-dia-diagram dia
-application/x-director dcr dir dxr
-application/x-dvi dvi
-application/x-futuresplash spl
-application/x-gtar gtar tar
-application/x-gzip gz
-application/x-hdf hdf
-application/x-jar jar
-application/javascript js
-application/json json
-application/x-koan skp skd skt skm
-application/x-latex latex
-application/x-netcdf nc cdf
-application/x-sh sh
-application/x-shar shar
-application/x-shockwave-flash swf
-application/x-stuffit sit
-application/x-sv4cpio sv4cpio
-application/x-sv4crc sv4crc
-application/x-tar tar
-application/x-tcl tcl
-application/x-tex tex
-application/x-texinfo texinfo texi
-application/x-troff t tr roff
-application/x-troff-man man
-application/x-troff-me me
-application/x-troff-ms ms
-application/x-ustar ustar
-application/x-wais-source src
-application/x-xpinstall xpi
-application/xhtml+xml xhtml xht
-application/xslt+xml xslt
-application/xml xml xsl xsd kml
-application/xml-dtd dtd
-application/zip zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw
-application/x-rar rar
-application/font-woff woff
-application/font-woff2 woff2
-application/vnd.ms-fontobject eot
-application/x-font-ttf ttf
-audio/basic au snd
-audio/midi mid midi kar
-audio/mpeg mpga mp2 mp3
-audio/ogg oga ogg spx opus
-video/webm webm
-audio/webm webm
-audio/x-aiff aif aiff aifc
-audio/x-matroska mka mkv
-audio/x-mpegurl m3u
-audio/x-ogg oga ogg spx opus
-audio/x-pn-realaudio ram rm
-audio/x-pn-realaudio-plugin rpm
-audio/x-realaudio ra
-audio/x-wav wav
-audio/wav wav
-audio/x-flac flac
-audio/flac flac
-chemical/x-pdb pdb
-chemical/x-xyz xyz
-image/bmp bmp
-image/cgm cgm
-image/gif gif
-image/ief ief
-image/jp2 j2k jp2 jpg2
-image/jpeg jpeg jpg jpe
-image/png png apng
-image/svg+xml svg
-image/tiff tiff tif
-image/vnd.djvu djvu djv
-image/vnd.microsoft.icon ico
-image/vnd.wap.wbmp wbmp
-image/webp webp
-image/x-cmu-raster ras
-image/x-icon ico
-image/x-ms-bmp bmp
-image/x-portable-anymap pnm
-image/x-portable-bitmap pbm
-image/x-portable-graymap pgm
-image/x-portable-pixmap ppm
-image/x-rgb rgb
-image/x-photoshop psd
-image/x-xbitmap xbm
-image/x-xpixmap xpm
-image/x-xwindowdump xwd
-model/iges igs iges
-model/mesh msh mesh silo
-model/vrml wrl vrml
-text/calendar ics ifb
-text/css css
-text/csv csv
-text/html html htm
-text/plain txt
-text/richtext rtx
-text/rtf rtf
-text/sgml sgml sgm
-text/tab-separated-values tsv
-text/vnd.wap.wml wml
-text/vnd.wap.wmlscript wmls
-text/xml xml xsl xslt rss rdf
-text/x-component htc
-text/x-setext etx
-text/x-sawfish jl
-video/mpeg mpeg mpg mpe
-video/mp4 mp4 m4a m4p m4b m4r m4v
-audio/mp4 m4a
-video/ogg ogv ogm ogg
-video/quicktime qt mov
-video/vnd.mpegurl mxu
-video/x-flv flv
-video/x-matroska mkv mka
-video/x-msvideo avi
-video/x-ogg ogv ogm ogg
-video/x-sgi-movie movie
-x-conference/x-cooltalk ice
-application/vnd.oasis.opendocument.chart odc
-application/vnd.oasis.opendocument.chart-template otc
-application/vnd.oasis.opendocument.database odb
-application/vnd.oasis.opendocument.formula odf
-application/vnd.oasis.opendocument.formula-template otf
-application/vnd.oasis.opendocument.graphics odg
-application/vnd.oasis.opendocument.graphics-template otg
-application/vnd.oasis.opendocument.image odi
-application/vnd.oasis.opendocument.image-template oti
-application/vnd.oasis.opendocument.presentation odp
-application/vnd.oasis.opendocument.presentation-template otp
-application/vnd.oasis.opendocument.spreadsheet ods
-application/vnd.oasis.opendocument.spreadsheet-template ots
-application/vnd.oasis.opendocument.text odt
-application/vnd.oasis.opendocument.text-master odm
-application/vnd.oasis.opendocument.text-template ott
-application/vnd.oasis.opendocument.text-web oth
-application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
-application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
-application/vnd.ms-word.document.macroEnabled.12 docm
-application/vnd.ms-word.template.macroEnabled.12 dotm
-application/vnd.openxmlformats-officedocument.presentationml.template potx
-application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
-application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
-application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
-application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
-application/vnd.ms-powerpoint.presentation.macroEnabled.12 potm
-application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
-application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
-application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
-application/vnd.ms-excel.template.macroEnabled.12 xltm
-application/vnd.ms-excel.addin.macroEnabled.12 xlam
-application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
-model/vnd.dwfx+xps dwfx
-application/vnd.ms-xpsdocument xps
-application/x-opc+zip docx dotx docm dotm potx ppsx pptx ppam pptm potm ppsm xlsx xltx xlsm xltm xlam xlsb dwfx xps
-chemical/x-mdl-molfile mol
-chemical/x-mdl-sdfile sdf
-chemical/x-mdl-rxnfile rxn
-chemical/x-mdl-rdfile rd
-chemical/x-mdl-rgfile rg
-application/x-amf amf
-application/sla stl
index 1e0013f..0a4f0ed 100644 (file)
@@ -23,7 +23,6 @@
 
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
-use MediaWiki\Services\ServiceDisabledException;
 
 /**
  * Functions to get cache objects
@@ -51,7 +50,7 @@ use MediaWiki\Services\ServiceDisabledException;
  *
  * - ObjectCache::getLocalServerInstance( $fallbackType )
  *   Purpose: Memory cache for very hot keys.
- *   Stored only on the individual web server (typically APC for web requests,
+ *   Stored only on the individual web server (typically APC or APCu for web requests,
  *   and EmptyBagOStuff in CLI mode).
  *   Not replicated to the other servers.
  *
@@ -118,13 +117,20 @@ class ObjectCache {
         *
         * @param string $id A key in $wgObjectCaches.
         * @return BagOStuff
-        * @throws MWException
+        * @throws InvalidArgumentException
         */
        public static function newFromId( $id ) {
                global $wgObjectCaches;
 
                if ( !isset( $wgObjectCaches[$id] ) ) {
-                       throw new MWException( "Invalid object cache type \"$id\" requested. " .
+                       // Always recognize these ones
+                       if ( $id === CACHE_NONE ) {
+                               return new EmptyBagOStuff();
+                       } elseif ( $id === 'hash' ) {
+                               return new HashBagOStuff();
+                       }
+
+                       throw new InvalidArgumentException( "Invalid object cache type \"$id\" requested. " .
                                "It is not present in \$wgObjectCaches." );
                }
 
@@ -160,7 +166,7 @@ class ObjectCache {
         *  - loggroup: Alias to set 'logger' key with LoggerFactory group.
         *  - .. Other parameters passed to factory or class.
         * @return BagOStuff
-        * @throws MWException
+        * @throws InvalidArgumentException
         */
        public static function newFromParams( $params ) {
                if ( isset( $params['loggroup'] ) ) {
@@ -183,8 +189,25 @@ class ObjectCache {
                        $params['reportDupes'] = isset( $params['reportDupes'] )
                                ? $params['reportDupes']
                                : true;
+                       // Do b/c logic for SqlBagOStuff
+                       if ( is_a( $class, SqlBagOStuff::class, true ) ) {
+                               if ( isset( $params['server'] ) && !isset( $params['servers'] ) ) {
+                                       $params['servers'] = [ $params['server'] ];
+                                       unset( $params['server'] );
+                               }
+                               // In the past it was not required to set 'dbDirectory' in $wgObjectCaches
+                               if ( isset( $params['servers'] ) ) {
+                                       foreach ( $params['servers'] as &$server ) {
+                                               if ( $server['type'] === 'sqlite' && !isset( $server['dbDirectory'] ) ) {
+                                                       $server['dbDirectory'] = MediaWikiServices::getInstance()
+                                                               ->getMainConfig()->get( 'SQLiteDataDir' );
+                                               }
+                                       }
+                               }
+                       }
+
                        // Do b/c logic for MemcachedBagOStuff
-                       if ( is_subclass_of( $class, 'MemcachedBagOStuff' ) ) {
+                       if ( is_subclass_of( $class, MemcachedBagOStuff::class ) ) {
                                if ( !isset( $params['servers'] ) ) {
                                        $params['servers'] = $GLOBALS['wgMemCachedServers'];
                                }
@@ -200,7 +223,7 @@ class ObjectCache {
                        }
                        return new $class( $params );
                } else {
-                       throw new MWException( "The definition of cache type \""
+                       throw new InvalidArgumentException( "The definition of cache type \""
                                . print_r( $params, true ) . "\" lacks both "
                                . "factory and class parameters." );
                }
@@ -242,7 +265,7 @@ class ObjectCache {
        /**
         * Factory function for CACHE_ACCEL (referenced from DefaultSettings.php)
         *
-        * This will look for any APC style server-local cache.
+        * This will look for any APC or APCu style server-local cache.
         * A fallback cache can be specified if none is found.
         *
         *     // Direct calls
@@ -253,43 +276,19 @@ class ObjectCache {
         *
         * @param int|string|array $fallback Fallback cache or parameter map with 'fallback'
         * @return BagOStuff
-        * @throws MWException
+        * @throws InvalidArgumentException
         * @since 1.27
         */
        public static function getLocalServerInstance( $fallback = CACHE_NONE ) {
-               if ( function_exists( 'apc_fetch' ) ) {
-                       $id = 'apc';
-               } elseif ( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) {
-                       $id = 'xcache';
-               } elseif ( function_exists( 'wincache_ucache_get' ) ) {
-                       $id = 'wincache';
-               } else {
+               $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
+               if ( $cache instanceof EmptyBagOStuff ) {
                        if ( is_array( $fallback ) ) {
-                               $id = isset( $fallback['fallback'] ) ? $fallback['fallback'] : CACHE_NONE;
-                       } else {
-                               $id = $fallback;
+                               $fallback = isset( $fallback['fallback'] ) ? $fallback['fallback'] : CACHE_NONE;
                        }
+                       $cache = self::getInstance( $fallback );
                }
 
-               return self::getInstance( $id );
-       }
-
-       /**
-        * @param array $params [optional] Array key 'fallback' for $fallback.
-        * @param int|string $fallback Fallback cache, e.g. (CACHE_NONE, "hash") (since 1.24)
-        * @return BagOStuff
-        * @deprecated since 1.27
-        */
-       public static function newAccelerator( $params = [], $fallback = null ) {
-               if ( $fallback === null ) {
-                       if ( is_array( $params ) && isset( $params['fallback'] ) ) {
-                               $fallback = $params['fallback'];
-                       } elseif ( !is_array( $params ) ) {
-                               $fallback = $params;
-                       }
-               }
-
-               return self::getLocalServerInstance( $fallback );
+               return $cache;
        }
 
        /**
@@ -298,23 +297,41 @@ class ObjectCache {
         * @since 1.26
         * @param string $id A key in $wgWANObjectCaches.
         * @return WANObjectCache
-        * @throws MWException
+        * @throws UnexpectedValueException
         */
        public static function newWANCacheFromId( $id ) {
-               global $wgWANObjectCaches;
+               global $wgWANObjectCaches, $wgObjectCaches;
 
                if ( !isset( $wgWANObjectCaches[$id] ) ) {
-                       throw new MWException( "Invalid object cache type \"$id\" requested. " .
-                               "It is not present in \$wgWANObjectCaches." );
+                       throw new UnexpectedValueException(
+                               "Cache type \"$id\" requested is not present in \$wgWANObjectCaches." );
                }
 
                $params = $wgWANObjectCaches[$id];
+               if ( !isset( $wgObjectCaches[$params['cacheId']] ) ) {
+                       throw new UnexpectedValueException(
+                               "Cache type \"{$params['cacheId']}\" is not present in \$wgObjectCaches." );
+               }
+               $params['store'] = $wgObjectCaches[$params['cacheId']];
+
+               return self::newWANCacheFromParams( $params );
+       }
+
+       /**
+        * Create a new cache object of the specified type.
+        *
+        * @since 1.28
+        * @param array $params
+        * @return WANObjectCache
+        * @throws UnexpectedValueException
+        */
+       public static function newWANCacheFromParams( array $params ) {
+               $erGroup = MediaWikiServices::getInstance()->getEventRelayerGroup();
                foreach ( $params['channels'] as $action => $channel ) {
-                       $params['relayers'][$action] = MediaWikiServices::getInstance()->getEventRelayerGroup()
-                               ->getRelayer( $channel );
+                       $params['relayers'][$action] = $erGroup->getRelayer( $channel );
                        $params['channels'][$action] = $channel;
                }
-               $params['cache'] = self::newFromId( $params['cacheId'] );
+               $params['cache'] = self::newFromParams( $params['store'] );
                if ( isset( $params['loggroup'] ) ) {
                        $params['logger'] = LoggerFactory::getInstance( $params['loggroup'] );
                } else {
@@ -342,11 +359,10 @@ class ObjectCache {
         *
         * @since 1.26
         * @return WANObjectCache
+        * @deprecated Since 1.28 Use MediaWikiServices::getMainWANCache()
         */
        public static function getMainWANInstance() {
-               global $wgMainWANCache;
-
-               return self::getWANInstance( $wgMainWANCache );
+               return MediaWikiServices::getInstance()->getMainWANObjectCache();
        }
 
        /**
@@ -366,11 +382,10 @@ class ObjectCache {
         *
         * @return BagOStuff
         * @since 1.26
+        * @deprecated Since 1.28 Use MediaWikiServices::getMainObjectStash
         */
        public static function getMainStashInstance() {
-               global $wgMainStash;
-
-               return self::getInstance( $wgMainStash );
+               return MediaWikiServices::getInstance()->getMainObjectStash();
        }
 
        /**
diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php
deleted file mode 100644 (file)
index 64cd686..0000000
+++ /dev/null
@@ -1,433 +0,0 @@
-<?php
-/**
- * Object caching using Redis (http://redis.io/).
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-/**
- * Redis-based caching module for redis server >= 2.6.12
- *
- * @note: avoid use of Redis::MULTI transactions for twemproxy support
- */
-class RedisBagOStuff extends BagOStuff {
-       /** @var RedisConnectionPool */
-       protected $redisPool;
-       /** @var array List of server names */
-       protected $servers;
-       /** @var array Map of (tag => server name) */
-       protected $serverTagMap;
-       /** @var bool */
-       protected $automaticFailover;
-
-       /**
-        * Construct a RedisBagOStuff object. Parameters are:
-        *
-        *   - servers: An array of server names. A server name may be a hostname,
-        *     a hostname/port combination or the absolute path of a UNIX socket.
-        *     If a hostname is specified but no port, the standard port number
-        *     6379 will be used. Arrays keys can be used to specify the tag to
-        *     hash on in place of the host/port. Required.
-        *
-        *   - connectTimeout: The timeout for new connections, in seconds. Optional,
-        *     default is 1 second.
-        *
-        *   - persistent: Set this to true to allow connections to persist across
-        *     multiple web requests. False by default.
-        *
-        *   - password: The authentication password, will be sent to Redis in
-        *     clear text. Optional, if it is unspecified, no AUTH command will be
-        *     sent.
-        *
-        *   - automaticFailover: If this is false, then each key will be mapped to
-        *     a single server, and if that server is down, any requests for that key
-        *     will fail. If this is true, a connection failure will cause the client
-        *     to immediately try the next server in the list (as determined by a
-        *     consistent hashing algorithm). True by default. This has the
-        *     potential to create consistency issues if a server is slow enough to
-        *     flap, for example if it is in swap death.
-        * @param array $params
-        */
-       function __construct( $params ) {
-               parent::__construct( $params );
-               $redisConf = [ 'serializer' => 'none' ]; // manage that in this class
-               foreach ( [ 'connectTimeout', 'persistent', 'password' ] as $opt ) {
-                       if ( isset( $params[$opt] ) ) {
-                               $redisConf[$opt] = $params[$opt];
-                       }
-               }
-               $this->redisPool = RedisConnectionPool::singleton( $redisConf );
-
-               $this->servers = $params['servers'];
-               foreach ( $this->servers as $key => $server ) {
-                       $this->serverTagMap[is_int( $key ) ? $server : $key] = $server;
-               }
-
-               if ( isset( $params['automaticFailover'] ) ) {
-                       $this->automaticFailover = $params['automaticFailover'];
-               } else {
-                       $this->automaticFailover = true;
-               }
-
-               $this->attrMap[self::ATTR_SYNCWRITES] = self::QOS_SYNCWRITES_NONE;
-       }
-
-       protected function doGet( $key, $flags = 0 ) {
-               list( $server, $conn ) = $this->getConnection( $key );
-               if ( !$conn ) {
-                       return false;
-               }
-               try {
-                       $value = $conn->get( $key );
-                       $result = $this->unserialize( $value );
-               } catch ( RedisException $e ) {
-                       $result = false;
-                       $this->handleException( $conn, $e );
-               }
-
-               $this->logRequest( 'get', $key, $server, $result );
-               return $result;
-       }
-
-       public function set( $key, $value, $expiry = 0, $flags = 0 ) {
-               list( $server, $conn ) = $this->getConnection( $key );
-               if ( !$conn ) {
-                       return false;
-               }
-               $expiry = $this->convertToRelative( $expiry );
-               try {
-                       if ( $expiry ) {
-                               $result = $conn->setex( $key, $expiry, $this->serialize( $value ) );
-                       } else {
-                               // No expiry, that is very different from zero expiry in Redis
-                               $result = $conn->set( $key, $this->serialize( $value ) );
-                       }
-               } catch ( RedisException $e ) {
-                       $result = false;
-                       $this->handleException( $conn, $e );
-               }
-
-               $this->logRequest( 'set', $key, $server, $result );
-               return $result;
-       }
-
-       public function delete( $key ) {
-               list( $server, $conn ) = $this->getConnection( $key );
-               if ( !$conn ) {
-                       return false;
-               }
-               try {
-                       $conn->delete( $key );
-                       // Return true even if the key didn't exist
-                       $result = true;
-               } catch ( RedisException $e ) {
-                       $result = false;
-                       $this->handleException( $conn, $e );
-               }
-
-               $this->logRequest( 'delete', $key, $server, $result );
-               return $result;
-       }
-
-       public function getMulti( array $keys, $flags = 0 ) {
-               $batches = [];
-               $conns = [];
-               foreach ( $keys as $key ) {
-                       list( $server, $conn ) = $this->getConnection( $key );
-                       if ( !$conn ) {
-                               continue;
-                       }
-                       $conns[$server] = $conn;
-                       $batches[$server][] = $key;
-               }
-               $result = [];
-               foreach ( $batches as $server => $batchKeys ) {
-                       $conn = $conns[$server];
-                       try {
-                               $conn->multi( Redis::PIPELINE );
-                               foreach ( $batchKeys as $key ) {
-                                       $conn->get( $key );
-                               }
-                               $batchResult = $conn->exec();
-                               if ( $batchResult === false ) {
-                                       $this->debug( "multi request to $server failed" );
-                                       continue;
-                               }
-                               foreach ( $batchResult as $i => $value ) {
-                                       if ( $value !== false ) {
-                                               $result[$batchKeys[$i]] = $this->unserialize( $value );
-                                       }
-                               }
-                       } catch ( RedisException $e ) {
-                               $this->handleException( $conn, $e );
-                       }
-               }
-
-               $this->debug( "getMulti for " . count( $keys ) . " keys " .
-                       "returned " . count( $result ) . " results" );
-               return $result;
-       }
-
-       /**
-        * @param array $data
-        * @param int $expiry
-        * @return bool
-        */
-       public function setMulti( array $data, $expiry = 0 ) {
-               $batches = [];
-               $conns = [];
-               foreach ( $data as $key => $value ) {
-                       list( $server, $conn ) = $this->getConnection( $key );
-                       if ( !$conn ) {
-                               continue;
-                       }
-                       $conns[$server] = $conn;
-                       $batches[$server][] = $key;
-               }
-
-               $expiry = $this->convertToRelative( $expiry );
-               $result = true;
-               foreach ( $batches as $server => $batchKeys ) {
-                       $conn = $conns[$server];
-                       try {
-                               $conn->multi( Redis::PIPELINE );
-                               foreach ( $batchKeys as $key ) {
-                                       if ( $expiry ) {
-                                               $conn->setex( $key, $expiry, $this->serialize( $data[$key] ) );
-                                       } else {
-                                               $conn->set( $key, $this->serialize( $data[$key] ) );
-                                       }
-                               }
-                               $batchResult = $conn->exec();
-                               if ( $batchResult === false ) {
-                                       $this->debug( "setMulti request to $server failed" );
-                                       continue;
-                               }
-                               foreach ( $batchResult as $value ) {
-                                       if ( $value === false ) {
-                                               $result = false;
-                                       }
-                               }
-                       } catch ( RedisException $e ) {
-                               $this->handleException( $server, $conn, $e );
-                               $result = false;
-                       }
-               }
-
-               return $result;
-       }
-
-       public function add( $key, $value, $expiry = 0 ) {
-               list( $server, $conn ) = $this->getConnection( $key );
-               if ( !$conn ) {
-                       return false;
-               }
-               $expiry = $this->convertToRelative( $expiry );
-               try {
-                       if ( $expiry ) {
-                               $result = $conn->set(
-                                       $key,
-                                       $this->serialize( $value ),
-                                       [ 'nx', 'ex' => $expiry ]
-                               );
-                       } else {
-                               $result = $conn->setnx( $key, $this->serialize( $value ) );
-                       }
-               } catch ( RedisException $e ) {
-                       $result = false;
-                       $this->handleException( $conn, $e );
-               }
-
-               $this->logRequest( 'add', $key, $server, $result );
-               return $result;
-       }
-
-       /**
-        * Non-atomic implementation of incr().
-        *
-        * Probably all callers actually want incr() to atomically initialise
-        * values to zero if they don't exist, as provided by the Redis INCR
-        * command. But we are constrained by the memcached-like interface to
-        * return null in that case. Once the key exists, further increments are
-        * atomic.
-        * @param string $key Key to increase
-        * @param int $value Value to add to $key (Default 1)
-        * @return int|bool New value or false on failure
-        */
-       public function incr( $key, $value = 1 ) {
-               list( $server, $conn ) = $this->getConnection( $key );
-               if ( !$conn ) {
-                       return false;
-               }
-               try {
-                       if ( !$conn->exists( $key ) ) {
-                               return null;
-                       }
-                       // @FIXME: on races, the key may have a 0 TTL
-                       $result = $conn->incrBy( $key, $value );
-               } catch ( RedisException $e ) {
-                       $result = false;
-                       $this->handleException( $conn, $e );
-               }
-
-               $this->logRequest( 'incr', $key, $server, $result );
-               return $result;
-       }
-
-       public function changeTTL( $key, $expiry = 0 ) {
-               list( $server, $conn ) = $this->getConnection( $key );
-               if ( !$conn ) {
-                       return false;
-               }
-
-               $expiry = $this->convertToRelative( $expiry );
-               try {
-                       $result = $conn->expire( $key, $expiry );
-               } catch ( RedisException $e ) {
-                       $result = false;
-                       $this->handleException( $conn, $e );
-               }
-
-               $this->logRequest( 'expire', $key, $server, $result );
-               return $result;
-       }
-
-       public function modifySimpleRelayEvent( array $event ) {
-               if ( array_key_exists( 'val', $event ) ) {
-                       $event['val'] = serialize( $event['val'] ); // this class uses PHP serialization
-               }
-
-               return $event;
-       }
-
-       /**
-        * @param mixed $data
-        * @return string
-        */
-       protected function serialize( $data ) {
-               // Serialize anything but integers so INCR/DECR work
-               // Do not store integer-like strings as integers to avoid type confusion (bug 60563)
-               return is_int( $data ) ? $data : serialize( $data );
-       }
-
-       /**
-        * @param string $data
-        * @return mixed
-        */
-       protected function unserialize( $data ) {
-               $int = intval( $data );
-               return $data === (string)$int ? $int : unserialize( $data );
-       }
-
-       /**
-        * Get a Redis object with a connection suitable for fetching the specified key
-        * @param string $key
-        * @return array (server, RedisConnRef) or (false, false)
-        */
-       protected function getConnection( $key ) {
-               $candidates = array_keys( $this->serverTagMap );
-
-               if ( count( $this->servers ) > 1 ) {
-                       ArrayUtils::consistentHashSort( $candidates, $key, '/' );
-                       if ( !$this->automaticFailover ) {
-                               $candidates = array_slice( $candidates, 0, 1 );
-                       }
-               }
-
-               while ( ( $tag = array_shift( $candidates ) ) !== null ) {
-                       $server = $this->serverTagMap[$tag];
-                       $conn = $this->redisPool->getConnection( $server );
-                       if ( !$conn ) {
-                               continue;
-                       }
-
-                       // If automatic failover is enabled, check that the server's link
-                       // to its master (if any) is up -- but only if there are other
-                       // viable candidates left to consider. Also, getMasterLinkStatus()
-                       // does not work with twemproxy, though $candidates will be empty
-                       // by now in such cases.
-                       if ( $this->automaticFailover && $candidates ) {
-                               try {
-                                       if ( $this->getMasterLinkStatus( $conn ) === 'down' ) {
-                                               // If the master cannot be reached, fail-over to the next server.
-                                               // If masters are in data-center A, and replica DBs in data-center B,
-                                               // this helps avoid the case were fail-over happens in A but not
-                                               // to the corresponding server in B (e.g. read/write mismatch).
-                                               continue;
-                                       }
-                               } catch ( RedisException $e ) {
-                                       // Server is not accepting commands
-                                       $this->handleException( $conn, $e );
-                                       continue;
-                               }
-                       }
-
-                       return [ $server, $conn ];
-               }
-
-               $this->setLastError( BagOStuff::ERR_UNREACHABLE );
-
-               return [ false, false ];
-       }
-
-       /**
-        * Check the master link status of a Redis server that is configured as a replica DB.
-        * @param RedisConnRef $conn
-        * @return string|null Master link status (either 'up' or 'down'), or null
-        *  if the server is not a replica DB.
-        */
-       protected function getMasterLinkStatus( RedisConnRef $conn ) {
-               $info = $conn->info();
-               return isset( $info['master_link_status'] )
-                       ? $info['master_link_status']
-                       : null;
-       }
-
-       /**
-        * Log a fatal error
-        * @param string $msg
-        */
-       protected function logError( $msg ) {
-               $this->logger->error( "Redis error: $msg" );
-       }
-
-       /**
-        * The redis extension throws an exception in response to various read, write
-        * and protocol errors. Sometimes it also closes the connection, sometimes
-        * not. The safest response for us is to explicitly destroy the connection
-        * object and let it be reopened during the next request.
-        * @param RedisConnRef $conn
-        * @param Exception $e
-        */
-       protected function handleException( RedisConnRef $conn, $e ) {
-               $this->setLastError( BagOStuff::ERR_UNEXPECTED );
-               $this->redisPool->handleError( $conn, $e );
-       }
-
-       /**
-        * Send information about a single request to the debug log
-        * @param string $method
-        * @param string $key
-        * @param string $server
-        * @param bool $result
-        */
-       public function logRequest( $method, $key, $server, $result ) {
-               $this->debug( "$method $key on $server: " .
-                       ( $result === false ? "failure" : "success" ) );
-       }
-}
index d06213f..47dae78 100644 (file)
@@ -182,7 +182,7 @@ class SqlBagOStuff extends BagOStuff {
                                $this->logger->debug( __CLASS__ . ": connecting to $host" );
                                // Use a blank trx profiler to ignore expections as this is a cache
                                $info['trxProfiler'] = new TransactionProfiler();
-                               $db = DatabaseBase::factory( $type, $info );
+                               $db = Database::factory( $type, $info );
                                $db->clearFlag( DBO_TRX );
                        } else {
                                $index = $this->replicaOnly ? DB_REPLICA : DB_MASTER;
index 80061d5..15f5238 100644 (file)
@@ -210,7 +210,7 @@ class Article implements Page {
         * @return string Return the text of this revision
         */
        public function getContent() {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
                $content = $this->getContentObject();
                return ContentHandler::getContentText( $content );
        }
@@ -333,7 +333,7 @@ class Article implements Page {
        function fetchContent() {
                // BC cruft!
 
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
 
                if ( $this->mContentLoaded && $this->mContent ) {
                        return $this->mContent;
@@ -347,7 +347,11 @@ class Article implements Page {
 
                // @todo Get rid of mContent everywhere!
                $this->mContent = ContentHandler::getContentText( $content );
-               ContentHandler::runLegacyHooks( 'ArticleAfterFetchContent', [ &$this, &$this->mContent ] );
+               ContentHandler::runLegacyHooks(
+                       'ArticleAfterFetchContent',
+                       [ &$this, &$this->mContent ],
+                       '1.21'
+               );
 
                return $this->mContent;
        }
@@ -424,7 +428,11 @@ class Article implements Page {
                $this->mContentObject = $content;
                $this->mRevIdFetched = $this->mRevision->getId();
 
-               Hooks::run( 'ArticleAfterFetchContentObject', [ &$this, &$this->mContentObject ] );
+               ContentHandler::runLegacyHooks(
+                       'ArticleAfterFetchContentObject',
+                       [ &$this, &$this->mContentObject ],
+                       '1.21'
+               );
 
                return $this->mContentObject;
        }
@@ -623,9 +631,11 @@ class Article implements Page {
 
                                                # Allow extensions do their own custom view for certain pages
                                                $outputDone = true;
-                                       } elseif ( !ContentHandler::runLegacyHooks( 'ArticleViewCustom',
-                                                       [ $this->fetchContentObject(), $this->getTitle(), $outputPage ] ) ) {
-
+                                       } elseif ( !ContentHandler::runLegacyHooks(
+                                               'ArticleViewCustom',
+                                               [ $this->fetchContentObject(), $this->getTitle(), $outputPage ],
+                                               '1.21'
+                                       ) ) {
                                                # Allow extensions do their own custom view for certain pages
                                                $outputDone = true;
                                        }
@@ -696,6 +706,10 @@ class Article implements Page {
                        }
                }
 
+               # Use adaptive TTLs for CDN so delayed/failed purges are noticed less often.
+               # This could use getTouched(), but that could be scary for major template edits.
+               $outputPage->adaptCdnTTL( $this->mPage->getTimestamp(), IExpiringStore::TTL_DAY );
+
                # Check for any __NOINDEX__ tags on the page using $pOutput
                $policy = $this->getRobotPolicy( 'view', $pOutput );
                $outputPage->setIndexPolicy( $policy['index'] );
@@ -705,7 +719,6 @@ class Article implements Page {
                $this->mPage->doViewUpdates( $user, $oldid );
 
                $outputPage->addModules( 'mediawiki.action.view.postEdit' );
-
        }
 
        /**
@@ -798,8 +811,9 @@ class Article implements Page {
                        // Give hooks a chance to customise the output
                        if ( ContentHandler::runLegacyHooks(
                                'ShowRawCssJs',
-                               [ $this->mContentObject, $this->getTitle(), $outputPage ] )
-                       ) {
+                               [ $this->mContentObject, $this->getTitle(), $outputPage ],
+                               '1.24'
+                       ) ) {
                                // If no legacy hooks ran, display the content of the parser output, including RL modules,
                                // but excluding metadata like categories and language links
                                $po = $this->mContentObject->getParserOutput( $this->getTitle() );
@@ -1932,12 +1946,13 @@ class Article implements Page {
 
        /**
         * Check if the page can be cached
+        * @param integer $mode One of the HTMLFileCache::MODE_* constants (since 1.28)
         * @return bool
         */
-       public function isFileCacheable() {
+       public function isFileCacheable( $mode = HTMLFileCache::MODE_NORMAL ) {
                $cacheable = false;
 
-               if ( HTMLFileCache::useFileCache( $this->getContext() ) ) {
+               if ( HTMLFileCache::useFileCache( $this->getContext(), $mode ) ) {
                        $cacheable = $this->mPage->getId()
                                && !$this->mRedirectedFrom && !$this->getTitle()->isRedirect();
                        // Extension may have reason to disable file caching on some pages.
@@ -2090,10 +2105,11 @@ class Article implements Page {
         * @see WikiPage::doDeleteArticleReal
         */
        public function doDeleteArticleReal(
-               $reason, $suppress = false, $u1 = null, $u2 = null, &$error = '', User $user = null
+               $reason, $suppress = false, $u1 = null, $u2 = null, &$error = '', User $user = null,
+               $tags = []
        ) {
                return $this->mPage->doDeleteArticleReal(
-                       $reason, $suppress, $u1, $u2, $error, $user
+                       $reason, $suppress, $u1, $u2, $error, $user, $tags
                );
        }
 
@@ -2108,9 +2124,11 @@ class Article implements Page {
        /**
         * Call to WikiPage function for backwards compatibility.
         * @see WikiPage::doEdit
+        *
+        * @deprecated since 1.21: use doEditContent() instead.
         */
        public function doEdit( $text, $summary, $flags = 0, $baseRevId = false, $user = null ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
                return $this->mPage->doEdit( $text, $summary, $flags, $baseRevId, $user );
        }
 
@@ -2150,18 +2168,6 @@ class Article implements Page {
                return $this->mPage->getLastPurgeTimestamp();
        }
 
-       /**
-        * Call to WikiPage function for backwards compatibility.
-        * @see WikiPage::doQuickEditContent
-        */
-       public function doQuickEditContent(
-               Content $content, User $user, $comment = '', $minor = false, $serialFormat = null
-       ) {
-               return $this->mPage->doQuickEditContent(
-                       $content, $user, $comment, $minor, $serialFormat
-               );
-       }
-
        /**
         * Call to WikiPage function for backwards compatibility.
         * @see WikiPage::doViewUpdates
@@ -2333,9 +2339,10 @@ class Article implements Page {
        /**
         * Call to WikiPage function for backwards compatibility.
         * @see WikiPage::getText
+        * @deprecated since 1.21 use WikiPage::getContent() instead
         */
        public function getText( $audience = Revision::FOR_PUBLIC, User $user = null ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
                return $this->mPage->getText( $audience, $user );
        }
 
@@ -2503,6 +2510,7 @@ class Article implements Page {
 
        /**
         * Call to WikiPage function for backwards compatibility.
+        * @deprecated since 1.21, use prepareContentForEdit
         * @see WikiPage::prepareTextForEdit
         */
        public function prepareTextForEdit( $text, $revid = null, User $user = null ) {
index 865471c..6d2be51 100644 (file)
@@ -68,6 +68,10 @@ class CategoryPage extends Article {
                if ( $title->inNamespace( NS_CATEGORY ) ) {
                        $this->closeShowCategory();
                }
+
+               # Use adaptive TTLs for CDN so delayed/failed purges are noticed less often
+               $outputPage = $this->getContext()->getOutput();
+               $outputPage->adaptCdnTTL( $this->mPage->getTouched(), IExpiringStore::TTL_MINUTE );
        }
 
        function openShowCategory() {
index 4ad2e65..0b26d28 100644 (file)
@@ -121,6 +121,11 @@ class WikiPage implements Page, IDBAccessObject {
                        throw new MWException( "Invalid or virtual namespace $ns given." );
                }
 
+               $page = null;
+               if ( !Hooks::run( 'WikiPageFactory', [ $title, &$page ] ) ) {
+                       return $page;
+               }
+
                switch ( $ns ) {
                        case NS_FILE:
                                $page = new WikiFilePage( $title );
@@ -493,15 +498,23 @@ class WikiPage implements Page, IDBAccessObject {
         */
        public function getContentModel() {
                if ( $this->exists() ) {
-                       // look at the revision's actual content model
-                       $rev = $this->getRevision();
-
-                       if ( $rev !== null ) {
-                               return $rev->getContentModel();
-                       } else {
-                               $title = $this->mTitle->getPrefixedDBkey();
-                               wfWarn( "Page $title exists but has no (visible) revisions!" );
-                       }
+                       $cache = ObjectCache::getMainWANInstance();
+
+                       return $cache->getWithSetCallback(
+                               $cache->makeKey( 'page', 'content-model', $this->getLatest() ),
+                               $cache::TTL_MONTH,
+                               function () {
+                                       $rev = $this->getRevision();
+                                       if ( $rev ) {
+                                               // Look at the revision's actual content model
+                                               return $rev->getContentModel();
+                                       } else {
+                                               $title = $this->mTitle->getPrefixedDBkey();
+                                               wfWarn( "Page $title exists but has no (visible) revisions!" );
+                                               return $this->mTitle->getContentModel();
+                                       }
+                               }
+                       );
                }
 
                // use the default model for this page
@@ -613,15 +626,18 @@ class WikiPage implements Page, IDBAccessObject {
                        // happened after the first S1 SELECT.
                        // http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html#isolevel_repeatable-read
                        $flags = Revision::READ_LOCKING;
+                       $revision = Revision::newFromPageId( $this->getId(), $latest, $flags );
                } elseif ( $this->mDataLoadedFrom == self::READ_LATEST ) {
                        // Bug T93976: if page_latest was loaded from the master, fetch the
                        // revision from there as well, as it may not exist yet on a replica DB.
                        // Also, this keeps the queries in the same REPEATABLE-READ snapshot.
                        $flags = Revision::READ_LATEST;
+                       $revision = Revision::newFromPageId( $this->getId(), $latest, $flags );
                } else {
-                       $flags = 0;
+                       $dbr = wfGetDB( DB_REPLICA );
+                       $revision = Revision::newKnownCurrent( $dbr, $this->getId(), $latest );
                }
-               $revision = Revision::newFromPageId( $this->getId(), $latest, $flags );
+
                if ( $revision ) { // sanity
                        $this->setLastEdit( $revision );
                }
@@ -682,7 +698,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @deprecated since 1.21, getContent() should be used instead.
         */
        public function getText( $audience = Revision::FOR_PUBLIC, User $user = null ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
 
                $this->loadLastEdit();
                if ( $this->mLastRevision ) {
@@ -1566,7 +1582,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @deprecated since 1.21: use doEditContent() instead.
         */
        public function doEdit( $text, $summary, $flags = 0, $baseRevId = false, $user = null ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
 
                $content = ContentHandler::makeContent( $text, $this->getTitle() );
 
@@ -1667,7 +1683,7 @@ class WikiPage implements Page, IDBAccessObject {
                                                        $flags & EDIT_MINOR, null, null, &$flags, &$hookStatus ];
                // Check if the hook rejected the attempted save
                if ( !Hooks::run( 'PageContentSave', $hook_args )
-                       || !ContentHandler::runLegacyHooks( 'ArticleSave', $hook_args )
+                       || !ContentHandler::runLegacyHooks( 'ArticleSave', $hook_args, '1.21' )
                ) {
                        if ( $hookStatus->isOK() ) {
                                // Hook returned false but didn't call fatal(); use generic message
@@ -2012,11 +2028,11 @@ class WikiPage implements Page, IDBAccessObject {
                                        // Trigger post-create hook
                                        $params = [ &$this, &$user, $content, $summary,
                                                $flags & EDIT_MINOR, null, null, &$flags, $revision ];
-                                       ContentHandler::runLegacyHooks( 'ArticleInsertComplete', $params );
+                                       ContentHandler::runLegacyHooks( 'ArticleInsertComplete', $params, '1.21' );
                                        Hooks::run( 'PageContentInsertComplete', $params );
                                        // Trigger post-save hook
                                        $params = array_merge( $params, [ &$status, $meta['baseRevId'] ] );
-                                       ContentHandler::runLegacyHooks( 'ArticleSaveComplete', $params );
+                                       ContentHandler::runLegacyHooks( 'ArticleSaveComplete', $params, '1.21' );
                                        Hooks::run( 'PageContentSaveComplete', $params );
 
                                }
@@ -2064,7 +2080,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @return object
         */
        public function prepareTextForEdit( $text, $revid = null, User $user = null ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
                $content = ContentHandler::makeContent( $text, $this->getTitle() );
                return $this->prepareContentForEdit( $content, $revid, $user );
        }
@@ -2383,41 +2399,10 @@ class WikiPage implements Page, IDBAccessObject {
                } elseif ( $options['changed'] ) { // bug 50785
                        self::onArticleEdit( $this->mTitle, $revision );
                }
-       }
-
-       /**
-        * Edit an article without doing all that other stuff
-        * The article must already exist; link tables etc
-        * are not updated, caches are not flushed.
-        *
-        * @param Content $content Content submitted
-        * @param User $user The relevant user
-        * @param string $comment Comment submitted
-        * @param bool $minor Whereas it's a minor modification
-        * @param string $serialFormat Format for storing the content in the database
-        */
-       public function doQuickEditContent(
-               Content $content, User $user, $comment = '', $minor = false, $serialFormat = null
-       ) {
-
-               $serialized = $content->serialize( $serialFormat );
-
-               $dbw = wfGetDB( DB_MASTER );
-               $revision = new Revision( [
-                       'title'      => $this->getTitle(), // for determining the default content model
-                       'page'       => $this->getId(),
-                       'user_text'  => $user->getName(),
-                       'user'       => $user->getId(),
-                       'text'       => $serialized,
-                       'length'     => $content->getSize(),
-                       'comment'    => $comment,
-                       'minor_edit' => $minor ? 1 : 0,
-               ] ); // XXX: set the content object?
-               $revision->insertOn( $dbw );
-               $this->updateRevisionOn( $dbw, $revision );
-
-               Hooks::run( 'NewRevisionFromEditComplete', [ $this, $revision, false, $user ] );
 
+               ResourceLoaderWikiModule::invalidateModuleCache(
+                       $this->mTitle, $options['oldrevision'], $revision, wfWikiID()
+               );
        }
 
        /**
@@ -2871,12 +2856,14 @@ class WikiPage implements Page, IDBAccessObject {
         * @param bool $u2 Unused
         * @param array|string &$error Array of errors to append to
         * @param User $user The deleting user
+        * @param array $tags Tags to apply to the deletion action
         * @return Status Status object; if successful, $status->value is the log_id of the
         *   deletion log entry. If the page couldn't be deleted because it wasn't
         *   found, $status is a non-fatal 'cannotdelete' error
         */
        public function doDeleteArticleReal(
-               $reason, $suppress = false, $u1 = null, $u2 = null, &$error = '', User $user = null
+               $reason, $suppress = false, $u1 = null, $u2 = null, &$error = '', User $user = null,
+               $tags = []
        ) {
                global $wgUser, $wgContentHandlerUseDB;
 
@@ -2929,6 +2916,7 @@ class WikiPage implements Page, IDBAccessObject {
                // unless they actually try to catch exceptions (which is rare).
 
                // we need to remember the old content so we can use it to generate all deletion updates.
+               $revision = $this->getRevision();
                try {
                        $content = $this->getContent( Revision::RAW );
                } catch ( Exception $ex ) {
@@ -2938,17 +2926,13 @@ class WikiPage implements Page, IDBAccessObject {
                        $content = null;
                }
 
+               $fields = Revision::selectFields();
+               $bitfield = false;
+
                // Bitfields to further suppress the content
                if ( $suppress ) {
-                       $bitfield = 0;
-                       // This should be 15...
-                       $bitfield |= Revision::DELETED_TEXT;
-                       $bitfield |= Revision::DELETED_COMMENT;
-                       $bitfield |= Revision::DELETED_USER;
-                       $bitfield |= Revision::DELETED_RESTRICTED;
-                       $deletionFields = [ $dbw->addQuotes( $bitfield ) . ' AS deleted' ];
-               } else {
-                       $deletionFields = [ 'rev_deleted AS deleted' ];
+                       $bitfield = Revision::SUPPRESSED_ALL;
+                       $fields = array_diff( $fields, [ 'rev_deleted' ] );
                }
 
                // For now, shunt the revision data into the archive table.
@@ -2959,10 +2943,9 @@ class WikiPage implements Page, IDBAccessObject {
                // the rev_deleted field, which is reserved for this purpose.
 
                // Get all of the page revisions
-               $fields = array_diff( Revision::selectFields(), [ 'rev_deleted' ] );
                $res = $dbw->select(
                        'revision',
-                       array_merge( $fields, $deletionFields ),
+                       $fields,
                        [ 'rev_page' => $id ],
                        __METHOD__,
                        'FOR UPDATE'
@@ -2985,7 +2968,7 @@ class WikiPage implements Page, IDBAccessObject {
                                'ar_flags'      => '',
                                'ar_len'        => $row->rev_len,
                                'ar_page_id'    => $id,
-                               'ar_deleted'    => $row->deleted,
+                               'ar_deleted'    => $suppress ? $bitfield : $row->rev_deleted,
                                'ar_sha1'       => $row->rev_sha1,
                        ];
                        if ( $wgContentHandlerUseDB ) {
@@ -3006,10 +2989,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Now that it's safely backed up, delete it
                $dbw->delete( 'page', [ 'page_id' => $id ], __METHOD__ );
-
-               if ( !$dbw->cascadingDeletes() ) {
-                       $dbw->delete( 'revision', [ 'rev_page' => $id ], __METHOD__ );
-               }
+               $dbw->delete( 'revision', [ 'rev_page' => $id ], __METHOD__ );
 
                // Log the deletion, if the page was suppressed, put it in the suppression log instead
                $logtype = $suppress ? 'suppress' : 'delete';
@@ -3018,16 +2998,20 @@ class WikiPage implements Page, IDBAccessObject {
                $logEntry->setPerformer( $user );
                $logEntry->setTarget( $logTitle );
                $logEntry->setComment( $reason );
+               $logEntry->setTags( $tags );
                $logid = $logEntry->insert();
 
-               $dbw->onTransactionPreCommitOrIdle( function () use ( $dbw, $logEntry, $logid ) {
-                       // Bug 56776: avoid deadlocks (especially from FileDeleteForm)
-                       $logEntry->publish( $logid );
-               } );
+               $dbw->onTransactionPreCommitOrIdle(
+                       function () use ( $dbw, $logEntry, $logid ) {
+                               // Bug 56776: avoid deadlocks (especially from FileDeleteForm)
+                               $logEntry->publish( $logid );
+                       },
+                       __METHOD__
+               );
 
                $dbw->endAtomic( __METHOD__ );
 
-               $this->doDeleteUpdates( $id, $content );
+               $this->doDeleteUpdates( $id, $content, $revision );
 
                Hooks::run( 'ArticleDeleteComplete', [
                        &$wikiPageBeforeDelete,
@@ -3074,11 +3058,12 @@ class WikiPage implements Page, IDBAccessObject {
         * Do some database updates after deletion
         *
         * @param int $id The page_id value of the page being deleted
-        * @param Content $content Optional page content to be used when determining
+        * @param Content|null $content Optional page content to be used when determining
         *   the required updates. This may be needed because $this->getContent()
         *   may already return null when the page proper was deleted.
+        * @param Revision|null $revision The latest page revision
         */
-       public function doDeleteUpdates( $id, Content $content = null ) {
+       public function doDeleteUpdates( $id, Content $content = null, Revision $revision = null ) {
                try {
                        $countable = $this->isCountable();
                } catch ( Exception $ex ) {
@@ -3106,6 +3091,9 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Clear caches
                WikiPage::onArticleDelete( $this->mTitle );
+               ResourceLoaderWikiModule::invalidateModuleCache(
+                       $this->mTitle, $revision, null, wfWikiID()
+               );
 
                // Reset this object and the Title object
                $this->loadFromRow( false, self::READ_LATEST );
@@ -3488,7 +3476,7 @@ class WikiPage implements Page, IDBAccessObject {
                $dbr = wfGetDB( DB_REPLICA );
                $res = $dbr->select( 'categorylinks',
                        [ 'cl_to AS page_title, ' . NS_CATEGORY . ' AS page_namespace' ],
-                       // Have to do that since DatabaseBase::fieldNamesWithAlias treats numeric indexes
+                       // Have to do that since Database::fieldNamesWithAlias treats numeric indexes
                        // as not being aliases, and NS_CATEGORY is numeric
                        [ 'cl_from' => $id ],
                        __METHOD__ );
@@ -3539,7 +3527,7 @@ class WikiPage implements Page, IDBAccessObject {
                // NOTE: stub for backwards-compatibility. assumes the given text is
                // wikitext. will break horribly if it isn't.
 
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
 
                $handler = ContentHandler::getForModelID( CONTENT_MODEL_WIKITEXT );
                $oldContent = is_null( $oldtext ) ? null : $handler->unserializeContent( $oldtext );
@@ -3661,7 +3649,8 @@ class WikiPage implements Page, IDBAccessObject {
                                                $cat->refreshCounts();
                                        }
                                }
-                       }
+                       },
+                       __METHOD__
                );
        }
 
@@ -3723,7 +3712,7 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @param Content|null $content Optional Content object for determining the
         *   necessary updates.
-        * @return DataUpdate[]
+        * @return DeferrableUpdate[]
         */
        public function getDeletionUpdates( Content $content = null ) {
                if ( !$content ) {
index 01cce02..ef26db6 100644 (file)
@@ -487,40 +487,58 @@ class CoreParserFunctions {
                return $mwObject->matchStartToEnd( $value );
        }
 
-       public static function formatRaw( $num, $raw ) {
+       public static function formatRaw( $num, $raw, Language $language ) {
                if ( self::matchAgainstMagicword( 'rawsuffix', $raw ) ) {
                        return $num;
                } else {
-                       global $wgContLang;
-                       return $wgContLang->formatNum( $num );
+                       return $language->formatNum( $num );
                }
        }
+
        public static function numberofpages( $parser, $raw = null ) {
-               return self::formatRaw( SiteStats::pages(), $raw );
+               return self::formatRaw( SiteStats::pages(), $raw, $parser->getFunctionLang() );
        }
+
        public static function numberofusers( $parser, $raw = null ) {
-               return self::formatRaw( SiteStats::users(), $raw );
+               return self::formatRaw( SiteStats::users(), $raw, $parser->getFunctionLang() );
        }
        public static function numberofactiveusers( $parser, $raw = null ) {
-               return self::formatRaw( SiteStats::activeUsers(), $raw );
+               return self::formatRaw( SiteStats::activeUsers(), $raw, $parser->getFunctionLang() );
        }
+
        public static function numberofarticles( $parser, $raw = null ) {
-               return self::formatRaw( SiteStats::articles(), $raw );
+               return self::formatRaw( SiteStats::articles(), $raw, $parser->getFunctionLang() );
        }
+
        public static function numberoffiles( $parser, $raw = null ) {
-               return self::formatRaw( SiteStats::images(), $raw );
+               return self::formatRaw( SiteStats::images(), $raw, $parser->getFunctionLang() );
        }
+
        public static function numberofadmins( $parser, $raw = null ) {
-               return self::formatRaw( SiteStats::numberingroup( 'sysop' ), $raw );
+               return self::formatRaw(
+                       SiteStats::numberingroup( 'sysop' ),
+                       $raw,
+                       $parser->getFunctionLang()
+               );
        }
+
        public static function numberofedits( $parser, $raw = null ) {
-               return self::formatRaw( SiteStats::edits(), $raw );
+               return self::formatRaw( SiteStats::edits(), $raw, $parser->getFunctionLang() );
        }
+
        public static function pagesinnamespace( $parser, $namespace = 0, $raw = null ) {
-               return self::formatRaw( SiteStats::pagesInNs( intval( $namespace ) ), $raw );
+               return self::formatRaw(
+                       SiteStats::pagesInNs( intval( $namespace ) ),
+                       $raw,
+                       $parser->getFunctionLang()
+               );
        }
        public static function numberingroup( $parser, $name = '', $raw = null ) {
-               return self::formatRaw( SiteStats::numberingroup( strtolower( $name ) ), $raw );
+               return self::formatRaw(
+                       SiteStats::numberingroup( strtolower( $name ) ),
+                       $raw,
+                       $parser->getFunctionLang()
+               );
        }
 
        /**
@@ -727,7 +745,7 @@ class CoreParserFunctions {
 
                $title = Title::makeTitleSafe( NS_CATEGORY, $name );
                if ( !$title ) { # invalid title
-                       return self::formatRaw( 0, $raw );
+                       return self::formatRaw( 0, $raw, $parser->getFunctionLang() );
                }
                $wgContLang->findVariantLink( $name, $title, true );
 
@@ -753,7 +771,7 @@ class CoreParserFunctions {
                }
 
                $count = $cache[$name][$type];
-               return self::formatRaw( $count, $raw );
+               return self::formatRaw( $count, $raw, $parser->getFunctionLang() );
        }
 
        /**
@@ -769,7 +787,7 @@ class CoreParserFunctions {
                $title = Title::newFromText( $page );
 
                if ( !is_object( $title ) ) {
-                       return self::formatRaw( 0, $raw );
+                       return self::formatRaw( 0, $raw, $parser->getFunctionLang() );
                }
 
                // fetch revision from cache/database and return the value
@@ -779,7 +797,7 @@ class CoreParserFunctions {
                        // We've had bugs where rev_len was not being recorded for empty pages, see T135414
                        $length = 0;
                }
-               return self::formatRaw( $length, $raw );
+               return self::formatRaw( $length, $raw, $parser->getFunctionLang() );
        }
 
        /**
index 7c18798..669e9fc 100644 (file)
@@ -22,6 +22,7 @@
  */
 use MediaWiki\Linker\LinkRenderer;
 use MediaWiki\MediaWikiServices;
+use Wikimedia\ScopedCallback;
 
 /**
  * @defgroup Parser Parser
@@ -251,7 +252,7 @@ class Parser {
        protected $mProfiler;
 
        /**
-        * @var \MediaWiki\Linker\LinkRenderer
+        * @var LinkRenderer
         */
        protected $mLinkRenderer;
 
@@ -887,10 +888,10 @@ class Parser {
        }
 
        /**
-        * Get a \MediaWiki\Linker\LinkRenderer instance to make links with
+        * Get a LinkRenderer instance to make links with
         *
         * @since 1.28
-        * @return \MediaWiki\Linker\LinkRenderer
+        * @return LinkRenderer
         */
        public function getLinkRenderer() {
                if ( !$this->mLinkRenderer ) {
@@ -3784,9 +3785,28 @@ class Parser {
         * @return string
         */
        public function extensionSubstitution( $params, $frame ) {
+               static $errorStr = '<span class="error">';
+               static $errorLen = 20;
+
                $name = $frame->expand( $params['name'] );
+               if ( substr( $name, 0, $errorLen ) === $errorStr ) {
+                       // Probably expansion depth or node count exceeded. Just punt the
+                       // error up.
+                       return $name;
+               }
+
                $attrText = !isset( $params['attr'] ) ? null : $frame->expand( $params['attr'] );
+               if ( substr( $attrText, 0, $errorLen ) === $errorStr ) {
+                       // See above
+                       return $attrText;
+               }
+
                $content = !isset( $params['inner'] ) ? null : $frame->expand( $params['inner'] );
+               if ( substr( $content, 0, $errorLen ) === $errorStr ) {
+                       // See above
+                       return $content;
+               }
+
                $marker = self::MARKER_PREFIX . "-$name-"
                        . sprintf( '%08X', $this->mMarkerIndex++ ) . self::MARKER_SUFFIX;
 
@@ -3844,6 +3864,10 @@ class Parser {
                                $output = "<$name$attrText/>";
                        } else {
                                $close = is_null( $params['close'] ) ? '' : $frame->expand( $params['close'] );
+                               if ( substr( $close, 0, $errorLen ) === $errorStr ) {
+                                       // See above
+                                       return $close;
+                               }
                                $output = "<$name$attrText>$content$close";
                        }
                }
@@ -4138,12 +4162,13 @@ class Parser {
                        # * <b> (r105284)
                        # * <bdi> (bug 72884)
                        # * <span dir="rtl"> and <span dir="ltr"> (bug 35167)
+                       # * <s> and <strike> (T35715)
                        # We strip any parameter from accepted tags (second regex), except dir="rtl|ltr" from <span>,
                        # to allow setting directionality in toc items.
                        $tocline = preg_replace(
                                [
-                                       '#<(?!/?(span|sup|sub|bdi|i|b)(?: [^>]*)?>).*?>#',
-                                       '#<(/?(?:span(?: dir="(?:rtl|ltr)")?|sup|sub|bdi|i|b))(?: .*?)?>#'
+                                       '#<(?!/?(span|sup|sub|bdi|i|b|s|strike)(?: [^>]*)?>).*?>#',
+                                       '#<(/?(?:span(?: dir="(?:rtl|ltr)")?|sup|sub|bdi|i|b|s|strike))(?: .*?)?>#'
                                ],
                                [ '', '<$1>' ],
                                $safeHeadline
index fd826a2..9a10878 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Parser
  */
+use Wikimedia\ScopedCallback;
 
 /**
  * @brief Set options of the Parser
@@ -595,27 +596,6 @@ class ParserOptions {
                return wfSetVar( $this->mIsPrintable, $x );
        }
 
-       /**
-        * @since 1.28
-        */
-       public function setMagicISBNLinks( $x ) {
-               return wfSetVar( $this->mMagicISBNLinks, $x );
-       }
-
-       /**
-        * @since 1.28
-        */
-       public function setMagicPMIDLinks( $x ) {
-               return wfSetVar( $this->mMagicPMIDLinks, $x );
-       }
-
-       /**
-        * @since 1.28
-        */
-       public function setMagicRFCLinks( $x ) {
-               return wfSetVar( $this->mMagicRFCLinks, $x );
-       }
-
        /**
         * Set the redirect target.
         *
index 5e8db07..5a15ddf 100644 (file)
@@ -18,6 +18,7 @@
  * @file
  * @author Aaron Schulz
  */
+use Psr\Log\LoggerInterface;
 
 /**
  * Version of PoolCounter that uses Redis
@@ -55,6 +56,8 @@ class PoolCounterRedis extends PoolCounter {
        protected $ring;
        /** @var RedisConnectionPool */
        protected $pool;
+       /** @var LoggerInterface */
+       protected $logger;
        /** @var array (server label => host) map */
        protected $serversByLabel;
        /** @var string SHA-1 of the key */
@@ -87,6 +90,7 @@ class PoolCounterRedis extends PoolCounter {
 
                $conf['redisConfig']['serializer'] = 'none'; // for use with Lua
                $this->pool = RedisConnectionPool::singleton( $conf['redisConfig'] );
+               $this->logger = \MediaWiki\Logger\LoggerFactory::getInstance( 'redis' );
 
                $this->keySha1 = sha1( $this->key );
                $met = ini_get( 'max_execution_time' ); // usually 0 in CLI mode
@@ -107,7 +111,7 @@ class PoolCounterRedis extends PoolCounter {
                        $servers = $this->ring->getLocations( $this->key, 3 );
                        ArrayUtils::consistentHashSort( $servers, $this->key );
                        foreach ( $servers as $server ) {
-                               $conn = $this->pool->getConnection( $this->serversByLabel[$server] );
+                               $conn = $this->pool->getConnection( $this->serversByLabel[$server], $this->logger );
                                if ( $conn ) {
                                        break;
                                }
@@ -151,6 +155,7 @@ class PoolCounterRedis extends PoolCounter {
 
                // @codingStandardsIgnoreStart Generic.Files.LineLength
                static $script =
+               /** @lang Lua */
 <<<LUA
                local kSlots,kSlotsNextRelease,kWakeup,kWaiting = unpack(KEYS)
                local rMaxWorkers,rExpiry,rSlot,rSlotTime,rAwakeAll,rTime = unpack(ARGV)
@@ -287,6 +292,7 @@ LUA;
         */
        protected function initAndPopPoolSlotList( RedisConnRef $conn, $now ) {
                static $script =
+               /** @lang Lua */
 <<<LUA
                local kSlots,kSlotsNextRelease,kSlotWaits = unpack(KEYS)
                local rMaxWorkers,rMaxQueue,rTimeout,rExpiry,rSess,rTime = unpack(ARGV)
@@ -355,6 +361,7 @@ LUA;
         */
        protected function registerAcquisitionTime( RedisConnRef $conn, $slot, $now ) {
                static $script =
+               /** @lang Lua */
 <<<LUA
                local kSlots,kSlotsNextRelease,kSlotWaits = unpack(KEYS)
                local rSlot,rExpiry,rSess,rTime = unpack(ARGV)
index 297dcb2..8b4f01a 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup Profiler
  * @defgroup Profiler Profiler
  */
+use Wikimedia\ScopedCallback;
 
 /**
  * Profiler base class that defines the interface and some trivial
@@ -162,9 +163,9 @@ abstract class Profiler {
        abstract public function scopedProfileIn( $section );
 
        /**
-        * @param ScopedCallback $section
+        * @param SectionProfileCallback $section
         */
-       public function scopedProfileOut( ScopedCallback &$section = null ) {
+       public function scopedProfileOut( SectionProfileCallback &$section = null ) {
                $section = null;
        }
 
index 65ac6e6..7e3c398 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup Profiler
  * @author Aaron Schulz
  */
+use Wikimedia\ScopedCallback;
 
 /**
  * Custom PHP profiler for parser/DB type section names that xhprof/xdebug can't handle
@@ -57,7 +58,7 @@ class SectionProfiler {
 
        /**
         * @param string $section
-        * @return ScopedCallback
+        * @return SectionProfileCallback
         */
        public function scopedProfileIn( $section ) {
                $this->profileInInternal( $section );
diff --git a/includes/profiler/TransactionProfiler.php b/includes/profiler/TransactionProfiler.php
deleted file mode 100644 (file)
index bf26573..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-<?php
-/**
- * Transaction profiling for contention
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Profiler
- * @author Aaron Schulz
- */
-
-use Psr\Log\LoggerInterface;
-use Psr\Log\LoggerAwareInterface;
-use Psr\Log\NullLogger;
-
-/**
- * Helper class that detects high-contention DB queries via profiling calls
- *
- * This class is meant to work with a DatabaseBase object, which manages queries
- *
- * @since 1.24
- */
-class TransactionProfiler implements LoggerAwareInterface {
-       /** @var float Seconds */
-       protected $dbLockThreshold = 3.0;
-       /** @var float Seconds */
-       protected $eventThreshold = .25;
-       /** @var bool */
-       protected $silenced = false;
-
-       /** @var array transaction ID => (write start time, list of DBs involved) */
-       protected $dbTrxHoldingLocks = [];
-       /** @var array transaction ID => list of (query name, start time, end time) */
-       protected $dbTrxMethodTimes = [];
-
-       /** @var array */
-       protected $hits = [
-               'writes'      => 0,
-               'queries'     => 0,
-               'conns'       => 0,
-               'masterConns' => 0
-       ];
-       /** @var array */
-       protected $expect = [
-               'writes'         => INF,
-               'queries'        => INF,
-               'conns'          => INF,
-               'masterConns'    => INF,
-               'maxAffected'    => INF,
-               'readQueryTime'  => INF,
-               'writeQueryTime' => INF
-       ];
-       /** @var array */
-       protected $expectBy = [];
-
-       /**
-        * @var LoggerInterface
-        */
-       private $logger;
-
-       public function __construct() {
-               $this->setLogger( new NullLogger() );
-       }
-
-       public function setLogger( LoggerInterface $logger ) {
-               $this->logger = $logger;
-       }
-
-       /**
-        * @param bool $value
-        * @since 1.28
-        */
-       public function setSilenced( $value ) {
-               $this->silenced = $value;
-       }
-
-       /**
-        * Set performance expectations
-        *
-        * With conflicting expectations, the most narrow ones will be used
-        *
-        * @param string $event (writes,queries,conns,mConns)
-        * @param integer $value Maximum count of the event
-        * @param string $fname Caller
-        * @since 1.25
-        */
-       public function setExpectation( $event, $value, $fname ) {
-               $this->expect[$event] = isset( $this->expect[$event] )
-                       ? min( $this->expect[$event], $value )
-                       : $value;
-               if ( $this->expect[$event] == $value ) {
-                       $this->expectBy[$event] = $fname;
-               }
-       }
-
-       /**
-        * Set multiple performance expectations
-        *
-        * With conflicting expectations, the most narrow ones will be used
-        *
-        * @param array $expects Map of (event => limit)
-        * @param $fname
-        * @since 1.26
-        */
-       public function setExpectations( array $expects, $fname ) {
-               foreach ( $expects as $event => $value ) {
-                       $this->setExpectation( $event, $value, $fname );
-               }
-       }
-
-       /**
-        * Reset performance expectations and hit counters
-        *
-        * @since 1.25
-        */
-       public function resetExpectations() {
-               foreach ( $this->hits as &$val ) {
-                       $val = 0;
-               }
-               unset( $val );
-               foreach ( $this->expect as &$val ) {
-                       $val = INF;
-               }
-               unset( $val );
-               $this->expectBy = [];
-       }
-
-       /**
-        * Mark a DB as having been connected to with a new handle
-        *
-        * Note that there can be multiple connections to a single DB.
-        *
-        * @param string $server DB server
-        * @param string $db DB name
-        * @param bool $isMaster
-        */
-       public function recordConnection( $server, $db, $isMaster ) {
-               // Report when too many connections happen...
-               if ( $this->hits['conns']++ == $this->expect['conns'] ) {
-                       $this->reportExpectationViolated( 'conns', "[connect to $server ($db)]" );
-               }
-               if ( $isMaster && $this->hits['masterConns']++ == $this->expect['masterConns'] ) {
-                       $this->reportExpectationViolated( 'masterConns', "[connect to $server ($db)]" );
-               }
-       }
-
-       /**
-        * Mark a DB as in a transaction with one or more writes pending
-        *
-        * Note that there can be multiple connections to a single DB.
-        *
-        * @param string $server DB server
-        * @param string $db DB name
-        * @param string $id ID string of transaction
-        */
-       public function transactionWritingIn( $server, $db, $id ) {
-               $name = "{$server} ({$db}) (TRX#$id)";
-               if ( isset( $this->dbTrxHoldingLocks[$name] ) ) {
-                       $this->logger->info( "Nested transaction for '$name' - out of sync." );
-               }
-               $this->dbTrxHoldingLocks[$name] = [
-                       'start' => microtime( true ),
-                       'conns' => [], // all connections involved
-               ];
-               $this->dbTrxMethodTimes[$name] = [];
-
-               foreach ( $this->dbTrxHoldingLocks as $name => &$info ) {
-                       // Track all DBs in transactions for this transaction
-                       $info['conns'][$name] = 1;
-               }
-       }
-
-       /**
-        * Register the name and time of a method for slow DB trx detection
-        *
-        * This assumes that all queries are synchronous (non-overlapping)
-        *
-        * @param string $query Function name or generalized SQL
-        * @param float $sTime Starting UNIX wall time
-        * @param bool $isWrite Whether this is a write query
-        * @param integer $n Number of affected rows
-        */
-       public function recordQueryCompletion( $query, $sTime, $isWrite = false, $n = 0 ) {
-               $eTime = microtime( true );
-               $elapsed = ( $eTime - $sTime );
-
-               if ( $isWrite && $n > $this->expect['maxAffected'] ) {
-                       $this->logger->info( "Query affected $n row(s):\n" . $query . "\n" .
-                               wfBacktrace( true ) );
-               }
-
-               // Report when too many writes/queries happen...
-               if ( $this->hits['queries']++ == $this->expect['queries'] ) {
-                       $this->reportExpectationViolated( 'queries', $query );
-               }
-               if ( $isWrite && $this->hits['writes']++ == $this->expect['writes'] ) {
-                       $this->reportExpectationViolated( 'writes', $query );
-               }
-               // Report slow queries...
-               if ( !$isWrite && $elapsed > $this->expect['readQueryTime'] ) {
-                       $this->reportExpectationViolated( 'readQueryTime', $query, $elapsed );
-               }
-               if ( $isWrite && $elapsed > $this->expect['writeQueryTime'] ) {
-                       $this->reportExpectationViolated( 'writeQueryTime', $query, $elapsed );
-               }
-
-               if ( !$this->dbTrxHoldingLocks ) {
-                       // Short-circuit
-                       return;
-               } elseif ( !$isWrite && $elapsed < $this->eventThreshold ) {
-                       // Not an important query nor slow enough
-                       return;
-               }
-
-               foreach ( $this->dbTrxHoldingLocks as $name => $info ) {
-                       $lastQuery = end( $this->dbTrxMethodTimes[$name] );
-                       if ( $lastQuery ) {
-                               // Additional query in the trx...
-                               $lastEnd = $lastQuery[2];
-                               if ( $sTime >= $lastEnd ) { // sanity check
-                                       if ( ( $sTime - $lastEnd ) > $this->eventThreshold ) {
-                                               // Add an entry representing the time spent doing non-queries
-                                               $this->dbTrxMethodTimes[$name][] = [ '...delay...', $lastEnd, $sTime ];
-                                       }
-                                       $this->dbTrxMethodTimes[$name][] = [ $query, $sTime, $eTime ];
-                               }
-                       } else {
-                               // First query in the trx...
-                               if ( $sTime >= $info['start'] ) { // sanity check
-                                       $this->dbTrxMethodTimes[$name][] = [ $query, $sTime, $eTime ];
-                               }
-                       }
-               }
-       }
-
-       /**
-        * Mark a DB as no longer in a transaction
-        *
-        * This will check if locks are possibly held for longer than
-        * needed and log any affected transactions to a special DB log.
-        * Note that there can be multiple connections to a single DB.
-        *
-        * @param string $server DB server
-        * @param string $db DB name
-        * @param string $id ID string of transaction
-        * @param float $writeTime Time spent in write queries
-        */
-       public function transactionWritingOut( $server, $db, $id, $writeTime = 0.0 ) {
-               $name = "{$server} ({$db}) (TRX#$id)";
-               if ( !isset( $this->dbTrxMethodTimes[$name] ) ) {
-                       $this->logger->info( "Detected no transaction for '$name' - out of sync." );
-                       return;
-               }
-
-               $slow = false;
-
-               // Warn if too much time was spend writing...
-               if ( $writeTime > $this->expect['writeQueryTime'] ) {
-                       $this->reportExpectationViolated(
-                               'writeQueryTime',
-                               "[transaction $id writes to {$server} ({$db})]",
-                               $writeTime
-                       );
-                       $slow = true;
-               }
-               // Fill in the last non-query period...
-               $lastQuery = end( $this->dbTrxMethodTimes[$name] );
-               if ( $lastQuery ) {
-                       $now = microtime( true );
-                       $lastEnd = $lastQuery[2];
-                       if ( ( $now - $lastEnd ) > $this->eventThreshold ) {
-                               $this->dbTrxMethodTimes[$name][] = [ '...delay...', $lastEnd, $now ];
-                       }
-               }
-               // Check for any slow queries or non-query periods...
-               foreach ( $this->dbTrxMethodTimes[$name] as $info ) {
-                       $elapsed = ( $info[2] - $info[1] );
-                       if ( $elapsed >= $this->dbLockThreshold ) {
-                               $slow = true;
-                               break;
-                       }
-               }
-               if ( $slow ) {
-                       $dbs = implode( ', ', array_keys( $this->dbTrxHoldingLocks[$name]['conns'] ) );
-                       $msg = "Sub-optimal transaction on DB(s) [{$dbs}]:\n";
-                       foreach ( $this->dbTrxMethodTimes[$name] as $i => $info ) {
-                               list( $query, $sTime, $end ) = $info;
-                               $msg .= sprintf( "%d\t%.6f\t%s\n", $i, ( $end - $sTime ), $query );
-                       }
-                       $this->logger->info( $msg );
-               }
-               unset( $this->dbTrxHoldingLocks[$name] );
-               unset( $this->dbTrxMethodTimes[$name] );
-       }
-
-       /**
-        * @param string $expect
-        * @param string $query
-        * @param string|float|int $actual [optional]
-        */
-       protected function reportExpectationViolated( $expect, $query, $actual = null ) {
-               if ( $this->silenced ) {
-                       return;
-               }
-
-               $n = $this->expect[$expect];
-               $by = $this->expectBy[$expect];
-               $actual = ( $actual !== null ) ? " (actual: $actual)" : "";
-
-               $this->logger->info(
-                       "Expectation ($expect <= $n) by $by not met$actual:\n$query\n" .
-                       wfBacktrace( true )
-               );
-       }
-}
index 5555e8b..d613b2e 100644 (file)
@@ -110,6 +110,7 @@ class ExtensionProcessor implements Processor {
                'type',
                'config',
                'config_prefix',
+               'ServiceWiringFiles',
                'ParserTestFiles',
                'AutoloadClasses',
                'manifest_version',
@@ -174,6 +175,7 @@ class ExtensionProcessor implements Processor {
                $this->extractMessagesDirs( $dir, $info );
                $this->extractNamespaces( $info );
                $this->extractResourceLoaderModules( $dir, $info );
+               $this->extractServiceWiringFiles( $dir, $info );
                $this->extractParserTestFiles( $dir, $info );
                if ( isset( $info['callback'] ) ) {
                        $this->callbacks[] = $info['callback'];
@@ -395,7 +397,7 @@ class ExtensionProcessor implements Processor {
                if ( isset( $info['config'] ) ) {
                        foreach ( $info['config'] as $key => $data ) {
                                $value = $data['value'];
-                               if ( isset( $value['merge_strategy'] ) ) {
+                               if ( isset( $data['merge_strategy'] ) ) {
                                        $value[ExtensionRegistry::MERGE_STRATEGY] = $data['merge_strategy'];
                                }
                                if ( isset( $data['path'] ) && $data['path'] ) {
@@ -406,6 +408,14 @@ class ExtensionProcessor implements Processor {
                }
        }
 
+       protected function extractServiceWiringFiles( $dir, array $info ) {
+               if ( isset( $info['ServiceWiringFiles'] ) ) {
+                       foreach ( $info['ServiceWiringFiles'] as $path ) {
+                               $this->globals['wgServiceWiringFiles'][] = "$dir/$path";
+                       }
+               }
+       }
+
        protected function extractParserTestFiles( $dir, array $info ) {
                if ( isset( $info['ParserTestFiles'] ) ) {
                        foreach ( $info['ParserTestFiles'] as $path ) {
index 3bec457..0236ea2 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * ExtensionRegistry class
  *
@@ -82,11 +84,10 @@ class ExtensionRegistry {
        }
 
        public function __construct() {
-               // We use a try/catch instead of the $fallback parameter because
-               // we don't want to fail here if $wgObjectCaches is not configured
-               // properly for APC setup
+               // We use a try/catch because we don't want to fail here
+               // if $wgObjectCaches is not configured properly for APC setup
                try {
-                       $this->cache = ObjectCache::getLocalServerInstance();
+                       $this->cache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
                } catch ( MWException $e ) {
                        $this->cache = new EmptyBagOStuff();
                }
@@ -257,6 +258,9 @@ class ExtensionRegistry {
                                case 'array_merge_recursive':
                                        $GLOBALS[$key] = array_merge_recursive( $GLOBALS[$key], $val );
                                        break;
+                               case 'array_replace_recursive':
+                                       $GLOBALS[$key] = array_replace_recursive( $GLOBALS[$key], $val );
+                                       break;
                                case 'array_plus_2d':
                                        $GLOBALS[$key] = wfArrayPlus2d( $GLOBALS[$key], $val );
                                        break;
index 97a86c3..143f5cc 100644 (file)
@@ -1009,6 +1009,7 @@ MESSAGE;
                foreach ( $modules as $name => $module ) {
                        try {
                                $content = $module->getModuleContent( $context );
+                               $implementKey = $name . '@' . $module->getVersionHash( $context );
                                $strContent = '';
 
                                // Append output
@@ -1020,7 +1021,7 @@ MESSAGE;
                                                        $strContent = $scripts;
                                                } elseif ( is_array( $scripts ) ) {
                                                        // ...except when $scripts is an array of URLs
-                                                       $strContent = self::makeLoaderImplementScript( $name, $scripts, [], [], [] );
+                                                       $strContent = self::makeLoaderImplementScript( $implementKey, $scripts, [], [], [] );
                                                }
                                                break;
                                        case 'styles':
@@ -1031,9 +1032,23 @@ MESSAGE;
                                                $strContent = isset( $styles['css'] ) ? implode( '', $styles['css'] ) : '';
                                                break;
                                        default:
+                                               $scripts = isset( $content['scripts'] ) ? $content['scripts'] : '';
+                                               if ( is_string( $scripts ) ) {
+                                                       if ( $name === 'site' || $name === 'user' ) {
+                                                               // Legacy scripts that run in the global scope without a closure.
+                                                               // mw.loader.implement will use globalEval if scripts is a string.
+                                                               // Minify manually here, because general response minification is
+                                                               // not effective due it being a string literal, not a function.
+                                                               if ( !ResourceLoader::inDebugMode() ) {
+                                                                       $scripts = self::filter( 'minify-js', $scripts ); // T107377
+                                                               }
+                                                       } else {
+                                                               $scripts = new XmlJsCode( $scripts );
+                                                       }
+                                               }
                                                $strContent = self::makeLoaderImplementScript(
-                                                       $name,
-                                                       isset( $content['scripts'] ) ? $content['scripts'] : '',
+                                                       $implementKey,
+                                                       $scripts,
                                                        isset( $content['styles'] ) ? $content['styles'] : [],
                                                        isset( $content['messagesBlob'] ) ? new XmlJsCode( $content['messagesBlob'] ) : [],
                                                        isset( $content['templates'] ) ? $content['templates'] : []
@@ -1111,8 +1126,9 @@ MESSAGE;
        /**
         * Return JS code that calls mw.loader.implement with given module properties.
         *
-        * @param string $name Module name
-        * @param mixed $scripts List of URLs to JavaScript files or String of JavaScript code
+        * @param string $name Module name or implement key (format "`[name]@[version]`")
+        * @param XmlJsCode|array|string $scripts Code as XmlJsCode (to be wrapped in a closure),
+        *  list of URLs to JavaScript files, or a string of JavaScript for `$.globalEval`.
         * @param mixed $styles Array of CSS strings keyed by media type, or an array of lists of URLs
         *   to CSS files keyed by media type
         * @param mixed $messages List of messages associated with this module. May either be an
@@ -1123,22 +1139,13 @@ MESSAGE;
         * @throws MWException
         * @return string
         */
-       public static function makeLoaderImplementScript(
+       protected static function makeLoaderImplementScript(
                $name, $scripts, $styles, $messages, $templates
        ) {
-               if ( is_string( $scripts ) ) {
-                       // Site and user module are a legacy scripts that run in the global scope (no closure).
-                       // Transportation as string instructs mw.loader.implement to use globalEval.
-                       if ( $name === 'site' || $name === 'user' ) {
-                               // Minify manually because the general makeModuleResponse() minification won't be
-                               // effective here due to the script being a string instead of a function. (T107377)
-                               if ( !ResourceLoader::inDebugMode() ) {
-                                       $scripts = self::filter( 'minify-js', $scripts );
-                               }
-                       } else {
-                               $scripts = new XmlJsCode( "function ( $, jQuery, require, module ) {\n{$scripts}\n}" );
-                       }
-               } elseif ( !is_array( $scripts ) ) {
+
+               if ( $scripts instanceof XmlJsCode ) {
+                       $scripts = new XmlJsCode( "function ( $, jQuery, require, module ) {\n{$scripts->value}\n}" );
+               } elseif ( !is_string( $scripts ) && !is_array( $scripts ) ) {
                        throw new MWException( 'Invalid scripts error. Array of URLs or string of code expected.' );
                }
                // mw.loader.implement requires 'styles', 'messages' and 'templates' to be objects (not
index 30fe3ae..b17200f 100644 (file)
@@ -26,7 +26,7 @@ use MediaWiki\Logger\LoggerFactory;
 
 /**
  * Object passed around to modules which contains information about the state
- * of a specific loader request
+ * of a specific loader request.
  */
 class ResourceLoaderContext {
        protected $resourceLoader;
@@ -62,26 +62,33 @@ class ResourceLoaderContext {
                $this->request = $request;
                $this->logger = $resourceLoader->getLogger();
 
+               // Future developers: Avoid use of getVal() in this class, which performs
+               // expensive UTF normalisation by default. Use getRawVal() instead.
+               // Values here are either one of a finite number of internal IDs,
+               // or previously-stored user input (e.g. titles, user names) that were passed
+               // to this endpoint by ResourceLoader itself from the canonical value.
+               // Values do not come directly from user input and need not match.
+
                // List of modules
-               $modules = $request->getVal( 'modules' );
+               $modules = $request->getRawVal( 'modules' );
                $this->modules = $modules ? self::expandModuleNames( $modules ) : [];
 
                // Various parameters
-               $this->user = $request->getVal( 'user' );
+               $this->user = $request->getRawVal( 'user' );
                $this->debug = $request->getFuzzyBool(
                        'debug',
                        $resourceLoader->getConfig()->get( 'ResourceLoaderDebug' )
                );
-               $this->only = $request->getVal( 'only', null );
-               $this->version = $request->getVal( 'version', null );
+               $this->only = $request->getRawVal( 'only', null );
+               $this->version = $request->getRawVal( 'version', null );
                $this->raw = $request->getFuzzyBool( 'raw' );
 
                // Image requests
-               $this->image = $request->getVal( 'image' );
-               $this->variant = $request->getVal( 'variant' );
-               $this->format = $request->getVal( 'format' );
+               $this->image = $request->getRawVal( 'image' );
+               $this->variant = $request->getRawVal( 'variant' );
+               $this->format = $request->getRawVal( 'format' );
 
-               $this->skin = $request->getVal( 'skin' );
+               $this->skin = $request->getRawVal( 'skin' );
                $skinnames = Skin::getSkinNames();
                // If no skin is specified, or we don't recognize the skin, use the default skin
                if ( !$this->skin || !isset( $skinnames[$this->skin] ) ) {
@@ -171,7 +178,7 @@ class ResourceLoaderContext {
                if ( $this->language === null ) {
                        // Must be a valid language code after this point (T64849)
                        // Only support uselang values that follow built-in conventions (T102058)
-                       $lang = $this->getRequest()->getVal( 'lang', '' );
+                       $lang = $this->getRequest()->getRawVal( 'lang', '' );
                        // Stricter version of RequestContext::sanitizeLangCode()
                        if ( !Language::isValidBuiltInCode( $lang ) ) {
                                wfDebug( "Invalid user language code\n" );
@@ -187,7 +194,7 @@ class ResourceLoaderContext {
         */
        public function getDirection() {
                if ( $this->direction === null ) {
-                       $this->direction = $this->getRequest()->getVal( 'dir' );
+                       $this->direction = $this->getRequest()->getRawVal( 'dir' );
                        if ( !$this->direction ) {
                                // Determine directionality based on user language (bug 6100)
                                $this->direction = Language::factory( $this->getLanguage() )->getDir();
@@ -219,7 +226,11 @@ class ResourceLoaderContext {
         */
        public function msg() {
                return call_user_func_array( 'wfMessage', func_get_args() )
-                       ->inLanguage( $this->getLanguage() );
+                       ->inLanguage( $this->getLanguage() )
+                       // Use a dummy title because there is no real title
+                       // for this endpoint, and the cache won't vary on it
+                       // anyways.
+                       ->title( Title::newFromText( 'Dwimmerlaik' ) );
        }
 
        /**
index 2dcc841..07649e3 100644 (file)
@@ -128,6 +128,9 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
 
        protected $targets = [ 'desktop' ];
 
+       /** @var bool Whether CSSJanus flipping should be skipped for this module */
+       protected $noflip = false;
+
        /**
         * @var bool Whether getStyleURLsForDebug should return raw file paths,
         * or return load.php urls
@@ -277,6 +280,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                                // Single booleans
                                case 'debugRaw':
                                case 'raw':
+                               case 'noflip':
                                        $this->{$member} = (bool)$option;
                                        break;
                        }
@@ -913,7 +917,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @return bool
         */
        public function getFlip( $context ) {
-               return $context->getDirection() === 'rtl';
+               return $context->getDirection() === 'rtl' && !$this->noflip;
        }
 
        /**
index 1630269..ef942fa 100644 (file)
@@ -41,6 +41,7 @@ class ResourceLoaderLanguageDataModule extends ResourceLoaderModule {
                        'digitTransformTable' => $language->digitTransformTable(),
                        'separatorTransformTable' => $language->separatorTransformTable(),
                        'grammarForms' => $language->getGrammarForms(),
+                       'grammarTransformations' => $language->getGrammarTransformations(),
                        'pluralRules' => $language->getPluralRules(),
                        'digitGroupingPattern' => $language->digitGroupingPattern(),
                        'fallbackLanguages' => $language->getFallbackLanguages(),
index 2351efd..796c575 100644 (file)
@@ -25,6 +25,7 @@
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
 use Psr\Log\NullLogger;
+use Wikimedia\ScopedCallback;
 
 /**
  * Abstraction for ResourceLoader modules, with name registration and maxage functionality.
@@ -487,9 +488,12 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
                                );
 
                                if ( $dbw->trxLevel() ) {
-                                       $dbw->onTransactionResolution( function () use ( &$scopeLock ) {
-                                               ScopedCallback::consume( $scopeLock ); // release after commit
-                                       } );
+                                       $dbw->onTransactionResolution(
+                                               function () use ( &$scopeLock ) {
+                                                       ScopedCallback::consume( $scopeLock ); // release after commit
+                                               },
+                                               __METHOD__
+                                       );
                                }
                        }
                } catch ( Exception $e ) {
index 4d0bff7..aef1c74 100644 (file)
@@ -55,12 +55,6 @@ class ResourceLoaderUserCSSPrefsModule extends ResourceLoaderModule {
                        $rules[] = "a { text-decoration: " .
                                ( $options['underline'] ? 'underline' : 'none' ) . "; }";
                }
-               if ( $options['editfont'] !== 'default' ) {
-                       // Double-check that $options['editfont'] consists of safe characters only
-                       if ( preg_match( '/^[a-zA-Z0-9_, -]+$/', $options['editfont'] ) ) {
-                               $rules[] = "textarea { font-family: {$options['editfont']}; }\n";
-                       }
-               }
                $style = implode( "\n", $rules );
                if ( $this->getFlip( $context ) ) {
                        $style = CSSJanus::transform( $style, true, false );
index 5580306..3deeb84 100644 (file)
@@ -26,7 +26,8 @@
  * Abstraction for ResourceLoader modules which pull from wiki pages
  *
  * This can only be used for wiki pages in the MediaWiki and User namespaces,
- * because of its dependence on the functionality of Title::isCssJsSubpage.
+ * because of its dependence on the functionality of Title::isCssJsSubpage
+ * and Title::isCssOrJsPage().
  *
  * This module supports being used as a placeholder for a module on a remote wiki.
  * To do so, getDB() must be overloaded to return a foreign database object that
@@ -143,7 +144,7 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param string $title
+        * @param string $titleText
         * @return null|string
         */
        protected function getContent( $titleText ) {
@@ -296,16 +297,20 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule {
                sort( $pageNames );
                $key = implode( '|', $pageNames );
                if ( !isset( $this->titleInfo[$key] ) ) {
-                       $this->titleInfo[$key] = self::fetchTitleInfo( $dbr, $pageNames, __METHOD__ );
+                       $this->titleInfo[$key] = static::fetchTitleInfo( $dbr, $pageNames, __METHOD__ );
                }
                return $this->titleInfo[$key];
        }
 
-       private static function fetchTitleInfo( IDatabase $db, array $pages, $fname = __METHOD__ ) {
+       protected static function fetchTitleInfo( IDatabase $db, array $pages, $fname = __METHOD__ ) {
                $titleInfo = [];
                $batch = new LinkBatch;
                foreach ( $pages as $titleText ) {
-                       $batch->addObj( Title::newFromText( $titleText ) );
+                       $title = Title::newFromText( $titleText );
+                       if ( $title ) {
+                               // Page name may be invalid if user-provided (e.g. gadgets)
+                               $batch->addObj( $title );
+                       }
                }
                if ( !$batch->isEmpty() ) {
                        $res = $db->select( 'page',
@@ -332,7 +337,7 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule {
         * @since 1.28
         * @param ResourceLoaderContext $context
         * @param IDatabase $db
-        * @param string[] $modules
+        * @param string[] $moduleNames
         */
        public static function preloadTitleInfo(
                ResourceLoaderContext $context, IDatabase $db, array $moduleNames
@@ -341,6 +346,7 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule {
                // getDB() can be overridden to point to a foreign database.
                // For now, only preload local. In the future, we could preload by wikiID.
                $allPages = [];
+               /** @var ResourceLoaderWikiModule[] $wikiModules */
                $wikiModules = [];
                foreach ( $moduleNames as $name ) {
                        $module = $rl->getModule( $name );
@@ -353,16 +359,79 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule {
                                }
                        }
                }
-               $allInfo = self::fetchTitleInfo( $db, array_keys( $allPages ), __METHOD__ );
-               foreach ( $wikiModules as $module ) {
-                       $pages = $module->getPages( $context );
-                       $info = array_intersect_key( $allInfo, $pages );
+
+               $pageNames = array_keys( $allPages );
+               sort( $pageNames );
+               $hash = sha1( implode( '|', $pageNames ) );
+
+               // Avoid Zend bug where "static::" does not apply LSB in the closure
+               $func = [ static::class, 'fetchTitleInfo' ];
+               $fname = __METHOD__;
+
+               $cache = ObjectCache::getMainWANInstance();
+               $allInfo = $cache->getWithSetCallback(
+                       $cache->makeGlobalKey( 'resourceloader', 'titleinfo', $db->getWikiID(), $hash ),
+                       $cache::TTL_HOUR,
+                       function ( $curVal, &$ttl, array &$setOpts ) use ( $func, $pageNames, $db, $fname ) {
+                               $setOpts += Database::getCacheSetOptions( $db );
+
+                               return call_user_func( $func, $db, $pageNames, $fname );
+                       },
+                       [ 'checkKeys' => [ $cache->makeGlobalKey( 'resourceloader', 'titleinfo', $db->getWikiID() ) ] ]
+               );
+
+               foreach ( $wikiModules as $wikiModule ) {
+                       $pages = $wikiModule->getPages( $context );
+                       // Before we intersect, map the names to canonical form (T145673).
+                       $intersect = [];
+                       foreach ( $pages as $page => $unused ) {
+                               $title = Title::newFromText( $page );
+                               if ( $title ) {
+                                       $intersect[ $title->getPrefixedText() ] = 1;
+                               } else {
+                                       // Page name may be invalid if user-provided (e.g. gadgets)
+                                       $rl->getLogger()->info(
+                                               'Invalid wiki page title "{title}" in ' . __METHOD__,
+                                               [ 'title' => $page ]
+                                       );
+                               }
+                       }
+                       $info = array_intersect_key( $allInfo, $intersect );
                        $pageNames = array_keys( $pages );
                        sort( $pageNames );
                        $key = implode( '|', $pageNames );
-                       $module->setTitleInfo( $key, $info );
+                       $wikiModule->setTitleInfo( $key, $info );
+               }
+       }
+
+       /**
+        * Clear the preloadTitleInfo() cache for all wiki modules on this wiki on
+        * page change if it was a JS or CSS page
+        *
+        * @param Title $title
+        * @param Revision|null $old Prior page revision
+        * @param Revision|null $new New page revision
+        * @param string $wikiId
+        * @since 1.28
+        */
+       public static function invalidateModuleCache(
+               Title $title, Revision $old = null, Revision $new = null, $wikiId
+       ) {
+               static $formats = [ CONTENT_FORMAT_CSS, CONTENT_FORMAT_JAVASCRIPT ];
+
+               if ( $old && in_array( $old->getContentFormat(), $formats ) ) {
+                       $purge = true;
+               } elseif ( $new && in_array( $new->getContentFormat(), $formats ) ) {
+                       $purge = true;
+               } else {
+                       $purge = ( $title->isCssOrJsPage() || $title->isCssJsSubpage() );
+               }
+
+               if ( $purge ) {
+                       $cache = ObjectCache::getMainWANInstance();
+                       $key = $cache->makeGlobalKey( 'resourceloader', 'titleinfo', $wikiId );
+                       $cache->touchCheckKey( $key );
                }
-               return $allInfo;
        }
 
        /**
index 48604e1..674846d 100644 (file)
@@ -120,10 +120,13 @@ abstract class RevDelList extends RevisionListBase {
                }
 
                $dbw->startAtomic( __METHOD__ );
-               $dbw->onTransactionResolution( function () {
-                       // Release locks on commit or error
-                       $this->releaseItemLocks();
-               } );
+               $dbw->onTransactionResolution(
+                       function () {
+                               // Release locks on commit or error
+                               $this->releaseItemLocks();
+                       },
+                       __METHOD__
+               );
 
                $missing = array_flip( $this->ids );
                $this->clearFileOps();
diff --git a/includes/search/AugmentPageProps.php b/includes/search/AugmentPageProps.php
new file mode 100644 (file)
index 0000000..29bd463
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Augment search result set with values of certain page props.
+ */
+class AugmentPageProps implements ResultSetAugmentor {
+       /**
+        * @var array List of properties.
+        */
+       private $propnames;
+
+       public function __construct( $propnames ) {
+               $this->propnames = $propnames;
+       }
+
+       public function augmentAll( SearchResultSet $resultSet ) {
+               $titles = $resultSet->extractTitles();
+               return PageProps::getInstance()->getProperties( $titles, $this->propnames );
+       }
+}
diff --git a/includes/search/PerRowAugmentor.php b/includes/search/PerRowAugmentor.php
new file mode 100644 (file)
index 0000000..8eb8b17
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * Perform augmentation of each row and return composite result,
+ * indexed by ID.
+ */
+class PerRowAugmentor implements ResultSetAugmentor {
+
+       /**
+        * @var ResultAugmentor
+        */
+       private $rowAugmentor;
+
+       /**
+        * PerRowAugmentor constructor.
+        * @param ResultAugmentor $augmentor Per-result augmentor to use.
+        */
+       public function __construct( ResultAugmentor $augmentor ) {
+               $this->rowAugmentor = $augmentor;
+       }
+
+       /**
+        * Produce data to augment search result set.
+        * @param SearchResultSet $resultSet
+        * @return array Data for all results
+        */
+       public function augmentAll( SearchResultSet $resultSet ) {
+               $data = [];
+               foreach ( $resultSet->extractResults() as $result ) {
+                       $id = $result->getTitle()->getArticleID();
+                       if ( !$id ) {
+                               continue;
+                       }
+                       $data[$id] = $this->rowAugmentor->augment( $result );
+               }
+               return $data;
+       }
+}
diff --git a/includes/search/ResultAugmentor.php b/includes/search/ResultAugmentor.php
new file mode 100644 (file)
index 0000000..350b780
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * Augment search results.
+ *
+ */
+interface ResultAugmentor {
+       /**
+        * Produce data to augment search result set.
+        * @param SearchResult $result
+        * @return mixed Data for this result
+        */
+       public function augment( SearchResult $result );
+}
diff --git a/includes/search/ResultSetAugmentor.php b/includes/search/ResultSetAugmentor.php
new file mode 100644 (file)
index 0000000..94710a8
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * Augment search results.
+ *
+ */
+interface ResultSetAugmentor {
+       /**
+        * Produce data to augment search result set.
+        * @param SearchResultSet $resultSet
+        * @return array Data for all results
+        */
+       public function augmentAll( SearchResultSet $resultSet );
+}
index c2ccca0..90bfebd 100644 (file)
@@ -267,36 +267,60 @@ abstract class SearchEngine {
 
        /**
         * Parse some common prefixes: all (search everything)
-        * or namespace names
+        * or namespace names and set the list of namespaces
+        * of this class accordingly.
         *
         * @param string $query
         * @return string
         */
        function replacePrefixes( $query ) {
+               $queryAndNs = self::parseNamespacePrefixes( $query );
+               if ( $queryAndNs === false ) {
+                       return $query;
+               }
+               $this->namespaces = $queryAndNs[1];
+               return $queryAndNs[0];
+       }
+
+       /**
+        * Parse some common prefixes: all (search everything)
+        * or namespace names
+        *
+        * @param string $query
+        * @return false|array false if no namespace was extracted, an array
+        * with the parsed query at index 0 and an array of namespaces at index
+        * 1 (or null for all namespaces).
+        */
+       public static function parseNamespacePrefixes( $query ) {
                global $wgContLang;
 
                $parsed = $query;
                if ( strpos( $query, ':' ) === false ) { // nothing to do
-                       return $parsed;
+                       return false;
                }
+               $extractedNamespace = null;
 
                $allkeyword = wfMessage( 'searchall' )->inContentLanguage()->text() . ":";
                if ( strncmp( $query, $allkeyword, strlen( $allkeyword ) ) == 0 ) {
-                       $this->namespaces = null;
+                       $extractedNamespace = null;
                        $parsed = substr( $query, strlen( $allkeyword ) );
                } elseif ( strpos( $query, ':' ) !== false ) {
+                       // TODO: should we unify with PrefixSearch::extractNamespace ?
                        $prefix = str_replace( ' ', '_', substr( $query, 0, strpos( $query, ':' ) ) );
                        $index = $wgContLang->getNsIndex( $prefix );
                        if ( $index !== false ) {
-                               $this->namespaces = [ $index ];
+                               $extractedNamespace = [ $index ];
                                $parsed = substr( $query, strlen( $prefix ) + 1 );
+                       } else {
+                               return false;
                        }
                }
+
                if ( trim( $parsed ) == '' ) {
                        $parsed = $query; // prefix was the whole query
                }
 
-               return $parsed;
+               return [ $parsed, $extractedNamespace ];
        }
 
        /**
@@ -523,13 +547,20 @@ abstract class SearchEngine {
                        return $sugg->getSuggestedTitle()->getPrefixedText();
                } );
 
-               // Rescore results with an exact title match
-               // NOTE: in some cases like cross-namespace redirects
-               // (frequently used as shortcuts e.g. WP:WP on huwiki) some
-               // backends like Cirrus will return no results. We should still
-               // try an exact title match to workaround this limitation
-               $rescorer = new SearchExactMatchRescorer();
-               $rescoredResults = $rescorer->rescore( $search, $this->namespaces, $results, $this->limit );
+               if ( $this->offset === 0 ) {
+                       // Rescore results with an exact title match
+                       // NOTE: in some cases like cross-namespace redirects
+                       // (frequently used as shortcuts e.g. WP:WP on huwiki) some
+                       // backends like Cirrus will return no results. We should still
+                       // try an exact title match to workaround this limitation
+                       $rescorer = new SearchExactMatchRescorer();
+                       $rescoredResults = $rescorer->rescore( $search, $this->namespaces, $results, $this->limit );
+               } else {
+                       // No need to rescore if offset is not 0
+                       // The exact match must have been returned at position 0
+                       // if it existed.
+                       $rescoredResults = $results;
+               }
 
                if ( count( $rescoredResults ) > 0 ) {
                        $found = array_search( $rescoredResults[0], $results );
@@ -648,10 +679,11 @@ abstract class SearchEngine {
         * - default: set to true if this profile is the default
         *
         * @since 1.28
-        * @param $profileType the type of profiles
+        * @param string $profileType the type of profiles
+        * @param User|null $user the user requesting the list of profiles
         * @return array|null the list of profiles or null if none available
         */
-       public function getProfiles( $profileType ) {
+       public function getProfiles( $profileType, User $user = null ) {
                return null;
        }
 
@@ -695,6 +727,37 @@ abstract class SearchEngine {
                Hooks::run( 'SearchIndexFields', [ &$fields, $this ] );
                return $fields;
        }
+
+       /**
+        * Augment search results with extra data.
+        *
+        * @param SearchResultSet $resultSet
+        */
+       public function augmentSearchResults( SearchResultSet $resultSet ) {
+               $setAugmentors = [];
+               $rowAugmentors = [];
+               Hooks::run( "SearchResultsAugment", [ &$setAugmentors, &$rowAugmentors ] );
+
+               if ( !$setAugmentors && !$rowAugmentors ) {
+                       // We're done here
+                       return;
+               }
+
+               // Convert row augmentors to set augmentor
+               foreach ( $rowAugmentors as $name => $row ) {
+                       if ( isset( $setAugmentors[$name] ) ) {
+                               throw new InvalidArgumentException( "Both row and set augmentors are defined for $name" );
+                       }
+                       $setAugmentors[$name] = new PerRowAugmentor( $row );
+               }
+
+               foreach ( $setAugmentors as $name => $augmentor ) {
+                       $data = $augmentor->augmentAll( $resultSet );
+                       if ( $data ) {
+                               $resultSet->setAugmentedData( $name, $data );
+                       }
+               }
+       }
 }
 
 /**
index e30869e..a767bc3 100644 (file)
@@ -5,7 +5,6 @@
  * Allows to create engine of the specific type.
  */
 class SearchEngineFactory {
-
        /**
         * Configuration for SearchEngine classes.
         * @var SearchEngineConfig
@@ -33,10 +32,32 @@ class SearchEngineFactory {
                        $class = $configType;
                } else {
                        $dbr = wfGetDB( DB_REPLICA );
-                       $class = $dbr->getSearchEngine();
+                       $class = self::getSearchEngineClass( $dbr );
                }
 
                $search = new $class( $dbr );
                return $search;
        }
+
+       /**
+        * @param IDatabase $db
+        * @return string SearchEngine subclass name
+        * @since 1.28
+        */
+       public static function getSearchEngineClass( IDatabase $db ) {
+               switch ( $db->getType() ) {
+                       case 'sqlite':
+                               return 'SearchSqlite';
+                       case 'mysql':
+                               return 'SearchMySQL';
+                       case 'postgres':
+                               return 'SearchPostgres';
+                       case 'mssql':
+                               return 'SearchMssql';
+                       case 'oracle':
+                               return 'SearchOracle';
+                       default:
+                               return 'SearchEngineDummy';
+               }
+       }
 }
index 6806ee5..6b5316f 100644 (file)
@@ -14,6 +14,15 @@ interface SearchIndexField {
        const INDEX_TYPE_DATETIME = 4;
        const INDEX_TYPE_NESTED = 5;
        const INDEX_TYPE_BOOL = 6;
+
+       /**
+        * SHORT_TEXT is meant to be used with short text made of mostly ascii
+        * technical information. Generally a language agnostic analysis chain
+        * is used and aggressive splitting to increase recall.
+        * E.g suited for mime/type
+        */
+       const INDEX_TYPE_SHORT_TEXT = 7;
+
        /**
         * Generic field flags.
         */
index 6d66707..3141797 100644 (file)
@@ -21,7 +21,7 @@ class SearchNearMatchResultSet extends SearchResultSet {
                        return false;
                }
                $this->fetched = true;
-               return SearchResult::newFromTitle( $this->result );
+               return SearchResult::newFromTitle( $this->result, $this );
        }
 
        public function rewind() {
index 21effbb..50db84b 100644 (file)
@@ -56,15 +56,25 @@ class SearchResult {
         */
        protected $searchEngine;
 
+       /**
+        * A set of extension data.
+        * @var array[]
+        */
+       protected $extensionData;
+
        /**
         * Return a new SearchResult and initializes it with a title.
         *
-        * @param Title $title
+        * @param Title           $title
+        * @param SearchResultSet $parentSet
         * @return SearchResult
         */
-       public static function newFromTitle( $title ) {
+       public static function newFromTitle( $title, SearchResultSet $parentSet = null ) {
                $result = new static();
                $result->initFromTitle( $title );
+               if ( $parentSet ) {
+                       $parentSet->augmentResult( $result );
+               }
                return $result;
        }
 
@@ -250,4 +260,24 @@ class SearchResult {
        function isFileMatch() {
                return false;
        }
+
+       /**
+        * Get the extension data as:
+        * augmentor name => data
+        * @return array[]
+        */
+       public function getExtensionData() {
+               return $this->extensionData;
+       }
+
+       /**
+        * Set extension data for this result.
+        * The data is:
+        * augmentor name => data
+        * @param array[] $extensionData
+        */
+       public function setExtensionData( array $extensionData ) {
+               $this->extensionData = $extensionData;
+       }
+
 }
index 69795e7..978db27 100644 (file)
@@ -42,6 +42,29 @@ class SearchResultSet {
 
        protected $containedSyntax = false;
 
+       /**
+        * Cache of titles.
+        * Lists titles of the result set, in the same order as results.
+        * @var Title[]
+        */
+       private $titles;
+
+       /**
+        * Cache of results - serialization of the result iterator
+        * as an array.
+        * @var SearchResult[]
+        */
+       private $results;
+
+       /**
+        * Set of result's extra data, indexed per result id
+        * and then per data item name.
+        * The structure is:
+        * PAGE_ID => [ augmentor name => data, ... ]
+        * @var array[]
+        */
+       protected $extraData = [];
+
        public function __construct( $containedSyntax = false ) {
                $this->containedSyntax = $containedSyntax;
        }
@@ -147,15 +170,15 @@ class SearchResultSet {
        /**
         * Fetches next search result, or false.
         * STUB
-        *
-        * @return SearchResult
+        * FIXME: refactor as iterator, so we could use nicer interfaces.
+        * @return SearchResult|false
         */
        function next() {
                return false;
        }
 
        /**
-        * Rewind result set back to begining
+        * Rewind result set back to beginning
         */
        function rewind() {
        }
@@ -176,4 +199,69 @@ class SearchResultSet {
        public function searchContainedSyntax() {
                return $this->containedSyntax;
        }
+
+       /**
+        * Extract all the results in the result set as array.
+        * @return SearchResult[]
+        */
+       public function extractResults() {
+               if ( is_null( $this->results ) ) {
+                       $this->results = [];
+                       if ( $this->numRows() == 0 ) {
+                               // Don't bother if we've got empty result
+                               return $this->results;
+                       }
+                       $this->rewind();
+                       while ( ( $result = $this->next() ) != false ) {
+                               $this->results[] = $result;
+                       }
+                       $this->rewind();
+               }
+               return $this->results;
+       }
+
+       /**
+        * Extract all the titles in the result set.
+        * @return Title[]
+        */
+       public function extractTitles() {
+               if ( is_null( $this->titles ) ) {
+                       if ( $this->numRows() == 0 ) {
+                               // Don't bother if we've got empty result
+                               $this->titles = [];
+                       } else {
+                               $this->titles = array_map(
+                                       function ( SearchResult $result ) {
+                                               return $result->getTitle();
+                                       },
+                                       $this->extractResults() );
+                       }
+               }
+               return $this->titles;
+       }
+
+       /**
+        * Sets augmented data for result set.
+        * @param string $name Extra data item name
+        * @param array[] $data Extra data as PAGEID => data
+        */
+       public function setAugmentedData( $name, $data ) {
+               foreach ( $data as $id => $resultData ) {
+                       $this->extraData[$id][$name] = $resultData;
+               }
+       }
+
+       /**
+        * Returns extra data for specific result and store it in SearchResult object.
+        * @param SearchResult $result
+        * @return array|null List of data as name => value or null if none present.
+        */
+       public function augmentResult( SearchResult $result ) {
+               $id = $result->getTitle()->getArticleID();
+               if ( !$id || !isset( $this->extraData[$id] ) ) {
+                       return null;
+               }
+               $result->setExtensionData( $this->extraData[$id] );
+               return $this->extraData[$id];
+       }
 }
index 6b60899..c3985d1 100644 (file)
@@ -37,7 +37,7 @@ class SqlSearchResultSet extends SearchResultSet {
                }
 
                return SearchResult::newFromTitle(
-                       Title::makeTitle( $row->page_namespace, $row->page_title )
+                       Title::makeTitle( $row->page_namespace, $row->page_title ), $this
                );
        }
 
diff --git a/includes/services/CannotReplaceActiveServiceException.php b/includes/services/CannotReplaceActiveServiceException.php
new file mode 100644 (file)
index 0000000..4993073
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+namespace MediaWiki\Services;
+
+use Exception;
+use RuntimeException;
+
+/**
+ * Exception thrown when trying to replace an already active service.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ *
+ * @since 1.27
+ */
+
+/**
+ * Exception thrown when trying to replace an already active service.
+ */
+class CannotReplaceActiveServiceException extends RuntimeException {
+
+       /**
+        * @param string $serviceName
+        * @param Exception|null $previous
+        */
+       public function __construct( $serviceName, Exception $previous = null ) {
+               parent::__construct( "Cannot replace an active service: $serviceName", 0, $previous );
+       }
+
+}
diff --git a/includes/services/ContainerDisabledException.php b/includes/services/ContainerDisabledException.php
new file mode 100644 (file)
index 0000000..ede076d
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+namespace MediaWiki\Services;
+
+use Exception;
+use RuntimeException;
+
+/**
+ * Exception thrown when trying to access a service on a disabled container or factory.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ *
+ * @since 1.27
+ */
+
+/**
+ * Exception thrown when trying to access a service on a disabled container or factory.
+ */
+class ContainerDisabledException extends RuntimeException {
+
+       /**
+        * @param Exception|null $previous
+        */
+       public function __construct( Exception $previous = null ) {
+               parent::__construct( 'Container disabled!', 0, $previous );
+       }
+
+}
diff --git a/includes/services/DestructibleService.php b/includes/services/DestructibleService.php
new file mode 100644 (file)
index 0000000..6ce9af2
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+namespace MediaWiki\Services;
+
+/**
+ * Interface for destructible services.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ *
+ * @since 1.27
+ */
+
+/**
+ * DestructibleService defines a standard interface for shutting down a service instance.
+ * The intended use is for a service container to be able to shut down services that should
+ * no longer be used, and allow such services to release any system resources.
+ *
+ * @note There is no expectation that services will be destroyed when the process (or web request)
+ * terminates.
+ */
+interface DestructibleService {
+
+       /**
+        * Notifies the service object that it should expect to no longer be used, and should release
+        * any system resources it may own. The behavior of all service methods becomes undefined after
+        * destroy() has been called. It is recommended that implementing classes should throw an
+        * exception when service methods are accessed after destroy() has been called.
+        */
+       public function destroy();
+
+}
diff --git a/includes/services/NoSuchServiceException.php b/includes/services/NoSuchServiceException.php
new file mode 100644 (file)
index 0000000..36e50d2
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+namespace MediaWiki\Services;
+
+use Exception;
+use RuntimeException;
+
+/**
+ * Exception thrown when the requested service is not known.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ *
+ * @since 1.27
+ */
+
+/**
+ * Exception thrown when the requested service is not known.
+ */
+class NoSuchServiceException extends RuntimeException {
+
+       /**
+        * @param string $serviceName
+        * @param Exception|null $previous
+        */
+       public function __construct( $serviceName, Exception $previous = null ) {
+               parent::__construct( "No such service: $serviceName", 0, $previous );
+       }
+
+}
diff --git a/includes/services/SalvageableService.php b/includes/services/SalvageableService.php
new file mode 100644 (file)
index 0000000..a613050
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+namespace MediaWiki\Services;
+
+/**
+ * Interface for salvageable services.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ *
+ * @since 1.28
+ */
+
+/**
+ * SalvageableService defines an interface for services that are able to salvage state from a
+ * previous instance of the same class. The intent is to allow new service instances to re-use
+ * resources that would be expensive to re-create, such as cached data or network connections.
+ *
+ * @note There is no expectation that services will be destroyed when the process (or web request)
+ * terminates.
+ */
+interface SalvageableService {
+
+       /**
+        * Re-uses state from $other. $other must not be used after being passed to salvage(),
+        * and should be considered to be destroyed.
+        *
+        * @note Implementations are responsible for determining what parts of $other can be re-used
+        * safely. In particular, implementations should check that the relevant configuration of
+        * $other is the same as in $this before re-using resources from $other.
+        *
+        * @note Implementations must take care to detach any re-used resources from the original
+        * service instance. If $other is destroyed later, resources that are now used by the
+        * new service instance must not be affected.
+        *
+        * @note If $other is a DestructibleService, implementations should make sure that $other
+        * is in destroyed state after salvage finished. This may be done by calling $other->destroy()
+        * after carefully detaching all relevant resources.
+        *
+        * @param SalvageableService $other The object to salvage state from. $other must have the
+        * exact same type as $this.
+        */
+       public function salvage( SalvageableService $other );
+
+}
diff --git a/includes/services/ServiceAlreadyDefinedException.php b/includes/services/ServiceAlreadyDefinedException.php
new file mode 100644 (file)
index 0000000..c6344d3
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+namespace MediaWiki\Services;
+
+use Exception;
+use RuntimeException;
+
+/**
+ * Exception thrown when a service was already defined, but the
+ * caller expected it to not exist.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ *
+ * @since 1.27
+ */
+
+/**
+ * Exception thrown when a service was already defined, but the
+ * caller expected it to not exist.
+ */
+class ServiceAlreadyDefinedException extends RuntimeException {
+
+       /**
+        * @param string $serviceName
+        * @param Exception|null $previous
+        */
+       public function __construct( $serviceName, Exception $previous = null ) {
+               parent::__construct( "Service already defined: $serviceName", 0, $previous );
+       }
+
+}
diff --git a/includes/services/ServiceContainer.php b/includes/services/ServiceContainer.php
new file mode 100644 (file)
index 0000000..bad0ef9
--- /dev/null
@@ -0,0 +1,378 @@
+<?php
+namespace MediaWiki\Services;
+
+use InvalidArgumentException;
+use RuntimeException;
+use Wikimedia\Assert\Assert;
+
+/**
+ * Generic service container.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ *
+ * @since 1.27
+ */
+
+/**
+ * ServiceContainer provides a generic service to manage named services using
+ * lazy instantiation based on instantiator callback functions.
+ *
+ * Services managed by an instance of ServiceContainer may or may not implement
+ * a common interface.
+ *
+ * @note When using ServiceContainer to manage a set of services, consider
+ * creating a wrapper or a subclass that provides access to the services via
+ * getter methods with more meaningful names and more specific return type
+ * declarations.
+ *
+ * @see docs/injection.txt for an overview of using dependency injection in the
+ *      MediaWiki code base.
+ */
+class ServiceContainer implements DestructibleService {
+
+       /**
+        * @var object[]
+        */
+       private $services = [];
+
+       /**
+        * @var callable[]
+        */
+       private $serviceInstantiators = [];
+
+       /**
+        * @var boolean[] disabled status, per service name
+        */
+       private $disabled = [];
+
+       /**
+        * @var array
+        */
+       private $extraInstantiationParams;
+
+       /**
+        * @var boolean
+        */
+       private $destroyed = false;
+
+       /**
+        * @param array $extraInstantiationParams Any additional parameters to be passed to the
+        * instantiator function when creating a service. This is typically used to provide
+        * access to additional ServiceContainers or Config objects.
+        */
+       public function __construct( array $extraInstantiationParams = [] ) {
+               $this->extraInstantiationParams = $extraInstantiationParams;
+       }
+
+       /**
+        * Destroys all contained service instances that implement the DestructibleService
+        * interface. This will render all services obtained from this MediaWikiServices
+        * instance unusable. In particular, this will disable access to the storage backend
+        * via any of these services. Any future call to getService() will throw an exception.
+        *
+        * @see resetGlobalInstance()
+        */
+       public function destroy() {
+               foreach ( $this->getServiceNames() as $name ) {
+                       $service = $this->peekService( $name );
+                       if ( $service !== null && $service instanceof DestructibleService ) {
+                               $service->destroy();
+                       }
+               }
+
+               $this->destroyed = true;
+       }
+
+       /**
+        * @param array $wiringFiles A list of PHP files to load wiring information from.
+        * Each file is loaded using PHP's include mechanism. Each file is expected to
+        * return an associative array that maps service names to instantiator functions.
+        */
+       public function loadWiringFiles( array $wiringFiles ) {
+               foreach ( $wiringFiles as $file ) {
+                       // the wiring file is required to return an array of instantiators.
+                       $wiring = require $file;
+
+                       Assert::postcondition(
+                               is_array( $wiring ),
+                               "Wiring file $file is expected to return an array!"
+                       );
+
+                       $this->applyWiring( $wiring );
+               }
+       }
+
+       /**
+        * Registers multiple services (aka a "wiring").
+        *
+        * @param array $serviceInstantiators An associative array mapping service names to
+        *        instantiator functions.
+        */
+       public function applyWiring( array $serviceInstantiators ) {
+               Assert::parameterElementType( 'callable', $serviceInstantiators, '$serviceInstantiators' );
+
+               foreach ( $serviceInstantiators as $name => $instantiator ) {
+                       $this->defineService( $name, $instantiator );
+               }
+       }
+
+       /**
+        * Imports all wiring defined in $container. Wiring defined in $container
+        * will override any wiring already defined locally. However, already
+        * existing service instances will be preserved.
+        *
+        * @since 1.28
+        *
+        * @param ServiceContainer $container
+        * @param string[] $skip A list of service names to skip during import
+        */
+       public function importWiring( ServiceContainer $container, $skip = [] ) {
+               $newInstantiators = array_diff_key(
+                       $container->serviceInstantiators,
+                       array_flip( $skip )
+               );
+
+               $this->serviceInstantiators = array_merge(
+                       $this->serviceInstantiators,
+                       $newInstantiators
+               );
+       }
+
+       /**
+        * Returns true if a service is defined for $name, that is, if a call to getService( $name )
+        * would return a service instance.
+        *
+        * @param string $name
+        *
+        * @return bool
+        */
+       public function hasService( $name ) {
+               return isset( $this->serviceInstantiators[$name] );
+       }
+
+       /**
+        * Returns the service instance for $name only if that service has already been instantiated.
+        * This is intended for situations where services get destroyed/cleaned up, so we can
+        * avoid creating a service just to destroy it again.
+        *
+        * @note This is intended for internal use and for test fixtures.
+        * Application logic should use getService() instead.
+        *
+        * @see getService().
+        *
+        * @param string $name
+        *
+        * @return object|null The service instance, or null if the service has not yet been instantiated.
+        * @throws RuntimeException if $name does not refer to a known service.
+        */
+       public function peekService( $name ) {
+               if ( !$this->hasService( $name ) ) {
+                       throw new NoSuchServiceException( $name );
+               }
+
+               return isset( $this->services[$name] ) ? $this->services[$name] : null;
+       }
+
+       /**
+        * @return string[]
+        */
+       public function getServiceNames() {
+               return array_keys( $this->serviceInstantiators );
+       }
+
+       /**
+        * Define a new service. The service must not be known already.
+        *
+        * @see getService().
+        * @see replaceService().
+        *
+        * @param string $name The name of the service to register, for use with getService().
+        * @param callable $instantiator Callback that returns a service instance.
+        *        Will be called with this MediaWikiServices instance as the only parameter.
+        *        Any extra instantiation parameters provided to the constructor will be
+        *        passed as subsequent parameters when invoking the instantiator.
+        *
+        * @throws RuntimeException if there is already a service registered as $name.
+        */
+       public function defineService( $name, callable $instantiator ) {
+               Assert::parameterType( 'string', $name, '$name' );
+
+               if ( $this->hasService( $name ) ) {
+                       throw new ServiceAlreadyDefinedException( $name );
+               }
+
+               $this->serviceInstantiators[$name] = $instantiator;
+       }
+
+       /**
+        * Replace an already defined service.
+        *
+        * @see defineService().
+        *
+        * @note This causes any previously instantiated instance of the service to be discarded.
+        *
+        * @param string $name The name of the service to register.
+        * @param callable $instantiator Callback function that returns a service instance.
+        *        Will be called with this MediaWikiServices instance as the only parameter.
+        *        The instantiator must return a service compatible with the originally defined service.
+        *        Any extra instantiation parameters provided to the constructor will be
+        *        passed as subsequent parameters when invoking the instantiator.
+        *
+        * @throws RuntimeException if $name is not a known service.
+        */
+       public function redefineService( $name, callable $instantiator ) {
+               Assert::parameterType( 'string', $name, '$name' );
+
+               if ( !$this->hasService( $name ) ) {
+                       throw new NoSuchServiceException( $name );
+               }
+
+               if ( isset( $this->services[$name] ) ) {
+                       throw new CannotReplaceActiveServiceException( $name );
+               }
+
+               $this->serviceInstantiators[$name] = $instantiator;
+               unset( $this->disabled[$name] );
+       }
+
+       /**
+        * Disables a service.
+        *
+        * @note Attempts to call getService() for a disabled service will result
+        * in a DisabledServiceException. Calling peekService for a disabled service will
+        * return null. Disabled services are listed by getServiceNames(). A disabled service
+        * can be enabled again using redefineService().
+        *
+        * @note If the service was already active (that is, instantiated) when getting disabled,
+        * and the service instance implements DestructibleService, destroy() is called on the
+        * service instance.
+        *
+        * @see redefineService()
+        * @see resetService()
+        *
+        * @param string $name The name of the service to disable.
+        *
+        * @throws RuntimeException if $name is not a known service.
+        */
+       public function disableService( $name ) {
+               $this->resetService( $name );
+
+               $this->disabled[$name] = true;
+       }
+
+       /**
+        * Resets a service by dropping the service instance.
+        * If the service instances implements DestructibleService, destroy()
+        * is called on the service instance.
+        *
+        * @warning This is generally unsafe! Other services may still retain references
+        * to the stale service instance, leading to failures and inconsistencies. Subclasses
+        * may use this method to reset specific services under specific instances, but
+        * it should not be exposed to application logic.
+        *
+        * @note This is declared final so subclasses can not interfere with the expectations
+        * disableService() has when calling resetService().
+        *
+        * @see redefineService()
+        * @see disableService().
+        *
+        * @param string $name The name of the service to reset.
+        * @param bool $destroy Whether the service instance should be destroyed if it exists.
+        *        When set to false, any existing service instance will effectively be detached
+        *        from the container.
+        *
+        * @throws RuntimeException if $name is not a known service.
+        */
+       final protected function resetService( $name, $destroy = true ) {
+               Assert::parameterType( 'string', $name, '$name' );
+
+               $instance = $this->peekService( $name );
+
+               if ( $destroy && $instance instanceof DestructibleService )  {
+                       $instance->destroy();
+               }
+
+               unset( $this->services[$name] );
+               unset( $this->disabled[$name] );
+       }
+
+       /**
+        * Returns a service object of the kind associated with $name.
+        * Services instances are instantiated lazily, on demand.
+        * This method may or may not return the same service instance
+        * when called multiple times with the same $name.
+        *
+        * @note Rather than calling this method directly, it is recommended to provide
+        * getters with more meaningful names and more specific return types, using
+        * a subclass or wrapper.
+        *
+        * @see redefineService().
+        *
+        * @param string $name The service name
+        *
+        * @throws NoSuchServiceException if $name is not a known service.
+        * @throws ContainerDisabledException if this container has already been destroyed.
+        * @throws ServiceDisabledException if the requested service has been disabled.
+        *
+        * @return object The service instance
+        */
+       public function getService( $name ) {
+               if ( $this->destroyed ) {
+                       throw new ContainerDisabledException();
+               }
+
+               if ( isset( $this->disabled[$name] ) ) {
+                       throw new ServiceDisabledException( $name );
+               }
+
+               if ( !isset( $this->services[$name] ) ) {
+                       $this->services[$name] = $this->createService( $name );
+               }
+
+               return $this->services[$name];
+       }
+
+       /**
+        * @param string $name
+        *
+        * @throws InvalidArgumentException if $name is not a known service.
+        * @return object
+        */
+       private function createService( $name ) {
+               if ( isset( $this->serviceInstantiators[$name] ) ) {
+                       $service = call_user_func_array(
+                               $this->serviceInstantiators[$name],
+                               array_merge( [ $this ], $this->extraInstantiationParams )
+                       );
+                       // NOTE: when adding more wiring logic here, make sure copyWiring() is kept in sync!
+               } else {
+                       throw new NoSuchServiceException( $name );
+               }
+
+               return $service;
+       }
+
+       /**
+        * @param string $name
+        * @return bool Whether the service is disabled
+        * @since 1.28
+        */
+       public function isServiceDisabled( $name ) {
+               return isset( $this->disabled[$name] );
+       }
+}
diff --git a/includes/services/ServiceDisabledException.php b/includes/services/ServiceDisabledException.php
new file mode 100644 (file)
index 0000000..ae15b7c
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+namespace MediaWiki\Services;
+
+use Exception;
+use RuntimeException;
+
+/**
+ * Exception thrown when trying to access a disabled service.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ *
+ * @since 1.27
+ */
+
+/**
+ * Exception thrown when trying to access a disabled service.
+ */
+class ServiceDisabledException extends RuntimeException {
+
+       /**
+        * @param string $serviceName
+        * @param Exception|null $previous
+        */
+       public function __construct( $serviceName, Exception $previous = null ) {
+               parent::__construct( "Service disabled: $serviceName", 0, $previous );
+       }
+
+}
index 695ce5a..084ac05 100644 (file)
@@ -162,12 +162,39 @@ class PHPSessionHandler implements \SessionHandlerInterface {
                }
        }
 
+       /**
+        * Workaround for PHP5 bug
+        *
+        * PHP5 has a bug in handling boolean return values for
+        * SessionHandlerInterface methods, it expects 0 or -1 instead of true or
+        * false. See <https://wiki.php.net/rfc/session.user.return-value>.
+        *
+        * PHP7 and HHVM are not affected.
+        *
+        * @todo When we drop support for Zend PHP 5, this can be removed.
+        * @return bool|int
+        * @codeCoverageIgnore
+        */
+       protected static function returnSuccess() {
+               return defined( 'HHVM_VERSION' ) || version_compare( PHP_VERSION, '7.0.0', '>=' ) ? true : 0;
+       }
+
+       /**
+        * Workaround for PHP5 bug
+        * @see self::returnSuccess()
+        * @return bool|int
+        * @codeCoverageIgnore
+        */
+       protected static function returnFailure() {
+               return defined( 'HHVM_VERSION' ) || version_compare( PHP_VERSION, '7.0.0', '>=' ) ? false : -1;
+       }
+
        /**
         * Initialize the session (handler)
         * @private For internal use only
         * @param string $save_path Path used to store session files (ignored)
         * @param string $session_name Session name (ignored)
-        * @return bool Success
+        * @return bool|int Success (see self::returnSuccess())
         */
        public function open( $save_path, $session_name ) {
                if ( self::$instance !== $this ) {
@@ -176,20 +203,20 @@ class PHPSessionHandler implements \SessionHandlerInterface {
                if ( !$this->enable ) {
                        throw new \BadMethodCallException( 'Attempt to use PHP session management' );
                }
-               return true;
+               return self::returnSuccess();
        }
 
        /**
         * Close the session (handler)
         * @private For internal use only
-        * @return bool Success
+        * @return bool|int Success (see self::returnSuccess())
         */
        public function close() {
                if ( self::$instance !== $this ) {
                        throw new \UnexpectedValueException( __METHOD__ . ': Wrong instance called!' );
                }
                $this->sessionFieldCache = [];
-               return true;
+               return self::returnSuccess();
        }
 
        /**
@@ -224,7 +251,7 @@ class PHPSessionHandler implements \SessionHandlerInterface {
         * @param string $dataStr Session data. Not that you should ever call this
         *   directly, but note that this has the same issues with code injection
         *   via user-controlled data as does PHP's unserialize function.
-        * @return bool Success
+        * @return bool|int Success (see self::returnSuccess())
         */
        public function write( $id, $dataStr ) {
                if ( self::$instance !== $this ) {
@@ -243,14 +270,14 @@ class PHPSessionHandler implements \SessionHandlerInterface {
                                [
                                        'session' => $id,
                        ] );
-                       return true;
+                       return self::returnSuccess();
                }
 
                // First, decode the string PHP handed us
                $data = \Wikimedia\PhpSessionSerializer::decode( $dataStr );
                if ( $data === null ) {
                        // @codeCoverageIgnoreStart
-                       return false;
+                       return self::returnFailure();
                        // @codeCoverageIgnoreEnd
                }
 
@@ -323,14 +350,14 @@ class PHPSessionHandler implements \SessionHandlerInterface {
 
                $session->persist();
 
-               return true;
+               return self::returnSuccess();
        }
 
        /**
         * Destroy a session
         * @private For internal use only
         * @param string $id Session id
-        * @return bool Success
+        * @return bool|int Success (see self::returnSuccess())
         */
        public function destroy( $id ) {
                if ( self::$instance !== $this ) {
@@ -343,14 +370,15 @@ class PHPSessionHandler implements \SessionHandlerInterface {
                if ( $session ) {
                        $session->clear();
                }
-               return true;
+               return self::returnSuccess();
        }
 
        /**
         * Execute garbage collection.
         * @private For internal use only
         * @param int $maxlifetime Maximum session life time (ignored)
-        * @return bool Success
+        * @return bool|int Success (see self::returnSuccess())
+        * @codeCoverageIgnore See T135576
         */
        public function gc( $maxlifetime ) {
                if ( self::$instance !== $this ) {
@@ -358,6 +386,6 @@ class PHPSessionHandler implements \SessionHandlerInterface {
                }
                $before = date( 'YmdHis', time() );
                $this->store->deleteObjectsExpiringBefore( $before );
-               return true;
+               return self::returnSuccess();
        }
 }
index 31761c3..12f16b6 100644 (file)
@@ -600,7 +600,7 @@ final class Session implements \Countable, \Iterator, \ArrayAccess {
         *
         * Calls to save() or clear() will not be delayed.
         *
-        * @return \ScopedCallback When this goes out of scope, a save will be triggered
+        * @return \Wikimedia\ScopedCallback When this goes out of scope, a save will be triggered
         */
        public function delaySave() {
                return $this->backend->delaySave();
index 263cb11..8633715 100644 (file)
@@ -586,11 +586,11 @@ final class SessionBackend {
         *
         * Calls to save() will not be delayed.
         *
-        * @return \ScopedCallback When this goes out of scope, a save will be triggered
+        * @return \Wikimedia\ScopedCallback When this goes out of scope, a save will be triggered
         */
        public function delaySave() {
                $this->delaySave++;
-               return new \ScopedCallback( function () {
+               return new \Wikimedia\ScopedCallback( function () {
                        if ( --$this->delaySave <= 0 ) {
                                $this->delaySave = 0;
                                $this->save();
@@ -642,7 +642,11 @@ final class SessionBackend {
                        ] );
                        $this->user->setToken();
                        if ( !wfReadOnly() ) {
-                               $this->user->saveSettings();
+                               // Promise that the token set here will be valid; save it at end of request
+                               $user = $this->user;
+                               \DeferredUpdates::addCallableUpdate( function () use ( $user ) {
+                                       $user->saveSettings();
+                               } );
                        }
                        $this->metaDirty = true;
                }
@@ -747,7 +751,7 @@ final class SessionBackend {
        private function checkPHPSession() {
                if ( !$this->checkPHPSessionRecursionGuard ) {
                        $this->checkPHPSessionRecursionGuard = true;
-                       $reset = new \ScopedCallback( function () {
+                       $reset = new \Wikimedia\ScopedCallback( function () {
                                $this->checkPHPSessionRecursionGuard = false;
                        } );
 
index 87fdcd3..b8e480f 100644 (file)
@@ -880,7 +880,7 @@ final class SessionManager implements SessionManagerInterface {
                        $session->resetId();
                }
 
-               \ScopedCallback::consume( $delay );
+               \Wikimedia\ScopedCallback::consume( $delay );
                return $session;
        }
 
index 432d5ce..e5247f2 100644 (file)
@@ -130,8 +130,6 @@ class DBSiteStore implements SiteStore {
                                $this->sites->setSite( $site );
                        }
                }
-
-               $this->dbLoadBalancer->reuseConnection( $dbr );
        }
 
        /**
@@ -249,8 +247,6 @@ class DBSiteStore implements SiteStore {
 
                $dbw->endAtomic( __METHOD__ );
 
-               $this->dbLoadBalancer->reuseConnection( $dbw );
-
                $this->reset();
 
                return $success;
@@ -280,8 +276,6 @@ class DBSiteStore implements SiteStore {
                $ok = $dbw->delete( 'site_identifiers', '*', __METHOD__ ) && $ok;
                $dbw->endAtomic( __METHOD__ );
 
-               $this->dbLoadBalancer->reuseConnection( $dbw );
-
                $this->reset();
 
                return $ok;
index 2d37a0f..6ea8b89 100644 (file)
@@ -29,10 +29,11 @@ abstract class BaseTemplate extends QuickTemplate {
         * Get a Message object with its context set
         *
         * @param string $name Message name
+        * @param ... $params Message params
         * @return Message
         */
-       public function getMsg( $name ) {
-               return $this->getSkin()->msg( $name );
+       public function getMsg( $name /* ... */ ) {
+               return call_user_func_array( [ $this->getSkin(), 'msg' ], func_get_args() );
        }
 
        function msg( $str ) {
@@ -55,7 +56,6 @@ abstract class BaseTemplate extends QuickTemplate {
         * @return array
         */
        function getToolbox() {
-
                $toolbox = [];
                if ( isset( $this->data['nav_urls']['whatlinkshere'] )
                        && $this->data['nav_urls']['whatlinkshere']
@@ -69,6 +69,7 @@ abstract class BaseTemplate extends QuickTemplate {
                        $toolbox['recentchangeslinked'] = $this->data['nav_urls']['recentchangeslinked'];
                        $toolbox['recentchangeslinked']['msg'] = 'recentchangeslinked-toolbox';
                        $toolbox['recentchangeslinked']['id'] = 't-recentchangeslinked';
+                       $toolbox['recentchangeslinked']['rel'] = 'nofollow';
                }
                if ( isset( $this->data['feeds'] ) && $this->data['feeds'] ) {
                        $toolbox['feeds']['id'] = 'feedlinks';
index 2351ab8..3efbd3b 100644 (file)
@@ -180,6 +180,7 @@ class SkinTemplate extends Skin {
                                        'text' => $ilLangName,
                                        'title' => $ilTitle,
                                        'class' => $class,
+                                       'link-class' => 'interlanguage-link-target',
                                        'lang' => $ilInterwikiCodeBCP47,
                                        'hreflang' => $ilInterwikiCodeBCP47,
                                ];
@@ -1302,6 +1303,7 @@ class SkinTemplate extends Skin {
 
                        if ( $this->showEmailUser( $user ) ) {
                                $nav_urls['emailuser'] = [
+                                       'text' => $this->msg( 'tool-link-emailuser', $rootUser )->text(),
                                        'href' => self::makeSpecialUrlSubpage( 'Emailuser', $rootUser ),
                                        'tooltip-params' => [ $rootUser ],
                                ];
@@ -1312,6 +1314,7 @@ class SkinTemplate extends Skin {
                                $sur->setContext( $this->getContext() );
                                if ( $sur->userCanExecute( $this->getUser() ) ) {
                                        $nav_urls['userrights'] = [
+                                               'text' => $this->msg( 'tool-link-userrights', $this->getUser()->getName() )->text(),
                                                'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser )
                                        ];
                                }
index 3adf5a6..bdf7638 100644 (file)
@@ -43,7 +43,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
         * Change the form descriptor that determines how a field will look in the authentication form.
         * Called from fieldInfoToFormDescriptor().
         * @param AuthenticationRequest[] $requests
-        * @param string $fieldInfo Field information array (union of all
+        * @param array $fieldInfo Field information array (union of all
         *    AuthenticationRequest::getFieldInfo() responses).
         * @param array $formDescriptor HTMLForm descriptor. The special key 'weight' can be set to
         *    change the order of the fields.
@@ -205,6 +205,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
        /**
         * Return custom message key.
         * Allows subclasses to customize messages.
+        * @param string $defaultKey
         * @return string
         */
        protected function messageKey( $defaultKey ) {
@@ -668,6 +669,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
         * Maps an authentication field configuration for a single field (as returned by
         * AuthenticationRequest::getFieldInfo()) to a HTMLForm field descriptor.
         * @param array $singleFieldInfo
+        * @param string $fieldName
         * @return array
         */
        protected static function mapSingleFieldInfo( $singleFieldInfo, $fieldName ) {
index c28c456..66c7d47 100644 (file)
@@ -107,14 +107,15 @@ abstract class FormSpecialPage extends SpecialPage {
                        $form->addHeaderText( $headerMsg->parseAsBlock() );
                }
 
-               // Retain query parameters (uselang etc)
-               $params = array_diff_key(
-                       $this->getRequest()->getQueryValues(), [ 'title' => null ] );
-               $form->addHiddenField( 'redirectparams', wfArrayToCgi( $params ) );
-
                $form->addPreText( $this->preText() );
                $form->addPostText( $this->postText() );
                $this->alterForm( $form );
+               if ( $form->getMethod() == 'post' ) {
+                       // Retain query parameters (uselang etc) on POST requests
+                       $params = array_diff_key(
+                               $this->getRequest()->getQueryValues(), [ 'title' => null ] );
+                       $form->addHiddenField( 'redirectparams', wfArrayToCgi( $params ) );
+               }
 
                // Give hooks a chance to alter the form, adding extra fields or text etc
                Hooks::run( 'SpecialPageBeforeFormDisplay', [ $this->getName(), &$form ] );
index 9d17e7d..275e121 100644 (file)
@@ -359,7 +359,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                                $this->authAction = $this->isSignup() ? AuthManager::ACTION_CREATE_CONTINUE
                                        : AuthManager::ACTION_LOGIN_CONTINUE;
                                $this->authRequests = $response->neededRequests;
-                               $this->mainLoginForm( $response->neededRequests, $response->message, 'warning' );
+                               $this->mainLoginForm( $response->neededRequests, $response->message, $response->messageType );
                                break;
                        default:
                                throw new LogicException( 'invalid AuthenticationResponse' );
@@ -499,7 +499,21 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
 
                $form = $this->getAuthForm( $requests, $this->authAction, $msg, $msgtype );
                $form->prepareForm();
-               $formHtml = $form->getHTML( $msg ? Status::newFatal( $msg ) : false );
+
+               $submitStatus = Status::newGood();
+               if ( $msg && $msgtype === 'warning' ) {
+                       $submitStatus->warning( $msg );
+               } elseif ( $msg && $msgtype === 'error' ) {
+                       $submitStatus->fatal( $msg );
+               }
+
+               // warning header for non-standard workflows (e.g. security reauthentication)
+               if ( !$this->isSignup() && $this->getUser()->isLoggedIn() ) {
+                       $reauthMessage = $this->securityLevel ? 'userlogin-reauth' : 'userlogin-loggedin';
+                       $submitStatus->warning( $reauthMessage, $this->getUser()->getName() );
+               }
+
+               $formHtml = $form->getHTML( $submitStatus );
 
                $out->addHTML( $this->getPageHtml( $formHtml ) );
        }
@@ -621,13 +635,6 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                        $form->setId( 'userlogin2' );
                }
 
-               // warning header for non-standard workflows (e.g. security reauthentication)
-               if ( !$this->isSignup() && $this->getUser()->isLoggedIn() ) {
-                       $reauthMessage = $this->securityLevel ? 'userlogin-reauth' : 'userlogin-loggedin';
-                       $form->addHeaderText( Html::rawElement( 'div', [ 'class' => 'warningbox' ],
-                               $this->msg( $reauthMessage )->params( $this->getUser()->getName() )->parse() ) );
-               }
-
                $form->suppressDefaultSubmit();
 
                $this->authForm = $form;
@@ -1063,7 +1070,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                }
                if ( !$this->isSignup() && $this->showExtraInformation() ) {
                        $passwordReset = new PasswordReset( $this->getConfig(), AuthManager::singleton() );
-                       if ( $passwordReset->isAllowed( $this->getUser() ) ) {
+                       if ( $passwordReset->isAllowed( $this->getUser() )->isGood() ) {
                                $fieldDefinitions['passwordReset'] = [
                                        'type' => 'info',
                                        'raw' => true,
index c4fb316..39ca8dd 100644 (file)
@@ -103,13 +103,14 @@ class SpecialBlockList extends SpecialPage {
                $context = new DerivativeContext( $this->getContext() );
                $context->setTitle( $this->getPageTitle() ); // Remove subpage
                $form = HTMLForm::factory( 'ooui', $fields, $context );
-               $form->setMethod( 'get' );
-               $form->setWrapperLegendMsg( 'ipblocklist-legend' );
-               $form->setSubmitTextMsg( 'ipblocklist-submit' );
-               $form->setSubmitProgressive();
-               $form->prepareForm();
+               $form
+                       ->setMethod( 'get' )
+                       ->setWrapperLegendMsg( 'ipblocklist-legend' )
+                       ->setSubmitTextMsg( 'ipblocklist-submit' )
+                       ->setSubmitProgressive()
+                       ->prepareForm()
+                       ->displayForm( false );
 
-               $form->displayForm( '' );
                $this->showList( $pager );
        }
 
index 11faa28..72e0b88 100644 (file)
  * @ingroup SpecialPage
  */
 class SpecialBookSources extends SpecialPage {
-       /**
-        * ISBN passed to the page, if any
-        */
-       protected $isbn = '';
-
        public function __construct() {
                parent::__construct( 'Booksources' );
        }
@@ -49,19 +44,21 @@ class SpecialBookSources extends SpecialPage {
                $this->setHeaders();
                $this->outputHeader();
 
-               $this->isbn = self::cleanIsbn( $isbn ?: $this->getRequest()->getText( 'isbn' ) );
+               // User provided ISBN
+               $isbn = $isbn ?: $this->getRequest()->getText( 'isbn' );
+               $isbn = trim( $isbn );
 
-               $this->buildForm();
+               $this->buildForm( $isbn );
 
-               if ( $this->isbn !== '' ) {
-                       if ( !self::isValidISBN( $this->isbn ) ) {
+               if ( $isbn !== '' ) {
+                       if ( !self::isValidISBN( $isbn ) ) {
                                $out->wrapWikiMsg(
                                        "<div class=\"error\">\n$1\n</div>",
                                        'booksources-invalid-isbn'
                                );
                        }
 
-                       $this->showList();
+                       $this->showList( $isbn );
                }
        }
 
@@ -121,20 +118,24 @@ class SpecialBookSources extends SpecialPage {
 
        /**
         * Generate a form to allow users to enter an ISBN
+        *
+        * @param string $isbn
         */
-       private function buildForm() {
+       private function buildForm( $isbn ) {
                $formDescriptor = [
                        'isbn' => [
                                'type' => 'text',
                                'name' => 'isbn',
                                'label-message' => 'booksources-isbn',
-                               'default' => $this->isbn,
+                               'default' => $isbn,
                                'autofocus' => true,
                                'required' => true,
                        ],
                ];
 
-               $htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() )
+               $context = new DerivativeContext( $this->getContext() );
+               $context->setTitle( $this->getPageTitle() );
+               HTMLForm::factory( 'ooui', $formDescriptor, $context )
                        ->setWrapperLegendMsg( 'booksources-search-legend' )
                        ->setSubmitTextMsg( 'booksources-search' )
                        ->setMethod( 'get' )
@@ -146,17 +147,19 @@ class SpecialBookSources extends SpecialPage {
         * Determine where to get the list of book sources from,
         * format and output them
         *
+        * @param string $isbn
         * @throws MWException
         * @return bool
         */
-       private function showList() {
+       private function showList( $isbn ) {
                $out = $this->getOutput();
 
                global $wgContLang;
 
+               $isbn = self::cleanIsbn( $isbn );
                # Hook to allow extensions to insert additional HTML,
                # e.g. for API-interacting plugins and so on
-               Hooks::run( 'BookInformation', [ $this->isbn, $out ] );
+               Hooks::run( 'BookInformation', [ $isbn, $out ] );
 
                # Check for a local page such as Project:Book_sources and use that if available
                $page = $this->msg( 'booksources' )->inContentLanguage()->text();
@@ -169,7 +172,7 @@ class SpecialBookSources extends SpecialPage {
                                // XXX: in the future, this could be stored as structured data, defining a list of book sources
 
                                $text = $content->getNativeData();
-                               $out->addWikiText( str_replace( 'MAGICNUMBER', $this->isbn, $text ) );
+                               $out->addWikiText( str_replace( 'MAGICNUMBER', $isbn, $text ) );
 
                                return true;
                        } else {
@@ -182,7 +185,7 @@ class SpecialBookSources extends SpecialPage {
                $out->addHTML( '<ul>' );
                $items = $wgContLang->getBookstoreList();
                foreach ( $items as $label => $url ) {
-                       $out->addHTML( $this->makeListItem( $label, $url ) );
+                       $out->addHTML( $this->makeListItem( $isbn, $label, $url ) );
                }
                $out->addHTML( '</ul>' );
 
@@ -192,12 +195,13 @@ class SpecialBookSources extends SpecialPage {
        /**
         * Format a book source list item
         *
+        * @param string $isbn
         * @param string $label Book source label
         * @param string $url Book source URL
         * @return string
         */
-       private function makeListItem( $label, $url ) {
-               $url = str_replace( '$1', $this->isbn, $url );
+       private function makeListItem( $isbn, $label, $url ) {
+               $url = str_replace( '$1', $isbn, $url );
 
                return Html::rawElement( 'li', [],
                        Html::element( 'a', [ 'href' => $url, 'class' => 'external' ], $label )
index 9975e41..1dd78d7 100644 (file)
@@ -146,19 +146,9 @@ class SpecialBotPasswords extends FormSpecialPage {
                        ];
 
                        $fields['restrictions'] = [
-                               'type' => 'textarea',
-                               'label-message' => 'botpasswords-label-restrictions',
+                               'class' => 'HTMLRestrictionsField',
                                'required' => true,
-                               'default' => $this->botPassword->getRestrictions()->toJson( true ),
-                               'rows' => 5,
-                               'validation-callback' => function ( $v ) {
-                                       try {
-                                               MWRestrictions::newFromJson( $v );
-                                               return true;
-                                       } catch ( InvalidArgumentException $ex ) {
-                                               return $ex->getMessage();
-                                       }
-                               },
+                               'default' => $this->botPassword->getRestrictions(),
                        ];
 
                } else {
@@ -234,7 +224,7 @@ class SpecialBotPasswords extends FormSpecialPage {
                                        'name' => 'op',
                                        'value' => 'create',
                                        'label-message' => 'botpasswords-label-create',
-                                       'flags' => [ 'primary', 'constructive' ],
+                                       'flags' => [ 'primary', 'progressive' ],
                                ] );
                        }
 
@@ -282,7 +272,7 @@ class SpecialBotPasswords extends FormSpecialPage {
                $bp = BotPassword::newUnsaved( [
                        'centralId' => $this->userId,
                        'appId' => $this->par,
-                       'restrictions' => MWRestrictions::newFromJson( $data['restrictions'] ),
+                       'restrictions' => $data['restrictions'],
                        'grants' => array_merge(
                                MWGrants::getHiddenGrants(),
                                preg_replace( '/^grant-/', '', $data['grants'] )
index dd7f0ed..87276a1 100644 (file)
@@ -156,10 +156,20 @@ class SpecialChangeContentModel extends FormSpecialPage {
                }
 
                $this->title = Title::newFromText( $data['pagetitle'] );
+               $titleWithNewContentModel = clone $this->title;
+               $titleWithNewContentModel->setContentModel( $data['model'] );
                $user = $this->getUser();
-               // Check permissions and make sure the user has permission to edit the specific page
-               $errors = $this->title->getUserPermissionsErrors( 'editcontentmodel', $user );
-               $errors = wfMergeErrorArrays( $errors, $this->title->getUserPermissionsErrors( 'edit', $user ) );
+               // Check permissions and make sure the user has permission to:
+               $errors = wfMergeErrorArrays(
+                       // edit the contentmodel of the page
+                       $this->title->getUserPermissionsErrors( 'editcontentmodel', $user ),
+                       // edit the page under the old content model
+                       $this->title->getUserPermissionsErrors( 'edit', $user ),
+                       // edit the contentmodel under the new content model
+                       $titleWithNewContentModel->getUserPermissionsErrors( 'editcontentmodel', $user ),
+                       // edit the page under the new content model
+                       $titleWithNewContentModel->getUserPermissionsErrors( 'edit', $user )
+               );
                if ( $errors ) {
                        $out = $this->getOutput();
                        $wikitext = $out->formatPermissionsErrorMessage( $errors );
index 7b4e9db..f494b9d 100644 (file)
@@ -69,9 +69,9 @@ class EmailConfirmation extends UnlistedSpecialPage {
                                $this->getOutput()->addWikiMsg( 'confirmemail_noemail' );
                        }
                } else {
-                       $trxProfiler->setSilenced( true );
+                       $old = $trxProfiler->setSilenced( true );
                        $this->attemptConfirm( $code );
-                       $trxProfiler->setSilenced( false );
+                       $trxProfiler->setSilenced( $old );
                }
        }
 
index 68289a7..3cd4d4d 100644 (file)
@@ -496,12 +496,12 @@ class SpecialContributions extends IncludableSpecialPage {
 
                if ( $tagFilter ) {
                        $filterSelection = Html::rawElement(
-                               'td',
+                               'div',
                                [],
                                implode( '&#160;', $tagFilter )
                        );
                } else {
-                       $filterSelection = Html::rawElement( 'td', [ 'colspan' => 2 ], '' );
+                       $filterSelection = Html::rawElement( 'div', [], '' );
                }
 
                $this->getOutput()->addModules( 'mediawiki.userSuggest' );
@@ -542,19 +542,19 @@ class SpecialContributions extends IncludableSpecialPage {
                );
 
                $targetSelection = Html::rawElement(
-                       'td',
-                       [ 'colspan' => 2 ],
-                       $labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '
+                       'div',
+                       [],
+                       $labelNewbies . '<br>' . $labelUsername . ' ' . $input . ' '
                );
 
                $namespaceSelection = Xml::tags(
-                       'td',
+                       'div',
                        [],
                        Xml::label(
                                $this->msg( 'namespace' )->text(),
                                'namespace',
                                ''
-                       ) .
+                       ) . '&#160;' .
                        Html::namespaceSelector(
                                [ 'selected' => $this->opts['namespace'], 'all' => '' ],
                                [
@@ -647,12 +647,12 @@ class SpecialContributions extends IncludableSpecialPage {
                );
 
                $extraOptions = Html::rawElement(
-                       'td',
-                       [ 'colspan' => 2 ],
+                       'div',
+                       [],
                        implode( '', $filters )
                );
 
-               $dateSelectionAndSubmit = Xml::tags( 'td', [ 'colspan' => 2 ],
+               $dateSelectionAndSubmit = Xml::tags( 'div', [],
                        Xml::dateMenu(
                                $this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],
                                $this->opts['month']
@@ -663,13 +663,14 @@ class SpecialContributions extends IncludableSpecialPage {
                                )
                );
 
-               $form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );
-               $form .= Html::rawElement( 'table', [ 'class' => 'mw-contributions-table' ], "\n" .
-                       Html::rawElement( 'tr', [], $targetSelection ) . "\n" .
-                       Html::rawElement( 'tr', [], $namespaceSelection ) . "\n" .
-                       Html::rawElement( 'tr', [], $filterSelection ) . "\n" .
-                       Html::rawElement( 'tr', [], $extraOptions ) . "\n" .
-                       Html::rawElement( 'tr', [], $dateSelectionAndSubmit ) . "\n"
+               $form .= Xml::fieldset(
+                       $this->msg( 'sp-contributions-search' )->text(),
+                       $targetSelection .
+                       $namespaceSelection .
+                       $filterSelection .
+                       $extraOptions .
+                       $dateSelectionAndSubmit,
+                       [ 'class' => 'mw-contributions-table' ]
                );
 
                $explain = $this->msg( 'sp-contributions-explain' );
@@ -677,7 +678,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        $form .= "<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>";
                }
 
-               $form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );
+               $form .= Xml::closeElement( 'form' );
 
                return $form;
        }
index a5a45d5..0defcd1 100644 (file)
@@ -68,8 +68,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         */
        private function initServices() {
                if ( !$this->titleParser ) {
-                       $lang = $this->getContext()->getLanguage();
-                       $this->titleParser = new MediaWikiTitleCodec( $lang, GenderCache::singleton() );
+                       $this->titleParser = MediaWikiServices::getInstance()->getTitleParser();
                }
        }
 
@@ -205,7 +204,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                        }
                }
 
-               GenderCache::singleton()->doTitlesArray( $titles );
+               MediaWikiServices::getInstance()->getGenderCache()->doTitlesArray( $titles );
 
                $list = [];
                /** @var Title $title */
@@ -355,7 +354,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                                }
                        }
 
-                       GenderCache::singleton()->doTitlesArray( $titles );
+                       MediaWikiServices::getInstance()->getGenderCache()->doTitlesArray( $titles );
 
                        foreach ( $titles as $title ) {
                                $list[] = $title->getPrefixedText();
@@ -431,20 +430,22 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                }
 
                $user = $this->getUser();
-               $store = MediaWikiServices::getInstance()->getWatchedItemStore();
-
-               foreach ( $this->badItems as $row ) {
-                       list( $title, $namespace, $dbKey ) = $row;
-                       $action = $title ? 'cleaning up' : 'deleting';
-                       wfDebug( "User {$user->getName()} has broken watchlist item ns($namespace):$dbKey, $action.\n" );
-
-                       $store->removeWatch( $user, new TitleValue( (int)$namespace, $dbKey ) );
-
-                       // Can't just do an UPDATE instead of DELETE/INSERT due to unique index
-                       if ( $title ) {
-                               $user->addWatch( $title );
+               $badItems = $this->badItems;
+               DeferredUpdates::addCallableUpdate( function () use ( $user, $badItems ) {
+                       $store = MediaWikiServices::getInstance()->getWatchedItemStore();
+                       foreach ( $badItems as $row ) {
+                               list( $title, $namespace, $dbKey ) = $row;
+                               $action = $title ? 'cleaning up' : 'deleting';
+                               wfDebug( "User {$user->getName()} has broken watchlist item " .
+                                       "ns($namespace):$dbKey, $action.\n" );
+
+                               $store->removeWatch( $user, new TitleValue( (int)$namespace, $dbKey ) );
+                               // Can't just do an UPDATE instead of DELETE/INSERT due to unique index
+                               if ( $title ) {
+                                       $user->addWatch( $title );
+                               }
                        }
-               }
+               } );
        }
 
        /**
index d2e3e7f..c54abad 100644 (file)
@@ -45,9 +45,9 @@ class EmailInvalidation extends UnlistedSpecialPage {
                $this->checkReadOnly();
                $this->checkPermissions();
 
-               $trxProfiler->setSilenced( true );
+               $old = $trxProfiler->setSilenced( true );
                $this->attemptInvalidate( $code );
-               $trxProfiler->setSilenced( false );
+               $trxProfiler->setSilenced( $old );
        }
 
        /**
index fe1dd98..c58af60 100644 (file)
@@ -594,9 +594,13 @@ class ImportReporter extends ContextSource {
                $this->mPageCount++;
 
                if ( $successCount > 0 ) {
+                       // <bdi> prevents jumbling of the versions count
+                       // in RTL wikis in case the page title is LTR
                        $this->getOutput()->addHTML(
                                "<li>" . Linker::linkKnown( $title ) . " " .
+                                       "<bdi>" .
                                        $this->msg( 'import-revision-count' )->numParams( $successCount )->escaped() .
+                                       "</bdi>" .
                                        "</li>\n"
                        );
 
index e3be225..6093f83 100644 (file)
@@ -35,7 +35,7 @@ class MIMEsearchPage extends QueryPage {
        }
 
        public function isExpensive() {
-               return true;
+               return false;
        }
 
        function isSyndicated() {
index 3a12cf3..298d6c4 100644 (file)
@@ -462,7 +462,7 @@ class MovePageForm extends UnlistedSpecialPage {
                                'name' => 'wpMove',
                                'value' => $this->msg( 'movepagebtn' )->text(),
                                'label' => $this->msg( 'movepagebtn' )->text(),
-                               'flags' => [ 'constructive', 'primary' ],
+                               'flags' => [ 'primary', 'progressive' ],
                                'type' => 'submit',
                        ] ),
                        [
@@ -783,32 +783,57 @@ class MovePageForm extends UnlistedSpecialPage {
                LogEventsList::showLogExtract( $out, 'move', $title );
        }
 
+       /**
+        * Show subpages of the page being moved. Section is not shown if both current
+        * namespace does not support subpages and no talk subpages were found.
+        *
+        * @param Title $title Page being moved.
+        */
        function showSubpages( $title ) {
-               if ( !MWNamespace::hasSubpages( $title->getNamespace() ) ) {
+               $nsHasSubpages = MWNamespace::hasSubpages( $title->getNamespace() );
+               $subpages = $title->getSubpages();
+               $count = $subpages instanceof TitleArray ? $subpages->count() : 0;
+
+               $titleIsTalk = $title->isTalkPage();
+               $subpagesTalk = $title->getTalkPage()->getSubpages();
+               $countTalk = $subpagesTalk instanceof TitleArray ? $subpagesTalk->count() : 0;
+               $totalCount = $count + $countTalk;
+
+               if ( !$nsHasSubpages && $countTalk == 0 ) {
                        return;
                }
 
-               $subpages = $title->getSubpages();
-               $count = $subpages instanceof TitleArray ? $subpages->count() : 0;
+               $this->getOutput()->wrapWikiMsg(
+                       '== $1 ==',
+                       [ 'movesubpage', ( $titleIsTalk ? $count : $totalCount ) ]
+               );
+
+               if ( $nsHasSubpages ) {
+                       $this->showSubpagesList( $subpages, $count, 'movesubpagetext', true );
+               }
 
+               if ( !$titleIsTalk && $countTalk > 0 ) {
+                       $this->showSubpagesList( $subpagesTalk, $countTalk, 'movesubpagetalktext' );
+               }
+       }
+
+       function showSubpagesList( $subpages, $pagecount, $wikiMsg, $noSubpageMsg = false ) {
                $out = $this->getOutput();
-               $out->wrapWikiMsg( '== $1 ==', [ 'movesubpage', $count ] );
 
                # No subpages.
-               if ( $count == 0 ) {
+               if ( $pagecount == 0 && $noSubpageMsg ) {
                        $out->addWikiMsg( 'movenosubpage' );
-
                        return;
                }
 
-               $out->addWikiMsg( 'movesubpagetext', $this->getLanguage()->formatNum( $count ) );
+               $out->addWikiMsg( $wikiMsg, $this->getLanguage()->formatNum( $pagecount ) );
                $out->addHTML( "<ul>\n" );
 
                $linkBatch = new LinkBatch( $subpages );
                $linkBatch->setCaller( __METHOD__ );
                $linkBatch->execute();
-
                $linkRenderer = $this->getLinkRenderer();
+
                foreach ( $subpages as $subpage ) {
                        $link = $linkRenderer->makeLink( $subpage );
                        $out->addHTML( "<li>$link</li>\n" );
old mode 100644 (file)
new mode 100755 (executable)
index 718a6dc..be8ad8f
@@ -54,6 +54,8 @@ class SpecialNewpages extends IncludableSpecialPage {
                $opts->add( 'feed', '' );
                $opts->add( 'tagfilter', '' );
                $opts->add( 'invert', false );
+               $opts->add( 'size-mode', 'max' );
+               $opts->add( 'size', 0 );
 
                $this->customFilters = [];
                Hooks::run( 'SpecialNewPagesFilters', [ $this, &$this->customFilters ] );
@@ -214,6 +216,9 @@ class SpecialNewpages extends IncludableSpecialPage {
                $tagFilterVal = $this->opts->consumeValue( 'tagfilter' );
                $nsinvert = $this->opts->consumeValue( 'invert' );
 
+               $size = $this->opts->consumeValue( 'size' );
+               $max = $this->opts->consumeValue( 'size-mode' ) === 'max';
+
                // Check username input validity
                $ut = Title::makeTitleSafe( NS_USER, $username );
                $userText = $ut ? $ut->getText() : '';
@@ -254,6 +259,11 @@ class SpecialNewpages extends IncludableSpecialPage {
                                'size' => 30,
                                'cssclass' => 'mw-autocomplete-user', // used by mediawiki.userSuggest
                        ],
+                       'size' => [
+                               'type' => 'sizefilter',
+                               'name' => 'size',
+                               'default' => -$max * $size,
+                       ],
                ];
 
                $htmlForm = new HTMLForm( $form, $this->getContext() );
@@ -376,7 +386,11 @@ class SpecialNewpages extends IncludableSpecialPage {
 
                if ( !$title->equals( $oldTitle ) ) {
                        $oldTitleText = $oldTitle->getPrefixedText();
-                       $oldTitleText = $this->msg( 'rc-old-title' )->params( $oldTitleText )->escaped();
+                       $oldTitleText = Html::rawElement(
+                               'span',
+                               [ 'class' => 'mw-newpages-oldtitle' ],
+                               $this->msg( 'rc-old-title' )->params( $oldTitleText )->escaped()
+                       );
                }
 
                return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} "
index 3697e5d..eee5b64 100644 (file)
@@ -59,7 +59,7 @@ class SpecialPreferences extends SpecialPage {
                        $session->remove( 'specialPreferencesSaveSuccess' );
                        $out->addModuleStyles( 'mediawiki.notification.convertmessagebox.styles' );
 
-                       $out->addHtml(
+                       $out->addHTML(
                                Html::rawElement(
                                        'div',
                                        [
index fc924a4..adf12d4 100644 (file)
@@ -272,7 +272,7 @@ class SpecialRandomInCategory extends FormSpecialPage {
                                'high' => 'MAX( cl_timestamp )'
                        ],
                        [
-                               'cl_to' => $this->category->getDBKey(),
+                               'cl_to' => $this->category->getDBkey(),
                        ],
                        __METHOD__,
                        [
index 8aff690..cd3299c 100644 (file)
@@ -159,6 +159,9 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                        if ( preg_match( '/^namespace=(\d+)$/', $bit, $m ) ) {
                                $opts['namespace'] = $m[1];
                        }
+                       if ( preg_match( '/^tagfilter=(.*)$/', $bit, $m ) ) {
+                               $opts['tagfilter'] = $m[1];
+                       }
                }
        }
 
index fcd4ab5..dcaff4d 100644 (file)
@@ -106,7 +106,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
        ];
 
        public function __construct() {
-               parent::__construct( 'Revisiondelete', 'deletedhistory' );
+               parent::__construct( 'Revisiondelete', 'deleterevision' );
        }
 
        public function doesWrites() {
@@ -210,17 +210,19 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                        $this->showForm();
                }
 
-               $qc = $this->getLogQueryCond();
-               # Show relevant lines from the deletion log
-               $deleteLogPage = new LogPage( 'delete' );
-               $output->addHTML( "<h2>" . $deleteLogPage->getName()->escaped() . "</h2>\n" );
-               LogEventsList::showLogExtract(
-                       $output,
-                       'delete',
-                       $this->targetObj,
-                       '', /* user */
-                       [ 'lim' => 25, 'conds' => $qc, 'useMaster' => $this->wasSaved ]
-               );
+               if ( $user->isAllowed( 'deletedhistory' ) ) {
+                       $qc = $this->getLogQueryCond();
+                       # Show relevant lines from the deletion log
+                       $deleteLogPage = new LogPage( 'delete' );
+                       $output->addHTML( "<h2>" . $deleteLogPage->getName()->escaped() . "</h2>\n" );
+                       LogEventsList::showLogExtract(
+                               $output,
+                               'delete',
+                               $this->targetObj,
+                               '', /* user */
+                               [ 'lim' => 25, 'conds' => $qc, 'useMaster' => $this->wasSaved ]
+                       );
+               }
                # Show relevant lines from the suppression log
                if ( $user->isAllowed( 'suppressionlog' ) ) {
                        $suppressLogPage = new LogPage( 'suppress' );
index 26b86f9..6daf19f 100644 (file)
@@ -403,6 +403,7 @@ class SpecialSearch extends SpecialPage {
 
                        // show results
                        if ( $numTextMatches > 0 ) {
+                               $search->augmentSearchResults( $textMatches );
                                $out->addHTML( $this->showMatches( $textMatches ) );
                        }
 
@@ -716,7 +717,7 @@ class SpecialSearch extends SpecialPage {
         *
         * @return string
         */
-       protected function showMatches( &$matches, $interwiki = null ) {
+       protected function showMatches( $matches, $interwiki = null ) {
                global $wgContLang;
 
                $terms = $wgContLang->convertForSearchResult( $matches->termMatches() );
@@ -725,7 +726,7 @@ class SpecialSearch extends SpecialPage {
                $pos = $this->offset;
 
                if ( $result && $interwiki ) {
-                       $out .= $this->interwikiHeader( $interwiki, $result );
+                       $out .= $this->interwikiHeader( $interwiki, $matches );
                }
 
                $out .= "<ul class='mw-search-results'>\n";
@@ -750,7 +751,7 @@ class SpecialSearch extends SpecialPage {
         *
         * @return string
         */
-       protected function showHit( $result, $terms, $position ) {
+       protected function showHit( SearchResult $result, $terms, $position ) {
 
                if ( $result->isBrokenTitle() ) {
                        return '';
index 898d170..ea40cb8 100644 (file)
@@ -176,7 +176,7 @@ class SpecialTags extends SpecialPage {
                $newRow .= Xml::tags( 'td', null, Xml::element( 'code', null, $tag ) );
 
                $linkRenderer = $this->getLinkRenderer();
-               $disp = ChangeTags::tagDescription( $tag );
+               $disp = ChangeTags::tagDescription( $tag, $this->getContext() );
                if ( $showEditLinks ) {
                        $disp .= ' ';
                        $editLink = $linkRenderer->makeLink(
index 8a06abf..433dcab 100644 (file)
@@ -156,7 +156,7 @@ class UserrightsPage extends SpecialPage {
                if ( $request->getCheck( 'success' ) && $this->mFetchedUser !== null ) {
                        $out->addModules( [ 'mediawiki.special.userrights' ] );
                        $out->addModuleStyles( 'mediawiki.notification.convertmessagebox.styles' );
-                       $out->addHtml(
+                       $out->addHTML(
                                Html::rawElement(
                                        'div',
                                        [
index c8b85ae..2cd492e 100644 (file)
@@ -633,7 +633,7 @@ class SpecialVersion extends SpecialPage {
                        usort( $wgExtensionCredits[$type], [ $this, 'compare' ] );
 
                        foreach ( $wgExtensionCredits[$type] as $extension ) {
-                               $out .= $this->getCreditsForExtension( $extension );
+                               $out .= $this->getCreditsForExtension( $type, $extension );
                        }
                }
 
@@ -669,11 +669,12 @@ class SpecialVersion extends SpecialPage {
         *  - Description of extension (descriptionmsg or description)
         *  - List of authors (author) and link to a ((AUTHORS)|(CREDITS))(\.txt)? file if it exists
         *
+        * @param string $type Category name of the extension
         * @param array $extension
         *
         * @return string Raw HTML
         */
-       public function getCreditsForExtension( array $extension ) {
+       public function getCreditsForExtension( $type, array $extension ) {
                $out = $this->getOutput();
 
                // We must obtain the information for all the bits and pieces!
@@ -830,7 +831,7 @@ class SpecialVersion extends SpecialPage {
                // Finally! Create the table
                $html = Html::openElement( 'tr', [
                                'class' => 'mw-version-ext',
-                               'id' => Sanitizer::escapeId( 'mw-version-ext-' . $extension['name'] )
+                               'id' => Sanitizer::escapeId( 'mw-version-ext-' . $type . '-' . $extension['name'] )
                        ]
                );
 
index 99f9c7c..4824961 100644 (file)
@@ -618,9 +618,10 @@ class SpecialWatchlist extends ChangesListSpecialPage {
 
                $form .= Xml::openElement( 'form', [
                        'method' => 'get',
-                       'action' => $this->getPageTitle()->getLocalURL(),
+                       'action' => wfScript(),
                        'id' => 'mw-watchlist-form'
                ] );
+               $form .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() );
                $form .= Xml::fieldset(
                        $this->msg( 'watchlist-options' )->text(),
                        false,
index 2d39f99..e298f10 100644 (file)
@@ -48,6 +48,15 @@ class NewPagesPager extends ReverseChronologicalPager {
                $username = $this->opts->getValue( 'username' );
                $user = Title::makeTitleSafe( NS_USER, $username );
 
+               $size = abs( intval( $this->opts->getValue( 'size' ) ) );
+               if ( $size > 0 ) {
+                       if ( $this->opts->getValue( 'size-mode' ) === 'max' ) {
+                               $conds[] = 'page_len <= ' . $size;
+                       } else {
+                               $conds[] = 'page_len >= ' . $size;
+                       }
+               }
+
                $rcIndexes = [];
 
                if ( $namespace !== false ) {
index 666f3f9..1346e1c 100644 (file)
@@ -328,7 +328,7 @@ class BalanceElement {
        /**
         * Parent of this element, or the string "flat" if this element has
         * already been flattened into its parent.
-        * @var string|null $parent
+        * @var BalanceElement|string|null $parent
         */
        public $parent;
 
@@ -337,7 +337,7 @@ class BalanceElement {
         * child will be an actual BalanceElement object; the rest will
         * be strings, representing either text nodes or flattened
         * BalanceElement objects.
-        * @var array $children
+        * @var BalanceElement[]|string[] $children
         */
        public $children;
 
@@ -465,6 +465,7 @@ class BalanceElement {
         * in its parent by that string.
         *
         * @param array $config Balancer configuration; see Balancer::__construct().
+        * @return string
         *
         * @see __toString()
         */
@@ -653,7 +654,7 @@ class BalanceElement {
 class BalanceStack implements IteratorAggregate {
        /**
         * Backing storage for the stack.
-        * @var array $elements
+        * @var BalanceElement[] $elements
         */
        private $elements = [];
        /**
@@ -717,6 +718,7 @@ class BalanceStack implements IteratorAggregate {
        /**
         * Insert text at the appropriate place for inserting a node.
         * @param string $value
+        * @param bool $isComment
         * @see https://html.spec.whatwg.org/multipage/syntax.html#appropriate-place-for-inserting-a-node
         */
        public function insertText( $value, $isComment = false ) {
@@ -729,7 +731,7 @@ class BalanceStack implements IteratorAggregate {
                        $this->config['tidyCompat'] && !$isComment &&
                        $this->currentNode->isA( BalanceSets::$tidyPWrapSet )
                ) {
-                       $this->insertHTMLELement( 'mw:p-wrap', [] );
+                       $this->insertHTMLElement( 'mw:p-wrap', [] );
                        return $this->insertText( $value );
                } else {
                        $this->currentNode->appendChild( $value );
@@ -906,7 +908,7 @@ class BalanceStack implements IteratorAggregate {
        /**
         * Return an iterator over this stack which visits the current node
         * first, and the root node last.
-        * @return Iterator
+        * @return \Iterator
         */
        public function getIterator() {
                return new ReverseArrayIterator( $this->elements );
@@ -1080,6 +1082,8 @@ class BalanceStack implements IteratorAggregate {
        /**
         * Foster parent the given $elt in the stack of open elements.
         * @param BalanceElement|string $elt
+        * @return BalanceElement|string
+        *
         * @see https://html.spec.whatwg.org/multipage/syntax.html#foster-parent
         */
        private function fosterParent( $elt ) {
@@ -1520,6 +1524,7 @@ class BalanceActiveFormattingElements {
 
        /**
         * Determine whether an element is in the list of formatting elements.
+        * @param BalanceElement $elt
         * @return boolean
         */
        public function isInList( BalanceElement $elt ) {
@@ -1529,6 +1534,8 @@ class BalanceActiveFormattingElements {
        /**
         * Find the element $elt in the list and remove it.
         * Used when parsing &lt;a&gt; in body mode.
+        *
+        * @param BalanceElement $elt
         */
        public function remove( BalanceElement $elt ) {
                if ( $this->head !== $elt && !$elt->prevAFE ) {
@@ -1597,6 +1604,9 @@ class BalanceActiveFormattingElements {
 
        /**
         * Find element $a in the list and replace it with element $b
+        *
+        * @param BalanceElement $a
+        * @param BalanceElement $b
         */
        public function replace( BalanceElement $a, BalanceElement $b ) {
                if ( $this->head !== $a && !$a->prevAFE ) {
@@ -1628,6 +1638,9 @@ class BalanceActiveFormattingElements {
 
        /**
         * Find $a in the list and insert $b after it.
+
+        * @param BalanceElement $a
+        * @param BalanceElement $b
         */
        public function insertAfter( BalanceElement $a, BalanceElement $b ) {
                if ( $this->head !== $a && !$a->prevAFE ) {
@@ -1778,9 +1791,12 @@ class BalanceActiveFormattingElements {
  */
 class Balancer {
        private $parseMode;
+       /** @var \Iterator */
        private $bitsIterator;
        private $allowedHtmlElements;
+       /** @var BalanceActiveFormattingElements */
        private $afe;
+       /** @var BalanceStack */
        private $stack;
        private $strict;
        private $allowComments;
@@ -1795,6 +1811,11 @@ class Balancer {
        private $inRCDATA;
        private $inRAWTEXT;
 
+       /** @var callable|null */
+       private $processingCallback;
+       /** @var array */
+       private $processingArgs;
+
        /**
         * Valid HTML5 comments.
         * Regex borrowed from Tim Starling's "remex-html" project.
@@ -2582,7 +2603,7 @@ class Balancer {
                        case 'tt':
                        case 'u':
                                $this->afe->reconstruct( $this->stack );
-                               $this->afe->push( $this->stack->insertHTMLElement( $value, $attribs ), $attribs );
+                               $this->afe->push( $this->stack->insertHTMLElement( $value, $attribs ) );
                                return true;
 
                        case 'nobr':
@@ -2591,7 +2612,7 @@ class Balancer {
                                        $this->inBodyMode( 'endtag', 'nobr' );
                                        $this->afe->reconstruct( $this->stack );
                                }
-                               $this->afe->push( $this->stack->insertHTMLElement( $value, $attribs ), $attribs );
+                               $this->afe->push( $this->stack->insertHTMLElement( $value, $attribs ) );
                                return true;
 
                        case 'applet':
index 1be5c24..3422632 100644 (file)
@@ -446,7 +446,8 @@ abstract class UploadBase {
                        return $status;
                }
 
-               $this->mFileProps = FSFile::getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
+               $mwProps = new MWFileProps( MimeMagic::singleton() );
+               $this->mFileProps = $mwProps->getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
                $mime = $this->mFileProps['mime'];
 
                if ( $wgVerifyMimeType ) {
@@ -504,7 +505,8 @@ abstract class UploadBase {
                # getTitle() sets some internal parameters like $this->mFinalExtension
                $this->getTitle();
 
-               $this->mFileProps = FSFile::getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
+               $mwProps = new MWFileProps( MimeMagic::singleton() );
+               $this->mFileProps = $mwProps->getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
 
                # check MIME type, if desired
                $mime = $this->mFileProps['file-mime'];
@@ -1438,7 +1440,11 @@ abstract class UploadBase {
                        'http://www.w3.org/tr/rec-rdf-syntax/',
                ];
 
-               if ( !in_array( $namespace, $validNamespaces ) ) {
+               // Inkscape mangles namespace definitions created by Adobe Illustrator.
+               // This is nasty but harmless. (T144827)
+               $isBuggyInkscape = preg_match( '/^&(#38;)*ns_[a-z_]+;$/', $namespace );
+
+               if ( !( $isBuggyInkscape || in_array( $namespace, $validNamespaces ) ) ) {
                        wfDebug( __METHOD__ . ": Non-svg namespace '$namespace' in uploaded file.\n" );
                        /** @todo Return a status object to a closure in XmlTypeCheck, for MW1.21+ */
                        $this->mSVGNSError = $namespace;
index 9145a85..08cf434 100644 (file)
@@ -130,7 +130,7 @@ class UploadFromChunks extends UploadFromFile {
                // Get the file extension from the last chunk
                $ext = FileBackend::extensionFromPath( $this->mVirtualTempPath );
                // Get a 0-byte temp file to perform the concatenation at
-               $tmpFile = TempFSFile::factory( 'chunkedupload_', $ext );
+               $tmpFile = TempFSFile::factory( 'chunkedupload_', $ext, wfTempDir() );
                $tmpPath = false; // fail in concatenate()
                if ( $tmpFile ) {
                        // keep alive with $this
index 6639c34..865f630 100644 (file)
@@ -202,7 +202,7 @@ class UploadFromUrl extends UploadBase {
         * @return string Path to the file
         */
        protected function makeTemporaryFile() {
-               $tmpFile = TempFSFile::factory( 'URL' );
+               $tmpFile = TempFSFile::factory( 'URL', 'urlupload_', wfTempDir() );
                $tmpFile->bind( $this );
 
                return $tmpFile->getPath();
index 000c6a4..b7160b3 100644 (file)
@@ -207,7 +207,9 @@ class UploadStash {
                        wfDebug( __METHOD__ . " tried to stash file at '$path', but it doesn't exist\n" );
                        throw new UploadStashBadPathException( "path doesn't exist" );
                }
-               $fileProps = FSFile::getPropsFromPath( $path );
+
+               $mwProps = new MWFileProps( MimeMagic::singleton() );
+               $fileProps = $mwProps->getPropsFromPath( $path, true );
                wfDebug( __METHOD__ . " stashing file at '$path'\n" );
 
                // we will be initializing from some tmpnam files that don't have extensions.
index 0bbe12e..57610fc 100644 (file)
@@ -68,7 +68,7 @@ class BotPassword implements IDBAccessObject {
        /**
         * Get a database connection for the bot passwords database
         * @param int $db Index of the connection to get, e.g. DB_MASTER or DB_REPLICA.
-        * @return DatabaseBase
+        * @return Database
         */
        public static function getDB( $db ) {
                global $wgBotPasswordsCluster, $wgBotPasswordsDatabase;
@@ -411,11 +411,13 @@ class BotPassword implements IDBAccessObject {
         */
        public static function canonicalizeLoginData( $username, $password ) {
                $sep = BotPassword::getSeparator();
-               if ( strpos( $username, $sep ) !== false ) {
-                       // the separator is not valid in usernames so this must be a bot login
-                       return [ $username, $password, false ];
+               // the strlen check helps minimize the password information obtainable from timing
+               if ( strlen( $password ) >= 32 && strpos( $username, $sep ) !== false ) {
+                       // the separator is not valid in new usernames but might appear in legacy ones
+                       if ( preg_match( '/^[0-9a-w]{32,}$/', $password ) ) {
+                               return [ $username, $password, true ];
+                       }
                } elseif ( strlen( $password ) > 32 && strpos( $password, $sep ) !== false ) {
-                       // the strlen check helps minimize the password information obtainable from timing
                        $segments = explode( $sep, $password );
                        $password = array_pop( $segments );
                        $appId = implode( $sep, $segments );
index 2af0324..92a65f0 100644 (file)
@@ -26,6 +26,7 @@ use MediaWiki\Session\Token;
 use MediaWiki\Auth\AuthManager;
 use MediaWiki\Auth\AuthenticationResponse;
 use MediaWiki\Auth\AuthenticationRequest;
+use Wikimedia\ScopedCallback;
 
 /**
  * String Some punctuation to prevent editing from broken text-mangling proxies.
@@ -320,7 +321,7 @@ class User implements IDBAccessObject {
         * @return string
         */
        public function __toString() {
-               return $this->getName();
+               return (string)$this->getName();
        }
 
        /**
@@ -1434,11 +1435,11 @@ class User implements IDBAccessObject {
         * protected against race conditions using a compare-and-set (CAS) mechanism
         * based on comparing $this->mTouched with the user_touched field.
         *
-        * @param DatabaseBase $db
-        * @param array $conditions WHERE conditions for use with DatabaseBase::update
-        * @return array WHERE conditions for use with DatabaseBase::update
+        * @param Database $db
+        * @param array $conditions WHERE conditions for use with Database::update
+        * @return array WHERE conditions for use with Database::update
         */
-       protected function makeUpdateConditions( DatabaseBase $db, array $conditions ) {
+       protected function makeUpdateConditions( Database $db, array $conditions ) {
                if ( $this->mTouched ) {
                        // CAS check: only update if the row wasn't changed sicne it was loaded.
                        $conditions['user_touched'] = $db->timestamp( $this->mTouched );
@@ -1802,12 +1803,16 @@ class User implements IDBAccessObject {
                        return false;
                }
 
+               $limits = array_merge(
+                       [ '&can-bypass' => true ],
+                       $wgRateLimits[$action]
+               );
+
                // Some groups shouldn't trigger the ping limiter, ever
-               if ( !$this->isPingLimitable() ) {
+               if ( $limits['&can-bypass'] && !$this->isPingLimitable() ) {
                        return false;
                }
 
-               $limits = $wgRateLimits[$action];
                $keys = [];
                $id = $this->getId();
                $userLimit = false;
@@ -2358,7 +2363,8 @@ class User implements IDBAccessObject {
                        wfGetDB( DB_MASTER )->onTransactionPreCommitOrIdle(
                                function() use ( $cache, $key ) {
                                        $cache->delete( $key );
-                               }
+                               },
+                               __METHOD__
                        );
                }
        }
@@ -4927,9 +4933,12 @@ class User implements IDBAccessObject {
         * Deferred version of incEditCountImmediate()
         */
        public function incEditCount() {
-               wfGetDB( DB_MASTER )->onTransactionPreCommitOrIdle( function() {
-                       $this->incEditCountImmediate();
-               } );
+               wfGetDB( DB_MASTER )->onTransactionPreCommitOrIdle(
+                       function () {
+                               $this->incEditCountImmediate();
+                       },
+                       __METHOD__
+               );
        }
 
        /**
index 09244a4..69bc503 100644 (file)
@@ -273,15 +273,20 @@ class UserRightsProxy {
         * Replaces User::touchUser()
         */
        function invalidateCache() {
-               $this->db->update( 'user',
+               $this->db->update(
+                       'user',
                        [ 'user_touched' => $this->db->timestamp() ],
                        [ 'user_id' => $this->id ],
-                       __METHOD__ );
+                       __METHOD__
+               );
 
                $wikiId = $this->db->getWikiID();
                $userId = $this->id;
-               $this->db->onTransactionPreCommitOrIdle( function() use ( $wikiId, $userId ) {
-                       User::purge( $wikiId, $userId );
-               } );
+               $this->db->onTransactionPreCommitOrIdle(
+                       function () use ( $wikiId, $userId ) {
+                               User::purge( $wikiId, $userId );
+                       },
+                       __METHOD__
+               );
        }
 }
index 395ce37..319b5d4 100644 (file)
@@ -160,6 +160,7 @@ class AutoloadGenerator {
         *
         * @param {string} $commandName Command name to include in comment
         * @param {string} $filename of PHP file to put autoload information in.
+        * @return string
         */
        protected function generatePHPAutoload( $commandName, $filename ) {
                // No existing JSON file found; update/generate PHP file
@@ -290,6 +291,10 @@ EOD;
                foreach ( glob( $this->basepath . '/*.php' ) as $file ) {
                        $this->readFile( $file );
                }
+
+               // Legacy aliases
+               $this->forceClassPath( 'DatabaseBase',
+                       $this->basepath . '/includes/libs/rdbms/database/Database.php' );
        }
 }
 
index 9fc2431..ef2c14a 100644 (file)
@@ -77,16 +77,21 @@ class BatchRowIterator implements RecursiveIterator {
         */
        private $key;
 
+       /**
+        * @var array Additional query options
+        */
+       protected $options = [];
+
        /**
         * @param IDatabase $db The database to read from
         * @param string|array $table      The name or names of the table to read from
         * @param string|array $primaryKey The name or names of the primary key columns
         * @param integer      $batchSize  The number of rows to fetch per iteration
-        * @throws MWException
+        * @throws InvalidArgumentException
         */
        public function __construct( IDatabase $db, $table, $primaryKey, $batchSize ) {
                if ( $batchSize < 1 ) {
-                       throw new MWException( 'Batch size must be at least 1 row.' );
+                       throw new InvalidArgumentException( 'Batch size must be at least 1 row.' );
                }
                $this->db = $db;
                $this->table = $table;
@@ -97,7 +102,7 @@ class BatchRowIterator implements RecursiveIterator {
        }
 
        /**
-        * @param array $condition Query conditions suitable for use with
+        * @param array $conditions Query conditions suitable for use with
         *  IDatabase::select
         */
        public function addConditions( array $conditions ) {
@@ -105,7 +110,15 @@ class BatchRowIterator implements RecursiveIterator {
        }
 
        /**
-        * @param array $condition Query join conditions suitable for use
+        * @param array $options Query options suitable for use with
+        *  IDatabase::select
+        */
+       public function addOptions( array $options ) {
+               $this->options = array_merge( $this->options, $options );
+       }
+
+       /**
+        * @param array $conditions Query join conditions suitable for use
         *  with IDatabase::select
         */
        public function addJoinConditions( array $conditions ) {
@@ -199,7 +212,7 @@ class BatchRowIterator implements RecursiveIterator {
                        [
                                'LIMIT' => $this->batchSize,
                                'ORDER BY' => $this->orderBy,
-                       ],
+                       ] + $this->options,
                        $this->joinConditions
                );
 
index 1e7eda8..39b65c3 100644 (file)
@@ -112,15 +112,8 @@ class BatchRowUpdate {
         *
         * @param callable $output A callback taking a single string
         *  parameter to output
-        *
-        * @throws MWException
         */
-       public function setOutput( $output ) {
-               if ( !is_callable( $output ) ) {
-                       throw new MWException(
-                               'Provided $output param is required to be callable.'
-                       );
-               }
+       public function setOutput( callable $output ) {
                $this->output = $output;
        }
 
diff --git a/includes/utils/IP.php b/includes/utils/IP.php
deleted file mode 100644 (file)
index 8676baf..0000000
+++ /dev/null
@@ -1,791 +0,0 @@
-<?php
-/**
- * Functions and constants to play with IP addresses and ranges
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @author Antoine Musso "<hashar at free dot fr>", Aaron Schulz
- */
-
-use IPSet\IPSet;
-
-// Some regex definition to "play" with IP address and IP address blocks
-
-// An IPv4 address is made of 4 bytes from x00 to xFF which is d0 to d255
-define( 'RE_IP_BYTE', '(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|0?[0-9]?[0-9])' );
-define( 'RE_IP_ADD', RE_IP_BYTE . '\.' . RE_IP_BYTE . '\.' . RE_IP_BYTE . '\.' . RE_IP_BYTE );
-// An IPv4 block is an IP address and a prefix (d1 to d32)
-define( 'RE_IP_PREFIX', '(3[0-2]|[12]?\d)' );
-define( 'RE_IP_BLOCK', RE_IP_ADD . '\/' . RE_IP_PREFIX );
-
-// An IPv6 address is made up of 8 words (each x0000 to xFFFF).
-// However, the "::" abbreviation can be used on consecutive x0000 words.
-define( 'RE_IPV6_WORD', '([0-9A-Fa-f]{1,4})' );
-define( 'RE_IPV6_PREFIX', '(12[0-8]|1[01][0-9]|[1-9]?\d)' );
-define( 'RE_IPV6_ADD',
-       '(?:' . // starts with "::" (including "::")
-               ':(?::|(?::' . RE_IPV6_WORD . '){1,7})' .
-       '|' . // ends with "::" (except "::")
-               RE_IPV6_WORD . '(?::' . RE_IPV6_WORD . '){0,6}::' .
-       '|' . // contains one "::" in the middle (the ^ makes the test fail if none found)
-               RE_IPV6_WORD . '(?::((?(-1)|:))?' . RE_IPV6_WORD . '){1,6}(?(-2)|^)' .
-       '|' . // contains no "::"
-               RE_IPV6_WORD . '(?::' . RE_IPV6_WORD . '){7}' .
-       ')'
-);
-// An IPv6 block is an IP address and a prefix (d1 to d128)
-define( 'RE_IPV6_BLOCK', RE_IPV6_ADD . '\/' . RE_IPV6_PREFIX );
-// For IPv6 canonicalization (NOT for strict validation; these are quite lax!)
-define( 'RE_IPV6_GAP', ':(?:0+:)*(?::(?:0+:)*)?' );
-define( 'RE_IPV6_V4_PREFIX', '0*' . RE_IPV6_GAP . '(?:ffff:)?' );
-
-// This might be useful for regexps used elsewhere, matches any IPv4 or IPv6 address or network
-define( 'IP_ADDRESS_STRING',
-       '(?:' .
-               RE_IP_ADD . '(?:\/' . RE_IP_PREFIX . ')?' . // IPv4
-       '|' .
-               RE_IPV6_ADD . '(?:\/' . RE_IPV6_PREFIX . ')?' . // IPv6
-       ')'
-);
-
-/**
- * A collection of public static functions to play with IP address
- * and IP blocks.
- */
-class IP {
-       /** @var IPSet */
-       private static $proxyIpSet = null;
-
-       /**
-        * Determine if a string is as valid IP address or network (CIDR prefix).
-        * SIIT IPv4-translated addresses are rejected.
-        * @note canonicalize() tries to convert translated addresses to IPv4.
-        *
-        * @param string $ip Possible IP address
-        * @return bool
-        */
-       public static function isIPAddress( $ip ) {
-               return (bool)preg_match( '/^' . IP_ADDRESS_STRING . '$/', $ip );
-       }
-
-       /**
-        * Given a string, determine if it as valid IP in IPv6 only.
-        * @note Unlike isValid(), this looks for networks too.
-        *
-        * @param string $ip Possible IP address
-        * @return bool
-        */
-       public static function isIPv6( $ip ) {
-               return (bool)preg_match( '/^' . RE_IPV6_ADD . '(?:\/' . RE_IPV6_PREFIX . ')?$/', $ip );
-       }
-
-       /**
-        * Given a string, determine if it as valid IP in IPv4 only.
-        * @note Unlike isValid(), this looks for networks too.
-        *
-        * @param string $ip Possible IP address
-        * @return bool
-        */
-       public static function isIPv4( $ip ) {
-               return (bool)preg_match( '/^' . RE_IP_ADD . '(?:\/' . RE_IP_PREFIX . ')?$/', $ip );
-       }
-
-       /**
-        * Validate an IP address. Ranges are NOT considered valid.
-        * SIIT IPv4-translated addresses are rejected.
-        * @note canonicalize() tries to convert translated addresses to IPv4.
-        *
-        * @param string $ip
-        * @return bool True if it is valid
-        */
-       public static function isValid( $ip ) {
-               return ( preg_match( '/^' . RE_IP_ADD . '$/', $ip )
-                       || preg_match( '/^' . RE_IPV6_ADD . '$/', $ip ) );
-       }
-
-       /**
-        * Validate an IP Block (valid address WITH a valid prefix).
-        * SIIT IPv4-translated addresses are rejected.
-        * @note canonicalize() tries to convert translated addresses to IPv4.
-        *
-        * @param string $ipblock
-        * @return bool True if it is valid
-        */
-       public static function isValidBlock( $ipblock ) {
-               return ( preg_match( '/^' . RE_IPV6_BLOCK . '$/', $ipblock )
-                       || preg_match( '/^' . RE_IP_BLOCK . '$/', $ipblock ) );
-       }
-
-       /**
-        * Convert an IP into a verbose, uppercase, normalized form.
-        * Both IPv4 and IPv6 addresses are trimmed. Additionally,
-        * IPv6 addresses in octet notation are expanded to 8 words;
-        * IPv4 addresses have leading zeros, in each octet, removed.
-        *
-        * @param string $ip IP address in quad or octet form (CIDR or not).
-        * @return string
-        */
-       public static function sanitizeIP( $ip ) {
-               $ip = trim( $ip );
-               if ( $ip === '' ) {
-                       return null;
-               }
-               /* If not an IP, just return trimmed value, since sanitizeIP() is called
-                * in a number of contexts where usernames are supplied as input.
-                */
-               if ( !self::isIPAddress( $ip ) ) {
-                       return $ip;
-               }
-               if ( self::isIPv4( $ip ) ) {
-                       // Remove leading 0's from octet representation of IPv4 address
-                       $ip = preg_replace( '/(?:^|(?<=\.))0+(?=[1-9]|0\.|0$)/', '', $ip );
-                       return $ip;
-               }
-               // Remove any whitespaces, convert to upper case
-               $ip = strtoupper( $ip );
-               // Expand zero abbreviations
-               $abbrevPos = strpos( $ip, '::' );
-               if ( $abbrevPos !== false ) {
-                       // We know this is valid IPv6. Find the last index of the
-                       // address before any CIDR number (e.g. "a:b:c::/24").
-                       $CIDRStart = strpos( $ip, "/" );
-                       $addressEnd = ( $CIDRStart !== false )
-                               ? $CIDRStart - 1
-                               : strlen( $ip ) - 1;
-                       // If the '::' is at the beginning...
-                       if ( $abbrevPos == 0 ) {
-                               $repeat = '0:';
-                               $extra = ( $ip == '::' ) ? '0' : ''; // for the address '::'
-                               $pad = 9; // 7+2 (due to '::')
-                       // If the '::' is at the end...
-                       } elseif ( $abbrevPos == ( $addressEnd - 1 ) ) {
-                               $repeat = ':0';
-                               $extra = '';
-                               $pad = 9; // 7+2 (due to '::')
-                       // If the '::' is in the middle...
-                       } else {
-                               $repeat = ':0';
-                               $extra = ':';
-                               $pad = 8; // 6+2 (due to '::')
-                       }
-                       $ip = str_replace( '::',
-                               str_repeat( $repeat, $pad - substr_count( $ip, ':' ) ) . $extra,
-                               $ip
-                       );
-               }
-               // Remove leading zeros from each bloc as needed
-               $ip = preg_replace( '/(^|:)0+(' . RE_IPV6_WORD . ')/', '$1$2', $ip );
-
-               return $ip;
-       }
-
-       /**
-        * Prettify an IP for display to end users.
-        * This will make it more compact and lower-case.
-        *
-        * @param string $ip
-        * @return string
-        */
-       public static function prettifyIP( $ip ) {
-               $ip = self::sanitizeIP( $ip ); // normalize (removes '::')
-               if ( self::isIPv6( $ip ) ) {
-                       // Split IP into an address and a CIDR
-                       if ( strpos( $ip, '/' ) !== false ) {
-                               list( $ip, $cidr ) = explode( '/', $ip, 2 );
-                       } else {
-                               list( $ip, $cidr ) = [ $ip, '' ];
-                       }
-                       // Get the largest slice of words with multiple zeros
-                       $offset = 0;
-                       $longest = $longestPos = false;
-                       while ( preg_match(
-                               '!(?:^|:)0(?::0)+(?:$|:)!', $ip, $m, PREG_OFFSET_CAPTURE, $offset
-                       ) ) {
-                               list( $match, $pos ) = $m[0]; // full match
-                               if ( strlen( $match ) > strlen( $longest ) ) {
-                                       $longest = $match;
-                                       $longestPos = $pos;
-                               }
-                               $offset = ( $pos + strlen( $match ) ); // advance
-                       }
-                       if ( $longest !== false ) {
-                               // Replace this portion of the string with the '::' abbreviation
-                               $ip = substr_replace( $ip, '::', $longestPos, strlen( $longest ) );
-                       }
-                       // Add any CIDR back on
-                       if ( $cidr !== '' ) {
-                               $ip = "{$ip}/{$cidr}";
-                       }
-                       // Convert to lower case to make it more readable
-                       $ip = strtolower( $ip );
-               }
-
-               return $ip;
-       }
-
-       /**
-        * Given a host/port string, like one might find in the host part of a URL
-        * per RFC 2732, split the hostname part and the port part and return an
-        * array with an element for each. If there is no port part, the array will
-        * have false in place of the port. If the string was invalid in some way,
-        * false is returned.
-        *
-        * This was easy with IPv4 and was generally done in an ad-hoc way, but
-        * with IPv6 it's somewhat more complicated due to the need to parse the
-        * square brackets and colons.
-        *
-        * A bare IPv6 address is accepted despite the lack of square brackets.
-        *
-        * @param string $both The string with the host and port
-        * @return array|false Array normally, false on certain failures
-        */
-       public static function splitHostAndPort( $both ) {
-               if ( substr( $both, 0, 1 ) === '[' ) {
-                       if ( preg_match( '/^\[(' . RE_IPV6_ADD . ')\](?::(?P<port>\d+))?$/', $both, $m ) ) {
-                               if ( isset( $m['port'] ) ) {
-                                       return [ $m[1], intval( $m['port'] ) ];
-                               } else {
-                                       return [ $m[1], false ];
-                               }
-                       } else {
-                               // Square bracket found but no IPv6
-                               return false;
-                       }
-               }
-               $numColons = substr_count( $both, ':' );
-               if ( $numColons >= 2 ) {
-                       // Is it a bare IPv6 address?
-                       if ( preg_match( '/^' . RE_IPV6_ADD . '$/', $both ) ) {
-                               return [ $both, false ];
-                       } else {
-                               // Not valid IPv6, but too many colons for anything else
-                               return false;
-                       }
-               }
-               if ( $numColons >= 1 ) {
-                       // Host:port?
-                       $bits = explode( ':', $both );
-                       if ( preg_match( '/^\d+/', $bits[1] ) ) {
-                               return [ $bits[0], intval( $bits[1] ) ];
-                       } else {
-                               // Not a valid port
-                               return false;
-                       }
-               }
-
-               // Plain hostname
-               return [ $both, false ];
-       }
-
-       /**
-        * Given a host name and a port, combine them into host/port string like
-        * you might find in a URL. If the host contains a colon, wrap it in square
-        * brackets like in RFC 2732. If the port matches the default port, omit
-        * the port specification
-        *
-        * @param string $host
-        * @param int $port
-        * @param bool|int $defaultPort
-        * @return string
-        */
-       public static function combineHostAndPort( $host, $port, $defaultPort = false ) {
-               if ( strpos( $host, ':' ) !== false ) {
-                       $host = "[$host]";
-               }
-               if ( $defaultPort !== false && $port == $defaultPort ) {
-                       return $host;
-               } else {
-                       return "$host:$port";
-               }
-       }
-
-       /**
-        * Convert an IPv4 or IPv6 hexadecimal representation back to readable format
-        *
-        * @param string $hex Number, with "v6-" prefix if it is IPv6
-        * @return string Quad-dotted (IPv4) or octet notation (IPv6)
-        */
-       public static function formatHex( $hex ) {
-               if ( substr( $hex, 0, 3 ) == 'v6-' ) { // IPv6
-                       return self::hexToOctet( substr( $hex, 3 ) );
-               } else { // IPv4
-                       return self::hexToQuad( $hex );
-               }
-       }
-
-       /**
-        * Converts a hexadecimal number to an IPv6 address in octet notation
-        *
-        * @param string $ip_hex Pure hex (no v6- prefix)
-        * @return string (of format a:b:c:d:e:f:g:h)
-        */
-       public static function hexToOctet( $ip_hex ) {
-               // Pad hex to 32 chars (128 bits)
-               $ip_hex = str_pad( strtoupper( $ip_hex ), 32, '0', STR_PAD_LEFT );
-               // Separate into 8 words
-               $ip_oct = substr( $ip_hex, 0, 4 );
-               for ( $n = 1; $n < 8; $n++ ) {
-                       $ip_oct .= ':' . substr( $ip_hex, 4 * $n, 4 );
-               }
-               // NO leading zeroes
-               $ip_oct = preg_replace( '/(^|:)0+(' . RE_IPV6_WORD . ')/', '$1$2', $ip_oct );
-
-               return $ip_oct;
-       }
-
-       /**
-        * Converts a hexadecimal number to an IPv4 address in quad-dotted notation
-        *
-        * @param string $ip_hex Pure hex
-        * @return string (of format a.b.c.d)
-        */
-       public static function hexToQuad( $ip_hex ) {
-               // Pad hex to 8 chars (32 bits)
-               $ip_hex = str_pad( strtoupper( $ip_hex ), 8, '0', STR_PAD_LEFT );
-               // Separate into four quads
-               $s = '';
-               for ( $i = 0; $i < 4; $i++ ) {
-                       if ( $s !== '' ) {
-                               $s .= '.';
-                       }
-                       $s .= base_convert( substr( $ip_hex, $i * 2, 2 ), 16, 10 );
-               }
-
-               return $s;
-       }
-
-       /**
-        * Determine if an IP address really is an IP address, and if it is public,
-        * i.e. not RFC 1918 or similar
-        *
-        * @param string $ip
-        * @return bool
-        */
-       public static function isPublic( $ip ) {
-               static $privateSet = null;
-               if ( !$privateSet ) {
-                       $privateSet = new IPSet( [
-                               '10.0.0.0/8', # RFC 1918 (private)
-                               '172.16.0.0/12', # RFC 1918 (private)
-                               '192.168.0.0/16', # RFC 1918 (private)
-                               '0.0.0.0/8', # this network
-                               '127.0.0.0/8', # loopback
-                               'fc00::/7', # RFC 4193 (local)
-                               '0:0:0:0:0:0:0:1', # loopback
-                               '169.254.0.0/16', # link-local
-                               'fe80::/10', # link-local
-                       ] );
-               }
-               return !$privateSet->match( $ip );
-       }
-
-       /**
-        * Return a zero-padded upper case hexadecimal representation of an IP address.
-        *
-        * Hexadecimal addresses are used because they can easily be extended to
-        * IPv6 support. To separate the ranges, the return value from this
-        * function for an IPv6 address will be prefixed with "v6-", a non-
-        * hexadecimal string which sorts after the IPv4 addresses.
-        *
-        * @param string $ip Quad dotted/octet IP address.
-        * @return string|bool False on failure
-        */
-       public static function toHex( $ip ) {
-               if ( self::isIPv6( $ip ) ) {
-                       $n = 'v6-' . self::IPv6ToRawHex( $ip );
-               } elseif ( self::isIPv4( $ip ) ) {
-                       // T62035/T97897: An IP with leading 0's fails in ip2long sometimes (e.g. *.08),
-                       // also double/triple 0 needs to be changed to just a single 0 for ip2long.
-                       $ip = self::sanitizeIP( $ip );
-                       $n = ip2long( $ip );
-                       if ( $n < 0 ) {
-                               $n += pow( 2, 32 );
-                               # On 32-bit platforms (and on Windows), 2^32 does not fit into an int,
-                               # so $n becomes a float. We convert it to string instead.
-                               if ( is_float( $n ) ) {
-                                       $n = (string)$n;
-                               }
-                       }
-                       if ( $n !== false ) {
-                               # Floating points can handle the conversion; faster than Wikimedia\base_convert()
-                               $n = strtoupper( str_pad( base_convert( $n, 10, 16 ), 8, '0', STR_PAD_LEFT ) );
-                       }
-               } else {
-                       $n = false;
-               }
-
-               return $n;
-       }
-
-       /**
-        * Given an IPv6 address in octet notation, returns a pure hex string.
-        *
-        * @param string $ip Octet ipv6 IP address.
-        * @return string|bool Pure hex (uppercase); false on failure
-        */
-       private static function IPv6ToRawHex( $ip ) {
-               $ip = self::sanitizeIP( $ip );
-               if ( !$ip ) {
-                       return false;
-               }
-               $r_ip = '';
-               foreach ( explode( ':', $ip ) as $v ) {
-                       $r_ip .= str_pad( $v, 4, 0, STR_PAD_LEFT );
-               }
-
-               return $r_ip;
-       }
-
-       /**
-        * Convert a network specification in CIDR notation
-        * to an integer network and a number of bits
-        *
-        * @param string $range IP with CIDR prefix
-        * @return array(int or string, int)
-        */
-       public static function parseCIDR( $range ) {
-               if ( self::isIPv6( $range ) ) {
-                       return self::parseCIDR6( $range );
-               }
-               $parts = explode( '/', $range, 2 );
-               if ( count( $parts ) != 2 ) {
-                       return [ false, false ];
-               }
-               list( $network, $bits ) = $parts;
-               $network = ip2long( $network );
-               if ( $network !== false && is_numeric( $bits ) && $bits >= 0 && $bits <= 32 ) {
-                       if ( $bits == 0 ) {
-                               $network = 0;
-                       } else {
-                               $network &= ~( ( 1 << ( 32 - $bits ) ) - 1 );
-                       }
-                       # Convert to unsigned
-                       if ( $network < 0 ) {
-                               $network += pow( 2, 32 );
-                       }
-               } else {
-                       $network = false;
-                       $bits = false;
-               }
-
-               return [ $network, $bits ];
-       }
-
-       /**
-        * Given a string range in a number of formats,
-        * return the start and end of the range in hexadecimal.
-        *
-        * Formats are:
-        *     1.2.3.4/24          CIDR
-        *     1.2.3.4 - 1.2.3.5   Explicit range
-        *     1.2.3.4             Single IP
-        *
-        *     2001:0db8:85a3::7344/96                       CIDR
-        *     2001:0db8:85a3::7344 - 2001:0db8:85a3::7344   Explicit range
-        *     2001:0db8:85a3::7344                          Single IP
-        * @param string $range IP range
-        * @return array(string, string)
-        */
-       public static function parseRange( $range ) {
-               // CIDR notation
-               if ( strpos( $range, '/' ) !== false ) {
-                       if ( self::isIPv6( $range ) ) {
-                               return self::parseRange6( $range );
-                       }
-                       list( $network, $bits ) = self::parseCIDR( $range );
-                       if ( $network === false ) {
-                               $start = $end = false;
-                       } else {
-                               $start = sprintf( '%08X', $network );
-                               $end = sprintf( '%08X', $network + pow( 2, ( 32 - $bits ) ) - 1 );
-                       }
-               // Explicit range
-               } elseif ( strpos( $range, '-' ) !== false ) {
-                       list( $start, $end ) = array_map( 'trim', explode( '-', $range, 2 ) );
-                       if ( self::isIPv6( $start ) && self::isIPv6( $end ) ) {
-                               return self::parseRange6( $range );
-                       }
-                       if ( self::isIPv4( $start ) && self::isIPv4( $end ) ) {
-                               $start = self::toHex( $start );
-                               $end = self::toHex( $end );
-                               if ( $start > $end ) {
-                                       $start = $end = false;
-                               }
-                       } else {
-                               $start = $end = false;
-                       }
-               } else {
-                       # Single IP
-                       $start = $end = self::toHex( $range );
-               }
-               if ( $start === false || $end === false ) {
-                       return [ false, false ];
-               } else {
-                       return [ $start, $end ];
-               }
-       }
-
-       /**
-        * Convert a network specification in IPv6 CIDR notation to an
-        * integer network and a number of bits
-        *
-        * @param string $range
-        *
-        * @return array(string, int)
-        */
-       private static function parseCIDR6( $range ) {
-               # Explode into <expanded IP,range>
-               $parts = explode( '/', IP::sanitizeIP( $range ), 2 );
-               if ( count( $parts ) != 2 ) {
-                       return [ false, false ];
-               }
-               list( $network, $bits ) = $parts;
-               $network = self::IPv6ToRawHex( $network );
-               if ( $network !== false && is_numeric( $bits ) && $bits >= 0 && $bits <= 128 ) {
-                       if ( $bits == 0 ) {
-                               $network = "0";
-                       } else {
-                               # Native 32 bit functions WONT work here!!!
-                               # Convert to a padded binary number
-                               $network = Wikimedia\base_convert( $network, 16, 2, 128 );
-                               # Truncate the last (128-$bits) bits and replace them with zeros
-                               $network = str_pad( substr( $network, 0, $bits ), 128, 0, STR_PAD_RIGHT );
-                               # Convert back to an integer
-                               $network = Wikimedia\base_convert( $network, 2, 10 );
-                       }
-               } else {
-                       $network = false;
-                       $bits = false;
-               }
-
-               return [ $network, (int)$bits ];
-       }
-
-       /**
-        * Given a string range in a number of formats, return the
-        * start and end of the range in hexadecimal. For IPv6.
-        *
-        * Formats are:
-        *     2001:0db8:85a3::7344/96                       CIDR
-        *     2001:0db8:85a3::7344 - 2001:0db8:85a3::7344   Explicit range
-        *     2001:0db8:85a3::7344/96                       Single IP
-        *
-        * @param string $range
-        *
-        * @return array(string, string)
-        */
-       private static function parseRange6( $range ) {
-               # Expand any IPv6 IP
-               $range = IP::sanitizeIP( $range );
-               // CIDR notation...
-               if ( strpos( $range, '/' ) !== false ) {
-                       list( $network, $bits ) = self::parseCIDR6( $range );
-                       if ( $network === false ) {
-                               $start = $end = false;
-                       } else {
-                               $start = Wikimedia\base_convert( $network, 10, 16, 32, false );
-                               # Turn network to binary (again)
-                               $end = Wikimedia\base_convert( $network, 10, 2, 128 );
-                               # Truncate the last (128-$bits) bits and replace them with ones
-                               $end = str_pad( substr( $end, 0, $bits ), 128, 1, STR_PAD_RIGHT );
-                               # Convert to hex
-                               $end = Wikimedia\base_convert( $end, 2, 16, 32, false );
-                               # see toHex() comment
-                               $start = "v6-$start";
-                               $end = "v6-$end";
-                       }
-               // Explicit range notation...
-               } elseif ( strpos( $range, '-' ) !== false ) {
-                       list( $start, $end ) = array_map( 'trim', explode( '-', $range, 2 ) );
-                       $start = self::toHex( $start );
-                       $end = self::toHex( $end );
-                       if ( $start > $end ) {
-                               $start = $end = false;
-                       }
-               } else {
-                       # Single IP
-                       $start = $end = self::toHex( $range );
-               }
-               if ( $start === false || $end === false ) {
-                       return [ false, false ];
-               } else {
-                       return [ $start, $end ];
-               }
-       }
-
-       /**
-        * Determine if a given IPv4/IPv6 address is in a given CIDR network
-        *
-        * @param string $addr The address to check against the given range.
-        * @param string $range The range to check the given address against.
-        * @return bool Whether or not the given address is in the given range.
-        *
-        * @note This can return unexpected results for invalid arguments!
-        *       Make sure you pass a valid IP address and IP range.
-        */
-       public static function isInRange( $addr, $range ) {
-               $hexIP = self::toHex( $addr );
-               list( $start, $end ) = self::parseRange( $range );
-
-               return ( strcmp( $hexIP, $start ) >= 0 &&
-                       strcmp( $hexIP, $end ) <= 0 );
-       }
-
-       /**
-        * Determines if an IP address is a list of CIDR a.b.c.d/n ranges.
-        *
-        * @since 1.25
-        *
-        * @param string $ip the IP to check
-        * @param array $ranges the IP ranges, each element a range
-        *
-        * @return bool true if the specified adress belongs to the specified range; otherwise, false.
-        */
-       public static function isInRanges( $ip, $ranges ) {
-               foreach ( $ranges as $range ) {
-                       if ( self::isInRange( $ip, $range ) ) {
-                               return true;
-                       }
-               }
-               return false;
-       }
-
-       /**
-        * Convert some unusual representations of IPv4 addresses to their
-        * canonical dotted quad representation.
-        *
-        * This currently only checks a few IPV4-to-IPv6 related cases.  More
-        * unusual representations may be added later.
-        *
-        * @param string $addr Something that might be an IP address
-        * @return string|null Valid dotted quad IPv4 address or null
-        */
-       public static function canonicalize( $addr ) {
-               // remove zone info (bug 35738)
-               $addr = preg_replace( '/\%.*/', '', $addr );
-
-               if ( self::isValid( $addr ) ) {
-                       return $addr;
-               }
-               // Turn mapped addresses from ::ce:ffff:1.2.3.4 to 1.2.3.4
-               if ( strpos( $addr, ':' ) !== false && strpos( $addr, '.' ) !== false ) {
-                       $addr = substr( $addr, strrpos( $addr, ':' ) + 1 );
-                       if ( self::isIPv4( $addr ) ) {
-                               return $addr;
-                       }
-               }
-               // IPv6 loopback address
-               $m = [];
-               if ( preg_match( '/^0*' . RE_IPV6_GAP . '1$/', $addr, $m ) ) {
-                       return '127.0.0.1';
-               }
-               // IPv4-mapped and IPv4-compatible IPv6 addresses
-               if ( preg_match( '/^' . RE_IPV6_V4_PREFIX . '(' . RE_IP_ADD . ')$/i', $addr, $m ) ) {
-                       return $m[1];
-               }
-               if ( preg_match( '/^' . RE_IPV6_V4_PREFIX . RE_IPV6_WORD .
-                       ':' . RE_IPV6_WORD . '$/i', $addr, $m )
-               ) {
-                       return long2ip( ( hexdec( $m[1] ) << 16 ) + hexdec( $m[2] ) );
-               }
-
-               return null; // give up
-       }
-
-       /**
-        * Gets rid of unneeded numbers in quad-dotted/octet IP strings
-        * For example, 127.111.113.151/24 -> 127.111.113.0/24
-        * @param string $range IP address to normalize
-        * @return string
-        */
-       public static function sanitizeRange( $range ) {
-               list( /*...*/, $bits ) = self::parseCIDR( $range );
-               list( $start, /*...*/ ) = self::parseRange( $range );
-               $start = self::formatHex( $start );
-               if ( $bits === false ) {
-                       return $start; // wasn't actually a range
-               }
-
-               return "$start/$bits";
-       }
-
-       /**
-        * Checks if an IP is a trusted proxy provider.
-        * Useful to tell if X-Forwarded-For data is possibly bogus.
-        * CDN cache servers for the site are whitelisted.
-        * @since 1.24
-        *
-        * @param string $ip
-        * @return bool
-        */
-       public static function isTrustedProxy( $ip ) {
-               $trusted = self::isConfiguredProxy( $ip );
-               Hooks::run( 'IsTrustedProxy', [ &$ip, &$trusted ] );
-               return $trusted;
-       }
-
-       /**
-        * Checks if an IP matches a proxy we've configured
-        * @since 1.24
-        *
-        * @param string $ip
-        * @return bool
-        */
-       public static function isConfiguredProxy( $ip ) {
-               global $wgSquidServers, $wgSquidServersNoPurge;
-
-               // Quick check of known singular proxy servers
-               $trusted = in_array( $ip, $wgSquidServers );
-
-               // Check against addresses and CIDR nets in the NoPurge list
-               if ( !$trusted ) {
-                       if ( !self::$proxyIpSet ) {
-                               self::$proxyIpSet = new IPSet( $wgSquidServersNoPurge );
-                       }
-                       $trusted = self::$proxyIpSet->match( $ip );
-               }
-
-               return $trusted;
-       }
-
-       /**
-        * Clears precomputed data used for proxy support.
-        * Use this only for unit tests.
-        */
-       public static function clearCaches() {
-               self::$proxyIpSet = null;
-       }
-
-       /**
-        * Returns the subnet of a given IP
-        *
-        * @param string $ip
-        * @return string|false
-        */
-       public static function getSubnet( $ip ) {
-               $matches = [];
-               $subnet = false;
-               if ( IP::isIPv6( $ip ) ) {
-                       $parts = IP::parseRange( "$ip/64" );
-                       $subnet = $parts[0];
-               } elseif ( preg_match( '/^(\d+\.\d+\.\d+)\.\d+$/', $ip, $matches ) ) {
-                       // IPv4
-                       $subnet = $matches[1];
-               }
-               return $subnet;
-       }
-}
index 1376fa7..3bddd77 100644 (file)
  * @file
  */
 
-class MWCryptHKDF {
-
-       /**
-        * Singleton instance for public use
-        */
-       protected static $singleton = null;
-
-       /**
-        * The persistant cache
-        */
-       protected $cache = null;
-
-       /**
-        * Cache key we'll use for our salt
-        */
-       protected $cacheKey = null;
-
-       /**
-        * The hash algorithm being used
-        */
-       protected $algorithm = null;
-
-       /**
-        * binary string, the salt for the HKDF
-        */
-       protected $salt;
-
-       /**
-        * The pseudorandom key
-        */
-       private $prk;
+use MediaWiki\MediaWikiServices;
 
-       /**
-        * The secret key material. This must be kept secret to preserve
-        * the security properties of this RNG.
-        */
-       private $skm;
-
-       /**
-        * The last block (K(i)) of the most recent expanded key
-        */
-       protected $lastK;
-
-       /**
-        * a "context information" string CTXinfo (which may be null)
-        * See http://eprint.iacr.org/2010/264.pdf Section 4.1
-        */
-       protected $context = [];
-
-       /**
-        * Round count is computed based on the hash'es output length,
-        * which neither php nor openssl seem to provide easily.
-        */
-       public static $hashLength = [
-               'md5' => 16,
-               'sha1' => 20,
-               'sha224' => 28,
-               'sha256' => 32,
-               'sha384' => 48,
-               'sha512' => 64,
-               'ripemd128' => 16,
-               'ripemd160' => 20,
-               'ripemd256' => 32,
-               'ripemd320' => 40,
-               'whirlpool' => 64,
-       ];
-
-       /**
-        * @param string $secretKeyMaterial
-        * @param string $algorithm Name of hashing algorithm
-        * @param BagOStuff $cache
-        * @param string|array $context Context to mix into HKDF context
-        * @throws MWException
-        */
-       public function __construct( $secretKeyMaterial, $algorithm, $cache, $context ) {
-               if ( strlen( $secretKeyMaterial ) < 16 ) {
-                       throw new MWException( "MWCryptHKDF secret was too short." );
-               }
-               $this->skm = $secretKeyMaterial;
-               $this->algorithm = $algorithm;
-               $this->cache = $cache;
-               $this->salt = ''; // Initialize a blank salt, see getSaltUsingCache()
-               $this->prk = '';
-               $this->context = is_array( $context ) ? $context : [ $context ];
-
-               // To prevent every call from hitting the same memcache server, pick
-               // from a set of keys to use. mt_rand is only use to pick a random
-               // server, and does not affect the security of the process.
-               $this->cacheKey = wfMemcKey( 'HKDF', mt_rand( 0, 16 ) );
-       }
-
-       /**
-        * Save the last block generated, so the next user will compute a different PRK
-        * from the same SKM. This should keep things unpredictable even if an attacker
-        * is able to influence CTXinfo.
-        */
-       function __destruct() {
-               if ( $this->lastK ) {
-                       $this->cache->set( $this->cacheKey, $this->lastK );
-               }
-       }
-
-       /**
-        * MW specific salt, cached from last run
-        * @return string Binary string
-        */
-       protected function getSaltUsingCache() {
-               if ( $this->salt == '' ) {
-                       $lastSalt = $this->cache->get( $this->cacheKey );
-                       if ( $lastSalt === false ) {
-                               // If we don't have a previous value to use as our salt, we use
-                               // 16 bytes from MWCryptRand, which will use a small amount of
-                               // entropy from our pool. Note, "XTR may be deterministic or keyed
-                               // via an optional “salt value”  (i.e., a non-secret random
-                               // value)..." - http://eprint.iacr.org/2010/264.pdf. However, we
-                               // use a strongly random value since we can.
-                               $lastSalt = MWCryptRand::generate( 16 );
-                       }
-                       // Get a binary string that is hashLen long
-                       $this->salt = hash( $this->algorithm, $lastSalt, true );
-               }
-               return $this->salt;
-       }
+class MWCryptHKDF {
 
        /**
         * Return a singleton instance, based on the global configs.
-        * @return self
-        * @throws MWException
+        * @return CryptHKDF
         */
        protected static function singleton() {
-               global $wgHKDFAlgorithm, $wgHKDFSecret, $wgSecretKey, $wgMainCacheType;
-
-               $secret = $wgHKDFSecret ?: $wgSecretKey;
-               if ( !$secret ) {
-                       throw new MWException( "Cannot use MWCryptHKDF without a secret." );
-               }
-
-               // In HKDF, the context can be known to the attacker, but this will
-               // keep simultaneous runs from producing the same output.
-               $context = [];
-               $context[] = microtime();
-               $context[] = getmypid();
-               $context[] = gethostname();
-
-               // Setup salt cache. Use APC, or fallback to the main cache if it isn't setup
-               $cache = ObjectCache::getLocalServerInstance( $wgMainCacheType );
-
-               if ( is_null( self::$singleton ) ) {
-                       self::$singleton = new self( $secret, $wgHKDFAlgorithm, $cache, $context );
-               }
-
-               return self::$singleton;
-       }
-
-       /**
-        * Produce $bytes of secure random data. As a side-effect,
-        * $this->lastK is set to the last hashLen block of key material.
-        * @param int $bytes Number of bytes of data
-        * @param string $context Context to mix into CTXinfo
-        * @return string Binary string of length $bytes
-        */
-       protected function realGenerate( $bytes, $context = '' ) {
-
-               if ( $this->prk === '' ) {
-                       $salt = $this->getSaltUsingCache();
-                       $this->prk = self::HKDFExtract(
-                               $this->algorithm,
-                               $salt,
-                               $this->skm
-                       );
-               }
-
-               $CTXinfo = implode( ':', array_merge( $this->context, [ $context ] ) );
-
-               return self::HKDFExpand(
-                       $this->algorithm,
-                       $this->prk,
-                       $CTXinfo,
-                       $bytes,
-                       $this->lastK
-               );
+               return MediaWikiServices::getInstance()->getCryptHKDF();
        }
 
        /**
@@ -243,62 +72,7 @@ class MWCryptHKDF {
         * @return string Cryptographically secure pseudorandom binary string
         */
        public static function HKDF( $hash, $ikm, $salt, $info, $L ) {
-               $prk = self::HKDFExtract( $hash, $salt, $ikm );
-               $okm = self::HKDFExpand( $hash, $prk, $info, $L );
-               return $okm;
-       }
-
-       /**
-        * Extract the PRK, PRK = HMAC(XTS, SKM)
-        * Note that the hmac is keyed with XTS (the salt),
-        * and the SKM (source key material) is the "data".
-        *
-        * @param string $hash The hashing function to use (e.g., sha256)
-        * @param string $salt The salt to add to the ikm, to get the prk
-        * @param string $ikm The input keying material
-        * @return string Binary string (pseudorandm key) used as input to HKDFExpand
-        */
-       private static function HKDFExtract( $hash, $salt, $ikm ) {
-               return hash_hmac( $hash, $ikm, $salt, true );
-       }
-
-       /**
-        * Expand the key with the given context
-        *
-        * @param string $hash Hashing Algorithm
-        * @param string $prk A pseudorandom key of at least HashLen octets
-        *    (usually, the output from the extract step)
-        * @param string $info Optional context and application specific information
-        *    (can be a zero-length string)
-        * @param int $bytes Length of output keying material in bytes
-        *    (<= 255*HashLen)
-        * @param string &$lastK Set by this function to the last block of the expansion.
-        *    In MediaWiki, this is used to seed future Extractions.
-        * @return string Cryptographically secure random string $bytes long
-        * @throws MWException
-        */
-       private static function HKDFExpand( $hash, $prk, $info, $bytes, &$lastK = '' ) {
-               $hashLen = MWCryptHKDF::$hashLength[$hash];
-               $rounds = ceil( $bytes / $hashLen );
-               $output = '';
-
-               if ( $bytes > 255 * $hashLen ) {
-                       throw new MWException( "Too many bytes requested from HDKFExpand" );
-               }
-
-               // K(1) = HMAC(PRK, CTXinfo || 1);
-               // K(i) = HMAC(PRK, K(i-1) || CTXinfo || i); 1 < i <= t;
-               for ( $counter = 1; $counter <= $rounds; ++$counter ) {
-                       $lastK = hash_hmac(
-                               $hash,
-                               $lastK . $info . chr( $counter ),
-                               $prk,
-                               true
-                       );
-                       $output .= $lastK;
-               }
-
-               return substr( $output, 0, $bytes );
+               return CryptHKDF::HKDF( $hash, $ikm, $salt, $info, $L );
        }
 
        /**
@@ -309,7 +83,7 @@ class MWCryptHKDF {
         * @return string Binary string of length $bytes
         */
        public static function generate( $bytes, $context ) {
-               return self::singleton()->realGenerate( $bytes, $context );
+               return self::singleton()->generate( $bytes, $context );
        }
 
        /**
@@ -322,7 +96,7 @@ class MWCryptHKDF {
         */
        public static function generateHex( $chars, $context = '' ) {
                $bytes = ceil( $chars / 2 );
-               $hex = bin2hex( self::singleton()->realGenerate( $bytes, $context ) );
+               $hex = bin2hex( self::singleton()->generate( $bytes, $context ) );
                return substr( $hex, 0, $chars );
        }
 
diff --git a/includes/utils/MWCryptHash.php b/includes/utils/MWCryptHash.php
deleted file mode 100644 (file)
index 1117357..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-/**
- * Utility functions for generating hashes
- *
- * This is based in part on Drupal code as well as what we used in our own code
- * prior to introduction of this class, by way of MWCryptRand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-class MWCryptHash {
-       /**
-        * The hash algorithm being used
-        */
-       protected static $algo = null;
-
-       /**
-        * The number of bytes outputted by the hash algorithm
-        */
-       protected static $hashLength = [
-               true => null,
-               false => null,
-       ];
-
-       /**
-        * Decide on the best acceptable hash algorithm we have available for hash()
-        * @return string A hash algorithm
-        */
-       public static function hashAlgo() {
-               if ( !is_null( self::$algo ) ) {
-                       return self::$algo;
-               }
-
-               $algos = hash_algos();
-               $preference = [ 'whirlpool', 'sha256', 'sha1', 'md5' ];
-
-               foreach ( $preference as $algorithm ) {
-                       if ( in_array( $algorithm, $algos ) ) {
-                               self::$algo = $algorithm;
-                               wfDebug( __METHOD__ . ': Using the ' . self::$algo . " hash algorithm.\n" );
-
-                               return self::$algo;
-                       }
-               }
-
-               // We only reach here if no acceptable hash is found in the list, this should
-               // be a technical impossibility since most of php's hash list is fixed and
-               // some of the ones we list are available as their own native functions
-               // But since we already require at least 5.2 and hash() was default in
-               // 5.1.2 we don't bother falling back to methods like sha1 and md5.
-               throw new DomainException( "Could not find an acceptable hashing function in hash_algos()" );
-       }
-
-       /**
-        * Return the byte-length output of the hash algorithm we are
-        * using in self::hash and self::hmac.
-        *
-        * @param bool $raw True to return the length for binary data, false to
-        *   return for hex-encoded
-        * @return int Number of bytes the hash outputs
-        */
-       public static function hashLength( $raw = true ) {
-               $raw = (bool)$raw;
-               if ( is_null( self::$hashLength[$raw] ) ) {
-                       self::$hashLength[$raw] = strlen( self::hash( '', $raw ) );
-               }
-
-               return self::$hashLength[$raw];
-       }
-
-       /**
-        * Generate an acceptably unstable one-way-hash of some text
-        * making use of the best hash algorithm that we have available.
-        *
-        * @param string $data
-        * @param bool $raw True to return binary data, false to return it hex-encoded
-        * @return string A hash of the data
-        */
-       public static function hash( $data, $raw = true ) {
-               return hash( self::hashAlgo(), $data, $raw );
-       }
-
-       /**
-        * Generate an acceptably unstable one-way-hmac of some text
-        * making use of the best hash algorithm that we have available.
-        *
-        * @param string $data
-        * @param string $key
-        * @param bool $raw True to return binary data, false to return it hex-encoded
-        * @return string An hmac hash of the data + key
-        */
-       public static function hmac( $data, $key, $raw = true ) {
-               if ( !is_string( $key ) ) {
-                       // a fatal error in HHVM; an exception will at least give us a stack trace
-                       throw new InvalidArgumentException( 'Invalid key type: ' . gettype( $key ) );
-               }
-               return hash_hmac( self::hashAlgo(), $data, $key, $raw );
-       }
-
-}
index dd3ea1b..5818958 100644 (file)
  * @file
  */
 
-class MWCryptRand {
-       /**
-        * Minimum number of iterations we want to make in our drift calculations.
-        */
-       const MIN_ITERATIONS = 1000;
-
-       /**
-        * Number of milliseconds we want to spend generating each separate byte
-        * of the final generated bytes.
-        * This is used in combination with the hash length to determine the duration
-        * we should spend doing drift calculations.
-        */
-       const MSEC_PER_BYTE = 0.5;
-
-       /**
-        * Singleton instance for public use
-        */
-       protected static $singleton = null;
-
-       /**
-        * A boolean indicating whether the previous random generation was done using
-        * cryptographically strong random number generator or not.
-        */
-       protected $strong = null;
-
-       /**
-        * Initialize an initial random state based off of whatever we can find
-        * @return string
-        */
-       protected function initialRandomState() {
-               // $_SERVER contains a variety of unstable user and system specific information
-               // It'll vary a little with each page, and vary even more with separate users
-               // It'll also vary slightly across different machines
-               $state = serialize( $_SERVER );
-
-               // To try vary the system information of the state a bit more
-               // by including the system's hostname into the state
-               $state .= wfHostname();
-
-               // Try to gather a little entropy from the different php rand sources
-               $state .= rand() . uniqid( mt_rand(), true );
-
-               // Include some information about the filesystem's current state in the random state
-               $files = [];
-
-               // We know this file is here so grab some info about ourselves
-               $files[] = __FILE__;
-
-               // We must also have a parent folder, and with the usual file structure, a grandparent
-               $files[] = __DIR__;
-               $files[] = dirname( __DIR__ );
-
-               // The config file is likely the most often edited file we know should
-               // be around so include its stat info into the state.
-               // The constant with its location will almost always be defined, as
-               // WebStart.php defines MW_CONFIG_FILE to $IP/LocalSettings.php unless
-               // being configured with MW_CONFIG_CALLBACK (e.g. the installer).
-               if ( defined( 'MW_CONFIG_FILE' ) ) {
-                       $files[] = MW_CONFIG_FILE;
-               }
-
-               foreach ( $files as $file ) {
-                       MediaWiki\suppressWarnings();
-                       $stat = stat( $file );
-                       MediaWiki\restoreWarnings();
-                       if ( $stat ) {
-                               // stat() duplicates data into numeric and string keys so kill off all the numeric ones
-                               foreach ( $stat as $k => $v ) {
-                                       if ( is_numeric( $k ) ) {
-                                               unset( $k );
-                                       }
-                               }
-                               // The absolute filename itself will differ from install to install so don't leave it out
-                               $path = realpath( $file );
-                               if ( $path !== false ) {
-                                       $state .= $path;
-                               } else {
-                                       $state .= $file;
-                               }
-                               $state .= implode( '', $stat );
-                       } else {
-                               // The fact that the file isn't there is worth at least a
-                               // minuscule amount of entropy.
-                               $state .= '0';
-                       }
-               }
-
-               // Try and make this a little more unstable by including the varying process
-               // id of the php process we are running inside of if we are able to access it
-               if ( function_exists( 'getmypid' ) ) {
-                       $state .= getmypid();
-               }
-
-               // If available try to increase the instability of the data by throwing in
-               // the precise amount of memory that we happen to be using at the moment.
-               if ( function_exists( 'memory_get_usage' ) ) {
-                       $state .= memory_get_usage( true );
-               }
-
-               // It's mostly worthless but throw the wiki's id into the data for a little more variance
-               $state .= wfWikiID();
-
-               // If we have a secret key set then throw it into the state as well
-               global $wgSecretKey;
-               if ( $wgSecretKey ) {
-                       $state .= $wgSecretKey;
-               }
-
-               return $state;
-       }
-
-       /**
-        * Randomly hash data while mixing in clock drift data for randomness
-        *
-        * @param string $data The data to randomly hash.
-        * @return string The hashed bytes
-        * @author Tim Starling
-        */
-       protected function driftHash( $data ) {
-               // Minimum number of iterations (to avoid slow operations causing the
-               // loop to gather little entropy)
-               $minIterations = self::MIN_ITERATIONS;
-               // Duration of time to spend doing calculations (in seconds)
-               $duration = ( self::MSEC_PER_BYTE / 1000 ) * MWCryptHash::hashLength();
-               // Create a buffer to use to trigger memory operations
-               $bufLength = 10000000;
-               $buffer = str_repeat( ' ', $bufLength );
-               $bufPos = 0;
-
-               // Iterate for $duration seconds or at least $minIterations number of iterations
-               $iterations = 0;
-               $startTime = microtime( true );
-               $currentTime = $startTime;
-               while ( $iterations < $minIterations || $currentTime - $startTime < $duration ) {
-                       // Trigger some memory writing to trigger some bus activity
-                       // This may create variance in the time between iterations
-                       $bufPos = ( $bufPos + 13 ) % $bufLength;
-                       $buffer[$bufPos] = ' ';
-                       // Add the drift between this iteration and the last in as entropy
-                       $nextTime = microtime( true );
-                       $delta = (int)( ( $nextTime - $currentTime ) * 1000000 );
-                       $data .= $delta;
-                       // Every 100 iterations hash the data and entropy
-                       if ( $iterations % 100 === 0 ) {
-                               $data = sha1( $data );
-                       }
-                       $currentTime = $nextTime;
-                       $iterations++;
-               }
-               $timeTaken = $currentTime - $startTime;
-               $data = MWCryptHash::hash( $data );
-
-               wfDebug( __METHOD__ . ": Clock drift calculation " .
-                       "(time-taken=" . ( $timeTaken * 1000 ) . "ms, " .
-                       "iterations=$iterations, " .
-                       "time-per-iteration=" . ( $timeTaken / $iterations * 1e6 ) . "us)\n" );
-
-               return $data;
-       }
-
-       /**
-        * Return a rolling random state initially build using data from unstable sources
-        * @return string A new weak random state
-        */
-       protected function randomState() {
-               static $state = null;
-               if ( is_null( $state ) ) {
-                       // Initialize the state with whatever unstable data we can find
-                       // It's important that this data is hashed right afterwards to prevent
-                       // it from being leaked into the output stream
-                       $state = MWCryptHash::hash( $this->initialRandomState() );
-               }
-               // Generate a new random state based on the initial random state or previous
-               // random state by combining it with clock drift
-               $state = $this->driftHash( $state );
-
-               return $state;
-       }
-
-       /**
-        * @see self::wasStrong()
-        */
-       public function realWasStrong() {
-               if ( is_null( $this->strong ) ) {
-                       throw new MWException( __METHOD__ . ' called before generation of random data' );
-               }
-
-               return $this->strong;
-       }
-
-       /**
-        * @see self::generate()
-        */
-       public function realGenerate( $bytes, $forceStrong = false ) {
-
-               wfDebug( __METHOD__ . ": Generating cryptographic random bytes for " .
-                       wfGetAllCallers( 5 ) . "\n" );
-
-               $bytes = floor( $bytes );
-               static $buffer = '';
-               if ( is_null( $this->strong ) ) {
-                       // Set strength to false initially until we know what source data is coming from
-                       $this->strong = true;
-               }
-
-               if ( strlen( $buffer ) < $bytes ) {
-                       // If available make use of mcrypt_create_iv URANDOM source to generate randomness
-                       // On unix-like systems this reads from /dev/urandom but does it without any buffering
-                       // and bypasses openbasedir restrictions, so it's preferable to reading directly
-                       // On Windows starting in PHP 5.3.0 Windows' native CryptGenRandom is used to generate
-                       // entropy so this is also preferable to just trying to read urandom because it may work
-                       // on Windows systems as well.
-                       if ( function_exists( 'mcrypt_create_iv' ) ) {
-                               $rem = $bytes - strlen( $buffer );
-                               $iv = mcrypt_create_iv( $rem, MCRYPT_DEV_URANDOM );
-                               if ( $iv === false ) {
-                                       wfDebug( __METHOD__ . ": mcrypt_create_iv returned false.\n" );
-                               } else {
-                                       $buffer .= $iv;
-                                       wfDebug( __METHOD__ . ": mcrypt_create_iv generated " . strlen( $iv ) .
-                                               " bytes of randomness.\n" );
-                               }
-                       }
-               }
-
-               if ( strlen( $buffer ) < $bytes ) {
-                       if ( function_exists( 'openssl_random_pseudo_bytes' ) ) {
-                               $rem = $bytes - strlen( $buffer );
-                               $openssl_bytes = openssl_random_pseudo_bytes( $rem, $openssl_strong );
-                               if ( $openssl_bytes === false ) {
-                                       wfDebug( __METHOD__ . ": openssl_random_pseudo_bytes returned false.\n" );
-                               } else {
-                                       $buffer .= $openssl_bytes;
-                                       wfDebug( __METHOD__ . ": openssl_random_pseudo_bytes generated " .
-                                               strlen( $openssl_bytes ) . " bytes of " .
-                                               ( $openssl_strong ? "strong" : "weak" ) . " randomness.\n" );
-                               }
-                               if ( strlen( $buffer ) >= $bytes ) {
-                                       // openssl tells us if the random source was strong, if some of our data was generated
-                                       // using it use it's say on whether the randomness is strong
-                                       $this->strong = !!$openssl_strong;
-                               }
-                       }
-               }
-
-               // Only read from urandom if we can control the buffer size or were passed forceStrong
-               if ( strlen( $buffer ) < $bytes &&
-                       ( function_exists( 'stream_set_read_buffer' ) || $forceStrong )
-               ) {
-                       $rem = $bytes - strlen( $buffer );
-                       if ( !function_exists( 'stream_set_read_buffer' ) && $forceStrong ) {
-                               wfDebug( __METHOD__ . ": Was forced to read from /dev/urandom " .
-                                       "without control over the buffer size.\n" );
-                       }
-                       // /dev/urandom is generally considered the best possible commonly
-                       // available random source, and is available on most *nix systems.
-                       MediaWiki\suppressWarnings();
-                       $urandom = fopen( "/dev/urandom", "rb" );
-                       MediaWiki\restoreWarnings();
-
-                       // Attempt to read all our random data from urandom
-                       // php's fread always does buffered reads based on the stream's chunk_size
-                       // so in reality it will usually read more than the amount of data we're
-                       // asked for and not storing that risks depleting the system's random pool.
-                       // If stream_set_read_buffer is available set the chunk_size to the amount
-                       // of data we need. Otherwise read 8k, php's default chunk_size.
-                       if ( $urandom ) {
-                               // php's default chunk_size is 8k
-                               $chunk_size = 1024 * 8;
-                               if ( function_exists( 'stream_set_read_buffer' ) ) {
-                                       // If possible set the chunk_size to the amount of data we need
-                                       stream_set_read_buffer( $urandom, $rem );
-                                       $chunk_size = $rem;
-                               }
-                               $random_bytes = fread( $urandom, max( $chunk_size, $rem ) );
-                               $buffer .= $random_bytes;
-                               fclose( $urandom );
-                               wfDebug( __METHOD__ . ": /dev/urandom generated " . strlen( $random_bytes ) .
-                                       " bytes of randomness.\n" );
-
-                               if ( strlen( $buffer ) >= $bytes ) {
-                                       // urandom is always strong, set to true if all our data was generated using it
-                                       $this->strong = true;
-                               }
-                       } else {
-                               wfDebug( __METHOD__ . ": /dev/urandom could not be opened.\n" );
-                       }
-               }
-
-               // If we cannot use or generate enough data from a secure source
-               // use this loop to generate a good set of pseudo random data.
-               // This works by initializing a random state using a pile of unstable data
-               // and continually shoving it through a hash along with a variable salt.
-               // We hash the random state with more salt to avoid the state from leaking
-               // out and being used to predict the /randomness/ that follows.
-               if ( strlen( $buffer ) < $bytes ) {
-                       wfDebug( __METHOD__ .
-                               ": Falling back to using a pseudo random state to generate randomness.\n" );
-               }
-               while ( strlen( $buffer ) < $bytes ) {
-                       $buffer .= MWCryptHash::hmac( $this->randomState(), strval( mt_rand() ) );
-                       // This code is never really cryptographically strong, if we use it
-                       // at all, then set strong to false.
-                       $this->strong = false;
-               }
-
-               // Once the buffer has been filled up with enough random data to fulfill
-               // the request shift off enough data to handle the request and leave the
-               // unused portion left inside the buffer for the next request for random data
-               $generated = substr( $buffer, 0, $bytes );
-               $buffer = substr( $buffer, $bytes );
-
-               wfDebug( __METHOD__ . ": " . strlen( $buffer ) .
-                       " bytes of randomness leftover in the buffer.\n" );
-
-               return $generated;
-       }
-
-       /**
-        * @see self::generateHex()
-        */
-       public function realGenerateHex( $chars, $forceStrong = false ) {
-               // hex strings are 2x the length of raw binary so we divide the length in half
-               // odd numbers will result in a .5 that leads the generate() being 1 character
-               // short, so we use ceil() to ensure that we always have enough bytes
-               $bytes = ceil( $chars / 2 );
-               // Generate the data and then convert it to a hex string
-               $hex = bin2hex( $this->generate( $bytes, $forceStrong ) );
-
-               // A bit of paranoia here, the caller asked for a specific length of string
-               // here, and it's possible (eg when given an odd number) that we may actually
-               // have at least 1 char more than they asked for. Just in case they made this
-               // call intending to insert it into a database that does truncation we don't
-               // want to give them too much and end up with their database and their live
-               // code having two different values because part of what we gave them is truncated
-               // hence, we strip out any run of characters longer than what we were asked for.
-               return substr( $hex, 0, $chars );
-       }
-
-       /** Publicly exposed static methods **/
+use MediaWiki\MediaWikiServices;
 
+class MWCryptRand {
        /**
-        * Return a singleton instance of MWCryptRand
-        * @return MWCryptRand
+        * @return CryptRand
         */
        protected static function singleton() {
-               if ( is_null( self::$singleton ) ) {
-                       self::$singleton = new self;
-               }
-
-               return self::$singleton;
+               return MediaWikiServices::getInstance()->getCryptRand();
        }
 
        /**
@@ -385,7 +42,7 @@ class MWCryptRand {
         * @return bool Returns true if the source was strong, false if not.
         */
        public static function wasStrong() {
-               return self::singleton()->realWasStrong();
+               return self::singleton()->wasStrong();
        }
 
        /**
@@ -401,7 +58,7 @@ class MWCryptRand {
         * @return string Raw binary random data
         */
        public static function generate( $bytes, $forceStrong = false ) {
-               return self::singleton()->realGenerate( $bytes, $forceStrong );
+               return self::singleton()->generate( $bytes, $forceStrong );
        }
 
        /**
@@ -417,6 +74,6 @@ class MWCryptRand {
         * @return string Hexadecimal random data
         */
        public static function generateHex( $chars, $forceStrong = false ) {
-               return self::singleton()->realGenerateHex( $chars, $forceStrong );
+               return self::singleton()->generateHex( $chars, $forceStrong );
        }
 }
diff --git a/includes/utils/MWFileProps.php b/includes/utils/MWFileProps.php
new file mode 100644 (file)
index 0000000..e60b9ab
--- /dev/null
@@ -0,0 +1,145 @@
+<?php
+/**
+ * MimeMagic helper functions for detecting and dealing with MIME types.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * MimeMagic helper wrapper
+ *
+ * @since 1.28
+ */
+class MWFileProps {
+       /** @var MimeMagic */
+       private $magic;
+
+       /**
+        * @param MimeMagic $magic
+        */
+       public function __construct( MimeMagic $magic ) {
+               $this->magic = $magic;
+       }
+
+       /**
+        * Get an associative array containing information about
+        * a file with the given storage path.
+        *
+        * Resulting array fields include:
+        *   - fileExists
+        *   - size (filesize in bytes)
+        *   - mime (as major/minor)
+        *   - media_type (value to be used with the MEDIATYPE_xxx constants)
+        *   - metadata (handler specific)
+        *   - sha1 (in base 36)
+        *   - width
+        *   - height
+        *   - bits (bitrate)
+        *   - file-mime
+        *   - major_mime
+        *   - minor_mime
+        *
+        * @param string $path Filesystem path to a file
+        * @param string|bool $ext The file extension, or true to extract it from the filename.
+        *             Set it to false to ignore the extension.
+        * @return array
+        * @since 1.28
+        */
+       public function getPropsFromPath( $path, $ext ) {
+               $fsFile = new FSFile( $path );
+
+               $info = $this->newPlaceholderProps();
+               $info['fileExists'] = $fsFile->exists();
+               if ( $info['fileExists'] ) {
+                       $info['size'] = $fsFile->getSize(); // bytes
+                       $info['sha1'] = $fsFile->getSha1Base36();
+
+                       # MIME type according to file contents
+                       $info['file-mime'] = $this->magic->guessMimeType( $path, false );
+                       # Logical MIME type
+                       $ext = ( $ext === true ) ? FileBackend::extensionFromPath( $path ) : $ext;
+                       $info['mime'] = $this->magic->improveTypeFromExtension( $info['file-mime'], $ext );
+
+                       list( $info['major_mime'], $info['minor_mime'] ) = File::splitMime( $info['mime'] );
+                       $info['media_type'] = $this->magic->getMediaType( $path, $info['mime'] );
+
+                       # Height, width and metadata
+                       $handler = MediaHandler::getHandler( $info['mime'] );
+                       if ( $handler ) {
+                               $info['metadata'] = $handler->getMetadata( $fsFile, $path );
+                               /** @noinspection PhpMethodParametersCountMismatchInspection */
+                               $gis = $handler->getImageSize( $fsFile, $path, $info['metadata'] );
+                               if ( is_array( $gis ) ) {
+                                       $info = $this->extractImageSizeInfo( $gis ) + $info;
+                               }
+                       }
+               }
+
+               return $info;
+       }
+
+       /**
+        * Exract image size information
+        *
+        * @param array $gis
+        * @return array
+        */
+       private function extractImageSizeInfo( array $gis ) {
+               $info = [];
+               # NOTE: $gis[2] contains a code for the image type. This is no longer used.
+               $info['width'] = $gis[0];
+               $info['height'] = $gis[1];
+               if ( isset( $gis['bits'] ) ) {
+                       $info['bits'] = $gis['bits'];
+               } else {
+                       $info['bits'] = 0;
+               }
+
+               return $info;
+       }
+
+       /**
+        * Empty place holder props for non-existing files
+        *
+        * Resulting array fields include:
+        *   - fileExists
+        *   - size (filesize in bytes)
+        *   - mime (as major/minor)
+        *   - media_type (value to be used with the MEDIATYPE_xxx constants)
+        *   - metadata (handler specific)
+        *   - sha1 (in base 36)
+        *   - width
+        *   - height
+        *   - bits (bitrate)
+        *   - file-mime
+        *   - major_mime
+        *   - minor_mime
+        *
+        * @return array
+        * @since 1.28
+        */
+       public function newPlaceholderProps() {
+               return FSFile::placeholderProps() + [
+                       'metadata' => '',
+                       'width' => 0,
+                       'height' => 0,
+                       'bits' => 0,
+                       'media_type' => MEDIATYPE_UNKNOWN
+               ];
+       }
+}
diff --git a/includes/utils/MWGrants.php b/includes/utils/MWGrants.php
deleted file mode 100644 (file)
index 58efdc7..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-<?php
-/**
- * Functions and constants to deal with grants
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- */
-
-/**
- * A collection of public static functions to deal with grants.
- */
-class MWGrants {
-
-       /**
-        * List all known grants.
-        * @return array
-        */
-       public static function getValidGrants() {
-               global $wgGrantPermissions;
-
-               return array_keys( $wgGrantPermissions );
-       }
-
-       /**
-        * Map all grants to corresponding user rights.
-        * @return array grant => array of rights
-        */
-       public static function getRightsByGrant() {
-               global $wgGrantPermissions;
-
-               $res = [];
-               foreach ( $wgGrantPermissions as $grant => $rights ) {
-                       $res[$grant] = array_keys( array_filter( $rights ) );
-               }
-               return $res;
-       }
-
-       /**
-        * Fetch the display name of the grant
-        * @param string $grant
-        * @param Language|string|null $lang
-        * @return string Grant description
-        */
-       public static function grantName( $grant, $lang = null ) {
-               // Give grep a chance to find the usages:
-               // grant-blockusers, grant-createeditmovepage, grant-delete,
-               // grant-editinterface, grant-editmycssjs, grant-editmywatchlist,
-               // grant-editpage, grant-editprotected, grant-highvolume,
-               // grant-oversight, grant-patrol, grant-protect, grant-rollback,
-               // grant-sendemail, grant-uploadeditmovefile, grant-uploadfile,
-               // grant-basic, grant-viewdeleted, grant-viewmywatchlist,
-               // grant-createaccount
-               $msg = wfMessage( "grant-$grant" );
-               if ( $lang !== null ) {
-                       if ( is_string( $lang ) ) {
-                               $lang = Language::factory( $lang );
-                       }
-                       $msg->inLanguage( $lang );
-               }
-               if ( !$msg->exists() ) {
-                       $msg = wfMessage( 'grant-generic', $grant );
-                       if ( $lang ) {
-                               $msg->inLanguage( $lang );
-                       }
-               }
-               return $msg->text();
-       }
-
-       /**
-        * Fetch the display names for the grants.
-        * @param string[] $grants
-        * @param Language|string|null $lang
-        * @return string[] Corresponding grant descriptions
-        */
-       public static function grantNames( array $grants, $lang = null ) {
-               if ( $lang !== null ) {
-                       if ( is_string( $lang ) ) {
-                               $lang = Language::factory( $lang );
-                       }
-               }
-
-               $ret = [];
-               foreach ( $grants as $grant ) {
-                       $ret[] = self::grantName( $grant, $lang );
-               }
-               return $ret;
-       }
-
-       /**
-        * Fetch the rights allowed by a set of grants.
-        * @param string[]|string $grants
-        * @return string[]
-        */
-       public static function getGrantRights( $grants ) {
-               global $wgGrantPermissions;
-
-               $rights = [];
-               foreach ( (array)$grants as $grant ) {
-                       if ( isset( $wgGrantPermissions[$grant] ) ) {
-                               $rights = array_merge( $rights, array_keys( array_filter( $wgGrantPermissions[$grant] ) ) );
-                       }
-               }
-               return array_unique( $rights );
-       }
-
-       /**
-        * Test that all grants in the list are known.
-        * @param string[] $grants
-        * @return bool
-        */
-       public static function grantsAreValid( array $grants ) {
-               return array_diff( $grants, self::getValidGrants() ) === [];
-       }
-
-       /**
-        * Divide the grants into groups.
-        * @param string[]|null $grantsFilter
-        * @return array Map of (group => (grant list))
-        */
-       public static function getGrantGroups( $grantsFilter = null ) {
-               global $wgGrantPermissions, $wgGrantPermissionGroups;
-
-               if ( is_array( $grantsFilter ) ) {
-                       $grantsFilter = array_flip( $grantsFilter );
-               }
-
-               $groups = [];
-               foreach ( $wgGrantPermissions as $grant => $rights ) {
-                       if ( $grantsFilter !== null && !isset( $grantsFilter[$grant] ) ) {
-                               continue;
-                       }
-                       if ( isset( $wgGrantPermissionGroups[$grant] ) ) {
-                               $groups[$wgGrantPermissionGroups[$grant]][] = $grant;
-                       } else {
-                               $groups['other'][] = $grant;
-                       }
-               }
-
-               return $groups;
-       }
-
-       /**
-        * Get the list of grants that are hidden and should always be granted
-        * @return string[]
-        */
-       public static function getHiddenGrants() {
-               global $wgGrantPermissionGroups;
-
-               $grants = [];
-               foreach ( $wgGrantPermissionGroups as $grant => $group ) {
-                       if ( $group === 'hidden' ) {
-                               $grants[] = $grant;
-                       }
-               }
-               return $grants;
-       }
-
-       /**
-        * Generate a link to Special:ListGrants for a particular grant name.
-        *
-        * This should be used to link end users to a full description of what
-        * rights they are giving when they authorize a grant.
-        *
-        * @param string $grant the grant name
-        * @param Language|string|null $lang
-        * @return string (proto-relative) HTML link
-        */
-       public static function getGrantsLink( $grant, $lang = null ) {
-               return \Linker::linkKnown(
-                       \SpecialPage::getTitleFor( 'Listgrants', false, $grant ),
-                       htmlspecialchars( self::grantName( $grant, $lang ) )
-               );
-       }
-
-       /**
-        * Generate wikitext to display a list of grants
-        * @param string[]|null $grantsFilter If non-null, only display these grants.
-        * @param Language|string|null $lang
-        * @return string Wikitext
-        */
-       public static function getGrantsWikiText( $grantsFilter, $lang = null ) {
-               global $wgContLang;
-
-               if ( is_string( $lang ) ) {
-                       $lang = Language::factory( $lang );
-               } elseif ( $lang === null ) {
-                       $lang = $wgContLang;
-               }
-
-               $s = '';
-               foreach ( self::getGrantGroups( $grantsFilter ) as $group => $grants ) {
-                       if ( $group === 'hidden' ) {
-                               continue; // implicitly granted
-                       }
-                       $s .= "*<span class=\"mw-grantgroup\">" .
-                               wfMessage( "grant-group-$group" )->inLanguage( $lang )->text() . "</span>\n";
-                       $s .= ":" . $lang->semicolonList( self::grantNames( $grants, $lang ) ) . "\n";
-               }
-               return "$s\n";
-       }
-
-}
index 617e8f5..caf88a1 100644 (file)
@@ -27,6 +27,7 @@ class MWRestrictions {
 
        /**
         * @param array $restrictions
+        * @throws InvalidArgumentException
         */
        protected function __construct( array $restrictions = null ) {
                if ( $restrictions !== null ) {
@@ -44,6 +45,7 @@ class MWRestrictions {
        /**
         * @param array $restrictions
         * @return MWRestrictions
+        * @throws InvalidArgumentException
         */
        public static function newFromArray( array $restrictions ) {
                return new self( $restrictions );
@@ -52,6 +54,7 @@ class MWRestrictions {
        /**
         * @param string $json JSON representation of the restrictions
         * @return MWRestrictions
+        * @throws InvalidArgumentException
         */
        public static function newFromJson( $json ) {
                $restrictions = FormatJson::decode( $json, true );
index abba5a1..95b4463 100644 (file)
@@ -21,6 +21,7 @@
  * @author Aaron Schulz
  */
 use Wikimedia\Assert\Assert;
+use MediaWiki\MediaWikiServices;
 
 /**
  * Class for getting statistically unique IDs
@@ -368,7 +369,7 @@ class UIDGenerator {
                // Counter values would not survive accross script instances in CLI mode.
                $cache = null;
                if ( ( $flags & self::QUICK_VOLATILE ) && PHP_SAPI !== 'cli' ) {
-                       $cache = ObjectCache::getLocalServerInstance();
+                       $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
                }
                if ( $cache ) {
                        $counter = $cache->incrWithInit( $bucket, $cache::TTL_INDEFINITE, $count, $count );
diff --git a/includes/utils/iterators/IteratorDecorator.php b/includes/utils/iterators/IteratorDecorator.php
deleted file mode 100644 (file)
index c1b5020..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * Allows extending classes to decorate an Iterator with
- * reduced boilerplate.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Maintenance
- */
-abstract class IteratorDecorator implements Iterator {
-       protected $iterator;
-
-       public function __construct( Iterator $iterator ) {
-               $this->iterator = $iterator;
-       }
-
-       public function current() {
-               return $this->iterator->current();
-       }
-
-       public function key() {
-               return $this->iterator->key();
-       }
-
-       public function next() {
-               $this->iterator->next();
-       }
-
-       public function rewind() {
-               $this->iterator->rewind();
-       }
-
-       public function valid() {
-               return $this->iterator->valid();
-       }
-}
diff --git a/includes/utils/iterators/NotRecursiveIterator.php b/includes/utils/iterators/NotRecursiveIterator.php
deleted file mode 100644 (file)
index 52ca61b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * Wraps a non-recursive iterator with methods to be recursive
- * without children.
- *
- * Alternatively wraps a recursive iterator to prevent recursing deeper
- * than the wrapped iterator.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Maintenance
- */
-class NotRecursiveIterator extends IteratorDecorator implements RecursiveIterator {
-       public function hasChildren() {
-               return false;
-       }
-
-       public function getChildren() {
-               return null;
-       }
-}
index b91596b..ca188ba 100644 (file)
@@ -2,6 +2,7 @@ Authors (alphabetically)
 
 Alex Monk <krenair@wikimedia.org>
 Bartosz Dziewoński <bdziewonski@wikimedia.org>
+Brad Jorsch <bjorsch@wikimedia.org>
 Ed Sanders <esanders@wikimedia.org>
 Florian Schmidt <florian.schmidt.welzow@t-online.de>
 James D. Forrester <jforrester@wikimedia.org>
diff --git a/includes/widget/DateTimeInputWidget.php b/includes/widget/DateTimeInputWidget.php
new file mode 100644 (file)
index 0000000..f0d5cdb
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+/**
+ * MediaWiki Widgets – DateTimeInputWidget class.
+ *
+ * @copyright 2016 MediaWiki Widgets Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+namespace MediaWiki\Widget;
+
+use OOUI\Tag;
+
+/**
+ * Date-time input widget.
+ */
+class DateTimeInputWidget extends \OOUI\InputWidget {
+
+       protected $type = null;
+       protected $min = null;
+       protected $max = null;
+       protected $clearable = null;
+
+       /**
+        * @param array $config Configuration options
+        * @param string $config['type'] 'date', 'time', or 'datetime'
+        * @param string $config['min'] Minimum date, time, or datetime
+        * @param string $config['max'] Maximum date, time, or datetime
+        * @param bool $config['clearable'] Whether to provide for blanking the value.
+        */
+       public function __construct( array $config = [] ) {
+               // We need $this->type set before calling the parent constructor
+               if ( isset( $config['type'] ) ) {
+                       $this->type = $config['type'];
+               } else {
+                       throw new \InvalidArgumentException( '$config[\'type\'] must be specified' );
+               }
+
+               // Parent constructor
+               parent::__construct( $config );
+
+               // Properties, which are ignored in PHP and just shipped back to JS
+               if ( isset( $config['min'] ) ) {
+                       $this->min = $config['min'];
+               }
+               if ( isset( $config['max'] ) ) {
+                       $this->max = $config['max'];
+               }
+               if ( isset( $config['clearable'] ) ) {
+                       $this->clearable = $config['clearable'];
+               }
+
+               // Initialization
+               $this->addClasses( [ 'mw-widgets-datetime-dateTimeInputWidget' ] );
+       }
+
+       protected function getJavaScriptClassName() {
+               return 'mw.widgets.datetime.DateTimeInputWidget';
+       }
+
+       public function getConfig( &$config ) {
+               $config['type'] = $this->type;
+               if ( $this->min !== null ) {
+                       $config['min'] = $this->min;
+               }
+               if ( $this->max !== null ) {
+                       $config['max'] = $this->max;
+               }
+               if ( $this->clearable !== null ) {
+                       $config['clearable'] = $this->clearable;
+               }
+               return parent::getConfig( $config );
+       }
+
+       protected function getInputElement( $config ) {
+               return ( new Tag( 'input' ) )->setAttributes( [ 'type' => $this->type ] );
+       }
+}
index 2423092..743f77b 100644 (file)
--- a/index.php
+++ b/index.php
@@ -8,7 +8,7 @@
  * See the README, INSTALL, and UPGRADE files for basic setup instructions
  * and pointers to the online documentation.
  *
- * https://www.mediawiki.org/
+ * https://www.mediawiki.org/wiki/Special:MyLanguage/MediaWiki
  *
  * ----------
  *
index ad95506..5b18365 100644 (file)
@@ -19,6 +19,7 @@
                "resources/src/mediawiki.toolbar",
                "resources/src/mediawiki.widgets",
                "resources/src/jquery/jquery.accessKeyLabel.js",
+               "resources/src/jquery/jquery.arrowSteps.js",
                "resources/src/jquery/jquery.autoEllipsis.js",
                "resources/src/jquery/jquery.badge.js",
                "resources/src/jquery/jquery.byteLength.js",
index 169e0ff..2e4ef89 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 /**
  * Internationalisation code.
+ * See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more information.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -136,6 +137,12 @@ class Language {
         */
        static private $fallbackLanguageCache = [];
 
+       /**
+        * Cache for grammar rules data
+        * @var MapCacheLRU|null
+        */
+       static private $grammarTransformations;
+
        /**
         * Cache for language names
         * @var HashBagOStuff|null
@@ -290,7 +297,7 @@ class Language {
                # Since these are limited, this is safe even later changes to the registry --
                # the only oddity is that it might change the type of the tag, and thus
                # the results from the capturing groups.
-               # http://www.iana.org/assignments/language-subtag-registry
+               # https://www.iana.org/assignments/language-subtag-registry
 
                $grandfathered = "en{$s}GB{$s}oed"
                        . "|i{$s}(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)"
@@ -331,7 +338,7 @@ class Language {
                        // People think language codes are html safe, so enforce it.
                        // Ideally we should only allow a-zA-Z0-9-
                        // but, .+ and other chars are often used for {{int:}} hacks
-                       // see bugs 37564, 37587, 36938
+                       // see bugs T39564, T39587, T38938
                        $cache[$code] =
                                // Protect against path traversal
                                strcspn( $code, ":/\\\000&<>'\"" ) === strlen( $code )
@@ -1622,7 +1629,7 @@ class Language {
         *
         * Based on a PHP-Nuke block by Sharjeel which is released under GNU/GPL license
         *
-        * @see http://phpnuke.org/modules.php?name=News&file=article&sid=8234&mode=thread&order=0&thold=0
+        * @see https://phpnuke.org/modules.php?name=News&file=article&sid=8234&mode=thread&order=0&thold=0
         *
         * @param string $ts
         *
@@ -1851,9 +1858,9 @@ class Language {
         * Algorithm to convert Gregorian dates to Thai solar dates,
         * Minguo dates or Minguo dates.
         *
-        * Link: http://en.wikipedia.org/wiki/Thai_solar_calendar
-        *       http://en.wikipedia.org/wiki/Minguo_calendar
-        *       http://en.wikipedia.org/wiki/Japanese_era_name
+        * Link: https://en.wikipedia.org/wiki/Thai_solar_calendar
+        *       https://en.wikipedia.org/wiki/Minguo_calendar
+        *       https://en.wikipedia.org/wiki/Japanese_era_name
         *
         * @param string $ts 14-character timestamp
         * @param string $cName Calender name
@@ -2302,7 +2309,7 @@ class Language {
 
        /**
         * Takes a number of seconds and returns an array with a set of corresponding intervals.
-        * For example 65 will be turned into array( minutes => 1, seconds => 5 ).
+        * For example 65 will be turned into [ minutes => 1, seconds => 5 ].
         *
         * @since 1.20
         *
@@ -2592,7 +2599,7 @@ class Language {
        public function iconv( $in, $out, $string ) {
                # Even with //IGNORE iconv can whine about illegal characters in
                # *input* string. We just ignore those too.
-               # REF: http://bugs.php.net/bug.php?id=37166
+               # REF: https://bugs.php.net/bug.php?id=37166
                # REF: https://phabricator.wikimedia.org/T18885
                MediaWiki\suppressWarnings();
                $text = iconv( $in, $out . '//IGNORE', $string );
@@ -3729,6 +3736,7 @@ class Language {
 
                return $word;
        }
+
        /**
         * Get the grammar forms for the content language
         * @return array Array of grammar forms
@@ -3744,6 +3752,46 @@ class Language {
 
                return [];
        }
+
+       /**
+        * Get the grammar transformations data for the language.
+        * Used like grammar forms, with {{GRAMMAR}} and cases,
+        * but uses pairs of regexes and replacements instead of code.
+        *
+        * @return array[] Array of grammar transformations.
+        * @throws MWException
+        * @since 1.28
+        */
+       public function getGrammarTransformations() {
+               $languageCode = $this->getCode();
+
+               if ( self::$grammarTransformations === null ) {
+                       self::$grammarTransformations = new MapCacheLRU( 10 );
+               }
+
+               if ( self::$grammarTransformations->has( $languageCode ) ) {
+                       return self::$grammarTransformations->get( $languageCode );
+               }
+
+               $data = [];
+
+               $grammarDataFile = __DIR__ . "/data/grammarTransformations/$languageCode.json";
+               if ( is_readable( $grammarDataFile ) ) {
+                       $data = FormatJson::decode(
+                               file_get_contents( $grammarDataFile ),
+                               true
+                       );
+
+                       if ( $data === null ) {
+                               throw new MWException( "Invalid grammar data for \"$languageCode\"." );
+                       }
+
+                       self::$grammarTransformations->set( $languageCode, $data );
+               }
+
+               return $data;
+       }
+
        /**
         * Provides an alternative text depending on specified gender.
         * Usage {{gender:username|masculine|feminine|unknown}}.
@@ -4460,14 +4508,15 @@ class Language {
        }
 
        /**
-        * @todo Document
+        * Formats a time given in seconds into a string representation of that time.
+        *
         * @param int|float $seconds
-        * @param array $format Optional
-        *   If $format['avoid'] === 'avoidseconds': don't mention seconds if $seconds >= 1 hour.
-        *   If $format['avoid'] === 'avoidminutes': don't mention seconds/minutes if $seconds > 48 hours.
+        * @param array $format An optional argument that formats the returned string in different ways:
+        *   If $format['avoid'] === 'avoidseconds': don't show seconds if $seconds >= 1 hour,
+        *   If $format['avoid'] === 'avoidminutes': don't show seconds/minutes if $seconds > 48 hours,
         *   If $format['noabbrevs'] is true: use 'seconds' and friends instead of 'seconds-abbrev'
         *     and friends.
-        *   For backwards compatibility, $format may also be one of the strings 'avoidseconds'
+        * @note For backwards compatibility, $format may also be one of the strings 'avoidseconds'
         *     or 'avoidminutes'.
         * @return string
         */
index b31b10f..5a9f652 100644 (file)
@@ -18,6 +18,7 @@
  * @file
  * @ingroup Language
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Base class for language conversion.
@@ -47,7 +48,9 @@ class LanguageConverter {
        ];
 
        public $mMainLanguageCode;
-       public $mVariants, $mVariantFallbacks, $mVariantNames;
+       public $mVariants;
+       public $mVariantFallbacks;
+       public $mVariantNames;
        public $mTablesLoaded = false;
        public $mTables;
        // 'bidirectional' 'unidirectional' 'disable' for each variant
@@ -550,8 +553,8 @@ class LanguageConverter {
                        $variant = $this->getPreferredVariant();
                }
 
-               $cache = ObjectCache::newAccelerator( CACHE_NONE );
-               $key = wfMemcKey( 'languageconverter', 'namespace-text', $index, $variant );
+               $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
+               $key = $cache->makeKey( 'languageconverter', 'namespace-text', $index, $variant );
                $nsVariantText = $cache->get( $key );
                if ( $nsVariantText !== false ) {
                        return $nsVariantText;
@@ -1086,11 +1089,11 @@ class LanguageConverter {
                        //  -{zh-hans:<span style="font-size:120%;">xxx</span>;zh-hant:\
                        //      <span style="font-size:120%;">yyy</span>;}-
                        // we should split it as:
-                       //  array(
+                       //  [
                        //        [0] => 'zh-hans:<span style="font-size:120%;">xxx</span>'
                        //        [1] => 'zh-hant:<span style="font-size:120%;">yyy</span>'
                        //        [2] => ''
-                       //       )
+                       //  ]
                        $pat = '/;\s*(?=';
                        foreach ( $this->mVariants as $variant ) {
                                // zh-hans:xxx;zh-hant:yyy
index 4003bdd..a2288d0 100644 (file)
@@ -28,7 +28,7 @@
  *
  *
  * Based on:
- *   - http://commons.wikimedia.org/wiki/Image:Inuktitut.png
+ *   - https://commons.wikimedia.org/wiki/Image:Inuktitut.png
  *   - LanguageSr.php
  *
  * @ingroup Language
index 1e0bb00..87d2127 100644 (file)
@@ -35,7 +35,7 @@ class LanguageKm extends Language {
         */
        function commafy( $_ ) {
                /* NO-op for Khmer. Cannot use
-                * $separatorTransformTable = array( ',' => '' )
+                * $separatorTransformTable = [ ',' => '' ]
                 * That would break when parsing and doing strstr '' => 'foo';
                 */
                return $_;
index 236ae4f..f8b50fc 100644 (file)
@@ -35,7 +35,7 @@ class LanguageMy extends Language {
         */
        function commafy( $_ ) {
                /* NO-op. Cannot use
-                * $separatorTransformTable = array( ',' => '' )
+                * $separatorTransformTable = [ ',' => '' ]
                 * That would break when parsing and doing strstr '' => 'foo';
                 */
                return $_;
index 60384a8..62de390 100644 (file)
@@ -31,7 +31,6 @@
  * @ingroup Language
  */
 class LanguageRu extends Language {
-
        /**
         * Convert from the nominative form of a noun to some other case
         * Invoked with {{grammar:case|word}}
@@ -46,19 +45,22 @@ class LanguageRu extends Language {
                        return $wgGrammarForms['ru'][$case][$word];
                }
 
-               $grammarDataFile = __DIR__ . '/data/grammar.ru.json';
-               $grammarData = FormatJson::decode( file_get_contents( $grammarDataFile ), true );
+               $grammarTransformations = $this->getGrammarTransformations();
+
+               if ( isset( $grammarTransformations[$case] ) ) {
+                       foreach ( array_values( $grammarTransformations[$case] ) as $rule ) {
+                               $form = $rule[0];
 
-               if ( array_key_exists( $case, $grammarData ) ) {
-                       foreach ( array_keys( $grammarData[$case] ) as $form ) {
                                if ( $form === '@metadata' ) {
                                        continue;
                                }
 
+                               $replacement = $rule[1];
+
                                $regex = "/$form/";
 
                                if ( preg_match( $regex, $word ) ) {
-                                       $word = preg_replace( $regex, $grammarData[$case][$form], $word );
+                                       $word = preg_replace( $regex, $replacement, $word );
 
                                        break;
                                }
@@ -70,7 +72,7 @@ class LanguageRu extends Language {
 
        /**
         * Four-digit number should be without group commas (spaces)
-        * See manual of style at http://ru.wikipedia.org/wiki/Википедия:Оформление_статей
+        * See manual of style at https://ru.wikipedia.org/wiki/Википедия:Оформление_статей
         * So "1 234 567", "12 345" but "1234"
         *
         * @param string $_
index 61aba70..0de396d 100644 (file)
@@ -28,7 +28,7 @@
  *
  *
  * Based on:
- *   - http://en.wikipedia.org/wiki/Shilha_language
+ *   - https://en.wikipedia.org/wiki/Shilha_language
  *   - LanguageSr.php
  *
  * @ingroup Language
index c947341..42ee44d 100644 (file)
@@ -27,7 +27,7 @@
  * Turkish has two different i, one with a dot and another without a dot. They
  * are totally different letters in this language, so we have to override the
  * ucfirst and lcfirst methods.
- * See http://en.wikipedia.org/wiki/Dotted_and_dotless_I
+ * See https://en.wikipedia.org/wiki/Dotted_and_dotless_I
  * and @bug 28040
  * @ingroup Language
  */
diff --git a/languages/classes/data/grammar.ru.json b/languages/classes/data/grammar.ru.json
deleted file mode 100644 (file)
index 446163b..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-       "@metadata": {
-               "authors": [
-                       "Alexander Sigachov (alexander.sigachov at Googgle Mail)",
-                       "Amir E. Aharoni (amir.aharoni@mail.huji.ac.il)"
-               ],
-               "comment": "These rules don't cover the whole grammar of the language, and are intended only for names of languages and Wikimedia projects."
-       },
-       "genitive": {
-               "(.+)ь$": "$1я",
-               "(.+)ия$": "$1ии",
-               "(.+)ка$": "$1ки",
-               "(.+)ти$": "$1тей",
-               "(.+)ды$": "$1дов",
-               "(.+)д$": "$1да",
-               "(.+)ник$": "$1ника",
-               "(.+)ные$": "$1ных"
-       },
-       "prepositional": {
-               "(.+)ь$": "$1е",
-               "(.+)ия$": "$1ии",
-               "(.+)ка$": "$1ке",
-               "(.+)ти$": "$1тях",
-               "(.+)ды$": "$1дах",
-               "(.+)д$": "$1де",
-               "(.+)ник$": "$1нике",
-               "(.+)ные$": "$1ных"
-       },
-       "languagegen": {
-               "@metadata": "язык в родительном падеже: '(с) русского'",
-               "(.+)кий$": "$1кого",
-               "иврит$": "иврита",
-               "идиш$": "идиша",
-               "(.+)$": "$1"
-       },
-       "languageprep": {
-               "@metadata": "язык в предложном падеже: '(на) русском'",
-               "(.+)кий$": "$1ком",
-               "иврит$": "иврите",
-               "идиш$": "идише",
-               "(.+)$": "$1"
-       },
-       "languageadverb": {
-               "@metadata": "наречие с названием языка: 'по-русски'",
-               "(.+)кий$": "по-$1ки",
-               "иврит$": "на иврите",
-               "идиш$": "на идише",
-               "(идо|урду|хинди|эсперанто)$": "на $1",
-               "(.+)$": "на языке $1"
-       }
-}
index 836fb86..1ed9a44 100644 (file)
@@ -316,7 +316,7 @@ class Names {
                'nv' => 'Diné bizaad', # Navajo
                'ny' => 'Chi-Chewa', # Chichewa
                'oc' => 'occitan', # Occitan
-               'olo' => 'Livvinкarjala', # Livvi-Karelian
+               'olo' => 'Livvinkarjala', # Livvi-Karelian
                'om' => 'Oromoo', # Oromo
                'or' => 'ଓଡ଼ିଆ', # Oriya
                'os' => 'Ирон', # Ossetic, bug 29091
diff --git a/languages/data/grammarTransformations/ru.json b/languages/data/grammarTransformations/ru.json
new file mode 100644 (file)
index 0000000..deb58b7
--- /dev/null
@@ -0,0 +1,57 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Alexander Sigachov (alexander.sigachov at Googgle Mail)",
+                       "Amir E. Aharoni (amir.aharoni@mail.huji.ac.il)"
+               ],
+               "comment": "These rules don't cover the whole grammar of the language, and are intended only for names of languages and Wikimedia projects."
+       },
+       "genitive": [
+               [ "(.+)ь$", "$1я" ],
+               [ "(.+)ия$", "$1ии" ],
+               [ "(.+)ка$", "$1ки" ],
+               [ "(.+)ти$", "$1тей" ],
+               [ "(.+)ды$", "$1дов" ],
+               [ "(.+)д$", "$1да" ],
+               [ "(.+)ник$", "$1ника" ],
+               [ "(.+)ные$", "$1ных" ]
+       ],
+       "prepositional": [
+               [ "(.+)ь$", "$1е" ],
+               [ "(.+)ия$", "$1ии" ],
+               [ "(.+)ка$", "$1ке" ],
+               [ "(.+)ти$", "$1тях" ],
+               [ "(.+)ды$", "$1дах" ],
+               [ "(.+)д$", "$1де" ],
+               [ "(.+)ник$", "$1нике" ],
+               [ "(.+)ные$", "$1ных" ]
+       ],
+       "languagegen": [
+               [ "@metadata", [
+                       "comment", "язык в родительном падеже: '(с) русского'"
+               ] ],
+               [ "(.+)кий$", "$1кого" ],
+               [ "иврит$", "иврита" ],
+               [ "идиш$", "идиша" ],
+               [ "(.+)$", "$1" ]
+       ],
+       "languageprep": [
+               [ "@metadata", [
+                       "comment", "язык в предложном падеже: '(на) русском'"
+               ] ],
+               [ "(.+)кий$", "$1ком" ],
+               [ "иврит$", "иврите" ],
+               [ "идиш$", "идише" ],
+               [ "(.+)$", "$1" ]
+       ],
+       "languageadverb": [
+               [ "@metadata", [
+                       "comment", "наречие с названием языка: 'по-русски'"
+               ] ],
+               [ "(.+)кий$", "по-$1ки" ],
+               [ "иврит$", "на иврите" ],
+               [ "идиш$", "на идише" ],
+               [ "(идо|урду|хинди|эсперанто)$", "на $1" ],
+               [ "(.+)$", "на языке $1" ]
+       ]
+}
index 699185e..5ad5bd3 100644 (file)
        "yourpasswordagain": "Pasoë lom lageuëm rahsia:",
        "createacct-yourpasswordagain": "Peunyo lageuëm rahsia",
        "createacct-yourpasswordagain-ph": "Pasoë lom lageuëm rahsia",
-       "remembermypassword": "Ingat lôn tamöng bak peuramban nyoë (keu paléng trép $1 {{PLURAL:$1|uroë|days}})",
        "userlogin-remembermypassword": "Peubiyeuë lôn tamöng",
        "userlogin-signwithsecure": "Ngui server aman",
        "yourdomainname": "Domain droeneuh:",
        "preview": "Eu dilèë",
        "showpreview": "Peuleumah hasé",
        "showdiff": "Peuleumah neuubah",
-       "anoneditwarning": "Droëneuh   hana teudapeuta tamong. Alamat IP Droëneuh   teucatat lam tarèh (riwayat away) ôn nyoë.",
+       "anoneditwarning": "<strong>Peuneugah:</strong> Droëneuh hana lom neutamong. Alamat IP-neuh jeuët deuh bak ureuëng la'én meunyö neumeuandam. Meunyö Droëneuh <strong>[$1 neutamong]</strong> atawa <strong>[$2 neudapeuta]</strong>, neuandamneuh jeuët teutuléh ateuëh nan Droëneuh ngön na lom meunapha'at nyang la'én.",
        "missingcommenttext": "Neupasoë beunalah di yup.",
        "summary-preview": "Eu dilèë neuringkaih:",
        "blockedtitle": "Ureueng ngui geutheun",
        "post-expand-template-inclusion-category": "Laman ngön seunipat seunaleuëk nyang leubèh bataih",
        "post-expand-template-argument-warning": "'''Ingat:''' Laman nyoe na paléng h'an saboh alasan seunaleuëk nyang na sunipat èkspansi nyang raya that.\nAlasan-alasan nyan hana geupeureumeuën.",
        "post-expand-template-argument-category": "Laman ngön dalèh seunaleuëk nyang hana geupeureumeuën",
-       "cantcreateaccounttitle": "Han jeut peugöt nan ureueng ngui",
        "cantcreateaccount-text": "Peuneugöt nan ureueng ngui nibak alamat IP ('''$1''') ka geutheun lé [[User:$3|$3]].\n\nDalèh $3 nyoe nakeuh ''$2''",
        "viewpagelogs": "Eu log laman nyoë",
        "nohistory": "Hana riwayat neuandam awai keu ôn nyoe.",
        "search-interwiki-more": "(lom)",
        "searchrelated": "meusambat",
        "searchall": "ban dum",
+       "search-showingresults": "{{PLURAL:$4|Hasé <strong>$1</strong> nibak <strong>$3</strong>|Hasé <strong>$1 - $2</strong> nibak <strong>$3</strong>}}",
        "search-nonefound": "Hana hasé nyang paih lagèë neulakèë",
        "powersearch-legend": "Mita lanjut",
        "powersearch-ns": "Mita bak ruweuëng nan:",
        "tooltip-t-recentchangeslinked": "Neuubah barô lam laman nyang meupawôt nibak laman nyoë",
        "tooltip-feed-rss": "Umpeuën RSS keu laman nyoë",
        "tooltip-feed-atom": "Umpeuën Atom keu miëng nyoë",
-       "tooltip-t-contributions": "Dapeuta beuneuri ureuëng ngui nyoë",
+       "tooltip-t-contributions": "Dapeuta beuneuri {{GENDER:$1|ureuëng ngui nyoë}}",
        "tooltip-t-emailuser": "Peu'ét surat-e keu ureuëng ngui nyoë",
        "tooltip-t-upload": "Peutamong beureukaih",
        "tooltip-t-specialpages": "Dapeuta ban dum miëng kusuih",
        "exif-orientation": "Orientasi",
        "exif-xresolution": "Resolusi linteuëng",
        "exif-yresolution": "Rèsolusi buju",
+       "exif-datetime": "Uroë buleuën ngön watèë neuubah beureukaih",
+       "exif-make": "Pabrék kamèra",
+       "exif-model": "Moden kamèra",
        "exif-software": "Software geungui",
        "exif-exifversion": "Versi Exif",
        "exif-colorspace": "Ruweuëng wareuna",
        "tag-filter": "Saréng [[Special:Tags|tag]]:",
        "tag-filter-submit": "Saréng",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Tag}}]]: $2)",
+       "logentry-delete-delete": "$1 {{GENDER:$2|geusampôh}} miëng $3",
        "logentry-newusers-create": "$1 {{GENDER:$2|geupeugöt}} akun ureuëng ngui",
        "searchsuggest-search": "Mita",
        "duration-seconds": "{{PLURAL:$1|deutik}}",
index 515dc79..75e8de8 100644 (file)
@@ -14,7 +14,8 @@
                        "Macofe",
                        "Carlos Cristia",
                        "MarcoAurelio",
-                       "Matma Rex"
+                       "Matma Rex",
+                       "Fitoschido"
                ]
        },
        "tog-underline": "Subrayar os vinclos:",
        "yourpassword": "Clau d'acceso:",
        "yourpasswordagain": "Torne a escribir a clau:",
        "createacct-yourpasswordagain": "Confirma a clau",
-       "remembermypassword": "Remerar o mío nombre d'usuario y a clau entre sesions en iste navegador (como muito por $1 {{PLURAL:$1|día|días}})",
        "yourdomainname": "Dominio:",
        "externaldberror": "Bi habió una error d'autenticación externa d'a base de datos u bien no tiene premisos ta esviellar a suya cuenta externa.",
        "login": "Encetar sesión",
        "passwordreset-emailtext-user": "L'usuario $1 en {{SITENAME}} ha demandau un recordatorio d'a información d'a suya cuenta en {{SITENAME}} ($4). {{PLURAL:$3|A cuenta d'usuario siguient ye asociata|As cuentas d'usuario siguients son asociatas}} a ista adreza de correu-e:\n\n$2\n\n{{PLURAL:$3|Ista clau d'acceso temporal circumducirá|Istas claus d'acceso temporals circumducirán}} en {{PLURAL:$5|un día|$5 días}}. Habría de connectar-se agora y trigar una nueva clau. Si ista demanda no dimana de vusté, u ya se'n ha acordau d'a suya clau inicial y ya no deseya modificar-la, puet ignorar iste mensache y continar emplegando a suya viella clau.",
        "passwordreset-emailelement": "Nombre de usuario: \n$1\n\nClau d'acceso temporal: \n$2",
        "passwordreset-emailsentemail": "S'ha ninviau un recordatorio por correu-e.",
-       "passwordreset-emailsent-capture": "Se le ha ninviau un recordatorio por correu electronico, que s'amuestra contino.",
-       "passwordreset-emailerror-capture": "S'ha chenerau un recordatorio por correu electronico, que s'amuestra contino, pero o ninvío ta l'usuario ha fallau: $1",
        "changeemail": "Cambiar l'adreza de correu-e",
        "changeemail-header": "Cambiar l'adreza de correu-e d'a cuenta",
        "changeemail-no-info": "Debe identificar-se como usuario ta poder acceder dreitament ta ista pachina.",
        "minoredit": "He feito una edición menor",
        "watchthis": "Cosirar ista pachina",
        "savearticle": "Alzar pachina",
+       "publishpage": "Publicar a pachina",
+       "publishchanges": "Publicar os cambeos",
        "preview": "Previsualización",
        "showpreview": "Amostrar previsualización",
        "showdiff": "Amostrar cambeos",
        "undo-failure": "No se puet desfer a edición pues un atro usuario ha feito una edición intermeya.",
        "undo-norev": "No s'ha puesto desfer a edición porque no existiba u ya s'heba borrato.",
        "undo-summary": "Desfeita a edición $1 de [[Special:Contributions/$2|$2]] ([[User talk:$2|desc.]])",
-       "cantcreateaccounttitle": "No se puede creyar a cuenta",
        "cantcreateaccount-text": "A creyación de cuentas dende ixa adreza IP ('''$1''') estió bloqueyata por [[User:$3|$3]].\n\nA razón indicada por $3 ye ''$2''",
        "viewpagelogs": "Veyer os rechistros d'ista pachina",
        "nohistory": "Ista pachina no tiene un historial d'edicions.",
        "htmlform-submit": "Ninviar",
        "htmlform-reset": "Desfer cambios",
        "htmlform-selectorother-other": "Atros",
-       "sqlite-has-fts": "$1, con soporte de busca de texto integro",
-       "sqlite-no-fts": "$1, sin soporte de busca de texto integro",
        "logentry-delete-delete": "$1 borró a pachina $3",
        "logentry-delete-restore": "$1 restauró a pachina $3",
        "logentry-delete-event": "$1 modificó a visibilidat de {{PLURAL:$5|un evento d'o rechistro|$5 eventos d'o rechistro}} en $3: $4",
        "special-characters-group-lao": "Laosiano",
        "special-characters-group-khmer": "Khmer",
        "mw-widgets-dateinput-placeholder-day": "AAAA-MM-DD",
-       "mw-widgets-dateinput-placeholder-month": "AAAA-MM",
-       "api-error-blacklisted": "Trigue un titol diferent, mas descriptivo."
+       "mw-widgets-dateinput-placeholder-month": "AAAA-MM"
 }
index 043d151..8c87e55 100644 (file)
@@ -67,7 +67,8 @@
                        "Hhaboh162002",
                        "بدارين",
                        "باسم",
-                       "Moud hosny"
+                       "Moud hosny",
+                       "ديفيد"
                ]
        },
        "tog-underline": "سطر تحت الوصلات:",
@@ -95,7 +96,7 @@
        "tog-enotifminoredits": "أرسل إلي رسالة إلكترونية بشأن التعديلات الطفيفة للصفحات والملفات",
        "tog-enotifrevealaddr": "أظهر عنوان بريدي الإلكتروني في إشعارات البريد الإلكتروني",
        "tog-shownumberswatching": "اعرض عدد المستخدمين المراقبين",
-       "tog-oldsig": "اÙ\84تÙ\88Ù\82Ù\8aع الحالي:",
+       "tog-oldsig": "تÙ\88Ù\82Ù\8aعÙ\83 الحالي:",
        "tog-fancysig": "وضع الوصلة يدوياً واستعمال نص الويكي",
        "tog-uselivepreview": "استعمال المعاينة المباشرة",
        "tog-forceeditsummary": "نبهني عند عدم إدخال ملخص تعديل",
        "tog-watchlisthideliu": "أخف تعديلات المستخدمين المسجلين في قائمة المراقبة",
        "tog-watchlistreloadautomatically": "أعد تحميل قائمة المراقبة بصفة آلية حينما يتغير مرشح ما (يتطلب جافاسكربت)",
        "tog-watchlisthideanons": "أخف تعديلات المستخدمين المجهولين في قائمة المراقبة",
-       "tog-watchlisthidepatrolled": " أخف التعديلات المراجعة في قائمة المراقبة",
+       "tog-watchlisthidepatrolled": "أخف التعديلات المراجعة في قائمة المراقبة",
        "tog-watchlisthidecategorization": "أخف تصنيف الصفحات",
        "tog-ccmeonemails": "أرسل إلي نسخا من الرسائل الإلكترونية التي أرسلها إلى المستخدمين الآخرين",
        "tog-diffonly": "لا تعرض محتوى الصفحة أسفل الفرق",
        "tog-showhiddencats": "أظهر التصنيفات المخفية",
        "tog-norollbackdiff": "عدم إظهار الاختلافات بعد تنفيذ التراجع",
        "tog-useeditwarning": "حذّرني عندما أغادر تحرير صفحة فيها تغييرات لم أحفظها",
-       "tog-prefershttps": "دائÙ\85ا Ø§Ø³ØªØ®Ø¯Ù\85 Ø§ØªØµØ§Ù\84ا Ø¢Ù\85Ù\86ا Ø¨Ø¹Ø¯ الدخول",
+       "tog-prefershttps": "دائÙ\85ا Ø§Ø³ØªØ®Ø¯Ù\85 Ø§ØªØµØ§Ù\84ا Ø¢Ù\85Ù\86ا Ø¹Ù\86د ØªØ³Ø¬Ù\8aÙ\84 الدخول",
        "underline-always": "دائما",
        "underline-never": "أبدا",
        "underline-default": "وفق المظهر أو المتصفح",
        "newwindow": "(تفتح في نافذة جديدة)",
        "cancel": "ألغِ",
        "moredotdotdot": "المزيد...",
-       "morenotlisted": "هذه القائمة غير مكتملة.",
+       "morenotlisted": "Ù\87Ø°Ù\87 Ø§Ù\84Ù\82ائÙ\85Ø© Ø±Ø¨Ù\85ا ØªÙ\83Ù\88Ù\86 ØºÙ\8aر Ù\85Ù\83تÙ\85Ù\84Ø©.",
        "mypage": "صفحة",
        "mytalk": "نقاش",
        "anontalk": "نقاش",
        "faq": "الأسئلة المتكررة",
        "faqpage": "Project:أسئلة متكررة",
        "actions": "أفعال",
-       "namespaces": "Ù\81ضاءات Ø§Ù\84تسÙ\85Ù\8aØ©",
+       "namespaces": "Ù\86طاÙ\82ات",
        "variants": "المتغيرات",
        "navigation-heading": "قائمة التصفح",
        "errorpagetitle": "خطأ",
        "history": "تاريخ الصفحة",
        "history_short": "تاريخ",
        "updatedmarker": "عدلت منذ زيارتي الأخيرة",
-       "printableversion": "بتنسق للطباعة",
+       "printableversion": "نسخة للطباعة",
        "permalink": "رابط دائم",
        "print": "اطبع",
        "view": "مطالعة",
        "talk": "نقاش",
        "views": "معاينة",
        "toolbox": "أدوات",
+       "tool-link-userrights": "تغيير مجموعات {{GENDER:$1|المستخدم|المستخدمة}}",
+       "tool-link-emailuser": "أرسل رسالة {{GENDER:$1|لهذا المستخدم|لهذه المستخدمة}}",
        "userpage": "طالع صفحة المستخدم",
        "projectpage": "طالع صفحة المشروع",
        "imagepage": "طالع صفحة الملف",
        "eauthentsent": "تم إرسال رسالة تأكيد إلكترونية إلى العنوان المسمى.\nقبل إرسال أي رسالة أخرى لذلك الحساب، عليك أن تتبع التعليمات الواردة في الرسالة، لتأكيد أن هذا الحساب هو لك بالفعل.",
        "throttled-mailpassword": "تم بالفعل إرسال تذكير بكلمة السر، في ال{{PLURAL:$1||ساعة الماضية|ساعتين الماضيتين|$1 ساعات الماضية|$1 ساعة الماضية}}.\nلمنع التخريب، سيتم إرسال تذكير واحد كل {{PLURAL:$1||ساعة|ساعتين|$1 ساعات|$1 ساعة}}.",
        "mailerror": "خطأ أثناء إرسال البريد: $1",
-       "acct_creation_throttle_hit": "Ø£Ù\86شأ Ø²Ù\88ار Ù\87Ø°Ù\87 Ø§Ù\84Ù\88Ù\8aÙ\83Ù\8a Ø¨Ø§Ø³ØªØ®Ø¯Ø§Ù\85 Ø¹Ù\86Ù\88اÙ\86 Ø¢Ù\8aبÙ\8aÙ\83 {{PLURAL:$1||حسابا Ù\88احدا|حسابÙ\8aÙ\86|$1 Ø­Ø³Ø§Ø¨Ø§Øª|$1 Ø­Ø³Ø§Ø¨Ø§|$1 Ø­Ø³Ø§Ø¨}} Ù\81Ù\8a Ø§Ù\84Ù\8aÙ\88Ù\85 Ø§Ù\84Ù\85اضÙ\8a، وهو الحد الأقصى المسموح به في هذه الفترة الزمنية.\nوكنتيجة لذلك، لن يتمكن الزوار الذين يستخدمون عنوان الأيبي هذا من إنشاء أي حسابات أخرى حاليا.",
+       "acct_creation_throttle_hit": "Ø£Ù\86شأ Ø²Ù\88ار Ù\87Ø°Ù\87 Ø§Ù\84Ù\88Ù\8aÙ\83Ù\8a Ø¨Ø§Ø³ØªØ®Ø¯Ø§Ù\85 Ø¹Ù\86Ù\88اÙ\86 Ø§Ù\84Ø£Ù\8aبÙ\8a Ø§Ù\84خاص Ø¨Ù\83 {{PLURAL:$1||حسابا Ù\88احدا|حسابÙ\8aÙ\86|$1 Ø­Ø³Ø§Ø¨Ø§Øª|$1 Ø­Ø³Ø§Ø¨Ø§|$1 Ø­Ø³Ø§Ø¨}} Ù\81Ù\8a Ø¢Ø®Ø± $2، وهو الحد الأقصى المسموح به في هذه الفترة الزمنية.\nوكنتيجة لذلك، لن يتمكن الزوار الذين يستخدمون عنوان الأيبي هذا من إنشاء أي حسابات أخرى حاليا.",
        "emailauthenticated": "تم تأكيد بريدك الإلكتروني في $2 الساعة $3.",
        "emailnotauthenticated": "لم يؤكد بريدك الإلكتروني حتى الآن.\nلن يتم إرسال رسائل لأي من الميزات التالية.",
        "noemailprefs": "حدد عنوان بريد إلكتروني في تفضيلاتك لتفعيل هذه الخصائص.",
        "botpasswords-label-resetpassword": "أعد ضبط كلمة السر",
        "botpasswords-label-grants": "المنح التي يمكن تطبيقها:",
        "botpasswords-help-grants": "كل منحة تعطي وصولا لصلاحيات المستخدم المعروضة التي يمتلكها حساب المستخدم بالفعل. انظر [[Special:ListGrants|جدول المنح]] للمزيد من المعلومات.",
-       "botpasswords-label-restrictions": "قيود الاستخدام:",
        "botpasswords-label-grants-column": "الممنوح",
        "botpasswords-bad-appid": "اسم البوت \"$1\" غير صحيح.",
        "botpasswords-insert-failed": "فشل في اضافة  اسم البوت \"$1\".هل اضيف بالفعل؟",
        "passwordreset-emailelement": "اسم {{GENDER:$1\n|المستخدم|المستخدمة}}: \n$1\n\nكلمة السر المؤقتة: \n$2",
        "passwordreset-emailsentemail": "إذا كان هذا العنوان البريد مرتبط بحسابك، من ثم سيتم إرسال بريد إلكتروني لإعادة تعيين كلمة السر.",
        "passwordreset-emailsentusername": "إذا كان هناك عنوان بريد إلكتروني مرتبط بهذا المستخدم، ثم سيتم إرسال بريد إلكتروني لإعادة تعيين كلمة السر.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|رسالة|رسائل}} البريد الإلكتروني لضبط كلمة السر تم إرسالها. {{PLURAL:$1|اسم المستخدم وكلمة السر معروضان|قائمة أسماء المستخدمين وكلمات السر معروضة}} بالأسفل.",
-       "passwordreset-emailerror-capture2": "إرسال بريد إلى {{GENDER:$2|المستخدم|المستخدمة}} فشل: $1 {{PLURAL:$3|اسم المستخدم وكلمة السر معروضان|lقائمة أسماء المستخدمين كلمات السر معروضة}} بالأسفل.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|رسالة|رسائل}} البريد الإلكتروني لضبط كلمة السر تم إرسالها. {{PLURAL:$1|اسم المستخدم وكلمة السر معروضان|قائمة أسماء المستخدمين وكلمات السر معروضة}} هنا.",
+       "passwordreset-emailerror-capture2": "إرسال بريد إلى {{GENDER:$2|المستخدم|المستخدمة}} فشل: $1 {{PLURAL:$3|اسم المستخدم وكلمة السر معروضان|قائمة أسماء المستخدمين وكلمات السر معروضة}} هنا.",
        "passwordreset-nocaller": "يجب أن يتم توفير مستدعي",
        "passwordreset-nosuchcaller": "المستدعي غير موجود: $1",
        "passwordreset-ignored": "إعادة ضبط كلمة السر لم تتم التعامل معها. ربما لا موفر تم ضبطه؟",
        "mergehistory-from": "الصفحة المصدر:",
        "mergehistory-into": "الصفحة الهدف:",
        "mergehistory-list": "تاريخ التعديل القابل للدمج",
-       "mergehistory-merge": "المراجعات التالية من [[:$1]] يمكن دمجها إلى [[:$2]].\nاستخدم عامود الصناديق لدمج المراجعات التي تم إنشاؤها في وقبل الوقت المحدد.\nلاحظ أن استخدام وصلات التصفح سيعيد ضبط هذا العامود.",
+       "mergehistory-merge": "المراجعات التالية من [[:$1]] يمكن دمجها إلى [[:$2]].\nاستخدم عمود الصناديق لدمج المراجعات التي تم إنشاؤها في وقبل الوقت المحدد.\nلاحظ أن استخدام وصلات التصفح سيعيد ضبط هذا العمود.",
        "mergehistory-go": "عرض التعديلات القابلة للدمج",
        "mergehistory-submit": "دمج المراجعات",
        "mergehistory-empty": "لا مراجعات يمكن دمجها.",
        "searchprofile-advanced-tooltip": "ابحث في النطاقات المخصصة",
        "search-result-size": "$1 ({{PLURAL:$2|لا كلمات|كلمة واحدة|كلمتان|$2 كلمات|$2 كلمة}})",
        "search-result-category-size": "{{PLURAL:$1|لا أعضاء|عضو واحد|عضوان|$1 أعضاء|$1 عضوًا|$1 عضو}} ({{PLURAL:$2|لا تصانيف فرعية|تصنيف فرعي واحد|تصنيفان فرعيان|$2 تصنيفات فرعية|$2 تصنيفًا فرعيًا|$2 تصنيف فرعي}} و{{PLURAL:$3|لا ملفات|ملف واحد|ملفان|$3 ملفات|$3 ملفًا|$3 ملف}})",
-       "search-redirect": "(تحويلة $1)",
+       "search-redirect": "(تحويلة من $1)",
        "search-section": "(قسم $1)",
        "search-category": "(التصنيف $1)",
        "search-file-match": "(يطابق محتوى الملف)",
        "prefs-watchlist": "قائمة المراقبة",
        "prefs-editwatchlist": "تعديل قائمة المراقبة",
        "prefs-editwatchlist-label": "عدل قائمة مراقبتك:",
-       "prefs-editwatchlist-edit": "أعرض Ù\88Ø£حذف عناوين من قائمة مراقبتك",
+       "prefs-editwatchlist-edit": "اعرض Ù\88احذف عناوين من قائمة مراقبتك",
        "prefs-editwatchlist-raw": "عدل قائمة المراقبة الخام",
        "prefs-editwatchlist-clear": "امسح قائمة المراقبة",
        "prefs-watchlist-days": "عدد الأيام للعرض في قائمة المراقبة:",
        "upload-dialog-disabled": "رفع الملفات باستخدام هذا الحوار معطلة على هذه الويكي.",
        "upload-dialog-title": "رفع الملف",
        "upload-dialog-button-cancel": "إلغاء",
+       "upload-dialog-button-back": "رجوع",
        "upload-dialog-button-done": "تم",
        "upload-dialog-button-save": "احفظ",
        "upload-dialog-button-upload": "رفع",
        "apisandbox-results-fixtoken-fail": "فشل جلب توكين \"$1\"",
        "apisandbox-alert-page": "هناك حقول غير صالحة في هذه الصفحة.",
        "apisandbox-alert-field": "قيمة هذا الحقل غير صالحة.",
+       "apisandbox-continue": "استمرار",
+       "apisandbox-continue-clear": "إفراغ",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} س [https://www.mediawiki.org/wiki/API:Query#Continuing_queries يستمر] في الطلب الأخير؛ {{int:apisandbox-continue-clear}} سيفرغ المعاملات المرتبطة بالاستمرار.",
        "booksources": "مصادر كتاب",
        "booksources-search-legend": "البحث عن مصادر الكتب",
        "booksources-isbn": "ردمك:",
        "mailnologin": "لا يوجد عنوان للإرسال",
        "mailnologintext": "يجب أن تقوم [[Special:UserLogin|بتسجيل الدخول]] وإدخال بريد إلكتروني صالح في صفحة [[Special:Preferences|التفضيلات]] لتتمكن من إرسال الرسائل لمستخدمين آخرين.",
        "emailuser": "مراسلة المستخدم",
-       "emailuser-title-target": "راسل بالبريد الإلكتروني هذا  {{GENDER:$1| المستخدم}}",
+       "emailuser-title-target": "راسل هذا  {{GENDER:$1| المستخدم}} بالبريد الإلكتروني",
        "emailuser-title-notarget": "مراسلة المستخدم",
        "emailpagetext": "يمكنك استخدام الاستمارة بالأسفل لإرسال رسالة بريد إلكتروني إلى {{GENDER:$1|هذا المستخدم|هذه المستخدمة}}.\n'''يمكن أن يرى المرسل إليه عنوان بريدك الإلكتروني''' الذي أدخلته في [[Special:Preferences|تفضيلاتك]] كعنوان المرسل في البريد الإلكتروني، كي يستطيع المتلقي الرد عليك مباشرة.",
        "defemailsubject": "رسالة {{SITENAME}} من المستخدم \"$1\"",
        "sp-contributions-blocked-notice-anon": "عنوان الأيبي هذا ممنوع حاليا.\nآخر مدخلة لسجل المنع معروضة هنا كمرجع:",
        "sp-contributions-search": "بحث عن مساهمات",
        "sp-contributions-username": "عنوان أيبي أو اسم مستخدم:",
-       "sp-contributions-toponly": "أظÙ\87ر Ø£Ø¹Ù\84Ù\89 Ø§Ù\84Ù\85راجعات فقط",
+       "sp-contributions-toponly": "أظÙ\87ر Ø§Ù\84Ù\86سخ Ø§Ù\84حاÙ\84Ù\8aØ© فقط",
        "sp-contributions-newonly": "أظهر إنشاء الصفحات فقط",
        "sp-contributions-hideminor": "أخف التعديلات الطفيفة",
        "sp-contributions-submit": "بحث",
        "movelogpagetext": "بالأسفل قائمة بالصفحات التي تم نقلها.",
        "movesubpage": "{{PLURAL:$1||الصفحة الفرعية|الصفحتان الفرعيتان|الصفحات الفرعية}}",
        "movesubpagetext": "لهذه الصفحة {{PLURAL:$1||صفحة فرعية واحدة معروضة|صفحتان فرعيتان معروضتان|$1 صفحات فرعية معروضة|$1 صفحة فرعية معروضة}} بالأسفل.",
+       "movesubpagetalktext": "صفحة النقاش المكافئة لديها $1 {{PLURAL:$1|صفحة فرعية|صفحات فرعية}} معروضة بالأسفل.",
        "movenosubpage": "ليس لهذه الصفحة صفحات فرعية.",
        "movereason": "السبب:",
        "revertmove": "استرجع",
        "allmessagesname": "الاسم",
        "allmessagesdefault": "النص الافتراضي",
        "allmessagescurrent": "النص الحالي",
-       "allmessagestext": "Ù\87Ø°Ù\87 Ù\82ائÙ\85Ø© Ø¨Ø±Ø³Ø§Ø¦Ù\84 Ø§Ù\84Ù\86ظاÙ\85 Ø§Ù\84Ù\85تÙ\88Ù\81رة Ù\81Ù\8a Ù\86طاÙ\82 Ù\85Ù\8aدÙ\8aاÙ\88Ù\8aÙ\83Ù\8a.\nÙ\8aرجÙ\89 Ø²Ù\8aارة :\n[https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation MediaWiki Localisation] Ù\88 [https://translatewiki.net translatewiki.net]\nإازا Ù\83Ù\86ت ØªØ±ØºØ¨ Ù\81Ù\8a Ø§Ù\84Ù\85ساÙ\87Ù\85Ø© Ø¨ØªØ¹Ø±Ù\8aب Ù\85Ù\8aدÙ\8aا Ù\88Ù\8aÙ\83Ù\8a",
+       "allmessagestext": "Ù\87Ø°Ù\87 Ù\82ائÙ\85Ø© Ø¨Ø±Ø³Ø§Ø¦Ù\84 Ø§Ù\84Ù\86ظاÙ\85 Ø§Ù\84Ù\85تÙ\88Ù\81رة Ù\81Ù\8a Ù\86طاÙ\82 Ù\85Ù\8aدÙ\8aاÙ\88Ù\8aÙ\83Ù\8a.\nÙ\85Ù\86 Ù\81ضÙ\84Ù\83 Ø²Ø± [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation ØªØ±Ø¬Ù\85Ø© Ù\85Ù\8aدÙ\8aاÙ\88Ù\8aÙ\83Ù\8a] Ù\88 [https://translatewiki.net ØªØ±Ø§Ù\86سÙ\84Ù\8aت Ù\88Ù\8aÙ\83Ù\8a Ø¯Ù\88ت Ù\86ت] Ù\84Ù\88 Ù\83Ù\86ت ØªØ±ØºØ¨ Ù\81Ù\8a Ø§Ù\84Ù\85ساÙ\87Ù\85Ø© Ù\81Ù\8a ØªØ±Ø¬Ù\85Ø© Ù\85Ù\8aدÙ\8aاÙ\88Ù\8aÙ\83Ù\8a Ø§Ù\84أساسÙ\8aØ©.",
        "allmessagesnotsupportedDB": "هذه الصفحة لا يمكن استخدامها لأن '''$wgUseDatabaseMessages''' تم تعطيله.",
        "allmessages-filter-legend": "المرشح",
        "allmessages-filter": "رشح حسب حالة التخصيص:",
        "pageinfo-category-pages": "عدد الصفحات",
        "pageinfo-category-subcats": "عدد التصنيفات الفرعية",
        "pageinfo-category-files": "عدد الملفات",
+       "pageinfo-user-id": "مُعرِّف المستخدم",
        "markaspatrolleddiff": "علم بعلامة المراجعة",
        "markaspatrolledtext": "علم هذه الصفحة بعلامة المراجعة",
        "markaspatrolledtext-file": "علم نسخة الملف هذه بعلامة المراجعة",
        "newimages-showbots": "أظهر التحميلات بواسطة البوتات",
        "newimages-hidepatrolled": "أخف المرفوعات المنظورة",
        "noimages": "لا شيء للعرض.",
+       "gallery-slideshow-toggle": "تغيير الصور المصغرة",
        "ilsubmit": "بحث",
        "bydate": "حسب التاريخ",
        "sp-newimages-showfrom": "أظهر الملفات الجديدة بدءا من $2، $1",
        "exif-lens": "العدسة المستخدمة",
        "exif-serialnumber": "الرقم التسلسلي للكاميرا",
        "exif-cameraownername": "مالك الكاميرا",
-       "exif-label": "عÙ\84اÙ\85ة",
+       "exif-label": "اÙ\84تسÙ\85Ù\8aة",
        "exif-datetimemetadata": "آخر تعديل للبيانات التعريفية",
        "exif-nickname": "الاسم غير الرسمي للصورة",
        "exif-rating": "التقييم (من 5)",
        "htmlform-cloner-create": "إضافة المزيد",
        "htmlform-cloner-delete": "إزالة",
        "htmlform-cloner-required": "مطلوب قيمة واحدة على الأقل.",
+       "htmlform-date-placeholder": "YYYY-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "YYYY-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "القيمة التي حددتها ليست تاريخا متعرف عليه. جرب استخدام صيغة YYYY-MM-DD.",
+       "htmlform-time-invalid": "القيمة التي حددتها ليست وقتا متعرف عليه. جرب استخدام صيغة HH:MM:SS.",
+       "htmlform-datetime-invalid": "القيمة التي حددتها ليست وقتا وتاريخا متعرف عليه. جرب استخدام صيغة YYYY-MM-DD HH:MM:SS.",
+       "htmlform-date-toolow": "القيمة التي حددتها هي قبل أول تاريخ مسموح به $1.",
+       "htmlform-date-toohigh": "القيمة التي حددتها هي بعد آخر تاريخ مسموح به $1.",
+       "htmlform-time-toolow": "القيمة التي حددتها هي قبل أول وقت مسموح به $1.",
+       "htmlform-time-toohigh": "القيمة التي حددتها هي بعد آخر وقت مسموح به $1.",
+       "htmlform-datetime-toolow": "القيمة التي حددتها هي قبل أول تاريخ ووقت مسموح بهما $1.",
+       "htmlform-datetime-toohigh": "القيمة التي حددتها هي بعد آخر تاريخ ووقت مسموح بهما $1.",
        "htmlform-title-badnamespace": "[[:$1]] ليس في نطاق \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" ليس عنوان صفحة يمكن إنشاؤه",
        "htmlform-title-not-exists": "$1 غير موجود.",
        "htmlform-user-not-exists": "<strong>$1</strong> غير موجود",
        "htmlform-user-not-valid": "اسم المستخدم <strong>$1</strong> غير صالح.",
-       "sqlite-has-fts": "$1 بدعم البحث في كامل النص",
-       "sqlite-no-fts": "$1 بدون دعم البحث في كامل النص",
        "logentry-delete-delete": "{{GENDER:$2|حذف|حذفت}} $1 صفحة $3",
-       "logentry-delete-restore": "{{GENDER:$2|استعاد|استعادت}} $1 صفحة $3",
+       "logentry-delete-restore": "{{GENDER:$2|استرجع|استرجعت}} $1 صفحة $3",
        "logentry-delete-event": "{{GENDER:$2|غيّر|غيّرت}} $1 إمكانية مشاهدة {{PLURAL:$5||حدث|حدثين|$5 أحداث|$5 حدثًا|$5 حدث}} في سجل $3: $4",
        "logentry-delete-revision": "غيّر{{GENDER:$2||ت}} $1 إمكانية مشاهدة {{PLURAL:$5||مراجعة واحدة|مراجعتين|$5 مراجعات|$5 مراجعة}} في صفحة $3: $4",
        "logentry-delete-event-legacy": "{{GENDER:$2|غيّر|غيّرت}} $1 إمكانية رؤية أحداث في سجل $3",
        "feedback-external-bug-report-button": "أرسل تقرير علة تقنية",
        "feedback-dialog-title": "أرسل تغذية راجعة",
        "feedback-dialog-intro": "أنت يمكنك استخدام الاستمارة السهلة بالأسفل لإرسال تعليقك. تعليقك ستتم إضافته للصفحة \"$1\"، مع اسم المستخدم الخاص بك.",
-       "feedback-error-title": "خطأ",
        "feedback-error1": "خطأ: لا يمكن التعرف عليها من API",
        "feedback-error2": "خطأ: فشل في تحرير",
        "feedback-error3": "خطأ : لا توجد استجابة من API",
        "feedback-thanks": "شكرا! أُرسلت ملاحظاتك لصفحة \"[$2 $1]\".",
        "feedback-thanks-title": "شكرا لك!",
        "feedback-useragent": "وكيل المستخدم:",
-       "searchsuggest-search": "بحث",
+       "searchsuggest-search": "ابحث Ù\81Ù\8a {{SITENAME}}",
        "searchsuggest-containing": "يحتوي...",
        "api-error-autoblocked": "عنوان الأيبي الخاص بك تم منعه تلقائيا، لأنه تم استخدامه بواسطة مستخدم ممنوع",
        "api-error-badaccess-groups": "لا يسمح لك بتحميل الملفات إلى هذه الويكي.",
        "unlinkaccounts-success": "الحساب تم فك وصله.",
        "authenticationdatachange-ignored": "تغيير بيانات التحقق لم يتم التعامل معه. ربما لم يتم ضبط موفر؟",
        "userjsispublic": "من فضلك لاحظ: صفحات الجافاسكريبت الفرعية لا ينبغي أن تحتوي غلى بيانات سرية بما أنها يمكن رؤيتها بواسطة المستخدمين الآخرين.",
-       "usercssispublic": "من فضل لاحظ: صفحات الCSS الفرعية لا ينبغي أن تحتوي على بيانات سرية بما أنها يمكن رؤيتها بواسطة المستخدمين الآخرين."
+       "usercssispublic": "من فضل لاحظ: صفحات الCSS الفرعية لا ينبغي أن تحتوي على بيانات سرية بما أنها يمكن رؤيتها بواسطة المستخدمين الآخرين.",
+       "restrictionsfield-badip": "عنوان أيبي أو نطاق غير صحيح: $1",
+       "restrictionsfield-label": "نطاقات الأيبي المسموح بها:",
+       "restrictionsfield-help": "عنوان أيبي أو نطاق CIDR واحد لكل سطر. لتفعيل كل شيء، استخدم<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "خطأ: $1",
+       "edit-error-long": "الأخطاء:\n\n$1"
 }
index 941b518..8a8a45a 100644 (file)
@@ -19,7 +19,8 @@
                        "Macofe",
                        "IKHazarika",
                        "Dibya Dutta",
-                       "Matma Rex"
+                       "Matma Rex",
+                       "চাণক্য কুমাৰ দাস"
                ]
        },
        "tog-underline": "সংযোগসমূহ অধোৰেখিত কৰক:",
@@ -37,6 +38,7 @@
        "tog-watchdefault": "মই সম্পাদনা কৰা সকলো পৃষ্ঠা মোৰ লক্ষ্য-তালিকাত যোগ কৰক",
        "tog-watchmoves": "মই স্থানান্তৰ কৰা সকলো পৃষ্ঠা আৰু ফাইল মোৰ লক্ষ্য-তালিকাত যোগ কৰক",
        "tog-watchdeletion": "মই বিলোপ কৰা সকলো পৃষ্ঠা মোৰ লক্ষ্য-তালিকাত যোগ কৰক",
+       "tog-watchuploads": "মই আপল'ড কৰা নতুন ফাইলসমূহ মোৰ লক্ষ্যপৃষ্ঠাত যোগ কৰক",
        "tog-watchrollback": "মই পূৰ্ববত কৰা পৃষ্ঠা মোৰ লক্ষ্য-তালিকাত যোগ কৰা হওক",
        "tog-minordefault": "সকলো সম্পাদনা অগুৰুত্বপূৰ্ণ বুলি নিজে নিজে চিহ্নিত কৰক",
        "tog-previewontop": "সম্পাদনা বাকছৰ ওপৰত খচৰা দেখুৱাওক",
@@ -46,7 +48,7 @@
        "tog-enotifminoredits": "অগুৰুত্বপূৰ্ণ সম্পাদনা হ'লেও মোলৈ ই-মেইল পঠাব",
        "tog-enotifrevealaddr": "জাননী ই-মেইল বোৰত মোৰ ই-মেইল ঠিকনা দেখুৱাব",
        "tog-shownumberswatching": "লক্ষ্য কৰি থকা সদস্য সমূহৰ সংখ্যা দেখুৱাওক",
-       "tog-oldsig": "বৰ্তমানৰ স্বাক্ষৰ:",
+       "tog-oldsig": "à¦\86পà§\8bনাৰ à¦¬à§°à§\8dতমানৰ à¦¸à§\8dবাà¦\95à§\8dষৰ:",
        "tog-fancysig": "স্বাক্ষৰ ৱিকিটেক্সট হিচাপে ব্যৱহাৰ কৰক (স্বয়ংক্ৰিয় সংযোগ অবিহনে)",
        "tog-uselivepreview": "তাৎক্ষণিক প্ৰাক্‌দৰ্শন ব্যৱহাৰ কৰক",
        "tog-forceeditsummary": "সম্পাদনাৰ সাৰাংশ নিদিলে মোক জনাব",
@@ -54,6 +56,7 @@
        "tog-watchlisthidebots": "মোৰ লক্ষ্য-তালিকাত ব'টে কৰা সম্পাদনা নেদেখুৱাব",
        "tog-watchlisthideminor": "মোৰ লক্ষ্য-তালিকাত অগুৰুত্বপূৰ্ণ সম্পাদনা নেদেখুৱাব",
        "tog-watchlisthideliu": "প্ৰবেশ কৰা সদস্যৰ সম্পাদনাসমূহ আঁতৰাই অনুসৰণ-তালিকা দেখুৱাওক",
+       "tog-watchlistreloadautomatically": "পৰিশোধক সলনি হ'লেই লক্ষ্যপৃষ্ঠা স্বয়ংক্ৰিয়ভাৱে ৰিল'ড কৰক (জাভাস্ক্ৰিপ্টৰ প্ৰয়োজন)",
        "tog-watchlisthideanons": "বেনামী সদস্যৰ সম্পাদনাসমূহ আঁতৰাই অনুসৰণ-তালিকা দেখুৱাওক",
        "tog-watchlisthidepatrolled": "পৰীক্ষিত সম্পাদনাসমূহ লক্ষ্য-তালিকাৰ পৰা লুকুৱাই ৰাখক",
        "tog-watchlisthidecategorization": "পৃষ্ঠাবোৰৰ শ্ৰেণীকৰণ লুকুৱাওক",
@@ -62,7 +65,7 @@
        "tog-showhiddencats": "নিহিত শ্ৰেণীসমূহ দেখুৱাওক",
        "tog-norollbackdiff": "পূৰ্বৱত কৰা পাছত পাৰ্থক্য নেদেখুৱাব",
        "tog-useeditwarning": "সালসলনি সংৰক্ষণ নকৰাকৈ সম্পাদনা পৃষ্ঠা ত্যাগৰ সময়ত মোক সাৱধান কৰক",
-       "tog-prefershttps": "পà§\8dৰৱà§\87শ à¦\95ৰà§\8bà¦\81তà§\87 à¦¸à¦¦à¦¾à¦¯à¦¼ সুৰক্ষিত সংযোগ ব্যৱহাৰ কৰক",
+       "tog-prefershttps": "পà§\8dৰৱà§\87শ à¦\95ৰাৰ à¦¸à¦®à¦¯à¦¼à¦¤ সুৰক্ষিত সংযোগ ব্যৱহাৰ কৰক",
        "underline-always": "সদায়",
        "underline-never": "কেতিয়াও নহয়",
        "underline-default": "ব্ৰাউজাৰ ডিফল্ট",
        "october-date": "অক্টোবৰ $1",
        "november-date": "নৱেম্বৰ $1",
        "december-date": "ডিচেম্বৰ $1",
+       "period-am": "পূৰ্বাহ্ন",
+       "period-pm": "অপৰাহ্ন",
        "pagecategories": "{{PLURAL:$1|শ্ৰেণী|শ্ৰেণীসমূহ}}",
        "category_header": "\"$1\" শ্ৰেণীৰ পৃষ্ঠাসমূহ",
        "subcategories": "উপশ্ৰেণীসমূহ",
        "newwindow": "(নতুন ৱিণ্ড'ত খোল খায়)",
        "cancel": "বাতিল কৰক",
        "moredotdotdot": "অধিক...",
-       "morenotlisted": "এই তালিকা সম্পূৰ্ণ নহয়।",
+       "morenotlisted": "এই তালিকা সম্পূৰ্ণ নহ'ব পাৰে।",
        "mypage": "পৃষ্ঠা",
        "mytalk": "বাৰ্তালাপ",
-       "anontalk": "à¦\8fà¦\87 IP-ত à¦¯à§\8bà¦\97াযà§\8bà¦\97 à¦\95ৰক",
+       "anontalk": "বাৰà§\8dতা à¦¦à¦¿à¦¯à¦¼ক",
        "navigation": "দিকদৰ্শন",
        "and": "&#32;আৰু",
        "qbfind": "বিচৰা হওক",
        "talk": "আলোচনা",
        "views": "দৰ্শন",
        "toolbox": "সঁজুলিসমূহ",
+       "tool-link-userrights": "{{GENDER:$1|সদস্য}} গোটসমূহ সলাওক",
+       "tool-link-emailuser": "এই {{GENDER:$1|সদস্যজনক}} ইমেইল কৰক",
        "userpage": "সদস্য পৃষ্ঠা চাওক",
        "projectpage": "প্ৰকল্প পৃষ্ঠা চাওক",
        "imagepage": "নথি পৃষ্ঠা চাওক",
        "laggedslavemode": "সাৱধানবাণী: ইয়াত সাম্প্ৰতিক সাল-সলনি নাথাকিব পাৰে",
        "readonly": "তথ্যকোষ বন্ধ কৰা আছে",
        "enterlockreason": "বন্ধ কৰাৰ কাৰণ দিয়ক, লগতে কেতিয়ামানে খোলা হব তাকো জনাব।",
-       "readonlytext": "হয়তো নিয়মীয়া পৰিচৰ্যাৰ বাবে তথ্যকোষত নতুন সম্পাদনা আৰু আন সাল-সলনি বন্ধ কৰা হৈছে। কিছু সময় পিছত এয়া সাধাৰণ অৱস্থালৈ আহিব।\n\nযিজন প্ৰশাসকে বন্ধ কৰিছে তেওঁ এই কাৰণ দিছে: $1",
+       "readonlytext": "হয়তà§\8b à¦¨à¦¿à¦¯à¦¼à¦®à§\80য়া à¦ªà§°à¦¿à¦\9aৰà§\8dযাৰ à¦¬à¦¾à¦¬à§\87 à¦¤à¦¥à§\8dযà¦\95à§\8bষত à¦¨à¦¤à§\81ন à¦¸à¦®à§\8dপাদনা à¦\86ৰà§\81 à¦\86ন à¦¸à¦¾à¦²-সলনি à¦¬à¦¨à§\8dধ à¦\95ৰা à¦¹à§\88à¦\9bà§\87। à¦\95িà¦\9bà§\81 à¦¸à¦®à¦¯à¦¼ à¦ªà¦¿à¦\9bত à¦\8fয়া à¦¸à¦¾à¦§à¦¾à§°à¦£ à¦\85ৱসà§\8dথালà§\88 à¦\86হিব।\n\nযিà¦\9cন à¦ªà§\8dৰণালà§\80 à¦ªà§\8dৰশাসà¦\95à§\87 à¦¬à¦¨à§\8dধ à¦\95ৰিà¦\9bà§\87 à¦¤à§\87à¦\93à¦\81 à¦\8fà¦\87 à¦\95াৰণ à¦¦à¦¿à¦\9bà§\87: $1",
        "missing-article": "\"$1\" $2 লেখাটো তথ্যকোষত পোৱা নগ’ল ।\n\nবিলোপ কৰা কোনো পৃষ্ঠাৰ সংযোগৰ বাবে সাধাৰণতে এনে ঘটে ।\n\nযদি এনে হোৱা নাই তেন্তে আপুনি ছফ্টৱেৰত কিবা সমস্যা পাইছে ।\nঅনুগ্ৰহ কৰি এই সম্পৰ্কে ইউ.আৰ.এল. সহ কোনো [[Special:ListUsers/sysop|প্ৰশাসক]]ক জনাওক ।",
        "missingarticle-rev": "(সংস্কৰণ#: $1)",
        "missingarticle-diff": "(তফাৎ: $1, $2)",
        "title-invalid-talk-namespace": "অনুৰোধ কৰা পৃষ্ঠাৰ শিৰোনামে এটা আলোচনা পৃষ্ঠা সূচাইছে যিটো থাকিব নোৱাৰে।",
        "title-invalid-characters": "অনুৰোধ কৰা পৃষ্ঠাৰ শিৰোনামত অবৈধ চিহ্ন আছে: \"$1\"।",
        "title-invalid-magic-tilde": "অনুৰোধ কৰা পৃষ্ঠাৰ শিৰোনামত অবৈধ যাদুকৰী টাইল্ড শৃংখল আছে (<nowiki>~~~</nowiki>)।",
-       "title-invalid-too-long": "অনুৰোধ কৰা পৃষ্ঠাৰ শিৰোনাম অতি দীঘল। UTF-8 এন্‌ক'ডিঙত ই {PLURAL:$1|বাইট}}তকৈ দীঘল হ'ব নালাগে।",
+       "title-invalid-too-long": "অনুৰোধ কৰা পৃষ্ঠাৰ শিৰোনাম অতি দীঘল। UTF-8 এন্‌ক'ডিঙত ই $1 {{PLURAL:$1|বাইটতকৈ}} দীঘল হ'ব নালাগে।",
        "title-invalid-leading-colon": "অনুৰোধ কৰা পৃষ্ঠাৰ শিৰোনামৰ আৰম্ভণিত এটা অবৈধ ক'ল'ন আছে।",
        "perfcached": "তলত দিয়া তথ্যখিনি আগতে জমা কৰি থোৱা (cached) আৰু সাম্প্ৰতিক নহ'ব পাৰে। এই তথ্যখিনিত সৰ্বোচ্চ {{PLURAL:$1|এটা ফলাফল|$1টা ফলাফল}} উপলব্ধ।",
        "perfcachedts": "তলত দিয়া তথ্য খিনি আগতে জমা কৰি থোৱা (cached) আৰু শেষবাৰৰ কাৰণে $1 ত নবীকৰণ কৰা হৈছিল। সৰ্বাধিক {{PLURAL:$4|এটা ফলাফল|$4 টা ফলাফল}} এই কেশ্বত পাব।",
        "viewsource": "উৎস চাওক",
        "viewsource-title": "$1ৰ উৎস চাওক",
        "actionthrottled": "কাৰ্য লেহেম কৰা হৈছে",
-       "actionthrottledtext": "সà§\8dপাম à§°à§\8bধ à¦\95ৰিবলà§\88 à¦\8fà¦\87 à¦\95à§\8dৰিয়াতà§\8b à¦\95ম à¦¸à¦®à¦¯à¦¼à§° à¦­à¦¿à¦¤à§°à¦¤ à¦¬à¦¹à§\81 à¦¬à§\87à¦\9bি à¦¬à¦¾à§° à¦\95ৰাতà§\8b à§°à§\8bধ à¦\95ৰা à¦¹à§\88à¦\9bà§\87, আৰু আপুনি ইতিমধ্যে সেই সীমা অতিক্ৰম কৰিলে।\nঅনুগ্ৰহ কৰি কিছু সময় পাছত চেষ্টা কৰক।",
+       "actionthrottledtext": "দà§\81ৰà§\8dবাà¦\95à§\8dয à§°à§\8bধ à¦\95ৰিবলà§\88 à¦\8fà¦\87 à¦\95à§\8dৰিয়াতà§\8b à¦\95ম à¦¸à¦®à¦¯à¦¼à§° à¦­à¦¿à¦¤à§°à¦¤ à¦¬à¦¹à§\81 à¦¬à§\87à¦\9bি à¦¬à¦¾à§° à¦\95ৰাà¦\9fà§\8b à¦¨à¦¿à¦·à§\87ধ আৰু আপুনি ইতিমধ্যে সেই সীমা অতিক্ৰম কৰিলে।\nঅনুগ্ৰহ কৰি কিছু সময় পাছত চেষ্টা কৰক।",
        "protectedpagetext": "সম্পাদনা ৰোধ কৰিবলৈ এই পৃষ্ঠাটো সুৰক্ষিত কৰা হৈছে।",
        "viewsourcetext": "আপুনি এই পৃষ্ঠাটোৰ উৎস চাব আৰু প্ৰতিলিপি কৰিব পাৰে।",
        "viewyourtext": "আপুনি <strong>আপোনাৰ সম্পাদনাসমূহ</strong>ৰ উৎস চাব আৰু এই পৃষ্ঠালৈ প্ৰতিলিপি কৰিব পাৰে।",
        "virus-scanfailed": "স্কেন অসফল (কোড $1)",
        "virus-unknownscanner": "অজ্ঞাত এন্টিভাইৰাচ:",
        "logouttext": "'''আপুনি প্ৰস্থান কৰিলে।'''\n\nমন কৰিব যে যেতিয়ালৈকে আপোনাৰ ব্ৰাউজাৰৰ অস্থায়ী-স্মৃতি (cache) খালী নকৰে, তেতিয়ালৈকে কিছুমান পৃষ্ঠাত আপুনি প্ৰৱেশ কৰা বুলি দেখুৱাই থাকিব পাৰে।",
+       "cannotlogoutnow-title": "এতিয়া প্ৰস্থান কৰিব নোৱাৰি",
+       "cannotlogoutnow-text": "$1 ব্যৱহাৰ কৰাৰ সময়ত প্ৰস্থান কৰিব নোৱাৰি।",
        "welcomeuser": "আদৰিছোঁ, $1!",
        "welcomecreation-msg": "== আদৰিছোঁ, $1! ==\nআপোনাৰ সদস্যভুক্তি হৈ গ’ল ।\n[[Special:Preferences|{{SITENAME}}ৰ পছন্দসমূহ]]ত আপোনাৰ পছন্দমতে ব্যক্তিগতকৰণ কৰি ল’বলৈ নাপাহৰে যেন ।",
        "yourname": "সদস্যনাম:",
        "yourpasswordagain": "গুপ্তশব্দ আকৌ এবাৰ লিখক",
        "createacct-yourpasswordagain": "গুপ্তশব্দ নিশ্চিত কৰক",
        "createacct-yourpasswordagain-ph": "গুপ্তশব্দ আকৌ লিখক",
-       "remembermypassword": "মোৰ প্ৰৱেশ এই কম্পিউটাৰত মনত ৰাখিব (সৰ্বাধিক $1 {{PLURAL:$1|দিনলৈ|দিনলৈ}})",
        "userlogin-remembermypassword": "মোক লগ্‌-ইন কৰাই ৰাখক",
        "userlogin-signwithsecure": "নিৰাপদ সংযোগ ব্যৱহাৰ কৰক",
+       "cannotlogin-title": "প্ৰৱেশ কৰিব নোৱাৰি",
+       "cannotlogin-text": "প্ৰৱেশ কৰা সম্ভৱ নহয়",
+       "cannotloginnow-title": "এতিয়া প্ৰৱেশ কৰিব নোৱাৰি",
+       "cannotloginnow-text": "$1 ব্যৱহাৰ কৰাৰ সময়ত প্ৰৱেশ কৰিব নোৱাৰি।",
        "yourdomainname": "আপোনাৰ ডমেইন:",
        "password-change-forbidden": "আপুনি এই ৱিকিত গুপ্তশব্দ সলাব নোৱাৰে।",
        "externaldberror": "কোনো প্ৰামাণ্যকৰণ তথ্যকোষৰ ত্ৰুটি ঘটিছে নতুবা আপোনাৰ বৰ্হি-একাউণ্ট নৱীকৰণ কৰাৰ অনুমতি নাই ।",
        "passwordreset-emailtext-user": "{{SITENAME}}ত $1 ব্যৱহাৰকাৰীয়ে {{SITENAME}} ($4)ৰ বাবে আপোনাৰ গুপ্তশব্দ ন-কৈ বহুৱাবলৈ অনুৰোধ জনাইছিল। ই-পত্ৰ ঠিকনাটোৰ লগত এই সদস্যৰ {{PLURAL:$3|একাউণ্ট|একাউণ্টসমূহ}} জড়িত হৈ আছে।\n \n$2\n \n{{PLURAL:$3|এই অস্থায়ী গুপ্তশব্দ|এই অস্থায়ী গুপ্তশব্দবোৰ}} {{PLURAL:$5|এদিনত|$5 দিনত }} নাইকীয়া হ’ব । আপুনি লগ-ইন কৰি এটা নতুন গুপ্তশব্দ দিয়া উচিত। যদি আন কোনোবাই এই অনুৰোধ কৰিছিল, বা আপুনি নিজৰ পূৰ্বৰ গুপ্তশব্দ মনত পেলাইছে আৰু ইয়াক সলাব খোজা নাই, তেন্তে আপুনি এই বাৰ্তাক অগ্ৰাহ্য কৰি নিজৰ পূৰ্বৰ গুপ্তশব্দ ব্যৱহাৰ কৰি থাকিব পাৰে।",
        "passwordreset-emailelement": "সদস্যনাম: \n$1\n\nঅস্থায়ী গুপ্তশব্দ: \n$2",
        "passwordreset-emailsentemail": "এইটো আপোনাৰ একাউণ্টৰ পঞ্জীকৃত ই-মেইল ঠিকনা হয়নে, হয় যদি এটা গুপ্তশব্দ উদ্ধাৰ ই-মেইল পঠিওৱা হ'ব।",
-       "passwordreset-emailsent-capture": "এখন গুপ্তশব্দ উদ্ধাৰ ইমেইল পঠিওৱা হৈছে, এইখন তলত দেখা পাব।",
-       "passwordreset-emailerror-capture": "এখন গুপ্তশব্দ উদ্ধাৰ ইমেইল সৃষ্টি কৰা হ'ল, কিন্তু {{GENDER:$2|সদস্যজনলৈ}} পঠিয়াব পৰা নগ'ল। সেইখন তলত দেখুওৱা হৈছে: $1",
        "changeemail": "ই-মেইল ঠিকনা সলনি নাইবা বিলোপ কৰক",
        "changeemail-header": "একাউণ্টৰ ই-মেইল ঠিকনা সলনি কৰক",
        "changeemail-no-info": "এই পৃষ্ঠাটোত প্ৰৱেশাধিকাৰ পাবলৈ আপুনি লগ্‌ ইন কৰিব লাগিব।",
        "minoredit": "এইটো এটা অগুৰুত্বপূৰ্ণ সম্পাদনা",
        "watchthis": "এই পৃষ্ঠাটো লক্ষ্য কৰক",
        "savearticle": "পৃষ্ঠা সাঁচক",
+       "savechanges": "সাঁচি থওক",
        "preview": "খচৰা",
        "showpreview": "খচৰা চাওক",
        "showdiff": "সালসলনিবোৰ দেখুৱাওক",
        "newarticle": "(নতুন)",
        "newarticletext": "আপুনি বিচৰা প্ৰবন্ধটো বিচাৰি পোৱা নগ'ল।\n\nইচ্ছা কৰিলে আপুনিয়েই এই প্ৰবন্ধটো লিখা আৰম্ভ কৰিব পাৰে। [$1 ইয়াত] সহায় পাব।\n\nআপুনি যদি ইয়ালৈ ভুলতে আহিছে, তেনেহলে আপোনাৰ ব্ৰাওজাৰৰ '''BACK''' বুটামত টিপা মাৰক।",
        "anontalkpagetext": "----''এইখন আলোচনা পৃষ্ঠা বেনামী সদস্যৰ বাবে, যিয়ে নিজা একাউণ্ট  সৃষ্টি কৰা নাই বা যিয়ে সেই একাউণ্ট ব্যৱহাৰ নকৰে।\nএতেকে আমি তেখেতসকলক আই-পি ঠিকনাৰে চিনাক্ত কৰিবলৈ বাধ্য।\nসেই একেই আই-পি ঠিকনা অনেকেই ব্যৱহাৰ কৰিব পাৰে।\nআপুনি যদি এজন বেনামী সদস্য আৰু যদি আপুনি অনুভৱ কৰে যে আপোনাৰ প্ৰতি অপ্ৰাসঙ্গিক মন্তব্য কৰা হৈছে, তেনেহলে আন বেনামী সদস্যৰ পৰা পৃথক কৰিবলৈ \n[[Special:CreateAccount|একাউন্ট সৃষ্টি কৰক]] বা [[Special:UserLogin|প্ৰৱেশ কৰক]] ।''",
-       "noarticletext": "এই পৃষ্ঠাত বৰ্তমান কোনো পাঠ্য নাই ।\nআপুনি আন পৃষ্ঠাত [[Special:Search/{{PAGENAME}}| এই শিৰোনামা সন্ধান কৰিব পাৰে]],\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} সম্পৰ্কীয় অভিলেখ সন্ধান কৰিব পাৰে],\nবা [{{fullurl:{{FULLPAGENAME}}|action=edit}} এই পৃষ্ঠা সম্পাদনা কৰিব পাৰে]</span>",
+       "noarticletext": "এই পৃষ্ঠাত বৰ্তমান কোনো পাঠ্য নাই ।\nআপুনি আন পৃষ্ঠাত [[Special:Search/{{PAGENAME}}|এই শিৰোনামা সন্ধান কৰিব পাৰে]],\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} সম্পৰ্কীয় অভিলেখ সন্ধান কৰিব পাৰে],\nবা [{{fullurl:{{FULLPAGENAME}}|action=edit}} এই পৃষ্ঠা সৃষ্টি কৰিব পাৰে]</span>",
        "noarticletext-nopermission": "এই পৃষ্ঠাত বৰ্তমান কোনো পাঠ্য নাই।\nআপুনি আন পৃষ্ঠাত [[Special:Search/{{PAGENAME}}|এই শিৰোনামা সন্ধান কৰিব পাৰে]],\nবা <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} সম্পৰ্কীয় অভিলেখ সন্ধান কৰিব পাৰে]</span>, কিন্তু এই পৃষ্ঠা সৃষ্টি কৰিবলৈ আপোনাৰ অনুমতি নাই।",
        "missing-revision": "\"{{FULLPAGENAME}}\" নামৰ পৃষ্ঠাৰ #$1 সংশোধনৰ অস্তিত্ব নাই।\n\nসাধাৰণতে বিলোপ কৰা এখন পৃষ্ঠাৰ পুৰণা ইতিহাস লিংক অনুসৰণ কৰিলে এনে হয়।\n[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} বিলোপন ল'গ]ত অধিক তথ্য পাব।",
        "userpage-userdoesnotexist": "\"<nowiki>$1</nowiki>\" নামৰ সদস্য একাউন্ট নিবন্ধিত নহয় ।\nঅনুগ্ৰহ কৰি চাওক আপুনি এই পৃষ্ঠা সৃষ্টি/সম্পাদনা কৰিব বিচাৰিছে নেকি ।",
        "undo-nochange": "সম্পাদনাটো ইতিমধ্যেই বাতিল কৰা হৈছে।",
        "undo-summary": "[[Special:Contributions/$2|$2]] ([[User talk:$2|আলোচনা]]) সম্পাদিত $1 সংশোধনটি বাতিল কৰক",
        "undo-summary-username-hidden": "এজন গোপন ব্যৱহাৰকাৰীয়ে কৰা $1 সংশোধন বাতিল কৰক",
-       "cantcreateaccounttitle": "একাউণ্ট সৃষ্টি কৰিব নোৱাৰি",
        "cantcreateaccount-text": "আই পি ঠিকনা ('''$1''')ৰ পৰা একাউণ্ট সৃষ্টিত [[User:$3|$3]]’য়ে বাধা প্ৰদান কৰিছে ।\n\n$3 য়ে আগবঢ়োৱা ইয়াৰ কাৰণ হৈছে ''$2''",
        "cantcreateaccount-range-text": "[[User:$3|$3]]য়ে <strong>$1</strong> পৰিসীমাৰ আই পি ঠিকনাৰ পৰা একাউণ্ট সৃষ্টি বাৰণ কৰিছে যাৰ ভিতৰত আপোনাৰ আই ই ঠিকনাও (<strong>$4</strong>) আছে।\n\n $3য়ে <em>$2</em> বুলি কাৰণ দৰ্শাইছে",
        "viewpagelogs": "এই পৃষ্ঠাৰ অভিলেখ চাওক ।",
        "suppress": "অমনোযোগ",
        "querypage-disabled": "কাৰ্য্যগত কাৰণত এই বিশেষ পৃষ্ঠাটো নিষ্ক্ৰিয় কৰা হৈছে।",
        "apisandbox-results": "ফলাফল",
+       "apisandbox-continue": "অব্যাহত ৰাখক",
        "booksources": "গ্ৰন্থৰ উৎস সমূহ",
        "booksources-search-legend": "গ্ৰন্থ উৎস সন্ধান",
        "booksources-search": "সন্ধান",
        "contributions": "{{GENDER:$1|সদস্যৰ}} বৰঙণিসমূহ",
        "contributions-title": "$1ৰ বৰঙণিসমূহ",
        "mycontris": "বৰঙণিসমূহ",
+       "anoncontribs": "বৰঙণি",
        "contribsub2": "{{GENDER:$3|$1}} ($2)ৰ কাৰণে",
        "nocontribs": "এই গুণসমূহৰ লগত মিল থকা কোনো সালসলনি পোৱা নগ’ল ।",
        "uctop": "(বৰ্তমান)",
        "javascripttest": "জাভাস্ক্ৰিপ্ট পৰীক্ষা।",
        "javascripttest-pagetext-unknownaction": "অজ্ঞাত কাৰ্য \"$1\"।",
        "javascripttest-qunit-intro": "mediawiki.org-ত [$1 পৰীক্ষা নথিকৰণ] চাওক।",
-       "tooltip-pt-userpage": "আপোনাৰ সদস্য পৃষ্ঠা",
+       "tooltip-pt-userpage": "{{GENDER:|আপোনাৰ সদস্য}} পৃষ্ঠা",
        "tooltip-pt-anonuserpage": "যি আই.পি. ঠিকনাৰ পৰা আপুনি সম্পাদনা কৰিছে তাৰ সদস্য পৃষ্ঠা",
-       "tooltip-pt-mytalk": "আপোনাৰ আলোচনা পৃষ্ঠা",
+       "tooltip-pt-mytalk": "{{GENDER:|আপোনাৰ}} আলোচনা পৃষ্ঠা",
        "tooltip-pt-anontalk": "এই আই.পি. ঠিকনাৰ পৰা কৰা সম্পাদনাসমূহৰ আলোচনা",
-       "tooltip-pt-preferences": "আপোনাৰ পছন্দসমূহ",
+       "tooltip-pt-preferences": "{{GENDER:|আপোনাৰ}} পছন্দসমূহ",
        "tooltip-pt-watchlist": "আপুনি সালসলনিৰ গতিবিধি লক্ষ্য কৰি থকা পৃষ্ঠাসমূহৰ সুচী",
-       "tooltip-pt-mycontris": "আপোনাৰ বৰঙণিৰ তালিকা",
+       "tooltip-pt-mycontris": "{{GENDER:|আপোনাৰ}} বৰঙণিসমূহ",
        "tooltip-pt-login": "বাধ্যতামূলক নহ'লেও প্ৰৱেশ কৰাটো বাঞ্চনীয়",
        "tooltip-pt-logout": "প্ৰস্থান",
        "tooltip-pt-createaccount": "আপোনাক এটা একাউণ্ট সৃষ্টি কৰি প্ৰৱেশ কৰিবলৈ অনুৰোধ জনোৱা হৈছে, কিন্তু এয়া বাধ্যতামূলক নহয়",
        "tooltip-t-recentchangeslinked": "সংযুক্ত পৃষ্ঠাসমূহৰ শেহতীয়া সালসলনিসমূহ",
        "tooltip-feed-rss": "এই পৃষ্ঠাৰ বাবে আৰ-এচ-এচ ভুক্তি",
        "tooltip-feed-atom": "এই পৃষ্ঠাৰ বাবে এটম ভুক্তি",
-       "tooltip-t-contributions": "এই সদস্যজনৰ অৰিহনাসমূহৰ সূচী চাওক",
+       "tooltip-t-contributions": "{{GENDER:$1|এই সদস্যজনৰ}} বৰঙণিসমূহৰ তালিকা চাওক",
        "tooltip-t-emailuser": "এই সদস্যজনলৈ ই-মেইল পঠাওক",
        "tooltip-t-info": "এই পৃষ্ঠাৰ বিষয়ে অধিক তথ্য",
        "tooltip-t-upload": "ফাইল আপল'ডৰ বাবে",
        "htmlform-chosen-placeholder": "এটা বিকল্প বাছনি কৰক",
        "htmlform-cloner-create": "আৰু যোগ কৰক",
        "htmlform-cloner-delete": "আঁতৰাওক",
-       "sqlite-has-fts": "$1 সম্পূৰ্ণ-পাঠ অনুসন্ধান সমৰ্থন সহ",
-       "sqlite-no-fts": "$1 সম্পূৰ্ণ-পাঠ সন্ধান সমৰ্থন অবিহনে",
        "logentry-delete-delete": "$3 পৃষ্ঠাটো $1ৰদ্বাৰা {{GENDER:$2|বিলোপ কৰা হ'ল}}",
        "logentry-delete-restore": "$1-এ $3 পৃষ্ঠাটো {{GENDER:$2|পুনৰ্সংৰক্ষণ কৰিলে}}",
        "logentry-delete-event": "$3: $4 -ত {{PLURAL:$5|এটা লগ ঘটনা|$5 লগ ঘটনাসমূহ}} -ৰ $1 পৰিৱৰ্তন কৰা দৃশ্যমানতা",
        "special-characters-group-khmer": "খেমাৰ",
        "special-characters-title-endash": "en দেছ্‌",
        "special-characters-title-emdash": "em দেছ‌",
-       "special-characters-title-minus": "বিয়োগ চিন",
-       "api-error-blacklisted": "অনুগ্ৰহ কৰি অন্য এটা বৰ্ণনামূলক শিৰোনাম নিৰ্বাচন কৰক"
+       "special-characters-title-minus": "বিয়োগ চিন"
 }
index 9a766c9..78e4779 100644 (file)
@@ -42,7 +42,7 @@
        "tog-enotifminoredits": "Mandame tamién un corréu cuando heba ediciones menores de les páxines y ficheros",
        "tog-enotifrevealaddr": "Amosar la mio direición de corréu nos correos de notificación",
        "tog-shownumberswatching": "Amosar el númberu d'usuarios que tán vixilando la páxina",
-       "tog-oldsig": "Firma esistente:",
+       "tog-oldsig": "La to firma actual:",
        "tog-fancysig": "Tratar la firma como testu wiki (ensin enllaz automáticu)",
        "tog-uselivepreview": "Usar vista previa en tiempu real",
        "tog-forceeditsummary": "Avisame cuando grabe col resume d'edición en blanco",
        "category-file-count-limited": "{{PLURAL:$1El ficheru siguiente ta|Los $1 ficheeros siguientes tán}} na categoría actual.",
        "listingcontinuesabbrev": "cont.",
        "index-category": "Páxines indexaes",
-       "noindex-category": "Páxines non indexaes",
+       "noindex-category": "Páxines sin indexar",
        "broken-file-category": "Páxines con enllaces frañíos a ficheros",
        "about": "Tocante a",
        "article": "Páxina de conteníu",
        "newwindow": "(s'abre nuna ventana nueva)",
        "cancel": "Encaboxar",
        "moredotdotdot": "Más...",
-       "morenotlisted": "Esta llista nun ta completa.",
+       "morenotlisted": "Esta llista puede tar incompleta.",
        "mypage": "Páxina",
        "mytalk": "Alderique",
        "anontalk": "Alderique",
        "talk": "Alderique",
        "views": "Vistes",
        "toolbox": "Ferramientes",
+       "tool-link-userrights": "Cambiar los grupos {{GENDER:$1|del usuariu|de la usuaria}}",
+       "tool-link-emailuser": "Unviar un corréu electrónicu a {{GENDER:$1|esti usuariu|esta usuaria}}",
        "userpage": "Ver la páxina d'usuariu",
        "projectpage": "Ver la páxina del proyeutu",
        "imagepage": "Ver la páxina del ficheru",
        "eauthentsent": "Unvióse un corréu electrónicu de confirmación a la direición indicada.\nEnantes de que s'unvie nengún otru corréu a la cuenta, has de siguir les instrucciones d'esi corréu pa confirmar que la cuenta ye daveres de to.",
        "throttled-mailpassword": "Yá s'unvió un corréu de reaniciu la clave {{PLURAL:$1|na postrer hora|nes postreres $1 hores}}.\nPa evitar abusos, namái s'unviará un corréu de reaniciu cada {{PLURAL:$1|hora|$1 hores}}.",
        "mailerror": "Fallu al unviar el corréu: $1",
-       "acct_creation_throttle_hit": "Los visitantes d'esta wiki qu'usen la to direición IP yá crearon güei {{PLURAL:$1|1 cuenta|$1 cuentes}}, que ye'l máximu almitíu nesti periodu de tiempu.\nPoro, los visitantes qu'usen esta direición IP nun puen crear más cuentes de momentu.",
+       "acct_creation_throttle_hit": "Los visitantes d'esta wiki qu'usen la to direición IP yá crearon {{PLURAL:$1|1 cuenta|$1 cuentes}} nel periodu de $2, que ye'l máximu almitíu nesi tiempu.\nPoro, los visitantes qu'usen esta direición IP nun pueden crear más cuentes pol momentu.",
        "emailauthenticated": "La so direición de corréu electrónicu confirmóse'l $2 a les $3.",
        "emailnotauthenticated": "La so direición de corréu electrónicu inda nun se confirmó.\nNun s'unviará corréu pa nenguna de les funciones siguientes.",
        "noemailprefs": "Conseña una direición de corréu electrónicu nes tos preferencies pa que funcionen eses carauterístiques.",
        "botpasswords-label-resetpassword": "Reestablecer la contraseña",
        "botpasswords-label-grants": "Permisos aplicables:",
        "botpasswords-help-grants": "Cada permisu da accesu a los permisos de usuario llistaos que yá tenga la cuenta. Mira la [[Special:ListGrants|tabla de permisos]] pa más información.",
-       "botpasswords-label-restrictions": "Torgues d'usu:",
        "botpasswords-label-grants-column": "Permitío",
        "botpasswords-bad-appid": "El nome del bot \"$1\" nun ye válidu.",
        "botpasswords-insert-failed": "Nun pudo amestase'l nome de bot «$1». ¿Taba añadíu yá?",
        "botpasswords-updated-body": "Anovóse la contraseña del bot llamáu «$1» del usuariu «$2».",
        "botpasswords-deleted-title": "Desanicióse la contraseña de bot",
        "botpasswords-deleted-body": "Desanicióse la contraseña del bot llamáu «$1» del usuariu «$2».",
-       "botpasswords-newpassword": "La nueva contraseña p'aniciar sesión con strong>$1</strong> ye <strong>$2</strong>. <em>Por favor, rexistra esto pa referencies futures.</em>",
+       "botpasswords-newpassword": "La nueva contraseña p'aniciar sesión con <strong>$1</strong> ye <strong>$2</strong>. <em>Por favor, rexistra esto pa referencies futures.</em> <br> (Pa los bots antiguos que necesiten que'l nome d'aniciu de sesión sía'l mesmu que'l nome d'usuariu, tamién pue usase <strong>$3</strong> como nome d'usuariu y <strong>$4</strong> como contraseña.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider nun ta disponible.",
        "botpasswords-restriction-failed": "Hai torgues de contraseña de bot que torgaron esti aniciu de sesión.",
        "botpasswords-invalid-name": "El nome d'usuariu especificáu nun contien el separador de contraseña de bot («$1»).",
        "passwordreset-emailelement": "Nome d'usuariu: \n$1\n\nContraseña temporal: \n$2",
        "passwordreset-emailsentemail": "Si esta direición de corréu electrónicu ta asociada cola to cuenta, unviaráse un corréu pa reaniciar la contraseña.",
        "passwordreset-emailsentusername": "Si hai una direición de corréu electrónicu asociada con esti nome d'usuariu, unviaráse un corréu electrónicu pa reaniciar la contraseña.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Unvióse'l corréu|Unviáronse los correos}} de reaniciu de contraseña. {{PLURAL:$1|El nome d'usuariu y la contraseña|La llista de nomes d'usuarios y contraseñes}} amuésase de siguío.",
-       "passwordreset-emailerror-capture2": "Nun foi posible mandar un corréu electrónicu {{Gender:$2|al usuariu|a la usuaria}}: $1 {{PLURAL:$3|El nome d'usuariu y la contraseña|La llista de nomes d'usuarios y contraseñes}} amuésase de siguío.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Unvióse'l corréu|Unviáronse los correos}} de reaniciu de contraseña. {{PLURAL:$1|El nome d'usuariu y la contraseña|La llista de nomes d'usuarios y contraseñes}} amuésase equí.",
+       "passwordreset-emailerror-capture2": "Nun pudo unviase un corréu electrónicu {{GENDER:$2|al usuariu|a la usuaria}}: $1 {{PLURAL:$3|El nome d'usuariu y la contraseña|La llista de nomes d'usuarios y contraseñes}} amuésase equí.",
        "passwordreset-nocaller": "Tien d'apurrise un llamador",
        "passwordreset-nosuchcaller": "El llamador nun esiste: $1",
        "passwordreset-ignored": "Nun se llogró'l reaniciu de la contraseña. ¿Seique nun se configuró un proveedor?",
        "invalid-content-data": "Datos del conteníu inválidos",
        "content-not-allowed-here": "El conteníu «$1» nun se permite na páxina [[$2]]",
        "editwarning-warning": "Salir d'esta páxina pue causar la perda de cualesquier cambiu fechu.\nSi anició sesión, pue desactivar esti avisu na seición «{{int:prefs-editing}}» de les preferencies.",
+       "editpage-invalidcontentmodel-title": "El modelu de conteníu nun tien sofitu",
+       "editpage-invalidcontentmodel-text": "El modelu de conteníu «$1»nun tien sofitu.",
        "editpage-notsupportedcontentformat-title": "El formatu del conteníu nun tien sofitu",
        "editpage-notsupportedcontentformat-text": "El formatu del conteníu, $1, nun tien sofitu del modelu de conteníu $2.",
        "content-model-wikitext": "testu wiki",
        "searchprofile-advanced-tooltip": "Buscar nos espacios de nomes personalizaos",
        "search-result-size": "$1 ({{PLURAL:$2|1 pallabra|$2 pallabres}})",
        "search-result-category-size": "{{PLURAL:$1|1 miembru|$1 miembros}} ({{PLURAL:$2|1 subcategoría|$2 subcategories}}, {{PLURAL:$3|1 ficheru|$3 ficheros}})",
-       "search-redirect": "(redireición de $1)",
+       "search-redirect": "(redireición dende $1)",
        "search-section": "(seición $1)",
        "search-category": "(categoría $1)",
        "search-file-match": "(casa col conteníu del ficheru)",
        "upload-dialog-disabled": "Nesta wiki tán desactivaes les xubíes de ficheros por aciu d'esti diálogu.",
        "upload-dialog-title": "Xubir ficheru",
        "upload-dialog-button-cancel": "Encaboxar",
+       "upload-dialog-button-back": "Anterior",
        "upload-dialog-button-done": "Fecho",
        "upload-dialog-button-save": "Guardar",
        "upload-dialog-button-upload": "Xubir",
        "apisandbox-results-fixtoken-fail": "Nun pudo recuperase'l token «$1».",
        "apisandbox-alert-page": "Los campos d'esta páxina nun son válidos.",
        "apisandbox-alert-field": "El valor d'esti campu nun ye válidu.",
+       "apisandbox-continue": "Siguir",
+       "apisandbox-continue-clear": "Llimpiar",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries siguirá] cola última solicitú; {{int:apisandbox-continue-clear}} llimpiará los parámetros rellacionaos con siguir.",
        "booksources": "Fontes de llibros",
        "booksources-search-legend": "Busca de fontes de llibros",
        "booksources-search": "Buscar",
        "movelogpagetext": "Esta ye la llista de páxines treslladaes.",
        "movesubpage": "{{PLURAL:$1|Subpáxina|Subpáxines}}",
        "movesubpagetext": "Esta páxina tien $1 {{PLURAL:$1|subpáxina|subpáxines}} que s'amuesen darréu.",
+       "movesubpagetalktext": "La páxina d'alderique correspondiente tien $1 {{PLURAL:$1|subpáxina|subpáxines}} que {{PLURAL:$1|s'amuesa|s'amuesen}} darréu.",
        "movenosubpage": "Esta páxina nun tien subpáxines.",
        "movereason": "Motivu:",
        "revertmove": "revertir",
        "pageinfo-category-pages": "Númberu de páxines",
        "pageinfo-category-subcats": "Númberu de subcategoríes",
        "pageinfo-category-files": "Númberu de ficheros",
+       "pageinfo-user-id": "ID d'usuariu",
        "markaspatrolleddiff": "Marcar como supervisada",
        "markaspatrolledtext": "Marcar esta páxina como supervisada",
        "markaspatrolledtext-file": "Marcar esta versión del ficheru como patrullada",
        "newimages-showbots": "Ver les xubíes de los bots",
        "newimages-hidepatrolled": "Despintar les entraes patrullaes",
        "noimages": "Nun hai nada que ver.",
+       "gallery-slideshow-toggle": "Intercambiar les miniatures",
        "ilsubmit": "Guetar",
        "bydate": "por fecha",
        "sp-newimages-showfrom": "Amosar los archivos nuevos emprimando dende'l $1 a les $2",
        "tag-filter": "Filtru d'[[Special:Tags|etiquetes]]:",
        "tag-filter-submit": "Peñera",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etiqueta|Etiquetes}}]]: $2)",
+       "tag-mw-contentmodelchange": "cambiu nel modelu de conteníu",
+       "tag-mw-contentmodelchange-description": "Ediciones que [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel camuden el modelu de conteníu] d'una páxina",
        "tags-title": "Etiquetes",
        "tags-intro": "Esta páxina llista les etiquetes coles que'l software pue marcar una edición, y el so significáu.",
        "tags-tag": "Nome d'etiqueta",
        "tags-actions-header": "Aiciones",
        "tags-active-yes": "Sí",
        "tags-active-no": "Non",
-       "tags-source-extension": "Definida por una estensión",
+       "tags-source-extension": "Definío pol software",
        "tags-source-manual": "Aplicada a mano polos usuarios y bots",
        "tags-source-none": "Yá nun s'usa",
        "tags-edit": "editar",
        "htmlform-cloner-create": "Amestar más",
        "htmlform-cloner-delete": "Desaniciar",
        "htmlform-cloner-required": "Necesítase polo menos un valor.",
+       "htmlform-date-placeholder": "AAAA-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "AAAA-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "El valor que disti nun ye una data reconocible. Prueba usando'l formatu AAAA-MM-DD.",
+       "htmlform-time-invalid": "El valor que disti nun ye una hora reconocible. Prueba usando'l formatu HH:MM:SS.",
+       "htmlform-datetime-invalid": "Nun se reconoció la fecha y hora nel formatu proporcionáu. Prueba a usar el formatu AAAA-MM-DD HH:MM:SS.",
+       "htmlform-date-toolow": "El valor que disti ye anterior a la fecha más antigua permitida, $1.",
+       "htmlform-date-toohigh": "El valor especificáu ye posterior a la mayor data permitida, $1.",
+       "htmlform-time-toolow": "El valor qu'especificasti ye anterior a la hora más antigua permitida, $1.",
+       "htmlform-time-toohigh": "El valor qu'especificasti ye posterior a la hora más nueva permitida, $1.",
+       "htmlform-datetime-toolow": "El valor qu'especificasti ye anterior a la fecha y hora más antigua permitida, $1.",
+       "htmlform-datetime-toohigh": "El valor qu'especificasti ye posterior a la fecha y hora más nueva permitida, $1.",
        "htmlform-title-badnamespace": "[[:$1]] nun ta nel espaciu de nomes \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "«$1» nun ye un títulu de páxina que pueda crease",
        "htmlform-title-not-exists": "$1 nun esiste.",
        "htmlform-user-not-exists": "<strong>$1</strong> nun esiste.",
        "htmlform-user-not-valid": "<strong>$1</strong> nun ye un nome d'usuariu válidu.",
-       "sqlite-has-fts": "$1 con sofitu pa busca de testu completu",
-       "sqlite-no-fts": "$1 ensin sofitu pa busca de testu completu",
        "logentry-delete-delete": "$1 {{GENDER:$2|desanició}} la páxina $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|restauró}} la páxina $3",
        "logentry-delete-event": "$1 {{GENDER:$2|camudó}} la visibilidá {{PLURAL:$5|d'un socesu del rexistru|de $5 socesos del rexistru}} en $3: $4",
        "feedback-external-bug-report-button": "Rexistrar una xera técnica",
        "feedback-dialog-title": "Unviar opinión",
        "feedback-dialog-intro": "Puedes usar el formulariu fácil de más abaxo pa unviar comentarios. Estos amestaránse a la páxina «$1», xunto col to nome d'usuariu.",
-       "feedback-error-title": "Error",
        "feedback-error1": "Fallu: Resultáu de la API non reconocíu",
        "feedback-error2": "Fallu: Falló la edición",
        "feedback-error3": "Fallu: Ensin respuesta de la API",
        "feedback-thanks": "¡Gracies! La to opinión s'espublizó na páxina «[$2  $1]».",
        "feedback-thanks-title": "¡Gracies!",
        "feedback-useragent": "Axente d'usuariu:",
-       "searchsuggest-search": "Buscar",
+       "searchsuggest-search": "Buscar en {{SITENAME}}",
        "searchsuggest-containing": "que contien...",
        "api-error-autoblocked": "La to dirección IP bloquióse automáticamente porque la usó un usuariu bloquiáu.",
        "api-error-badaccess-groups": "Nun tienes permisu pa xubir ficheros a esta wiki.",
        "unlinkaccounts-success": "Desenllazóse la cuenta.",
        "authenticationdatachange-ignored": "Nun se xestionó'l cambéu de los datos d'autentificacion. ¿Seique, nun se configuró un fornidor?",
        "userjsispublic": "Atención: les subpáxines JavaScript nun tendríen de contener datos acutaos porque son visibles pa otros usuarios.",
-       "usercssispublic": "Atención: les subpáxines CSS nun tendríen de contener datos acutaos porque son visibles pa otros usuarios."
+       "usercssispublic": "Atención: les subpáxines CSS nun tendríen de contener datos acutaos porque son visibles pa otros usuarios.",
+       "restrictionsfield-badip": "Direición o rangu IP inválidu: $1",
+       "restrictionsfield-label": "Rangos d'IP permitíos:",
+       "restrictionsfield-help": "Una única direición IP o rangu CIDR per llinia. P'activar toos, utiliza<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Error: $1",
+       "edit-error-long": "Errores:\n\n$1"
 }
index add8bea..428dafc 100644 (file)
        "yourpasswordagain": "Parolu təkrar daxil edin:",
        "createacct-yourpasswordagain": "Parolu təsdiqlə",
        "createacct-yourpasswordagain-ph": "Parolu təkrar daxil edin",
-       "remembermypassword": "Məni bu kompyuterdə xatırla (maksimum $1 {{PLURAL:$1|gün|gün}})",
        "userlogin-remembermypassword": "Sistemdə qal",
        "userlogin-signwithsecure": "Etibarlı bağlantıdan istifadə edin",
        "yourdomainname": "Sizin domeniniz:",
        "listgrouprights-addgroup-self-all": "Bütün qrupları öz hesabına əlavə edə bilər",
        "listgrouprights-removegroup-self-all": "Bütün qrupları öz hesabından çıxara bilər",
        "listgrouprights-namespaceprotection-namespace": "Adlar fəzası",
+       "restricted-displaytitle-ignored": "İmtina edilmiş görüntü başlıqlarına malik səhifələr",
        "mailnologin": "Ünvan yoxdur",
        "emailuser": "İstifadəçiyə e-məktub göndər",
        "defemailsubject": "\"$1\" adlı istifadəçidən {{SITENAME}} e-məktubu",
        "htmlform-selectorother-other": "Digər",
        "htmlform-no": "Xeyr",
        "htmlform-yes": "Bəli",
-       "sqlite-has-fts": "$1 tam mətn axtarma ilə",
-       "sqlite-no-fts": "$1 tam mətn axtarma olmadan",
        "logentry-delete-delete": "$1 $3 səhifəsini {{GENDER:$2|sildi}}",
        "logentry-suppress-delete": "$1 $3 səhifəsini {{GENDER:$2|gizlətdi}}",
        "revdelete-content-hid": "gizli mətn",
        "feedback-bugnew": "Mən yoxladım. Yeni xəta barədə xəbər ver",
        "feedback-cancel": "İmtina",
        "feedback-close": "Oldu",
-       "feedback-error-title": "Xəta",
        "feedback-error2": "Xəta: Redaktə qeydə alınmadı",
        "feedback-message": "Mesaj:",
        "feedback-subject": "Mövzu:",
index 1dd05c7..b7466f7 100644 (file)
@@ -26,7 +26,8 @@
                        "Lizalizaufa",
                        "Кутлубаева Кунсулу Закиевна",
                        "Вильданова Гюзель",
-                       "Ilmira"
+                       "Ilmira",
+                       "Irus"
                ]
        },
        "tog-underline": "Һылтанмалар аҫтына һыҙыу:",
        "yourpasswordagain": "Серһүҙҙе ҡабаттан яҙыу",
        "createacct-yourpasswordagain": "Серһүҙҙе раҫлағыҙ",
        "createacct-yourpasswordagain-ph": "Серһүҙҙе тағы бер тапҡыр яҙығыҙ",
-       "remembermypassword": "Был браузерҙа (иң күбендә $1 {{PLURAL:$1|көнгә}}) иҫәп яҙыуым хәтерләнһен",
        "userlogin-remembermypassword": "Системала ҡалырға",
        "userlogin-signwithsecure": "Һаҡланыулы тоташыу",
        "cannotloginnow-title": "Хәҙер үк инеп булмай",
        "botpasswords-label-resetpassword": "Серһүҙҙе ташлатыу",
        "botpasswords-label-grants": "Ҡулланылған рөхсәттәр:",
        "botpasswords-help-grants": "Һәр рөхсәт иҫәп яҙмаһы булған ҡулланыусы хоҡуҡтарын ҡулланырға рөхсәт бирә. Тулыраҡ мәғлүмәт өсөн [[Special:ListGrants|рөхсәт таблицаһын]] ҡарағыҙ.",
-       "botpasswords-label-restrictions": "Ҡулланыуҙы сикләү:",
        "botpasswords-label-grants-column": "Рөхсәт",
        "botpasswords-bad-appid": "$1 исемле робот ярамай.",
        "botpasswords-insert-failed": "$1 исемле роботты өҫтәп булманы. Бәлки өҫтәлгән булғандыр?",
        "undo-failure": "Ара үҙгәртеүҙәр тура килмәү сәбәпле төҙәтеүҙе кире алып булмай.",
        "undo-norev": "Үҙгәртеүҙе кире алып булмай, сөнки юҡ йәки юйылған.",
        "undo-nochange": "Төҙәтеү кире ҡайтарылған.",
-       "undo-summary": "[[Special:Contributions/$2|$2]] ҡулланыусыһының ([[User talk:$2|фекер алышыу]]) $1 үҙгәртеүенән баш тартыу",
+       "undo-summary": "Ҡулланыусы [[Special:Contributions/$2|$2]] ([[User talk:$2|фекер алышыу]]) $1 үҙгәртеүенән баш тартты",
        "undo-summary-username-hidden": "Исеме йәшерелгән ҡатнашыусының төҙәтеүен  $1 кире ҡағыу",
        "cantcreateaccount-text": "Был IP-адрестан (<b>$1</b>) иҫәп яҙыуҙары булдырыу [[User:$3|$3]] тарафынан тыйылған.\n\n$3 белдергән сәбәп: ''$2''",
        "cantcreateaccount-range-text": "{{GENDER:$3|Ҡатнашыусы}} [[User:$3|$3]] һеҙҙең IP-адрес ингән (<strong>$4</strong>) <strong>$1</strong> диапозонында иҫәп яҙмаһын булдырмаҫҡа {{GENDER:$3|тыйыу}} ҡуйҙы.\n\nОшо сәбәп күһәтелгән: $2.",
        "upload-form-label-infoform-categories": "Категориялар",
        "upload-form-label-infoform-date": "Дата",
        "upload-form-label-own-work-message-generic-local": "Тейәлгән файл  {{SITENAME}} лицензия сәйәсәтенә ярашлы икәнен раҫлайым.",
-       "upload-form-label-not-own-work-message-generic-local": "{{SITENAME}} ҡағиҙәләренә ярашлы файлды тейәй алмаһағыҙ, диалог теҙерәһен ябығыҙ ҙа тейәү !с!н башҡа ысулды һайлағыҙ.",
+       "upload-form-label-not-own-work-message-generic-local": "{{SITENAME}} ҡағиҙәләренә ярашлы файлды тейәй алмаһағыҙ, диалог тәҙрәһен ябығыҙ ҙа тейәү өсөн башҡа ысулды һайлағыҙ.",
        "upload-form-label-not-own-work-local-generic-local": "Ошонда эшләп ҡарағыҙ[[Special:Upload|килешеү буйынса тейәү бите]].",
        "upload-form-label-own-work-message-generic-foreign": "Был файлды дөйөм репозиторийға күсереүемде аңлайым. Быны ҡулланыусы килешеүе һәм лицензия сәйәсәтенә ярашлы эшләүемде раҫлайым.",
        "upload-form-label-not-own-work-message-generic-foreign": "{{SITENAME}} ҡағиҙәләренә ярашлы файлды тейәй алмаһағыҙ, диалог теҙерәһен ябығыҙ ҙа тейәү өсөн башҡа ысулды һайлағыҙ.",
        "upload-curl-error28": "Көтөү ваҡыты үтте",
        "upload-curl-error28-text": "\nСайт бигерәк оҙаҡ яуап бирмәй.\nЗинһар, сайттың эшләүен тикшерегеҙ һәм, бер аҙ көткәндән һуң, яңынан ҡабатлап ҡарағыҙ.\nБәлки, һеҙгә сайт бушыраҡ саҡта ҡабатлап ҡарарға кәрәктер.",
        "license": "Рөхсәтнамә:",
-       "license-header": "Рөхсәтнәмә",
+       "license-header": "Рөхсәтнамә",
        "nolicense": "Бер нимә лә һайланмаған",
        "licenses-edit": "Лицензия параметрҙарын үҙгәртергә",
        "license-nopreview": "(Ҡарап сығыу мөмкин түгел)",
        "htmlform-title-not-exists": "$1 юҡ",
        "htmlform-user-not-exists": "<strong>$1</strong> ғәмәлдә юҡ",
        "htmlform-user-not-valid": "<strong>$1</strong> — ярамаған иҫәп яҙмаһы",
-       "sqlite-has-fts": "$1, тулы текст буйынса эҙләү мөмкинлеге менән",
-       "sqlite-no-fts": "$1, тулы текст буйынса эҙләү мөмкинлекһеҙ",
        "logentry-delete-delete": "$1 $3 битен {{GENDER:$2|юйҙы}}",
        "logentry-delete-restore": "$1 $3 битен {{GENDER:$2|тергеҙҙе}}",
        "logentry-delete-event": "$1 журналдағы {{PLURAL:$5|яҙманы}} $3: $4 {{GENDER:$2|үҙгәртте}}",
        "feedback-external-bug-report-button": "Техник эш еберергә",
        "feedback-dialog-title": "Баһалама ебәрергә",
        "feedback-dialog-intro": "Баһалама ебәреү өсөн түбәндәге форманы файҙаланығыҙ. Һеҙҙең исем менән комментарий «$1» битендә буласаҡ.",
-       "feedback-error-title": "Хата",
        "feedback-error1": "Хата: API-нан беленмәгән хата",
        "feedback-error2": "Хата: Мөхәррирләү хатаһы",
        "feedback-error3": "Хата: API-нан яуап юҡ",
        "changecredentials-submit": "Иҫәп мәғлүмәттәрен үҙгәртеү",
        "removecredentials": "Иҫәп мәғлүмәттәрен юйырға",
        "removecredentials-submit": "Иҫәп мәғлүмәттәрен юйырға",
-       "credentialsform-account": "Иҫәп яҙмаһы исеме:"
+       "credentialsform-account": "Иҫәп яҙмаһы исеме:",
+       "edit-error-short": "Хата: $1"
 }
index 03cda16..7077396 100644 (file)
@@ -43,7 +43,7 @@
        "tog-enotifminoredits": "Паведамляць праз электронную пошту таксама пра дробныя зьмены старонак і файлаў",
        "tog-enotifrevealaddr": "Не хаваць мой адрас электроннай пошты ў паведамленьнях",
        "tog-shownumberswatching": "Паказваць колькасьць назіральнікаў",
-       "tog-oldsig": "Цяперашні подпіс:",
+       "tog-oldsig": "Ð\92аÑ\88 Ñ\86яперашні подпіс:",
        "tog-fancysig": "Апрацоўваць подпіс як вікітэкст (без аўтаматычнай спасылкі)",
        "tog-uselivepreview": "Выкарыстоўваць хуткі папярэдні прагляд",
        "tog-forceeditsummary": "Папярэджваць пра адсутнасьць кароткага апісаньня зьменаў",
        "newwindow": "(адкрываецца ў новым акне)",
        "cancel": "Скасаваць",
        "moredotdotdot": "Далей…",
-       "morenotlisted": "Гэта ня поўны сьпіс.",
+       "morenotlisted": "Гэты сьпіс можа быць няпоўным.",
        "mypage": "Старонка",
        "mytalk": "Гутаркі",
        "anontalk": "Гутаркі",
        "talk": "Абмеркаваньне",
        "views": "Рэжымы",
        "toolbox": "Інструмэнты",
+       "tool-link-userrights": "Зьмяніць групы {{GENDER:$1|ўдзельніка|ўдзельніцы}}",
+       "tool-link-emailuser": "Даслаць {{GENDER:$1|удзельніку|удзельніцы}} ліст электроннай поштай",
        "userpage": "Паказаць старонку ўдзельніка",
        "projectpage": "Паказаць старонку праекту",
        "imagepage": "Паказаць старонку файла",
        "eauthentsent": "Пацьверджаньне было дасланае на пазначаны адрас электроннай пошты.\nУ лісьце ўтрымліваюцца інструкцыі, па выкананьні якіх Вы зможаце пацьвердзіць, што адрас сапраўды належыць Вам, і на гэты адрас будзе дасылацца пошта адсюль.",
        "throttled-mailpassword": "Ліст пра скіданьне паролю ўжо быў дасланы за $1 {{PLURAL:$1|апошнюю гадзіну|апошнія гадзіны|апошніх гадзінаў}}.\nКаб пазьбегнуць злоўжываньняў напамін будзе дасылацца не часьцей як аднойчы за $1 {{PLURAL:$1|гадзіну|гадзіны|гадзінаў}}.",
        "mailerror": "Памылка пры адпраўцы электроннай пошты: $1",
-       "acct_creation_throttle_hit": "Ð\9dаведвалÑ\8cнÑ\96кÑ\96 Ð³Ñ\8dÑ\82ай Ð²Ñ\96кÑ\96, Ñ\8fкÑ\96Ñ\8f ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\96Ñ\81Ñ\8f Ð\92аÑ\88Ñ\8bм Ð\86Р-адÑ\80аÑ\81ам, Ñ\83жо Ñ\81Ñ\82ваÑ\80Ñ\8bлÑ\96 $1 {{PLURAL:$1|Ñ\80аÑ\85Ñ\83нак Ñ\83\80аÑ\85Ñ\83нкÑ\96 Ñ\9e\80аÑ\85Ñ\83нкаÑ\9e Ñ\83}} Ð°Ð¿Ð¾Ñ\88нÑ\96Ñ\8f Ð´Ð½Ñ\96, Ñ\88Ñ\82о Ð¿ÐµÑ\80авÑ\8bÑ\88ае Ð¼Ð°ÐºÑ\81Ñ\8bмалÑ\8cнÑ\83Ñ\8e Ð´Ð°Ð·Ð²Ð¾Ð»ÐµÐ½Ñ\83Ñ\8e ÐºÐ¾Ð»Ñ\8cкаÑ\81Ñ\8cÑ\86Ñ\8c Ð·Ð° Ð³Ñ\8dÑ\82Ñ\8b Ð¿Ñ\8dÑ\80Ñ\8bÑ\8fд.\nУ Ð²Ñ\8bнÑ\96кÑ\83, Ð½Ð°Ð²ÐµÐ´Ð²Ð°Ð»Ñ\8cнÑ\96кÑ\96, Ñ\8fкÑ\96Ñ\8f ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82аÑ\8eÑ\86Ñ\86а Ð³Ñ\8dÑ\82Ñ\8bм Ð\86Р-адÑ\80аÑ\81ам, Ð½Ñ\8f Ð¼Ð¾Ð³Ñ\83Ñ\86Ñ\8c Ñ\81Ñ\82ваÑ\80Ñ\8bÑ\86Ñ\8c Ð·Ð°Ñ\80аз Ð±Ð¾Ð»ÐµÐ¹ Ñ\80аÑ\85Ñ\83нкаÑ\9e.",
+       "acct_creation_throttle_hit": "Ð\9dаведнÑ\96кÑ\96 Ð³Ñ\8dÑ\82ай Ð²Ñ\96кÑ\96, Ñ\8fкÑ\96Ñ\8f ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\96Ñ\81Ñ\8f Ð\92аÑ\88Ñ\8bм Ð\86Р-адÑ\80аÑ\81ам, Ñ\83жо Ñ\81Ñ\82ваÑ\80Ñ\8bлÑ\96 $1 {{PLURAL:$1|Ñ\80аÑ\85Ñ\83нак|Ñ\80аÑ\85Ñ\83нкÑ\96\80аÑ\85Ñ\83нкаÑ\9e}} Ð·Ð° $2, Ñ\88Ñ\82о Ð¿ÐµÑ\80авÑ\8bÑ\88ае Ð¼Ð°ÐºÑ\81Ñ\8bмалÑ\8cнÑ\83Ñ\8e Ð´Ð°Ð·Ð²Ð¾Ð»ÐµÐ½Ñ\83Ñ\8e ÐºÐ¾Ð»Ñ\8cкаÑ\81Ñ\8cÑ\86Ñ\8c Ð·Ð° Ð³Ñ\8dÑ\82Ñ\8b Ð¿Ñ\8dÑ\80Ñ\8bÑ\8fд.\nУ Ð²Ñ\8bнÑ\96кÑ\83, Ð½Ð°Ð²ÐµÐ´Ð½Ñ\96кÑ\96, Ñ\8fкÑ\96Ñ\8f ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82аÑ\8eÑ\86Ñ\86а Ð³Ñ\8dÑ\82Ñ\8bм Ð\86Р-адÑ\80аÑ\81ам, Ð¿Ð°ÐºÑ\83лÑ\8c Ð½Ñ\8f Ð¼Ð¾Ð³Ñ\83Ñ\86Ñ\8c Ñ\81Ñ\82ваÑ\80аÑ\86Ñ\8c Ñ\80аÑ\85Ñ\83нкÑ\96.",
        "emailauthenticated": "Ваш адрас электроннай пошты быў пацьверджаны $2 у $3.",
        "emailnotauthenticated": "Ваш адрас электроннай пошты яшчэ не пацьверджаны.\nЛісты электроннай поштай для наступных магчымасьцяў дасылацца ня будуць.",
        "noemailprefs": "Пазначце адрас электроннай пошты ў Вашых наладах, каб актывізаваць гэтыя магчымасьці.",
        "botpasswords-label-resetpassword": "Скінуць пароль",
        "botpasswords-label-grants": "Прыдатныя дазволы:",
        "botpasswords-help-grants": "Кожны дазвол дае доступ да правоў удзельніка, якія ўжо мае рахунак удзельніка. Глядзіце [[Special:ListGrants|табліцу дазволаў]] дзеля дадатковых зьвестак.",
-       "botpasswords-label-restrictions": "Абмежаваньні на выкарыстаньне:",
        "botpasswords-label-grants-column": "Дазволена",
        "botpasswords-bad-appid": "Назва робата «$1» зьяўляецца няслушнай.",
        "botpasswords-insert-failed": "Не атрымалася дадаць робата зь імем «$1». Магчыма, ён ужо быў дададзены?",
        "passwordreset-emailelement": "Імя ўдзельніка: \n$1\n\nЧасовы пароль: \n$2",
        "passwordreset-emailsentemail": "Калі гэты адрас электроннай пошты далучаны да вашага рахунку, тады будзе дасланы ліст пра скідваньне паролю.",
        "passwordreset-emailsentusername": "Калі ёсьць адрас электроннай пошты, злучаны з гэтым імем удзельніка, тады будзе дасланы ліст пра скідваньне паролю.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Электронны ліст|Электронныя лісты}} скіданьня паролю {{PLURAL:$1|быў дасланы|былі дасланыя}}. {{PLURAL:$1|Імя ўдзельніка і пароль|Сьпіс імёнаў удзельнікаў і паролі}} паказаныя ніжэй.",
-       "passwordreset-emailerror-capture2": "Не атрымалася даслаць {{GENDER:$2|удзельніку|удзельніцы}} ліст электроннай поштай: $1 {{PLURAL:$3|Імя ўдзельніка і пароль|Сьпіс імёнаў удзельнікаў і паролі}} паказаныя ніжэй.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|1=Электронны ліст|Электронныя лісты}} скіданьня паролю {{PLURAL:$1|1=быў дасланы|былі дасланыя}}. {{PLURAL:$1|1=Імя ўдзельніка і пароль|Сьпіс імёнаў удзельнікаў і паролі}} паказаныя тут.",
+       "passwordreset-emailerror-capture2": "Не атрымалася даслаць {{GENDER:$2|удзельніку|удзельніцы}} ліст электроннай поштай: $1 {{PLURAL:$3|1=Імя ўдзельніка і пароль|Сьпіс імёнаў удзельнікаў і паролі}} паказаныя тут.",
        "passwordreset-nocaller": "Мусіць быць пададзены той, хто робіць выклік",
        "passwordreset-nosuchcaller": "Аўтар выкліку не існуе: $1",
        "passwordreset-ignored": "Скіданьне паролю не адбылося. Магчыма, ня быў наладжаны пастаўшчык?",
        "changeemail-submit": "Зьмяніць адрас электроннай пошты",
        "changeemail-throttled": "Вы зрабілі зашмат спробаў увайсьці ў сыстэму.\nКалі ласка, пачакайце $1 перад наступнай спробай.",
        "changeemail-nochange": "Калі ласка, увядзіце іншы новы адрас электроннай пошты",
-       "resettokens": "СкÑ\96дванÑ\8cне Ñ\82окенаÑ\9e",
-       "resettokens-text": "Тут вы можаце скінуць токены, якія даюць вамд доступ да пэўных прыватных зьвестак, асацыяваных з вашым рахункам.\n\nКалі вы выпадкова падзяліліся токенамі зь іншымі, або калі ваш рахунак быў скампрамэтаваны, скарыстайцеся гэтай магчымасьцю і скіньце токены.",
-       "resettokens-no-tokens": "Ð\9dÑ\8fма Ñ\88Ñ\82о Ñ\81кÑ\96даÑ\86Ñ\8c.",
+       "resettokens": "Скіданьне токенаў",
+       "resettokens-text": "Тут вы можаце скінуць токены, якія даюць вам доступ да пэўных прыватных зьвестак, асацыяваных з вашым рахункам.\n\nКалі вы выпадкова падзяліліся токенамі зь іншымі, або калі ваш рахунак быў скампрамэтаваны, скарыстайцеся гэтай магчымасьцю і скіньце токены.",
+       "resettokens-no-tokens": "Ð\9dÑ\8fма Ñ\82окенаÑ\9e Ð´Ð»Ñ\8f Ñ\81кÑ\96данÑ\8cнÑ\8f.",
        "resettokens-tokens": "Токены:",
-       "resettokens-token-label": "$1 (бягучае значэньне: $2)",
+       "resettokens-token-label": "$1 (цяперашняе значэньне: $2)",
        "resettokens-watchlist-token": "Токен стужкі (Atom/RSS) [[Special:Watchlist|зьменаў у вашым сьпісе назіраньня]]",
        "resettokens-done": "Токены скінутыя.",
        "resettokens-resetbutton": "Скінуць вылучаныя токены",
        "showdiff": "Паказаць зьмены",
        "blankarticle": "<strong>Папярэджаньне:</strong> вы ствараеце пустую старонку.\nКалі вы націсьніце «{{int:savearticle}}» яшчэ раз, старонка будзе створаная без аніякага зьместу.",
        "anoneditwarning": "<strong>Папярэджаньне</strong>: вы не ўвайшлі ў сыстэму. Ваш IP-адрас будзе бачны ўсім, калі вы адрэдагуеце старонку. Калі вы <strong>[$1 ўвойдзеце]</strong> або <strong>[$2 створыце рахунак]</strong>, вашыя рэдагаваньні будуць зьвязаныя з вашым імем карыстальніка, а таксама вам будуць даступныя дадатковыя перавагі.",
-       "anonpreviewwarning": "''Вы не ўвайшлі ў сыстэму. Падчас захаваньня Ваш IP-адрас будзе дададзены ў гісторыю рэдагаваньняў старонкі.''",
+       "anonpreviewwarning": "<em>Вы не ўвайшлі ў сыстэму. Па захаваньні старонкі ваш IP-адрас будзе дададзены ў яе гісторыю рэдагаваньняў.</em>",
        "missingsummary": "'''Напамін:''' Вы не пазначылі кароткае апісаньне зьменаў.\nКалі Вы націсьніце кнопку «Запісаць» яшчэ раз, Вашае рэдагаваньне будзе запісанае без апісаньня.",
        "selfredirect": "<strong>Папярэджаньне:</strong> вы перанакіроўваеце старонку саму на сябе.\nМагчыма, вы пазначылі няслушную старонку для перанакіраваньня або вы рэдагуеце ня тую старонку.\nКалі вы націсьніце «{{int:savearticle}}» яшчэ раз, перанакіраваньне будзе створанае.",
        "missingcommenttext": "Калі ласка, увядзіце камэнтар ніжэй.",
        "subject-preview": "Папярэдні прагляд загалоўку:",
        "previewerrortext": "Адбылася памылка пры спробе папярэдняга прагляду вашых зьменаў.",
        "blockedtitle": "Удзельнік заблякаваны",
-       "blockedtext": "'''Ваш рахунак ўдзельніка ці IP-адрас быў заблякаваны.'''\n\nБлякаваньне выканаў $1.\nПрычына гэтага: ''$2''.\n\n* Пачатак блякаваньня: $8\n* Сканчэньне блякаваньня: $6\n* Быў заблякаваны: $7\n\nВы можаце скантактавацца з $1 ці адным зь іншых [[{{MediaWiki:Grouppage-sysop}}|адміністратараў]], каб абмеркаваць блякаваньне. Заўважце, што Вы ня зможаце ўжыць магчымасьць «даслаць ліст па электроннай пошце», пакуль не пазначыце сапраўдны адрас электроннай пошты ў Вашых [[Special:Preferences|наладах]], і калі гэта Вам не было забаронена.\nВаш IP-адрас — $3, ідэнтыфікатар блякаваньня — #$5.\nКалі ласка, улучайце ўсю вышэйпададзеную інфармацыю ва ўсе запыты, што Вы будзеце рабіць.",
-       "autoblockedtext": "Ваш IP-адрас быў аўтаматычна заблякаваны, таму што ён ужываўся іншым удзельнікам, які быў заблякаваны $1.\nПрычына гэтага:\n\n:''$2''\n\n* Блякаваньне пачалося: $8\n* Блякаваньне скончыцца: $6\n* Быў заблякаваны: $7\n\nВы можаце скантактавацца з $1 ці з адным зь іншых [[{{MediaWiki:Grouppage-sysop}}|адміністратараў]], каб абмеркаваць блякаваньне.\n\nЗаўважце, што Вы ня зможаце ужываць магчымасьць «даслаць ліст праз электронную пошту», пакуль ня будзе пазначаны дзейны адрас электроннай пошты ў Вашых [[Special:Preferences|наладах удзельніка]], і калі гэта Вам не было забаронена.\n\nВаш цяперашні IP-адрас — $3, ідэнтыфікатар блякаваньня — #$5.\nКалі ласка, улучайце ўсю вышэйпададзеную інфармацыю ва ўсе запыты, што Вы будзеце рабіць.",
+       "blockedtext": "<strong>Ваш рахунак удзельніка ці IP-адрас быў заблякаваны.</strong>\n\nБлякаваньне выканаў $1.\nПрычына гэтага: <em>$2</em>.\n\n* Пачатак блякаваньня: $8\n* Сканчэньне блякаваньня: $6\n* Быў заблякаваны: $7\n\nВы можаце скантактавацца з $1 ці адным зь іншых [[{{MediaWiki:Grouppage-sysop}}|адміністратараў]], каб абмеркаваць блякаваньне. Заўважце, што Вы ня зможаце ўжыць магчымасьць «даслаць ліст па электроннай пошце», пакуль не пазначыце сапраўдны адрас электроннай пошты ў Вашых [[Special:Preferences|наладах]], і калі гэта Вам не было забаронена.\nВаш IP-адрас — $3, ідэнтыфікатар блякаваньня — #$5.\nКалі ласка, улучайце ўсю вышэйпададзеную інфармацыю ва ўсе запыты, што Вы будзеце рабіць.",
+       "autoblockedtext": "Ваш IP-адрас быў аўтаматычна заблякаваны, таму што ён ужываўся іншым удзельнікам, які быў заблякаваны $1.\nПрычына гэтага:\n\n:<em>$2</em>\n\n* Блякаваньне пачалося: $8\n* Блякаваньне скончыцца: $6\n* Быў заблякаваны: $7\n\nВы можаце скантактавацца з $1 ці з адным зь іншых [[{{MediaWiki:Grouppage-sysop}}|адміністратараў]], каб абмеркаваць блякаваньне.\n\nЗаўважце, што Вы ня зможаце ўжываць магчымасьць «даслаць ліст праз электронную пошту», пакуль ня будзе пазначаны дзейны адрас электроннай пошты ў Вашых [[Special:Preferences|наладах удзельніка]], і калі гэта Вам не было забаронена.\n\nВаш цяперашні IP-адрас — $3, ідэнтыфікатар блякаваньня — #$5.\nКалі ласка, улучайце ўсю вышэйпададзеную інфармацыю ва ўсе запыты, што Вы будзеце рабіць.",
        "blockednoreason": "прычына не пазначана",
        "whitelistedittext": "Вам трэба $1, каб рэдагаваць старонкі.",
        "confirmedittext": "Вы мусіце пацьвердзіць Ваш адрас электроннай пошты перад рэдагаваньнем старонак. Калі ласка, пазначце і пацьвердзіце адрас электроннай пошты праз Вашы [[Special:Preferences|налады]].",
        "nosuchsectiontitle": "Немагчыма знайсьці сэкцыю",
-       "nosuchsectiontext": "Вы спрабуеце рэдагаваць сэкцыю, якой не існуе.\nЯна магла быць перанесена, альбо выдалена пад час Вашага прагляду старонкі.",
+       "nosuchsectiontext": "Вы спрабавалі рэдагаваць сэкцыю, якой не існуе.\nЯна магла быць перанесеная альбо выдаленая, пакуль вы праглядалі старонку.",
        "loginreqtitle": "Патрабуецца ўваход у сыстэму",
        "loginreqlink": "ўвайсьці",
        "loginreqpagetext": "Вы мусіце $1, каб праглядаць іншыя старонкі.",
-       "accmailtitle": "Пароль адасланы.",
-       "accmailtext": "СÑ\82воÑ\80анÑ\8b Ð°Ð´Ð²Ð¾Ð»Ñ\8cнÑ\8b Ð¿Ð°Ñ\80олÑ\8c Ð´Ð»Ñ\8f [[User talk:$1|$1]] Ð±Ñ\8bÑ\9e Ð°Ð´Ð°Ñ\81ланÑ\8b Ð¿Ð° Ð°Ð´Ñ\80аÑ\81е $2. Ð¯Ð³Ð¾ Ð¼Ð¾Ð¶Ð½Ð° Ð·Ñ\8cмÑ\8fнÑ\96Ñ\86Ñ\8c Ð½Ð° Ñ\81Ñ\82аÑ\80онÑ\86Ñ\8b ''[[Special:ChangePassword|зÑ\8cменÑ\8b Ð¿Ð°Ñ\80олÑ\8e]]'' пасьля ўваходу.",
+       "accmailtitle": "Пароль адасланы",
+       "accmailtext": "Ð\92Ñ\8bпадковÑ\8b Ð¿Ð°Ñ\80олÑ\8c Ð´Ð»Ñ\8f [[User talk:$1|$1]] Ð±Ñ\8bÑ\9e Ð°Ð´Ð°Ñ\81ланÑ\8b Ð¿Ð° Ð°Ð´Ñ\80аÑ\81е $2. Ð¯Ð³Ð¾ Ð¼Ð¾Ð¶Ð½Ð° Ð·Ñ\8cмÑ\8fнÑ\96Ñ\86Ñ\8c Ð½Ð° Ñ\81Ñ\82аÑ\80онÑ\86Ñ\8b <em>[[Special:ChangePassword|зÑ\8cменÑ\8b Ð¿Ð°Ñ\80олÑ\8e]]</em> пасьля ўваходу.",
        "newarticle": "(Новая)",
        "newarticletext": "Вы прыйшлі па спасылцы на старонку, якая яшчэ не існуе.\nКаб стварыць яе, напішыце тэкст у полі ніжэй (глядзіце [$1 старонку дапамогі] для дадатковай інфармацыі).\nКалі Вы трапілі сюды памылкова, націсьніце кнопку «<strong>назад</strong>» у вашым браўзэры.",
        "anontalkpagetext": "----\n<em>Гэта старонка гутарак ананімнага ўдзельніка, які яшчэ не стварыў сабе рахунак альбо не ўжывае яго.</em>\nТаму мы вымушаныя ўжываць лічбавы IP-адрас дзеля ягонай ідэнтыфікацыі. Адзін IP-адрас можа выкарыстоўвацца некалькімі ўдзельнікамі. Калі Вы — ананімны ўдзельнік і лічыце, што атрымалі не прызначаныя Вам камэнтары, калі ласка, [[Special:CreateAccount|стварыце рахунак]] альбо [[Special:UserLogin|ўвайдзіце ў сыстэму]], каб у будучыні пазьбегнуць магчымай блытаніны зь іншымі ананімнымі ўдзельнікамі.",
        "noarticletext": "Цяпер тэкст на гэтай старонцы адсутнічае.\nВы можаце [[Special:Search/{{PAGENAME}}|пашукаць гэтую назву]] сярод іншых старонак, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} пашукаць у адпаведных журналах падзеяў]\nальбо [{{fullurl:{{FULLPAGENAME}}|action=edit}} стварыць гэтую старонку]</span>.",
        "noarticletext-nopermission": "Цяпер на гэтай старонцы тэкст адсутнічае.\nВы можаце [[Special:Search/{{PAGENAME}}|пашукаць назву гэтай старонкі]] на іншых старонках, альбо <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} пашукаць зьвязаныя запісы ў журналах]</span>, але ў вас няма дазволу ствараць гэтую старонку.",
-       "missing-revision": "Вэрсія старонкі №$1 з назвай «{{FULLPAGENAME}}» не існуе.\n\nЗвычайна гэта здараецца з-за перахода па састарэлай спасылцы на старонку, якая была выдаленая.\nПадрабязнасьці можна знайсьці ў [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} журнале выдаленьняў].",
-       "userpage-userdoesnotexist": "Рахунак удзельніка «<nowiki>$1</nowiki>» не зарэгістраваны. Калі ласка, удакладніце, ці жадаеце Вы стварыць/рэдагаваць гэтую старонку.",
+       "missing-revision": "Вэрсія старонкі №$1 з назвай «{{FULLPAGENAME}}» не існуе.\n\nЗвычайна гэта здараецца з-за пераходу па састарэлай спасылцы на старонку, якая была выдаленая.\nПадрабязнасьці можна знайсьці ў [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} журнале выдаленьняў].",
+       "userpage-userdoesnotexist": "Рахунак удзельніка «$1» не зарэгістраваны. Калі ласка, удакладніце, ці жадаеце Вы стварыць/рэдагаваць гэтую старонку.",
        "userpage-userdoesnotexist-view": "Рахунак «$1» ня створаны.",
        "blocked-notice-logextract": "Гэты ўдзельнік у дадзены момант заблякаваны.\nАпошні запіс з журналу блякаваньняў пададзены ніжэй для даведкі:",
        "clearyourcache": "<strong>Заўвага:</strong> каб пабачыць зьмены пасьля захаваньня, Вам можа спатрэбіцца ачысьціць кэш Вашага браўзэра. \n* <strong>Firefox / Safari:</strong> трымайце <em>Shift</em> і націсьніце <em>Reload</em>, ці націсьніце <em>Ctrl-F5</em> ці <em>Ctrl-R</em> (<em>⌘-R</em> на Mac)\n* <strong>Google Chrome:</strong> націсьніце <em>Ctrl-Shift-R</em> (<em>⌘-Shift-R</em> на Mac)\n* <strong>Internet Explorer:</strong> трымайце <em>Ctrl</em> і націсьніце <em>Refresh</em>, ці націсьніце <em>Ctrl-F5</em>\n* <strong>Opera:</strong> перайдзіце ў <em>Menu → Settings</em> (<em>Opera → Preferences</em> на Mac), а потым у <em>Privacy & security → Clear browsing data → Cached images and files</em>.",
        "invalid-content-data": "Няслушныя зьвесткі",
        "content-not-allowed-here": "Зьмест тыпу «$1» на старонцы [[$2]] не дазволены",
        "editwarning-warning": "Пакінуўшы гэтую старонку, вы можаце страціць усе ўнесеныя зьмены.\nКалі вы ўвайшлі ў сыстэму, Вы можаце адключыць гэтае папярэджаньне ў сэкцыі «{{int:prefs-editing}}» вашых наладаў.",
+       "editpage-invalidcontentmodel-title": "Мадэль зьместу не падтрымліваецца",
+       "editpage-invalidcontentmodel-text": "Мадэль зьместу «$1» не падтрымліваецца.",
        "editpage-notsupportedcontentformat-title": "Фармат зьмесьціва не падтрымліваецца",
        "editpage-notsupportedcontentformat-text": "Фармат зьмесьціва $1 не падтрымліваецца мадэльлю зьмесьціва $2.",
        "content-model-wikitext": "вікі-тэкст",
        "upload-dialog-disabled": "Загрузка файлаў з дапамогай гэтага дыялёгу адключаная ў гэтай вікі.",
        "upload-dialog-title": "Загрузка файла",
        "upload-dialog-button-cancel": "Адмяніць",
+       "upload-dialog-button-back": "Назад",
        "upload-dialog-button-done": "Зроблена",
        "upload-dialog-button-save": "Захаваць",
        "upload-dialog-button-upload": "Загрузіць",
        "apisandbox-results-fixtoken-fail": "Памылка пры атрыманьні токену «$1».",
        "apisandbox-alert-page": "Палі на гэтай старонцы няслушныя.",
        "apisandbox-alert-field": "Значэньне гэтага поля зьяўляецца няслушным.",
+       "apisandbox-continue": "Працягнуць",
+       "apisandbox-continue-clear": "Ачысьціць",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries працягне] апошні запыт; {{int:apisandbox-continue-clear}} ачысьціць парамэтры, зьвязаныя з працягам.",
        "booksources": "Крыніцы кніг",
        "booksources-search-legend": "Пошук кніг",
        "booksources-isbn": "ISBN:",
        "newimages-showbots": "Паказаць загружаныя робатамі",
        "newimages-hidepatrolled": "Схаваць патруляваныя загрузкі",
        "noimages": "Выявы адсутнічаюць.",
+       "gallery-slideshow-toggle": "Пераключыць мініятуры",
        "ilsubmit": "Шукаць",
        "bydate": "па даце",
        "sp-newimages-showfrom": "Паказаць новыя файлы, загружаныя пазьней за $2, $1",
        "notificationemail_subject_changed": "Адрас электроннай пошты на сайце {{SITENAME}} быў зьменены",
        "notificationemail_subject_removed": "Адрас электроннай пошты на сайце {{SITENAME}} быў выдалены",
        "notificationemail_body_changed": "Некім, магчыма вамі, з IP-адрасу $1,\nбыў зьменены адрас электроннай пошты «$2» на «$3» на сайце {{SITENAME}}.\n\nКалі гэта былі ня вы, неадкладна зьвяжыцеся з адміністратарам.",
+       "notificationemail_body_removed": "Некім, магчыма вамі, з IP-адрасу $1,\nбыў выдалены адрас электроннай пошты з рахунку «$2» на сайце {{SITENAME}}.\n\nКалі гэта былі ня вы, неадкладна зьвяжыцеся з адміністратарам.",
        "scarytranscludedisabled": "[Улучэньне інтэрвікі было адключанае]",
        "scarytranscludefailed": "[Памылка атрыманьня шаблёну $1]",
        "scarytranscludefailed-httpstatus": "[Памылка атрыманьня шаблёну $1: HTTP $2]",
        "tag-filter": "Фільтар [[Special:Tags|метак]]:",
        "tag-filter-submit": "Фільтар",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|1=Метка|Меткі}}]]: $2)",
+       "tag-mw-contentmodelchange": "зьмена мадэлі зьместу",
+       "tag-mw-contentmodelchange-description": "Рэдагаваньні, якія [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel зьмяняюць мадэль зьместу] старонкі",
        "tags-title": "Меткі",
        "tags-intro": "На гэтай старонцы знаходзіцца сьпіс метак, якімі праграмнае забесьпячэньне можа пазначыць рэдагаваньне, і іх значэньне.",
        "tags-tag": "Назва меткі",
        "tags-actions-header": "Дзеяньні",
        "tags-active-yes": "Так",
        "tags-active-no": "Не",
-       "tags-source-extension": "Вызначаецца пашырэньнем",
+       "tags-source-extension": "Вызначаецца праграмным забесьпячэньнем",
        "tags-source-manual": "Ставіцца ўручную ўдзельнікамі і робатамі",
        "tags-source-none": "Больш не выкарыстоўваецца",
        "tags-edit": "рэдагаваць",
        "htmlform-cloner-create": "Дадаць больш",
        "htmlform-cloner-delete": "Выдаліць",
        "htmlform-cloner-required": "Патрабуецца як мінімум яшчэ адно значэньне.",
+       "htmlform-date-placeholder": "ГГГГ-ММ-ДД",
+       "htmlform-time-placeholder": "ГГ:ХХ:СС",
+       "htmlform-datetime-placeholder": "ГГГГ-ММ-ДД ГГ:ХХ:СС",
+       "htmlform-date-invalid": "Уведзенае вамі значэньне не зьяўляецца датай. Паспрабуйце ўжыць фармат ГГГГ-ММ-ДД.",
+       "htmlform-time-invalid": "Уведзенае вамі значэньне не зьяўляецца часам. Паспрабуйце ўжыць фармат ГГ:ХХ:СС.",
+       "htmlform-datetime-invalid": "Уведзенае вамі значэньне не зьяўляецца датай і часам. Паспрабуйце ўжыць фармат ГГГГ-ММ-ДД ГГ:ХХ:СС.",
+       "htmlform-date-toolow": "Уведзенае вамі значэньне меней за самую раньнюю дазволеную дату $1.",
+       "htmlform-date-toohigh": "Значэньне, якое вы выбралі, болей за самую позьнюю дазволеную дату $1.",
+       "htmlform-time-toolow": "Значэньне, якое вы выбралі, меней за самы раньні дазволены час $1.",
+       "htmlform-time-toohigh": "Значэньне, якое вы выбралі, болей за самы позьні дазволены час $1.",
+       "htmlform-datetime-toolow": "Значэньне, якое вы выбралі, меней за самую раньнюю дазволеную дату і час $1.",
+       "htmlform-datetime-toohigh": "Значэньне, якое вы выбралі, болей за найпазьнейшую дазволеную дату і час $1.",
        "htmlform-title-badnamespace": "[[:$1]] знаходзіцца не ў прасторы назваў «{{ns:$2}}».",
        "htmlform-title-not-creatable": "«$1» — немагчымы загаловак для старонкі",
        "htmlform-title-not-exists": "$1 не існуе.",
        "htmlform-user-not-exists": "<strong>$1</strong> не існуе.",
        "htmlform-user-not-valid": "<strong>$1</strong> — некарэктнае імя карыстальніка.",
-       "sqlite-has-fts": "$1 з падтрымкай поўнатэкстнага пошуку",
-       "sqlite-no-fts": "$1 без падтрымкі поўнатэкстнага пошуку",
        "logentry-delete-delete": "$1 {{GENDER:$2|выдаліў|выдаліла}} старонку $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|аднавіў|аднавіла}} старонку $3",
        "logentry-delete-event": "$1 {{GENDER:$2|зьмяніў|зьмяніла}} бачнасьць $5 {{PLURAL:$5|1=падзеі ў журнале|падзеяў у журнале}} на $3: $4",
        "feedback-external-bug-report-button": "Аформіць тэхнічную задачу",
        "feedback-dialog-title": "Адаслаць водгук",
        "feedback-dialog-intro": "Свой водгук Вы можаце адаслаць праз простую форму зьнізу. Ваш камэнтар будзе дададзены на старонку «$1» разам з Вашым іменем.",
-       "feedback-error-title": "Памылка",
        "feedback-error1": "Памылка: невядомы вынік з API",
        "feedback-error2": "Памылка рэдагаваньня",
        "feedback-error3": "Памылка: няма адказу ад API",
        "feedback-thanks": "Дзякуй! Ваш водгук быў разьмешчаны на старонцы «[$2 $1]».",
        "feedback-thanks-title": "Дзякуй!",
        "feedback-useragent": "Агент удзельніка:",
-       "searchsuggest-search": "Пошук",
+       "searchsuggest-search": "Пошук у {{GRAMMAR:месны|{{SITENAME}}}}",
        "searchsuggest-containing": "утрымлівае...",
        "api-error-autoblocked": "Ваш IP-адрас быў аўтаматычна заблякаваны, бо ён быў выкарыстаны заблякаваным удзельнікам.",
        "api-error-badaccess-groups": "У Вас няма дазволу загружаць файлы ў гэтую вікі.",
        "sessionprovider-nocookies": "Файлы-кукі могуць быць адключаныя. Упэўніцеся, што ў вас уключаныя файлы-кукі і пачніце спачатку.",
        "randomrootpage": "Выпадковая карэнная старонка",
        "log-action-filter-block": "Тып блякаваньня:",
+       "log-action-filter-contentmodel": "Тып мадыфікацыі contentmodel:",
        "log-action-filter-delete": "Тып выдаленьня:",
        "log-action-filter-import": "Тып імпарту:",
+       "log-action-filter-managetags": "Тып дзеяньня кіраваньня меткамі:",
        "log-action-filter-move": "Тып пераносу:",
+       "log-action-filter-newusers": "Тып стварэньня рахунку:",
+       "log-action-filter-patrol": "Тып патруляваньня:",
+       "log-action-filter-protect": "Тып абароны:",
+       "log-action-filter-rights": "Тып зьмены правоў:",
+       "log-action-filter-suppress": "Тып хаваньня:",
+       "log-action-filter-upload": "Тып загрузкі:",
        "log-action-filter-all": "Усе",
        "log-action-filter-block-block": "Заблякаваць",
        "log-action-filter-block-reblock": "Зьмяненьне блякаваньня",
        "log-action-filter-block-unblock": "Разблякаваць",
        "log-action-filter-contentmodel-change": "Зьмена мадэлі зьместу",
+       "log-action-filter-contentmodel-new": "Стварэньне старонкі зь нестандартнай мадэльлю зьместу",
        "log-action-filter-delete-delete": "Выдаленьне старонкі",
        "log-action-filter-delete-restore": "Аднаўленьне старонкі",
        "log-action-filter-delete-event": "Выдаленьне журналу",
        "log-action-filter-delete-revision": "Выдаленьне вэрсіі",
+       "log-action-filter-import-interwiki": "Трансьвікі-імпарт",
+       "log-action-filter-import-upload": "Імпарт праз загрузку XML",
        "log-action-filter-managetags-create": "Стварэньне метак",
        "log-action-filter-managetags-delete": "Выдаленьне метак",
        "log-action-filter-managetags-activate": "Актывацыя метак",
        "log-action-filter-managetags-deactivate": "Дэактывацыя метак",
+       "log-action-filter-move-move": "Перанос безь перазапісу перанакіраваньняў",
+       "log-action-filter-move-move_redir": "Перанос зь перазапісам перанакіраваньняў",
+       "log-action-filter-newusers-create": "Створаны ананімным удзельнікам",
+       "log-action-filter-newusers-create2": "Створаны зарэгістраваным удзельнікам",
        "log-action-filter-newusers-autocreate": "Аўтаматычнае стварэньне",
+       "log-action-filter-newusers-byemail": "Створаны паролем, дасланым электроннай поштай",
+       "log-action-filter-patrol-patrol": "Ручное патруляваньне",
        "log-action-filter-patrol-autopatrol": "Аўтаматычнае патруляваньне",
        "log-action-filter-protect-protect": "Абарона",
        "log-action-filter-protect-unprotect": "Зьняцьце абароны",
index 55f2e8a..a3019e0 100644 (file)
@@ -56,7 +56,7 @@
        "tog-enotifminoredits": "Паведамяць мне на эл.пошту пра дробныя праўкі старонак і файлаў",
        "tog-enotifrevealaddr": "Паказваць мой адрас эл.пошты ў паведамленнях",
        "tog-shownumberswatching": "Паказваць колькасць назіральнікаў",
-       "tog-oldsig": "Ð\86Ñ\81нÑ\83Ñ\8eÑ\87Ñ\8b подпіс:",
+       "tog-oldsig": "Ð\92аÑ\88 Ñ\86Ñ\8fпеÑ\80аÑ\88нÑ\96 подпіс:",
        "tog-fancysig": "Апрацоўваць подпіс як вікі-тэкст (без аўтаматычнай спасылкі)",
        "tog-uselivepreview": "Жывы перадпаказ",
        "tog-forceeditsummary": "Папярэджваць пра пустое поле тлумачэння праўкі",
@@ -73,7 +73,7 @@
        "tog-showhiddencats": "Паказаць схаваныя катэгорыі",
        "tog-norollbackdiff": "Не паказваць розніцу ў выніку адкату",
        "tog-useeditwarning": "Папярэдзіць мяне, калі я пакідаю старонку з незахаванымі праўкамі",
-       "tog-prefershttps": "Ð\97аÑ\9eÑ\81Ñ\91дÑ\8b Ð²Ñ\8bкаÑ\80Ñ\8bÑ\81Ñ\82оÑ\9eваÑ\86Ñ\8c Ð°Ð±Ð°Ñ\80оненае Ð·Ð»Ñ\83Ñ\87Ñ\8dнне Ð¿Ð°Ñ\81лÑ\8f Ñ\9eваÑ\85одÑ\83 ў сістэму",
+       "tog-prefershttps": "Ð\97аÑ\9eÑ\81Ñ\91дÑ\8b Ð²Ñ\8bкаÑ\80Ñ\8bÑ\81Ñ\82оÑ\9eваÑ\86Ñ\8c Ð±Ñ\8fÑ\81пеÑ\87нае Ð·Ð»Ñ\83Ñ\87Ñ\8dнне Ð¿Ð° Ñ\9eваÑ\85одзе ў сістэму",
        "underline-always": "Заўсёды",
        "underline-never": "Ніколі",
        "underline-default": "Як у браўзеры",
        "newwindow": "(адкрыецца ў новым акне)",
        "cancel": "Нічога",
        "moredotdotdot": "Яшчэ...",
-       "morenotlisted": "Гэты спіс не поўны.",
+       "morenotlisted": "Ð\93Ñ\8dÑ\82Ñ\8b Ñ\81пÑ\96Ñ\81 Ð¼Ð¾Ð¶Ð° Ð±Ñ\8bÑ\86Ñ\8c Ð½Ðµ Ð¿Ð¾Ñ\9eнÑ\8b.",
        "mypage": "Старонка",
        "mytalk": "Размовы",
        "anontalk": "Размовы",
        "talk": "Размовы",
        "views": "Віды",
        "toolbox": "Прылады",
+       "tool-link-userrights": "Змяніць групы {{GENDER:$1|ўдзельніка|ўдзельніцы}}",
+       "tool-link-emailuser": "Напісаць ліст {{GENDER:$1|удзельніку|удзельніцы}}",
        "userpage": "Паказаць старонку ўдзельніка",
        "projectpage": "Паказаць старонку праекта",
        "imagepage": "Гл. старонку файла",
        "botpasswords-label-resetpassword": "Скінуць пароль",
        "botpasswords-label-grants": "Прыдатныя дазволы:",
        "botpasswords-help-grants": "Кожны дазвол дае доступ да правоў удзельніка, якія ўжо прызначаны ўліковаму запісу удзельніка. Глядзіце [[Special:ListGrants|табліцу дазволаў]] для атрымання дадатковых зьвестак.",
-       "botpasswords-label-restrictions": "Абмежаванні на выкарыстанне:",
        "botpasswords-label-grants-column": "Дазволена",
        "botpasswords-bad-appid": "Назва робата \"$1\" недапушчальная.",
        "botpasswords-insert-failed": "Не ўдалося дадаць робату назву \"$1\". Магчыма, яна ўжо дададзена?",
        "botpasswords-updated-body": "Пароль для робата \"$1\" удзельніка \"$2\" паспяхова абноўлены.",
        "botpasswords-deleted-title": "Пароль робата сцёрты",
        "botpasswords-deleted-body": "Пароль для робата \"$1\" удзельніка \"$2\" паспяхова сцёрты.",
-       "botpasswords-newpassword": "Новы пароль для ўваходу пад <strong>$1</strong> — <strong>$2</strong>. <em>Калі ласка, запішыце яго для выкарыстання ў будучыні.</em>",
+       "botpasswords-newpassword": "Новы пароль для ўваходу пад <strong>$1</strong> — <strong>$2</strong>. <em>Калі ласка, запішыце яго для выкарыстання ў будучыні.</em> <br> (Для старых робатаў, якія патрабуюць, каб імя для ўваходу супадала з патэнцыяльным імем удзельніка, можаце таксама выкарыстоўваць <strong>$3</strong> як імя і <strong>$4</strong> у якасці пароля.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider недаступны.",
        "botpasswords-restriction-failed": "Уваход не выкананы з-за абмежаванняў на пароль робата.",
        "botpasswords-invalid-name": "Паказанае імя ўдзельніка не ўтрымлівае падзяляльнік паролю робата (\"$1\").",
        "invalid-content-data": "Недапушчальнае змесціва",
        "content-not-allowed-here": "\"$1\" не дазволены на старонцы [[$2]]",
        "editwarning-warning": "Пераход на іншую старонку можа прывесці да страты правак, зробленых Вамі. \nКалі Вы ўвайшлі ў сістэму, Вы можаце адключыць гэта папярэджанне ў раздзеле \"{{int:prefs-editing}}\" Вашых настроек.",
+       "editpage-invalidcontentmodel-title": "Мадэль змесціва не падтрымліваецца",
+       "editpage-invalidcontentmodel-text": "Мадэль змесціва \"$1\" не падтрымліваецца.",
        "editpage-notsupportedcontentformat-title": "Фармат змесціва не падтрымліваецца",
        "editpage-notsupportedcontentformat-text": "Фармат змесціва $1 не падтрымліваецца мадэллю змесціва $2.",
        "content-model-wikitext": "вікі-тэкст",
        "uploaded-animate-svg": "У ўкладзеным SVG файле знойдзены тэг \"animate\", здольны змяніць спасылку з дапамогай атрыбута \"from\" <code>&lt;$1 $2=\"$3\"&gt;</code>.",
        "uploaded-setting-event-handler-svg": "Устаноўка атрыбутаў апрацоўкі падзей заблакавана, у ўкладзеным SVG-файле знойдзены код <code>&lt;$1 $2=\"$3\"&gt;</code>.",
        "uploaded-setting-href-svg": "Выкарыстанне тэга \"set\" для дадання атрыбута \"href\" у бацькоўскі элемент заблакавана.",
+       "uploaded-wrong-setting-svg": "Ужыванне тэга \"set\" для задання ў якасці мэты аддаленага адраса/звестак/сцэнарыя для любога атрыбута заблакавана. У ўкладзеным SVG-файле знойдзены <code>&lt;set to=\"$1\"&gt;</code>.",
        "uploadscriptednamespace": "Гэты файл SVG утрымлівае недапушчальную прастору імёнаў \"$1\".",
        "uploadinvalidxml": "Немагчыма прааналізаваць XML ва ўкладзеным файле.",
        "uploadvirus": "Файл утрымлівае вірус! Падрабязнасці: $1",
        "upload-foreign-cant-upload": "Гэта вікі не настроена для ўкладання файлаў у запытанае старонняе сховішча файлаў.",
        "upload-dialog-title": "Укласці файл",
        "upload-dialog-button-cancel": "Нічога",
+       "upload-dialog-button-back": "Назад",
        "upload-dialog-button-done": "Гатова",
        "upload-dialog-button-save": "Запісаць",
        "upload-dialog-button-upload": "Укласці",
        "apisandbox-dynamic-parameters-add-placeholder": "Назва параметра",
        "apisandbox-dynamic-error-exists": "Параметр з назвай \"$1\" ужо існуе.",
        "apisandbox-deprecated-parameters": "Састарэлыя параметры",
+       "apisandbox-fetch-token": "Аўтазапаўненне токена",
        "apisandbox-submit-invalid-fields-title": "Некаторыя палі недапушчальныя",
        "apisandbox-submit-invalid-fields-message": "Калі ласка, выпраўце адзначаныя палі і паспрабуйце ізноў.",
        "apisandbox-results": "Вынікі",
+       "apisandbox-request-url-label": "URL-адрас запыту:",
+       "apisandbox-request-time": "Час запыту: {{PLURAL:$1|$1 мс}}",
+       "apisandbox-results-fixtoken": "Папраўце токен і паўтарыце адпраўку",
        "apisandbox-alert-page": "Палі на гэтай старонцы недапушчальныя.",
        "apisandbox-alert-field": "Значэнне гэтага поля недапушчальнае.",
        "booksources": "Кнігі",
        "rollbacklinkcount": "адкаціць $1 {{PLURAL:$1|праўку|праўкі|правак}}",
        "rollbacklinkcount-morethan": "адкаціць больш за $1 {{PLURAL:$1|праўку|праўкі|правак}}",
        "rollbackfailed": "Не ўдалося адкаціць",
+       "rollback-missingparam": "У запыце адсутнічаюць абавязковыя параметры.",
+       "rollback-missingrevision": "Не ўдалося атрымаць звесткі версіі.",
        "cantrollback": "Немагчыма адкаціць праўку; апошні аўтар гэта адзіны аўтар на гэтай старонцы.",
        "alreadyrolled": "Немагчыма адкаціць апошнюю праўку ў [[:$1]], аўтарства [[User:$2|$2]] ([[User talk:$2|Talk]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]);\nз таго часу нехта іншы правіў або адкатваў гэтую старонку.\n\nАпошняя праўка старонкі была аўтарства [[User:$3|$3]] ([[User talk:$3|Talk]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).",
        "editcomment": "Тлумачэнне праўкі было: <em>$1</em>.",
        "revertpage": "Праўкі аўтарства [[Special:Contributions/$2|$2]] ([[User talk:$2|размова]]) адкочаныя; вернута апошняя версія аўтарства [[User:$1|$1]]",
        "revertpage-nouser": "Праўкі (імя ўдзельніка схавана) адкочаны да версіі {{GENDER:$1|[[User:$1|$1]]}}",
        "rollback-success": "Адкочаны праўкі $1; вернута апошняя версія $2.",
+       "rollback-success-notify": "Адкочаны праўкі $1;\nвернута апошняя версія $2. [$3 Паказаць змены]",
        "sessionfailure-title": "Памылка сеансу",
        "sessionfailure": "Магчыма, ёсць праблемы з вашым сеансам працы ў сістэме. Таму вам было адмоўлена ў выкананні дзеяння, каб засцерагчыся ад захопу сеанса.\n\nВярніцеся на папярэднюю старонку, перазагрузіце яе і тады паспрабуйце зноў.",
        "changecontentmodel": "Змяніць мадэль змесціва старонкі",
        "changecontentmodel-reason-label": "Прычына:",
        "changecontentmodel-submit": "Змяніць",
        "changecontentmodel-success-title": "Мадэль змесціва была зменена",
+       "changecontentmodel-success-text": "Тып змесціва [[:$1]] быў зменены.",
+       "changecontentmodel-cannot-convert": "Змесціва [[:$1]] не можа быць ператворана ў тып $2.",
+       "changecontentmodel-nodirectediting": "Мадэль змесціва $1 не падтрымлівае наўпростае рэдагаванне",
        "changecontentmodel-emptymodels-title": "Няма даступных мадэляў змесціва",
+       "changecontentmodel-emptymodels-text": "Змесціва [[:$1]] не можа быць ператворана ні ў які тып.",
+       "log-name-contentmodel": "Журнал змен мадэляў змесціва",
+       "log-description-contentmodel": "Падзеі, звязаныя з мадэлямі змесціва старонак",
        "logentry-contentmodel-change-revertlink": "адкаціць",
        "logentry-contentmodel-change-revert": "адкат",
        "protectlogpage": "Журнал аховы",
        "export-download": "Прапанаваць запісаць у файл",
        "export-templates": "Разам з шаблонамі",
        "export-pagelinks": "Разам са старонкамі, на якія ёсць спасылкі (макс. кольк. крокаў):",
+       "export-manual": "Дадаць старонкі ўручную:",
        "allmessages": "Сістэмныя паведамленні",
        "allmessagesname": "Назва",
        "allmessagesdefault": "Прадвызначаны тэкст",
        "thumbnail-temp-create": "Не ўдаецца стварыць часовы файл эскіза",
        "thumbnail-dest-create": "Не ўдаецца захаваць эскіз па месцы прызначэння",
        "thumbnail_invalid_params": "Няправільныя параметры драбніцы",
+       "thumbnail_toobigimagearea": "Файл з памерамі большымі, чым $1",
        "thumbnail_dest_directory": "Немагчыма стварыць мэтавую тэчку",
        "thumbnail_image-type": "Дадзены тып выявы не падтрымліваецца",
        "thumbnail_gd-library": "Няпоўная канфігурацыя бібліятэкі GD, адсутнічае функцыя $1",
        "tooltip-ca-nstab-category": "Паказаць старонку катэгорыі",
        "tooltip-minoredit": "Падаць гэтую праўку як дробную",
        "tooltip-save": "Замацаваць свае змяненні",
+       "tooltip-publish": "Апублікаваць вашы змены",
        "tooltip-preview": "Паказаць, якім будзе вынік — ужывайце перад замацоўваннем!",
        "tooltip-diff": "Паказаць, што вы мяняеце ў тэксце.",
        "tooltip-compareselectedversions": "Паказаць розніцу паміж дзвюмя азначанымі версіямі гэтай старонкі.",
        "pageinfo-article-id": "Ідэнтыфікатар старонкі",
        "pageinfo-language": "Мова змесціва старонкі",
        "pageinfo-content-model": "Мадэль змесціва старонкі",
+       "pageinfo-content-model-change": "змяніць",
        "pageinfo-robot-policy": "Індэксаванне робатамі",
        "pageinfo-robot-index": "Дазволена",
        "pageinfo-robot-noindex": "Не дазволена",
        "confirmemail_body_set": "Нехта (магчыма, вы) з IP-адрасам $1\nпаказаў дадзены адрас электроннай пошты для ўліковага запісу «$2» у праекце {{SITENAME}}.\n\nКаб пацвердзіць, што акаўнт сапраўды належыць вам, і ўключыць магчымасць адпраўкі лістоў з сайта {{SITENAME}}, адкрыйце гэтую спасылку ў браўзеры:\n\n$3\n\nКалі рахунак вам *не належыць*, адкрыйце ніжэй паказаную спасылку, каб адмовіцца ад пацверджання адрасу эл.пошты:\n\n$5\n\nКод пацверджання дзейсны да $4.",
        "confirmemail_invalidated": "Пацверджанне эл.пошты скасаванае",
        "invalidateemail": "Адмовіцца ад пацверджання эл.пошты",
+       "notificationemail_subject_changed": "Адрас электроннай пошты на пляцоўцы {{SITENAME}} зменены",
        "scarytranscludedisabled": "[Устаўлянне з іншых вікі не дазволена]",
        "scarytranscludefailed": "[Не ўдалося атрымаць шаблон для $1]",
        "scarytranscludefailed-httpstatus": "[Не ўдалося атрымаць шаблон для $1: HTTP $2]",
        "tag-filter": "Фільтр [[Special:Tags|бірак]]:",
        "tag-filter-submit": "Фільтр",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Тэг|Тэгі}}]]: $2)",
+       "tag-mw-contentmodelchange": "змена мадэлі змесціва",
        "tags-title": "Біркі",
        "tags-intro": "Тут пералічаныя біркі, якімі праграмы могуць пазначыць праўку, а таксама іх значэнні.",
        "tags-tag": "Назва біркі",
        "htmlform-title-not-exists": "$1 не існуе.",
        "htmlform-user-not-exists": "<strong>$1</strong> не існуе.",
        "htmlform-user-not-valid": "<strong>$1</strong> - недапушчальная назва уліковага запісу.",
-       "sqlite-has-fts": "$1 з падтрымкай поўна-тэкставага пошуку",
-       "sqlite-no-fts": "$1 без падтрымкі поўна-тэкставага пошуку",
        "logentry-delete-delete": "$1 {{GENDER:$2|сцёр|сцёрла}} старонку $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|аднавіў|аднавіла}} старонку $3",
        "logentry-delete-event": "$1 {{GENDER:$2|змяніў|змяніла}} бачнасць {{PLURAL:$5|запісу журнала|$5 запісаў журнала}} $3: $4",
        "feedback-cancel": "Адмена",
        "feedback-close": "Зроблена.",
        "feedback-dialog-title": "Даслаць водгук",
-       "feedback-error-title": "Памылка",
        "feedback-error1": "Памылка. Невядомы вынік з API",
        "feedback-error2": "Памылка. Збой праўкі",
        "feedback-error3": "Памылка. Няма адказу ад API",
        "expand_templates_generate_xml": "Паказаць дрэва сінтаксічнага аналізу XML",
        "expand_templates_generate_rawhtml": "Паказаць зыходны код HTML",
        "expand_templates_preview": "Перадпаказ",
+       "expand_templates_input_missing": "Трэба ўвесці хоць які-небудзь тэкст.",
        "pagelanguage": "Змяніць мову старонкі",
        "pagelang-name": "Старонка",
        "pagelang-language": "Мова",
        "mediastatistics-header-unknown": "Невядомыя",
        "mediastatistics-header-bitmap": "Растравыя выявы",
        "mediastatistics-header-drawing": "Рысункі (вектарныя выявы)",
+       "mediastatistics-header-text": "Тэкст",
+       "mediastatistics-header-archive": "Сціснутыя фарматы",
        "mediastatistics-header-total": "Усе файлы",
        "json-error-state-mismatch": "Недапушчальны або некарэктны JSON",
        "json-error-syntax": "Памылка сінтаксісу",
+       "headline-anchor-title": "Спасылка на гэты раздзел",
        "special-characters-group-latin": "Лацінскія",
        "special-characters-group-latinextended": "Лацінскія дадатковыя",
        "special-characters-group-ipa": "IPA",
index c8eb76b..57d9305 100644 (file)
@@ -36,7 +36,9 @@
                        "Ket",
                        "Ricordo.tenerissimo",
                        "Plamen",
-                       "Iliev"
+                       "Iliev",
+                       "Spas.Z.Spasov",
+                       "АдмиралАнимЕ"
                ]
        },
        "tog-underline": "Подчертаване на препратките:",
@@ -64,7 +66,7 @@
        "tog-enotifminoredits": "Уведомяване по е-пощата при малки промени на страници или файлове",
        "tog-enotifrevealaddr": "Показване на електронния ми адрес в известяващите писма",
        "tog-shownumberswatching": "Показване на броя на потребителите, наблюдаващи дадена страница",
-       "tog-oldsig": "Текущ подпис:",
+       "tog-oldsig": "Ð\92аÑ\88иÑ\8fÑ\82 Ñ\82екущ подпис:",
        "tog-fancysig": "Без превръщане на подписа в препратка към потребителската страница",
        "tog-uselivepreview": "Използване на бърз предварителен преглед",
        "tog-forceeditsummary": "Предупреждаване при празно поле за резюме на редакцията",
        "tog-showhiddencats": "Показване на скритите категории",
        "tog-norollbackdiff": "Не показвай разликата между редакциите след отмяна на редакции",
        "tog-useeditwarning": "Предупреждаване при опит за напускане на страница, отворена в режим на редактиране, без да са запазени промените",
-       "tog-prefershttps": "Да се използва винаги защитена връзка след влизане",
+       "tog-prefershttps": "Да се използва винаги защитена връзка при влизане",
        "underline-always": "Винаги",
        "underline-never": "Никога",
        "underline-default": "Според настройките на облика или браузъра",
        "editfont-style": "Стил на шрифта в кутията за редактиране:",
        "editfont-default": "По подразбиране за браузъра",
        "editfont-monospace": "Равноширок шрифт",
-       "editfont-sansserif": "Ð\91езÑ\81еÑ\80иÑ\84ен Ñ\88Ñ\80иÑ\84Ñ\82",
-       "editfont-serif": "СеÑ\80иÑ\84ен Ñ\88Ñ\80иÑ\84Ñ\82",
+       "editfont-sansserif": "ШÑ\80иÑ\84Ñ\82 Ð±ÐµÐ· Ð¸Ð·Ð²Ð¸Ð²ÐºÐ¸",
+       "editfont-serif": "ШÑ\80иÑ\84Ñ\82 Ñ\81 Ð¸Ð·Ð²Ð¸Ð²ÐºÐ¸",
        "sunday": "неделя",
        "monday": "понеделник",
        "tuesday": "вторник",
        "october-date": "$1 октомври",
        "november-date": "$1 ноември",
        "december-date": "$1 декември",
+       "period-am": "Преди обед",
+       "period-pm": "След обед",
        "pagecategories": "{{PLURAL:$1|Категория|Категории}}",
        "category_header": "Страници в категория „$1“",
        "subcategories": "Подкатегории",
        "newwindow": "(отваря се в нов прозорец)",
        "cancel": "Отказ",
        "moredotdotdot": "Още…",
-       "morenotlisted": "Този Ñ\81пиÑ\81Ñ\8aк Ð½Ðµ Ðµ пълен.",
+       "morenotlisted": "Ð\92Ñ\8aзможно Ðµ Ñ\82ози Ñ\81пиÑ\81Ñ\8aк Ð´Ð° Ðµ Ð½Ðµпълен.",
        "mypage": "Страница",
        "mytalk": "Беседа",
        "anontalk": "Беседа",
        "qbpageoptions": "Тази страница",
        "qbmyoptions": "Моите страници",
        "faq": "ЧЗВ",
-       "faqpage": "Project:ЧЗВ",
+       "faqpage": "Проект:ЧЗВ",
        "actions": "Действия",
        "namespaces": "Именни пространства",
        "variants": "Варианти",
        "talk": "Беседа",
        "views": "Прегледи",
        "toolbox": "Инструменти",
+       "tool-link-emailuser": "Писмо до {{GENDER:$1|потребителя}}",
        "userpage": "Потребителска страница",
        "projectpage": "Проектна страница",
        "imagepage": "Преглед на файла",
        "title-invalid-interwiki": "Желаното заглавие на страница съдържа препратка към друго уики, което не може да бъде ползвано в заглавия.",
        "title-invalid-talk-namespace": "Желаното заглавие на страница се отнася към беседа, която не съществува",
        "title-invalid-characters": "Желаното заглавие на статия съдържа невалидни знаци: „$1“",
-       "title-invalid-relative": "Заглавието съдържа относителен път. Относителни заглавия на статии (./,../) са невалидни, защото често ще са недостижимо, когато биват извиквани от браузъра на потребителя.",
+       "title-invalid-relative": "Заглавието съдържа относителен път. Относителните заглавия на статии (./,../) са невалидни, защото често са недостижими, когато биват обработвани от браузъра на потребителя.",
        "title-invalid-magic-tilde": "Желаното заглавие на статия съдържа невалидна поредица от тилди (<nowiki>~~~</nowiki>).",
        "title-invalid-too-long": "Желаното заглавие на статия е твърде дълго. Трябва да е не по-дълго от $1 {{PLURAL:$1|байт|байта}} в кодиране UTF-8.",
        "title-invalid-leading-colon": "Желаното заглавие на статия съдържа невалидно двоеточие в началото.",
        "virus-scanfailed": "сканирането не сполучи (код $1)",
        "virus-unknownscanner": "непознат антивирус:",
        "logouttext": "'''Излязохте от системата.'''\n\nОбърнете внимание, че някои страници все още ще се показват така, сякаш сте влезли, докато не изтриете кеша на браузъра.",
+       "cannotlogoutnow-title": "Не може да излезете сега.",
        "welcomeuser": "Здравейте, $1!",
        "welcomecreation-msg": "Вашата сметка беше създадена.\nМожете да промените [[Special:Preferences|настройките на {{SITENAME}}]] според предпочитанията си.",
        "yourname": "Потребителско име:",
        "yourpasswordagain": "Парола (повторно):",
        "createacct-yourpasswordagain": "Потвърждаване на паролата",
        "createacct-yourpasswordagain-ph": "Въвежда се паролата (повторно)",
-       "remembermypassword": "Запомняне на паролата на този компютър (най-много за $1 {{PLURAL:$1|ден|дни}})",
        "userlogin-remembermypassword": "Запомняне",
        "userlogin-signwithsecure": "Използване на защитена връзка",
+       "cannotlogin-title": "Не може да влезете в",
+       "cannotlogin-text": "Влизането в системата не е възможно.",
+       "cannotloginnow-title": "Не може да влезете сега",
+       "cannotcreateaccount-title": "Невъзможно е да бъде създадена потребителска сметка",
        "yourdomainname": "Домейн:",
        "password-change-forbidden": "Не можете да променяте пароли в това уики.",
        "externaldberror": "Или е станала грешка в базата от данни при външното удостоверяване, или не ви е позволено да обновявате външната си сметка.",
        "createacct-reason-ph": "Защо създавате друга сметка",
        "createacct-submit": "Създаване на сметката",
        "createacct-another-submit": "Създаване на сметка",
-       "createacct-continue-submit": "Продължаване създаването на акаунт",
-       "createacct-another-continue-submit": "Продължаване създаването на акаунт",
+       "createacct-continue-submit": "Продължаване създаването на сметка",
+       "createacct-another-continue-submit": "Продължаване създаването на сметка",
        "createacct-benefit-heading": "{{SITENAME}} се създава от хора като вас.",
        "createacct-benefit-body1": "{{PLURAL:$1|редакция|редакции}}",
        "createacct-benefit-body2": "{{PLURAL:$1|страница|страници}}",
        "passwordremindertitle": "Напомняне за парола от {{SITENAME}}",
        "passwordremindertext": "Някой (най-вероятно вие, от IP-адрес $1) е пожелал нова парола за влизане в {{SITENAME}} ($4).\nЗа потребител „$2“ е създадена временната парола „$3“.\nСега би трябвало да влезете в системата и да си изберете нова парола.\nНовата временна парола ще бъде активна {{PLURAL:$5|един ден|$5 дни}}.\n\nАко заявката е направена от друг или пък сте си спомнили паролата и не искате да я променяте, можете да пренебрегнете това съобщение и да продължите да използвате старата си парола.",
        "noemail": "Няма записана електронна поща за потребителя „$1“.",
-       "noemailcreate": "Необходимо е да въведете валиден адрес за е-поща",
+       "noemailcreate": "Необходимо е да въведете валиден адрес за ел. поща",
        "passwordsent": "Нова парола беше изпратена на електронната поща на „$1“.\nСлед като я получите, влезте отново.",
        "blocked-mailpassword": "Редактирането от Вашия IP-адрес е забранено, затова не Ви се позволява да използвате възможността за възстановяване на парола.",
        "eauthentsent": "Писмото за потвърждение е изпратено на посочения адрес. В него са описани действията, които трябва да се извършат, за да потвърдите, че този адрес за електронна поща действително е ваш.",
        "throttled-mailpassword": "Функцията за напомняне на паролата е използвана през {{PLURAL:$1|последния един час|последните $1 часа}}.\nЗа предотвратяване на злоупотреби е разрешено да се изпраща не повече от едно напомняне в рамките на {{PLURAL:$1|един час|$1 часа}}.",
        "mailerror": "Грешка при изпращане на писмо: $1",
-       "acct_creation_throttle_hit": "Ð\9fÑ\80ез Ð¿Ð¾Ñ\81ледноÑ\82о Ð´ÐµÐ½Ð¾Ð½Ð¾Ñ\89ие, през този IP-адрес посетители на това уики са създали {{PLURAL:$1|1 сметка |$1 сметки}}, което е максималният допустим брой за този период.\nВ резултат, към момента не могат да създават повече потребителски сметки през този IP-адрес.",
+       "acct_creation_throttle_hit": "Ð\9fÑ\80ез Ð¿Ð¾Ñ\81ледниÑ\82е $2, през този IP-адрес посетители на това уики са създали {{PLURAL:$1|1 сметка |$1 сметки}}, което е максималният допустим брой за този период.\nВ резултат, към момента не могат да създават повече потребителски сметки през този IP-адрес.",
        "emailauthenticated": "Адресът на електронната ви поща беше потвърден на $2 в $3.",
        "emailnotauthenticated": "Адресът на електронната ви поща все още не е потвърден.\nНяма да получавате писма за никоя от следните възможности.",
        "noemailprefs": "За да работят тези функционалности, трябва да посочите адрес на електронна поща в своите настройки.",
        "botpasswords-label-cancel": "Отказване",
        "botpasswords-label-delete": "Изтриване",
        "botpasswords-label-resetpassword": "Възстановяване на парола",
-       "botpasswords-label-restrictions": "Ограничения на употребата:",
        "botpasswords-created-title": "Паролата на бота е създадена",
        "botpasswords-created-body": "Паролата на бот „$1“ на потребител „$2“ е създадена.",
        "botpasswords-updated-title": "Паролата на бота е обновена",
        "passwordreset-emailsentusername": "Ако това потребителско име е свързано с електронна поща, е изпратено писмо за възстановяване на паролата.",
        "passwordreset-invalideamil": "Неправилен email адрес",
        "changeemail": "Промяна или премахване на адреса за е-поща",
-       "changeemail-header": "Промяна на адреса за е-поща на сметката",
+       "changeemail-header": "Попълнете формуляра, за да промените адреса на електронната си поща. Ако искате да премахнете адреса на електронната си поща, при попълване на формуляра оставете полето за новия адрес празно.",
        "changeemail-no-info": "За да достъпвате тази страница директно, необходимо е да влезете в системата.",
        "changeemail-oldemail": "Текущ адрес за е-поща:",
        "changeemail-newemail": "Нов адрес за е-поща:",
        "resettokens-resetbutton": "Изчистване на избраните маркери",
        "bold_sample": "Получер текст",
        "bold_tip": "Получер (удебелен) текст",
-       "italic_sample": "Ð\9aÑ\83Ñ\80Ñ\81ивен текст",
-       "italic_tip": "Ð\9aÑ\83Ñ\80Ñ\81ивен (наклонен) текст",
+       "italic_sample": "Ð\9dаклонен текст",
+       "italic_tip": "Ð\9dаклонен текст",
        "link_sample": "Име на препратка",
        "link_tip": "Вътрешна препратка",
        "extlink_sample": "http://www.example.com Текст на външната препратка",
        "previewnote": "<strong>Обърнете внимание, че това е само предварителен преглед.</strong>\nПромените все още не са съхранени!",
        "continue-editing": "Продължаване към полето за редактиране",
        "previewconflict": "Този предварителен преглед отразява текста в горната текстова кутия така, както би се показал, ако съхраните.",
-       "session_fail_preview": "'''За съжаление редакцията ви не успя да бъде обработена поради загуба на данните за текущата сесия. Опитайте отново. Ако все още не работи, опитайте да [[Special:UserLogout|излезете]] и да влезете отново.'''",
+       "session_fail_preview": "За съжаление редакцията ви не успя да бъде обработена поради загуба на данните за текущата сесия.\n\nМоже би сте излезли от системата. <strong>Моля, уверете се, че сте влезли в профила си и опитайте отново. \nАко все още не работи, опитайте да [[Special:UserLogout|излезете]] и да влезете отново, също така проверете дали браузърът ви позволява бисквитки от този сайт.",
        "session_fail_preview_html": "'''За съжаление редакцията ви не беше записана поради изтичането на сесията ви.'''\n\n''Тъй като {{SITENAME}} приема обикновен HTML, предварителният преглед е скрит като предпазна мярка срещу атаки чрез Джаваскрипт.''\n\n'''Опитайте отново. Ако все още не сработва, пробвайте да [[Special:UserLogout|излезете]] и влезете отново.'''",
        "token_suffix_mismatch": "'''Редакцията ви беше отхвърлена, защото браузърът ви е развалил пунктуационните знаци в редакционната отметка. Евентуалното съхранение би унищожило съдържанието на страницата. Понякога това се случва при използването на грешно работещи анонимни междинни сървъри.'''",
        "edit_form_incomplete": "'''Някои части от формуляра за редактиране не достигнаха до сървъра; проверете дали редакциите ви са непокътнати и опитайте отново.'''",
        "undo-success": "Редакцията може да бъде върната. Прегледайте долното сравнение и се уверете, че наистина искате да го направите. След това съхранете страницата, за да извършите връщането.",
        "undo-failure": "Редакцията не може да бъде върната поради конфликтни междинни редакции.",
        "undo-norev": "Редакцията не може да бъде върната, тъй като не съществува или е била изтрита.",
+       "undo-nochange": "Тази редакция изглежда вече е отменена.",
        "undo-summary": "Премахната редакция $1 на [[Special:Contributions/$2|$2]] ([[User talk:$2|беседа]])",
        "undo-summary-username-hidden": "Отмяна на редакция $1 от скрит потребител",
        "cantcreateaccount-text": "[[User:$3|Потребител:$3]] е блокирал(а) създаването на сметки от този IP-адрес ('''$1''').\n\nПричината, изложена от $3, е ''$2''",
        "rev-showdeleted": "показване",
        "revisiondelete": "Изтриване/възстановяване на версии",
        "revdelete-nooldid-title": "Не е зададена версия",
-       "revdelete-nooldid-text": "Не сте задали версия или версии за изпълнението на тази функция.",
+       "revdelete-nooldid-text": "Не сте задали целева версия за изпълнението на тази функция или определената версия не съществува, или се опитвате да скриете настоящата версия.",
        "revdelete-no-file": "Посоченият файл не съществува.",
        "revdelete-show-file-confirm": "Необходимо е потвърждение, че желаете да прегледате изтритата версия на файла „<nowiki>$1</nowiki>“ от $2 $3.",
        "revdelete-show-file-submit": "Да",
        "revdelete-selected-text": "{{PLURAL:$1|Избрана версия|Избрани версии}} от [[:$2]]:",
        "logdelete-selected": "{{PLURAL:$1|Избрано събитие|Избрани събития}}:",
        "revdelete-text-text": "Изтритите редакции ще продължат да се виждат в историята на страницата, но части от съдържанието ще бъдат публично недостъпни.",
+       "revdelete-text-file": "Изтритите файлови редакции ще продължат да се виждат в историята на страницата, но части от съдържанието им ще бъдат публично недостъпни.",
+       "logdelete-text": "Изтриват записи в дневника ще продължат да се виждат в дневниците, но част от тяхното съдържание ще бъде недостъпно за обществеността.",
        "revdelete-text-others": "Другите администратори ще продължат да имат достъп до скритото съдържание и могат да го възстановят, освен ако не бъдат наложени допълнителни ограничения.",
        "revdelete-confirm": "Необходимо е да потвърдите, че желаете да извършите действието, разбирате последствията и го правите според [[{{MediaWiki:Policy-url}}|политиката]].",
        "revdelete-suppress-text": "Премахването трябва да се използва '''само''' при следните случаи:\n* Потенциално уязвима в правно отношение информация\n* Неподходяща лична информация\n*: ''домашни адреси и телефонни номера, номера за социално осигуряване и др.''",
        "mergehistory-empty": "Няма редакции, които могат да бъдат слети.",
        "mergehistory-done": "$3 {{PLURAL:$3|версия|версии}} от $1 {{PLURAL:$3|беше успешно слята|бяха успешно слети}} с редакционната история на [[:$2]].",
        "mergehistory-fail": "Невъзможно е да се извърши сливане на редакционните истории; проверете страницата и времевите параметри.",
+       "mergehistory-fail-invalid-source": "Изходната страница е невалидна.",
+       "mergehistory-fail-invalid-dest": "Целевата страница е невалидна.",
+       "mergehistory-fail-permission": "Нямате права за обединяване на историята.",
+       "mergehistory-fail-self-merge": "Изходната и целевата страница се еднакви.",
        "mergehistory-no-source": "Изходната страница $1 не съществува.",
        "mergehistory-no-destination": "Целевата страница $1 не съществува.",
        "mergehistory-invalid-source": "Изходната страница трябва да притежава коректно име.",
        "searchprofile-advanced-tooltip": "Търсене в избрани именни пространства",
        "search-result-size": "$1 ({{PLURAL:$2|една дума|$2 думи}})",
        "search-result-category-size": "{{PLURAL:$1|1 член|$1 члена}} ({{PLURAL:$2|1 подкатегория|$2 подкатегории}}, {{PLURAL:$3|1 файл|$3 файла}})",
-       "search-redirect": "(пренасочване $1)",
+       "search-redirect": "(пренасочване от $1)",
        "search-section": "(раздел $1)",
        "search-category": "(категория $1)",
        "search-suggest": "Вероятно имахте предвид: $1",
        "badsig": "Избраният подпис не е валиден. Проверете HTML-етикетите!",
        "badsiglength": "Вашият подпис е твърде дълъг.\nПодписите не могат да надвишават $1 {{PLURAL:$1|знак|знака}}.",
        "yourgender": "Какво описание Ви подхожда най-много?",
-       "gender-unknown": "Ð\9fÑ\80едпоÑ\87иÑ\82ам Ð´Ð° Ð½Ðµ Ð¿Ð¾Ñ\81оÑ\87а",
+       "gender-unknown": "Ð\9aогаÑ\82о Ð²Ð¸ Ñ\81поменава, Ñ\81оÑ\84Ñ\82Ñ\83еÑ\80Ñ\8aÑ\82 Ñ\89е Ð¸Ð·Ð¿Ð¾Ð»Ð·Ð²Ð° Ð½ÐµÑ\83Ñ\82Ñ\80ални Ð´Ñ\83ми Ð·Ð° Ð¿Ð¾Ð», ÐºÐ¾Ð³Ð°Ñ\82о Ðµ Ð²Ñ\8aзможно",
        "gender-male": "Той редактира уики страниците",
        "gender-female": "Тя редактира уики страниците",
        "prefs-help-gender": "По желание: използва се за коректно обръщение по род в системните съобщения на софтуера. Тази информация е публично достъпна.",
        "right-sendemail": "Изпращане на е-писма до другите потребители",
        "right-passwordreset": "Преглеждане на е-писма за възстановяване на парола",
        "grant-group-email": "Изпращане на е-писмо",
+       "grant-blockusers": "Блокиране и отблокиране на потребители",
        "grant-createaccount": "Създаване на сметки",
        "grant-createeditmovepage": "Създаване, редактиране и преместване на страници",
        "grant-delete": "Изтриване на страници, редакции и записи в дневника",
        "grant-editmywatchlist": "редактиране на списъка ви за наблюдение",
        "grant-editpage": "Редактиране на съществуващи страници",
        "grant-editprotected": "Редактиране на защитени страници",
+       "grant-sendemail": "Изпращане на имейл до други потребители",
+       "grant-uploadeditmovefile": "Качване, заменяне и прехвърляне на файлове",
        "grant-uploadfile": "Качване на нови файлове",
        "grant-basic": "Основни права",
        "grant-viewdeleted": "Преглед на изтрити файлове и страници",
        "action-viewmywatchlist": "преглед на списъка ви за наблюдение",
        "action-viewmyprivateinfo": "преглеждане на личните данни",
        "action-editmyprivateinfo": "редактиране на личната си информация",
+       "action-managechangetags": "създаване и (де)активиране на етикети",
+       "action-applychangetags": "прилагане на етикетите заедно с промените ви",
        "action-purge": "почисти кеша на тази страница",
        "nchanges": "$1 {{PLURAL:$1|промяна|промени}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|от последното посещение}}",
        "sourcefilename": "Първоначално име:",
        "sourceurl": "Изходен адрес:",
        "destfilename": "Целево име:",
-       "upload-maxfilesize": "Ð\9cакÑ\81имален допустим размер на файла: $1",
+       "upload-maxfilesize": "Ð\9cакÑ\81имално допустим размер на файла: $1",
        "upload-description": "Описание на файла",
        "upload-options": "Настройки за качване",
        "watchthisupload": "Наблюдаване на файла",
        "upload-http-error": "Възникна HTTP грешка: $1",
        "upload-dialog-title": "Качване на файл",
        "upload-dialog-button-cancel": "Отказване",
+       "upload-dialog-button-back": "Обратно",
        "upload-dialog-button-done": "Готово",
        "upload-dialog-button-save": "Съхраняване",
        "upload-dialog-button-upload": "Качване",
        "apihelp-no-such-module": "Модул \"$1\" не беше намерен.",
        "apisandbox": "Пясъчник за API",
        "apisandbox-fullscreen": "Разшири полето",
+       "apisandbox-unfullscreen": "Показване на страница",
+       "apisandbox-submit": "Направи запитване",
        "apisandbox-reset": "Изчистване",
        "apisandbox-retry": "Повторен опит",
+       "apisandbox-loading": "Зареждане на информация за API-модул \"$1\"...",
+       "apisandbox-load-error": "Възникна грешка при зареждането на информация за API-модул \"$1\": $2",
+       "apisandbox-no-parameters": "Този API-модул няма параметри.",
+       "apisandbox-helpurls": "Връзки за помощ",
        "apisandbox-examples": "Примери",
+       "apisandbox-dynamic-parameters": "Допълнителни параметри",
        "apisandbox-dynamic-parameters-add-label": "Добавяне на параметър:",
        "apisandbox-dynamic-parameters-add-placeholder": "Име на параметъра",
+       "apisandbox-dynamic-error-exists": "Параметър с име \"$1\" вече съществува.",
        "apisandbox-results": "Резултати",
        "apisandbox-request-url-label": "URL-адрес на заявката:",
+       "apisandbox-continue": "Продължаване",
+       "apisandbox-continue-clear": "Изчистване",
        "booksources": "Източници на книги",
        "booksources-search-legend": "Търсене на информация за книга",
        "booksources-search": "Търсене",
        "booksources-text": "По-долу е списъкът от връзки към други сайтове, продаващи нови и използвани книги или имащи повече информация за книгите, които търсите:",
        "booksources-invalid-isbn": "Предоставеният ISBN изглежда е невалиден; проверете за грешки и копирайте от оригиналния източник.",
        "specialloguserlabel": "Изпълнител:",
-       "speciallogtitlelabel": "Цел (заглавие или потребител):",
+       "speciallogtitlelabel": "Цел (заглавие или {{ns:user}}:потребителско име за потребител):",
        "log": "Дневници",
        "logeventslist-submit": "Показване",
        "all-logs-page": "Всички публични дневници",
        "mailnologin": "Няма електронна поща",
        "mailnologintext": "Необходимо е да [[Special:UserLogin|влезете]] и да посочите валидна електронна поща в [[Special:Preferences|настройките]] си, за да може да пращате писма на други потребители.",
        "emailuser": "Писмо до потребителя",
-       "emailuser-title-target": "Ð\98зпÑ\80аÑ\89ане Ð½Ð° Ðµ-пиÑ\81мо Ð½Ð° Ñ\82ози {{GENDER:$1|поÑ\82Ñ\80ебиÑ\82ел}}",
+       "emailuser-title-target": "Ð\9fиÑ\81мо Ð´Ð¾ {{GENDER:$1|поÑ\82Ñ\80ебиÑ\82елÑ\8f}}",
        "emailuser-title-notarget": "Изпращане на е-писмо на потребител",
        "emailpagetext": "Можете да използвате формуляра по-долу, за да изпратите електронно писмо на {{GENDER:$1|този потребител}}.\nАдресът, който се въвели в [[Special:Preferences|настройките си]], ще се появи в полето „От“ на писмото, така че получателят ще е в състояние да ви отговори директно.",
        "defemailsubject": "Писмо от потребител $1 в {{SITENAME}}",
        "watchlist-details": "{{PLURAL:$1|Една наблюдавана страница|$1 наблюдавани страници}} от списъка ви за наблюдение (без беседи).",
        "wlheader-enotif": "Известяването по е-поща е включено.",
        "wlheader-showupdated": "Страниците, които са били променени след последния път, когато сте ги посетили, са показани в '''получер'''.",
-       "wlnote": "{{PLURAL:$1|Показана е последната промяна|Показани са последните '''$1''' промени}} през {{PLURAL:$2|последния час|последните '''$2''' часа}}.",
+       "wlnote": "{{PLURAL:$1|Показана е последната промяна|Показани са последните '''$1''' промени}} през {{PLURAL:$2|последния час|последните '''$2''' часа}}, започвайки от от $3, $4.",
        "wlshowlast": "Показване на последните $1 часа $2 дни",
        "watchlist-hide": "Скриване",
        "watchlist-submit": "Показване",
        "wlshowhideanons": "анонимни потребители",
        "wlshowhidepatr": "патрулирани редакции",
        "wlshowhidemine": "моите редакции",
+       "wlshowhidecategorization": "категоризиране на страници",
        "watchlist-options": "Опции на списъка за наблюдение",
        "watching": "Наблюдение…",
        "unwatching": "Спиране на наблюдение…",
        "enotif_subject_changed": "Страницата „$1“ в {{SITENAME}} беше {{GENDER:$2|променена}} от $2",
        "enotif_body_intro_deleted": "Страницата „$1“ в {{SITENAME}} беше {{GENDER:$2|изтрита}} на $PAGEEDITDATE от $2. Вижте $3.",
        "enotif_body_intro_created": "Страницата „$1“ в {{SITENAME}} беше {{GENDER:$2|създадена}} на $PAGEEDITDATE от $2. За текущата версия, вижте $3",
+       "enotif_body_intro_moved": "Страницата „$1“ в {{SITENAME}} бе {{GENDER:$2|преместена}} на $PAGEEDITDATE от $2. За текущата версия, вижте $3.",
+       "enotif_body_intro_restored": "Страницата „$1“ в {{SITENAME}} бе {{GENDER:$2|възстановена}} на $PAGEEDITDATE от $2. За текущата версия, вижте $3.",
+       "enotif_body_intro_changed": "Страницата „$1“ в {{SITENAME}} бе {{GENDER:$2|променена}} на $PAGEEDITDATE от $2. За текущата версия, вижте $3.",
        "enotif_lastvisited": "Преглед на всички промени след последното ви посещение: $1.",
        "enotif_lastdiff": "Преглед на тази промяна: $1.",
        "enotif_anon_editor": "анонимен потребител $1",
        "alreadyrolled": "Редакцията на [[:$1]], направена от [[User:$2|$2]] ([[User talk:$2|Беседа]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]), не може да бъде отменена. Някой друг вече е редактирал страницата или е отменил промените.\n\nПоследната редакция е на [[User:$3|$3]] ([[User talk:$3|Беседа]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).",
        "editcomment": "Резюмето на редакцията беше: <em>$1</em>.",
        "revertpage": "Премахване на [[Special:Contributions/$2|редакции на $2]] ([[User talk:$2|беседа]]); възвръщане към последната версия на [[User:$1|$1]]",
-       "revertpage-nouser": "Премахнати редакции на (отстранено потребителско име) и връщане към последната версия на [[User:$1|$1]]",
+       "revertpage-nouser": "Премахнати редакции на (скрито потребителско име) и връщане към последната версия на [[User:$1|$1]]",
        "rollback-success": "Отменени редакции на $1; възвръщане към последната версия на $2.",
        "sessionfailure-title": "Прекъсната сесия",
        "sessionfailure": "Изглежда има проблем със сесията ви; действието беше отказано като предпазна мярка срещу крадене на сесията. Натиснете бутона за връщане на браузъра, презаредете страницата, от която сте дошли, и опитайте отново.",
        "sp-contributions-newbies-sub": "на нови потребители",
        "sp-contributions-newbies-title": "Потребителски приноси за нови сметки",
        "sp-contributions-blocklog": "Дневник на блокиранията",
-       "sp-contributions-deleted": "изтрити приноси на потребител",
+       "sp-contributions-deleted": "изтрити приноси на {{GENDER:$1|потребител}}",
        "sp-contributions-uploads": "качвания",
        "sp-contributions-logs": "дневници",
        "sp-contributions-talk": "беседа",
        "whatlinkshere-hideredirs": "$1 пренасочвания",
        "whatlinkshere-hidetrans": "$1 включвания",
        "whatlinkshere-hidelinks": "$1 препратки",
-       "whatlinkshere-hideimages": "$1 Ð½Ð° Ð¿Ñ\80епÑ\80аÑ\82ки ÐºÑ\8aм Ñ\84айла",
+       "whatlinkshere-hideimages": "$1 препратки към файла",
        "whatlinkshere-filters": "Филтри",
        "whatlinkshere-submit": "Отваряне",
        "autoblockid": "Автоматично блокиране #$1",
        "movenotallowedfile": "Нямате права да премествате файлове.",
        "cant-move-user-page": "Нямате нужните права на достъп, за да местите потребителски страници (можете да местите само подстраници).",
        "cant-move-to-user-page": "Нямате нужните права на достъп, за да извършвате преместване на страници върху потребителски страници (можете да местите само върху подстраници от потребителското пространство).",
+       "cant-move-category-page": "Нямате необходимите права за преместване на страници на категории.",
+       "cant-move-to-category-page": "Нямате необходимите права за преместване на страница в страница на категория.",
        "newtitle": "Ново заглавие:",
        "move-watch": "Наблюдаване на страницата",
        "movepagebtn": "Преместване",
        "tooltip-ca-nstab-category": "Преглед на категорията",
        "tooltip-minoredit": "Отбелязване на промяната като малка",
        "tooltip-save": "Съхраняване на промените",
+       "tooltip-publish": "Публикуване на промените",
        "tooltip-preview": "Предварителен преглед, използвайте го преди да съхраните!",
        "tooltip-diff": "Показване на направените от вас промени по текста",
        "tooltip-compareselectedversions": "Показване на разликите между двете избрани версии на страницата",
        "pageinfo-article-id": "Номер на страницата",
        "pageinfo-language": "Език на съдържанието на страницата",
        "pageinfo-content-model": "Модел на съдържанието на страницата",
+       "pageinfo-content-model-change": "промяна",
        "pageinfo-robot-policy": "Индексиране от роботи",
        "pageinfo-robot-index": "Позволено",
        "pageinfo-robot-noindex": "Непозволено",
        "pageinfo-category-files": "Брой файлове",
        "markaspatrolleddiff": "Отбелязване като проверена редакция",
        "markaspatrolledtext": "Отбелязване на редакцията като проверена",
+       "markaspatrolledtext-file": "Маркирай версията на файла като проверена",
        "markedaspatrolled": "Проверена редакция",
        "markedaspatrolledtext": "Избраната редакция на [[:$1]] беше отбелязана като патрулирана.",
        "rcpatroldisabled": "Патрулът е деактивиран",
        "svg-long-error": "Невалиден SVG файл: $1",
        "show-big-image": "Оригинален файл",
        "show-big-image-preview": "Размер на този преглед: $1.",
+       "show-big-image-preview-differ": "Размер на този $3 предварителен преглед на изходния $2 файл: $1.",
        "show-big-image-other": "{{PLURAL:$2|Друга разделителна способност|Други разделителни способности}}: $1.",
        "show-big-image-size": "$1 × $2 пиксела",
        "file-info-gif-looped": "непрекъснато повтаряне",
        "newimages-legend": "Име на файл",
        "newimages-label": "Име на файл (или част от него):",
        "newimages-showbots": "Показване на качвания от ботове",
+       "newimages-hidepatrolled": "Скрий проверените качвания",
        "noimages": "Няма нищо.",
        "ilsubmit": "Търсене",
        "bydate": "по дата",
        "exif-countrycodecreated": "Код на държавата, където е направена снимката",
        "exif-provinceorstatecreated": "Област или щат, където е направена снимката",
        "exif-citycreated": "Град, в който е направена снимката",
+       "exif-worldregiondest": "Показан регион на света",
+       "exif-countrydest": "Показана държава",
+       "exif-countrycodedest": "Код на показаната държава",
+       "exif-provinceorstatedest": "Показана провинция или щат",
+       "exif-citydest": "Показан град",
+       "exif-sublocationdest": "Показан район на града",
        "exif-objectname": "Кратко заглавие",
        "exif-specialinstructions": "Специални инструкции",
        "exif-headline": "Заглавие",
        "exif-ycbcrpositioning-1": "Центрирани",
        "exif-dc-contributor": "Сътрудници",
        "exif-dc-date": "Дата(и)",
+       "exif-dc-publisher": "Издател",
+       "exif-dc-relation": "Свързани медии",
        "exif-dc-rights": "Права",
+       "exif-dc-source": "Източник медия",
        "exif-dc-type": "Вид медия",
        "exif-isospeedratings-overflow": "По-голяма от 65535",
        "exif-iimcategory-ace": "Изкуствa, култура и забавление",
        "scarytranscludefailed": "[Зареждането на шаблона за $1 не сполучи]",
        "scarytranscludetoolong": "[Адресът е твърде дълъг]",
        "deletedwhileediting": "'''Внимание''': Страницата е била изтрита, след като сте започнали да я редактирате!",
-       "confirmrecreate": "Потребител [[Потребител:$1|$1]] ([[Потребител беседа:$1|беседа]]) е {{GENDER:$1|изтрил}} страницата, откакто сте започнали да я редактирате, като е посочил следното обяснение:\n: <em>$2</em>\nПотвърдете, че наистина желаете да създадете страницата отново.",
+       "confirmrecreate": "Потребител [[User:$1|$1]] ([[User talk:$1|беседа]]) е {{GENDER:$1|изтрил}} страницата, след като сте започнали да я редактирате, като е посочил следното обяснение:\n: <em>$2</em>\nПотвърдете, че наистина желаете да създадете страницата отново.",
        "confirmrecreate-noreason": "Потребител [[User:$1|$1]] ([[User talk:$1|беседа]]) {{GENDER:$1|изтри}} тази страница след като сте започнали да я редактирате. Необходимо е потвърждение, че наистина желаете да създадете страницата отново.",
        "recreate": "Ново създаване",
        "confirm_purge_button": "Добре",
        "watchlistedit-raw-done": "Списъкът ви за наблюдение беше обновен.",
        "watchlistedit-raw-added": "{{PLURAL:$1|1 страница беше добавена|$1 страници бяха добавени}}:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|Една страница беше премахната|$1 страници бяха премахнати}}:",
+       "watchlistedit-clear-title": "Изчистване на списъка за наблюдение",
        "watchlistedit-clear-legend": "Изчистване на списъка за наблюдение",
        "watchlistedit-clear-explain": "Всички заглавия ще бъдат премахнати от списъка ви за наблюдение",
        "watchlistedit-clear-titles": "Заглавия:",
        "tags-actions-header": "Действия",
        "tags-active-yes": "Да",
        "tags-active-no": "Не",
-       "tags-source-extension": "Дефиниран от разширение",
+       "tags-source-extension": "Дефиниран от софтуера",
+       "tags-source-manual": "Прилага се ръчно от потребители и ботове.",
        "tags-source-none": "Вече не се използва",
        "tags-edit": "редактиране",
        "tags-delete": "изтриване",
        "tags-activate": "активиране",
        "tags-deactivate": "спиране",
        "tags-hitcount": "$1 {{PLURAL:$1|промяна|промени}}",
+       "tags-manage-no-permission": "Нямате права за управление на етикети за промени.",
+       "tags-manage-blocked": "Вие не можете да управлявате етикети за промени, докато сте блокирани.",
        "tags-create-heading": "Създаване на нов етикет",
        "tags-create-explanation": "По подразбиране, новосъздадените етикети са достъпни за използване от потребители и ботове.",
        "tags-create-tag-name": "Име на етикета:",
        "tags-delete-not-found": "Етикет „$1“ не съществува.",
        "tags-activate-title": "Активиране на етикета",
        "tags-activate-reason": "Причина:",
+       "tags-activate-not-allowed": "Eтикет \"$1\" не е възможно да бъде активиран.",
        "tags-activate-not-found": "Етикет „$1“ не съществува.",
        "tags-activate-submit": "Активиране",
        "tags-deactivate-title": "Деактивиране на етикета",
        "tags-edit-chosen-placeholder": "Избиране на няколко етикета",
        "tags-edit-reason": "Причина:",
        "tags-edit-revision-submit": "Прилагане на промените към {{PLURAL:$1|тази редакция|$1 редакции}}",
+       "tags-edit-success": "Промените са приложени.",
+       "tags-edit-failure": "Промените не могат да бъдат приложени:\n$1",
        "tags-edit-nooldid-title": "Не е зададена версия",
        "comparepages": "Сравняване на страници",
        "compare-page1": "Страница 1",
        "htmlform-chosen-placeholder": "Избиране",
        "htmlform-cloner-create": "Добавяне на още",
        "htmlform-cloner-delete": "Премахване",
+       "htmlform-cloner-required": "Изисква се поне една стойност.",
+       "htmlform-date-placeholder": "ГГГГ-ММ-ДД",
+       "htmlform-time-placeholder": "ЧЧ:ММ:СС",
+       "htmlform-datetime-placeholder": "ГГГГ-ММ-ДД ЧЧ:ММ:СС",
+       "htmlform-date-invalid": "Избраната от вас стойност за дата не е разпозната. Опитайте да използвате формат ГГГГ-ММ-ДД.",
+       "htmlform-title-badnamespace": "[[:$1]] не е в именното пространство \"{{ns:$2}}\".",
        "htmlform-title-not-exists": "$1 не съществува.",
-       "sqlite-has-fts": "$1 с поддръжка на пълнотекстово търсене",
-       "sqlite-no-fts": "$1 без поддръжка на пълнотекстово търсене",
+       "htmlform-user-not-exists": "<strong>$1</strong> не съществува.",
+       "htmlform-user-not-valid": "<strong>$1</strong> не е валидно потребителско име.",
        "logentry-delete-delete": "$1 {{GENDER:$2|изтри}} страницата $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|възстанови}} страницата $3",
        "logentry-delete-revision": "$1 {{GENDER:$2|промени}} видимостта на {{PLURAL:$5|една редакция|$5 редакции}} в страница $3: $4",
        "feedback-bugornote": "Ако сте готови подробно да опишете технически проблем, моля [$1 докладвайте го тук].\nВ противен случай, можете да използвате лесния формуляр по-долу. Коментарът ви ще бъде добавен към страницата \"[$3 $2]\", наред с вашето потребителско име.",
        "feedback-cancel": "Отказване",
        "feedback-close": "Готово",
-       "feedback-error-title": "Грешка",
        "feedback-error1": "Грешка: Неразпознат резултат от API",
        "feedback-error2": "Грешка: Неуспешна редакция",
        "feedback-error3": "Грешка: Няма отговор от API",
        "feedback-submit": "Изпращане",
        "feedback-thanks": "Благодарности! Вашата обратна информация е публикувана на страницата „[$2  $1]“.",
        "feedback-thanks-title": "Благодарим ви!",
-       "searchsuggest-search": "Търсене",
+       "searchsuggest-search": "Търсене в {{SITENAME}}",
        "searchsuggest-containing": "съдържа...",
+       "api-error-autoblocked": "Вашият IP адрес е блокиран автоматично, тъй като е бил използван от блокиран потребител.",
        "api-error-badaccess-groups": "Нямате необходимите права, за да качвате файлове в това уики.",
        "api-error-badtoken": "Вътрешна грешка: неправилен маркер.",
+       "api-error-blocked": "Блокирани сте да редактирате.",
        "api-error-copyuploaddisabled": "Качването през URL е забранено на този сървър.",
        "api-error-duplicate": "На сайта вече има {{PLURAL:$1|качен друг файл|качени други файлове}} с идентично съдържание.",
        "api-error-duplicate-archive": "На сайта вече е имало {{PLURAL:$1|качен друг файл|качени други файла}} с идентично съдържание, {{PLURAL:$1|който е бил изтрит|които са били изтрити}}.",
        "expand_templates_generate_xml": "Показване на дървото от разбора на XML",
        "expand_templates_generate_rawhtml": "Показване на суров HTML",
        "expand_templates_preview": "Преглед",
+       "pagelanguage": "Промяна на езика на страницата",
        "pagelang-name": "Страница",
        "pagelang-language": "Език",
        "pagelang-use-default": "Използване на езика по подразбиране",
        "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 (<strong>изключено</strong>)",
        "mediastatistics": "Медия статистики",
        "mediastatistics-table-mimetype": "MIME тип",
+       "mediastatistics-table-extensions": "Възможни разширения",
+       "mediastatistics-table-count": "Брой файлове",
+       "mediastatistics-table-totalbytes": "Общ размер",
+       "mediastatistics-header-unknown": "Неизвестно",
+       "mediastatistics-header-bitmap": "Растерни изображения",
+       "mediastatistics-header-drawing": "Чертежи (векторни изображения)",
        "mediastatistics-header-audio": "Аудио",
        "mediastatistics-header-video": "Видео",
+       "mediastatistics-header-multimedia": "Мултимедия",
        "mediastatistics-header-total": "Всички файлове",
        "json-error-syntax": "Синтактична грешка",
        "headline-anchor-title": "Препратка към този раздел",
        "log-action-filter-block-block": "Блокиране",
        "log-action-filter-block-reblock": "Промяна на блокирането",
        "log-action-filter-block-unblock": "Отблокиране",
+       "log-action-filter-delete-delete": "Изтриване на страница",
+       "log-action-filter-delete-restore": "Възстановяване на страница",
+       "log-action-filter-managetags-delete": "Премахване на етикет",
+       "log-action-filter-managetags-activate": "Активиране на етикет",
+       "log-action-filter-managetags-deactivate": "Деактивиране на етикет",
        "log-action-filter-upload-upload": "Ново качване",
        "log-action-filter-upload-overwrite": "Повторно качване",
        "authmanager-authplugin-setpass-bad-domain": "Невалиден домейн.",
        "authmanager-provider-temporarypassword": "Временна парола",
        "authprovider-resetpass-skip-label": "Пропусни",
        "specialpage-securitylevel-not-allowed-title": "Не е позволено",
-       "cannotauth-not-allowed-title": "Достъпът е отказан"
+       "cannotauth-not-allowed-title": "Достъпът е отказан",
+       "edit-error-short": "Грешка: $1",
+       "edit-error-long": "Грешки:\n\n$1"
 }
index 65e1021..61c1ed8 100644 (file)
@@ -58,7 +58,7 @@
        "tog-enotifminoredits": "পাতা এবং ফাইলগুলোতে অনুল্লেখ্য সম্পাদনার জন্যও আমাকে ই-মেইল করা হোক",
        "tog-enotifrevealaddr": "বিজ্ঞপ্তি মেইলে আমার ই-মেইল ঠিকানা প্রকাশ করা হোক",
        "tog-shownumberswatching": "নজরদারী করছে, এমন ব্যবহারকারীর সংখ্যা দেখানো হোক",
-       "tog-oldsig": "বর্তমান স্বাক্ষর:",
+       "tog-oldsig": "à¦\86পনার à¦¬à¦°à§\8dতমান à¦¸à§\8dবাà¦\95à§\8dষর:",
        "tog-fancysig": "স্বাক্ষরকে উইকিটেক্সট হিসেবে মনে করুন (কোন সয়ংক্রিয় লিঙ্ক ছাড়া)",
        "tog-uselivepreview": "তাৎক্ষণিক প্রাকদর্শন ব্যবহার করো",
        "tog-forceeditsummary": "খালি সম্পাদনা সারাংশ প্রবেশ করানোর সময় আমাকে জানানো হোক",
@@ -75,7 +75,7 @@
        "tog-showhiddencats": "লুকায়িত বিষয়শ্রেণীসমূহ দেখাও",
        "tog-norollbackdiff": "রোলব্যাকের পরে পার্থক্য দেখিও না",
        "tog-useeditwarning": "অসংরক্ষিত পরিবর্তনসহ কোনো পাতা ত্যাগের সময় সাবধান করো",
-       "tog-prefershttps": "যà¦\96নà¦\87 à¦ªà§\8dরবà§\87শ à¦\95রবà§\87ন সবসময় নিরাপদ সংযোগ ব্যবহার করুন",
+       "tog-prefershttps": "পà§\8dরবà§\87শ à¦\95রার à¦¸à¦®à¦¯à¦¼ সবসময় নিরাপদ সংযোগ ব্যবহার করুন",
        "underline-always": "সব সময়",
        "underline-never": "কখনো নয়",
        "underline-default": "স্কিন অথবা ব্রাউজারে যেমনভাবে নির্দিষ্ট করা আছে",
        "newwindow": "(নতুন উইন্ডোতে খুলবে)",
        "cancel": "বাতিল",
        "moredotdotdot": "আরও...",
-       "morenotlisted": "à¦\8fà¦\9fি à¦\8fà¦\95à¦\9fি à¦\85সমà§\8dপà§\82রà§\8dণ à¦¤à¦¾à¦²à¦¿à¦\95া।",
+       "morenotlisted": "à¦\8fà¦\87 à¦¤à¦¾à¦²à¦¿à¦\95াà¦\9fি à¦\85সমà§\8dপà§\82রà§\8dণ à¦¹à¦¤à§\87 à¦ªà¦¾à¦°à§\87।",
        "mypage": " পাতা",
        "mytalk": "আলোচনা",
        "anontalk": "আলাপ",
        "talk": "আলোচনা",
        "views": "দৃষ্টিকোণ",
        "toolbox": "সরঞ্জাম",
+       "tool-link-userrights": "{{GENDER:$1|ব্যবহারকারী}} দল পরিবর্তন করুন",
+       "tool-link-emailuser": "এই {{GENDER:$1|ব্যবহারকারী}}কে ইমেইল পাঠান",
        "userpage": "ব্যাবহারকারীর পাতা দেখুন",
        "projectpage": "মেটা-পাতা দেখুন",
        "imagepage": "ফাইল পাতা দেখুন",
        "userlogin-remembermypassword": "আমাকে প্রবেশ অবস্থায় রাখো",
        "userlogin-signwithsecure": "নিরাপদ সংযোগ ব্যবহার করুন",
        "cannotlogin-title": "প্রবেশ করতে পারবেন না",
+       "cannotlogin-text": "প্রবেশ করা সম্ভব নয়।",
        "cannotloginnow-title": "এখন প্রবেশ করা যাবে না",
        "cannotloginnow-text": "$1 ব্যবহার করার সময় প্রবেশ করা সম্ভব নয়।",
        "cannotcreateaccount-title": "অ্যাকাউন্ট তৈরি করা যাবে না",
+       "cannotcreateaccount-text": "সরাসরি অ্যাকাউন্ট সৃষ্টিকরণ এই উইকিতে সক্রিয় নয়।",
        "yourdomainname": "আপনার ডোমেইন:",
        "password-change-forbidden": "আপনি এই উইকিতে পাসওয়ার্ড পরিবর্তন করতে পারবেন না।",
        "externaldberror": "হয় কোন বহিঃস্থ যাচাইকরণ ডাটাবেজ ত্রুটি ঘটেছে অথবা আপনার বহিঃস্থ অ্যাকাউন্ট হালনাগাদ করার অনুমতি নেই।",
        "eauthentsent": "মনোনীত ই-মেইল ঠিকানায় একটি নিশ্চিতকরণ ই-মেইল পাঠানো হয়েছে।\nঐ অ্যাকাউন্টটে অন্য কোন ই-মেইল পাঠানোর আগে আপনাকে ই-মেইলের নির্দেশগুলি অনুসরণ করতে হবে, যাতে অ্যাকাউন্টটি যে আসলেই আপনার, তা নিশ্চিত হয়।",
        "throttled-mailpassword": "বিগত {{PLURAL:$1|ঘণ্টার|$1 ঘণ্টার}} মধ্যে ইতিমধ্যেই একবার পাসওয়ার্ড বদলের তথ্য পাঠানো হয়েছে। অপব্যবহার রোধে প্রতি {{PLURAL:$1|ঘণ্টায়|$1 ঘণ্টায়}} কেবল একবার পাসওয়ার্ড বদলের তথ্য পাঠানো যাবে।",
        "mailerror": "ইমেইল পাঠাতে সমস্যা: $1",
-       "acct_creation_throttle_hit": "কেউ আপনার আইপি ঠিকানা ব্যবহার করে বিগত সময়ে {{PLURAL:$1|১টি অ্যাকাউন্ট|$1টি অ্যাকাউন্ট}} তৈরি করেছেন, যা এই সময়ের জন্য সর্বোচ্চ অনুমোদনকৃত। ফলে, এই আইপি ঠিকানা থেকে কেউ এই মুহুর্তে নতুন অ্যাকাউন্ট তৈরি করতে পারবে না।",
+       "acct_creation_throttle_hit": "কেউ আপনার আইপি ঠিকানা ব্যবহার করে বিগত $2 {{PLURAL:$1|১টি অ্যাকাউন্ট|$1টি অ্যাকাউন্ট}} তৈরি করেছেন, যা এই সময়ের জন্য সর্বোচ্চ অনুমোদনকৃত। ফলে, এই আইপি ঠিকানা থেকে কেউ এই মুহুর্তে নতুন অ্যাকাউন্ট তৈরি করতে পারবে না।",
        "emailauthenticated": "আপনার ইমেইল ঠিকানাটি $2 তারিখের $3 এ নিশ্চিত করা হয়েছে।",
        "emailnotauthenticated": "আপনার ই-মেইলের ঠিকানা এখনও যাচাই করা হয়নি।\nনিচের বৈশিষ্ট্যগুলোর (features) জন্য কোনো ই-মেইল পাঠানো হবে না।",
        "noemailprefs": "এই বৈশিষ্টটি কাজ করাতে হলে একটি ই-মেইল ঠিকানা নির্ধারণ করতে হবে।",
        "botpasswords": "বট পাসওয়ার্ড",
        "botpasswords-disabled": "বট পাসওয়ার্ড নিষ্ক্রিয় করা।",
        "botpasswords-no-central-id": "বট পাসওয়ার্ড ব্যবহার করার জন্য, আপনাকে একটি কেন্দ্রীভূত অ্যাকাউন্টে প্রবেশ করতে হবে।",
+       "botpasswords-existing": "বিদ্যমান বট শব্দচাবি",
        "botpasswords-createnew": "একটি নতুন বট পাসওয়ার্ড তৈরি করুন",
+       "botpasswords-editexisting": "একটি বিদ্যমান বট পাসওয়ার্ড পরিবর্তন করুন",
        "botpasswords-label-appid": "বটের নাম:",
        "botpasswords-label-create": "তৈরি করো",
        "botpasswords-label-update": "হালনাগাদ",
        "botpasswords-label-delete": "অপসারণ",
        "botpasswords-label-resetpassword": "পাসওয়ার্ড পুনঃস্থাপন",
        "botpasswords-label-grants": "প্রয়োগযোগ্য মঞ্জুরি:",
-       "botpasswords-label-restrictions": "ব্যবহারের সীমাবদ্ধতা:",
        "botpasswords-label-grants-column": "অনুমোদিত",
        "botpasswords-bad-appid": "\"$1\" বট নামটি সঠিক নয়।",
        "botpasswords-insert-failed": "\"$1\" নামের বট যুক্ত করা যায়নি। আগে থেকেই তালিকায় রয়েছে?",
        "botpasswords-deleted-title": "বট পাসওয়ার্ড অপসারণ করা হয়েছে",
        "botpasswords-deleted-body": "ব্যবহারকারী \"$2\"-এর \"$1\" নামের বটের জন্য বট পাসওয়ার্ড মুছে ফেলা হয়েছিল।",
        "botpasswords-no-provider": "BotPasswordsSessionProvider উপলব্ধ নয়।",
+       "botpasswords-restriction-failed": "বট পাসওয়ার্ডের সীমাবদ্ধতা এই প্রবেশ প্রতিরোধ করেছে।",
+       "botpasswords-not-exist": "ব্যবহারকারী \"$1\"-এর \"$2\" নামক বট পাসওয়ার্ডটি নেই।",
        "resetpass_forbidden": "পাসওয়ার্ড পরিবর্তন করা সম্ভব নয়",
        "resetpass_forbidden-reason": "পাসওয়ার্ড পরিবর্তন করা যাবে না: $1",
        "resetpass-no-info": "এই পাতাটিতে সরাসরি প্রবেশাধিকার পেতে আপনাকে অবশ্যই প্রবেশ করতে হবে।",
        "passwordreset-emailelement": "ব্যবহারকারী নাম: \n$1\n\nঅস্থায়ী পাসওয়ার্ড: \n$2",
        "passwordreset-emailsentemail": "যদি এই ই-মেইল ঠিকানা আপনার অ্যাকাউন্টের সাথে সংযুক্ত করা থাকে, তাহলে একটি পাসওয়ার্ড বদলের ইমেইল পাঠানো হবে।",
        "passwordreset-emailsentusername": "যদি এই ব্যবহারকারী নামের সাথে ই-মেইল ঠিকানা সংযুক্ত করা থাকে, তাহলে একটি পাসওয়ার্ড বদলের ইমেইল পাঠানো হবে।",
+       "passwordreset-emailsent-capture2": "পাসওয়ার্ড পুনঃধার্যকরণের {{PLURAL:$1|ইমেইল পাঠানো}} হয়েছে। {{PLURAL:$1|ব্যবহারকারী নাম ও পাসওয়ার্ড|ব্যবহারকারী নাম ও পাসওয়ার্ডের তালিকা}} এখানে দেখা যাবে।",
+       "passwordreset-emailerror-capture2": "{{GENDER:$2|ব্যবহারকারীকে}} ইমেইল পাঠানো যায়নি: $1 {{PLURAL:$3|ব্যবহারকারী নাম ও পাসওয়ার্ড|ব্যবহারকারী নাম ও পাসওয়ার্ডের তালিকা}} এখানে দেখা যাবে।",
        "passwordreset-nocaller": "একটি আহ্বানকারী প্রদান করা আবশ্যক",
        "passwordreset-nosuchcaller": "আহ্বানকারীর অস্তিত্ব নেই: $1",
+       "passwordreset-ignored": "পাসওয়ার্ড পুনঃধার্যকরণ করা যায়নি। হয়তো কোন প্রদানকারী কনফিগার করা হয়েনি?",
        "passwordreset-invalideamil": "ভুল ইমেইল ঠিকানা",
        "passwordreset-nodata": "একটি ব্যবহারকারীর নাম বা একটি ইমেল ঠিকানা দুটির একটিও সরবরা দেয়া হয়নি",
        "changeemail": "ই-মেইল ঠিকানা পরিবর্তন বা বাতিল",
        "changeemail-no-info": "এই পাতাটিতে সরাসরি প্রবেশাধিকার পেতে আপনাকে অবশ্যই প্রবেশ করতে হবে।",
        "changeemail-oldemail": "বর্তমান ই-মেইল ঠিকানা:",
        "changeemail-newemail": "নতুন ই-মেইল ঠিকানা:",
+       "changeemail-newemail-help": "আপনার ইমেইল ঠিকানা অপসরণ করতে চাইলে এই জায়গাটি ফাঁকা ছেড়ে দেওয়া উচিত। ইমেইল ঠিকানা অপসরণ করলে আপনি ভুলে যাওয়া পাসওয়ার্ড পুনঃধার্য করতে পারবেন না এবং এই উইকি থেকে আপনাকে কোন ইমেইল পাঠানো হবে না।",
        "changeemail-none": "(কিছু নাই)",
        "changeemail-password": "আপনার {{SITENAME}} পাসওয়ার্ড:",
        "changeemail-submit": "ই-মেইল পরিবর্তন",
        "permissionserrors": "অনুমতি ত্রুটিসমূহ",
        "permissionserrorstext": "আপনার এটা করার অনুমতি নেই, নিচের {{PLURAL:$1|টি কারণের|টি কারণের}} জন্য:",
        "permissionserrorstext-withaction": "আপনার $2 অনুমতি নেই, যার {{PLURAL:$1|কারণ|কারণসমূহ}} হল:",
+       "contentmodelediterror": "আপনি এই পুনর্বিবেচনা সম্পাদনা করতে পারবেন না কারণ এর বিষয়বস্তু মডেল <code>$1</code>, যা বর্তমান বিষয়বস্তু মডেল <code>$2</code>-এর থেকে ভিন্ন।",
        "recreate-moveddeleted-warn": "'''সতর্কীকরণ: আপনি এমন একটি পাতা পুনরায় তৈরি করছেন যা পূর্বে অপসারণ করা হয়েছিল।'''\n\nআপনি পাতাটি সম্পাদনা চালিয়ে যাওয়া ঠিক হবে কিনা, তা বিবেচনা করুন।\nআপনার সুবিধার্থে পাতাটির অপলুপ্তি লগ এখানে দেয়া হলো:",
        "moveddeleted-notice": "এই পাতাটি অপসারণ করা হয়েছে।\nসূত্র হিসেবে নিচে এ পাতার অবলুপ্তি লগ দেওয়া হলো।",
        "moveddeleted-notice-recent": "দুঃখিত, এই পাতাটি সাম্প্রতি অপসারিত হয়েছে (সর্বশেষ ২৪ ঘণ্টায়)।\nসূত্র হিসেবে নিচে এই পাতা অপসারণ ও স্থানান্তর লগ দেয়া হয়েছে।",
        "invalid-content-data": "ভুল কন্টেন্ট ডাটা",
        "content-not-allowed-here": "\"$1\" কন্টেন্টটি [[$2]] পাতায় অনুমোদিত নয়",
        "editwarning-warning": "এই পাতাটি ত্যাগ করলে আপনার আপনার করা পরিবর্তনগুলো হারিয়ে যেতে পারে।\nআপনি যদি প্রবেশ করা থাকেন, আপনি এই সতর্কীকরণ বার্তাটি আপনার পছন্দের \"সম্পাদনা\" অনুচ্ছেদ থেকে নিস্ক্রিয় করতে পারেন।",
+       "editpage-invalidcontentmodel-title": "বিষয়বস্তু মডেল সমর্থিত নয়",
+       "editpage-invalidcontentmodel-text": "এই \"$1\" বিষয়বস্তু মডেলটি অসমর্থিত।",
        "editpage-notsupportedcontentformat-title": "উল্লেখিত পদ্ধতি সমর্থনযোগ্য নয়।",
        "editpage-notsupportedcontentformat-text": "$1 লেখার ফরম্যাট, $2 কন্টেন্ট মডেলের উপযোগী নয়।",
        "content-model-wikitext": "উইকিটেক্সট",
        "mergehistory-fail-bad-timestamp": "সময়তারিখ অবৈধ।",
        "mergehistory-fail-invalid-source": "উত্স পাতা অবৈধ।",
        "mergehistory-fail-invalid-dest": "গন্তব্য পাতা অবৈধ।",
+       "mergehistory-fail-no-change": "ইতিহাস একত্রীকরণ কোন পুনর্বিবেচনা একত্রিত করে না। দয়া করে পাতা এবং সময় পরামিতি আবার পরীক্ষা করুন।",
        "mergehistory-fail-permission": "ইতিহাস একত্রীকরণের জন্য পর্যাপ্ত অনুমতি নেই।",
        "mergehistory-fail-self-merge": "উৎস এবং গন্তব্য পাতা একই।",
        "mergehistory-fail-toobig": "ইতিহাস থেকে আগের পাতাগুলো একীকরণ সম্ভব নয়, কারণ এর ফলে সর্বোচ্চ $1 টি {{PLURAL:$1|সংস্করণ}} স্থানান্তরের সীমানা অতিক্রম করবে।",
        "searchprofile-advanced-tooltip": "স্বনির্ধারিত নামস্থানে অনুসন্ধান করো",
        "search-result-size": "$1 ({{PLURAL:$2|১টি শব্দ|$2টি শব্দ}})",
        "search-result-category-size": "{{PLURAL:$1 |১টি সদস্য |$1টি সদস্য}} ({{PLURAL:$2 |১টি উপবিষয়শ্রেণী|$2টি উপবিষয়শ্রেণী}}, {{PLURAL:$3 |১টি ফাইল |$3টি ফাইল}})",
-       "search-redirect": "(পুনর্নিদেশনা $1)",
+       "search-redirect": "($1 থেকে পুনর্নির্দেশিত)",
        "search-section": "(অনুচ্ছেদ $1)",
        "search-category": "(বিষয়শ্রেণী $1)",
        "search-file-match": "(নথির বিষয়বস্তু মিলে যায়)",
        "userrights-removed-self": "আপনি আপনার নিজের অধিকার পরিবর্তন করেছেন। এর ফলে এখন থেকে আপনি আর এই পাতায় প্রবেশ করতে পারবেন না।",
        "group": "দল:",
        "group-user": "ব্যবহারকারীগণ",
-       "group-autoconfirmed": "সà§\8dবয়à¦\82à¦\95à§\8dরিয়ভাবà§\87 à¦¨à¦¿à¦¶à§\8dà¦\9aিতà¦\95à§\83ত à¦¬à§\8dযবহারà¦\95ারà§\80রা",
+       "group-autoconfirmed": "সà§\8dবয়à¦\82নিশà§\8dà¦\9aিতà¦\95à§\83ত à¦¬à§\8dযবহারà¦\95ারà§\80à¦\97ণ",
        "group-bot": "বট",
        "group-sysop": "প্রশাসক",
        "group-bureaucrat": "ব্যুরোক্র্যাট",
        "right-changetags": "নির্দিষ্ট সংস্করণ এবং দীর্ঘ সম্পাদনাগুলোতে [[Special:Tags|ট্যাগ]] সংযোজন ও অপসারণ করুন",
        "right-deletechangetags": "ডাটাবেজ থেকে [[Special:Tags|ট্যাগ]] অপসারণ করা",
        "grant-group-email": "ইমেইল পাঠান",
+       "grant-group-customization": "অনুকূলকরণ ও পছন্দ",
+       "grant-group-administration": "প্রশাসনিক কাজ সঞ্চালন করুন",
        "grant-group-private-information": "আপনার সম্পর্কিত ব্যক্তিগত তথ্যে প্রবেশাধিকার পায়",
        "grant-group-other": "বিবিধ কার্যকলাপ",
+       "grant-blockusers": "বাধা দেওয়া ও মুক্ত ব্যবহারকারীগণ",
        "grant-createaccount": "অ্যাকাউন্ট তৈরি করুন",
        "grant-createeditmovepage": "পাতা তৈরি, সম্পাদনা এবং স্থানান্তর করুন",
+       "grant-delete": "পাতা, পুনর্বিবেচনা ও লগ ভুক্তিসমূহ মুছে ফেলুন।",
+       "grant-editinterface": "মিডিয়াউইকি নামস্থান এবং ব্যবহারকারীর সিএসএস/জাভাস্ক্রিপ্ট সম্পাদনা করে",
        "grant-editmycssjs": "আপনার সিএসএস/জাভাস্ক্রিপ্ট সম্পাদনা করুন",
        "grant-editmyoptions": "আপনার ব্যবহারকারী পছন্দসমূহ সম্পাদনা করুন",
        "grant-editmywatchlist": "আপনার নজরতালিকা সম্পাদনা করুন",
+       "grant-editpage": "বিদ্যমান পাতা সম্পাদনা করুন",
        "grant-editprotected": "সংরক্ষিত পাতা সম্পাদনা করুন",
        "grant-privateinfo": "ব্যক্তিগত তথ্যে প্রবেশাধিকার",
        "grant-sendemail": "অন্য ব্যবহারকারীকে ইমেইল পাঠান",
        "upload-dialog-disabled": "এই ডায়ালগ ব্যবহার করে ফাইল আপলোড করা এই উইকিতে নিষ্ক্রিয় করা হয়েছে।",
        "upload-dialog-title": "ফাইল আপলোড করুন",
        "upload-dialog-button-cancel": "বাতিল",
+       "upload-dialog-button-back": "পিছনে",
        "upload-dialog-button-done": "সম্পন্ন",
        "upload-dialog-button-save": "সংরক্ষণ",
        "upload-dialog-button-upload": "আপলোড",
        "apisandbox-dynamic-parameters": "অতিরিক্ত প্যারামিটার",
        "apisandbox-dynamic-parameters-add-label": "প্যারামিটার যোগ করুন:",
        "apisandbox-dynamic-parameters-add-placeholder": "প্যারামিটারের নাম",
+       "apisandbox-dynamic-error-exists": "\"$1\" নামক একটি প্যারামিটার আগে থেকেই বিদ্যমান।",
        "apisandbox-results": "ফলাফল",
        "apisandbox-sending-request": "API অনুরোধ পাঠানো হচ্ছে...",
        "apisandbox-loading-results": "API ফলাফল গ্রহণ করা হচ্ছে...",
        "apisandbox-request-url-label": "অনুরোধের URL:",
        "apisandbox-request-time": "অনুরোধের সময়: {{PLURAL:$1|$1 মি.সে.}}",
+       "apisandbox-continue": "অব্যাহত",
+       "apisandbox-continue-clear": "পরিস্কার",
        "booksources": "বইয়ের উৎস",
        "booksources-search-legend": "বইয়ের উৎসের জন্য অনুসন্ধান করা হোক",
        "booksources-isbn": "আইএসবিএন:",
        "pageinfo-category-pages": "পাতার সংখ্যা",
        "pageinfo-category-subcats": "উপবিষয়শ্রেণীর সংখ্যা",
        "pageinfo-category-files": "ফাইলের সংখ্যা",
+       "pageinfo-user-id": "ব্যবহারকারী আইডি",
        "markaspatrolleddiff": "পরীক্ষিত হিসেবে চিহ্নিত করুন",
        "markaspatrolledtext": "এই পাতাটি পরীক্ষিত হিসেবে চিহ্নিত করুন",
        "markaspatrolledtext-file": "এই ফাইলের সংস্করণ পরীক্ষিত হিসেবে চিহ্নিত করুন",
        "newimages-showbots": "বটের আপলোড গুলো দেখাও।",
        "newimages-hidepatrolled": "টহলকৃত আপলোড আড়াল করো",
        "noimages": "দেখার মত কিছু নেই।",
+       "gallery-slideshow-toggle": "থাম্বনেল ভাসান",
        "ilsubmit": "অনুসন্ধান",
        "bydate": "তারিখ অনুযায়ী",
        "sp-newimages-showfrom": "$2, $1 এর পরের নতুন ছবিগুলো দেখাও",
+       "seconds-abbrev": "$1 সে",
        "minutes-abbrev": "$1 মিনিট",
+       "hours-abbrev": "$1 ঘ",
+       "days-abbrev": "$1 দিন",
        "seconds": "{{PLURAL:$1|$1 সেকেন্ড|$1 সেকেন্ড}}",
        "minutes": "{{PLURAL:$1|$1 মিনিট|$1 মিনিট}}",
        "hours": "{{PLURAL:$1|$1 ঘণ্টা|$1 ঘণ্টা}}",
        "confirmemail_body_set": "কেউ একজন, সম্ভবত আপনি, $1 আইপি ঠিকানা থেকে,\n{{SITENAME}}-এ \"$2\" অ্যকাউন্টের ইমেইল ঠিকানা নির্ধারণ করেছেন।\n\nএই অ্যাকাউন্টটি যে আসলেই আপনার তা নিশ্চিত করার জন্য এবং {{SITENAME}}-এ ইমেইল বৈশিষ্ট্যগুলো সক্রিয় করার জন্য আপনার ব্রাউজারে এই সংযোগটি খুলুন:\n\n$3\n\nযদি আপনি এই ব্যক্তি *না* হন, তাহলে ইমেইল ঠিকানা নিশ্চিতকরণ বাতিল করতে এই লিঙ্কটি অনুসরণ করুন\"\n\n$5\n\n$4-এ নিশ্চিতকরণ কোডটি মেয়াদোত্তীর্ণ হয়ে যাবে।",
        "confirmemail_invalidated": "ইমেইল ঠিকানা নিশ্চিতকরণ বাতিল হয়েছে",
        "invalidateemail": "ইমেইল নিশ্চিতকরণ বাতিল করুন",
+       "notificationemail_subject_changed": "{{SITENAME}}-এ নিবন্ধীকৃত ইমেল ঠিকানা পরিবর্তন করা হয়েছে",
+       "notificationemail_subject_removed": "{{SITENAME}}-এ নিবন্ধীকৃত ইমেল ঠিকানা সরানো হয়েছে",
        "scarytranscludedisabled": "[আন্তঃউইকি আন্তঃভুক্তি নিষ্ক্রিয়]",
        "scarytranscludefailed": "[$1 এর জন্য টেমপ্লেট আনা অসফল হয়েছে]",
        "scarytranscludefailed-httpstatus": "[$1: HTTP $2 এর জন্য টেমপ্লেট আনা বিফল হয়েছে]",
        "tags-delete-reason": "কারণ:",
        "tags-delete-submit": "অপরিবর্তনীয় এই ট্যাগ অপসারন করো",
        "tags-delete-not-found": "\"$1\" ট্যাগ বিদ্যমান নয়।",
+       "tags-delete-no-permission": "আপনার পরিবর্তন ট্যাগ মুছে ফেলার অনুমতি নেই।",
        "tags-activate-title": "সক্রিয় ট্যাগ",
        "tags-activate-question": "আপনি ট্যাগ \"$1\" সক্রিয় করতে চলেছেন।",
        "tags-activate-reason": "কারণ:",
        "htmlform-cloner-create": "আরও যোগ করুন",
        "htmlform-cloner-delete": "অপসারণ",
        "htmlform-cloner-required": "অন্তত একটি মূল্য আবশ্যক।",
+       "htmlform-date-placeholder": "বববব-মম-দদ",
+       "htmlform-time-placeholder": "ঘঘ:মম:সস",
+       "htmlform-datetime-placeholder": "বববব-মম-দদ ঘঘ:মম:সস",
        "htmlform-title-badnamespace": "[[:$1]] \"{{ns:$2}}\" নামস্থানে খুঁজে পাওয়া যায়নি।",
        "htmlform-title-not-creatable": "\"$1\" সৃষ্টিযোগ্য পাতার শিরোনাম নয়",
        "htmlform-title-not-exists": "$1-এর অস্তিত্ব নেই।",
        "htmlform-user-not-exists": "<strong>$1</strong>-এর অস্তিত্ব নেই।",
        "htmlform-user-not-valid": "<strong>$1</strong> একটি বৈধ ব্যবহারকারীর নাম নয়।",
-       "sqlite-has-fts": "$1 সহ পূর্ণ-পাঠ্য অনুসন্ধান সমর্থন",
-       "sqlite-no-fts": "$1 বাদে পূর্ণ-পাঠ্য অনুসন্ধান সমর্থন",
        "logentry-delete-delete": "$1 কর্তৃক $3 পাতাটি অপসারিত হয়েছে",
        "logentry-delete-restore": "$1 কর্তৃক $3 পাতাটি {{GENDER:$2|ফিরিয়ে আনা}} হয়েছে",
        "logentry-delete-event": "$1 {{PLURAL:$5|একটি লগ ইভেন্টের|$5 লগ ইভেন্টসমূহের}} দৃশ্যমানতা {{GENDER:$2|পরিবর্তন}} করেছেন $3: $4",
        "feedback-external-bug-report-button": "প্রযুক্তিগত কাজ ফাইল করুন",
        "feedback-dialog-title": "প্রতিক্রিয়া জমা দিন",
        "feedback-dialog-intro": "আপনি আপনার প্রতিক্রিয়া জানাতে নীচের সহজ ফরম ব্যবহার করতে পারেন। আপনার মন্তব্য আপনার ব্যবহারকারী নামসহ, \"$1\" পাতায় যোগ করা হবে।",
-       "feedback-error-title": "ত্রুটি",
        "feedback-error1": "ত্রুটি: এপিআই হতে অজানা ফলাফল এসেছে",
        "feedback-error2": "ত্রুটি: সম্পাদনা ব্যর্থ",
        "feedback-error3": "ত্রুটি: এপিআই হতে কোন সাড়া নেই",
        "feedback-thanks": "ধন্যবাদ! আপনার প্রতিক্রিয়া \"[$2 $1]\" পাতায় পোস্ট করা হয়েছে।",
        "feedback-thanks-title": "আপনাকে ধন্যবাদ!",
        "feedback-useragent": "ব্যবহারকারী এজেন্ট:",
-       "searchsuggest-search": "অনুসন্ধান",
+       "searchsuggest-search": "{{SITENAME}} অনুসন্ধান",
        "searchsuggest-containing": "যা আছে...",
        "api-error-badaccess-groups": "আপনার এই উইকিতে ফাইল আপলোডের অনুমতি নেই।",
        "api-error-badtoken": "অভ্যন্তরীণ ত্রুটি: খারাপ টোকেন।",
        "mediastatistics-header-drawing": "অংকন (ভেক্টর চিত্র)",
        "mediastatistics-header-audio": "অডিও",
        "mediastatistics-header-video": "ভিডিও",
+       "mediastatistics-header-multimedia": "মিডিয়া",
        "mediastatistics-header-office": "অফিস",
+       "mediastatistics-header-text": "পাঠগত",
+       "mediastatistics-header-executable": "সঞ্চালনযোগ্য",
        "mediastatistics-header-archive": "সংকুচিত বিন্যাস",
        "mediastatistics-header-total": "সকল ফাইল",
        "json-warn-trailing-comma": "JSON থেকে $1টি সর্বশেষ {{PLURAL:$1|কমা}} সরানো হয়েছে",
        "log-action-filter-patrol": "টহলের ধরন:",
        "log-action-filter-protect": "সুরক্ষার ধরন:",
        "log-action-filter-rights": "অধিকার পরিবর্তনের ধরন:",
+       "log-action-filter-suppress": "দমনের ধরন:",
        "log-action-filter-upload": "আপলোডের ধরন:",
        "log-action-filter-all": "সব",
        "log-action-filter-block-block": "বাধাদান",
        "log-action-filter-block-reblock": "বাধাদান পরিবর্তন",
        "log-action-filter-block-unblock": "বাধা অপসারণ",
+       "log-action-filter-contentmodel-change": "বিষয়বস্তুর মডেল পরিবর্তন",
        "log-action-filter-delete-delete": "পাতা অপসারণ",
        "log-action-filter-delete-restore": "পাতা পুনঃরুদ্ধার",
        "log-action-filter-delete-event": "লগ অপসারণ",
        "log-action-filter-upload-upload": "নতুন আপলোড",
        "log-action-filter-upload-overwrite": "পুনঃআপলোড",
        "authmanager-authn-no-primary": "সরবরাহকৃত পরিচয়পত্রের অনুমোদন যাচাই করা যায়নি।",
+       "authmanager-authn-autocreate-failed": "একটি স্থানীয় অ্যাকাউন্টের স্বয়ংক্রিয়-সৃষ্টি ব্যর্থ হয়েছে: $1",
        "authmanager-create-disabled": "অ্যাকাউন্ট সৃষ্টিকরণ নিষ্ক্রিয় করা হয়েছে।",
        "authmanager-create-from-login": "আপনার একাউন্ট তৈরি করতে, নীচের ক্ষেত্রগুলি পূরণ করুন।",
        "authmanager-authplugin-setpass-failed-title": "পাসওয়ার্ড পরিবর্তন ব্যর্থ হয়েছে",
        "authmanager-authplugin-setpass-bad-domain": "অবৈধ ডোমেইন।",
        "authmanager-autocreate-noperm": "স্বয়ংক্রিয় অ্যাকাউন্ট সৃষ্টি মঞ্জুরিপ্রাপ্ত নয়।",
        "authmanager-userdoesnotexist": "ব্যবহারকারী অ্যাকাউন্ট \"$1\" অনিবন্ধিত।",
+       "authmanager-username-help": "প্রমাণীকরণের জন্য ব্যবহারকারী নাম।",
+       "authmanager-password-help": "প্রমাণীকরণের জন্য পাসওয়ার্ড।",
+       "authmanager-domain-help": "বহিঃস্থ প্রমাণীকরণের জন্য ডোমেইন।",
+       "authmanager-retype-help": "নিশ্চিত করার জন্য আবার পাসওয়ার্ড লিখুন।",
        "authmanager-email-label": "ইমেইল",
        "authmanager-email-help": "ইমেইল ঠিকানা",
        "authmanager-realname-label": "প্রকৃত নাম",
        "authmanager-realname-help": "ব্যবহারকারীর প্রকৃত নাম",
+       "authmanager-provider-password": "পাসওয়ার্ড-ভিত্তিক প্রমাণীকরণ।",
+       "authmanager-provider-password-domain": "পাসওয়ার্ড ও ডোমেইন-ভিত্তিক প্রমাণীকরণ।",
        "authmanager-provider-temporarypassword": "অস্থায়ী পাসওয়ার্ড",
        "authprovider-confirmlink-success-line": "$1: সংযোগ করা সফল হয়েছে।",
        "authprovider-resetpass-skip-label": "উপেক্ষা করো",
        "credentialsform-provider": "পরিচয়পত্রের ধরন:",
        "credentialsform-account": "অ্যাকাউন্টের নাম:",
        "linkaccounts": "অ্যাকাউন্ট সংযোগ করুন",
+       "linkaccounts-success-text": "অ্যাকাউন্টটি সংযোগ করা হয়েছে।",
        "linkaccounts-submit": "অ্যাকাউন্ট সংযুক্ত করুন",
        "unlinkaccounts": "অ্যাকাউন্ট সংযোগ বিচ্ছিন্ন করুন",
        "unlinkaccounts-success": "অ্যাকাউন্টের সংযোগ বিচ্ছিন্ন করা হয়েছে।",
+       "authenticationdatachange-ignored": "প্রমাণীকরণ উপাত্তের পরিবর্তন পরিচালনা করা হয়নি। হয়তো কোন প্রদানকারী কনফিগার করা হয়নি?",
        "userjsispublic": "অনুগ্রহ করে লক্ষ্য করুন: জাভাস্ক্রিপ্টের উপপাতাগুলিতে গোপনীয় তথ্য থাকা উচিত নয় যেহেতু অন্যান্য ব্যবহারকারীও এগুলি দেখতে পান।",
-       "usercssispublic": "অনুগ্রহ করে লক্ষ্য করুন: সিএসএসের উপপাতাগুলিতে গোপনীয় তথ্য থাকা উচিত নয় যেহেতু অন্যান্য ব্যবহারকারীও এগুলি দেখতে পান।"
+       "usercssispublic": "অনুগ্রহ করে লক্ষ্য করুন: সিএসএসের উপপাতাগুলিতে গোপনীয় তথ্য থাকা উচিত নয় যেহেতু অন্যান্য ব্যবহারকারীও এগুলি দেখতে পান।",
+       "restrictionsfield-badip": "আইপি ঠিকানা অথবা পরিসীমা অবৈধ: $1",
+       "restrictionsfield-label": "অনুমোদিত আইপি পরিসীমা:",
+       "restrictionsfield-help": "লাইন প্রতি একটি আইপি ঠিকানা বা CIDR পরিসীমা। সবকিছু সক্রিয় করতে<br><code>0.0.0.0/0</code><br><code>::/0</code><br>ব্যবহার করুন",
+       "edit-error-short": "ত্রুটি: $1",
+       "edit-error-long": "ত্রুটিসমূহ:\n\n$1"
 }
index 8537087..b8261e2 100644 (file)
@@ -7,7 +7,8 @@
                        "Huji",
                        "Meno25",
                        "Mogoeilor",
-                       "아라"
+                       "아라",
+                       "Mjbmr"
                ]
        },
        "tog-underline": "لینکهای خط به زیر",
        "thu": "پنجشنبه",
        "fri": "جمعه",
        "sat": "شنبه",
-       "january": "ژانویه",
-       "february": "فوریه",
+       "january": "جانڤیە",
+       "february": "فئڤریە",
        "march": "مارس",
-       "april": "آوریل",
-       "may_long": "مه",
-       "june": "ژوئن",
-       "july": "ژوئیه",
-       "august": "اÙ\88ت",
-       "september": "سپتامبر",
-       "october": "اکتبر",
-       "november": "نوامبر",
-       "december": "دساÙ\85بر",
+       "april": "آڤریل",
+       "may_long": "مە",
+       "june": "جوٙأن",
+       "july": "جوٙئیە",
+       "august": "Ø¢Ú¯Ù\88ست",
+       "september": "سئپتامر",
+       "october": "ئÙ\88کتÙ\88بر",
+       "november": "نوڤامر",
+       "december": "دئساÙ\85ر",
        "january-gen": "ژانویه",
        "february-gen": "فوریه",
        "march-gen": "مارس",
        "october-gen": "اکتبر",
        "november-gen": "نوامبر",
        "december-gen": "دسامبر",
-       "jan": "ژانویه",
-       "feb": "فوریه",
+       "jan": "جانڤیە",
+       "feb": "فئڤریە",
        "mar": "مارس",
-       "apr": "آوریل",
-       "may": "مه",
-       "jun": "ژوئن",
-       "jul": "ژوئیه",
-       "aug": "اÙ\88ت",
-       "sep": "سپتامبر",
-       "oct": "اکتبر",
-       "nov": "نوامبر",
-       "dec": "دساÙ\85بر",
+       "apr": "آڤریل",
+       "may": "مە",
+       "jun": "جوٙأن",
+       "jul": "جوٙئیە",
+       "aug": "Ø¢Ú¯Ù\88ست",
+       "sep": "سئپتامر",
+       "oct": "ئÙ\88کتÙ\88بر",
+       "nov": "نوڤامر",
+       "dec": "دئساÙ\85ر",
        "pagecategories": "{{PLURAL:$1|دسته|دسته ها}}",
        "category_header": "صفحات دردسته \"$1\"",
        "subcategories": "دسته های فرعی",
        "newwindow": "(پنجره تازه واز کن)",
        "cancel": "لغو",
        "mytalk": "صحبت مو",
+       "navigation": "ناڤجوری",
+       "and": "&#32;و",
        "qbfind": "پیدا کردن",
        "qbedit": "اصلاح",
        "faq": "اف ای کیو",
        "faqpage": "Project:اف ای کیو",
+       "namespaces": "نوم ڤأرگأ آ",
+       "variants": "آلشدگأرا",
        "errorpagetitle": "خطا",
        "returnto": "بازگشت به $1.",
        "tagline": "از {{SITENAME}}",
        "help": "راهنما",
-       "search": "جستن",
-       "searchbutton": "جستن",
+       "search": "پئی جوٙری",
+       "searchbutton": "پئی جوٙری",
        "searcharticle": "برو",
        "history": "گزارش صفحه",
        "history_short": "گزارش تاریخی",
-       "printableversion": "نسخه قابل چاپ",
+       "printableversion": "نوسقئ پئلا ڤابیدٙئنی",
        "permalink": "لینک دایمی",
+       "view": "ديئن",
+       "view-foreign": "مئن $1 نه بوینین",
        "edit": "اصلاح",
        "editthispage": "اصلاح ای صفحه",
        "delete": "حذف",
        "protect": "حفاظت وحمایت",
        "newpage": "صفحه تازه",
        "talkpage": "بحث ای صفحه",
-       "talkpagelinktext": "صحبت",
+       "talkpagelinktext": "چأک چئنە",
        "specialpage": "صفحه مخصوص",
        "personaltools": "ابزارهای شخصی",
        "articlepage": "دیدن صفحه محتوا",
        "jumpto": "پریدن به:",
        "jumptonavigation": "راندن یا هدایت کردن",
        "jumptosearch": "جستن",
-       "aboutsite": "دربارÙ\87 {{SITENAME}}",
-       "aboutpage": "Project:دربارÙ\87",
+       "aboutsite": "راجÙ\88Ú¤ Ø¨Ø¦ {{SITENAME}}",
+       "aboutpage": "Project:راجڤ Ø¨Ø¦",
        "copyright": "محتوا باای شماره قابل دسترسیه\n $1.",
        "copyrightpage": "{{ns:project}}:کپی رایت",
        "currentevents": "اتفاقات جاری",
        "currentevents-url": "Project:اتفاقات جاری",
-       "disclaimers": "اÙ\86کار Ú©Ù\86Ù\86دÙ\87 Ù\87ا",
-       "disclaimerpage": "Project:انکار کاربران",
+       "disclaimers": "تÛ\8cÛ\95 Ù¾Ù\88Ù\99Ø´Ù\86ا",
+       "disclaimerpage": "Project: تیە پوشنیدٙئنئ کولی",
        "edithelp": "کمک برای اصلاح",
-       "mainpage": "صÙ\81Ø­Ù\87 Ø§ØµÙ\84Û\8c",
+       "mainpage": "سأرآسÙ\88Ù\99Ù\86Û\95",
        "mainpage-description": "صفحه اصلی",
        "policy-url": "Project:خط مشی",
        "portal": "درگاه کاربران",
        "portal-url": "Project:درگاه کاربران",
-       "privacy": "خط Ù\85Ø´Û\8c Ø±Ø§Ø²Ø¯اری",
-       "privacypage": "Project:خط Ù\85Ø´Û\8c Ø±Ø§Ø²داری",
+       "privacy": "رأدÛ\8cارکÙ\88Ù\86Û\8c Ø±Ø§Ø²Ú¤Ø§Ø¯Ù\99اری",
+       "privacypage": "Project:رأدÛ\8cارکÙ\88Ù\86Û\8c Ø±Ø§Ø²Ú¤Ø§داری",
        "badaccess": "خطا :اجازه بگیر",
        "badaccess-group0": "ایسا اجازه انجام کاری که خواستین را ندارین",
        "badaccess-groups": "او کاری که ایسا درخواست کردین فقط سی کاربرانیه که من ای  گروهن\n{{PLURAL:$2|آن گروه|یکی زه گروهها}}: $1.",
        "versionrequiredtext": "یه نسخه زه ویکی مدیا($1) نیازمند ه به استفاده زه ای صفحه\nبوین :[[Special:Version|version page]].",
        "ok": "خووه",
        "pagetitle-view-mainpage": "سرصفحه",
-       "retrievedfrom": "بازÛ\8cاÙ\81ت Ø§Ø²\"$1\"",
+       "retrievedfrom": "دÙ\88ڤارتئ Ø¬Ù\88Ù\99رÛ\8c Ø² \"$1\"",
        "youhavenewmessages": "پیام تاره داری $1 ($2).",
        "youhavenewmessagesmulti": "ایسا پیام تازه دارین منه\n$1",
-       "editsection": "اصلاح",
+       "editsection": "ڤیرایئشت کاری",
        "editold": "اصلاح",
        "viewsourceold": "دیدن منبع",
-       "editsectionhint": "اصلاح یه قسمت: $1",
+       "editlink": "ڤیرایئشت",
+       "viewsourcelink": "سئیل سرچشمه کنین",
+       "editsectionhint": "ڤیرایئشت بأرجا: $1",
        "toc": "محتواها",
        "showtoc": "نمایش",
        "hidetoc": "قایم",
        "feedlinks": "تغذیه:",
        "feed-invalid": "اشتراک  زه راه  تایپ باطله",
        "site-rss-feed": "خبرخو RSS سی $1",
-       "site-atom-feed": "خبرخÙ\88 Atom سی $1",
+       "site-atom-feed": "حأڤاÙ\84 Ø®Ù\88Ù\99Ù\86ئ Atom سی $1",
        "page-rss-feed": "خبرخو RSS سی «$1»",
+       "red-link-title": "$1 (چونو بألگئ یی نیدٙئس)",
+       "nstab-main": "بلگه",
        "nstab-user": "صفحه کاربر",
+       "nstab-special": "بألگه ڤیجه",
        "nstab-project": "صفحه پروژه",
        "nstab-image": "فایل",
        "nstab-template": "قالب یا الگو",
        "nstab-category": "دسته",
+       "mainpage-nstab": "سأرآسوٙنە",
        "badtitle": "عنوان بد",
        "badtitletext": "عنوان درخواستی نامعتبر، خالی، یا عنوانی بین زبانی یا بین‌ویکی‌ای با پیوند نادرسته\nو ممکنه دارای یک یا چند کاراکتر بوه که در عنوان مربوط نوا زش استفاده کنین",
        "viewsource": "مشاهده منبع",
        "viewsourcetext": "ایسا ترین بوینین وکپی کنین منبع ای صفحه را:",
        "yourname": "نام کاربر:",
        "yourpassword": "رمز:",
-       "remembermypassword": "رمز اویدن به سیستم را دراین رایانه به خاطر بسپار (for a maximum of $1 {{PLURAL:$1|day|days}})",
        "login": "اویدن به سیستم",
        "nav-login-createaccount": "اویدن به سیستم",
        "userlogin": "اویدن به سیستم / درست کردن حساب کاربری",
        "gotaccountlink": "اویدن به",
        "loginsuccesstitle": "اویدن با بخت وتوفیق به سیستم",
        "loginsuccess": "''' ایسا اویدن به داخل سایت {{SITENAME}} بعنوان \"$1\".'''",
-       "nosuchuser": "کاربری به ای نام وجود نداره \"$1\".\nحروف نام را چک کنین, یا [[Special:UserLogin/signup|درست کنین یه حساب کاربری تازه]].",
+       "nosuchuser": "کاربری به ای نام وجود نداره \"$1\".\nحروف نام را چک کنین, یا [[Special:CreateAccount|درست کنین یه حساب کاربری تازه]].",
        "nosuchusershort": "کاربری به ای نام وجود نداره\"$1\".\nحروف نام راچک کنین.",
        "nouserspecified": "ایسا دارین یه نام کاربر ذکر اکنین.",
        "wrongpassword": "رمز وارد وابیده درست نه.\nلطفا دوباره سعی کنین.",
        "passwordremindertext": "یه نفر (شاید خودتو, زه نشانی آی پی$1) درخواست یه رمز تازه کرده سی {{SITENAME}} ($4). یه رمز موقتی سی کاربر\n\"$2\" درست شده وگذاشته وابیده به\"$3\". ایر مطابق میل ایسا بوه, نیازه که داخل سیستم بوین ویه رمز تازه انتخاب کنین.\n\nایر آن فرد همچنین درخواست کرده بوه  یونه, یا ایر ایسا رمزتو را به خاط داشته این ,\nوسی مدت طولانی نه خوین هونه تغییر بدین, ایسا وا نادیده بگیرین ای پیام  را وهمچنان زه رمز قدیمی خوتو استفاده کنین",
        "noemail": "وجود نداره نشانی امیل ضبط وابده زه کاریر \"$1\".",
        "passwordsent": "یه رمز تازه ارسال وابید به نشانی امیل ثبت وابده سی \"$1\".\nلطفا بعد از دریافت آن داخل سیستم بوین.",
-       "eauthentsent": "یه نامه الکترونیکی سی تایید نشانی پست الکترونیکی به نشانی مورنظر ارسال وابید. قبل زه یو که نامه دیگری قابل ارسال به این نشانی بوه، وا دستورهایی که در آن نامه اویده را جهت تأیید ای مساله که ای نشانی مال ایسانه اجرا کنین.",
+       "eauthentsent": "یه ایمیل سی تایید آدرس ایمیل به آدرس مورنظر ارسال وابید. قبل زه یو که ایمیل دیگری قابل ارسال به این آدرس بوه، وا دستورهایی که در آن ایمیل اویده را جهت تأیید ای مساله که ای آدرس مال ایسانه اجرا کنین.",
+       "pt-login": "ڤامین اوڤیڌن",
+       "pt-createaccount": "راسد کردن هساڤ کارياري",
        "retypenew": "تایپ دوباره رمز:",
        "bold_sample": "متن گپ نما",
        "bold_tip": "متن گپ نما",
        "anoneditwarning": "'''توجه:''' ایسا داخل سیستم نوابیدین.\nآی پی آدرستو درگزارش اصلاح صفحه ضبط ابوه.",
        "summary-preview": "پیش نمایش - خلاصه:",
        "blockedtext": " \"'''دسترسی نام کاربری یا نشانی اینترنتی ایسا بسته وابیده.'''\nای کار توسط $1 انجام شده‌است.\nدلیلی که گده اینه: $2''\n* آغاز قطع دسترسی: $8\n* زمان اتمام ای قطع دسترسی: $6\n* کاربری که قطع دسترسی‌اش در نظر بیده: $7\nایساترین با $1 یا یکی از [[{{MediaWiki:Grouppage-sysop}}|مدیران]] تماس بگیرین و در ای باره صحبت کنین.\nتوجه کنین که ایسا نترین زه امکان «ارسال پست الکترونیکی به ای کاربر» استفاده کنین مگر این که نشانی پست الکترونیکی معتبری در [[Special:Preferences|اولویتهای کاربری]]خود ثبت کرده بوین.\nنشانی IP ایسا $3 و شماره قطع دسترسی ایسا $5 است. لطفاً ای شماره‌ها را در همه کاوشهاتون ذکر کنین.\nایسا ترین با $1 یا یکی دیه زه [[{{MediaWiki:Grouppage-sysop}}|مدیران]] تماس بگیرین، تا در باره ای قطع دسترسی صحبت کنین.\nدقت کنین که سی ارسال پست الکترونیکی در ویکی، وا پست الکترونیکی خود را زه طریق صفحه[[Special:Preferences|تنظیمات]] فعال کرده بوین، و نیز، وا امکان استفاده زه ای ویژگی سی ایساقطع نبوه.\nنشانی اینترنتی الان ایسا $3 است و شماره قطع دسترسی $5 است.\nلطفاً ای شماره را در هر درخواستی که در ای مورد مطرح اکنین ذکر کنین",
+       "loginreqlink": "ڤامین اوڤیڌن",
        "newarticle": "(تازه)",
        "newarticletext": "ایسا لینکی را دنبال کردین و به صفحه‌ای رسیدین که هنی درست نوابیده.\nسی ایجاد صفحه، داخل مستطیل زیر شروع به تایپ کنین (سی اطلاعات بیشتر به [[{{ns:project}}:راهنما|صفحه راهنما] برین).\nایر اشتباهی ایچو اویدین دکمه «برگشت» مرورگرتو را بزنین.",
        "noarticletext": " الان ای صفحه متنی نداره، ایسا ترین [[Special:Search/{{PAGENAME}}عنوان ای صفحه را در صفحه‌های دیگر جستجو کنین]] یا [{{fullurl:{{FULLPAGENAME}}|action=edit}} ای صفحه را اصلاح کنین].",
        "prevn": "قبلی {{PLURAL:$1|$1}}",
        "nextn": "بعدی {{PLURAL:$1|$1}}",
        "viewprevnext": "مشاهده ($1 {{int:pipe-separator}} $2) ($3)",
+       "searchprofile-articles": "بلگه آ مینونه دار",
+       "searchprofile-everything": "همه چی",
+       "searchprofile-advanced": "پیشکرده",
+       "searchprofile-articles-tooltip": "بگرد مئن $1",
+       "searchprofile-images-tooltip": "جانیاانه پی جوری کو",
+       "search-result-size": "$1 ({{PLURAL:$2|1 ڤاجه یل|$2 ڤاجه یل}})",
+       "searchall": "همه",
+       "search-nonefound": "هیژ نتیجه یی وا پی جست تو یکی نئ.",
        "preferences": "اولویتها",
-       "mypreferences": "اÙ\88Ù\84Ù\88Û\8cتÙ\87اÛ\8c Ù\85Ù\88",
+       "mypreferences": "Ø®Ù\88صÙ\88Ù\99Û\8cات Ù\87Ø£Ù\86Û\8c",
        "yourrealname": "نام واقعی:",
        "prefs-help-realname": "ذکر نام واقعی اختیاریه ایر تصمیم به گدن بگیرین هنگام ارجاع به آثارتو و انتساب هونو به ایسا زه نام واقعیتو استفاده ابوه",
        "grouppage-sysop": "{{ns:project}}:مدیران",
+       "newuserlogpage": "راسد ڤابیه وا کاریار",
        "rightslog": "نمایه حقوق کاربر",
        "nchanges": "$1 {{PLURAL:$1|تغییر|تغییرات}}",
+       "enhancedrc-history": "ڤیرگار",
        "recentchanges": "تغییرات اخیر",
        "recentchanges-feed-description": "ردیابی آخرین تغییرات  ویکی در ای خورد",
+       "recentchanges-label-minor": "یو یه ويرايشت کوچيره",
+       "recentchanges-label-unpatrolled": "ای ويرايشت هنی تيه واداشت نوابيه",
        "rcnotefrom": "در زیر تغییرات زه تاریخ <b>$2</b> آمده‌اند (تا <b>$1</b> مورد نشو داده ابوه).",
        "rclistfrom": "نشودادن تغییرات تازه با شروع زه $3 $2",
        "rcshowhideminor": "اصلاحات کوچیک $1",
+       "rcshowhideminor-hide": "قام کردن",
        "rcshowhidebots": "$1 ربات‌ها یا بوتها",
-       "rcshowhideliu": "$1 کاربران داخل وابیده",
+       "rcshowhidebots-show": "نشون دائن",
+       "rcshowhideliu": "$1 کاریارا ثوت نام کرده",
+       "rcshowhideliu-hide": "قام کئردئن",
        "rcshowhideanons": "$1 کاربران داخل نوابیده",
+       "rcshowhideanons-hide": "قام کئردئن",
        "rcshowhidepatr": "$1 اصلاحات پاسداری شده",
        "rcshowhidemine": "$1 اصلاحات مو",
+       "rcshowhidemine-hide": "قام کئردئن",
        "rclinks": "نشودادن آخرین $1 تغییر در $2 روز اخیر؛ $3",
        "diff": "تفاوت",
        "hist": "گزارش",
        "minoreditletter": "رز",
        "newpageletter": "تا",
        "boteditletter": "ر",
+       "rc-change-size-new": "$1 {{PLURAL:$1|بایت|بایتا}} بئ نیا آلئشتکاری",
        "recentchangeslinked": "تغییرات مرتبط",
        "recentchangeslinked-feed": "تغییرات مرتبط",
        "recentchangeslinked-toolbox": "تغییرات مرتبط",
        "recentchangeslinked-title": "تغییرهای مرتبط با $1",
        "recentchangeslinked-summary": " ای صفحه خاص تغییرات اخیر در صفحه‌های لینک داده شده به این صفحه را نشو اده.\nصفحه‌هایی که در لیست پی‌گیریهای ایسا بون به شکل '''سیاه''' نشو داده ابون.",
+       "recentchangeslinked-page": "نوم بألگە:",
        "upload": "آپلود فایل",
        "uploadbtn": "آپلود فایل",
        "uploadlogpage": "نمایه آپلود",
        "filehist-help": "رو تاریخ‌ها کلیک کنید تا نسخه مرتبط را ببینین.",
        "filehist-current": "جاری",
        "filehist-datetime": "تاریخ/زمان",
+       "filehist-thumb": "عسگ کۈچير وابيه",
        "filehist-user": "کاربر",
        "filehist-dimensions": "ابعاد",
        "filehist-filesize": "اندازه فایل",
        "filehist-comment": "توضیح",
-       "imagelinks": "لینکها",
+       "imagelinks": "به کار گرهڌن جانيا",
        "linkstoimage": "ذیل الذکر {{PLURAL:$1|لینکهای صفحه|$1 لینک صفحات}} به ای فایل:",
        "nolinkstoimage": "هیچ صفحه ای نه که لینک وابیده بوه به ای فایل",
        "sharedupload": "ای فایل یک آپلود اشتراکی هده و ممکنه زه طریق  پروژه‌های دیگه  هم قابل دسترسی بوه",
        "namespace": "فضای نام:",
        "invert": "انتخاب برعکس بوه",
        "blanknamespace": "(اصلی)",
-       "contributions": "شراکتهای کاربر",
+       "contributions": "{{GENDER:$1|کاریار}} هومیاریا",
        "mycontris": "شراکتهای مو",
        "contribsub2": "سی $1 ($2)",
        "uctop": "(بالا)",
        "sp-contributions-talk": "صحبت",
        "whatlinkshere": "لینک های ای صفحه",
        "whatlinkshere-title": "صفحات آن لینک به \"$1\"",
+       "whatlinkshere-page": "بألگە",
        "linkshere": "لینک صفحات ذیل الذکر به '''[[:$1]]''':",
        "nolinkshere": "هیچ صفحه ای پیوند نداردبه '''[[:$1]]'''.",
        "isredirect": "صفحه تغییر مسیر",
        "ipblocklist": "آدرسهای  آی پی وکاربران بسته وابیدند",
        "blocklink": "بسته بوه !",
        "unblocklink": "باز بوه",
-       "contribslink": "شراکت",
+       "contribslink": "ھأیاری",
        "blocklogpage": "نمایه _ بسته‌وابیده‌ها",
        "blocklogentry": "بسته وابید [[$1]] با سپری وابیدن وقت زه $2 $3",
        "movepagetext": "با استفاده زه فرم زیر نام صفحه تغییر اکنه و همه گزارش تاریخی هو به نام تازه جابجا ابوه.\nعنوان کهنه تبدیل به یک صفحه تغییر مسیر به عنوان جدید ابوه.\nایسا ترین بطور اتوماتیک تغییر مسیر های مربوط به عنوان اصلی رو به روز رسانی کنین. ایر ایسا مطمئن نهدین با دیدن یونو مطمئن بوین:\n[[Special:تغییر مسیر دوبل|دوبل ]] یا[[Special:تغییرمسیر خروا یا اشکسته|تغییرمسیرهای خراو یا اشکسته]].\n\nلینکهایی که به عنوان صفحه قدیمی هدن تغییر نه کنن حتماً تغییر مسیرهای دوبل یا اشکسته و خراو را بررسی کنین.\n'''ایسا''' مسئول اطمینان زه یو هدین که لینکها هنی به همان‌جایی که قرار هده برن.\n\nتوجه کنین که ایر زه قبل صفحه‌ای در عنوان تازه وجود داشته بوه صفحه منتقل '''نه بوه'''،\nمیر یو که آن صفحه خالی یا تغییر مسیر بوه و گزارش تاریخی اصلاح نداشته بوه.\n یعنی ایر اشتباه کردین ترین صفحه را به همان جایی که زه هو جابجا وابیدین برگردانین، و  نترین رو صفحات موجود بنویسین\n\n'''هشدار!'''\nجابجایی صفحات به نام تازه ممکنه  تغییر کلی و غیرمنتظره‌ای سی\n صفحات دوست داشتنی داشته بوه ؛\nلطفاً مطمئن بوین که قبل زه جابجا کردن صفحه، عواقب ای کار را درک اکنین.",
        "movepagetalktext": "صفحه صحبت مربوط، ایر وجود داشته بوه، بطور اتوماتیک همراه با صفحه اصلی\n جابجا ابوه '''میر یو که''' :\n* در حال جابجایی صفحه زه ای فضای نام به فضای نام دیگری بوین،\n* یه صفحه صحبت غیرخالی تحت ای نام تازه وجود داشته بوه، یا\n* کادر زیر را تیک نزده بوین.\n\nدر ای موارد، وا صفحه را بطور دستی جابجا کرده و یا محتویات دو صفحه را با اصلاح ادغام کنین.",
-       "movearticle": "جابجایی صفحه:",
        "newtitle": "به عنوان تازه:",
        "move-watch": "پیگیری ای صفحه",
        "movepagebtn": "جابجایی صفحه",
        "tooltip-pt-login": "توصیه ابوه که به سیستم داخل بوین اما اجباری نه.",
        "tooltip-pt-logout": "رهدن زه سیستم",
        "tooltip-ca-talk": "صحبت درباره صفحه محتوا",
-       "tooltip-ca-edit": "ایسا ترین ای  صفحه را اصلاح کنین. لطفاً قبل  ذخیره کردن زه دکمه پیش‌ نمایش استفاده کنین",
-       "tooltip-ca-addsection": "اضاÙ\81 Ú©Ø±Ø¯Ù\86 Û\8cÙ\87 ØªÙ\88ضÛ\8cØ­ Ø¨Ù\87 Ø§Û\8c Ù\85بحث",
+       "tooltip-ca-edit": "ڤيرایشت اي بلگه",
+       "tooltip-ca-addsection": "Ø´Ù\88رÛ\88 Ú©Ø±Ø¯Ù\86 Û\8cÙ\87 Ø¨Ù\87رجا Ø¯Û\8cÙ\87",
        "tooltip-ca-viewsource": "ای صفحه  تحت حمایته ایساترین منبعسه بوینین",
+       "tooltip-ca-history": "دوواره ديئن ای بلگه",
        "tooltip-ca-protect": "حفاظت وحمایت زه ای صفحه",
        "tooltip-ca-delete": "حذف ای صفحه",
        "tooltip-ca-move": "جابجاکردن ای صفحه",
        "tooltip-ca-watch": "اضاف کردن ای صفحه به لیست پیگیریهاتو",
        "tooltip-ca-unwatch": "حذف ای صفحه زه لیست پی‌گیری‌های ایسا",
        "tooltip-search": "جستن {{SITENAME}}",
+       "tooltip-search-fulltext": "بألگأ آنأ سي چونو نإڤشدإیي پإی جۈري کو",
        "tooltip-n-mainpage": "دیدن صفحه اصلی",
+       "tooltip-n-mainpage-description": "بإنیرين به سرآسونه",
        "tooltip-n-portal": "درباره ای پروژه چه ترین  کنین و  کیه  ترین آن جیزها رو پیدا کنین",
        "tooltip-n-currentevents": "پیداکردن اطلاعات زمینه یاسابقه اطلاعات در اتفاقات جاری",
        "tooltip-n-recentchanges": "فهرست  تغییرات آخری درویکی",
        "tooltip-ca-nstab-main": "دیدن آن صفحه محتوا",
        "tooltip-ca-nstab-user": "دیدن صفحه کاربر",
        "tooltip-ca-nstab-media": "دیدن صفحه مدیا",
-       "tooltip-ca-nstab-special": "ای صفحه مخصوصه وایسا نترین خود ای صفحه رااصلاح کنین",
+       "tooltip-ca-nstab-special": "اي بلگه بلگه ویجه و ايسا نترين هونه ڤیرایشت کونین",
        "tooltip-ca-nstab-project": "دیدن صفحه پروژه",
        "tooltip-ca-nstab-image": "دیدن صفحه فایل",
        "tooltip-ca-nstab-mediawiki": "دیدن پیام سیستم",
        "tooltip-recreate": "دوباره درست کردن صفحه ای که زه رو کینه وغرض پاک وابیده",
        "tooltip-upload": "شروع آپلود",
        "tooltip-rollback": "\"اعاده\" برگرداندن به وضع اولیه سی ای صفحه که بخاطر مشارکت  آخر اصلاح وابیده بایک کلیک",
+       "pageinfo-toolboxlink": "دونسمندیا بلگه",
        "previousdiff": "← اصلاح قدیمی",
        "nextdiff": "تفاوت بعدی→",
        "file-info-size": "$1 × $2 پیکسل, اندازه فایل: $3, MIME نوع: $4",
        "file-nohires": "قابلیت تفکیک بالاتری در دسترس نه.",
        "svg-long-desc": "SVG فایل, تقریبا$1 × $2 پیکسل, اندازه فایل: $3",
-       "show-big-image": "تصÙ\88Û\8cر Ø¨Ø§ Ù\82ابÙ\84Û\8cت ØªÙ\81Ú©Û\8cÚ© Ú©Ø§Ù\85Ù\84",
+       "show-big-image": "جاÙ\86Û\8cا Ø§ØµÙ\84Û\8c",
        "newimages": "گالری فایلهای تازه",
        "bad_image_list": "اطلاعات را وا به ای شکل وارد کنین:\n\nفقط سطرهایی که با * آغاز ابون در نظر گریده ابون. اولین لینک در هر سطر، باید لینکی به یک تصویر بد باشد.\nلینکهای بعدی در همان سطر، به عنوان موارد استثنا در نظر گریده ابون",
        "metadata": "فراداده",
        "metadata-fields": "فراداده EXIF نشو داده وابیده در این پیام وقتی جدول فراداده‌های تصویر جمع وابیده بوه هم نمایش داده ابوه.\nبقیه موارد فقط وقتی نشوداده ابوه که جدول یادشده واز بوه.\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
        "namespacesall": "همه",
        "monthsall": "همه ماهها",
+       "semicolon-separator": "؛&#32;",
        "watchlisttools-view": "نشودادن تغییرات مربوطه",
        "watchlisttools-edit": "نشودادن واصلاح کردن لیست پیگیریها",
        "watchlisttools-raw": "اصلاح لیست خام پی‌گیری‌ها",
+       "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|چک چنه]])",
        "version": "ترجمه یا تفسیر",
-       "specialpages": "صفحات ویژه"
+       "specialpages": "صفحات ویژه",
+       "searchsuggest-search": "جستن {{SITENAME}}"
 }
index 5bea10a..c0c6e29 100644 (file)
        "htmlform-cloner-create": "Ouzhpennañ muioc'h",
        "htmlform-cloner-delete": "Dilemel",
        "htmlform-cloner-required": "Un dalvoudenn a zo ret da vihanañ.",
-       "sqlite-has-fts": "$1 gant enklask eus an destenn a-bezh embreget",
-       "sqlite-no-fts": "$1 hep enklask eus an destenn a-bezh embreget",
        "logentry-delete-delete": "Diverket eo bet ar bajenn $3 gant $1",
        "logentry-delete-restore": "Assavet eo bet ar bajenn $3 gant $1",
        "logentry-delete-event": "Kemmet eo bet gwelusted {{PLURAL:$5|un darvoud eus ar marilh|$5 darvoud eus ar marilh}} d'an $3 gant $1 : $4",
index 503f347..2e65260 100644 (file)
@@ -41,6 +41,7 @@
        "tog-watchdefault": "Dodaj stranice i datoteke koje uređujem na moj spisak praćenih članaka",
        "tog-watchmoves": "Dodaj stranice i datoteke koje premjestim na moj spisak praćenih članaka",
        "tog-watchdeletion": "Dodaj stranice i datoteke koje izbrišem na moj spisak praćenih članaka",
+       "tog-watchuploads": "Dodaj datoteke koje postavim na moj spisak praćenja",
        "tog-watchrollback": "Sve stranice za koje sam izvršio povrat izmjena stavi na spisak praćenja",
        "tog-minordefault": "Označi sve izmjene manjim isprva",
        "tog-previewontop": "Prikaži pregled iznad okvira za uređivanje",
@@ -50,7 +51,7 @@
        "tog-enotifminoredits": "Također mi pošalji e-poštu za male izmjene na stranicama i datotekama",
        "tog-enotifrevealaddr": "Otkrij adresu moje e-pošte u porukama obavještenja",
        "tog-shownumberswatching": "Prikaži broj korisnika koji prate",
-       "tog-oldsig": "Postojeći potpis:",
+       "tog-oldsig": "Vaš postojeći potpis:",
        "tog-fancysig": "Smatraj potpis kao wikitekst (bez automatskog linka)",
        "tog-uselivepreview": "Koristi pregled uživo",
        "tog-forceeditsummary": "Opomeni me pri unosu praznog sažetka",
@@ -67,7 +68,7 @@
        "tog-showhiddencats": "Prikaži skrivene kategorije",
        "tog-norollbackdiff": "Ne prikazuj razliku nakon izvršenog vraćanja",
        "tog-useeditwarning": "Upozori me kad napuštam stranicu za izmjene bez sačuvanih promjena",
-       "tog-prefershttps": "Uvijek koristi sigurnu konekciju kada sam prijavljen.",
+       "tog-prefershttps": "Uvijek koristi sigurnu vezu dok sam prijavljen",
        "underline-always": "Uvijek",
        "underline-never": "Nikad",
        "underline-default": "Prema predodređenim postavkama teme ili preglednika",
        "october-date": "$1. oktobar",
        "november-date": "$1. novembar",
        "december-date": "$1. decembar",
+       "period-am": "AM",
+       "period-pm": "PM",
        "pagecategories": "{{PLURAL:$1|Kategorija|Kategorije}}",
        "category_header": "Članci u kategoriji \"$1\"",
-       "subcategories": "Podkategorije",
+       "subcategories": "Potkategorije",
        "category-media-header": "Datoteke u kategoriji \"$1\"",
        "category-empty": "''Ova kategorija trenutno ne sadrži članke ni medije.''",
        "hidden-categories": "{{PLURAL:$1|Sakrivena kategorija|Sakrivene kategorije}}",
        "newwindow": "(otvara se u novom prozoru)",
        "cancel": "Odustani",
        "moredotdotdot": "Više...",
-       "morenotlisted": "Ovaj spisak nije potpun.",
+       "morenotlisted": "Ovaj spisak možda nije potpun.",
        "mypage": "Stranica",
        "mytalk": "Razgovor",
        "anontalk": "Razgovor",
        "talk": "Razgovor",
        "views": "Pregledi",
        "toolbox": "Alati",
+       "tool-link-userrights": "Promijeni {{GENDER:$1|korisničke}} grupe",
+       "tool-link-emailuser": "Pošalji e-poruku {{GENDER:$1|korisniku|korisnici}}",
        "userpage": "Pogledaj korisničku stranicu",
        "projectpage": "Pogledaj stranicu projekta",
        "imagepage": "Pogledajte stranicu datoteke",
        "confirmable-confirm": "Da li {{GENDER:$1|ste}} sigurni?",
        "confirmable-yes": "Da",
        "confirmable-no": "Ne",
-       "thisisdeleted": "Pogledati ili vratiti $1?",
+       "thisisdeleted": "Pogledaj ili vrati $1?",
        "viewdeleted": "Pogledaj $1?",
-       "restorelink": "{{PLURAL:$1|$1 izbrisana izmjena|$1 izbrisanih izmjena}}",
+       "restorelink": "{{PLURAL:$1|jednu obrisanu izmjenu|$1 obrisane izmjene|$1 obrisanih izmjena}}",
        "feedlinks": "Fid:",
        "feed-invalid": "Nedozvoljen tip potpisa",
        "feed-unavailable": "RSS izvori nisu dostupni",
        "laggedslavemode": "'''Upozorenje''': Stranica, možda, nije ažurirana.",
        "readonly": "Baza je zaključana",
        "enterlockreason": "Unesite razlog za zaključavanje, uključujući procjenu vremena otključavanja",
-       "readonlytext": "Baza je trenutno zaključana za nove unose i ostale izmjene, vjerovatno zbog rutinskog održavanja, posle čega će biti vraćena u uobičajeno stanje.\n\nAdministrator koji ju je zaključao je ponudio ovo objašnjenje: $1",
+       "readonlytext": "Baza podataka trenutno je zaključana za nove unose i druge izmjene, vjerovatno zbog rutinskog održavanja, nakon čega će biti vraćena u uobičajeno stanje.\n\nSistemski administrator koji ju je zaključao naveo je sljedeće objašnjenje: $1",
        "missing-article": "U bazi podataka nije pronađen tekst stranice tražen pod nazivom \"$1\" $2.\n\nDo ovoga dolazi kad se prati pomjeranje ili historija linka za stranicu koja je pobrisana.\n\n\nU slučaju da se ne radi o gore navedenom moguće je da ste pronašli grešku u programu.\nMolimo Vas da ovo prijavite [[Special:ListUsers/sysop|administratoru]] s navođenjem tačne adrese stranice.",
        "missingarticle-rev": "(revizija#: $1)",
        "missingarticle-diff": "(Razlika: $1, $2)",
        "userlogin-resetpassword-link": "Zaboravili ste lozinku?",
        "userlogin-helplink2": "Pomoć pri prijavljivanju",
        "userlogin-loggedin": "Već ste prijavljeni kao {{GENDER:$1|$1}}.\nKoristite donji obrazac da biste se prijavili kao drugi korisnik.",
+       "userlogin-reauth": "Morate se ponovo prijaviti da bismo potvrdili da ste zaista {{GENDER:$1|$1}}.",
        "userlogin-createanother": "Napravi još jedan račun",
        "createacct-emailrequired": "Adresa e-pošte",
        "createacct-emailoptional": "Adresa e-pošte (opcionalno)",
        "noname": "Niste izabrali ispravno korisničko ime.",
        "loginsuccesstitle": "Prijavljen",
        "loginsuccess": "'''Sad ste prijavljeni na {{SITENAME}} kao \"$1\".'''",
-       "nosuchuser": "Ne postoji korisnik s imenom \"$1\".\nKorisnička imena razlikuju velika i mala slova.\nProvjerite Vaš unos ili [[Special:CreateAccount|napravite novi korisnički račun]].",
+       "nosuchuser": "Ne postoji korisnik s imenom \"$1\".\nKorisnička imena razlikuju velika i mala slova.\nProvjerite jeste li ga tačno upisali ili [[Special:CreateAccount|otvorite novi račun]].",
        "nosuchusershort": "Ne postoji korisnik s imenom \"$1\".\nProvjerite jeste li dobro ukucali.",
        "nouserspecified": "Morate izabrati korisničko ime.",
        "login-userblocked": "Ovaj korisnik je blokiran. Prijava nije dopuštena.",
        "wrongpasswordempty": "Lozinka koju ste unijeli je bila prazna.\nMolimo Vas da pokušate ponovno.",
        "passwordtooshort": "Lozinka mora imati najmanje {{PLURAL:$1|1 znak|$1 znaka|$1 znakova}}.",
        "passwordtoolong": "Lozinke ne mogu biti duže od {{PLURAL:$1|jednog znaka|$1 znaka|$1 znakova}}.",
+       "passwordtoopopular": "Ovo je često korištena lozinka i ne može se koristiti. Molimo Vas da izaberete jaču lozinku.",
        "password-name-match": "Vaša lozinka mora biti različita od Vašeg korisničkog imena.",
        "password-login-forbidden": "Korištenje ovih korisničkih imena i šifara je zabranjeo.",
        "mailmypassword": "Poništi lozinku",
        "noemail": "Ne postoji adresa e-pošte za korisnika \"$1\".",
        "noemailcreate": "Morate da navedete validnu e-mail adresu",
        "passwordsent": "Nova lozinka poslana je na adresu e-pošte korisnika \"$1\".\nMolimo Vas da se prijavite nakon što je primite.",
-       "blocked-mailpassword": "Da bi se spriječila nedozvoljena akcija, Vašoj IP adresi je onemogućeno uređivanje stranica kao i mogućnost zahtijevanje nove lozinke.",
+       "blocked-mailpassword": "Vašoj IP-adresi onemogućeno je uređivanje. Da bi se spriječila zloupotreba, s nje nije moguće zahtijevati novu lozinku.",
        "eauthentsent": "Na navedenu adresu e-pošte poslana je poruka s potvrdom.\nPrije nego što pošaljemo daljnje poruke, pratite uputstva s e-pošte da biste potvrdili da je račun zaista Vaš.",
        "throttled-mailpassword": "Već Vam je poslana e-poruka za promjenu lozinke u {{PLURAL:$1|posljednjih sat vremena|posljednja $1 sata|posljednjih $1 sati}}.\nDa bi se spriječila zloupotreba, može se poslati samo jedna e-poruka za promjenu lozinke {{PLURAL:$1|svakih sat vremena|svaka $1 sata|svakih $1 sati}}.",
        "mailerror": "Greška pri slanju e-pošte: $1",
        "passwordreset-emailtext-ip": "Neko (vjerovatno Vi, s IP adrese $1) je zatražio podsjetnik Vaših detalja računa za {{SITENAME}} ($4). Sljedeći {{PLURAL:$3|račun korisnika je|računi korisnika su}} povezani s ovom e-mail adresom:\n\n$2\n\n{{PLURAL:$3|Ova privremena šifra|Ove privremene šifre}} će isteći za {{PLURAL:$5|jedan dan|$5 dana}}.\nTrebate se prijaviti i odabrati novu šifru. Ako je neko drugi napravio ovaj zahtjev, ili ako ste se sjetili Vaše početne šifre, a ne želite je promijeniti, možete zanemariti ovu poruku i nastaviti koristiti staru šifru.",
        "passwordreset-emailtext-user": "Korisnik $1 na {{SITENAME}} je zatražio podsjetnik o detaljima Vašeg računa za {{SITENAME}} ($4). Sljedeći {{PLURAL:$3|korisnički račun je|korisnički računi su}} povezani s ovom e-mail adresom:\n\n$2\n\n{{PLURAL:$3|Ova privremena šifra|Ove privremene šifre}} će isteći za {{PLURAL:$5|jedan dan|$5 dana}}.\nTrebate se prijaviti i odabrati novu šifru. Ako je neko drugi napravio ovaj zahtjev, ili ako ste se sjetili Vaše originalne šifre, a ne želite je više promijeniti, možete zanemariti ovu poruku i nastaviti koristiti staru šifru.",
        "passwordreset-emailelement": "Korisničko ime: \n$1\n\nPrivremena šifra: \n$2",
-       "passwordreset-emailsentemail": "Ako je ovo adresa e-pošte s kojom ste registrirali ovaj račun, podsjetnik šifre će vam biti poslan na vašu adresu e-pošte.",
+       "passwordreset-emailsentemail": "Ako je ova adresa e-pošte povezana s Vašim računom, podsjetnik o lozinci bit će Vam poslan na adresu e-pošte.",
        "changeemail": "Promjena ili uklanjanje e-adrese",
        "changeemail-header": "Ispunite sljedeći formular da biste promijenili adresu e-pošte. Ako želite ukloniti postojeću adresu e-pošte s vašeg korisničkog računa, pri ispunjavanju formulara, polje nove adrese e-pošte ostavite prazno.",
        "changeemail-no-info": "Morate biti prijavljeni za direktan pristup ovoj stranici.",
        "accmailtext": "Nasumično odabrana šifra za [[User talk:$1|$1]] je poslata na adresu $2.\n\nŠifra/lozinka za ovaj novi račun može biti promijenjena na stranici ''[[Special:ChangePassword|izmjene šifre]]'' nakon prijave.",
        "newarticle": "(Novi)",
        "newarticletext": "Došli ste na stranicu koja još nema sadržaja.\n*Ako želite unijeti sadržaj, počnite tipkati u prozor ispod ovog teksta.\n*Ako Vam treba pomoć, idite na [$1 stranicu za pomoć].\n*Ako ste ovamo dospjeli slučajno, kliknite na dugme \"Nazad\" (''Back'') u Vašem internetskom pregledniku.",
-       "anontalkpagetext": "----''Ovo je stranica za razgovor za anonimnog korisnika koji još nije napravio nalog ili ga ne koristi.\nZbog toga moramo da koristimo brojčanu IP adresu kako bismo identifikovali njega ili nju.\nTakvu adresu može dijeliti više korisnika.\nAko ste anonimni korisnik i mislite da su vam upućene nebitne primjedbe, molimo Vas da [[Special:CreateAccount|napravite nalog]] ili se [[Special:UserLogin|prijavite]] da biste izbjegli buduću zabunu sa ostalim anonimnim korisnicima.''",
+       "anontalkpagetext": "----\n<em>Ovo je stranica za razgovor s anonimnim korisnikom koji još nije napravio račun ili ga ne koristi.</em>\nZbog toga moramo koristiti brojčanu IP-adresu kako bismo ga prepoznali.\nTakvu adresu može dijeliti više korisnika.\nAko ste anonimni korisnik i smatrate da su Vam upućene nebitne primjedbe, molimo Vas da [[Special:CreateAccount|napravite račun]] ili se [[Special:UserLogin|prijavite]] da biste izbjegli buduću zabunu s ostalim anonimnim korisnicima.",
        "noarticletext": "Na ovoj stranici trenutno nema teksta.\nMožete [[Special:Search/{{PAGENAME}}|tražiti naslov ove stranice]] na drugim stranicama,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} tražiti u povezanim zapisnicima] ili [{{fullurl:{{FULLPAGENAME}}|action=edit}} napraviti ovu stranicu]</span>.",
        "noarticletext-nopermission": "Trenutno nema teksta na ovoj stranici.\nMožete [[Special:Search/{{PAGENAME}}|tražiti ovaj naslov stranice]] na drugim stranicama ili <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} pretražiti povezane zapisnike]</span>, ali nemate dozvolu da napravite ovu stranicu.",
        "missing-revision": "Uređivanje broj $1 na stranici \"{{FULLPAGENAME}}\" ne postoji.\n\nOvo se obično dešava kad pratite zastarjelu vezu na stranicu koja je obrisana.\nViše informacija možete pronaći u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} protokolu brisanja].",
        "previewnote": "<strong>Ne zaboravite da je ovo samo pregled.</strong>\nVaše izmjene još nisu sačuvane!",
        "continue-editing": "Idi na područje uređivanja",
        "previewconflict": "Ovaj pregled prikazuje kako će tekst u gornjem polju\nizgledati ako kliknete \"Sačuvaj članak\".",
-       "session_fail_preview": "<strong>Izvinjavamo se! Nismo mogli obraditi vašu izmjenu zbog gubitka podataka o prijavi.\nMolimo pokušajte ponovno.\nAko i dalje ne bude radilo, pokušajte se [[Special:UserLogout|odjaviti]] i ponovno prijaviti.</strong>",
+       "session_fail_preview": "Izvinjavamo se! Nismo mogli obraditi Vašu izmjenu zbog gubitka podataka o prijavi.\n\nMožda ste odjavljeni. <strong>Provjerite jeste li prijavljeni i pokušajte ponovo</strong>.\nAko i dalje ne radi, pokušajte se [[Special:UserLogout|odjaviti]] i ponovo prijaviti i provjerite dozvoljava li Vaš preglednik kolačiće s ovog sajta.",
        "session_fail_preview_html": "'''Žao nam je! Nismo mogli da obradimo vašu izmjenu zbog gubitka podataka.'''\n\n''Zbog toga što {{SITENAME}} ima omogućen izvorni HTML, predpregled je sakriven kao predostrožnost protiv JavaScript napada.''\n\n'''Ako ste pokušali da napravite pravu izmjenu, molimo pokušajte ponovo. Ako i dalje ne radi, pokušajte da se [[Special:UserLogout|odjavite]] i ponovo prijavite.'''",
        "token_suffix_mismatch": "'''Vaša izmjena nije prihvaćena jer je Vaš web preglednik ubacio znakove interpunkcije u token uređivanja.\nIzmjena je odbačena da bi se spriječilo uništavanje teksta stranice.\nTo se događa ponekad kad korisite problematični anonimni proxy koji je baziran na web-u.'''",
        "edit_form_incomplete": "'''Neki dijelovi uređivačkog obrasca nisu došli do servera; dvaput provjerite da su vaše izmjene nepromjenjene i pokušajte ponovno.'''",
        "nohistory": "Ne postoji historija izmjena za ovu stranicu.",
        "currentrev": "Trenutna verzija",
        "currentrev-asof": "Trenutna verzija na dan $2 u $3",
-       "revisionasof": "Verzija od $1",
+       "revisionasof": "Verzija na dan $2 u $3",
        "revision-info": "Izmjena od $1 od {{GENDER:$6|$2}}$7",
        "previousrevision": "← Starija izmjena",
        "nextrevision": "Novija izmjena →",
        "rev-deleted-user": "(korisničko ime uklonjeno)",
        "rev-deleted-event": "(stavka zapisa obrisana)",
        "rev-deleted-user-contribs": "[korisničko ime ili IP adresa uklonjeni - izmjena sakrivena u spisku doprinosa]",
-       "rev-deleted-text-permission": "Revizija ove stranice je '''obrisana'''.\nDetalje možete vidjeti u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisu brisanja].",
+       "rev-deleted-text-permission": "Revizija ove stranice je '''obrisana'''.\nDetalje možete vidjeti u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisniku brisanja].",
        "rev-suppressed-text-permission": "Revizija ove stranice je <strong>prekrivena</strong>.\nDetalji se mogu naći u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zapisniku prekrivanja].",
-       "rev-deleted-text-unhide": "Revizija ove stranice je '''obrisana'''.\nDetalje o tome može se vidjeti u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisniku brisanja].\nVi je i dalje možete [$1 vidjeti ovu reviziju] ako želite da nastavite.",
-       "rev-suppressed-text-unhide": "Ova revizija stranice je '''uklonjena'''.\nMožete pogledati detalje u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zapisu uklanjanja].\nVi je i dalje možete [$1 vidjeti ovu reviziju] ako želite.",
-       "rev-deleted-text-view": "Revizija ove stranice je '''obrisana'''.\nVi je možete vidjeti; detalji o tome se mogu vidjeti u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisu brisanja].",
+       "rev-deleted-text-unhide": "Izmjena ove stranice je <strong>obrisana</strong>.\nDetalje možete vidjeti u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisniku brisanja].\nIpak možete [$1 vidjeti ovu izmjenu] ako želite nastaviti.",
+       "rev-suppressed-text-unhide": "Ova revizija stranice je '''uklonjena'''.\nMožete pogledati detalje u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zapisu uklanjanja].\nVi i dalje možete [$1 vidjeti ovu reviziju] ako želite.",
+       "rev-deleted-text-view": "Revizija ove stranice je '''obrisana'''.\nVi je možete vidjeti; detalji o tome mogu se vidjeti u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisniku brisanja].",
        "rev-suppressed-text-view": "Ova revizija stranice je '''uklonjena'''.\nVi je možete vidjeti; možete pogledati detalje u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zapisu uklanjanja].",
        "rev-deleted-no-diff": "Ne možete vidjeti ovu razliku jer je jedna od izmjena '''obrisana'''.\nDetalji se nalaze u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisniku brisanja].",
        "rev-suppressed-no-diff": "Ne možete vidjeti ove razlike jer je jedna od revizija '''obrisana'''.",
-       "rev-deleted-unhide-diff": "Jedna od revizija u ovom pregledu razlika je '''obrisana'''.\nMožete pregledati detalje u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisniku brisanja].\nVi još uvijek možete [$1 vidjeti ove razlike] ako želite da nastavite.",
-       "rev-suppressed-unhide-diff": "edna od revizija ove razlike je '''uklonjena'''.\nMožete pogledati detalje u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zapisniku uklanjanja].\nVi i dalje možete [$1 vidjeti ove razlike] ako želite da nastavite.",
-       "rev-deleted-diff-view": "Jedna od revizija u ovoj razlici je '''obrisana'''.\nVi možete vidjeti ovu razliku; detalji o tome se mogu vidjeti u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisniku brisanja].",
+       "rev-deleted-unhide-diff": "Jedna od revizija u ovom pregledu razlika je '''obrisana'''.\nMožete pregledati detalje u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisniku brisanja].\nVi još uvijek možete [$1 vidjeti ove razlike] ako želite nastaviti.",
+       "rev-suppressed-unhide-diff": "Jedna od revizija ove razlike je '''uklonjena'''.\nMožete pogledati detalje u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zapisniku uklanjanja].\nVi i dalje možete [$1 vidjeti ove razlike] ako želite nastaviti.",
+       "rev-deleted-diff-view": "Jedna od revizija u ovoj razlici je '''obrisana'''.\nVi možete vidjeti ovu razliku; detalji o tome mogu se vidjeti u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisniku brisanja].",
        "rev-suppressed-diff-view": "Jedna od revizija u ovoj razlici je '''sakrivena'''.\nVi možete vidjeti ovu razliku; detalji se mogu vidjeti u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zapisniku sakrivanja].",
        "rev-delundel": "pokaži/sakrij",
        "rev-showdeleted": "prikaži",
        "revdelete-submit": "Primijeni na odabrane {{PLURAL:$1|reviziju|revizije}}",
        "revdelete-success": "'''Vidljivost izmjene je ažurirana.'''",
        "revdelete-failure": "'''Vidljivost revizije nije mogla biti ažurirana:'''\n$1",
-       "logdelete-success": "'''Vidljivost evidencije uspješno postavljena.'''",
+       "logdelete-success": "Postavljena je vidljivost unosa u zapisniku.",
        "logdelete-failure": "'''Zapisnik vidljivosti nije mogao biti postavljen:'''\n$1",
        "revdel-restore": "Promijeni dostupnost",
        "pagehist": "Historija stranice",
        "difference-multipage": "(Razlika između stranica)",
        "lineno": "Red $1:",
        "compareselectedversions": "Uporedi označene verzije",
-       "showhideselectedversions": "Pokaži/sakrij odabrane verzije",
+       "showhideselectedversions": "Prikaži/sakrij izabrane izmjene",
        "editundo": "poništi",
        "diff-empty": "(Nema razlike)",
        "diff-multi-sameuser": "({{PLURAL:$1|Nije prikazana jedna međurevizija|Nisu prikazane $1 međurevizije}} istog korisnika)",
        "timezoneregion-indian": "Indijski okean",
        "timezoneregion-pacific": "Tihi okean",
        "allowemail": "Dozvoli e-poštu od ostalih korisnika",
-       "prefs-searchoptions": "Traži",
+       "prefs-searchoptions": "Pretraga",
        "prefs-namespaces": "Imenski prostori",
        "default": "predodređeno",
        "prefs-files": "Datoteke",
        "editusergroup": "Uredi {{GENDER:$1|korisničke}} grupe",
        "editinguser": "Mijenjate korisnička prava korisnika <strong>[[User:$1|$1]]</strong> $2",
        "userrights-editusergroup": "Uredi korisničke grupe",
-       "saveusergroups": "Sačuvaj korisničke grupe",
+       "saveusergroups": "Sačuvaj {{GENDER:$1|korisničke}} grupe",
        "userrights-groupsmember": "Član:",
        "userrights-groupsmember-auto": "Uključeni član od:",
        "userrights-groups-help": "Možete promijeniti grupe kojima ovaj korisnik pripada:\n* Označeni kvadratić znači da je korisnik u toj grupi.\n* Neoznačen kvadratić znači da korisnik nije u toj grupi.\n* Oznaka * (zvjezdica) označava da Vi ne možete izbrisati ovu grupu ako je dodate i obrnutno.",
        "right-override-export-depth": "Izvoz stranica uključujući povezane stranice do dubine od 5 linkova",
        "right-sendemail": "Slanje e-maila drugim korisnicima",
        "right-passwordreset": "Pogledaj e-mailove za obnavljanje šifre",
-       "right-managechangetags": "Napravi i briši [[Special:Tags|oznake]] iz baze podataka",
+       "right-managechangetags": "Napravi i (de)aktiviraj [[Special:Tags|oznake]]",
        "right-applychangetags": "Primijeni [[Special:Tags|oznake]] na nečije izmjene",
        "right-changetags": "Dodavanje ili uklanjanje raznih [[Special:Tags|oznaka]] na pojedinačnim verzijama i unosima zapisnika",
        "grant-group-page-interaction": "Upravljanje stranicama",
        "uploadstash-clear": "Očisti sakrivene datoteke",
        "uploadstash-nofiles": "Nemate sakrivenih datoteka.",
        "uploadstash-badtoken": "Izvršavanje ove akcije je bilo neuspješno, možda zato što su vaša uređivačka odobrenja istekla. Pokušajte ponovo.",
-       "uploadstash-errclear": "Brisanje sakrivenih datoteka je bilo neuspješno.",
+       "uploadstash-errclear": "Brisanje datoteka nije uspjelo.",
        "uploadstash-refresh": "Osvježi spisak datoteka",
        "invalid-chunk-offset": "Neispravna polazna tačka",
        "img-auth-accessdenied": "Pristup onemogućen",
        "pageswithprop-prophidden-long": "sakriveno dugo tekstualno svojstvo ($1)",
        "pageswithprop-prophidden-binary": "sakriveno dugo binarno svojstvo ($1)",
        "doubleredirects": "Dvostruka preusmjerenja",
-       "doubleredirectstext": "Ova stranica prikazuje stranice koje preusmjeravaju na druga preusmjerenja.\nSvaki red sadrži veze na prvo i drugo preusmjerenje, kao i na prvu liniju teksta drugog preusmjerenja, što obično daje \"pravi\" ciljni članak, na koji bi prvo preusmjerenje i trebalo da pokazuje.\n<del>Precrtane</del> stavke su riješene.",
+       "doubleredirectstext": "Ova stranica prikazuje stranice koje preusmjeravaju na druga preusmjerenja.\nSvaki red sadrži linkove na prvo i drugo preusmjerenje, kao i na odredišnu stranicu drugog preusmjerenja koja je obično \"pravi\" članak na koji bi prvo preusmjerenje trebalo upućivati.\n<del>Precrtane</del> stavke su riješene.",
        "double-redirect-fixed-move": "[[$1]] je premješten.\nAutomatski je ažuriran i sada preusmjerava na [[$2]].",
        "double-redirect-fixed-maintenance": "Automatsko ospravljanje dvostrukih preusmjerenja sa [[$1]] na [[$2]] je posao održavanja.",
        "double-redirect-fixer": "Popravljač preusmjerenja",
        "withoutinterwiki-legend": "Prefiks",
        "withoutinterwiki-submit": "Prikaži",
        "fewestrevisions": "Stranice sa najmanje izmjena",
-       "nbytes": "$1 {{PLURAL:$1|bajt|bajtova}}",
+       "nbytes": "$1 {{PLURAL:$1|bajt|bajta|bajtova}}",
        "ncategories": "$1 {{PLURAL:$1|kategorija|kategorije}}",
        "ninterwikis": "$1 {{PLURAL:$1|međujezična veza|međujezične veze}}",
        "nlinks": "$1 {{PLURAL:$1|veza|veze}}",
        "log-title-wildcard": "Traži naslove koji počinju ovim tekstom",
        "showhideselectedlogentries": "Pokaži/sakrij izabrane zapise u evidenciji",
        "log-edit-tags": "Uredi oznake izabranih zapisničkih unosa",
+       "checkbox-select": "Izaberi: $1",
+       "checkbox-all": "Sve",
+       "checkbox-none": "Ništa",
+       "checkbox-invert": "Obrni",
        "allpages": "Sve stranice",
        "nextpage": "Sljedeća stranica ($1)",
        "prevpage": "Prethodna stranica ($1)",
        "watchlistanontext": "Morate biti prijavljeni kako biste vidjeli ili uređivali svoj spisak praćenih članaka.",
        "watchnologin": "Niste prijavljeni",
        "addwatch": "Dodaj na spisak praćenja",
-       "addedwatchtext": "Stranica \"[[:$1]]\" i njena stranica za razgovor dodani su na vaš [[Special:Watchlist|spisak praćenja]].",
+       "addedwatchtext": "Stranica \"[[:$1]]\" i njena stranica za razgovor dodani su na Vaš [[Special:Watchlist|spisak praćenja]].",
+       "addedwatchtext-talk": "\"[[:$1]]\" i njoj pridružena stranica dodane su na Vaš [[Special:Watchlist|spisak praćenja]].",
        "addedwatchtext-short": "Stranica \"$1\" je dodana na vaš spisak praćenja.",
        "removewatch": "Ukloni sa spiska praćenja",
-       "removedwatchtext": "Stranica \"[[:$1]]\" i njena stranica za razgovor uklonjeni su s [[Special:Watchlist|Vašeg spiska praćenja]].",
+       "removedwatchtext": "Stranica \"[[:$1]]\" i njena stranica za razgovor uklonjeni su s Vašeg [[Special:Watchlist|spiska praćenja]].",
+       "removedwatchtext-talk": "\"[[:$1]]\" i njoj pridružena stranica uklonjene su s Vašeg [[Special:Watchlist|spiska praćenja]].",
        "removedwatchtext-short": "Stranica \"$1\" je uklonjena sa vašeg spiska praćenja.",
        "watch": "Prati članak",
        "watchthispage": "Prati ovu stranicu",
        "enotif_body": "Poštovani $WATCHINGUSERNAME,\n\n$PAGEINTRO $NEWPAGE\n\nSažetak urednika: $PAGESUMMARY $PAGEMINOREDIT\n\nKontaktirajte urednika:\ne-pošta: $PAGEEDITOR_EMAIL\nwiki: $PAGEEDITOR_WIKI\n\nNeće biti drugih obavještenja u slučaju daljnjih izmjena osim ako prijavljeni ponovno posjetite stranicu. Također možete poništiti oznake obavijesti za sve praćene stranice koje imate na vašem spisku praćenja.\n\nVaš prijateljski {{SITENAME}} sistem obavještavanja\n\n--\nZa promjenu vaših postavki email obavijesti, posjetite\n{{canonicalurl:{{#special:Preferences}}}}\n\nZa promjenu postavki vašeg praćenja, posjetite\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nDa obrišete stranicu sa vašeg spiska praćenja, posjetite\n$UNWATCHURL\n\nPovratne informacije i daljnja pomoć:\n$HELPPAGE",
        "created": "napravljena",
        "changed": "promijenjena",
-       "deletepage": "Obrišite stranicu",
+       "deletepage": "Obriši stranicu",
        "confirm": "Potvrdite",
        "excontent": "sadržaj je bio: \"$1\"",
        "excontentauthor": "sadržaj je bio: \"$1\", a jedini urednik \"[[Special:Contributions/$2|$2]]\" ([[User talk:$2|razgovor]])",
        "exbeforeblank": "sadržaj prije brisanja je bio: \"$1\"",
        "delete-confirm": "Brisanje \"$1\"",
        "delete-legend": "Obriši",
-       "historywarning": "<strong>Upozorenje</strong>: Stranica koju želite da obrišete ima historiju sa otprilike $1 {{PLURAL:$1|revizijom|revizije|revizija}}:",
+       "historywarning": "<strong>Upozorenje:</strong> Stranica koju želite obrisati ima historiju sa $1 {{PLURAL:$1|izmjenom|izmjene|izmjena}}:",
        "historyaction-submit": "Prikaži",
-       "confirmdeletetext": "Brisanjem ćete obrisati stranicu ili sliku zajedno sa historijom iz baze podataka, ali će se iste moći vratiti kasnije.\nMolim potvrdite svoju namjeru, da razumijete posljedice i da ovo radite u skladu sa [[{{MediaWiki:Policy-url}}|pravilima]].",
+       "confirmdeletetext": "Obrisat ćete stranicu i njenu historiju.\nPotvrdite svoju namjeru, da razumijete posljedice i da ovo radite u skladu s [[{{MediaWiki:Policy-url}}|pravilima]].",
        "actioncomplete": "Radnja je izvršena",
        "actionfailed": "Akcija nije uspjela",
        "deletedtext": "Stranica \"$1\" je obrisana.\nPogledajte $2 za zapisnik nedavnih brisanja.",
        "restriction-level-all": "svi nivoi",
        "undelete": "Pregled obrisanih stranica",
        "undeletepage": "Pregled i vraćanje obrisanih stranica",
-       "undeletepagetitle": "'''Sljedeći sadržaj prikazuje obrisane revizije od [[:$1|$1]]'''.",
+       "undeletepagetitle": "<strong>Sljedeći sadržaj prikazuje obrisane izmjene stranice [[:$1|$1]]</strong>.",
        "viewdeletedpage": "Pregled obrisanih stranica",
        "undeletepagetext": "{{PLURAL:$1|Slijedeća $1 stranica je obrisana|Slijedeće $1 stranice su obrisane|Slijedećih $1 je obrisano}} ali su još uvijek u arhivi i mogu biti vraćene.\nArhiva moše biti periodično čišćena.",
-       "undelete-fieldset-title": "Vraćanje revizija",
-       "undeleteextrahelp": "Da biste vratili cijelu historiju stranice, ostavite sve kućice neoznačene i kliknite na <strong><em>{{int:undeletebtn}}</em></strong>.\nDa biste vratili određene stranice, izaberite verzije koje želite vratiti i kliknite na <strong><em>{{int:undeletebtn}}</em></strong>.",
+       "undelete-fieldset-title": "Vraćanje izmjena",
+       "undeleteextrahelp": "Da biste vratili cijelu historiju stranice, ostavite sve kućice neoznačene i kliknite na <strong><em>{{int:undeletebtn}}</em></strong>.\nDa biste vratili određene izmjene, označite ih i kliknite na <strong><em>{{int:undeletebtn}}</em></strong>.",
        "undeleterevisions": "$1 {{PLURAL:$1|izmjena je obrisana|izmjena je obrisano}}",
-       "undeletehistory": "Ako vratite stranicu, sve će verzije biti vraćene u njenu historiju.\nAko je u međuvremenu napravljena nova verzija s istim nazivom, vraćene verzije će se pojaviti njenoj ranijoj historiji.",
-       "undeleterevdel": "Vraćanje obrisanog se neće izvršiti ako bi rezultiralo da zaglavlje stranice ili revizija datoteke bude djelimično obrisano.\nU takvim slučajevima, morate ukloniti označene ili otkriti sakrivene najskorije obrisane revizije.",
+       "undeletehistory": "Ako vratite stranicu, sve će izmjene biti vraćene u njenu historiju.\nAko je u međuvremenu napravljena nova izmjena s istim nazivom, vraćene izmjene pojavit će se u njenoj ranijoj historiji.",
+       "undeleterevdel": "Vraćanje neće biti izvršeno ako je rezultat toga djelomično brisanje posljednje izmjene.\nU takvim slučajevima morate isključiti ili otkriti najnoviju obrisanu izmjenu.",
        "undeletehistorynoadmin": "Ova stranica je obrisana.\nRazlog za brisanje se nalazi ispod, zajedno s detaljima o korisniku koji je mijenjao stranicu prije brisanja.\nTekst obrisanih verzija dostupan je samo administratorima.",
        "undelete-revision": "Obrisana izmjena stranice $1 (dana $4, u $5) koju je {{GENDER:$3|napravio|napravila}} $3:",
        "undeleterevision-missing": "Nepoznata ili nedostajuća revizija.\nMožda ste unijeli pogrešan link, ili je revizija vraćena ili uklonjena iz arhive.",
        "undeletebtn": "Vrati",
        "undeletelink": "pogledaj/vrati",
        "undeleteviewlink": "pogledaj",
-       "undeleteinvert": "Izmijeni odabir",
+       "undeleteinvert": "Obrni izbor",
        "undeletecomment": "Razlog:",
        "undeletedrevisions": "{{PLURAL:$1|vraćena $1 verzija|vraćene $1 verzije|vraćeno $1 verzija}}",
        "undeletedrevisions-files": "{{PLURAL:$1|1 verzija|$1 verzije|$1 verzija}} i {{PLURAL:$2|1 datoteka|$2 datoteke|$2 datoteka}} vraćeno",
        "undeletedfiles": "{{PLURAL:$1|1 datoteka vraćena|$1 datoteke vraćene|$1 datoteka vraćeno}}",
-       "cannotundelete": "Vraćanje nije uspjelo:\n$1",
+       "cannotundelete": "Vraćanje jedne ili svih stavki nije uspjelo:\n$1",
        "undeletedpage": "'''$1 je vraćena'''\n\nProvjerite [[Special:Log/delete|zapis brisanja]] za zapise najskorijih brisanja i vraćanja.",
        "undelete-header": "Pogledajte [[Special:Log/delete|zapisnik brisanja]] za nedavno obrisane stranice.",
        "undelete-search-title": "Pretraga obrisanih stranica",
        "sp-contributions-newbies-sub": "Za nove korisnike",
        "sp-contributions-newbies-title": "Doprinosi novih korisnika",
        "sp-contributions-blocklog": "zapisnik blokiranja",
-       "sp-contributions-suppresslog": "obrisani doprinosi korisnika",
-       "sp-contributions-deleted": "obrisani doprinosi korisnika",
+       "sp-contributions-suppresslog": "obrisani {{GENDER:$1|korisnički}} doprinosi",
+       "sp-contributions-deleted": "obrisani {{GENDER:$1|korisnički}} doprinosi",
        "sp-contributions-uploads": "postavljanja",
        "sp-contributions-logs": "zapisnici",
        "sp-contributions-talk": "razgovor",
        "whatlinkshere-hideredirs": "$1 preusmjerenja",
        "whatlinkshere-hidetrans": "$1 uključenja",
        "whatlinkshere-hidelinks": "$1 linkove",
-       "whatlinkshere-hideimages": "Veze do datoteke $1",
+       "whatlinkshere-hideimages": "$1 linkova do datoteke",
        "whatlinkshere-filters": "Filteri",
        "autoblockid": "Automatska blokada #$1",
        "block": "Blokiraj korisnika",
        "move-page": "Premjesti $1",
        "move-page-legend": "Premjesti stranicu",
        "movepagetext": "Korištenjem ovog formulara možete preimenovati stranicu, premještajući cijelu historiju na novo ime.\nČlanak pod starim imenom postat će stranica koja preusmjerava na članak pod novim imenom. \nMožete automatski izmijeniti preusmjerenje do izvornog naslova.\nAko se ne odlučite na to, provjerite [[Special:DoubleRedirects|dvostruka]] ili [[Special:BrokenRedirects|neispravna preusmjeravanja]].\nDužni ste provjeriti da svi linkovi i dalje nastave voditi na prave stranice.\n\nImajte na umu da članak '''neće''' biti premješten ako već postoji članak pod imenom na koje ga namjeravate preusmjeriti osim u slučaju stranice za preusmjeravanje koja nema nikakvih starih izmjena.\nTo znači da možete vratiti stranicu na prethodno mjesto ako pogriješite, ali ne možete zamijeniti postojeću stranicu.\n\n'''Pažnja!'''\nOvo može biti drastična i neočekivana promjena kad su u pitanju popularne stranice.\nMolimo da dobro razmislite prije no što premjestite stranicu.",
-       "movepagetext-noredirectfixer": "Koristeći donji obrazac, preimenovat ćete stranicu i premjestiti cijelu njenu historiju na novi naziv.\nStari naziv postat će preusmjerenje na novi naziv.\nMolimo da provjerite postoje li [[Special:DoubleRedirects|dvostruka]] ili [[Special:BrokenRedirects|nedovršena preusmjerenja]].\nVi ste za to odgovorni te morate provjeriti jesu li linkovi ispravni i vode li tamo kamo bi trebali voditi.\n\nImajte na umu da stranica '''neće''' biti premještena ako već postoji stranica s tim imenom, osim ako je prazna ili je preusmjerenje ili nema ranije historije.\nOvo znači da možete preimenovati stranicu nazad gdje je ranije bila preimenovana ako ste pogriješili, ali ne možete ponovo preimenovati postojeću stranicu.\n\n'''Pažnja!'''\nImajte na umu da premještanje popularnog članka može biti\ndrastična i neočekivana promjena za korisnike; molimo da budete sigurni da ste shvatili posljedice prije no što nastavite.",
+       "movepagetext-noredirectfixer": "Koristeći donji obrazac, preimenovat ćete stranicu i premjestiti cijelu njenu historiju na novi naziv.\nStari naziv postat će preusmjerenje na novi naziv.\nMolimo da provjerite postoje li [[Special:DoubleRedirects|dvostruka]] ili [[Special:BrokenRedirects|nedovršena preusmjerenja]].\nVi ste za to odgovorni te morate provjeriti jesu li linkovi ispravni i vode li tamo kamo bi trebali voditi.\n\nImajte na umu da stranica '''neće''' biti premještena ako već postoji stranica s tim imenom, osim ako je prazna ili je preusmjerenje ili nema ranije historije.\nOvo znači da možete preimenovati stranicu nazad gdje je ranije bila preimenovana ako ste pogriješili, ali ne možete ponovo preimenovati postojeću stranicu.\n\n<strong>Napomena:</strong>\nImajte na umu da premještanje popularnog članka može biti\ndrastična i neočekivana promjena za korisnike; molimo da budete sigurni da ste shvatili posljedice prije no što nastavite.",
        "movepagetalktext": "Ako označite ovu kutijicu, odgovarajuća stranica za razgovor, ako postoji, automatski će biti premještena na novi naziv, osim ako već postoji sadržaj na odredišnoj stranici za razgovor.\n\nU tom slučaju, morat ćete ručno premjestiti ili prekopirati stranicu ako to želite.",
-       "moveuserpage-warning": "'''Upozorenje:''' Premještate korisničku stranicu. Molimo da zapamtite da će se samo stranica premjestiti a korisnik se ''neće'' preimenovati.",
+       "moveuserpage-warning": "<strong>Upozorenje:</strong> Premještate korisničku stranicu. Imajte u vidu da će samo stranica biti premještena, a sam korisnik <em>neće</em> biti preimenovan.",
        "movecategorypage-warning": "<strong>Upozorenje:</strong> Premještate stranicu kategorije. Imajte na umu da će samo stranica biti premještena i da sve stranice u staroj kategoriji <em>neće</em> biti ponovo kategorirane u novu kategoriju.",
        "movenologintext": "Morate biti registrovani korisnik i [[Special:UserLogin|prijavljeni]] da biste premjestili stranicu.",
        "movenotallowed": "Nemate dopuštenje za premještanje stranica.",
        "cant-move-category-page": "Nemate dopuštene da premještate stranice kategorija.",
        "cant-move-to-category-page": "Nemate dopuštenje da premjestite stranicu na stranicu kategorije.",
        "newtitle": "Novi naslov:",
-       "move-watch": "Prati ovu stranicu",
+       "move-watch": "Prati izvornu i odredišnu stranicu",
        "movepagebtn": "Premjesti stranicu",
        "pagemovedsub": "Premještanje uspjelo",
        "movepage-moved": "'''\"$1\" je premještena na \"$2\"'''",
        "movepage-moved-noredirect": "Pravljenje preusmjerenja je onemogućeno.",
        "articleexists": "Stranica pod tim imenom već postoji ili je ime koje ste izabrali neispravno. Molimo Vas da izaberete drugo ime.",
        "cantmove-titleprotected": "Ne možete premjestiti stranicu na ovu lokaciju jer je novi naslov zaštićen od pravljenja.",
-       "movetalk": "Premjestite i stranicu za razgovor ako je moguće.",
+       "movetalk": "Premjesti i stranicu za razgovor",
        "move-subpages": "Premjesti sve podstranice (do $1)",
        "move-talk-subpages": "Premjesti podstranice stranica za razgovor (do $1)",
        "movepage-page-exists": "Stranica $1 već postoji i ne može biti automatski zamijenjena.",
        "movenosubpage": "Ova stranica nema podstranica.",
        "movereason": "Razlog:",
        "revertmove": "vrati",
-       "delete_and_move_text": "==Potebno brisanje==\nOdredišna stranica \"[[:$1]]\" već postoji.\nDa li je želite obrisati kako bi ste mogli izvršiti premještanje?",
+       "delete_and_move_text": "Odredišna stranica \"[[:$1]]\" već postoji.\nŽelite li je obrisati da biste oslobodili mjesto za premještanje?",
        "delete_and_move_confirm": "Da, obriši stranicu",
-       "delete_and_move_reason": "Obrisano da bi se napravio prostor za premještanje iz \"[[$1]]\"",
+       "delete_and_move_reason": "Obrisano da se oslobodi mjesto za premještanje iz \"[[$1]]\"",
        "selfmove": "Izvorni i ciljani naziv su isti; strana ne može da se premjesti preko same sebe.",
        "immobile-source-namespace": "Ne mogu premjestiti stranice u imenski prostor \"$1\"",
        "immobile-target-namespace": "Ne mogu se premjestiti stranice u imenski prostor \"$1\"",
        "tags-actions-header": "Radnje",
        "tags-active-yes": "Da",
        "tags-active-no": "Ne",
-       "tags-source-extension": "Definirano preko proširenja",
+       "tags-source-extension": "Definirano softverom",
        "tags-source-manual": "Ručno postavili korisnici ili botovi",
        "tags-source-none": "Više se ne koristi",
        "tags-edit": "uređivanje",
        "htmlform-title-not-exists": "$1 ne postoji.",
        "htmlform-user-not-exists": "<strong>$1</strong> ne postoji.",
        "htmlform-user-not-valid": "<strong>$1</strong> nije ispravno korisničko ime.",
-       "sqlite-has-fts": "$1 sa podrškom pretrage cijelog teksta",
-       "sqlite-no-fts": "$1 bez podrške pretrage cijelog teksta",
        "logentry-delete-delete": "$1 {{GENDER:$2|obrisao|obrisala}} je stranicu $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|vratio|vratila}} je stranicu $3",
        "logentry-delete-event": "$1 je {{GENDER:$2|promijenio|promijenila}} vidljivost {{PLURAL:$5|događaja|$5 događaja}} u evidenciji na $3: $4",
        "feedback-external-bug-report-button": "Podnesi tehnički zadatak",
        "feedback-dialog-title": "Pošalji povratne informacije",
        "feedback-dialog-intro": "Možete koristiti jednostavni formular ispod kako biste poslali povratne informacije. Vaš komentar će biti dodan stranici \"$1\" zajedno s vašim korisničkim imenom.",
-       "feedback-error-title": "Greška",
        "feedback-error1": "Greška: Neprepoznati rezultat od API",
        "feedback-error2": "Greška: Uređivanje nije uspjelo",
        "feedback-error3": "Greška: Nema odgovora od API",
index 9e9e6b6..00bb056 100644 (file)
@@ -83,7 +83,7 @@
        "tog-enotifminoredits": "Notifica'm per correu també en casos d'edicions menors",
        "tog-enotifrevealaddr": "Mostra la meua adreça electrònica en els missatges d'avís per correu",
        "tog-shownumberswatching": "Mostra el nombre d'usuaris que hi vigilen",
-       "tog-oldsig": "Signatura actual:",
+       "tog-oldsig": "La vostra signatura actual:",
        "tog-fancysig": "Tractar la signatura com a text wiki (sense enllaç automàtic)",
        "tog-uselivepreview": "Utilitza la previsualització automàtica",
        "tog-forceeditsummary": "Avisa'm en deixar el resum de la modificació en blanc",
        "newwindow": "(obre en una nova finestra)",
        "cancel": "Cancel·la",
        "moredotdotdot": "Més...",
-       "morenotlisted": "Aquesta llista no és completa.",
+       "morenotlisted": "Aquesta llista pot ser incompleta.",
        "mypage": "Pàgina",
        "mytalk": "Discussió",
        "anontalk": "Discussió",
        "talk": "Discussió",
        "views": "Vistes",
        "toolbox": "Eines",
+       "tool-link-userrights": "Canvia els grups de l'{{GENDER:$1|usuari|usuària}}",
+       "tool-link-emailuser": "Envia un missatge electrònic a l'{{GENDER:$1|usuari|usuària}}",
        "userpage": "Visualitza la pàgina d'usuari",
        "projectpage": "Visualitza la pàgina del projecte",
        "imagepage": "Visualitza la pàgina del fitxer",
        "databaseerror-query": "Consulta: $1",
        "databaseerror-function": "Funció: $1",
        "databaseerror-error": "Error:$1",
+       "transaction-duration-limit-exceeded": "Per evitar una alta demora de resposta, s'ha interromput aquesta transacció perquè la durada d'escriptura ($1) ha sobrepassat el límit de $2 segons.\nSi esteu canviant molts elements alhora, intenteu fer-ho amb diverses operacions més petites.",
        "laggedslavemode": "Avís: La pàgina podria mancar de modificacions recents.",
        "readonly": "La base de dades està bloquejada",
        "enterlockreason": "Escriviu una raó pel bloqueig, així com una estimació de quan tindrà lloc el desbloqueig",
        "createacct-yourpasswordagain-ph": "Introduïu de nou la contrasenya",
        "userlogin-remembermypassword": "Mantén-me connectat",
        "userlogin-signwithsecure": "Connexió segura",
+       "cannotlogin-title": "No es pot iniciar la sessió",
+       "cannotlogin-text": "No és possible iniciar la sessió.",
        "cannotloginnow-title": "Ara no es pot iniciar la sessió",
        "cannotloginnow-text": "No es pot iniciar la sessió quan s'utilitza $1.",
+       "cannotcreateaccount-title": "No es poden crear comptes",
+       "cannotcreateaccount-text": "La creació de comptes directa no està habilitada en aquest wiki.",
        "yourdomainname": "El vostre domini",
        "password-change-forbidden": "No podeu canviar les contrasenyes en aquest wiki.",
        "externaldberror": "Hi ha hagut un error en la base de dades d'autenticació o bé no teniu permís per a actualitzar el vostre compte extern.",
        "botpasswords-label-delete": "Suprimeix",
        "botpasswords-label-resetpassword": "Reinicia la contrasenya",
        "botpasswords-label-grants": "Permisos aplicables:",
-       "botpasswords-label-restrictions": "Restriccions d'ús:",
        "botpasswords-label-grants-column": "Concedit",
        "botpasswords-bad-appid": "El nom del bot «$1» no és vàlid.",
        "botpasswords-insert-failed": "No s'ha pogut afegir el nom del bot «$1». Ja hi estava afegit?",
        "mergehistory-fail-bad-timestamp": "La marca horària no és vàlida.",
        "mergehistory-fail-invalid-source": "La pàgina font no és vàlida.",
        "mergehistory-fail-invalid-dest": "La pàgina de destinació no és vàlida.",
+       "mergehistory-fail-permission": "No hi ha permisos suficients per fusionar l'historial.",
        "mergehistory-fail-self-merge": "Les pàgines d'origen i de destinació no poden ser la mateixa",
        "mergehistory-fail-toobig": "No s'ha pogut fer la fusió de l'historial perquè es mourien més del límit de $1 {{PLURAL:$1|revisió|revisions}}.",
        "mergehistory-no-source": "La pàgina d'origen $1 no existeix.",
        "searchprofile-advanced-tooltip": "Cerca als espais de noms personalitzats",
        "search-result-size": "$1 ({{PLURAL:$2|1 paraula|$2 paraules}})",
        "search-result-category-size": "{{PLURAL:$1|1 membre|$1 membres}} ({{PLURAL:$2|1 subcategoria|$2 subcategories}}, {{PLURAL:$3|1 fitxer|$3 fitxers}})",
-       "search-redirect": "(redirigit des de $1)",
+       "search-redirect": "(redirecció des de $1)",
        "search-section": "(secció $1)",
        "search-category": "(categoria $1)",
        "search-file-match": "(coincideix amb el contingut del fitxer)",
        "grant-group-file-interaction": "Interacció amb fitxes multimèdia",
        "grant-group-watchlist-interaction": "Interacció amb la vostra llista de seguiment",
        "grant-group-email": "Enviament de correu",
+       "grant-group-high-volume": "Realitzeu activat d'alt volum",
        "grant-group-customization": "Personalització i preferències",
        "grant-group-administration": "Realitza accions administratives",
+       "grant-group-private-information": "Accedeix a les vostres dades privades",
        "grant-group-other": "Activitat miscel·lània",
        "grant-blockusers": "Bloca i desbloca usuaris",
        "grant-createaccount": "Crea comptes",
        "grant-createeditmovepage": "Crea, modifica i reanomena pàgines",
        "grant-delete": "Suprimeix pàgines, revisions i entrades de registre",
        "grant-editinterface": "Modifica l'espai de noms MediaWiki i els CSS/JavaScript d'usuari",
+       "grant-editmycssjs": "Modifiqueu el vostre CSS/JavaScript d'usuari",
        "grant-editmyoptions": "Editeu les vostres preferències d'usuari",
        "grant-editmywatchlist": "Modifica la llista de seguiment",
        "grant-editpage": "Modifica les pàgines existents",
        "grant-highvolume": "Edició d'alt volum",
        "grant-oversight": "Amaga usuaris i suprimeix revisions",
        "grant-patrol": "Patrulla els canvis de les pàgines",
+       "grant-privateinfo": "Accedeix a informació privada",
        "grant-protect": "Protecció i desprotecció de pàgines",
        "grant-rollback": "Reversió de canvis en pàgines",
        "grant-sendemail": "Enviament de correus a altres usuaris",
        "file-thumbnail-no": "El nom del fitxer comença per <strong>$1</strong>.\nSembla una imatge de mida reduïda <em>(miniatura)</em>.\nSi teniu la imatge en alta resolució, pugeu-la. Si no, mireu de canviar-li el nom.",
        "fileexists-forbidden": "Ja hi existeix un fitxer amb aquest nom i no es pot sobreescriure.\nSi us plau, torneu enrere i carregueu aquest fitxer sota un altre nom. [[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Ja hi ha un fitxer amb aquest nom en el fons comú de fitxers.\nSi encara voleu pujar el fitxer, torneu enrere i pugeu-ne una còpia amb un altre nom. [[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "La càrrega és un duplicat exacte de la versió actual de <strong>[[:$1]]</strong>.",
        "file-exists-duplicate": "Aquest fitxer és un duplicat {{PLURAL:$1|del fitxer |dels següents fitxers:}}",
        "file-deleted-duplicate": "S'ha suprimit anteriorment un fitxer idèntic a aquest ([[:$1]]). Hauríeu de comprovar el registre de supressions del fitxer abans de tornar-lo a carregar.",
        "file-deleted-duplicate-notitle": "Un fitxer idèntic a aquest fitxer havia estat suprimit abans, i també el títol. Hauríeu de demanar a algú que pugui veure les dades suprimides del fitxer que revisi la situació abans de procedir a tornar a carregar-lo.",
        "upload-dialog-disabled": "La càrrega de fitxers utilitzant aquest quadre de diàleg està desactivada en aquest wiki.",
        "upload-dialog-title": "Carrega un fitxer",
        "upload-dialog-button-cancel": "Cancel·la",
+       "upload-dialog-button-back": "Enrere",
        "upload-dialog-button-done": "Fet",
        "upload-dialog-button-save": "Desa",
        "upload-dialog-button-upload": "Carrega",
        "apisandbox-deprecated-parameters": "Paràmetres obsolets",
        "apisandbox-submit-invalid-fields-title": "Alguns camps no són vàlids",
        "apisandbox-results": "Resultats",
+       "apisandbox-sending-request": "S'està enviant una sol·licitud API...",
        "apisandbox-request-url-label": "Sol·licita URL:",
        "apisandbox-request-time": "Temps de sol·licitud: {{PLURAL:$1|$1 ms}}",
+       "apisandbox-continue": "Continua",
+       "apisandbox-continue-clear": "Neteja",
        "booksources": "Obres de referència",
        "booksources-search-legend": "Cerca fonts de llibres",
        "booksources-isbn": "ISBN:",
        "ipb-unblock": "Desbloca un usuari o una adreça IP",
        "ipb-blocklist": "Llista els bloquejos existents",
        "ipb-blocklist-contribs": "Contribucions de {{GENDER:$1|$1}}",
+       "ipb-blocklist-duration-left": "$1 restant",
        "unblockip": "Desbloca l'usuari",
        "unblockiptext": "Empreu el següent formulari per restaurar\nl'accés a l'escriptura a una adreça IP o un usuari prèviament bloquejat.",
        "ipusubmit": "Desbloca aquesta adreça",
        "block-log-flags-hiddenname": "nom d'usuari ocult",
        "range_block_disabled": "La facultat dels administradors per a crear bloquejos de rang està desactivada.",
        "ipb_expiry_invalid": "Data d'acabament no vàlida.",
+       "ipb_expiry_old": "El temps de vençuda és en el passat.",
        "ipb_expiry_temp": "Els blocatges amb ocultació de nom d'usuari haurien de ser permanents.",
        "ipb_hide_invalid": "No s'ha pogut eliminar el compte; té més {{PLURAL:$1|d'una edició|de $1 edicions}}.",
        "ipb_already_blocked": "«$1» ja està blocat",
        "pageinfo-article-id": "ID de la pàgina",
        "pageinfo-language": "Llengua del contingut de la pàgina",
        "pageinfo-content-model": "Plantilla de contingut de pàgina",
+       "pageinfo-content-model-change": "canvia",
        "pageinfo-robot-policy": "Indexació per robots",
        "pageinfo-robot-index": "Permès",
        "pageinfo-robot-noindex": "No permès",
        "pageinfo-category-pages": "Nombre de pàgines",
        "pageinfo-category-subcats": "ombre de subcategories",
        "pageinfo-category-files": "Nombre d'arxius",
+       "pageinfo-user-id": "ID d'usuari",
        "markaspatrolleddiff": "Marca com a supervisat",
        "markaspatrolledtext": "Marca la pàgina com a supervisada",
        "markaspatrolledtext-file": "Marc la versió del fitxer com patrullada",
        "newimages-showbots": "Mostra les càrregues dels bots",
        "newimages-hidepatrolled": "Amaga les càrregues patrullades",
        "noimages": "Res per veure.",
+       "gallery-slideshow-toggle": "Canvia les miniatures",
        "ilsubmit": "Cerca",
        "bydate": "per data",
        "sp-newimages-showfrom": "Mostra fitxers nous des del $1 a les $2",
        "tag-filter": "Filtre d'[[Special:Tags|etiquetes]]:",
        "tag-filter-submit": "Filtra",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etiqueta|Etiquetes}}]]: $2)",
+       "tag-mw-contentmodelchange": "canvi de model de contingut",
        "tags-title": "Etiquetes",
        "tags-intro": "Aquesta pàgina llista les etiquetes amb què el programari pot marcar una modificació, i el seu significat.",
        "tags-tag": "Nom de l'etiqueta",
        "htmlform-cloner-create": "Afegeix més",
        "htmlform-cloner-delete": "Suprimeix",
        "htmlform-cloner-required": "Cal com a mínim un valor.",
+       "htmlform-time-placeholder": "HH:MM:SS",
        "htmlform-title-badnamespace": "[[:$1]] no es troba en l'espai de noms \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" és un títol de pàgina no editable",
        "htmlform-title-not-exists": "$1 no existeix.",
        "htmlform-user-not-exists": "<strong>$1</strong> no existeix.",
        "htmlform-user-not-valid": "<strong>$1</strong> no és nom d'usuari vàlid.",
-       "sqlite-has-fts": "$1, amb suport de cerca de text íntegre",
-       "sqlite-no-fts": "$1, sense supor de cerca de text íntegre",
        "logentry-delete-delete": "$1 {{GENDER:$2|ha esborrat}} la pàgina $3",
        "logentry-delete-restore": "$1 ha restaurat $3",
        "logentry-delete-event": "$1 {{GENDER:$2|ha canviat}} la visibilitat {{PLURAL:$5|d'un esdeveniment al registre|de $5 esdeveniments al registre}} de $3: $4",
        "feedback-external-bug-report-button": "Arxiva una tasca tècnica",
        "feedback-dialog-title": "Envia el comentari",
        "feedback-dialog-intro": "Podeu utilitzar el senzill formulari de sota per a trametre la vostra opinió. El comentari s'afegirà a la pàgina «$1» juntament amb el vostre nom d'usuari.",
-       "feedback-error-title": "Error",
        "feedback-error1": "Error: Resultat de l'API no reconegut",
        "feedback-error2": "Error: Edició fallida",
        "feedback-error3": "Error: No hi ha resposta de l'API",
        "feedback-thanks": "Gràcies! S'ha publicat la vostra opinió a la pàgina «[$2 $1]».",
        "feedback-thanks-title": "Gràcies!",
        "feedback-useragent": "Agent d'usuari:",
-       "searchsuggest-search": "Cerca",
+       "searchsuggest-search": "Cerca a {{SITENAME}}",
        "searchsuggest-containing": "que conté ...",
+       "api-error-autoblocked": "S'ha blocat la vostra IP automàticament perquè la va utilitzar un usuari blocat.",
        "api-error-badaccess-groups": "No teniu permís per a carregar fitxers en aquest wiki.",
        "api-error-badtoken": "Error intern: argument incorrecte.",
        "api-error-copyuploaddisabled": "Les càrregues via URL estan desactivades en aquest servidor.",
        "log-action-filter-protect-protect": "Protecció",
        "log-action-filter-protect-modify": "Modificació de la protecció",
        "log-action-filter-protect-unprotect": "Desprotecció",
+       "log-action-filter-rights-rights": "Canvi manual",
+       "log-action-filter-rights-autopromote": "Canvi automàtic",
+       "log-action-filter-suppress-event": "Supressió de registres",
+       "log-action-filter-suppress-revision": "Supressió de revisions",
+       "log-action-filter-suppress-delete": "Supressió de pàgines",
        "log-action-filter-upload-upload": "Nova càrrega",
        "log-action-filter-upload-overwrite": "Torna a carregar",
        "authmanager-authn-not-in-progress": "L'autenticació no està en curs o les dades de sessió s'han perdut. Comenceu de nou des del principi.",
        "authmanager-authn-no-primary": "Les dades credencials no s'han pogut autenticar.",
        "authmanager-authn-autocreate-failed": "Ha fallat la creació automàtica d'un compte local: $1",
+       "authmanager-create-disabled": "S'ha inhabilitat la creació de comptes.",
+       "authmanager-create-from-login": "Per crear un compte, ompliu els camps de sota.",
+       "authmanager-authplugin-setpass-bad-domain": "Domini invàlid.",
+       "authmanager-retype-help": "Contrasenya de nou per confirmar",
+       "authmanager-email-label": "Correu electrònic",
+       "authmanager-email-help": "Adreça electrònica",
        "authmanager-realname-label": "Nom real",
        "authmanager-realname-help": "Nom real de l'usuari",
+       "authmanager-provider-password": "Autenticació basada en contrasenya",
+       "authmanager-provider-password-domain": "Autenticació basada en contrasenya i en domini",
        "authmanager-provider-temporarypassword": "Contrasenya temporal",
        "authprovider-resetpass-skip-label": "Omet",
+       "specialpage-securitylevel-not-allowed-title": "No permès",
+       "authpage-cannot-login": "No s'ha pogut iniciar la sessió.",
        "authpage-cannot-login-continue": "No es pot continuar amb l'inicio de sessió. Probablement la vostra sessió ha expirat.",
+       "authpage-cannot-create": "No s'ha pogut iniciar la creació del compte.",
        "authpage-cannot-create-continue": "No es pot prosseguir la creació del compte. Probablement la vostra sessió ha expirat.",
+       "authpage-cannot-link": "No s'ha pogut iniciar l'enllaç del compte.",
+       "cannotauth-not-allowed-title": "S'ha denegat el permís",
+       "cannotauth-not-allowed": "No teniu permisos per utilitzar la pàgina",
        "changecredentials": "Canvi de dades credencials",
        "changecredentials-submit": "Canvia les dades credencials",
        "credentialsform-provider": "Tipus de dades credencials:",
        "credentialsform-account": "Nom del compte:",
+       "cannotlink-no-provider-title": "No hi ha cap compte enllaçable",
+       "cannotlink-no-provider": "No hi ha cap compte enllaçable.",
+       "linkaccounts": "Enllaça els comptes",
+       "linkaccounts-success-text": "S'ha enllaçat el compte.",
        "linkaccounts-submit": "Enllaça els comptes",
        "unlinkaccounts": "Desenllaça els comptes",
        "unlinkaccounts-success": "El compte s'ha desenllaçat.",
-       "authenticationdatachange-ignored": "No s'ha gestionat el canvi de dades d'autenticació. Potser no s'ha configurat cap proveïdor?"
+       "authenticationdatachange-ignored": "No s'ha gestionat el canvi de dades d'autenticació. Potser no s'ha configurat cap proveïdor?",
+       "edit-error-short": "Error: $1",
+       "edit-error-long": "Errors:\n\n$1"
 }
index 2a856d9..e4ed07f 100644 (file)
                        "LNDDYL",
                        "唐吉訶德的侍從",
                        "Ztl8702",
-                       "Macofe"
+                       "Macofe",
+                       "GnuDoyng"
                ]
        },
-       "tog-underline": "下劃綫鏈接",
-       "tog-hideminor": "囥起最近改變其過幼修改",
-       "tog-hidepatrolled": "囥起最近改變其巡邏修改",
-       "tog-newpageshidepatrolled": "共巡邏視頁趁新建頁列表𡅏囥起去",
+       "tog-underline": "Â-hĕk-siáng lièng-giék",
+       "tog-hideminor": "Káung kī cī-bŏng gì guó-éu siŭ-gāi",
+       "tog-hidepatrolled": "Káung kī cī-bŏng ī giēng-că gì siŭ-gāi",
+       "tog-newpageshidepatrolled": "Káung kī sĭng hiĕk dăng-dăng gà̤-dēng ī-gĭng giēng-că guó gì hiĕk",
        "tog-extendwatchlist": "敆擴展監視單單臺中顯示所有其更改,伓啻最近其更改",
        "tog-usenewrc": "按頁顯示最近修改共監視列表臺中其群組改變",
-       "tog-numberheadings": "自動編號其標題",
-       "tog-showtoolbar": "顯示編輯工具欄",
+       "tog-numberheadings": "Biĕu-dà̤ cê̤ṳ-dông piĕng-hô̤",
+       "tog-showtoolbar": "Hiēng-sê piĕng-cĭk gă-sĭ-dèu",
        "tog-editondblclick": "雙擊就修改頁面",
        "tog-editsectiononrightclick": "啟用右擊標題編輯段落",
        "tog-watchcreations": "加添我開其頁面共我上傳其文件遘我其監視單",
@@ -37,7 +38,7 @@
        "tog-enotifminoredits": "就㑚講是過幼編輯,也着發電子郵件乞我",
        "tog-enotifrevealaddr": "敆通知郵件臺中顯示我其電子郵件地址",
        "tog-shownumberswatching": "顯示監視用戶其數量",
-       "tog-oldsig": "存在其簽名",
+       "tog-oldsig": "Nṳ̄ còng-câi gì chiĕng-miàng:",
        "tog-fancysig": "共簽名當成維基文本(無自動鏈接)",
        "tog-uselivepreview": "使即時預覽",
        "tog-forceeditsummary": "提醒我行遘蜀萆空白其編輯總結",
        "tog-watchlisthidebots": "囥起監視單其機器人其修改",
        "tog-watchlisthideminor": "囥起監視單其過幼修改",
        "tog-watchlisthideliu": "共已經登錄其用戶其編輯趁監視單𡅏囥起咯",
+       "tog-watchlistreloadautomatically": "Sìng-tō̤ dèu-giông gāi-biéng sèng-hâiu cê̤ṳ-dông gĕng-sĭng gáng-sê-dăng (JavaScript diŏh kŭi lā̤)",
        "tog-watchlisthideanons": "共匿名其用戶其編輯趁監視單𡅏囥起咯",
        "tog-watchlisthidepatrolled": "共巡查其編輯趁監視單𡅏囥起咯",
+       "tog-watchlisthidecategorization": "Káung kī hiĕk gì lôi-biék",
        "tog-ccmeonemails": "共我發乞其他用戶其電子郵件其備份發乞我。",
        "tog-diffonly": "伓使敆下底其顯示𣍐蜀様其地方顯示頁面內容",
        "tog-showhiddencats": "㪗藏類別",
-       "tog-norollbackdiff": "敆回滾其時候,無叕𣍐蜀様其地方",
+       "tog-norollbackdiff": "Cék-hèng huòi-gūng ī-hâiu ng-sāi hiēng-sê chă-biék",
        "tog-useeditwarning": "我編輯頁面其時候離開,起動警告我蜀下",
-       "tog-prefershttps": "躒入以後始終使安全連接",
+       "tog-prefershttps": "Láuk-diē ī-hâiu tié-lāu sāi ăng-ciòng lièng-giék",
        "underline-always": "直頭",
        "underline-never": "頭𡅏無",
        "underline-default": "皮膚或者瀏覽器默認其",
        "editfont-monospace": "蜀様寬其字體",
        "editfont-sansserif": "無襯線其字體",
        "editfont-serif": "有襯線其字體",
-       "sunday": "禮拜",
-       "monday": "拜一",
-       "tuesday": "拜二",
-       "wednesday": "拜三",
-       "thursday": "拜四",
-       "friday": "拜五",
-       "saturday": "拜六",
+       "sunday": "Lā̤-bái",
+       "monday": "Bái-ék",
+       "tuesday": "Bái-nê",
+       "wednesday": "Bái-săng",
+       "thursday": "Bái-sé",
+       "friday": "Bái-ngô",
+       "saturday": "Bái-lĕ̤k",
        "sun": "禮拜",
-       "mon": "拜一",
-       "tue": "拜二",
+       "mon": "B1",
+       "tue": "Bái-nê",
        "wed": "拜三",
        "thu": "拜四",
        "fri": "拜五",
        "sat": "拜六",
-       "january": "一月",
-       "february": "二月",
-       "march": "三月",
-       "april": "四月",
-       "may_long": "五月",
-       "june": "六月",
-       "july": "七月",
-       "august": "八月",
-       "september": "九月",
-       "october": "十月",
-       "november": "十一月",
-       "december": "十二月",
+       "january": "Ék-nguŏk",
+       "february": "Nê-nguŏh",
+       "march": "Săng-nguŏk",
+       "april": "Sé-nguŏk",
+       "may_long": "Ngô-nguŏk",
+       "june": "Lĕ̤k-nguŏk",
+       "july": "Chék-nguŏk",
+       "august": "Báik-nguŏk",
+       "september": "Gāu-nguŏk",
+       "october": "Sĕk-nguŏk",
+       "november": "Sĕk-ék-nguŏk",
+       "december": "Sĕk-nê-nguŏk",
        "january-gen": "一月",
-       "february-gen": "二月",
+       "february-gen": "Nê-nguŏk",
        "march-gen": "三月",
        "april-gen": "四月",
        "may-gen": "五月",
        "october-gen": "十月",
        "november-gen": "十一月",
        "december-gen": "十二月",
-       "jan": "一月",
-       "feb": "二月",
-       "mar": "三月",
-       "apr": "四月",
-       "may": "五月",
-       "jun": "六月",
-       "jul": "七月",
-       "aug": "八月",
-       "sep": "九月",
-       "oct": "十月",
-       "nov": "十一月",
-       "dec": "十二月",
+       "jan": "Ék-nguŏk",
+       "feb": "Nê-nguŏk",
+       "mar": "Săng-nguŏk",
+       "apr": "Sé-nguŏk",
+       "may": "Ngô-nguŏk",
+       "jun": "Lĕ̤k-nguŏk",
+       "jul": "Chék-nguŏk",
+       "aug": "Báik-nguŏk",
+       "sep": "Gāu-nguŏk",
+       "oct": "Sĕk-nguŏk",
+       "nov": "Sĕk-ék-nguŏk",
+       "dec": "Sĕk-nê-nguŏk",
        "january-date": "一月$1號",
        "february-date": "二月$1號",
        "march-date": "三月$1號",
        "october-date": "十月$1號",
        "november-date": "十一月$1號",
        "december-date": "十二月$1號",
-       "pagecategories": "{{PLURAL:$1}}類別",
+       "period-am": "AM",
+       "period-pm": "PM",
+       "pagecategories": "{{PLURAL:$1|Lôi-biék}}",
        "category_header": "「$1」類別下底其頁面",
        "subcategories": "子類別",
        "category-media-header": "「$1」類別下底其媒體",
        "category-empty": "''茲類別下底現在無文章也無媒體。''",
-       "hidden-categories": "{{PLURAL:$1}}乞囥起其類別",
+       "hidden-categories": "{{PLURAL:$1}} bĭk ké̤ṳk káung kī gì lôi-biék",
        "hidden-category-category": "已經囥起其類別",
-       "category-subcat-count": "{{PLURAL:$2|茲萆分類僅包括下底蜀萆子分類|茲分類有 {{PLURAL:$1|子分類|$1 萆子分類}},總計 $2 萆。}}",
+       "category-subcat-count": "{{PLURAL:$2|Ciā lôi-biék nâ bău-guák â-dā̤ siŏh bĭk cṳ̄-lôi-biék.|Ciā lôi-biék bău-guák â-dā̤ $1 bĭk cṳ̄-lôi-biék, gê̤ṳng-cūng $2 bĭk.}}",
        "category-subcat-count-limited": "茲蜀萆類別下底有子類別{{PLURAL:$1}}",
-       "category-article-count": "{{PLURAL:$2|茲蜀萆類別儷有下底蜀頁。|共總有$2頁,下底其茲$1頁敆茲蜀萆類別𡅏。}}",
+       "category-article-count": "{{PLURAL:$2|Ciā lôi-biék nâ bău-guák â-dā̤ siŏh bĭk hiĕk-miêng.|Ciā lôi-biék bău-guák â-dā̤ $1 bĭk hiĕk-miêng, gê̤ṳng-cūng $2 bĭk.}}",
        "category-article-count-limited": "下底$1頁敆茲蜀萆類別𡅏{{PLURAL:$1}}",
        "category-file-count": "茲蜀萆類別共總有$2萆文件,下底茲$1萆文件都敆茲蜀萆類別𡅏。",
        "category-file-count-limited": "下底其茲$1萆文件都敆茲蜀萆類別𡅏。{{PLURAL:$1}}",
        "listingcontinuesabbrev": "(繼續前斗)",
        "index-category": "索引其頁面",
-       "noindex-category": "未索引其頁面",
+       "noindex-category": "Muôi sáuk-īng gì hiĕk",
        "broken-file-category": "獃其文件鏈接其頁面",
        "about": "關於",
        "article": "文章",
        "newwindow": "(敆新窗口打開)",
        "cancel": "取消",
        "moredotdotdot": "更価...",
-       "morenotlisted": "茲蜀萆單單𣍐完整。",
+       "morenotlisted": "Ciā dăng-dăng mâ̤ uòng-cīng.",
        "mypage": "頁面",
        "mytalk": "我其討論",
-       "anontalk": "茲隻IP其討論頁",
-       "navigation": "引導",
-       "and": "&#32;",
+       "anontalk": "Păng-gōng",
+       "navigation": "Īng-dô̤:",
+       "and": "&#32;gâe̤ng",
        "qbfind": "討",
        "qbbrowse": "覷蜀覷",
        "qbedit": "修改",
        "faq": "真稠碰著其問題",
        "faqpage": "Project:稠問其問題",
        "actions": "動作",
-       "namespaces": "命名空間",
-       "variants": "變體",
-       "navigation-heading": "導航菜單",
+       "namespaces": "Miàng-kŭng-găng",
+       "variants": "Biéng-tā̤",
+       "navigation-heading": "Dô̤-hòng chái-dăng",
        "errorpagetitle": "鄭咯",
        "returnto": "轉去$1。",
-       "tagline": "來源:{{SITENAME}}",
-       "help": "幫助",
-       "search": "尋討",
-       "searchbutton": "",
+       "tagline": "Lài-nguòng: {{SITENAME}}",
+       "help": "Bŏng-cô",
+       "search": "Sìng-tō̤",
+       "searchbutton": "Tō̤",
        "go": "去",
-       "searcharticle": "",
-       "history": "頁面歷史",
-       "history_short": "歷史",
+       "searcharticle": "Kó̤",
+       "history": "Hiĕk-miêng lĭk-sṳ̄",
+       "history_short": "Lĭk-sṳ̄",
        "updatedmarker": "趁我最後蜀回訪問開始更新",
-       "printableversion": "會拍印其版本",
-       "permalink": "永久鏈接",
+       "printableversion": "Â̤ páh-éng gì bēng-buōng",
+       "permalink": "Īng-giū lièng-giék",
        "print": "拍印",
-       "view": "覷蜀覷",
+       "view": "Ché̤ṳ-siŏh-ché̤ṳ",
        "view-foreign": "敆$1𡅏看",
-       "edit": "修改",
+       "edit": "Siŭ-gāi",
        "edit-local": "編輯當地描述",
        "create": "創建",
        "create-local": "添加當地描述",
        "unprotectthispage": "改變茲蜀頁其保護狀態",
        "newpage": "新頁",
        "talkpage": "討論茲頁",
-       "talkpagelinktext": "討論",
+       "talkpagelinktext": "páng-gōng",
        "specialpage": "特殊頁",
-       "personaltools": "個人其傢私花",
+       "personaltools": "Gó̤-ìng gì gă-sĭ-huă",
        "articlepage": "覷蜀覷內容頁面",
-       "talk": "討論",
-       "views": "覷蜀覷",
-       "toolbox": "傢私花",
+       "talk": "Tō̤-lâung",
+       "views": "Ché̤ṳ-siŏh-ché̤ṳ",
+       "toolbox": "Gă-sĭ-huă",
        "userpage": "覷蜀覷用戶頁面",
        "projectpage": "看工程頁",
        "imagepage": "覷蜀覷文件頁面",
        "viewhelppage": "看幫助頁",
        "categorypage": "看分類頁",
        "viewtalkpage": "看討論",
-       "otherlanguages": "其它其語言",
-       "redirectedfrom": "(趁$1重定向過來)",
+       "otherlanguages": "Gì-tă ngṳ̄-ngiòng",
+       "redirectedfrom": "(téng $1 tṳ̀ng-déng-hióng guó-lì)",
        "redirectpagesub": "重定向頁",
        "redirectto": "重定向遘",
-       "lastmodifiedat": "茲蜀頁是着$1 $2其辰候最後修改其。",
+       "lastmodifiedat": "Cī siŏh hiĕk sê diŏh $1 $2 sèng-hâiu có̤i-hâiu siŭ-gāi gì.",
        "viewcount": "茲蜀頁已經乞訪問$1回了。{{PLURAL:$1}}",
        "protectedpage": "保護頁",
-       "jumpto": "跳遘:",
-       "jumptonavigation": "引導:",
-       "jumptosearch": "尋討",
+       "jumpto": "Tiéu gáu:",
+       "jumptonavigation": "Īng-dô̤:",
+       "jumptosearch": "Sìng-tō̤",
        "view-pool-error": "對不住,服務器茲蜀萆時候已弳過載了。\n過価用戶敆𡅏覷茲蜀頁。\n起動等仂久再來覷茲蜀頁。\n\n$1",
        "generic-pool-error": "對不住,現刻時服務器過載了。\n實在過価用戶敆𡅏訪問茲蜀萆資源。\n起動汝等蜀刻再訪問茲蜀萆資源。",
        "pool-timeout": "等待鎖定其時間遘了",
        "pool-queuefull": "隊列池已經滿了",
        "pool-errorunknown": "𣍐曉什乇綻咯",
-       "aboutsite": "關於{{SITENAME}}",
-       "aboutpage": "Project:關於",
+       "poolcounter-usage-error": "Ê̤ṳng-huák chó̤-nguô: $1",
+       "aboutsite": "Guăng-ṳ̀ {{SITENAME}}",
+       "aboutpage": "Project:Guăng-ṳ̀",
        "copyright": "內容會使敆$1下底會使獲得遘,若無會給出其它提示。",
-       "copyrightpage": "{{ns:project}}:版權",
-       "currentevents": "大樹下",
-       "currentevents-url": "Project:大樹下",
-       "disclaimers": "無負責聲明",
-       "disclaimerpage": "Project:無負責聲明",
+       "copyrightpage": "{{ns:project}}:Bēng-guòng",
+       "currentevents": "Duâi Ché̤ṳ Â",
+       "currentevents-url": "Project:Duâi Ché̤ṳ Â",
+       "disclaimers": "Mò̤-hô-cáik sĭng-mìng",
+       "disclaimerpage": "Project:Mò̤-hô-cáik sĭng-mìng",
        "edithelp": "修改保護",
-       "mainpage": "頭頁",
-       "mainpage-description": "頭頁",
+       "helppage-top-gethelp": "Bŏng-cô",
+       "mainpage": "Tàu Hiĕk",
+       "mainpage-description": "Tàu Hiĕk",
        "policy-url": "Project:政策",
-       "portal": "廳中",
-       "portal-url": "Project:社區門戶",
-       "privacy": "隱私政策",
-       "privacypage": "Project:隱私政策",
+       "portal": "Tiăng-dŏng",
+       "portal-url": "Project:Tiăng-dŏng",
+       "privacy": "Ṳ̄ng-sṳ̆ céng-cháik",
+       "privacypage": "Project:Ṳ̄ng-sŭ céng-cháik",
        "badaccess": "權限錯誤",
        "badaccess-group0": "汝𣍐使做汝要求其茲蜀萆動作。",
        "badaccess-groups": "汝卜做其動作着{{PLURAL:$2|茲蜀群組|茲蜀組裡勢}}其用戶乍有能耐使:$1",
        "versionrequired": "需要版本$1其MediaWiki",
        "versionrequiredtext": "需要MediaWiki其版本$1來使茲蜀頁。\n覷[[Special:Version|版本頁面]]。",
        "ok": "好",
-       "retrievedfrom": "趁「$1」退過來",
+       "retrievedfrom": "Lài-nguòng: \"$1\"",
        "youhavenewmessages": "汝有$1($2)。",
        "youhavenewmessagesfromusers": "汝有趁$3用戶($2)來其$1萆信息{{PLURAL:$3}}",
        "youhavenewmessagesmanyusers": "汝有趁雅価用戶($2)其$1信息",
        "newmessageslinkplural": "{{PLURAL:$1|蜀條新其消息|999=新其消息}}",
        "newmessagesdifflinkplural": "最後{{PLURAL:$1|回改變|999=回改變}}",
        "youhavenewmessagesmulti": "汝有趁$1來其新信息",
-       "editsection": "修改",
+       "editsection": "siŭ-gāi",
        "editold": "修改",
        "viewsourceold": "看源代碼",
-       "editlink": "修改",
-       "viewsourcelink": "看源代碼",
-       "editsectionhint": "修改段:$1",
-       "toc": "目錄",
+       "editlink": "siŭ-gāi",
+       "viewsourcelink": "Káng nguòng-dâi-mā",
+       "editsectionhint": "Siŭ-gāi dâung: $1",
+       "toc": "Mŭk-liŏh",
        "showtoc": "顯示",
        "hidetoc": "囥起",
        "collapsible-collapse": "掩",
        "feed-invalid": "無乇使其下標填充類型",
        "feed-unavailable": "𣍐使聚合訂閱",
        "site-rss-feed": "$1 RSS 訂閱",
-       "site-atom-feed": "$1原子訂閱",
+       "site-atom-feed": "$1 Atom déng-iŏk",
        "page-rss-feed": "「$1」RSS訂閱",
-       "page-atom-feed": "「$1」原子訂閱",
-       "red-link-title": "$1(無許頁)",
+       "page-atom-feed": "$1 Atom déng-iŏk",
+       "red-link-title": "$1 (mò̤ hī hiĕk)",
        "sort-descending": "降序排序",
        "sort-ascending": "升序排序",
-       "nstab-main": "頁面",
+       "nstab-main": "Ùng-ciŏng",
        "nstab-user": "用戶頁",
        "nstab-media": "媒體頁",
-       "nstab-special": "特殊頁面",
+       "nstab-special": "Dĕk-sṳ̀-hiĕk",
        "nstab-project": "工程頁",
-       "nstab-image": "文件",
+       "nstab-image": "Ùng-giông",
        "nstab-mediawiki": "消息",
        "nstab-template": "模板",
        "nstab-help": "幫助頁",
-       "nstab-category": "類別",
+       "nstab-category": "Lôi-biék",
+       "mainpage-nstab": "Tàu Hiĕk",
        "nosuchaction": "無茲蜀種行動",
        "nosuchactiontext": "茲蜀種URL指定其行動是𣍐合法其。",
        "nosuchspecialpage": "無總款其特殊頁",
        "perfcached": "下底其數據乞緩存固加可能伓是最新其。{{PLURAL:$1|$1條結果}}會敆緩存臺中討著。",
        "perfcachedts": "下底其數據已經緩存過了,最後更新遘$1。{{PLURAL:$4|$4條結果}}會敆緩存臺中討著。",
        "querypage-no-updates": "茲蜀頁其更新乞禁止了。\n數據嚽塊現刻時𣍐更新了。",
-       "viewsource": "看源代碼",
+       "viewsource": "Káng nguòng-dâi-mā",
        "viewsource-title": "覷\"$1\"其源代碼",
        "actionthrottled": "行動乞取消咯",
        "protectedpagetext": "茲頁已經乞保護起咯,𣍐使修改或者其它行動。",
        "yourpasswordagain": "重新拍囇密碼:",
        "createacct-yourpasswordagain": "確定密碼",
        "createacct-yourpasswordagain-ph": "再拍入蜀回密碼",
-       "remembermypassword": "共我敆茲蜀萆瀏覽器其登錄記錄記定幾日(最価$1日){{PLURAL:$1}}",
        "userlogin-remembermypassword": "記𡅏我躒入其狀態",
        "userlogin-signwithsecure": "使安全其連接",
        "yourdomainname": "汝其域名:",
        "nocookiesnew": "用戶賬號已經開好了,不過汝固未躒入。\n{{SITENAME}}使cookie來記錄已經躒入其用戶。\n汝其cookie固未開起來。\n起動汝開啟cookie,仱再使汝新其賬號共密碼來躒入。",
        "nocookieslogin": "{{SITENAME}}使cookies來記錄已經登錄其用戶。\n但是汝禁用了cookie。\n起動汝開起cookie,然後再試蜀試。",
        "noname": "汝未指定蜀萆合法其用戶名。",
-       "loginsuccesstitle": "躒入成功",
+       "loginsuccesstitle": "Láuk-diē sìng-gŭng",
        "loginsuccess": "'''汝現在已經「$1」其成功躒入{{SITENAME}}了。'''",
-       "nosuchuser": "無總款其用戶名「$1」。\n用户名是大小写敏感其。\n检查汝其拼写,或者覷蜀覷[[Special:CreateAccount|開新賬戶]]。",
+       "nosuchuser": "Că mò̤ ming-chĭng sê \"$1\" gì ê̤ṳng-hô.\nÊ̤ṳng-hô-miàng ô buŏng duâi-siēu-siā.\nChiāng giēng-că nṳ̄ gì pĭng-siā, hĕ̤k-chiā [[Special:CreateAccount|kŭi sĭng dióng-hô]].",
        "nosuchusershort": "無總款其用戶名「$1」。\n檢查汝其拼寫。",
        "nouserspecified": "汝著指定蜀萆用戶名。",
        "login-userblocked": "茲隻用戶已經乞封鎖去了。登錄是𣍐允許其。",
        "accountcreated": "賬戶創建了",
        "accountcreatedtext": "[[{{ns:User}}:$1|$1]]([[{{ns:User talk}}:$1|talk]])用戶已經創建。",
        "createaccount-title": "{{SITENAME}}其開賬戶",
-       "login-abort-generic": "汝其登錄𣍐成功——放棄去了",
+       "login-abort-generic": "Nṳ̄ láuk-diē sék-bâi - Sák gó̤ lāu",
        "loginlanguagelabel": "語言:$1",
-       "pt-login": "躒入",
+       "pt-login": "Láuk-diē",
        "pt-login-button": "躒入",
-       "pt-createaccount": "開新賬號",
+       "pt-createaccount": "Kŭi sĭng dióng-hô̤",
        "pt-userlogout": "躒出",
        "php-mail-error-unknown": "PHP其mail()函數,𣍐曉什乇綻去。",
        "changepassword": "改變密碼",
        "passwordreset-domain": "域名:",
        "passwordreset-email": "電批地址:",
        "passwordreset-emailsentemail": "蜀萆密碼重新設置其電批已經寄出去了。",
-       "passwordreset-emailsent-capture": "蜀萆密碼重新設置其電批已經寄出去了,內容就是生下底總款。",
        "changeemail": "修改電批其地址",
        "changeemail-header": "修改賬戶電子郵件地址",
        "changeemail-oldemail": "現刻時其電批地址:",
        "subject": "主題/標題:",
        "minoredit": "過幼修改",
        "watchthis": "監視茲頁",
-       "savearticle": "保存茲頁",
+       "savearticle": "Bō̤-còng ciā hiĕk",
        "preview": "預覽",
        "showpreview": "顯示預覽",
        "showdiff": "看改變其部分",
        "blockednoreason": "無掏出原因",
        "whitelistedittext": "汝必須$1乍會使修改頁面。",
        "loginreqtitle": "需要登錄",
-       "loginreqlink": "躒入",
+       "loginreqlink": "láuk-diē",
        "loginreqpagetext": "起動汝$1以後再看其它頁面。",
        "accmailtitle": "密碼寄出了",
        "accmailtext": "共[[User talk:$1|$1]]用戶隨機生成其密碼已經發遘$2了。汝登錄以後會使敆[[Special:ChangePassword|修改密碼]]頁面修改茲蜀萆密碼。",
        "templatesused": "{{PLURAL:$1}}茲頁裏勢使其模板:",
        "templatesusedpreview": "茲萆預覽使其{{PLURAL:$1|模板}}:",
        "templatesusedsection": "茲蜀段使其{{PLURAL:$1|模板}}:",
-       "template-protected": "(保護)",
-       "template-semiprotected": "(半保護)",
+       "template-protected": "(bō̤-hô)",
+       "template-semiprotected": "(buáng bō̤-hô)",
        "permissionserrorstext-withaction": "因為下底其{{PLURAL:$1|原因}},汝無能耐 $2 :",
        "recreate-moveddeleted-warn": "'''注意:汝敆𡅏重新創建舊底已經乞刪唻其頁面。'''\n\n汝應該考慮蜀下繼續去編輯茲蜀頁到底是伓是合適其。茲蜀頁其刪除記錄共移動記錄都敆嚽塊:",
        "edit-conflict": "編輯衝突",
        "content-model-text": "純文本",
        "content-model-javascript": "JavaScript",
        "content-model-css": "CSS",
-       "undo-summary": "取消[[Special:Contributions/$2|$2]]([[User talk:$2|Tō̤-lâung]])其$1修改",
-       "cantcreateaccounttitle": "無能獃開賬戶",
+       "undo-summary": "Chṳ̄-siĕu [[Special:Contributions/$2|$2]]([[User talk:$2|Páng-gōng]])sū có̤ gì siŭ-gāi $1",
        "viewpagelogs": "看茲頁其歷史",
        "nohistory": "茲頁無修改歷史。",
        "currentrev": "最新版本",
-       "revisionasof": "$1其版本",
-       "previousrevision": "←加舊其版本",
+       "revisionasof": "$1 gì bēng-buōng",
+       "previousrevision": "← Gá-gô gì bēng-buōng",
        "nextrevision": "加新其版本→",
        "currentrevisionlink": "最新版本",
-       "cur": "",
+       "cur": "dāng",
        "next": "下",
-       "last": "",
+       "last": "sèng",
        "page_first": "頭",
        "page_last": "尾",
        "histlegend": "差別揀選:選擇卜比並其版本,再擪「回車」('''Enter''')或者擪底底其'''比並揀選版本'''。<br />\n說明:(伶)=共第一新其版本比並,(前)=共前蜀版本比並,~=過幼修改。",
        "difference-title": "「$1」調整以後𣍐蜀樣其地方",
        "difference-title-multipage": "「$1」共「$2」臺中𣍐蜀樣其地方",
        "difference-multipage": "(臺中𣍐蜀様其地方)",
-       "lineno": "第$1行:",
+       "lineno": "Dâ̤ $1 hòng:",
        "compareselectedversions": "比並揀選版本",
        "showhideselectedversions": "顯/藏揀選其調整",
-       "editundo": "取消",
-       "searchresults": "討結果",
-       "searchresults-title": "尋討「$1」其結果",
-       "prevn": "前{{PLURAL:$1}}$1萆",
-       "nextn": "後{{PLURAL:$1}}$1萆",
-       "shown-title": "每頁顯示$1{{PLURAL:$1|萆結果}}",
-       "viewprevnext": "看($1 {{int:pipe-separator}} $2)($3)。",
-       "searchprofile-articles": "內容頁",
-       "searchprofile-images": "多媒體",
-       "searchprofile-everything": "所有乇",
-       "searchprofile-advanced": "高級",
-       "searchprofile-articles-tooltip": "敆$1𡅏尋討",
-       "searchprofile-images-tooltip": "尋討文件",
-       "search-result-size": "$1 ({{PLURAL:$2|$2萆單詞}})",
-       "search-redirect": "(重定向 $1)",
+       "editundo": "Chṳ̄-siĕu",
+       "searchresults": "Sìng-tō̤ giék-guō",
+       "searchresults-title": "Sìng-tō̤ \"$1\" gì giék-guō",
+       "prevn": "sèng $1 bĭk",
+       "nextn": "âu $1 bĭk",
+       "shown-title": "Mūi hiĕk hiēng-sê $1{{PLURAL:$1|bĭk giék-guō}}",
+       "viewprevnext": "Káng ($1 {{int:pipe-separator}} $2) ($3)",
+       "searchprofile-articles": "Nô̤i-ṳ̀ng hiĕk",
+       "searchprofile-images": "Dŏ̤-mùi-tā̤",
+       "searchprofile-everything": "Sū-iū-nó̤h",
+       "searchprofile-advanced": "Gŏ̤-ngék",
+       "searchprofile-articles-tooltip": "Găk $1 lā̤ sìng-tō̤",
+       "searchprofile-images-tooltip": "Sìng-tō̤ ùng-giông",
+       "search-result-size": "$1 ({{PLURAL:$2|$2 bĭk dăng-sṳ̀}})",
+       "search-redirect": "(dêng-hióng $1)",
        "search-suggest": "汝其意思是伓是:$1",
        "searchrelated": "相關其",
        "searchall": "全部",
        "showingresults": "顯示趁#<b>$2</b>開始其{{PLURAL:$1|'''$1'''萆結果}}。",
-       "search-nonefound": "討毋着",
+       "search-nonefound": "Tō̤ mâ̤ diŏh.",
        "preferences": "設定",
        "mypreferences": "我其設定",
        "prefs-edits": "修改數量:",
        "grouppage-sysop": "{{ns:project}}:管理員",
        "grouppage-bureaucrat": "{{ns:project}}:官僚組",
        "grouppage-suppress": "{{ns:project}}:巡查員",
-       "newuserlogpage": "開賬戶日誌",
+       "newuserlogpage": "Kŭi dióng-hô nĭk-cé",
        "action-edit": "修改茲蜀頁",
-       "recentchanges": "這般其改變",
+       "recentchanges": "Cī-bŏng gì gāi-biéng",
        "recentchanges-summary": "敆維基茲頁跟蹤這般其改變。",
-       "recentchanges-label-newpage": "茲蜀萆修改創建新其蜀頁",
-       "recentchanges-label-minor": "嚽是蜀萆過幼修改",
-       "recentchanges-label-bot": "茲蜀萆修改是機器人做其",
-       "rclistfrom": "顯示由$3 $2開始其新其改變",
-       "rcshowhideminor": "$1過幼修改",
-       "rcshowhidebots": "$1機器人",
-       "rcshowhideliu": "$1已註冊其用戶",
-       "rcshowhideanons": "$1無名用戶",
-       "rcshowhidemine": "$1我其修改",
-       "rclinks": "顯示$2日以內產生其$1回改變<br />$3",
-       "diff": "",
-       "hist": "",
+       "recentchanges-label-newpage": "Cī siŏh bĭk siŭ-gāi cháung-gióng lāu sĭng hiĕk",
+       "recentchanges-label-minor": "Cuòi sê siŏh bĭk guó-éu siŭ-gāi",
+       "recentchanges-label-bot": "Cuòi sê gĭ-ké-nè̤ng siŭ-gāi gì",
+       "rclistfrom": "Hiēng-sê téng $3 $2 gáu dāng gì sĭng gāi-biéng",
+       "rcshowhideminor": "$1 guó-éu siŭ-gāi",
+       "rcshowhidebots": "$1 gĭ-ké-nè̤ng",
+       "rcshowhideliu": "$1 ī dĕng-gé gì ê̤ṳng-hô",
+       "rcshowhideanons": "$1 ù-mìng-sê",
+       "rcshowhidemine": "$1 nguāi gì siŭ-gāi",
+       "rclinks": "Hiēng-sê có̤i-gê̤ṳng $2 gĕ̤ng ī-nô̤i gì $1 huòi gāi-biéng<br />$3",
+       "diff": "chă",
+       "hist": "sṳ̄",
        "hide": "掩",
        "show": "現",
        "minoreditletter": "~",
        "newpageletter": "!",
        "boteditletter": "^",
+       "rc-change-size-new": "Siŭ-gāi ī-hâiu biéng có̤ $1 cê-ciék",
        "rc-enhanced-hide": "囥起細節",
        "recentchangeslinked": "相關其改變",
        "recentchangeslinked-feed": "相關其改變",
-       "recentchangeslinked-toolbox": "相關其改變",
+       "recentchangeslinked-toolbox": "Sŏng-guăng gì gāi-biéng",
        "recentchangeslinked-page": "頁面名:",
-       "upload": "上傳文件",
+       "upload": "Siông-diòng ùng-giông",
        "uploadbtn": "上傳文件",
        "reuploaddesc": "取消上傳,轉去上傳頁面",
        "uploadnologin": "未登錄",
        "listfiles_name": "名",
        "listfiles_user": "用戶",
        "listfiles_size": "尺寸",
-       "file-anchor-link": "文件",
-       "filehist": "文件歷史",
-       "filehist-current": "現刻時",
-       "filehist-datetime": "日期/時間",
-       "filehist-user": "用戶",
-       "filehist-dimensions": "維度",
-       "filehist-comment": "評論",
-       "imagelinks": "文件使用方法",
-       "linkstoimage": "下底{{PLURAL:$1|$1頁鏈接}}遘茲文件:",
+       "file-anchor-link": "Ùng-giông",
+       "filehist": "Ùng-giông lĭk-sṳ̄",
+       "filehist-current": "hiêng-káik-sì",
+       "filehist-datetime": "Nĭk-gĭ/Sì-găng",
+       "filehist-user": "Ê̤ṳng-hô",
+       "filehist-dimensions": "Chióh-cháung",
+       "filehist-comment": "Suók-mìng",
+       "imagelinks": "Ùng-giông sāi-ê̤ṳng cìng-huóng",
+       "linkstoimage": "Â-dā̤ {{PLURAL:$1|$1 hiĕk}} lièng gáu ciā ùng-giông:",
        "nolinkstoimage": "無鏈接遘茲蜀萆文件其頁面。",
        "uploadnewversion-linktext": "上傳蜀萆新版本其茲萆文件。",
        "shared-repo-name-wikimediacommons": "Wikimedia Commons",
        "unwatchedpages": "無監視其頁面",
        "listredirects": "重定向其單單",
        "unusedtemplateswlh": "其它鏈接",
-       "randompage": "隨便罔看",
+       "randompage": "Sùi-biêng muōng ché̤ṳ",
        "randomredirect": "隨便重定向",
        "statistics": "統計",
        "statistics-header-users": "用戶統計",
        "withoutinterwiki": "無跨語言其鏈接",
        "withoutinterwiki-summary": "下底其頁面無鏈接遘其它語言其版本。",
        "fewestrevisions": "修改最少其頁面",
-       "nbytes": "$1{{PLURAL:$1}}å­\97ç¯\80",
+       "nbytes": "$1{{PLURAL:$1}} bÄ­k dÄ\83ng-sá¹³Ì\80",
        "nlinks": "$1隻{{PLURAL:$1|鏈接}}",
        "nmembers": "$1隻成員{{PLURAL:$1}}",
        "wantedcategories": "卜挃其類別",
        "longpages": "長頁",
        "protectedpages": "保護頁",
        "listusers": "用戶單",
-       "newpages": "新頁",
+       "newpages": "Sĭng hiĕk",
        "newpages-username": "用戶名:",
        "ancientpages": "最舊其頁面",
        "move": "移動",
        "allpagesfrom": "使下底其乇開始顯示頁:",
        "allarticles": "所有文章",
        "allinnamespace": "所有頁面($1命名空間)",
-       "allpagessubmit": "",
+       "allpagessubmit": "Kó̤",
        "allpagesprefix": "按頭部顯示頁面:",
        "allpagesbadtitle": "給出其頁面其標題是𣍐合法其,或者有蜀萆跨語言或跨維基其前綴。伊可能包括蜀萆或者価萆𣍐使廮標題裏勢其字符。",
        "categories": "類別",
        "deletionlog": "刪除日誌",
        "deletecomment": "原因:",
        "rollback": "再修改轉去",
-       "rollbacklink": "",
+       "rollbacklink": "duōng",
        "rollbackfailed": "轉𣍐去",
        "cantrollback": "𣍐使恢復修改;最後其貢獻者是茲蜀頁其唯一其作者。",
        "alreadyrolled": "𣍐使回滾最後蜀回[[User:$2|$2]] ([[User talk:$2|討論]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]])其[[:$1]]編輯;\n有其他儂已經編輯過了或者茲蜀頁已經乞回滾過了。\n\n最後蜀回茲蜀頁其修改是[[User:$3|$3]] ([[User talk:$3|討論]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]])改其。",
        "undeleteviewlink": "看",
        "undeletecomment": "原因:",
        "undelete-search-submit": "尋討",
-       "namespace": "命名空間:",
-       "invert": "反選",
-       "blanknamespace": "(主要)",
+       "namespace": "Miàng-kŭng-găng:",
+       "invert": "Huāng-sōng",
+       "blanknamespace": "(cuō-iéu)",
        "contributions": "{{GENDER:$1|User}}用戶貢獻",
        "contributions-title": "$1其用戶貢獻",
        "mycontris": "我其貢獻",
        "sp-contributions-search": "尋討貢獻",
        "sp-contributions-username": "IP地址或者用戶名:",
        "sp-contributions-submit": "尋討",
-       "whatlinkshere": "甚乇鏈遘嚽塊",
+       "whatlinkshere": "Diē-nē̤ lièng gáu cē̤-nē̤",
        "whatlinkshere-title": "鏈接遘$1其頁面",
        "whatlinkshere-page": "頁面:",
        "linkshere": "下底其頁面鏈接遘'''[[:$1]]''':",
        "anononlyblock": "囇無名用戶",
        "createaccountblock": "防止開賬戶",
        "ipblocklist-empty": "茲張封鎖單單是空其。",
-       "blocklink": "封鎖",
+       "blocklink": "hŭng-sō̤",
        "unblocklink": "開封",
        "change-blocklink": "修改封鎖情況",
-       "contribslink": "貢獻",
+       "contribslink": "góng-hióng",
        "blocklogpage": "封鎖日誌",
        "blocklogentry": "封鎖[[$1]],遘$2時候過時,$3",
        "block-log-flags-anononly": "囇無名用戶",
        "allmessagescurrent": "現時其文字",
        "allmessagestext": "茲是敆MediaWiki命名空間裏勢系統消息其蜀萆單單。\n如果汝卜想貢獻通用其MediaWiki基本地化服務,起動汝訪問[https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation MediaWiki本地化]共[https://translatewiki.net translatewiki.net]。",
        "allmessagesnotsupportedDB": "茲蜀頁𣍐使其,因為'''$wgUseDatabaseMessages'''已經乞禁止去了。",
-       "thumbnail-more": "放大",
+       "thumbnail-more": "Huóng-duâi",
        "tooltip-pt-userpage": "汝其用戶頁",
        "tooltip-pt-mytalk": "汝其討論頁",
+       "tooltip-pt-anontalk": "Cī ciáh IP ôi-cī iū-guăng siŭ-gāi gì tō̤-lâung",
        "tooltip-pt-preferences": "汝其設定",
        "tooltip-pt-watchlist": "汝監視其頁面有改過其單單",
        "tooltip-pt-mycontris": "汝其貢獻其單單",
-       "tooltip-pt-login": "希望汝先躒入;不過儂家無逼汝總款做。",
+       "tooltip-pt-login": "Gióng-ngiê nṳ̄ sĕng láuk-diē; bók-guó nàng-gă mò̤ ăng nṳ̄ cūng-kuāng có̤.",
        "tooltip-pt-logout": "躒出",
-       "tooltip-ca-talk": "茲蜀頁其討論",
-       "tooltip-ca-edit": "汝會使修改茲蜀頁。起動敆保存以前使預覽按鈕",
-       "tooltip-ca-addsection": "開始蜀萆新其部分",
+       "tooltip-pt-createaccount": "Gióng-ngiê nṳ̄ sĕng kŭi dióng-hô gái láuk-diē; bók-guó nàng-gă mò̤ ăng nṳ̄ cūng-kuāng có̤.",
+       "tooltip-ca-talk": "Nô̤i-ṳ̀ng gì tō̤-lâung",
+       "tooltip-ca-edit": "Siŭ-gāi cī hiĕk",
+       "tooltip-ca-addsection": "Gă sĭng dâung",
        "tooltip-ca-viewsource": "茲蜀頁乞保護起去。\n汝會使看伊其源代碼。",
-       "tooltip-ca-history": "覷茲頁舊底其版本",
+       "tooltip-ca-history": "Ché̤ṳ cī hiĕk gó̤-dā̤ gì bēng-buōng",
        "tooltip-ca-protect": "保護茲蜀頁",
        "tooltip-ca-delete": "刪掉茲蜀頁",
        "tooltip-ca-move": "移動茲蜀頁",
-       "tooltip-ca-watch": "將茲蜀頁加遘汝其監視單",
+       "tooltip-ca-watch": "Ciŏng cī siŏh hiĕk gă diē nṳ̄ gì gáng-sê-dăng",
        "tooltip-ca-unwatch": "共茲頁趁監視單𡅏移開去",
-       "tooltip-search": "尋討 {{SITENAME}} [alt-f]",
-       "tooltip-search-fulltext": "敆茲幾頁𡅏尋討茲文字",
-       "tooltip-p-logo": "覷蜀覷頭頁",
-       "tooltip-n-mainpage": "覷蜀覷頭頁",
-       "tooltip-n-mainpage-description": "覷蜀覷頭頁",
-       "tooltip-n-recentchanges": "維基百科最近其改變其單單",
-       "tooltip-n-randompage": "隨便罔看",
-       "tooltip-t-whatlinkshere": "鏈遘嚽塊其所有維基頁面其單單",
-       "tooltip-t-recentchangeslinked": "鏈遘茲頁其頁面其最近修改",
+       "tooltip-search": "Sìng-tō̤ {{SITENAME}} [alt-f]",
+       "tooltip-search-go": "Nâ ô dè̤ng-miàng gì hiĕk còng-câi, cô kó̤ hiā hiĕk",
+       "tooltip-search-fulltext": "Sìng-tō̤ sāi-ê̤ṳng ciā ùng-cê gì hiĕk-miêng",
+       "tooltip-p-logo": "Ché̤ṳ-siŏh-ché̤ṳ tàu-hiĕk",
+       "tooltip-n-mainpage": "Ché̤ṳ-siŏh-ché̤ṳ tàu-hiĕk",
+       "tooltip-n-mainpage-description": "Ché̤ṳ-siŏh-ché̤ṳ tàu-hiĕk",
+       "tooltip-n-portal": "Guăng-ṳ̀ ciā gĕ̤ng-tiàng, nṳ̄ â̤ có̤ gì, kó̤ diē-nē̤ tō̤ nó̤h",
+       "tooltip-n-recentchanges": "Cī-bŏng diŏh wiki ô gāi-biéng gì dăng-dăng",
+       "tooltip-n-randompage": "Sùi-biêng muōng ché̤ṳ",
+       "tooltip-n-help": "Sìng-tō̤ bŏng-cô gì sū-câi",
+       "tooltip-t-whatlinkshere": "Ciòng-buô lièng-gáu cŭ-uái gì wiki hiĕk-miêng dăng-dăng",
+       "tooltip-t-recentchangeslinked": "鏈遘茲頁其頁面其最近修改\nCī hiĕk lièng gáu bĕk hiĕk gì cī-bŏng gì gāi-biéng",
        "tooltip-t-contributions": "茲蜀用戶其貢獻單單",
        "tooltip-t-emailuser": "向茲蜀隻用戶寄電批",
-       "tooltip-t-upload": "上傳文件",
-       "tooltip-t-specialpages": "特殊頁其單單",
-       "tooltip-t-print": "茲蜀頁其會拍印其版本",
-       "tooltip-t-permalink": "茲頁茲版本其永久鏈接",
-       "tooltip-ca-nstab-main": "看蜀看內容頁",
+       "tooltip-t-upload": "Siông-diòng ùng-giông",
+       "tooltip-t-specialpages": "Cuòng-buô dĕk-sṳ̀-hiĕk dăng-dăng",
+       "tooltip-t-print": "Cī hiĕk gì â̤ páh-éng bēng-buōng",
+       "tooltip-t-permalink": "茲頁茲版本其永久鏈接\nCī hiĕk cī bēng-buōng gì īng-giū lièng-giék",
+       "tooltip-ca-nstab-main": "Káng iĕk gì nô̤i-ṳ̀ng",
        "tooltip-ca-nstab-user": "覷蜀覷用戶頁",
        "tooltip-ca-nstab-special": "茲是蜀萆特殊頁,汝𣍐使修改茲蜀頁。",
        "tooltip-ca-nstab-project": "看工程頁",
-       "tooltip-ca-nstab-image": "看文件頁",
+       "tooltip-ca-nstab-image": "Ché̤ṳ ùng-giông hiĕk",
        "tooltip-ca-nstab-template": "覷蜀覷模板",
        "tooltip-minoredit": "共茲標記成過幼修改",
        "tooltip-save": "保存汝其改變 [alt-s]",
        "tooltip-watch": "共茲蜀頁加遘汝其監視單[alt-w]",
        "anonymous": "{{SITENAME}}其無名{{PLURAL:$1|用戶}}",
        "lastmodifiedatby": "茲頁最後是$3著$1$2改變其。",
+       "pageinfo-toolboxlink": "Hiĕk-miêng séng-sék",
        "deletedrevision": "刪掉舊其版本$1",
        "previousdiff": "← 舊其修改",
        "nextdiff": "新其修改 →",
        "file-nohires": "無更高決斷",
+       "show-big-image-size": "$1 × $2 chiông-só",
        "ilsubmit": "尋討",
        "bydate": "按日期",
-       "metadata": "元數據",
+       "metadata": "Nguòng-só-gé̤ṳ",
        "exif-componentsconfiguration-0": "無存在",
        "exif-meteringmode-0": "𣍐八",
        "exif-lightsource-0": "𣍐八",
        "exif-subjectdistancerange-0": "𣍐八",
-       "namespacesall": "所有",
+       "namespacesall": "ciòng-buô",
        "monthsall": "囫圇年",
        "confirmemail": "確定電批地址",
        "confirmemail_invalid": "確認碼無效。\n可能已經過期了。",
        "watchlisttools-view": "看相關改變",
        "watchlisttools-edit": "看共修改監視單",
        "watchlisttools-raw": "修改原始監視單",
-       "specialpages": "特殊頁",
-       "searchsuggest-search": ""
+       "specialpages": "Dĕk-sṳ̀-hiĕk",
+       "searchsuggest-search": "Tō̤"
 }
index 088c746..bde0e77 100644 (file)
        "talk": "Дийцаре",
        "views": "Хьажарш",
        "toolbox": "ГӀирсаш",
+       "tool-link-userrights": "{{GENDER:$1|Декъашхочун}} бакъо хийцар",
+       "tool-link-emailuser": "Язде {{GENDER:$1|декъашхочунга}} кехат",
        "userpage": "Хьажа декъашхочуьна агӀоне",
        "projectpage": "Хьажа кхолламан агӀоне",
        "imagepage": "Хьажа файлан агӀоне",
        "botpasswords-label-update": "Карлаяккха",
        "botpasswords-label-cancel": "Юхаяккха",
        "botpasswords-label-delete": "ДӀаяккхар",
-       "botpasswords-label-restrictions": "Лелоран доза тохар:",
        "botpasswords-label-grants-column": "Магийна",
        "botpasswords-bad-appid": "«$1» ботан цӀе магийна яц.",
        "botpasswords-created-body": "Ботан «$1» пароль кхиамца кхоьллина.",
        "userrights": "Декъашхочун бакъонашна урхалладар",
        "userrights-lookup-user": "Декъашхойн бакъонашна урхалладар",
        "userrights-user-editname": "Язъе цӀе:",
-       "editusergroup": "Хийца декъашхочун бакъо",
+       "editusergroup": "{{GENDER:$1|Декъашхочун}} бакъо хийцар",
        "editinguser": "Хийца декъашхочуьна бакъо '''[[User:$1|$1]]''' ([[User talk:$1|{{int:talkpagelinktext}}]]{{int:pipe-separator}}[[Special:Contributions/$1|{{int:contribslink}}]])",
        "userrights-editusergroup": "Хийца декъашхочун бакъо",
        "saveusergroups": "Декъашхочун бакъонаш Ӏалашъян",
        "upload-http-error": "Даьлла гӀалат HTTP: $1",
        "upload-dialog-title": "Файл чуяккхар",
        "upload-dialog-button-cancel": "Цаоьшу",
+       "upload-dialog-button-back": "Юха",
        "upload-dialog-button-done": "Кийчча ю",
        "upload-dialog-button-save": "Ӏалашъян",
        "upload-dialog-button-upload": "Чуяккха",
        "htmlform-chosen-placeholder": "Харжа кеп",
        "htmlform-cloner-create": "ТӀетоха кхин",
        "htmlform-cloner-delete": "ДӀаяккха",
+       "htmlform-datetime-placeholder": "ШШШШ-ББ-ДД СС:ММ:СС",
        "htmlform-title-not-exists": "«$1» яц.",
        "htmlform-user-not-exists": "<strong>$1</strong> яц.",
        "htmlform-user-not-valid": "<strong>$1</strong> — декъашхочун магийна йоцу цӀе.",
        "feedback-bugornote": "Хьайн техникин халонах лаьцна яздан хӀума делахь, дехар до, [$1 хаам бе тхоьга].\nДацахь хьан йиш ю хӀокху атта кепаца «[$3 $2]» агӀонг къамел тӀетоха хьан декъашхочун цӀарца, кхин лелош йолу браузер билгал еш.",
        "feedback-cancel": "Цаоьшу",
        "feedback-close": "Кийчча ю",
-       "feedback-error-title": "ГӀалат",
        "feedback-message": "Хаам:",
        "feedback-subject": "Къамел:",
        "feedback-submit": "Дахьийта",
        "special-characters-group-ipa": "ДАЭ (IPA)",
        "special-characters-group-symbols": "Символаш",
        "special-characters-group-greek": "Грекийн",
+       "special-characters-group-greekextended": "Грекийн алсам",
        "special-characters-group-cyrillic": "Кирилан",
        "special-characters-group-arabic": "Ӏарбийн",
-       "special-characters-group-arabicextended": "Iаьрбийн шординарш",
+       "special-characters-group-arabicextended": "Ӏаьрбийн алсам",
        "special-characters-group-persian": "Пхьарсхойн",
        "special-characters-group-hebrew": "Жуьгтийн",
        "special-characters-group-bangla": "Бангалойн",
        "special-characters-group-tamil": "Тамилхойн",
        "special-characters-group-telugu": "Телугойн",
        "special-characters-group-sinhala": "Синхалойн",
-       "special-characters-group-gujarati": "Ð\93Ñ\83жаÑ\80аÑ\82ойн",
+       "special-characters-group-gujarati": "Ð\93Ñ\83джаÑ\80аÑ\82и",
        "special-characters-group-devanagari": "Деванагари",
        "special-characters-group-thai": "Тайхойн",
        "special-characters-group-lao": "Лаохойн",
index 059cb7b..71a2c6b 100644 (file)
        "actionthrottled": "چالاکی پێشی پێ گیرا",
        "actionthrottledtext": "بە مەبەستی پێشگریی لە سپەم، ڕێگە نادرێت تۆ لە ماوەیەکی کورت دا لە سەر یەک ئەمە زۆر جار ئەنجام بدەی، وە ئیستا تۆ لە ڕادە بەدەرت کردووە.\nتکایە پاش چەند خولەک دووبارە تاقی بکەوە.",
        "protectedpagetext": "بۆ بەرگری لە دەستکاریکردن یان چالاکییەکانی تر ئەم پەڕەیە پارێزراوە.",
-       "viewsourcetext": "دەتوانی سەرچاوەی ئەم پەڕە ببینی و کۆپیی بکەی:",
-       "viewyourtext": "دەتوانی ژێدەری '''دەستکارییەکەت''' لەم پەڕەیەدا ببینی و کۆپی بکەی:",
+       "viewsourcetext": "دەتوانی سەرچاوەی ئەم پەڕە ببینی و کۆپیی بکەی٫",
+       "viewyourtext": "دەتوانی ژێدەری <strong>دەستکارییەکەت</strong> لەم پەڕەیەدا ببینی و کۆپی بکەی.",
        "protectedinterface": "ئەم پەڕەیە دەقی ڕواڵەتی نەرمامێری ئەم ویکییە نیشان دەدات و بۆ بەرگری لە خراپکاری پارێزراوە.\nبۆ زیادکردن یان گۆڕینی وەرگێڕانەکان بۆ ھەموو ویکییەکان، تکایە لە [https://translatewiki.net/ translatewiki.net]، پرۆژەی ناوچەیی کردنی میدیاویکی کەڵک وەربگرە.",
        "editinginterface": "<strong>ھۆشیار بە:</strong> خەریکی دەستکاریی پەڕەیەک دەکەیت کە بۆ دابین کردنی دەقی ڕووکاری نەرمامێر بەکاردێت.\nگۆڕانکارییەکان لەم پەڕەیەدا لە سەر ڕواڵەتی پەڕەکان بۆ بەکارھێنەرانی تر لەم ویکییەدا کاریگەر دەبێت.",
        "cascadeprotected": "ئەم لاپەڕە پارێزراوە لە دەستکاریی، چونکا خراوەتە سەر ڕیزی ئەم {{PLURAL:$1|لاپەڕانه‌، کە}} که‌ به‌ هه‌ڵکردنی بژارده‌ی داڕژان هه‌ڵکراوه‌:\n$2",
        "newpassword": "تێپەڕوشەی نوێ:",
        "retypenew": "تێپەڕوشەی نوێ دوبارە بنووسەوە:",
        "resetpass_submit": "تێپەڕوشە رێکخە و بچۆ ژوورەوە",
-       "changepassword-success": "تێپەروشەکەت بە سەرکەوتوویی گۆڕدرا!",
+       "changepassword-success": "تێپەڕەوشەکەت  گۆڕدرا!",
        "botpasswords-label-create": "دروستکردن",
        "botpasswords-label-update": "نوێکردنەوە",
        "botpasswords-label-cancel": "ھەڵوەشاندنەوە",
        "prefs-watchlist-token": "ڕەمزی لیستی چاودێری:",
        "prefs-misc": "جۆراوجۆر",
        "prefs-resetpass": "تێپەڕوشە بگۆڕە",
-       "prefs-changeemail": "ئەدرەسی ئیمەیل بگۆڕە",
+       "prefs-changeemail": "ئەدرەسی ئیمەیل بگۆڕە یان لایبەرە",
        "prefs-setemail": "ناونیشانێکی ئیمەیل دیاری بکە",
        "prefs-email": "ھەڵبژاردەکانی ئیمەیل",
        "prefs-rendering": "ڕواڵەت",
        "rollbackfailed": "گەڕاندنەوە سەرکەوتوو نەبوو",
        "cantrollback": "دەستکاریەکان ناگەڕێندرێتەوە؛\nدوایین هاوبەش تەنها ڕێکخەری ئەم لاپەڕەیە.",
        "alreadyrolled": "دوایین گۆڕانکارییەکان لەسەر [[:$1]] لە لایەن [[User:$2|$2]] ناگەڕێندرێنەوە ([[User talk:$2|لێدوان]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]])؛ کەسێکی تر لە پێشدا دەستکاریی کردووە یان گەڕاندوویەتەوە.\n\nدوایین دەستکاری ئەم پەڕە [[User:$3|$3]] کردوویە ([[User talk:$3|لێدوان]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).",
-       "editcomment": "پوختەی دەستکاری \"''$1''\" بوو.",
+       "editcomment": "پوختەی دەستکاری <em>$1</em> بوو.",
        "revertpage": "گەڕاندنەوەی دەستکارییەکانی [[Special:Contributions/$2|$2]] ([[User talk:$2|لێدوان]]) بۆ دوایین پێداچوونەوەی [[User:$1|$1]]",
        "revertpage-nouser": "دەستکارییەکانی بەکارھێنەرێکی شاڕدراوە بۆ دوایین پێداچوونەوەی {{GENDER:$1|[[User:$1|$1]]}} گەڕێنرایەوە.",
        "rollback-success": "دەستکارییەکانی $1 وەرگێرایەوە؛<br />\nگۆڕدرا بۆ دوایین پێداچوونەوەی $2.",
        "sp-contributions-newbies-sub": "بۆ ھەژمارە نوێکان",
        "sp-contributions-newbies-title": "بەشدارییەکانی بەکارھێنەر بۆ ھەژمارە نوێکان",
        "sp-contributions-blocklog": "لۆگی بەربەستن",
-       "sp-contributions-deleted": "بەشدارییە سڕاوەکان",
+       "sp-contributions-deleted": "بەشدارییە سڕاوەکانی {{GENDER:$1|بەکارھێنەر}}",
        "sp-contributions-uploads": "بارکردنەکان",
        "sp-contributions-logs": "لۆگەکان",
        "sp-contributions-talk": "لێدوان",
        "tooltip-feed-rss": "RSS feed بۆ ئەم پەڕە",
        "tooltip-feed-atom": "Atom feed بۆ ئەم پەڕە",
        "tooltip-t-contributions": "پێڕستی بەشدارییەکانی {{GENDER:$1|ئەم بەکارھێنەرە}}",
-       "tooltip-t-emailuser": "ئیمەیلێک بنێرە بۆ ئەم بەکارھێنەرە",
+       "tooltip-t-emailuser": "ئیمەیڵێک بنێرە بۆ {{GENDER:$1|ئەم بەکارھێنەرە}}",
        "tooltip-t-upload": "پەڕگە بار بکە",
        "tooltip-t-specialpages": "پێڕستی ھەموو پەڕە تایبەتەکان",
        "tooltip-t-print": "وەشانی چاپی ئەم پەڕەیە",
        "lastmodifiedatby": "ئەم پەڕە دواجار لە $2ی $1 بە دەستی $3 گۆڕدراوە.",
        "othercontribs": "لەسەر بنەمای کاری $1.",
        "others": "ئەوانی دیکە",
-       "siteusers": "{{PLURAL:$2|بەکارھێنەری|بەکارھێنەرانی}} {{SITENAME}} $1",
+       "siteusers": "{{SITENAME}} {{PLURAL:$2|{{GENDER:$1|بەکارھێنەری}}|بەکارھێنەرانی}} $1",
        "anonusers": "{{PLURAL:$2|بەکارھێنەر|بەکارھێنەر}}ی نامۆی {{SITENAME}} $1",
        "creditspage": "بایەخەکانی لاپەڕە",
        "nocredits": "هیچ زانیارییەکی بایەخ لەبەردەست‌دا نیە بۆ ئەم لاپەڕە.",
        "fileduplicatesearch-result-n": "پەڕگەی «$1» {{PLURAL:$2|١ دووپاتکراوەی کوتوموتی|$2 دووپاتکراوەی کوتوموتی}} ھەیە.",
        "fileduplicatesearch-noresults": "پەڕگەیەک بە ناوی «$1» نەدۆزرایەوە.",
        "specialpages": "پەڕە تایبەتەکان",
-       "specialpages-note": "* Ù¾Û\95Ú\95Û\95 ØªØ§Û\8cبÛ\95تÛ\95 Ø¦Ø§Ø³Ø§Û\8cÛ\8cÛ\8cÛ\95کاÙ\86.\n* <span class=\"mw-specialpagerestricted\">Ù¾Û\95Ú\95Û\95 ØªØ§Û\8cبÛ\95تÛ\95 Ø¨Û\95رگرÛ\8câ\80\8cÙ\84Û\8eکراÙ\88Û\95کاÙ\86.</span>",
+       "specialpages-note": "* Ù¾Û\95Ú\95Û\95 ØªØ§Û\8cبÛ\95تÛ\95 Ø¦Ø§Ø³Ø§Û\8cÛ\8cÛ\95کاÙ\86.\n* <span class=\"mw-specialpagerestricted\">Ù¾Û\95Ú\95Û\95 ØªØ§Û\8cبÛ\95تÛ\95 Ø¨Û\95رگرÛ\8cÙ\84Û\8eکراÙ\88Û\95کاÙ\86.</span>",
        "specialpages-group-maintenance": "ڕاپۆرتەکانی چاکسازی",
        "specialpages-group-other": "پەڕە تایبەتەکانی دیکە",
        "specialpages-group-login": "چوونەژوورەوە / دروستکردنی ھەژمار",
        "compare-invalid-title": "ئەم سەردێڕە دەستنیشانت کردووە نادروستە.",
        "dberr-problems": "ببورە! ئەم ماڵپەڕە ئێستا خەریک ئەزموونێکی کێشەی تەکنیکیە.",
        "dberr-again": "چەن خولک ڕاوەستە و نوێی بکەوە.",
-       "dberr-info": "(Ù¾Û\95Û\8cÙ\88Û\95Ù\86دÛ\8c Ù\84Û\95Ú¯Û\95Úµ Ú\95اÚ\98Û\95کارÛ\8c Ø¨Ù\86Ú©Û\95دراÙ\88 Ù¾Û\8eÚ©Ù\86اÛ\8cÛ\95ت: $1)",
+       "dberr-info": "(Ù\86اتÙ\88اÙ\86Û\8cت Ø¨Ú¯Û\95Û\8cت Ø¨Û\95 Ø¨Ù\86Ú©Û\95دراÙ\88: $1)",
        "dberr-usegoogle": "دەتوانی هاوکات هەوڵی گەڕان بە گووگڵ بدەیت.",
        "dberr-outofdate": "لەیادت بێ لەوانەیە پێرستەکەیان سەبارەت نە ناوەڕۆک ئەم ماڵپەڕە ماوە بەسەرچوو بێت.",
        "dberr-cachederror": "ئەمە ڕوونووسێکی کاش‌کراوی لاپەڕەی داواکراوە و لەوانەیە بەڕۆژ نەبێت.",
        "logentry-newusers-autocreate": "ھەژماری بەکارھێنەریی $1 بە شێوەی خۆگەڕ {{GENDER:$2|دروست کرا}}",
        "logentry-protect-protect": "$1 $3ی {{GENDER:$2|پاراست}} $4",
        "logentry-protect-modify": "$1 ئاستی پاراستنی $3ی {{GENDER:$2|گۆڕی}} $4",
-       "logentry-rights-rights": "$1 ئەندامێتیی $3ی لە $4 بۆ $5 {{GENDER:$2|گۆڕی}}",
+       "logentry-rights-rights": "$1 ئەندامێتیی {{GENDER:$6|$3}}ی لە $4 بۆ $5 {{GENDER:$2|گۆڕی}}",
        "logentry-upload-upload": "$1 $3ی {{GENDER:$2|بار کرد}}",
        "logentry-upload-overwrite": "$1 وەشانێکی نوێی $3ی {{GENDER:$2|بار کرد}}",
        "rightsnone": "(ھیچ)",
index 5ef9124..ddced48 100644 (file)
@@ -8,7 +8,8 @@
                        "아라",
                        "Исмаил Садуев",
                        "Умар",
-                       "Macofe"
+                       "Macofe",
+                       "Danvintius Bookix"
                ]
        },
        "tog-underline": "Багълантыларнынъ тюбюни сызув:",
        "nstab-template": "Шаблон",
        "nstab-help": "Ярдым",
        "nstab-category": "Категория",
+       "mainpage-nstab": "Баш Саифе",
        "nosuchaction": "Бойле бир арекет ёкъ",
        "nosuchactiontext": "URL-де бильдирильген арекет рухсетсиз.\nБельки де URL-ни янълыш язгъандырсыз, я да догъру олмагъан бир багълантыны къуллангъандырсыз.\nБу, {{SITENAME}} сайтындаки бир хатаны да косьтерип ола.",
        "nosuchspecialpage": "Бу исимде бир махсус саифе ёкъ",
        "yourpasswordagain": "Парольни бир даа язынъыз:",
        "createacct-yourpasswordagain": "Парольни тасдыкълав",
        "createacct-yourpasswordagain-ph": "Парольни бир даа язынъыз",
-       "remembermypassword": "Киришимни бу компьютерде хатырла (энъ чокъ $1 {{PLURAL:$1|1=кунь|кунь}} ичюн)",
        "userlogin-remembermypassword": "Системада къалайым",
        "userlogin-signwithsecure": "Телюкесиз багълама къулланылсын",
        "yourdomainname": "Домен адынъыз",
        "undo-failure": "Арадаки денъиштирмелер бир-бирине келишикли олмагъаны ичюн денъиштирме лягъу этилип оламай.",
        "undo-norev": "Денъиштирме лягъу этилип оламаз, чюнки о я да ёкъ, я да бар эди, амма ёкъ этильген.",
        "undo-summary": "[[Special:Contributions/$2|$2]] ([[User talk:$2|музакере]]) къулланыджысынынъ $1 номералы денъиштирмесини лягъу этюв.",
-       "cantcreateaccounttitle": "Эсап яратмакънынъ ич чареси ёкъ.",
        "cantcreateaccount-text": "Бу IP адресинден ('''$1''') эсап яратув [[User:$3|$3]] тарафындан блок этильди.\n\n$3 мына бу себепни бильдирди: ''$2''",
        "viewpagelogs": "Бу саифенинъ журналларыны косьтер",
        "nohistory": "Бу саифенинъ кечмиш версиясы ёкъ.",
        "rightslog": "Къулланыджынынъ акълары журналы",
        "action-edit": "бу саифени денъиштирмеге",
        "nchanges": "$1 {{PLURAL:$1|денъиштирме}}",
+       "enhancedrc-history": "тарих",
        "recentchanges": "Сонъки денъиштирмелер",
        "recentchanges-legend": "Сонъки денъиштирмелер сазламалары",
        "recentchanges-summary": "Япылгъан энъ сонъки денъиштирмелерни бу саифеде корип оласынъыз.",
        "contributions": "{{GENDER:$1|Къулланыджынынъ}} исселери",
        "contributions-title": "$1 къулланыджысынынъ исселери",
        "mycontris": "Исселер",
+       "anoncontribs": "Исселер",
        "contribsub2": "$1 ($2)",
        "nocontribs": "Бу критерийлерге уйгъан денъиштирме тапыламады",
        "uctop": "(сонъки)",
index 83a72b4..695b726 100644 (file)
@@ -62,7 +62,7 @@
        "tog-enotifminoredits": "Posílat e-maily i při malých editacích stránek a souborů",
        "tog-enotifrevealaddr": "Prozradit mou e-mailovou adresu v upozorňujících e-mailech",
        "tog-shownumberswatching": "Zobrazovat počet sledujících uživatelů",
-       "tog-oldsig": "Stávající podpis:",
+       "tog-oldsig": "Váš stávající podpis:",
        "tog-fancysig": "Používat v podpisu wikitext (bez automatického odkazu)",
        "tog-uselivepreview": "Používat rychlý náhled",
        "tog-forceeditsummary": "Upozornit, když nevyplním shrnutí editace",
@@ -79,7 +79,7 @@
        "tog-showhiddencats": "Zobrazit skryté kategorie",
        "tog-norollbackdiff": "Po vrácení změny nezobrazovat porovnání rozdílů",
        "tog-useeditwarning": "Upozornit, když budu opouštět editaci bez uložení změn",
-       "tog-prefershttps": "Po přihlášení používat vždy zabezpečené spojení",
+       "tog-prefershttps": "Po přihlášení vždy používat zabezpečené připojení",
        "underline-always": "Vždy",
        "underline-never": "Nikdy",
        "underline-default": "Podle nastavení prohlížeče nebo vzhledu",
        "newwindow": "(otevře se v novém okně)",
        "cancel": "Storno",
        "moredotdotdot": "Další…",
-       "morenotlisted": "Tento seznam není úplný.",
+       "morenotlisted": "Tento seznam může být neúplný.",
        "mypage": "Stránka",
        "mytalk": "Diskuse",
        "anontalk": "Diskuse",
        "talk": "Diskuse",
        "views": "Zobrazení",
        "toolbox": "Nástroje",
+       "tool-link-userrights": "Změnit uživatelské skupiny {{GENDER:$1|tohoto uživatele|této uživatelky}}",
+       "tool-link-emailuser": "Poslat e-mail {{GENDER:$1|tomuto uživateli|této uživatelce}}",
        "userpage": "Prohlédnout si uživatelskou stránku",
        "projectpage": "Prohlédnout si stránku projektu",
        "imagepage": "Prohlédnout si stránku o souboru",
        "botpasswords-label-resetpassword": "Resetovat heslo",
        "botpasswords-label-grants": "Použitelná oprávnění:",
        "botpasswords-help-grants": "Každé přidělení dává přístup k uvedeným uživatelským oprávněním, která uživatelský účet již má. Viz [[Special:ListGrants|table of grants]] pro více informací.",
-       "botpasswords-label-restrictions": "Omezení užití:",
        "botpasswords-label-grants-column": "Přiděleno",
        "botpasswords-bad-appid": "Název bota „$1“ není platný.",
        "botpasswords-insert-failed": "Nepodařilo se přidat název bota „$1“. Nebyl už přidán?",
        "passwordreset-emailelement": "Uživatelské jméno: \n$1\n\nDočasné heslo: \n$2",
        "passwordreset-emailsentemail": "Pokud je u vašeho účtu nastavena tato e-mailová adresa, bude vám zaslán e-mail pro získání nového hesla.",
        "passwordreset-emailsentusername": "Pokud je u tohoto účtu nastavena e-mailová adresa, bude vám zaslán e-mail pro získání nového hesla.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Byl odeslán e-mail|Byly odeslány e-maily}} pro získání nového hesla. {{PLURAL:$1|Uživatelské jméno a heslo jsou zobrazeny|Seznam uživatelských jmen a hesel je zobrazen}} níže.",
-       "passwordreset-emailerror-capture2": "{{GENDER:$2|Uživateli|Uživatelce}} se nepodařilo odeslat e-mail: $1 {{PLURAL:$3|Uživatelské jméno a heslo jsou zobrazeny|Seznam uživatelských jmen a hesel je zobrazen}} níže.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Byl odeslán e-mail|Byly odeslány e-maily}} pro získání nového hesla. Zde {{PLURAL:$1|jsou zobrazeny uživatelské jméno a heslo|je zobrazen seznam uživatelských jmen a hesel}}.",
+       "passwordreset-emailerror-capture2": "{{GENDER:$2|Uživateli|Uživatelce}} se nepodařilo odeslat e-mail: $1 Zde {{PLURAL:$3|jsou zobrazeny uživatelské jméno a heslo|je zobrazen seznam uživatelských jmen a hesel}}.",
        "passwordreset-nocaller": "Musí být uveden volající",
        "passwordreset-nosuchcaller": "Volající neexistuje: $1",
        "passwordreset-ignored": "Žádost o nové heslo nebyla zpracována. Možná není nakonfigurován žádný poskytovatel?",
        "searchprofile-advanced-tooltip": "Nastavit jmenné prostory, ve kterých se má hledat",
        "search-result-size": "$1 ({{PLURAL:$2|1 slovo|$2 slova|$2 slov}})",
        "search-result-category-size": "{{PLURAL:$1|1 položka|$1 položky|$1 položek}} ({{PLURAL:$2|1 podkategorie|$2 podkategorie|$2 podkategorií}}, {{PLURAL:$3|1 soubor|$3 soubory|$3 souborů}})",
-       "search-redirect": "(přesměrování $1)",
+       "search-redirect": "(přesměrování $1)",
        "search-section": "(část $1)",
        "search-category": "(kategorie $1)",
        "search-file-match": "(odpovídá obsahu souboru)",
        "upload-dialog-disabled": "Načítání souborů pomocí tohoto dialogu je na této wiki vypnuto.",
        "upload-dialog-title": "Načtení souboru",
        "upload-dialog-button-cancel": "Storno",
+       "upload-dialog-button-back": "Zpět",
        "upload-dialog-button-done": "Hotovo",
        "upload-dialog-button-save": "Uložit",
        "upload-dialog-button-upload": "Načíst",
        "apisandbox-results-fixtoken-fail": "Nepodařilo se načíst token „$1“.",
        "apisandbox-alert-page": "Pole na této stránce nejsou platná.",
        "apisandbox-alert-field": "Hodnota tohoto pole není platná.",
+       "apisandbox-continue": "Pokračovat",
+       "apisandbox-continue-clear": "Vymazat",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} bude [https://www.mediawiki.org/wiki/API:Query#Continuing_queries pokračovat] v posledním požadavku; {{int:apisandbox-continue-clear}} vymaže parametry související s pokračováním.",
        "booksources": "Zdroje knih",
        "booksources-search-legend": "Vyhledat knižní zdroje",
        "booksources-search": "Hledat",
        "movelogpagetext": "Toto je záznam všech přesunů stránek.",
        "movesubpage": "{{PLURAL:$1|Podstránka|Podstránky}}",
        "movesubpagetext": "Tato stránka má $1 {{PLURAL:$1|podstránku uvedenou|podstránky vypsané|podstránek vypsaných}} níže.",
+       "movesubpagetalktext": "Odpovídající diskusní stránka má {{PLURAL:$1|jednu podstránku, zobrazenou|$1 podstránky, zobrazené|$1 podstránek, zobrazených}} níže.",
        "movenosubpage": "Tato stránka nemá žádné podstránky.",
        "movereason": "Důvod:",
        "revertmove": "vrátit",
        "pageinfo-category-pages": "Počet stránek",
        "pageinfo-category-subcats": "Počet podkategorií",
        "pageinfo-category-files": "Počet souborů",
+       "pageinfo-user-id": "ID uživatele",
        "markaspatrolleddiff": "Označit jako prověřené",
        "markaspatrolledtext": "Označit tuto stránku jako prověřenou",
        "markaspatrolledtext-file": "Označit tuto verzi souboru jako prověřenou",
        "newimages-showbots": "Zobrazit soubory načtené boty",
        "newimages-hidepatrolled": "Skrýt prověřená načtení souborů",
        "noimages": "Není co zobrazit.",
+       "gallery-slideshow-toggle": "Přepnout náhledy",
        "ilsubmit": "Hledat",
        "bydate": "podle data",
        "sp-newimages-showfrom": "Zobrazit nové soubory počínaje od $2, $1",
        "htmlform-cloner-create": "Přidat další",
        "htmlform-cloner-delete": "Odstranit",
        "htmlform-cloner-required": "Je povinná nejméně jedna hodnota.",
+       "htmlform-date-placeholder": "RRRR-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "RRRR-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "Uvedená hodnota není platné datum. Zkuste použít formát RRRR-MM-DD.",
+       "htmlform-time-invalid": "Uvedená hodnota není platný čas. Zkuste použít formát HH:MM:SS.",
+       "htmlform-datetime-invalid": "Uvedená hodnota není platné datum a čas. Zkuste použít formát RRRR-MM-DD HH:MM:SS.",
+       "htmlform-date-toolow": "Uvedená hodnota je před nejdřívějším dovoleným datem $1.",
+       "htmlform-date-toohigh": "Uvedená hodnota je po nejpozdějším dovoleném datu $1.",
+       "htmlform-time-toolow": "Uvedená hodnota je před nejdřívějším dovoleným časem $1.",
+       "htmlform-time-toohigh": "Uvedená hodnota je po nejpozdějším dovoleném čase $1.",
+       "htmlform-datetime-toolow": "Uvedená hodnota je před nejdřívějším dovoleným datem a časem $1.",
+       "htmlform-datetime-toohigh": "Uvedená hodnota je po nejpozdějším dovoleném datu a času $1.",
        "htmlform-title-badnamespace": "Stránka [[:$1]] není ve jmenném prostoru „{{ns:$2}}“.",
        "htmlform-title-not-creatable": "Pod názvem „$1“ nelze vytvořit stránku",
        "htmlform-title-not-exists": "Stránka $1 neexistuje.",
        "htmlform-user-not-exists": "Uživatel <strong>$1</strong> neexistuje.",
        "htmlform-user-not-valid": "<strong>$1</strong> není platné uživatelské jméno.",
-       "sqlite-has-fts": "$1 s podporou plnotextového vyhledávání",
-       "sqlite-no-fts": "$1 bez podpory plnotextového vyhledávání",
        "logentry-delete-delete": "$1 {{GENDER:$2|smazal|smazala}} stránku $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|obnovil|obnovila}} stránku $3",
        "logentry-delete-event": "$1 {{GENDER:$2|změnil|změnila}} viditelnost {{PLURAL:$5|protokolovacího záznamu|$5 protokolovacích záznamů}} ke stránce $3: $4",
        "feedback-external-bug-report-button": "Založit technický úkol",
        "feedback-dialog-title": "Odeslat názor",
        "feedback-dialog-intro": "Pomocí níže zobrazeného jednoduchého formuláře můžete odeslat svůj názor. Váš komentář se spolu s vaším uživatelským jménem přidá na stránku „$1“.",
-       "feedback-error-title": "Chyba",
        "feedback-error1": "Chyba: Nerozpoznaný výsledek z API",
        "feedback-error2": "Chyba: Editace se nezdařila",
        "feedback-error3": "Chyba: API nevrátilo žádnou odpověď",
        "feedback-thanks": "Děkujeme! Váš komentář byl přidán na stránku „[$2 $1]“.",
        "feedback-thanks-title": "Děkujeme!",
        "feedback-useragent": "Uživatelský agent:",
-       "searchsuggest-search": "Hledat",
+       "searchsuggest-search": "Hledat na {{GRAMMAR:6sg|{{SITENAME}}}}",
        "searchsuggest-containing": "obsahující…",
        "api-error-autoblocked": "Vaše IP adresa byla automaticky zablokována, protože ji používal zablokovaný uživatel.",
        "api-error-badaccess-groups": "Nemáte povoleno nahrávat soubory na tuto wiki.",
        "unlinkaccounts-success": "Propojení účtu bylo zrušeno.",
        "authenticationdatachange-ignored": "Změna autentizačních údajů nebyla zpracována. Možná není nakonfigurován žádný poskytovatel?",
        "userjsispublic": "Uvědomte si prosím, že podstránky s JavaScriptem by neměly obsahovat tajné údaje, protože jsou viditelné ostatním uživatelům.",
-       "usercssispublic": "Uvědomte si prosím, že podstránky s CSS by neměly obsahovat tajné údaje, protože jsou viditelné ostatním uživatelům."
+       "usercssispublic": "Uvědomte si prosím, že podstránky s CSS by neměly obsahovat tajné údaje, protože jsou viditelné ostatním uživatelům.",
+       "restrictionsfield-badip": "Neplatná IP adresa nebo rozsah: $1",
+       "restrictionsfield-label": "Povolené rozsahy IP adres:",
+       "restrictionsfield-help": "Jedna IP adresa nebo CIDR rozsah na řádek. Všechno povolíte pomocí<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Chyba: $1",
+       "edit-error-long": "Chyby:\n\n$1"
 }
index aca71bb..ceb726e 100644 (file)
@@ -18,7 +18,8 @@
                        "Diafol",
                        "Nemo bis",
                        "Dafyddt",
-                       "Jdforrester"
+                       "Jdforrester",
+                       "Irus"
                ]
        },
        "tog-underline": "Tanlinellu cysylltiadau:",
@@ -36,6 +37,7 @@
        "tog-watchdefault": "Ychwanegu tudalennau a ffeiliau at fy rhestr wylio wrth i mi eu golygu",
        "tog-watchmoves": "Ychwanegu tudalennau a ffeiliau at fy rhestr wylio wrth i mi eu symud",
        "tog-watchdeletion": "Ychwanegu tudalennau a ffeiliau at fy rhestr wylio wrth i mi eu dileu",
+       "tog-watchuploads": "Ychwanegu ffeiliau newydd gan rhestr gwylio",
        "tog-watchrollback": "Ychwanegwch ddalennau dw i wedi perfformio 'rollback' i fy ffefrynnau",
        "tog-minordefault": "Marcio pob golygiad fel un bach yn ddiofyn",
        "tog-previewontop": "Dangos y rhagolwg cyn y blwch golygu",
        "yourpasswordagain": "Ail-deipiwch y cyfrinair:",
        "createacct-yourpasswordagain": "Gwirwch eich cyfrinair",
        "createacct-yourpasswordagain-ph": "Rhowch eich cyfrinair eto",
-       "remembermypassword": "Y porwr hwn i gofio'r manylion mewngofnodi (am hyd at $1 {{PLURAL:$1||diwrnod|ddiwrnod|diwrnod}})",
        "userlogin-remembermypassword": "Cadw'r sesiwn yn fyw tan i mi allgofnodi",
        "userlogin-signwithsecure": "Defnyddio cysylltiad diogel",
+       "cannotcreateaccount-title": "Yn methu creu cyfrif",
        "yourdomainname": "Eich parth:",
        "password-change-forbidden": "Ni allwch newid cyfrineiriau ar y wici hwn.",
        "externaldberror": "Naill ai: cafwyd gwall dilysu allanol ar databas neu: ar y llaw arall efallai nad oes hawl gennych chi i ddiwygio'ch cyfrif allanol.",
        "createacct-reason": "Rheswm",
        "createacct-reason-ph": "Pam ydych yn creu cyfrif arall?",
        "createacct-submit": "Creer y cyfrif",
-       "createacct-another-submit": "Creer y cyfrif ychwanegol",
+       "createacct-another-submit": "Creu cyfrif",
+       "createacct-continue-submit": "Parhau i greu cyfrif",
        "createacct-benefit-heading": "Ffrwyth llafur pobl fel chi yw {{SITENAME}}.",
        "createacct-benefit-body1": "{{PLURAL:$1|golygiad|golygiad|olygiad|golygiad}}",
        "createacct-benefit-body2": "{{PLURAL:$1|tudalen|dudalen|dudalen|tudalen|thudalen|tudalen}}",
        "resetpass_submit": "Gosod y cyfrinair a mewngofnodi",
        "changepassword-success": "Newidiwyd eich cyfrinair!",
        "changepassword-throttled": "Rydych wedi ceisio logio mewn yn rhy aml.\nArhoswch am $1 cyn trio eto.",
+       "botpasswords-label-create": "Dechrau",
+       "botpasswords-label-update": "Diweddaru",
+       "botpasswords-label-cancel": "Canslo",
        "botpasswords-label-delete": "Diddymu neu ddileu",
        "botpasswords-label-resetpassword": "Ailosod y cyfrinair",
        "botpasswords-label-grants": "Nawdd perthnasol:",
+       "botpasswords-label-grants-column": "Ganiataol",
+       "botpasswords-not-exist": "Defnyddiwr \"$1\" nad oes gyfrinair bot enw \"$2\".",
        "resetpass_forbidden": "Ni ellir newid cyfrineiriau",
+       "resetpass_forbidden-reason": "Ni allwn newid cyfrinair: $1",
        "resetpass-no-info": "Ni allwch fynd at y dudalen hon yn uniongyrchol heblaw eich bod wedi mewngofnodi.",
        "resetpass-submit-loggedin": "Newidier y cyfrinair",
        "resetpass-submit-cancel": "Diddymu",
        "passwordreset-emailtext-user": "Gofynodd y defnyddiwr $1 ar {{SITENAME}} am gael ailosod ei gyfrinair ar {{SITENAME}}\n($4). Mae'r {{PLURAL:$3||cyfrif|cyfrifon}} canlynol ynghlwm wrth y cyfeiriad e-bost hwn:\n\n$2\n\nBydd y {{PLURAL:$3||cyfrinair|cyfrineiriau}} dros dro hyn yn dod i ben ymhen {{PLURAL:$5||diwrnod|deuddydd|tridiau|$5 diwrnod}}.\nDylech fewngofnodi nawr a dewis cyfrinair newydd. Os mai rhywun arall a ofynodd am ailosod y cyfrinair, neu os ydych wedi cofio eich cyfrinair gwreiddiol, neu os nad ydych am ei newid bellach, gallwch anwybyddu'r neges hon a pharhau i ddefnyddio eich hen gyfrinair.",
        "passwordreset-emailelement": "Enw'r defnyddiwr: \n$1\n\nY cyfrinair dros dro: \n$2",
        "passwordreset-emailsentemail": "Anfonwyd e-bost i ailosod eich cyfrinair atoch.",
+       "passwordreset-ignored": "Ailosod y cyfrinair nad ymdriniwyd â. Efallai y nid y darparwr yn osod?",
+       "passwordreset-invalideamil": "Cyfeiriad e-bost annilys",
        "changeemail": "Newid y cyfeiriad e-bost",
        "changeemail-header": "Cwbwlhewch y ffurflen hon i newid cyfeiriad e-bost y cyfrifi. I ddileu pob cysylltiad i bob cyfeiriad ebost, gadewch e'n wag.",
        "changeemail-no-info": "Ni allwch fynd at y dudalen hon heblaw eich bod wedi mewngofnodi.",
        "minoredit": "Golygiad bychan yw hwn",
        "watchthis": "Gwylier y dudalen hon",
        "savearticle": "Cadw'r dudalen",
+       "savechanges": "Cadw'r holl newidiadau",
        "publishpage": "Cyhoeddi tudalen",
        "publishchanges": "Cyhoeddi newidiadau",
        "preview": "Rhagolwg",
        "htmlform-cloner-create": "Ychwaneger rhes",
        "htmlform-cloner-delete": "Tynner i ffwrdd",
        "htmlform-cloner-required": "Mae angen o leiaf un peth!",
-       "sqlite-has-fts": "$1 gyda chymorth chwilio yr holl destun",
-       "sqlite-no-fts": "$1 heb gymorth chwiliad yr holl destun",
        "logentry-delete-delete": "Dileodd $1 dudalen $3",
        "logentry-delete-restore": "Adferodd $1 y dudalen $3",
        "logentry-delete-event": "Newidiodd $1 ymddangosiad {{PLURAL:$5||cofnod lòg|$5 gofnod lòg|$5 chofnod lòg|$5 chofnod lòg|$5 cofnod lòg}} ar $3: $4",
index c6bd656..c2eeeba 100644 (file)
        "botpasswords-label-delete": "Slet",
        "botpasswords-label-resetpassword": "Nulstil adgangskode",
        "botpasswords-label-grants": "Tilgængelige bevillinger:",
-       "botpasswords-label-restrictions": "Begrænsninger for brug:",
        "resetpass_forbidden": "Adgangskoder kan ikke ændres",
        "resetpass-no-info": "Du skal være logget på for at komme direkte til denne side.",
        "resetpass-submit-loggedin": "Skift adgangskode",
        "htmlform-cloner-create": "Tilføj flere",
        "htmlform-cloner-delete": "Fjern",
        "htmlform-cloner-required": "Der kræves mindst en værdi.",
-       "sqlite-has-fts": "$1 med fuld-tekst søgnings support",
-       "sqlite-no-fts": "$1 uden fuld-tekst søgnings support",
        "logentry-delete-delete": "$1 {{GENDER:$2|slettede}} siden $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|gendannede}} siden $3",
        "logentry-delete-event": "$1 {{GENDER:$2|ændrede}} synligheden af {{PLURAL:$5|en loghændelse|$5 loghændelser}} for siden $3: $4",
index ac16a5e..b5d2523 100644 (file)
        "tog-enotifminoredits": "Auch bei kleinen Änderungen an Seiten und Dateien E-Mails senden",
        "tog-enotifrevealaddr": "Meine E-Mail-Adresse in Benachrichtigungs-E-Mails anzeigen",
        "tog-shownumberswatching": "Anzahl der beobachtenden Benutzer anzeigen",
-       "tog-oldsig": "Vorhandene Signatur:",
+       "tog-oldsig": "Deine vorhandene Signatur:",
        "tog-fancysig": "Signatur als Wikitext behandeln (ohne automatische Verlinkung)",
        "tog-uselivepreview": "Vorschau sofort anzeigen",
        "tog-forceeditsummary": "Warnen, sofern beim Speichern die Zusammenfassung fehlt",
        "tog-showhiddencats": "Versteckte Kategorien anzeigen",
        "tog-norollbackdiff": "Unterschied nach dem Zurücksetzen nicht anzeigen",
        "tog-useeditwarning": "Warnen, sofern eine zur Bearbeitung geöffnete Seite verlassen wird, die nicht gespeicherte Änderungen enthält",
-       "tog-prefershttps": "Wenn angemeldet, immer eine sichere Verbindung benutzen.",
+       "tog-prefershttps": "Während angemeldet, immer eine sichere Verbindung benutzen.",
        "underline-always": "immer",
        "underline-never": "nie",
        "underline-default": "abhängig von der Benutzeroberfläche oder Browsereinstellung",
        "newwindow": "(wird in einem neuen Fenster geöffnet)",
        "cancel": "Abbrechen",
        "moredotdotdot": "Mehr …",
-       "morenotlisted": "Diese Liste ist nicht vollständig.",
+       "morenotlisted": "Diese Liste könnte nicht vollständig sein.",
        "mypage": "Eigene Seite",
        "mytalk": "Diskussion",
        "anontalk": "Diskussionsseite",
        "talk": "Diskussion",
        "views": "Ansichten",
        "toolbox": "Werkzeuge",
+       "tool-link-userrights": "{{GENDER:$1|Benutzergruppen}} ändern",
+       "tool-link-emailuser": "E-Mail an {{GENDER:$1|diesen Benutzer|diese Benutzerin}} senden",
        "userpage": "Benutzerseite anzeigen",
        "projectpage": "Projektseite anzeigen",
        "imagepage": "Dateiseite anzeigen",
        "eauthentsent": "Eine Bestätigungs-E-Mail wurde an die angegebene Adresse verschickt.\n\nBevor eine E-Mail von anderen Benutzern über die E-Mail-Funktion empfangen werden kann, muss die Adresse und ihre tatsächliche Zugehörigkeit zu diesem Benutzerkonto erst bestätigt werden. Bitte befolge die Hinweise in der Bestätigungs-E-Mail.",
        "throttled-mailpassword": "Es wurde innerhalb der letzten {{PLURAL:$1|Stunde|$1 Stunden}} bereits eine Passwortzurücksetzungs-E-Mail angefordert. Um einen Missbrauch der Funktion zu verhindern, kann nur {{PLURAL:$1|einmal pro Stunde|alle $1 Stunden}} eine Passwortzurücksetzungs-E-Mail angefordert werden.",
        "mailerror": "Fehler beim Senden der E-Mail: $1",
-       "acct_creation_throttle_hit": "Besucher dieses Wikis, die deine IP-Adresse verwenden, haben innerhalb des letzten Tages {{PLURAL:$1|1 Benutzerkonto|$1 Benutzerkonten}} erstellt, was die maximal erlaubte Anzahl in dieser Zeitperiode ist.\n\nBesucher, die diese IP-Adresse verwenden, können momentan keine Benutzerkonten mehr erstellen.",
+       "acct_creation_throttle_hit": "Besucher dieses Wikis, die deine IP-Adresse verwenden, haben innerhalb der letzten $2 {{PLURAL:$1|ein Benutzerkonto|$1 Benutzerkonten}} erstellt, was die maximal erlaubte Anzahl in dieser Zeitperiode ist.\n\nBesucher, die diese IP-Adresse verwenden, können momentan keine Benutzerkonten mehr erstellen.",
        "emailauthenticated": "Deine E-Mail-Adresse wurde am $2 um $3 Uhr bestätigt.",
        "emailnotauthenticated": "Deine E-Mail-Adresse ist noch nicht bestätigt.\nDie folgenden E-Mail-Funktionen stehen erst nach erfolgreicher Bestätigung zur Verfügung.",
        "noemailprefs": "Gib eine E-Mail-Adresse in den Einstellungen an, damit die nachfolgenden Funktionen zur Verfügung stehen.",
        "botpasswords-label-resetpassword": "Passwort zurücksetzen",
        "botpasswords-label-grants": "Anwendbare Berechtigungen:",
        "botpasswords-help-grants": "Jede Berechtigung gibt Zugriff auf gelistete Benutzerrechte, die ein Benutzerkonto bereits hat. Siehe die [[Special:ListGrants|Tabelle]] für weitere Informationen.",
-       "botpasswords-label-restrictions": "Verwendungsbeschränkungen:",
        "botpasswords-label-grants-column": "Gewährt",
        "botpasswords-bad-appid": "Der Botname „$1“ ist nicht gültig.",
        "botpasswords-insert-failed": "Der Botname „$1“ konnte nicht hinzugefügt werden. Wurde er bereits hinzugefügt?",
        "passwordreset-emailelement": "Benutzername: \n$1\n\nTemporäres Passwort: \n$2",
        "passwordreset-emailsentemail": "Falls diese E-Mail-Adresse mit deinem Benutzerkonto verknüpft ist, wird eine Passwort-Zurücksetzungs-E-Mail versandt.",
        "passwordreset-emailsentusername": "Falls es eine E-Mail-Adresse gibt, die mit diesem Benutzernamen verknüpft ist, wird eine Passwort-Zurücksetzungs-E-Mail versandt.",
-       "passwordreset-emailsent-capture2": "Die Passwort-Zurücksetzungs-{{PLURAL:$1|E-Mail wurde|E-Mails wurden}} versandt. {{PLURAL:$1|Der Benutzername und das Passwort|Die Liste der Benutzernamen und Passwörter}} wird unten angezeigt.",
-       "passwordreset-emailerror-capture2": "Das Senden der E-Mail an {{GENDER:$2|den Benutzer|die Benutzerin}} ist fehlgeschlagen: $1 {{PLURAL:$3|Der Benutzername und das Passwort|Die Liste der Benutzernamen und Passwörter}} wird unten angezeigt.",
+       "passwordreset-emailsent-capture2": "Die Passwort-Zurücksetzungs-{{PLURAL:$1|E-Mail wurde|E-Mails wurden}} versandt. {{PLURAL:$1|Der Benutzername und das Passwort|Die Liste der Benutzernamen und Passwörter}} wird hier angezeigt.",
+       "passwordreset-emailerror-capture2": "Das Senden der E-Mail an {{GENDER:$2|den Benutzer|die Benutzerin}} ist fehlgeschlagen: $1 {{PLURAL:$3|Der Benutzername und das Passwort|Die Liste der Benutzernamen und Passwörter}} wird hier angezeigt.",
        "passwordreset-nocaller": "Es muss ein Rufer angegeben werden",
        "passwordreset-nosuchcaller": "Rufer ist nicht vorhanden: $1",
        "passwordreset-ignored": "Die Passwortzurücksetzung konnte nicht verarbeitet werden. Vielleicht wurde kein Dienstanbieter konfiguriert?",
        "grant-basic": "Basisrechte",
        "grant-viewdeleted": "Gelöschte Dateien und Seiten ansehen",
        "grant-viewmywatchlist": "Deine Beobachtungsliste ansehen",
+       "grant-viewrestrictedlogs": "Beschränkte Logbucheinträge ansehen",
        "newuserlogpage": "Neuanmeldungs-Logbuch",
        "newuserlogpagetext": "Dies ist ein Logbuch der neu erstellten Benutzerkonten.",
        "rightslog": "Rechte-Logbuch",
        "upload-dialog-disabled": "Dateiuploads mit diesem Dialog sind auf diesem Wiki deaktiviert.",
        "upload-dialog-title": "Datei hochladen",
        "upload-dialog-button-cancel": "Abbrechen",
+       "upload-dialog-button-back": "Zurück",
        "upload-dialog-button-done": "Schließen",
        "upload-dialog-button-save": "Speichern",
        "upload-dialog-button-upload": "Hochladen",
        "apisandbox-results-fixtoken-fail": "Der „$1“-Token konnte nicht abgerufen werden.",
        "apisandbox-alert-page": "Felder auf dieser Seite sind nicht gültig.",
        "apisandbox-alert-field": "Der Wert dieses Feldes ist nicht gültig.",
+       "apisandbox-continue": "Fortfahren",
+       "apisandbox-continue-clear": "Löschen",
+       "apisandbox-continue-help": "Mit „{{int:apisandbox-continue}}“ kann man die letzte Anfrage [https://www.mediawiki.org/wiki/API:Query#Continuing_queries fortfahren]; „{{int:apisandbox-continue-clear}}“ löscht fortsetzungsbezogene Parameter.",
        "booksources": "ISBN-Suche",
        "booksources-search-legend": "Suche nach Bezugsquellen für Bücher",
        "booksources-search": "Suchen",
        "movelogpagetext": "Dies ist eine Liste aller verschobenen Seiten.",
        "movesubpage": "{{PLURAL:$1|Unterseite|Unterseiten}}",
        "movesubpagetext": "Diese Seite hat $1 {{PLURAL:$1|Unterseite|Unterseiten}}.",
+       "movesubpagetalktext": "Die dazugehörige Diskussionsseite hat {{PLURAL:$1|eine Unterseite, die unten angezeigt wird|$1 Unterseiten, die unten angezeigt werden}}.",
        "movenosubpage": "Diese Seite hat keine Unterseiten.",
        "movereason": "Grund:",
        "revertmove": "zurück verschieben",
        "pageinfo-category-pages": "Anzahl der Seiten",
        "pageinfo-category-subcats": "Anzahl der Unterkategorien",
        "pageinfo-category-files": "Anzahl der Dateien",
+       "pageinfo-user-id": "Benutzerkennung",
        "markaspatrolleddiff": "Als kontrolliert markieren",
        "markaspatrolledtext": "Diese Seite als kontrolliert markieren",
        "markaspatrolledtext-file": "Diese Dateiversion als kontrolliert markieren",
        "newimages-showbots": "Von Bots hochgeladene Dateien anzeigen",
        "newimages-hidepatrolled": "Kontrollierte Dateien ausblenden",
        "noimages": "Keine Dateien gefunden.",
+       "gallery-slideshow-toggle": "Vorschaubilder umschalten",
        "ilsubmit": "Suchen",
        "bydate": "nach Datum",
        "sp-newimages-showfrom": "Zeige neue Dateien ab $1, $2 Uhr",
        "htmlform-cloner-create": "Weitere hinzufügen",
        "htmlform-cloner-delete": "Entfernen",
        "htmlform-cloner-required": "Es ist mindestens ein Wert erforderlich.",
+       "htmlform-date-placeholder": "JJJJ-MM-TT",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "JJJJ-MM-TT HH:MM:SS",
+       "htmlform-date-invalid": "Der eingegebene Wert ist kein erkanntes Datum. Versuche die Verwendung des Formats JJJJ-MM-TT.",
+       "htmlform-time-invalid": "Der eingegebene Wert ist keine erkannte Zeit. Versuche die Verwendung des Formats HH:MM:SS.",
+       "htmlform-datetime-invalid": "Der eingegebene Wert ist kein erkanntes Datum und keine Zeit. Versuche die Verwendung des Formats JJJJ-MM-TT HH:MM:SS.",
+       "htmlform-date-toolow": "Der eingegebene Wert liegt vor dem frühesten erlaubten Datum $1.",
+       "htmlform-date-toohigh": "Der eingegebene Wert liegt nach dem spätesten erlaubten Datum $1.",
+       "htmlform-time-toolow": "Der eingegebene Wert liegt vor der frühesten erlaubten Zeit $1.",
+       "htmlform-time-toohigh": "Der eingegebene Wert liegt nach der spätesten erlaubten Zeit $1.",
+       "htmlform-datetime-toolow": "Der eingegebene Wert liegt vor dem frühesten erlaubten Datum und der Zeit $1.",
+       "htmlform-datetime-toohigh": "Der eingegebene Wert liegt nach dem spätesten erlaubten Datum und der Zeit $1.",
        "htmlform-title-badnamespace": "[[:$1]] ist nicht im Namensraum „{{ns:$2}}“.",
        "htmlform-title-not-creatable": "„$1“ ist kein erstellbarer Seitentitel",
        "htmlform-title-not-exists": "$1 ist nicht vorhanden.",
        "htmlform-user-not-exists": "<strong>$1</strong> ist nicht vorhanden.",
        "htmlform-user-not-valid": "<strong>$1</strong> ist kein gültiger Benutzername.",
-       "sqlite-has-fts": "Version $1 mit Unterstützung für die Volltextsuche",
-       "sqlite-no-fts": "Version $1 ohne Unterstützung für die Volltextsuche",
        "logentry-delete-delete": "$1 {{GENDER:$2|löschte}} Seite $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|stellte}} Seite $3 wieder her",
        "logentry-delete-event": "$1 {{GENDER:$2|änderte}} die Sichtbarkeit {{PLURAL:$5|eines Logbucheintrags|von $5 Logbucheinträgen}} auf $3: $4",
        "feedback-external-bug-report-button": "Eine technische Aufgabe einreichen",
        "feedback-dialog-title": "Rückmeldung senden",
        "feedback-dialog-intro": "Du kannst das einfache Formular unten verwenden, um deine Rückmeldung einzureichen. Dein Kommentar wird zusammen mit deinem Benutzernamen zur Seite „$1“ hinzugefügt.",
-       "feedback-error-title": "Fehler",
        "feedback-error1": "Fehler: Unbekanntes Ergebnis der API",
        "feedback-error2": "Fehler: Bearbeitung gescheitert",
        "feedback-error3": "Fehler: Keine Antwort von der API",
        "feedback-thanks": "Vielen Dank. Deine Rückmeldung wurde auf der Seite „[$2 $1]“ gespeichert.",
        "feedback-thanks-title": "Danke!",
        "feedback-useragent": "User Agent:",
-       "searchsuggest-search": "Suchen",
+       "searchsuggest-search": "{{SITENAME}} durchsuchen",
        "searchsuggest-containing": "enthält …",
        "api-error-autoblocked": "Deine IP-Adresse wurde automatisch gesperrt, da sie von einem gesperrten Benutzer verwendet wurde.",
        "api-error-badaccess-groups": "Du hast nicht die Berechtigung Dateien in dieses Wiki hochzuladen.",
        "unlinkaccounts-success": "Das Benutzerkonto wurde getrennt.",
        "authenticationdatachange-ignored": "Die Änderung der Authentifizierungsdaten wurde nicht bearbeitet. Vielleicht wurde kein Anbieter konfiguriert?",
        "userjsispublic": "Bitte beachten: JavaScript-Unterseiten sollten keine vertraulichen Daten enthalten, da sie von anderen Benutzern eingesehen werden können.",
-       "usercssispublic": "Bitte beachten: CSS-Unterseiten sollten keine vertraulichen Daten enthalten, da sie von anderen Benutzern eingesehen werden können."
+       "usercssispublic": "Bitte beachten: CSS-Unterseiten sollten keine vertraulichen Daten enthalten, da sie von anderen Benutzern eingesehen werden können.",
+       "restrictionsfield-badip": "Ungültige IP-Adresse oder ungültiger IP-Adressbereich: $1",
+       "restrictionsfield-label": "Erlaubte IP-Adressbereiche:",
+       "restrictionsfield-help": "Eine IP-Adresse oder ein CIDR-Bereich pro Zeile. Um alles zu aktivieren, verwende<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Fehler: $1",
+       "edit-error-long": "Fehler:\n\n$1"
 }
index 32ae9be..cd9fd62 100644 (file)
@@ -24,7 +24,9 @@
                        "Macofe",
                        "Matma Rex",
                        "Kumkumuk",
-                       "Gırd"
+                       "Gırd",
+                       "Velg",
+                       "1917 Ekim Devrimi"
                ]
        },
        "tog-underline": "Bınê gırey de xete bance:",
@@ -42,6 +44,7 @@
        "tog-watchdefault": "Pel u dosyeyê ke mı vurnayê lista mına seyrkerdışi ke",
        "tog-watchmoves": "Pel u dosyeyê ke mı kırıştê lista mına seyrkerdışi ke",
        "tog-watchdeletion": "Pel u dosyeyê ke mı esterıtê lista mına seyrkerdışi ke",
+       "tog-watchuploads": "Dosya yë kı mı kerdë bar lista seyran kı",
        "tog-watchrollback": "Pelê ke mı peyser ardi inan lista mına seyrkerdışi ke",
        "tog-minordefault": "Vurnayışanê xo pêrune ''vurnayışo qıckek'' nışan bıde",
        "tog-previewontop": "Verqayti pela nuştışi ser de bımocne",
@@ -51,7 +54,7 @@
        "tog-enotifminoredits": "Pelan de vurnayışanê qıckekan u dosyan de ki mı rê e-mail bırışe",
        "tog-enotifrevealaddr": "Adresa e-posteyê mı posteyê xeberan de bımocne",
        "tog-shownumberswatching": "Amarê karberanê seyrkerdoğan bımocne",
-       "tog-oldsig": "İmzaya mewcude:",
+       "tog-oldsig": "İmzaya mewcud:",
        "tog-fancysig": "İmza rê mameleyê wikimeqaley bıke (bê gıreyo otomatik)",
        "tog-uselivepreview": "Verqayto giyane bıgureyne",
        "tog-forceeditsummary": "Mı ke xulasa veng verdaye, hay a mı ser de",
@@ -59,6 +62,7 @@
        "tog-watchlisthidebots": "Lista seyrkerdışi ra vurnayışanê boti bınımne",
        "tog-watchlisthideminor": "Vurnayışanê qıckekan lista mına seyrkerdışi de bınımne",
        "tog-watchlisthideliu": "Lista seyrkerdışi ra vurnayışanê karberanê cıkewteyan bınımne",
+       "tog-watchlistreloadautomatically": "Filtra vıriyayış dı listey seyri otomatikman anewe kı",
        "tog-watchlisthideanons": "Lista seyrkerdışi ra vurnayışanê karberanê anoniman bınımne",
        "tog-watchlisthidepatrolled": "Lista seyrkerdışi ra vurnayışanê qontrolkerdeyan bınımne",
        "tog-watchlisthidecategorization": "Pera kategorizasyoni bınımne",
@@ -67,7 +71,7 @@
        "tog-showhiddencats": "Kategoriyanê nımneya bıasne",
        "tog-norollbackdiff": "Peyser ardışi ra dıme ferqi measne",
        "tog-useeditwarning": "Wexto ke mı yew pela nizami be vurnayışanê nêqeydbiyayeyan caverdê, hay be mı ser de",
-       "tog-prefershttps": "Ronışten akerden de  greyo itimadın bıkarne",
+       "tog-prefershttps": "Ronışten akerden de tım greyo itimadın bıkarne",
        "underline-always": "Tım",
        "underline-never": "Qet",
        "underline-default": "Cild ya zi cıgeyrayoğo hesebiyaye",
        "category-empty": "''Ena kategoriye de hewna qet nuştey ya zi medya çıniyê.''",
        "hidden-categories": "{{PLURAL:$1|Kategoriya nımıtiye|Kategoriyê nımıtey}}",
        "hidden-category-category": "Kategoriyê nımıtey",
-       "category-subcat-count": "{{PLURAL:$2|Na kategoriye de $1 bınkategoriy estê.|$2 kategoriyan ra $1 kategoriyê bınêni asenê.}} \n{| border=\"1\" cellpadding=\"2\" cellspacing=\"0\" align=\"left\" style=\"margin-left:1em; background:peru; border: 1px #aaa solid; border-collapse: collapse; font-size: 95%;\"\n| align=\"center\" |(K) Kategoriye (D) Dosya (P) Peli (M)  Medya\n|}",
+       "category-subcat-count": "{{PLURAL:$2|Na kategoriye de tenya na bınkategoriye esta.|Na kategoriye de, $2 ra pêro piya, {{PLURAL:$1|bınkategoriye esta|$1 bınkategoriy estê}}.}}",
        "category-subcat-count-limited": "Na kategoriye de {{PLURAL:$1|na kategoriya bınêne esta|nê $1 kategoriyê bınêni estê}}.",
-       "category-article-count": "{{PLURAL:$2|Na kategoriye de teyna ena pele esta.|Ebe $2 ra pêro piya {{PLURAL:$1|ena pela na kategoriye dera|$1 enê peli na kategoriye derê.}}}}",
+       "category-article-count": "{{PLURAL:$2|Na kategoriye de teyna ena pele esta.|Ebe $2 ra pêro piya {{PLURAL:$1|ena pele na kategoriye dera|$1 enê peli na kategoriye derê}}.}}",
        "category-article-count-limited": "{{PLURAL:$1|Pela cêrêne|$1 Pelê cêrêni}} na kategoriye derê.",
        "category-file-count": "{{PLURAL:$2|Na kategori tenya dosya ya cêri muhtewa kena.|Na kategori de $2 ra pêro piya {{PLURAL:$1|1 dosya est a|$1 dosyey est ê}}.}}",
        "category-file-count-limited": "{{PLURAL:$1|Dosya cêrêne|$1 Dosyê cêrêni}} na kategoriye derê.",
        "listingcontinuesabbrev": "dewam...",
        "index-category": "Pelê endeksıni",
-       "noindex-category": "Pelê ke zerrekê cı çıniyo",
+       "noindex-category": "Bê indeksın perri",
        "broken-file-category": "Peleye ke gıreyê dosyeyanê ğeletan muhtewa kenê",
        "categoryviewer-pagedlinks": "($1) ($2)",
        "about": "Heqa cı de",
        "article": "Pela zerreki",
        "newwindow": "(pençereyê newey de beno a)",
-       "cancel": "Bıtexelne",
+       "cancel": "Bıtekelne",
        "moredotdotdot": "Vêşi...",
-       "morenotlisted": "Vêşi lista nêbi...",
+       "morenotlisted": "Na lista qay kemi ya.",
        "mypage": "Pele",
        "mytalk": "Mesac",
        "anontalk": "Werênayış",
        "qbedit": "Bıvurne",
        "qbpageoptions": "Ena pele",
        "qbmyoptions": "Pelê mı",
-       "faq": "PZP",
+       "faq": "PVP",
        "faqpage": "Project: PZP",
        "actions": "Hereketi",
        "namespaces": "Heruna nameyan",
        "specialpage": "Pela xısusiye",
        "personaltools": "Hacetê şexsiy",
        "articlepage": "Pera zerreki bıvin",
-       "talk": "Vaten",
+       "talk": "Werênayış",
        "views": "Asayışi",
        "toolbox": "Haceti",
+       "tool-link-userrights": "Grubanê {{GENDER:$1|karberi}} bıvırnë",
+       "tool-link-emailuser": "E-posta ya në{{GENDER:$1|karberi}}",
        "userpage": "Pela karberi bıvêne",
        "projectpage": "Pela proceyi bıvêne",
        "imagepage": "Pera dosya bıasne",
        "viewhelppage": "Pera peşti bıvin",
        "categorypage": "Pela kategoriya bıasne",
        "viewtalkpage": "Werênayışi bıvêne",
-       "otherlanguages": "Zıwananê binan de",
+       "otherlanguages": "Zederna zıwani",
        "redirectedfrom": "($1 ra kırışı yê)",
        "redirectpagesub": "Pela berdışi",
        "redirectto": "Beno hetê:",
        "jumptonavigation": "Pusula",
        "jumptosearch": "cı geyre",
        "view-pool-error": "Qaytê qısuri mekerên, serverê ma enıka zêde bar gırewto xo ser.\nHedê xo ra zêde karberi kenê ke seyrê na pele bıkerê.\nŞıma rê zehmet, tenê vınderên, heta ke reyna kenê ke ena pele kewê.\n\n$1",
+       "generic-pool-error": "Üzgünüz, şu an sunucular aşırı yüklendi.\nÇok fazla kullanıcı bu sayfayı görüntülemeye çalışıyor.\nLütfen bu sayfaya  tekrar erişmeyi denemeden önce biraz bekleyin.",
        "pool-timeout": "Kılitbiyayışi sero wextê vınetışi",
        "pool-queuefull": "Rêza hewze pırra",
        "pool-errorunknown": "Xeta nêzanıtiye",
+       "pool-servererror": "Amordoğa xızmeti ya istifade nëbena $1",
        "poolcounter-usage-error": "Xırab karyayış:$1",
        "aboutsite": "Heqa {{SITENAME}} de",
        "aboutpage": "Project:Heqa",
        "mainpage-description": "Pela seri",
        "policy-url": "Project:Terzê hereketi",
        "portal": "Portalê cemaeti",
-       "portal-url": "Project:Portalê cemaeti",
+       "portal-url": "Project:Portalë Å\9fëlıgi",
        "privacy": "Politikaya nımıteyiye",
        "privacypage": "Project:Xısusiyetê nımıtışi",
        "badaccess": "Xeta mısadey",
        "nstab-template": "Şablon",
        "nstab-help": "Pela peşti",
        "nstab-category": "Kategoriye",
-       "mainpage-nstab": "Pela seri",
+       "mainpage-nstab": "Pera esas",
        "nosuchaction": "Fealiyeto wınasi çıniyo",
        "nosuchactiontext": "URL ra kar qebul nêbı.\nŞıma belka URL şaş nuşt, ya zi gıreyi şaş ra ameyi.\nKeyepelê {{SITENAME}} eşkeno xeta eşkera bıkero.",
        "nosuchspecialpage": "Pela xasa wınasiye çıniya",
        "readonly_lag": "Daegeh (database) otomatikmen kılit bi, sureo ke  daegehê bınêni resay daegehê serêni.",
        "internalerror": "Xeta zerreki",
        "internalerror_info": "Xeta zerreki: $1",
+       "internalerror-fatal-exception": "Babet da \"$1\" dı xırab xeta",
        "filecopyerror": "\"$1\" qaydê na \"$2\" dosya nêbeno.",
        "filerenameerror": "nameyê \"$1\" dosya nêvuriya no name \"$2\" ri.",
        "filedeleteerror": "Na \"$1\" dosya hewn a nêşi .",
        "directorycreateerror": "\"$1\" rêzkiyê ey nêvırazya",
+       "directoryreadonlyerror": "Rëzena \"$1\" salt-wanëna.",
+       "directorynotreadableerror": "Rëzena $1 wanebıyayi niya",
        "filenotfound": "Na \"$1\" dosya nêasena.",
        "unexpected": "Endek texmin nêbeni: \"$1\"=\"$2\".",
        "formerror": "Xeta: Form nêerşawiyeno",
        "no-null-revision": "Qandé \"$1\" zew rewizyono newe névıraziya.",
        "badtitle": "Sernameyo xırabın",
        "badtitletext": "Sernameyê pela ke şıma waşt, nêvêrd, vengo ya zi zıwano miyanêno ğelet gırêdaye ya zi sernameyê wiki.\nBeno ke, tede yew ya zi zêdê işareti estê ke sernameyan de nêxebetiyenê.",
+       "title-invalid-empty": "Waziyaye sernamey perrer  venonyana teyna canamey nami sero esto.",
        "perfcached": "Datay cı ver hazır biye. No semedê ra nıkayin niyo! tewr zaf {{PLURAL:$1|netice|$1 netice}} debêno de",
        "perfcachedts": "Cêr de malumatê nımıteyi esti, demdê newe kerdışo peyın: $1. Tewr zaf {{PLURAL:$4|netice|$4 neticey cı}} debyayo de",
        "querypage-no-updates": "Rocanebiyayışê na pele nıka cadayiyê.\nDayiyi tiya nıka newe nêbenê.",
        "createacct-yourpasswordagain-ph": "Parola fına cıkewe",
        "userlogin-remembermypassword": "Mı biya xo viri",
        "userlogin-signwithsecure": "Ebe teqdimkerê asayişın cıkewe",
+       "cannotlogin-title": "Cı nëkewtë",
        "cannotloginnow-title": "Enewke ronıştışo nêabeno",
        "cannotloginnow-text": "$1 karkerdışa ronıştış akerdış mıkum niyo.",
+       "cannotcreateaccount-title": "Nêşenay hesab rakerê",
        "yourdomainname": "Yewdestê şıma:",
        "password-change-forbidden": "Şıma na wiki de nêşenê parola bıvurnê.",
        "externaldberror": "Ya database de xeta esta ya zi heqê şıma çino şıma no hesab bıvurni.",
        "createacct-another-continue-submit": "Hesab vıraştışi rê dewam ke",
        "createacct-benefit-heading": "{{SITENAME}} meş de merduman şi",
        "createacct-benefit-body1": "{{PLURAL:$1|vurnayış|vurnayışi}}",
-       "createacct-benefit-body2": "{{PLURAL:$1|wesiqe|wesiqey}}",
+       "createacct-benefit-body2": "{{PLURAL:$1|pele|peli}}",
        "createacct-benefit-body3": "{{PLURAL:$1|iştıraqkerdoğo nıkayên|iştıraqkerdoğê nıkayêni}}",
        "badretype": "Parolayê ke şıma nuşti yewbini nêtepışneni.",
        "usernameinprogress": "Qandê nê karberi hesab vıraştışondewamnkeno.  Tay bıpawê",
        "wrongpasswordempty": "Parola tola, venga. tekrar bınuse.",
        "passwordtooshort": "Paroley gani tewr senık be {{PLURAL:$1|1 karakter|$1 karakteran}} derg bê.",
        "passwordtoolong": "Paroleyi be {{PLURAL:$1|1 karakter|$1 karakteran}} ra derg nêbenê.",
+       "passwordtoopopular": "Parolay kehana ker kerıdşi rë mısade nëdeyë no.  Ju parolaya xas bıweçinë",
        "password-name-match": "Parola u nameyê şıma gani zeypê (seypê) nêbo.",
        "password-login-forbidden": "Nameyê nê karberi û gurenayışê parola biyo qedeğen.",
        "mailmypassword": "Parola reset ke",
        "eauthentsent": "Adresok şıma qeyd kerdo wıcayré e-posta rışiyé.\nHetana şıma ne e-posta néwweyniyé, şımaé zewbi e-posta do nérışiyo.",
        "throttled-mailpassword": "Eyarkerdışê parola xora zerreyê {{PLURAL:$1|yew saete|$1 saetan}} erşawiya.\nSeba xırabgurenayışê xızmete ra, her {{PLURAL:$1|yew saete|$1 saetan}} de rey tenya yew eyarkerdışê parola erşawiyeno.",
        "mailerror": "Erşawıtışe xetayê e-posta: $1",
-       "acct_creation_throttle_hit": "Yew ten IP adresê şıma xebıtnayo u kewto no wiki, roco peyin de {{PLURAL:$1|1 hesab|$1 hesab}} vıraşto.\nxulasa ney kesê ke IP adresê şıma xebıtneni hini nêeşkeni ney ra zêdêr hesab akeri.",
+       "acct_creation_throttle_hit": "Yew ten IP adresê şıma xebıtnayo u kewto no wiki, $2roco peyin de {{PLURAL:$1|1 hesabi|$1 hesaban}} vıraşto.\nxulasa ney kesê ke IP adresê şıma xebıtneni hini nêeşkeni ney ra zêdêr hesab akeri.",
        "emailauthenticated": "E-postay şıma $2 sehat $3 dı biya araşt",
        "emailnotauthenticated": "Adresa e-pota da şıma qebul nébiya.\nQandé céréna şımaré teba do nérışiyo.",
        "noemailprefs": "Hesab biyo a.",
        "passwordreset-emailtext-ip": "Jeweri, {{SITENAME}} ra (ma heta şımayê, $1 IP adresi ra) ($4) teferuatê hesabdê şıma  va wa biyaro xo viri. Karbero ke cêrdeyo {{PLURAL:$3|hesaba|eno hesaba}} ena e-posta adresiya aleqey cı esto:\n\n$2\n\n{{PLURAL:$3|ena parola idaretena|ena parola idareten}} {{PLURAL:$5|jew roc|$5  roca}}rêya.\nEna parolaya deqewe de u xorê ju parolaya newi bıweçine. Parolaya şıma emaya şıma viri se  yana  ena e-posta şıma nê weştase u şıma qayıl niye parolaya xo bıvurnese, ena mesacer peygoş bıkerê.",
        "passwordreset-emailtext-user": "$1 enê karberi, {{SITENAME}}  ra ($4) teferuatê hesab dê şıma  va wa biyaro xo viri. Karbero ke cêrdeyo {{PLURAL:$3|hesaba|eno hesaba}} ena e-posta adresiya aleqey cı esto:\n\n$2\n\n{{PLURAL:$3|ena parola idaretena|ena parola idareten}} {{PLURAL:$5|jew roc|$5  roca}}rêya.\nEna parolaya deqewe de u xorê ju parolaya newi bıweçine. Parolaya şıma emaya şıma viri se  yana  ena e-posta şıma nê weştase u şıma qayıl niye parolaya xo bıvurnese, ena mesacer peygoş bıkerê.",
        "passwordreset-emailelement": "Nameyê karberi: \n$1\n\nParolaya vêrdiye: \n$2",
-       "passwordreset-emailsentemail": "Eke na seba hesabê şıma yew adresa e-posteyê qeydına, yew e-posteyê parola nênkerdışi rışiyeno.",
+       "passwordreset-emailsentemail": "Eger kı ena e-posta şıma rê se, yew e-posta do bırışiyo eno hesab.",
        "passwordreset-invalideamil": "Adresê eposta raşt niya",
        "changeemail": "E-posta adresa xo wedarne",
-       "changeemail-header": "E-posya adresta hesabdê xo bıvurnê",
+       "changeemail-header": "E-posta adresa xo vuriyayışi rë ena former pır kerë. Eger kı şıma qayılë kı e postay adresi ra wedarnë se formi rıştış dı heruna e posta veng verdë",
        "changeemail-no-info": "Şıma gani bıkewê pele ke derdest bıresê na pele.",
        "changeemail-oldemail": "E-postay şımawa nıkaêne:",
        "changeemail-newemail": "E-postay şımawa newiye:",
        "hr_tip": "Xeta verardiye (teserrufın bıgureyne/bıxebetne)",
        "summary": "Xulasa:",
        "subject": "Mewzu:",
-       "minoredit": "Vurriyayışo werdiyo",
-       "watchthis": "Perrer bıpaw",
+       "minoredit": "No yew vurnayışo werdiyo",
+       "watchthis": "Na pele seyr ke",
        "savearticle": "Qeyd ke",
        "savechanges": "Vurnayışan qeyd ke",
        "publishpage": "Perer bıhesırne",
        "newarticle": "(Newe)",
        "newarticletext": "To yew gıre tıkna be ra yew pela ke hewna çıniya.\nSeba afernayışê pele ra, qutiya metnê cêrêni bıgurene (seba melumati qaytê [$1 pela peşti] ke).\nEke be ğeletine ameya tiya, wa gocega <strong>peyser</strong>i programê xo de bıtıkne.",
        "anontalkpagetext": "----''Na per, perêk kı karbero hesab a nêkerdeyan o, ya zi karbero hesab akerdeyan o labele pê hesabê xo nêkewto de. No sebeb ra ma IP adres xebetneno û ney IP adresan herkes nêşeno bıvino. Eke şıma qayil niye ina bo xorê [[Special:CreateAccount|yew hesab bıvıraze]] veya xut [[Special:UserLogin|hesab akere]].''",
-       "noarticletext": "Ena pele de hewna theba çıniyo.\nTı şenê zerreyê pelanê binan de [[Special:Search/{{PAGENAME}}|qandê  sernameyê ena pele cı geyre]],\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} qeydan miyan de cı geyre],\nya zi [{{fullurl:{{FULLPAGENAME}}|action=edit}} ena pele vıraze]</span>.{{MediaWiki mesaca pera newi}}",
+       "noarticletext": "Ena perrer de hewna theba çıni yo.\nTı şenê zerreyê pelanê binan de [[Special:Search/{{PAGENAME}}|qandê  sernameyê ena pele cı geyre]],\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} qeydan miyan de cı geyre],\nya zi [{{fullurl:{{FULLPAGENAME}}|action=edit}} ena pele vıraze]</span>.{{MediaWiki mesaca pera newi}}",
        "noarticletext-nopermission": "Ena pele de hewna theba çıniyo.\nTı şenay zerreyê pelanê binan de [[Special:Search/{{PAGENAME}}|seba sernameyê na pele cı geyre]], ya zi <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} qeydan miyan de cı geyre]</span>, ema destur çıniyo ke na pele vırazê.",
        "missing-revision": "Rewizyonê name dê pela da #$1 \"{{FULLPAGENAME}}\" dı çıniyo.\n\nNo normal de tarix dê pelanê besterneyan dı ena xırabin asena.\nDetayê besternayışi [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} tiya dı] aseno.",
        "userpage-userdoesnotexist": "Hesabê karberi \"<nowiki>$1</nowiki>\" qeyd nêbiyo.\nKerem ke, tı ke wazenay na pele bafernê/bıvurnê, qontrol ke.",
        "last": "peyên",
        "page_first": "verên",
        "page_last": "peyên",
-       "histlegend": "Ferqê weçinıtışi: Qutiya versiyonan seba têversanayış işaret ke û dest be ''enter''i ya zi gocega cêrêne ro ne.<br />\nCedwel: <strong>({{int:ferq}})</strong> = ferqê verziyonê peyêni, <strong>({{int:peyên}})</strong> = ferqê versiyonê verêni, <strong>{{int:q}}</strong> = vurnayışo werdi.",
+       "histlegend": "Ferqê weçinayışi: Qutiya versiyonan seba têversanayış işaret ke u dest be ''enter''i ya zi gocega cêrêne ro ne.<br />\nCetwel: <strong>({{int:ferq}})</strong> = ferqê verziyonê peyêni, <strong>({{int:peyên}})</strong> = ferqê versiyonê verêni, <strong>{{int:q}}</strong> = vurnayışo werdi yo.",
        "history-fieldset-title": "Çımberz verori",
        "history-show-deleted": "Tenya esterıtey",
        "histfirst": "Verênêr",
        "viewprevnext": "($1 {{int:pipe-separator}} $2) ($3) bıvênên",
        "searchmenu-exists": "''Ena 'Wikipediya de ser \"[[:$1]]\" yew pel esto'''",
        "searchmenu-new": "<strong>Na wiki de pela \"[[:$1]]\" vıraze!</strong> {{PLURAL:$2|0=|Sewbina pela ke şıma geyrayê cı aye bıvênê.|Yew zi neticanê cıgeyrayışê xo bıvênê.}}",
-       "searchprofile-articles": "Pelê zerreki",
-       "searchprofile-images": "Multimedya",
-       "searchprofile-everything": "Heme çi",
-       "searchprofile-advanced": "Raverşiyaye",
+       "searchprofile-articles": "Perrê muhteway",
+       "searchprofile-images": "Zafınmedya",
+       "searchprofile-everything": "Pêro çi",
+       "searchprofile-advanced": "Herayen",
        "searchprofile-articles-tooltip": "$1 de cı geyre",
        "searchprofile-images-tooltip": "Dosya cı geyre",
        "searchprofile-everything-tooltip": "Tedeesteyan hemine cı geyre (pelanê mınaqeşeyi zi tey)",
        "searchprofile-advanced-tooltip": "Cayê nameyanê xısusiyan de cı geyre",
        "search-result-size": "$1 ({{PLURAL:$2|1 çeku|$2 çekuy}})",
        "search-result-category-size": "{{PLURAL:$1|1 eza|$1 ezayan}} ({{PLURAL:$2|1 kategoriyê bini|$2 kategirayanê binan}}, {{PLURAL:$3|1 dosya|$3 dosyayan}})",
-       "search-redirect": "($1 ra ardış)",
+       "search-redirect": "($1 ra kırışiyè)",
        "search-section": "(qısmê $1)",
        "search-category": "(kategori $1)",
        "search-file-match": "(zerreyê dosya yewbini gêno)",
        "search-suggest": "To va: $1",
-       "search-rewritten": "Neticey $ ra asenê.  Herunda ney wa neticey $2 ra bıasê?",
+       "search-rewritten": "Neticey $ ra asenê.  Herunda ney wa neticanë $2'i bıvin",
        "search-interwiki-caption": "Proceyê bıray",
        "search-interwiki-default": "$1 ra neticey:",
        "search-interwiki-more": "(véşi)",
        "grant-basic": "Heqê basiti",
        "grant-viewdeleted": "Besteryaya peran u dosyaya bıasne",
        "grant-viewmywatchlist": "Lista serykerdışê xo bıvêne",
-       "newuserlogpage": "Cıkewtışê hesabvıraştışi",
-       "newuserlogpagetext": "Ena log de viraştişê karberî esta.",
+       "newuserlogpage": "Roceka karberanê newa",
+       "newuserlogpagetext": "No yew qeydê afernayışanê karberio.",
        "rightslog": "Qeydê heqanê karberi",
        "rightslogtext": "Ena listeyê loganê ke heqqa karbaranî mucneno.",
        "action-read": "ena pela wanayış",
        "recentchanges-noresult": "Goreyê kriteranê kıfşkerdeyan ra qet yew vurnayış nêvêniya.",
        "recentchanges-feed-description": "Ena feed dı vurnayişanê tewr peniyan teqip bık.",
        "recentchanges-label-newpage": "Enê vurnayışi ra yu pera newi vıraziya ya",
-       "recentchanges-label-minor": "Vurriyayışo werdiyo",
+       "recentchanges-label-minor": "No yew vurnayışo werdiyo",
        "recentchanges-label-bot": "Eno vurnayış terefê yew boti ra vıraziyo",
        "recentchanges-label-unpatrolled": "Eno vurnayış hewna dewriya nêbiyo",
        "recentchanges-label-plusminus": "Ebadê pele de bazê bayti de vayeyê cı",
        "recentchanges-submit": "Bımocne",
        "rcnotefrom": "Cêr de <strong>$2</strong> ra nata {{PLURAL:$5|vurnayışiyê}} asenê (tewr vêşi <strong>$1</strong> asenê) <strong>$3, $4</strong>",
        "rclistfrom": "$3 $2 ra tepiya vurnayışanê neweyan bımocne",
-       "rcshowhideminor": "vurriyayışê werdi $1",
-       "rcshowhideminor-show": "Bımusn",
+       "rcshowhideminor": "Vurriyayışê werdiy $1",
+       "rcshowhideminor-show": "Bımocne",
        "rcshowhideminor-hide": "Bınımne",
        "rcshowhidebots": "botan $1",
        "rcshowhidebots-show": "Bımocne",
        "rcshowhidebots-hide": "Bınımne",
        "rcshowhideliu": "karberê qeydbiyayeyi $1",
-       "rcshowhideliu-show": "Bımusn",
+       "rcshowhideliu-show": "Bımocne",
        "rcshowhideliu-hide": "Bınımne",
        "rcshowhideanons": "karberê bênameyi $1",
        "rcshowhideanons-show": "Bımocne",
        "boteditletter": "b",
        "unpatrolledletter": "!",
        "number_of_watching_users_pageview": "[$1 ho seyr keno {{PLURAL:$1|karber|karberî}}]",
-       "rc_categories": "Pelê ke kategoriyan ra (be „|“ ciya biyê):",
+       "rc_categories": "Kategoriyan rêz kı ( \"|“ ya ciya yo):",
        "rc_categories_any": "Weçinayiyan ra her yew",
        "rc-change-size": "$1",
        "rc-change-size-new": "Vurnayışa dıma $1 {{PLURAL:$1|bayt|bayt}}",
        "randomredirect": "Serçarnayışo rastameye",
        "randomredirect-nopages": "Cayê nameyê \"$1\" de serşıkıtışi çıniyê.",
        "statistics": "İstatistiki",
-       "statistics-header-pages": "İstatistikê pele",
+       "statistics-header-pages": "İstatıstıkê perrer",
        "statistics-header-edits": "İstatistikê vurnayışan",
        "statistics-header-users": "İstatistikê karberi",
        "statistics-header-hooks": "Yewbina istatistiki",
-       "statistics-articles": "Pelê zerreki",
+       "statistics-articles": "Meqaley",
        "statistics-pages": "Peli",
        "statistics-pages-desc": "Wiki de peley pêro, kategoriy, hetenayışi wesaire...",
        "statistics-files": "Dosyayê bar biye",
        "speciallogtitlelabel": "Meqsed (sername ya zi {{ns:user}}:karberi rê nameyê karberi):",
        "log": "Qeydi",
        "logeventslist-submit": "Bımocne",
-       "all-logs-page": "Umumi qeydi pêro",
+       "all-logs-page": "Qeydê umumi pêro",
        "alllogstext": "qey {{SITENAME}}i mocnayişê heme rocaneyani.\ntipa rocaneyi, nameyê karberi (herfa pil u qıci re hessas a), ya zi peli (reyna hessasiyê herfa pil u qıciyi) bıweçine u esayiş qıc kerê.",
        "logempty": "Qeydan dı malumato unasin çıni yo.",
-       "log-title-wildcard": "sername yê ke pê ney nuşteyi destkenêpê bıgêr.",
+       "log-title-wildcard": "Sernameyê ke be nê nuşteyi ra destkenê pê, cıgeyre",
        "showhideselectedlogentries": "Qeydê weçinayışê bımocne/bınımne dekerê",
        "log-edit-tags": "Etiketanê weçinayê qeydan bıvurnê",
        "checkbox-select": "Weçinaye: $1",
        "emailsubject": "Mewzu:",
        "emailmessage": "Mesac:",
        "emailsend": "Bırışe",
-       "emailccme": "kopyayekê mesaji mı re bıerşaw",
+       "emailccme": "Ju kopya ya mesaci bırş mı rê?",
        "emailccsubject": "$2 kopyaya mesaj a ke şıma erşawıto/a $1:",
        "emailsent": "E-poste rışna",
        "emailsenttext": "e-mailê şıma erşawiya/ruşiya",
        "usermessage-summary": "Mesacê sistemi caverde.",
        "usermessage-editor": "Xeberdarê sistemi",
        "usermessage-template": "MediaWiki:UserMessage",
-       "watchlist": "Lista seyrkerdışi",
-       "mywatchlist": "Lista seyrkerdışi",
+       "watchlist": "Listey pawıteyan",
+       "mywatchlist": "Listey pawıteyan",
        "watchlistfor2": "Qandê $1 ($2)",
        "nowatchlist": "listeya temaşa kerdıişê şıma de yew madde zi çina.",
        "watchlistanontext": "qey vurnayişê maddeya listeya temaşakerdiş ronıştış akerê",
        "watchlist-hide": "Bınımne",
        "watchlist-submit": "Bımocne",
        "wlshowtime": "Periyoda zemani asenayışi:",
-       "wlshowhideminor": "vurriyayışê werdi",
+       "wlshowhideminor": "vurriyayışê werdiy",
        "wlshowhidebots": "boti",
        "wlshowhideliu": "karberê qeydıni",
        "wlshowhideanons": "karberê anonimi",
        "undeletepagetext": "{{PLURAL:$1|pelo|$1 pelo}} cerın hewn a şiyo labele hema zi arşiv de yo u tepiya geriyeno.\nArşiv daimi pak beno.",
        "undelete-fieldset-title": "revizyonan tepiya bar ker",
        "undeleteextrahelp": "Qey ardışê pel u verê pelani tuşê '''tepiya biya!'''yi bıtıknê. qey ciya ciya ardışê verê pelani zi qutiye tesdiqi nişane kerê u tuşê '''tepiya biya!'''yi bıtıknê '''''{{int:undeletebtn}}'''''.. qey hewn a kerdışê qutiya tesdiqan u qey sıfır kerdışê cayê sebebani zi tuşê '''agêr caverd/aça ker'''i bıtıknê '''''{{int:undeletebtn}}'''''..",
-       "undeleterevisions": "$1 {{PLURAL:$1|revizyon|revizyon}} arşiw bi",
+       "undeleterevisions": "$1 {{PLURAL:$1|revizyon|revizyon}} esteriya yë",
        "undeletehistory": "eke şıma pel tepiya biyari heme revizyonî zi tepiya yeni.\neke yew pel hewn a biyo u pê nameyê o peli newe ra yew pel bıvıraziyo, revizyonê o pelê verıni zerreyê no pel de aseno.",
        "undeleterevdel": "eke pelo serın de netice bıdo ya zi revizyoni qısmen hewn a bıbiy hewn a kerdışi tepiya nêgeriyeno.",
        "undeletehistorynoadmin": "na madde hewn a biya. sebebê hewna kerdışi u teferruatê karber ê ke maddeyi vıraştı cêr de diyayî. revizyonê hewn a biyayeyani têna serkari vineni",
        "undeletedrevisions": "pêro piya{{PLURAL:$1|1 qeyd|$1 qeyd}} tepiya anciya.",
        "undeletedrevisions-files": "{{PLURAL:$1|1 revizyon|$1 revizyon}} u {{PLURAL:$2|1 dosya|$2 dosya}} ameyê halê xo yê verıni",
        "undeletedfiles": "{{PLURAL:$1|1 dosya|$1 dosya}} tepiya anciyayi.",
-       "cannotundelete": "Besternayışo nêbeno:\n$1",
+       "cannotundelete": "Besternayışonhemembyana tayno nêbeno:\n$1",
        "undeletedpage": "'''$1 pel tepiya anciya'''\n\nqey karê tepiya ardışi u qey karê hewn a kerdışê verıni bıewnê [[Special:Log/delete|qeydê hewn a kerdışi]].",
        "undelete-header": "Peleyê ke veror de besterneyayê êna bıvinê: [[Special:Log/delete|qeydê esterneya]].",
        "undelete-search-title": "Bıgeyre pelanê eserıtiyan",
        "sp-contributions-newbies": "Tenya iştıraqanê karberanê neweyan bımocne",
        "sp-contributions-newbies-sub": "Qe hesebê newe",
        "sp-contributions-newbies-title": "Îştîrakê karberî ser hesabê neweyî",
-       "sp-contributions-blocklog": "qeydê kılitbiyayeyi",
-       "sp-contributions-deleted": "iştırakê karberi esterdi",
+       "sp-contributions-blocklog": "qeydê kılitkerdışi",
+       "sp-contributions-deleted": "iştırakê {{GENDER:$1|karberi}} esterdi",
        "sp-contributions-uploads": "Barkerdışi",
        "sp-contributions-logs": "qeydi",
        "sp-contributions-talk": "werênayış",
        "sp-contributions-search": "Dekerdena cı geyrê",
        "sp-contributions-username": "Adresa IPy ya zi nameyê karberi:",
        "sp-contributions-toponly": "Tenya rewizyonanê tewr peyniyan bimocne",
+       "sp-contributions-hideminor": "Vurriyayışanê werdiyan bınımne",
        "sp-contributions-submit": "Cı geyre",
        "whatlinkshere": "Linkê tedeestey",
        "whatlinkshere-title": "Per da \"$1\" rê perê ke gre danê",
        "contribslink": "iştıraki",
        "emaillink": "e-poste bırışe",
        "autoblocker": "Şıma otomatikmen kılit biy, çıke adresa şımaya ''IP''y terefê \"[[User:$1|$1]]\" gureniyena.\nSebebê kılitbiyayışê $1'i \"$2\"o",
-       "blocklogpage": "Qeydê astengi",
+       "blocklogpage": "Qeydê kılitkerdışi",
        "blocklog-showlog": "verniyê no/na karberi cıwa ver geriyayo/ya.",
        "blocklog-showsuppresslog": "verniyê no/na karberi cıwa ver geriyayo/ya.",
        "blocklogentry": "[[$1]] biyo bloqe, sebeb: $3, hetana $2 do bıramo.",
        "cant-move-user-page": "desturê şıma çino, şıma pelanê karberani bıkırışi (bê pelê cerıni).",
        "cant-move-to-user-page": "desturê şıma çino, şıma yew peli bıkırışi pelê yew karberi.",
        "newtitle": "Sernameyo newe:",
-       "move-watch": "Na pele seyr ke",
+       "move-watch": "Pela çıme u meqsedi seyr ke",
        "movepagebtn": "Pele bere",
        "pagemovedsub": "Berdışi kerd temam",
        "movepage-moved": "'''\"$1\" berd \"$2\"'''",
        "tooltip-pt-anonuserpage": "pelê karberê IPyi",
        "tooltip-pt-mytalk": "Pela {{GENDER:|toya}} werênayışi",
        "tooltip-pt-anontalk": "vurnayiş ê ke no Ipadresi ra biyo muneqeşa bıker",
-       "tooltip-pt-preferences": "Tercihê {{GENDER:|şıma}}",
+       "tooltip-pt-preferences": "Tercihê {{GENDER:|to}}",
        "tooltip-pt-watchlist": "Lista pelanê ke to gırewtê seyrkerdış",
        "tooltip-pt-mycontris": "Yew lista iştırakanê {{GENDER:|şıma}}",
        "tooltip-pt-login": "Mayê şıma ronıştış akerdışi rê dawet keme; labelê ronıştış mecburi niyo",
        "tooltip-p-logo": "Pela seri bıvêne",
        "tooltip-n-mainpage": "Şo pela seri",
        "tooltip-n-mainpage-description": "Şo pela seri",
-       "tooltip-n-portal": "Heqa proceyi de, çı şenay bıkerê, çı koti vêniyeno",
+       "tooltip-n-portal": "Heqa proceyi de, kes çı şeno bıkero, çı koti vêniyeno",
        "tooltip-n-currentevents": "Vurnayışanê peyênan de melumatê pey bıvêne",
        "tooltip-n-recentchanges": "Wiki de yew lista vurriyayışanê peyênan",
        "tooltip-n-randompage": "Pelê da raştameyiye bar ke",
        "tooltip-ca-nstab-category": "Pela kategoriye bıvêne",
        "tooltip-minoredit": "Nay vırnayışa werdi nışan bıkeré",
        "tooltip-save": "Vurnayışanê xo qeyd ke",
+       "tooltip-publish": "Vurnayışê xo vıla kı",
        "tooltip-preview": "Vurnayışané ğo çımra ravyarné. Verdé qeyd kerdışi eneri bıkarné!",
        "tooltip-diff": "Metni sero vurnayışan mocneno",
        "tooltip-compareselectedversions": "Ena per de ferqê rewziyonan de dı weçinaya bıvinê",
        "pageinfo-article-id": "Kamiya pele",
        "pageinfo-language": "Zıwanê zerreyê pele",
        "pageinfo-content-model": "Modela zerreka perer",
+       "pageinfo-content-model-change": "bıvurne",
        "pageinfo-robot-policy": "Weziyetê motor de cıgeyrayışi",
        "pageinfo-robot-index": "İndeksbiyayen",
        "pageinfo-robot-noindex": "İndeksnêbiyayen",
        "pageinfo-watchers": "Amariya pela serykeran",
+       "pageinfo-visiting-watchers": "Amora merdumanë vuriyayışanë peyënan weynayan",
        "pageinfo-few-watchers": "$1 ra tayê {{PLURAL:$1|seyrker|seyrkeri}}",
        "pageinfo-redirects-name": "Hetenayışê na perer",
        "pageinfo-redirects-value": "$1",
        "newimages-summary": "Ena pela xasi dosyayi ke peni de bar biyayeyi mocnane.",
        "newimages-legend": "Avrêc",
        "newimages-label": "Nameyê dosya ( ya zi parçe ey)",
+       "newimages-showbots": "Selaganë boti bıvin",
+       "newimages-hidepatrolled": "Selaganë dewriyeyan bıvinë",
        "noimages": "Çik çini yo.",
        "ilsubmit": "Cı geyre",
        "bydate": "goreyê zemani",
        "exif-compression-34712": "JPEG2000",
        "exif-copyrighted-true": "Heqê telifiye",
        "exif-copyrighted-false": "Telifiya waziyeta eyara",
+       "exif-photometricinterpretation-1": "Siya u sıpe (siya 0)",
        "exif-photometricinterpretation-2": "RGB",
        "exif-photometricinterpretation-6": "YCbCr",
        "exif-unknowndate": "Tarix nizanyano",
        "watchlistedit-clear-legend": "Lista serykerdışê pak kerê",
        "watchlistedit-clear-explain": "Listeya serykerdış da şıma dı sernamey pêro besteryay",
        "watchlistedit-clear-titles": "Sernamey:",
+       "watchlisttools-clear": "Lista serykerdışê xo pak kı",
        "watchlisttools-view": "Vurnayışanê elaqedaran bıvêne",
        "watchlisttools-edit": "Lista seyrkerdışi bıvêne û bıvurne",
        "watchlisttools-raw": "Lista seyrkerdışia xame bıvurne",
        "hebrew-calendar-m12-gen": "Elul",
        "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|mesac]])",
        "timezone-utc": "[[UTC]]",
+       "timezone-local": "Lokal",
        "duplicate-defaultsort": "'''Tembe:''' Hesıbyaye sırmey ratnayış de \"$2\" sırmey ratnayış de \"$1\"i nêhesıbneno.",
        "version": "Versiyon",
        "version-extensions": "Ekstensiyonî ke ronaye",
        "htmlform-chosen-placeholder": "Opsiyon weçine",
        "htmlform-cloner-create": "Tayêna cı ke",
        "htmlform-cloner-delete": "Wedare",
-       "sqlite-has-fts": "$1 tam-metn destegê cı geyrayışiya piya",
-       "sqlite-no-fts": "$1 tam-metn bê destegê cı geyrayışi",
        "logentry-delete-delete": "$1 pela $3 {{GENDER:$2|esterıte}}",
        "logentry-delete-restore": "$1 pela $3 {{GENDER:$2|peyser arde}}",
        "logentry-delete-event": "$1 $3: $4 de asayışê {{PLURAL:$5|cıkerdışi|cıkerdışan}} {{GENDER:$2|vurna}}",
        "special-characters-title-minus": "işaretê kemiye",
        "mw-widgets-dateinput-placeholder-day": "SSSS-AA-RR",
        "mw-widgets-dateinput-placeholder-month": "SSSS-AA",
-       "mw-widgets-titleinput-description-redirect": "berd be $1"
+       "mw-widgets-titleinput-description-redirect": "berd be $1",
+       "log-action-filter-newusers": "Babetê hesabvıraştışi:"
 }
index 7dd59f3..2a4bf50 100644 (file)
@@ -14,7 +14,7 @@
        "tog-hideminor": "अहिलका मामूली सम्पादनलाई लुकाउन्या",
        "tog-hidepatrolled": "गस्ती(patrolled)सम्पादनलाई लुकाउन्या",
        "tog-newpageshidepatrolled": "गस्ती गरिया पानानलाई नयाँ पाना  सूचीबठेई लुकाउन्या",
-       "tog-hidecategorization": "पà¥\83षà¥\8dठहरà¥\82à¤\95à¥\8b à¤¶à¥\8dरà¥\87णà¥\80à¤\95रण à¤¹à¤\9fाया",
+       "tog-hidecategorization": "पनà¥\8dनाà¤\85नà¥\8b à¤¶à¥\8dरà¥\87णà¥\80à¤\95रण à¤²à¥\81à¤\95ाऽ",
        "tog-extendwatchlist": "निगरानी सूचीलाई सबै परिवर्तन धेकुन्या गरी बढुन्या , ऐईलका बाहेक",
        "tog-usenewrc": "पानाका अहिलका  परिवर्तन र अवलोकन सूचीका आधारमी सामूहिक परिवर्तनहरू",
        "tog-numberheadings": "शीर्षकहरूलाई स्वत:अङ्कित गर",
@@ -35,7 +35,7 @@
        "tog-enotifminoredits": "पानाहरू र फाइलहरूमी सामान्य सम्पादन भयालै मुइलाई ई-मेल गरियोस्",
        "tog-enotifrevealaddr": "जानकारी इ-मेलहरूमी मेरो इ-मेल खुलाउन्या",
        "tog-shownumberswatching": "निगरानी गरिरहेका प्रयोगकर्ताहरूको संख्या धेखाउन्या",
-       "tog-oldsig": "अहिलको हस्ताक्षर:",
+       "tog-oldsig": "तमरà¥\8b à¤\85हिलà¤\95à¥\8b à¤¹à¤¸à¥\8dताà¤\95à¥\8dषर:",
        "tog-fancysig": "मेरा दस्तखतलाई विकि पाठको रुपमी लिने (स्वत लिङ्क बिना)",
        "tog-uselivepreview": "प्रत्यक्ष पैल्लीकोरुप प्रयोग गर",
        "tog-forceeditsummary": "खाली सम्पादन शीर्षक प्रविष्टि गरेपछा मलाई सोधन्या",
        "tog-watchlistreloadautomatically": "जज्ज्याँलै फिल्टर बदेलिन्छ इच्छासूची आफुइ रिलोड अर: (जावास्क्रिप्ट चायीन्छ)",
        "tog-watchlisthideanons": "अज्ञात प्रयोगकर्ताहरूबाट गरिएको सम्पादन ध्यान सूचीबठेई लुकाउन्या",
        "tog-watchlisthidepatrolled": "बोट सम्पादनहरू ध्यान सूचीबठेई लुकाउन्या",
-       "tog-watchlisthidecategorization": "पà¥\83षà¥\8dठहरà¥\82à¤\95à¥\8b à¤¶à¥\8dरà¥\87णà¥\80à¤\95रण à¤²à¥\81à¤\95à¥\8cनà¥\8dया",
+       "tog-watchlisthidecategorization": "पनà¥\8dनाà¤\85नà¥\8b à¤¶à¥\8dरà¥\87णà¥\80à¤\95रण à¤²à¥\81à¤\95ाऽ",
        "tog-ccmeonemails": "मुईले अन्य प्रयोगकर्ताहरूलाई पठाउन्या इ-मेलको प्रतिलिपि मुईलाई पठाउन्या",
        "tog-diffonly": "तलका पानाहरुको भिन्नहरू सामग्री नदेखाउन्या",
        "tog-showhiddencats": "लुकाइएका श्रेणीहरू धेखाउन्या",
        "tog-norollbackdiff": "पैलास्थितिमी फर्काएपछा भिन्नता हटाउन्या",
        "tog-useeditwarning": "सम्पादनहरू सङ्ग्रह नगरिएका अवस्थामी अर्को पानामी जान खोज्या चेतावनी धेखाउन्या",
-       "tog-prefershttps": "पà¥\8dरवà¥\87श à¤\97रà¥\8dदा जबलै सुरक्षित जडानको प्रयोग गर्न्या",
+       "tog-prefershttps": "पà¥\8dरवà¥\87श à¤\97रनà¥\8dà¤\9cà¥\8dया जबलै सुरक्षित जडानको प्रयोग गर्न्या",
        "underline-always": "सधैं",
        "underline-never": "कभैई नाई",
        "underline-default": "खोल अथवा ब्राउजर पैलीकाजसो",
        "qbpageoptions": "ये पानो",
        "qbmyoptions": "मेरो पानो",
        "faq": "भौत सोधिन्या प्रश्नहरू",
-       "faqpage": "Project:भà¥\8cत à¤¸à¥\8bधिà¤\8fà¤\95ा à¤ªà¥\8dरशà¥\8dनहरà¥\81",
+       "faqpage": "Project:भà¥\8cत à¤¸à¥\8bधियाà¤\95ा à¤ªà¥\8dरशà¥\8dनहरà¥\82",
        "actions": "कार्यहरू",
        "namespaces": "नेमस्पेस",
        "variants": "बहुरुपअन",
        "talk": "कुरणिकाआनी",
        "views": "अवलोकन गरऽ",
        "toolbox": "औजारअन",
+       "tool-link-userrights": "परिवर्तन{{GENDER:$1|प्रयोगकर्ता}}समूहहरू",
+       "tool-link-emailuser": "{{GENDER:$1|प्रयोगकर्ता}}लाई एइ इमेलमी पठाऽ",
        "userpage": "प्रयोगकर्ता पाना हेर्न्या",
        "projectpage": "प्रोजेक्ट पानो हेर्न्या",
        "imagepage": "चित्र पानो हेर",
        "databaseerror-query": "अनुरोध: $1",
        "databaseerror-function": "फङ्सन : $1",
        "databaseerror-error": "गल्ती: $1",
+       "transaction-duration-limit-exceeded": "To avoid creating high replication lag, this transaction was aborted because the write duration ($1) exceeded the $2 second limit.\nIf you are changing many items at once, try doing multiple smaller operations instead.",
        "laggedslavemode": "<strong>चेतावनी:</strong> पानामी हालका अद्यतनहरू नहुनस्कदान ।",
        "readonly": "डेटाबेस बन्द गरिया छ",
        "enterlockreason": "ताल्चा मार्नुको कारण दिया, साथै ताल्चा हटाउने समयको अवधि अनुमान लगा।",
        "title-invalid-interwiki": "अनुरोध गरियाको शिर्षकमी अन्तर विकि लिङ्क छ जइलाई शिर्षकमी प्रयोग गद्द नाइपाइनो ।",
        "title-invalid-talk-namespace": "निवेदन गरियाको पानाको शिर्षकले उपलब्ध नभएका कुरडी पानालाई सन्दर्भको रूपमी राख्याको छ ।",
        "title-invalid-characters": "निवेदन गरियाको यै पानाको शिर्षकमी अवैध अक्षर रयाको छः \"$1\" ।",
+       "title-invalid-relative": "शीर्षक एउटा सन्दर्भित मार्ग राख्दछ। सन्दर्भित पृष्ठको शीर्षक (./, ../)अमान्य छ, किनकि त्यो प्राय रूपले पहुँच बाहिर हुन्छ जब त्यसलाई प्रायोगकर्ताको ब्राउजरबाट प्रयोगमी ल्याउने प्रयास गर्ने गरिन्छ।",
        "title-invalid-magic-tilde": "अनुरोध अरिया: पन्ना: शीर्षकमी अमान्य म्याजिक टिल्ड शृङ्खला छ (<nowiki>~~~</nowiki>)।",
        "title-invalid-too-long": "अनुरोध अरिया: पन्ना: शीर्षक भौत लामु छ। यो UTF-8 इनकोडिङमी $1 {{PLURAL:$1|byte|bytes}} है लामु हुनु हुनैन।",
        "title-invalid-leading-colon": "निवेदन गरिया पृष्ठको शिर्षकको शुरूमी अवैध कोलोन रया छ ।",
        "viewsource": "स्रोत हेर",
        "viewsource-title": " $1 को स्रोत हेर",
        "actionthrottled": "कार्य रोकिईयो",
-       "actionthrottledtext": "स्पामको रोकथामको लागि , तमीलाई यो कार्य नापै समयमी मैथै पटक गद्दाबठे सिमित गरियाको छ, र तमीले आफ्नो सिमा पार गरिसक्याछौ ।\nकृपया केही मिनेट पछि पुन: प्रयास गर  ।",
+       "actionthrottledtext": "स्पाम रोकथाम खिलाइ, तमलाई येइ काम थोक्काइ बगतमी झिक्कै फेर अद्दा बठेइ सीमित अरीरैछ, रे तमले आफुनी सीमा पार अरिसकिराइछऽ।\nकृपया केइ मिनट पछा दोसर्‍याँ प्रयास अर्याऽ।",
        "protectedpagetext": "यो पृष्ठ सम्पादन हुनबठे बचाउन सम्पादनमी तथा अन्य कार्यमी रोक लगाइया छ।",
        "viewsourcetext": "तम ये पृष्ठको स्रोत हेद्दु सकुन्छौ और उईको नक्कल उताद्दु सकुन्छौ |",
        "viewyourtext": "यै पानामी रह्याका '''तमरा सम्पादनहरू''' हेद्द या प्रतिलिपी गद्द सक्द्या हौ :",
+       "protectedinterface": "यो पृष्ठले सफ्टवेयरको लागि अन्तरमोहडा पाठ प्रदान गर्दछ , र यसलाई दुरुपयोग हुनबाट बचाउन सुरक्षा प्रदान गरिएको छ।\nसम्पूर्ण विकिहरूका लागि अनुवादमी परिवर्तन गर्नको लागि [https://translatewiki.net/ translatewiki.net], प्रयोग गर्नुहोस् ,  मिडियाविकि स्थानियकरण परियोजना ।",
        "editinginterface": "<strong>चेतावनी:</strong> तमी यै पानालाई सम्पादन गद्द लाग्याछौ, जनले सफ्टवेयरको लागि \nइन्टरफेस सामग्रीहरू प्रदान गरन्छ।\nयै पानामी गरियाको परिवर्तनले यै विकिमी अरु प्रयोगकर्तानको इन्टरफेसको प्रदर्शनमी प्रभाव पडन्छ ।",
        "translateinterface": "सप्पै विकिइनखिलाइ अनुवाद थप्दाइ या बदेल्लाइ, कृपया [https://translatewiki.net/ translatewiki.net]को प्रयोग अर:, मिडियाविकि क्षेत्रीयकरण परियोजना:।",
+       "cascadeprotected": "यो पृष्ठ सम्पादन गर्नबाट सुरक्षित गरिएकोछ किनभनें {{PLURAL:$1|पृष्ठ |पृष्ठहरू}}मा सुरक्षित गर्नुका साथै प्रपात (\"cascading\") विकल्प खुल्ला राखिएको छ:\n$2",
        "namespaceprotected": "तमलाई '''$1'''  नेमस्पेसमी रह्याका पानाहरू सम्पादन गद्या अनुमति छैन ।",
        "customcssprotected": "तमलाई यो  पानो सम्पादन गद्दे अनुमति छैन, किनकी यैमी कुनै अर्को प्रयोगकर्ताको व्यक्तिगत अभिरुचीहरू संग्रहित छन् ।",
        "customjsprotected": "तमलाई यो जाभास्कृप्ट पानो सम्पादन गद्दे अनुमति छैन, किनकी यैमी कुनै अर्को प्रयोगकर्ताको व्यक्तिगत अभिरुचीहरू संग्रहित छन् ।",
        "createacct-yourpasswordagain-ph": "आँजि पासवर्ड भरऽ",
        "userlogin-remembermypassword": "मुलाई अघाडी झान्या काम गराइराख्या",
        "userlogin-signwithsecure": "सुक्षित जडान प्रयोग गद्द्या",
-       "cannotlogin-title": "à¤\85à¤\88ल à¤­à¤¿à¤¤à¤° à¤\9dान à¤¨à¤¾à¤\87à¤\81 à¤ªà¤¾à¤\88नो",
+       "cannotlogin-title": "भितर à¤\9dान à¤¨à¤¾à¤\87à¤\81सà¤\95ियो",
        "cannotlogin-text": "येइमी लगइन सम्भव नाइथिन।",
        "cannotloginnow-title": "अईल भितर झान नाइँ पाईनो",
        "cannotloginnow-text": "भितर जान असंभव छ जब प्रयोग $1|",
        "wrongpassword": "पासवर्ड गलत हालियो।\nकृपया आजी प्रयास गरया।",
        "wrongpasswordempty": "हालिएया पासवर्ड खालि थ्यो।\nकृपया आजी प्रयास गरया।",
        "password-name-match": "तमरो प्रवेशशव्द प्रयोगकर्ता नाम है फरक हुनपडन्छ ।",
-       "password-login-forbidden": "यà¥\87 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤¨à¤¾à¤® à¤° à¤ªà¥\8dरवà¥\87श à¤¶à¤µ्द वर्जित गरिया छ।",
+       "password-login-forbidden": "यà¥\87 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤¨à¤¾à¤® à¤° à¤ªà¥\8dरवà¥\87श à¤¶à¤¬्द वर्जित गरिया छ।",
        "mailmypassword": "पासवर्ड पूर्वनिर्धारित गर",
        "passwordremindertitle": "{{SITENAME}}का लागि नयाँ अस्थायी पासवर्ड",
        "passwordremindertext": "कसैले (सायद तमी, IP ठेगाना $1 बाट), {{SITENAME}}($4) को लागि नौलो पासवर्ड अनुरोध गर्या छ । प्रयोगकर्ता \"$2\" को लागि नौलो अस्थायी पासवर्ड \"$3\"तयार पारिया छ । यदि यो तमरो इच्छामी भयाको भया अहिले तमीले लगइन गरीबर नौलो पासवर्ड छान्नु पड्ड्या हुन्छ ।\nतमरो अस्थायी पासवर्ड  {{PLURAL:$5|एक दिन|$5 दिनहरू पछि}} अमान्य हुन्याछ ।\n\nयदि कोही अरुले नै अनुरोध गर्याको हो भण्या , या तमीले आफ्नो पासवर्ड सम्झ्यौ भण्या, अथवा\nत्यैलाई परिवर्तन गर्न चाहन्नौ भण्या, तमीले यो सन्देसको वेवास्ता गद्दसक्द्याहौ र पुरानै पासवर्ड प्रयोग गरिरहन सक्द्याहौ ।",
        "changepassword-success": "तमरो पासवर्ड सफलतापूर्वक परिवर्तन भयो!",
        "changepassword-throttled": "तमले अलै भौत फेर प्रवेशका निम्ति प्रयास गरया छौ।\nकृपया $1 थोक्कै जागी मात्र प्रयास गर।",
        "botpasswords": "बोट पासवर्ड",
+       "botpasswords-createnew": "नौलो बोट पासवर्ड बनाऽ",
+       "botpasswords-editexisting": "भयाऽ बोट पासवर्ड सम्पादन अरऽ",
        "botpasswords-label-appid": "बोट नाम:",
        "botpasswords-label-create": "सृजना गर",
        "botpasswords-label-update": "नयाँ बनाउनु",
        "botpasswords-label-resetpassword": "पासवर्ड पूर्वनिर्धारित गर",
        "botpasswords-label-grants": "अनुदान आवेदन:",
        "botpasswords-label-grants-column": "प्रदान भयो",
+       "botpasswords-bad-appid": "बोट नाउँ \"$1\" नाइमाणीनो।",
+       "botpasswords-insert-failed": "बोट नाउँ \"$1\" थप्दाइ असफल। कि यो पैली थपीसकीरैछ?",
+       "botpasswords-update-failed": "बोट नाउँ \"$1\" अपडेट अद्दाइ असफल। कि यो मेट्याऽ हो?",
        "botpasswords-created-title": "बोट को पासवर्ड बन्यो",
+       "botpasswords-created-body": "प्रयोगकर्ता \"$2\" को बोट नाउँ \"$1\" खिलाइ बोट पासवर्ड बनायियो।",
        "botpasswords-updated-title": "बोट को पासवर्ड अपडेट भयो",
        "botpasswords-deleted-title": "बोट को पासवर्ड मेटियो",
        "resetpass_forbidden": "पासवर्ड परिवर्तन गर्न नाइँमिल्लो",
        "continue-editing": "सम्पादन क्षेत्रमी जाओ",
        "editing": "$1 सम्पादन अरीन्नाछ़",
        "creating": "$1 बनाइँदै",
-       "editingsection": "$1 (à¤\96णà¥\8dड) à¤¸à¤®à¥\8dपादन à¤\97रिदà¥\88",
+       "editingsection": "$1 (à¤\96णà¥\8dड) à¤¸à¤®à¥\8dपादन à¤\85रà¥\80नà¥\8dनाà¤\9b़",
        "editingcomment": "$1 सम्पादन गर्दै(नयाँ खण्ड)",
        "editconflict": "सम्पादन बाँझ्यो: $1",
        "yourtext": "तमरा पाठहरू",
        "sectioneditnotsupported-text": "ये पृष्ठमी खण्ड सम्पादन असमर्थित",
        "permissionserrors": "अधिकारमी त्रुटी",
        "permissionserrorstext": "तइ काम अद्दाइ तम सित अधिकार आथिन, यिन {{PLURAL:$1|कारण|कारणअन}}ले अद्दा:",
-       "permissionserrorstext-withaction": "$2 कि लेखा तमलाईँ अनुमति नाइथिन , यिन {{PLURAL:$1|कारणले|कारणहरुले}} गद्दा :",
+       "permissionserrorstext-withaction": "$2 कि लेखा तमलाई अनुमति नाइथिन , यिन {{PLURAL:$1|कारणले|कारणहरू}}ले गद्दा :",
        "moveddeleted-notice": "पानो मेटियाको छ।\nमेटियाका और सारियाका पानाहरूको सूची तल्तिर सन्दर्भखी लेखा दियाको छ।",
        "log-fulllog": "पूरा लग हेर",
        "edit-hook-aborted": "हुकले सम्पादन बन्द गरिदियो ।\nयेले कोइ कारण दिएन ।",
        "prefs-editor": "सम्पादक",
        "prefs-preview": "पूर्वावलोकन",
        "prefs-advancedrc": "उन्नत विकल्पहरू",
-       "prefs-advancedrendering": "à¤\89नà¥\8dनत à¤µà¤¿à¤\95लà¥\8dपहरà¥\81",
+       "prefs-advancedrendering": "à¤\89नà¥\8dनत à¤µà¤¿à¤\95लà¥\8dपहरà¥\82",
        "prefs-advancedsearchoptions": "उन्नत विकल्पहरू",
        "prefs-advancedwatchlist": "उन्नत विकल्पहरू",
        "prefs-displayrc": "धेकिन्या विकल्पहरू",
        "grouppage-user": "{{ns:project}}:प्रयोगकर्ताहरू",
        "grouppage-autoconfirmed": "{{ns:project}}:स्वतःपुष्टि भयाऽ प्रयोगकर्ताअन",
        "grouppage-bot": "{{ns:project}}:बोटअन",
-       "grouppage-sysop": "{{ns:project}}:पà¥\8dरबनà¥\8dधà¤\95हरà¥\82",
+       "grouppage-sysop": "{{ns:project}}:वà¥\8dयवसà¥\8dथापà¤\95à¤\85न",
        "grouppage-bureaucrat": "{{ns:project}}:प्रशासकअन",
        "grouppage-suppress": "{{ns:project}}:लुकौन्या",
        "right-read": "पृष्ठहरू पढ",
        "protect-default": "सब्बै प्रयोगकर्तानहरूलाई अनुमति दिन्या",
        "protect-level-autoconfirmed": "नौला तथा दर्ता भयाका प्रयोगकर्तानलाई मात्र अनुमति दिन्या",
        "protect-cascade": "यै पानामी संलग्न सुरक्षित पानाहरू (लामबद्द सुरक्षा)",
+       "protect-expiry-options": "२ घण्टाहरू:2 hours,१ दिन :1 day,३ दिनहरू:3 days,१ हप्ता:1 week,२ हप्ताहरू:2 weeks,१ महिना:1 month,३ महिनाहरू:3 months,६ महिनाहरू:6 months,१ वर्ष:1 year,अनगिन्ती:infinite",
+       "restriction-type": "अनुमति:",
        "pagesize": "(अक्षरहरू)",
        "undeletepage": "मेट्याका पानाहरू हेद्या र पूर्वरुपमी फर्काउन्या",
        "undeleterevisions": "$1 {{PLURAL:$1|संशोधन|संशोधनहरू}} संग्रहित",
        "whatlinkshere-links": "← लिंकहरू",
        "whatlinkshere-hideredirs": "$1 पुन:निर्देशित हुन्छ",
        "whatlinkshere-hidetrans": "$1 सम्मील",
-       "whatlinkshere-hidelinks": "$1 लिङ्क",
+       "whatlinkshere-hidelinks": "$1 लिङ्कहरू",
        "whatlinkshere-hideimages": "$1 फाइलआ लिङ्कअन",
        "whatlinkshere-filters": "छानियाका",
        "ipbreason-dropdown": "* ब्लक गर्नुका समान्य कारणहरू\n** झूटो सूचना दियाको\n** पानानबठे सामाग्रीहरू हटायाको\n** बाहिरी जालक्षेत्र (sites)सित नचाहिंदो लिङ्क गर्याको \n** पानानमी बकवास/गाली-गलौच हाल्याको\n** भै धेकाउने व्यवहार/उत्पीडन (सताउने कार्य) गर्याको\n** धेरै गलत खाताहरू बनायाको\n** प्रयोगकर्ता नाम अस्वीकार्य",
        "import-logentry-upload-detail": "$1 {{PLURAL:$1|संशोधन|संशोधनहरू}} आयात भयो",
        "tooltip-pt-userpage": "{{GENDER:|तमरो प्रयोगकर्ता}} पान्नो",
        "tooltip-pt-anonuserpage": "तमी जो IP ठेगानाको रुपमी सम्पादन गद्दै छौ , त्यैको प्रयोगकर्ता पानो निम्न छ :",
-       "tooltip-pt-mytalk": "{{GENDER:|तमरà¥\8b}} à¤\95à¥\81रडà¥\80à¤\95ानà¥\80 à¤ªà¤¾नो",
+       "tooltip-pt-mytalk": "{{GENDER:|तमरà¥\8b}} à¤\95à¥\81रणिà¤\95ाà¤\86नà¥\80 à¤ªà¤¾à¤¨à¥\8dनो",
        "tooltip-pt-preferences": "{{GENDER:|तमरी}} अभिरुचि",
        "tooltip-pt-watchlist": "पृष्ठहरूको सूची जैका फेरबदलहरुलाई तमले पहरा गरिराखेका छौ ।",
        "tooltip-pt-mycontris": "{{GENDER:|तमरा}} योगदानअनऐ सूची",
        "newimages-summary": "यै खास पानाले अन्तिम अपलोड गर्याका फाइलहरू धेकाउँन्छ ।",
        "days": "{{PLURAL:$1|$1 दिन|$1 दिनहरू}}",
        "metadata": "मेटाडेटा",
-       "metadata-help": "यà¥\88 à¤«à¤¾à¤\87लमि à¤\85तिरिà¤\95à¥\8dत à¤\9cानà¤\95ारà¥\80हरà¥\81 à¤\9bनà¥\8d, à¤¯à¥\88लाà¤\88 à¤¬à¤¨à¤¾à¤\89न à¤¸à¤®à¥\8dभवतà¤\83 à¤¡à¤¿à¤\9cिà¤\9fल à¤\95à¥\8dयामà¥\87रा और स्क्यानर प्रयोग गरियाको हुनसकन्छ । यदि यै फाइललाई खास अवस्थाबठे फेरबदल गरियाको हो भण्या यै फाइलले  सब्बै विवरण प्रतिबिम्बित गद्द सक्यानाइथी ।",
+       "metadata-help": "यà¥\88 à¤«à¤¾à¤\87लमि à¤\85तिरिà¤\95à¥\8dत à¤\9cानà¤\95ारà¥\80हरà¥\82 à¤\9bनà¥\8d, à¤¯à¥\88लाà¤\88 à¤¬à¤£à¥\81à¤\89न à¤¸à¤®à¥\8dभवतà¤\83 à¤¡à¤¿à¤\9cिà¤\9fल à¤\95à¥\8dयामरा और स्क्यानर प्रयोग गरियाको हुनसकन्छ । यदि यै फाइललाई खास अवस्थाबठे फेरबदल गरियाको हो भण्या यै फाइलले  सब्बै विवरण प्रतिबिम्बित गद्द सक्यानाइथी ।",
        "metadata-fields": "Image metadata fields listed in this message will be included on image page display when the metadata table is collapsed.\nOthers will be hidden by default.\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
        "exif-orientation": "अभिविन्यास",
        "exif-xresolution": "क्षैतिज संकल्प(resolution)",
index 8eacae0..1d12d07 100644 (file)
@@ -33,7 +33,7 @@
        "tog-enotifminoredits": "Mândom un avîş ânca p'r al mudéfichi céchi ed pàgini e file",
        "tog-enotifrevealaddr": "Fà vèder al mé indirés ed la pôsta eletrônica int i mesâg 'd avîş",
        "tog-shownumberswatching": "Fà vèder al nómer ed j utèint che gh'àn la pàgina sòta uservasiòun",
-       "tog-oldsig": "La fîrma 'd adèsa",
+       "tog-oldsig": "La tó fîrma 'd adèsa",
        "tog-fancysig": "Trâta la fîrma cme wikitèst (sèinsa colegamèint avtomâtich)",
        "tog-uselivepreview": "Permèt la funsiòun \"Live preview\" (guêrda préma 'd salvêr in dirèta)",
        "tog-forceeditsummary": "Dmânda s'l'è vèira che al câmp argumèint l' é vōd",
@@ -48,7 +48,7 @@
        "tog-showhiddencats": "Fà vèder al categoréi lughêdi",
        "tog-norollbackdiff": "An fêr mia vèder al cunfrûnt tr' al versiòun dôp avèir fât un \"rollback\"",
        "tog-useeditwarning": "Avîşom quând a vâgh fōra da 'na pàgina d' mudéfica e an n'ò mìa salvê al mudéfichi fâti",
-       "tog-prefershttps": "Drōva sèimper un colegamèint sicûr quând ét fê l'ingrès",
+       "tog-prefershttps": "Drōva sèimper un colegamèint sicûr mèinter té coleghê.",
        "underline-always": "Sèimper",
        "underline-never": "Mài",
        "underline-default": "Mantî al j impustasiòun dal navigadōr o 'd la skin",
        "category-file-count-limited": "In cla categoréia ché a gh'é {{PLURAL:$1|al file nutê|i $1 file nutê}} ché 'd sègvit.",
        "listingcontinuesabbrev": "cunt.",
        "index-category": "Pàgini gancêdi",
-       "noindex-category": "Pàgini mìa gancêdi",
+       "noindex-category": "Pàgini mìa coleghêdi.",
        "broken-file-category": "Pàgini cun dèinter di file ch' an gh'în mìa.",
        "about": "Infumasiòun",
        "article": "Còl che gh'é int la pàgina",
        "newwindow": "(a s'arvés 'na fnèstra nōva)",
        "cancel": "Scanşèla",
        "moredotdotdot": "Êter...",
-       "morenotlisted": "Cl'elèinch ché an n'é mìa finî.",
+       "morenotlisted": "Cl'elèinch ché 'l pré èser mìa finî.",
        "mypage": "Pàgina",
        "mytalk": "Al mē discusiòun",
        "anontalk": "Discusiòun",
        "eauthentsent": "Un mesâg ed cunfèirma l'é stê spidî a l'indirés ed pôsta eletrônica sgnê ché. L'utèint per prèir inviêr di mesâg ed pôsta eletrônica al dēv andêr a drē al j istrusiòun scréti, in môd da cunfermêr ch' l'é ló al legétim proprietâri 'd l'indirés.",
        "throttled-mailpassword": "Un mesâg ed pôsta eletrônica 'd arnōv ed la cêva 'd ingrès l'é bèle stê inviê da mēno 'd {{PLURAL:$1|1 ōra|$1 ōri}}. Per pervèder abûş, la funziòun 'd arnōv ed la cêva 'd ingrès la pōl èser druvêda sōl 'na vôlta ògni {{PLURAL:$1|1 ōra|$1 ōri}}.",
        "mailerror": "Erōr int la spedisiòun dal mesâg $1",
-       "acct_creation_throttle_hit": "{{PLURAL:$1|1 registrasiòun l'é bèle stêda fâta |$1 registrasiòun în bèle stêdi fâti}} da quelchidûn cun al tó 'stès indirés IP int l'ûltem dé: l'é al mâsim permés in cól peréiod ed tèimp ché. Per còst j utèint che drōven cl 'indirés IP ché, p'r al mumèint,  an 's pōl mìa registrêr.",
+       "acct_creation_throttle_hit": "{{PLURAL:$1|1 registrasiòun l'é bèle stêda fâta |$1 registrasiòun în bèle stêdi fâti}} da quelchidûn cun al tó 'stès indirés IP int l'ûltem $2, ch'l'é al mâsim permés in cól peréiod ed tèimp ché. Per còst j utèint che drōven cl 'indirés IP ché, p'r al mumèint,  an 's pōl mìa registrêr.",
        "emailauthenticated": "L'indirés ed pôsta eletrônica l'é stê cunfermê al $2 al $3.",
        "emailnotauthenticated": "L'indirés ed pôsta eletrônica an n'é mìa incòra stê cunfermê.\nA gnirâ mìa spidî mesâg ed pôsta eletrônica p'r al funsiòun in elèinch ché sòta.",
        "noemailprefs": "Scréver un indirés ed pôsta eletrônica per fêr funsionêr st' al funsiòun.",
        "copyrightwarning": "Per piaşèir tîn cûnt che tót al colaborasiòun a {{SITENAME}} a vînen cunsidrêdi publichêdi sòta la licèinsa $2 (per i particulêr guêrda $1). S' an 't vō mìa che i tō tèst a pôsen èser cambiê e turnê a publichêr da tót sèinsa lémit, an publichêri mìa ché.<br /> In pió, se 't  i póblich ché, a 't dichiâr, sòta la tó responsabilitê, che còl ch' è stê scrét a 't l'ê scrét té personalmèint opór l'é ste cupiê da documèint sèinsa ch' al sìa quacê da nisûn dirét 'd autōr. <strong> Ché insém an pubblichêr mìa materiêl quacê da dirét 'd autōr sèinsa autorişâsiòun! </strong>",
        "copyrightwarning2": "Per piaşèir tîn cûnt che tót al colaborasiòun a {{SITENAME}} a pōlen èser mudifichê, arversê o scanşlê da êtra gînta cla dà 'na mân. S' an 't vō mìa che i tō tèst a pôsen èser cambiê alōra an publichêri mìa ché.<br />In pió, se 't  i póblich ché, a 't dichiâr, sòta la tó responsabilitê, che còl ch' è stê scrét a 't l'ê scrét té personalmèint opór l'é ste cupiê da documèint sèinsa ch' al sìa quacê da nisûn dirét 'd autōr (per i particulêr guêrda $1). <strong> Ché insém an pubblichêr mìa materiêl quacê da dirét 'd autōr sèinsa autorişâsiòun! </strong>",
        "longpageerror": "<strong> Erōr: al tèst spidî l'é lòngh {{PLURAL:$1|1|$1}} kilobyte, ch'l'é pió grôs ed l'amzûra mâsima permésa ({{PLURAL:$2|1|$2}} kilobyte). </strong> Al tèst al pôl mìa èser salvê.",
-       "readonlywarning": "<strong>Atensiòun: al databêş l'é stê bluchê per justadûri e dòunca l'é impusébil salvê al mudéfichi in cól mumèint ché.</strong> P'r an pêrdi mìa, l'é pusébil cupiêri còl ch' é stê més dèinter fîn a dès int la caşèla di cambiamèint, incolêrel in un prugrâma tèst e salvêrel per spetêr al şblôch dal databêş. \n\nL'aministradōr ch' l'à bluchê al databêş l'à dê cla spiegasiòun ché: $1",
+       "readonlywarning": "<strong>Atensiòun</strong>: al databêş l'é l'é bluchê per justadûri e per adès l'é impusébil salvê al mudéfichi fâti. P'r an pêrdi mìa,  côpi in un file tèst e sêlvel mèinter té spèt al şblôch dal databêş. \n\nL'aministradōr ch' l'à bluchê al databêş l'à dê cla spiegasiòun ché: $1",
        "protectedpagewarning": "<strong> Atensiòun: cla pàgina ché l'é stêda bluchêda in môd che sōl j utèint cun i privilèg 'd aministradōr a pôsen cambiêrla.</strong> \nPer infurmasiòun ché 'd sègvit a vîn scrét l'ûltem elemèint dal regéster:",
        "semiprotectedpagewarning": "<strong>Nôta:</strong> cla pàgina ché l'é stêda bluchê in môd che sōl j utèint registrê a pôsen cambiêrla. \nPer infurmasiòun ché 'd sègvit è scrét l'ûltem elemèint dal regéster.",
        "cascadeprotectedwarning": "<strong> Atensiòun: </strong>cla pàgina ché l'é stêda bluchêda in môd che sōl j utèint cun i privilèg 'd aministradō a pôsen cambiêrla. Còst a sucēd perchè la pàgina l'é dèinter in cl'elèinch sòta protesiòun ché 'd sègvit {{PLURAL:$1|pàgina|pàgini}}",
        "revdelete-unsuppress": "Tó via i lémit al revisiòun armési",
        "revdelete-log": "Mutîv:",
        "revdelete-submit": "Drōva {{PLURAL:$1|int la revisiòun sernîda|int al revisiòun sernîdi}}",
-       "revdelete-success": "Vésta ed la revisòun arnuvêda int al môd gióst.",
+       "revdelete-success": "Vésta ed la revisòun arnuvêda.",
        "revdelete-failure": "La vésta 'd la versiòun l'an pōl mìa èser arnuvêda:\n$1",
-       "logdelete-success": "Vésta dal fât impustêda int al môd gióst.",
+       "logdelete-success": "Vésta impustêda dal fât .",
        "logdelete-failure": "La vésta dal fât l'an pōl mìa èser impustêda:\n$1",
        "revdel-restore": "Câmbia la vidûda.",
        "pagehist": "Stòria 'd la pàgina",
        "searchprofile-advanced-tooltip": "Sērca int i spâsi di nòm fât só mzûra.",
        "search-result-size": "$1 ({{PLURAL:$2|'na parôla|$2 parôli}})",
        "search-result-category-size": "{{PLURAL:$1|1 utèint|$1 utèint}} ({{PLURAL:$2|1 sotcategoréia|$2 sotcategoréi}},{{PLURAL:$3|1 file|$3 files}})",
-       "search-redirect": "(redirect $1)",
+       "search-redirect": "(redirect from $1)",
        "search-section": "(sesiòun $1)",
        "search-category": "(categoréia $1)",
        "search-file-match": "(relasiòun dèinter al file)",
        "prefs-watchlist-token": "Token tgnî d'ôc specêl:",
        "prefs-misc": "Divêrs",
        "prefs-resetpass": "Câmbia la cêva 'd ingrès",
-       "prefs-changeemail": "Câmbia l'indirés ed la pôsta eletrônica",
+       "prefs-changeemail": "Câmbia o scanşèla l'indirés ed la pôsta eletrônica",
        "prefs-setemail": "Impôsta un indirés ed pôsta eletrônica",
        "prefs-email": "Siēlta pôsta eletrônica",
        "prefs-rendering": "Aspèt",
        "rows": "Rîghi",
        "columns": "Clòuni:",
        "searchresultshead": "Sērca",
-       "stub-threshold": "Valōr ménim per i <a href=\"#\" class=\"stub\">colegamèint a i stub</a>, in byte:",
+       "stub-threshold": "Pôrta per i colegamèint a j abòs ($1):",
        "stub-threshold-disabled": "Bluchê",
        "recentchangesdays": "Nómer di dé da fêr vèder int al j ûltmi mudéfichi:",
        "recentchangesdays-max": "Mâsim $1 {{PLURAL:$1|dé}}",
        "badsig": "Erōr int la fîrma mìa standard, verifichêr i tag HTML.",
        "badsiglength": "La fîrma siēlta l'é trôp lònga, l'an dēv mìa andêr d'ed sōver di $1 {{PLURAL:$1|carâter}}.",
        "yourgender": "Cme arfêres a té?",
-       "gender-unknown": "Indiferèint",
+       "gender-unknown": "Al progrâma, int al numinêret e tōti 'l vôlti ch' al pōl, al druvarà dal parôli sèinsa gèner.",
        "gender-male": "L'é registrê in sém a {{SITENAME}}",
        "gender-female": "L'é registrêda in sém a {{SITENAME}}",
        "prefs-help-gender": "L'impustasiòun ed cla preferèinsa ché l'é a siēlta. Al progrâma al drōva cól valōr ché per parlêr cun tè e numinêret cun chiêter cun al druvêr al gèner ed gramâtica gióst. Cl'infurmasiòun ché la srà póblica.",
        "userrights": "Gestiòun di permès relatîv a j utèint",
        "userrights-lookup-user": "Gestiòun di gróp utèint",
        "userrights-user-editname": "Mèt dèinter al nòm utèint:",
-       "editusergroup": "Mudéfica gróp utèint",
-       "editinguser": "Mudéfica i dirét utèint ed l' utèint <strong>[[User:$1|$1]]</strong> $2",
+       "editusergroup": "Mudéfica i gróp {{GENDER:$1|utèint}}",
+       "editinguser": "Mudéfica i dirét utèint ed j {{GENDER:$1|utèint}}<strong>[[User:$1|$1]]</strong> $2",
        "userrights-editusergroup": "Mudéfica gróp utèint",
-       "saveusergroups": "Sêlva gróp utèint",
+       "saveusergroups": "Sêlva i gróp{{GENDER:$1|utèint}}",
        "userrights-groupsmember": "Al fà pêrt {{PLURAL:$1|al gróp|ai gróp}}:",
        "userrights-groupsmember-auto": "Al fà pêrt ed sicûr a:",
        "userrights-groups-help": "L'é pusébil mudifichêr i gróp in dó fà pêrt l'utèint. \n*'Na caşèla sernîda la sègna a che gróp al fà pêrt l'utèint. \n*'Na caşèla mìa serrnîda la sègna che l'utèin al fà mìa pêrt al gróp. \n*Al sègn * al sègna ch' an n'é m'a pusébil scanşlêr che l'utèin al fà pêrt al gróp dōp avèirel sgnê (o invicivêrsa).",
        "userrights-changeable-col": "Gróp ch'es pōlen mudifichêr.",
        "userrights-unchangeable-col": "Gróp ch'an 's pōlen mìa mudifichêr.",
        "userrights-conflict": "Cuntrâst ed mudéfica di dirét utèint! Cuntròla e cunfērma al tó mudéfichi.",
-       "userrights-removed-self": "T'é tôt via cun sucès i tō dirét. E dòunca, an 't prê pió andêr dèinter a cla pàgina ché.",
+       "userrights-removed-self": "T'é tôt via i tō dirét. E dòunca, an 't prê pió andêr dèinter a cla pàgina ché.",
        "group": "Gróp:",
        "group-user": "Utèint",
        "group-autoconfirmed": "Utèint cunvalidê da per ló",
        "group-bot-member": "{{GENDER:$1|bot}}",
        "group-sysop-member": "{{GENDER:$1|aministradōr}}",
        "group-bureaucrat-member": "{{GENDER:$1|funsionâri}}",
-       "group-suppress-member": "{{GENDER:$1|oversight}}",
+       "group-suppress-member": "{{GENDER:$1|suppressor}}",
        "grouppage-user": "{{ns:project}}:Utèint",
        "grouppage-autoconfirmed": "{{ns:project}}:Utèint convalidê da per ló",
        "grouppage-bot": "{{ns:project}}:Bot",
        "grouppage-sysop": "{{ns:project}}:Aministradōr",
        "grouppage-bureaucrat": "{{ns:project}}:Funsionâri",
-       "grouppage-suppress": "{{ns:project}}:Oversight",
+       "grouppage-suppress": "{{ns:project}}:Suppressor",
        "right-read": "Al lēş al pàgini",
        "right-edit": "Mudéfica pàgini",
        "right-createpage": "Ét pō fêr al pàgini (fōra che 'l pàgini 'd discusiòun).",
        "right-override-export-depth": "Pôrta fōra al pàgini cun insèm al pàgini coleghêdi per 'na larghèsa ed 5",
        "right-sendemail": "Spidés pôsta eletrônica a êter utèint",
        "right-passwordreset": "A vèd i mesâg 'd arnōv ed la cêva 'ed ingrès",
-       "right-managechangetags": "Fà e tó via i [[Special:Tags|tag]] dal databêş",
+       "right-managechangetags": "Fa e mèt in funsiòun/blôca al j [[Special:Tags|etichèti]]",
        "right-applychangetags": "Tâca dal [[Special:Tags|tichèti]] al tō mudéfichi",
        "right-changetags": "Zûta e tó via [[Special:Tags|tichèti]] precîşi só versiòun ónichi o vōş ed regéster",
        "newuserlogpage": "Utèint nōv",
        "rightslogtext": "Ché sòt a gh' é la lésta dal mudéfichi a i dirét dê a j utèint.",
        "action-read": "lēzer cla pàgina ché",
        "action-edit": "Mudifichêr cla pàgina ché",
-       "action-createpage": "inventêr pàgini",
-       "action-createtalk": "fêr 'l pàgini 'd discusiòun.",
+       "action-createpage": "fà cla pàgina ché",
+       "action-createtalk": "fêr cla pàgina 'd discusiòun ché.",
        "action-createaccount": "fêr cla registrasiòun ché",
        "action-history": "vèder la stôria 'd cla pàgina ché",
        "action-minoredit": "sgnêr cla mudéfica che cme céca",
        "action-viewmyprivateinfo": "guêrda al tō infurmasiòun personêli",
        "action-editmyprivateinfo": "mudéfica al tō infurmasiòun personêli",
        "action-editcontentmodel": "câmbia al mudèl dèinter a 'na pàgina",
-       "action-managechangetags": "fà e tó via i tag dal databêÅ\9f",
+       "action-managechangetags": "fêr e mèter in funsiòun/bluchêr al j etichèti",
        "action-applychangetags": "tachêr dal tichèti al tō mudéfichi",
        "action-changetags": "zuntêr o tōr via tichèti precîşi só versiòun ónichi o vōş ed regéster",
        "nchanges": "$1\n{{PLURAL:$1|mudéfica|mudéfichi}}",
        "newpageletter": "N",
        "boteditletter": "b",
        "number_of_watching_users_pageview": "[vésta da {{PLURAL:$1|un utèint|$1 utèint}}]",
-       "rc_categories": "Lémita al categoréi (divîşi da \"|\")",
-       "rc_categories_any": "Bast' ech sia",
+       "rc_categories": "Lémita al categoréi (separêdi da \"|\")",
+       "rc_categories_any": "Bast' ech sia fra còli sgnêdi",
        "rc-change-size-new": "$1 {{PLURAL:$1|byte|byte}} dôp la mudéfica",
        "newsectionsummary": "/* $1 */ sesiòn nōva",
        "rc-enhanced-expand": "Fà vèder i particulêr.",
        "backend-fail-read": "An n'é mìa pusébil lēzer al file \"$1\".",
        "backend-fail-create": "An n'é mìa pusébil fêr al file \"$1\".",
        "backend-fail-maxsize": "L'é impusébil fêr al file \"$1\" perché l'é pió grôs ed {{PLURAL:$2|un|$2}} byte.",
-       "backend-fail-readonly": "Al prugrâma 'd memôria \"$1\" adèsa a 's pōl sōl lēzer. La ragiòun dêda l'é: \"$2\".",
+       "backend-fail-readonly": "Al prugrâma 'd memôria \"$1\" adèsa a 's pōl sōl lēzer. La ragiòun dêda l'é: <em>$2</em>.",
        "backend-fail-synced": "Al file \"$1\" l'é in un stêt mìa lôgich cun al sistēma 'd la memôria intêrna.",
        "backend-fail-connect": "Impusébil coleghêres al sistēma 'd memôria \"$1\".",
        "backend-fail-internal": "É sucès un erōr mìa cgnusû int al sistēma  ed memôria \"$1\".",
        "whatlinkshere-prev": "{{PLURAL:$1|còl préma|quî préma $1}}",
        "whatlinkshere-next": "{{PLURAL:$1|còl dôp|quî dôp $1}}",
        "whatlinkshere-links": "← colegamèint",
-       "whatlinkshere-hideredirs": "$1redirect",
+       "whatlinkshere-hideredirs": "$1 redirect",
        "whatlinkshere-hidetrans": "$1 uniòun",
        "whatlinkshere-hidelinks": "$1 colegamèint",
        "whatlinkshere-hideimages": "$1 colegamèint da file",
        "import-upload-filename": "Nòm dal file:",
        "import-comment": "Argumèint:",
        "import-upload": "Cârga infurmasiòun XML",
-       "tooltip-pt-userpage": "La  pàgina utèint",
-       "tooltip-pt-mytalk": "La  pàgina 'd discusiòun.",
-       "tooltip-pt-preferences": "Al  preferèinsi.",
+       "tooltip-pt-userpage": "La {{GENDER:|tó}} pàgina utèint",
+       "tooltip-pt-mytalk": "La {{GENDER:|tó}} pàgina 'd discusiòun.",
+       "tooltip-pt-preferences": "Al  {{GENDER:|tó}} preferèinsi.",
        "tooltip-pt-watchlist": "Elèinch dal pàgini che t'é drē tgnîr sòt ôc.",
-       "tooltip-pt-mycontris": "Elèinch di  lavōr.",
+       "tooltip-pt-mycontris": "Elèinch di {{GENDER:|tō}}  lavōr.",
        "tooltip-pt-login": "A 's cunsélia 'd fêr la registrasiòun, ânca s' an n'é mia ubligatôri.",
        "tooltip-pt-logout": "Và fōra",
        "tooltip-ca-talk": "Guêrda al discusiòun relatîvi a cla pàgina chè.",
-       "tooltip-ca-edit": "Ét pō mudifiche cla pàgina ché. Per piaşèir drōva al ptòun \"Guêrda préma 'd salvêr\" per vèder còl che t'é fât.",
+       "tooltip-ca-edit": "Mudéfica cla pàgina ché",
        "tooltip-ca-addsection": "Cumîncia 'na sesiòun nōva.",
        "tooltip-ca-viewsource": "Cla pàgina ché l'é sòta prutesiòun, mó 't pō vèder al só côdis surzéia.",
        "tooltip-ca-history": "Versiòun ed préma fâti a cla pàgina ché.",
        "tooltip-t-whatlinkshere": "Elèinch ed tót' al pàgini ch'în coleghêdi a còsta.",
        "tooltip-t-recentchangeslinked": "Elèinch dal j ûltmi mudéfichi al pàgini coleghêdi a còsta.",
        "tooltip-feed-atom": "Feed Atom per cla pàgina ché.",
-       "tooltip-t-contributions": "Lèsta di lavōr fât da cl'utèint ché.",
-       "tooltip-t-emailuser": "Mânda un mesâg cun la pòsta eletrônica a cl'utèint ché",
+       "tooltip-t-contributions": "Lèsta di lavōr fât da {{GENDER:$1|cl'utèint|cl'utèinta}}  ché.",
+       "tooltip-t-emailuser": "Mânda un mesâg cun la pòsta eletrônica a{{GENDER:$1|cl'utèint|cl'utèinta}}  ché",
        "tooltip-t-upload": "Cârga un file",
        "tooltip-t-specialpages": "Elèinch ed tót al pàgini specêli",
        "tooltip-t-print": "Per stampêr cla pàgina ché.",
        "tooltip-t-permalink": "Colegamèint fés a cla versiòun ché 'd  la pàgina.",
        "tooltip-ca-nstab-main": "Guêrda la pàgina",
        "tooltip-ca-nstab-user": "Guêrda la pàgina utèint",
-       "tooltip-ca-nstab-special": "Còsta ché l'é 'na pàgina specêlal l'an pōl mìa èser mudifichêda",
+       "tooltip-ca-nstab-special": "Còsta ché l'é 'na pàgina specêla l'an pōl mìa èser mudifichêda",
        "tooltip-ca-nstab-project": "Guêrda la pàgina dal prugèt",
        "tooltip-ca-nstab-image": "Guêrda la pàgina dal file",
        "tooltip-ca-nstab-template": "Guêrda 'l mudèl",
index a684a3f..dcb9f4c 100644 (file)
@@ -77,7 +77,7 @@
        "tog-enotifminoredits": "Να μου αποστέλλεται μήνυμα ηλεκτρονικού ταχυδρομείου και για αλλαγές μικρής κλίμακας σε σελίδες και αρχεία",
        "tog-enotifrevealaddr": "Αποκάλυψη της ηλεκτρονικής μου διεύθυνσης σε ειδοποιήσεις ηλεκτρονικού ταχυδρομείου",
        "tog-shownumberswatching": "Εμφάνιση του αριθμού των συνδεδεμένων χρηστών",
-       "tog-oldsig": "Î¥Ï\80άÏ\81Ï\87οÏ\85Ï\83α Ï\85Ï\80ογÏ\81αÏ\86ή:",
+       "tog-oldsig": "Î\97 Ï\84Ï\81έÏ\87οÏ\85Ï\83α Ï\85Ï\80ογÏ\81αÏ\86ή Ï\83αÏ\82:",
        "tog-fancysig": "Μεταχείριση υπογραφής ως κώδικα wiki (χωρίς αυτόματο σύνδεσμο)",
        "tog-uselivepreview": "Χρήση προεπισκόπησης σε ζωντανό χρόνο",
        "tog-forceeditsummary": "Να ειδοποιούμαι κατά την εισαγωγή κενής σύνοψης επεξεργασίας",
@@ -94,7 +94,7 @@
        "tog-showhiddencats": "Εμφάνιση κρυμμένων κατηγοριών",
        "tog-norollbackdiff": "Παράλειψη εμφάνισης διαφορών μετά την εκτέλεση επαναφοράς",
        "tog-useeditwarning": "Προειδοποίηση όταν εγκαταλείπω μία σελίδα επεξεργασίας χωρίς να έχω πρώτα αποθηκεύσει τις αλλαγές",
-       "tog-prefershttps": "Να γίνεται πάντα χρήση ασφαλούς σύνδεσης όταν ο χρήστης είναι συνδεδεμένος",
+       "tog-prefershttps": "Να γίνεται πάντα χρήση ασφαλούς σύνδεσης ενώ είμαι σε σύνδεση",
        "underline-always": "Πάντα",
        "underline-never": "Ποτέ",
        "underline-default": "Προεπιλογή από θέμα εμφάνισης ή από περιηγητή",
        "category-file-count-limited": "Η τρέχουσα κατηγορία περιέχει {{PLURAL:$1|το ακόλουθο αρχείο|τα ακόλουθα $1 αρχεία}}.",
        "listingcontinuesabbrev": "συνεχίζεται",
        "index-category": "Σελίδες καταλογογραφημένες για μηχανές αναζήτησης",
-       "noindex-category": "ΣελίδεÏ\82 Î¼Î· ÎºÎ±Ï\84αλογογÏ\81αÏ\86ημένεÏ\82 Î³Î¹Î± Î¼Î·Ï\87ανέÏ\82 Î±Î½Î±Î¶Î®Ï\84ηÏ\83ης",
+       "noindex-category": "Î\9cη ÎºÎ±Ï\84αλογογÏ\81αÏ\86ημένεÏ\82 Ï\83ελίδες",
        "broken-file-category": "Σελίδες με κατεστραμμένους συνδέσμους",
        "about": "Σχετικά",
        "article": "Σελίδα περιεχομένου",
        "newwindow": "(ανοίγει σε ξεχωριστό παράθυρο)",
        "cancel": "Ακύρωση",
        "moredotdotdot": "Περισσότερα...",
-       "morenotlisted": "Î\91Ï\85Ï\84ή Î· Î»Î¯Ï\83Ï\84α Î´ÎµÎ½ ÎµÎ¯Î½Î±Î¹ Ï\80λήÏ\81ης.",
+       "morenotlisted": "Î\91Ï\85Ï\84ή Î· Î»Î¯Ï\83Ï\84α Î¼Ï\80οÏ\81εί Î½Î± ÎµÎ¯Î½Î±Î¹ ÎµÎ»Î»Î¹Ï\80ής.",
        "mypage": "Σελίδα",
        "mytalk": "Συζήτηση",
        "anontalk": "Σελίδα συζήτησης αυτής της διεύθυνσης IP",
        "talk": "Συζήτηση",
        "views": "Προβολές",
        "toolbox": "Εργαλεία",
+       "tool-link-userrights": "Αλλαγή ομάδων {{GENDER:$1|χρήστη}}",
+       "tool-link-emailuser": "Αποστολή e-mail {{GENDER:$1|στο|στη}} χρήστη",
        "userpage": "Προβολή σελίδας χρήστη",
        "projectpage": "Προβολή σελίδας εγχειρήματος",
        "imagepage": "Προβολή σελίδας αρχείου",
        "cannotlogin-text": "Η σύνδεση δεν είναι δυνατή.",
        "cannotloginnow-title": "Δεν μπορείτε να συνδεθείτε τώρα",
        "cannotloginnow-text": "Η σύνδεση δεν είναι δυνατή όταν χρησιμοποιείτε την $1.",
+       "cannotcreateaccount-title": "Αδυναμία δημιουργίας λογαριασμού",
        "yourdomainname": "Το domain σας:",
        "password-change-forbidden": "Δεν μπορείτε να αλλάξετε τους κωδικούς πρόσβασης σε αυτό το βίκι.",
        "externaldberror": "Είτε συνέβη κάποιο σφάλμα εξωτερικής πιστοποίησης της βάσης δεδομένων είτε δεν σας έχει επιτραπεί να ενημερώσετε τον εξωτερικό σας λογαριασμό.",
        "eauthentsent": "Ένα μήνυμα επαλήθευσης έχει σταλεί στην ηλεκτρονική διεύθυνση που έχετε δηλώσει.\nΠριν αρχίσει η αποστολή μηνυμάτων στη συγκεκριμένη διεύθυνση, πρέπει να ακολουθήσετε τις οδηγίες που βρίσκονται στο μήνυμα που σας έχει σταλεί, για να επαληθεύσετε ότι η συγκεκριμένη ηλεκτρονική διεύθυνση ανήκει πραγματικά σε εσάς.",
        "throttled-mailpassword": "Ένα email επαναφοράς κωδικού έχει ήδη αποσταλεί, μέσα {{PLURAL:$1|στην τελευταία ώρα|στις τελευταίες $1 ώρες}}.\nΓια την αποφυγή κατάχρησης, μόνο ένα email επαναφοράς κωδικού θα στέλνεται ανά {{PLURAL:$1|ώρα|$1 ώρες}}.",
        "mailerror": "Σφάλμα στην αποστολή του μηνύματος: $1",
-       "acct_creation_throttle_hit": "Î\95Ï\80ιÏ\83κέÏ\80Ï\84εÏ\82 Î±Ï\85Ï\84οÏ\8d Ï\84οÏ\85 wiki Î¼Îµ Ï\84ην Î´Î¹ÎµÏ\8dθÏ\85νÏ\83η IP Ï\83αÏ\82 Î­Ï\87οÏ\85ν Î®Î´Î· Î´Î·Î¼Î¹Î¿Ï\85Ï\81γήÏ\83ει {{PLURAL:$1|ένα Î»Î¿Î³Î±Ï\81ιαÏ\83μÏ\8c|$1 Î»Î¿Î³Î±Ï\81ιαÏ\83μοÏ\8dÏ\82}}, ÎºÎ±Ï\84ά Ï\84ην Ï\84ελεÏ\85Ï\84αία Î¼Î¯Î± Î·Î¼Î­Ï\81α, που είναι και ο μέγιστος επιτρεπόμενος αριθμός.\nΩς αποτέλεσμα, επισκέπτες αυτού του wiki με αυτήν την διεύθυνση IP δεν μπορούν αυτή την στιγμή να δημιουργήσουν περισσότερους λογαριασμούς.",
+       "acct_creation_throttle_hit": "Î\95Ï\80ιÏ\83κέÏ\80Ï\84εÏ\82 Î±Ï\85Ï\84οÏ\8d Ï\84οÏ\85 wiki Î¼Îµ Ï\84ην Î´Î¹ÎµÏ\8dθÏ\85νÏ\83η IP Ï\83αÏ\82 Î­Ï\87οÏ\85ν Î®Î´Î· Î´Î·Î¼Î¹Î¿Ï\85Ï\81γήÏ\83ει {{PLURAL:$1|ένα Î»Î¿Î³Î±Ï\81ιαÏ\83μÏ\8c|$1 Î»Î¿Î³Î±Ï\81ιαÏ\83μοÏ\8dÏ\82}}, ÎºÎ±Ï\84ά Ï\83ε Ï\80εÏ\81ίοδο $2, που είναι και ο μέγιστος επιτρεπόμενος αριθμός.\nΩς αποτέλεσμα, επισκέπτες αυτού του wiki με αυτήν την διεύθυνση IP δεν μπορούν αυτή την στιγμή να δημιουργήσουν περισσότερους λογαριασμούς.",
        "emailauthenticated": "Η διεύθυνσή σας ηλεκτρονικού ταχυδρομείου επιβεβαιώθηκε στις $2 και ώρα $3.",
        "emailnotauthenticated": "Η ηλεκτρονική σας διεύθυνση δεν έχει επαληθευτεί ακόμα.\nΚανένα μήνυμα ηλεκτρονικού ταχυδρομείου δεν θα σταλεί για τις ακόλουθες λειτουργίες.",
        "noemailprefs": "Δεν έχει ορισθεί ηλεκτρονική διεύθυνση, οι λειτουργίες που ακολουθούν δεν θα είναι δυνατόν να ολοκληρωθούν.",
        "botpasswords-label-resetpassword": "Επαναφορά κωδικού",
        "botpasswords-label-grants": "Ισχύουσες άδειες:",
        "botpasswords-help-grants": "Κάθε παραχώρηση δίνει πρόσβαση στα ορισμένα δικαιώματα χρήστη που που ήδη έχει ένας λογαριασμός χρήστη. Δείτε τη [[Special:ListGrants|πίνακας παραχωρήσεων]] για περισσότερες πληροφορίες.",
-       "botpasswords-label-restrictions": "Περιορισμοί χρήσης:",
        "botpasswords-label-grants-column": "Χορηγήθηκε",
        "botpasswords-bad-appid": "Η ονομασία του ρομπότ «$1» δεν είναι έγκυρη.",
        "botpasswords-insert-failed": "Αποτυχία να προστεθεί το όνομα bot \"$1\". Έχει ήδη προστεθεί;",
        "botpasswords-updated-body": "Ο κωδικός πρόσβασης του ρομπότ «$1» του χρήστη «$2» ενημερώθηκε.",
        "botpasswords-deleted-title": "Ο κωδικός πρόσβασης του ρομπότ διαγράφτηκε",
        "botpasswords-deleted-body": "Ο κωδικός πρόσβασης για το όνομα ρομπότ \"$1\" του χρήστη \"$2\" διαγράφηκε.",
-       "botpasswords-newpassword": "Ο νέος κωδικός πρόσβασης για να συνδεθείτε με το <strong>$1</strong> είναι <strong>$2</strong>. <em>Παρακαλούμε σημειώστε το για μελλοντική αναφορά.</em>",
+       "botpasswords-newpassword": "Ο νέος κωδικός πρόσβασης για να συνδεθείτε με το <strong>$1</strong> είναι <strong>$2</strong>. <em>Παρακαλούμε σημειώστε το για μελλοντική αναφορά.</em><br />(Για παλιά bot που απαιτούν το όνομα σύνδεσης να είναι το ίδιο με το τελικό όνομα χρήστη, μπορείτε επίσης να χρησιμοποιήσετε το  <strong>$3</strong> ως όνομα χρήστη και <strong>$4</strong> ως κωδικό.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider δεν είναι διαθέσιμο.",
        "botpasswords-restriction-failed": "Περιορισμοί κωδικών πρόσβασης bot εμποδίζουν τη συγκεκριμένη σύνδεση.",
        "resetpass_forbidden": "Οι κωδικοί πρόσβασης δεν μπορούν να αλλαχθούν",
        "continue-editing": "Μεταβείτε στην περιοχή επεξεργασίας",
        "previewconflict": "Αυτή η προεπισκόπηση απεικονίζει το κείμενο στην επάνω περιοχή επεξεργασίας κειμένου, όπως θα εμφανιστεί εάν επιλέξετε να το αποθηκεύσετε.",
        "session_fail_preview": "'''Συγγνώμη! Δεν μπορούσαμε να διεκπεραιώσουμε την επεξεργασία σας λόγω απώλειας των δεδομένων της συνεδρίας.\nΠαρακαλώ προσπαθήστε ξανά. Αν δεν δουλεύει ξανά, δοκιμάστε να [[Special:UserLogout|αποσυνδεθείτε]] και να συνδεθείτε πάλι.'''",
-       "session_fail_preview_html": "'''Λυπούμαστε! Δεν μπορέσαμε να διεκπεραιώσουμε την επεξεργασία σας λόγω απώλειας των δεδομένων της συνεδρίας.'''\n\n''Επειδή το {{SITENAME}} επιτρέπει την εισαγωγή ακατέργαστου HTML, η προεπισκόπηση είναι κρυμμένη ως προφύλαξη ενάντια σε επιθέσεις με Javascript.''\n\n'''Αν αυτή είναι μια έγκυρη προσπάθεια επεξεργασίας, παρακαλώ προσπαθήστε ξανά. Αν πάλι δε δουλεύει, δοκιμάστε να αποσυνδεθείτε και να συνδεθείτε πάλι.'''",
+       "session_fail_preview_html": "'''Λυπούμαστε! Δεν μπορέσαμε να διεκπεραιώσουμε την επεξεργασία σας λόγω απώλειας των δεδομένων της συνεδρίας.'''\n\n<em>Επειδή το {{SITENAME}} επιτρέπει την εισαγωγή ακατέργαστου HTML, η προεπισκόπηση είναι κρυμμένη ως προφύλαξη ενάντια σε επιθέσεις με Javascript.</em>\n\n<strong>Αν αυτή είναι μια έγκυρη προσπάθεια επεξεργασίας, παρακαλώ προσπαθήστε ξανά..</strong> Αν και πάλι δε λειτουργεί, δοκιμάστε να [[[[Special:UserLogout|αποσυνδεθείτε]] και να συνδεθείτε πάλι και δείτε αν ο φυλλομετρητής σας επιτρέπει cookies απ'αυτόν τον ιστότοπο.",
        "token_suffix_mismatch": "'''Η επεξεργασία σας απορρίφθηκε γιατί το πρόγραμμα-πελάτη σας κατακρεούργησε τους χαρακτήρες στίξης στο κουπόνι επεξεργασίας. Η επεξεργασία απορρίφθηκε για να αποφευχθεί η παραφθορά του κειμένου της σελίδας.\nΑυτό μερικές φορές συμβαίνει όταν χρησιμοποιείται ένας ανώνυμος διακομιστής μεσολάβησης διαθέσιμος μέσω του παγκόσμιου ιστού με σφάλματα.'''",
        "edit_form_incomplete": "'''Ορισμένα τμήματα της φόρμας επεξεργασίας δεν έφθασαν στο διακομιστή. Ελέγξτε ότι οι αλλαγές σας είναι άθικτες και προσπαθήστε ξανά.'''",
        "editing": "Επεξεργασία $1",
        "revdelete-unsuppress": "Αφαίρεσε περιορισμούς στις αποκατεστημένες αναθεωρήσεις",
        "revdelete-log": "Αιτία:",
        "revdelete-submit": "Εφαρμογή {{PLURAL:$1|στην επιλεγμένη αναθεώρηση|στις επιλεγμένες αναθεωρήσεις}}",
-       "revdelete-success": "'''Η ορατότητα έκδοσης ενημερώθηκε επιτυχώς.'''",
+       "revdelete-success": "Η ορατότητα έκδοσης ενημερώθηκε επιτυχώς.",
        "revdelete-failure": "'''Η ορατότητα της επεξεργασίας δεν ήταν δυνατόν να ενημερωθεί:''' $1",
        "logdelete-success": "Η ορατότητα γεγονότος τέθηκε επιτυχώς.",
        "logdelete-failure": "'''Η ορατότητα του καταλόγου δεν μπορούσε να ρυθμιστεί:'''\n$1",
        "searchprofile-advanced-tooltip": "Αναζήτηση σε προσαρμοσμένους ονοματοχώρους",
        "search-result-size": "$1 ({{PLURAL:$2|1 λέξη|$2 λέξεις}})",
        "search-result-category-size": "{{PLURAL:$1|1 μέλος|$1 μέλη}} ({{PLURAL:$2|1 υποκατηγορία|$2 υποκατηγορίες}}, {{PLURAL:$3|1 αρχείο|$3 αρχεία}})",
-       "search-redirect": "(ανακατεύθυνση $1)",
+       "search-redirect": "(ανακατεύθυνση από $1)",
        "search-section": "(ενότητα $1)",
        "search-category": "(κατηγορία $1)",
        "search-file-match": "(ταιριάζει με το περιεχόμενο του αρχείου)",
        "userrights-changeable-col": "Ομάδες που μπορείτε να αλλάξετε",
        "userrights-unchangeable-col": "Ομάδες που δεν μπορείτε να αλλάξετε",
        "userrights-conflict": "Σύγκρουση αλλαγών στα δικαιώματα χρήστη! Παρακαλώ επανεξετάστε και επικυρώστε τις αλλαγές σας.",
-       "userrights-removed-self": "Έχετε καταργήσει επιτυχώς τα δικά σας δικαιώματα. Ως εκ τούτου, δεν είστε πλέον σε θέση να έχετε πρόσβαση σε αυτή τη σελίδα.",
+       "userrights-removed-self": "Έχετε καταργήσει τα δικά σας δικαιώματα. Ως εκ τούτου, δεν είστε πλέον σε θέση να έχετε πρόσβαση σε αυτή τη σελίδα.",
        "group": "Ομάδα:",
        "group-user": "Χρήστες",
        "group-autoconfirmed": "Αυτοεπιβεβαιωμένοι χρήστες",
        "right-override-export-depth": "Εξαγωγή σελίδων συμπεριλαμβάνοντας συνδεδεμένες σελίδες έως ένα βάθος 5 επιπέδων",
        "right-sendemail": "Αποστολή ηλεκτρονικού μηνύματος σε άλλους χρήστες",
        "right-passwordreset": "Εμφάνιση email επαναφοράς κωδικού πρόσβασης",
-       "right-managechangetags": "Δημιουργία και διαγραφή [[Special:Tags|ετικετών]] από τη βάση δεδομένων",
+       "right-managechangetags": "Δημιουργία και (απ)ενεργοποίηση [[Special:Tags|ετικετών]]",
        "right-applychangetags": "Εφαρμόστε [[Special:Tags|ετικέτες]] μαζί με τις αλλαγές",
        "right-changetags": "Προσθέστε και αφαιρέστε αυθαίρετες [[Special:Tags|ετικέτες]] σε μεμονωμένες εκδόσεις και καταχωρήσεις καταγραφών",
+       "right-deletechangetags": "Διαγραφή [[Special:Tags|ετικετών]] από τη βάση δεδομένων",
        "grant-group-page-interaction": "Αλληλεπίδραση με σελίδες",
        "grant-group-file-interaction": "Αλληλεπίδραση με πολυμέσα",
        "grant-group-watchlist-interaction": "Αλληλεπίδραση με τη λίστα παρακολούθησής σου",
        "apisandbox-sending-request": "Αποστολή αιτήματος API...",
        "apisandbox-loading-results": "Λήψη αποτελεσμάτων API...",
        "apisandbox-request-url-label": "Αίτηση URL:",
-       "apisandbox-request-time": "Χρόνος αιτήματος: $1",
+       "apisandbox-request-time": "Χρόνος αιτήματος: {{PLURAL:$1|$1 ms}}",
        "booksources": "Πηγές βιβλίων",
        "booksources-search-legend": "Αναζήτηση για πηγές βιβλίων",
        "booksources-isbn": "ISBN:",
        "sp-contributions-newbies-title": "Συνεισφορές χρηστών για νέους λογαριασμούς",
        "sp-contributions-blocklog": "αρχείο καταγραφών φραγών",
        "sp-contributions-suppresslog": "διαγεγραμμένες συνεισφορές {{GENDER:$1|χρήστη|χρήστριας}}",
-       "sp-contributions-deleted": "διαγεγραμμένες συνεισφορές χρήστη",
+       "sp-contributions-deleted": "διαγεγραμμένες συνεισφορές {{GENDER:$1|χρήστη|χρήστριας}}",
        "sp-contributions-uploads": "ανεβάσματα αρχείων",
        "sp-contributions-logs": "καταγραφές",
        "sp-contributions-talk": "συζήτηση",
        "import-nonewrevisions": "Καμία αναθεώρηση δεν εισήχθει (όλες είτε ήταν ήδη παρούσες, ή παραλήφθηκαν λόγω σφαλμάτων).",
        "xml-error-string": "$1 στη γραμμή $2, στήλη $3 (byte $4): $5",
        "import-upload": "Ανέβασμα δεδομένων XML",
-       "import-token-mismatch": "Απώλεια των στοιχείων της συνόδου. Παρακαλούμε προσπαθήστε ξανά.",
+       "import-token-mismatch": "Απώλεια δεδομένων περιόδου λειτουργίας.\n\nΜπορεί να έχουν αποσυνδεθεί. <strong>Παρακαλούμε βεβαιωθείτε ότι είστε ακόμα συνδεδεμένοι και προσπαθήστε ξανά</strong>.\nΑν εξακολουθεί να μην λειτουργεί, δοκιμάστε να [[Special:UserLogout|αποσυνδεθείτε]] και επανασυνδεθείτε, και ελέγξτε ότι ο browser σας επιτρέπει cookies από αυτό τον ιστοτόπο.",
        "import-invalid-interwiki": "Δεν είναι δυνατή η εισαγωγή από το καθορισμένο wiki.",
        "import-error-edit": "Η σελίδα «$1» δεν εισήχθη επειδή δεν σας επιτρέπεται να την επεξεργαστείτε.",
        "import-error-create": "Η σελίδα «$1» δεν εισήχθη επειδή δεν σας επιτρέπεται να την δημιουργήσετε.",
        "pageinfo-article-id": "Αναγνωριστικό σελίδας",
        "pageinfo-language": "Γλώσσα περιεχομένου σελίδας",
        "pageinfo-content-model": "Μοντέλο περιεχομένου σελίδας",
+       "pageinfo-content-model-change": "αλλαγή",
        "pageinfo-robot-policy": "Ευρετηρίαση από ρομπότ",
        "pageinfo-robot-index": "Επιτρεπτό",
        "pageinfo-robot-noindex": "Μη επιτρεπτό",
        "scarytranscludefailed-httpstatus": "[Η λήψη προτύπου απέτυχε για  το $1: HTTP  $2]",
        "scarytranscludetoolong": "[Η διεύθυνση URL είναι πολύ μεγάλη.]",
        "deletedwhileediting": "'''Προσοχή''': Αυτή η σελίδα έχει διαγραφεί αφότου ξεκινήσατε την επεξεργασία!",
-       "confirmrecreate": "Ο χρήστης [[User:$1|$1]] ([[User talk:$1|συζήτηση]]) διέγραψε αυτή τη σελίδα αφότου ξεκινήσατε την επεξεργασία με αιτιολόγηση:\n: ''$2''\nΠαρακαλώ επιβεβαιώστε ότι θέλετε πραγματικά να ξαναδημιουργήσετε αυτή τη σελίδα.",
-       "confirmrecreate-noreason": "Ο χρήστης [[User:$1|$1]] ([[User talk:$1|συζήτηση]]) διέγραψε αυτή τη σελίδα αφότου ξεκινήσατε την επεξεργασία.\nΠαρακαλούμε επιβεβαιώστε ότι θέλετε πραγματικά να ξαναδημιουργήσετε αυτή τη σελίδα.",
+       "confirmrecreate": "Ο χρήστης [[User:$1|$1]] ([[User talk:$1|συζήτηση]]) διέγραψε αυτή τη σελίδα αφότου ξεκινήσατε την επεξεργασία με αιτιολόγηση:\n: <em>$2</em>\nΠαρακαλούμε επιβεβαιώστε ότι θέλετε πραγματικά να ξαναδημιουργήσετε αυτή τη σελίδα.",
+       "confirmrecreate-noreason": "{{GENDER:$1|Ο χρήστης|Η χρήστρια}} [[User:$1|$1]] ([[User talk:$1|συζήτηση]]) διέγραψε αυτή τη σελίδα αφότου ξεκινήσατε την επεξεργασία.\nΠαρακαλούμε επιβεβαιώστε ότι θέλετε πραγματικά να ξαναδημιουργήσετε αυτή τη σελίδα.",
        "recreate": "Αναδημιουργία",
        "confirm_purge_button": "Εντάξει",
        "confirm-purge-top": "Καθαρισμός της λανθάνουσας μνήμης αυτής της σελίδας.",
        "tags-actions-header": "Ενέργειες",
        "tags-active-yes": "Ναι",
        "tags-active-no": "Όχι",
-       "tags-source-extension": "Î\9fÏ\81ιζÏ\8cμενη Î±Ï\80Ï\8c ÎµÏ\80έκÏ\84αÏ\83η",
+       "tags-source-extension": "Î\9fÏ\81ίζεÏ\84αι Î±Ï\80Ï\8c Ï\84ο Î»Î¿Î³Î¹Ï\83μικÏ\8c",
        "tags-source-manual": "Εφαρμοζόμενη με μη αυτόματο τρόπο από χρήστες και ρομπότ",
        "tags-source-none": "Όχι σε χρήση πλέον",
        "tags-edit": "επεξεργασία",
        "htmlform-cloner-create": "Προσθήκη περισσοτέρων",
        "htmlform-cloner-delete": "Αφαίρεση",
        "htmlform-cloner-required": "Απαιτείται τουλάχιστον μία τιμή.",
+       "htmlform-date-placeholder": "ΕΕΕΕ-ΜΜ-ΗΗ",
+       "htmlform-date-invalid": "Η τιμή που καθορίσατε δεν είναι μια αναγνωρισμένη ημερομηνία. Δοκιμάστε να χρησιμοποιήσετε τη μορφή ΕΕΕΕ-MM-ΗΗ.",
        "htmlform-title-badnamespace": "[[:$1]] δεν είναι στο \"{{ns:$2}}\" ονοματοχώρο.",
        "htmlform-title-not-creatable": "\"$1\" - η  σελίδα τίτλου δεν είναι δυνατόν να δημιουργηθεί",
        "htmlform-title-not-exists": "Το $1 δεν υπάρχει.",
        "htmlform-user-not-exists": "Δεν υπάρχει χρήστης με όνομα <strong>$1</strong>.",
        "htmlform-user-not-valid": "Το <strong>$1</strong> δεν είναι έγκυρο όνομα χρήστη.",
-       "sqlite-has-fts": "$1 με υποστήριξη αναζήτησης πλήρους κειμένου",
-       "sqlite-no-fts": "$1 χωρίς την υποστήριξη αναζήτησης πλήρους κειμένου",
        "logentry-delete-delete": "{{GENDER:$2|Ο|Η}} $1 διέγραψε τη σελίδα $3",
        "logentry-delete-restore": "Ο/Η $1 αποκατέστησε τη σελίδα $3",
        "logentry-delete-event": "{{GENDER:$2|Ο|Η}} $1 άλλαξε την ορατότητα {{PLURAL:$5|ενός καταγραφόμενου συμβάντος|$5 καταγραφόμενων συμβάντων}} στο $3: $4",
        "feedback-close": "Ολοκληρώθηκε",
        "feedback-dialog-title": "Υποβολή παρατηρήσεων",
        "feedback-dialog-intro": "Μπορείτε να χρησιμοποιήσετε την παρακάτω εύκολη φόρμα για να υποβάλετε τις παρατηρήσεις σας. Το σχόλιό σας θα προστεθεί στην σελίδα «$1», μαζί με το όνομα χρήστη σας.",
-       "feedback-error-title": "Σφάλμα",
        "feedback-error1": "Σφάλμα: Μη αναγνωρίσιμο αποτέλεσμα από το API",
        "feedback-error2": "Σφάλμα: Η επεξεργασία απέτυχε",
        "feedback-error3": "Σφάλμα: Καμία απάντηση από το API",
index df45a7e..c759984 100644 (file)
@@ -28,7 +28,7 @@
        "tog-enotifminoredits": "Email me also for minor edits of pages and files",
        "tog-enotifrevealaddr": "Reveal my email address in notification emails",
        "tog-shownumberswatching": "Show the number of watching users",
-       "tog-oldsig": "Existing signature:",
+       "tog-oldsig": "Your existing signature:",
        "tog-fancysig": "Treat signature as wikitext (without an automatic link)",
        "tog-uselivepreview": "Use live preview",
        "tog-forceeditsummary": "Prompt me when entering a blank edit summary",
@@ -45,7 +45,7 @@
        "tog-showhiddencats": "Show hidden categories",
        "tog-norollbackdiff": "Don't show diff after performing a rollback",
        "tog-useeditwarning": "Warn me when I leave an edit page with unsaved changes",
-       "tog-prefershttps": "Always use a secure connection when logged in",
+       "tog-prefershttps": "Always use a secure connection while logged in",
        "underline-always": "Always",
        "underline-never": "Never",
        "underline-default": "Skin or browser default",
        "newwindow": "(opens in new window)",
        "cancel": "Cancel",
        "moredotdotdot": "More...",
-       "morenotlisted": "This list is not complete.",
+       "morenotlisted": "This list may be incomplete.",
        "mypage": "Page",
        "mytalk": "Talk",
        "anontalk": "Talk",
        "talk": "Discussion",
        "views": "Views",
        "toolbox": "Tools",
+       "tool-link-userrights": "Change {{GENDER:$1|user}} groups",
+       "tool-link-emailuser": "Email this {{GENDER:$1|user}}",
        "userpage": "View user page",
        "projectpage": "View project page",
        "imagepage": "View file page",
        "signupend": "",
        "signupend-https": "",
        "mailerror": "Error sending mail: $1",
-       "acct_creation_throttle_hit": "Visitors to this wiki using your IP address have created {{PLURAL:$1|1 account|$1 accounts}} in the last day, which is the maximum allowed in this time period.\nAs a result, visitors using this IP address cannot create any more accounts at the moment.",
+       "acct_creation_throttle_hit": "Visitors to this wiki using your IP address have created {{PLURAL:$1|1 account|$1 accounts}} in the last $2, which is the maximum allowed in this time period.\nAs a result, visitors using this IP address cannot create any more accounts at the moment.",
        "emailauthenticated": "Your email address was confirmed on $2 at $3.",
        "emailnotauthenticated": "Your email address is not yet confirmed.\nNo email will be sent for any of the following features.",
        "noemailprefs": "Specify an email address in your preferences for these features to work.",
        "botpasswords-label-resetpassword": "Reset the password",
        "botpasswords-label-grants": "Applicable grants:",
        "botpasswords-help-grants": "Each grant gives access to listed user rights that a user account already has. See the [[Special:ListGrants|table of grants]] for more information.",
-       "botpasswords-label-restrictions": "Usage restrictions:",
        "botpasswords-label-grants-column": "Granted",
        "botpasswords-bad-appid": "The bot name \"$1\" is not valid.",
        "botpasswords-insert-failed": "Failed to add bot name \"$1\". Was it already added?",
        "passwordreset-emailelement": "Username:\n$1\n\nTemporary password:\n$2",
        "passwordreset-emailsentemail": "If this email address is associated with your account, then a password reset email will be sent.",
        "passwordreset-emailsentusername": "If there is an email address associated with this username, then a password reset email will be sent.",
-       "passwordreset-emailsent-capture2": "The password reset {{PLURAL:$1|email has|emails have}} been sent. The {{PLURAL:$1|username and password|list of usernames and passwords}} is shown below.",
-       "passwordreset-emailerror-capture2": "Emailing the {{GENDER:$2|user}} failed: $1 The {{PLURAL:$3|username and password|list of usernames and passwords}} is shown below.",
+       "passwordreset-emailsent-capture2": "The password reset {{PLURAL:$1|email has|emails have}} been sent. The {{PLURAL:$1|username and password|list of usernames and passwords}} is shown here.",
+       "passwordreset-emailerror-capture2": "Emailing the {{GENDER:$2|user}} failed: $1 The {{PLURAL:$3|username and password|list of usernames and passwords}} is shown here.",
        "passwordreset-nocaller": "A caller must be provided",
        "passwordreset-nosuchcaller": "Caller does not exist: $1",
        "passwordreset-ignored": "The password reset was not handled. Maybe no provider was configured?",
        "searchprofile-advanced-tooltip": "Search in custom namespaces",
        "search-result-size": "$1 ({{PLURAL:$2|1 word|$2 words}})",
        "search-result-category-size": "{{PLURAL:$1|1 member|$1 members}} ({{PLURAL:$2|1 subcategory|$2 subcategories}}, {{PLURAL:$3|1 file|$3 files}})",
-       "search-redirect": "(redirect $1)",
+       "search-redirect": "(redirect from $1)",
        "search-section": "(section $1)",
        "search-category": "(category $1)",
        "search-file-match": "(matches file content)",
        "grant-basic": "Basic rights",
        "grant-viewdeleted": "View deleted files and pages",
        "grant-viewmywatchlist": "View your watchlist",
+       "grant-viewrestrictedlogs": "View restricted log entries",
        "newuserlogpage": "User creation log",
        "newuserlogpagetext": "This is a log of user creations.",
        "rightslog": "User rights log",
        "upload-dialog-disabled": "File uploads using this dialog are disabled on this wiki.",
        "upload-dialog-title": "Upload file",
        "upload-dialog-button-cancel": "Cancel",
+       "upload-dialog-button-back": "Back",
        "upload-dialog-button-done": "Done",
        "upload-dialog-button-save": "Save",
        "upload-dialog-button-upload": "Upload",
        "apisandbox-results-fixtoken-fail": "Failed to fetch \"$1\" token.",
        "apisandbox-alert-page": "Fields on this page are not valid.",
        "apisandbox-alert-field": "The value of this field is not valid.",
+       "apisandbox-continue": "Continue",
+       "apisandbox-continue-clear": "Clear",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} will [https://www.mediawiki.org/wiki/API:Query#Continuing_queries continue] the last request; {{int:apisandbox-continue-clear}} will clear continuation-related parameters.",
        "booksources": "Book sources",
        "booksources-summary": "",
        "booksources-search-legend": "Search for book sources",
        "movelogpagetext": "Below is a list of all page moves.",
        "movesubpage": "{{PLURAL:$1|Subpage|Subpages}}",
        "movesubpagetext": "This page has $1 {{PLURAL:$1|subpage|subpages}} shown below.",
+       "movesubpagetalktext": "The corresponding talk page has $1 {{PLURAL:$1|subpage|subpages}} shown below.",
        "movenosubpage": "This page has no subpages.",
        "movereason": "Reason:",
        "move-redirect-text": "",
        "tooltip-watchlistedit-raw-submit": "Update watchlist",
        "tooltip-recreate": "Recreate the page even though it has been deleted",
        "tooltip-upload": "Start upload",
-       "tooltip-rollback": "\"Rollback\" reverts edit(s) to this page of the last contributor in one click",
+       "tooltip-rollback": "\"Rollback\" reverts the last contributor's edit(s) to this page in one click",
        "tooltip-undo": "\"Undo\" reverts this edit and opens the edit form in preview mode. It allows adding a reason in the summary.",
        "tooltip-preferences-save": "Save preferences",
        "tooltip-summary": "Enter a short summary",
        "pageinfo-category-pages": "Number of pages",
        "pageinfo-category-subcats": "Number of subcategories",
        "pageinfo-category-files": "Number of files",
+       "pageinfo-user-id": "User ID",
        "markaspatrolleddiff": "Mark as patrolled",
        "markaspatrolledlink": "[$1]",
        "markaspatrolledtext": "Mark this page as patrolled",
        "newimages-showbots": "Show uploads by bots",
        "newimages-hidepatrolled": "Hide patrolled uploads",
        "noimages": "Nothing to see.",
+       "gallery-slideshow-toggle": "Toggle thumbnails",
        "ilsubmit": "Search",
        "bydate": "by date",
        "sp-newimages-showfrom": "Show new files starting from $2, $1",
        "htmlform-cloner-create": "Add more",
        "htmlform-cloner-delete": "Remove",
        "htmlform-cloner-required": "At least one value is required.",
+       "htmlform-date-placeholder": "YYYY-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "YYYY-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "The value you specified is not a recognized date. Try using YYYY-MM-DD format.",
+       "htmlform-time-invalid": "The value you specified is not a recognized time. Try using HH:MM:SS format.",
+       "htmlform-datetime-invalid": "The value you specified is not a recognized date and time. Try using YYYY-MM-DD HH:MM:SS format.",
+       "htmlform-date-toolow": "The value you specified is before the earliest allowed date of $1.",
+       "htmlform-date-toohigh": "The value you specified is after the latest allowed date of $1.",
+       "htmlform-time-toolow": "The value you specified is before the earliest allowed time of $1.",
+       "htmlform-time-toohigh": "The value you specified is after the latest allowed time of $1.",
+       "htmlform-datetime-toolow": "The value you specified is before the earliest allowed date and time of $1.",
+       "htmlform-datetime-toohigh": "The value you specified is after the latest allowed date and time of $1.",
        "htmlform-title-badnamespace": "[[:$1]] is not in the \"{{ns:$2}}\" namespace.",
        "htmlform-title-not-creatable": "\"$1\" is not a creatable page title",
        "htmlform-title-not-exists": "$1 does not exist.",
        "htmlform-user-not-exists": "<strong>$1</strong> does not exist.",
        "htmlform-user-not-valid": "<strong>$1</strong> isn't a valid username.",
        "rawmessage": "$1",
-       "sqlite-has-fts": "$1 with full-text search support",
-       "sqlite-no-fts": "$1 without full-text search support",
        "logentry-delete-delete": "$1 {{GENDER:$2|deleted}} page $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|restored}} page $3",
        "logentry-delete-event": "$1 {{GENDER:$2|changed}} visibility of {{PLURAL:$5|a log event|$5 log events}} on $3: $4",
        "feedback-external-bug-report-button": "File a technical task",
        "feedback-dialog-title": "Submit feedback",
        "feedback-dialog-intro": "You can use the easy form below to submit your feedback. Your comment will be added to the page \"$1\", along with your username.",
-       "feedback-error-title": "Error",
        "feedback-error1": "Error: Unrecognized result from API",
        "feedback-error2": "Error: Edit failed",
        "feedback-error3": "Error: No response from API",
        "feedback-thanks": "Thanks! Your feedback has been posted to the page \"[$2 $1]\".",
        "feedback-thanks-title": "Thank you!",
        "feedback-useragent": "User agent:",
-       "searchsuggest-search": "Search",
+       "searchsuggest-search": "Search {{SITENAME}}",
        "searchsuggest-containing": "containing...",
        "api-error-autoblocked": "Your IP address has been blocked automatically, because it was used by a blocked user.",
        "api-error-badaccess-groups": "You are not permitted to upload files to this wiki.",
        "unlinkaccounts-success": "The account was unlinked.",
        "authenticationdatachange-ignored": "The authentication data change was not handled. Maybe no provider was configured?",
        "userjsispublic": "Please note: JavaScript subpages should not contain confidential data as they are viewable by other users.",
-       "usercssispublic": "Please note: CSS subpages should not contain confidential data as they are viewable by other users."
+       "usercssispublic": "Please note: CSS subpages should not contain confidential data as they are viewable by other users.",
+       "restrictionsfield-badip": "Invalid IP address or range: $1",
+       "restrictionsfield-label": "Allowed IP ranges:",
+       "restrictionsfield-help": "One IP address or CIDR range per line. To enable everything, use<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Error: $1",
+       "edit-error-long": "Errors:\n\n$1"
 }
index 8f93619..52bdc63 100644 (file)
@@ -48,7 +48,8 @@
                        "Zciric",
                        "Psychoslave",
                        "Orikrin1998",
-                       "Gamliel Fishkin"
+                       "Gamliel Fishkin",
+                       "Kastanoto"
                ]
        },
        "tog-underline": "Substrekado de ligiloj:",
@@ -76,7 +77,7 @@
        "tog-enotifminoredits": "Sendi al mi ankaŭ retmesaĝojn pro malgrandaj redaktoj de paĝoj kaj dosieroj",
        "tog-enotifrevealaddr": "Malkaŝi mian retadreson en informaj retpoŝtaĵoj",
        "tog-shownumberswatching": "Montri la nombron da priatentaj uzantoj",
-       "tog-oldsig": "Ekzistanta subskribo:",
+       "tog-oldsig": "Via ekzistanta subskribo:",
        "tog-fancysig": "Trakti subskribon kiel vikitekston (sen aŭtomata ligo)",
        "tog-uselivepreview": "Uzadi tujan antaŭrigardon",
        "tog-forceeditsummary": "Averti min kiam mi konservas malplenan redaktoresumon",
@@ -93,7 +94,7 @@
        "tog-showhiddencats": "Montri kaŝitajn kategoriojn",
        "tog-norollbackdiff": "Ne montri diferencon post plenumado de ŝanĝomalfaro",
        "tog-useeditwarning": "Averti min kiam mi forlasas redaktan paĝon kun nekonservitaj ŝanĝoj",
-       "tog-prefershttps": "Ĉiam uzu sekuran konekton ensalutite",
+       "tog-prefershttps": "Ĉiam uzi sekuran konekton ensalutite",
        "underline-always": "Ĉiam",
        "underline-never": "Neniam",
        "underline-default": "Pravaloro laŭ foliumilo",
        "newwindow": "(en nova fenestro)",
        "cancel": "Nuligi",
        "moredotdotdot": "Pli...",
-       "morenotlisted": "Ĉi tiu listo ne estas kompleta.",
+       "morenotlisted": "Ĉi tiu listo povas esti nekompleta.",
        "mypage": "Paĝo",
        "mytalk": "Diskuto",
        "anontalk": "Diskuto",
        "talk": "Diskuto",
        "views": "Vidoj",
        "toolbox": "Iloj",
+       "tool-link-userrights": "Ŝanĝi grupojn de ĉi tiu {{GENDER:$1|uzanto}}",
+       "tool-link-emailuser": "Sendi retpoŝton al ĉi tiu {{GENDER:$1|uzanto}}",
        "userpage": "Vidi uzantopaĝon",
        "projectpage": "Rigardi projektopaĝon",
        "imagepage": "Vidi dosieropaĝon",
        "ok": "Bone",
        "retrievedfrom": "Elŝutita el  \"$1\"",
        "youhavenewmessages": "{{PLURAL:$3|Vi havas}} $1 ($2).",
-       "youhavenewmessagesfromusers": "Vi havas {{PLURAL:$1|mesaĝon|$1 mesaĝojn}} de {{PLURAL:$3|alia uzanto|$3 uzantoj}} ($2).",
+       "youhavenewmessagesfromusers": "{{PLURAL:$4|Vi havas}} $1 de {{PLURAL:$3|alia uzanto|$3 uzantoj}} ($2).",
        "youhavenewmessagesmanyusers": "Riceviĝis $1 de multaj uzantoj ($2).",
-       "newmessageslinkplural": "{{PLURAL:$1|nova mesaĝo|999=novaj mesaĝoj}}",
+       "newmessageslinkplural": "{{PLURAL:$1|novan mesaĝon|999=novajn mesaĝojn}}",
        "newmessagesdifflinkplural": "$1 {{PLURAL:$1|ŝanĝo|ŝanĝoj}}",
        "youhavenewmessagesmulti": "Vi havas novajn mesaĝojn ĉe $1",
        "editsection": "redakti",
        "eauthentsent": "Konfirma retmesaĝo estis sendita al la nomita retadreso. Antaŭ ol iu ajn alia mesaĝo estos sendita al la konto, vi devos sekvi la instrukciojn en la mesaĝo por konfirmi ke la konto ja estas via.",
        "throttled-mailpassword": "Retpoŝto kun reŝargita pasvorto estis jam sendita ene de la {{PLURAL:$1|lasta horo|lastaj $1 horoj}}.\nPor preventi misuzon, nur unu reŝargita pasvorto estos sendita dum {{PLURAL:$1|horo|$1 horoj}}.",
        "mailerror": "Okazis eraro sendante retpoŝtaĵon: $1",
-       "acct_creation_throttle_hit": "Vizitintoj al ĉi tiu vikio uzintaj vian IP-adreson kreis {{PLURAL:$1|1 konton|$1 kontojn}} dum la lasta tago, {{PLURAL:$1|kiu|kiuj}} estas la maksimume permesita en ĉi tiu tempoperiodo.\nTial, vizitantoj kun ĉi tiu IP-adreso ne povas krei pliajn kontojn ĉi-momente.",
+       "acct_creation_throttle_hit": "Vizitintoj al ĉi tiu vikio uzintaj vian IP-adreson kreis {{PLURAL:$1|1 konton|$1 kontojn}} dum la lasta $2, kio estas la maksimumo permesita en ĉi tiu tempoperiodo.\nTial, vizitantoj kun ĉi tiu IP-adreso ne povas krei pliajn kontojn ĉi-momente.",
        "emailauthenticated": "Via retadreso estis konfirmita ekde $2 je $3.",
        "emailnotauthenticated": "Via retadreso ne jam estas aŭtentigata.\nNeniu retpoŝto estos sendita por iu el la jenaj funkcioj.",
        "noemailprefs": "Donu retpoŝtan adreson en viaj preferoj, por ke ĉi tiuj funkcioj estu je dispono.",
        "botpasswords-label-resetpassword": "Rekomencigi la pasvorton",
        "botpasswords-label-grants": "Uzeblaj permesdonoj:",
        "botpasswords-help-grants": "Ĉiu permesdono provizas aliron al listitaj uzantaj permisoj, kiujn uzantkonto jam havas. Vidu la [[Special:ListGrants|tabelon de permesdonoj]] por pli da informo.",
-       "botpasswords-label-restrictions": "Limigoj de uzado:",
        "botpasswords-label-grants-column": "Permeso donita",
        "botpasswords-bad-appid": "La robota nomo \"$1\" estas malvalida.",
        "botpasswords-insert-failed": "Aldono de la robota nomo \"$1\" ne sukcesis. Ĉu ĝi jam estis aldonita?",
        "invalid-content-data": "Enhavo estas malvalida",
        "content-not-allowed-here": "Enhavo de $1 ne estas permesita en paĝo [[$2]]",
        "editwarning-warning": "Forlaso de ĉi tiu paĝo kaŭzos al vi perdi iun ajn ŝanĝojn kiujn vi faris.\nSe vi estas ensalutinta, vi povas malŝalti ĉi tiun averton en la sekcio \"{{int:prefs-editing}}\" de viaj preferoj.",
+       "editpage-invalidcontentmodel-title": "Enhava modelo ne subtenata",
+       "editpage-invalidcontentmodel-text": "La enhava modelo \"$1\" ne estas subtenata.",
        "editpage-notsupportedcontentformat-title": "Nesubtenata enhavoformo",
        "editpage-notsupportedcontentformat-text": "La enhava aranĝo $1 ne estas subtenata de la enhava modelo $2.",
        "content-model-wikitext": "vikiteksto",
        "titlematches": "Trovitaj laŭ titolo",
        "textmatches": "Trovitaj laŭ enhavo",
        "notextmatches": "Neniu trovita laŭ enhavo",
-       "prevn": "{{PLURAL:$1|$1 antaŭa|$1 antaŭaj}}",
-       "nextn": "{{PLURAL:$1|$1 sekva|$1 sekvaj}}",
+       "prevn": "{{PLURAL:$1|$1 antaŭa|$1 antaŭaj}}n",
+       "nextn": "{{PLURAL:$1|$1 sekva|$1 sekvaj}}n",
        "prev-page": "antaŭa paĝo",
        "next-page": "sekva paĝo",
        "prevn-title": "{{PLURAL:$1|Antaŭa $1 rezulto|Antaŭaj $1 rezultoj}}",
        "nextn-title": "{{PLURAL:$1|Posta $1 rezulto|Postaj $1 rezultoj}}",
        "shown-title": "Montri {{PLURAL:$1|$1 rezulton|$1 rezultojn}} en paĝo",
-       "viewprevnext": "Montri ($1 {{int:pipe-separator}} $2) ($3).",
+       "viewprevnext": "Montri ($1 {{int:pipe-separator}} $2) ($3)",
        "searchmenu-exists": "'''Estas paĝo nomita \"[[:$1]]\" en ĉi tiu vikio'''",
        "searchmenu-new": "<strong>Krei la paĝon \"[[:$1]]\" en ĉi tiu vikio!</strong>{{PLURAL:$2|0=|Vidu ankaŭ la paĝon trovitan per via serĉo.|Vidu ankaŭ la trovitajn serĉrezultojn.}}",
        "searchprofile-articles": "Enhavaj paĝoj",
        "searchprofile-advanced-tooltip": "Serĉi en specialaj nomspacoj",
        "search-result-size": "$1 ({{PLURAL:$2|1 vorto|$2 vortoj}})",
        "search-result-category-size": "{{PLURAL:$1|1 membro|$1 membroj}} ({{PLURAL:$2|1 subkategorio|$2 subkategorioj}}, {{PLURAL:$3|1 dosiero|$3 dosieroj}})",
-       "search-redirect": "(alidirektilo $1)",
+       "search-redirect": "(aldirekto el $1)",
        "search-section": "(sekcio $1)",
        "search-category": "(kategorio $1)",
        "search-file-match": "(kongruas kun dosiera enhavo)",
        "prefs-watchlist": "Atentaro",
        "prefs-editwatchlist": "Redakti atentaron",
        "prefs-editwatchlist-label": "Redakti erojn de via atentaro:",
-       "prefs-editwatchlist-edit": "Montri kaj forigi erojn de vi atentaro",
+       "prefs-editwatchlist-edit": "Rigardi kaj forigi titolojn el via atentaro",
        "prefs-editwatchlist-raw": "Redakti krudan atentaron",
        "prefs-editwatchlist-clear": "Malplenigi vian atentaron",
        "prefs-watchlist-days": "Kiom da tagoj montriĝu en la atentaro:",
        "upload-dialog-disabled": "Alŝutoj de dosiero per ĉi tiun dialogon estas malfunkciigita sur ĉi tiu vikio.",
        "upload-dialog-title": "Alŝuti dosieron",
        "upload-dialog-button-cancel": "Nuligi",
+       "upload-dialog-button-back": "Reen",
        "upload-dialog-button-done": "Farite",
        "upload-dialog-button-save": "Konservi",
        "upload-dialog-button-upload": "Alŝuti",
        "notargettext": "Vi ne precizigis, kiun paĝon aŭ uzanton priumi.",
        "nopagetitle": "Nenia cela paĝo",
        "nopagetext": "La cela paĝo kiun vi enigis ne ekzistas.",
-       "pager-newer-n": "{{PLURAL:$1|pli nova 1|pli novaj $1}}",
-       "pager-older-n": "{{PLURAL:$1|pli malnova 1|pli malnovaj $1}}",
+       "pager-newer-n": "{{PLURAL:$1|pli novan 1|pli novajn $1}}",
+       "pager-older-n": "{{PLURAL:$1|pli malnovan 1|pli malnovajn $1}}",
        "suppress": "Forigu",
        "querypage-disabled": "Tiu ĉi speciala paĝo estas malfunkciigita pro rendimentaj kialoj.",
        "apihelp": "Helpo pri API",
        "apisandbox-results-fixtoken-fail": "Malsukcese venigis ĵetonon je \"$1\".",
        "apisandbox-alert-page": "Kampoj de ĉi tiu paĝo ne estas validaj.",
        "apisandbox-alert-field": "La valoro de ĉi tiu kampo ne estas valida.",
+       "apisandbox-continue": "Daŭrigi",
+       "apisandbox-continue-clear": "Vakigi",
        "booksources": "Librofontoj",
        "booksources-search-legend": "Serĉi librofontojn",
        "booksources-search": "Serĉi",
        "emailccsubject": "Kopio de via mesaĝo al $1: $2",
        "emailsent": "Retmesaĝo sendita",
        "emailsenttext": "Via retmesaĝo estas sendita.",
-       "emailuserfooter": "Ĉi tiun retpoŝton estis sendita far $1 al $2 per la funkcio \"{{int:emailuser}}\" el {{SITENAME}}.",
+       "emailuserfooter": "Ĉi tiu retpoŝtmesaĝo estis {{GENDER:$1|sendita}} de $1 al {{GENDER:$2|$2}} per la funkcio \"{{int:emailuser}}\" ĉe {{SITENAME}}.",
        "usermessage-summary": "Lasanta sisteman mesaĝon.",
        "usermessage-editor": "Mesaĝanto de sistemo",
        "watchlist": "Mia atentaro",
        "watchlist-hide": "Kaŝi",
        "watchlist-submit": "Montri",
        "wlshowtime": "Vidigenda tempodaŭro:",
-       "wlshowhideminor": "Etaj redaktoj",
-       "wlshowhidebots": "robotoj",
-       "wlshowhideliu": "registritaj uzantoj",
-       "wlshowhideanons": "anonimaj uzantoj",
+       "wlshowhideminor": "etajn redaktojn",
+       "wlshowhidebots": "robotojn",
+       "wlshowhideliu": "registritajn uzantojn",
+       "wlshowhideanons": "anonimajn uzantojn",
        "wlshowhidepatr": "patrolitaj redaktoj",
-       "wlshowhidemine": "miaj redaktoj",
-       "wlshowhidecategorization": "paĝa enkategoriigo.",
+       "wlshowhidemine": "miajn redaktojn",
+       "wlshowhidecategorization": "kategoriigon de paĝoj",
        "watchlist-options": "Opcioj por atentaro",
        "watching": "Aldonata al la atentaro...",
        "unwatching": "Malatentante...",
        "undeletedrevisions": "{{PLURAL:$1|1 versio restarigita|$1 versioj restarigitaj}}",
        "undeletedrevisions-files": "{{PLURAL:$1|1 versio|$1 versioj}} kaj {{PLURAL:$2|1 dosiero|$2 dosieroj}} restarigitaj",
        "undeletedfiles": "{{PLURAL:$1|1 dosiero restarigita|$1 dosieroj restarigitaj}}",
-       "cannotundelete": "Restarigo malsukcesis: \n$1",
+       "cannotundelete": "Iu aŭ ĉiuj restarigoj malsukcesis: \n$1",
        "undeletedpage": "'''$1 estis restarigita'''\n\nKonsultu la [[Special:Log/delete|deletion log]] por protokolo pri la lastatempaj forigoj kaj restarigoj.",
        "undelete-header": "Konsulti la [[Special:Log/delete|protokolo de forigoj]] por lastatempaj forigoj.",
        "undelete-search-title": "Serĉi forigitajn paĝojn",
        "isredirect": "alidirektilo",
        "istemplate": "inkludo",
        "isimage": "ligilo al dosiero",
-       "whatlinkshere-prev": "{{PLURAL:$1|antaŭa|antaŭaj $1}}",
-       "whatlinkshere-next": "{{PLURAL:$1|posta|postaj $1}}",
+       "whatlinkshere-prev": "{{PLURAL:$1|antaŭan|antaŭajn $1}}",
+       "whatlinkshere-next": "{{PLURAL:$1|postan|postajn $1}}",
        "whatlinkshere-links": "← ligiloj",
        "whatlinkshere-hideredirs": "$1 alidirektilojn",
-       "whatlinkshere-hidetrans": "$1 transinkluzivaĵojn",
+       "whatlinkshere-hidetrans": "$1 inkludojn",
        "whatlinkshere-hidelinks": "$1 ligilojn",
        "whatlinkshere-hideimages": "$1 dosieraj ligoj",
        "whatlinkshere-filters": "Filtriloj",
        "exportcuronly": "Entenas nur la aktualan version, ne la malnovajn.",
        "exportnohistory": "----\n'''Notu:''' Eksportado de la plena historio de paĝoj per ĉi paĝo estis malebligita pro funkciigaj kialoj.",
        "exportlistauthors": "Inkluzivi plenan liston de kontribuantoj por ĉiu paĝo.",
-       "export-submit": "Eksporti",
+       "export-submit": "Elporti",
        "export-addcattext": "Aldoni paĝojn el kategorio:",
        "export-addcat": "Aldoni",
        "export-addnstext": "Aldoni paĝojn de nomspaco:",
        "import-interwiki-sourcepage": "Fonta paĝo:",
        "import-interwiki-history": "Kopiu ĉiujn historiajn versiojn por ĉi tiu pago.",
        "import-interwiki-templates": "Inkluzivi ĉiujn ŝablonojn",
-       "import-interwiki-submit": "Importi",
+       "import-interwiki-submit": "Enporti",
        "import-mapping-default": "Importi al defaŭltaj lokoj",
        "import-mapping-namespace": "Importi en nomspacon:",
        "import-mapping-subpage": "Importi kiel subpaĝojn de la jena paĝo:",
        "pageinfo-article-id": "Paĝa identigo",
        "pageinfo-language": "Lingvo de paĝa enhavo",
        "pageinfo-content-model": "Modelo de paĝoenhavo",
+       "pageinfo-content-model-change": "ŝanĝi",
        "pageinfo-robot-policy": "Indeksado per robotoj",
        "pageinfo-robot-index": "Permesata",
        "pageinfo-robot-noindex": "Malpermesata",
        "pageinfo-category-pages": "Nombro de paĝoj",
        "pageinfo-category-subcats": "Nombro de subkategorioj",
        "pageinfo-category-files": "Nombro de dosieroj",
+       "pageinfo-user-id": "Identigilo de uzanto",
        "markaspatrolleddiff": "Marki kiel patrolitan",
        "markaspatrolledtext": "Marki ĉi tiun paĝon patrolita",
        "markaspatrolledtext-file": "Marki ĉi tiu versio de dosiero kiel patrolita",
        "tags-actions-header": "Agoj",
        "tags-active-yes": "Jes",
        "tags-active-no": "Ne",
-       "tags-source-extension": "Difinita de etendaĵo",
+       "tags-source-extension": "Difinita de la programo",
        "tags-source-manual": "Aldonita permane de uzantoj aŭ robotoj",
        "tags-source-none": "Ne plu uzata",
        "tags-edit": "redakti",
        "htmlform-cloner-create": "Aldoni plian",
        "htmlform-cloner-delete": "Forigi",
        "htmlform-cloner-required": "Almenaŭ unu valoro estas nepra.",
+       "htmlform-date-placeholder": "JJJJ-MM-TT",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "JJJJ-MM-TT HH:MM:SS",
        "htmlform-title-badnamespace": "[[:$1]] ne  estas en \"{{ns:$2}}\" nomspaco.",
        "htmlform-title-not-creatable": "\"$1\" estas nekreebla titolo por paĝo",
        "htmlform-title-not-exists": "$1 ne ekzistas.",
        "htmlform-user-not-exists": "<strong>$1</strong> ne ekzistas.",
        "htmlform-user-not-valid": "<strong>$1</strong> ne estas valida salutnomo.",
-       "sqlite-has-fts": "$1 kun tut-teksta subteno",
-       "sqlite-no-fts": "$1 sen tut-teksta subteno",
        "logentry-delete-delete": "$1 forigis paĝon $3",
        "logentry-delete-restore": "$1 restarigis paĝon $3",
        "logentry-delete-event": "$1 ŝanĝis videblecon de {{PLURAL:$5|protokola evento|$5 protokolaj eventoj}} je $3: $4",
        "logentry-newusers-autocreate": "Uzantokonto $1 estis {{GENDER:$2|kreita}} aŭtomate",
        "logentry-protect-move_prot": "$1 {{GENDER:$2|movis}} protektajn agordojn el $4 al $3",
        "logentry-protect-unprotect": "$1 {{GENDER:$2|forigis}} protekton el $3",
-       "logentry-protect-protect": "$1 {{GENDER:$2|protektis}} $3 $4",
+       "logentry-protect-protect": "$1 {{GENDER:$2|protektis}} la paĝon $3 $4",
        "logentry-protect-protect-cascade": "$1 {{GENDER:$2|protektis}} $3 $4 [rikure]",
        "logentry-protect-modify": "$1 {{GENDER:$2|ŝanĝis}} la nivelon de protekto de $3 $4",
        "logentry-protect-modify-cascade": "$1 {{GENDER:$2|ŝanĝis}} la nivelon de protekto de $3 $4 [rikure]",
        "feedback-external-bug-report-button": "Krei teĥnikan taskon",
        "feedback-dialog-title": "Sendi prijuĝajn rimarkojn",
        "feedback-dialog-intro": "Vi povas uzi suban simplan formularon por sendi viajn prijuĝajn rimarkojn. Via komento estos aldonita al la paĝo \"$1\" kun via uzanto-nomo.",
-       "feedback-error-title": "Eraro",
        "feedback-error1": "Eraro: Nerekonita rezulto de API",
        "feedback-error2": "Eraro: La redakto malsukcesis",
        "feedback-error3": "Eraro: Neniu respondo de API",
        "feedback-thanks": "Dankon! Via opinio-esprimo estis afiŝita al la paĝo \"[$2 $1]\".",
        "feedback-thanks-title": "Dankon!",
        "feedback-useragent": "Klienta aplikaĵo:",
-       "searchsuggest-search": "Serĉi",
+       "searchsuggest-search": "Serĉi tra {{SITENAME}}",
        "searchsuggest-containing": "enhavas...",
        "api-error-autoblocked": "Via IPa adreso estis blokita aŭtomate, ĉar ĝi estis uzita far forbara uzanto.",
        "api-error-badaccess-groups": "Vi ne havas permeson alŝuti dosierojn al tiu ĉi vikio.",
        "unlinkaccounts-success": "La konto estis malligita.",
        "authenticationdatachange-ignored": "La ŝanĝo de dateno pri aŭtentikigado ne estis traktita. Eble neniu provizanto estis agorda?",
        "userjsispublic": "Bonvolu noti: subpaĝoj en JavaScript ne enhavu konfidenciajn datumojn ĉar ili estas videblaj por aliaj uzantoj.",
-       "usercssispublic": "Bonvolu noti: subpaĝoj en CSS ne enhavu konfidenciajn datumojn ĉar ili estas videblaj por aliaj uzantoj."
+       "usercssispublic": "Bonvolu noti: subpaĝoj en CSS ne enhavu konfidenciajn datumojn ĉar ili estas videblaj por aliaj uzantoj.",
+       "edit-error-short": "Eraro: $1",
+       "edit-error-long": "Eraroj\n\n$1"
 }
index 1870222..7393b67 100644 (file)
                        "Copper12",
                        "Ivanhercaz",
                        "AlvaroMolina",
-                       "Tokvo"
+                       "Tokvo",
+                       "Irus",
+                       "Sophivorus"
                ]
        },
        "tog-underline": "Subrayar los enlaces:",
        "tog-enotifminoredits": "Notificarme también por correo electrónico los cambios menores de las páginas y archivos",
        "tog-enotifrevealaddr": "Revelar mi dirección de correo electrónico en los correos de notificación",
        "tog-shownumberswatching": "Mostrar el número de usuarios que la vigilan",
-       "tog-oldsig": "Firma actual:",
+       "tog-oldsig": "Tu firma actual:",
        "tog-fancysig": "Tratar la firma como wikitexto (sin un enlace automático)",
        "tog-uselivepreview": "Usar previsualización dinámica",
        "tog-forceeditsummary": "Avisarme cuando deje en blanco el resumen de la edición",
        "newwindow": "(se abre en una ventana nueva)",
        "cancel": "Cancelar",
        "moredotdotdot": "Más...",
-       "morenotlisted": "Esta lista no está completa.",
+       "morenotlisted": "Esta lista puede estar incompleta.",
        "mypage": "Página",
        "mytalk": "Discusión",
        "anontalk": "Discusión",
        "talk": "Discusión",
        "views": "Vistas",
        "toolbox": "Herramientas",
+       "tool-link-userrights": "Modificar grupos {{GENDER:$1|del usuario|de la usuaria}}",
+       "tool-link-emailuser": "Enviar un correo a {{GENDER:$1|este usuario|esta usuaria}}",
        "userpage": "Ver página de usuario",
        "projectpage": "Ver página del proyecto",
        "imagepage": "Ver página del archivo",
        "userlogin-remembermypassword": "Mantener mi sesión iniciada",
        "userlogin-signwithsecure": "Usar conexión segura",
        "cannotlogin-title": "No se puede iniciar sesión",
+       "cannotlogin-text": "No ha sido posible iniciar sesión.",
        "cannotloginnow-title": "No se puede iniciar sesión ahora",
        "cannotloginnow-text": "No se puede iniciar sesión cuando se usa $1.",
        "cannotcreateaccount-title": "No se pueden crear cuentas",
        "eauthentsent": "Se ha enviado un correo electrónico de confirmación a la dirección especificada.\nAntes de que se envíe cualquier otro correo a la cuenta tienes que seguir las instrucciones enviadas en el mensaje para así confirmar que la dirección te pertenece.",
        "throttled-mailpassword": "Ya se ha enviado un recordatorio de contraseña en {{PLURAL:$1|la última hora|las últimas $1 horas}}.\nPara evitar los abusos, solo se enviará un recordatorio de contraseña cada {{PLURAL:$1|hora|$1 horas}}.",
        "mailerror": "Error al enviar el mensaje: $1",
-       "acct_creation_throttle_hit": "Los visitantes a este wiki usando tu dirección IP han creado {{PLURAL:$1|una cuenta|$1 cuentas}} en el último día, lo cual es lo máximo permitido en este periodo de tiempo.\nComo resultado, los visitantes usando esta dirección IP no pueden crear más cuentas en este momento.",
+       "acct_creation_throttle_hit": "Por medio de tu dirección IP ya {{PLURAL:$1|se ha creado una cuenta|se han creado $1 cuentas}} durante $2, lo cual es lo máximo permitido por este período de tiempo.\nPor este motivo, desde esta dirección IP no se pueden crear más cuentas por el momento.",
        "emailauthenticated": "Tu dirección de correo electrónico fue confirmada el $2 a las $3.",
        "emailnotauthenticated": "Aún no has confirmado tu dirección de correo electrónico.\nHasta que lo hagas, las siguientes funciones no estarán disponibles.",
        "noemailprefs": "Especifica una dirección electrónica para habilitar estas características.",
        "botpasswords-label-resetpassword": "Restablecer la contraseña",
        "botpasswords-label-grants": "Permisos aplicables:",
        "botpasswords-help-grants": "Cada concesión le da acceso a los permisos listados que el usuario ya posea. Véase la [[Special:ListGrants|lista de concesiones]] para más información.",
-       "botpasswords-label-restrictions": "Restricciones de uso:",
        "botpasswords-label-grants-column": "Concedido",
        "botpasswords-bad-appid": "El nombre del bot \"$1\" no es válido.",
        "botpasswords-insert-failed": "No se pudo agregar el nombre del bot \"$1\". ¿Ya ha sido añadido?",
        "botpasswords-updated-body": "Se actualizó la contraseña del bot llamado \"$1\" del usuario \"$2\".",
        "botpasswords-deleted-title": "Se eliminó la contraseña de bot",
        "botpasswords-deleted-body": "Se eliminó la contraseña del bot llamado \"$1\" del usuario \"$2\".",
-       "botpasswords-newpassword": "La nueva contraseña para iniciar sesión con <strong>$1</strong> es <strong>$2</strong>. <em>Conserva estos datos para usos futuros.</em>",
+       "botpasswords-newpassword": "La contraseña nueva para acceder con <strong>$1</strong> es <strong>$2</strong>. <em>Guarda esta información para su consulta futura.</em> <br> (En caso de robots antiguos que requieren que el nombre de acceso coincida con el de usuario, también puedes utilizar <strong>$3</strong> como nombre de usuario y <strong>$4</strong> como contraseña.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider no está disponible.",
        "botpasswords-restriction-failed": "Las restricciones de la contraseña de bot impiden este inicio de sesión.",
        "botpasswords-invalid-name": "El nombre de usuario especificado no contiene el separador de contraseña de bot (\"$1\").",
        "passwordreset-emailelement": "Nombre de {{GENDER:$1|usuario|usuaria}}: \n$1\n\nContraseña temporal: \n$2",
        "passwordreset-emailsentemail": "Si esta dirección de correo electrónico está asociada a tu cuenta, entonces se enviará un correo electrónico para restablecer la contraseña.",
        "passwordreset-emailsentusername": "Si existe una dirección de correo electrónico asociada a este nombre de usuario, entonces se enviará un correo para restablecer la contraseña.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|El e-mail de restablecimiento de contraseña ha sido enviado|Los e-mails de restablecimiento de contraseña han sido enviados}}. {{PLURAL:$1|El nombre de usuario y la contraseña se muestra a continuación|La lista de nombres de usuarios y contraseñas se muestra a continuación}}.",
-       "passwordreset-emailerror-capture2": "No fue posible mandar un correo electrónico {{Gender:$2|al usuario|a la usuaria}}: $1 {{PLURAL:$3|El nombre de usuario y la contraseña|La lista de nombres de usuarios y contraseñas}} se muestra a continuación.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Se ha enviado el mensaje de restablecimiento de contraseña|Se han enviado los mensajes de restablecimiento de contraseña}}. {{PLURAL:$1|El nombre de usuario y la contraseña|La lista de nombres de usuarios y contraseñas}} se muestra aquí.",
+       "passwordreset-emailerror-capture2": "No fue posible mandar un correo electrónico {{GENDER:$2|al usuario|a la usuaria}}: $1 {{PLURAL:$3|El nombre de usuario y la contraseña|La lista de nombres de usuarios y contraseñas}} se muestra aquí.",
        "passwordreset-nocaller": "Debe de proporcionarse un interlocutor",
        "passwordreset-nosuchcaller": "La persona que llama no existe: $1",
        "passwordreset-ignored": "No se logró el reestablecimiento de la contraseña. ¿Tal vez no se configuró un proveedor?",
        "accmailtext": "Se ha enviado a $2 una contraseña generada aleatoriamente para [[User talk:$1|$1]]. Una vez iniciada la sesión, se puede cambiar en la página [[Special:ChangePassword|destinada para ello]].",
        "newarticle": "(Nuevo)",
        "newarticletext": "Has seguido un enlace a una página que aún no existe.\nPara crear esta página, escribe en el cuadro que aparece a continuación. Para más información, consulta la [$1 página de ayuda].\nSi llegaste aquí por error, vuelve a la página anterior.",
-       "anontalkpagetext": "----\n<em>Esta es la página de discusión de un usuario anónimo que aún no ha creado una cuenta, o no la usa.</em>\nPor lo tanto, tenemos que usar su dirección IP para identificarlo.\nPuede que varios usuarios compartan una misma dirección IP.\nSi eres un usuario anónimo y crees que se han dirigido a ti con comentarios improcedentes, [[Special:CreateAccount|crea una cuenta]] o [[Special:UserLogin|inicia sessión]] para evitar confusiones futuras con otros usuarios anónimos.",
+       "anontalkpagetext": "----\n<em>Esta es la página de discusión de un usuario anónimo que aún no ha creado una cuenta, o no la usa.</em>\nPor lo tanto, tenemos que usar su dirección IP para identificarlo.\nPuede que varios usuarios compartan una misma dirección IP.\nSi eres un usuario anónimo y crees que se han dirigido a ti con comentarios improcedentes, [[Special:CreateAccount|crea una cuenta]] o [[Special:UserLogin|inicia sesión]] para evitar confusiones futuras con otros usuarios anónimos.",
        "noarticletext": "En este momento no hay texto en esta página.\nPuedes [[Special:Search/{{PAGENAME}}|buscar el título de esta página]] en otras páginas,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} buscar en los registros relacionados],\no [{{fullurl:{{FULLPAGENAME}}|action=edit}} crear esta página]</span>.",
        "noarticletext-nopermission": "Actualmente no hay texto en esta página.\nPuedes [[Special:Search/{{PAGENAME}}|buscar este título de página]] en otras páginas, o <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} buscar en los registros relacionados]</span>, pero no tienes permiso para crear esta página.",
        "missing-revision": "La revisión n.º $1 de la página «{{FULLPAGENAME}}» no existe.\n\nEsto suele ocurrir cuando se sigue un enlace de historial obsoleto que apunta a una página ya borrada.\nPuedes encontrar detalles en el [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} registro de borrados].",
        "invalid-content-data": "Datos de contenido incorrectos",
        "content-not-allowed-here": "El contenido «$1» no está permitido en la página [[$2]]",
        "editwarning-warning": "Se perderán los cambios si se cierra esta página.\nSi has iniciado sesión, puedes desactivar este aviso en la sección «{{int:prefs-editing}}» de las preferencias.",
+       "editpage-invalidcontentmodel-title": "Modelo de contenido no admitido",
+       "editpage-invalidcontentmodel-text": "El modelo de contenido «$1» no se admite.",
        "editpage-notsupportedcontentformat-title": "Formato de contenido no compatible",
        "editpage-notsupportedcontentformat-text": "El formato de contenido $1 no es compatible con el modelo de contenido $2.",
        "content-model-wikitext": "texto wiki",
        "mergehistory": "Fusionar historiales",
        "mergehistory-header": "Esta página te permite fusionar revisiones del historial de una página origen con los de otra más reciente.\nAsegúrate de que los cambios mantendrán la continuidad histórica de la página.",
        "mergehistory-box": "Fusionar los historiales de dos páginas:",
-       "mergehistory-from": "Página origen:",
+       "mergehistory-from": "Página de origen:",
        "mergehistory-into": "Página destino:",
        "mergehistory-list": "Historial de ediciones fusionable",
        "mergehistory-merge": "Las siguientes revisiones de [[:$1]] pueden fusionarse con las de [[:$2]].\nUsa la columna de casillas para fusionar sólo las revisiones creadas en y antes de la fecha especificada.\nTen en cuenta que si cambias de página, se borrará la selección actual de esta columna.",
        "searchprofile-advanced-tooltip": "Buscar en espacios de nombres personalizados",
        "search-result-size": "$1 ({{PLURAL:$2|1 palabra|$2 palabras}})",
        "search-result-category-size": "{{PLURAL:$1|1 miembro|$1 miembros}} ({{PLURAL:$2|1 subcategoría|$2 subcategorías}}, {{PLURAL:$3|1 archivo|$3 archivos}})",
-       "search-redirect": "(redirige desde $1)",
+       "search-redirect": "(redirección desde $1)",
        "search-section": "(sección $1)",
        "search-category": "(categoría $1)",
        "search-file-match": "(coincide con el contenido del archivo)",
        "enhancedrc-history": "historial",
        "recentchanges": "Cambios recientes",
        "recentchanges-legend": "Opciones sobre cambios recientes",
-       "recentchanges-summary": "Sigue los cambios más recientes de la wiki en esta página.",
+       "recentchanges-summary": "Sigue los cambios más recientes del wiki en esta página.",
        "recentchanges-noresult": "No hubo cambios que respondan a esos criterios durante el período seleccionado.",
        "recentchanges-feed-description": "Realiza un seguimiento de los cambios más recientes en el wiki con este canal.",
        "recentchanges-label-newpage": "Esta edición creó una página",
        "upload-dialog-disabled": "En este wiki están desactivadas las subidas de archivos mediante este cuadro de diálogo.",
        "upload-dialog-title": "Subir archivo",
        "upload-dialog-button-cancel": "Cancelar",
+       "upload-dialog-button-back": "Volver",
        "upload-dialog-button-done": "Hecho",
        "upload-dialog-button-save": "Guardar",
        "upload-dialog-button-upload": "Subir",
        "querypage-disabled": "Esta página especial está deshabilitada por motivos de rendimiento.",
        "apihelp": "Ayuda de la API",
        "apihelp-no-such-module": "No se encontró el módulo \"$1\".",
-       "apisandbox": "Zona de pruebas API",
+       "apisandbox": "Zona de pruebas de la API",
        "apisandbox-jsonly": "Se requiere JavaScript para utilizar la zona de pruebas de API.",
        "apisandbox-api-disabled": "La API está desactivada en este sitio.",
        "apisandbox-intro": "Usa esta página para experimentar con la <strong>API de servicio web de MediaWiki</strong>.\nPara más detalles sobre el uso de la API, visita [[mw:API:Main page|su documentación]]. Ejemplo: [https://www.mediawiki.org/wiki/API#A_simple_example obtener el contenido de una Página principal]. Selecciona una acción para ver más ejemplos.\n\nObserva que, aunque sea una página de pruebas, las acciones que realices en esta página pueden modificar el wiki.",
        "apisandbox-results-fixtoken-fail": "No fue posible recuperar el token \"$1\".",
        "apisandbox-alert-page": "Los campos de esta página no son válidos.",
        "apisandbox-alert-field": "El valor de este campo no es válido.",
+       "apisandbox-continue": "Continuar",
+       "apisandbox-continue-clear": "Vaciar",
        "booksources": "Fuentes de libros",
        "booksources-search-legend": "Buscar fuentes de libros",
        "booksources-search": "Buscar",
        "undeletedrevisions": "{{PLURAL:$1|Una revisión restaurada|$1 revisiones restauradas}}",
        "undeletedrevisions-files": "{{PLURAL:$1|1 revisión|$1 revisiones}} y {{PLURAL:$2|1 archivo|$2 archivos}} restaurados",
        "undeletedfiles": "$1 {{PLURAL:$1|archivo restaurado|archivos restaurados}}",
-       "cannotundelete": "Hubo un error durante la restauración:\n$1",
+       "cannotundelete": "Hubo un error en la totalidad o en parte del proceso de la restauración:\n$1",
        "undeletedpage": "<strong>Se ha restaurado $1</strong>\n\nConsulta el [[Special:Log/delete|registro de borrados]] para ver una lista de los últimos borrados y restauraciones.",
        "undelete-header": "En el [[Special:Log/delete|registro de borrados]] se listan las páginas eliminadas.",
        "undelete-search-title": "Buscar páginas borradas",
        "movelogpagetext": "Abajo se encuentra una lista de páginas trasladadas.",
        "movesubpage": "{{PLURAL:$1|Subpágina|Subpáginas}}",
        "movesubpagetext": "Esta página tiene {{PLURAL:$1|la siguiente subpágina|las siguientes $1 subpáginas}}:",
+       "movesubpagetalktext": "La página de discusión tiene $1 {{PLURAL:$1|subpágina que se muestra|subpáginas que se muestran}} a continuación.",
        "movenosubpage": "Esta página no tiene subpáginas.",
        "movereason": "Motivo:",
        "revertmove": "revertir",
        "pageinfo-category-pages": "Número de páginas",
        "pageinfo-category-subcats": "Número de subcategorías",
        "pageinfo-category-files": "Número de archivos",
+       "pageinfo-user-id": "Identificador de usuario",
        "markaspatrolleddiff": "Marcar como verificada",
        "markaspatrolledtext": "Marcar esta página como verificada",
        "markaspatrolledtext-file": "Marcar esta versión de archivo como verificada",
        "tag-filter": "Filtro de [[Special:Tags|etiquetas]]:",
        "tag-filter-submit": "Filtro",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etiqueta|Etiquetas}}]]: $2)",
+       "tag-mw-contentmodelchange": "cambio de modelo de contenido",
+       "tag-mw-contentmodelchange-description": "Ediciones que [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel cambian el modelo de contenido] de una página",
        "tags-title": "Etiquetas",
        "tags-intro": "Esta página lista las etiquetas con las que el software puede marcar una edición y su significado.",
        "tags-tag": "Nombre de etiqueta",
        "tags-actions-header": "Acciones",
        "tags-active-yes": "Sí",
        "tags-active-no": "No",
-       "tags-source-extension": "Definida por una extensión",
+       "tags-source-extension": "Definida por el software",
        "tags-source-manual": "Aplicada manualmente por usuarios y bots",
        "tags-source-none": "No se utiliza más",
        "tags-edit": "editar",
        "htmlform-cloner-create": "Añadir más",
        "htmlform-cloner-delete": "Eliminar",
        "htmlform-cloner-required": "Se requiere al menos un valor.",
+       "htmlform-date-placeholder": "AAAA-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "AAAA-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "No se reconoció la fecha en el formato proporcionado. Prueba a usar el formato AAAA-MM-DD.",
+       "htmlform-time-invalid": "No se reconoció la hora en el formato proporcionado. Prueba a usar el formato HH:MM:SS.",
+       "htmlform-datetime-invalid": "No se reconoció la fecha y la hora en el formato proporcionado. Prueba a usar el formato AAAA-MM-DD HH:MM:SS.",
+       "htmlform-date-toolow": "El valor especificado es anterior a la fecha más antigua permitida, $1.",
+       "htmlform-date-toohigh": "El valor especificado es posterior a la fecha límite permitida, $1.",
+       "htmlform-time-toolow": "El valor especificado es anterior a la hora más antigua permitida, $1.",
+       "htmlform-time-toohigh": "El valor especificado es posterior a la hora límite permitida, $1.",
+       "htmlform-datetime-toolow": "El valor especificado es anterior a la fecha y hora más antigua permitidas, $1.",
+       "htmlform-datetime-toohigh": "El valor especificado es posterior a la fecha y hora límite permitidas, $1.",
        "htmlform-title-badnamespace": "[[:$1]] no está en el espacio de nombres \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" no es un título de página que se pueda crear",
        "htmlform-title-not-exists": "$1 no existe.",
        "htmlform-user-not-exists": "<strong>$1</strong> no existe.",
        "htmlform-user-not-valid": "<strong>$1</strong> no es un nombre de usuario válido.",
-       "sqlite-has-fts": "$1 con soporte para búsqueda de texto completo",
-       "sqlite-no-fts": "$1 sin soporte para búsqueda de texto completo",
        "logentry-delete-delete": "$1 {{GENDER:$2|borró}} la página $3",
        "logentry-delete-restore": "$1 restauró la página «$3»",
        "logentry-delete-event": "$1 {{GENDER:$2|modificó}} la visibilidad de {{PLURAL:$5|un evento|$5 eventos}} del registro en $3: $4",
        "logentry-patrol-patrol": "$1 {{GENDER:$2|marcó}} la revisión $4 de la página $3 como verificada",
        "logentry-patrol-patrol-auto": "$1 {{GENDER:$2|marcó}} automáticamente la revisión $4 de la página $3 como verificada",
        "logentry-newusers-newusers": "La cuenta de usuario $1 ha sido {{GENDER:$2|creada}}",
-       "logentry-newusers-create": "Se ha {{GENDER:$2|creado}} la cuenta de usuario $1",
+       "logentry-newusers-create": "Se ha {{GENDER:$2|creado}} la cuenta de {{GENDER:$4|usuario|usuaria}} $1",
        "logentry-newusers-create2": "La cuenta de usuario $3 ha sido {{GENDER:$2|creada}} por $1",
        "logentry-newusers-byemail": "La cuenta de usuario $3 ha sido {{GENDER:$2|creada}} por $1 y la contraseña ha sido enviada por correo",
-       "logentry-newusers-autocreate": "La cuenta $1 se {{GENDER:$2|creó}} automáticamente",
+       "logentry-newusers-autocreate": "Se ha {{GENDER:$2|creado}} automáticamente la cuenta de {{GENDER:$4|usuario|usuaria}} $1",
        "logentry-protect-move_prot": "$1 {{GENDER:$2|trasladó}} las preferencias de protección de $4 a $3",
        "logentry-protect-unprotect": "$1 {{GENDER:$2|eliminó}} la protección de $3",
-       "logentry-protect-protect": "$1 {{GENDER:$2|protegió}} $3 $4",
+       "logentry-protect-protect": "$1 {{GENDER:$2|protegió}} $3 $4",
        "logentry-protect-protect-cascade": "$1 {{GENDER:$2|protegió}} a $3 $4 [en cascada]",
        "logentry-protect-modify": "$1 {{GENDER:$2|cambió}} el nivel de protección de $3 $4",
        "logentry-protect-modify-cascade": "$1 {{GENDER:$2|cambió}} el nivel de protección de $3 $4 [en cascada]",
        "feedback-external-bug-report-button": "Enviar una tarea técnica",
        "feedback-dialog-title": "Enviar comentarios",
        "feedback-dialog-intro": "Puedes usar el formulario sencillo debajo para enviar tus comentarios. Ellos se agregarán a la página \"$1\", junto con tu nombre de usuario.",
-       "feedback-error-title": "Error",
        "feedback-error1": "Error: No se reconoce resultado de API",
        "feedback-error2": "Error: Falló la edición",
        "feedback-error3": "Error: No hay respuesta de la API",
        "feedback-thanks": "¡Gracias! Tus comentarios se han publicado en la página \"[$2 $1]\".",
        "feedback-thanks-title": "¡Muchas gracias!",
        "feedback-useragent": "Agente de usuario:",
-       "searchsuggest-search": "Buscar",
+       "searchsuggest-search": "Buscar en {{SITENAME}}",
        "searchsuggest-containing": "que contiene...",
        "api-error-autoblocked": "Tu dirección IP ha sido bloqueada automáticamente porque fue utilizada por un usuario bloqueado.",
        "api-error-badaccess-groups": "No puedes cargar archivos en este wiki.",
        "unlinkaccounts-success": "Se ha desvinculado la cuenta.",
        "authenticationdatachange-ignored": "El cambio den los datos de autentificacion no fue realizado. ¿Tal vez, no se configuró un proveedor?",
        "userjsispublic": "Recuerda: las subpáginas JavaScript no deberían contener datos confidenciales, pues otros usuarios los pueden ver.",
-       "usercssispublic": "Recuerda: las subpáginas CSS no deberían contener datos confidenciales, pues otros usuarios los pueden ver."
+       "usercssispublic": "Recuerda: las subpáginas CSS no deberían contener datos confidenciales, pues otros usuarios los pueden ver.",
+       "restrictionsfield-badip": "Dirección o intervalo IP no válidos: $1",
+       "restrictionsfield-label": "Intervalos de IP permitidos:",
+       "restrictionsfield-help": "Una dirección IP o intervalo de CIDR por renglón. Para activar todo, utiliza<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Error: $1",
+       "edit-error-long": "Errores:\n\n$1"
 }
index d544a4e..eaa4754 100644 (file)
@@ -28,7 +28,8 @@
                        "Purodha",
                        "Macofe",
                        "Adeliine",
-                       "Metsavend"
+                       "Metsavend",
+                       "Cumbril"
                ]
        },
        "tog-underline": "Linkide allakriipsutus:",
        "newwindow": "(avaneb uues aknas)",
        "cancel": "Loobu",
        "moredotdotdot": "Veel...",
-       "morenotlisted": "See loend pole täielik.",
+       "morenotlisted": "See loend võib olla ebatäielik.",
        "mypage": "Minu lehekülg",
        "mytalk": "Arutelu",
        "anontalk": "Arutelu",
        "talk": "Arutelu",
        "views": "vaatamisi",
        "toolbox": "Tööriistad",
+       "tool-link-userrights": "Muuda {{GENDER:$1|kasutajarühmi}}",
+       "tool-link-emailuser": "Saada {{GENDER:$1|kasutajale}} e-kiri",
        "userpage": "Vaata kasutajalehekülge",
        "projectpage": "Vaata projektilehekülge",
        "imagepage": "Vaata faililehekülge",
        "databaseerror-error": "Tõrge: $1",
        "transaction-duration-limit-exceeded": "Selleks et vältida tiražeerimise suurt mahajäämust, on see tehing katkestatud, kuna kirjutamise kestus ($1) ületas {{PLURAL:$2|$2}} sekundi piirangut.\nKui muudad korraga palju üksusi, siis proovi selle asemel teha mitu väiksemat toimingut.",
        "laggedslavemode": "Hoiatus: Leheküljel võivad puududa viimased uuendused.",
-       "readonly": "Andmebaas on hetkel kirjutuskaitse all",
+       "readonly": "Andmebaas lukustatud",
        "enterlockreason": "Sisesta lukustamise põhjus ning juurdepääsu taastamise ligikaudne aeg",
        "readonlytext": "Andmebaas on praegu lukustatud. Uusi sissekandeid ja muid muudatusi ei saa teha. Tõenäoliselt toimub andmebaasi plaanipärane hooldus, mille järel tavaline olukord taastub.\nSüsteemiadministraator, kes andmebaasi lukustas, andis järgmise selgituse: $1",
        "missing-article": "Andmebaas ei leidnud küsitud lehekülje \"$1\" $2 teksti.\n\nPõhjuseks võib olla võrdlus- või ajaloolink kustutatud leheküljele.\n\nKui tegemist ei ole nimetatud olukorraga, võib tegu olla ka süsteemi veaga.\nSellisel juhul tuleks teavitada [[Special:ListUsers/sysop|administraatorit]], edastades talle ka käesoleva lehe internetiaadressi.",
        "internalerror-fatal-exception": "Saatuslik erandtöötluse tõrge: $1",
        "filecopyerror": "Ei saanud faili \"$1\" kopeerida nimega \"$2\".",
        "filerenameerror": "Ei saanud faili \"$1\" failiks \"$2\" ümber nimetada.",
-       "filedeleteerror": "Faili nimega \"$1\" ei ole võimalik kustutada.",
+       "filedeleteerror": "Faili \"$1\" ei õnnestunud kustutada.",
        "directorycreateerror": "Kataloogi \"$1\" ei saanud luua.",
        "directoryreadonlyerror": "Kataloog \"$1\" on kirjutuskaitstud.",
        "directorynotreadableerror": "Kataloog \"$1\" pole loetav.",
        "myprivateinfoprotected": "Sul pole lubatud oma eraandmeid redigeerida.",
        "mypreferencesprotected": "Sul pole lubatud oma eelistusi muuta.",
        "ns-specialprotected": "Erilehekülgi ei saa redigeerida.",
-       "titleprotected": "Kasutaja [[User:$1|$1]] on selle pealkirjaga lehe loomise keelanud esitades järgmise põhjenduse: <em>$2</em>.",
+       "titleprotected": "Kasutaja [[User:$1|$1]] on selle pealkirjaga lehekülje loomise keelanud, esitades järgmise põhjenduse: <em>$2</em>.",
        "filereadonlyerror": "Faili \"$1\" ei saa muuta, sest hoidla \"$2\" on kirjutuskaitstud.\n\nSüsteemiadministraator lukustas selle järgmisel põhjusel: \"$3\".",
        "invalidtitle-knownnamespace": "Vigane pealkiri nimeruumis \"$2\" tekstiga \"$3\"",
        "invalidtitle-unknownnamespace": "Vigane pealkiri nimeruuminumbriga $1 ja tekstiga \"$2\"",
        "password-change-forbidden": "Selles vikis ei saa paroole muuta.",
        "externaldberror": "Esines autentimistõrge või sul pole õigust konto andmeid muuta.",
        "login": "Sisselogimine",
+       "login-security": "Identsuskontroll",
        "nav-login-createaccount": "Logi sisse või registreeru kasutajaks",
        "userlogin": "Sisselogimine või kasutajakonto loomine",
        "userloginnocreate": "Sisselogimine",
        "userlogin-resetpassword-link": "Kas unustasid parooli?",
        "userlogin-helplink2": "Sisselogimisabi",
        "userlogin-loggedin": "Oled juba sisse logitud nimega {{GENDER:$1|$1}}.\nKasuta allolevat vormi, et logida sisse teise kasutajaga.",
+       "userlogin-reauth": "Pead uuesti sisse logima tõestamaks, et oled {{GENDER:$1|$1}}.",
        "userlogin-createanother": "Loo teine konto",
        "createacct-emailrequired": "E-posti aadress",
        "createacct-emailoptional": "E-posti aadress (valikuline)",
        "eauthentsent": "Määratud e-posti aadressile on saadetud kinnituse e-kiri.\nEnne kui su kontole ükskõik milline muu e-kiri saadetakse, pead e-kirjas olevat juhist järgides kinnitama, et konto on tõepoolest sinu.",
        "throttled-mailpassword": "Parooli lähtestamise e-kiri saadetud viimase {{PLURAL:$1|tunni|$1 tunni}} jooksul.\nVäärtarvitamise vältimiseks saadetakse {{PLURAL:$1|tunni|$1 tunni}} jooksul ainult üks lähtestamise e-kiri.",
        "mailerror": "Viga kirja saatmisel: $1",
-       "acct_creation_throttle_hit": "Selle viki külastajad, kes kasutavad sinu IP-aadressi, on viimase ööpäeva jooksul loonud {{PLURAL:$1|ühe konto|$1 kontot}}, mis on selles ajavahemikus ülemmääraks.\nSeetõttu ei saa seda IP-aadressi kasutades hetkel rohkem kontosid luua.",
+       "acct_creation_throttle_hit": "Selle viki külastajad, kes kasutavad sinu IP-aadressi, on viimase $2 jooksul loonud {{PLURAL:$1|ühe konto|$1 kontot}}, mis on selles ajavahemikus ülemmääraks.\nSeetõttu ei saa seda IP-aadressi kasutades hetkel rohkem kontosid luua.",
        "emailauthenticated": "Sinu e-posti aadressi kinnitamisaeg: $2 kell $3.",
        "emailnotauthenticated": "Sinu e-posti aadress pole veel kinnitatud.\nJärgmiste funktsioonidega seotud e-kirju ei saadeta.",
        "noemailprefs": "Järgmiste võimaluste toimimiseks on vaja määrata e-posti aadress.",
        "resetpass-temp-password": "Ajutine parool:",
        "resetpass-abort-generic": "Tarkvaralisa on paroolimuudatuse abortinud.",
        "resetpass-expired": "Sinu parool on iganenud. Palun määra uus parool, et sisse logida.",
-       "resetpass-expired-soft": "Sinu parool on iganenud ja tuleb uuesti määrata. Palun vali kohe uus parool või klõpsa \"{{int:authprovider-resetpass-skip-label}}\", et määrata see hiljem.",
-       "resetpass-validity-soft": "Sinu parool ei sobi: $1\n\nPalun vali kohe uus parool või klõpsa \"{{int:authprovider-resetpass-skip-label}}\", et see hiljem uuesti määrata.",
+       "resetpass-expired-soft": "Sinu parool on iganenud ja tuleb uuesti määrata. Palun vali kohe uus parool või klõpsa nuppu \"{{int:authprovider-resetpass-skip-label}}\", et määrata see hiljem.",
+       "resetpass-validity-soft": "Sinu parool ei sobi: $1\n\nPalun vali kohe uus parool või klõpsa nuppu \"{{int:authprovider-resetpass-skip-label}}\", et see hiljem uuesti määrata.",
        "passwordreset": "Parooli lähtestamine",
        "passwordreset-text-one": "Täida see vorm, et oma parool lähtestada.",
        "passwordreset-text-many": "{{PLURAL:$1|Täida üks väljadest, et saada e-kiri ajutise parooliga.}}",
        "searchprofile-advanced-tooltip": "Otsi kohandatud nimeruumidest",
        "search-result-size": "$1 ({{PLURAL:$2|1 sõna|$2 sõna}})",
        "search-result-category-size": "{{PLURAL:$1|1 lehekülg|$1 lehekülge}} ({{PLURAL:$2|1 alamkategooria|$2 alamkategooriat}}, {{PLURAL:$3|1 fail|$3 faili}})",
-       "search-redirect": "(ümbersuunamine $1)",
+       "search-redirect": "(ümbersuunamine lehelt $1)",
        "search-section": "(alaosa $1)",
        "search-category": "(kategooria \"$1\")",
        "search-file-match": "(vastab faili sisule)",
        "right-managechangetags": "Koostada ja (in)aktiveerida [[Special:Tags|märgiseid]]",
        "right-applychangetags": "Rakendada [[Special:Tags|märgiseid]] enda muudatuste suhtes",
        "right-changetags": "Lisada ja eemaldada käsitsi rakendatavaid [[Special:Tags|märgiseid]] üksikute redaktsioonide ja logisissekannete juures",
+       "right-deletechangetags": "Kustutada andmebaasist [[Special:Tags|märgiseid]]",
        "grant-group-page-interaction": "Interaktsioon lehekülgedega",
        "grant-group-file-interaction": "Interaktsioon meediafailidega",
        "grant-group-watchlist-interaction": "Interaktsioon sinu jälgimisloendiga",
        "changecontentmodel-title-label": "Lehekülje pealkiri",
        "changecontentmodel-model-label": "Uus sisumudel",
        "changecontentmodel-reason-label": "Põhjus:",
+       "changecontentmodel-submit": "Muuda",
        "changecontentmodel-success-title": "Sisumudel on muudetud",
        "changecontentmodel-success-text": "Lehekülje [[:$1]] sisumudel on muudetud.",
        "changecontentmodel-cannot-convert": "Lehekülje [[:$1]] sisumudelit ei saa teisendada tüübiks $2.",
        "undeletehistorynoadmin": "See lehekülg on kustutatud.\nKustutamise põhjus ning selle lehekülje kustutamiseelne redigeerimislugu on näha allolevas kokkuvõttes.\nLehekülje kustutamiseelsed redaktsioonid on kättesaadavad ainult administraatoritele.",
        "undelete-revision": "Lehekülje $1 kustutatud redaktsioon, mille autor on $3, seisuga $4, kell $5.",
        "undeleterevision-missing": "Vigane või puuduv redaktsioon.\nLink võib olla kõlbmatu või redaktsioon võib olla taastatud või arhiivist eemaldatud.",
+       "undeleterevision-duplicate-revid": "{{PLURAL:$1|Üht|$1}} redaktsiooni ei saanud taastada, sest {{PLURAL:$1|selle|nende}} <code>rev_id</code> oli juba kasutuses.",
        "undelete-nodiff": "Varasemat redaktsiooni ei leidunud.",
        "undeletebtn": "Taasta",
        "undeletelink": "vaata/taasta",
        "sp-contributions-username": "IP-aadress või kasutajanimi:",
        "sp-contributions-toponly": "Ainult uusimad redaktsioonid",
        "sp-contributions-newonly": "Näita ainult uute lehekülgedega alustamist",
+       "sp-contributions-hideminor": "Peida pisimuudatused",
        "sp-contributions-submit": "Otsi",
        "whatlinkshere": "Lingid siia",
        "whatlinkshere-title": "Leheküljed, mis viitavad lehele \"$1\"",
        "ipb-unblock": "Kasutaja või IP-aadressi vabastamine blokeerimisest",
        "ipb-blocklist": "Vaata kehtivaid blokeeringuid",
        "ipb-blocklist-contribs": "Kasutaja $1 kaastöö",
+       "ipb-blocklist-duration-left": "$1 järel",
        "unblockip": "Blokeerimise eemaldamine",
        "unblockiptext": "Kasuta allpool olevat vormi varem blokeeritud IP-aadressi või kasutaja redigeerimisõiguse taastamiseks.",
        "ipusubmit": "Eemalda see blokeering",
        "block-log-flags-hiddenname": "kasutajanimi peidetud",
        "range_block_disabled": "Administraatori õigus blokeerida IP-aadresside vahemik on ära võetud.",
        "ipb_expiry_invalid": "Vigane aegumise tähtaeg.",
+       "ipb_expiry_old": "Aegumistähtaeg on minevikus.",
        "ipb_expiry_temp": "Peidetud kasutajanime blokeeringud peavad olema alalised.",
        "ipb_hide_invalid": "Seda kontot ei saa varjata, sest sellega on tehtud üle {{PLURAL:$1|ühe|$1}} muudatuse.",
        "ipb_already_blocked": "\"$1\" on juba blokeeritud.",
        "pageinfo-article-id": "Lehekülje identifikaator",
        "pageinfo-language": "Lehekülje sisu keel",
        "pageinfo-content-model": "Lehekülje sisumudel",
+       "pageinfo-content-model-change": "muuda",
        "pageinfo-robot-policy": "Robotindekseering",
        "pageinfo-robot-index": "Lubatud",
        "pageinfo-robot-noindex": "Keelatud",
        "pageinfo-category-files": "Faile",
        "markaspatrolleddiff": "Märgi kontrollituks",
        "markaspatrolledtext": "Märgi see leht kontrollituks",
+       "markaspatrolledtext-file": "Märgi see failiversioon kontrollituks",
        "markedaspatrolled": "Kontrollituks märgitud",
        "markedaspatrolledtext": "Valitud redaktsioon leheküljel [[:$1]] on kontrollituks märgitud.",
        "rcpatroldisabled": "Viimaste muudatuste kontroll ei toimi",
        "confirm-watch-top": "Kas lisad selle lehekülje oma jälgimisloendisse?",
        "confirm-unwatch-button": "Sobib",
        "confirm-unwatch-top": "Kas eemaldad selle lehekülje oma jälgimisloendist?",
+       "confirm-rollback-button": "Sobib",
        "quotation-marks": "\"$1\"",
        "imgmultipageprev": "← eelmine lehekülg",
        "imgmultipagenext": "järgmine lehekülg →",
        "tag-filter": "[[Special:Tags|Märgisefilter]]:",
        "tag-filter-submit": "Filtri",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Märgis|Märgised}}]]: $2)",
+       "tag-mw-contentmodelchange": "sisumudeli muudatus",
+       "tag-mw-contentmodelchange-description": "Lehekülje [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel sisumudelit muutvad] redaktsioonid",
        "tags-title": "Märgised",
        "tags-intro": "See lehekülg loetleb märgised, millega tarkvara võib muudatused märgistada, ja nende kirjeldused.",
        "tags-tag": "Märgise nimi",
        "tags-actions-header": "Toimingud",
        "tags-active-yes": "Jah",
        "tags-active-no": "Ei",
-       "tags-source-extension": "Määratletud tarkvaralisas",
+       "tags-source-extension": "Määratletud tarkvaraliselt",
        "tags-source-manual": "Kasutaja või robot rakendab käsitsi",
        "tags-source-none": "Pole enam kasutuses",
        "tags-edit": "muuda",
        "htmlform-title-not-exists": "Lehekülge $1 pole olemas.",
        "htmlform-user-not-exists": "Kasutajat <strong>$1</strong> pole olemas.",
        "htmlform-user-not-valid": "<strong>$1</strong> pole sobiv kasutajanimi.",
-       "sqlite-has-fts": "$1 koos täistekstiotsingu toega",
-       "sqlite-no-fts": "$1 ilma täistekstiotsingu toeta",
        "logentry-delete-delete": "$1 {{GENDER:$2|kustutas}} lehekülje $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|taastas}} lehekülje $3",
        "logentry-delete-event": "$1 {{GENDER:$2|muutis}} leheküljel $3 {{PLURAL:$5|ühe|$5}} logisündmuse nähtavust: $4",
        "feedback-external-bug-report-button": "Koosta tehniline tööülesanne",
        "feedback-dialog-title": "Tagasiside saatmine",
        "feedback-dialog-intro": "Selle lihtsa vormi abil saad tagasisidet saata. Leheküljele \"$1\" lisatakse sinu kommentaar, mille juures on sinu kasutajanimi.",
-       "feedback-error-title": "Tõrge",
        "feedback-error1": "Tõrge: Tundmatu API tulemus",
        "feedback-error2": "Tõrge: Redigeerimine ebaõnnestus",
        "feedback-error3": "Tõrge: API ei vasta",
        "feedback-thanks": "Aitäh! Sinu tagasiside on postitatud leheküljele \"[$2 $1]\".",
        "feedback-thanks-title": "Aitäh!",
        "feedback-useragent": "Kasutajaagent:",
-       "searchsuggest-search": "Otsi",
+       "searchsuggest-search": "Otsi {{GRAMMAR:elative|{{SITENAME}}}}",
        "searchsuggest-containing": "sisalduv...",
        "api-error-badaccess-groups": "Sul pole selles vikis üleslaadimisõigust.",
        "api-error-badtoken": "Sisemine tõrge: Sobimatu nimi.",
        "mw-widgets-dateinput-placeholder-month": "AAAA-KK",
        "mw-widgets-titleinput-description-new-page": "lehekülge pole veel",
        "mw-widgets-titleinput-description-redirect": "ümbersuunamine leheküljele \"$1\"",
-       "randomrootpage": "Juhuslik juurlehekülg"
+       "randomrootpage": "Juhuslik juurlehekülg",
+       "authmanager-provider-password": "Paroolipõhine autentimine",
+       "authmanager-provider-password-domain": "Parooli- ja domeenipõhine autentimine",
+       "authmanager-provider-temporarypassword": "Ajutine parool",
+       "changecredentials": "Autentimisandmete muutmine",
+       "changecredentials-submit": "Muuda autentimisandmed",
+       "changecredentials-success": "Sinu autentimisandmed on muudetud.",
+       "removecredentials": "Autentimisandmete eemaldamine",
+       "removecredentials-submit": "Eemalda autentimisandmed",
+       "removecredentials-success": "Sinu autentimisandmed on eemaldatud.",
+       "credentialsform-provider": "Andmete tüüp:",
+       "credentialsform-account": "Konto nimi:",
+       "userjsispublic": "Pea silmas, et JavaScripti alamleheküljed ei tohiks sisaldada konfidentsiaalseid andmeid, kuna neid näevad teised kasutajad.",
+       "restrictionsfield-badip": "Vigane IP-aadress või -aadressivahemik: $1",
+       "restrictionsfield-label": "Lubatud IP-aadressivahemikud:",
+       "restrictionsfield-help": "Üks IP-aadress või CIDR-vahemik rea kohta. Et lubada kõik, kasuta süntaksit <br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Tõrge: $1",
+       "edit-error-long": "Tõrked:\n\n$1"
 }
index 523b2ef..be79578 100644 (file)
@@ -43,6 +43,7 @@
        "tog-watchdefault": "Aldatzen ditudan orrialdeak eta fitxategiak nire jarraipen-zerrendara gehitu",
        "tog-watchmoves": "Izena aldatutako orrialdeak eta fitxategiak jarraipen-zerrendara gehitu",
        "tog-watchdeletion": "Ezabatzen ditudan orrialdeak eta fitxategiak nire jarraipen-zerrendara gehitu",
+       "tog-watchuploads": "Gehitu igotzen ditudan fitxategiak nire jarraipen zerrendara",
        "tog-watchrollback": "Nire jarraipen zerrendan rollbacka egin dudan orrialdeak erakutsi",
        "tog-minordefault": "Lehenetsi bezala aldaketa txiki bezala markatu guztiak",
        "tog-previewontop": "Aurrebista aldaketa koadroaren aurretik erakutsi",
@@ -52,7 +53,7 @@
        "tog-enotifminoredits": "Orrialde edo fitxategietan aldaketak txikiak direnean ere e-posta jaso",
        "tog-enotifrevealaddr": "Jakinarazpen mezuetan nire e-posta helbidea erakutsi",
        "tog-shownumberswatching": "Jarraitzen duen erabiltzaile kopurua erakutsi",
-       "tog-oldsig": "Egungo sinadura:",
+       "tog-oldsig": "Zure egungo sinadura:",
        "tog-fancysig": "Sinadura wikitestu gisa tratatu (lotura automatikorik gabe)",
        "tog-uselivepreview": "Zuzeneko aurrebista erabili",
        "tog-forceeditsummary": "Aldaketaren laburpena zuri uzterakoan ohartarazi",
        "newwindow": "(leiho berrian irekitzen da)",
        "cancel": "Utzi",
        "moredotdotdot": "Gehiago...",
-       "morenotlisted": "Zerrenda hau ez dago osorik.",
+       "morenotlisted": "Zerrenda hau agian ez dago osorik.",
        "mypage": "Orrialdea",
        "mytalk": "Eztabaida",
        "anontalk": "Eztabaida",
        "talk": "Eztabaida",
        "views": "Ikustaldiak",
        "toolbox": "Tresnak",
+       "tool-link-userrights": "Erabiltzaile {{GENDER:$1|taldea}} aldatu",
+       "tool-link-emailuser": "{{GENDER:$1|Erabiltzale}} honi e-posta bidali",
        "userpage": "Lankide orrialdea ikusi",
        "projectpage": "Proiektuaren orrialdea ikusi",
        "imagepage": "Ikusi fitxategiaren orria",
        "createacct-reason-ph": "Zergatik ari zaren beste erabiltzaile kontu bat",
        "createacct-submit": "Kontua sortu",
        "createacct-another-submit": "Kontu bat sortu",
+       "createacct-continue-submit": "Jarraitu kontua sortzen",
+       "createacct-another-continue-submit": "Jarraitu kontua sortzen",
        "createacct-benefit-heading": "{{SITENAME}} zu bezalako pertsonek egiten dute.",
        "createacct-benefit-body1": "{{PLURAL:$1|edizio bat|$1 edizio}}",
        "createacct-benefit-body2": "{{PLURAL:$1|Orrialde 1|$1 orrialde}}",
        "eauthentsent": "Egiaztapen mezu bat bidali da zehaztutako e-posta helbidera.\nHelbide horretara beste edozein mezu bidali aurretik, bertan azaltzen diren argibideak jarraitu behar dituzu, kontua zurea dela egiaztatzeko.",
        "throttled-mailpassword": "Pasahitz gogorarazle bat bidali da jada azken {{PLURAL:$1|orduan|$1 orduetan}}.\nBandalismoa sahiesteko pasahitz eskaera bat baino ezin da egin {{PLURAL:$1|orduan|$1 orduan}} behin.",
        "mailerror": "Errorea mezua bidaltzerakoan: $1",
-       "acct_creation_throttle_hit": "Sentitzen dugu, {{PLURAL:$1|erabiltzaile kontu bat sortu duzu|$1 erabiltzaile kontu sortu dituzu}} dagoeneko.\nOndorioz, ezin duzu kontu gehiago sortu.",
+       "acct_creation_throttle_hit": "Sentitzen dugu, {{PLURAL:$1|erabiltzaile kontu bat sortu duzu|$1 erabiltzaile kontu sortu dituzu}} dagoeneko azken $2(e)tan.\nOndorioz, ezin duzu kontu gehiago sortu.",
        "emailauthenticated": "Zure e-posta helbidea autentifikatu da $2an $3(e)tan.",
        "emailnotauthenticated": "Zure posta helbidea egiaztatu gabe dago. \nEz da mezurik bidaliko hurrengo ezaugarrientzako.",
        "noemailprefs": "Zehaztu e-posta helbide bat ezaugarri hauek erabili ahal izateko.",
        "botpasswords-label-update": "Eguneratu",
        "botpasswords-label-cancel": "Utzi",
        "botpasswords-label-delete": "Ezabatu",
+       "botpasswords-label-resetpassword": "Pasahitza berrezarri",
        "resetpass_forbidden": "Ezin dira pasahitzak aldatu",
        "resetpass-no-info": "Orrialde honetara zuzenean sartzeko izena eman behar duzu.",
        "resetpass-submit-loggedin": "Pasahitza aldatu",
        "continue-editing": "Edizio-eremura joan",
        "previewconflict": "Aurreikuspenak aldaketen koadroan idatzitako testua erakusten du, gorde ondoren agertuko den bezala.",
        "session_fail_preview": "'''Sentitzen dugu! Ezin izan da zure aldaketa prozesatu, saioko datu batzuen galera dela-eta. Mesedez, saiatu berriz. Arazoak jarraitzen badu, saiatu [[Special:UserLogout|saioa amaitu]] eta berriz hasten.'''",
-       "session_fail_preview_html": "'''Sentitzen dugu! Ezin izan dugu zure aldaketa burutu, saio datu galera bat medio.'''\n\n''Wiki honek HTML kodea onartzen duenez, aurreikuspena ezgaituta dago JavaScript erasoak saihestu asmoz.''\n\n'''Aldaketa saiakera hau zuzena baldin bada, saiatu berriro mesedez. Arazoak jarraitzen badu, saiatu saioa itxi eta berriz hasten.'''",
+       "session_fail_preview_html": "<strong>Sentitzen dugu! Ezin izan dugu zure aldaketa burutu, saio datu galera bat medio.</strong>\n\n<em>Wiki honek HTML kodea onartzen duenez, aurreikuspena ezgaituta dago JavaScript erasoak saihestu asmoz.</em>\n\n<strong>Aldaketa saiakera hau zuzena baldin bada, saiatu berriro mesedez. Arazoak jarraitzen badu, saiatu  [[Special:UserLogout|saioa itxi]] eta berriz hasten.</strong>",
        "token_suffix_mismatch": "'''Zure aldaketa ezeztatua izan da zure bezeroak puntuazio-karaktereak itxuragabetu dituelako.\nAldaketa ezeztatua izan da testuaren galtzea galarazteko.\nHau batzuetan gertatzen da buggyan oinarritutako web proxy zerbitzua erabiltzean.'''",
        "edit_form_incomplete": "'''Aldaketa formularioaren atal batzuk ez dira iritsi zerbitzarira; bi aldiz ziurtatu zure aldaketak osorik daudela eta berriro saiatu.'''",
        "editing": "«$1» aldatzen",
        "copyrightwarning": "Kontuan izan ezazu {{SITENAME}} webgunean egindako ekarpen guztiak $2 lizentziaren pean argitaratzen direla (xehetasunetarako, ikus $1). Zuk idatzitakoa libreki aldatua eta banatua izatea nahi ez baduzu, ez ezazu hemen jarri.<br />\nEra berean, hitzematen ari zara hau zuk zeuk idatzia dela, edo jabari publikotik nahiz askea den beste ituri batetik kopiatu duzula.\n'''Ez erabili copyright eskubideek babestutako lanik, baimenik gabe!'''",
        "copyrightwarning2": "Mesedez, kontuan izan ezazu {{SITENAME}} webgunean egindako ekarpen guztiak beste erabiltzaileek aldatu edo ezabatu ditzaketela. Zuk idatzitakoa libreki aldatua izatea nahi ez baduzu, ez ezazu hemen jarri.<br />\nEra berean, hitzematen ari zara hau zuk zeuk idatzia dela, edo jabari publikotik nahiz askea den beste ituri batetik kopiatu duzula (xehetasunetarako, ikus $1).\n'''Ez erabili copyright eskubideek babestutako lanik, baimenik gabe!'''",
        "longpageerror": "'''Errorea: Bidali duzun testuak {{PLURAL:$1|kilobyte 1eko|$1 kilobyteko}} luzera du, eta {{PLURAL:$2|kilobyte 1eko|$2 kilobyteko}} maximoa baino luzeagoa da.'''\nEzin da gorde.",
-       "readonlywarning": "'''Oharra: Datu-basea blokeatu egin da mantenu lanak burutzeko, beraz ezingo dituzu orain zure aldaketak gorde.'''\nTestua fitxategi baten kopiatu dezakezu, eta beranduago erabiltzeko gorde.\n\nBlokeatu zuen administratzaileak honako azalpena eman zuen: $1",
+       "readonlywarning": "<strong>Oharra: Datu-basea blokeatu egin da mantenu lanak burutzeko, beraz ezingo dituzu orain zure aldaketak gorde.</strong>I\nTestua fitxategi baten kopiatu dezakezu, eta beranduago erabiltzeko gorde.\n\nBlokeatu zuen administratzaileak honako azalpena eman zuen: $1",
        "protectedpagewarning": "'''Oharra:  Orri hau blokeatua dago administratzaileek soilik eraldatu ahal dezaten.'''\nAzken erregistroa ondoren ikusgai dago erreferentzia gisa:",
        "semiprotectedpagewarning": "'''Oharra''': Orrialde hau erregistratutako erabiltzaileek bakarrik aldatzeko babestuta dago.\nErregistroko azken sarrera azpian jartzen da erreferentzia gisa:",
        "cascadeprotectedwarning": "'''Oharra:''' Orrialde hau blokeatua izan da eta administratzaileek baino ez dute berau aldatzeko ahalmena, honako {{PLURAL:$1|orrialdeko|orrialdeetako}} kaskada-babesean txertatuta dagoelako:",
        "rows": "Lerroak:",
        "columns": "Zutabeak:",
        "searchresultshead": "Bilaketa",
-       "stub-threshold": "<a href=\"#\" class=\"stub\">stub link</a> formaturako atalasea (byteak):",
+       "stub-threshold": "<a href=\"#\" class=\"stub\">stub link</a> formaturako atalasea ($1):",
        "stub-threshold-sample-link": "adibidea",
        "stub-threshold-disabled": "Ezgaitua",
        "recentchangesdays": "Aldaketa berrietan erakutsi beharreko egun kopurua:",
        "gender-female": "Wiki orrialdeak editatzen dituen emakumea",
        "prefs-help-gender": "Hobespen hau jartzea aukerazkoa da.\nSoftwareak bere balioak erabiltzen ditu zu aipatzeko eta beste batzuek genero gramatikala erabiltzeko aukera izan dezaten.\nInformazio hau publikoa da.",
        "email": "E-posta",
-       "prefs-help-realname": "* Benetako izena (aukerakoa): zehaztea erabakiz gero, zure lanarentzako atribuzio bezala balioko du.",
+       "prefs-help-realname": "Benetako izena aukerakoa da. \nZehaztea erabakiz gero, zure lanarentzako atribuzio bezala balioko du.",
        "prefs-help-email": "E-posta helbidea aukerakoa da, baina zure pasahitza ahaztekotan berriro zure e-postara bidaltzeko aukera ematen dizu.",
        "prefs-help-email-others": "Besteak e-mail bidez zurekin harremanetan jartzea ahalbidetu dezakezu, zure lankide- edo eztabaida-orrietako loturaren bidez. Beste lankideak zurekin harremanetan jartzerakoan ez da ikusiko zure e-mail helbidea.",
        "prefs-help-email-required": "E-mail helbidea derrigorrezkoa da.",
        "upload-copy-upload-invalid-domain": "Domeinu honetan ezin dira igoerak kopiatu.",
        "upload-dialog-title": "Igo fitxategia",
        "upload-dialog-button-cancel": "Utzi",
+       "upload-dialog-button-back": "Atzera",
        "upload-dialog-button-done": "Egina",
        "upload-dialog-button-save": "Gorde",
        "upload-dialog-button-upload": "Igo",
        "apisandbox-helpurls": "Laguntza estekak",
        "apisandbox-examples": "Adibideak",
        "apisandbox-dynamic-parameters": "Parametro gehigarriak",
+       "apisandbox-dynamic-parameters-add-label": "Gehitu parametroa:",
+       "apisandbox-dynamic-parameters-add-placeholder": "Parametroaren izena",
+       "apisandbox-dynamic-error-exists": "$1 parametro izena dagoeneko existitzen da",
        "apisandbox-results": "Emaitzak",
        "booksources": "Iturri liburuak",
        "booksources-search-legend": "Liburuen bilaketa",
        "logempty": "Ez dago emaitzarik erregistroan.",
        "log-title-wildcard": "Testu honekin hasten diren izenburuak bilatu",
        "showhideselectedlogentries": "Erakutsi/ezkutatu aukeratutako log sarrerak",
+       "checkbox-select": "Aukeratu:$1",
        "checkbox-all": "Denak",
        "checkbox-none": "Bat ere ez",
        "allpages": "Orri guztiak",
        "watchlistanontext": "Mesedez saioa hasi zure jarraipen zerrendako orrialdeak ikusi eta aldatu ahal izateko.",
        "watchnologin": "Saioa hasi gabe",
        "addwatch": "Jarraipen zerrendara gehitu",
-       "addedwatchtext": "«[[:$1]]» orria zure [[Special:Watchlist|jarraipen zerrendara]] erantsi da. \n\nOrri honetan aurrerantzean egindako aldaketak zerrenda horretan agertuko dira.",
+       "addedwatchtext": "\"[[:$1]]\" eta haren eztabaida orria zure [[Special:Watchlist|jarraipen zerrendara]] erantsi da. \n\nOrri honetan aurrerantzean egindako aldaketak zerrenda horretan agertuko dira.",
        "addedwatchtext-short": "$1 orria zure jarraipen zerrendara gehitu da.",
        "removewatch": "Kendu zure jarraipen zerrendatik",
        "removedwatchtext": "\"[[:$1]]\" orrialdea zure [[Special:Watchlist|jarraipen zerrendatik]] kendu da.",
        "import-upload": "Igo XML datuak",
        "import-token-mismatch": "Sesio data galdu da. Saia saitez berriro ere, mesedez.",
        "import-invalid-interwiki": "Ezin da esandako wikitik inportatu.",
-       "import-error-edit": "\"$1\" orrialdea ez da inportatu ez duzula baimenik aldatzeko.",
+       "import-error-edit": "\"$1\" orrialdea ez da inportatu aldatzeko baimenik ez duzulako.",
        "import-error-create": "\"$1\" orrialdea ez da inportatu ez duzula baimenik sortzeko.",
        "import-error-interwiki": "\"$1\" orrialdea ez da inportatu bere izena kanpo loturetarako gordeta dagoelako (interwiki).",
        "import-error-special": "\"$1\" orrialdea ez da inportatu izen-tarte berezi bati dagokiolako eta horretan orrialderik ezin delako egon.",
        "tags-actions-header": "Ekintzak",
        "tags-active-yes": "Bai",
        "tags-active-no": "Ez",
-       "tags-source-extension": "Luzapenak definitua",
+       "tags-source-extension": "Softwareak definitua",
        "tags-source-none": "Ez da gehiago erabiltzen",
        "tags-edit": "aldatu",
        "tags-delete": "ezabatu",
        "tags-create-tag-name": "Etiketaren izena:",
        "tags-create-reason": "Arrazoia:",
        "tags-create-submit": "Sortu",
+       "tags-create-no-name": "Etiketatutako izen bat zehaztu behar duzu.",
        "tags-create-already-exists": "\"$1\" etiketa badago.",
        "tags-create-warnings-below": "Etiketaren sorrerarekin jarraitu nahi duzu?",
        "tags-delete-title": "Etiketa ezabatu",
        "htmlform-chosen-placeholder": "Aukeratu",
        "htmlform-cloner-create": "Gehitu gehiago",
        "htmlform-cloner-delete": "Kendu",
+       "htmlform-date-placeholder": "UUUU-HH-EE",
+       "htmlform-time-placeholder": "OO:MM:SS",
+       "htmlform-datetime-placeholder": "UUUU-HH-EE OO:MM:SS",
+       "htmlform-date-invalid": "Jarri duzun balioak ez du data ezagunik adierazten. Saiatu UUUU-HH-EE formatua erabiltzen.",
+       "htmlform-time-invalid": "Jarri duzun balioak ez du denbora ezagunik adierazten. Saiatu OO:MM:SS formatua erabiltzen.",
+       "htmlform-datetime-invalid": "Jarri duzun balioak ez da data eta denbora bezala ezagutzen. Saitu UUUU-HH-EE OO:MM:SS formatua erabiltzen.",
        "htmlform-title-not-creatable": "\"$1\" ez da sor daitekeen orrialde baten izenburua",
        "htmlform-title-not-exists": "$1 ez da existitzen.",
        "htmlform-user-not-exists": "<strong>$1</strong> ez da existitzen.",
        "htmlform-user-not-valid": "<strong>$1</strong> erabiltzaile izena ezin da erabili.",
-       "sqlite-has-fts": "$1 testu osoan bilatzeko laguntzarekin",
-       "sqlite-no-fts": "$1 testu osoan bilatzeko laguntzarik gabe",
        "logentry-delete-delete": "$1 {{GENDER:$2|wikilariak}} «$3» orria ezabatu du",
        "logentry-delete-restore": "$1(e)k $3 orrialdea {{GENDER:$2|berrezarri}} du",
        "logentry-delete-event": "$1 wikilariak ikusgaitasuna {{{{GENDER:$2|}}|aldatu}} {{PLURAL:$5|dio erregistroko sarrera bati|die erregistroko $5 sarrerari}}, $3 orrian: $4",
        "feedback-cancel": "Utzi",
        "feedback-close": "Egina",
        "feedback-dialog-title": "Feedbacka bidali",
-       "feedback-error-title": "Errorea",
        "feedback-error1": "Akatsa: APIaren emaitza ez ezagunak",
        "feedback-error2": "Akatsa: Aldaketa ez da egin",
        "feedback-error3": "Akatsa: APIaren erantzunik gabe",
        "mw-widgets-titleinput-description-new-page": "orri hori oraindik ez da existitzen",
        "mw-widgets-titleinput-description-redirect": "$1ra birzuzendu",
        "sessionprovider-generic": "$1 sesio",
+       "log-action-filter-block": "Blokeatze mota:",
+       "log-action-filter-delete": "Ezabatze mota:",
+       "log-action-filter-import": "Inportazio mota:",
+       "log-action-filter-move": "Mugimendu mota:",
+       "log-action-filter-newusers": "Kontu sortze-mota:",
+       "log-action-filter-patrol": "Patruilatze mota:",
+       "log-action-filter-protect": "Babes mota:",
+       "log-action-filter-suppress": "Ezabatze mota:",
+       "log-action-filter-upload": "Igoera mota:",
        "log-action-filter-all": "Denak",
        "log-action-filter-block-block": "Blokeatu",
        "log-action-filter-block-reblock": "Blokeoa aldatu",
        "log-action-filter-block-unblock": "blokeoa kendu",
+       "log-action-filter-delete-revision": "Berrikuspen ezabaketa",
+       "log-action-filter-import-interwiki": "Transwiki inportazioa",
+       "log-action-filter-managetags-create": "Etiketa sorkuntza",
+       "log-action-filter-managetags-delete": "Etiketa ezabaketa",
+       "log-action-filter-managetags-activate": "Etiketa aktibazioa",
+       "log-action-filter-managetags-deactivate": "Etiketa desaktibazioa",
        "authmanager-userdoesnotexist": "\"$1\" erabiltzaile kontua ez dago erregistratua.",
        "authmanager-email-label": "Emaila",
        "authmanager-email-help": "Helbide elektronikoa",
        "authmanager-realname-label": "Benetako izena",
        "authmanager-realname-help": "Erabiltzailearen benetako izena",
        "authprovider-resetpass-skip-label": "Utzi",
-       "authform-wrongtoken": "Token okerra"
+       "authform-wrongtoken": "Token okerra",
+       "credentialsform-account": "Kontuaren izena:"
 }
index dbe5d53..c435b73 100644 (file)
        "talk": "بحث",
        "views": "بازدیدها",
        "toolbox": "ابزارها",
+       "tool-link-userrights": "تغییر گروه‌های {{GENDER:$1|کاربر}}",
+       "tool-link-emailuser": "فرستادن نامه به {{GENDER:$1|کاربر}}",
        "userpage": "نمایش صفحهٔ کاربر",
        "projectpage": "نمایش صفحهٔ پروژه",
        "imagepage": "نمایش صفحهٔ پرونده",
        "botpasswords-label-resetpassword": "بازگردانی گذرواژه",
        "botpasswords-label-grants": "اعطاهای اجرا شدنی:",
        "botpasswords-help-grants": "هر اجازه به حقوق کاربری که یک حساب کاربری دارد. [[Special:ListGrants|table of grants]] را برای اطلاعات بیشتر مشاهده کنید.",
-       "botpasswords-label-restrictions": "محدودیت استفاده:",
        "botpasswords-label-grants-column": "اعطا شد",
        "botpasswords-bad-appid": "نام ربات \"$1\" معتبر نیست.",
        "botpasswords-insert-failed": "شکست در افزودن نام ربات «$1». در حال حاضر اضافه شده است؟",
        "blocklist-userblocks": "پنهان کردن بسته‌شدن‌های حساب",
        "blocklist-tempblocks": "پنهان کردن بستن‌های موقت",
        "blocklist-addressblocks": "پنهان کردن تک آی‌پی‌های بسته شده",
-       "blocklist-rangeblocks": "پنهان کردنی قطع دسترسی بازه‌ها",
+       "blocklist-rangeblocks": "پنهان کردن قطع دسترسی بازه‌ها",
        "blocklist-timestamp": "برچسب زمان",
        "blocklist-target": "هدف",
        "blocklist-expiry": "زمان سرآمدن",
        "htmlform-title-not-exists": "$1 وجود ندارد.",
        "htmlform-user-not-exists": "<strong>$1</strong> وجود ندارد.",
        "htmlform-user-not-valid": "حساب کاربری <strong>$1</strong> معتبر نیست.",
-       "sqlite-has-fts": "$1 با پشتیبانی از جستجو در متن کامل",
-       "sqlite-no-fts": "$1 بدون پشتیبانی از جستجو در متن کامل",
        "logentry-delete-delete": "$1 صفحهٔ $3 را {{GENDER:$2|حذف کرد}}",
        "logentry-delete-restore": "$1 صفحهٔ $3 را {{GENDER:$2|احیا کرد}}",
        "logentry-delete-event": "$1 پیدایی {{PLURAL:$5|یک مورد سیاهه|$5 مورد سیاهه}} را در $3 {{GENDER:$2|تغییر داد}}: $4",
        "feedback-external-bug-report-button": "پرونده‌سازی یک عمل فنی",
        "feedback-dialog-title": "ارسال یک بازخورد",
        "feedback-dialog-intro": "شما می توانید از فرم زیر برای بازخورد استفاده کنید. متن شما همراه با نام کاربریتان به صفحهٔ \"$1\" افزوده خواهد شد.",
-       "feedback-error-title": "خطا",
        "feedback-error1": "خطا: پاسخ‌های ناشناخته از رابط برنامه‌نویسی نرم‌افزار",
        "feedback-error2": "خطا: شکست در ویرایش",
        "feedback-error3": "خطا: عدم پاسخ از رابط برنامه‌نویسی نرم‌افزار",
index dc60afe..2053b44 100644 (file)
@@ -80,7 +80,7 @@
        "tog-enotifminoredits": "Lähetä sähköpostiviesti myös pienistä muokkauksista",
        "tog-enotifrevealaddr": "Näytä sähköpostiosoitteeni muille lähetetyissä ilmoituksissa",
        "tog-shownumberswatching": "Näytä sivua tarkkailevien käyttäjien määrä",
-       "tog-oldsig": "Nykyinen allekirjoitus:",
+       "tog-oldsig": "Nykyinen allekirjoituksesi:",
        "tog-fancysig": "Muotoilematon allekirjoitus ilman automaattista linkkiä",
        "tog-uselivepreview": "Käytä välitöntä esikatselua",
        "tog-forceeditsummary": "Huomauta minua, jos en ole kirjoittanut yhteenvetoa",
        "newwindow": "(avautuu uuteen ikkunaan)",
        "cancel": "Peruuta",
        "moredotdotdot": "Lisää...",
-       "morenotlisted": "Tämä luettelo ei ole täydellinen.",
+       "morenotlisted": "Tämä luettelo ei ehkä ole täydellinen.",
        "mypage": "Käyttäjäsivu",
        "mytalk": "Keskustelu",
        "anontalk": "Keskustelu",
        "talk": "Keskustelu",
        "views": "Näkymät",
        "toolbox": "Työkalut",
+       "tool-link-userrights": "Muokkaa {{GENDER:$1|käyttäjän}} ryhmiä",
+       "tool-link-emailuser": "Lähetä sähköpostia tälle {{GENDER:$1|käyttäjälle}}",
        "userpage": "Näytä käyttäjäsivu",
        "projectpage": "Näytä projektisivu",
        "imagepage": "Näytä tiedostosivu",
        "createacct-yourpasswordagain-ph": "Kirjoita salasana uudelleen",
        "userlogin-remembermypassword": "Pidä minut kirjautuneena",
        "userlogin-signwithsecure": "Käytä salattua yhteyttä",
+       "cannotlogin-title": "Kirjautuminen ei onnistu",
+       "cannotlogin-text": "Kirjautuminen ei ole mahdollista.",
        "cannotloginnow-title": "Nyt ei voi kirjautua sisään",
        "cannotloginnow-text": "Kirjautuminen sisään ei ole mahdollista käytettäessä $1.",
+       "cannotcreateaccount-title": "Tunnuksia ei voida luoda",
+       "cannotcreateaccount-text": "Suora tunnuksen luominen ei ole käytössä tässä wikissä.",
        "yourdomainname": "Verkkonimi:",
        "password-change-forbidden": "Et voi muuttaa salasanoja tässä wikissä.",
        "externaldberror": "Tapahtui virhe ulkoisen autentikointitietokannan käytössä tai sinulla ei ole lupaa päivittää tunnustasi.",
        "eauthentsent": "Varmennussähköposti on lähetetty annettuun sähköpostiosoitteeseen.\nMuita viestejä ei lähetetä, ennen kuin olet toiminut viestin ohjeiden mukaan ja varmistanut, että sähköpostiosoite kuuluu sinulle.",
        "throttled-mailpassword": "Salasananpalautusviesti on lähetetty {{PLURAL:$1|kuluvan|kuluvien $1}} tunnin aikana. Salasananpalautusviestejä lähetetään enintään {{PLURAL:$1|tunnin|$1 tunnin}} välein.",
        "mailerror": "Virhe lähetettäessä sähköpostia: $1",
-       "acct_creation_throttle_hit": "IP-osoitteestasi on luotu tähän wikiin jo {{PLURAL:$1|yksi tunnus|$1 tunnusta}} päivän aikana, joka suurin sallittu määrä tälle ajalle.\nTästä johtuen tästä IP-osoitteesta ei voi tällä hetkellä luoda uusia tunnuksia.",
+       "acct_creation_throttle_hit": "IP-osoitteestasi on luotu tähän wikiin jo {{PLURAL:$1|yksi tunnus|$1 tunnusta}} viimeisen $2 aikana, joka on suurin sallittu määrä tälle ajalle.\nTästä johtuen tästä IP-osoitteesta ei voi tällä hetkellä luoda uusia tunnuksia.",
        "emailauthenticated": "Sähköpostiosoitteesi varmennettiin $2 kello $3.",
        "emailnotauthenticated": "Sähköpostiosoitettasi ei ole vielä varmennettu.\nSähköpostia ei lähetetä liittyen alla oleviin toimintoihin.",
        "noemailprefs": "Sähköpostiosoitetta ei ole määritelty.",
        "botpasswords-label-delete": "Poista",
        "botpasswords-label-resetpassword": "Hanki uusi salasana",
        "botpasswords-label-grants": "Valittavissa olevat toimintaoikeudet:",
-       "botpasswords-label-restrictions": "Käyttörajoitukset:",
        "botpasswords-label-grants-column": "Myönnetään",
        "botpasswords-bad-appid": "Botin nimi \"$1\" ei kelpaa.",
        "botpasswords-insert-failed": "Botin nimen \"$1\" lisääminen epäonnsitui. Onko se jo lisätty?",
        "botpasswords-updated-body": "Bottisalasana käyttäjän \"$2\" bottinimelle \"$1\" päivitettiin.",
        "botpasswords-deleted-title": "Bottisalasana poistettu",
        "botpasswords-deleted-body": "Bottisalasana käyttäjän \"$2\" bottinimelle \"$1\" poistettiin.",
-       "botpasswords-newpassword": "Uusi salasana kirjautumiseen käyttäjällä <strong>$1</strong> on <strong>$2</strong>. <em>Säilytä tämä myöhempää käyttöä varten.</em>",
+       "botpasswords-newpassword": "Uusi salasana kirjautumiseen käyttäjällä <strong>$1</strong> on <strong>$2</strong>. <em>Säilytä tämä myöhempää käyttöä varten.</em> <br> (Vanhoilla boteilla, jotka vaativat kirjautumisnimen olevan sama kuin lopullinen käyttäjänimi, voit myös käyttää nimeä <strong>$3</strong> ja salasanaa <strong>$4</strong>.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider ei ole saatavilla.",
        "botpasswords-restriction-failed": "Bottisalasanan rajoitukset estävät tämän sisäänkirjautumisen.",
        "botpasswords-invalid-name": "Annetussa käyttäjätunnuksessa ei ole bottisalasanan erotinta (\"$1\").",
        "passwordreset-emailsentusername": "Jos on olemassa vastaava rekisteröity sähköpostiosoite, salasanan uudistamisesta kertova viesti lähetetään.",
        "passwordreset-emailsent-capture2": "Salasananpalautus{{PLURAL:$1|sähköposti|sähköpostit}} on lähetetty. {{PLURAL:$1|Käyttäjä ja salasana|Luettelo käyttäjistä ja salasanoista}} näytetään alapuolella.",
        "passwordreset-emailerror-capture2": "Sähköpostin lähettäminen {{GENDER:$2|käyttäjälle}} epäonnistui: $1 {{PLURAL:$3|Käyttäjänimi ja salasana|Luettelo käyttäjänimistä ja salasanoista}} näytetään alla.",
+       "passwordreset-ignored": "Salasanan palauttamista ei käsitelty. Ehkä tarjoajaa ei ollut määritetty?",
        "passwordreset-invalideamil": "Virheellinen sähköpostiosoite",
        "passwordreset-nodata": "Käyttäjätunnusta ja salasanaa ei annettu",
        "changeemail": "Muuta tai poista sähköpostiosoite",
        "invalid-content-data": "Virheellinen sisältö",
        "content-not-allowed-here": "Sivun [[$2]] sisältö ei voi olla tyyppiä $1.",
        "editwarning-warning": "Tältä sivulta poistuminen saattaa aiheuttaa kaikkien tekemiesi muutosten katoamisen.\nJos olet kirjautunut sisään, voit poistaa tämän varoituksen käytöstä omien asetuksien osiossa \"{{int:prefs-editing}}\".",
+       "editpage-invalidcontentmodel-title": "Sisältömalli ei ole tuettu",
+       "editpage-invalidcontentmodel-text": "Sisältömalli \"$1\" ei ole tuettu.",
        "editpage-notsupportedcontentformat-title": "Sisällön muotoa ei tueta",
        "editpage-notsupportedcontentformat-text": "Sisällön muotoa $1 ei tueta sisältömallilla $2.",
        "content-model-wikitext": "wikiteksti",
        "content-model-css": "CSS",
        "content-json-empty-object": "Tyhjä objekti",
        "content-json-empty-array": "Tyhjä array",
+       "deprecated-self-close-category": "Sivut, joissa on virheellisiä itsensäsulkevia HTLM-tageja",
+       "deprecated-self-close-category-desc": "Sivulla on virheellisiä itsensäsulkevia HTML-tageja, kuten <code>&lt;b/></code> tai <code>&lt;span/></code>. Niiden käyttäytyminen muuttuu pian HTLM5:n määritysten mukaiseksi, joten niiden käyttö wikitekstissä on vanhentunut.",
        "duplicate-args-warning": "<strong>Varoitus:</strong> [[:$1]] kutsuu mallinetta [[:$2]] niin, että parametrille \"$3\" on annettu enemmän kuin yksi arvo. Ainoastaan viimeksi annettu arvo otetaan huomioon.",
        "duplicate-args-category": "Sivut, jotka käyttävät kaksinkertaisia argumentteja mallinekutsuissa",
        "duplicate-args-category-desc": "Tämä sivu sisältää sellaisia mallinekutsuja, jotka käyttävät kaksi kertaa samaa argumenttia kuten <nowiki>{{foo|bar=1|bar=2}}</nowiki></code> taikka <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>.",
        "searchprofile-advanced-tooltip": "Etsi määritellyistä nimiavaruuksista",
        "search-result-size": "$1 ({{PLURAL:$2|1 sana|$2 sanaa}})",
        "search-result-category-size": "{{PLURAL:$1|1 jäsen|$1 jäsentä}} ({{PLURAL:$2|1 alaluokka|$2 alaluokkaa}}, {{PLURAL:$3|1 tiedosto|$3 tiedostoa}})",
-       "search-redirect": "(ohjaus $1)",
+       "search-redirect": "(ohjaus sivulta $1)",
        "search-section": "(osio $1)",
        "search-category": "(luokka $1)",
        "search-file-match": "(vastaa tiedoston sisältöä)",
        "right-changetags": "Lisätä ja poistaa satunnaisia [[Special:Tags|merkkauksia]] yksittäisissä sivuversioissa tai lokimerkinnöissä",
        "right-deletechangetags": "Poistaa [[Special:Tags|merkkauksia]] tietokannasta",
        "grant-generic": "\"$1\" oikeuksien joukko",
-       "grant-group-page-interaction": "Ole vuorovaikutuksessa sivujen kanssa",
-       "grant-group-file-interaction": "Ole vuorovaikutuksessa mediatiedostojen kanssa",
-       "grant-group-watchlist-interaction": "Ole vuorovaikutuksessa oman tarkkailulistasi kanssa",
+       "grant-group-page-interaction": "Käsitellä sivuja",
+       "grant-group-file-interaction": "Käsitellä mediatiedostoja",
+       "grant-group-watchlist-interaction": "Käsitellä tarkkailulistaasi",
        "grant-group-email": "Lähettää sähköpostia",
        "grant-group-high-volume": "Suorittaa suuri määrä toimintoja",
        "grant-group-customization": "Mukauttaminen ja asetukset",
        "grant-editinterface": "Muokata järjestelmäviesti-nimiavaruutta ja käyttäjien CSS/JavaScript-sivuja",
        "grant-editmycssjs": "Muokata käyttäjän omia CSS/JavaScript-sivuja",
        "grant-editmyoptions": "Muokata käyttäjän omia asetuksia",
-       "grant-editmywatchlist": "Muokata omaa tarkkailulistaa",
+       "grant-editmywatchlist": "Muokata tarkkailulistaasi",
        "grant-editpage": "Muokata olemassa olevia sivuja",
        "grant-editprotected": "Muokata suojattuja sivuja",
        "grant-highvolume": "Suorittaa paljon muokkauksia",
        "grant-oversight": "Piilottaa käyttäjiä ja häivyttää yksittäisiä versioita",
        "grant-patrol": "Partioida sivuihin tehtyjä muutoksia",
        "grant-protect": "Suojata sivuja tai poistaa suojauksia",
-       "grant-rollback": "Peräyttää sivuun tehdyt muutokset",
+       "grant-rollback": "Palauttaa sivuun tehtyjä muutoksia",
        "grant-sendemail": "Lähettää sähköpostia toisille käyttäjille",
        "grant-uploadeditmovefile": "Tallentaa, korvata ja siirtää tiedostoja",
        "grant-uploadfile": "Tallentaa uusia tiedostoja",
        "action-applychangetags": "käyttää merkkauksia muutostesi yhteydessä",
        "action-changetags": "lisätä ja poistaa satunnaisia merkkauksia yksittäisissä sivuversioissa ja lokimerkinnöissä",
        "action-deletechangetags": "poistaa merkkauksia tietokannasta",
+       "action-purge": "päivittää tämän sivun välimuistia",
        "nchanges": "$1 {{PLURAL:$1|muutos|muutosta}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|viimeisen käynnin jälkeen}}",
        "enhancedrc-history": "historia",
        "file-thumbnail-no": "Tiedostonimi alkaa merkkijonolla <strong>$1</strong>. Tiedosto näyttäisi olevan pienennetty kuva.\nJos sinulla on tämän kuvan alkuperäinen versio, tallenna se. Muussa tapauksessa nimeä tiedosto uudelleen.",
        "fileexists-forbidden": "Samanniminen tiedosto on jo olemassa, eikä sen tilalle voi tallentaa uutta. \nJos kuitenkin haluat tallentaa tiedostosi, palaa takaisin ja käytä jotain toista nimeä. \n[[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Samanniminen tiedosto on jo olemassa jaetussa mediavarastossa. Tallenna tiedosto jollakin toisella nimellä. [[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "Tallennettava tiedosto on tarkka kaksoiskappale tiedoston <strong>[[:$1]]</strong> nykyisestä versiosta.",
+       "fileexists-duplicate-version": "Tallennettava tiedosto on tarkka kaksoiskappale tiedoston <strong>[[:$1]]</strong> {{PLURAL:$2|vanhasta versiosta|vanhoista versioista}}.",
        "file-exists-duplicate": "Tämä tiedosto on kaksoiskappale {{PLURAL:$1|seuraavasta tiedostosta|seuraavista tiedostoista}}:",
        "file-deleted-duplicate": "Tiedosto, joka on identtinen tämän tiedoston kanssa ([[:$1]]) on aiemmin poistettu. Katso kyseisen tiedoston poistoloki ennen kuin jatkat uudelleentallentamista.",
        "file-deleted-duplicate-notitle": "Tämän tiedoston kanssa samanlainen tiedosto on aikaisemmin poistettu ja tiedoston nimi on häivytetty.\nSinun on syytä pyytää jotakuta häivytettyjen tietojen näkemiseen oikeutettua käyttäjää katsomaan tiedoston tiedot asian arvioimiseksi ennen kuin jatkat tiedoston lataamista tietokantaan.",
        "upload-foreign-cant-upload": "Tätä wikiä ei ole konfiguroitu tallentamaan tiedostoja pyydettyyn ulkoiseen tiedostovarastoon.",
        "upload-dialog-title": "Tiedoston tallennus",
        "upload-dialog-button-cancel": "Peru",
+       "upload-dialog-button-back": "Takaisin",
        "upload-dialog-button-done": "Valmis",
        "upload-dialog-button-save": "Tallenna",
        "upload-dialog-button-upload": "Tallenna",
        "apisandbox-results-fixtoken": "Korjaa \"token\" ja lähetä uudelleen",
        "apisandbox-alert-page": "Tällä sivulla olevat kentät eivät ole kelvollisia.",
        "apisandbox-alert-field": "Tässä kentässä oleva arvo ei ole kelvollinen.",
+       "apisandbox-continue": "Jatka",
+       "apisandbox-continue-clear": "Tyhjennä",
        "booksources": "Kirjalähteet",
        "booksources-search-legend": "Etsi kirjalähteitä",
        "booksources-isbn": "ISBN",
        "undeletedrevisions": "{{PLURAL:$1|Yksi versio|$1 versiota}} palautettiin",
        "undeletedrevisions-files": "{{PLURAL:$1|Yksi versio|$1 versiota}} ja {{PLURAL:$2|yksi tiedosto|$2 tiedostoa}} palautettiin",
        "undeletedfiles": "{{PLURAL:$1|1 tiedosto|$1 tiedostoa}} palautettiin",
-       "cannotundelete": "Palauttaminen epäonnistui:\n$1",
+       "cannotundelete": "Palauttaminen epäonnistui osittain tai kokonaan:\n$1",
        "undeletedpage": "'''$1 on palautettu.'''\n\n[[Special:Log/delete|Poistolokista]] löydät listan viimeisimmistä poistoista ja palautuksista.",
        "undelete-header": "[[Special:Log/delete|Poistolokissa]] on lista viimeisimmistä poistoista.",
        "undelete-search-title": "Etsi poistettuja sivuja",
        "sp-contributions-newbies-sub": "Uusien käyttäjien muokkaukset",
        "sp-contributions-newbies-title": "Uusien käyttäjien muokkaukset",
        "sp-contributions-blocklog": "estoloki",
-       "sp-contributions-suppresslog": "häivytetyt käyttäjän muokkaukset",
-       "sp-contributions-deleted": "poistetut muokkaukset",
+       "sp-contributions-suppresslog": "häivytetyt {{GENDER:$1|käyttäjän}} muokkaukset",
+       "sp-contributions-deleted": "poistetut {{GENDER:$1|käyttäjän}} muokkaukset",
        "sp-contributions-uploads": "tallennukset",
        "sp-contributions-logs": "lokit",
        "sp-contributions-talk": "keskustelu",
        "pageinfo-article-id": "Sivun tunnistenumero",
        "pageinfo-language": "Sivun sisällön kieli",
        "pageinfo-content-model": "Sivun sisältömalli",
+       "pageinfo-content-model-change": "muuta",
        "pageinfo-robot-policy": "Hakukonemerkinnät",
        "pageinfo-robot-index": "Indeksoitava",
        "pageinfo-robot-noindex": "Ei indeksoitava",
        "version-libraries-license": "Lisenssi",
        "version-libraries-description": "Kuvaus",
        "version-libraries-authors": "Tekijät",
-       "redirect": "Ohjaus tiedoston, käyttäjän, sivun, sivuversion tai lokin tunnistenumeron mukaan",
+       "redirect": "Ohjaus kohteen tunnistenumeron mukaan",
        "redirect-summary": "Tämä toimintosivu ohjaa tiedostoon (tiedostonimen mukaan), sivulle (version tunnistenumeron tai sivun tunnistenumeron mukaan), käyttäjäsivulle (käyttäjän tunnistenumeron mukaan) taikka lokimerkintään (lokin tunnistenumeron mukaan). Käytetään seuraavasti: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]],[[{{#Special:Redirect}}/user/101]] tai [[{{#Special:Redirect}}/logid/186]].",
        "redirect-submit": "Siirry",
        "redirect-lookup": "Hae:",
        "redirect-value": "Arvo:",
        "redirect-user": "Käyttäjän tunnistenumero",
        "redirect-page": "Sivun tunnistenumero",
-       "redirect-revision": "Sivun versio",
+       "redirect-revision": "Sivun versionumero",
        "redirect-file": "Tiedostonimi",
        "redirect-logid": "Lokin tunnistenumero",
        "redirect-not-exists": "Arvoa ei löytynyt",
        "tag-filter": "[[Special:Tags|Merkkausten]] suodatin:",
        "tag-filter-submit": "Suodata",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Merkkaus|Merkkaukset}}]]: $2)",
+       "tag-mw-contentmodelchange": "sisältömallin muutos",
+       "tag-mw-contentmodelchange-description": "Muokkaukset, jotka [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel muuttavat sivun sisältömallia]",
        "tags-title": "Merkkaukset",
        "tags-intro": "Tämä sivu luetteloi ne merkkaukset (''engl.'' tags), joilla ohjelmisto voi merkitä muokkauksia, ja mitä ne tarkoittavat.",
        "tags-tag": "Merkkauksen nimi",
        "tags-actions-header": "Toiminnot",
        "tags-active-yes": "Kyllä",
        "tags-active-no": "Ei",
-       "tags-source-extension": "Laajennuksen määrittelemä",
+       "tags-source-extension": "Ohjelmiston määrittelemä",
        "tags-source-manual": "Käyttäjien ja bottien käsin asettama",
        "tags-source-none": "Ei enää käytössä",
        "tags-edit": "muokkaa",
        "htmlform-cloner-create": "Lisää enemmän",
        "htmlform-cloner-delete": "Poista",
        "htmlform-cloner-required": "Vähintään yksi arvo on pakollinen.",
+       "htmlform-date-placeholder": "VVVV-KK-PP",
+       "htmlform-time-placeholder": "TT:MM:SS",
+       "htmlform-datetime-placeholder": "VVVV-KK-PP TT:MM:SS",
+       "htmlform-date-invalid": "Annettu arvo ei ole tunnistettava päivämäärä. Kokeile muotoa VVVV-KK-PP.",
+       "htmlform-time-invalid": "Annettu arvo ei ole tunnistettava aika. Kokeile muotoa TT:MM:SS.",
+       "htmlform-datetime-invalid": "Annettu arvo ei ole tunnistettava päivämäärä ja aika. Kokeile muotoa VVVV-KK-PP TT:MM:SS.",
+       "htmlform-date-toolow": "Annettu arvo on ennen aikaisinta sallittua päivämäärää $1.",
+       "htmlform-date-toohigh": "Annettu arvo on viimeisen sallitun päivämäärän $1 jälkeen.",
+       "htmlform-time-toolow": "Annettu arvo on ennen aikaisinta sallittua aikaa $1.",
+       "htmlform-time-toohigh": "Annettu arvo on viimeisen sallitun ajan $1 jälkeen.",
+       "htmlform-datetime-toolow": "Annettu arvo on ennen aikaisinta sallittua päivämäärää ja aikaa $1.",
+       "htmlform-datetime-toohigh": "Annettu arvo on viimeisen sallitun päivämäärän ja ajan $1 jälkeen.",
        "htmlform-title-badnamespace": "Sivu [[:$1]] ei ole nimiavaruudessa ”{{ns:$2}}”.",
        "htmlform-title-not-creatable": "”$1” ei kelpaa sivun nimeksi.",
        "htmlform-title-not-exists": "Sivua $1 ei ole olemassa.",
        "htmlform-user-not-exists": "Käyttäjää <strong>$1</strong> ei ole olemassa.",
        "htmlform-user-not-valid": "<strong>$1</strong> ei ole kelvollinen käyttäjänimi.",
-       "sqlite-has-fts": "$1, jossa on tuki kokotekstihaulle",
-       "sqlite-no-fts": "$1, jossa ei ole tukea kokotekstihaulle",
        "logentry-delete-delete": "$1 {{GENDER:$2|poisti}} sivun $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|palautti}} sivun $3",
        "logentry-delete-event": "$1 {{GENDER:$2|muutti}} {{PLURAL:$5|lokitapahtuman|$5 lokitapahtuman}} näkyvyyttä kohteessa $3: $4",
        "feedback-external-bug-report-button": "Lähetä tekninen tehtävä",
        "feedback-dialog-title": "Lähetä palautetta",
        "feedback-dialog-intro": "Voit käyttää tätä helppoa lomaketta palautteesi lähettämiseen. Kommenttisi lisätään sivulle \"$1\" käyttäjätunnuksesi kera.",
-       "feedback-error-title": "Virhe",
        "feedback-error1": "Virhe: Ohjelmointirajapinnan vastausta ei tunnistettu",
        "feedback-error2": "Virhe: Muokkaus epäonnistui",
        "feedback-error3": "Virhe: Ohjelmointirajapinta ei vastaa",
        "feedback-thanks": "Kiitos. Palautteesi on jätetty sivulle [$2 $1].",
        "feedback-thanks-title": "Kiitos!",
        "feedback-useragent": "User agent:",
-       "searchsuggest-search": "Hae",
+       "searchsuggest-search": "Hae {{SITENAME}}",
        "searchsuggest-containing": "sisältää...",
        "api-error-autoblocked": "Sinun IP-osoitteesi on estetty automaattisesti, koska sitä on käyttänyt estetty käyttäjätunnus.",
        "api-error-badaccess-groups": "Sinulla ei ole oikeutta tallentaa tiedostoja tähän wikiin.",
        "linkaccounts-submit": "Linkitä tunnuksia",
        "unlinkaccounts": "Poista tunnusten linkityksiä",
        "unlinkaccounts-success": "Tunnuksen linkitys poistettiin.",
-       "authenticationdatachange-ignored": "Varmennustietojen muutosta ei käsitelty. Ehkä palveluntarjoajaa ei määritelty?"
+       "authenticationdatachange-ignored": "Varmennustietojen muutosta ei käsitelty. Ehkä palveluntarjoajaa ei määritelty?",
+       "restrictionsfield-badip": "Virheellinen IP-osoite tai alue: $1",
+       "restrictionsfield-label": "Sallitut IP-alueet:",
+       "edit-error-short": "$1",
+       "edit-error-long": "Virheet:\n\n$1"
 }
index 4086700..8a788a2 100644 (file)
        "tog-enotifminoredits": "M’avertir par courriel également lors des modifications mineures des pages ou des fichiers",
        "tog-enotifrevealaddr": "Afficher mon adresse électronique dans les courriels de notification",
        "tog-shownumberswatching": "Afficher le nombre d’utilisateurs en cours",
-       "tog-oldsig": "Signature existante :",
+       "tog-oldsig": "Votre signature existante :",
        "tog-fancysig": "Traiter la signature comme du wikitexte (sans lien automatique)",
        "tog-uselivepreview": "Utiliser l’aperçu rapide",
        "tog-forceeditsummary": "M’avertir lorsque je n’ai pas spécifié de résumé de modification",
        "tog-showhiddencats": "Afficher les catégories cachées",
        "tog-norollbackdiff": "Ne pas afficher le diff après avoir révoqué",
        "tog-useeditwarning": "M’avertir quand je quitte une page en cours de modification sans avoir sauvegardé",
-       "tog-prefershttps": "Toujours utiliser une connexion sécurisée pour se connecter",
+       "tog-prefershttps": "Utilisez toujours une connexion sécurisée pour vous connecter",
        "underline-always": "Toujours",
        "underline-never": "Jamais",
        "underline-default": "Valeur par défaut du thème ou du navigateur",
        "newwindow": "(ouvre dans une nouvelle fenêtre)",
        "cancel": "Annuler",
        "moredotdotdot": "Plus...",
-       "morenotlisted": "Cette liste n’est pas complète.",
+       "morenotlisted": "Cette liste peut être incomplète.",
        "mypage": "Page",
        "mytalk": "Discussion",
        "anontalk": "Discussion",
        "talk": "Discussion",
        "views": "Affichages",
        "toolbox": "Outils",
+       "tool-link-userrights": "Modifier les groupes de {{GENDER:$1|l’utilisateur|l’utilisatrice}}",
+       "tool-link-emailuser": "Envoyer un courriel à {{GENDER:$1|l’utilisateur|l’utilisatrice}}",
        "userpage": "Voir la page utilisateur",
        "projectpage": "Voir la page du projet",
        "imagepage": "Voir la page du fichier",
        "eauthentsent": "Un courriel de confirmation a été envoyé à l’adresse indiquée.\nAvant qu’un autre courriel ne soit envoyé à ce compte, vous devrez suivre les instructions du courriel et confirmer que le compte est bien le vôtre.",
        "throttled-mailpassword": "Un courriel de réinitialisation de votre mot de passe a déjà été envoyé durant {{PLURAL:$1|la dernière heure|les $1 dernières heures}}. \nAfin d’éviter les abus, un seul courriel de réinitialisation de votre mot de passe sera envoyé par {{PLURAL:$1|heure|intervalle de $1 heures}}.",
        "mailerror": "Erreur lors de l’envoi du courriel : $1",
-       "acct_creation_throttle_hit": "Les visiteurs de ce wiki qui utilisent votre adresse IP ont créé {{PLURAL:$1|un compte|$1 comptes}} au cours des dernières 24 heures, ce qui est la limite maximale autorisée dans cet intervalle de temps.\nPar conséquent, la création de comptes pour les visiteurs utilisant cette adresse IP est temporairement suspendue.",
+       "acct_creation_throttle_hit": "Les visiteurs de ce wiki qui utilisent votre adresse IP ont créé {{PLURAL:$1|un compte|$1 comptes}} durant les dernières $2, ce qui est la limite maximale autorisée dans cet intervalle de temps.\nPar conséquent, la création de comptes pour les visiteurs utilisant cette adresse IP est temporairement suspendue.",
        "emailauthenticated": "Votre adresse de courriel a été confirmée le $2 à $3.",
        "emailnotauthenticated": "Votre adresse de courriel n’est pas encore confirmée.\nAucun courriel ne sera envoyé pour chacune des fonctions suivantes.",
        "noemailprefs": "Indiquez une adresse de courriel dans vos préférences pour utiliser ces fonctions.",
        "botpasswords-label-resetpassword": "Réinitialiser le mot de passe",
        "botpasswords-label-grants": "Droits applicables :",
        "botpasswords-help-grants": "Chaque droit accordé donne accès à la liste des droits utilisateurs dont l’utilisateur dispose déjà. Voyez le [[Special:ListGrants|tableau des droits]] pour plus d’informations.",
-       "botpasswords-label-restrictions": "Restrictions d’utilisation :",
        "botpasswords-label-grants-column": "Accordé",
        "botpasswords-bad-appid": "Le nom de robot « $1 » n’est pas valide.",
        "botpasswords-insert-failed": "Échec de l’ajout du nom de robot « $1 ». A-t-il déjà été ajouté ?",
        "botpasswords-updated-body": "Le mot de passe pour le robot « $1 » de l'utilisateur « $2 » a été mis à jour.",
        "botpasswords-deleted-title": "Mot de passe de robots supprimé",
        "botpasswords-deleted-body": "Le mot de passe pour le robot « $1 » de l'utilisateur « $2 » a été supprimé.",
-       "botpasswords-newpassword": "Le nouveau mot de passe pour se connecter avec <strong>$1</strong> est <strong>$2</strong>. <em>Veuillez l’enregistrer pour y faire référence ultérieurement.</em>",
+       "botpasswords-newpassword": "Le nouveau mot de passe pour se connecter à <strong>$1</strong> est <strong>$2</strong>. <em>Veuillez l’enregistrer pour y faire référence ultérieurement.</em><br> (Pour les anciens robots qui nécessitent que le nom fourni à la connexion soit le même que le nom d'utilisateur éventuel, vous pouvez aussi utiliser  <strong>$3</strong> comme nom d'utilisateur et <strong>$4</strong> comme mot de passe).",
        "botpasswords-no-provider": "BotPasswordsSessionProvider n’est pas disponible.",
        "botpasswords-restriction-failed": "Les restrictions de mot de passe de robots empêchent cette connexion.",
        "botpasswords-invalid-name": "Le nom d’utilisateur spécifié ne contient pas de séparateur de mot de passe de robots (« $1 »).",
        "passwordreset-capture-help": "Si vous cochez cette case, le courriel (avec le mot de passe temporaire) vous sera affiché en même temps qu’il sera envoyé à l’utilisateur.",
        "passwordreset-email": "Adresse de courriel :",
        "passwordreset-emailtitle": "Détails du compte sur {{SITENAME}}",
-       "passwordreset-emailtext-ip": "Quelqu’un (probablement vous, depuis l’adresse IP $1) a demandé un réinitialisation de votre mot de passe pour {{SITENAME}} ($4). {{PLURAL:$3|Le compte utilisateur suivant est associé|Les comptes utilisateurs suivants sont associés}} à cette adresse de courriel :\n\n$2\n\n{{PLURAL:$3|Ce mot de passe temporaire expirera|Ces mots de passe temporaires expireront}} dans {{PLURAL:$5|un jour|$5 jours}}. \nVous devez maintenant vous connecter et choisir un nouveau mot de passe. Si cette demande ne provient pas de vous, ou que vous avez retrouvé votre mot de passe initial, et ne souhaitez plus le modifier, vous pouvez ignorer ce message et continuer à utiliser votre ancien mot de passe.",
+       "passwordreset-emailtext-ip": "Quelqu’un (probablement vous, depuis l’adresse IP $1) a demandé une réinitialisation de votre mot de passe pour {{SITENAME}} ($4). {{PLURAL:$3|Le compte utilisateur suivant est associé|Les comptes utilisateurs suivants sont associés}} à cette adresse de courriel :\n\n$2\n\n{{PLURAL:$3|Ce mot de passe temporaire expirera|Ces mots de passe temporaires expireront}} dans {{PLURAL:$5|un jour|$5 jours}}. \nVous devez maintenant vous connecter et choisir un nouveau mot de passe. Si cette demande ne provient pas de vous, ou si vous avez retrouvé votre mot de passe initial, et ne souhaitez plus le modifier, vous pouvez ignorer ce message et continuer à utiliser votre ancien mot de passe.",
        "passwordreset-emailtext-user": "L’utilisateur $1 sur {{SITENAME}} a demandé une réinitialisation de votre mot de passe pour {{SITENAME}} ($4). {{PLURAL:$3|Le compte utilisateur suivant est associé|Les comptes utilisateurs suivants sont associés}} à cette adresse de courriel :\n\n$2\n\n{{PLURAL:$3|Ce mot de passe temporaire expirera|Ces mots de passe temporaires expireront}} dans {{PLURAL:$5|un jour|$5 jours}}. \nVous devez maintenant vous connecter et choisir un nouveau mot de passe. Si cette demande ne provient pas de vous, ou si vous avez retrouvé votre mot de passe initial, et ne souhaitez plus le modifier, vous pouvez ignorer ce message et continuer à utiliser votre ancien mot de passe.",
        "passwordreset-emailelement": "Nom d’utilisateur : \n$1\n\nMot de passe temporaire : \n$2",
        "passwordreset-emailsentemail": "Si cette adresse de courriel est associée à votre compte, alors un courriel de réinitialisation de mot de passe sera envoyé.",
        "passwordreset-emailsentusername": "S’il y a une adresse de courriel associée à ce nom d’utilisateur, alors un courriel de réinitialisation de mot de passe sera envoyé.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Le courriel de réinitialisation du mot de passe a été envoyé|Les courriels de réinitialisation du mot de passe ont été envoyés}}. {{PLURAL:$1|Le nom d’utilisateur et le mot de passe sont affichés|La liste des noms d’utilisateur et mots de passe est affichée}} ci-dessous.",
-       "passwordreset-emailerror-capture2": "L’envoi de courriel à {{GENDER:$2|l’utilisateur|l’utilisatrice}} a échoué : $1 {{PLURAL:$3|Le nom d’utilisateur et le mot de passe sont affichés|La liste des noms d’utilisateur et des mots de passe est affichée}} ci-dessous.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Le courriel de réinitialisation du mot de passe a été envoyé|Les courriels de réinitialisation du mot de passe ont été envoyés}}. {{PLURAL:$1|Le nom d’utilisateur et le mot de passe sont affichés|La liste des noms d’utilisateur et mots de passe est affichée}} ici.",
+       "passwordreset-emailerror-capture2": "L’envoi de courriel à {{GENDER:$2|l’utilisateur|l’utilisatrice}} a échoué : $1 {{PLURAL:$3|Le nom d’utilisateur et le mot de passe sont affichés|La liste des noms d’utilisateur et des mots de passe est affichée}} ici.",
        "passwordreset-nocaller": "Un appelant doit être fourni",
        "passwordreset-nosuchcaller": "L’appelant n’existe pas : $1",
        "passwordreset-ignored": "La réinitialisation du mot de passe n’a pas été gérée. Peut-être qu’aucun fournisseur n’a été configuré ?",
        "invalid-content-data": "Données du contenu non valides",
        "content-not-allowed-here": "Le contenu « $1 » n’est pas autorisé sur la page [[$2]]",
        "editwarning-warning": "Quitter cette page vous fera perdre toutes les modifications que vous avez faites.\nSi vous êtes connecté{{GENDER:||e}}, vous pouvez désactiver cet avertissement dans la section « {{int:prefs-editing}} » de vos préférences.",
+       "editpage-invalidcontentmodel-title": "Modèle de contenu non pris en charge",
+       "editpage-invalidcontentmodel-text": "Le modèle de contenu \"$1\" n'est pas pris en charge.",
        "editpage-notsupportedcontentformat-title": "Format de contenu non pris en charge",
        "editpage-notsupportedcontentformat-text": "Le format de contenu $1 n'est pas pris en charge par le modèle de contenu $2 .",
        "content-model-wikitext": "wikitexte",
        "revdelete-radio-same": "(ne pas changer)",
        "revdelete-radio-set": "Masqué",
        "revdelete-radio-unset": "Visible",
-       "revdelete-suppress": "Supprimer également les données des administrateurs",
+       "revdelete-suppress": "Masquer également les données pour les administrateurs",
        "revdelete-unsuppress": "Enlever les restrictions sur les versions restaurées",
        "revdelete-log": "Motif :",
        "revdelete-submit": "Appliquer {{PLURAL:$1|à la révision sélectionnée|aux révisions sélectionnées}}",
        "prefs-emailconfirm-label": "Confirmation du courriel :",
        "youremail": "Courriel :",
        "username": "{{GENDER:$1|Nom d'utilisateur|Nom d'utilisatrice}} :",
-       "prefs-memberingroups": "{{GENDER:$2|Membre}} {{PLURAL:$1|du groupe|des groupes}}:",
+       "prefs-memberingroups": "{{GENDER:$2|Membre}} {{PLURAL:$1|du groupe|des groupes}} :",
        "prefs-registration": "Date d'inscription :",
        "yourrealname": "Nom réel :",
        "yourlanguage": "Langue :",
        "grant-basic": "Droits de base",
        "grant-viewdeleted": "Afficher les fichiers et pages supprimés",
        "grant-viewmywatchlist": "Afficher votre liste de suivi",
+       "grant-viewrestrictedlogs": "Afficher les entrées de journal confidentielles",
        "newuserlogpage": "Journal des créations de comptes utilisateur",
        "newuserlogpagetext": "Cette page affiche l’historique des créations de comptes utilisateur.",
        "rightslog": "Journal des modifications de droits d’utilisateurs",
        "upload-dialog-disabled": "Les téléversements de fichier utilisant cette boîte de dialogue sont désactivés sur ce wiki.",
        "upload-dialog-title": "Téléverser un fichier",
        "upload-dialog-button-cancel": "Annuler",
+       "upload-dialog-button-back": "Retour",
        "upload-dialog-button-done": "Terminé",
        "upload-dialog-button-save": "Enregistrer",
        "upload-dialog-button-upload": "Téléverser",
        "apisandbox-results-fixtoken-fail": "Impossible de récupérer le jeton \"$1\"",
        "apisandbox-alert-page": "Les champs de cette page ne sont pas valides.",
        "apisandbox-alert-field": "La valeur de ce champ n'est pas valide.",
+       "apisandbox-continue": "Continuer",
+       "apisandbox-continue-clear": "Effacer",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries continuera] la dernière requête ; {{int:apisandbox-continue-clear}} effacera les paramètres relatifs à la continuation.",
        "booksources": "Ouvrages de référence",
        "booksources-search-legend": "Rechercher parmi des ouvrages de référence",
        "booksources-isbn": "ISBN :",
        "movelogpagetext": "Voici la liste de toutes les pages renommées ou déplacées.",
        "movesubpage": "Sous-page{{PLURAL:$1||s}}",
        "movesubpagetext": "Cette page a $1 {{PLURAL:$1|sous-page affichée|sous-pages affichées}} ci-dessous.",
+       "movesubpagetalktext": "La page de discussion correspodnante a $1 {{PLURAL:$1|sous-page|sous-pages}} affichées ci-dessous.",
        "movenosubpage": "Cette page n'a aucune sous-page.",
        "movereason": "Motif :",
        "revertmove": "rétablir",
        "pageinfo-category-pages": "Nombre de pages",
        "pageinfo-category-subcats": "Nombre de sous-catégories",
        "pageinfo-category-files": "Nombre de fichiers",
+       "pageinfo-user-id": "ID de l’utilisateur",
        "markaspatrolleddiff": "Marquer comme relue",
        "markaspatrolledtext": "Marquer cette page comme relue",
-       "markaspatrolledtext-file": "Marquer cette version de fichier comme patrouillée",
+       "markaspatrolledtext-file": "Marquer cette version de fichier comme relue",
        "markedaspatrolled": "Marquée comme relue",
        "markedaspatrolledtext": "La version sélectionnée de [[:$1]] a été marquée comme relue.",
        "rcpatroldisabled": "La fonction de relecture des modifications récentes n'est pas activée.",
        "newimages-showbots": "Afficher les imports faits par des robots",
        "newimages-hidepatrolled": "Masquer les téléchargements patrouillés",
        "noimages": "Aucune image à afficher.",
+       "gallery-slideshow-toggle": "Basculer les vignettes",
        "ilsubmit": "Rechercher",
        "bydate": "par date",
        "sp-newimages-showfrom": "Afficher les nouveaux fichiers à partir du $1 à $2",
        "variantname-shi-tfng": "shi-tfng",
        "variantname-shi-latn": "shi-latn",
        "metadata": "Métadonnées",
-       "metadata-help": "Ce fichier contient des informations supplémentaires, probablement ajoutées par l'appareil photo numérique ou le numériseur utilisé pour le créer. Si le fichier a été modifié depuis son état original, certains détails peuvent ne pas refléter entièrement l'image modifiée.",
+       "metadata-help": "Ce fichier contient des informations supplémentaires, probablement ajoutées par l'appareil photo numérique ou le numériseur utilisé pour le créer. \nSi le fichier a été modifié depuis son état original, certains détails peuvent ne pas refléter entièrement l'image modifiée.",
        "metadata-expand": "Afficher les informations détaillées",
        "metadata-collapse": "Masquer les informations détaillées",
        "metadata-fields": "Les champs de métadonnées d'image listés dans ce message seront inclus dans la page de description de l'image quand la table de métadonnées sera réduite. Les autres champs seront cachés par défaut.\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
        "exif-gpsdifferential": "Correction différentielle GPS",
        "exif-jpegfilecomment": "Commentaire de fichier JPEG",
        "exif-keywords": "Mots-clés",
-       "exif-worldregioncreated": "Région du monde dans laquelle la photo a été prise",
+       "exif-worldregioncreated": "Région du monde  la photo a été prise",
        "exif-countrycreated": "Pays dans lequel la photo a été prise",
        "exif-countrycodecreated": "Code du pays dans lequel la photo a été prise",
        "exif-provinceorstatecreated": "Province ou État dans lequel la photo a été prise",
        "namespacesall": "Tous",
        "monthsall": "tous",
        "confirmemail": "Confirmer l’adresse de courriel",
-       "confirmemail_noemail": "Vous n’avez pas défini une adresse de courriel valide dans vos [[Special:Preferences|préférences]].",
+       "confirmemail_noemail": "Vous n’avez pas défini une adresse de courriel valide dans vos [[Special:Preferences|préférences utilisateur]].",
        "confirmemail_text": "Ce wiki nécessite la vérification de votre adresse de courriel avant de pouvoir utiliser toute fonction de messagerie.\nUtilisez le bouton ci-dessous pour envoyer un courriel de confirmation à votre adresse.\nLe courriel inclura un lien comportant un code à usage unique et limité dans le temps ;\nchargez ce lien dans votre navigateur pour confirmer que votre adresse de courriel est valide.",
        "confirmemail_pending": "Un code de confirmation vous a déjà été envoyé par courriel ;\nsi vous venez de créer votre compte, veuillez attendre quelques minutes que le courriel arrive avant de demander un nouveau code.",
        "confirmemail_send": "Envoyer un code de confirmation",
        "confirmemail_success": "Votre adresse de courriel a été confirmée.\nVous pouvez maintenant vous [[Special:UserLogin|{{MediaWiki:Loginreqlink}}]] et profiter du wiki.",
        "confirmemail_loggedin": "Votre adresse de courriel est maintenant confirmée.",
        "confirmemail_subject": "Confirmation d’adresse de courriel pour {{SITENAME}}",
-       "confirmemail_body": "Quelqu’un, probablement vous, à partir de l’adresse IP $1,\na enregistré un compte « $2 » avec cette adresse de courriel\nsur le site {{SITENAME}}.\n\nPour confirmer que ce compte vous appartient vraiment et afin\nd’activer les fonctions de messagerie sur {{SITENAME}},\nveuillez suivre ce lien dans votre navigateur :\n\n$3\n\nSi vous n’avez *pas* enregistré ce compte, n’ouvrez pas ce lien ;\nvous pouvez suivre l’autre lien ci-dessous pour annuler la\nconfirmation de votre adresse courriel :\n\n$5\n\nCe code de confirmation expirera le $4.",
+       "confirmemail_body": "Quelqu’un, probablement vous, à partir de l’adresse IP $1,\na créé un compte « $2 » avec cette adresse de courriel sur le site {{SITENAME}}.\n\nPour confirmer que ce compte vous appartient vraiment et afin\nd’activer les fonctions de messagerie sur {{SITENAME}},\nveuillez suivre ce lien dans votre navigateur :\n\n$3\n\nSi vous n’avez *pas* créé ce compte, suivez le lien ci-dessous \npour annuler la confirmation de votre adresse courriel :\n\n$5\n\nCe code de confirmation expirera le $4.",
        "confirmemail_body_changed": "Quelqu’un, probablement vous, à partir de l’adresse IP $1,\na modifié l’adresse de courriel associée au compte « $2 » de {{SITENAME}}\nen cette adresse.\n\nPour confirmer que ce compte vous appartient vraiment et afin\nde réactiver les fonctions de messagerie sur {{SITENAME}},\nveuillez suivre ce lien dans votre navigateur :\n\n$3\n\nSi ce compte ne vous appartient *pas*, n’ouvrez pas ce lien ;\nvous pouvez suivre l’autre lien ci-dessous pour annuler la\nconfirmation de votre adresse courriel :\n\n$5\n\nCe code de confirmation expirera le $4.",
        "confirmemail_body_set": "Quelqu’un, probablement vous, depuis l’adresse IP $1, a modifié l’adresse de courriel du compte « $2 » en celle-ci sur {{SITENAME}}.\n\nPour confirmer que ce compte vous appartient et réactiver les fonctions de courriel sur {{SITENAME}}, ouvrez ce lien dans votre navigateur Web :\n\n$3\n\nCe code de confirmation expirera le $4.\n\nSi le compte ne vous appartient *pas*, suivez plutôt ce lien pour annuler la confirmation de l’adresse de courriel :\n\n$5",
        "confirmemail_invalidated": "Confirmation de l’adresse courriel annulée",
        "scarytranscludefailed": "[La récupération de modèle a échoué pour $1]",
        "scarytranscludefailed-httpstatus": "[Échec de la récupération du modèle pour  $1 : HTTP  $2 ]",
        "scarytranscludetoolong": "[L'URL est trop longue]",
-       "deletedwhileediting": "'''Attention''' : cette page a été supprimée après que vous ayez commencé à la modifier !",
+       "deletedwhileediting": "<strong>Attention</strong> : cette page a été supprimée après que vous ayez commencé à la modifier !",
        "confirmrecreate": "L’utilisat{{GENDER:$1|eur|rice}} [[User:$1|$1]] ([[User talk:$1|Discussion]]) a supprimé cette page, alors que vous aviez commencé à la modifier, pour le motif suivant :\n: <em>$2</em>\nVeuillez confirmer que vous désirez réellement recréer cette page.",
        "confirmrecreate-noreason": "L’utilisat{{GENDER:$1|eur|rice}} [[User:$1|$1]] ([[User talk:$1|Discussion]]) a supprimé cette page, alors que vous aviez commencé à la modifier. Veuillez confirmer que vous désirez réellement recréer cette page.",
        "recreate": "Recréer",
        "watchlistedit-clear-removed": "{{PLURAL:$1|Un titre a été|$1 titres ont été}} retirés :",
        "watchlistedit-too-many": "Il y a trop de pages à afficher ici.",
        "watchlisttools-clear": "Effacer la liste de suivi",
-       "watchlisttools-view": "Liste de suivi",
+       "watchlisttools-view": "Afficher les modifications associées",
        "watchlisttools-edit": "Voir et modifier la liste de suivi",
        "watchlisttools-raw": "Modifier la liste de suivi en mode brut",
        "iranian-calendar-m1": "Farvardin",
        "hebrew-calendar-m12-gen": "eloul",
        "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|discussion]])",
        "timezone-local": "Local",
-       "duplicate-defaultsort": "Attention : la clé de tri par défaut « $2 » écrase la précédente clé « $1 ».",
+       "duplicate-defaultsort": "<strong>Attention :</strong> la clé de tri par défaut « $2 » écrase la précédente clé « $1 ».",
        "duplicate-displaytitle": "<strong>Attention :</strong> Le titre d'affichage « $2 » remplace l'ancien titre d'affichage « $1 ».",
        "restricted-displaytitle": "<strong>Avertissement :</strong> le titre d’affichage \"$1\" a été ignoré car il n'est pas équivalent au titre effectif de la page.",
        "invalid-indicator-name": "<strong>Erreur :</strong> L’attribut <code>name</code> des indicateurs d’état de la page ne doit pas être vide.",
        "version-license-not-found": "Aucune information détaillée de la licence n'a été trouvée pour cette extension.",
        "version-credits-title": "Remerciements pour $1",
        "version-credits-not-found": "Aucune information détaillée des remerciements n'a été trouvée pour cette extension.",
-       "version-poweredby-credits": "Ce wiki fonctionne grâce à '''[https://www.mediawiki.org/ MediaWiki]''', copyright © 2001-$1 $2.",
+       "version-poweredby-credits": "Ce wiki fonctionne grâce à <strong>[https://www.mediawiki.org/ MediaWiki]</strong>, copyright © 2001-$1 $2.",
        "version-poweredby-others": "autres",
        "version-poweredby-translators": "traducteurs de translatewiki.net",
        "version-credits-summary": "Nous tenons à remercier les personnes suivantes pour leur contribution à  [[Special:Version|MediaWiki]].",
-       "version-license-info": "MediaWiki est un logiciel libre, vous pouvez le redistribuer ou le modifier selon les termes de la Licence Publique Générale GNU telle que publiée par la Free Software Foundation ; soit la version 2 de la Licence, ou (à votre choix) toute version ultérieure.\n\nMediaWiki est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION À UN USAGE PARTICULIER. Voir la Licence Publique Générale GNU pour plus de détails.\n\nVous devriez avoir reçu [{{SERVER}}{{SCRIPTPATH}}/COPYING une copie de la Licence Publique Générale GNU] avec ce programme, sinon, écrivez à la Free Software Foundation, Inc., 51, rue Franklin, cinquième étage, Boston, MA 02110-1301, États-Unis ou [//www.gnu.org/licenses/old-licenses/gpl-2.0.html lisez-la en ligne].",
+       "version-license-info": "MediaWiki est un logiciel libre, vous pouvez le redistribuer ou le modifier selon les termes de la Licence Publique Générale GNU telle que publiée par la Free Software Foundation ; soit la version 2 de la Licence, ou (à votre choix) toute version ultérieure.\n\nMediaWiki est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION À UN USAGE PARTICULIER. Voir la Licence Publique Générale GNU pour plus de détails.\n\nVous devriez avoir reçu [{{SERVER}}{{SCRIPTPATH}}/COPYING une copie de la Licence Publique Générale GNU] avec ce programme, sinon, écrivez à la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, États-Unis ou [//www.gnu.org/licenses/old-licenses/gpl-2.0.html lisez-la en ligne].",
        "version-software": "Logiciels installés",
        "version-software-product": "Produit",
        "version-software-version": "Version",
        "tag-filter": "Filtrer les [[Special:Tags|balises]] :",
        "tag-filter-submit": "Filtrer",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Balise|Balises}}]] : $2)",
+       "tag-mw-contentmodelchange": "modification du modèle de contenu",
+       "tag-mw-contentmodelchange-description": "Modifications qui [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel changent le modèle de contenu] d'une page",
        "tags-title": "Balises",
-       "tags-intro": "Cette page liste les balises que le logiciel peut utiliser pour marquer une modification et la signification de chacune.",
+       "tags-intro": "Cette page liste les balises que le logiciel peut utiliser pour marquer une modification et la signification de chacune d’elles.",
        "tags-tag": "Nom de la balise",
        "tags-display-header": "Apparence dans les listes de modifications",
        "tags-description-header": "Description complète de la balise",
        "tags-actions-header": "Actions",
        "tags-active-yes": "Oui",
        "tags-active-no": "Non",
-       "tags-source-extension": "Définie par une extension",
-       "tags-source-manual": "Appliquée manuellement par les utilisateurs et les bots",
+       "tags-source-extension": "Défini par le logiciel",
+       "tags-source-manual": "Appliquée manuellement par les utilisateurs et les robots",
        "tags-source-none": "Obsolète",
        "tags-edit": "modifier",
        "tags-delete": "supprimer",
        "tags-manage-no-permission": "Vous n'avez pas la permission de gérer les modifications de balises.",
        "tags-manage-blocked": "Vous ne pouvez pas accéder à l’interface de modification des balises lorsque vous êtes bloqué{{GENDER:||e}}.",
        "tags-create-heading": "Créer une nouvelle balise",
-       "tags-create-explanation": "Par défaut, les nouvelles balises créées seront disponibles pour les utilisateurs et les bots.",
+       "tags-create-explanation": "Par défaut, les nouvelles balises créées seront disponibles pour les utilisateurs et les robots.",
        "tags-create-tag-name": "Nom de la balise :",
        "tags-create-reason": "Raison :",
        "tags-create-submit": "Créer",
        "tags-create-no-name": "Vous devez spécifier un nom de balise.",
-       "tags-create-invalid-chars": "Les noms de balise ne doivent pas contenir de virgules (<code>,</code>) ou des barres obliques (<code>/</code>).",
+       "tags-create-invalid-chars": "Les noms de balise ne doivent pas contenir de virgules (<code>,</code>) ni de barres obliques (<code>/</code>).",
        "tags-create-invalid-title-chars": "Les noms de balise ne doivent pas contenir de caractères qui ne peuvent pas être utilisés dans les titres des pages.",
        "tags-create-already-exists": "La balise « $1 » existe déjà.",
        "tags-create-warnings-above": "{{PLURAL:$2|L'avertissement suivant|Les avertissements suivants}} ont été rencontrés lors de la tentative de création de la balise « $1 » :",
        "tags-delete-title": "Supprimer la balise",
        "tags-delete-explanation-initial": "Vous êtes sur le point de supprimer la balise « $1 » de la base de données.",
        "tags-delete-explanation-in-use": "Elle sera supprimée de {{PLURAL:$2|$2 révision ou entrée de journal à laquelle|toutes les $2 révisions et/ou entrées de journal auxquelles}} elle est actuellement appliquée.",
-       "tags-delete-explanation-warning": "Cette action est <strong>irréversible</strong> et <strong>ne peut pas être annulée</strong>, même pas par les administrateurs de base de données. Soyez certain que c'est la balise que vous voulez supprimer.",
+       "tags-delete-explanation-warning": "Cette action est <strong>irréversible</strong> et <strong>ne peut pas être annulée</strong>, même pas par les administrateurs de base de données. Soyez certain que c'est cette balise que vous voulez supprimer.",
        "tags-delete-explanation-active": "<strong>La balise « $1 » est toujours active, et continuera à être appliquée dans le futur. </strong> Pour arrêter cela, allez à l'endroit (ou aux endroits) où la balise est appliquée, et désactivez la.",
        "tags-delete-reason": "Motif :",
        "tags-delete-submit": "Supprimer cette balise de manière irréversible",
        "tags-edit-failure": "Les modifications n’ont pas pu être appliquées :\n$1",
        "tags-edit-nooldid-title": "Version cible non valide",
        "tags-edit-nooldid-text": "Vous n’avez soit pas spécifié de version cible sur laquelle exécuter cette fonction, soit la version spécifiée n’existe pas.",
-       "tags-edit-none-selected": "Veuillez sélectionner au moins une balise à ajouter ou enlever.",
+       "tags-edit-none-selected": "Veuillez sélectionner au moins une balise à ajouter ou à enlever.",
        "comparepages": "Comparer des pages",
        "compare-page1": "Page 1",
        "compare-page2": "Page 2",
        "htmlform-cloner-create": "Ajouter encore",
        "htmlform-cloner-delete": "Supprimer",
        "htmlform-cloner-required": "Une valeur au moins est obligatoire.",
+       "htmlform-date-placeholder": "AAAA-MM-JJ",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "AAAA-MM-JJ HH:MM:SS",
+       "htmlform-date-invalid": "La valeur que vous avez spécifiée n’est pas une date reconnue. Essayez en utilisant le format AAAA-MM-JJ.",
+       "htmlform-time-invalid": "La valeur que vous avez spécifiée n’est pas une heure reconnue. Essayez en utilisant le format HH:MM:SS.",
+       "htmlform-datetime-invalid": "La valeur que vous avez spécifiée n’est pas un horodatage reconnu. Essayez en utilisant le format AAAA-MM-JJ HH:MM:SS.",
+       "htmlform-date-toolow": "La valeur que vous avez spécifiée est antérieure à la date autorisée la plus ancienne, qui est $1.",
+       "htmlform-date-toohigh": "La valeur que vous avez spécifiée est postérieure à la date autorisée la plus lointaine, qui est $1.",
+       "htmlform-time-toolow": "La valeur que vous avez spécifiée est antérieure à la plus petite heure autorisée, qui est $1.",
+       "htmlform-time-toohigh": "La valeur que vous avez spécifiée est postérieure à la plus grande heure autorisée, qui est $1.",
+       "htmlform-datetime-toolow": "La valeur que vous avez spécifiée est antérieure à l’horodatage autorisé le plus ancien, qui est $1.",
+       "htmlform-datetime-toohigh": "La valeur que vous avez spécifiée est postérieure à l’horodatage autorisé le plus lointain, qui est $1.",
        "htmlform-title-badnamespace": "[[:$1]] n'est pas dans l’espace de noms « {{ns:$2}} ».",
        "htmlform-title-not-creatable": "« $1 » n’est pas un titre de page pouvant être créée",
        "htmlform-title-not-exists": "$1 n’existe pas",
        "htmlform-user-not-exists": "<strong>$1</strong> n’existe pas.",
        "htmlform-user-not-valid": "<strong>$1</strong> n’est pas un nom d’utilisateur valide.",
-       "sqlite-has-fts": "$1 avec recherche en texte intégral prise en charge",
-       "sqlite-no-fts": "$1 sans recherche en texte intégral prise en charge",
        "logentry-delete-delete": "$1 {{GENDER:$2|a supprimé}} la page $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|a restauré}} la page $3",
        "logentry-delete-event": "$1 {{GENDER:$2|a modifié}} la visibilité {{PLURAL:$5|d'un événement du journal|de $5 événements du journal}} sur $3: $4",
        "log-description-managetags": "Cette page recense les tâches de maintenance liées aux [[Special:Tags|balises]]. Le journal contient uniquement les actions faites manuellement par un administrateur ; les balises peuvent être créées ou supprimées par le logiciel wiki sans que cette action ne soit inscrite dans ce journal.",
        "logentry-managetags-create": "$1 {{GENDER:$2|a créé}} la balise « $4 ».",
        "logentry-managetags-delete": "$1 {{GENDER:$2|a supprimé}} la balise « $4 » (retirée {{PLURAL:$5|d'une révision ou entrée de journal|de $5 révisions ou entrées de journal}})",
-       "logentry-managetags-activate": "$1 {{GENDER:$2|a activé}} la balise \"$4\" pour l’usage des utilisateurs et des robots",
+       "logentry-managetags-activate": "$1 {{GENDER:$2|a activé}} la balise « $4 » pour l’usage des utilisateurs et des robots",
        "logentry-managetags-deactivate": "$1 {{GENDER:$2|a désactivé}} la balise « $4 » pour l’usage des utilisateurs et des robots",
        "log-name-tag": "Journal des balises",
        "log-description-tag": "Cette page montre quand des utilisateurs ont ajouté ou supprimé des [[Special:Tags|balises]] de révisions individuelles ou d’entrées de journal. Le journal ne liste pas les actions de marquage quand elles ont lieu au cours d’une modification, d’une suppression, ou d’une action semblable.",
        "feedback-external-bug-report-button": "Signaler un bogue technique",
        "feedback-dialog-title": "Soumettre un commentaire",
        "feedback-dialog-intro": "Vous pouvez utiliser le simple formulaire ci-dessous pour faire parvenir vos commentaires. Votre commentaire sera ajouté à la page « $1 », ainsi que votre nom d’utilisateur.",
-       "feedback-error-title": "Erreur",
        "feedback-error1": "Erreur : Résultat de l'IPA non reconnu",
        "feedback-error2": "Erreur : la modification a échoué",
        "feedback-error3": "Erreur : aucune réponse de l'API",
        "feedback-thanks": "Merci ! Votre commentaire a été publié sur la page « [$2 $1] ».",
        "feedback-thanks-title": "Merci !",
        "feedback-useragent": "Agent utilisateur :",
-       "searchsuggest-search": "Rechercher",
+       "searchsuggest-search": "Rechercher sur {{SITENAME}}",
        "searchsuggest-containing": "contenant...",
        "api-error-autoblocked": "Votre adresse IP a été bloquée automatiquement, parce qu’elle a été utilisée par un utilisateur bloqué.",
        "api-error-badaccess-groups": "Vous n'êtes pas autorisé à verser des fichiers sur ce wiki.",
        "api-error-unclassified": "Une erreur inconnue s'est produite",
        "api-error-unknown-code": "Erreur inconnue : « $1 »",
        "api-error-unknown-error": "Erreur interne : Quelque chose a mal tourné lors du versement de votre fichier.",
-       "api-error-unknown-warning": "Avertissement inconnu : $1",
+       "api-error-unknown-warning": "Avertissement inconnu : « $1 ».",
        "api-error-unknownerror": "Erreur inconnue : « $1 ».",
        "api-error-uploaddisabled": "Le téléversement est désactivé sur ce wiki.",
-       "api-error-verification-error": "Ce fichier peut être corrompu, ou son extension est incorrecte.",
+       "api-error-verification-error": "Ce fichier est peut-être corrompu, ou son extension est incorrecte.",
        "api-error-was-deleted": "Un fichier portant ce nom a déjà été importé puis supprimé.",
        "duration-seconds": "$1 seconde{{PLURAL:$1||s}}",
        "duration-minutes": "$1 minute{{PLURAL:$1||s}}",
        "json-error-state-mismatch": "JSON non valide ou mal formé",
        "json-error-ctrl-char": "Erreur de caractères de contrôle, peut-être mal encodé",
        "json-error-syntax": "Erreur de syntaxe",
-       "json-error-utf8": "Caractères UTF-8 mal formés, peut-être mal encodé",
+       "json-error-utf8": "Caractères UTF-8 mal formés, peut-être mal encodés",
        "json-error-recursion": "Une ou plusieurs références récursives dans la valeur à encoder",
        "json-error-inf-or-nan": "Une une plusieurs valeurs NaN ou INF dans la valeur à encoder",
        "json-error-unsupported-type": "Une valeur a été donnée dans un type ne pouvant pas être encodé",
        "mw-widgets-dateinput-placeholder-month": "AAAA-MM",
        "mw-widgets-titleinput-description-new-page": "la page n’existe pas encore",
        "mw-widgets-titleinput-description-redirect": "redirection vers $1",
-       "sessionmanager-tie": "Impossible de combiner les demandes multiples de types d’authentification : $1.",
+       "sessionmanager-tie": "Impossible de combiner des types multiples de demandes d’authentification : $1.",
        "sessionprovider-generic": "sessions $1",
        "sessionprovider-mediawiki-session-cookiesessionprovider": "sessions basées sur les cookies",
-       "sessionprovider-nocookies": "Les cookies peuvent être désactivés. Assurez-vous que vous avez activé les cookies et recommencez.",
+       "sessionprovider-nocookies": "Il est possible que les cookies soient désactivés. Assurez-vous que vous avez activé les cookies et recommencez.",
        "randomrootpage": "Page racine aléatoire",
        "log-action-filter-block": "Type de blocage :",
        "log-action-filter-contentmodel": "Type de modification de modèle de contenu :",
        "unlinkaccounts-success": "Le compte a été dissocié.",
        "authenticationdatachange-ignored": "Les modifications de données d’authentification n’ont pas été gérées. Peut-être aucun fournisseur n’a-t-il été configuré ?",
        "userjsispublic": "Veuillez noter: les sous-pages JavaScript ne doivent pas contenir de données confidentielles parce qu'elles sont visibles des autres utilisateurs.",
-       "usercssispublic": "Veuillez noter: les sous-pages CSS ne doivent pas contenir de données confidentielles parce qu'elles sont visibles des autres utilisateurs."
+       "usercssispublic": "Veuillez noter: les sous-pages CSS ne doivent pas contenir de données confidentielles parce qu'elles sont visibles des autres utilisateurs.",
+       "restrictionsfield-badip": "Adresse IP ou plage non valide : $1",
+       "restrictionsfield-label": "Plages IP autorisées :",
+       "restrictionsfield-help": "Une adresse IP ou une plage CIDR par ligne. Pour tout activer, utiliser <br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Erreur : $1",
+       "edit-error-long": "Erreurs :\n\n$1"
 }
index 2765143..25c12fd 100644 (file)
        "yourpasswordagain": "Athiontráil d'fhocal faire",
        "createacct-yourpasswordagain": "Deimhnigh an pasfhocal",
        "createacct-yourpasswordagain-ph": "Iontráil an pasfhocal arís",
-       "remembermypassword": "Cuimhnigh ar m'fhocal faire ar an ríomhaire seo (ar feadh uastréimhse de $1 {{PLURAL:$1|lá|lá}})",
        "userlogin-remembermypassword": "Coinnigh logáilte isteach mé",
        "yourdomainname": "D'fhearann",
        "externaldberror": "Bhí earráid bhunachair sonraí ann maidir le fíordheimhniú seachtrach, nóThere was either an external authentication database error or you are not allowed to update your external account.",
        "createacct-reason": "Cúis",
        "createacct-submit": "Cruthaigh do chuntas",
        "createacct-another-submit": "Cruthaigh cuntas eile",
+       "createacct-benefit-heading": "Daoine cosúil leatsa a dhéanann {{SITENAME}}.",
        "badretype": "D'iontráil tú dhá fhocal faire difriúla.",
        "userexists": "Tá an ainm úsáideora sin in úsáid cheana féin.<br />\nRoghnaigh ainm eile agus bain triail eile as.",
        "loginerror": "Earráid leis an logáil isteach",
        "mergehistory-reason": "Fáth:",
        "revertmerge": "Díchumaisc",
        "history-title": "Stair leasú \"$1\"",
+       "difference-title": "An difríocht idir athruithe ar: \"$1\"",
        "lineno": "Líne $1:",
        "compareselectedversions": "Cuir na leagain roghnaithe i gcomparáid",
        "editundo": "cealaigh",
        "anoncontribs": "Dréachtaí",
        "contribsub2": "Do $1 ($2)",
        "nocontribs": "Ní bhfuarthas aon athrú a bhí cosúil le na crítéir seo.",
-       "uctop": " (barr)",
+       "uctop": "(reatha)",
        "month": "Ón mhí seo (agus níos luaithe):",
        "year": "Ón bhliain seo (agus níos luaithe):",
        "sp-contributions-newbies": "Taispeáin dréachtaí ó chuntais nua amháin",
        "sp-contributions-newbies-sub": "Le cuntais nua",
        "sp-contributions-newbies-title": "Dréachtaí úsáideora do chuntasaí nua",
        "sp-contributions-blocklog": "Log coisc",
-       "sp-contributions-deleted": "dréachtaí úsáideora scriosta",
+       "sp-contributions-deleted": "dréachtaí {{GENDER:$1|úsáideora}} scriosta",
        "sp-contributions-uploads": "uaslódálacha",
        "sp-contributions-logs": "logaí",
        "sp-contributions-talk": "plé",
        "whatlinkshere-prev": "{{PLURAL:$1|roimhe|$1 roimhe}}",
        "whatlinkshere-next": "{{PLURAL:$1|ar aghaidh|$1 ar aghaidh}}",
        "whatlinkshere-links": "← naisc",
-       "whatlinkshere-hideredirs": "$1 athsheolaidh",
+       "whatlinkshere-hideredirs": "$1 an t-athsheoladh",
        "whatlinkshere-hidetrans": "$1 trasiamh",
        "whatlinkshere-hidelinks": "$1 nasc",
        "whatlinkshere-hideimages": "$1 naisc comhad",
        "movepagetalktext": "Aistreofar an leathanach plé go huathoibríoch '''ach ní tharlófar sin''':\n* má tá leathanach plé neamhfholamh ann cheana leis an teideal nua, nó\n* má bhaineann tú an tic den bhosca thíos.\n\nSna cásanna sin, caithfidh tú an leathanach a aistrigh nó a chumasc tú féin más maith leat.",
        "movenologintext": "Ní mór duit bheith i d'úsáideoir cláraithe agus [[Special:UserLogin|logáilte isteach]] chun leathanach a hathainmniú.",
        "movenotallowed": "Níl cead agat leathanaigh a athainmniú.",
-       "newtitle": "Go teideal nua",
+       "newtitle": "Teideal nua:",
        "move-watch": "Déan faire an leathanach seo",
        "movepagebtn": "Athainmnigh an leathanach",
        "pagemovedsub": "D'éirigh leis an athainmniú",
        "movelogpagetext": "Liosta is ea seo thíos de leathanaigh athainmnithe.",
        "movereason": "Fáth:",
        "revertmove": "athúsáid",
-       "delete_and_move_text": "==Tá scriosadh riachtanach==\nTá an leathanach sprice (\"[[:$1]]\") ann cheana féin.\nAr mhaith leat é a scriosadh chun áit a dhéanamh don athainmniú?",
+       "delete_and_move_text": "Tá an leathanach sprice (\"[[:$1]]\") ann cheana féin.\nAr mhaith leat é a scriosadh chun áit a dhéanamh don bhogadh?",
        "delete_and_move_confirm": "Tá, scrios an leathanach",
-       "delete_and_move_reason": "Scriosta chun áit a dhéanamh d'athainmniú",
+       "delete_and_move_reason": "Scriosta chun áit a dhéanamh do bhogadh ó [[$1]]",
        "selfmove": "Tá an ainm céanna ag an bhfoinse mar atá ar an ainm sprice; ní féidir leathanach a athainmniú bheith é féin.",
        "export": "Easportáil leathanaigh",
        "exporttext": "Is féidir an téacs agus an stair athraithe de leathanach áirithe nó sraith leathanach a easpórtáil, fillte i bpíosa XML.\nIs féidir é seo a iompórtáil i vicí eile MediaWiki trí úsáid an [[Special:Import|leathanach iompórtála]].\n\nChun leathanaigh a easpórtáil, cuir isteach na teidil sa bhosca thíos, gach teideal ar a líne féin, agus roghnaigh an leagan reatha in éineacht leis na sean-leaganacha agus stair an leathanaigh, nó an leagan reatha in éineacht le faisnéis faoin athrú deireanach.\n\nSa dara cás, is féidir leat nasc a úsáid, mar shampla [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]] le haghaidh an leathanaigh \"[[{{MediaWiki:Mainpage}}]]\".",
        "filemissing": "Comhad ar iarraidh",
        "thumbnail_error": "Earráid agus mionsamhail a chruthú: $1",
        "import": "Iompórtáil leathanaigh",
-       "importinterwiki": "Iompórtáil trasna vicithe",
+       "importinterwiki": "Iompórtáil ó vicí eile",
        "import-interwiki-submit": "iompórtáil",
        "import-comment": "Nóta tráchta:",
-       "importtext": "Easportáil an comhad ón vici-fhoinse (le húsáid na [[Special:Export|tréithe easportáil]]), sábháil ar do dhíosca é agus uaslódáil anseo é.",
+       "importtext": "Easpórtáil an comhad ón vicí-fhoinse tríd an[[Special:Export|uirlis easpórtála]] a úsáid. Sábháil ar do ríomhaire é agus uaslódáil anseo é.",
        "import-revision-count": "{{PLURAL:$1|Leagan amháin|$1 leagain}}",
        "importnopages": "Níl aon leathanaigh chun iompórtáil",
        "importfailed": "Theip ar an iompórtáil: $1",
        "exif-orientation-3": "Rothlaithe trí 180°",
        "exif-orientation-4": "Iompaithe go hingearach",
        "exif-orientation-5": "Rothlaithe trí 90° CCW agus iompaithe go hingearach",
-       "exif-orientation-6": "Rothlaithe trí 90° CW",
+       "exif-orientation-6": "Rothlaithe trí 90° tuathalach",
        "exif-orientation-7": "Rothlaithe trí 90° CW agus iompaithe go hingearach",
-       "exif-orientation-8": "Rothlaithe trí 90° CCW",
+       "exif-orientation-8": "Rothlaithe trí 90° deiseal",
        "exif-planarconfiguration-1": "Formáid shmutánach",
        "exif-planarconfiguration-2": "Formáid phlánach",
        "exif-componentsconfiguration-0": "níl a leithéid ann",
        "watchlisttools-view": "Féach ar na hathruithe ábhartha",
        "watchlisttools-edit": "Féach ar do liosta faire ná cuir in eagar é",
        "watchlisttools-raw": "Cuir do amhliosta faire in eagar",
+       "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|plé]])",
        "version": "Leagan",
        "version-other": "Eile",
        "version-version": "($1)",
-       "version-license": "Ceadúnas",
+       "version-license": "Ceadúnas MediaWiki",
        "version-software": "Bogearraí suiteáilte",
        "version-software-version": "Leagan",
        "version-entrypoints-header-url": "URL",
        "fileduplicatesearch-info": "$1 × $2 picteillín<br />Méid comhad: $3<br />Saghas MIME: $4",
        "specialpages": "Leathanaigh speisialta",
        "specialpages-group-other": "Leathanaigh speisialta eile",
-       "specialpages-group-login": "Logáil isteach / cruthaigh cuntas",
+       "specialpages-group-login": "Logáil isteach / Cuntas a chruthú",
        "specialpages-group-changes": "Athruithe is déanaí agus logaí",
        "specialpages-group-users": "Úsáideoirí agus cearta",
        "specialpages-group-pages": "Liostaí leathanaigh",
        "specialpages-group-pagetools": "Uirslí leathanach",
-       "specialpages-group-wiki": "Sonraí vicí agus uirslí",
+       "specialpages-group-wiki": "Sonraí agus uirlisí",
        "specialpages-group-spam": "Uirlisí turscar",
        "blankpage": "Leathanach bán",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|chlib amháin|clib}}]]: $2)",
        "logentry-move-move": "{{GENDER:$2|Bhog}} $1 an leathanach $3 go $4",
        "feedback-cancel": "Cealaigh",
        "feedback-message": "Teachtaireacht:",
-       "searchsuggest-search": "Cuardaigh",
+       "searchsuggest-search": "Cuardaigh {{SITENAME}}",
        "expand_templates_remove_comments": "Scrios nótaí tráchta",
        "expand_templates_preview": "Réamhamharc"
 }
index 8494c41..5d7db72 100644 (file)
        "tog-minordefault": "Marcar todas as edicións como pequenas por defecto",
        "tog-previewontop": "Mostrar a vista previa antes da caixa de edición",
        "tog-previewonfirst": "Mostrar a vista previa na primeira edición",
-       "tog-enotifwatchlistpages": "Desexo recibir un aviso por correo electrónico cando unha páxina ou un ficheiro da miña lista de vixilancia sufra algún cambio",
-       "tog-enotifusertalkpages": "Desexo recibir un aviso por correo electrónico cando a miña páxina de conversa cambie",
-       "tog-enotifminoredits": "Enviádeme tamén unha mensaxe de correo electrónico cando se produzan edicións pequenas nas páxinas ou nos ficheiros",
+       "tog-enotifwatchlistpages": "Recibir un aviso por correo electrónico cando unha páxina ou un ficheiro da miña lista de vixilancia sufra algún cambio",
+       "tog-enotifusertalkpages": "Recibir un aviso por correo electrónico cando a miña páxina de conversa sufra algún cambio",
+       "tog-enotifminoredits": "Recibir tamén unha mensaxe de correo electrónico cando se produzan edicións pequenas nas páxinas ou nos ficheiros",
        "tog-enotifrevealaddr": "Revelar o meu enderezo de correo electrónico nos correos de notificación",
        "tog-shownumberswatching": "Mostrar o número de usuarios que están a vixiar",
-       "tog-oldsig": "Sinatura actual:",
+       "tog-oldsig": "A súa sinatura actual:",
        "tog-fancysig": "Tratar a sinatura como se fose texto wiki (sen ligazón automática)",
        "tog-uselivepreview": "Usar a vista previa en tempo real",
-       "tog-forceeditsummary": "Avisádeme cando o campo resumo estea baleiro",
+       "tog-forceeditsummary": "Avisar cando o campo resumo estea baleiro",
        "tog-watchlisthideown": "Agochar as edicións propias na lista de vixilancia",
        "tog-watchlisthidebots": "Agochar as edicións dos bots na lista de vixilancia",
        "tog-watchlisthideminor": "Agochar as edicións pequenas na lista de vixilancia",
        "tog-watchlisthideanons": "Agochar as edicións dos usuarios anónimos na lista de vixilancia",
        "tog-watchlisthidepatrolled": "Agochar as edicións patrulladas na lista de vixilancia",
        "tog-watchlisthidecategorization": "Agochar a categorización das páxinas",
-       "tog-ccmeonemails": "Enviádeme ao meu enderezo unha copia das mensaxes de correo electrónico que envíe a outros usuarios",
+       "tog-ccmeonemails": "Recibir no meu enderezo unha copia das mensaxes de correo electrónico que envíe a outros usuarios",
        "tog-diffonly": "Non mostrar o contido da páxina debaixo das diferenzas entre edicións",
        "tog-showhiddencats": "Mostrar as categorías ocultas",
        "tog-norollbackdiff": "Omitir as diferenzas despois de levar a cabo unha reversión de edicións",
-       "tog-useeditwarning": "Avisádeme cando deixe unha páxina de edición cos cambios sen gardar",
-       "tog-prefershttps": "Utilizar unha conexión segura sempre que acceda ao sistema",
+       "tog-useeditwarning": "Avisar ao deixar unha páxina de edición cos cambios sen gardar",
+       "tog-prefershttps": "Utilizar sempre unha conexión segura para acceder ao sistema",
        "underline-always": "Sempre",
        "underline-never": "Nunca",
        "underline-default": "Opción predeterminada da aparencia ou do navegador",
        "newwindow": "(abre unha ventá nova)",
        "cancel": "Cancelar",
        "moredotdotdot": "Máis...",
-       "morenotlisted": "Esta lista non está completa.",
+       "morenotlisted": "Esta lista pode estar incompleta.",
        "mypage": "Páxina",
        "mytalk": "Conversa",
        "anontalk": "Conversa",
        "talk": "Conversa",
        "views": "Vistas",
        "toolbox": "Ferramentas",
+       "tool-link-userrights": "Modificar os grupos {{GENDER:$1|do usuario|da usuaria}}",
+       "tool-link-emailuser": "Enviar un correo electrónico {{GENDER:$1|ao usuario|á usuaria}}",
        "userpage": "Ver a páxina {{GENDER:{{BASEPAGENAME}}|do usuario|da usuaria}}",
        "projectpage": "Ver a páxina do proxecto",
        "imagepage": "Ver a páxina do ficheiro",
        "databaseerror-query": "Pescuda: $1",
        "databaseerror-function": "Función: $1",
        "databaseerror-error": "Erro: $1",
-       "transaction-duration-limit-exceeded": "Para evitar crear un gran atraso na replicación, esta transacción abortouse xa que a duración de escritura ($1) excedeu o límite de $2 {{PLURAL:$2|segundo|segundos}} .\nSe está a cambiar moitos obxectos ao mesmo tempo, procure facer operacións múltiples máis pequenas no seu lugar.",
+       "transaction-duration-limit-exceeded": "Para evitar crear un grande atraso na replicación, esta transacción abortouse xa que a duración de escritura ($1) excedeu o límite de $2 segundos.\nSe está a cambiar moitos obxectos ao mesmo tempo, procure facer operacións múltiples máis pequenas no seu lugar.",
        "laggedslavemode": "'''Aviso:''' A páxina pode non conter as actualizacións recentes.",
        "readonly": "Base de datos pechada",
        "enterlockreason": "Dea unha razón para o peche, incluíndo unha estimación de até cando se manterá",
        "createacct-yourpasswordagain-ph": "Insira o contrasinal outra vez",
        "userlogin-remembermypassword": "Manter a miña conexión",
        "userlogin-signwithsecure": "Utilizar a conexión segura",
+       "cannotlogin-title": "Non se pode acceder ó sistema",
+       "cannotlogin-text": "O acceso ó sistema non está dispoñible.",
        "cannotloginnow-title": "Non se pode iniciar a sesión agora mesmo",
        "cannotloginnow-text": "Non é posible iniciar a sesión cando se usa $1.",
+       "cannotcreateaccount-title": "Non se poden crear contas de usuario",
+       "cannotcreateaccount-text": "A creación directa de contas de usuario non está habilitada nesta wiki.",
        "yourdomainname": "O seu dominio:",
        "password-change-forbidden": "Non pode mudar os contrasinais neste wiki.",
        "externaldberror": "Ou ben se produciu un erro da base de datos na autenticación externa ou ben non se lle permite actualizar a súa conta externa.",
        "createacct-reason-ph": "Por que crea outra conta?",
        "createacct-reason-help": "Mensaxe que se mostra no rexistro de creación de contas",
        "createacct-submit": "Crear a conta",
-       "createacct-another-submit": "Crear conta",
+       "createacct-another-submit": "Crear conta",
        "createacct-continue-submit": "Continuar a creación da conta",
        "createacct-another-continue-submit": "Continuar a creación da conta",
        "createacct-benefit-heading": "Xente coma vostede elabora {{SITENAME}}.",
        "eauthentsent": "Envióuselle un correo electrónico de confirmación ao enderezo especificado.\nAntes de que se lle envíe calquera outro correo a esta conta terá que seguir as instrucións que aparecen nesa mensaxe para confirmar que a conta é realmente súa.",
        "throttled-mailpassword": "Enviouse un correo electrónico de restablecemento do contrasinal {{PLURAL:$1|na última hora|nas últimas $1 horas}}.\nPara evitar o abuso do sistema só se enviará unha mensaxe de restablecemento cada {{PLURAL:$1|hora|$1 horas}}.",
        "mailerror": "Produciuse un erro ao enviar o correo electrónico: $1",
-       "acct_creation_throttle_hit": "Alguén que visitou este wiki co seu enderezo IP creou, no último día, {{PLURAL:$1|unha conta|$1 contas}}, que é o máximo permitido neste período de tempo.\nComo resultado, os visitantes que usen este enderezo IP non poden crear máis contas nestes intres.",
+       "acct_creation_throttle_hit": "Alguén que visitou este wiki co seu enderezo IP creou {{PLURAL:$1|unha conta|$1 contas}} nos últimos ̩$2 días, que é o máximo permitido neste período de tempo.\nComo resultado, os visitantes que usen este enderezo IP non poden crear máis contas nestes intres.",
        "emailauthenticated": "O seu enderezo de correo electrónico foi confirmado o $2 ás $3.",
        "emailnotauthenticated": "O seu enderezo de correo electrónico aínda non foi confirmado.\nNon se enviará ningunha mensaxe por ningunha das seguintes características.",
        "noemailprefs": "Especifique un enderezo de correo electrónico se quere que funcione esta opción.",
        "resetpass_submit": "Establecer o contrasinal e acceder ao sistema",
        "changepassword-success": "O seu contrasinal foi modificado!",
        "changepassword-throttled": "Fixo demasiados intentos de acceder ao sistema.\nPor favor, agarde $1 antes de probar outra vez.",
-       "botpasswords": "Contrasinais de Bot",
-       "botpasswords-summary": "Os <em>contrasinais de Bot</em> permiten acceder a unha conta de usuario por medio da API sen usar as crecenciais de acceso da conta principal. Os dereitos de usuario dispoñibles cando se accede ao sistema cun contrasinal de bot poden estar restrinxidos.",
-       "botpasswords-disabled": "Os contrasinais de bot non están habilitados.",
-       "botpasswords-no-central-id": "Para usar contrasinais de bot debes acceder ao sistema cunha conta centralizada.",
-       "botpasswords-existing": "Contrasinais de bot existentes",
+       "botpasswords": "Contrasinais de bots",
+       "botpasswords-summary": "Os <em>contrasinais de bots</em> permiten acceder a unha conta de usuario por medio da API sen usar as crecenciais de acceso da conta principal. Os dereitos de usuario dispoñibles cando se accede ao sistema cun contrasinal de bot poden estar restrinxidos.\n\nSe non sabe por que quere facer isto, probablemente signifique que non o queira facer. Ningunha persoa debería pedirlle a vostede que xere unha destas claves para entregarlla.",
+       "botpasswords-disabled": "Os contrasinais de bots non están habilitados.",
+       "botpasswords-no-central-id": "Para usar os contrasinais de bots debe acceder ao sistema cunha conta centralizada.",
+       "botpasswords-existing": "Contrasinais de bots existentes",
        "botpasswords-createnew": "Crear un novo contrasinal de bot",
        "botpasswords-editexisting": "Editar un contrasinal de bot xa existente",
        "botpasswords-label-appid": "Nome do bot:",
        "botpasswords-label-delete": "Borrar",
        "botpasswords-label-resetpassword": "Restablecer o contrasinal",
        "botpasswords-label-grants": "Permisos aplicables:",
-       "botpasswords-help-grants": "Cada permiso da acceso aos permisos de usuario listados que a conta xa teña. Vexa a [[Special:ListGrants|táboa de permisos]] para máis información.",
-       "botpasswords-label-restrictions": "Restriccións de uso:",
+       "botpasswords-help-grants": "Cada permiso dá acceso aos permisos de usuario listados que a conta xa teña. Consulte a [[Special:ListGrants|táboa de permisos]] para obter máis información.",
        "botpasswords-label-grants-column": "Concedido",
        "botpasswords-bad-appid": "O nome de bot \"$1\" non é válido.",
        "botpasswords-insert-failed": "Erro ao engadir o nome de bot \"$1\". Revise se xa foi engadido previamente.",
        "botpasswords-update-failed": "Erro ao actualizar o nome de bot \"$1\". Revise se foi borrado.",
-       "botpasswords-created-title": "Contrasinal de bot creado",
+       "botpasswords-created-title": "Creouse o contrasinal de bot",
        "botpasswords-created-body": "Creouse o contrasinal para o bot de nome \"$1\" do usuario \"$2\".",
-       "botpasswords-updated-title": "Contrasinal de bot actualizado",
-       "botpasswords-updated-body": "O contrasinal de bot do bot de nome \"$1\" do usuario \"$2\" foi actualizado.",
-       "botpasswords-deleted-title": "Contrasinal de bot borrado",
-       "botpasswords-deleted-body": "O contrasinal de bot do bot de nome \"$1\" do usuario \"$2\" foi borrado.",
-       "botpasswords-newpassword": "O novo contrasinal para acceder con strong>$1</strong> é <strong>$2</strong>. <em>Por favor, rexistra isto para referencia futura.</em>",
+       "botpasswords-updated-title": "Actualizouse o contrasinal de bot",
+       "botpasswords-updated-body": "Actualizouse o contrasinal para o bot de nome \"$1\" do usuario \"$2\".",
+       "botpasswords-deleted-title": "Borrouse o contrasinal de bot",
+       "botpasswords-deleted-body": "Borrouse o contrasinal para o bot de nome \"$1\" do usuario \"$2\".",
+       "botpasswords-newpassword": "O novo contrasinal para acceder con <strong>$1</strong> é <strong>$2</strong>. <em>Por favor, conserve isto para referencias futuras.</em><br />(Para os bots vellos que requiren que o nome de acceso sexa o mesmo que o nome de usuario eventual, pode usar tamén <strong>$3</strong> como nome de usuario e <strong>$4</strong> como contrasinal.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider non está dispoñible.",
-       "botpasswords-restriction-failed": "Restricións de contrasinal de bots evitaron esta conexión.",
+       "botpasswords-restriction-failed": "Algunhas restricións de contrasinal de bots evitaron esta conexión.",
        "botpasswords-invalid-name": "O nome de usuario especificado non contén o separador de contrasinal de bot (\"$1\").",
        "botpasswords-not-exist": "O usuario \"$1\" non ten un contrasinal de bot de nome \"$2\".",
        "resetpass_forbidden": "Non se poden mudar os contrasinais",
        "passwordreset-emailelement": "Nome de usuario: \n$1\n\nContrasinal temporal: \n$2",
        "passwordreset-emailsentemail": "Se esta é unha dirección de correo electrónico asociada á súa conta, entón enviarase un correo electrónico para o restablecemento do seu contrasinal.",
        "passwordreset-emailsentusername": "Se hai unha dirección de correo electrónico asociada con este nome de usuario, entón enviarase un correo electrónico para o restablecemento do contrasinal.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|O correo de reinicialización do contrasinal foi enviado|Os correos de reinicialización do contrasinal foron enviados}}. {{PLURAL:$1|O nome de usuario e contrasinal móstrase abaixo|A lista de nomes de usuarios e contrasinais móstranse abaixo}}.",
-       "passwordreset-emailerror-capture2": "O envío do correo {{GENDER:$2|ó usuario|á usuaria}} fallou: $1 {{PLURAL:$3|O nome de usuario e contrasinal móstrase abaixo|A lista de usuarios e contrasinais móstranse abaixo}}.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|O correo de reinicialización do contrasinal foi enviado|Os correos de reinicialización do contrasinal foron enviados}}. {{PLURAL:$1|O nome de usuario e contrasinal móstrase aquí|A lista de nomes de usuarios e contrasinais móstranse aquí}}.",
+       "passwordreset-emailerror-capture2": "O envío do correo {{GENDER:$2|ó usuario|á usuaria}} fallou: $1 {{PLURAL:$3|O nome de usuario e contrasinal móstrase aquí|A lista de usuarios e contrasinais móstranse aquí}}.",
        "passwordreset-nocaller": "Cómpre proporcionar un chamador",
        "passwordreset-nosuchcaller": "O chamador non existe: $1",
        "passwordreset-ignored": "A reinicialización do contrasinal non puido realizarse. Quizais non configurou o provedor?",
        "savearticle": "Gardar a páxina",
        "savechanges": "Gardar os cambios",
        "publishpage": "Publicar a páxina",
-       "publishchanges": "Publicar cambios",
+       "publishchanges": "Publicar os cambios",
        "preview": "Vista previa",
        "showpreview": "Mostrar a vista previa",
        "showdiff": "Mostrar os cambios",
        "invalid-content-data": "Datos de contido inválidos",
        "content-not-allowed-here": "O contido \"$1\" non está permitido na páxina \"[[$2]]\"",
        "editwarning-warning": "Deixar esta páxina pode causar a perda de calquera cambio feito.\nSe accedeu ao sistema, pode desactivar esta mensaxe de advertencia na sección \"{{int:prefs-editing}}\" das súas preferencias.",
+       "editpage-invalidcontentmodel-title": "Modelo de contido non válido",
+       "editpage-invalidcontentmodel-text": "O modelo de contido \"$1\" non é válido.",
        "editpage-notsupportedcontentformat-title": "Formato de contido non admitido",
        "editpage-notsupportedcontentformat-text": "O formato de contido $1 non é compatible co modelo de contido $2.",
        "content-model-wikitext": "texto wiki",
        "searchprofile-advanced-tooltip": "Procurar nos espazos de nomes elixidos",
        "search-result-size": "$1 ({{PLURAL:$2|1 palabra|$2 palabras}})",
        "search-result-category-size": "{{PLURAL:$1|1 membro|$1 membros}} ({{PLURAL:$2|1 subcategoría|$2 subcategorías}}, {{PLURAL:$3|1 ficheiro|$3 ficheiros}})",
-       "search-redirect": "(redirixido desde \"$1\")",
+       "search-redirect": "(redirección desde \"$1\")",
        "search-section": "(sección \"$1\")",
        "search-category": "(categoría $1)",
        "search-file-match": "(coincide co contido do ficheiro)",
        "prefs-resetpass": "Cambiar o contrasinal",
        "prefs-changeemail": "Cambiar ou eliminar o enderezo de correo electrónico",
        "prefs-setemail": "Establecer un enderezo de correo electrónico",
-       "prefs-email": "Opcións de correo electrónico",
+       "prefs-email": "Opcións do correo electrónico",
        "prefs-rendering": "Aparencia",
        "saveprefs": "Gardar",
        "restoreprefs": "Restaurar todas as preferencias por defecto (en todas as seccións)",
        "badsig": "Sinatura non válida; comprobe o código HTML utilizado.",
        "badsiglength": "A súa sinatura é demasiado longa.\nHa de ter menos {{PLURAL:$1|dun carácter|de $1 caracteres}}.",
        "yourgender": "Cal das seguintes oracións referidas a vostede é a máis axeitada?",
-       "gender-unknown": "Ao mencionarlle, o software empregará verbas de xénero neutral sempre que sexa posible",
+       "gender-unknown": "Ao facer mención á súa persoa, o software empregará verbas de xénero neutro sempre que sexa posible",
        "gender-male": "El edita as páxinas do wiki",
        "gender-female": "Ela edita as páxinas do wiki",
        "prefs-help-gender": "Definir esta preferencia é opcional.\nO software usa este valor para dirixirse á súa persoa e para facerlle mencións mediante o xénero gramatical axeitado.\nEsta información será pública.",
        "email": "Correo electrónico",
-       "prefs-help-realname": "O nome real é opcional.\nEn caso de revelalo, utilizarase para atribuírlle o seu traballo.",
+       "prefs-help-realname": "O nome real é opcional.\nEn caso de revelalo, ha utilizarse para atribuírlle o seu traballo.",
        "prefs-help-email": "O enderezo de correo electrónico é opcional, pero permite que se lle envíe un contrasinal novo se se esquece del.",
-       "prefs-help-email-others": "Tamén pode optar por deixar aos outros que se poidan poñer en contacto con vostede a través da súa páxina de usuario sen necesidade de revelar a súa identidade.",
+       "prefs-help-email-others": "Tamén pode optar por deixar que outras persoas se poñan en contacto con vostede a través dunha ligazón na súa páxina de usuario e de conversa.\nO seu enderezo non se revela cando contacten con vostede.",
        "prefs-help-email-required": "Cómpre o enderezo de correo electrónico.",
        "prefs-info": "Información básica",
        "prefs-i18n": "Internacionalización",
        "userrights-groupsmember-auto": "Membro implícito de:",
        "userrights-groups-help": "Pode cambiar os grupos aos que {{GENDER:$1|o usuario|a usuaria}} pertence:\n* Se a caixa ten un sinal (✓) significa que {{GENDER:$1|o usuario|a usuaria}} pertence a ese grupo.\n* Se, pola contra, non o ten, significa que non pertence.\n* Un asterisco (*) indica que non pode eliminar o grupo unha vez que o engadiu, e viceversa.",
        "userrights-reason": "Motivo:",
-       "userrights-no-interwiki": "Non dispón de permiso para editar dereitos de usuarios noutros wikis.",
-       "userrights-nodatabase": "A base de datos $1 non existe ou non é local.",
+       "userrights-no-interwiki": "Non ten os permisos necesarios para editar os dereitos de usuario noutros wikis.",
+       "userrights-nodatabase": "A base de datos \"$1\" non existe ou non é local.",
        "userrights-nologin": "Debe [[Special:UserLogin|acceder ao sistema]] cunta conta de administrador para asignar dereitos de usuario.",
        "userrights-notallowed": "Non dispón dos permisos necesarios para asignar ou retirar dereitos de usuario.",
        "userrights-changeable-col": "Os grupos que pode cambiar",
        "right-autoconfirmed": "Non ser afectado polos límites de frecuencia ligados aos enderezos IP",
        "right-bot": "Ser tratado coma un proceso automatizado",
        "right-nominornewtalk": "As edicións pequenas nas páxinas de conversa non lanzan o aviso de mensaxes novas",
-       "right-apihighlimits": "Usar os límites superiores nas peticións API",
+       "right-apihighlimits": "Usar os límites superiores nas peticións á API",
        "right-writeapi": "Usar a API para modificar o wiki",
        "right-delete": "Borrar páxinas",
        "right-bigdelete": "Borrar páxinas con historiais grandes",
        "right-protect": "Cambiar os niveis de protección e editar páxinas protexidas coa opción \"protección en serie\"",
        "right-editprotected": "Editar páxinas protexidas con \"{{int:protect-level-sysop}}\"",
        "right-editsemiprotected": "Editar páxinas protexidas con \"{{int:protect-level-autoconfirmed}}\"",
-       "right-editcontentmodel": "Editar o modelo de contido dunha páxina.",
+       "right-editcontentmodel": "Editar o modelo de contido dunha páxina",
        "right-editinterface": "Editar a interface de usuario",
        "right-editusercssjs": "Editar os ficheiros CSS e JavaScript doutros usuarios",
        "right-editusercss": "Editar os ficheiros CSS doutros usuarios",
        "right-patrol": "Marcar edicións como patrulladas",
        "right-autopatrol": "Ter as edicións marcadas automaticamente como patrulladas",
        "right-patrolmarks": "Ver os cambios que están marcados coma patrullados",
-       "right-unwatchedpages": "Ver unha lista de páxinas que non están vixiadas",
+       "right-unwatchedpages": "Ver unha lista das páxinas que non están vixiadas",
        "right-mergehistory": "Fusionar o historial das páxinas",
        "right-userrights": "Editar todos os dereitos de usuario",
        "right-userrights-interwiki": "Editar os dereitos de usuario dos usuarios doutros wikis",
        "right-override-export-depth": "Exportar páxinas incluíndo as páxinas ligadas ata unha profundidade de 5",
        "right-sendemail": "Enviar correos electrónicos a outros usuarios",
        "right-passwordreset": "Ver os correos electrónicos de restablecemento de contrasinais",
-       "right-managechangetags": "Crear e (des)activar [[Special:Tags|tags]]",
-       "right-applychangetags": "Aplicar [[Special:Tags|etiquetas]] xunto cos cambios propios",
+       "right-managechangetags": "Crear e (des)activar [[Special:Tags|etiquetas]]",
+       "right-applychangetags": "Aplicar [[Special:Tags|etiquetas]] xunto coas modificacións propias",
        "right-changetags": "Engadir e quitar [[Special:Tags|etiquetas]] arbitrarias a revisións individuais e entradas do rexistro",
-       "right-deletechangetags": "Suprimir as [[Special:Tags|etiquetas]] da base de datos",
-       "grant-generic": "conxunto de dereitos \"$1\"",
+       "right-deletechangetags": "Suprimir [[Special:Tags|etiquetas]] da base de datos",
+       "grant-generic": "Conxunto de dereitos \"$1\"",
        "grant-group-page-interaction": "Interactuar con páxinas",
        "grant-group-file-interaction": "Interactuar con ficheiros multimedia",
        "grant-group-watchlist-interaction": "Interactuar coa súa lista de vixilancia",
        "grant-group-high-volume": "Realizar actividades de alto volume",
        "grant-group-customization": "Personalización e preferencias",
        "grant-group-administration": "Realizar accións administrativas",
-       "grant-group-private-information": "Acceder a datos privados sobre ti",
+       "grant-group-private-information": "Acceder a datos privados sobre vostede",
        "grant-group-other": "Outras actividades",
        "grant-blockusers": "Bloquear e desbloquear usuarios",
        "grant-createaccount": "Crear contas",
        "grant-protect": "Protexer e desprotexer páxinas",
        "grant-rollback": "Reverter os cambios feitos nas páxinas",
        "grant-sendemail": "Enviar correos electrónicos a outros usuarios",
-       "grant-uploadeditmovefile": "Cargar, substituír e mover ficheiros",
-       "grant-uploadfile": "Cargar ficheiros novos",
+       "grant-uploadeditmovefile": "Subir, substituír e mover ficheiros",
+       "grant-uploadfile": "Subir ficheiros novos",
        "grant-basic": "Dereitos básicos",
-       "grant-viewdeleted": "Ver ficheiros e páxinas eliminadas",
+       "grant-viewdeleted": "Ver ficheiros e páxinas eliminados",
        "grant-viewmywatchlist": "Ver a súa lista de vixilancia",
+       "grant-viewrestrictedlogs": "Ver as entradas de rexistro confidenciais",
        "newuserlogpage": "Rexistro de creación de usuarios",
        "newuserlogpagetext": "Este é un rexistro de creación de contas de usuario.",
        "rightslog": "Rexistro de dereitos de usuario",
        "action-editmyprivateinfo": "editar a súa información privada",
        "action-editcontentmodel": "editar o modelo de contido dunha páxina",
        "action-managechangetags": "crear e (des)activar etiquetas",
-       "action-applychangetags": "aplicar etiquetas xunto cos cambios",
+       "action-applychangetags": "aplicar etiquetas xunto coas súas modificacións",
        "action-changetags": "engadir e quitar etiquetas arbitrarias a revisións individuais e entradas do rexistro",
        "action-deletechangetags": "borrar etiquetas da base de datos",
        "action-purge": "purgar esta páxina",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|desde a última visita}}",
        "enhancedrc-history": "historial",
        "recentchanges": "Cambios recentes",
-       "recentchanges-legend": "Opcións dos cambios",
-       "recentchanges-summary": "Nesta páxina podes seguir as modificacións máis recentes feitas no wiki.",
+       "recentchanges-legend": "Opcións dos cambios recentes",
+       "recentchanges-summary": "Nesta páxina pode seguir as modificacións máis recentes feitas no wiki.",
        "recentchanges-noresult": "Non se produciron cambios que coincidisen con eses criterios durante o período especificado.",
        "recentchanges-feed-description": "Nesta fonte de novas pode seguir as modificacións máis recentes feitas no wiki.",
        "recentchanges-label-newpage": "Esta edición creou unha nova páxina",
        "recentchanges-page-removed-from-category-bundled": "[[:$1]] eliminada da categoría [[Special:WhatLinksHere/$1||esta páxina está incluída noutras páxinas]]",
        "autochange-username": "Cambio automático de MediaWiki",
        "upload": "Subir un ficheiro",
-       "uploadbtn": "Subir un ficheiro",
-       "reuploaddesc": "Cancelar a carga e volver ao formulario de carga",
+       "uploadbtn": "Subir o ficheiro",
+       "reuploaddesc": "Cancelar a subida e volver ao formulario de subidas",
        "upload-tryagain": "Enviar a descrición do ficheiro modificada",
        "uploadnologin": "Non accedeu ao sistema",
        "uploadnologintext": "Debe $1 para poder cargar ficheiros.",
        "filesource": "Fonte:",
        "ignorewarning": "Ignorar a advertencia e gardar o ficheiro de calquera xeito",
        "ignorewarnings": "Ignorar as advertencias",
-       "minlength1": "Os nomes dos ficheiros deben ter cando menos unha letra.",
+       "minlength1": "Os nomes dos ficheiros deben ter como mínimo unha letra.",
        "illegalfilename": "O nome de ficheiro \"$1\" contén caracteres que non están permitidos nos títulos das páxinas.\nPor favor, cambie o nome do ficheiro e intente cargalo de novo.",
        "filename-toolong": "Os nomes dos ficheiros non poden superar os 240 bytes.",
        "badfilename": "O nome deste ficheiro cambiouse a \"$1\".",
        "filetype-mime-mismatch": "A extensión do ficheiro \".$1\" non coincide co tipo MIME detectado ($2).",
-       "filetype-badmime": "Non se permite enviar ficheiros de tipo MIME \"$1\".",
+       "filetype-badmime": "Non se permite a subida de ficheiros de tipo MIME \"$1\".",
        "filetype-bad-ie-mime": "Non se pode cargar este ficheiro porque o Internet Explorer detectaríao como \"$1\", o cal é un tipo de ficheiro non permitido e potencialmente perigoso.",
        "filetype-unwanted-type": "'''\".$1\"''' é un tipo de ficheiro non desexado.\n{{PLURAL:$3|O tipo de ficheiro preferido é|Os tipos de ficheiro preferidos son}} $2.",
        "filetype-banned-type": "'''\".$1\"''' non {{PLURAL:$4|é un tipo de ficheiro permitido|son tipos de ficheiro permitidos}}.\n{{PLURAL:$3|O tipo de ficheiro permitido é|Os tipos de ficheiro permitidos son}} $2.",
        "file-thumbnail-no": "O nome do ficheiro comeza por <strong>$1</strong>.\nParece tratarse dunha imaxe de tamaño reducido ''(miniatura)''.\nSe dispón dunha versión desta imaxe de maior resolución cárguea; se non, múdelle o nome ao ficheiro.",
        "fileexists-forbidden": "Xa existe un ficheiro co mesmo nome e este non pode ser sobrescrito.\nSe aínda quere cargar o seu ficheiro, por favor, retroceda e use un novo nome. [[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Xa existe un ficheiro con este nome no repositorio de ficheiros compartidos.\nSe aínda quere cargar o seu ficheiro, volva atrás e use outro nome.\n[[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "O ficheiro subido é un duplicado exacto da versión actual de \"<strong>[[:$1]]</strong>\".",
+       "fileexists-duplicate-version": "O ficheiro subido é un duplicado exacto {{PLURAL:$2|dunha versión vella|de varias versións vellas}} de \"<strong>[[:$1]]</strong>\".",
        "file-exists-duplicate": "Este ficheiro é un duplicado {{PLURAL:$1|do seguinte|dos seguintes}}:",
-       "file-deleted-duplicate": "Un ficheiro idéntico a este (\"[[:$1]]\") foi borrado previamente. Debería comprobar o historial de borrados do ficheiro antes de proceder a cargalo de novo.",
+       "file-deleted-duplicate": "Un ficheiro idéntico a este (\"[[:$1]]\") foi borrado previamente. Debería comprobar o historial de borrados do ficheiro antes de proceder a subilo de novo.",
        "file-deleted-duplicate-notitle": "Un ficheiro idéntico a este foi borrado con anterioridade e o título foi suprimido.\nDebería contactar con alguén capaz de ver os datos de ficheiros borrados para que revise esta situación antes de subilo de novo.",
        "uploadwarning": "Advertencia ao cargar o ficheiro",
        "uploadwarning-text": "Por favor, modifique a descrición do ficheiro e inténteo de novo.",
        "savefile": "Gardar o ficheiro",
-       "uploaddisabled": "Sentímolo, a subida de ficheiros está desactivada.",
+       "uploaddisabled": "A subida de ficheiros está desactivada.",
        "copyuploaddisabled": "A carga mediante URL está desactivada.",
        "uploaddisabledtext": "A carga de ficheiros está desactivada.",
        "php-uploaddisabledtext": "As cargas de ficheiros PHP están desactivadas. Por favor, comprobe a característica file_uploads.",
        "uploadscripted": "Este ficheiro contén código HTML ou script que pode producir erros ao ser interpretado polo navegador.",
-       "upload-scripted-pi-callback": "Non se pode subir un ficheiro que conteña instruccións de proceso de folla de estilo XML.",
-       "uploaded-script-svg": "Atopado elemento de comandos \"$1\" no ficheiro SVG subido.",
-       "uploaded-hostile-svg": "Atopado CSS non seguro no elemento de estilo do ficheiro SVG subido.",
-       "uploaded-event-handler-on-svg": "Fixar atributos de xestión de eventos <code>$1=\"$2\"</code> no está permitido en ficheiros SVG.",
-       "uploaded-href-attribute-svg": "os atributos href nos ficheiros SVG só están autorizados a ligar a direccións http:// ou https://, atopado <code>&lt;$1 $2=\"$3\"&gt;</code>.",
-       "uploaded-href-unsafe-target-svg": "Atopado href a datos non seguros: dirección URI <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG subido.",
-       "uploaded-animate-svg": "Atopada etiqueta \"animate\" que podería estar cambiando a href, usando o atributo \"from\" <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG subido.",
-       "uploaded-setting-event-handler-svg": "Fichar os atributos de xestión de eventos non está permitido, atopado <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG subido.",
-       "uploaded-setting-href-svg": "Usar a etiqueta \"set\" para engadir o atributo \"href\" ó elemento pai non está permitido.",
-       "uploaded-wrong-setting-svg": "Usar a etiqueta \"set\" para engadir un obxectivo remoto/datos/secuencia de comandos a calquera atributo non está permitido. Atopado <code>&lt;set to=\"$1\"&gt;</code> no ficheiro SVG subido.",
-       "uploaded-setting-handler-svg": "SVG que fixa o atributo \"handler\" con remoto/datos/secuencia de comandos non está permitido. Atopado <code>$1=\"$2\"</code> no ficheiro SVG subido.",
-       "uploaded-remote-url-svg": "SVG que fixa calquera atributo de estilo con URL remota non está permitido. Atopado <code>$1=\"$2\"</code> no ficheiro SVG subido.",
-       "uploaded-image-filter-svg": "Atopado filtro de imaxe con URL: <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG subido.",
+       "upload-scripted-pi-callback": "Non se pode subir un ficheiro que conteña instrucións de procesamento de follas de estilo XML.",
+       "uploaded-script-svg": "Atopouse un elemento de comandos \"$1\" no ficheiro SVG subido.",
+       "uploaded-hostile-svg": "Atopouse CSS non seguro no elemento de estilo do ficheiro SVG subido.",
+       "uploaded-event-handler-on-svg": "Non está permitido fixar atributos de xestión de eventos <code>$1=\"$2\"</code> nos ficheiros SVG.",
+       "uploaded-href-attribute-svg": "Os atributos href nos ficheiros SVG só están autorizados a ligar con enderezos http:// ou https://, mais atopouse <code>&lt;$1 $2=\"$3\"&gt;</code>.",
+       "uploaded-href-unsafe-target-svg": "Atopouse un href a datos non seguros: un enderezo URI <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG subido.",
+       "uploaded-animate-svg": "Atopouse unha etiqueta \"animate\", que podería cambiar o seu href, usando o atributo \"from\" <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG subido.",
+       "uploaded-setting-event-handler-svg": "Non está permitido fixar os atributos de xestión de eventos, mais atopouse <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG subido.",
+       "uploaded-setting-href-svg": "Non está permitido usar a etiqueta \"set\" para engadir o atributo \"href\" ao elemento pai.",
+       "uploaded-wrong-setting-svg": "Non está permitido usar a etiqueta \"set\" para engadir un obxectivo remoto/datos/secuencia de comandos a calquera atributo. Atopouse <code>&lt;set to=\"$1\"&gt;</code> no ficheiro SVG subido.",
+       "uploaded-setting-handler-svg": "Non están permitidos os ficheiros SVG que fixen o atributo \"handler\" cun obxectivo remoto/datos/secuencia de comandos. Atopouse <code>$1=\"$2\"</code> no ficheiro SVG subido.",
+       "uploaded-remote-url-svg": "Non están permitidos os ficheiros SVG que fixen calquera atributo de estilo con enderezos URL remotos. Atopouse <code>$1=\"$2\"</code> no ficheiro SVG subido.",
+       "uploaded-image-filter-svg": "Atopouse un filtro de imaxe con URL: <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG subido.",
        "uploadscriptednamespace": "Este ficheiro SVG contén o espazo de nomes non permitido \"$1\"",
        "uploadinvalidxml": "Non se puido analizar o XML do ficheiro cargado.",
-       "uploadvirus": "O ficheiro contén un virus! Detalles: $1",
+       "uploadvirus": "O ficheiro contén un virus!\nDetalles: $1",
        "uploadjava": "O ficheiro é un ZIP que contén un ficheiro .class de Java.\nNon están permitidas as cargas de ficheiros Java, dado que poden causar restricións de seguridade.",
        "upload-source": "Ficheiro de orixe",
        "sourcefilename": "Nome do ficheiro a cargar:",
        "upload-proto-error-text": "A carga remota require enderezos URL que comecen por <code>http://</code> ou <code>ftp://</code>.",
        "upload-file-error": "Erro interno",
        "upload-file-error-text": "Produciuse un erro interno ao intentar crear un ficheiro temporal no servidor.\nPor favor, póñase en contacto cun [[Special:ListUsers/sysop|administrador]].",
-       "upload-misc-error": "Erro de carga descoñecido",
+       "upload-misc-error": "Erro de subida descoñecido",
        "upload-misc-error-text": "Ocorreu un erro descoñecido durante a carga.\nComprobe que o enderezo URL é válido e accesible e, despois, inténteo de novo.\nSe o problema persiste, póñase en contacto cun [[Special:ListUsers/sysop|administrador]].",
        "upload-too-many-redirects": "O enderezo URL contiña moitas redireccións",
        "upload-http-error": "Produciuse un erro HTTP: $1",
        "upload-dialog-disabled": "As cargas de ficheiros usando esta pantalla están desactivadas neste wiki.",
        "upload-dialog-title": "Subir un ficheiro",
        "upload-dialog-button-cancel": "Cancelar",
+       "upload-dialog-button-back": "Volver",
        "upload-dialog-button-done": "Feito",
        "upload-dialog-button-save": "Gardar",
        "upload-dialog-button-upload": "Subir",
        "upload-form-label-infoform-description-tooltip": "Describa brevemente todo o destacable acerca do traballo.\nPara unha foto, mencione as cousas principais que se representan, a ocasión ou o lugar.",
        "upload-form-label-usage-title": "Uso",
        "upload-form-label-usage-filename": "Nome do ficheiro",
-       "upload-form-label-own-work": "Isto é o meu propio traballo",
+       "upload-form-label-own-work": "Isto é unha obra propia",
        "upload-form-label-infoform-categories": "Categorías",
        "upload-form-label-infoform-date": "Data",
        "upload-form-label-own-work-message-generic-local": "Confirmo que estou a cargar este ficheiro seguindo os termos de uso e políticas de licenza de {{SITENAME}}.",
        "statistics-edits-average": "Media de edicións por páxina",
        "statistics-users": "[[Special:ListUsers|Usuarios]] rexistrados",
        "statistics-users-active": "Usuarios activos",
-       "statistics-users-active-desc": "Usuarios que teñen levado a cabo unha acción {{PLURAL:$1|no último día|nos últimos $1 días}}",
+       "statistics-users-active-desc": "Usuarios que levaron a cabo unha acción {{PLURAL:$1|no último día|nos últimos $1 días}}",
        "pageswithprop": "Páxinas cunha propiedade de páxina",
        "pageswithprop-legend": "Páxinas cunha propiedade de páxina",
        "pageswithprop-text": "Esta páxina lista aquelas páxinas que utilizan unha propiedade de páxina determinada.",
        "protectedpages-performer": "Protector",
        "protectedpages-params": "Parámetros da protección",
        "protectedpages-reason": "Motivo",
-       "protectedpages-submit": "Mostrar páxinas",
+       "protectedpages-submit": "Mostrar as páxinas",
        "protectedpages-unknown-timestamp": "Descoñecido",
        "protectedpages-unknown-performer": "Usuario descoñecido",
        "protectedtitles": "Títulos protexidos",
        "protectedtitles-summary": "Esta páxina lista os títulos que están protexidos actualmente fronte á creación. Para obter unha lista de páxinas existentes protexidas, consulte [[{{#special:ProtectedPages}}|{{int:protectedpages}}]].",
        "protectedtitlesempty": "Actualmente non hai ningún título protexido con eses parámetros.",
-       "protectedtitles-submit": "Mostrar títulos",
+       "protectedtitles-submit": "Mostrar os títulos",
        "listusers": "Lista de usuarios",
        "listusers-editsonly": "Mostrar só os usuarios con edicións",
        "listusers-creationsort": "Ordenar por data de creación",
        "nopagetext": "A páxina que especificou non existe.",
        "pager-newer-n": "{{PLURAL:$1|unha posterior|$1 posteriores}}",
        "pager-older-n": "{{PLURAL:$1|unha anterior|$1 anteriores}}",
-       "suppress": "Supresor",
+       "suppress": "Suprimir",
        "querypage-disabled": "Esta páxina especial está desactivada por razóns de rendemento.",
        "apihelp": "Axuda coa API",
        "apihelp-no-such-module": "Non se atopou o módulo \"$1\".",
        "apisandbox-results-fixtoken-fail": "Erro ó recuperar o identificador \"$1\".",
        "apisandbox-alert-page": "Os campos nesta páxina non son válidos.",
        "apisandbox-alert-field": "O valor deste campo non é válido.",
+       "apisandbox-continue": "Continuar",
+       "apisandbox-continue-clear": "Limpar",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries continuará] a última petición; {{int:apisandbox-continue-clear}} limpará os parámetros relativos á continuación.",
        "booksources": "Fontes bibliográficas",
        "booksources-search-legend": "Procurar fontes bibliográficas",
        "booksources-search": "Procurar",
        "movelogpagetext": "A continuación móstrase a lista con todas as páxinas trasladadas.",
        "movesubpage": "{{PLURAL:$1|Subpáxina|Subpáxinas}}",
        "movesubpagetext": "Esta páxina ten $1 {{PLURAL:$1|subpáxina|subpáxinas}}.",
+       "movesubpagetalktext": "A páxina de conversa correspondente ten $1 {{PLURAL:$1|subpáxina, mostrada|subpáxinas, mostradas}} abaixo.",
        "movenosubpage": "Esta páxina non ten subpáxinas.",
        "movereason": "Motivo:",
        "revertmove": "reverter",
        "pageinfo-article-id": "ID da páxina",
        "pageinfo-language": "Lingua do contido da páxina",
        "pageinfo-content-model": "Modelo do contido da páxina",
+       "pageinfo-content-model-change": "cambiar",
        "pageinfo-robot-policy": "Indexación por robots",
        "pageinfo-robot-index": "Permitida",
        "pageinfo-robot-noindex": "Non permitida",
        "pageinfo-category-pages": "Número de páxinas",
        "pageinfo-category-subcats": "Número de subcategorías",
        "pageinfo-category-files": "Número de ficheiros",
+       "pageinfo-user-id": "ID do usuario",
        "markaspatrolleddiff": "Marcar como revisada",
        "markaspatrolledtext": "Marcar esta páxina como revisada",
        "markaspatrolledtext-file": "Marcar esta versión de ficheiro como verificada",
        "newimages-showbots": "Mostrar as cargas feitas por bots",
        "newimages-hidepatrolled": "Ocultar as subas verificadas",
        "noimages": "Non hai imaxes para ver.",
+       "gallery-slideshow-toggle": "Intercambiar miniaturas",
        "ilsubmit": "Procurar",
        "bydate": "por data",
        "sp-newimages-showfrom": "Mostrar os novos ficheiros comezando polo $1 ás $2",
        "tag-filter": "Filtrar as [[Special:Tags|etiquetas]]:",
        "tag-filter-submit": "Filtro",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etiqueta|Etiquetas}}]]: $2)",
+       "tag-mw-contentmodelchange": "cambio de modelo de contido",
+       "tag-mw-contentmodelchange-description": "Edicións que [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel cambian o modelo de contido] dunha páxina",
        "tags-title": "Etiquetas",
        "tags-intro": "Esta páxina lista as etiquetas coas que o software pode marcar unha edición, e mailos seus significados.",
        "tags-tag": "Nome da etiqueta",
        "tags-actions-header": "Accións",
        "tags-active-yes": "Si",
        "tags-active-no": "Non",
-       "tags-source-extension": "Definida por unha extensión",
+       "tags-source-extension": "Definida polo software",
        "tags-source-manual": "Aplicado manualmente por usuarios e bots",
        "tags-source-none": "Xa non está en uso",
        "tags-edit": "editar",
        "htmlform-cloner-create": "Engadir máis",
        "htmlform-cloner-delete": "Eliminar",
        "htmlform-cloner-required": "Necesítase, polo menos, un valor.",
+       "htmlform-date-placeholder": "AAAA-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "AAAA-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "O valor especificado non é unha data recoñedica. Probe usando o formato AAAA-MM-DD.",
+       "htmlform-time-invalid": "O valor especificado non é unha hora recoñedica. Probe usando o formato HH:MM:SS.",
+       "htmlform-datetime-invalid": "O valor especificado non é unha data e hora recoñedica. Probe usando o formato AAAA-MM-DD HH:MM:SS.",
+       "htmlform-date-toolow": "O valor especificado é anterior á data máis antiga permitida: $1",
+       "htmlform-date-toohigh": "O valor especificado é posterior á data máis nova permitida: $1",
+       "htmlform-time-toolow": "O valor especificado é anterior ó tempo máis antigo permitido: $1",
+       "htmlform-time-toohigh": "O valor especificado é posterior ó tempo máis novo permitido: $1",
+       "htmlform-datetime-toolow": "O valor especificado é anterior á data e tampo máis antigo permitido: $1",
+       "htmlform-datetime-toohigh": "O valor especificado é posterior á data e tempo máis novo permitido: $1",
        "htmlform-title-badnamespace": "\"[[:$1]]\" non está no espazo de nomes \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" non é un título de páxina que se poida crear",
        "htmlform-title-not-exists": "\"$1\" non existe.",
        "htmlform-user-not-exists": "\"<strong>$1</strong>\" non existe.",
        "htmlform-user-not-valid": "\"<strong>$1</strong>\" non é un nome de usuario válido.",
-       "sqlite-has-fts": "$1 con soporte para procuras de texto completo",
-       "sqlite-no-fts": "$1 sen soporte para procuras de texto completo",
        "logentry-delete-delete": "$1 {{GENDER:$2|borrou}} a páxina \"$3\"",
        "logentry-delete-restore": "$1 {{GENDER:$2|restaurou}} a páxina \"$3\"",
        "logentry-delete-event": "$1 {{GENDER:$2|mudou}} a visibilidade {{PLURAL:$5|dunha entrada|de $5 entradas}} do rexistro de $3: $4",
        "feedback-external-bug-report-button": "Enviar unha tarefa técnica",
        "feedback-dialog-title": "Enviar comentarios",
        "feedback-dialog-intro": "Pode usar o formulario simple de abaixo para enviar os seus comentarios sobre o editor visual. O seu comentario será engadido á páxina \"$1\", xunto co seu nome de usuario.",
-       "feedback-error-title": "Erro",
        "feedback-error1": "Erro: Resultado da API non recoñecido",
        "feedback-error2": "Erro: Fallo de edición",
        "feedback-error3": "Erro: Non hai resposta da API",
        "feedback-thanks": "Grazas! Os seus comentarios publicáronse na páxina \"[$2 $1]\".",
        "feedback-thanks-title": "Grazas!",
        "feedback-useragent": "Axente de usuario:",
-       "searchsuggest-search": "Procurar",
+       "searchsuggest-search": "Procurar en {{SITENAME}}",
        "searchsuggest-containing": "que conteña...",
        "api-error-autoblocked": "A súa dirección IP foi bloqueada automaticamente porque foi usada por un usuario bloqueado.",
        "api-error-badaccess-groups": "Non ten os permisos necesarios para cargar ficheiros neste wiki.",
        "unlinkaccounts-success": "A conta foi desvinculada.",
        "authenticationdatachange-ignored": "Os cambios de datos de autenticación non foron xerados. Está configurado o provedor?",
        "userjsispublic": "Lembre: As subpáxinas JavaScript non deberían conter datos confidenciais porque outros usuarios poden velos.",
-       "usercssispublic": "Lembre: As subpáxinas CSS non deberían conter datos confidenciais porque outros usuarios poden velos."
+       "usercssispublic": "Lembre: As subpáxinas CSS non deberían conter datos confidenciais porque outros usuarios poden velos.",
+       "restrictionsfield-badip": "Enderezo IP ou rango de IP non válido: $1",
+       "restrictionsfield-label": "Rangos de IP permitidos:",
+       "restrictionsfield-help": "Un único enderezo IP ou rango CIDR por liña. Para habilitalos todos, utilice<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Erro: $1",
+       "edit-error-long": "Erros:\n\n$1"
 }
index 432338d..2aa61b6 100644 (file)
        "print": "Cetaki",
        "view": "Bilohi",
        "view-foreign": "Bilohi to $1",
-       "edit": "Momoli'o",
+       "edit": "Boli'o",
        "edit-local": "Ubawa deskripsi lokal",
        "create": "Mohutu",
        "create-local": "Duhengi deskripsi lokal",
        "lastmodifiedat": "Halaman botiye biloli'o pulitiyo $1, $2.",
        "viewcount": "Halaman botiye ma hilu'o {{PLURAL:$1|$1 kali}}.<br />",
        "protectedpage": "Halaman udaha-daha",
-       "jumpto": "Lumanti'a ode",
-       "jumptonavigation": "Navigasi",
+       "jumpto": "Lumanti'a ode:",
+       "jumptonavigation": "navigasi",
        "jumptosearch": "lolohe",
        "view-pool-error": "Ma'apu, server onggo sibuk sa'ati boti.\nNgohuntuwa pengguna mocoba momilehe halaman boti.\nWulatipo ngope'e to'u yi'o dipo mocoba momilehe halaman boti pooli.\n\n\n$1",
        "generic-pool-error": "Ma'apu, server onggo sibuk sa'ati boti.\nNgohuntuwa pengguna mocoba momilohe halaman boti.\nWulatipo ngope'e to'u  yi'u dipo mocoba momilehe halaman boti pooli.",
        "newmessageslinkplural": "{{PLURAL:$1|tuwawu tahuli bohu|999=tahuli bohu}}",
        "newmessagesdifflinkplural": "{{PLURAL:$1|iluba|999=u iluba}} pulitiyo",
        "youhavenewmessagesmulti": "Yio lootapu tahuli bohu to $1",
-       "editsection": "boli'a",
+       "editsection": "boli'o",
        "editold": "boli'a",
        "viewsourceold": "Bilohi bungoliyo",
        "editlink": "boli'a",
        "nstab-template": "Templat",
        "nstab-help": "Halaman tulungi",
        "nstab-category": "Kategori",
-       "mainpage-nstab": "Halamani bungaliyo",
+       "mainpage-nstab": "Halaman Bungaliyo",
        "nosuchaction": "Diya'a huhutu boyito",
        "nosuchactiontext": "Huhutu u hepohile lo URL ja valid.\nYi'o lotalawa lopomaso lo URL, meyalo lodudu'a pranala u ja banari.\nUtiye olo kira-kira tuwotiyo woluwo bug to pilaakasi u hepomake {{SITENAME}}",
        "nosuchspecialpage": "Diya'a halaman istimewa boyito",
        "yourpasswordagain": "Ulangiya tahe u'unti",
        "createacct-yourpasswordagain": "Konfirmasi tahe u'unti",
        "createacct-yourpasswordagain-ph": "Tuwota pooli tahe u'unti",
-       "remembermypassword": "Eelayi tahe u'unti'u to komputer botiye (to delomo $1 {{PLURAL:$1|huyi}})",
        "userlogin-remembermypassword": "Hulima'o wa'u tuwo-tuwoto",
        "userlogin-signwithsecure": "Popohunawa server aamani",
        "cannotloginnow-title": "Ja mowali tumuwoto log sa'ati botiya",
        "tooltip-invert": "Centang kotak botiye u mopowanto'o halaman yiloboli'a to delomo huwali lo tanggulo tilulawoto (wawu huwali lo tanggulo a'ayita wanu dicentang)",
        "namespace_association": "Huwali lo tanggulo a'aayita",
        "tooltip-namespace_association": "Centang halaman botiye u mopowayito huwali lo tanggulo lo'iyawa meyalo subjek u a'ayita wolo huwali lo tanggulo u tilulawoto.",
-       "blanknamespace": "Bungaliyo",
+       "blanknamespace": "(Bungaliyo)",
        "contributions": "Kontribusi {{GENDER:$1|Ta ohu'uwo}}",
        "mycontris": "Kontribusi",
        "anoncontribs": "Kontribusi",
index 75ce391..6220a07 100644 (file)
        "views": "𐍃𐌹𐌿𐌽𐌴𐌹𐍃",
        "toolbox": "𐍃𐌰𐍂𐍅𐌰𐌽𐍃",
        "projectpage": "𐌰𐌽𐌳𐌷𐌿𐌻𐌴𐌹 𐍆𐌰𐌿𐍂𐌰𐍅𐌰𐌿𐍂𐍀𐌰𐌻𐌰𐌿𐍆",
+       "mediawikipage": "𐌰𐌽𐌳𐌷𐌿𐌻𐌴𐌹 𐍅𐌰𐌿𐍂𐌳𐌰𐌻𐌰𐌿𐍆",
        "viewhelppage": "𐌰𐌽𐌳𐌷𐌿𐌻𐌴𐌹 𐌷𐌹𐌻𐍀𐌰𐌻𐌰𐌿𐍆",
        "otherlanguages": "𐌰𐌽𐌸𐌰𐍂𐌰𐌹𐌼 𐍂𐌰𐌶𐌳𐍉𐌼",
        "redirectedfrom": "(𐌹𐍃 {{GENDER:𐍄𐌹𐌿𐌷𐌰𐌽𐍃|𐍄𐌹𐌿𐌷𐌰𐌽𐌰}} 𐌷𐌹𐌳𐍂𐌴 𐍆𐍂𐌰𐌼 $1)",
        "disclaimers": "𐌲𐌰𐍂𐌰𐌹𐌳𐌴𐌹𐌽𐍉𐍃 𐍂𐌰𐌹𐌷𐍄𐌰𐌹𐍃",
        "disclaimerpage": "Project:𐌲𐌰𐌼𐌰𐌹𐌽𐌰 𐌲𐌰𐍂𐌰𐌹𐌳𐌴𐌹𐌽𐍃 𐍂𐌰𐌹𐌷𐍄𐌰𐌹𐍃",
        "edithelp": "𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹𐌽𐌹𐌷𐌹𐌻𐍀𐌰",
+       "helppage-top-gethelp": "𐌷𐌹𐌻𐍀𐌰",
        "mainpage": "𐌰𐌽𐌰𐍃𐍄𐍉𐌳𐌴𐌹𐌽𐌹𐌻𐌰𐌿𐍆𐍃",
        "mainpage-description": "𐌰𐌽𐌰𐍃𐍄𐍉𐌳𐌴𐌹𐌽𐌹𐌻𐌰𐌿𐍆𐍃",
-       "portal": "ð\90\8c±ð\90\8c°ð\90\8c¿ð\90\8d\82ð\90\8c²ð\90\8d\83 ð\90\8c²ð\90\8c°ð\90\8d\85ð\90\8c¹",
-       "portal-url": "Project:ð\90\8c±ð\90\8c°ð\90\8c¿ð\90\8d\82ð\90\8c²ð\90\8d\83 ð\90\8c²ð\90\8c°ð\90\8d\85ð\90\8c¹",
+       "portal": "ð\90\8c²ð\90\8c°ð\90\8cµð\90\8c¿ð\90\8c¼ð\90\8c¸ð\90\8d\83 ð\90\8c²ð\90\8c°ð\90\8c¼ð\90\8c°ð\90\8c¹ð\90\8c½ð\90\8c³ð\90\8c¿ð\90\8c¸ð\90\8c°ð\90\8c¹ð\90\8d\83",
+       "portal-url": "Project:ð\90\8c²ð\90\8c°ð\90\8cµð\90\8c¿ð\90\8c¼ð\90\8c¸ð\90\8d\83 ð\90\8c²ð\90\8c°ð\90\8c¼ð\90\8c°ð\90\8c¹ð\90\8c½ð\90\8c³ð\90\8c¿ð\90\8c¸ð\90\8c°ð\90\8c¹ð\90\8d\83",
        "privacy": "𐌲𐌰𐍂𐌴𐌳𐌴𐌹𐌽𐍉𐍃 𐍃𐌿𐌽𐌳𐍂𐍉𐍅𐌹𐍃𐌰𐌽𐌰",
        "privacypage": "Project:𐌲𐌰𐍂𐌰𐌹𐌳𐌴𐌹𐌽𐍉𐍃 𐍃𐌿𐌽𐌳𐍂𐍉𐍅𐌹𐍃𐌰𐌽𐌰",
        "retrievedfrom": "𐌲𐌰𐌽𐌿𐌼𐌰𐌽 𐍆𐍂𐌰𐌼 \"$1\"",
        "youhavenewmessages": "{{PLURAL:$3|𐌷𐌰𐌱𐌰𐌹𐍃}} $1 ($2).",
+       "newmessageslinkplural": "{{PLURAL:$1|𐌽𐌹𐍅𐌹 𐍅𐌰𐌿𐍂𐌳|999=𐌽𐌹𐌿𐌾𐌰 𐍅𐌰𐌿𐍂𐌳𐌰}}",
+       "youhavenewmessagesmulti": "𐌷𐌰𐌱𐌰𐌹𐍃 𐌽𐌹𐌿𐌾𐌰 𐍅𐌰𐌿𐍂𐌳𐌰 𐌰𐌽𐌰 $1",
        "editsection": "𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹",
        "editold": "𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹",
        "editlink": "𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹",
        "nstab-special": "𐌿𐍃𐍃𐌹𐌽𐌳𐍃 𐌻𐌰𐌿𐍆𐍃",
        "nstab-project": "𐍆𐌰𐌿𐍂𐌰𐍅𐌰𐌿𐍂𐍀𐌰𐌻𐌰𐌿𐍆𐍃",
        "nstab-image": "𐍆𐌰𐌴𐌹𐌻",
+       "nstab-mediawiki": "𐍅𐌰𐌿𐍂𐌳",
        "nstab-template": "𐍃𐌺𐌴𐌹𐍂𐌴𐌹𐌽𐌹𐍆𐍂𐌹𐍃𐌰𐌷𐍄𐍃",
        "nstab-help": "𐌷𐌹𐌻𐍀𐌰𐌻𐌰𐌿𐍆𐍃",
        "nstab-category": "𐌺𐌿𐌽𐌹",
        "error": "𐌰𐌹𐍂𐌶𐌴𐌹",
        "databaseerror-error": "𐌰𐌹𐍂𐌶𐌴𐌹: $1",
        "missing-article": "𐌳𐌰𐍄𐌰𐌱𐌴𐍃 𐌽𐌹 𐌱𐌹𐌲𐌰𐍄 𐌱𐍉𐌺𐍉𐍃 𐌻𐌰𐌿𐌱𐌹𐍃 𐌸𐌹𐌶𐌴𐌹 𐍃𐌺𐌿𐌻𐌳𐌴𐌳𐌹 𐌱𐌹𐌲𐌹𐍄𐌰𐌽, 𐌷𐌰𐌹𐍄𐌰𐌽𐍃 \"$1\" $2. \n\n𐌸𐌰𐍄𐌰 𐌿𐍆𐍄𐌰 𐍅𐌰𐌹𐍂𐌸𐌹𐌸 𐌾𐌰𐌱𐌰𐌹 𐌻𐌰𐌹𐍃𐍄𐌾𐌰𐌳𐌰 𐍆𐌰𐌹𐍂𐌽𐌾𐌰 𐌳𐌹𐍆𐍆 𐌸𐌰𐌿 𐍃𐍀𐌹𐌻𐌻𐌰𐌲𐌰𐍅𐌹𐍃𐍃 𐍃𐌴𐌹 𐍆𐍂𐌰𐌵𐌹𐍃𐍄𐌹𐌳𐌰 𐌹𐍃𐍄. 𐌽𐌹𐌱𐌰𐌹 𐌹𐍃𐍄, 𐌼𐌰𐌷𐍄𐍃 𐌹𐍃𐍄 𐌴𐌹 𐌱𐌹𐌲𐌴𐍄𐌴𐌹𐍃 𐌰𐌹𐍂𐌶𐌴𐌹𐌽 𐌹𐌽 𐍃𐌰𐌿𐍆𐍄𐍅𐌰𐌹𐍂𐌰. \n\n𐌱𐌹𐌳𐌾𐌰𐌼 𐌸𐌿𐌺, 𐌼𐌴𐍂𐌴𐌹 𐌸𐌰𐍄𐌰 𐌳𐌿 [[Special:ListUsers/sysop\n|𐍂𐌴𐌹𐌺]] 𐌲𐌹𐍆𐌿𐌷 𐌲𐌰𐍅𐌹𐍃𐍃.",
+       "cannotdelete-title": "𐌽𐌹 𐌼𐌰𐌲 𐍆𐍂𐌰𐌵𐌹𐍃𐍄𐌾𐌰𐌽 𐌻𐌰𐌿𐌱𐌰 \"$1\"",
        "badtitle": "𐌿𐌽𐍂𐌰𐌹𐌷𐍄𐌰𐍄𐌰 𐌿𐍆𐌰𐍂𐌼𐌴𐌻𐌹",
        "badtitletext": "𐍆𐍂𐌰𐌹𐌷𐌰𐌽𐍃 𐌻𐌰𐌿𐍆𐍃 𐍅𐌰𐍃 𐌿𐌽𐌲𐌰𐌼𐌰𐌲𐌰𐌽𐌳𐍃, 𐌻𐌰𐌿𐍃, 𐌰𐌹𐌸𐌸𐌰𐌿 𐌿𐌽𐍂𐌰𐌹𐌷𐍄𐌰𐌱𐌰 𐌲𐌰𐍅𐌹𐌳𐌰𐌽𐍃 𐌼𐌹𐌸𐍂𐌰𐌶𐌳𐌰 𐌸𐌰𐌿 𐌼𐌹𐌸-𐍅𐌹𐌺𐌹 𐌿𐍆𐌰𐍂𐌼𐌴𐌻𐌹. 𐌼𐌰𐌲𐌹 𐌷𐌰𐌱𐌰𐌽 𐌰𐌹𐌽𐌰 𐌸𐌰𐌿 𐌼𐌰𐌽𐌰𐌲𐌹𐌶𐍉𐍃 𐌱𐍉𐌺𐍉𐍃 𐌱𐍂𐌿𐌺𐌹𐌳𐍉𐍃 𐌹𐌽 𐌿𐍆𐌰𐍂𐌼𐌴𐌻𐌾𐌰𐌼.",
        "viewsource": "𐍃𐌰𐌹𐍈 𐌱𐍂𐌿𐌽𐌽𐌰𐌽",
+       "mycustomjsprotected": "𐌽𐌹 𐌷𐌰𐌱𐌰𐌹𐍃 𐌰𐌽𐌳𐌻𐌴𐍄 𐌳𐌿 𐌹𐌽𐌼𐌰𐌹𐌳𐌾𐌰𐌽 𐌸𐌰𐌽𐌰 JavaScript 𐌻𐌰𐌿𐍆.",
        "yourname": "𐌰𐍄𐌲𐌰𐌲𐌲𐌰𐌽𐌰𐌼𐍉:",
        "userlogin-yourname": "𐌰𐍄𐌲𐌰𐌲𐌲𐌰𐌽𐌰𐌼𐍉",
        "userlogin-yourname-ph": "𐌼𐌴𐌻𐌴𐌹 𐌰𐍄𐌲𐌰𐌲𐌲𐌰𐌽𐌰𐌼𐍉 𐌸𐌴𐌹𐌽",
        "createacct-yourpasswordagain": "𐌲𐌰𐍃𐌹𐌲𐌻𐌴𐌹 𐌲𐌰𐌼𐍉𐍄𐌰𐍅𐌰𐌿𐍂𐌳",
        "createacct-yourpasswordagain-ph": "𐌼𐌴𐌻𐌴𐌹 𐌲𐌰𐌼𐍉𐍄𐌰𐍅𐌰𐌿𐍂𐌳 𐌰𐍆𐍄𐍂𐌰",
        "userlogin-remembermypassword": "𐌲𐌰𐍆𐌰𐍃𐍄 𐌼𐌹𐌺 {{GENDER:𐌰𐍄𐌲𐌰𐌲𐌲𐌰𐌽𐌰𐌽𐌰|𐌰𐍄𐌲𐌰𐌲𐌲𐌰𐌽𐌰}}",
+       "cannotloginnow-title": "𐌽𐌿 𐌽𐌹 𐌼𐌰𐌲𐍄 𐌰𐍄𐌲𐌰𐌲𐌲𐌰𐌽",
        "login": "𐌰𐍄𐌲𐌰𐌲𐌲",
        "nav-login-createaccount": "𐌰𐍄𐌲𐌰𐌲𐌲 / 𐍃𐌺𐌰𐍀𐌴𐌹 𐌺𐌰𐍅𐍄𐍃𐌾𐍉𐌽",
        "userlogin": "𐌰𐍄𐌲𐌰𐌲𐌲 / 𐍃𐌺𐌰𐍀𐌴𐌹 𐌺𐌰𐍅𐍄𐍃𐌾𐍉𐌽",
        "pt-login": "𐌰𐍄𐌲𐌰𐌲𐌲",
        "pt-login-button": "𐌰𐍄𐌲𐌰𐌲𐌲",
        "pt-createaccount": "𐍃𐌺𐌰𐍀𐌴𐌹 𐌺𐌰𐍅𐍄𐍃𐌾𐍉𐌽",
+       "pt-userlogout": "𐌰𐍆𐌻𐌴𐌹𐌸",
        "passwordreset": "𐌰𐍆𐍄𐍂𐌰 𐍃𐌰𐍄𐌴𐌹 𐌲𐌰𐌼𐍉𐍄𐌰𐍅𐌰𐌿𐍂𐌳",
        "bold_sample": "𐍃𐍅𐌹𐌽𐌸𐍉𐍃 𐌱𐍉𐌺𐍉𐍃",
        "bold_tip": "𐍃𐍅𐌹𐌽𐌸𐍉𐍃 𐌱𐍉𐌺𐍉𐍃",
        "showpreview": "𐌰𐍄𐌰𐌿𐌲𐌴𐌹 𐍆𐌰𐌿𐍂𐌰𐍃𐌹𐌿𐌽",
        "showdiff": "𐌰𐍄𐌰𐌿𐌲𐌴𐌹 𐌹𐌽𐌼𐌰𐌹𐌳𐌹𐌽𐌹𐌽𐍃",
        "loginreqlink": "𐌰𐍄𐌲𐌰𐌲𐌲",
-       "newarticle": "(ð\90\8c½ð\90\8c¹ð\90\8c¿ð\90\8c¾ð\90\8c°ð\90\8d\84ð\90\8c°)",
+       "newarticle": "(ð\90\8c½ð\90\8c¹ð\90\8d\85ð\90\8c¹)",
        "newarticletext": "𐌻𐌰𐌹𐍃𐍄𐌹𐌳𐌴𐍃 𐌲𐌰𐍅𐌹𐍃 𐌳𐌿 𐌻𐌰𐌿𐌱𐌰 𐍃𐌰𐌴𐌹 𐌽𐌹𐍃𐍄. 𐌳𐌿 𐍃𐌺𐌰𐍀𐌾𐌰𐌽 𐌸𐌰𐌽𐌰 𐌻𐌰𐌿𐍆, 𐌰𐌽 𐌰𐍃𐍄𐍉𐌳𐌴𐌹 𐌼𐌴𐌻𐌾𐌰𐌽 𐌹𐌽 𐌰𐍂𐌺𐌰𐌹 𐌿𐍆 (𐍃𐌰𐌹𐍈 [$1 𐌷𐌹𐌻𐍀𐌰𐌻𐌰𐌿𐍆] 𐌼𐌰𐌽𐌰𐌲𐌹𐌶𐌹𐌽 𐌺𐌿𐌽𐌸𐌾𐌰). 𐌾𐌰𐌱𐌰𐌹 𐌹𐍃 𐌷𐌴𐍂 𐌹𐌽 𐌰𐌹𐍂𐌶𐌴𐌹𐌽𐍃, 𐌲𐌰𐌲𐌲 𐌳𐌿 <𐍃𐍄𐍂𐍉𐌽𐌲>𐌹𐌱𐌿𐌺𐌰𐌷𐌰𐌿𐌱𐌹𐌳𐌹𐌻𐍉𐌽.",
        "noarticletext": "𐌽𐌿 𐌽𐌹 𐍃𐌹𐌽𐌳 𐌱𐍉𐌺𐍉𐍃 𐌹𐌽 𐌸𐌰𐌼𐌼𐌰 𐌻𐌰𐌿𐌱𐌰.\n𐌼𐌰𐌲𐍄 [[Special:Search/{{PAGENAME}}|𐍃𐍉𐌺𐌾𐌰𐌽 𐌸𐌰𐍄𐌰 𐌻𐌰𐌿𐌱𐌰-𐌿𐍆𐌰𐍂𐌼𐌴𐌻𐌹]] 𐌹𐌽 𐌰𐌽𐌸𐌰𐍂𐌰𐌹𐌼 𐌻𐌰𐌿𐌱𐌰𐌼,  <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} 𐍃𐍉𐌺𐌾𐌰𐌽 𐌲𐌰𐌷𐌰𐌷𐌾𐍉 𐌲𐌰𐍆𐌰𐍃𐍄𐍉𐍃], 𐌰𐌹𐌸𐌸𐌰𐌿 [{{fullurl:{{FULLPAGENAME}}|action=edit}} 𐍃𐌺𐌰𐍀𐌾𐌰𐌽 𐌸𐌰𐌽𐌰 𐌻𐌰𐌿𐍆.]</ span>",
        "noarticletext-nopermission": "𐌽𐌿 𐌽𐌹 𐍃𐌹𐌽𐌳 𐌱𐍉𐌺𐍉𐍃 𐌹𐌽 𐌸𐌰𐌼𐌼𐌰 𐌻𐌰𐌿𐌱𐌰.\n𐌼𐌰𐌲𐍄 [[Special:Search/{{PAGENAME}}|𐍃𐍉𐌺𐌾𐌰𐌽 𐌸𐌰𐍄𐌰 𐌻𐌰𐌿𐌱𐌰-𐌿𐍆𐌰𐍂𐌼𐌴𐌻𐌹]] 𐌹𐌽 𐌰𐌽𐌸𐌰𐍂𐌰𐌹𐌼 𐌻𐌰𐌿𐌱𐌰𐌼, 𐌸𐌰𐌿 <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} 𐍃𐍉𐌺𐌾𐌰𐌽 𐌲𐌰𐌷𐌰𐌷𐌾𐍉 𐌲𐌰𐍆𐌰𐍃𐍄𐍉𐍃]</span>, 𐌹𐌸 𐌽𐌹 𐌷𐌰𐌱𐌰𐌹𐍃 𐌰𐌽𐌳𐌻𐌴𐍄 𐍃𐌺𐌰𐍀𐌾𐌰𐌽 𐌸𐌰𐌽𐌰 𐌻𐌰𐌿𐍆.",
        "updated": "(𐌰𐌽𐌰𐌽𐌹𐍅𐌹𐌸)",
        "previewnote": "<strong>𐌲𐌰𐌼𐌹𐌽𐌸𐌴𐌹 𐌸𐌰𐍄𐌴𐌹 𐌸𐌰𐍄𐌰 𐌹𐍃𐍄 𐌸𐌰𐍄𐌰𐌹𐌽𐌴𐌹 𐍆𐌰𐌿𐍂𐌰𐍃𐌹𐌿𐌽𐍃.</strong>\n𐌸𐌴𐌹𐌽𐍉𐍃 𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹𐌽𐍉𐍃 𐌽𐌰𐌿𐌷 𐌽𐌹 𐌲𐌰𐍆𐌰𐍃𐍄𐌰𐌽𐍉𐍃 𐍃𐌹𐌽𐌳!",
-       "editing": "{{GENDER:𐌹𐌽𐌼𐌰𐌹𐌳𐌾𐌰𐌽𐌳𐍃|𐌹𐌽𐌼𐌰𐌹𐌳𐌾𐌰𐌽𐌳𐌴𐌹}} $1",
-       "creating": "{{GENDER:𐍃𐌺𐌰𐍀𐌾𐌰𐌽𐌳𐍃|𐍃𐌺𐌰𐍀𐌾𐌰𐌽𐌳𐌴𐌹}} $1",
+       "editing": "{{GENDER:𐌹𐌽𐌼𐌰𐌹𐌳𐌾𐌰𐌽𐌳𐍃|𐌹𐌽𐌼𐌰𐌹𐌳𐌾𐌰𐌽𐌳𐌴𐌹|𐌹𐌽𐌼𐌰𐌹𐌳𐌾𐌰𐌽𐌳𐍃}} $1",
+       "creating": "{{GENDER:𐍃𐌺𐌰𐍀𐌾𐌰𐌽𐌳𐍃|𐍃𐌺𐌰𐍀𐌾𐌰𐌽𐌳𐌴𐌹|𐍃𐌺𐌰𐍀𐌾𐌰𐌽𐌳𐍃\n}} $1",
        "editingsection": "{{GENDER:𐌹𐌽𐌼𐌰𐌹𐌳𐌾𐌰𐌽𐌳𐍃|𐌹𐌽𐌼𐌰𐌹𐌳𐌾𐌰𐌽𐌳𐌴𐌹}} $1 (𐌳𐌰𐌹𐌻)",
        "editingcomment": "{{GENDER:𐌹𐌽𐌼𐌰𐌹𐌳𐌾𐌰𐌽𐌳𐍃|𐌹𐌽𐌼𐌰𐌹𐌳𐌾𐌰𐌽𐌳𐌴𐌹}} $1 (𐌽𐌹𐌿𐌾𐌰 𐌳𐌰𐌹𐌻)",
        "yourdiff": "𐌲𐌰𐍃𐌺𐌰𐌹𐌳𐌴𐌹𐌽𐍉𐍃",
        "hiddencategories": "𐍃𐌰 𐌻𐌰𐌿𐍆𐍃 𐌹𐍃𐍄 𐌲𐌰𐌳𐌰𐌹𐌻𐌰 {{PLURAL:$1|1 𐌰𐌽𐌰𐌻𐌰𐌿𐌲𐌽𐌹𐍃 𐌺𐌿𐌽𐌾𐌹𐍃|$1 𐌰𐌽𐌰𐌻𐌰𐌿𐌲𐌽𐌰𐌹𐌶𐌴 𐌺𐌿𐌽𐌾𐌴}}:‎",
        "permissionserrorstext-withaction": "𐌽𐌹 𐌷𐌰𐌱𐌰𐌹𐍃 𐌰𐌽𐌳𐌻𐌴𐍄 𐌳𐌿 $2, 𐌹𐌽 {{PLURAL:$1|𐌹𐍆𐍄𐌿𐌼𐌰𐌹𐌶𐍉𐍃 𐍅𐌰𐌹𐌷𐍄𐌰𐌹𐍃|𐌹𐍆𐍄𐌿𐌼𐌰𐌹𐌶𐍉 𐍅𐌰𐌹𐌷𐍄𐌴}}:",
        "moveddeleted-notice": "𐍃𐌰 𐌻𐌰𐌿𐍆𐍃 𐌿𐍃𐌽𐌿𐌼𐌰𐌽𐍃 𐌹𐍃𐍄. 𐌿𐍃𐌽𐌿𐌼𐍄𐍃 𐌾𐌰𐌷 𐌲𐌰𐍆𐌰𐍃𐍄𐌰𐌹𐌽𐍃 𐌼𐌹𐌸𐍃𐌰𐍄𐌴𐌹𐌽𐌰𐌹𐍃 𐌿𐍆 𐍃𐌹𐌽𐌳 𐌿𐍃𐍄𐌰𐌹𐌺𐌽𐌴𐌹𐌽𐌰𐌹.",
+       "postedit-confirmation-created": "𐌻𐌰𐌿𐍆𐍃 𐌲𐌰𐍃𐌺𐌰𐍀𐌰𐌽𐍃 𐌹𐍃𐍄.",
+       "edit-already-exists": "𐌽𐌹 𐍅𐌰𐍃 𐌼𐌰𐌷𐍄𐍃 𐍃𐌺𐌰𐍀𐌾𐌰𐌽 𐌸𐌰𐌽𐌰 𐌻𐌰𐌿𐍆. \n𐌾𐌿 𐌹𐍃𐍄.",
        "post-expand-template-inclusion-warning": "'''𐌷𐍅𐍉𐍄𐌾𐌰𐌽𐌳𐍃:''' 𐍆𐌰𐌿𐍂𐌰𐌼𐌴𐌻𐌴𐌹𐌽𐍃 𐍃𐌹𐌽𐌳 𐌿𐍆𐌰𐍂𐌼𐌹𐌺𐌹𐌻𐍃. 𐍃𐌿𐌼𐍃 𐍆𐌰𐌿𐍂𐌴𐌼𐌴𐌻𐌴𐌹𐌽𐍉𐍃 𐌽𐌹 𐌼𐌰𐌲 𐍅𐌹𐍃𐌰𐌽 𐌸𐌰𐍂",
        "post-expand-template-inclusion-category": "𐍃𐌴𐌹𐌳𐍉𐌽𐍃 𐌸𐌰𐍂 𐍆𐌰𐌿𐍂𐌰𐌼𐌴𐌻𐌴𐌹𐌽𐍃 𐍃𐌹𐌽𐌳 𐌿𐍆𐌰𐍂𐌼𐌹𐌺𐌹𐌻𐍃",
        "viewpagelogs": "𐌰𐍄𐌰𐌿𐌲𐌴𐌹 𐌲𐌰𐍆𐌰𐍃𐍄𐌰𐌹𐌽𐌹𐌽𐍃 𐌸𐌰𐌼𐌼𐌰 𐌻𐌰𐌿𐌱𐌰",
        "history-feed-item-nocomment": "$1 𐌰𐍄 $2",
        "rev-delundel": "𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹 𐌰𐌽𐌰𐍃𐌹𐌿𐌽",
        "revdel-restore": "𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹 𐌰𐌽𐌰𐍃𐌹𐌿𐌽",
-       "revertmerge": "ð\90\8c¿ð\90\8c½ð\90\8c²ð\90\8c°ð\90\8d\84ð\90\8c¹ð\90\8c»ð\90\8d\89ð\90\8d\83",
+       "revertmerge": "ð\90\8c¿ð\90\8c½ð\90\8c²ð\90\8c°ð\90\8c±ð\90\8c»ð\90\8c°ð\90\8c½ð\90\8c³",
        "history-title": "𐌰𐍆𐍄𐍂𐌰𐍃𐌹𐌿𐌽𐌹𐍃𐍀𐌹𐌻𐌻 𐌻𐌰𐌿𐌱𐌹𐍃 \"$1\"",
        "difference-title": "𐌲𐌰𐍃𐌺𐌰𐌹𐌳𐌴𐌹𐌽𐍃 𐌼𐌹𐌸 𐌰𐍆𐍄𐍂𐌰𐍃𐌹𐌿𐌽𐍉𐌼 𐌻𐌰𐌿𐌱𐌹𐍃 \"$1\"",
+       "difference-multipage": "(𐌰𐌽𐌸𐌰𐍂𐌻𐌴𐌹𐌺𐌾𐌰 𐌼𐌹𐌸 𐌻𐌰𐌿𐌱𐌰𐌼)",
        "lineno": "𐍃𐍄𐍂𐌹𐌺𐍃 $1:",
        "editundo": "𐍃𐌺𐌰𐍀𐌴𐌹 𐌰𐍆𐍄𐍂𐌰",
        "diff-multi-sameuser": "({{PLURAL:$1|𐌰𐌹𐌽𐌰 𐌼𐌹𐌳𐌿𐌼𐌰𐌲𐌰𐌱𐍉𐍄𐌴𐌹𐌽𐍃|$1 𐌼𐌹𐌳𐌿𐌼𐌰 𐌲𐌰𐌱𐍉𐍄𐌴𐌹𐌽𐍉𐍃}} 𐍆𐍂𐌰𐌼 𐍃𐌰𐌼𐌹𐌽 𐌱𐍂𐌿𐌺𐌾𐌹𐌽 𐌽𐌹 𐌰𐍄𐌰𐌿𐌲𐌹𐌳𐌰/𐌰𐍄𐌰𐌿𐌲𐌹𐌳𐍉𐍃)",
        "search-showingresults": "{{ZPLURAL:$4|𐍄𐌰𐌿𐌹 <strong>$1 𐍅𐌰𐌹𐌷𐍄𐌰𐌹𐍃 <strong>$3|𐍄𐍉𐌾𐌰 <strong>$1 - $2 𐍅𐌰𐌹𐌷𐍄𐌰𐌹𐍃 <strong>$3}}",
        "search-nonefound": "𐌽𐌹 𐍄𐌰𐌿𐌹 𐍅𐌰𐍃 𐍃𐌰𐌼𐌰𐌽𐌰 𐍃𐍅𐌰 𐍃𐍉𐌺𐌴𐌹𐌽.",
        "powersearch-legend": "𐍃𐍉𐌺𐌴𐌹",
-       "preferences": "ð\90\8c¼ð\90\8c´ð\90\8c¹ð\90\8c½ð\90\8d\89ð\90\8d\83 ð\90\8c±ð\90\8d\82ð\90\8c¿ð\90\8cºð\90\8c¾ð\90\8c°ð\90\8c¼ð\90\8c°ð\90\8c¹ð\90\8c³ð\90\8c´ð\90\8c¹ð\90\8c½ð\90\8c´ð\90\8c¹𐍃",
-       "mypreferences": "ð\90\8c²ð\90\8c°ð\90\8c»ð\90\8c´ð\90\8c¹ð\90\8cºð\90\8c°ð\90\8c½ð\90\8c³ð\90\8c´ð\90\8c¹ð\90\8c½𐍃 𐍅𐌰𐌹𐌷𐍄𐍃",
+       "preferences": "ð\90\8c¼ð\90\8c´ð\90\8c¹ð\90\8c½ð\90\8d\89ð\90\8d\83 ð\90\8d\86ð\90\8d\82ð\90\8c¹ð\90\8c¾ð\90\8d\89ð\90\8c½ð\90\8d\89ð\90\8d\83 ð\90\8d\85ð\90\8c°ð\90\8c¹ð\90\8c·ð\90\8d\84𐍃",
+       "mypreferences": "ð\90\8c¼ð\90\8c´ð\90\8c¹ð\90\8c½ð\90\8d\89ð\90\8d\83 ð\90\8d\86ð\90\8d\82ð\90\8c¹ð\90\8c¾ð\90\8d\89ð\90\8c½ð\90\8d\89𐍃 𐍅𐌰𐌹𐌷𐍄𐍃",
        "prefs-skin": "𐍆𐌹𐌻𐌻",
        "skin-preview": "𐍆𐌰𐌿𐍂𐌰𐍃𐌰𐌹𐍈",
        "saveprefs": "𐌲𐌰𐍆𐌰𐍃𐍄",
        "minoreditletter": "l",
        "newpageletter": "N",
        "boteditletter": "b",
-       "recentchangeslinked": "ð\90\8c²ð\90\8c°ð\90\8d\85ð\90\8c¹𐌳𐌰𐌽𐍉𐍃 𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹𐌽𐍉𐍃",
-       "recentchangeslinked-feed": "Máideinlieks",
-       "recentchangeslinked-toolbox": "ð\90\8c²ð\90\8c°ð\90\8d\85ð\90\8c¹𐌳𐌰𐌽𐍉𐍃 𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹𐌽𐍉𐍃",
-       "recentchangeslinked-title": "ð\90\8c¹ð\90\8c½ð\90\8c¼ð\90\8c°ð\90\8c¹ð\90\8c³ð\90\8c´ð\90\8c¹ð\90\8c½ð\90\8d\89ð\90\8d\83 ð\90\8c²ð\90\8c°ð\90\8d\85ð\90\8c¹𐌳𐌰𐌽𐍉𐍃 𐌼𐌹𐌸 \"$1\"",
-       "recentchangeslinked-summary": "𐍃𐍉 𐌹𐍃𐍄 𐌻𐌴𐌹𐍃𐍄𐌰 𐌼𐌰𐌹𐌳𐌴𐌹𐌽𐌴 𐌰𐍆𐍄𐌿𐌼𐌹𐍃𐍄𐍃 𐍃𐌺𐍉𐍀 𐌰𐌽𐌰 𐍃𐌴𐌹𐌳𐍉𐌽𐍃 𐌻𐌴𐌹𐌽𐌺𐍉𐌽𐌳 𐌿𐍃 𐌿𐍃𐍃𐌹𐌽𐌳𐌰𐌹 𐍃𐌴𐌹𐌳𐍉𐌽 (𐌰𐌹𐌸𐌸𐌰𐌿 𐌻𐌹𐌸𐌰𐌿𐍃 𐌿𐍃𐍃𐌹𐌽𐌳𐌰𐌹𐌶𐍉𐍃 𐌷𐌰𐌽𐍃𐍉𐍃). 𐍃𐌴𐌹𐌳𐍉𐌽𐍃 [[Special:Watchlist|𐍅𐌹𐍄𐌰𐌽𐌳𐌻𐌴𐌹𐍃𐍄𐍉𐍃 𐌸𐌴𐌹𐌽𐍉𐍃]] 𐍃𐌹𐌽𐌳 '''𐌳𐌹𐌲𐍂𐍃𐍄𐌰𐍆𐍃'''.",
+       "recentchangeslinked": "ð\90\8c²ð\90\8c°ð\90\8c±ð\90\8c¿ð\90\8c½𐌳𐌰𐌽𐍉𐍃 𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹𐌽𐍉𐍃",
+       "recentchangeslinked-feed": "𐌲𐌰𐌱𐌿𐌽𐌳𐌰𐌽𐍉𐍃 𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹𐌽𐍉𐍃",
+       "recentchangeslinked-toolbox": "ð\90\8c²ð\90\8c°ð\90\8c±ð\90\8c¿ð\90\8c½𐌳𐌰𐌽𐍉𐍃 𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹𐌽𐍉𐍃",
+       "recentchangeslinked-title": "ð\90\8c¹ð\90\8c½ð\90\8c¼ð\90\8c°ð\90\8c¹ð\90\8c³ð\90\8c´ð\90\8c¹ð\90\8c½ð\90\8d\89ð\90\8d\83 ð\90\8c²ð\90\8c°ð\90\8c±ð\90\8c¿ð\90\8c½𐌳𐌰𐌽𐍉𐍃 𐌼𐌹𐌸 \"$1\"",
+       "recentchangeslinked-summary": "A𐌸𐌰𐍄𐌰 𐌹𐍃𐍄 𐍅𐌹𐌺𐍉 𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹𐌽𐍉 𐌽𐌹𐌿𐌾𐌰𐌱𐌰 𐌲𐌰𐍄𐌰𐍅𐌹𐌳𐍉𐍃 𐌻𐌰𐌿𐌱𐌰𐌼 𐌲𐌰𐌱𐌿𐌽𐌳𐌰𐌹 𐍃𐌿𐌼𐌰𐌼𐌼𐌰 𐌻𐌰𐌿𐌱𐌰 (𐌸𐌰𐌿 𐌲𐌰𐌳𐌰𐌹𐌻𐌰𐌼 𐍃𐌿𐌼𐌹𐍃 𐌺𐌿𐌽𐌾𐌹𐍃). <strong>𐌻𐌰𐌿𐌱𐍉𐍃 𐌰𐌽𐌰 [[Special:Watchist|your]] 𐍃𐌹𐌽𐌳 </strong>𐍃𐍅𐌹𐌽𐌸𐌰𐌹.",
        "recentchangeslinked-page": "𐌻𐌰𐌿𐌱𐌰𐌽𐌰𐌼𐍉:",
        "recentchangeslinked-to": "𐌰𐍄𐌰𐌿𐌲𐌴𐌹 𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹𐌽𐍉𐍃 𐌻𐌰𐌿𐌱𐌴 𐌸𐌰𐌹𐌴𐌹 𐌲𐌰𐍅𐌹𐌳𐌰𐌽𐌰𐌹 𐌳𐌿 𐌲𐌹𐌱𐌰𐌽𐌰𐌼𐌼𐌰 𐌻𐌰𐌿𐌱𐌰.",
        "upload": "𐌿𐍃𐌷𐌻𐌰𐌸𐌰𐌽 𐍆𐌴𐌹𐌻𐌰𐌽𐍃",
        "randompage": "𐌸𐌿𐍃 𐌿𐌽𐌺𐌿𐌽𐌸𐍃 𐌻𐌰𐌿𐍆𐍃",
        "statistics": "𐍂𐌰𐌸𐌾𐍉𐌽𐍃",
        "brokenredirects-edit": "𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹",
-       "brokenredirects-delete": "(𐍄𐌰𐌹𐍂𐌰𐌽)",
+       "brokenredirects-delete": "𐍆𐍂𐌰𐌵𐌹𐍃𐍄𐌴𐌹",
        "nbytes": "$1 {{PLURAL:$1|𐌱𐌹𐍄|𐌱𐌰𐍄𐌰}}",
-       "ncategories": "$1 {{PLURAL:$1|ð\90\8cºð\90\8c¿ð\90\8c½ð\90\8c¾ð\90\8c°|ð\90\8cºð\90\8c¿ð\90\8c½ð\90\8c¾ð\90\8d\89ð\90\8d\83}}",
+       "ncategories": "$1 {{PLURAL:$1|ð\90\8cºð\90\8c¿ð\90\8c½ð\90\8c¹|ð\90\8cºð\90\8c¿ð\90\8c½ð\90\8c¾ð\90\8c°}}",
        "nlinks": "$1 {{PLURAL:$1|𐌲𐌰𐍅𐌹𐍃𐍃|𐌲𐌰𐍅𐌹𐍃𐍃𐌴𐌹𐍃}}",
        "nmembers": "$1 {{PLURAL:$1|𐌲𐌰𐌳𐌰𐌹𐌻𐌰|𐌲𐌰𐌳𐌰𐌹𐌻𐌰𐌽𐍃}}",
        "wantedpages": "𐌲𐌰𐌹𐍂𐌽𐌹𐌳𐌰𐌹 𐌻𐌰𐌿𐌱𐍉𐍃",
        "longpages": "𐌻𐌰𐌲𐌲𐌰𐌹 𐌻𐌰𐌿𐌱𐍉𐍃",
        "listusers": "𐍂𐌴𐌲𐌹𐍃𐍄𐍂𐌴𐍂𐌰𐌳𐌴 𐌱𐍂𐌿𐌺𐌾𐌰𐌽𐌳𐍃",
        "newpages": "𐌽𐌹𐌿𐌾𐌰𐌹 𐌻𐌰𐌿𐌱𐍉𐍃",
-       "move": "ð\90\8c½ð\90\8c°ð\90\8c¼ð\90\8c¾ð\90\8c°ð\90\8c½ ð\90\8c°ð\90\8d\86ð\90\8d\84ð\90\8d\82ð\90\8c°",
+       "move": "ð\90\8c¼ð\90\8c¹ð\90\8c¸ð\90\8d\83ð\90\8c°ð\90\8d\84ð\90\8c´ð\90\8c¹",
        "movethispage": "𐌼𐌹𐌸𐍃𐌰𐍄𐌴𐌹 𐌸𐌰𐌽𐌰 𐌻𐌰𐌿𐍆",
        "booksources": "𐌱𐍉𐌺𐌰𐌱𐍂𐌿𐌽𐌽𐌰𐌽𐍃",
        "booksources-search-legend": "𐍃𐍉𐌺𐌴𐌹 𐌱𐍉𐌺𐌰𐌱𐍂𐌿𐌽𐌽𐌰𐌽𐍃",
        "log": "𐌻𐍉𐌲𐌱𐍉𐌺𐍉𐍃",
        "all-logs-page": "𐌰𐌻𐌻𐌰 𐌻𐍉𐌲𐍉𐍃",
        "allpages": "𐌰𐌻𐌻𐌰𐌹 𐌻𐌰𐌿𐌱𐍉𐍃",
-       "nextpage": "ð\90\8c¹ð\90\8d\86ð\90\8d\84ð\90\8c¿ð\90\8c¼ð\90\8c° ð\90\8d\83ð\90\8c´ð\90\8c¹ð\90\8c³ð\90\8d\89 ($1)",
+       "nextpage": "ð\90\8c¹ð\90\8d\86ð\90\8d\84ð\90\8c¿ð\90\8c¼ð\90\8c° ð\90\8c»ð\90\8c°ð\90\8c¿ð\90\8d\86ð\90\8d\83 ($1)",
        "prevpage": "𐌰𐍆𐍄𐌿𐌼𐌹𐍃𐍄𐍃 𐌻𐌰𐌿𐍆𐍃 ($1)",
        "allarticles": "𐌰𐌻𐌻𐌰𐌹 𐌻𐌰𐌿𐌱𐍉𐍃",
        "allpagessubmit": "𐌲𐌰𐌲𐌲",
        "categories": "𐌺𐌿𐌽𐌾𐌰",
-       "linksearch-ns": "ð\90\8d\83ð\90\8c´ð\90\8c¹ð\90\8c³ð\90\8d\89ð\90\8d\86ð\90\8c´ð\90\8d\82ð\90\8c°:",
+       "linksearch-ns": "ð\90\8c½ð\90\8c°ð\90\8c¼ð\90\8c°ð\90\8d\82ð\90\8c¿ð\90\8c¼:",
        "emailuser": "{{GENDER: 𐍃𐌰𐌽𐌳𐌴𐌹 𐌴-𐌱𐍉𐌺𐍉𐍃 𐌳𐌿 𐌸𐌰𐌼𐌼𐌰 𐌱𐍂𐌿𐌺𐌾𐌰𐌽𐌳|𐍃𐌰𐌽𐌳𐌴𐌹 𐌴-𐌱𐍉𐌺𐍉𐍃 𐌳𐌿 𐌸𐌹𐌶𐌰𐌹 𐌱𐍂𐌿𐌺𐌾𐌰𐌽𐌳𐌾𐌰𐌹}}",
        "watchlist": "𐍅𐌹𐍄𐌰𐍅𐌹𐌺𐍉",
        "mywatchlist": "𐌻𐌰𐌹𐍃𐍄𐌰𐌻𐌴𐌹𐍃𐍄𐌰",
        "unwatch": "𐌽𐌹𐍅𐌰𐍂𐌰𐌽",
        "watchlist-details": "{{PLURAL:$1|$1 𐌻𐌰𐌿𐍆𐍃|$1 𐌻𐌰𐌿𐌱𐍉𐍃}} 𐌰𐌽𐌰 𐌸𐌴𐌹𐌽𐌰𐌹 𐍅𐌹𐍄𐌰𐍅𐌹𐌺𐍉𐌽, 𐌽𐌹 𐍃𐌿𐌽𐌳𐍂𐍉 𐍂𐌰𐌷𐌽𐌾𐌰𐌽𐌳𐌰 𐌲𐌰𐍅𐌰𐌿𐍂𐌳𐌾𐌰𐌻𐌰𐌿𐌱𐍉𐍃.",
        "watching": "Wita...",
-       "unwatching": "Niwita...",
+       "unwatching": "𐌿𐌽𐍅𐌹𐍄𐌰𐌽𐌳𐍉...",
        "created": "𐌲𐌰𐍃𐌺𐌰𐍀𐌾𐌰𐌽",
        "deletepage": "𐍆𐍂𐌰𐌵𐌹𐍃𐍄𐌴𐌹 𐌻𐌰𐌿𐌱𐌰",
-       "delete-legend": "ð\90\8d\84ð\90\8c°ð\90\8c¹ð\90\8d\82ð\90\8c°ð\90\8c½",
+       "delete-legend": "ð\90\8d\86ð\90\8d\82ð\90\8c°ð\90\8cµð\90\8c¹ð\90\8d\83ð\90\8d\84ð\90\8c´ð\90\8c¹",
        "actioncomplete": "𐍅𐌰𐍃𐌿𐌷 𐌹𐍄𐌰 𐌲𐌰𐌿𐍃𐍄𐌹𐌿𐌷𐌰𐌽",
        "dellogpage": "𐍄𐌰𐌹𐍂𐌰 𐌰𐌹𐍂𐍅𐌱𐍉𐌺𐌰",
        "deleteotherreason": "𐌰𐌽𐌸𐌰𐍂/𐌼𐌰𐌹𐍃 𐌼𐌹𐍄𐍉𐌽𐍃:",
        "prot_1movedto2": "[[$1]] 𐌼𐌹𐌸𐍃𐌰𐍄𐌹𐌸 𐌳𐌿 [[$2]]",
        "protect-level-sysop": "𐌰𐌽𐌳𐌻𐌴𐍄𐌹𐌸 𐌸𐌰𐍄𐌰𐌹𐌽𐌴𐌹 𐍂𐌴𐌹𐌺𐍃",
        "protect-expiring": "𐌿𐍃𐍄𐌹𐌿𐌷𐌹𐌸 $1 (UTC)",
-       "restriction-type": "Freihals:",
+       "restriction-type": "𐌰𐌽𐌳𐌻𐌴𐍄",
        "restriction-edit": "𐌹𐌽𐌼𐌰𐌹𐌳𐌴𐌹",
-       "restriction-move": "ð\90\8d\83ð\90\8cºð\90\8c¹ð\90\8c¿ð\90\8c±ð\90\8c°ð\90\8c½",
+       "restriction-move": "ð\90\8c¼ð\90\8c¹ð\90\8c¸ð\90\8d\83ð\90\8c°ð\90\8d\84ð\90\8c´ð\90\8c¹",
        "undeletebtn": "𐌰𐍆𐍄𐍂𐌰 𐌲𐌰𐌱𐍉𐍄𐌾𐌰𐌽",
        "undeletelink": "𐍃𐌰𐌹𐍈𐌰𐌽/𐌰𐍆𐍄𐍂𐌰𐌲𐌰𐍃𐌰𐍄𐌾𐌰𐌽",
        "undeleteviewlink": "𐍃𐌰𐌹𐍈𐌹𐍃",
        "blocklogentry": "𐌰𐍆𐌳𐍂𐌰𐌿𐍃𐌹𐌸 [[$1]] 𐍆𐌰𐌿𐍂 $2 $3",
        "newtitle": "𐌽𐌹𐌿𐌾𐌹 𐌿𐍆𐌰𐍂𐌼𐌴𐌻𐌹:",
        "move-watch": "𐌰𐍄𐍅𐌹𐍄 𐌱𐍂𐌿𐌽𐌽𐌰𐌻𐌰𐌿𐌱𐌰 𐌾𐌰𐌷 𐌼𐌿𐌽𐌳𐍂𐌴𐌹𐌻𐌰𐌿𐌱𐌰",
-       "movepagebtn": "ð\90\8d\83ð\90\8cºð\90\8c¹ð\90\8c¿ð\90\8c±ð\90\8c° ð\90\8d\83ð\90\8c´ð\90\8c¹ð\90\8c³ð\90\8d\89",
+       "movepagebtn": "ð\90\8c¼ð\90\8c¹ð\90\8c¸ð\90\8d\83ð\90\8c°ð\90\8d\84ð\90\8c´ð\90\8c¹ ð\90\8c»ð\90\8c°ð\90\8c¿ð\90\8d\86",
        "movelogpage": "𐌼𐌹𐌸𐍃𐌰𐍄𐌴𐌹 𐌲𐌰𐍆𐌰𐍃𐍄𐌰𐌹𐌽",
        "movereason": "𐍆𐌰𐌹𐍂𐌹𐌽𐌰:",
        "revertmove": "𐍂𐌰𐌹𐌳𐌾𐌰𐌽",
        "export": "𐌿𐍄𐌱𐌰𐌹𐍂 𐌻𐌰𐌿𐌱𐌰𐌽𐍃",
+       "allmessages-filter-translate": "𐌲𐌰𐍃𐌺𐌴𐌹𐍂𐌴𐌹",
        "thumbnail-more": "\n𐌼𐌹𐌺𐌹𐌻𐌴𐌹",
        "tooltip-pt-userpage": "{{GENDER:|Your user}} 𐌻𐌰𐌿𐍆𐍃",
        "tooltip-pt-mytalk": "{{GENDER:|𐌸𐌴𐌹𐌽𐍃}} 𐌻𐌰𐌿𐍆𐍃 𐌲𐌰𐍅𐌰𐌿𐍂𐌳𐌾𐌹𐍃",
        "table_pager_limit_submit": "Affgaggan",
        "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|𐌲𐌰𐍅𐌰𐌿𐍂𐌳𐌾𐌰]])",
        "version-other": "Anþar",
+       "version-poweredby-translators": "translatewiki.net 𐌲𐌰𐍃𐌺𐌴𐌹𐍂𐌾𐌰𐌽𐍃",
        "specialpages": "𐌿𐍃𐍃𐌹𐌽𐌳𐌰𐌹 𐌻𐌰𐌿𐌱𐍉𐍃",
        "tag-filter": "[[Special:Tags|𐍄𐌰𐌹𐌺𐌽𐍉𐍃]] 𐍆𐌹𐌻𐌷𐌰",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|𐍃𐍉𐌺𐌴𐌹𐌽𐌹𐍅𐌰𐌿𐍂𐌳|𐍃𐍉𐌺𐌴𐌹𐌽𐌹𐍅𐌰𐌿𐍂𐌳𐌰}}]]: $2)",
        "tags-source-header": "𐌱𐍂𐌿𐌽𐌽𐌰",
-       "tags-actions-header": "ð\90\8c³ð\90\8c´ð\90\8c³ð\90\8c´ð\90\8c¹ð\90\8d\83",
+       "tags-actions-header": "ð\90\8d\84ð\90\8d\89ð\90\8c¾ð\90\8c°",
        "tags-source-none": "𐌽𐌹 𐌾𐌿 𐌱𐍂𐌿𐌺𐌾𐌰𐌳𐌰",
        "tags-delete": "𐌿𐍃𐌽𐌹𐌼",
        "tags-activate": "𐌲𐌰𐌵𐌹𐌿𐌴𐌹",
index 489479b..7639217 100644 (file)
@@ -21,7 +21,8 @@
                        "80686",
                        "아라",
                        "Macofe",
-                       "Xð"
+                       "Xð",
+                       "Terfili"
                ]
        },
        "tog-underline": "Links unterstryche:",
        "yourpasswordagain": "Passwort no mol yygee:",
        "createacct-yourpasswordagain": "Passwort bstetige",
        "createacct-yourpasswordagain-ph": "Gib s Passwort nomol yy",
-       "remembermypassword": "Uf däm Computer duurhaft aamälde (Maximal fir $1 {{PLURAL:$1|Tag|Täg}})",
        "userlogin-remembermypassword": "Aagmäldet blyybe",
        "userlogin-signwithsecure": "Sicheri Verbindig bruuche",
        "yourdomainname": "Dyyni Domäne",
        "passwordreset-emailtext-user": "Dr Benutzer $1 bi {{SITENAME}} het e Zrucksetzig vu Dym Passwort bi {{SITENAME}} aagforderet ($4). \n\n{{PLURAL:$3|Des Benutzerkonto isch|Die Benutzerkonte sin}} mit däre E-Mail-Adräss verchnipft: \n\n$2 \n\n{{PLURAL:$3|Des temporär Passwort lauft|Die temporäre Passwerter laufe}} in {{PLURAL:$5|eim Tag|$5 Täg}} ab.\nDu sottsch di aamälden un e nej Passwort vergee. Wänn eber ander die Aafrog gstellt het oder Du di wider an Dyy alt Passwort chasch erinnere un s nimi wettsch ändere, chasch die Nochricht ignorieren un alsfurt Dyy alt Passwort bruche.",
        "passwordreset-emailelement": "Benutzername: \n$1\n\nTemporär Passwort: \n$2",
        "passwordreset-emailsentemail": "We das di bestätigti E-Mail-Adrässen vo dym Wiki-Konto isch, de wird es E-Mail verschickt, für ds Passwort zrüggzsetze.",
-       "passwordreset-emailsent-capture": "E Passwort-Zrucksetzigs-Mail isch vergschickt worde, un isch unte aazeigt.",
-       "passwordreset-emailerror-capture": "Die unten angezeigte Passwortzrucksetzigsmail, wu unten aazeigt wird, isch generiert wore, aber dr Versand an {{GENDER:$2|dr Benutzer|d Benutzeri}} het nit funktioniert: $1",
        "changeemail": "E-Mail-Adrässen änderen oder lösche",
        "changeemail-header": "Füll das Formular uus, für dyni E-Mail-Adrässe z ändere. We du möchtisch, das dys Wiki-Konto nümm mit eren E-Mail-Adrässe verbunden isch, de chasch ds Fäld für’ne nöüi E-Mail-Adrässe läär la und ds Formular abschicke.",
-       "changeemail-passwordrequired": "Du muesch dys Passwort agä, für d Änderig z bestätige.",
        "changeemail-no-info": "Du muesch aagmolde sy zum uff die Syte diräkt zuegryfe z chönne.",
        "changeemail-oldemail": "Aktuelli E-Mail-Adräss",
        "changeemail-newemail": "Nöii E-Mail-Adräss:",
        "newarticle": "(Nej)",
        "newarticletext": "Du bisch eme Link nogange zuen ere Syte, wu s nid git.\nZum die Syte aalege, chasch do in däm Chaschte unte aafange schrybe (lueg [$1 Hilfe] fir meh Informatione).\nWänn do nid hesch welle aane goh, no druck in Dyynem Browser uf '''Zruck'''.",
        "anontalkpagetext": "----''Des isch e Diskussionssyte vun eme anonyme Benutzer, wu kei Zuegang aagleit het oder wu ne nit bruucht. Sälleweg mien mir di numerisch IP-Adräss bruuche zum ihn oder si z identifiziere. So ne IP-Adräss cha au vu mehrere Benutzer teilt wäre. Wenn Du ne anonyme Benutzer bisch un s Gfiel hesch, ass do irrelevanti Kommentar an di grichtet wäre, derno [[Special:CreateAccount|leg e Konto aa]] oder [[Special:UserLogin|mäld di aa]] zum in Zuekumft Verwirrige mit andere anonyme Benutzer z vermyyde.''",
-       "noarticletext": "Uf däre Syte het s no kei Täxt. Du chasch uf andere Syte [[Special:Search/{{PAGENAME}}|dä Yytrag sueche]], <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} dr Logbuechyytrag sueche, wo dezue ghert],\noder [{{fullurl:{{FULLPAGENAME}}|action=edit}} die Syte bearbeite]</span>.",
+       "noarticletext": "Uf däre Syte het s no kei Täxt. \nDu chasch uf andere Syte [[Special:Search/{{PAGENAME}}|dä Yytrag sueche]], <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} dr Logbuechyytrag sueche, wo dezue ghert],\noder [{{fullurl:{{FULLPAGENAME}}|action=edit}} die Syte erstelle]</span>.",
        "noarticletext-nopermission": "In däre Syte het s zur Zyt no kei Text.\nDu chasch dää Titel uf andre Syte [[Special:Search/{{PAGENAME}}|sueche]]\noder <span class=\"plainlinks\">in dr zuegherige [{{fullurl:{{#special:Log}}|page={{FULLPAGENAMEE}}}} Logbiecher sueche].</span> Du derfsch aber die Syte nit aalege.",
        "missing-revision": "D Version $1 vu dr Syte mit Name „{{FULLPAGENAME}}“ git s nit.\n\nDää Fähler chunnt normalerwyys dur e veraltete Link zue dr Versionsgschicht vun ere Syte, wu in dr Zwischezyt glescht woren isch.\nEinzelheite chasch im [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} Lesch-Logbuech] bschaue.",
        "userpage-userdoesnotexist": "S Benutzerkonto „<nowiki>$1</nowiki>“ git s nit. Bitte prief, eb Du die Syte wirkli wit aalege/bearbeite.",
        "undo-nochange": "Schyns isch die Bearbeitig scho rugggängig gmacht wore.",
        "undo-summary": "D Änderig $1 vu [[Special:Contributions/$2|$2]] ([[User talk:$2|Diskussion]]) isch ruckgängig gmacht wore.",
        "undo-summary-username-hidden": "Änderig $1 vun eme versteckte Benutzer ruckgängig gmacht.",
-       "cantcreateaccounttitle": "Benutzerkonto cha nid aagleit wäre.",
        "cantcreateaccount-text": "S Aalege vu me Benutzerkonto vu dr IP-Adräss '''($1)''' isch dur [[User:$3|$3]] gsperrt wore.\n\nGrund vu dr Sperri: ''$2''",
        "cantcreateaccount-range-text": "S Aalege vu Benutzerkonte vu IP-Adrässen im Berych <strong>$1</strong>, wu s Dyni IP-Adräss (<strong>$4</strong>) din het, isch vu [[User:$3|$3]] gsperrt wore.\n\nDr Grund, wu vu $3 aagee woren isch: <em>$2</em>",
        "viewpagelogs": "Logbüecher für die Syten azeige",
        "contributions": "{{GENDER:$1|Benutzer-Byträg}}",
        "contributions-title": "Benutzerbyytreg vu „$1“",
        "mycontris": "Myyni Byyträg",
+       "anoncontribs": "Byyträg",
        "contribsub2": "Vu {{GENDER:$3|$1}} ($2)",
        "contributions-userdoesnotexist": "Ds Benutzerkonto «$1» isch nid registriert.",
        "nocontribs": "S sin keini Benutzerbyytreg mit däne Kriterie gfunde wore.",
        "javascripttest": "JavaScript-Tescht",
        "javascripttest-pagetext-unknownaction": "Unbekannti Aktion «$1».",
        "javascripttest-qunit-intro": "Lueg d [$1 Dokumentation zue Tescht] uf mediawiki.org",
-       "tooltip-pt-userpage": "Dyyni Benutzersyte",
+       "tooltip-pt-userpage": "{{GENDER:|Dyyni}} Benutzersyte",
        "tooltip-pt-anonuserpage": "D Benutzersyte vo der IP-Adress wo du mit schaffsch",
-       "tooltip-pt-mytalk": "Dyyni Diskussionssyte",
+       "tooltip-pt-mytalk": "{{GENDER:|Dyyni}}  Diskussionssyte",
        "tooltip-pt-anontalk": "Diskussione über Änderige vo dere IP-Adress",
-       "tooltip-pt-preferences": "Myni Ystellige",
+       "tooltip-pt-preferences": "{{GENDER:|Dyni}} Ystellige",
        "tooltip-pt-watchlist": "Lischte vo de beobachtete Syte.",
-       "tooltip-pt-mycontris": "Lischt vu Dyyne Byyträg",
+       "tooltip-pt-mycontris": "E Lischt vu {{GENDER:|Dyyne}} Byyträg",
        "tooltip-pt-login": "Aamälde",
        "tooltip-pt-logout": "Abmälde",
        "tooltip-pt-createaccount": "Du chasch gärn e Benutzerkonto aalege un Di aamälde. Du muesch s aber nit",
        "tooltip-t-recentchangeslinked": "Letschti Änderige vo de Syte, wo vo do verlinkt sin",
        "tooltip-feed-rss": "RSS-Feed für selli Syte",
        "tooltip-feed-atom": "Atom-Feed für selli Syte",
-       "tooltip-t-contributions": "Lischte vo de Byträg vo däm Benutzer",
+       "tooltip-t-contributions": "E Lischt vo de Byträg vo {{GENDER:$1|däm Benutzer}}",
        "tooltip-t-emailuser": "Schick däm Benutzer e E-Bost",
        "tooltip-t-info": "Meh Informationen über die Syte",
        "tooltip-t-upload": "Dateien ufelade",
        "htmlform-title-not-exists": "$1 git’s nid.",
        "htmlform-user-not-exists": "<strong>$1</strong> git’s nid.",
        "htmlform-user-not-valid": "<strong>$1</strong> isch ke gültige Name.",
-       "sqlite-has-fts": "$1 mit Unterstitzig vu dr Volltextsuechi",
-       "sqlite-no-fts": "$1 ohni Unterstitzig vu dr Volltextsuechi",
        "logentry-delete-delete": "{{GENDER:$2|Dr|D|}} $1 het d Syte $3 glöscht",
        "logentry-delete-restore": "{{GENDER:$2|Der $1|D $1|$1}} het d Syte $3 wider härgstellt",
        "logentry-delete-event": "{{GENDER:$2|Der $1|D $1|$1}} het d Sichtbarkeit {{PLURAL:$5|vumene Logbuechyytrag|vo $5 Logbuechyyträg}} gänderet uff $3: $4",
        "mw-widgets-dateinput-placeholder-month": "JJJJ-MM",
        "mw-widgets-titleinput-description-new-page": "d Syte git’s no nid",
        "mw-widgets-titleinput-description-redirect": "Wyterleitig uf $1",
-       "api-error-blacklisted": "Bitte due en andre, ussagechräftigere Titel usswääle.",
        "randomrootpage": "Zuefelligi Stammsyte"
 }
index d6fedba..d9da88d 100644 (file)
        "minoredit": "આ એક નાનો સુધારો છે",
        "watchthis": "આ પાનાને ધ્યાનમાં રાખો",
        "savearticle": "પાનું સાચવો",
+       "savechanges": "પરિવર્તન સાચવો",
        "publishpage": "પાનું પ્રકાશિત કરો",
        "publishchanges": "ફેરફારો પ્રકાશિત કરો",
        "preview": "પૂર્વાવલોકન",
        "searchprofile-advanced-tooltip": "સ્થાનીય નામસ્થળોમાં શોધો",
        "search-result-size": "$1 ({{PLURAL:$2|૧ શબ્દ|$2 શબ્દો}})",
        "search-result-category-size": "{{PLURAL:$1|1 સભ્ય|$1 સભ્યો}} ({{PLURAL:$2|1 ઉપ શ્રેણી|$2 ઉપ શ્રેણીઓ}}, {{PLURAL:$3|1 ફાઇલ|$3 ફાઇલો}})",
-       "search-redirect": "(અન્યત્ર પ્રસ્થાન $1)",
+       "search-redirect": "($1થી વાળેલું)",
        "search-section": "(વિભાગ $1)",
        "search-category": "(શ્રેણી $1)",
        "search-suggest": "શું તમે $1 કહેવા માંગો છો?",
        "file-thumbnail-no": "ફાઇલનું નામ <strong>$1</strong>થી શરૂ થાય છે.\nલાગે છે કે આ ઘટાડેલા કદનું ચિત્ર  ''(thumbnail)'' છે..\nજો તમારી સાથે પૂર્ણ ઘનત્વ ધરાવતી ચિત્રની ફાઇલ હોય તો જ આ ફાઇલ ચડાવશો, અન્યથા ફાઇલનું નામ બદલશો.",
        "fileexists-forbidden": "આ નામની ફાઇલ પહેલેથી મોજુદ છે અને તેના ઉપર લેખન કરી શકાશે નહી.\nતેમ છતાં પણ તમે ફાઇલ ચડાવવા માંગતા હોવ તો ફાઇલનું નામ બદલો અને નવા નામે ફરીથી ચડાવો.\n[[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "સર્વસામાન્ય ફાઇલ સંગ્રહમાં આ નામની ફાઇલ મોજુદ છે.\nતેમ છતાં પણ તમે ફાઇલ ચડાવવા માંગતા હોવ તો ફાઇલનું નામ બદલો અને નવા નામે ફરીથી ચડાવો.\n[[File:$1|thumb|center|$1]]",
-       "file-exists-duplicate": "આ ફાઇલ {{PLURAL:$1|ફાઇલ|ફાઇલો}} ની પ્રત છે.",
+       "file-exists-duplicate": "આ ફાઇલ નીચેની {{PLURAL:$1|ફાઇલ|ફાઇલો}}ની નકલ છે:",
        "file-deleted-duplicate": "ફાઇલ ([[:$1]]) ને સમાન ફાઇલ પહેલાં ભૂંસાડી દેવાઇ છે.\nઆ ફાઇલને ચડાવત પહેલાં હટાવ ઇતિહાસ ચકાસી લો.",
        "uploadwarning": "ફાઇલ ચઢાવ ચેતવણી",
        "uploadwarning-text": "કૃપયા ફાઈલ સંબધી વર્ણન સુધારો અને ફરી પ્રયત્ન કરો",
        "emailsubject": "વિષય:",
        "emailmessage": "સંદેશો:",
        "emailsend": "મોકલો",
-       "emailccme": "મારા ઈ-મેલની પ્રત મને મોકલો",
+       "emailccme": "મારા ઈમેલની પ્રત મને મોકલો",
        "emailccsubject": "$1ને તમે મોકલેલા સંદેશાની પ્રત: $2",
        "emailsent": "ઈ-મેલ મોકલી દેવાયો",
        "emailsenttext": "તમારો ઈ-મેલ મોકલી દેવાયો છે",
        "rollbacklinkcount-morethan": "$1 {{PLURAL:$1|ફેરફાર|ફેરફારો}} કરતાં ઓછું પાછું લાવો",
        "rollbackfailed": "ઉલટાવવું નિષ્ફળ",
        "cantrollback": "આ ફેરફારો ઉલટાવી નહી શકાય\nછેલ્લો ફેરફાર આ પાના ના રચયિતા દ્વારા જ થયો હતો",
-       "alreadyrolled": "[[User:$2|$2]] ([[User talk:$2|talk]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) દ્વારા થયેલ[[:$1]]ના  ફેરફારો ઉલટાવી ન શકાયા;\nકોઇક અન્ય સભ્યએ આ પાનાપર ફેરફાર કરી દીધા છે.\n\nઆ પાના પર ના છેલ્લા ફેરફારો [[User:$3|$3]] ([[User talk:$3|talk]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]) દ્વારા કરવામાં આવ્યાં હતાં.",
+       "alreadyrolled": "[[User:$2|$2]] ([[User talk:$2|talk]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) દ્વારા થયેલ [[:$1]]ના ફેરફારો ઉલટાવી ન શકાયા;\nકોઇક અન્ય સભ્યે આ પાના પર ફેરફાર કર્યો છે અથવા ફેરફારો ઉલ્ટાવ્યા છે.\n\nઆ પાના પરના છેલ્લા ફેરફારો [[User:$3|$3]] ([[User talk:$3|talk]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]) દ્વારા કરવામાં આવ્યા હતા.",
        "editcomment": "ફેરફાર સારાંશ હતી: <em>$1</em>.",
        "revertpage": "[[Special:Contributions/$2|$2]] ([[User talk:$2|talk]]) દ્વારા કરેલ ફેરફારોને  [[User:$1|$1]] દ્વારા કરેલા છેલ્લા સુધારા સુધી ઉલટાવાયા.",
        "revertpage-nouser": "ગુપ્ત સભ્ય વડે કરાયેલ ફેરફારને {{GENDER:$1|[[User:$1|$1]]}} વડે કરેલ છેલ્લા પુનરાવર્તન પર પાછા લઇ જવાયું.",
        "articleexists": "આ નામનું પાનું અસ્તિત્વમાં છે, અથવાતો તમે પસંદ કરેલું નામ અસ્વિકાર્ય છો.\nકૃપા કરી અન્ય નામ પસંદ કરો.",
        "cantmove-titleprotected": "આ સ્થાને તમે પાનું નહીં હટાવી શકો કેમ કે નવું શીર્ષક રચના કરવા પહેલેથી આરક્ષીત છે",
        "movetalk": "સંલગ્ન ચર્ચાનું પાનું પણ ખસેડો",
-       "move-subpages": "($1 સુધી) ઉપ-પાના હટાવાયા",
+       "move-subpages": "પેટાપાનાં પણ ખસેડો ($1 સુધીના)",
        "move-talk-subpages": "ઉપપાનને ચર્ચાના પાના પર ખસેડો ( $1 સુધે)",
        "movepage-page-exists": "પાનું  $1 પહેલેથી અસ્તિત્વમાં છે તેના પર સ્વયં ચલિત રીતે નવું લેખન ન થાય.",
        "movepage-page-moved": "પાના $1 ને $2 પર ખસેડાયું",
        "importuploaderrortemp": "આયાતી ફાઈલ ચઢાવવું અસફળ.\nહંગામી ફોલ્ડરા ગાયબ છે.",
        "import-parse-failure": "XML આયાત પદચ્છેદ અસફળ",
        "import-noarticle": "આયાત કરવા માટે કોઇ પાનું નથી!",
-       "import-nonewrevisions": "બધા àª«à«\87રફરà«\8b àªªàª¹à«\87લા àª\86યાત àª\95રાયા àª\9bà«\87.",
+       "import-nonewrevisions": "àª\95à«\8bàª\87 àª«à«\87રફારà«\8b àª\86યાત àª\95રાયા àª¨àª¥à«\80 (બધાàª\82 àªªàª¹à«\87લà«\87થà«\80 àª¹àª¾àª\9cર àª¹àª¤àª¾, àª\85થવા àª\95à«\8dષતિàª\93નà«\87 àª\95ારણà«\87 àª\85વàª\97ણાયા àª\9bà«\87).",
        "xml-error-string": "$1  લીટી ક્ર્માંક $2, સ્તંભ  $3 (બાઇટ  $4): $5",
        "import-upload": "XML માહિતી ચઢાવો",
        "import-token-mismatch": "સત્ર સમાપ્ત\nફરી પ્રયત્ન કરો",
        "svg-long-desc": "SVG ફાઇલ, માત્ર $1 × $2 પીક્સલ, ફાઇલનું કદ: $3",
        "svg-long-error": "અયોગ્ય SVG ફાઇલ: $1",
        "show-big-image": "મૂળભુત ફાઇલ",
-       "show-big-image-preview": "àª\86 àª®àª¹àª¾àªµàª°àª¾ àª¦à«\8dરશà«\8dયનà«\81àª\82 àª®àª¾àªª: $1.",
+       "show-big-image-preview": "àª\86 àª\9dલàª\95àª\9aિતà«\8dરનà«\81àª\82 àª\95દ: $1.",
        "show-big-image-other": "અન્ય {{PLURAL:$2|આવર્તન|આવર્તનો}}: $1.",
        "show-big-image-size": "$1 × $2 પિક્સેલ",
        "file-info-gif-looped": "આવર્તન  (લુપ)",
        "htmlform-select-badoption": "તમે બતાવેલ વિકલ્પ અવૈધ છે",
        "htmlform-int-invalid": "તમે લખેલ વિકલ્પ અંક નથી",
        "htmlform-float-invalid": "તમે લખેલ વિકલ્પ અંક નથી",
-       "htmlform-int-toolow": "$1 આ કિંમત આ ન્યૂનતમ કિંમત છે",
+       "htmlform-int-toolow": "મુલ્ય જે તમે દર્શાવ્યું છે તે ન્યૂનતમ મુલ્ય $1 કરતાં ઓછું છે.",
        "htmlform-int-toohigh": "તમે પુરી પાડેલ માહિતી મહત્તમ $1થી વધુ છે",
        "htmlform-required": "આ કિઁમત જોઈએ છે",
        "htmlform-submit": "જમા કરો",
        "htmlform-chosen-placeholder": "વિકલ્પ પસંદ કરો",
        "htmlform-cloner-create": "વધુ ઉમેરો",
        "htmlform-cloner-delete": "હટાવો",
-       "sqlite-has-fts": "$1 પૂર્ણ શબ્દ શોધ સહીત",
-       "sqlite-no-fts": "$1 પૂર્ણ શબ્દ  શોધ વિકલ્પ વગર",
        "logentry-delete-delete": "$1 દ્વારા પાનું $3 {{GENDER:$2|દૂર કરવામાં આવ્યું}}",
        "logentry-delete-restore": "$1 {{GENDER:$2|પુનઃસંગ્રહ}} પાનું $3",
        "logentry-delete-event": "$1 એ {{PLURAL:$5|લૉગ ઘટના|$5 લૉગ ઘટનાઓ}} ની દ્રશ્યતા $3 પર {{GENDER:$2|બદલેલ}} છે: $4",
        "feedback-submit": "જમા કરો",
        "feedback-thanks": "આભર! તમારા પ્રતિભાવને \"[$2 $1]\" પાના પર મુકાયા છે.",
        "feedback-thanks-title": "આભાર !",
-       "searchsuggest-search": "શોધો",
+       "searchsuggest-search": "{{SITENAME}} શોધો",
        "searchsuggest-containing": "આ શબ્દ ધરાવતા...",
        "api-error-badaccess-groups": "આ વિકિ પર ફાઈલ ચઢાવવાની પરવાનગી તમને નથી.",
        "api-error-badtoken": "આંતરીક ત્રુટી: ખરાબ ટોકન",
index f1cf530..93ba9a2 100644 (file)
                ]
        },
        "tog-underline": "Lièn-chiap kâ-tái sien:",
-       "tog-hideminor": "Yún-chhông chui-khiûn kiên-kói tú ke se-mì phiên-siá",
-       "tog-hidepatrolled": "Yún-chhông chui-khiûn kiên-kói tú sùn-chhà ko ke phiên-siá",
-       "tog-newpageshidepatrolled": "Yún-chhông sîn ya̍p-mien chhîn-tân tú sùn-chhà ko ke ya̍p-mien",
+       "tog-hideminor": "Ám-hí chui-khiûn kiên-kói tú ke se-mì phiên-siá",
+       "tog-hidepatrolled": "Ám-hí chui-khiûn kiên-kói tú sùn-chhà ko ke phiên-siá",
+       "tog-newpageshidepatrolled": "Ám-hí sîn ya̍p-mien chhîn-tân tú sùn-chhà ko ke ya̍p-mien",
        "tog-extendwatchlist": "Chán-khôi kâm-sṳ lie̍t-péu lòi hién-sṳ só-yû kiên-kói, m̀  tân-chhiang he chui-khiûn ke",
        "tog-usenewrc": "Chhai chui-khiûn kiên-kói lâu kâm-sṳ lie̍t-péu tú cháng-ha̍p thùng yit-ya̍p ke siû-kói",
-       "tog-numberheadings": "Phiêu-thì chhṳ-thûng phiên-ho",
+       "tog-numberheadings": "Phiêu-thì chhṳ-thung phiên-ho",
        "tog-showtoolbar": "Chán-sṳ phiên-siá kûng-khí-làn",
        "tog-editondblclick": "Sûng-khim phiên-siá ya̍p-mien",
        "tog-editsectiononrightclick": "Yún-hí yu-khim phiêu-thì phiên-siá thon-lo̍k",
        "october-date": "10-ngie̍t $1-ngit",
        "november-date": "11-ngie̍t $1-ngit",
        "december-date": "12-ngie̍t $1-ngit",
-       "pagecategories": "{{PLURAL:$1|Category|$1-chak fûn-lui}}",
+       "pagecategories": "{{PLURAL:$1|Fûn-lui}}",
        "category_header": "\"$1\" fûn-lui tú ke ya̍p-mien",
        "subcategories": "Chṳ́ fûn-lui",
        "category-media-header": "\"$1\" fûn-lui tú ke mòi-thí",
        "category-empty": "<em>Liá-chak fûn-lui muk-chhièn hàn-mò pâu-hàm ya̍p-mien fe̍t-chá mòi-thí vùn-khien.</em>",
-       "hidden-categories": "$1-chak yún-chhông fûn-lui",
-       "hidden-category-category": "Yún-chhông fûn-lui",
+       "hidden-categories": "{{PLURAL:$1|Ám-hí ke fûn-lui}}",
+       "hidden-category-category": "Ám-hí ke fûn-lui",
        "category-subcat-count": "{{PLURAL:$2|Liá-chak fûn-lui yû hâ-poi yit-chak chṳ́ fûn-lui.|Liá-chak fûn-lui yû $2-chak chṳ́ fûn-lui, hâ-poi lie̍t-chhut yí $1-chak.}}",
        "category-subcat-count-limited": "邇隻分類有下背$1隻子分類。",
        "category-article-count": "{{PLURAL:$2|本分類有下背一隻頁面。|本分類有$2隻頁面,下背列出矣$1隻。}}",
        "editsectionhint": "Phiên-siá chông-chiet: $1",
        "toc": "Muk-liu̍k",
        "showtoc": "Chán-sṳ",
-       "hidetoc": "yún-chhông",
+       "hidetoc": "ám",
        "collapsible-collapse": "Chap-thia̍p",
        "collapsible-expand": "Chán-khôi",
        "thisisdeleted": "Chhà-khon fe̍t-chá fî-fu̍k $1?",
        "viewsource-title": "Khon $1 ke ngièn-sṳ́-mâ",
        "actionthrottled": "動作已經壓制",
        "actionthrottledtext": "基於反垃圾嘅考量,短時間內毋可以多次重複某操作,今下汝已經超過邇隻上限。\n請在數分鐘後再嘗試。",
-       "protectedpagetext": "邇隻頁面已經分人保護以防止編輯或其他操作。",
-       "viewsourcetext": "汝做得查看並複製本頁面嘅源碼:",
+       "protectedpagetext": "Liá ya̍p yí-kîn pûn ngìn pó-fu, kim-chṳ́ siû-kói fe̍t-chá khì-thâ chhâu-chok.",
+       "viewsourcetext": "Ngì cho-tet khon fe̍t-chá copy liá ya̍p ke ngièn-sṳ́-mâ:",
        "viewyourtext": "汝可以查看並複製'''汝對邇隻頁面作出編寫後'''嘅源代碼:",
        "protectedinterface": "邇頁提供此wiki軟體嘅介面文字,其已畀保護以防止惡意修改。\n假使想修改所有wiki嘅翻譯,請到[https://translatewiki.net/ translatewiki.net]上嘅MediaWiki本地化計畫。",
        "editinginterface": "'''警告:'''汝今下編寫緊嘅頁面係用於提供軟件嘅界面文字。\n改變邇頁將影響其他在邇隻wiki上嘅用戶界面外觀。\n假使愛修改所有wiki嘅翻譯,請到[https://translatewiki.net/ translatewiki.net]上嘅MediaWiki本地化計劃。",
        "yourpasswordagain": "Chai yit-pái sû-ngi̍p me̍t-ma:",
        "createacct-yourpasswordagain": "Khok-ngin me̍t-ma",
        "createacct-yourpasswordagain-ph": "Chai yit-pái sû-ngi̍p me̍t-ma",
-       "remembermypassword": "Chhai liá-chak liù-lám-hi sông ki-hâ ngài-ke tên-ngi̍p chhong-thai (chui-chhòng $1-ngit)",
        "userlogin-remembermypassword": "Pó-chhṳ̀ ngài-ke tên-ngi̍p chhong-thai",
        "userlogin-signwithsecure": "使用安全連線",
        "yourdomainname": "Ngì ke vet-miàng:",
        "password-change-forbidden": "汝做毋得更改本wiki上嘅密碼。",
-       "externaldberror": "Liá khó-nèn he yù-yî ngiam-chṳn sú-kí-khù chhâ-chho fe̍t-chá ngì fûn hì-thúng kim-chṳ́ kiên-sîn ngì ke ngoi-phu chòng-ho.",
+       "externaldberror": "Liá khó-nèn he yù-yî ngiam-chṳn sú-kí-khù chhâ-chho fe̍t-chá ngì fûn hì-thúng kim-chṳ́ kiên-sîn ngì ke ngoi-phu fu-thèu.",
        "login": "Tên-ngi̍p",
-       "nav-login-createaccount": "Tên-ngi̍p / kien-li̍p sîn chong-ho",
-       "userlogin": "Tên-ngi̍p / kien-li̍p sîn chong-ho",
+       "nav-login-createaccount": "Tên-ngi̍p / khôi sîn fu-thèu",
+       "userlogin": "Tên-ngi̍p / khôi sîn fu-thèu",
        "userloginnocreate": "Tên-ngi̍p",
        "logout": "Tên-chhut",
        "userlogout": "Tên-chhut",
        "notloggedin": "Hàn-mò tên-ngi̍p",
-       "userlogin-noaccount": "Hàn-mò chong-fu he mò?",
+       "userlogin-noaccount": "Hàn-mò fu-thèu he mò?",
        "userlogin-joinproject": "Chhâm-yi  {{SITENAME}}",
-       "nologin": "Hàn-mò chong-ho he-mò? $1.",
-       "nologinlink": "Kien-li̍p chong-ho",
-       "createaccount": "Kien-li̍p chong-ho",
-       "gotaccount": "Yí-kîn yúng-yû chong-ho he-mò? $1.",
+       "nologin": "Hàn-mò fu-thèu he-mò? $1.",
+       "nologinlink": "Khôi fu-thèu",
+       "createaccount": "Khôi fu-thèu",
+       "gotaccount": "Yí-kîn yû fu-thèu he-mò? $1.",
        "gotaccountlink": "Tên-ngi̍p",
        "userlogin-resetlink": "M̀-ki-tet ngì-ke tên-ngi̍p sin-sit?",
        "userlogin-resetpassword-link": "Thiâm mong-ki ngì ke me̍t-ma?",
        "createaccountreason": "Ngièn-yîn:",
        "createacct-reason": "Ngièn-yîn:",
        "createacct-reason-ph": "汝做麽嘅愛創建另一隻帳號",
-       "createacct-submit": "Kien-li̍p chong-ho",
+       "createacct-submit": "Khôi fu-thèu",
        "createacct-benefit-heading": "{{SITENAME}} he yù lâu Ngì khiung-ngióng ke ngìn kien-li̍p.",
        "createacct-benefit-body1": "$1-chhṳ phiên-siá",
        "createacct-benefit-body2": "$1-ya̍p",
        "badretype": "Ngì só khim-ngi̍p ke me̍t-ma pin m̀  siông-thùng.",
        "userexists": "汝所填入嘅用戶名稱已經存在。\n請另選一隻名稱。",
        "loginerror": "Tên-ngi̍p chhâ-chho",
-       "createacct-error": "Chong-fu kien-li̍p chhâ-chho",
-       "createaccounterror": "Mò phan-fap kien-li̍p chong-ho: $1",
+       "createacct-error": "Khôi fu-thèu chhut chhâ-chho",
+       "createaccounterror": "Mò-fap-thu khôi sîn fu-thèu: $1",
        "nocookiesnew": "本用戶賬號已分建立,但係汝登入失敗。{{SITENAME}}使用cookie登入。汝已停用cookie。請啓用cookie,之後使用汝嘅新用戶名和密碼登入。",
        "nocookieslogin": "{{SITENAME}}用cookie登入。汝已停用cookie。請啓用cookie後再試一擺。",
        "nocookiesfornew": "邇隻用戶嘅賬戶未建立,亻厓兜無法度確認其嘅來源。\n請確定汝已經開啟cookies,重新載入後再試一擺。",
        "noname": "汝還吂輸入一隻有效嘅用戶名。",
        "loginsuccesstitle": "Yí-kîn tên-ngi̍p",
        "loginsuccess": "Ngì kîm-hâ yî \"$1\"-ke sṳ̂n-fun chhai {{SITENAME}} tên-ngi̍p.",
-       "nosuchuser": "Chhìm m̀ -to yung-fu \"$1\". \nYung-fu miàng-chhṳ̂n he yû thai-séu siá khî-fûn ke . \nKiám-chhà ngì ke piâng-siá, fe̍t-chá yung hâ-mien ke péu-kak [[Special:CreateAccount|kien-li̍p yit-chak sîn chòng-ho]].",
+       "nosuchuser": "Chhìm m̀ -to yung-fu \"$1\". \nYung-fu miàng-chhṳ̂n he yû thai-séu siá khî-fûn ke . \nKiám-chhà ngì ke piâng-siá, fe̍t-chá yung hâ-mien ke péu-kak [[Special:CreateAccount|khôi yit-chak sîn fu-thèu]].",
        "nosuchusershort": "無有喊做“$1”嘅用戶。請檢查汝輸入嘅文字係毋係有差錯。",
        "nouserspecified": "汝愛指定一隻用戶名。",
        "login-userblocked": "邇隻用戶已分封鎖。毋做得登入。",
        "suspicious-userlogout": "汝登出嘅要求已經分拒絕,因為其可能係由已損壞嘅瀏覽器或者緩存代理傳送。",
        "pt-login": "Tên-ngi̍p",
        "pt-login-button": "Tên-ngi̍p",
-       "pt-createaccount": "Kien-li̍p chong-ho",
+       "pt-createaccount": "Khôi fu-thèu",
        "pt-userlogout": "Tên-chhut",
        "php-mail-error-unknown": "在PHP嘅mail()參數肚嘅未知錯誤",
        "user-mail-no-addy": "嘗試毋帶電郵地址發送電郵。",
        "preview": "預覽",
        "showpreview": "Chán-sṳ yi-lám",
        "showdiff": "Chán-sṳ chhâ-phe̍t",
-       "anoneditwarning": "<strong>Kín-ko : </strong>Ngì hàn-m̀ tên-ngi̍p. Ngì ke IP thi-chí chiông ki-liu̍k chhai liá-ya̍p ke phiên-siá li̍t-sṳ́ tú. Ká-sṳ́ ngì  <strong>[$1 tên-ngi̍p]</strong> fe̍t  <strong>[$2 kien-li̍p chong-ho]</strong>, ngì ke phiên-si̍p chiông-fi yî ngì ke sṳ́-yung-chá miàng-chhṳ̂n phiêu-sṳ, yúng-yû khì-thâ yù-tiám.",
+       "anoneditwarning": "<strong>Kín-ko:</strong> Ngì hàn-m̀ tên-ngi̍p. Ngì ke IP vi-chí voi ki-liu̍k chhai liá ya̍p ke phiên-siá li̍t-sṳ́ tú. Na-he ngì <strong>[$1 tên-ngi̍p]</strong> fe̍t-chá <strong>[$2 khôi fu-thèu]</strong>, ngì ke phiên-siá voi hién-sṳ ngì ke yung-fu miàng-sṳ, pin-chhiâ yû khì-thâ ke yù-tiám.",
        "anonpreviewwarning": "“警告:汝還吂登入。汝嘅IP地址將會記錄在邇頁嘅編輯歷史中”",
        "missingsummary": "'''提示:''' 汝無提供一隻編寫摘要。假使汝再次單擊「{{int:savearticle}}」,汝嘅編寫將毋帶編寫摘要保存。",
        "missingcommenttext": "請在下背輸入評論。",
        "subject-preview": "主題/標題預覽:",
        "blockedtitle": "用戶分查封",
        "blockedtext": "Ngì-ke yung-fu-miàng fe̍t-chá IP thi-tiám yí-kîn pûn $1 chhà-fûng.\n\nLiá-chhṳ chhà-fûng he yù $1 só fûng ke. Tông-chûng ke ngièn-yîn he ''$2''. Ngì khó-yî lièn-lo̍k $1 fe̍t-chá khì-thâ ke [[{{MediaWiki:Grouppage-sysop}}|Kón-lî-yèn]], thó-lun liá-chhṳ ke chhà-fûng. Chhù-fî ngì yí-kîn chhai ngì-ke [[Special:Preferences|Chong-ho chhâm-su sat-chṳ]] chûng sat-thin liáu yit-ke yû-háu ke email, féu-chet ngì-he put-nèn sṳ́-yung “email liá-vi yung-fu” ke kûng-yung. Ngì-ke IP thi-tiám he $3, yì-yèn ke chhà-fûng ID he #$5. Chhiáng ngì chhai só-yû chhà-chhìm chûng chu-mìn liá-ke thi-tiám khi̍p/fe̍t-he chhà-fûng ID.",
-       "autoblockedtext": "Ngì-ke IP thi-tiám yí-kîn pûn chhṳ-thung chhà-fûng, lî-yù he siên-chhièn ke nang yit-vi yung-fu pûn $1 só chhà-fûng. Yì-yèn chhà-fûng ke ngièn-yîn he: ''$2'' liá-chhṳ chhà-fûng ke khì-kiên he: $6 ngì khó-yî lièn-lo̍k $1 fe̍t-chá khì-thâ ke [[{{MediaWiki:Grouppage-sysop}}|kón-lî-yèn]], thó-lun liá-chhṳ chhà-fûng. Chhù-fî ngì yí-kîn chhai ngì-ke [[Special:Preferences|chong-ho chhâm-su sat-chṳ]] chûng sat-thin yit-ke yû-háu ke email thi-tiám, féu-chet ngì-he put-nèn sṳ́-yung \"email liá-vi yung-fu\" ke kûng-nèn. Ngì-ke chhà-fûng ID he $5. Chhiáng ngì chhai só-yû thiàu-chhà chûng chu-mìn liá-ke chhà-fûng ID.",
+       "autoblockedtext": "Ngì-ke IP thi-tiám yí-kîn pûn chhṳ-thung chhà-fûng, lî-yù he siên-chhièn ke nang yit-vi yung-fu pûn $1 só chhà-fûng. Yì-yèn chhà-fûng ke ngièn-yîn he: ''$2'' liá-chhṳ chhà-fûng ke khì-kiên he: $6 ngì khó-yî lièn-lo̍k $1 fe̍t-chá khì-thâ ke [[{{MediaWiki:Grouppage-sysop}}|kón-lî-yèn]], thó-lun liá-chhṳ chhà-fûng. Chhù-fî ngì yí-kîn chhai ngì-ke [[Special:Preferences|fu-thèu chhâm-su sat-chṳ]] chûng sat-thin yit-ke yû-háu ke email thi-tiám, féu-chet ngì-he put-nèn sṳ́-yung \"email liá-vi yung-fu\" ke kûng-nèn. Ngì-ke chhà-fûng ID he $5. Chhiáng ngì chhai só-yû thiàu-chhà chûng chu-mìn liá-ke chhà-fûng ID.",
        "whitelistedittext": "汝必須先$1正做得編寫頁面。",
        "confirmedittext": "在編寫邇頁之前汝必須確認汝嘅郵箱地址。請通過[[Special:Preferences|偏好設定]]設定並驗證汝嘅郵箱地址。",
        "nosuchsectiontitle": "Mò-yû liá-ke thon-lo̍k",
        "templatesusedsection": "Chhai liá-ke thon-lo̍k song sṳ́-yung ke mù-pán yû:",
        "template-protected": "(Pó-fu)",
        "template-semiprotected": "(Pan pó-fu)",
-       "hiddencategories": "Liá-ya̍p su̍k-yî $1-chak yún-chhông fûn-lui ke sṳ̀n-yèn:",
+       "hiddencategories": "Liá ya̍p su̍k-yî {{PLURAL:$1|1 ke ám-hí ke fûn-lui|$1 ke ám-hí ke fûn-lui}} ke sṳ̀n-yèn:",
        "edittools": "<!-- 邇肚嘅文字將分展示在編寫撈上傳表單以下。 -->\n<div id=\"editpage-specialchars\" class=\"plainlinks edittools-version-test003\" style=\"margin-top: 15px; border-width: 1px; border-style: solid; border-color: #aaaaaa; padding: 2px;\"> <span id=\"edittools_main\">'''Insert:''' <charinsert>– — … ‘ “ ’ ” ° ″ ′ ≈ ≠ ≤ ≥ ± − × ÷ ← → · § </charinsert></span><span id=\"edittools_name\">&nbsp;&nbsp;'''Sign your username:''' <charinsert>--~~&#126;~</charinsert> <small>(on [[Help:Talk pages|talk pages]])</small></span> ---- <small id=\"edittools_newsectionshere\"><span id=\"edittools_hide_for_script_test\"><span id=\"edittools_wikimarkup\">'''Wiki markup:''' <charinsert><nowiki>{{</nowiki>+<nowiki>}}</nowiki> </charinsert> &nbsp; <charinsert><nowiki>{{{</nowiki>+<nowiki>}}}</nowiki> </charinsert> &nbsp; <charinsert><nowiki>|</nowiki></charinsert> &nbsp; <charinsert>[+]</charinsert> &nbsp; <charinsert>[[+]]</charinsert> &nbsp; <charinsert>[[Category:+]]</charinsert> &nbsp; <charinsert>#REDIRECT&#32;[[+]]</charinsert> &nbsp; <charinsert>{{Subst:Fôn-ngiàng}}</charinsert> &nbsp; <charinsert>{{Subst:PAGENAME}}</charinsert> &nbsp; <charinsert>&nbsp;</charinsert> &nbsp; <charinsert><s>+</s></charinsert> &nbsp; <charinsert><sup>+</sup></charinsert> &nbsp; <charinsert><sub>+</sub></charinsert> &nbsp; <charinsert><code>+</code></charinsert> &nbsp; <charinsert><blockquote>+</blockquote></charinsert> &nbsp; <charinsert><ref>+</ref></charinsert> &nbsp; <charinsert><nowiki>{{</nowiki>Reflist<nowiki>}}</nowiki></charinsert> &nbsp; <charinsert><references/></charinsert> &nbsp; <charinsert><includeonly>+</includeonly></charinsert> &nbsp; <charinsert><noinclude>+</noinclude></charinsert> &nbsp; <charinsert><nowiki>{{</nowiki>DEFAULTSORT:+<nowiki>}}</nowiki></charinsert> &nbsp; <charinsert>&lt;nowiki>+</nowiki></charinsert> &nbsp; <charinsert><nowiki><!-- </nowiki>+<nowiki> --></nowiki></charinsert>&nbsp; <charinsert><nowiki><span class=\"plainlinks\"></nowiki>+<nowiki></span></nowiki></charinsert>&nbsp;&nbsp;&bull;&nbsp; ([[Wikipedia:Template messages|templates]])<br/></span> <span id=\"edittools_symbols\">'''Symbols:''' <charinsert> ~ | ¡ ¿ † ‡ ↔ ↑ ↓ • ¶</charinsert> &nbsp; <charinsert> # ½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞ ∞ </charinsert> &nbsp; <charinsert> ‘ “ ’ ” «+»</charinsert> &nbsp; <charinsert> ¤ ₳ ฿ ₵ ¢ ₡ ₢ $ ₫ ₯ € ₠ ₣ ƒ ₴ ₭ ₤ ℳ ₥ ₦ № ₧ ₰ £ ៛ ₨ ₪ ৳ ₮ ₩ ¥ </charinsert> &nbsp; <charinsert> ♠ ♣ ♥ ♦ </charinsert>&nbsp; <charinsert>m²</charinsert>&nbsp;<charinsert>m³</charinsert><br/></span> <span id=\"edittools_characters\">'''Characters:''' <span class=\"latinx\"> <charinsert> Á á Ć ć É é Í í Ĺ ĺ Ḿ ḿ Ń ń Ó ó Ŕ ŕ Ś ś Ú ú Ý ý Ź ź </charinsert> &nbsp; <charinsert> À à È è Ì ì M̀ m̀  Ǹ ǹ Ò ò Ù ù </charinsert> &nbsp; <charinsert> Â â Ĉ ĉ Ê ê Ĝ ĝ Ĥ ĥ Î î Ĵ ĵ Ô ô Ŝ ŝ Û û Ŵ ŵ Ŷ ŷ </charinsert> &nbsp; <charinsert> A̤ a̤ E̤ e̤ I̤ i̤ O̤ o̤ Ṳ ṳ </charinsert> &nbsp;\n<charinsert> A̍ a̍ E̍ e̍ I̍ i̍ O̍ o̍ U̍ u̍ </charinsert> &nbsp; <charinsert> À̤ à̤ È̤ è̤ Ì̤ ì̤ Ò̤ ò̤ Ṳ̀ ṳ̀ </charinsert> &nbsp;\n<charinsert> Á̤ á̤ É̤ é̤ Í̤ í̤ Ó̤ ó̤ Ṳ́ ṳ́ </charinsert> &nbsp; <charinsert> A̤̍ a̤̍ E̤̍ e̤̍ I̤̍ i̤̍ O̤̍ o̤̍ Ṳ̍ ṳ̍ </charinsert> &nbsp;\n<charinsert> Â̤ â̤ Ê̤ ê̤ Î̤ î̤ Ô̤ ô̤ Ṳ̂ ṳ̂ </charinsert> &nbsp; <charinsert> Â â Ĉ ĉ Ê ê Ĝ ĝ Ĥ ĥ Î î Ĵ ĵ Ô ô Ŝ ŝ Û û Ŵ ŵ Ŷ ŷ </charinsert> &nbsp; <charinsert> Ä ä Ë ë Ï ï Ö ö Ü ü Ÿ ÿ </charinsert> &nbsp; <charinsert> ß </charinsert> &nbsp; <charinsert> Ã ã Ẽ ẽ Ĩ ĩ Ñ ñ Õ õ Ũ ũ Ỹ ỹ</charinsert> &nbsp; <charinsert> Ç ç Ģ ģ Ķ ķ Ļ ļ Ņ ņ Ŗ ŗ Ş ş Ţ ţ </charinsert> &nbsp; <charinsert> Đ đ </charinsert> &nbsp; <charinsert> Ů ů </charinsert> &nbsp; <charinsert> Ǎ ǎ Č č Ď ď Ě ě Ǐ ǐ Ľ ľ Ň ň Ǒ ǒ Ř ř Š š Ť ť Ǔ ǔ Ž ž </charinsert> &nbsp; <charinsert> Ā ā Ē ē Ī ī Ō ō Ū ū Ȳ ȳ Ǣ ǣ </charinsert> &nbsp; <charinsert> ǖ ǘ ǚ ǜ </charinsert> &nbsp; <charinsert> Ă ă Ĕ ĕ Ğ ğ Ĭ ĭ Ŏ ŏ Ŭ ŭ </charinsert> &nbsp; <charinsert> Ċ ċ Ė ė Ġ ġ İ ı Ż ż </charinsert> &nbsp; <charinsert> Ą ą Ę ę Į į Ǫ ǫ Ų ų </charinsert> &nbsp; <charinsert> Ḍ ḍ Ḥ ḥ Ḷ ḷ Ḹ ḹ Ṃ ṃ Ṇ ṇ Ṛ ṛ Ṝ ṝ Ṣ ṣ Ṭ ṭ </charinsert> &nbsp; <charinsert> Ł ł </charinsert> &nbsp; <charinsert> Ő ő Ű ű </charinsert> &nbsp; <charinsert> Ŀ ŀ </charinsert> &nbsp; <charinsert> Ħ ħ </charinsert> &nbsp; <charinsert> Ð ð Þ þ </charinsert> &nbsp; <charinsert> Œ œ </charinsert> &nbsp; <charinsert> Æ æ Ø ø Å å </charinsert> &nbsp; <charinsert> Ə ə </charinsert></span>&nbsp;<span id=\"edittools_latinx_template\">&nbsp;&bull;&nbsp; <charinsert><nowiki>{{</nowiki><nowiki>Unicode|</nowiki>+<nowiki>}}</nowiki></charinsert></span><br/></span> <span id=\"edittools_greek\">'''Hî-lia̍p-vùn:''' <charinsert> Ά ά Έ έ Ή ή Ί ί Ό ό Ύ ύ Ώ ώ </charinsert> &nbsp; <charinsert> Α α Β β Γ γ Δ δ </charinsert> &nbsp; <charinsert> Ε ε Ζ ζ Η η Θ θ </charinsert> &nbsp; <charinsert> Ι ι Κ κ Λ λ Μ μ </charinsert> &nbsp; <charinsert> Ν ν Ξ ξ Ο ο Π π </charinsert> &nbsp; <charinsert> Ρ ρ Σ σ ς Τ τ Υ υ </charinsert> &nbsp; <charinsert> Φ φ Χ χ Ψ ψ Ω ω </charinsert> &nbsp;<span id=\"edittools_greek_template\">•&nbsp; <charinsert><nowiki>{{</nowiki><nowiki>Polytonic|</nowiki>+<nowiki>}}</nowiki></charinsert></span> &nbsp;<span id=\"edittools_greek_example\">•&nbsp; ([[Greek diacritics#Computer encoding|polytonic list]])</span><br/></span> <span id=\"edittools_cyrillic\">'''Cyrillic:''' <charinsert> А а Б б В в Г г </charinsert> &nbsp; <charinsert> Ґ ґ Ѓ ѓ Д д Ђ ђ </charinsert> &nbsp; <charinsert> Е е Ё ё Є є Ж ж </charinsert> &nbsp; <charinsert> З з Ѕ ѕ И и І і </charinsert> &nbsp; <charinsert> Ї ї Й й Ј ј К к </charinsert> &nbsp; <charinsert> Ќ ќ Л л Љ љ М м </charinsert> &nbsp; <charinsert> Н н Њ њ О о П п </charinsert> &nbsp; <charinsert> Р р С с Т т Ћ ћ </charinsert> &nbsp; <charinsert> У у Ў ў Ф ф Х х </charinsert> &nbsp; <charinsert> Ц ц Ч ч Џ џ Ш ш </charinsert> &nbsp; <charinsert> Щ щ Ъ ъ Ы ы Ь ь </charinsert> &nbsp; <charinsert> Э э Ю ю Я я </charinsert> &nbsp;<br/></span> <span id=\"edittools_ipa\">'''IPA:''' <span title=\"Pronunciation in IPA\" class=\"IPA\"><charinsert>t̪ d̪ ʈ ɖ ɟ ɡ ɢ ʡ ʔ </charinsert> &nbsp; <charinsert> ɸ ʃ ʒ ɕ ʑ ʂ ʐ ʝ ɣ ʁ ʕ ʜ ʢ ɦ </charinsert> &nbsp; <charinsert> ɱ ɳ ɲ ŋ ɴ </charinsert> &nbsp; <charinsert> ʋ ɹ ɻ ɰ </charinsert> &nbsp; <charinsert> ʙ ʀ ɾ ɽ </charinsert> &nbsp; <charinsert> ɫ ɬ ɮ ɺ ɭ ʎ ʟ </charinsert> &nbsp; <charinsert> ɥ ʍ ɧ </charinsert> &nbsp; <charinsert> ɓ ɗ ʄ ɠ ʛ </charinsert> &nbsp; <charinsert> ʘ ǀ ǃ ǂ ǁ </charinsert> &nbsp; <charinsert> ɨ ʉ ɯ </charinsert> &nbsp; <charinsert> ɪ ʏ ʊ </charinsert> &nbsp; <charinsert> ɘ ɵ ɤ </charinsert> &nbsp; <charinsert> ə ɚ </charinsert> &nbsp; <charinsert> ɛ ɜ ɝ ɞ ʌ ɔ </charinsert> &nbsp; <charinsert> ɐ ɶ ɑ ɒ </charinsert> &nbsp; <charinsert> ʰ ʷ ʲ ˠ ˤ ⁿ ˡ </charinsert> &nbsp; <charinsert> ˈ ˌ ː ˑ ̪ </charinsert>&nbsp;</span> &nbsp;&bull;&nbsp; <charinsert><nowiki>{{</nowiki><nowiki>IPA|</nowiki>+<nowiki>}}</charinsert></small>\n</div>",
        "nocreatetext": "Chhṳ́ mióng-chham han-chṳ chhóng-chho sîn hong-mien ke kûng-yung. ngì khó-yî fán-fì pin phiên-cho yí-kîn yû ke hong-mien, fe̍t-chá [[Special:UserLogin|tên-liu̍k fe̍t-he chhóng-kien sîn chong-fu]].",
        "nocreate-loggedin": "汝並無權限去創建新頁面。",
        "permissionserrors": "Khièn-han chhâ-chho",
        "permissionserrorstext": "Kîn-kí yî-ha ke ngièn-yîn, ngì vù-yû khièn-han hi-tso yî-ha ke thung-tsok:",
-       "permissionserrorstext-withaction": "根據下背嘅{{PLURAL:$1|原因|原因}},汝並無權限去做$2:",
+       "permissionserrorstext-withaction": "Yîn-vi hâ-poi ke {{PLURAL:$1|ngièn-yîn}}, ngì mò-fap-thu $2:",
        "recreate-moveddeleted-warn": "'''警告:汝今下重新建立一隻先前曾經刪除過嘅頁面。'''\n\n汝應該愛考慮一下繼續編寫邇一隻頁面係毋係合適。\n為到方便,邇一個頁面嘅刪除日誌已經在下背提供:",
        "moveddeleted-notice": "Liá-chak ya̍p-mien yí-kîn san-chhù. \nLiá-chak ya̍p-mien ke san-chhù lâu yì-thûng ngit-chì yí-kîn chhai hâ-poi thì-kiûng lòi chhâm-kháu.",
        "log-fulllog": "Chhà-khon vàn-cháng ngit-chì",
        "undo-failure": "由於中途嘅編寫毋一致,本編輯毋做得撤銷。",
        "undo-norev": "由於其嘅修訂版本毋存在或已刪除,本編寫毋做得撤銷。",
        "undo-summary": "Chhí-sêu yù [[Special:Contributions/$2|$2]] ([[User talk:$2|tui-fa]]) só chok-chhut ke siû-thin $1",
-       "cantcreateaccounttitle": "Mò-fap kien-li̍p chong-ho",
        "cantcreateaccount-text": "從邇隻IP地址('''$1''')建立帳號已經分[[User:$3|$3]]禁止。\n\n當中分$3封禁嘅原因是''$2''",
        "viewpagelogs": "Chhà-khon liá-chak ya̍p-mien ke ngit-chì",
        "nohistory": "無本頁嘅修訂版本記錄。",
        "previousrevision": "← Sông-chak pán-pún",
        "nextrevision": "Hâ-chak pán-pún →",
        "currentrevisionlink": "Chui-sîn pán-pún",
-       "cur": "tông-chhièn",
-       "next": "下一隻",
-       "last": "sông yit-chak",
+       "cur": "kîm",
+       "next": "Heu",
+       "last": "chhièn",
        "page_first": "chui-chó",
        "page_last": "chui-mî",
-       "histlegend": "差別選擇:標記愛比較版本嘅單選按鈕並點擊底部嘅按鈕進行比較。<br />\n說明:'''({{int:cur}})''' 指撈最新版本比較,'''({{int:last}})''' 指撈上隻版本比較,'''{{int:minoreditletter}}''' = 細微修改。",
+       "histlegend": "Chhâ-phe̍t sién-chet: pêu-ki oi pí-káu pán-pún, tiám hâ-poi ke \"Pí-káu sién-chet ke pán-pún\" yung lòi pí-káu.<br />\nSot-mìn: <strong>({{int:cur}})</strong> chṳ́ lâu chui sîn pán-pún pí-káu, <strong>({{int:last}})</strong> chṳ́ thùng chhièn yit ke pán-pún pí-káu, <strong>{{int:minoreditletter}}</strong> = se-mì siû-kói.",
        "history-fieldset-title": "Liù-lám li̍t-sṳ́",
        "history-show-deleted": "Tân-chhiang he yí san-chhù ke",
        "histfirst": "chui-chó",
        "rev-deleted-event": "(日誌已刪除)",
        "rev-deleted-text-permission": "Ke-vùn-chông siû-thin yí-kîn pûn-chhiùng kûng-khiung vùn-tóng chûng yì-chhù. Chhai [{{fullurl:{{#Special:Log}}/suppress|page={{PAGENAMEE}}}} chhù-thet ngit-ki] chûng khó-nèn kiám-chhà to siòng-se ke sin-sit.",
        "rev-deleted-text-view": "Ke-vùn-chông siû-thin yí-kîn pûn-chhiùng kûng-khiung vùn-tóng chûng yì-chhù. Chok-vi mióng-chham ke kón-lî-yèn, khó-yî kiám-chhà; Chhai[{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} chhù-thet ngit-ki] chûng khó-nèn kiám-chhà to siòng-se ke sin-sit.",
-       "rev-delundel": "chán-hien / yún-chhông",
-       "rev-showdeleted": "展現",
+       "rev-delundel": "hien / ám",
+       "rev-showdeleted": "hien",
        "revisiondelete": "刪除/恢復刪除修訂版本",
        "revdelete-nooldid-title": "無效嘅目標修訂版本",
        "revdelete-nooldid-text": "汝還吂指定一隻目標修訂版本去進行邇隻功能、\n所指定嘅修訂版本毋存在,或者汝嘗試去隱藏今下嘅修訂版本。",
        "history-title": "\"$1\" ke siû-thin li̍t-sṳ́",
        "difference-title": "\"$1\" siû-thin kiên ke chhâ-bie",
        "lineno": "Thi $1 hàng:",
-       "compareselectedversions": "比較選定嘅修訂版本",
-       "editundo": "Chha̍t-siau",
+       "compareselectedversions": "Pí-káu sién-chet ke pán-pún",
+       "editundo": "Chhí-sêu",
        "searchresults": "Sêu-chhìm kiet-kó",
-       "searchresults-title": "Sêu -chhìm \"$1\" ke kiet-kó",
+       "searchresults-title": "Sêu-chhìm \"$1\" ke kiet-kó",
        "titlematches": "頁面標題相符",
        "textmatches": "頁面內容配得上",
        "notextmatches": "無頁面內容配上",
        "rcnotefrom": "下背係從'''$2'''起嘅更改(最多展示'''$1'''):",
        "rclistfrom": "Chán-sṳ chhiùng $3 $2 yî-lòi ke sîn kiên-kói",
        "rcshowhideminor": "$1細微編寫",
-       "rcshowhideminor-show": "Chán-sṳ",
-       "rcshowhideminor-hide": "Yún-chhông",
+       "rcshowhideminor-show": "Hien",
+       "rcshowhideminor-hide": "Ám",
        "rcshowhidebots": "$1 kî-hi-ngìn ke phiên-siá",
        "rcshowhidebots-show": "Chán-sṳ",
-       "rcshowhidebots-hide": "Yún-chhông",
+       "rcshowhidebots-hide": "Ám",
        "rcshowhideliu": "$1 yí-kîn tên-ngi̍p ke yung-fu",
-       "rcshowhideliu-hide": "Yún-chhông",
+       "rcshowhideliu-show": "Hien",
+       "rcshowhideliu-hide": "Ám",
        "rcshowhideanons": "$1 nit-miàng yung-fu ke phiên-siá",
-       "rcshowhideanons-show": "Chán-sṳ",
-       "rcshowhideanons-hide": "Yún-chhông",
+       "rcshowhideanons-show": "Hien",
+       "rcshowhideanons-hide": "Ám",
        "rcshowhidepatr": "$1巡查過嘅編寫",
        "rcshowhidemine": "$1 ngài-ke phiên-siá",
-       "rcshowhidemine-show": "Chán-sṳ",
-       "rcshowhidemine-hide": "Yún-chhông",
+       "rcshowhidemine-show": "Hien",
+       "rcshowhidemine-hide": "Ám",
        "rclinks": "Chán-sṳ chui-khiûn $2-ngit nui chui-sîn ke $1 chhṳ kói-thûng. <br />$3",
        "diff": "chhâ-phe̍t",
        "hist": "li̍t-sṳ́",
-       "hide": "Yún-chhông",
+       "hide": "Ám",
        "show": "Chán-sṳ",
        "minoreditletter": "se-mì",
        "newpageletter": "Sîn",
        "deletereasonotherlist": "其它理由",
        "rollback": "編寫倒轉頭",
        "rollbacklink": "tá chón-thèu",
-       "rollbacklinkcount": "chha̍t-siau $1 chhṳ phiên-siá",
+       "rollbacklinkcount": "chhí-sêu $1 chhṳ phiên-siá",
        "rollbackfailed": "無法倒轉頭",
        "cantrollback": "編寫無法打轉頭;最後嘅貢獻者人本文嘅唯一作者。",
        "alreadyrolled": "Mò-fap fî-fu̍k yù [[User:$2|$2]] ([[User talk:$2|thó-lun]]) chin-hàng ke [[$1]] ke chui-heu phiên-si̍p; khì-thâ ngìn yí-kîn phiên-siá fe̍t-he fî-fu̍k liáu ke-hong. Chui-heu phiên-si̍p-chá: [[User:$3|$3]] ([[User talk:$3|Thó-lun]])。",
        "sessionfailure": "汝嘅登入會話好像有問題;\n為到防止會話劫持,邇次操作已經畀取消。\n請轉到先前嘅頁面,重新載入邇頁面,然後重試。",
        "protectlogpage": "Pó-fu ngit-chì",
        "protectlogtext": "Ha-mien he vùn-chông só-thin lâu chhí-sêu só-thin ke lie̍t-péu. Chhiáng chhâm-kháu [[Special:ProtectedPages|Pó-fu vùn-chông chhîn-tân]] yî-khi̍p kiám-sṳ tông-chhièn chin-hàng ke vùn-chông pó-fu.",
-       "protectedarticle": "已保護“[[$1]]”",
+       "protectedarticle": "yí-kîn pó-fu \"[[$1]]\"",
        "modifiedarticleprotection": "已經更改“[[$1]]”嘅保護等級",
        "unprotectedarticle": "yí-kîn kié-chhù pó-fu \"[[$1]]\"",
        "protect-title": "更改“$1”嘅保護等級",
        "ipaddressorusername": "IP thi-chí fe̍t yung-fu-miàng:",
        "ipbexpiry": "Khì-han:",
        "ipbreason": "Ngièn-yîn:",
-       "ipbreason-dropdown": "*Yit-pân ke fûng-kim lî-yù \n** Tô-chhṳ kâ-ngi̍p hî-ká chṳ̂-liau \n** San-chhù ya̍p-mien nui-yùng \n** Ngoi-phu lièn-chiap kóng-ko \n** Chhai ya̍p-mien tú chen-kâ mò yi-ngi vùn-sṳ \n** Mò-lî ke hàng-vì, kûng-kit / sâu-yéu phe̍t-sâ \n** Làm-yung tô-chak chòng-ho \n** Cho-m̀ tet chiap-su ke yung-fu-miàng",
-       "ipbcreateaccount": "Chú-chṳ́ chhóng-kien sîn chòng-ho",
+       "ipbreason-dropdown": "*Yit-pân ke fûng-kim lî-yù \n** Tô-chhṳ kâ-ngi̍p hî-ká chṳ̂-liau \n** San-chhù ya̍p-mien nui-yùng \n** Ngoi-phu lièn-chiap kóng-ko \n** Chhai ya̍p-mien tú chen-kâ mò yi-ngi vùn-sṳ \n** Mò-lî ke hàng-vì, kûng-kit / sâu-yéu phe̍t-sâ \n** Làm-yung tô-chak fu-thèu \n** Cho-m̀ tet chiap-su ke yung-fu-miàng",
+       "ipbcreateaccount": "Chú-chṳ́ kien-li̍p sîn fu-thèu",
        "ipbenableautoblock": "Chhṳ-thûng chhà-fûng liá yung-fu chui-heu só yung ke IP thi-chí, lâu heu-lòi sṳ-thù phiên-siá só yung ke só-yû thi-chí",
        "ipbsubmit": "Chhà-fûng liá yung-fu",
        "ipbother": "其它時間:",
        "tooltip-pt-userpage": "{{GENDER:|Ngì ke sṳ́-yung-chá}} ya̍p-mien",
        "tooltip-pt-anonuserpage": "Ngì-ke phiên-siá pún-chham só yung IP ke tui-yin yung-fu-chông",
        "tooltip-pt-mytalk": "{{GENDER:|Ngì ke}} kâu-liù ya̍p",
-       "tooltip-pt-anontalk": "Tui-yî lòi-chhṳ chhṳ́IP thi-tiám phiên-siá ke tui-fa",
+       "tooltip-pt-anontalk": "Liá ke IP vi-chṳ́ yû-koân phiên-siá ke thó-lun",
        "tooltip-pt-preferences": "{{GENDER:|Ngì ke}} phiên-hó sat-thin",
        "tooltip-pt-watchlist": "Ngì kâm-sṳ chûng ya̍p-mien ke kiên-kói lie̍t-péu",
        "tooltip-pt-mycontris": "{{GENDER:|Ngì ke}} kung-hien lie̍t-péu",
-       "tooltip-pt-login": "Kien-ngi ngì tên-ngi̍p, than-he pin fî pit-sî ke",
+       "tooltip-pt-login": "Kien-ngi ngì tên-ngi̍p, m̀-ko mò-yit-thin oi.",
        "tooltip-pt-logout": "Tên-chhut",
+       "tooltip-pt-createaccount": "Kien-ngi ngì siên khôi yit ke fu-thèu chai tên-ngi̍p; m̀-ko mò-yit-thin oi.",
        "tooltip-ca-talk": "Liá ya̍p ke thó-lun",
        "tooltip-ca-edit": "Phiên-siá pún-ya̍p",
        "tooltip-ca-addsection": "Khôi-sṳ́ yit-chak sîn thon-lo̍k",
        "metadata": "Ngièn sú-kí",
        "metadata-help": "邇文件肚包含有擴展嘅信息。邇兜信息可能係由數碼相機或掃描儀在創建或數字化過程肚所加入嘅。\n\n係講邇文件嘅源文件已經分修改,一兜信息在修改後嘅文件肚將毋做得完全反映出來。",
        "metadata-expand": "Hién-sṳ siòng-se ke chṳ̂-liau",
-       "metadata-collapse": "Yún-chhòng siòng-se ke chṳ̂-liau",
+       "metadata-collapse": "Ám-hí siòng-se ke chṳ̂-liau",
        "metadata-fields": "在本信息肚所列出嘅EXIF元數據域將包含在圖片顯示頁面,當元數據表損壞時單淨顯示下背信息。\n其他嘅元數據默認做隱藏。\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
        "exif-orientation": "Fông-vi",
        "exif-xresolution": "Súi-phìn kié-sak-thu",
        "confirmemail_success": "Ngì-ke sin-siông yí-kîn pûn khok-ngin. Ngì hien-ha khó-yî tên-liu̍k pin sṳ́-yung chhṳ́ mióng-chham liáu.",
        "confirmemail_loggedin": "Ngì-ke sin-siông thi-tiám hien-ha yí-kîn pûn khok-ngin.",
        "confirmemail_subject": "{{SITENAME}} sin-siông thi-tiám khok-ngin",
-       "confirmemail_body": "Yúng-yû IP thi-tiám $1 ke yung-fu (khó-nèn he ngì) chhai {{SITENAME}} chhóng-chho liáu chong-fu  \"$2\", pin thì-kâu liáu ngì-ke email sin-siông thi-tiám.\n\nChhiáng khok-ngin liá-ke chong-fu  he su̍k-yî ngì-ke, pin thùng-sṳ̀ khí-yung chhai {{SITENAME}} sông ke email sin-siông kûng-nèn. Chhiáng chhai hi-khí chûng tá-khôi ha-mien ke lièn-kiet: $3\n\nKó-yèn ngì *mò-yû* thì-chhut liá-ke chhiáng-khiù,  chhiáng put-yeu tiám-kit Chhṳ́ lièn-kiet. Khok-ngin me̍t-me̍t chiông-voi chhai $4 ko-khì.",
+       "confirmemail_body": "Yúng-yû IP thi-tiám $1 ke yung-fu (khó-nèn he ngì) chhai {{SITENAME}} chhóng-chho liáu fu-thèu  \"$2\", pin thì-kâu liáu ngì-ke email sin-siông thi-tiám.\n\nChhiáng khok-ngin liá-ke fu-thèu  he su̍k-yî ngì-ke, pin thùng-sṳ̀ khí-yung chhai {{SITENAME}} sông ke email sin-siông kûng-nèn. Chhiáng chhai hi-khí chûng tá-khôi ha-mien ke lièn-kiet: $3\n\nKó-yèn ngì *mò-yû* thì-chhut liá-ke chhiáng-khiù,  chhiáng put-yeu tiám-kit Chhṳ́ lièn-kiet. Khok-ngin me̍t-me̍t chiông-voi chhai $4 ko-khì.",
        "scarytranscludedisabled": "[Khiam-wiki chón-von me̍t-me̍t put hí-khó yung]",
        "scarytranscludefailed": "[Tui-put-hí, mù-pán $1 thu̍k-chhí sṳt-phai]",
        "scarytranscludetoolong": "[Tui-put-hí; URL thi-tiám thai-chhòng]",
        "revdelete-restricted": "yí-kîn yin-yung han-tsṳ tsṳ tshâu-tsok-yèn",
        "revdelete-unrestricted": "yí-kîn yì-tshù yû-kûan tshâu-tsok-yè ke han-tsṳ",
        "logentry-move-move": "$1 {{GENDER:$2|yí-kîn yì-thûng}} ya̍p-mien $3 to $4",
-       "logentry-newusers-create": "Yí-kîn {{GENDER:$2|kien-li̍p}} sṳ́-yung-chá chong-ho  $1",
+       "logentry-newusers-create": "Yí-kîn {{GENDER:$2|khôi}} yung-fu fu-thèu $1",
        "logentry-upload-upload": "$1 {{GENDER:$2|yí-kîn sông-chhòn}} $3",
        "rightsnone": "(無)",
        "revdelete-summary": "piên-sip tsak-yêu",
index 479ab41..4d24d4d 100644 (file)
@@ -35,7 +35,8 @@
                        "פוילישער",
                        "DatGuy",
                        "IKhitron",
-                       "Matma Rex"
+                       "Matma Rex",
+                       "Or"
                ]
        },
        "tog-underline": "סימון קישורים בקו תחתי:",
        "tog-watchdeletion": "הוספת דפים וקבצים שאני {{GENDER:|מוחק|מוחקת}} לרשימת המעקב שלי",
        "tog-watchuploads": "הוספת קבצים חדשים שאני מעלה לרשימת המעקב שלי",
        "tog-watchrollback": "הוספת דפים שאני {{GENDER:|מבצע|מבצעת}} בהם שחזור מהיר לרשימת המעקב שלי",
-       "tog-minordefault": "ס×\99×\9e×\95×\9f ×\9b×\9c ×¢×¨×\99×\9b×\94 ×\9b×\9eשנ×\99ת ×\9bברירת מחדל",
+       "tog-minordefault": "ס×\99×\9e×\95×\9f ×\9b×\9c ×\94ער×\99×\9b×\95ת ×\9b×\9eשנ×\99×\95ת ×\91ת×\95ר ברירת מחדל",
        "tog-previewontop": "הצגת תצוגה מקדימה לפני תיבת העריכה",
        "tog-previewonfirst": "הצגת תצוגה מקדימה בעריכה הראשונה",
        "tog-enotifwatchlistpages": "לשלוח אליי דוא\"ל כאשר משתנה דף או קובץ ברשימת המעקב שלי",
        "tog-enotifusertalkpages": "לשלוח אליי דוא\"ל כאשר נעשה שינוי בדף שיחת המשתמש שלי",
-       "tog-enotifminoredits": "לשלוח אליי דוא\"ל גם על עריכות משניות בדפים וקבצים",
-       "tog-enotifrevealaddr": "×\97ש×\99פת כתובת הדוא\"ל שלי בהתראות דוא\"ל",
+       "tog-enotifminoredits": "×\9cש×\9c×\95×\97 ×\90×\9c×\99×\99 ×\93×\95×\90\"×\9c ×\92×\9d ×¢×\9c ×¢×¨×\99×\9b×\95ת ×\9eשנ×\99×\95ת ×\91×\93פ×\99×\9d ×\95×\91ק×\91צ×\99×\9d",
+       "tog-enotifrevealaddr": "×\9c×\97ש×\95×£ ×\90ת כתובת הדוא\"ל שלי בהתראות דוא\"ל",
        "tog-shownumberswatching": "הצגת מספר המשתמשים העוקבים",
-       "tog-oldsig": "החתימה הנוכחית:",
+       "tog-oldsig": "החתימה הנוכחית שלך:",
        "tog-fancysig": "התייחסות לחתימה כקוד ויקי (ללא קישור אוטומטי)",
        "tog-uselivepreview": "שימוש בתצוגה מקדימה מהירה",
        "tog-forceeditsummary": "הצגת אזהרה בעת הכנסת תקציר עריכה ריק",
        "newwindow": "(נפתח בחלון חדש)",
        "cancel": "ביטול",
        "moredotdotdot": "עוד...",
-       "morenotlisted": "רשימה זו אינה מלאה.",
+       "morenotlisted": "×\99×\99ת×\9b×\9f ×©×¨×©×\99×\9e×\94 ×\96×\95 ×\90×\99× ×\94 ×\9e×\9c×\90×\94.",
        "mypage": "דף משתמש",
        "mytalk": "שיחה",
        "anontalk": "שיחה",
        "qbfind": "חיפוש",
        "qbbrowse": "ניווט",
        "qbedit": "עריכה",
-       "qbpageoptions": "×\90פשר×\95×\99×\95ת ×\93×£",
-       "qbmyoptions": "×\94×\90פשר×\95×\99×\95ת שלי",
+       "qbpageoptions": "×\94×\93×£ ×\94×\96×\94",
+       "qbmyoptions": "×\94×\93פ×\99×\9d שלי",
        "faq": "שאלות ותשובות",
        "faqpage": "Project:שאלות ותשובות",
        "actions": "פעולות",
        "namespaces": "מרחבי שם",
        "variants": "גרסאות שפה",
-       "navigation-heading": "תפר×\99×\98 ×\94× ×\99×\95×\95×\98",
+       "navigation-heading": "תפריט ניווט",
        "errorpagetitle": "שגיאה",
        "returnto": "חזרה לדף $1.",
        "tagline": "מתוך {{SITENAME}}",
        "updatedmarker": "עודכן מאז ביקורך האחרון",
        "printableversion": "גרסה להדפסה",
        "permalink": "קישור קבוע",
-       "print": "×\92רס×\94 ×\9c×\94×\93פס×\94",
+       "print": "הדפסה",
        "view": "צפייה",
        "view-foreign": "הצגה ב{{GRAMMAR:תחילית|$1}}",
        "edit": "עריכה",
        "deletethispage": "מחיקת דף זה",
        "undeletethispage": "שחזור דף זה",
        "undelete_short": "שחזור {{PLURAL:$1|עריכה אחת|$1 עריכות}}",
-       "viewdeleted_short": "צפ×\99×\99×\94 ×\91{{PLURAL:$1|ער×\99×\9b×\94 ×\9e×\97×\95ק×\94 ×\90×\97ת|Ö¾$1 עריכות מחוקות}}",
+       "viewdeleted_short": "×\94צ×\92ת {{PLURAL:$1|ער×\99×\9b×\94 ×\9e×\97×\95ק×\94 ×\90×\97ת|$1 עריכות מחוקות}}",
        "protect": "הגנה",
        "protect_change": "שינוי",
-       "protectthispage": "הגנה על דף זה",
+       "protectthispage": "×\94פע×\9cת ×\94×\92× ×\94 ×¢×\9c ×\93×£ ×\96×\94",
        "unprotect": "שינוי הגנה",
-       "unprotectthispage": "ש×\99× ×\95×\99 ×\94×\94×\92× ×\94 ×©ל דף זה",
+       "unprotectthispage": "ש×\99× ×\95×\99 ×\94×\94×\92× ×\94 ×¢ל דף זה",
        "newpage": "דף חדש",
        "talkpage": "שיחה על דף זה",
        "talkpagelinktext": "שיחה",
        "talk": "שיחה",
        "views": "צפיות",
        "toolbox": "כלים",
+       "tool-link-userrights": "שינוי הרשאות ה{{GENDER:$1|משתמש|משתמשת}}",
+       "tool-link-emailuser": "שליחת דוא\"ל ל{{GENDER:$1|משתמש|משתמשת}}",
        "userpage": "צפייה בדף המשתמש",
        "projectpage": "צפייה בדף המיזם",
        "imagepage": "צפייה בדף הקובץ",
        "jumpto": "קפיצה אל:",
        "jumptonavigation": "ניווט",
        "jumptosearch": "חיפוש",
-       "view-pool-error": "×\9eצ×\98ער×\99×\9d, ×\94שרת×\99×\9d ×¢×\9e×\95ס×\99×\9d ×\9bר×\92×¢.\n×\99×\95תר ×\9e×\93×\99 ×\9eשת×\9eש×\99×\9d ×\9eנס×\99×\9d ×\9cצפ×\95ת ×\91×\93×£ ×\96×\94.\n×\90× ×\90 ×\94×\9eת×\99× ×\95 ×\96×\9e×\9f ×\9e×\94 ×\9cפנ×\99 ×©×ª× ×¡×\95 ×©×\95×\91 ×\9cצפ×\95ת ×\91×\93×£.\n\n$1",
-       "generic-pool-error": "×\9eצ×\98ער×\99×\9d, ×\94שרת×\99×\9d ×¢×\9e×\95ס×\99×\9d ×\9bר×\92×¢.\n×\99×\95תר ×\9e×\93×\99 ×\9eשת×\9eש×\99×\9d ×\9eנס×\99×\9d ×\9cצפ×\95ת ×\91×\9eש×\90×\91 ×\94×\96×\94.\n×\90× ×\90 ×\94×\9eת×\99× ×\95 ×\96×\9e×\9f ×\9e×\94 ×\9cפנ×\99 ×©×ª× ×¡×\95 ×©×\95×\91 ×\9cצפ×\95ת ×\91×\9eש×\90×\91 ×\94×\96×\94.",
+       "view-pool-error": "×\9eצ×\98ער×\99×\9d, ×\94שרת×\99×\9d ×¢×\9e×\95ס×\99×\9d ×\9bר×\92×¢.\n×\99×\95תר ×\9e×\93×\99 ×\9eשת×\9eש×\99×\9d ×\9eנס×\99×\9d ×\9cצפ×\95ת ×\91×\93×£ ×\94×\96×\94.\n× ×\90 ×\9c×\94×\9eת×\99×\9f ×\96×\9e×\9f ×\9e×\94 ×\95×\9c×\90×\97ר ×\9e×\9b×\9f ×\9cנס×\95ת ×©×\95×\91.\n\n$1",
+       "generic-pool-error": "×\9eצ×\98ער×\99×\9d, ×\94שרת×\99×\9d ×¢×\9e×\95ס×\99×\9d ×\9bר×\92×¢.\n×\99×\95תר ×\9e×\93×\99 ×\9eשת×\9eש×\99×\9d ×\9eנס×\99×\9d ×\9cצפ×\95ת ×\91×\9eש×\90×\91 ×\94×\96×\94.\n× ×\90 ×\9c×\94×\9eת×\99×\9f ×\96×\9e×\9f ×\9e×\94 ×\95×\9c×\90×\97ר ×\9e×\9b×\9f ×\9cנס×\95ת ×©×\95×\91.",
        "pool-timeout": "זמן ההמתנה לסיום הנעילה עבר",
        "pool-queuefull": "התור מלא",
        "pool-errorunknown": "שגיאה בלתי ידועה",
        "portal-url": "Project:שער הקהילה",
        "privacy": "מדיניות הפרטיות",
        "privacypage": "Project:מדיניות הפרטיות",
-       "badaccess": "ש×\92×\99×\90×\94 ×\91×\94רש×\90×\95ת",
+       "badaccess": "ש×\92×\99×\90ת ×\94רש×\90×\94",
        "badaccess-group0": "אין {{GENDER:|לך|לך|לכם}} הרשאה לבצע את הפעולה ש{{GENDER:|ביקשת|ביקשת|ביקשתם}}.",
        "badaccess-groups": "הפעולה ש{{GENDER:|ביקשת|ביקשת|ביקשתם}} לבצע מוגבלת למשתמשים ב{{PLURAL:$2|קבוצה הבאה|אחת הקבוצות הבאות}}: $1.",
        "versionrequired": "נדרשת גרסה $1 של מדיה־ויקי",
-       "versionrequiredtext": "×\92רס×\94 $1 ×©×\9c ×\9e×\93×\99×\94Ö¾×\95×\99ק×\99 × ×\93רשת ×\9cש×\99×\9e×\95ש ×\91×\93×£ ×\96×\94. ×\9c×\9e×\99×\93×¢ × ×\95סף, ×¨×\90×\95 ×\90ת [[Special:Version|×\93×£ הגרסה]].",
+       "versionrequiredtext": "×\92רס×\94 $1 ×©×\9c ×ª×\95×\9bנת ×\9e×\93×\99×\94Ö¾×\95×\99ק×\99 × ×\93רשת ×\9cש×\99×\9e×\95ש ×\91×\93×£ ×\94×\96×\94.\n{{GENDER:|ר×\90×\94|ר×\90×\99|ר×\90×\95}} [[Special:Version|×\9e×\99×\93×¢ ×¢×\9c הגרסה]].",
        "ok": "אישור",
        "pagetitle": "$1 – {{SITENAME}}",
        "backlinksubtitle": "→ $1",
-       "retrievedfrom": "×\9eק×\95ר: $1",
+       "retrievedfrom": "×\90×\95×\97×\96ר ×\9eת×\95×\9a \"$1\"",
        "youhavenewmessages": "יש לך $1 ($2).",
        "youhavenewmessagesfromusers": "יש לך $1 {{PLURAL:$3|ממשתמש אחר|מ־$3 משתמשים}} ($2).",
        "youhavenewmessagesmanyusers": "יש לך $1 ממשתמשים רבים ($2).",
        "confirmable-no": "לא",
        "thisisdeleted": "להציג או לשחזר $1?",
        "viewdeleted": "להציג $1?",
-       "restorelink": "{{PLURAL:$1|×\92רס×\94 ×\9e×\97×\95ק×\94 ×\90×\97ת|$1 ×\92רס×\90ות מחוקות}}",
+       "restorelink": "{{PLURAL:$1|ער×\99×\9b×\94 ×\9e×\97×\95ק×\94 ×\90×\97ת|$1 ×¢×¨×\99×\9bות מחוקות}}",
        "feedlinks": "הזנה:",
        "feed-invalid": "סוג הזנת המנוי שגוי.",
        "feed-unavailable": "הזנות אינן זמינות",
        "nstab-category": "קטגוריה",
        "mainpage-nstab": "עמוד ראשי",
        "nosuchaction": "אין פעולה כזו",
-       "nosuchactiontext": "הפעולה שצוינה בכתובת ה־URL אינה תקינה.\nייתכן שטעית בהקלדת ה־URL, או שהשתמשת בקישור לא נכון.\nייתכן גם שהבעיה נוצרה כתוצאה מבאג בתוכנה המשמשת את {{SITENAME}}.",
+       "nosuchactiontext": "הפעולה שצוינה בכתובת ה־URL אינה תקינה.\nייתכן שטעית בהקלדת הכתובת, או שהשתמשת בקישור לא נכון.\nייתכן גם שהבעיה נוצרה כתוצאה מבאג בתוכנה המשמשת את {{SITENAME}}.",
        "nosuchspecialpage": "אין דף מיוחד בשם זה",
        "nospecialpagetext": "<strong>ביקשת דף מיוחד שאינו קיים.</strong>\n\nרשימה של הדפים המיוחדים הקיימים ניתן למצוא בדף [[Special:SpecialPages|{{int:specialpages}}]].",
        "error": "שגיאה",
        "databaseerror-function": "פונקציה: $1",
        "databaseerror-error": "שגיאה: $1",
        "transaction-duration-limit-exceeded": "כדי למנוע עיכובי העתקה גדולים, פעולה זו הופסקה כיוון שמשך הכתיבה ($1) עבר את המגבלה של {{PLURAL:$2|שנייה אחת|$2 שניות}}.\nאם הפעולה דורשת שינוי של פריטים רבים בו־זמנית, ניתן לנסות לבצע מספר פעולות קטנות יותר.",
-       "laggedslavemode": "'''אזהרה:''' הדף עשוי שלא להכיל עדכונים אחרונים.",
+       "laggedslavemode": "<strong>אזהרה:</strong> הדף עשוי שלא להכיל עדכונים אחרונים.",
        "readonly": "בסיס הנתונים נעול",
        "enterlockreason": "יש להקליד סיבה לנעילה, כולל הערכה למועד שחרור הנעילה",
-       "readonlytext": "×\91ס×\99ס × ×ª×\95× ×\99×\9d ×\96×\94 ×©×\9c ×\94×\90תר × ×¢×\95×\9c ×\91ר×\92×¢ ×\96×\94 ×\9cצ×\95ר×\9a הזנת נתונים ושינויים. ככל הנראה מדובר בתחזוקה שוטפת, שלאחריה יחזור האתר לפעולתו הרגילה.\n\nמנהל המערכת שנעל את בסיס הנתונים סיפק את ההסבר הבא: $1",
-       "missing-article": "×\91ס×\99ס ×\94נת×\95× ×\99×\9d ×\9c×\90 ×\9eצ×\90 ×\90ת ×\94×\98קס×\98 ×©×\9c ×\94×\93×£ ×©×\94×\95×\90 ×\94×\99×\94 ×\90×\9e×\95ר ×\9c×\9eצ×\95×\90, ×\91ש×\9d \"$1\" $2.\n\n×\94×\93×\91ר × ×\92ר×\9d ×\91×\93ר×\9a ×\9b×\9c×\9c ×¢×\9cÖ¾×\99×\93×\99 ×§×\99ש×\95ר ×\99ש×\9f ×\9c×\94ש×\95×\95×\90ת ×\92רס×\90×\95ת ×©×\9c ×\93×£ ×©× ×\9e×\97ק ×\90×\95 ×\9c×\92רס×\94 ×©×\9c ×\93×£ ×\9b×\96×\94.\n\n×\90×\9d ×\96×\94 ×\90×\99× ×\95 ×\94×\9eקר×\94, ×\96×\94×\95 ×\9bנר×\90×\94 ×\91×\90×\92 ×\91ת×\95×\9b× ×\94.\n×\90× ×\90 ×\93×\95×\95×\97×\95 על כך ל[[Special:ListUsers/sysop|מפעיל מערכת]], תוך שמירת פרטי כתובת ה־URL.",
+       "readonlytext": "×\91ס×\99ס ×\94נת×\95× ×\99×\9d × ×¢×\95×\9c ×\9bר×\92×¢ ×\9cהזנת נתונים ושינויים. ככל הנראה מדובר בתחזוקה שוטפת, שלאחריה יחזור האתר לפעולתו הרגילה.\n\nמנהל המערכת שנעל את בסיס הנתונים סיפק את ההסבר הבא: $1",
+       "missing-article": "×\91ס×\99ס ×\94נת×\95× ×\99×\9d ×\9c×\90 ×\9eצ×\90 ×\90ת ×\94×\98קס×\98 ×©×\9c ×\94×\93×£ ×©×\94×\95×\90 ×\94×\99×\94 ×\90×\9e×\95ר ×\9c×\9eצ×\95×\90, ×\91ש×\9d \"$1\" $2.\n\n×\96×\94 × ×\92ר×\9d ×\91×\93ר×\9aÖ¾×\9b×\9c×\9c ×¢×§×\91 ×\9c×\97×\99צ×\94 ×¢×\9c ×§×\99ש×\95ר ×\99ש×\9f ×\9c×\92רס×\94 ×©×\9c ×\93×£ ×©× ×\9e×\97ק.\n\n×\90×\9d ×\96×\94 ×\90×\99× ×\95 ×\94×\9eקר×\94, ×\96×\94×\95 ×\9bנר×\90×\94 ×\91×\90×\92 ×\91ת×\95×\9b× ×\94.\n× ×\90 ×\9c×\93×\95×\95×\97 על כך ל[[Special:ListUsers/sysop|מפעיל מערכת]], תוך שמירת פרטי כתובת ה־URL.",
        "missingarticle-rev": "(מספר גרסה: $1)",
        "missingarticle-diff": "(השוואת הגרסאות: $1, $2)",
        "readonly_lag": "בסיס הנתונים ננעל אוטומטית כדי לאפשר לבסיסי הנתונים המשניים להתעדכן מהבסיס הראשי.",
        "internalerror": "שגיאה פנימית",
        "internalerror_info": "שגיאה פנימית: $1",
        "internalerror-fatal-exception": "שגיאה חמורה מסוג \"$1\"",
-       "filecopyerror": "×\94עתקת \"$1\" ×\9cÖ¾\"$2\" × ×\9bש×\9c×\94.",
-       "filerenameerror": "ש×\99× ×\95×\99 ×\94ש×\9d ×©×\9c \"$1\" ×\9cÖ¾\"$2\" × ×\9bש×\9c.",
-       "filedeleteerror": "×\9e×\97×\99קת \"$1\" × ×\9bש×\9c×\94.",
-       "directorycreateerror": "×\99צ×\99רת ×\94ת×\99ק×\99×\99×\94 \"$1\" × ×\9bש×\9c×\94.",
+       "filecopyerror": "×\9c×\90 × ×\99ת×\9f ×\94×\99×\94 ×\9c×\94עת×\99ק ×\90ת ×\94ק×\95×\91×¥ \"$1\" ×\9cק×\95×\91×¥ \"$2\".",
+       "filerenameerror": "×\9c×\90 × ×\99ת×\9f ×\94×\99×\94 ×\9cשנ×\95ת ×\90ת ×©×\9d ×\94ק×\95×\91×¥ \"$1\" ×\9cש×\9d \"$2\".",
+       "filedeleteerror": "×\9c×\90 × ×\99ת×\9f ×\94×\99×\94 ×\9c×\9e×\97×\95ק ×\90ת ×\94ק×\95×\91×¥ \"$1\".",
+       "directorycreateerror": "×\9c×\90 × ×\99ת×\9f ×\94×\99×\94 ×\9c×\99צ×\95ר ×\90ת ×\94ת×\99ק×\99×\99×\94 \"$1\".",
        "directoryreadonlyerror": "התיקייה \"$1\" היא לקריאה בלבד.",
        "directorynotreadableerror": "התיקייה \"$1\" אינה ניתנת לקריאה.",
        "filenotfound": "הקובץ \"$1\" לא נמצא.",
-       "unexpected": "ערך לא צפוי: \"$1\"=\"$2\"",
+       "unexpected": "ערך לא צפוי: \"$1\"=\"$2\".",
        "formerror": "שגיאה: לא ניתן היה לשלוח את הטופס.",
        "badarticleerror": "לא ניתן לבצע את הפעולה הזאת בדף זה.",
        "cannotdelete": "לא ניתן היה למחוק את הדף או הקובץ \"$1\".\nייתכן שהוא כבר נמחק על־ידי משתמש אחר.",
        "delete-hook-aborted": "המחיקה הופסקה על־ידי מבנה Hook.\nלא ניתן הסבר.",
        "no-null-revision": "לא ניתן היה ליצור גרסת־דמה בדף \"$1\"",
        "badtitle": "כותרת שגויה",
-       "badtitletext": "כותרת הדף המבוקש הייתה בלתי־תקינה, ריקה, או קישור שגוי לשפה אחרת או למיזם אחר.\nייתכן שהיא מכילה תו אחד או יותר שאינו יכול לשמש בכותרות.",
+       "badtitletext": "כותרת הדף המבוקש הייתה בלתי תקינה, ריקה, או קישור שגוי לשפה אחרת או למיזם אחר.\nייתכן שהיא מכילה תו אחד או יותר שאינו יכול לשמש בכותרות.",
        "title-invalid-empty": "כותרת הדף המבוקש ריקה או מכילה רק שם של מרחב שם.",
-       "title-invalid-utf8": "כותרת הדף המבוקש מכילה רצף UTF-8 בלתי־תקין.",
+       "title-invalid-utf8": "כותרת הדף המבוקש מכילה רצף UTF-8 בלתי תקין.",
        "title-invalid-interwiki": "כותרת הדף המבוקש מכילה קישור בינוויקי, שלא ניתן להשתמש בו בכותרות.",
        "title-invalid-talk-namespace": "כותרת הדף המבוקש מפנה לדף שיחה שאינו יכול להתקיים.",
-       "title-invalid-characters": "כותרת הדף המבוקש מכילה תווים בלתי־תקינים: \"$1\".",
-       "title-invalid-relative": "×\91×\9b×\95תרת ×\99ש × ×ª×\99×\91 ×\99×\97ס×\99. ×\9b×\95תרת ×\93פ×\99×\9d ×\99×\97ס×\99×\95ת (./, ../) ×\90×\99× ×\9f ×ª×§×\99× ×\95ת, ×\9b×\99×\95×\95×\9f ×©×\9cעת×\99×\9d ×§×¨×\95×\91×\95ת ×\94×\9f ×\9c×\90 ×\99×\94×\99×\95 ×\91× ×\95ת־השגה כשתטופלנה על־ידי הדפדפן של המשתמש.",
-       "title-invalid-magic-tilde": "כותרת הדף המבוקש מכילה רצף טילדות מיוחד (<nowiki>~~~</nowiki>).",
-       "title-invalid-too-long": "כותרת הדף המבוקש ארוכה מדי. היא צריכה להיות לכל היותר באורך {{PLURAL:$1|בית אחד|$1 בתים}} בקידוד UTF-8.",
-       "title-invalid-leading-colon": "כותרת הדף המבוקש מכילה תו נקודתיים בלתי־תקין בתחילתה.",
-       "perfcached": "המידע הבא הוא עותק שמור בזיכרון המטמון של המידע, ועשוי שלא להיות מעודכן. לכל היותר {{PLURAL:$1|תוצאה אחת נשמרת|$1 תוצאות נשמרות}} בזיכרון המטמון.",
-       "perfcachedts": "המידע הבא הוא עותק שמור בזיכרון המטמון של המידע, שעודכן לאחרונה ב־$1. לכל היותר {{PLURAL:$4|תוצאה אחת נשמרת|$4 תוצאות נשמרות}} בזיכרון המטמון.",
+       "title-invalid-characters": "כותרת הדף המבוקש מכילה תווים בלתי תקינים: \"$1\".",
+       "title-invalid-relative": "×\91×\9b×\95תרת ×\99ש × ×ª×\99×\91 ×\99×\97ס×\99. ×\9b×\95תרת ×\93פ×\99×\9d ×\99×\97ס×\99×\95ת (./, ../) ×\90×\99× ×\9f ×ª×§×\99× ×\95ת, ×\9eש×\95×\9d ×©×\9cעת×\99×\9d ×§×¨×\95×\91×\95ת ×\94×\9f ×\99×\94×\99×\95 ×\91×\9cת×\99Ö¾× ×\99תנ×\95ת ×\9cהשגה כשתטופלנה על־ידי הדפדפן של המשתמש.",
+       "title-invalid-magic-tilde": "כותרת הדף המבוקש מכילה רצף טילדות מיוחד שאינו תקין (<nowiki>~~~</nowiki>).",
+       "title-invalid-too-long": "כותרת הדף המבוקש ארוכה מדי. היא צריכה להיות לכל היותר באורך של {{PLURAL:$1|בייט אחד|$1 בייטים}} בקידוד UTF-8.",
+       "title-invalid-leading-colon": "כותרת הדף המבוקש מכילה תו נקודתיים בלתי תקין בתחילתה.",
+       "perfcached": "המידע הבא הוא עותק שמור בזיכרון המטמון, ועשוי שלא להיות מעודכן. לכל היותר {{PLURAL:$1|תוצאה אחת נשמרת|$1 תוצאות נשמרות}} בזיכרון המטמון.",
+       "perfcachedts": "המידע הבא הוא עותק שמור בזיכרון המטמון, שעודכן לאחרונה ב־$1. לכל היותר {{PLURAL:$4|תוצאה אחת נשמרת|$4 תוצאות נשמרות}} בזיכרון המטמון.",
        "querypage-no-updates": "העדכונים לדף זה כרגע מופסקים, והמידע לא יעודכן באופן שוטף.",
        "viewsource": "הצגת מקור",
        "viewsource-title": "הצגת המקור של הדף \"$1\"",
        "translateinterface": "כדי להוסיף או לשנות תרגומים של הודעות מערכת עבור כל אתרי הוויקי, יש להשתמש ב־[https://translatewiki.net/ translatewiki.net], פרויקט התרגום של מדיה־ויקי.",
        "cascadeprotected": "דף זה מוגן מעריכה כי הוא מוכלל {{PLURAL:$1|בדף הבא, שמופעלת עליו|בדפים הבאים, שמופעלת עליהם}} הגנה מדורגת:\n$2",
        "namespaceprotected": "אין {{GENDER:|לך|לך|לכם}} הרשאה לערוך דפים במרחב השם <strong>$1</strong>.",
-       "customcssprotected": "×\90×\99× ×\9a ×\9e×\95רש×\94 ×\9cער×\95×\9a ×\93×£ CSS ×\96×\94 ×\9b×\99×\95×\95×\9f ×©×\94×\95×\90 ×\9b×\95×\9cל הגדרות אישיות של משתמש אחר.",
-       "customjsprotected": "×\90×\99× ×\9a ×\9e×\95רש×\94 ×\9cער×\95×\9a ×\93×£ JavaScript ×\96×\94 ×\9b×\99×\95×\95×\9f ×©×\94×\95×\90 ×\9b×\95×\9cל הגדרות אישיות של משתמש אחר.",
-       "mycustomcssprotected": "אין לך הרשאה לערוך דף CSS זה.",
-       "mycustomjsprotected": "אין לך הרשאה לערוך דף JavaScript זה.",
-       "myprivateinfoprotected": "אין לך הרשאה לערוך את המידע הפרטי שלך.",
-       "mypreferencesprotected": "אין לך הרשאה לערוך את ההעדפות שלך.",
+       "customcssprotected": "×\90×\99×\9f {{GENDER:|×\9c×\9a\9c×\9a\9c×\9b×\9d}} ×\94רש×\90×\94 ×\9cער×\95×\9a ×\90ת ×\93×£ ×\94Ö¾CSS ×\94×\96×\94, ×\9eש×\95×\9d ×©×\94×\95×\90 ×\9e×\9b×\99ל הגדרות אישיות של משתמש אחר.",
+       "customjsprotected": "×\90×\99×\9f {{GENDER:|×\9c×\9a\9c×\9a\9c×\9b×\9d}} ×\94רש×\90×\94 ×\9cער×\95×\9a ×\90ת ×\93×£ ×\94Ö¾JavaScript ×\94×\96×\94, ×\9eש×\95×\9d ×©×\94×\95×\90 ×\9e×\9b×\99ל הגדרות אישיות של משתמש אחר.",
+       "mycustomcssprotected": "אין {{GENDER:|לך|לך|לכם}} הרשאה לערוך את דף ה־CSS הזה.",
+       "mycustomjsprotected": "אין {{GENDER:|לך|לך|לכם}} הרשאה לערוך את דף ה־JavaScript הזה.",
+       "myprivateinfoprotected": "אין {{GENDER:|לך|לך|לכם}} הרשאה לערוך את המידע הפרטי {{GENDER:|שלך|שלך|שלכם}}.",
+       "mypreferencesprotected": "אין {{GENDER:|לך|לך|לכם}} הרשאה לערוך את ההעדפות {{GENDER:|שלך|שלך|שלכם}}.",
        "ns-specialprotected": "לא ניתן לערוך דפים מיוחדים.",
-       "titleprotected": "[[User:$1|$1]] {{GENDER:$1|×\94פע×\99×\9c\94פע×\99×\9c×\94}} ×\94×\92× ×\94 ×¢×\9c ×\94×\93×£ ×\94×\96×\94 ×\9eפנ×\99 ×\99צ×\99ר×\94.\n×\94ס×\99×\91×\94 ×©× ×\99תנ×\94 ×\9c×\9b×\9a ×\94×\99×\90 <em>$2</em>.",
+       "titleprotected": "[[User:$1|$1]] {{GENDER:$1|×\94פע×\99×\9c\94פע×\99×\9c×\94}} ×¢×\9c ×\94×\93×£ ×\94×\96×\94 ×\94×\92× ×\94 ×\9eפנ×\99 ×\99צ×\99ר×\94.\n×\94ס×\99×\91×\94 ×©× ×\99תנ×\94 ×\9c×\94×\92× ×\94 ×\94×\99×\90: <em>$2</em>.",
        "filereadonlyerror": "לא ניתן לשנות את הקובץ \"$1\" כיוון שמאגר הקבצים \"$2\" במצב קריאה בלבד.\n\nמנהל המערכת שנעל את המאגר סיפק את ההסבר הבא: \"'''$3'''\".",
        "invalidtitle-knownnamespace": "כותרת בלתי־תקינה עם מרחב השם \"$2\" ושם דף \"$3\"",
        "invalidtitle-unknownnamespace": "כותרת בלתי־תקינה עם מרחב שם בלתי־ידוע מספר $1 ושם דף \"$2\"",
        "eauthentsent": "דוא\"ל אימות נשלח לכתובת הדוא\"ל שצוינה.\nלפני שדברי דוא\"ל אחרים יישלחו לחשבון הזה, יהיה עליכם לפעול לפי ההוראות בדוא\"ל, כדי לאשר שהחשבון אכן שייך לכם.",
        "throttled-mailpassword": "כבר נשלח דוא\"ל לאיפוס הסיסמה ב{{PLURAL:$1|שעה האחרונה|שעתיים האחרונות|־$1 השעות האחרונות}}.\nכדי למנוע ניצול לרעה, יכול להישלח רק דוא\"ל אחד כזה בכל {{PLURAL:$1|שעה|שעתיים|$1 שעות}}.",
        "mailerror": "שגיאה בשליחת דואר: $1",
-       "acct_creation_throttle_hit": "×\9e×\91קר×\99×\9d ×\91×\90תר ×\96×\94 ×\93ר×\9a ×\9bת×\95×\91ת ×\94Ö¾IP ×©×\9c×\9b×\9d ×\9b×\91ר ×\99צר×\95 {{PLURAL:$1|×\97ש×\91×\95×\9f ×\90×\97×\93|$1 ×\97ש×\91×\95× ×\95ת}} ×\91×\99×\95×\9d ×\94×\90×\97ר×\95×\9f. ×\96×\94×\95 ×\94×\9eקס×\99×\9e×\95×\9d ×\94×\9e×\95תר ×\91תק×\95פ×\94 ×\96×\95.\n×\9cפ×\99×\9b×\9a, ×\9e×\91קר×\99×\9d ×\93ר×\9a ×\9bת×\95×\91ת ×\94Ö¾IP ×\94×\96×\90ת ×\9c×\90 ×\99×\9b×\95×\9c×\99×\9d ×\9c×\99צ×\95ר ×\97ש×\91×\95× ×\95ת × ×\95ספ×\99×\9d ×\91ר×\92×¢ ×\96×\94.",
+       "acct_creation_throttle_hit": "×\9e×\91קר×\99×\9d ×\91×\90תר ×\96×\94 ×\93ר×\9a ×\9bת×\95×\91ת ×\94Ö¾IP ×©×\9c×\9a ×\9b×\91ר ×\99צר×\95 {{PLURAL:$1|×\97ש×\91×\95×\9f ×\90×\97×\93|$1 ×\97ש×\91×\95× ×\95ת}} ×\91×\9e×\94×\9c×\9a $2. ×\96×\94×\95 ×\94×\9eקס×\99×\9e×\95×\9d ×\94×\9e×\95תר ×\91תק×\95פ×\94 ×\96×\95.\n×\9cפ×\99×\9b×\9a, ×\9bר×\92×¢ ×\9c×\90 × ×\99ת×\9f ×\9c×\99צ×\95ר ×\97ש×\91×\95× ×\95ת × ×\95ספ×\99×\9d ×\9e×\9bת×\95×\91ת ×\94Ö¾IP ×\94×\96×\95.",
        "emailauthenticated": "כתובת הדוא\"ל שלך אומתה ב־$2 בשעה $3.",
        "emailnotauthenticated": "כתובת הדוא\"ל שלכם עדיין לא אומתה.\nלא יישלח אליכם דוא\"ל עבור אף אחת מהתכונות הבאות.",
        "noemailprefs": "יש לציין כתובת דוא\"ל בהעדפות שלך כדי שתכונות אלה יעבדו.",
        "botpasswords-label-resetpassword": "איפוס ססמה",
        "botpasswords-label-grants": "זיכיונות מתאימים",
        "botpasswords-help-grants": "כל זיכיון נותן גישה להרשאות משתמש רשומות שיש לחשבון המשתמש. עיינו ב[[Special:ListGrants|טבלת הזיכיונות]] למידע נוסף.",
-       "botpasswords-label-restrictions": "הגבלות שימוש:",
        "botpasswords-label-grants-column": "ניתן זיכיון",
        "botpasswords-bad-appid": "שם הבוט \"$1\" אינו תקין.",
        "botpasswords-insert-failed": "הוספת שם הבוט \"$1\" נכשלה. האם הוא כבר נוסף?",
        "passwordreset-emailelement": "שם משתמש:\n$1\n\nסיסמה זמנית:\n$2",
        "passwordreset-emailsentemail": "אם כתובת הדואר האלקטרוני הזאת משויכת לחשבון שלך, אז יישלח דואר אלקטרוני לאיפוס הסיסמה.",
        "passwordreset-emailsentusername": "אם יש כתובת דואר אלקטרוני שמשויכת לשם המשתמש הזה, אז יישלח דואר אלקטרוני לאיפוס הסיסמה.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|×\93×\95×\90\"×\9c ×\90×\99פ×\95ס ×\94ס×\99ס×\9e×\94 × ×©×\9c×\97\94×\95×\93×¢×\95ת ×\93×\95×\90\"×\9c ×©×\9c ×\90×\99פ×\95ס ×\94ס×\99ס×\9e×\94 × ×©×\9c×\97×\95}}. {{PLURAL:$1|ש×\9d ×\94×\9eשת×\9eש×\99×\9d ×\95×\94ס×\99ס×\9e×\94 ×\9e×\95צ×\92×\99×\9d|רש×\99×\9e×\94 ×©×\9c ×©×\9e×\95ת ×\94×\9eשת×\9eש×\99×\9d ×\95×\94ס×\99ס×\9e×\90×\95ת ×\9e×\95צ×\92ת}} ×\9c×\94×\9cן.",
-       "passwordreset-emailerror-capture2": "×\9c×\90 × ×\99ת×\9f ×\94×\99×\94 ×\9cש×\9c×\95×\97 ×\93×\95×\90\"×\9c ×\9c{{GENDER:$2|×\9eשת×\9eש|×\9eשת×\9eשת}}: $1 {{PLURAL:$3|ש×\9d ×\94×\9eשת×\9eש ×\95×\94ס×\99ס×\9e×\94 ×\9e×\95צ×\92×\99×\9d|רש×\99×\9e×\94 ×©×\9c ×©×\9e×\95ת ×\94×\9eשת×\9eש×\99×\9d ×\95×\94ס×\99ס×\9e×\90×\95ת ×\9e×\95צ×\92ת}} ×\9c×\94×\9cן.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|×\93×\95×\90\"×\9c ×\90×\99פ×\95ס ×\94ס×\99ס×\9e×\94 × ×©×\9c×\97\94×\95×\93×¢×\95ת ×\93×\95×\90\"×\9c ×©×\9c ×\90×\99פ×\95ס ×\94ס×\99ס×\9e×\94 × ×©×\9c×\97×\95}}. {{PLURAL:$1|ש×\9d ×\94×\9eשת×\9eש×\99×\9d ×\95×\94ס×\99ס×\9e×\94 ×\9e×\95צ×\92×\99×\9d|רש×\99×\9e×\94 ×©×\9c ×©×\9e×\95ת ×\94×\9eשת×\9eש×\99×\9d ×\95×\94ס×\99ס×\9e×\90×\95ת ×\9e×\95צ×\92ת}} ×\9b×\90ן.",
+       "passwordreset-emailerror-capture2": "×\9c×\90 × ×\99ת×\9f ×\94×\99×\94 ×\9cש×\9c×\95×\97 ×\93×\95×\90\"×\9c ×\9c{{GENDER:$2|×\9eשת×\9eש|×\9eשת×\9eשת}}: $1 {{PLURAL:$3|ש×\9d ×\94×\9eשת×\9eש ×\95×\94ס×\99ס×\9e×\94 ×\9e×\95צ×\92×\99×\9d|רש×\99×\9e×\94 ×©×\9c ×©×\9e×\95ת ×\94×\9eשת×\9eש×\99×\9d ×\95×\94ס×\99ס×\9e×\90×\95ת ×\9e×\95צ×\92ת}} ×\9b×\90ן.",
        "passwordreset-nocaller": "לא סופק הקורא הנדרש",
        "passwordreset-nosuchcaller": "הקורא אינו קיים: $1",
        "passwordreset-ignored": "איפוס הסיסמה לא בוצע. ייתכן שלא הוגדר ספק.",
        "searchprofile-advanced-tooltip": "חיפוש במרחבי שם מותאמים אישית",
        "search-result-size": "$1 ({{PLURAL:$2|מילה אחת|$2 מילים}})",
        "search-result-category-size": "{{PLURAL:$1|פריט אחד|$1 פריטים}} ({{PLURAL:$2|קטגוריית משנה אחת|$2 קטגוריות משנה}}, {{PLURAL:$3|קובץ אחד|$3 קבצים}})",
-       "search-redirect": "(הפניה $1)",
+       "search-redirect": "(הפניה מהדף $1)",
        "search-section": "(פסקה $1)",
        "search-category": "(קטגוריה $1)",
        "search-file-match": "(התאמה בתוכן הקובץ)",
        "grant-basic": "הרשאות בסיסיות",
        "grant-viewdeleted": "צפייה בקבצים ודפים שנמחקו",
        "grant-viewmywatchlist": "צפייה ברשימת המעקב שלך",
+       "grant-viewrestrictedlogs": "צפייה בפריטי יומן מוגבלים",
        "newuserlogpage": "יומן רישום משתמשים",
        "newuserlogpagetext": "זהו יומן המכיל הרשמות של משתמשים.",
        "rightslog": "יומן הרשאות",
        "upload-dialog-disabled": "אין אפשרות להעלות קבצים באמצעות תיבת הדו־שיח הזאת באתר זה.",
        "upload-dialog-title": "העלאת קובץ",
        "upload-dialog-button-cancel": "ביטול",
+       "upload-dialog-button-back": "חזרה",
        "upload-dialog-button-done": "בוצע",
        "upload-dialog-button-save": "שמירה",
        "upload-dialog-button-upload": "העלאה",
        "apisandbox-results-fixtoken-fail": "קבלת האסימון \"$1\" נכשלה.",
        "apisandbox-alert-page": "שדות בדף זה אינם תקינים.",
        "apisandbox-alert-field": "הערך של שדה זה אינו תקין.",
+       "apisandbox-continue": "המשך",
+       "apisandbox-continue-clear": "ניקוי",
+       "apisandbox-continue-help": "\"{{int:apisandbox-continue}}\" [https://www.mediawiki.org/wiki/API:Query#Continuing_queries ימשיך] את הבקשה האחרונה; \"{{int:apisandbox-continue-clear}}\" ינקה את הפרמטרים הקשורים להמשך.",
        "booksources": "משאבי ספרות חיצוניים",
        "booksources-search-legend": "חיפוש משאבי ספרות חיצוניים",
        "booksources-isbn": "מסת\"ב (ISBN):",
        "watcherrortext": "אירעה שגיאה בעת שינוי הגדרות רשימת המעקב של \"$1\".",
        "enotif_reset": "סימון כל הדפים כאילו נצפו",
        "enotif_impersonal_salutation": "משתמש ב{{GRAMMAR:תחילית|{{SITENAME}}}}",
-       "enotif_subject_deleted": "הדף $1 ב{{grammar:תחילית|{{SITENAME}}}} נמחק על־ידי $2",
-       "enotif_subject_created": "הדף $1 ב{{grammar:תחילית|{{SITENAME}}}} נוצר על־ידי $2",
-       "enotif_subject_moved": "הדף $1 ב{{grammar:תחילית|{{SITENAME}}}} הועבר על־ידי $2",
-       "enotif_subject_restored": "הדף $1 ב{{grammar:תחילית|{{SITENAME}}}} שוחזר על־ידי $2",
-       "enotif_subject_changed": "הדף $1 ב{{grammar:תחילית|{{SITENAME}}}} שונה על־ידי $2",
-       "enotif_body_intro_deleted": "הדף $1 ב{{grammar:תחילית|{{SITENAME}}}} נמחק ב־$PAGEEDITDATE על ידי $2, ראו $3.",
-       "enotif_body_intro_created": "הדף $1 ב{{grammar:תחילית|{{SITENAME}}}} נוצר ב־$PAGEEDITDATE על ידי $2, ראו $3 לגרסה הנוכחית.",
-       "enotif_body_intro_moved": "הדף $1 ב{{grammar:תחילית|{{SITENAME}}}} הועבר ב־$PAGEEDITDATE על ידי $2, ראו $3 לגרסה הנוכחית.",
-       "enotif_body_intro_restored": "הדף $1 ב{{grammar:תחילית|{{SITENAME}}}} שוחזר ב־$PAGEEDITDATE על ידי $2, ראו $3 לגרסה הנוכחית.",
-       "enotif_body_intro_changed": "הדף $1 ב{{grammar:תחילית|{{SITENAME}}}} שונה ב־$PAGEEDITDATE על ידי $2, ראו $3 לגרסה הנוכחית.",
-       "enotif_lastvisited": "ראו $1 לכל השינויים מאז ביקורכם האחרון.",
+       "enotif_subject_deleted": "הדף \"$1\" ב{{grammar:תחילית|{{SITENAME}}}} נמחק על־ידי $2",
+       "enotif_subject_created": "הדף \"$1\" ב{{grammar:תחילית|{{SITENAME}}}} נוצר על־ידי $2",
+       "enotif_subject_moved": "הדף \"$1\" ב{{grammar:תחילית|{{SITENAME}}}} הועבר על־ידי $2",
+       "enotif_subject_restored": "הדף \"$1\" ב{{grammar:תחילית|{{SITENAME}}}} שוחזר על־ידי $2",
+       "enotif_subject_changed": "הדף \"$1\" ב{{grammar:תחילית|{{SITENAME}}}} שוּנה על־ידי $2",
+       "enotif_body_intro_deleted": "הדף \"$1\" באתר {{SITENAME}} נמחק ב־$PAGEEDITDATE על־ידי $2; ראו $3.",
+       "enotif_body_intro_created": "הדף \"$1\" באתר {{SITENAME}} נוצר ב־$PAGEEDITDATE על־ידי $2; ראו $3 לגרסה הנוכחית של הדף.",
+       "enotif_body_intro_moved": "הדף \"$1\" באתר {{SITENAME}} הועבר ב־$PAGEEDITDATE על־ידי $2; ראו $3 לגרסה הנוכחית של הדף.",
+       "enotif_body_intro_restored": "הדף \"$1\" באתר {{SITENAME}} שוחזר ב־$PAGEEDITDATE על־ידי $2; ראו $3 לגרסה הנוכחית של הדף.",
+       "enotif_body_intro_changed": "הדף \"$1\" באתר {{SITENAME}} שוּנה ב־$PAGEEDITDATE על־ידי $2; ראו $3 לגרסה הנוכחית של הדף.",
+       "enotif_lastvisited": "ראו $1 לכל השינויים מאז ביקורכם האחרון בדף.",
        "enotif_lastdiff": "ראו $1 לשינוי זה.",
        "enotif_anon_editor": "משתמש אנונימי $1",
-       "enotif_body": "×\9c×\9b×\91×\95×\93 $WATCHINGUSERNAME,\n\n$PAGEINTRO $NEWPAGE\n\nתקצ×\99ר ×\94ער×\99×\9b×\94: $PAGESUMMARY $PAGEMINOREDIT\n\n×\91×\90פשר×\95ת×\9b×\9d ×\9c×\99צ×\95ר ×§×©×¨ ×¢×\9d ×\94×¢×\95ר×\9a:\n×\91×\93×\95×\90ר ×\94×\90×\9cק×\98ר×\95× ×\99: $PAGEEDITOR_EMAIL\n×\91×\90תר: $PAGEEDITOR_WIKI\n\n×\9c×\90 ×ª×\94×\99×\99× ×\94 ×\94×\95×\93×¢×\95ת ×¢×\9c ×¤×¢×\95×\9c×\95ת × ×\95ספ×\95ת ×¢×\93 ×©×ª×\91קר×\95 ×\91×\93×£ ×\9bש×\90ת×\9d ×\9e×\97×\95×\91ר×\99×\9d ×\9c×\97ש×\91×\95×\9f. ×\91×\90פשר×\95ת×\9b×\9d ×\92×\9d ×\9c×\90פס ×\90ת ×\93×\92×\9c×\99 ×\94×\94×\95×\93×¢×\95ת ×\91×\9b×\9c ×\94×\93פ×\99×\9d ×©×\91רש×\99×\9eת ×\94×\9eעק×\91.\n\n×\9eער×\9bת ×\94×\94×\95×\93×¢×\95ת ×©×\9c {{SITENAME}}\n\n--\n×\9b×\93×\99 ×\9cשנ×\95ת ×\90ת ×\94×\94×\92×\93ר×\95ת ×©×\9c ×\94×\95×\93×¢×\95ת ×\94×\93×\95×\90\"×\9c ×\94נש×\9c×\97×\95ת ×\90×\9c×\99×\9b×\9d, ×\91קר×\95 ×\91×\93×£\n{{canonicalurl:{{#special:Preferences}}}}\n\n×\9b×\93×\99 ×\9cשנ×\95ת ×\90ת ×\94×\92×\93ר×\95ת ×¨×©×\99×\9eת ×\94×\9eעק×\91, ×\91קר×\95 ×\91×\93×£\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\n×\9b×\93×\99 ×\9c×\9e×\97×\95ק ×\90ת ×\94×\93×£ ×\9eרש×\99×\9eת ×\94×\9eעק×\91 ×©×\9c×\9b×\9d, ×\91קר×\95 ×\91×\93×£\n$UNWATCHURL\n\nלמשוב ולעזרה נוספת:\n$HELPPAGE",
+       "enotif_body": "×\9c×\9b×\91×\95×\93 $WATCHINGUSERNAME,\n\n$PAGEINTRO $NEWPAGE\n\nתקצ×\99ר ×\94ער×\99×\9b×\94: $PAGESUMMARY $PAGEMINOREDIT\n\n×\91×\90פשר×\95ת×\9b×\9d ×\9c×\99צ×\95ר ×§×©×¨ ×¢×\9d ×\94×¢×\95ר×\9a:\n×\91×\93×\95×\90ר ×\90×\9cק×\98ר×\95× ×\99: $PAGEEDITOR_EMAIL\n×\91×\90תר: $PAGEEDITOR_WIKI\n\n×\9c×\90 ×ª×§×\91×\9c×\95 ×\94×\95×\93×¢×\95ת ×¢×\9c ×¤×¢×\95×\9c×\95ת × ×\95ספ×\95ת ×¢×\93 ×©×ª×\91קר×\95 ×\91×\93×£ ×\94×\96×\94 ×\9bש×\90ת×\9d ×\9e×\97×\95×\91ר×\99×\9d ×\9c×\97ש×\91×\95×\9f. ×\91×\90פשר×\95ת×\9b×\9d ×\92×\9d ×\9c×\90פס ×\90ת ×\93×\92×\9c×\99 ×\94×\94×\95×\93×¢×\95ת ×¢×\91×\95ר ×\9b×\9c ×\94×\93פ×\99×\9d ×©×\91רש×\99×\9eת ×\94×\9eעק×\91 ×©×\9c×\9b×\9d.\n\n×\91×\91ר×\9b×\94, ×\9eער×\9bת ×\94×\94×\95×\93×¢×\95ת ×©×\9c {{SITENAME}}.\n\n--\n×\9b×\93×\99 ×\9cשנ×\95ת ×\90ת ×\94×\94×\92×\93ר×\95ת ×©×\9c ×\94×\95×\93×¢×\95ת ×\94×\93×\95×\90\"×\9c ×\94נש×\9c×\97×\95ת ×\90×\9c×\99×\9b×\9d, ×\91קר×\95 ×\91×\93×£:\n{{canonicalurl:{{#special:Preferences}}}}\n\n×\9b×\93×\99 ×\9cשנ×\95ת ×\90ת ×\94×\94×\92×\93ר×\95ת ×©×\9c ×¨×©×\99×\9eת ×\94×\9eעק×\91 ×©×\9c×\9b×\9d, ×\91קר×\95 ×\91×\93×£:\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\n×\9b×\93×\99 ×\9c×\94ס×\99ר ×\90ת ×\94×\93×£ ×\94×\96×\94 ×\9eרש×\99×\9eת ×\94×\9eעק×\91 ×©×\9c×\9b×\9d, ×\91קר×\95 ×\91×\93×£:\n$UNWATCHURL\n\nלמשוב ולעזרה נוספת:\n$HELPPAGE",
        "created": "נוצר",
-       "changed": "שונה",
+       "changed": "שוּנה",
        "deletepage": "מחיקת הדף",
        "confirm": "אישור",
        "excontent": "התוכן היה: \"$1\"",
        "delete-edit-reasonlist": "עריכת סיבות המחיקה",
        "delete-toobig": "דף זה כולל מעל {{PLURAL:$1|גרסה אחת|$1 גרסאות}} בהיסטוריית העריכות שלו. מחיקת דפים כאלה הוגבלה כדי למנוע פגיעה בביצועי האתר.",
        "delete-warning-toobig": "דף זה כולל מעל {{PLURAL:$1|גרסה אחת|$1 גרסאות}} בהיסטוריית העריכות שלו. מחיקה שלו עלולה להפריע לפעולות בבסיס הנתונים; אנא שקלו שנית את המחיקה.",
-       "deleteprotected": "אין באפשרותך למחוק את הדף כי הוא מוגן.",
+       "deleteprotected": "אין {{GENDER:|באפשרותך|באפשרותך|באפשרותכם}} למחוק את הדף כי הוא מוגן.",
        "deleting-backlinks-warning": "<strong>אזהרה:</strong> [[Special:WhatLinksHere/{{FULLPAGENAME}}|דפים אחרים]] מקשרים לדף ש{{GENDER:|אתה עומד|את עומדת|אתם עומדים}} למחוק או מכלילים אותו.",
        "rollback": "שחזור עריכות",
        "rollbacklink": "שחזור",
        "movelogpagetext": "להלן רשימה של כל הדפים ששמם שוּנה.",
        "movesubpage": "{{PLURAL:$1|דף משנה|דפי משנה}}",
        "movesubpagetext": "לדף זה יש {{PLURAL:$1|דף משנה אחד המוצג להלן|$1 דפי משנה המוצגים להלן}}.",
+       "movesubpagetalktext": "לדף השיחה של דף זה יש {{PLURAL:$1|דף משנה אחד המוצג להלן|$1 דפי משנה המוצגים להלן}}.",
        "movenosubpage": "לדף זה אין דפי משנה.",
        "movereason": "סיבה:",
        "revertmove": "החזרה",
        "pageinfo-category-pages": "מספר הדפים",
        "pageinfo-category-subcats": "מספר קטגוריות המשנה",
        "pageinfo-category-files": "מספר הקבצים",
+       "pageinfo-user-id": "המספר המזהה של המשתמש",
        "markaspatrolleddiff": "סימון השינוי כבדוק",
        "markaspatrolledtext": "סימון דף זה כבדוק",
        "markaspatrolledtext-file": "סימון גרסת קובץ זו כבדוקה",
        "newimages-showbots": "הצגת העלאות שבוצעו על־ידי בוטים",
        "newimages-hidepatrolled": "הסתרת העלאות בדוקות",
        "noimages": "אין קבצים.",
+       "gallery-slideshow-toggle": "הצגת/הסתרת תמונות ממוזערות",
        "ilsubmit": "חיפוש",
        "bydate": "לפי תאריך",
        "sp-newimages-showfrom": "הצגת קבצים חדשים החל מ־$2, $1",
        "tags-update-remove-not-allowed-multi": "לא ניתן להסיר את {{PLURAL:$2|התגית הבאה|התגיות הבאות}} ידנית: $1",
        "tags-edit-title": "עריכת תגיות",
        "tags-edit-manage-link": "ניהול תגיות",
-       "tags-edit-revision-selected": "{{PLURAL:$1|הגרסה שנבחרה|הגרסאות שנבחרו}} מתוך [[:$2]]:",
+       "tags-edit-revision-selected": "{{PLURAL:$1|הגרסה שנבחרה|הגרסאות שנבחרו}} מתוך הדף [[:$2]]:",
        "tags-edit-logentry-selected": "{{PLURAL:$1|פעולת היומן שנבחרה|פעולות היומן שנבחרו}}:",
-       "tags-edit-revision-legend": "×\94×\95ספ×\94 ×©×\9c ×ª×\92×\99×\95ת {{PLURAL:$1|×\9c×\92רס×\94 ×\94×\96×\90ת|×\9c×\9b×\9c $1 ×\94×\92רס×\90×\95ת}} ×\90×\95 ×\94סרת×\9f",
+       "tags-edit-revision-legend": "×\94×\95ספ×\94 ×\90×\95 ×\94סר×\94 ×©×\9c ×ª×\92×\99×\95ת {{PLURAL:$1|×\9e×\92רס×\94 ×\96×\95\9eÖ¾$1 ×\92רס×\90×\95ת}}",
        "tags-edit-logentry-legend": "הוספה של תגיות {{PLURAL:$1|לרשומת היומן הזאת|לכל $1 רשומות היומן}} או הסרתן",
-       "tags-edit-existing-tags": "ת×\92×\99×\95ת ×§×\99×\99×\9eות:",
+       "tags-edit-existing-tags": "×\94ת×\92×\99×\95ת ×\94× ×\95×\9b×\97×\99ות:",
        "tags-edit-existing-tags-none": "<em>אין</em>",
        "tags-edit-new-tags": "תגיות חדשות:",
        "tags-edit-add": "הוספת התגיות הבאות:",
        "tags-edit-remove": "הסרת התגיות הבאות:",
        "tags-edit-remove-all-tags": "(הסרת כל התגיות)",
-       "tags-edit-chosen-placeholder": "×\91×\97×\99רת ×ª×\92×\99×\95ת ×\9eס×\95×\99×\9eות",
+       "tags-edit-chosen-placeholder": "× ×\90 ×\9c×\91×\97×\95ר ×ª×\92×\99ות",
        "tags-edit-chosen-no-results": "לא נמצאו תגיות מתאימות",
        "tags-edit-reason": "סיבה:",
-       "tags-edit-revision-submit": "×\94×\97×\9cת ×©×\99× ×\95×\99×\99×\9d {{PLURAL:$1|×\9c×\92רס×\94 ×\94×\96×\90ת|ל־$1 גרסאות}}",
-       "tags-edit-logentry-submit": "×\94×\97×\9cת ×©×\99× ×\95×\99×\99×\9d {{PLURAL:$1|×\9cרש×\95×\9eת ×\94×\99×\95×\9e×\9f ×\94×\96×\90ת|×\9cÖ¾$1 ×¨×©×\95×\9eת ×\94יומן}}",
+       "tags-edit-revision-submit": "×\94×\97×\9cת ×\94ש×\99× ×\95×\99×\99×\9d {{PLURAL:$1|×\9c×\92רס×\94 ×\96×\95|ל־$1 גרסאות}}",
+       "tags-edit-logentry-submit": "×\94×\97×\9cת ×\94ש×\99× ×\95×\99×\99×\9d {{PLURAL:$1|×\9cרש×\95×\9eת ×\94×\99×\95×\9e×\9f ×\94×\96×\95\9cÖ¾$1 ×¨×©×\95×\9e×\95ת יומן}}",
        "tags-edit-success": "השינויים הוחלו.",
        "tags-edit-failure": "החלת השינויים נכשלה:\n$1",
        "tags-edit-nooldid-title": "גרסת היעד אינה תקינה",
        "htmlform-cloner-create": "הוספה",
        "htmlform-cloner-delete": "הסרה",
        "htmlform-cloner-required": "דרוש לפחות ערך אחד.",
+       "htmlform-date-placeholder": "YYYY-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "YYYY-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "הערך שכתבת אינו תאריך מוכר. ניתן להשתמש בפורמט YYYY-MM-DD.",
+       "htmlform-time-invalid": "הערך שכתבת אינו שעה מוכרת. ניתן להשתמש בפורמט HH:MM:SS.",
+       "htmlform-datetime-invalid": "הערך שכתבת אינו תאריך ושעה מוכרים. ניתן להשתמש בפורמט YYYY-MM-DD HH:MM:SS.",
+       "htmlform-date-toolow": "הערך שכתבת הוא לפני התאריך המוקדם ביותר האפשרי, $1.",
+       "htmlform-date-toohigh": "הערך שכתבת הוא אחרי התאריך המאוחר ביותר האפשרי, $1.",
+       "htmlform-time-toolow": "הערך שכתבת הוא לפני השעה המוקדמת ביותר האפשרית, $1.",
+       "htmlform-time-toohigh": "הערך שכתבת הוא אחרי השעה המאוחרת ביותר האפשרית, $1.",
+       "htmlform-datetime-toolow": "הערך שכתבת הוא לפני התאריך והשעה המוקדמים ביותר האפשריים, $1.",
+       "htmlform-datetime-toohigh": "הערך שכתבת הוא אחרי התאריך והשעה המאוחרים ביותר האפשריים, $1.",
        "htmlform-title-badnamespace": "[[:$1]] אינו במרחב השם \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" אינו שם של דף שאפשר ליצור",
        "htmlform-title-not-exists": "$1 אינו קיים.",
        "htmlform-user-not-exists": "<strong>$1</strong> אינו קיים.",
        "htmlform-user-not-valid": "<strong>$1</strong> אינו שם משתמש תקין.",
-       "sqlite-has-fts": "$1 עם תמיכה בחיפוש בטקסט מלא",
-       "sqlite-no-fts": "$1 ללא תמיכה בחיפוש בטקסט מלא",
        "logentry-delete-delete": "$1 {{GENDER:$2|מחק|מחקה}} את הדף $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|שחזר|שחזרה}} את הדף $3",
        "logentry-delete-event": "$1 {{GENDER:$2|שינה|שינתה}} את מצב התצוגה של {{PLURAL:$5|פעולת יומן|$5 פעולות יומן}} של $3: $4",
        "feedback-external-bug-report-button": "דיווח על משימה טכנית",
        "feedback-dialog-title": "שליחת המשוב",
        "feedback-dialog-intro": "באפשרותך להשתמש בטופס הפשוט שלהלן כדי לשלוח משוב. ההערה שלך תתווסף לדף \"$1\", יחד עם שם המשתמש שלך.",
-       "feedback-error-title": "שגיאה",
        "feedback-error1": "שגיאה: תוצאה לא מזוהה מה־API",
        "feedback-error2": "שגיאה: העריכה נכשלה",
        "feedback-error3": "שגיאה: אין תשובה מה־API",
        "feedback-thanks": "תודה! המשוב שלך פורסם בדף \"[$2 $1]\".",
        "feedback-thanks-title": "תודה!",
        "feedback-useragent": "User agent:",
-       "searchsuggest-search": "חיפוש",
+       "searchsuggest-search": "חיפוש ב{{grammar:תחילית|{{SITENAME}}}}",
        "searchsuggest-containing": "כולל...",
        "api-error-autoblocked": "כתובת ה־IP שלך נחסמה אוטומטית, כי היא הייתה בשימוש על־ידי משתמש חסום.",
        "api-error-badaccess-groups": "אינך מורשה להעלות קבצים לאתר הוויקי הזה.",
        "unlinkaccounts-success": "קישור החשבון בוטל.",
        "authenticationdatachange-ignored": "השינוי בנתוני האימות לא הצליח. ייתכן שלא הוגדר ספק.",
        "userjsispublic": "שימו לב: משתמשים אחרים יכולים לצפות בדפי ה־JavaScript שלכם, ולכן אין לכלול בהם מידע סודי.",
-       "usercssispublic": "שימו לב: משתמשים אחרים יכולים לצפות בדפי ה־CSS שלכם, ולכן אין לכלול בהם מידע סודי."
+       "usercssispublic": "שימו לב: משתמשים אחרים יכולים לצפות בדפי ה־CSS שלכם, ולכן אין לכלול בהם מידע סודי.",
+       "restrictionsfield-badip": "כתובת או טווח כתובות IP בלתי תקין: $1",
+       "restrictionsfield-label": "טווחי כתובות IP מותרים:",
+       "restrictionsfield-help": "כתובת IP אחת או טווח CIDR אחד בשורה. כדי לאפשר את הכול, ניתן להשתמש ב:<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "שגיאה: $1",
+       "edit-error-long": "שגיאות:\n\n$1"
 }
index cb933de..3c7cc5b 100644 (file)
@@ -73,7 +73,8 @@
                        "YmKavishwar",
                        "Upendradutt93",
                        "Nemo bis",
-                       "Wassan.anmol"
+                       "Wassan.anmol",
+                       "Ziyaurr"
                ]
        },
        "tog-underline": "कड़ियाँ अधोरेखन:",
        "category-file-count-limited": "इस श्रेणी में निम्नलिखित {{PLURAL:$1|फ़ाइल है।|फ़ाइलें हैं।}}",
        "listingcontinuesabbrev": "जारी",
        "index-category": "सूचीबद्ध पृष्ठ",
-       "noindex-category": "असूचीबद्ध पृष्ठ",
+       "noindex-category": "असूचीबद्ध पृष्ठों",
        "broken-file-category": "टूटी हुई फ़ाइल कड़ियों वाले पृष्ठ",
        "about": "के बारे में",
        "article": "सामग्री लेख",
        "botpasswords-label-resetpassword": "पासवर्ड पुनः तय करें",
        "botpasswords-label-grants": "अनुदान आवेदन:",
        "botpasswords-help-grants": "हर अनुदान जो सदस्य अधिकार में  पहले से आता है, उसे अधिकार तक पहुँच देता है।  देखें : [[Special:ListGrants|अनुदान सारणी]]",
-       "botpasswords-label-restrictions": "उपयोग मनाही:",
        "botpasswords-label-grants-column": "प्रदान किया",
        "botpasswords-bad-appid": "बॉट नाम \"$1\" मान्य नहीं है।",
        "botpasswords-insert-failed": "बॉट नाम \"$1\" को जोड़ने में विफल हुआ। क्या यह पहले से है?",
        "action-siteadmin": "डाटाबेस को ताला लगाने या खोलने",
        "action-sendemail": "ई-मेल भेजने",
        "action-editmywatchlist": "ध्यानसूची सम्पादित करने",
-       "action-viewmywatchlist": "à¤\85पनà¥\80 à¤§à¥\8dयानसà¥\82à¤\9aà¥\80 à¤¦à¥\87à¤\96नà¥\87",
+       "action-viewmywatchlist": "à¤\85पनà¥\80 à¤§à¥\8dयानसà¥\82à¤\9aà¥\80 à¤¦à¥\87à¤\96à¥\87à¤\82",
        "action-viewmyprivateinfo": "अपनी व्यक्तिगत जानकारी देखने",
        "action-editmyprivateinfo": "अपनी व्यक्तिगत जानकारी बदलने",
        "action-editcontentmodel": "एक पेज की सामग्री मॉडल को संपादित।",
        "table_pager_limit": "एक पृष्ठपर $1 आइटम दर्शायें",
        "table_pager_limit_label": "आइटम प्रति पृष्ठ:",
        "table_pager_limit_submit": "जायें",
-       "table_pager_empty": "रिà¥\9bलà¥\8dà¤\9f नहीं",
+       "table_pager_empty": "à¤\95à¥\8bहà¥\80 à¤ªà¤°à¤¿à¤£à¤¾à¤® नहीं",
        "autosumm-blank": "पृष्ठ को खाली किया",
        "autosumm-replace": "पृष्ठ को '$1' से बदल रहा है।",
        "autoredircomment": "[[$1]] को अनुप्रेषित",
        "htmlform-title-not-exists": "$1 नहीं बना है।",
        "htmlform-user-not-exists": "<strong>$1</strong> मौजूद नहीं है।",
        "htmlform-user-not-valid": "<strong>$1</strong> मान्य प्रयोक्ता नाम नहीं है।",
-       "sqlite-has-fts": "$1 पूर्ण पाठ खोज समर्थन के साथ",
-       "sqlite-no-fts": "$1पूर्ण-पाठ खोज समर्थन के बिना",
        "logentry-delete-delete": "$1 ने पृष्ठ $3 {{GENDER:$2|हटा}} दिया",
        "logentry-delete-restore": "$1 ने पृष्ठ $3 को {{GENDER:$2|पुनर्स्थापित}} कर दिया",
        "logentry-delete-event": "$1 ने $3 पृष्ठ की लॉग {{PLURAL:$5|प्रविष्टि|प्रविष्टियों}} की दृश्यता {{GENDER:$2|बदली}}: $4",
        "feedback-external-bug-report-button": "तकनीकी कार्य को जोड़ना",
        "feedback-dialog-title": "प्रतिपुष्टि भेजिए",
        "feedback-dialog-intro": "आप नीचे दिए गए सरल फ़ॉर्म का प्रयोग करके अपनी प्रतिपुष्टि भेज सकते हैं। आपकी टिप्पणी पृष्ठ \"$1\" से आपके सदस्यनाम के आगे जोड़ दी जाएगी।",
-       "feedback-error-title": "त्रुटि",
        "feedback-error1": "त्रुटि: न पहचाना गया परिणाम एपीआई से",
        "feedback-error2": "त्रुटि: संपादन विफल रहा है",
        "feedback-error3": "त्रुटि: एपीआई से कोई प्रतिक्रिया नहीं",
index ef1b90a..522883a 100644 (file)
@@ -62,7 +62,7 @@
        "tog-enotifminoredits": "Pošalji mi e-mail i kod manjih izmjena stranice",
        "tog-enotifrevealaddr": "Prikaži moju e-mail adresu u obavijestima o izmjeni",
        "tog-shownumberswatching": "Prikaži broj suradnika koji prate stranicu (u nedavnim izmjenama, popisu praćenja i samim člancima)",
-       "tog-oldsig": "Pregled postojećeg potpisa:",
+       "tog-oldsig": "Vaš postojeći potpis:",
        "tog-fancysig": "Običan potpis kao wikitekst (bez automatske poveznice)",
        "tog-uselivepreview": "Uključi trenutačni pretpregled",
        "tog-forceeditsummary": "Podsjeti me ako sažetak uređivanja ostavljam praznim",
        "august": "kolovoza",
        "september": "rujna",
        "october": "listopada",
-       "november": "studenoga",
+       "november": "studenog",
        "december": "prosinca",
        "january-gen": "siječnja",
        "february-gen": "veljače",
        "newwindow": "(otvara se u novom prozoru)",
        "cancel": "Odustani",
        "moredotdotdot": "Više...",
-       "morenotlisted": "Ovaj popis nije potpun.",
+       "morenotlisted": "Ovaj popis možda nije potpun.",
        "mypage": "Stranica",
        "mytalk": "Razgovor",
        "anontalk": "Razgovor",
        "print": "Ispiši",
        "view": "Vidi",
        "view-foreign": "vidi na projektu $1",
-       "edit": "uredi",
+       "edit": "Uredi",
        "edit-local": "Uredi lokalni opis",
        "create": "Započni",
        "create-local": "dodaj lokalni opis",
        "talk": "Razgovor",
        "views": "Pogledi",
        "toolbox": "Pomagala",
+       "tool-link-userrights": "Promijeni {{GENDER:$1|suradnikove|suradničine}} grupe",
+       "tool-link-emailuser": "Pošalji e-poštu {{GENDER:$1|suradniku|suradnici}}",
        "userpage": "Vidi suradnikovu stranicu",
        "projectpage": "Vidi stranicu o projektu",
        "imagepage": "Vidi stranicu datoteke",
        "redirectedfrom": "(Preusmjereno s $1)",
        "redirectpagesub": "Preusmjeravanje",
        "redirectto": "Preusmjerava na:",
-       "lastmodifiedat": "Datum i vrijeme posljednje promjene na ovoj stranici: $1 u $2",
+       "lastmodifiedat": "Ova stranica posljednji put je izmjenjena $1 u $2.",
        "viewcount": "Ova stranica je pogledana {{PLURAL:$1|$1 put|$1 puta}}.",
        "protectedpage": "Zaštićena stranica",
        "jumpto": "Skoči na:",
        "aboutpage": "Project:O_projektu_{{SITENAME}}",
        "copyright": "Sadržaji se koriste u skladu s $1.",
        "copyrightpage": "{{ns:project}}:Autorska prava",
-       "currentevents": "Aktualno",
+       "currentevents": "Novosti",
        "currentevents-url": "Project:Novosti",
        "disclaimers": "Odricanje od odgovornosti",
        "disclaimerpage": "Project:General_disclaimer",
        "viewsourceold": "vidi izvor",
        "editlink": "uredi",
        "viewsourcelink": "vidi izvornik",
-       "editsectionhint": "Uredi odlomak $1",
+       "editsectionhint": "Uredi odlomak: $1",
        "toc": "Sadržaj",
        "showtoc": "prikaži",
        "hidetoc": "sakrij",
        "red-link-title": "$1 (stranica ne postoji)",
        "sort-descending": "Sortiraj silazno",
        "sort-ascending": "Sortiraj uzlazno",
-       "nstab-main": "Članak",
+       "nstab-main": "Stranica",
        "nstab-user": "{{GENDER:{{BASEPAGENAME}}|Stranica suradnika|Stranica suradnice}}",
        "nstab-media": "Mediji",
        "nstab-special": "Posebna stranica",
        "virus-unknownscanner": "nepoznati antivirus:",
        "logouttext": "'''Odjavili ste se.'''\n\nNeke se stranice mogu prikazivati kao da ste još uvijek prijavljeni, sve dok ne očistite međuspremnik svog preglednika.",
        "cannotlogoutnow-title": "Odjava trenutno nije moguća.",
+       "cannotlogoutnow-text": "Odjava nije moguća tijekom uporabe $1.",
        "welcomeuser": "Dobrodošli, $1!",
        "welcomecreation-msg": "Vaš je suradnički račun otvoren.\nNe zaboravite prilagoditi Vaše [[Special:Preferences|{{SITENAME}} postavke]].",
        "yourname": "Suradničko ime",
        "yourpasswordagain": "Ponovno upišite lozinku",
        "createacct-yourpasswordagain": "Potvrdi zaporku",
        "createacct-yourpasswordagain-ph": "Unesite zaporku ponovno",
-       "remembermypassword": "Zapamti moju lozinku na ovom računalu (najduže $1 {{PLURAL:$1|dan|dana}})",
        "userlogin-remembermypassword": "Zapamti me",
        "userlogin-signwithsecure": "Rabi sigurnu vezu",
+       "cannotlogin-title": "Prijava nije moguća",
+       "cannotlogin-text": "Prijava nija moguća.",
        "cannotloginnow-title": "Prijava trenutno nije moguća.",
+       "cannotloginnow-text": "Prijava nije moguća tijekom uporabe $1.",
+       "cannotcreateaccount-title": "Nije moguće stvoriti račune",
        "yourdomainname": "Vaša domena",
        "password-change-forbidden": "Ne možete promjeniti zaporku na ovom projektu.",
        "externaldberror": "Došlo je do pogreške s vanjskom autorizacijom ili Vam nije dopušteno osvježavanje vanjskog suradničkog računa.",
        "nosuchusershort": "Ne postoji suradnik s imenom \"$1\". Provjerite Vaš unos.",
        "nouserspecified": "Molimo navedite suradničko ime.",
        "login-userblocked": "Ovaj je suradnik blokiran. Prijava nije dopuštena.",
-       "wrongpassword": "Lozinka koju ste unijeli nije ispravna. Pokušajte ponovno.",
-       "wrongpasswordempty": "Niste unijeli lozinku. Pokušajte ponovno.",
+       "wrongpassword": "Zaporka koju ste unijeli nije ispravna. Pokušajte ponovno.",
+       "wrongpasswordempty": "Niste unijeli zaporku. Pokušajte ponovno.",
        "passwordtooshort": "Zaporka mora sadržavati najmanje {{PLURAL:$1|1 znak|$1 znaka|$1 znakova}}.",
        "password-name-match": "Vaša lozinka mora biti različita od Vašeg suradničkog imena.",
        "password-login-forbidden": "Uporaba ovog suradničkog imena i lozinke nije dozvoljena.",
        "resetpass_submit": "Postavite lozinku i prijavite se",
        "changepassword-success": "Zaporka je uspješno postavljena!",
        "changepassword-throttled": "Nedavno ste se previše puta pokušali prijaviti.\nMolimo Vas pričekajte $1 prije nego što pokušate ponovno.",
+       "botpasswords": "Zaporke botova",
+       "botpasswords-disabled": "Zaporke botova su onemogućene.",
+       "botpasswords-no-central-id": "Za uporabu zaporki botova, morate biti prijavljeni na središnji račun.",
+       "botpasswords-existing": "Postojeće zaporke botova",
+       "botpasswords-createnew": "Stvorite novu zaporku bota",
+       "botpasswords-editexisting": "Uredite postojeću zaporku bota",
+       "botpasswords-label-appid": "Ime bota:",
        "botpasswords-label-create": "Stvori",
        "botpasswords-label-update": "Ažuriraj",
        "botpasswords-label-cancel": "Odustani",
+       "botpasswords-label-delete": "Izbriši",
        "botpasswords-label-resetpassword": "Ponovno postavljanje lozinke",
+       "botpasswords-label-grants": "Primjenjive dozvole:",
+       "botpasswords-help-grants": "Svaka dozvola daje pristup navedenim suradničkim pravima koja su već dodjeljena suradničkom računu. Vidjeti [[Special:ListGrants|tablicu dozvola]] za više informacija.",
+       "botpasswords-label-grants-column": "Odobreno",
+       "botpasswords-bad-appid": "Ime bota \"$1\" nije valjano.",
        "botpasswords-insert-failed": "Nije moguće dodavanje imena bota \"$1\". Možda je već dodano?",
+       "botpasswords-update-failed": "Nije moguće ažurirati bot s imenom \"$1\". Možda je izbrisan?",
        "resetpass_forbidden": "Lozinka ne može biti promijenjena",
        "resetpass-no-info": "Morate biti prijavljeni da biste izravno pristupili ovoj stranici.",
        "resetpass-submit-loggedin": "Promijeni lozinku",
        "minoredit": "Ovo je manja promjena",
        "watchthis": "Prati ovu stranicu",
        "savearticle": "Sačuvaj stranicu",
+       "savechanges": "Spremi promjene",
        "publishpage": "Objavi stranicu",
        "publishchanges": "Objavi izmjene",
        "preview": "Pregled kako će stranica izgledati",
        "diff-multi-manyusers": "({{PLURAL:$1|Nije prikazana jedna međuinačica|Nisu prikazane $1 međuinačice|Nije prikazano $1 međuinačica}} više od {{PLURAL:$2|jednog|$2|$2}} suradnika)",
        "difference-missing-revision": "{{PLURAL:$2|Uređivanje|$2 uređivanja}} sljedeće šifre ($1) ne {{PLURAL:$2|postoji|postoje}}.\n\nOvo je obično uzrokovano kada kliknete na zastarjelu poveznicu na stranice koja je obrisana.\nViše informacija možete pronaći u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} evidenciji brisanja].",
        "searchresults": "Rezultati pretrage",
-       "searchresults-title": "Rezultati traženja za \"$1\"",
+       "searchresults-title": "Rezultati pretrage za \"$1\"",
        "titlematches": "Pronađene stranice prema naslovu",
        "textmatches": "Pronađene stranice prema tekstu članka",
        "notextmatches": "Nema pronađenih stranica prema tekstu članka",
        "grant-blockusers": "Blokiraj i odblokiraj korisnike",
        "grant-createaccount": "Otvori račune",
        "grant-createeditmovepage": "Stvori, uredi i premjesti stranice",
-       "grant-editmyoptions": "Uredi korisničke postavke",
+       "grant-editmyoptions": "Uređivanje vlastitih suradničkih postavki",
+       "grant-editpage": "Uređivanje postojećih stranica",
+       "grant-editprotected": "Uređivanje zaštićenih stranica",
        "grant-highvolume": "Uređivanja velikog opsega",
        "grant-basic": "Osnovna prava",
        "grant-viewdeleted": "Prikaz izbrisanih datoteka i stranica",
        "rc-old-title": "izvorno ime bilo je \"$1\"",
        "recentchangeslinked": "Povezane stranice",
        "recentchangeslinked-feed": "Povezane stranice",
-       "recentchangeslinked-toolbox": "Povezane stranice",
+       "recentchangeslinked-toolbox": "Povezane promjene",
        "recentchangeslinked-title": "Povezane promjene sa stranicom \"$1\"",
        "recentchangeslinked-summary": "Ova posebna stranica pokazuje nedavne promjene na povezanim stranicama (ili stranicama određene kategorije). Stranice koje su na [[Special:Watchlist|Vašem popisu praćenja]] su '''podebljane'''.",
        "recentchangeslinked-page": "Naslov stranice:",
        "upload-copy-upload-invalid-domain": "Kopije postavljenih datoteka nisu dostupne s ove domene.",
        "upload-dialog-title": "Postavi datoteku",
        "upload-dialog-button-cancel": "Odustani",
+       "upload-dialog-button-back": "Natrag",
        "upload-dialog-button-done": "Gotovo",
        "upload-dialog-button-save": "Spremi",
        "upload-dialog-button-upload": "Postavi",
        "checkbox-select": "Odaberite: $1",
        "checkbox-all": "Sve",
        "checkbox-none": "Nijedan",
+       "checkbox-invert": "Obrnuto",
        "allpages": "Sve stranice",
        "nextpage": "Sljedeća stranica ($1)",
        "prevpage": "Prethodna stranica ($1)",
        "listgrouprights-removegroup-self-all": "Uklonite sve skupine iz vlastitog računa",
        "listgrouprights-namespaceprotection-header": "Ograničenja prostora imena",
        "listgrouprights-namespaceprotection-namespace": "Imenski prostor",
+       "listgrants": "Dozvole",
+       "listgrants-summary": "Slijedi popis dozvola s pridruženim pristupom suradničkim pravima. Suradnici mogu omogućiti aplikacijama uporabu svojih računa, ali s ograničenim ovlastima na temelju dozvola koje je suradnik dodijelio aplikaciji. Aplikacija koja djeluje u ime suradnika međutim ne može rabiti prava koje suradnik nema.\nMoguće su [[{{MediaWiki:Listgrouprights-helppage}}|dodatne informacije]] o pojedinim pravima.",
+       "listgrants-grant": "Dozvola",
+       "listgrants-rights": "Prava",
        "trackingcategories-nodesc": "Opis nije dostupan.",
        "mailnologin": "Nema adrese pošiljatelja",
        "mailnologintext": "Morate biti [[Special:UserLogin|prijavljeni]]\ni imati valjanu adresu e-pošte u svojim [[Special:Preferences|postavkama]]\nda bi mogli slati poštu drugim suradnicima.",
        "emailccsubject": "Kopija Vaše poruke suradniku $1: $2",
        "emailsent": "E-mail poslan",
        "emailsenttext": "Vaša poruka je poslana.",
-       "emailuserfooter": "Ova je poruka poslana od $1 za $2 uporabom \"elektroničke pošte\" s projekta {{SITENAME}}.",
+       "emailuserfooter": "Ovu je e-poruku {{GENDER:$1|poslao suradnik|poslala suradnica}} $1 {{GENDER:$2|suradniku $2|suradnici $2}} uporabom mogućnosti \"{{int:emailuser}}\" s projekta {{SITENAME}}.",
        "usermessage-summary": "Ostavljanje poruke sustava.",
        "usermessage-editor": "Uređivač sistemskih poruka",
-       "watchlist": "Moj popis praćenja",
+       "watchlist": "Popis praćenja",
        "mywatchlist": "Popis praćenja",
        "watchlistfor2": "Za $1 $2",
        "nowatchlist": "Na Vašem popisu praćenja nema nijednog članka.",
        "wlshowhideanons": "neprijavljene suradnike",
        "wlshowhidepatr": "ophođena uređivanja",
        "wlshowhidemine": "moje promjene",
+       "wlshowhidecategorization": "kategorizaciju stranica",
        "watchlist-options": "Izbornik popisa praćenja",
        "watching": "Pratim...",
        "unwatching": "Prestajem pratiti...",
        "rollback-success": "uklonjeno uređivanje {{GENDER:$1|suradnika|suradnice}} $1\nvraćeno na posljednju inačicu {{GENDER:$2|suradnika|suradnice}} $2.",
        "sessionfailure-title": "Prekid sesije",
        "sessionfailure": "Uočili smo problem s Vašom prijavom. Zadnja naredba nije izvršena kako bi se izbjegla zloupotreba. Molimo Vas da se u pregledniku vratite natrag na prethodnu stranicu, ponovno je učitate i zatim pokušate opet.",
+       "changecontentmodel": "Promijeni model sadržaja stranice",
        "changecontentmodel-legend": "Promijeni model sadržaja",
        "changecontentmodel-title-label": "Naziv stranice",
        "changecontentmodel-model-label": "Novi model sadržaja",
        "export-download": "Ponudi opciju snimanja u datoteku",
        "export-templates": "Uključi predloške",
        "export-pagelinks": "Uključi povezane stranice do dubine od:",
-       "allmessages": "Sve sistemske poruke",
+       "allmessages": "Sve poruke sustava",
        "allmessagesname": "Ime",
        "allmessagesdefault": "Prvotni tekst",
        "allmessagescurrent": "Trenutačni tekst",
        "tooltip-pt-preferences": "Vaše postavke",
        "tooltip-pt-watchlist": "Popis stranica koje pratite.",
        "tooltip-pt-mycontris": "Popis Vaših doprinosa",
-       "tooltip-pt-login": "Predlažemo Vam da se prijavite, ali nije obvezno.",
+       "tooltip-pt-login": "Predlažemo Vam da se prijavite, međutim nije obvezno.",
        "tooltip-pt-logout": "Odjavi se",
-       "tooltip-pt-createaccount": "Nudimo vam mogućnost da napravite račun i prijavite se, iako to nije nužno.",
+       "tooltip-pt-createaccount": "Predlažemo Vam mogućnost stvaranja računa i prijave, iako to nije nužno.",
        "tooltip-ca-talk": "Razgovor o stranici",
        "tooltip-ca-edit": "Uredi ovu stranicu",
        "tooltip-ca-addsection": "Dodaj novi odlomak",
        "tooltip-ca-viewsource": "Ova stranica je zaštićena. Možete pogledati izvorni kod.",
-       "tooltip-ca-history": "Ranije izmjene na ovoj stranici.",
+       "tooltip-ca-history": "Ranije izmjene na ovoj stranici",
        "tooltip-ca-protect": "Zaštiti ovu stranicu",
        "tooltip-ca-unprotect": "Ukloni zaštitu s ove stranice",
        "tooltip-ca-delete": "Izbriši ovu stranicu",
        "tooltip-ca-move": "Premjesti ovu stranicu",
        "tooltip-ca-watch": "Dodaj ovu stranicu na svoj popis praćenja",
        "tooltip-ca-unwatch": "Ukloni ovu stranicu s popisa praćenja",
-       "tooltip-search": "Pretraži ovaj wiki",
+       "tooltip-search": "Pretraži {{SITENAME}}",
        "tooltip-search-go": "Idi na stranicu s ovim imenom ako ona postoji",
        "tooltip-search-fulltext": "Traži ovaj tekst na svim stranicama",
-       "tooltip-p-logo": "Glavna stranica",
+       "tooltip-p-logo": "Posjeti glavnu stranicu",
        "tooltip-n-mainpage": "Posjeti glavnu stranicu",
        "tooltip-n-mainpage-description": "Posjeti glavnu stranicu",
-       "tooltip-n-portal": "O projektu, što možete učiniti, gdje je što",
-       "tooltip-n-currentevents": "O trenutačnim događajima",
-       "tooltip-n-recentchanges": "Popis nedavnih promjena u wikiju.",
+       "tooltip-n-portal": "O projektu, što možete učiniti, gdje se što nalazi",
+       "tooltip-n-currentevents": "Saznajte više o trenutačnim događajima",
+       "tooltip-n-recentchanges": "Popis nedavnih promjena u wikiju",
        "tooltip-n-randompage": "Učitaj slučajnu stranicu",
-       "tooltip-n-help": "Mjesto za pomoć suradnicima.",
-       "tooltip-t-whatlinkshere": "Popis stranica koje sadrže poveznice na ovu stranicu",
+       "tooltip-n-help": "Mjesto gdje se može dobiti pomoć",
+       "tooltip-t-whatlinkshere": "Popis svih stranica koje sadrže poveznice na ovu stranicu",
        "tooltip-t-recentchangeslinked": "Nedavne promjene na stranicama na koje vode ovdašnje poveznice",
        "tooltip-feed-rss": "RSS feed za ovu stranicu",
        "tooltip-feed-atom": "Atom feed za ovu stranicu",
-       "tooltip-t-contributions": "Pogledaj popis doprinosa suradnika  {{GENDER:$1|this user}}",
+       "tooltip-t-contributions": "Pogledaj popis doprinosa {{GENDER:$1|ovog suradnika|ove suradnice}}",
        "tooltip-t-emailuser": "Pošalji suradniku e-mail",
        "tooltip-t-info": "Više informacija o ovoj stranici",
-       "tooltip-t-upload": "Postavi slike i druge medije",
-       "tooltip-t-specialpages": "Popis posebnih stranica",
-       "tooltip-t-print": "Verzija za ispis ove stranice",
+       "tooltip-t-upload": "Postavi datoteke",
+       "tooltip-t-specialpages": "Popis svih posebnih stranica",
+       "tooltip-t-print": "Inačica za ispis ove stranice",
        "tooltip-t-permalink": "Trajna poveznica na ovu verziju stranice",
        "tooltip-ca-nstab-main": "Pogledaj sadržaj",
        "tooltip-ca-nstab-user": "Pogledaj suradničku stranicu",
        "htmlform-cloner-create": "Dodaj još",
        "htmlform-cloner-delete": "Ukloni",
        "htmlform-cloner-required": "Potrebna je barem jedna vrijednost.",
-       "sqlite-has-fts": "$1 s podrškom pretraživanja cijelog teksta",
-       "sqlite-no-fts": "$1 bez podrške pretraživanja cijelog teksta",
+       "htmlform-date-placeholder": "GGGG-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "GGGG-MM-DD HH:MM:SS",
+       "htmlform-time-invalid": "Unesena vrijednost nije prepoznati format vremena. Pokušajte koristiti format HH:MM:SS.",
+       "htmlform-datetime-toohigh": "Uneseni datum i vrijeme su veći od $1",
        "logentry-delete-delete": "$1 je {{GENDER:$2|obrisao|obrisala}} stranicu $3",
        "logentry-delete-restore": "$1 je {{GENDER:$2|vratio|vratila}} stranicu $3",
        "logentry-delete-event": "$1 je {{GENDER:$2|promijenio|promijenila}} vidljivost {{PLURAL:$5|zapisa u evidenciji|$5 zapisa u evidenciji}} na $3: $4",
        "feedback-external-bug-report-button": "Arhiviraj tehnički zadatak",
        "feedback-dialog-title": "Slanje povratnih informacija",
        "feedback-dialog-intro": "Da biste poslali povratnu informaciju, rabite jednostavan obrazac. Vaš će komentar biti dodan na stranici \"$1\" s Vašim suradničkim imenom.",
-       "feedback-error-title": "Pogrješka",
        "feedback-error1": "Pogreška: neprepoznati rezultat API funkcije",
        "feedback-error2": "Pogreška: uređivanje nije uspjelo",
        "feedback-error3": "Pogreška: nema odgovora API funkcije",
        "mw-widgets-titleinput-description-new-page": "stranica još ne postoji",
        "mw-widgets-titleinput-description-redirect": "preusmjeravanje na $1",
        "log-action-filter-block": "Vrsta blokiranja:",
+       "log-action-filter-delete": "Vrsta brisanja:",
+       "log-action-filter-import": "Vrsta uvoza:",
+       "log-action-filter-move": "Vrsta premještanja:",
        "log-action-filter-newusers": "Način stvaranja računa:",
+       "log-action-filter-patrol": "Vrsta pregledavanja:",
+       "log-action-filter-protect": "Vrsta zaštićivanja:",
+       "log-action-filter-rights": "Vrsta promjene prava:",
        "log-action-filter-upload": "Vrsta postavljanja:",
        "log-action-filter-all": "sve",
        "log-action-filter-block-block": "blokiranje",
        "log-action-filter-block-reblock": "promjena blokiranja",
        "log-action-filter-block-unblock": "deblokiranje",
+       "log-action-filter-delete-delete": "brisanje stranice",
+       "log-action-filter-delete-restore": "vraćanje izbrisane stranice",
+       "log-action-filter-delete-event": "brisanje evidencije",
+       "log-action-filter-delete-revision": "brisanje izmjene",
+       "log-action-filter-import-interwiki": "uvoz između wikija",
+       "log-action-filter-import-upload": "uvoz s XML postavljanjem",
+       "log-action-filter-move-move": "premještanje bez prepisivanja preko preusmjeravanja",
+       "log-action-filter-move-move_redir": "premještanje s prepisivanjem preko preusmjeravanja",
        "log-action-filter-newusers-create": "stvorio anonimni suradnik",
        "log-action-filter-newusers-create2": "stvorio registrirani suradnik",
        "log-action-filter-newusers-autocreate": "automatski stvoren",
        "log-action-filter-newusers-byemail": "stvoren lozinkom poslanom na e-poštu",
+       "log-action-filter-patrol-patrol": "ručno ophođeno",
+       "log-action-filter-patrol-autopatrol": "automatsko pregledavanje",
+       "log-action-filter-protect-protect": "zaštićivanje",
+       "log-action-filter-protect-modify": "promjena zaštićivanja",
+       "log-action-filter-protect-unprotect": "uklanjanje zaštite",
+       "log-action-filter-protect-move_prot": "prenosiva zaštita",
+       "log-action-filter-rights-rights": "ručna promjena",
+       "log-action-filter-rights-autopromote": "automatska promjena",
        "log-action-filter-upload-upload": "novo postavljanje",
-       "log-action-filter-upload-overwrite": "ponovno postavljanje"
+       "log-action-filter-upload-overwrite": "ponovno postavljanje",
+       "changecredentials": "Promjena vjerodajnica",
+       "removecredentials": "Uklanjanje vjerodajnica"
 }
index d8780e1..cf4a2d1 100644 (file)
@@ -72,7 +72,7 @@
        "tog-enotifminoredits": "Kapjak értesítést e-mailben a lapok és fájlok apró változtatásairól",
        "tog-enotifrevealaddr": "Jelenjen meg az e-mail címem a figyelmeztető e-mailekben",
        "tog-shownumberswatching": "A lapot figyelő szerkesztők számának megjelenítése",
-       "tog-oldsig": "A jelenlegi aláírás:",
+       "tog-oldsig": "A jelenlegi aláírásod:",
        "tog-fancysig": "Az aláírás wikiszöveg (nem lesz automatikusan hivatkozásba rakva)",
        "tog-uselivepreview": "Élő előnézet használata",
        "tog-forceeditsummary": "Figyelmeztessen, ha nem adok meg szerkesztési összefoglalót",
        "newwindow": "(új ablakban nyílik meg)",
        "cancel": "Mégse",
        "moredotdotdot": "Tovább…",
-       "morenotlisted": "A lista nem teljes.",
+       "morenotlisted": "A lista hiányos lehet.",
        "mypage": "Lapom",
        "mytalk": "Vitalap",
        "anontalk": "Vitalap",
        "talk": "Vitalap",
        "views": "Nézetek",
        "toolbox": "Eszközök",
+       "tool-link-userrights": "{{GENDER:$1|Felhasználócsoportok}} módosítása",
+       "tool-link-emailuser": "E-mail küldése ennek a {{GENDER:$1|felhasználónak}}",
        "userpage": "Felhasználó lapjának megtekintése",
        "projectpage": "Projektlap megtekintése",
        "imagepage": "A fájl leírólapjának megtekintése",
        "missingarticle-rev": "(változat azonosítója: $1)",
        "missingarticle-diff": "(eltérés: $1, $2)",
        "readonly_lag": "Az adatbázis automatikusan le lett zárva, amíg a mellékkiszolgálók utolérik a főkiszolgálót.",
+       "nonwrite-api-promise-error": "A „Promise-Non-Write-API-Action” (ígéret nem író API-műveletre) HTTP-fejléc szerepelt a kérésben, de a kérés egy író API-modulra irányult.",
        "internalerror": "Belső hiba",
        "internalerror_info": "Belső hiba: $1",
        "internalerror-fatal-exception": "Végzetes kivétel: „$1”",
        "createacct-email-ph": "Add meg e-mail címed",
        "createacct-another-email-ph": "Add meg az emailcímet",
        "createaccountmail": "Átmeneti, véletlenszerű jelszó beállítása és kiküldése a megadott e-mail címre",
+       "createaccountmail-help": "A jelszó megismerése nélkül készíthető valaki másnak fiók.",
        "createacct-realname": "Igazi neved (nem kötelező)",
        "createaccountreason": "Indoklás:",
        "createacct-reason": "Indoklás",
        "createacct-reason-ph": "Miért hozol létre egy másik fiókot",
+       "createacct-reason-help": "A fióklétrehozási naplóban megjelenő üzenet",
        "createacct-submit": "Felhasználói fiók létrehozása",
        "createacct-another-submit": "Fiók létrehozása",
        "createacct-continue-submit": "Fiók létrehozásának folytatása",
        "eauthentsent": "Egy ellenőrző e-mailt küldtünk a megadott címre. Mielőtt más leveleket kaphatnál, igazolnod kell az e-mailben írt utasításoknak megfelelően, hogy valóban a tiéd a megadott cím.",
        "throttled-mailpassword": "Már elküldtünk egy jelszóemlékeztetőt az utóbbi {{PLURAL:$1|egy|$1}} órában.\nA visszaélések elkerülése végett {{PLURAL:$1|egy|$1}} óránként csak egy jelszó-emlékeztetőt küldünk.",
        "mailerror": "Hiba történt az e-mail küldése közben: $1",
-       "acct_creation_throttle_hit": "A wiki látogatói ezt az IP-címet használva $1 fiókot hoztak létre az elmúlt egy nap alatt. Ez a megengedett maximum ezen időtartam alatt, így az erről a címről látogatók jelenleg nem hozhatnak létre újabb fiókokat.",
+       "acct_creation_throttle_hit": "A wiki látogatói ezt az IP-címet használva $1 fiókot hoztak létre az elmúlt $2 alatt. Ez a megengedett maximum ezen időtartam alatt, így az erről a címről látogatók jelenleg nem hozhatnak létre újabb fiókokat.",
        "emailauthenticated": "Az e-mail címedet $2, $3-kor erősítetted meg.",
        "emailnotauthenticated": "Az e-mail címed még <strong>nincs megerősítve</strong>. E-mailek küldése és fogadása nem engedélyezett.",
        "noemailprefs": "Az alábbi funkciók használatához meg kell adnod az e-mail címedet.",
        "botpasswords-label-delete": "Törlés",
        "botpasswords-label-resetpassword": "Új jelszó kérése",
        "botpasswords-label-grants": "Elérhető jogosultságok:",
-       "botpasswords-label-restrictions": "Használati korlátozások:",
        "botpasswords-label-grants-column": "Megadva",
        "botpasswords-bad-appid": "A(z) „$1” botnév érvénytelen.",
        "botpasswords-insert-failed": "A(z) „$1” botnév hozzáadása sikertelen. Nem lehet, hogy már hozzá lett adva?",
+       "botpasswords-update-failed": "A(z) „$1” nevű botfiók frissítése sikertelen. Lehet, hogy törölted?",
        "botpasswords-created-title": "Botjelszó létrehozva",
        "botpasswords-created-body": "\"$2\" felhasználó \"$1\" bot jelszava létrehozva.",
        "botpasswords-updated-title": "Botjelszó frissítve",
        "botpasswords-updated-body": "\"$2\" felhasználó \"$1\" bot jelszava módosítva.",
        "botpasswords-deleted-title": "Botjelszó törölve",
        "botpasswords-deleted-body": "\"$2\" felhasználó \"$1\" bot jelszava törölve.",
+       "botpasswords-newpassword": "A bejelentkezéshez használható új felhasználóneved <strong>$1</strong>, jelszavad <strong>$2</strong>. <em>Ezeket jegyezd fel a későbbiekre.</em> <br> (Régebbi botoknál, amik megkövetelhetik, hogy a bejelentkezési név megegyezzen magával a felhasználónévvel, használhatod a(z) <strong>$3</strong> felhasználónevet is <strong>$4</strong> jelszóval.)",
        "botpasswords-no-provider": "A BotPasswordsSessionProvider nem áll rendelkezésre.",
+       "botpasswords-restriction-failed": "A botjelszó-korlátozások megakadályozzák ezt a bejelentkezést.",
+       "botpasswords-invalid-name": "A megadott felhasználónév nem tartalmazza a botjelszó-elválasztót („$1”).",
+       "botpasswords-not-exist": "A(z) „$1” felhasználó nem rendelkezik „$2” nevű botjelszóval.",
        "resetpass_forbidden": "A jelszavak nem változtathatók meg",
        "resetpass_forbidden-reason": "A jelszavakat nem változtathatóak meg: $1",
        "resetpass-no-info": "Be kell jelentkezned, hogy közvetlenül elérd ezt a lapot.",
        "passwordreset-emailelement": "Felhasználónév: \n$1\n\nIdeiglenes jelszó: \n$2",
        "passwordreset-emailsentemail": "Ha ez az e-mail-cím van a fiókodhoz társítva, egy jelszó-visszaállító e-mailt küldünk.",
        "passwordreset-emailsentusername": "Ha ehhez a felhasználónévhez tartozik e-mail cím, akkor egy jelszó-visszaállító levelet küld a rendszer.",
-       "passwordreset-emailsent-capture2": "A jelszóvisszaállító {{PLURAL:$1|e-mailt|e-maileket}} elküldtük. A felhasználói {{PLURAL:$1|név és a jelszó|nevek és jelszavak listája}} lentebb látható.",
+       "passwordreset-emailsent-capture2": "A jelszóvisszaállító {{PLURAL:$1|e-mailt|e-maileket}} elküldtük. A {{PLURAL:$1|felhasználónév és a jelszó|felhasználónevek és jelszavak listája}} itt látható.",
+       "passwordreset-emailerror-capture2": "Az e-mail-küldés {{GENDER:$2|sikertelen}}: $1. A {{PLURAL:$3|felhasználónév és a jelszó|felhasználónevek és jelszavak listája}} itt látható.",
+       "passwordreset-nocaller": "A hívó megadása kötelező",
+       "passwordreset-nosuchcaller": "A hívó nem létezik: $1",
+       "passwordreset-ignored": "A jelszó-visszaállítás nem lett kezelve. Talán nincs konfigurálva szolgáltató?",
        "passwordreset-invalideamil": "Érvénytelen e-mail cím",
+       "passwordreset-nodata": "Se felhasználónevet, sem e-mail-címet nem adtál meg",
        "changeemail": "E-mail cím megváltoztatása vagy eltávolítása",
        "changeemail-header": "Töltsd ki ezt az űrlapot az e-mail-címed megváltoztatásához. Ha nem szeretnél semmilyen e-mail-címet kapcsolni a fiókodhoz, hagyd üresen az új e-mail-cím mezőjét az űrlap elküldésekor.",
        "changeemail-no-info": "A lap közvetlen eléréséhez be kell jelentkezned.",
        "accmailtext": "A(z) [[User talk:$1|$1]] fiókhoz egy véletlenszerűen generált jelszót küldünk a(z) $2 címre.\n\nAz új fiók jelszava a ''[[Special:ChangePassword|jelszó megváltoztatása]]'' lapon módosítható a bejelentkezés után.",
        "newarticle": "(Új)",
        "newarticletext": "Egy olyan lapra mutató hivatkozást követtél, ami még nem létezik.\nA lap létrehozásához csak gépeld be a szövegét a lenti szövegdobozba. Ha kész vagy, az „Előnézet megtekintése” gombbal ellenőrizheted, hogy úgy fog-e kinézni, ahogy szeretnéd, és a „Lap mentése” gombbal tudod elmenteni. (További információkat a [$1 súgólapon] találsz).\nHa tévedésből jutottál ide, kattints a böngésződ '''vissza''' vagy '''back''' gombjára.",
-       "anontalkpagetext": "----''Ez egy olyan anonim szerkesztő vitalapja, aki még nem regisztrált, vagy csak nem jelentkezett be.\nEzért az IP-címét használjuk az azonosítására.\nUgyanazon az IP-címen számos szerkesztő osztozhat az idők folyamán.\nHa úgy látod, hogy az üzenetek, amiket ide kapsz, nem neked szólnak, [[Special:CreateAccount|regisztrálj]] vagy ha már regisztráltál, [[Special:UserLogin|jelentkezz be]], hogy ne keverjenek össze másokkal.''",
+       "anontalkpagetext": "----\n<em>Ez egy olyan anonim felhasználó vitalapja, aki még nem regisztrált, vagy csak nem jelentkezett be.</em>\nEzért az IP-címét kell használnunk az azonosítására.\nUgyanazon az IP-címen számos szerkesztő osztozhat az idők folyamán.\nHa anonim felhasználó vagy, és úgy látod, hogy az üzenetek, amiket kapsz, nem neked szólnak, [[Special:CreateAccount|regisztrálj]] vagy [[Special:UserLogin|jelentkezz be]], hogy ne keverjenek össze másokkal.",
        "noarticletext": "Ez a lap jelenleg nem tartalmaz szöveget.\n[[Special:Search/{{PAGENAME}}|Rákereshetsz erre a címszóra]],\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} megtekintheted a kapcsolódó naplókat],\nvagy [{{fullurl:{{FULLPAGENAME}}|action=edit}} létrehozhatod a lapot].</span>",
        "noarticletext-nopermission": "Ez a lap jelenleg nem tartalmaz szöveget.\n[[Special:Search/{{PAGENAME}}|Rákereshetsz a lap címére]] más lapok tartalmában, vagy <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} megtekintheted a kapcsolódó naplófájlokat]</span>.",
        "missing-revision": "A(z) \"{{FULLPAGENAME}}\" nevű oldal #$1 változata nem létezik.\n\nEzt általában egy elavult, törölt oldalra mutató laptörténeti hivatkozás használata okozza. Részletek a [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} törlési naplóban] találhatóak.",
        "editpage-cannot-use-custom-model": "Ennek a lapnak a tartalommodellje nem változtatható.",
        "longpageerror": "'''HIBA: Az általad beküldött szöveg {{PLURAL:$1|egy kilobájt|$1 kilobájt}} hosszú, ami több az engedélyezett {{PLURAL:$2|egy kilobájtnál|$2 kilobájtnál}}.\nA szerkesztést nem lehet elmenteni.'''",
        "readonlywarning": "<strong>FIGYELMEZTETÉS: A wiki adatbázisát karbantartás miatt zárolták, ezért most nem fogod tudni elmenteni a szerkesztéseidet!</strong>\nA lap szövegét másold egy szövegfájlba, amit később felhasználhatsz!\n\nAz adatbázist lezáró rendszeradminisztrátor az alábbi magyarázatot adta: $1",
-       "protectedpagewarning": "'''Figyelem: Ez a lap le van védve, így csak adminisztrátori jogosultságokkal rendelkező szerkesztők módosíthatják.'''\nA legutolsó ide vonatkozó naplóbejegyzés alább látható:",
+       "protectedpagewarning": "<strong>Figyelem: Ez a lap védett, így csak adminisztrátori jogosultságokkal rendelkező szerkesztők módosíthatják.</strong>\nA legutolsó ide vonatkozó naplóbejegyzés alább látható:",
        "semiprotectedpagewarning": "'''Megjegyzés:''' ez a lap védett, így regisztrálatlan vagy újonnan regisztrált szerkesztők nem módosíthatják.",
        "cascadeprotectedwarning": "<strong>Figyelem:</strong> ez a lap le van zárva, csak adminisztrátorok szerkeszthetik, mert a következő kaszkádvédelemmel ellátott {{PLURAL:$1|lapon|lapokon}} be van illesztve:",
        "titleprotectedwarning": "'''Figyelem: Ez a lap le van védve, így csak a [[Special:ListGroupRights|megfelelő jogosultságokkal]] rendelkező szerkesztők hozhatják létre.'''\nA legutolsó ide vonatkozó naplóbejegyzés alább látható:",
        "invalid-content-data": "Érvénytelen tartalom adat",
        "content-not-allowed-here": "\"$1\" tartalom nem engedélyezett a [[$2]] oldalon",
        "editwarning-warning": "A lap elhagyásával az összes itt végzett változtatás elveszhet.\nHa be vagy jelentkezve letilthatod ezt a figyelmeztetést a beállításaid „{{int:prefs-editing}}” szakaszában.",
+       "editpage-invalidcontentmodel-title": "A tartalommodell nem támogatott",
+       "editpage-invalidcontentmodel-text": "A(z) „$1” tartalommodell nem támogatott.",
        "editpage-notsupportedcontentformat-title": "Nem támogatott tartalom formátum",
        "editpage-notsupportedcontentformat-text": "$2 tartalommodell nem támogatja $1 tartalomformátumot.",
        "content-model-wikitext": "wikiszöveg",
        "content-json-empty-object": "Üres objektum",
        "content-json-empty-array": "Üres tömb",
        "deprecated-self-close-category": "Érvénytelen önzáró HTML-címkéket használó lapok",
+       "deprecated-self-close-category-desc": "A lap érvénytelen önzáró HTML-címkéket használ (pl. <code>&lt;b/></code> vagy <code>&lt;span/></code>). Ezeknek a működése hamarosan meg fog változni a HTML5 szabvánnyal összhangban lévőre, ezért a wikiszövegben való használatuk elavult.",
        "duplicate-args-warning": "<strong>Figyelmeztetés:</strong> A(z) [[:$1]] lap dupla értékkel hívja meg a(z) [[:$2]] sablont („$3” paraméter). Csak az utolsó érték lesz felhasználva.",
        "duplicate-args-category": "Dupla paramétermegadást tartalmazó lapok",
        "duplicate-args-category-desc": "Az oldal olyan sablon hívásokat tartalmaz, amely ugyanazt a paramétert használja, például <code><nowiki>{{foo|bar=1|bar=2}}</nowiki></code> or <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>.",
        "undo-summary": "Visszavontam [[Special:Contributions/$2|$2]] ([[User talk:$2|vita]]) szerkesztését (oldid: $1)",
        "undo-summary-username-hidden": "A rejtett felhasználó által végzett $1 változat visszavonása",
        "cantcreateaccount-text": "Erről az IP-címről ('''$1''') nem lehet regisztrálni, mert [[User:$3|$3]] blokkolta az alábbi indokkal:\n\n:''$2''",
-       "cantcreateaccount-range-text": "A regisztrációt a(z) <strong>$1</strong> IP-címtartományban, amelybe a te IP-címed (<strong>$4</strong>) is tartozik, [[User:$3|$3]] blokkolta.",
+       "cantcreateaccount-range-text": "A regisztrációt a(z) <strong>$1</strong> IP-címtartományban, amelybe a te IP-címed (<strong>$4</strong>) is tartozik, [[User:$3|$3]] blokkolta.\n\n$3 a következő indoklást adta: <em>$2</em>",
        "viewpagelogs": "A lap a rendszernaplókban",
        "nohistory": "A lap nem rendelkezik laptörténettel.",
        "currentrev": "Aktuális változat",
        "revdelete-submit": "Alkalmazás a kiválasztott {{PLURAL:$1|változatra|változatokra}}",
        "revdelete-success": "A változat láthatósága sikeresen frissítve.",
        "revdelete-failure": "'''Nem sikerült frissíteni a változat láthatóságát:'''\n$1",
-       "logdelete-success": "'''Az esemény láthatóságának beállítása sikeresen elvégezve.'''",
+       "logdelete-success": "A naplóbejegyzés láthatósága beállítva.",
        "logdelete-failure": "'''Nem sikerült módosítani a naplóbejegyzés láthatóságát:'''\n$1",
        "revdel-restore": "Láthatóság megváltoztatása",
        "pagehist": "Laptörténet",
        "mergehistory-fail-bad-timestamp": "Érvénytelen időbélyeg.",
        "mergehistory-fail-invalid-source": "Érvénytelen forráslap.",
        "mergehistory-fail-invalid-dest": "Érvénytelen céllap.",
+       "mergehistory-fail-no-change": "A laptörténet-összefésülő nem fésült össze egy változatot sem. Ellenőrizd a lap és idő paramétereket.",
        "mergehistory-fail-permission": "Nincsen jogod a laptörténetek egyesítéséhez.",
        "mergehistory-fail-self-merge": "A forrás- és céllap megegyezik.",
+       "mergehistory-fail-timestamps-overlap": "A forrásváltozatok átfedésben vannak vagy későbbiek a célváltozatoknál.",
        "mergehistory-fail-toobig": "Nem lehetséges a laptörténetek egyesítése, mivel több mint $1 {{PLURAL:$1|változást}} kellene áthelyezni.",
        "mergehistory-no-source": "Nem létezik forráslap $1 néven.",
        "mergehistory-no-destination": "Nem létezik céllap $1 néven.",
        "diff-multi-sameuser": "({{PLURAL:$1|Egy közbenső módosítás|$1 közbenső módosítás}} ugyanattól a szerkesztőtől nincs mutatva)",
        "diff-multi-otherusers": "({{PLURAL:$1|Egy közbenső módosítás|$1 közbenső módosítás}}, amit {{PLURAL:$2|egy másik szerkesztő végzett|$2 másik szerkesztő végzett}}, nincs mutatva)",
        "diff-multi-manyusers": "({{PLURAL:$1|Egy közbeeső változat|$1 közbeeső változat}} nincs mutatva, amit $2 szerkesztő módosított)",
-       "difference-missing-revision": "A(z) \"{{PAGENAME}}\" nevű oldal #$1 $2 változata nem létezik.\n\nEzt általában egy elavult, törölt oldalra mutató laptörténeti hivatkozás használata okozza. Részletek a [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} törlési naplóban] találhatóak.",
+       "difference-missing-revision": "Az összehasonlítandó változatok {{PLURAL:$2|egyike ($1) nem található|($1) nem találhatóak}}.\n\nEzt általában egy elavult, törölt oldalra mutató laptörténeti hivatkozás használata okozza. Részletek a [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} törlési naplóban] találhatóak.",
        "searchresults": "A keresés eredménye",
        "searchresults-title": "Keresési eredmények: „$1”",
        "titlematches": "Címbeli egyezések",
        "right-sendemail": "e-mail küldése más felhasználóknak",
        "right-passwordreset": "Jelszó visszaállítási emailek megtekintése",
        "right-managechangetags": "[[Special:Tags|címkék]] létrehozása és (de)aktiválása",
-       "right-applychangetags": "[[Special:Tags|címkék]] alkalmazása a változakra",
+       "right-applychangetags": "[[Special:Tags|címkék]] alkalmazása saját változatokra",
        "right-changetags": "egyedi lapváltozatokon és naplóbejegyzéseken tetszőleges [[Special:Tags|címkék]] hozzáadása és törlése",
-       "right-deletechangetags": "[[Special:Tags|Címkék]] törlése az adatbázisból",
+       "right-deletechangetags": "[[Special:Tags|címkék]] törlése az adatbázisból",
        "grant-generic": "„$1” jogosultságcsomag",
        "grant-group-page-interaction": "interakció lapokkal",
        "grant-group-file-interaction": "interakció médiával",
        "grant-group-high-volume": "Nagy mennyiségű szerkesztés végrehajtása",
        "grant-group-customization": "Személyre szabás és beállítások",
        "grant-group-administration": "Adminisztratív műveletek végrehajtása",
+       "grant-group-private-information": "Privát adataid elérése",
        "grant-group-other": "egyéb műveletek",
        "grant-blockusers": "felhasználók blokkolása és blokk feloldása",
        "grant-createaccount": "fiókok létrehozása",
        "action-createpage": "ennek a lapnak a létrehozása",
        "action-createtalk": "vitalap létrehozása",
        "action-createaccount": "felhasználói fiók elkészítése",
+       "action-autocreateaccount": "külső fiók automatikus létrehozása",
        "action-history": "laptörténet megtekintése",
        "action-minoredit": "szerkesztés aprónak jelölése",
        "action-move": "lap átnevezése",
        "action-viewmyprivateinfo": "személyes adatok megtekintése",
        "action-editmyprivateinfo": "személyes adatok szerkesztése",
        "action-editcontentmodel": "a lap tartalom modelljének szerkesztése",
-       "action-managechangetags": "adatbáziscímkék létrehozása és (de)aktiválása",
+       "action-managechangetags": "címkék létrehozása és (de)aktiválása",
        "action-applychangetags": "változtatások címkézése",
        "action-changetags": "egyedi változtatások és napló bejegyzések tetszőleges címkével való ellátása és törlése",
        "action-deletechangetags": "címkék törlése az adatbáziból",
        "recentchanges-page-added-to-category-bundled": "[[:$1]] hozzáadva a kategóriához, [[Special:WhatLinksHere/$1|ez a lap be van illesztve más lapokra]]",
        "recentchanges-page-removed-from-category": "[[:$1]] eltávolítva a kategóriából",
        "recentchanges-page-removed-from-category-bundled": "[[:$1]] eltávolítva a kategóriából, [[Special:WhatLinksHere/$1|ez a lap be van illesztve más lapokra]]",
+       "autochange-username": "MediaWiki automatikus módosítása",
        "upload": "Fájl feltöltése",
        "uploadbtn": "Fájl feltöltése",
        "reuploaddesc": "Visszatérés a feltöltési űrlaphoz.",
        "file-thumbnail-no": "A fájlnév a(z) <strong>$1</strong> karakterlánccal kezdődik.\nÚgy tűnik, hogy ez egy kisméretű kép ''(bélyegkép)''.\nHa rendelkezel a teljesméretű képpel, akkor töltsd fel azt, egyébként kérjük, hogy változtasd meg a fájlnevet.",
        "fileexists-forbidden": "Már létezik egy ugyanilyen nevű fájl, és nem lehet felülírni.\nHa még mindig fel szeretnéd tölteni a fájlt, menj vissza, és adj meg egy új nevet. [[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Egy ugyanilyen nevű fájl már létezik a közös fájlmegosztóban; kérlek menj vissza és válassz egy másik nevet a fájlnak, ha még mindig fel akarod tölteni! [[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "A feltöltendő fájl pontos másolata a(z) <strong>[[:$1]]</strong> jelenlegi változatának.",
+       "fileexists-duplicate-version": "A feltöltendő fájl pontos másolata a(z) <strong>[[:$1]]</strong> {{PLURAL:$2|egy régebbi változatának|régebbi változatainak}}.",
        "file-exists-duplicate": "Ez a következő {{PLURAL:$1|fájl|fájlok}} duplikátuma:",
        "file-deleted-duplicate": "Egy ehhez hasonló fájlt ([[:$1]]) korábban már töröltek. Ellenőrizd a fájl törlési naplóját, mielőtt újra feltöltenéd.",
        "file-deleted-duplicate-notitle": "Egy ugyanilyen fájlt korábban már töröltek, és címét eltávolították. Kérj meg valakit, aki meg tudja nézni a törölt fájlokat, hogy tekintse át a helyzetet, mielőtt újra feltöltenéd a fájlt.",
        "uploaded-script-svg": "A feltöltött SVG fájlodban szkriptelemet találtunk: \"$1\".",
        "uploaded-hostile-svg": "Nem biztonságos CSS kódot találtunk a feltöltött SVG fájlod stíluselemei között.",
        "uploaded-event-handler-on-svg": "Az alábbi eseménykezelő-attribútum beállítása nem megengedett az SVG fájlokban: <code>$1=$2</code>.",
+       "uploaded-href-attribute-svg": "href attribútumok SVG fájlokban csak http:// vagy https:// protokollal engedélyezettek, <code>&lt;$1 $2=\"$3\"&gt;</code> található.",
        "uploaded-href-unsafe-target-svg": "Nem biztonságos adatra mutató href-et találtunk a feltöltött SVG-fájlban: URI-cél <code>&lt;$1 $2=\"$3\"&gt;</code>.",
        "uploaded-animate-svg": "A feltöltött SVG fájlban \"animate\" taget találtam, ami az alábbi \"from\" attribútumával megváltoztathat egy href-et: <code>&lt;$1 $2=\"$3\"&gt;</code>.",
+       "uploaded-setting-event-handler-svg": "Eseménykezelő attribútumok beállítása blokkolva van, <code>&lt;$1 $2=\"$3\"&gt;</code> található a feltöltendő SVG fájlban.",
+       "uploaded-setting-href-svg": "A „set” címke használata „href” attribútum szülőelemhez adására blokkolva van.",
        "uploaded-setting-handler-svg": "Az SVG kódok, amelyek a \"handler\" attribútumot távolra/adatra/szkriptre állítják, le vannak tiltva. A feltöltött SVG fájlban a következőt találtam: <code>$1=\"$2\"</code>.",
        "uploaded-remote-url-svg": "Az SVG kódok, amelyek bármely stílus-attribútumot távoli URL-ra állítják, le vannak tiltva. A feltöltött SVG fájlban a következőt találtam: <code>$1=\"$2\"</code>.",
        "uploaded-image-filter-svg": "A feltöltött SVG fájl URL-t tartalmazó képfiltert tartalmaz: <code>&lt;$1 $2=\"$3\"&gt;</code>.",
        "upload-too-many-redirects": "Az URL túl sokszor volt átirányítva",
        "upload-http-error": "HTTP-hiba történt: $1",
        "upload-copy-upload-invalid-domain": "Másolás nem engedélyezett ebből a tartományból.",
+       "upload-foreign-cant-upload": "A wiki nincs konfigurálva fájlok feltöltésére a kért külső fájltárolóba.",
+       "upload-foreign-cant-load-config": "A külső fájltárolóba való fájlfeltöltés konfigurációjának beolvasása sikertelen.",
        "upload-dialog-disabled": "Fájl feltöltés ezzel a párbeszéddel tiltott ezen a wikin.",
        "upload-dialog-title": "Fájl feltöltése",
        "upload-dialog-button-cancel": "Mégse",
+       "upload-dialog-button-back": "Vissza",
        "upload-dialog-button-done": "Kész",
        "upload-dialog-button-save": "Mentés",
        "upload-dialog-button-upload": "Feltöltés",
        "backend-fail-read": "Nem sikerült olvasni ebből a fájlból: $1.",
        "backend-fail-create": "Nem sikerült írni ebbe a fájlba: $1.",
        "backend-fail-maxsize": "Nem lehet írni ezt a fájlt: $1, mert a mérete nagyobb, mint $2 bájt.",
-       "backend-fail-readonly": "A(z) „$1” tárolórendszer jelenleg csak olvasható. Ennek oka a következő: „$2”",
+       "backend-fail-readonly": "A(z) „$1” tárolórendszer jelenleg csak olvasható. Ennek oka a következő: <em>$2</em>",
        "backend-fail-synced": "A(z) „$1” fájl inkonzisztens állapotban van a tárolórendszerek között",
        "backend-fail-connect": "Nem sikerült csatlakozni a(z) „$1” tárolórendszerhez.",
        "backend-fail-internal": "Ismeretlen hiba keletkezett a(z) „$1” tárolórendszerben.",
        "filerevert-submit": "Visszaállítás",
        "filerevert-success": "<span class=\"plainlinks\">A(z) '''[[Media:$1|$1]]''' fájl visszaállítása a(z) [$4 verzióra, $3, $2] sikerült.</span>",
        "filerevert-badversion": "A megadott időbélyegzésű fájlnak nincs helyi változata.",
+       "filerevert-identical": "A fájl jelenlegi verziója már azonos a kiválasztottal.",
        "filedelete": "$1 törlése",
        "filedelete-legend": "Fájl törlése",
        "filedelete-intro": "Törölni készülsz a(z) '''[[Media:$1|$1]]''' médiafájlt, a teljes fájltörténetével együtt.",
        "apisandbox-api-disabled": "API le van tiltva ezen az oldalon.",
        "apisandbox-intro": "Ezen az oldalon kísérletezhetsz a <strong>MediaWiki web service API</strong>-val.\nA használattal kapcsolatos további részletek az [[mw:API:Main page|API-dokumentációnál]] találhatók. Példa: [https://www.mediawiki.org/wiki/API#A_simple_example olvasd el a főoldal tartalomjegyzékét]. További példákért válassz egy tevékenységet!\n\nFigyelj rá, hogy bár ez csak egy „homokozó”, ettől még az általad végzett műveletek módosíthatják a wikit!",
        "apisandbox-fullscreen": "Panel kinyitása",
+       "apisandbox-fullscreen-tooltip": "A homokozópanel kinyitása a böngészőablak kitöltéséhez.",
        "apisandbox-unfullscreen": "Lap mutatása",
+       "apisandbox-unfullscreen-tooltip": "A homokozópanel méretének csökkentése a MediaWiki navigációs hivatkozásainak megjelenítéséhez.",
        "apisandbox-submit": "Kérés végrehajtása",
        "apisandbox-reset": "Törlés",
        "apisandbox-retry": "Újra",
        "apisandbox-dynamic-parameters-add-placeholder": "Paraméter neve",
        "apisandbox-dynamic-error-exists": "A(z) „$1” nevű paraméter már létezik.",
        "apisandbox-deprecated-parameters": "Elavult paraméterek",
+       "apisandbox-fetch-token": "A token automatikus kitöltése",
        "apisandbox-submit-invalid-fields-title": "Egyes mezők érvénytelenek",
        "apisandbox-submit-invalid-fields-message": "Javítsd ki a jelzett mezőket, és próbáld újra.",
        "apisandbox-results": "Eredmények",
        "apisandbox-sending-request": "API-kérés küldése…",
        "apisandbox-loading-results": "API-válaszok fogadása…",
+       "apisandbox-results-error": "Hiba történt az API-lekérdezés válaszának betöltése közben: $1.",
        "apisandbox-request-url-label": "Kérő URL:",
        "apisandbox-request-time": "Kérés hossza: $1 ms",
+       "apisandbox-results-fixtoken": "Token javítása és újrapróbálkozás",
+       "apisandbox-results-fixtoken-fail": "A(z) „$1” token lekérése sikertelen.",
+       "apisandbox-alert-page": "Hibás mezők vannak ezen a lapon.",
        "apisandbox-alert-field": "Ennek a mezőnek az értéke érvénytelen.",
+       "apisandbox-continue": "Folytatás",
+       "apisandbox-continue-clear": "Törlés",
+       "apisandbox-continue-help": "A {{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries folytatja] az utolsó kérést; a {{int:apisandbox-continue-clear}} törli a folytatáshoz kapcsolódó paramétereket.",
        "booksources": "Könyvforrások",
        "booksources-search-legend": "Könyvforrások keresése",
        "booksources-search": "Keresés",
        "logempty": "Nincs illeszkedő naplóbejegyzés.",
        "log-title-wildcard": "Így kezdődő címek keresése",
        "showhideselectedlogentries": "Kijelölt napló bejegyzések megjelenítése/elrejtése",
-       "log-edit-tags": "Kiválasztott napló címkék szerkesztése",
+       "log-edit-tags": "Kiválasztott naplóbejegyzések címkéinek szerkesztése",
        "checkbox-select": "Kiválasztás: $1",
        "checkbox-all": "Mind",
        "checkbox-none": "Nincs",
        "trackingcategories-msg": "Nyomkövető kategória",
        "trackingcategories-name": "Üzenetnév",
        "trackingcategories-desc": "Kategóriába kerülés feltétele",
+       "restricted-displaytitle-ignored": "Lapok figyelmen kívül hagyott megjelenítendő lapcímmel",
+       "restricted-displaytitle-ignored-desc": "A lapon figyelmen kívül hagyott <code><nowiki>{{DISPLAYTITLE}}</nowiki></code> van, mivel a megadott cím nem egyezik a lap tényleges címével.",
        "noindex-category-desc": "A lapot nem indexelik a keresőrobotok, mert tartalmazza a <code><nowiki>__NOINDEX__</nowiki></code> varázsszót, és egy olyan névtérben található, ahol ez engedélyezett.",
        "index-category-desc": "A lapot akkor is indexelik a keresőrobotok, ha egyébként nem tennék, mert tartalmazza az <code><nowiki>__INDEX__</nowiki></code> varázsszót, és egy olyan névtérben található, ahol ez engedélyezett.",
        "post-expand-template-inclusion-category-desc": "A lap mérete nagyobb a <code>$wgMaxArticleSize</code> változóban tárolt értéknél a sablonok kibontása után, így néhány sablon nem került kibontásra.",
        "watchnologin": "Nem vagy bejelentkezve",
        "addwatch": "Hozzáadás a figyelőlistához",
        "addedwatchtext": "A(z) „[[:$1]]” lapot és vitalapját hozzáadtam a [[Special:Watchlist|figyelőlistádhoz]].",
+       "addedwatchtext-talk": "A(z) „[[:$1]]” lapot és a hozzá tartozó tartalmi lapot hozzáadtam a [[Special:Watchlist|figyelőlistádhoz]].",
        "addedwatchtext-short": "Az oldal: \"$1\" hozzá lett adva a figyelőlistádhoz.",
        "removewatch": "Eltávolítás a figyelőlistáról",
        "removedwatchtext": "A(z) „[[:$1]]” lapot és vitalapját eltávolítottam a [[Special:Watchlist|figyelőlistáról]].",
+       "removedwatchtext-talk": "A(z) „[[:$1]]” lapot és a hozzá tartozó tartalmi lapot eltávolítottam a [[Special:Watchlist|figyelőlistáról]].",
        "removedwatchtext-short": "Az oldal: \"$1\" el lett távolítva a figyelőlistádról.",
        "watch": "Lap figyelése",
        "watchthispage": "Lap figyelése",
        "delete-toobig": "Ennek a lapnak a laptörténete több mint {{PLURAL:$1|egy|$1}} változatot őriz. A szervert kímélendő az ilyen lapok törlése nem engedélyezett.",
        "delete-warning-toobig": "Ennek a lapnak a laptörténete több mint {{PLURAL:$1|egy|$1}} változatot őriz. Törlése fennakadásokat okozhat a wiki adatbázis-műveleteiben; óvatosan járj el.",
        "deleteprotected": "Nem tudod törölni a lapot, mivel le van védve.",
-       "deleting-backlinks-warning": "'''Figyelem:'''  [[Special:WhatLinksHere/{{FULLPAGENAME}}|Más lapok]] hivatkoznak a törlendő oldalra.",
+       "deleting-backlinks-warning": "<strong>Figyelem:</strong> [[Special:WhatLinksHere/{{FULLPAGENAME}}|Más lapok]] hivatkoznak a törlendő oldalra (vagy beillesztik azt).",
        "rollback": "Szerkesztések visszaállítása",
        "rollbacklink": "visszaállítás",
        "rollbacklinkcount": "$1 szerkesztés visszaállítása",
        "rollbacklinkcount-morethan": "több mint $1 szerkesztés visszaállítása",
        "rollbackfailed": "A visszaállítás nem sikerült",
+       "rollback-missingparam": "Kötelező paraméterek hiányoznak a kérésből.",
+       "rollback-missingrevision": "A lapváltozat adatainak betöltése sikertelen.",
        "cantrollback": "Nem lehet visszaállítani: az utolsó szerkesztést végző felhasználó az egyetlen, aki a lapot szerkesztette.",
        "alreadyrolled": "[[:$1]] utolsó, [[User:$2|$2]] ([[User talk:$2|vita]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) általi szerkesztését nem lehet visszavonni:\nidőközben valaki már visszavonta vagy szerkesztette a lapot.\n\nAz utolsó szerkesztést [[User:$3|$3]] ([[User talk:$3|vita]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]) végezte.",
        "editcomment": "A szerkesztési összefoglaló <em>$1</em> volt.",
        "revertpage": "Visszaállítottam a lap korábbi változatát: [[Special:Contributions/$2|$2]]  ([[User talk:$2|vita]]) szerkesztéséről [[User:$1|$1]] szerkesztésére",
        "revertpage-nouser": "Visszaállítottam a lap korábbi változatát (szerkesztőnév eltávolítva) szerkesztéséről [[User:$1|$1]] szerkesztésére",
        "rollback-success": "$1 szerkesztéseit visszaállítottam $2 utolsó változatára.",
+       "rollback-success-notify": "$1 szerkesztései visszaállítva;\nhelyreállítva $2 utolsó változata. [$3 Változtatások megtekintése]",
        "sessionfailure-title": "Munkamenethiba",
        "sessionfailure": "Úgy látszik, hogy probléma van a bejelentkezési munkameneteddel;\nez a művelet a munkamenet eltérítése miatti óvatosságból megszakadt.\nKérjük, hogy nyomd meg a „vissza” gombot, és töltsd le újra az oldalt, ahonnan jöttél, majd próbáld újra.",
        "changecontentmodel": "A lap tartalommodelljének megváltoztatása",
        "changecontentmodel-success-text": "A(z) [[:$1]] lap tartalommodellje sikeresen megváltoztatva.",
        "changecontentmodel-cannot-convert": "A(z) [[:$1]] lap nem alakítható át $2 típusúvá.",
        "changecontentmodel-nodirectediting": "A(z) $1 tartalommodell nem támogatja a közvetlen szerkesztést",
+       "changecontentmodel-emptymodels-title": "Nincs elérhető tartalommodell",
+       "changecontentmodel-emptymodels-text": "A(z) [[:$1]] lapon lévő tartalom nem alakítható át semmilyen típusúvá.",
        "log-name-contentmodel": "Tartalommodell-változások naplója",
        "log-description-contentmodel": "Egy lap tartalommodelljéhez kapcsolódó események",
+       "logentry-contentmodel-new": "$1 {{GENDER:$2|létrehozta}} a(z) $3 lapot nem alapértelmezett „$5” tartalommodellel.",
        "logentry-contentmodel-change": "$1 {{GENDER:$2|megváltoztatta}} a(z) $3 lap tartalommodeljét erről: „$4” erre: „$5”",
        "logentry-contentmodel-change-revertlink": "visszaállítás",
        "logentry-contentmodel-change-revert": "visszaállítás",
        "undeletehistorynoadmin": "Ezt a szócikket törölték. A törlés okát alább az összegzésben\nláthatod, az oldalt a törlés előtt szerkesztő felhasználók részleteivel együtt. Ezeknek\na törölt változatoknak a tényleges szövege csak az adminisztrátorok számára hozzáférhető.",
        "undelete-revision": "$1 $4, $5-kori törölt változata (szerző: $3).",
        "undeleterevision-missing": "Érvénytelen vagy hiányzó változat. Lehet, hogy rossz hivatkozásod van, ill. a\nváltozatot visszaállították vagy eltávolították az archívumból.",
+       "undeleterevision-duplicate-revid": "{{PLURAL:$1|Egy|$1}} változat nem állítható vissza, mert a <code>rev_id</code>-{{PLURAL:$1|je|jük}} már használatban van.",
        "undelete-nodiff": "Nem található korábbi változat.",
        "undeletebtn": "Helyreállítás",
        "undeletelink": "megtekintés/helyreállítás",
        "undeletedrevisions": "$1 változat helyreállítva",
        "undeletedrevisions-files": "{{PLURAL:$1|egy|$1}} változat és {{PLURAL:$2|egy|$2}} fájl visszaállítva",
        "undeletedfiles": "{{PLURAL:$1|egy|$1}} fájl visszaállítva",
-       "cannotundelete": "Lap visszaállítása sikertelen: $1",
+       "cannotundelete": "Egy vagy több visszaállítás sikertelen:\n$1",
        "undeletedpage": "'''$1 helyreállítva'''\n\nLásd a [[Special:Log/delete|törlési naplót]] a legutóbbi törlések és helyreállítások listájához.",
        "undelete-header": "A legutoljára törölt lapokat lásd a [[Special:Log/delete|törlési naplóban]].",
        "undelete-search-title": "Törölt lapok keresése",
        "sp-contributions-newbies-sub": "Új szerkesztők lapjai",
        "sp-contributions-newbies-title": "Új szerkesztők közreműködései",
        "sp-contributions-blocklog": "Blokkolási napló",
-       "sp-contributions-suppresslog": "elrejtett szerkesztők közreműködései",
-       "sp-contributions-deleted": "törölt szerkesztések",
+       "sp-contributions-suppresslog": "elrejtett {{GENDER:$1|felhasználók}} közreműködései",
+       "sp-contributions-deleted": "törölt {{GENDER:$1|szerkesztések}}",
        "sp-contributions-uploads": "feltöltések",
        "sp-contributions-logs": "naplók",
        "sp-contributions-talk": "vitalap",
        "unblock": "Felhasználó blokkolásának feloldása",
        "blockip": "{{GENDER:$1|Felhasználó}} blokkolása",
        "blockip-legend": "Felhasználó blokkolása",
-       "blockiptext": "Az alábbi űrlap segítségével megvonhatod egy szerkesztő vagy IP-cím szerkesztési jogait.\nÜgyelj rá, hogy az intézkedésed mindig legyen tekintettel a vonatkozó [[{{MediaWiki:Policy-url}}|irányelvekre]].\nAdd meg a blokkolás okát is (például idézd a blokkolandó személy által vandalizált lapokat).",
+       "blockiptext": "Az alábbi űrlap segítségével megvonhatod egy szerkesztő vagy IP-cím szerkesztési jogait.\nEzt az eszközt csak vandalizmus megelőzésére, a vonatkozó [[{{MediaWiki:Policy-url}}|irányelvvel]] összhangban használd.\nAdd meg a blokkolás okát is (például idézd a blokkolandó személy által vandalizált lapokat).\nIP-tartományokat is blokkolhatsz a [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing CIDR] szintaxissal; a legnagyobb engedélyezett tartomány /$1 IPv4 és /$2 IPv6 esetén.",
        "ipaddressorusername": "IP-cím vagy felhasználói név",
        "ipbexpiry": "Lejárat:",
        "ipbreason": "Ok:",
        "lockedbyandtime": "($1 zárta le $2 $3-kor)",
        "move-page": "$1 átnevezése",
        "move-page-legend": "Lap átnevezése",
-       "movepagetext": "Az alábbi űrlap használatával nevezhetsz át egy lapot, és helyezheted át teljes laptörténetét az új nevére.\nA régi cím az új címre való átirányítás lesz.\nFrissítheted a régi címre mutató átirányításokat, hogy azok automatikusan a megfelelő címre mutassanak;\nha nem teszed, ellenőrizd a [[Special:DoubleRedirects|dupla]] vagy [[Special:BrokenRedirects|hibás átirányításokat]].\nNeked kell biztosítanod, hogy a linkek továbbra is oda mutassanak, ahová mutatniuk kell.\n\nA lap '''nem''' nevezhető át, ha már van egy ugyanilyen című lap, hacsak nem üres vagy átirányítás, és nincs laptörténete.\nEz azt jelenti, hogy vissza tudsz nevezni egy tévedésből átnevezett lapot, és nem tudsz létező lapot véletlenül felülírni.\n\n'''FIGYELEM!'''\nNépszerű oldalak esetén ez drasztikus és nem várt változtatás lehet;\ngyőződj meg a folytatás előtt arról, hogy tisztában vagy a következményekkel.",
-       "movepagetext-noredirectfixer": "Az alábbi űrlap használatával nevezhetsz át egy lapot, és helyezheted át teljes laptörténetét az új nevére.\nA régi cím az új címre való átirányítás lesz.\nEllenőrizd a [[Special:DoubleRedirects|dupla]] és a [[Special:BrokenRedirects|hibás átirányításoknál]], hogy a linkek továbbra is oda mutatnak, ahová mutatniuk kell.\n\nA lap '''nem''' nevezhető át, ha már van egy ugyanilyen című lap, hacsak nem üres, vagy átirányítás, aminek nincs laptörténete.\nEz azt jelenti, hogy vissza tudsz nevezni egy tévedésből átnevezett lapot, de nem tudsz egy már létező lapot véletlenül felülírni.\n\n'''Figyelem!'''\nNépszerű oldalak esetén ez drasztikus és nem várt változtatás lehet;\ngyőződj meg a folytatás előtt arról, hogy tisztában vagy-e a következményekkel.",
+       "movepagetext": "Az alábbi űrlap használatával nevezhetsz át egy lapot, és helyezheted át teljes laptörténetét az új nevére.\nA régi cím az új címre való átirányítás lesz.\nFrissítheted a régi címre mutató átirányításokat, hogy azok automatikusan a megfelelő címre mutassanak;\nha nem teszed, ellenőrizd a [[Special:DoubleRedirects|dupla]] vagy [[Special:BrokenRedirects|hibás átirányításokat]].\nNeked kell biztosítanod, hogy a linkek továbbra is oda mutassanak, ahová mutatniuk kell.\n\nA lap <strong>nem</strong> nevezhető át, ha már van egy ugyanilyen című lap, hacsak nem üres vagy átirányítás, és nincs laptörténete.\nEz azt jelenti, hogy vissza tudsz nevezni egy tévedésből átnevezett lapot, és nem tudsz létező lapot véletlenül felülírni.\n\n<strong>Megjegyzés:</strong>\nNépszerű oldalak esetén ez drasztikus és nem várt változtatás lehet;\ngyőződj meg a folytatás előtt arról, hogy tisztában vagy a következményekkel.",
+       "movepagetext-noredirectfixer": "Az alábbi űrlap használatával nevezhetsz át egy lapot, és helyezheted át teljes laptörténetét az új nevére.\nA régi cím az új címre való átirányítás lesz.\nEllenőrizd a [[Special:DoubleRedirects|dupla]] és a [[Special:BrokenRedirects|hibás átirányításoknál]], hogy a linkek továbbra is oda mutatnak, ahová mutatniuk kell.\n\nA lap <strong>nem</strong> nevezhető át, ha már van egy ugyanilyen című lap, hacsak nem üres, vagy átirányítás, aminek nincs laptörténete.\nEz azt jelenti, hogy vissza tudsz nevezni egy tévedésből átnevezett lapot, de nem tudsz egy már létező lapot véletlenül felülírni.\n\n<strong>Megjegyzés:</strong>\nNépszerű oldalak esetén ez drasztikus és nem várt változtatás lehet;\ngyőződj meg a folytatás előtt arról, hogy tisztában vagy-e a következményekkel.",
        "movepagetalktext": "Ha bejelölöd ezt a pipát, akkor a laphoz tartozó vitalap automatikusan átneveződik az új címre, kivéve ha már létezik egy nem üres vitalap az új helyen.\n\nEbben az esetben a vitalapot külön, kézzel kell átnevezned vagy egyesítened a kívánságaid szerint.",
        "moveuserpage-warning": "'''Figyelem:''' Egy felhasználólapot készülsz átmozgatni. Csak a lap lesz átmozgatva, a szerkesztő ''nem'' lesz átnevezve.",
        "movecategorypage-warning": "<strong>Figyelmeztetés:</strong> Éppen egy kategórialapot készülsz átnevezni. Figyelj arra, hogy csak a lap lesz átnevezve, az idekategorizált lapok <em>nem</em> lesznek átkategorizálva.",
        "movelogpagetext": "Az alábbiakban az átnevezett lapok listája látható.",
        "movesubpage": "{{PLURAL:$1|Allap|Allapok}}",
        "movesubpagetext": "Ennek a lapnak {{PLURAL:$1|egy|$1}} allapja van.",
+       "movesubpagetalktext": "A kapcsolódó vitalapnak az alább látható {{PLURAL:$1|allapja|$1 allapja}} van.",
        "movenosubpage": "Ez a lap nem rendelkezik allapokkal.",
        "movereason": "Indoklás:",
        "revertmove": "visszaállítás",
        "import-nonewrevisions": "Nincs változat importálva (mindet korábban importálták vagy a hiba miatt program kihagyta).",
        "xml-error-string": "$1 a(z) $2. sorban, $3. oszlopban ($4. bájt): $5",
        "import-upload": "XML-adatok feltöltése",
-       "import-token-mismatch": "Elveszett a session adat, próbálkozz újra.",
+       "import-token-mismatch": "Elveszett a munkamenetadatok.\n\nLehet, hogy ki vagy jelentkezve. <strong>Kérjük, győződj meg róla, hogy még mindig be vagy jelentkezve, majd próbálkozz újra!</strong> Ha ez továbbra sem sikerül, próbálj meg [[Special:UserLogout|kijelentkezni]], majd ismét bejelentkezni, és ellenőrizd, hogy a böngésződ elfogad sütiket erről az oldalról.",
        "import-invalid-interwiki": "A kijelölt wikiből nem lehet importálni.",
        "import-error-edit": "„$1” lap nem került importálásra, mert nem szerkesztheted azt.",
        "import-error-create": "„$1” lap nem került importálásra, mert nem hozhatod létre azt.",
        "tooltip-feed-rss": "A lap tartalma RSS hírcsatorna formájában",
        "tooltip-feed-atom": "A lap tartalma Atom hírcsatorna formájában",
        "tooltip-t-contributions": "A {{GENDER:$1|felhasználó}} közreműködéseinek listája",
-       "tooltip-t-emailuser": "Írj levelet ennek a felhasználónak!",
+       "tooltip-t-emailuser": "Írj e-mailt ennek a {{GENDER:$1|felhasználónak}}",
        "tooltip-t-info": "További információk erről a lapról",
        "tooltip-t-upload": "Képek vagy egyéb fájlok feltöltése",
        "tooltip-t-specialpages": "Az összes speciális lap listája",
        "pageinfo-watchers": "Figyelők száma",
        "pageinfo-visiting-watchers": "A lapot figyelők száma, akik nézték a friss változtatásait",
        "pageinfo-few-watchers": "Kevesebb mint $1 szerkesztő figyeli",
+       "pageinfo-few-visiting-watchers": "Nem biztos, hogy látta bárki a lapot, akinek a figyelőlistáján szerepel",
        "pageinfo-redirects-name": "Átirányítások száma erre a lapra",
        "pageinfo-subpages-name": "A lap allapjai",
        "pageinfo-subpages-value": "$1 ($2 {{PLURAL:$2|átirányítás}}; $3 {{PLURAL:$3|nem átirányítás}})",
        "pageinfo-category-pages": "Lapok száma",
        "pageinfo-category-subcats": "Alkategóriák száma",
        "pageinfo-category-files": "Fájlok száma",
+       "pageinfo-user-id": "Felhasználóazonosító",
        "markaspatrolleddiff": "Ellenőrzöttnek jelölöd",
        "markaspatrolledtext": "Ellenőriztem",
        "markaspatrolledtext-file": "Ellenőriztem",
        "newimages-showbots": "Botos feltöltések mutatása",
        "newimages-hidepatrolled": "Ellenőrzött szerkesztések elrejtése",
        "noimages": "Nem tekinthető meg semmi.",
+       "gallery-slideshow-toggle": "Miniatűrök ki/bekapcsolása",
        "ilsubmit": "Keresés",
        "bydate": "dátum szerint",
        "sp-newimages-showfrom": "Új fájlok mutatása $1 $2 után",
        "confirmemail_body_set": "Valaki, valószínűleg te, ezt az email címet adta meg\n„$2” nevű {{SITENAME}}-fiókjához a következő IP-címről: $1.\n\nHa meg szeretnéd erősíteni, hogy a fiók valóban hozzád tartozik, így aktiválva a(z) {{SITENAME}} e-mailes funkcióit, nyisd meg az alábbi linket a böngésződben:\n\n$3\n\nHa a fiók *nem* hozzád tartozik, kövesd az alábbi linket a\nmegerősítés visszavonásához:\n\n$5\n\nEz a megerősítő e-mail $4-ig érvényes.",
        "confirmemail_invalidated": "E-mail-cím megerősíthetősége visszavonva",
        "invalidateemail": "E-mail-cím megerősíthetőségének visszavonása",
+       "notificationemail_subject_changed": "Megváltozott az e-mail-címed a(z) {{SITENAME}} wikin",
+       "notificationemail_subject_removed": "E-mail-cím eltávolítva a(z) {{SITENAME}} wikin",
+       "notificationemail_body_changed": "Valaki (vélhetően te, a(z) $1 IP-címről) megváltoztatta a(z) „$2” fiókhoz tartozó e-mail-címet a(z) {{SITENAME}} wikin a következőre: „$3”.\n\nHa ez nem te voltál, azonnal lépj kapcsolatba egy adminisztrátorral.",
+       "notificationemail_body_removed": "Valaki (vélhetően te, a(z) $1 IP-címről) eltávolította a(z) „$2” fiókhoz tartozó e-mail-címet a(z) {{SITENAME}} wikin.\n\nHa ez nem te voltál, azonnal lépj kapcsolatba egy adminisztrátorral.",
        "scarytranscludedisabled": "[Wikiközi beillesztés le van tiltva]",
        "scarytranscludefailed": "[$1 sablon letöltése sikertelen]",
        "scarytranscludefailed-httpstatus": " [Nem sikerült betölteni a(z) $1 sablont: HTTP $2]",
        "scarytranscludetoolong": "[Az URL túl hosszú]",
        "deletedwhileediting": "'''Figyelmeztetés:''' A lapot a szerkesztés megkezdése után törölték!",
-       "confirmrecreate": "Miután elkezdted szerkeszteni, [[User:$1|$1]] ([[User talk:$1|vita]]) törölte ezt a lapot a következő indokkal:\n: ''$2''\nKérlek erősítsd meg, hogy tényleg újra akarod-e írni a lapot.",
-       "confirmrecreate-noreason": "[[User:$1|$1]] ([[User talk:$1|vita]]) törölte ezt a lapot, miután elkezdtél szerkeszteni. Erősítsd meg, hogy tényleg ismét létre szeretnéd hozni a lapot.",
+       "confirmrecreate": "Miután elkezdted szerkeszteni, [[User:$1|$1]] ([[User talk:$1|vita]]) törölte ezt a lapot a következő indokkal:\n: <em>$2</em>\nKérlek erősítsd meg, hogy tényleg újra létre akarod-e hozni a lapot.",
+       "confirmrecreate-noreason": "[[User:$1|$1]] ([[User talk:$1|vita]]) törölte ezt a lapot, miután elkezdted szerkeszteni. Erősítsd meg, hogy tényleg ismét létre szeretnéd hozni a lapot.",
        "recreate": "Újraírás",
        "confirm_purge_button": "OK",
        "confirm-purge-top": "Törlöd az oldal gyorsítótárban (cache) található változatát?",
        "version-other": "Egyéb",
        "version-mediahandlers": "Médiafájl-kezelők",
        "version-hooks": "Hookok",
-       "version-parser-extensiontags": "Az értelmező kiterjesztéseinek tagjei",
+       "version-parser-extensiontags": "Az értelmező kiterjesztéseinek címkéi",
        "version-parser-function-hooks": "Az értelmező függvényeinek hookjai",
        "version-hook-name": "Hook neve",
        "version-hook-subscribedby": "Használja",
        "version-libraries-license": "Licenc",
        "version-libraries-description": "Leírás",
        "version-libraries-authors": "Szerzők",
-       "redirect": "Átirányítás fájl, szerkesztő, oldal vagy oldalváltozat alapján",
-       "redirect-summary": "Ez a speciális lap átirányít egy fájlra (megadott fájlnévvel), lapra (megadott lapváltozat- vagy lapazonosító számmal) vagy felhasználóra (felhasználó azonosítószáma alapján). Használat: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]] vagy [[{{#Special:Redirect}}/user/101]].",
+       "redirect": "Átirányítás fájl, szerkesztő, olda, oldalváltozat vagy naplóazonosító alapján",
+       "redirect-summary": "Ez a speciális lap átirányít egy fájlra (megadott fájlnévvel), lapra (megadott lapváltozat- vagy lapazonosító számmal), felhasználóra (felhasználó azonosítószáma alapján) vagy naplóbejegyzésre (naplóazonosító alapján). Használat: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]], [[{{#Special:Redirect}}/user/101]] vagy [[{{#Special:Redirect}}/logid/186]].",
        "redirect-submit": "Mehet",
        "redirect-lookup": "Keresés:",
        "redirect-value": "Érték:",
-       "redirect-user": "Felhasználóazonosító",
+       "redirect-user": "Felhasználóazonosító",
        "redirect-page": "Lapazonosító",
-       "redirect-revision": "Oldal felülvizsgálata",
+       "redirect-revision": "Lapváltozat",
        "redirect-file": "Fájlnév",
+       "redirect-logid": "Naplóazonosító",
        "redirect-not-exists": "Érték nem található",
        "fileduplicatesearch": "Duplikátumok keresése",
        "fileduplicatesearch-summary": "Fájlok duplikátumainak keresése hash értékük alapján.",
        "intentionallyblankpage": "Ez a lap szándékosan maradt üresen",
        "external_image_whitelist": " #Ezt a sort hagyd pontosan így, ahogy van<pre>\n#Ide reguláris kifejezéseket írhatsz (azon részüket, amik a // közé mennek)\n#Ezek egyeztetve lesznek a külső képek URL-jeivel\n#Egyezés esetén képként fognak megjelenni, egyébként csak link fog rájuk mutatni\n#A #-tel kezdődő sorok megjegyzésnek számítanak\n#A kis- és nagybetűk nincsenek megkülönböztetve\n\n#A reguláris kifejezéseket ezen sor alá írd. Ezt a sort hagyd így, ahogy van.</pre>",
        "tags": "Lapváltozat-címkék",
-       "tag-filter": "[[Special:Tags|Címke]]szűrő:",
+       "tag-filter": "[[Special:Tags|Címkeszűrő]]:",
        "tag-filter-submit": "Szűrő",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Címke|Címkék}}]]: $2)",
+       "tag-mw-contentmodelchange": "tartalommodell-változtatás",
+       "tag-mw-contentmodelchange-description": "Szerkesztések, amelyek [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel megváltoztatják egy lap tartalommodelljét].",
        "tags-title": "Címkék",
        "tags-intro": "Ez a lap azokat a címkéket és jelentéseiket tartalmazza, amikkel a szoftver megjelölhet egy szerkesztést.",
        "tags-tag": "Címke neve",
        "tags-actions-header": "Műveletek",
        "tags-active-yes": "Igen",
        "tags-active-no": "Nem",
-       "tags-source-extension": "Egy kiterjesztés határozza meg",
+       "tags-source-extension": "A szoftver határozza meg",
        "tags-source-manual": "Manuálisan adják meg felhasználók és botok",
        "tags-source-none": "Már nincs használatban",
        "tags-edit": "szerkesztés",
        "tags-delete-not-allowed": "A kiterjesztés által létrehozott címkék nem törölhetők, ha a kiterjesztés nem engedélyezi kifejezetten azt.",
        "tags-delete-not-found": "A(z) „$1” címke nem létezik.",
        "tags-delete-too-many-uses": "A(z) „$1” címke több mint $2 lapváltoztatásban szerepel, ezáltal nem törölhető.",
-       "tags-delete-warnings-after-delete": "A(z) „$1” címke sikeresen törölve lett, de a következő {{PLURAL:$2|figyelmeztetést|figyelmeztetéseket}} találtam:",
-       "tags-delete-no-permission": "Nincs engedélye a változás címkéinek törléséhez.",
+       "tags-delete-warnings-after-delete": "A(z) „$1” címke törölve lett, de a következő {{PLURAL:$2|figyelmeztetést|figyelmeztetéseket}} találtam:",
+       "tags-delete-no-permission": "Nincs engedélyed változáscímkék törléséhez.",
        "tags-activate-title": "Címke aktiválása",
        "tags-activate-question": "Éppen a(z) „$1” címke aktiválására készülsz.",
        "tags-activate-reason": "Indoklás:",
        "tags-deactivate-reason": "Indoklás:",
        "tags-deactivate-not-allowed": "Nem lehetséges a(z) „$1” címkét deaktiválni.",
        "tags-deactivate-submit": "Deaktiválás",
-       "tags-apply-no-permission": "Nincs jogosultságod a szerkesztéseket címkékkel ellátni.",
-       "tags-apply-not-allowed-one": "A(z)  „$1” cimkét nem lehet manuálisan alkalmazni.",
-       "tags-apply-not-allowed-multi": "A következő {{PLURAL:$2|címkét|címkéket}} nem lehet manuálisan alkalmazni: $1",
-       "tags-update-no-permission": "Nincs jogosultságod egyedi változatok és napló bejegyzések címkézésére és címkék eltávolítására.",
-       "tags-update-add-not-allowed-one": "A(z) „$1” címkét nem lehet manuálisan alkalmazni.",
-       "tags-update-add-not-allowed-multi": "A következő {{PLURAL:$2|címkét|címkéket}} nem lehet manuálisan alkalmazni: $1",
+       "tags-apply-no-permission": "Nincs jogosultságod a szerkesztéseidet címkékkel ellátni.",
+       "tags-apply-blocked": "Nem módosíthatsz címkéket, amíg blokkolva vagy.",
+       "tags-apply-not-allowed-one": "A(z) „$1” címke nem alkalmazható manuálisan.",
+       "tags-apply-not-allowed-multi": "A következő {{PLURAL:$2|címke|címkék}} nem alkalmazhatók manuálisan: $1",
+       "tags-update-no-permission": "Nincs jogosultságod egyedi változatok és naplóbejegyzések címkézésére és címkék eltávolítására.",
+       "tags-update-blocked": "Nem adhatsz hozzá vagy távolíthatsz el címkéket, amíg blokkolva vagy.",
+       "tags-update-add-not-allowed-one": "A(z) „$1” címke nem adható hozzá manuálisan.",
+       "tags-update-add-not-allowed-multi": "A következő {{PLURAL:$2|címke|címkék}} nem adhatók hozzá manuálisan: $1",
        "tags-update-remove-not-allowed-one": "A  „$1” címkét nem lehet törölni.",
-       "tags-update-remove-not-allowed-multi": "A következő {{PLURAL:$2|címkét|címkéket}} nem lehet manuálisan eltávolítani: $1",
+       "tags-update-remove-not-allowed-multi": "A következő {{PLURAL:$2|címke|címkék}} nem távolíthatók el manuálisan: $1",
        "tags-edit-title": "Címkék szerkesztése",
        "tags-edit-manage-link": "Címkék kezelése",
        "tags-edit-revision-selected": "[[:$2]] kiválasztott {{PLURAL:$1|változata|változatai}}",
        "tags-edit-logentry-selected": "Kiválasztott napló {{PLURAL:$1|esemény|események}}:",
-       "tags-edit-revision-legend": "Címkék hozzáadás vagy eltávolítása {{PLURAL:$1|ehhez a változathoz|mind a(z) $1 változathoz}}",
+       "tags-edit-revision-legend": "Címkék hozzáadása vagy eltávolítása {{PLURAL:$1|ehhez a változathoz|mind a(z) $1 változathoz}}",
        "tags-edit-logentry-legend": "Címkék hozzáadás vagy eltávolítása {{PLURAL:$1|ehhez a napló bejegyzéshez|mind a(z) $1 napló bejegyzéshez}}",
        "tags-edit-existing-tags": "Létező címkék:",
        "tags-edit-existing-tags-none": "<em>Nincs</em>",
        "tags-edit-failure": "A változásokat nem sikerült alkalmazni:\n$1",
        "tags-edit-nooldid-title": "Érvénytelen változat",
        "tags-edit-nooldid-text": "Nem adtál meg a változatot, vagy a megadott változat nem létezik.",
-       "tags-edit-none-selected": "Válassz legalább egy címlét, amelyet hozzá akarsz adni, vagy törölni szeretnél.",
+       "tags-edit-none-selected": "Válassz legalább egy címkét, amelyet hozzá akarsz adni, vagy törölni szeretnél.",
        "comparepages": "Lapok összehasonlítása",
        "compare-page1": "1. lap",
        "compare-page2": "2. lap",
        "htmlform-cloner-create": "További hozzáadása",
        "htmlform-cloner-delete": "Eltávolítás",
        "htmlform-cloner-required": "Legalább egy érték szükséges.",
+       "htmlform-date-placeholder": "ÉÉÉÉ-HH-NN",
+       "htmlform-time-placeholder": "ÓÓ:PP:MM",
+       "htmlform-datetime-placeholder": "ÉÉÉÉ-HH-NN ÓÓ:PP:MM",
+       "htmlform-date-invalid": "A megadott érték nem felismerhető dátum. Próbáld meg ÉÉÉÉ-HH-NN formátumban.",
+       "htmlform-time-invalid": "A megadott érték nem felismerhető idő. Próbáld meg ÓÓ:PP:MM formátumban.",
+       "htmlform-datetime-invalid": "A megadott érték nem felismerhető dátum/idő. Próbáld meg ÉÉÉÉ-HH-NN ÓÓ:PP:MM formátumban.",
+       "htmlform-date-toolow": "A megadott érték korábbi az engedélyezettnél ($1).",
+       "htmlform-date-toohigh": "A megadott érték későbbi az engedélyezettnél ($1).",
+       "htmlform-time-toolow": "A megadott érték korábbi az engedélyezettnél ($1).",
+       "htmlform-time-toohigh": "A megadott érték későbbi az engedélyezettnél ($1).",
+       "htmlform-datetime-toolow": "A megadott érték korábbi az engedélyezettnél ($1).",
+       "htmlform-datetime-toohigh": "A megadott érték későbbi az engedélyezettnél ($1).",
        "htmlform-title-badnamespace": "[[:$1]] nem a(z) „{{ns:$2}}” névtérben található.",
        "htmlform-title-not-creatable": "„$1” nem egy létrehozható lapcím",
        "htmlform-title-not-exists": "$1 nem létezik.",
        "htmlform-user-not-exists": "<strong>$1</strong> nem létezik.",
        "htmlform-user-not-valid": "<strong>$1</strong> nem egy érvényes felhasználónév.",
-       "sqlite-has-fts": "$1 teljes szöveges keresés támogatással",
-       "sqlite-no-fts": "$1 teljes szöveges keresés támogatása nélkül",
        "logentry-delete-delete": "$1 törölte a következő lapot: $3",
        "logentry-delete-restore": "$1 helyreállította a következő lapot: $3",
        "logentry-delete-event": "$1 megváltoztatta {{PLURAL:$5|egy napló bejegyzés|$5 napló bejegyzés}} láthatóságát a(z) $3 című lapon: $4",
        "logentry-suppress-block": "$1 {{GENDER:$2|blokkolta}} „{{GENDER:$4|$3}}”-t $5 időtartamra $6",
        "logentry-suppress-reblock": "$1 {{GENDER:$2|módosította}} a blokk beállításokat „{{GENDER:$4|$3}}” szerkesztőnél $5 időtartamra $6",
        "logentry-import-upload": "$1 {{GENDER:$2|importálta}} $3 lapot fájl feltöltéssel",
+       "logentry-import-upload-details": "$1 {{GENDER:$2|importálta}} a(z) $3 lapot fájlfeltöltéssel ($4 lapváltozat).",
        "logentry-import-interwiki": "$1 {{GENDER:$2|importálta}} $3 lapot egy másik wikiből",
+       "logentry-import-interwiki-details": "$1 {{GENDER:$2|importálta}} a(z) $3 lapot a(z) $5 wikiről ($4 lapváltozat).",
        "logentry-merge-merge": "$1 {{GENDER:$2|összevonta}} $3 lapot $4 lappal ($5 változtig)",
        "logentry-move-move": "$1 átnevezte a(z) $3 lapot a következő névre: $4",
        "logentry-move-move-noredirect": "$1 átnevezte a(z) $3 lapot $4 lapra átirányítás nélkül",
        "logentry-newusers-byemail": "Szerkesztői lap $3 néven létrehozva $1 által, jelszó kiküldve emailben.",
        "logentry-newusers-autocreate": "$1 felhasználói fiók automatikusan létrehozva",
        "logentry-protect-move_prot": "$1 {{GENDER:$2|áthelyezte}} a védelmi beállításokat a(z) $4 címről a(z) $3 címre",
+       "logentry-protect-unprotect": "$1 {{GENDER:$2|eltávolította}} a védelmet a(z) $3 lapról",
        "logentry-protect-protect": "$1 {{GENDER:$2|levédte}} a(z) $3 lapot $4",
        "logentry-protect-protect-cascade": "$1 {{GENDER:$2|levédte}} a(z) $3 lapot $4 [kaszkádvédelem]",
        "logentry-protect-modify": "$1 {{GENDER:$2|megváltoztatta}} a(z) $3 lap védelmi szintjét $4",
-       "logentry-rights-rights": "$1 megváltoztatta $3 csoporttagságát erről: $4 erre: $5",
+       "logentry-protect-modify-cascade": "$1 {{GENDER:$2|megváltoztatta}} a(z) $3 lap védelmi szintjét $4 [kaszkád]",
+       "logentry-rights-rights": "$1 {{GENDER:$2|megváltoztatta}} {{GENDER:$6|$3}} csoporttagságát erről: $4 erre: $5",
        "logentry-rights-rights-legacy": "$1 megváltoztatta $3 csoporttagságát",
        "logentry-rights-autopromote": "$1 automatikusan előléptetve erről: $4 erre: $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|feltöltötte}} ezt: $3",
        "logentry-upload-overwrite": "$1 $3 új verzióját {{GENDER:$2|töltötte}} fel",
        "logentry-upload-revert": "$1 {{GENDER:$2|feltöltötte}} $3-t",
-       "log-name-managetags": "Címke kezelő napló",
-       "log-description-managetags": "Ez a lista a a [[Special:Tags|címkéken]] kezelésével kapcsolatos. A napló csak azokat a tevékenységeket tartalmazza, amelyet az adminisztrátorok kézzel hajtottak végre. A wikiszoftver képes napló bejegyzés nélkül is létrehozni és törölni címkéket.",
+       "log-name-managetags": "Címkekezelési napló",
+       "log-description-managetags": "Ez a lap a [[Special:Tags|címkék]] kezelésével kapcsolatos tevékenységeket listázza. A napló csak azokat a műveleteket tartalmazza, amelyet az adminisztrátorok kézzel hajtottak végre; a wikiszoftver képes naplóbejegyzés nélkül is létrehozni és törölni címkéket.",
        "logentry-managetags-create": "$1 {{GENDER:$2|létrehozta}} a(z) „$4” címkét",
-       "logentry-managetags-delete": "$1 {{GENDER:$2|törölte}} a „$4” címkét (eltávolított $5 változatról és/vagy napló bejegyzésről)",
+       "logentry-managetags-delete": "$1 {{GENDER:$2|törölte}} a(z) „$4” címkét (eltávolítva $5 változatról {{PLURAL:$5|vagy|és/vagy}} naplóbejegyzésről)",
        "logentry-managetags-activate": "$1 {{GENDER:$2|aktiválta}} a „$4” címkét a szerkesztők és botok számára történő használatára",
        "logentry-managetags-deactivate": "$1 {{GENDER:$2|deaktiválta}} a „$4” címkét a szerkesztők és botok számára történő használatára",
        "log-name-tag": "Címkenapló",
-       "log-description-tag": "Ez a lap azt tartalmazza, amikor a szerkesztő egyedi változathoz vagy napló bejegyzéshez   [[Special:Tags|címkét]] vett fel, vagy törölte azt. A napló nem tartalmazza azokat a címkézéseket, amikor az szerkesztés, törlés, vagy hasonló tevékenység részeként történik.",
+       "log-description-tag": "Ez a lap azt tartalmazza, amikor felhasználók egyedi változathoz vagy naplóbejegyzéshez [[Special:Tags|címkét]] vettek fel, vagy törölték azt. A napló nem tartalmazza a címkézéseket, ha szerkesztés, törlés vagy más hasonló tevékenység részeként történnek.",
        "logentry-tag-update-add-revision": "$1 {{GENDER:$2|felvette}} a(z) $6 {{PLURAL:$7|címkét|címkéket}} a(z) $3 lap $4 változatához",
-       "logentry-tag-update-add-logentry": "$1 {{GENDER:$2|felvette}} a(z) $6 {{PLURAL:$7|címkét|címkéket}} a(z) $3 lap $5 napló bejegyzéséhez",
+       "logentry-tag-update-add-logentry": "$1 {{GENDER:$2|hozzáadta}} a(z) $6 {{PLURAL:$7|címkét|címkéket}} a(z) $3 lap $5 naplóbejegyzéséhez",
        "logentry-tag-update-remove-revision": "$1 {{GENDER:$2|eltávolította}} a(z) $8 {{PLURAL:$9|címkét|címkéket}} a(z) $3 lap $4 változatából",
        "logentry-tag-update-remove-logentry": "$1 {{GENDER:$2|eltávolította}} a(z) $8 {{PLURAL:$9|címkét|címkéket}} a(z) $3 lap $5 napló bejegyzéséből",
-       "logentry-tag-update-revision": "$1 {{GENDER:$2|frissítette}} a címkéket a(z) $3 lap $4 változatánál ({{PLURAL:$7|hozzáadta}}: $6; {{PLURAL:$9|eltávolította}}: $8)",
+       "logentry-tag-update-revision": "$1 {{GENDER:$2|frissítette}} a címkéket a(z) $3 lap $4 változatánál ({{PLURAL:$7|hozzáadva}}: $6; {{PLURAL:$9|eltávolítva}}: $8)",
        "logentry-tag-update-logentry": "$1 {{GENDER:$2|frissítette}} a címkéket a(z) $3 lap $5 napló bejegyzésénél ({{PLURAL:$7|hozzáadta}}: $6; {{PLURAL:$9|eltávolította}}: $8)",
        "rightsnone": "(semmi)",
        "revdelete-summary": "a szerkesztési összefoglalóját",
        "feedback-external-bug-report-button": "A fájl egy technikai feladat",
        "feedback-dialog-title": "Visszajelzés küldése",
        "feedback-dialog-intro": "A visszajelzésedre az alábbi egyszerű űrlapot használhatod. A hozzászólásod a felhasználó neveddel együtt a „$1” oldalon fog megjelenni.",
-       "feedback-error-title": "Hiba",
        "feedback-error1": "Hiba: az API ismeretlen eredménnyel tért vissza",
        "feedback-error2": "Hiba: a szerkesztés nem sikerült",
        "feedback-error3": "Hiba: nem érkezett válasz az API-tól",
        "feedback-thanks": "Köszönjük. A visszajelzésed elküldve a „[$2 $1]” laphoz.",
        "feedback-thanks-title": "Köszönjük!",
        "feedback-useragent": "User agent:",
-       "searchsuggest-search": "Keresés",
+       "searchsuggest-search": "Keresés a wikin",
        "searchsuggest-containing": "tartalmazza…",
+       "api-error-autoblocked": "Az IP-címed automatikusan blokkolva lett, mert korábban egy blokkolt szerkesztő használta.",
        "api-error-badaccess-groups": "Nincs jogod fájlokat feltölteni erre a wikire.",
        "api-error-badtoken": "Belső hiba: hibás token.",
        "api-error-blocked": "Letiltották a szerkesztési jogosultságodat.",
        "api-error-nomodule": "Belső hiba: nincs feltöltőmodul beállítva.",
        "api-error-ok-but-empty": "Belső hiba: nem érkezett válasz a kiszolgálótól.",
        "api-error-overwrite": "Létező fájlok felülírására nem engedélyezett.",
+       "api-error-ratelimited": "A megengedettnél több fájlt próbálsz feltölteni rövid időn belül.\nPróbálkozz újra néhány perc múlva.",
        "api-error-stashfailed": "Belső hiba: a kiszolgálünak nem sikerült eltárolni az ideiglenes fájlt.",
        "api-error-publishfailed": "Belső hiba: a kiszolgálónak nem sikerült közzétennie az ideiglenes fájlt.",
        "api-error-stasherror": "Hiba történt a fájl feltöltése közben.",
        "api-error-unknownerror": "Ismeretlen hiba: „$1”.",
        "api-error-uploaddisabled": "A feltöltés le van tiltva ezen a wikin.",
        "api-error-verification-error": "A fájl feltehetőleg sérült, vagy hibás a kiterjesztése.",
+       "api-error-was-deleted": "Ilyen nevű fájlt már töltöttek fel, majd törölték.",
        "duration-seconds": "{{PLURAL:$1|másodperc|másodperc}}",
        "duration-minutes": "$1 {{PLURAL:$1|perc|perc}}",
        "duration-hours": "{{PLURAL:$1|egy|$1}} óra",
        "expand_templates_generate_xml": "XML elemzési fa mutatása",
        "expand_templates_generate_rawhtml": "Nyers HTML megjelenítése",
        "expand_templates_preview": "Előnézet",
-       "expand_templates_preview_fail_html": "<em>Mivel a(z) {{SITENAME}} engedélyezi a nyers HTML használatát, és a kapcsolati adatok elvesztek, az előnézet el van rejtve a JavaScript támadások megelőzése érdekében.</em>\n\n<strong>Ha ez egy ligitim előnézet kérés, akkor próbáld meg újra!</strong>\nHa nem működik, akkor próbálj meg [[Special:UserLogout|kijelentkezni]] és újra bejelentkezni!",
+       "expand_templates_preview_fail_html": "<em>Mivel a(z) {{SITENAME}} engedélyezi a nyers HTML használatát, és a kapcsolati adatok elvesztek, az előnézet el van rejtve a JavaScript támadások megelőzése érdekében.</em>\n\n<strong>Ha ez egy legitim előnézetkérés, akkor próbáld meg újra!</strong>\nHa nem működik, akkor próbálj meg [[Special:UserLogout|kijelentkezni]] és újra bejelentkezni, és ellenőrizd, hogy a böngésződ elfogad-e sütiket erről az oldalról.",
        "expand_templates_preview_fail_html_anon": "<em>Mivel a(z) {{SITENAME}} engedélyezi a nyers HTML használatát, és a kapcsolati adatok elvesztek, az előnézet el van rejtve a JavaScript támadások megelőzése érdekében.</em>\n\n<strong>Ha ez egy legitim előnézet kérés, akkor próbálj meg [[Special:UserLogin|bejelentkezni]] és újra próbálni!</strong>",
+       "expand_templates_input_missing": "Legalább egy kevés bemeneti szöveget meg kell adnod.",
        "pagelanguage": "Oldal nyelvének megváltoztatása",
        "pagelang-name": "Oldal",
        "pagelang-language": "Nyelv",
        "special-characters-group-ipa": "IPA",
        "special-characters-group-symbols": "Szimbólumok",
        "special-characters-group-greek": "Görög",
+       "special-characters-group-greekextended": "Bővített görög",
        "special-characters-group-cyrillic": "Cirill",
        "special-characters-group-arabic": "Arab",
        "special-characters-group-arabicextended": "Arab (bővített)",
        "mw-widgets-dateinput-placeholder-month": "ÉÉÉÉ-HH",
        "mw-widgets-titleinput-description-new-page": "a lap még nem létezik",
        "mw-widgets-titleinput-description-redirect": "átirányítás ide: $1",
+       "sessionmanager-tie": "Nem kombinálható többféle hitelesítési típus: $1.",
        "sessionprovider-generic": "$1-munkamenetek",
        "sessionprovider-mediawiki-session-cookiesessionprovider": "sütialapú munkamenetek",
        "sessionprovider-nocookies": "A sütik le lehetnek tiltva. Engedélyezd a sütiket, és próbáld meg újra!",
-       "randomrootpage": "Véletlen lap a gyökérből",
+       "randomrootpage": "Gyökérlap találomra",
        "log-action-filter-block": "Blokk típusa:",
+       "log-action-filter-contentmodel": "Tartalommodell-változtatás típusa:",
        "log-action-filter-delete": "Törlés típusa:",
        "log-action-filter-import": "Importálás típusa:",
+       "log-action-filter-managetags": "Címkekezelési művelet típusa:",
        "log-action-filter-move": "Átnevezés típusa:",
+       "log-action-filter-newusers": "Fióklétrehozás típusa:",
        "log-action-filter-patrol": "Járőrözés típusa:",
        "log-action-filter-protect": "Lapvédelem típusa:",
+       "log-action-filter-rights": "Jogosultságváltozás típusa:",
        "log-action-filter-upload": "Feltöltés típusa:",
        "log-action-filter-all": "Mind",
        "log-action-filter-block-block": "Blokk",
        "log-action-filter-block-reblock": "Blokk módosítása",
        "log-action-filter-block-unblock": "Blokk feloldása",
+       "log-action-filter-contentmodel-change": "Tartalommodell módosítása",
+       "log-action-filter-contentmodel-new": "Lap létrehozása nem alapértelmezett tartalommodellel",
        "log-action-filter-delete-delete": "Laptörlés",
        "log-action-filter-delete-restore": "Visszaállítás",
        "log-action-filter-delete-event": "Naplótörlés",
+       "log-action-filter-delete-revision": "Lapváltozat-törlés",
+       "log-action-filter-import-interwiki": "Wikiközi importálás",
+       "log-action-filter-import-upload": "Importálás XML-feltöltéssel",
        "log-action-filter-managetags-create": "Címke létrehozása",
        "log-action-filter-managetags-delete": "Címke törlése",
-       "log-action-filter-managetags-activate": "Tag aktiválása",
+       "log-action-filter-managetags-activate": "Címke aktiválása",
+       "log-action-filter-managetags-deactivate": "Címke deaktiválása",
+       "log-action-filter-move-move": "Átnevezés átirányítások felülírása nélkül",
+       "log-action-filter-move-move_redir": "Átnevezés átirányítások felülírásával",
        "log-action-filter-newusers-create": "Létrehozás által anonim felhasználó által",
        "log-action-filter-newusers-create2": "Létrehozás regisztrált felhasználó által",
        "log-action-filter-newusers-autocreate": "Automatikus létrehozás",
        "log-action-filter-newusers-byemail": "Létrehozás jelszóval, e-mail által küldve",
+       "log-action-filter-patrol-patrol": "Kézi ellenőrzés",
+       "log-action-filter-patrol-autopatrol": "Automatikus ellenőrzés",
        "log-action-filter-protect-protect": "Lapvédelem",
+       "log-action-filter-protect-modify": "Védelem módosítása",
        "log-action-filter-protect-unprotect": "Védelem feloldása",
+       "log-action-filter-protect-move_prot": "Védelem áthelyezése",
        "log-action-filter-rights-rights": "Kézi módosítás",
+       "log-action-filter-rights-autopromote": "Automatikus módosítás",
        "log-action-filter-upload-upload": "Új feltöltés",
+       "log-action-filter-upload-overwrite": "Újrafeltöltés",
+       "authmanager-authn-not-in-progress": "Hitelesítés nincs folyamatban, vagy a folyamat adatai elvesztek. Kérjük, indítsd újra az elejétől.",
+       "authmanager-authn-no-primary": "A megadott hitelesítő adatokkal nem lehet hitelesíteni.",
+       "authmanager-authn-no-local-user": "A megadott hitelesítő adatok nincsenek társítva egyetlen felhasználóval sem ezen a wikin.",
+       "authmanager-authn-no-local-user-link": "A megadott hitelesítő adatok érvényesek, de nincsenek társítva felhasználóhoz ezen a wikin. Jelentkezz be más módon vagy regisztrálj, és lesz lehetőséged a hitelesítő adatok összekapcsolására a fiókoddal.",
+       "authmanager-authn-autocreate-failed": "A helyi fiók automatikus létrehozása sikertelen: $1",
+       "authmanager-change-not-supported": "A megadott hitelesítő adatokat nem változtathatók meg, mivel semmi sem használná őket.",
        "authmanager-create-disabled": "Új fiók létrehozása tiltva.",
        "authmanager-create-from-login": "A fiókja létrehozásához, kérjük, töltse ki az alábbi mezőket.",
        "authmanager-create-not-in-progress": "Fiók létrehozása nincs folyamatban, vagy a folyamat adatai elvesztek. Kérjük, indítsa újra az elejétől.",
+       "authmanager-create-no-primary": "A megadott hitelesítő adatok nem használhatók fióklétrehozásra.",
+       "authmanager-link-no-primary": "A megadott hitelesítő adatok nem használhatók fiókok összekapcsolására.",
+       "authmanager-link-not-in-progress": "Fiókok összekapcsolása nincs folyamatban, vagy a folyamat adatai elvesztek. Kérjük, indítsd újra az elejétől.",
        "authmanager-authplugin-setpass-failed-title": "Jelszó megváltoztatása nem sikerült",
        "authmanager-authplugin-setpass-failed-message": "A hitelesítés beépülője megtagadta a jelszó módosítását.",
        "authmanager-authplugin-create-fail": "A hitelesítés beépülője megtagadta a fiók létrehozását.",
        "authmanager-autocreate-noperm": "Az automatikus fióklétrehozás nem engedélyezett.",
        "authmanager-autocreate-exception": "A fiókok automatikus létrehozását átmenetileg letiltottuk a korábbi hibák miatt.",
        "authmanager-userdoesnotexist": "A(z) „$1” felhasználó nincs regisztrálva.",
+       "authmanager-userlogin-remembermypassword-help": "Megjegyezze-e a jelszót a munkamenetet követően is.",
+       "authmanager-username-help": "Felhasználónév a hitelesítéshez.",
+       "authmanager-password-help": "Jelszó a hitelesítéshez.",
+       "authmanager-domain-help": "Tartomány külső hitelesítéshez.",
        "authmanager-retype-help": "Jelszó még egyszer a megerősítéshez.",
        "authmanager-email-label": "E-mail",
        "authmanager-email-help": "E-mail-cím",
        "authmanager-provider-password": "Jelszó alapú hitelesítés",
        "authmanager-provider-password-domain": "Jelszó - domain-alapú hitelesítés",
        "authmanager-provider-temporarypassword": "Ideiglenes jelszó",
+       "authprovider-confirmlink-message": "A legutóbbi bejelentkezési próbálkozásaid alapján a következő fiókok kapcsolhatók össze a wikifiókoddal. Az összekapcsolás lehetővé teszi a bejelentkezést ezekkel a fiókokkal. Válaszd ki, melyeket szeretnéd összekapcsolni.",
+       "authprovider-confirmlink-request-label": "Összekapcsolandó fiókok",
+       "authprovider-confirmlink-success-line": "$1: Sikeresen összekapcsolva.",
+       "authprovider-confirmlink-failed": "A fiókok összekapcsolása nem volt teljesen sikeres: $1",
+       "authprovider-confirmlink-ok-help": "Folytatás az összekapcsolási hibák megjelenítése után.",
        "authprovider-resetpass-skip-label": "Kihagy",
+       "authprovider-resetpass-skip-help": "Jelszó visszaállításának kihagyása.",
+       "authform-nosession-login": "A hitelesítés sikeres volt, de a böngésződ nem tud „emlékezni” arra, hogy be vagy jelentkezve.\n\n$1",
+       "authform-nosession-signup": "A fiók létrejött, de a böngésződ nem tud „emlékezni” arra, hogy be vagy jelentkezve.\n\n$1",
+       "authform-newtoken": "Hiányzó token. $1",
+       "authform-notoken": "Hiányzó token",
+       "authform-wrongtoken": "Rossz token",
+       "specialpage-securitylevel-not-allowed-title": "Nem engedélyezett",
+       "specialpage-securitylevel-not-allowed": "Sajnáljuk, nem nézheted meg ezt a lapot, mert a személyazonosságod ellenőrzése nem sikerült.",
+       "authpage-cannot-login": "A bejelentkezés elkezdése sikertelen.",
+       "authpage-cannot-login-continue": "A bejelentkezés folytatása sikertelen. Valószínűleg lejárt a munkameneted.",
+       "authpage-cannot-create": "A fióklétrehozás elkezdése sikertelen.",
+       "authpage-cannot-create-continue": "A fióklétrehozás folytatása sikertelen. Valószínűleg lejárt a munkameneted.",
+       "authpage-cannot-link": "A fiókok összekapcsolásának elkezdése sikertelen.",
+       "authpage-cannot-link-continue": "A fiókok összekapcsolásának folytatása sikertelen. Valószínűleg lejárt a munkameneted.",
        "cannotauth-not-allowed-title": "Engedély megtagadva",
+       "cannotauth-not-allowed": "Nincs engedélyed az oldal használatára",
+       "changecredentials": "Hitelesítő adatok módosítása",
+       "changecredentials-submit": "Hitelesítő adatok módosítása",
+       "changecredentials-invalidsubpage": "$1 nem egy érvényes hitelesítőadat-típus.",
+       "changecredentials-success": "A hitelesítő adataid megváltoztak.",
+       "removecredentials": "Hitelesítő adatok eltávolítása",
+       "removecredentials-submit": "Hitelesítő adatok eltávolítása",
+       "removecredentials-invalidsubpage": "$1 nem egy érvényes hitelesítőadat-típus.",
+       "removecredentials-success": "A hitelesítő adataid eltávolítva.",
+       "credentialsform-provider": "Hitelesítő adatok típusa:",
        "credentialsform-account": "Fiók neve:",
        "cannotlink-no-provider-title": "Nincsenek csatolható fiókok",
        "cannotlink-no-provider": "Nincsenek csatolható fiókok.",
        "linkaccounts": "A fiókok csatolása",
-       "linkaccounts-success-text": "A fiók csatolva."
+       "linkaccounts-success-text": "A fiók csatolva.",
+       "linkaccounts-submit": "Fiókok összekapcsolása",
+       "unlinkaccounts": "Fiókok szétkapcsolása",
+       "unlinkaccounts-success": "A fiókok szétkapcsolva.",
+       "authenticationdatachange-ignored": "A hitelesítő adatok változtatása nincs kezelve. Talán nincs beállítva szolgáltató?",
+       "userjsispublic": "Figyelem: JavaScript-allapokon ne tárolj bizalmas adatokat, mivel minden felhasználó számára láthatóak.",
+       "usercssispublic": "Figyelem: CSS-allapokon ne tárolj bizalmas adatokat, mivel minden felhasználó számára láthatóak.",
+       "restrictionsfield-badip": "Érvénytelen IP-cím vagy -tartomány: $1",
+       "restrictionsfield-label": "Engedélyezett IP-tartományok:",
+       "restrictionsfield-help": "Egy IP-cím vagy CIDR-tartomány soronként. Minden engedélyezéséhez használd a következő tartományokat:<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Hiba: $1",
+       "edit-error-long": "Hibák:\n\n$1"
 }
index 20f83e5..5920b06 100644 (file)
        "botpasswords-label-cancel": "Չեղարկել",
        "botpasswords-label-delete": "Ջնջել",
        "botpasswords-label-resetpassword": "Վերականգնել ծածկագիրը",
-       "botpasswords-label-restrictions": "Օգտագործման սահմանափակումներ:",
        "botpasswords-label-grants-column": "Թույլատրված է",
        "botpasswords-bad-appid": "\"$1\" բոտի անունն անթույլատրելի է:",
        "botpasswords-created-title": "Բոտի ծածկագիրը ստեղծվել է",
        "nextn-title": "Հաջորդ $1 {{PLURAL:$1|արդյունքը|արդյունքները}}",
        "shown-title": "Յուրաքանչյուր էջում ցույց տալ $1 {{PLURAL:$1|գրառում|գրառումներ}}",
        "viewprevnext": "Դիտել ($1 {{int:pipe-separator}} $2) ($3)",
-       "searchmenu-exists": "'''Այս վիքիում, գոյություն ունի \"[[:$1]]\" անվանումով էջը։'''",
+       "searchmenu-exists": "'''Այս վիքիում գոյություն ունի \"[[:$1]]\" անվանումով էջ։'''",
        "searchmenu-new": "<strong>Ստեղծել «[[:$1]]» էջը այս վիքիում։</strong> {{PLURAL:$2|0=|Տես նաև քո որոնած բառով գտնված էջը|Տես նաև որոնման արդյունքները։}}",
        "searchprofile-articles": "Հիմնական էջեր",
        "searchprofile-images": "Մուլտիմեդիա",
index be5860c..716b82e 100644 (file)
@@ -43,7 +43,7 @@
        "tog-enotifminoredits": "Notificar me etiam de modificationes minor de paginas e files",
        "tog-enotifrevealaddr": "Revelar mi adresse de e-mail in messages de notification",
        "tog-shownumberswatching": "Monstrar le numero de usatores que observa le pagina",
-       "tog-oldsig": "Signatura existente:",
+       "tog-oldsig": "Tu signatura existente:",
        "tog-fancysig": "Tractar signatura como wikitexto (sin ligamine automatic)",
        "tog-uselivepreview": "Usar previsualisation dynamic",
        "tog-forceeditsummary": "Avisar me si io non entra un summario de modification",
@@ -60,7 +60,7 @@
        "tog-showhiddencats": "Monstrar categorias celate",
        "tog-norollbackdiff": "Non monstrar differentias post exequer un revocation",
        "tog-useeditwarning": "Advertir me quando io quita un pagina de modification sin publicar le cambiamentos",
-       "tog-prefershttps": "Sempre usar un connexion secur in session aperte",
+       "tog-prefershttps": "Sempre usar un connexion secur durante session aperte",
        "underline-always": "Sempre",
        "underline-never": "Nunquam",
        "underline-default": "Como definite per tu navigator o apparentia",
        "category-file-count-limited": "Le sequente {{PLURAL:$1|file es|$1 files es}} in le categoria actual.",
        "listingcontinuesabbrev": "cont.",
        "index-category": "Paginas indexate",
-       "noindex-category": "Paginas non indexate",
+       "noindex-category": "Paginas con \"__NOINDEX__\"",
        "broken-file-category": "Paginas con ligamines rupte a files",
        "about": "A proposito",
        "article": "Pagina de contento",
        "newwindow": "(se aperi in un nove fenestra)",
        "cancel": "Cancellar",
        "moredotdotdot": "Plus...",
-       "morenotlisted": "Iste lista non es complete.",
+       "morenotlisted": "Iste lista pote esser incomplete.",
        "mypage": "Pagina",
        "mytalk": "Discussion",
        "anontalk": "Discussion",
        "talk": "Discussion",
        "views": "Representationes",
        "toolbox": "Instrumentos",
+       "tool-link-userrights": "Modificar le gruppos del {{GENDER:$1|usator|usatrice}}",
+       "tool-link-emailuser": "Inviar e-mail a iste {{GENDER:$1|usator|usatrice}}",
        "userpage": "Vider pagina del usator",
        "projectpage": "Vider pagina de projecto",
        "imagepage": "Vider le pagina del file",
        "eauthentsent": "Un message de confirmation ha essite inviate al adresse de e-mail specificate.\nPro permitter que le systema invia altere messages a iste adresse, tu debe sequer le instructiones in iste message pro confirmar que le adresse es realmente tue.",
        "throttled-mailpassword": "Un message pro le reinitialisation del contrasigno ha jam essite inviate intra le ultime {{PLURAL:$1|hora|$1 horas}}.\nPro prevenir le abuso, solmente un message pro le reinitialisation del contrasigno essera inviate per {{PLURAL:$1|hora|$1 horas}}.",
        "mailerror": "Error de inviar e-mail: $1",
-       "acct_creation_throttle_hit": "Le visitatores de iste wiki usante tu adresse IP ha create {{PLURAL:$1|1 conto|$1 contos}} durante le ultime die, e isto es le maximo permittite in iste periodo de tempore.\nA causa de isto, le visitatores usante iste adresse IP non pote crear nove contos al momento.",
+       "acct_creation_throttle_hit": "Le visitatores de iste wiki usante tu adresse IP ha create {{PLURAL:$1|1 conto|$1 contos}} durante le ultime $2, e isto es le maximo permittite in iste periodo de tempore.\nA causa de isto, le visitatores usante iste adresse IP non pote crear nove contos al momento.",
        "emailauthenticated": "Tu adresse de e-mail ha essite confirmate le $2 a $3.",
        "emailnotauthenticated": "Tu non ha ancora confirmate tu adresse de e-mail.\nNulle e-mail essera inviate pro le sequente functiones.",
        "noemailprefs": "Es necessari specificar un adresse de e-mail in tu preferentias pro poter executar iste functiones.",
        "botpasswords-label-resetpassword": "Reinitialisar le contrasigno",
        "botpasswords-label-grants": "Concessiones applicabile:",
        "botpasswords-help-grants": "Cata concession da accesso al derectos de usator listate que un conto de usator jam ha. Vide le [[Special:ListGrants|tabula de concessiones]] pro plus information.",
-       "botpasswords-label-restrictions": "Restrictiones de uso:",
        "botpasswords-label-grants-column": "Concedite",
        "botpasswords-bad-appid": "Le nomine del robot \"$1\" non es valide.",
        "botpasswords-insert-failed": "Le addition del nomine de robot \"$1\" ha fallite. Esque illo ha jam essite addite?",
        "botpasswords-updated-body": "Le contrasigno pro le robot \"$1\" del usator \"$2\" ha essite actualisate.",
        "botpasswords-deleted-title": "Contrasigno de robot delite",
        "botpasswords-deleted-body": "Le contrasigno pro le robot \"$1\" del usator \"$2\" ha essite delite.",
-       "botpasswords-newpassword": "Le nove contrasigno pro aperir session con <strong>$1</strong> es <strong>$2</strong>. <em>Per favor, conserva isto pro uso futur.</em>",
+       "botpasswords-newpassword": "Le nove contrasigno pro aperir session con <strong>$1</strong> es <strong>$2</strong>. <em>Per favor, conserva isto pro uso futur.</em> <br> (Pro vetule robots que require que le nomine usate pro aperir session sia le mesme que le nomine de usator final, tu pote etiam usar <strong>$3</strong> como nomine de usator <strong>$4</strong> como contrasigno.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider non es disponibile.",
        "botpasswords-restriction-failed": "Session impedite per restrictiones de contrasigno de robot.",
        "botpasswords-invalid-name": "Iste nomine de usator non contine le separator pro contrasigno de robot (\"$1\").",
        "passwordreset-emailelement": "Nomine de usator: \n$1\n\nContrasigno temporari: \n$2",
        "passwordreset-emailsentemail": "Si iste adresse es associate a tu conto, alora un e-mail pro reinitialisar le contrasigno essera inviate.",
        "passwordreset-emailsentusername": "Si il ha un adresse de e-mail associate a iste conto, alora un e-mail pro reinitialisar le contrasigno essera inviate.",
-       "passwordreset-emailsent-capture2": "Le {{PLURAL:$1|message|messages}} de e-mail pro reinitialisation de contrasigno ha essite inviate. Le {{PLURAL:$1|nomine de usator e contrasigno|lista de nomines de usator e contrasignos}} appare hic infra.",
-       "passwordreset-emailerror-capture2": "Le invio de e-mail al {{GENDER:$2|usator}} ha fallite: $1 Le {{PLURAL:$3|nomine de usator e contrasigno|lista de nomines de usator e contrasignos}} appare hic infra.",
+       "passwordreset-emailsent-capture2": "Le {{PLURAL:$1|message|messages}} de e-mail pro reinitialisation de contrasigno ha essite inviate. Le {{PLURAL:$1|nomine de usator e contrasigno|lista de nomines de usator e contrasignos}} es monstrate hic.",
+       "passwordreset-emailerror-capture2": "Le invio de e-mail al {{GENDER:$2|usator}} ha fallite: $1 Le {{PLURAL:$3|nomine de usator e contrasigno|lista de nomines de usator e contrasignos}} es monstrate hic.",
        "passwordreset-nocaller": "Un appellator debe esser fornite",
        "passwordreset-nosuchcaller": "Appellator non existe: $1",
        "passwordreset-ignored": "Le reinitialisation del contrasigno non ha essite realisate. Es possibile que nulle fornitor ha essite configurate?",
        "invalid-content-data": "Datos de contento invalide",
        "content-not-allowed-here": "Le contento \"$1\" non es permittite in le pagina [[$2]]",
        "editwarning-warning": "Quitar iste pagina pote causar le perdita de omne modificationes que tu ha facite.\nSi tu ha aperite un session, tu pote disactivar iste aviso in le section \"{{int:prefs-editing}}\" de tu preferentias.",
+       "editpage-invalidcontentmodel-title": "Modello de contento non supportate",
+       "editpage-invalidcontentmodel-text": "Le modello de contento \"$1\" non es supportate.",
        "editpage-notsupportedcontentformat-title": "Formato de contento non supportate",
        "editpage-notsupportedcontentformat-text": "Le formato de contento $1 non es supportate per le modello de contento $2.",
        "content-model-wikitext": "wikitexto",
        "upload-dialog-disabled": "Le incargamento de files con iste dialogo es disactivate in iste wiki.",
        "upload-dialog-title": "Incargar file",
        "upload-dialog-button-cancel": "Cancellar",
+       "upload-dialog-button-back": "Retornar",
        "upload-dialog-button-done": "Facite",
        "upload-dialog-button-save": "Salveguardar",
        "upload-dialog-button-upload": "Incargar",
        "apisandbox-results-fixtoken-fail": "Impossibile recuperar indicio \"$1\".",
        "apisandbox-alert-page": "Certe campos in iste pagina non es valide.",
        "apisandbox-alert-field": "Le valor de iste campo non es valide.",
+       "apisandbox-continue": "Continuar",
+       "apisandbox-continue-clear": "Rader",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries continuara] le ultime requesta; {{int:apisandbox-continue-clear}} radera le parametros relative al continuation.",
        "booksources": "Fontes de libros",
        "booksources-search-legend": "Cercar fontes de libros",
        "booksources-search": "Cercar",
        "newimages-showbots": "Monstrar files incargate per robots",
        "newimages-hidepatrolled": "Celar le files incargate patruliate",
        "noimages": "Nihil a vider.",
+       "gallery-slideshow-toggle": "Alternar miniaturas",
        "ilsubmit": "Cercar",
        "bydate": "per data",
        "sp-newimages-showfrom": "Monstrar nove files a partir del $1 a $2",
        "tag-filter": "Filtro de [[Special:Tags|etiquettas]]:",
        "tag-filter-submit": "Filtrar",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etiquetta|Etiquettas}}]]: $2)",
+       "tag-mw-contentmodelchange": "cambiamento de modello de contento",
+       "tag-mw-contentmodelchange-description": "Modificationes que [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel cambia le modello de contento] de un pagina",
        "tags-title": "Etiquettas",
        "tags-intro": "Iste pagina lista le etiquettas con le quales le software pote marcar un modification, e lor significato.",
        "tags-tag": "Nomine del etiquetta",
        "tags-actions-header": "Actiones",
        "tags-active-yes": "Si",
        "tags-active-no": "No",
-       "tags-source-extension": "Definite per un extension",
+       "tags-source-extension": "Definite per le software",
        "tags-source-manual": "Applicate manualmente per usatores e robots",
        "tags-source-none": "Non plus in uso",
        "tags-edit": "modificar",
        "htmlform-cloner-create": "Adder plus",
        "htmlform-cloner-delete": "Remover",
        "htmlform-cloner-required": "Al minus un valor es requirite.",
+       "htmlform-date-placeholder": "AAAA-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "AAAA-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "Le valor specificate non es recognoscite como data. Tenta usar le formato AAAA-MM-DD.",
+       "htmlform-time-invalid": "Le valor specificate non es recognoscite como hora. Tenta usar le formato HH:MM:SS.",
+       "htmlform-datetime-invalid": "Le valor specificate non es recognoscite como data e hora. Tenta usar le formato AAAA-MM-DD HH:MM:SS.",
+       "htmlform-date-toolow": "Le valor specificate es anterior al prime data permittite, $1.",
+       "htmlform-date-toohigh": "Le valor specificate es posterior al ultime data permittite, $1.",
+       "htmlform-time-toolow": "Le valor specificate es anterior al prime hora permittite, $1.",
+       "htmlform-time-toohigh": "Le valor specificate es posterior al ultime hora permittite, $1.",
+       "htmlform-datetime-toolow": "Le valor specificate es anterior al prime data e hora permittite, $1.",
+       "htmlform-datetime-toohigh": "Le valor specificate es posterior al ultime data e hora permittite, $1.",
        "htmlform-title-badnamespace": "[[:$1]] non es in le spatio de nomines \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" non es un titulo de pagina creabile",
        "htmlform-title-not-exists": "$1 non existe.",
        "htmlform-user-not-exists": "<strong>$1</strong> non existe.",
        "htmlform-user-not-valid": "<strong>$1</strong> non es un nomine de usator valide.",
-       "sqlite-has-fts": "$1 con supporto de recerca de texto integre",
-       "sqlite-no-fts": "$1 sin supporto de recerca de texto integre",
        "logentry-delete-delete": "$1 {{GENDER:$2|deleva}} le pagina $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|restaurava}} le pagina $3",
        "logentry-delete-event": "$1 {{GENDER:$2|cambiava}} le visibilitate de {{PLURAL:$5|un entrata|$5 entratas}} de registro in $3: $4",
        "feedback-external-bug-report-button": "Signalar un problema technic",
        "feedback-dialog-title": "Submitter commentario",
        "feedback-dialog-intro": "Usa le formulario sequente pro submitter tu commentario, le qual apparera in le pagina \"$1\" insimul a tu nomine de usator.",
-       "feedback-error-title": "Error",
        "feedback-error1": "Error: Resultato del API non recognoscite",
        "feedback-error2": "Error: Modification fallite",
        "feedback-error3": "Error: Nulle responsa del API",
        "feedback-thanks": "Gratias! Tu evalutation ha essite publicate in le pagina \"[$2 $1]\".",
        "feedback-thanks-title": "Gratias!",
        "feedback-useragent": "Agente usator:",
-       "searchsuggest-search": "Cercar",
+       "searchsuggest-search": "Cercar in {{SITENAME}}",
        "searchsuggest-containing": "continente...",
        "api-error-autoblocked": "Tu adresse IP ha essite blocate automaticamente, perque illo ha essite usate per un usator blocate.",
        "api-error-badaccess-groups": "Tu non ha le permission de incargar files in iste wiki.",
        "unlinkaccounts-success": "Le conto ha essite disligate.",
        "authenticationdatachange-ignored": "Le cambiamento del datos de authentication non ha succedite. Pote esser que nulle fornitor ha essite configurate?",
        "userjsispublic": "Nota ben: Subpaginas JavaScript non debe continer datos confidential perque altere usatores pote vider los.",
-       "usercssispublic": "Nota ben: Subpaginas CSS non debe continer datos confidential perque altere usatores pote vider los."
+       "usercssispublic": "Nota ben: Subpaginas CSS non debe continer datos confidential perque altere usatores pote vider los.",
+       "restrictionsfield-badip": "Adresse o intervallo IP non valide: $1",
+       "restrictionsfield-label": "Intervallos IP permittite:",
+       "restrictionsfield-help": "Un adresse IP o intervallo CIDR per linea. Pro activar toto, usa<br><code>0.0.0.0/0</code><br><code>::/0</code>"
 }
index 2d8d4ef..9814fea 100644 (file)
@@ -76,7 +76,7 @@
        "tog-enotifminoredits": "Kirimkan saya surel juga pada perubahan kecil",
        "tog-enotifrevealaddr": "Tampilkan alamat surel saya pada surel notifikasi",
        "tog-shownumberswatching": "Tunjukkan jumlah pemantau",
-       "tog-oldsig": "Tanda tangan sekarang:",
+       "tog-oldsig": "Tanda tangan Anda yang sudah ada:",
        "tog-fancysig": "Perlakukan tanda tangan sebagai teks wiki (tanpa suatu pranala otomatis)",
        "tog-uselivepreview": "Gunakan pratayang langsung",
        "tog-forceeditsummary": "Ingatkan saya bila kotak ringkasan suntingan masih kosong",
        "newwindow": "(buka di jendela baru)",
        "cancel": "Batalkan",
        "moredotdotdot": "Lainnya...",
-       "morenotlisted": "Daftar ini belum lengkap.",
+       "morenotlisted": "Daftar ini mungkin tidak lengkap.",
        "mypage": "Halaman",
        "mytalk": "Pembicaraan",
        "anontalk": "Pembicaraan",
        "botpasswords-label-resetpassword": "Setel ulang kata sandi",
        "botpasswords-label-grants": "Akses yang dapat diberikan:",
        "botpasswords-help-grants": "Tiap izin memberikan akses ke hak-hak pengguna yang telah dimiliki suatu akun pengguna. Lihat [[Special:ListGrants|tabel izin]] untuk informasi lebih lanjut.",
-       "botpasswords-label-restrictions": "Batasan penggunaan:",
        "botpasswords-label-grants-column": "Izin diberikan",
        "botpasswords-bad-appid": "Nama bot \"$1\" tidak valid.",
        "botpasswords-insert-failed": "Gagal menambah nama bot \"$1\". Apakah sudah ditambahkan sebelum ini?",
        "right-suppressrevision": "Menampilkan, menyembunyikan dan membatalkan penyembunyian revisi tertentu atas suatu halaman dari pengguna",
        "right-viewsuppressed": "Lihat revisi yang disembunyikan dari semua pengguna",
        "right-suppressionlog": "Melihat log privat",
-       "right-block": "Memblokir penyuntingan oleh pengguna lain",
+       "right-block": "Blokir pengguna lain dari penyuntingan",
        "right-blockemail": "Memblokir pengiriman surel oleh pengguna",
        "right-hideuser": "Memblokir nama pengguna dan menyembunyikannya dari publik",
        "right-ipblock-exempt": "Mengabaikan pemblokiran IP, pemblokiran otomatis, dan rentang pemblokiran",
        "action-undelete": "membatalkan penghapusan halaman ini",
        "action-suppressrevision": "meninjau dan mengembalikan revisi yang disembunyikan ini",
        "action-suppressionlog": "melihat log privat ini",
-       "action-block": "memblokir pengguna ini dari penyuntingan",
+       "action-block": "Blokir pengguna ini dari penyuntingan",
        "action-protect": "mengganti tingkat pelindungan halaman ini",
        "action-rollback": "mengembalikan dengan cepat suntingan-suntingan pengguna terakhir yang menyunting halaman tertentu",
        "action-import": "mengimpor halaman ini dari wiki lain",
        "htmlform-title-not-exists": "$1 tidak ada.",
        "htmlform-user-not-exists": "<strong>$1</strong> tidak ada.",
        "htmlform-user-not-valid": "<strong>$1</strong> bukan merupakan nama pengguna sah.",
-       "sqlite-has-fts": "$1 dengan dukungan pencarian teks lengkap",
-       "sqlite-no-fts": "$1 tanpa dukungan pencarian teks lengkap",
        "logentry-delete-delete": "$1 {{GENDER:$2|menghapus}} halaman $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|mengembalikan}} halaman $3",
        "logentry-delete-event": "$1 {{GENDER:$2|mengubah}} tampilan {{PLURAL:$5|$5 log peristiwa}} di $3: $4",
        "feedback-external-bug-report-button": "Kirim tugas teknis",
        "feedback-dialog-title": "Kirimkan saran dan tanggapan",
        "feedback-dialog-intro": "Anda bisa menggunakan formulir sederhana di bawah untuk mengirimkan saran dan masukan. Komentar Anda akan ditambahkan pada laman \"$1\" bersama nama pengguna Anda.",
-       "feedback-error-title": "Kesalahan",
        "feedback-error1": "Galat: Hasil tidak dikenal dari API",
        "feedback-error2": "Galat: Penyuntingan gagal",
        "feedback-error3": "Error: API tidak merespons",
index be841af..46a2e24 100644 (file)
        "htmlform-title-not-exists": "Awan ti $1.",
        "htmlform-user-not-exists": "Awan ti <strong>$1</strong>.",
        "htmlform-user-not-valid": "Saan nga umiso a nagan ti agar-aramat ti <strong>$1</strong>.",
-       "sqlite-has-fts": "Ti $1 nga addaan iti suporta ti panagbiruk ti napno a teksto",
-       "sqlite-no-fts": "Ti $1 nga awan iti suporta ti panagbiruk ti napno a teksto",
        "logentry-delete-delete": "{{GENDER:$2|Inikkat}} ni $1 ti panid ti $3",
        "logentry-delete-restore": "Ni $1 ket {{GENDER:$2|insublina}} ti panid ti $3",
        "logentry-delete-event": "Ni $1 ket {{GENDER:$2|binaliwanna}} ti panagkita {{PLURAL:$5|iti listaan ti pasamak |dagiti $5 a listaan ti pasamak }} iti $3: $4",
index fd1d4c4..02312cc 100644 (file)
@@ -52,7 +52,7 @@
        "tog-enotifminoredits": "Senda mér einnig tölvupóst vegna minniháttar breytinga á síðum og skrám",
        "tog-enotifrevealaddr": "Gefa upp netfang mitt í tilkynningarpóstum",
        "tog-shownumberswatching": "Sýna fjölda vaktandi notenda",
-       "tog-oldsig": "Núverandi undirskrift:",
+       "tog-oldsig": "Núverandi undirskriftin þín:",
        "tog-fancysig": "Meðhöndla undirskrift sem wikitexta (án sjálfvirks tengils)",
        "tog-uselivepreview": "Nota beina forskoðun",
        "tog-forceeditsummary": "Birta áminningu þegar breytingarágripið er tómt",
@@ -69,7 +69,7 @@
        "tog-showhiddencats": "Sýna falda flokka",
        "tog-norollbackdiff": "Ekki sýna breytingu eftir að endurvakning síðu hefur verið gerð.",
        "tog-useeditwarning": "Vara mig við þegar ég fer frá breytingarsíðu með óvistaðar breytingar",
-       "tog-prefershttps": "Alltaf nota örugga tengingu við innskráningu",
+       "tog-prefershttps": "Alltaf nota örugga tengingu þegar þú skráir þig inn",
        "underline-always": "Alltaf",
        "underline-never": "Aldrei",
        "underline-default": "Skinn eða sjálfgefið í vafra",
        "newwindow": "(opnast í nýjum glugga)",
        "cancel": "Hætta við",
        "moredotdotdot": "Meira...",
-       "morenotlisted": "Þessi listi er ekki tæmandi.",
+       "morenotlisted": "Þessi listi gæti verið ófullgerður.",
        "mypage": "Síða",
        "mytalk": "Spjall",
        "anontalk": "Spjall",
        "eauthentsent": "Staðfestingarpóstur hefur verið sendur á uppgefið netfang. Þú verður að fylgja leiðbeiningunum í póstinum til þess að virkja netfangið og staðfesta að það sé örugglega þitt.",
        "throttled-mailpassword": "Tölvupóstur til að endursetja lykilorðið hefur þegar verið sent, innan við $1 {{PLURAL:$1|síðasta klukkutímans|síðustu klukkutímanna}}.\nTil að koma í veg fyrir misnotkun, er aðeins einn tölvupóstur sendur {{PLURAL:$1|hvern $1 klukkutíma|hverja $1 klukkutíma}}.",
        "mailerror": "Upp kom villa við sendingu tölvupósts: $1",
-       "acct_creation_throttle_hit": "Því miður, hafa verið búnir til {{PLURAL:$1|$1 nýr aðgangur|$1 nýjir aðgangar}} í dag sem er hámarksfjöldi nýskráninga á einum degi.\nÞú getur því miður ekki búið til nýjan aðgang frá þessari IP-tölu að svo stöddu.",
+       "acct_creation_throttle_hit": "Gestir á þessu wiki vefsvæði sem nota þitt vistfang hafa búið til {{PLURAL:$1|$1 nýjan aðgang|$1 nýja aðganga}} síðustu $2 sem er hámarksfjöldi nýskráninga yfir þetta tímabil. Vegna þessa geta gestir frá þessu vistfangi ekki búið til fleiri aðganga í augnablikinu.",
        "emailauthenticated": "Netfang þitt var staðfest þann $2 klukkan $3.",
        "emailnotauthenticated": "Tölvupóstfang þitt hefur ekki enn verið staðfest. Enginn póstur verður sendur af neinum af eftirfarandi eiginleikum.",
        "noemailprefs": "Tilgreindu netfang í kjörstillingum þínum svo þessar aðgerðir virki.",
        "searchprofile-advanced-tooltip": "Leita í ákveðnum nafnrýmum",
        "search-result-size": "$1 ({{PLURAL:$2|1 orð|$2 orð}})",
        "search-result-category-size": "{{PLURAL:$1|1 meðlimur|$1 meðlimir}} ({{PLURAL:$2|1 undirflokks|$2 undirflokka}}, {{PLURAL:$3|1 skrá|$3 skrár}})",
-       "search-redirect": "(endurbeining $1)",
+       "search-redirect": "(endurbeint frá $1)",
        "search-section": "(hluti $1)",
        "search-category": "(flokkur $1)",
        "search-file-match": "(passar við innihald skráa)",
        "listgrouprights-namespaceprotection-restrictedto": "Réttindi sem leyfa notanda að breyta",
        "listgrants-rights": "Réttindi",
        "trackingcategories-name": "Heiti skilaboða",
+       "restricted-displaytitle-ignored": "Síður með hunsaða sýnda titla",
        "trackingcategories-nodesc": "Enginn lýsing tiltæk.",
        "trackingcategories-disabled": "Flokkurinn er óvirkur",
        "mailnologin": "Ekkert netfang til að senda á",
        "thumbnail_image-missing": "Skrána virðist vanta: $1",
        "import": "Flytja inn síður",
        "importinterwiki": "Flytja inn frá öðru wiki",
-       "import-interwiki-text": "Veldu wiki og síðutitil til að flytja inn.\nDagsetningumog notandanöfnum breytinganna verður haldið.\nAllir innflutningar frá öðrum wikium eru skráð í [[Special:Log/import|innflutningsskrána]].",
+       "import-interwiki-text": "Veldu wiki og síðutitil til að flytja inn.\nDagsetningum og notandanöfnum breytinganna verður haldið.\nAllir innflutningar frá öðrum wikium eru skráð í [[Special:Log/import|innflutningsskrána]].",
        "import-interwiki-sourcewiki": "Uppruna-wiki:",
        "import-interwiki-sourcepage": "Upprunaleg síða:",
        "import-interwiki-history": "Afrita allar breytingar þessarar síðu",
        "tags-actions-header": "Aðgerðir",
        "tags-active-yes": "Já",
        "tags-active-no": "Nei",
-       "tags-source-extension": "Skilgreint af viðbótarhugbúnaði",
+       "tags-source-extension": "Skilgreint af hugbúnaðinum",
        "tags-source-manual": "Sett inn handvirkt að notendum og vélmennum",
        "tags-source-none": "Ekki lengur í notkun",
        "tags-edit": "breyta",
        "htmlform-title-not-exists": "$1 er ekki til",
        "htmlform-user-not-exists": "<strong>$1</strong> er ekki til.",
        "htmlform-user-not-valid": "<strong>$1</strong> er ekki gilt notandanafn.",
-       "sqlite-has-fts": "$1 með fullum texta leitar stuðningi",
-       "sqlite-no-fts": "$1 án fullum texta leitar stuðningi",
        "logentry-delete-delete": "$1 {{GENDER:$2|eyddi}} síðunni $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|endurvakti}} $3",
        "logentry-delete-event": "$1 {{GENDER:$2|breytti}} sýnileika {{PLURAL:$5|færslu|$5 færslna}} á $3: $4",
        "feedback-external-bug-report-button": "Senda inn tæknilegar lýsingar/verkefni",
        "feedback-dialog-title": "Senda umsögn",
        "feedback-dialog-intro": "Þú getur þú notað einfalt eyðublað hér fyrir neðan til að senda inn umsögn. Athugasemdinni þinni verður bætt við síðuna \"$1\" ásamt notandanafni þínu.",
-       "feedback-error-title": "Villa",
        "feedback-error1": "Villa: Óþekkt útkoma frá API",
        "feedback-error2": "Villa: Breytingin mistókst",
        "feedback-error3": "Villa: Ekkert svar frá API",
        "feedback-thanks": "Takk! Ábendingu þinni hefur verið bætt við á síðuna \"[$2 $1]\".",
        "feedback-thanks-title": "Takk!",
        "feedback-useragent": "Aðgangsforrit:",
-       "searchsuggest-search": "Leita",
+       "searchsuggest-search": "Leita á {{SITENAME}}",
        "searchsuggest-containing": "sem innihalda ...",
        "api-error-badaccess-groups": "Þú hefur ekki leyfi til að hlaða inn skrám.",
        "api-error-badtoken": "Innri villa: Skemmdur tóki.",
index e50f5f2..72b105d 100644 (file)
                        "Urielejh",
                        "Matma Rex",
                        "Matteocng",
-                       "Einreiher"
+                       "Einreiher",
+                       "Anto",
+                       "Saracrovetto",
+                       "Tosky",
+                       "Selven"
                ]
        },
        "tog-underline": "Sottolinea i collegamenti:",
        "tog-enotifminoredits": "Inviami una email anche per le modifiche minori di pagine e file",
        "tog-enotifrevealaddr": "Mostra il mio indirizzo nelle e-mail di notifica",
        "tog-shownumberswatching": "Mostra il numero di utenti che hanno la pagina in osservazione",
-       "tog-oldsig": "Firma attuale:",
+       "tog-oldsig": "La tua firma attuale:",
        "tog-fancysig": "Gestisci la firma come wikitesto (senza collegamento automatico)",
        "tog-uselivepreview": "Abilita la funzione ''Live preview'' (anteprima in diretta)",
        "tog-forceeditsummary": "Chiedi conferma se il campo oggetto è vuoto",
        "newwindow": "(si apre in una nuova finestra)",
        "cancel": "Annulla",
        "moredotdotdot": "Altro...",
-       "morenotlisted": "Questo elenco non è completo.",
+       "morenotlisted": "Questo elenco potrebbe essere incompleto.",
        "mypage": "Pagina",
        "mytalk": "discussioni",
        "anontalk": "discussioni",
        "talk": "Discussione",
        "views": "Visite",
        "toolbox": "Strumenti",
+       "tool-link-userrights": "Modifica gruppi {{GENDER:$1|utente}}",
+       "tool-link-emailuser": "Invia una email a questo {{GENDER:$1|utente}}",
        "userpage": "Visualizza la pagina utente",
        "projectpage": "Visualizza la pagina di servizio",
        "imagepage": "Visualizza la pagina del file",
        "createacct-yourpasswordagain-ph": "Inserisci nuovamente la password",
        "userlogin-remembermypassword": "Mantienimi collegato",
        "userlogin-signwithsecure": "Usa una connessione sicura",
+       "cannotlogin-title": "Non è possibile effettuare l'accesso",
+       "cannotlogin-text": "L'accesso non è possibile.",
        "cannotloginnow-title": "Impossibile accedere ora",
        "cannotloginnow-text": "L'accesso non è possibile quando si sta usando $1.",
+       "cannotcreateaccount-title": "Impossibile creare l'utenza",
+       "cannotcreateaccount-text": "La creazione diretta dell'utenza non è attivata su questo wiki.",
        "yourdomainname": "Specificare il dominio",
        "password-change-forbidden": "Non è possibile modificare le password su questo wiki.",
        "externaldberror": "Si è verificato un errore con il server di autenticazione esterno, oppure non si dispone delle autorizzazioni necessarie per aggiornare il proprio accesso esterno.",
        "eauthentsent": "Un messaggio email di conferma è stato spedito all'indirizzo indicato.\nPer abilitare l'invio di messaggi email per questo utente è necessario seguire le istruzioni che vi sono indicate, in modo da confermare che si è i legittimi proprietari dell'indirizzo.",
        "throttled-mailpassword": "Una email di reimpostazione della password è già stata inviata da meno di {{PLURAL:$1|1 ora|$1 ore}}.\nPer prevenire abusi, la funzione di reimpostazione della password può essere usata solo una volta ogni {{PLURAL:$1|ora|$1 ore}}.",
        "mailerror": "Errore nell'invio del messaggio: $1",
-       "acct_creation_throttle_hit": "{{PLURAL:$1|1 registrazione è già stata effettuata|$1 registrazioni sono già state effettuate}} da qualcuno con il tuo stesso indirizzo IP nell'ultimo giorno: è il massimo consentito in questo periodo di tempo.\nPerciò, gli utenti che usano questo indirizzo IP non possono registrarsi per il momento.",
+       "acct_creation_throttle_hit": "{{PLURAL:$1|1 registrazione è già stata effettuata|$1 registrazioni sono già state effettuate}} da qualcuno con il tuo stesso indirizzo IP negli ultimi $2, che è il massimo consentito in questo periodo di tempo.\nPerciò, gli utenti che usano questo indirizzo IP non possono più registrarsi per il momento.",
        "emailauthenticated": "L'indirizzo email è stato confermato il $2 alle $3.",
        "emailnotauthenticated": "L'indirizzo di posta elettronica non è stato ancora confermato.\nNon verranno inviati messaggi email per le funzioni elencate di seguito.",
        "noemailprefs": "Indicare un indirizzo e-mail per attivare queste funzioni.",
        "botpasswords-label-resetpassword": "Reimposta la password",
        "botpasswords-label-grants": "Assegnazioni applicabili:",
        "botpasswords-help-grants": "Ogni assegnazione dà accesso ai diritti utente elencati che un'utenza ha già. Vedi la [[Special:ListGrants|tabella delle assegnazioni]] per ulteriori informazioni.",
-       "botpasswords-label-restrictions": "Restrizioni d'uso:",
        "botpasswords-label-grants-column": "Assegnazioni",
        "botpasswords-bad-appid": "Il nome bot \"$1\" non è valido.",
        "botpasswords-insert-failed": "Impossibile aggiungere il nome bot \"$1\". È stato già aggiunto?",
        "passwordreset": "Reimposta password",
        "passwordreset-text-one": "Compila questo modulo per reimpostare la tua password.",
        "passwordreset-text-many": "{{PLURAL:$1|Compila uno dei campi per ricevere una password temporanea tramite email.}}",
-       "passwordreset-disabled": "La reimpostazione delle password è stata disabilitata su questa wiki",
+       "passwordreset-disabled": "La reimpostazione delle password è stata disabilitata per questo wiki",
        "passwordreset-emaildisabled": "Le funzionalità di posta elettronica sono state disabilitate su questa wiki.",
        "passwordreset-username": "Nome utente:",
        "passwordreset-domain": "Dominio:",
        "passwordreset-emailelement": "Nome utente: \n$1\n\nPassword temporanea: \n$2",
        "passwordreset-emailsentemail": "Se questo indirizzo di posta elettronica è associato con la tua utenza, allora verrà inviata una email per reimpostare la password.",
        "passwordreset-emailsentusername": "Se c'è un indirizzo di posta elettronica associato con questo nome utente, allora verrà inviata una email per reimpostare la password.",
-       "passwordreset-emailsent-capture2": "L'email di reimpostazione della password {{PLURAL:$1|è stata inviata|sono state inviate}}. {{PLURAL:$1|Il nome|L'elenco di nomi}} utente e password è mostrato di seguito.",
-       "passwordreset-emailerror-capture2": "Invio di email {{GENDER:$2|all'utente}} non riuscito: $1. {{PLURAL:$3|Il nome|L'elenco di nomi}} utente e password è mostrato di seguito.",
+       "passwordreset-emailsent-capture2": "L'email di reimpostazione della password {{PLURAL:$1|è stata inviata|sono state inviate}}. {{PLURAL:$1|Il nome|L'elenco di nomi}} utente e password è mostrato qui.",
+       "passwordreset-emailerror-capture2": "Invio di email {{GENDER:$2|all'utente}} non riuscito: $1. {{PLURAL:$3|Il nome|L'elenco di nomi}} utente e password è mostrato qui.",
        "passwordreset-nocaller": "Un chiamante deve essere fornito",
        "passwordreset-nosuchcaller": "Chiamante non esiste: $1",
        "passwordreset-ignored": "La reimpostazione della password non è stata gestita. Forse nessun provider è configurato?",
        "searchprofile-advanced-tooltip": "Cerca nei namespace personalizzati",
        "search-result-size": "$1 ({{PLURAL:$2|una parola|$2 parole}})",
        "search-result-category-size": "{{PLURAL:$1|1 utente|$1 utenti}} ({{PLURAL:$2|1 sottocategoria|$2 sottocategorie}}, {{PLURAL:$3|1 file|$3 files}})",
-       "search-redirect": "(redirect $1)",
+       "search-redirect": "(reindirizzamento da $1)",
        "search-section": "(sezione $1)",
        "search-category": "(categoria $1)",
        "search-file-match": "(corrispondenza nel contenuto del file)",
        "upload-http-error": "Si è verificato un errore HTTP: $1",
        "upload-copy-upload-invalid-domain": "Non è consentito il caricamento di copie da questo dominio.",
        "upload-foreign-cant-upload": "Questo wiki non è configurato per caricare i file nel repository di file esterno richiesto.",
+       "upload-foreign-cant-load-config": "Impossibile caricare il file di configurazione per caricarlo nel repositorio esterno.",
        "upload-dialog-disabled": "Il caricamento di file tramite questa finestra di dialogo è disabilitato in questo wiki.",
        "upload-dialog-title": "Carica file",
        "upload-dialog-button-cancel": "Annulla",
+       "upload-dialog-button-back": "Indietro",
        "upload-dialog-button-done": "Fatto",
        "upload-dialog-button-save": "Salva",
        "upload-dialog-button-upload": "Carica",
        "uploadstash-errclear": "La pulizia dei file non è riuscita.",
        "uploadstash-refresh": "Aggiorna l'elenco dei file",
        "uploadstash-thumbnail": "vedi miniatura",
+       "uploadstash-exception": "Impossibile memorizzare il caricamento in stash ($1): \"$2\".",
        "invalid-chunk-offset": "Offset della parte non valido.",
        "img-auth-accessdenied": "Accesso negato",
        "img-auth-nopathinfo": "PATH_INFO mancante.\nIl server non è impostato per passare questa informazione.\nPotrebbe essere basato su CGI e non può supportare img_auth.\nVedi https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization",
        "listfiles_date": "Data",
        "listfiles_name": "Nome",
        "listfiles_user": "Utente",
-       "listfiles_size": "Dimensione in byte",
+       "listfiles_size": "Dimensione",
        "listfiles_description": "Descrizione",
        "listfiles_count": "Versioni",
        "listfiles-show-all": "Includi le vecchie versioni delle immagini",
        "apisandbox-results-fixtoken-fail": "Impossibile recuperare il token \"$1\".",
        "apisandbox-alert-page": "I campi su questa pagina non sono validi.",
        "apisandbox-alert-field": "Il valore di questo campo non è valido.",
+       "apisandbox-continue": "Continua",
+       "apisandbox-continue-clear": "Pulisci",
        "booksources": "Fonti librarie",
        "booksources-search-legend": "Ricerca di fonti librarie",
        "booksources-isbn": "Codice ISBN:",
        "movelogpagetext": "Di seguito sono elencate le pagine spostate di recente.",
        "movesubpage": "{{PLURAL:$1|Sottopagina|Sottopagine}}",
        "movesubpagetext": "Questa pagina ha $1 {{PLURAL:$1|sottopagina mostrata|sottopagine mostrate}} di seguito.",
+       "movesubpagetalktext": "La corrispondente pagina di discussione ha $1 {{PLURAL:$1|sottopagina mostrata|sottopagine mostrate}} di seguito.",
        "movenosubpage": "Questa pagina non ha sottopagine.",
        "movereason": "Motivo:",
        "revertmove": "ripristina",
        "tooltip-ca-undelete": "Ripristina la pagina com'era prima della cancellazione",
        "tooltip-ca-move": "Sposta questa pagina (cambia titolo)",
        "tooltip-ca-watch": "Aggiungi questa pagina alla tua lista degli osservati speciali",
-       "tooltip-ca-unwatch": "Elimina questa pagina dalla tua lista degli osservati speciali",
+       "tooltip-ca-unwatch": "Rimuovi questa pagina dalla tua lista degli osservati speciali",
        "tooltip-search": "Cerca all'interno di {{SITENAME}}",
        "tooltip-search-go": "Vai a una pagina con il titolo indicato, se esiste",
        "tooltip-search-fulltext": "Cerca il testo indicato nelle pagine",
        "pageinfo-category-pages": "Numero di pagine",
        "pageinfo-category-subcats": "Numero di sottocategorie",
        "pageinfo-category-files": "Numero di file",
+       "pageinfo-user-id": "ID utente",
        "markaspatrolleddiff": "Segna come verificata",
        "markaspatrolledtext": "Segna questa pagina come verificata",
        "markaspatrolledtext-file": "Segna questo file come verificato",
        "newimages-showbots": "Mostra caricamenti di bot",
        "newimages-hidepatrolled": "Nascondi caricamenti verificati",
        "noimages": "Non c'è nulla da vedere.",
+       "gallery-slideshow-toggle": "Alterna miniature",
        "ilsubmit": "Ricerca",
        "bydate": "per data",
        "sp-newimages-showfrom": "Mostra i file più recenti a partire dalle ore $2 del $1",
        "confirm-watch-button": "OK",
        "confirm-watch-top": "Aggiungi questa pagina alla tua lista degli osservati speciali?",
        "confirm-unwatch-button": "OK",
-       "confirm-unwatch-top": "Elimina questa pagina dalla tua lista degli osservati speciali?",
+       "confirm-unwatch-top": "Rimuovere questa pagina dalla tua lista degli osservati speciali?",
        "confirm-rollback-button": "OK",
        "confirm-rollback-top": "Ripristinare le modifiche di questa pagina?",
        "percent": "$1&#160;%",
        "tag-filter": "Filtra per [[Special:Tags|etichetta]]:",
        "tag-filter-submit": "Filtra",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etichetta|Etichette}}]]: $2)",
+       "tag-mw-contentmodelchange": "modifica modello contenuti",
+       "tag-mw-contentmodelchange-description": "Modifiche che [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel cambiano il modello di contenuti] di una pagina",
        "tags-title": "Etichette",
        "tags-intro": "Questa pagina elenca le etichette che il software potrebbe associare a una modifica e il loro significato.",
        "tags-tag": "Nome dell'etichetta",
        "tags-actions-header": "Azioni",
        "tags-active-yes": "Sì",
        "tags-active-no": "No",
-       "tags-source-extension": "Definito da un'estensione",
+       "tags-source-extension": "Definito dal software",
        "tags-source-manual": "Applicato manualmente da utenti e bot",
        "tags-source-none": "Non più in uso",
        "tags-edit": "modifica",
        "htmlform-cloner-create": "Aggiungi altro",
        "htmlform-cloner-delete": "Rimuovi",
        "htmlform-cloner-required": "È obbligatorio almeno un valore.",
+       "htmlform-date-placeholder": "AAAA-MM-GG",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "AAAA-MM-GG HH:MM:SS",
+       "htmlform-date-invalid": "Il valore specificato non è riconosciuto come data. Prova a utilizzare il formato AAAA-MM-GG.",
+       "htmlform-time-invalid": "Il valore specificato non è riconosciuto come orario. Prova a utilizzare il formato HH:MM:SS.",
+       "htmlform-datetime-invalid": "Il valore specificato non è riconosciuto come data e ora. Prova a utilizzare il formato AAAA-MM-GG HH:MM:SS.",
+       "htmlform-date-toolow": "Il valore specificato è precedente alla prima data consentita del $1.",
+       "htmlform-date-toohigh": "Il valore specificato è successivo all'ultima data consentita del $1.",
+       "htmlform-time-toolow": "Il valore specificato è precedente al primo orario consentito del $1.",
+       "htmlform-time-toohigh": "Il valore specificato è successivo all'ultimo orario consentito di $1.",
+       "htmlform-datetime-toolow": "Il valore specificato è precedente alla prima data e ora consentita del $1.",
+       "htmlform-datetime-toohigh": "Il valore specificato è successivo all'ultima data e ora consentita del $1.",
        "htmlform-title-badnamespace": "[[:$1]] non si trova nel namespace \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" è il titolo di una pagina non creabile",
        "htmlform-title-not-exists": "$1 non esiste.",
        "htmlform-user-not-exists": "<strong>$1</strong> non esiste.",
        "htmlform-user-not-valid": "<strong>$1</strong> non è un nome utente valido.",
-       "sqlite-has-fts": "$1 con la possibilità di ricerca completa nel testo",
-       "sqlite-no-fts": "$1 senza la possibilità di ricerca completa nel testo",
        "logentry-delete-delete": "$1 {{GENDER:$2|ha cancellato}} la pagina $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|ha ripristinato}} la pagina \"$3\"",
        "logentry-delete-event": "$1 {{GENDER:$2|ha modificato}} la visibilità di {{PLURAL:$5|un'azione del registro|$5 azioni del registro}} di \"$3\": $4",
        "feedback-external-bug-report-button": "Documenta un problema tecnico",
        "feedback-dialog-title": "Invia un feedback",
        "feedback-dialog-intro": "Usa il modulo sottostante per inviare il tuo feedback. Il tuo commento apparirà nella pagina \"$1\", assieme al tuo nome utente.",
-       "feedback-error-title": "Errore",
        "feedback-error1": "Errore: Dalla API è arrivato un risultato non riconosciuto",
        "feedback-error2": "Errore: Non è stato possibile eseguire la modifica",
        "feedback-error3": "Errore: Nessuna risposta dalla API",
        "feedback-thanks": "Grazie! Il tuo feedback è stato pubblicato alla pagina \"[$2 $1]\".",
        "feedback-thanks-title": "Grazie!",
        "feedback-useragent": "Agente utente:",
-       "searchsuggest-search": "Ricerca",
+       "searchsuggest-search": "Cerca all'interno di {{SITENAME}}",
        "searchsuggest-containing": "contenente...",
        "api-error-autoblocked": "Il tuo indirizzo IP è stato bloccato automaticamente, perché è stato utilizzato da un utente bloccato.",
        "api-error-badaccess-groups": "Non sei autorizzato a caricare documenti su questa wiki.",
        "linkaccounts-success-text": "L'utenza è stata collegata.",
        "linkaccounts-submit": "Collega utenze",
        "unlinkaccounts": "Scollega utenze",
-       "unlinkaccounts-success": "L'utenza è stata scollegata."
+       "unlinkaccounts-success": "L'utenza è stata scollegata.",
+       "authenticationdatachange-ignored": "Il cambiamento dei dati di autenticazione non è stato gestito. Forse non è stato configurato nessun provider?",
+       "userjsispublic": "Ricorda: le sottopagine JavaScript non devono contenere dati riservati poichè sono visualizzabili da altri utenti.",
+       "usercssispublic": "Ricorda: le sottopagine CSS non devono contenere dati riservati poichè sono visualizzabili da altri utenti.",
+       "restrictionsfield-badip": "Indirizzo IP o intervallo non valido: $1",
+       "restrictionsfield-label": "Intervalli IP consentiti:",
+       "restrictionsfield-help": "Un indirizzo IP o intervallo CIDR per linea. Per consentire tutto, utilizza<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Errore: $1",
+       "edit-error-long": "Errori:\n\n$1"
 }
index 5f451b9..2300869 100644 (file)
        "newwindow": "(新しいウィンドウで開きます)",
        "cancel": "取り消し",
        "moredotdotdot": "続き...",
-       "morenotlisted": "この一覧は完全ではありません。",
+       "morenotlisted": "この一覧はおそらく完全ではありません。",
        "mypage": "ページ",
        "mytalk": "トーク",
        "anontalk": "トーク",
        "talk": "議論",
        "views": "表示",
        "toolbox": "ツール",
+       "tool-link-userrights": "{{GENDER:$1|利用者}}グループの変更",
+       "tool-link-emailuser": "この{{GENDER:$1|利用者}}にメールを送信",
        "userpage": "利用者ページを表示",
        "projectpage": "プロジェクトのページを表示",
        "imagepage": "ファイルのページを表示",
        "databaseerror-query": "クエリ: $1",
        "databaseerror-function": "関数: $1",
        "databaseerror-error": "エラー: $1",
+       "transaction-duration-limit-exceeded": "書き込み処理時間 ($1) が $2 秒の制限に達したため、過多なレプリケーションの遅延を避けることを目的に、このトランザクションは中止されました。\n一度に多数の変更を試みた場合、処理を複数に細分化して実行してください。",
        "laggedslavemode": "<strong>警告:</strong> ページに最新の編集が反映されていない可能性があります。",
        "readonly": "データベースがロックされています",
        "enterlockreason": "ロックの理由の入力と、ロック解除の予定を、入力してください",
        "createacct-yourpasswordagain-ph": "パスワードを再入力",
        "userlogin-remembermypassword": "ログイン状態を保持",
        "userlogin-signwithsecure": "安全な接続の使用",
+       "cannotlogin-title": "ログイン不能",
+       "cannotlogin-text": "ログインできません",
        "cannotloginnow-title": "今はログインできません",
        "cannotloginnow-text": "$1 使用中には、ログインは不可能です。",
+       "cannotcreateaccount-title": "アカウント作成不可",
+       "cannotcreateaccount-text": "このウィキではアカウントの直接作成が無効になっています。",
        "yourdomainname": "あなたのドメイン:",
        "password-change-forbidden": "このウィキではパスワードを変更できません。",
        "externaldberror": "認証データベースでエラーが発生したか、または外部アカウントの更新が許可されていません。",
        "eauthentsent": "指定したメールアドレスに、アドレス確認のためのメールをお送りしました。\nメールに記載された手順に従って、このアカウントの所有者であることの確認が取れると、このアカウント宛のメールを受け取れるようになります。",
        "throttled-mailpassword": "パスワード再設定メールを過去 {{PLURAL:$1|$1 時間}}に送信済みです。\n悪用防止のため、パスワードの再設定は {{PLURAL:$1|$1 時間}}に 1 回のみです。",
        "mailerror": "メールを送信する際にエラーが発生しました: $1",
-       "acct_creation_throttle_hit": "あなたと同じ IP アドレスでこのウィキに訪れた人が、最近 24 時間で {{PLURAL:$1|$1 アカウント}}を作成しており、これはこの期間で作成が許可されている最大数です。\nそのため、現在この IP アドレスではアカウントをこれ以上作成できません。",
+       "acct_creation_throttle_hit": "あなたと同じ IP アドレスでこのウィキに訪れた人が、直近 $2 で {{PLURAL:$1|$1 個のアカウント}}を作成しており、この期間で作成が許可されている最大数です。\nそのため、現在この IP アドレスからこれ以上のアカウントを作成できません。",
        "emailauthenticated": "メールアドレスは$2で $3に確認済みです。",
        "emailnotauthenticated": "メールアドレスが確認されていません。\n確認されるまで、以下のいかなる機能でもメールは送信されません。",
        "noemailprefs": "これらの機能を有効にするには、個人設定でメールアドレスを登録してください。",
        "botpasswords-label-resetpassword": "パスワードをリセット",
        "botpasswords-label-grants": "該当する権限群",
        "botpasswords-help-grants": "各権限群は、一覧にある利用者権限で現在の利用者アカウントが既に有している権限を付与します。詳細については、[[Special:ListGrants|権限群の表]]をご覧ください。",
-       "botpasswords-label-restrictions": "使用制限:",
        "botpasswords-label-grants-column": "付与",
        "botpasswords-bad-appid": "ボット「$1」は有効ではありません。",
        "botpasswords-insert-failed": "ボット「$1」の追加に失敗しました。既に追加されていないか確認してください。",
        "grant-highvolume": "多量の編集",
        "grant-oversight": "利用者名および版を秘匿",
        "grant-patrol": "ページへの変更の巡回",
+       "grant-privateinfo": "個人情報アクセス",
        "grant-protect": "ページを保護および保護解除",
        "grant-rollback": "ページヘの変更の巻き戻し",
        "grant-sendemail": "他の利用者へのメールの送信",
        "upload-dialog-disabled": "このウィキでは、このダイアログを使用するファイルのアップロードが無効にされています。",
        "upload-dialog-title": "ファイルをアップロード",
        "upload-dialog-button-cancel": "中止",
+       "upload-dialog-button-back": "戻る",
        "upload-dialog-button-done": "完了",
        "upload-dialog-button-save": "保存",
        "upload-dialog-button-upload": "アップロード",
        "apisandbox-results-fixtoken-fail": "\"$1\" トークンの取得に失敗しました。",
        "apisandbox-alert-page": "このページの欄が有効ではありません。",
        "apisandbox-alert-field": "この欄の値が有効ではありません。",
+       "apisandbox-continue": "続行",
+       "apisandbox-continue-clear": "消去",
        "booksources": "書籍情報源",
        "booksources-search-legend": "書籍情報源を検索",
        "booksources-isbn": "ISBN:",
        "rollbacklinkcount": "$1{{PLURAL:$1|編集}}を巻き戻し",
        "rollbacklinkcount-morethan": "$1{{PLURAL:$1|編集}}以上を巻き戻し",
        "rollbackfailed": "巻き戻しに失敗しました",
+       "rollback-missingparam": "リクエストに必要なパラメーターが見当たりません。",
+       "rollback-missingrevision": "版の情報を読み込めませんでした。",
        "cantrollback": "編集を差し戻せません。\n最後の投稿者が、このページの唯一の作者です。",
        "alreadyrolled": "ページ[[:$1]]の[[User:$2|$2]] ([[User talk:$2|トーク]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) による編集を巻き戻せません。\n他の利用者が既に編集または巻き戻しを行ったためです。\n\nこのページの最後の編集は[[User:$3|$3]] ([[User talk:$3|トーク]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]) によるものです。",
        "editcomment": "編集内容の要約: <em>$1</em>",
        "pageinfo-category-pages": "ページ数",
        "pageinfo-category-subcats": "下位カテゴリ数",
        "pageinfo-category-files": "ファイル数",
+       "pageinfo-user-id": "利用者 ID",
        "markaspatrolleddiff": "巡回済みにする",
        "markaspatrolledtext": "このページを巡回済みにする",
        "markaspatrolledtext-file": "このファイルの版を巡回済みにする",
        "tags-actions-header": "対処操作",
        "tags-active-yes": "はい",
        "tags-active-no": "いいえ",
-       "tags-source-extension": "拡張機能による定義",
+       "tags-source-extension": "ソフトウェアによる定義",
        "tags-source-manual": "利用者およびボットによる手動適用",
        "tags-source-none": "もう使われていない",
        "tags-edit": "編集",
        "htmlform-cloner-create": "さらに追加",
        "htmlform-cloner-delete": "除去",
        "htmlform-cloner-required": "少なくとも 1 つの値が必要です。",
+       "htmlform-date-placeholder": "YYYY-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "YYYY-MM-DD HH:MM:SS",
        "htmlform-title-badnamespace": "[[:$1]]は、\"{{ns:$2}}\"名前空間にありません。",
        "htmlform-title-not-creatable": "\"$1\" は、作成可能なページ名では、ありません。",
        "htmlform-title-not-exists": "$1 は存在しません。",
        "htmlform-user-not-exists": "<strong>$1</strong>は存在しません。",
        "htmlform-user-not-valid": "<strong>$1</strong>は有効な利用者名ではありません。",
-       "sqlite-has-fts": "$1 (全文検索あり)",
-       "sqlite-no-fts": "$1 (全文検索なし)",
        "logentry-delete-delete": "$1 がページ「$3」を{{GENDER:$2|削除しました}}",
        "logentry-delete-restore": "$1 がページ「$3」を{{GENDER:$2|復元しました}}",
        "logentry-delete-event": "$1 が $3 の{{PLURAL:$5|記録項目|記録項目$5件}}の閲覧レベルを{{GENDER:$2|変更しました}}: $4",
        "feedback-external-bug-report-button": "技術的タスクをファイル",
        "feedback-dialog-title": "フィードバックの送信",
        "feedback-dialog-intro": "以下のフォームでフィードバックを簡単に提出できます。あなたのコメントは利用者名と共に、ページ \"$1\" に追加されるでしょう。",
-       "feedback-error-title": "エラー",
        "feedback-error1": "エラー: 認識できない結果を API が返しました",
        "feedback-error2": "エラー: 編集に失敗しました",
        "feedback-error3": "エラー: API からの応答がありません",
        "feedback-thanks": "ありがとうございます。フィードバックを「[$2 $1]」のページに投稿しました。",
        "feedback-thanks-title": "お願いします!",
        "feedback-useragent": "ユーザーエージェント:",
-       "searchsuggest-search": "検索",
+       "searchsuggest-search": "{{SITENAME}}内を検索",
        "searchsuggest-containing": "この語句を全文検索",
        "api-error-autoblocked": "あなたの IP アドレスは、過去にブロックされた利用者によって使用されていたため、自動的にブロックされました。",
        "api-error-badaccess-groups": "このウィキへのファイルのアップロードが許可されていません。",
        "log-action-filter-block-reblock": "ブロック変更",
        "log-action-filter-block-unblock": "ブロック解除",
        "log-action-filter-contentmodel-change": "コンテンツモデルの変更",
+       "log-action-filter-contentmodel-new": "標準でないコンテンツ・モデルによるページの作成",
        "log-action-filter-delete-delete": "ページの削除",
        "log-action-filter-delete-restore": "ページの復帰",
        "log-action-filter-delete-event": "記録の削除",
        "log-action-filter-newusers-create": "匿名利用者による作成",
        "log-action-filter-newusers-create2": "登録利用者による作成",
        "log-action-filter-newusers-autocreate": "自動的な作成",
+       "log-action-filter-newusers-byemail": "メールによるパスワード送信を伴う作成",
        "log-action-filter-patrol-patrol": "手動巡回",
        "log-action-filter-patrol-autopatrol": "自動巡回",
        "log-action-filter-protect-protect": "保護",
        "log-action-filter-suppress-event": "記録の秘匿",
        "log-action-filter-suppress-revision": "版の秘匿",
        "log-action-filter-suppress-delete": "ページの秘匿",
+       "log-action-filter-suppress-block": "ブロックによる利用者の秘匿",
+       "log-action-filter-suppress-reblock": "再ブロックによる利用者の秘匿",
        "log-action-filter-upload-upload": "新規アップロード",
        "log-action-filter-upload-overwrite": "再アップロード",
        "authmanager-authn-not-in-progress": "認証が行われていない、またはセッションデータが失われました。最初からやり直してください。",
        "linkaccounts-submit": "アカウントを関連付ける",
        "unlinkaccounts": "アカウントの関連付け解除",
        "unlinkaccounts-success": "アカウントの関連付けが解除されました。",
-       "authenticationdatachange-ignored": "認証データの変更は処理されませんでした。プロバイダーが設定されていない可能性があります。"
+       "authenticationdatachange-ignored": "認証データの変更は処理されませんでした。プロバイダーが設定されていない可能性があります。",
+       "userjsispublic": "注意: JavaScript のサブページは第三者が閲覧可能なため、機微な情報を含めないでください。",
+       "usercssispublic": "注意: CSS のサブページは第三者が閲覧可能なため、機微な情報を含めないでください。",
+       "restrictionsfield-badip": "無効な IP アドレス、またはその範囲: $1",
+       "restrictionsfield-label": "許可する IP の範囲:",
+       "restrictionsfield-help": "一行につき、単一の IP アドレス、もしくは CIDR による範囲。全帯域からの接続を許可する場合は<br><code>0.0.0.0/0</code><br><code>::/0</code>"
 }
index 130e070..f4e4631 100644 (file)
@@ -85,7 +85,7 @@
        "fri": "Jum",
        "sat": "Set",
        "january": "Januari",
-       "february": "bruari",
+       "february": "bruari",
        "march": "Maret",
        "april": "April",
        "may_long": "Mèi",
        "august": "Agustus",
        "september": "Sèptèmber",
        "october": "Oktober",
-       "november": "Nopèmber",
+       "november": "Novèmber",
        "december": "Dhésèmber",
        "january-gen": "Januari",
-       "february-gen": "bruari",
+       "february-gen": "bruari",
        "march-gen": "Maret",
        "april-gen": "April",
        "may-gen": "Mèi",
        "august-gen": "Agustus",
        "september-gen": "Sèptèmber",
        "october-gen": "Oktober",
-       "november-gen": "Nopèmber",
+       "november-gen": "Novèmber",
        "december-gen": "Dhésèmber",
        "jan": "Jan",
-       "feb": "Pèb",
+       "feb": "Fèb",
        "mar": "Mar",
        "apr": "Apr",
        "may": "Mèi",
        "nov": "Nop",
        "dec": "Dhé",
        "january-date": "Januari $1",
-       "february-date": "Pèbruari $1",
+       "february-date": "Fèbruari $1",
        "march-date": "Maret $1",
        "april-date": "April $1",
        "may-date": "$1 Mèi",
        "august-date": "Agustus $1",
        "september-date": "$1 Sèptèmber",
        "october-date": "Oktober $1",
-       "november-date": "$1 Nopèmber",
+       "november-date": "$1 Novèmber",
        "december-date": "$1 Dhésèmber",
        "period-am": "Isuk-Awan",
        "period-pm": "Soré-Wengi",
        "subcategories": "Anak kategori",
        "category-media-header": "Médhia sajeroning kategori \"$1\"",
        "category-empty": "<em>Kategori iki lagi ora ngandhut artikel utawa médhia.</em>",
-       "hidden-categories": "{{PLURAL:$1|Kategori kadhelikan}}",
-       "hidden-category-category": "Kategori kadhelikan",
+       "hidden-categories": "{{PLURAL:$1|Kategori ndhelik}}",
+       "hidden-category-category": "Kategori ndhelik",
        "category-subcat-count": "{{PLURAL:$2|Kategori iki mung ngandhut saanak kategori ngisor iki.|Kategori iki ngandhut {{PLURAL:$1|anak kategori|$1 anak kategori}} ngisor iki saka gunggung $2 anak kategori.}}",
        "category-subcat-count-limited": "Kategori iki duwé {{PLURAL:$1|anak kategori|$1 anak kategori}} kaya ngisor iki.",
        "category-article-count": "{{PLURAL:$2|Kategori iki mung ngandhut kaca ngisor iki.|{{PLURAL:$1|Kaca|$1 kaca}} ngisor iki ana ing kategori iki saka gunggung $2 kaca.}}",
-       "category-article-count-limited": "Kategori iki ngandhut {{PLURAL:$1|kaca|$1 kaca-kaca}} sing kapacak ing ngisor iki.",
+       "category-article-count-limited": "Kategori iki ngandhut {{PLURAL:$1|kaca|$1 kaca}} sing kapacak ing ngisor iki.",
        "category-file-count": "{{PLURAL:$2|Kategori iki mung isi barkas iki.|{{PLURAL:$1|Barkas|$1 barkas}} iki ana sajeroning kategori iki saka $2 gunggungé.}}",
-       "category-file-count-limited": "Kategori iki ndarbèni {{PLURAL:$1|berkas|$1 berkas-berkas}} sing kapacak ing ngisor iki.",
+       "category-file-count-limited": "Kategori iki duwé {{PLURAL:$1|barkas|$1 barkas}} sing kapacak ing ngisor iki.",
        "listingcontinuesabbrev": "samb.",
-       "index-category": "Kaca kaindhèksan",
-       "noindex-category": "Kaca ora kaindhèksan",
+       "index-category": "Kaca kaindhèks",
+       "noindex-category": "Kaca ora kaindhèks",
        "broken-file-category": "Kaca mawa pranala barkas rusak",
        "about": "Bab",
        "article": "Kaca isi",
        "newwindow": "(buka mawa jendhéla anyar)",
        "cancel": "Wurung",
        "moredotdotdot": "Liyané...",
-       "morenotlisted": "Pratélan iki ora jangkep.",
+       "morenotlisted": "Pratélan iki ora wutuh.",
        "mypage": "Kaca",
        "mytalk": "Parembugan",
        "anontalk": "Parembugan",
-       "navigation": "Napigasi",
+       "navigation": "Navigasi",
        "and": "&#32;lan",
        "qbfind": "Golèk",
        "qbbrowse": "Luru",
        "qbmyoptions": "Kaca-kacaku",
        "faq": "Pitakon Kerep",
        "faqpage": "Project:Pitakon Kerep",
-       "actions": "Tumindak",
+       "actions": "Lelabuhan",
        "namespaces": "Jagat aran",
-       "variants": "Parian",
-       "navigation-heading": "Menu napigasi",
+       "variants": "Varian",
+       "navigation-heading": "Menu navigasi",
        "errorpagetitle": "Cacad",
        "returnto": "Bali nyang $1.",
        "tagline": "Saka {{SITENAME}}",
        "searchbutton": "Golèk",
        "go": "Menyang",
        "searcharticle": "Menyang",
-       "history": "Babading kaca",
+       "history": "Sujarah kaca",
        "history_short": "Sujarah",
-       "updatedmarker": "wis inganyaran kawit tekaku sing pungkasan",
-       "printableversion": "Cara cithakan",
+       "updatedmarker": "wis dianyari kawit tekaku mréné pungkasan",
+       "printableversion": "Vèrsi cithak",
        "permalink": "Pranala permanèn",
        "print": "Cithak",
        "view": "Deleng",
        "view-foreign": "Deleng nyang $1",
        "edit": "Besut",
-       "edit-local": "Besut panyandra enggon-enggonan",
+       "edit-local": "Besut andharan enggon-enggonan",
        "create": "Gawé",
        "create-local": "Tambah panyadra enggon-enggonan",
        "editthispage": "Besut kaca iki",
        "create-this-page": "Gawé kaca iki",
        "delete": "Busak",
        "deletethispage": "Busak kaca iki",
-       "undeletethispage": "Wurungaké pambusaking kaca iki",
-       "undelete_short": "Batal busak {{PLURAL:$1|sabesutan|$1 besutan}}",
-       "viewdeleted_short": "Deleng {{PLURAL:$1|sabesutan sing kabusak|$1 besutan sing kabusak}}",
+       "undeletethispage": "Wurung busak kaca iki",
+       "undelete_short": "Wurung busak {{PLURAL:$1|sabesutan|$1 besutan}}",
+       "viewdeleted_short": "Deleng {{PLURAL:$1|sabesutan kabusak|$1 besutan kabusak}}",
        "protect": "Reksa",
        "protect_change": "owah",
        "protectthispage": "Reksa kaca iki",
        "viewcount": "Kaca iki wis diaksès ping {{PLURAL:$1|siji|$1}}.",
        "protectedpage": "Kaca kareksa",
        "jumpto": "Jujug:",
-       "jumptonavigation": "napigasi",
+       "jumptonavigation": "navigasi",
        "jumptosearch": "golèk",
        "view-pool-error": "Nyuwun ngapuro, peladèn lagi sibuk wektu iki.\nKakèhan panganggo sing nyoba mbukak kaca iki.\nEntèni sedhéla sadurungé nyoba ngaksès kaca iki manèh .\n\n$1",
        "generic-pool-error": "Nyuwun pangapura, paladèn saiki nembé arungan.\nKakèhan panganggo sing péngin ndeleng sumber iki.\nEntèna sadhéla sadurungé sampéyan nekani sumber iki manèh.",
        "botpasswords-label-appid": "Jeneng bot:",
        "botpasswords-label-create": "Gawé",
        "botpasswords-label-update": "Anyari",
-       "botpasswords-label-cancel": "Batal",
+       "botpasswords-label-cancel": "Wurung",
        "botpasswords-label-delete": "Busak",
        "botpasswords-label-resetpassword": "Balèni gawé tembung wadi",
        "resetpass_forbidden": "Tembung wadi ora bisa diganti",
        "missingcommentheader": "'''Pangéling:''' Sampéyan durung nyadhiyakaké judhul/jejer kanggo tanggepan iki.\nYèn Sampéyan klik \"{{int:savearticle}}\" manèh, suntingan Sampéyan bakal kasimpen tanpa kuwi.",
        "summary-preview": "Pratuduh tingkesan:",
        "subject-preview": "Prawuryaning jejer:",
+       "previewerrortext": "Cacad dumadi nalika njajal mratuduh owahanmu.",
        "blockedtitle": "Panganggo kapalangan",
        "blockedtext": "<b>Asma panganggo utawa alamat IP panjenengan diblokir.</b>\n\nBlokir iki sing nglakoni $1.\nAlesané <i>$2</i>.\n\n* Diblokir wiwit: $8\n* Kadaluwarsa pemblokiran ing: $6\n* Sing arep diblokir: $7\n\nPanjenengan bisa ngubungi $1 utawa [[{{MediaWiki:Grouppage-sysop}}|pangurus liyané]] kanggo ngomongaké prakara iki.\n\nPanjenengan ora bisa nggunakaké fitur 'Kirim layang é-mail panganggo iki' kejaba panjenengan wis nglebokaké alamat é-mail sing sah ing [[Special:Preferences|prèferènsi]] panjenengan.\n\nAlamat IP panjenengan iku $3, lan ID pamblokiran iku #$5.\nTulung kabèh informasi ing ndhuwur iki disertakaké ing saben pitakon panjenengan.",
        "autoblockedtext": "Alamat IP panjenangan wis diblokir minangka otomatis amerga dienggo déning panganggo liyané. Pamblokiran dilakoni déning $1 mawa alesan:\n\n:''$2''\n\n* Diblokir wiwit: $8\n* Blokir kadaluwarsa ing: $6\n* Sing dikarepaké diblokir: $7\n\nPanjenengan bisa ngubungi $1 utawa [[{{MediaWiki:Grouppage-sysop}}|pangurus liyané]] kanggo ngomongaké perkara iki.\n\nPanjenengan ora bisa nganggo fitur \"kirim e-mail panganggo iki\" kejaba panjenengan wis nglebokaké alamat e-mail sing sah ing [[Special:Preferences|prèferènsi]] panjenengan lan panjenengan wis diblokir kanggo nggunakaké.\n\nID pamblokiran panjenengan iku #$5 lan alamat IP panjenengan iku $3. Tulung sertakna informasi ing dhuwur kabèh iki saben ngajokaké pitakonan panjenengan. Matur nuwun.",
        "rev-suppressed-diff-view": "Sawiji benahan saka prabédan iki wis '''dibrèdèl'''.\nSampéyan isih bisa ndelok prabédan iki; rincian bisa ditemokaké nèng [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} log pambrèdèlan].",
        "rev-delundel": "Owah kasatmatan",
        "rev-showdeleted": "tuduhaké",
-       "revisiondelete": "Busak/batal busak revisi",
+       "revisiondelete": "Busak/wurung busak révisi",
        "revdelete-nooldid-title": "Rèvisi tujuan ora sah",
        "revdelete-nooldid-text": "Panjenengan durung mènèhi target revisi kanggo nglakoni fungsi iki.",
        "revdelete-no-file": "Berkas sing dituju ora ana.",
        "revdelete-show-file-confirm": "Apa panjenengan yakin arep mirsani révisi sing wis kabusak saka berkas \"<nowiki>$1</nowiki>\" ing $2, jam $3?",
        "revdelete-show-file-submit": "Iya",
        "logdelete-selected": "{{PLURAL:$1|Log kapilih|Log kapilih}} kanggo:",
+       "revdelete-text-others": "Administrator liya isih bisa ngaksès isian ndhelik lan mulihaké iku saka pambusakan, kajaba rereksan tambahan disetèl.",
        "revdelete-confirm": "Mangga pesthèkaké yèn Sampéyan pancèn kudu nglakoni iki, yèn Sampéyan ngerti akibaté, lan yèn Sampéyan ngakoni iki cocok karo [[{{MediaWiki:Policy-url}}|kawicakan]].",
        "revdelete-suppress-text": "Pandhelikan révisi '''mung''' bisa dipigunakaké kanggo kasus ing ngisor:\n* Informasi sing kagolong pitnah\n* Informasi pribadi sing kurang pantes\n*: ''alamat omah lan nomer telepon, nomer kartu idhèntitas, lsp..''",
        "revdelete-legend": "Atur watesan:",
        "right-writeapi": "Nganggo API tulis",
        "right-delete": "Busak kaca-kaca",
        "right-bigdelete": "Busak kaca-kaca mawa sajarah panyuntingan sing gedhé",
-       "right-deletelogentry": "Busak lan batalaké mbusak isi log spésipik",
+       "right-deletelogentry": "Busak lan wurung busak èntri log tartamtu",
        "right-deleterevision": "Busak lan batal busak révisi tartamtu kaca-kaca",
        "right-deletedhistory": "Ndeleng sajarah èntri-èntri kabusak, tanpa bisa ndeleng apa sing dibusak",
        "right-deletedtext": "Delok tèks kabusak lan panggantèn antara rèpisi kabusak",
        "right-browsearchive": "Golèk kaca-kaca sing wis dibusak",
-       "right-undelete": "Batal busak sawijining kaca",
+       "right-undelete": "Wurung busak kaca",
        "right-suppressrevision": "Ndeleng lan mbalèkaké révisi-révisi sing didelikaké saka para opsis",
        "right-suppressionlog": "Ndeleng log-log pribadi",
        "right-block": "Blokir panganggo-panganggo liya saka panyuntingan",
        "grant-createaccount": "Gawé akun",
        "grant-createeditmovepage": "Gawé, besut, lan lih kaca",
        "grant-delete": "Busak kaca, owahan, lan isian cathetan",
+       "grant-editinterface": "Besut jagad aran MediaWiki lan CSS/JavaScript panganggo",
+       "grant-editmycssjs": "Besut CSS/JavaScript panganggomu",
+       "grant-editmyoptions": "Besut préferènsi panganggomu",
        "newuserlogpage": "Log naraguna anyar",
        "newuserlogpagetext": "Ing ngisor iki kapacak log pandaftaran panganggo anyar.",
        "rightslog": "Log hak panganggo",
        "rightslogtext": "Ing ngisor iki kapacak log pangowahan marang hak-hak panganggo.",
-       "action-read": "maca kaca iki",
+       "action-read": "waca kaca iki",
        "action-edit": "besut kaca iki",
-       "action-createpage": "nggawé kaca-kaca",
+       "action-createpage": "gawé kaca iki",
        "action-createtalk": "gawé kaca parembugan iki",
        "action-createaccount": "gawé akun panganggo iki",
        "action-minoredit": "tandhani iki minangka besutan cilik",
-       "action-move": "alihna kaca iki",
+       "action-move": "alih kaca iki",
        "action-move-subpages": "mindahaké kaca iki, lan kabèh anak-kacané",
        "action-move-rootuserpages": "ngalih kaca panganggo oyod",
-       "action-movefile": "lih barkas iki",
-       "action-upload": "ngunggahaké berkas iki",
+       "action-move-categorypages": "alih kaca kategori",
+       "action-movefile": "alih barkas iki",
+       "action-upload": "unggah barkas iki",
        "action-reupload": "nindhih berkas sing wis ana",
        "action-reupload-shared": "nindhih berkas sing wis ana ing papan panyimpanan berkas sing dianggo bebarengan",
        "action-upload_by_url": "unggahna berkas iki saka sawijining alamat URL",
        "action-deleterevision": "busak revisi iki",
        "action-deletedhistory": "pirsani sajarah kaca sing wis dibusak iki",
        "action-browsearchive": "nggolèki kaca-kaca sing wis dibusak",
-       "action-undelete": "mbatalaké pambusakan kaca iki",
+       "action-undelete": "wurung busak kaca iki",
        "action-suppressrevision": "ninjo lan mbalèkaké revisi sing didhelikaké iki",
        "action-suppressionlog": "mirsani log pribadi iki",
        "action-block": "malang panganggo iki mbesut",
        "restriction-level-autoconfirmed": "pangreksan sémi",
        "restriction-level-all": "kabèh tingkatan",
        "undelete": "Kembalikan halaman yang telah dihapus",
-       "undeletepage": "Lihat dan kembalikan halaman yang telah dihapus",
+       "undeletepage": "Deleng lan pulihaké kaca kabusak",
        "undeletepagetitle": "'''Ing ngisor iki kapacak daftar révisi sing dibusak saka [[:$1]]'''.",
        "viewdeletedpage": "Deleng kaca sing wis dibusak",
        "undeletepagetext": "{{PLURAL:$1|kaca iki wis dibusak nanging isih|$1 kaca iki wis dibusak nanging isih}} ana ing arsip lan bisa dibalèkaké.\nArsip bisa diresiki sakala-kala.",
        "undelete-fieldset-title": "Mulihaké rèvisi",
-       "undeleteextrahelp": "Kanggo mbalèkaké kabèh sajarah kaca, kothongaké kabèh kothak-cèk lan klik '''''{{int:undeletebtn}}'''''.\nKanggo nglakoni pambalèkan pinilih, conthèngen kothak-cèk  sing magepokan karo révisi sing dipéngini lan klik '''''{{int:undeletebtn}}'''''.\nMencèt tombol '''''Reset''''' bakal ngosongaké isi komentar lan kabèh kothak-cèk.",
+       "undeleteextrahelp": "Saperlu mulihaké kabèh surajah kaca, jaraké kothak cèk kosong banjur klik <strong><em>{{int:undeletebtn}}</em></strong>.\nSaperlu ngayahi réstorasi sèlèktif, cèk kothak sing magepokan karo révisi sing arep dipulihaké, banjur klik <strong><em>{{int:undeletebtn}}</em></strong>.",
        "undeleterevisions": "$1 {{PLURAL:$1|révisi|révisi}} diarsipaké",
        "undeletehistory": "Yèn panjenengan mbalèkaké kaca, kabèh révisi bakal dibalèkaké jroning sajarah.\nYèn sawijining kaca anyar kanthi jeneng sing padha wis digawé wiwit nalika pambusakan, révisi sing wis dibalèkaké bakal katon jroning sajarah sadurungé.",
        "undeleterevdel": "Pambatalan pambusakan ora bakal dilakokaké yèn bab iku bakal ngakibataké révisi pungkasan kaca dadi sabagéyan kabusak.\nIng kasus kaya mengkono, panjenengan kudu ngilangaké cèk utawa mbusak pandelikan révisi kabusak sing anyar dhéwé.",
        "undelete-search-prefix": "Tuduhna kaca sing diwiwiti karo:",
        "undelete-search-submit": "Golèk",
        "undelete-no-results": "Ora ditemokaké kaca sing cocog ing arsip pambusakan.",
-       "undelete-filename-mismatch": "Ora bisa mbatalaké pambusakan révisi berkas mawa tandha wektu $1: jeneng berkas ora padha",
+       "undelete-filename-mismatch": "Ora bisa mulihaké révisi barkas mawa tandha wektu $1: Jeneng barkas ora padha",
        "undelete-bad-store-key": "Ora bisa mbatalaké pambusakan révisi berkas mawa tandha wektu $1: berkas ilang sadurungé dibusak.",
        "undelete-cleanup-error": "Ana kaluputan nalika mbusak arsip berkas \"$1\" sing ora dienggo.",
-       "undelete-missing-filearchive": "Ora bisa mbalèkaké arsip bekas mawa ID $1 amerga ora ana ing basis data.\nBerkas iku mbok-menawa wis dibusak.",
+       "undelete-missing-filearchive": "Ora bisa mulihaké arsip barkas ID $1 amarga ora ana ing basis data.\nBarkas iku bokmenawa wis dibusak.",
        "undelete-error": "Kasalahan mbalèkaké kaca",
        "undelete-error-short": "Kaluputan olèhé mbatalaké pambusakan: $1",
        "undelete-error-long": "Ana kaluputan nalika mbatalaké pambusakan berkas:\n\n$1",
        "infiniteblock": "salawasé",
        "expiringblock": "kadaluwarsa ing $1, $2",
        "anononlyblock": "namung anon",
-       "noautoblockblock": "pamblokiran otomatis dipatèni",
+       "noautoblockblock": "blokir otomatis dipatèni",
        "createaccountblock": "ndamelipun akun dipunblokir",
        "emailblock": "layang e-mail diblokir",
        "blocklist-nousertalk": "ora kena mbesut kaca guneman dhéwé",
-       "ipblocklist-empty": "Daftar pamblokiran kosong.",
+       "ipblocklist-empty": "Pratélan blokir kosong.",
        "ipblocklist-no-results": "alamat IP utawa panganggo sing disuwun ora diblokir.",
        "blocklink": "palang",
        "unblocklink": "jabel blokir",
        "contribslink": "sumbangan",
        "emaillink": "kirim layang èlèktronik",
        "autoblocker": "Panjenengan otomatis dipun-blok amargi nganggé alamat protokol internet (IP) ingkang sami kaliyan \"[[User:$1|$1]]\". Alesanipun $1 dipun blok inggih punika \"'''$2'''\"",
-       "blocklogpage": "Log pamblokiran",
+       "blocklogpage": "Log blokir",
        "blocklog-showlog": "Panganggo iki wis tau diblokir sakdurungé.\nLog blokiran sumadhiya nèng ngisor kanggo rujukan:",
        "blocklog-showsuppresslog": "Panganggo iki wis tau diblokir lan didhelikaké sakdurungé.\nLog brèdèlan sumadhiya nèng ngisor kanggo rujukan:",
        "blocklogentry": "mblokir [[$1]] kanthi wektu kadaluwarsa $2 $3",
        "htmlform-no": "Ora",
        "htmlform-yes": "Iya",
        "htmlform-chosen-placeholder": "Pilih pilihan",
-       "sqlite-has-fts": "$1 mawa sengkuyungan golèkan tèks jangkep",
-       "sqlite-no-fts": "$1 tanpa sengkuyungan golèkan tèks jangkep",
        "logentry-delete-delete": "$1 {{GENDER:$2|mbusak}} kaca $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|mbalèkaké}} kaca $3",
        "logentry-delete-event": "$1 {{GENDER:$2|ngganti}} parupané {{PLURAL:$5|sak prastawa log|$5 prastawa log}} ana ing $3: $4",
        "feedback-bugornote": "Yèn Sampéyan siap njelasaké masalah tèhnis kanthi rinci mangga [$1 laporaké bug].\nUtawa, Sampéyan bisa nganggo pormulir gampang ngisor. Tanggepan Sampéyan bakal ditambahaké nèng kaca \"[$3 $2]\", bebarengan karo jeneng panganggo Sampéyan lan pramban sing Sampéyan anggo.",
        "feedback-cancel": "Batal",
        "feedback-close": "Rampung",
-       "feedback-error-title": "Cacad",
        "feedback-error1": "Kasalahan: Asil ora dikenal saka API",
        "feedback-error2": "Cacad: Gagal mbesut",
        "feedback-error3": "Kasalahan: Ora ana tanggepan saka API",
        "feedback-submit": "Kirim",
        "feedback-thanks": "Nuwun! Lebon saran Sampéyan wis dipasang nèng kacané \"[$2 $1]\".",
        "searchsuggest-search": "Golèk",
-       "searchsuggest-containing": "ngisi...",
+       "searchsuggest-containing": "ngemu...",
        "api-error-badaccess-groups": "Sampéyan ora dililakaké ngunggah berkas nèng wiki iki.",
        "api-error-badtoken": "Kasalahan njero: Token èlèk.",
        "api-error-copyuploaddisabled": "Ngunggah saka URL dipatèni nèng sasana iki.",
index e9e2f92..38d9bdb 100644 (file)
        "password-change-forbidden": "თქვენ არ შეგიძლიათ ამ ვიკიში პაროლის შეცვლა.",
        "externaldberror": "საგარეო მონაცემთა ბაზაში აუტენტიფიკაციის შეცდომაა, ან თქვენ არ გაქვთ საკმარისი უფლებები საგარეო ანგარიშში ცვლილებების შესატანად.",
        "login": "შესვლა",
-       "login-security": "á\83\93á\83\90á\83\90á\83\93á\83\90á\83¡á\83¢á\83£á\83 á\83\94á\83\97 á\83\97á\83¥á\83\95á\83\94á\83\9cá\83\98 á\83\90á\83\95á\83\97á\83\94á\83\9cá\83¢á\83£á\83 á\83\9dá\83\91ა",
+       "login-security": "á\83\93á\83\90á\83\90á\83\93á\83\90á\83¡á\83¢á\83£á\83 á\83\94á\83\97 á\83\98á\83\93á\83\94á\83\9cá\83¢á\83\98á\83¤á\83\98á\83\99á\83\90á\83ªá\83\98ა",
        "nav-login-createaccount": "შესვლა / რეგისტრაცია",
        "userlogin": "შესვლა/ანგარიშის შექმნა",
        "userloginnocreate": "შესვლა",
        "userlogin-resetpassword-link": "დაგავიწყდათ პაროლი?",
        "userlogin-helplink2": "დახმარება:შესვლა",
        "userlogin-loggedin": "თქვენ უკვე შეხვედით როგორც {{GENDER:$1|$1}}.\nგამოიყენეთ ფორმა ქვემოთ, რათა შეხვიდეთ სხვა ანგარიშიდან.",
-       "userlogin-reauth": "á\83\97á\83¥á\83\95á\83\94á\83\9c á\83\99á\83\95á\83\9aá\83\90á\83\95 á\83£á\83\9cá\83\93á\83\90 á\83¨á\83\94á\83®á\83\95á\83\98á\83\93á\83\94á\83\97 á\83¡á\83\98á\83¡á\83¢á\83\94á\83\9bá\83\90á\83¨á\83\98 á\83 á\83\90á\83\97á\83\90 á\83¨á\83\94á\83\9bá\83\9dá\83¬á\83\9bá\83\93á\83\94á\83¡ á\83 á\83\9dá\83\9b á\83®á\83\90á\83 á\83\97 $1",
+       "userlogin-reauth": "á\83\97á\83¥á\83\95á\83\94á\83\9c á\83£á\83\9cá\83\93á\83\90 á\83\92á\83\90á\83\98á\83\90á\83 á\83\9dá\83\97 á\83\90á\83\95á\83¢á\83\9dá\83 á\83\98á\83\96á\83\90á\83ªá\83\98á\83\90, á\83 á\83\90á\83\97á\83\90 á\83\99á\83\98á\83\93á\83\94á\83\95 á\83\94á\83 á\83\97á\83®á\83\94á\83\9a á\83\9bá\83\9dá\83®á\83\93á\83\94á\83¡ á\83\97á\83¥á\83\95á\83\94á\83\9cá\83\98 á\83\98á\83\93á\83\94á\83\9cá\83¢á\83\98á\83¤á\83\98á\83ªá\83\98á\83 á\83\94á\83\91á\83\90 á\83\90á\83\9cá\83\92á\83\90á\83 á\83\98á\83¨á\83\97á\83\90á\83\9c â\80\9e{{GENDER:$1|$1}}â\80\9c.",
        "userlogin-createanother": "სხვა ანგარიშის შექმნა",
        "createacct-emailrequired": "ელ. ფოსტის მისამართი",
        "createacct-emailoptional": "ელ. ფოსტის მისამართი (არასავალდებულო)",
        "createacct-benefit-heading": "{{SITENAME}} შექმნილია თქვენნაირი ადამიანების მიერ.",
        "createacct-benefit-body1": "{{PLURAL:$1|რედაქტირება|რედაქტირება}}",
        "createacct-benefit-body2": "{{PLURAL:$1|გვერდი|გვერდი}}",
-       "createacct-benefit-body3": "á\83\91á\83\9dá\83\9aá\83\9d {{PLURAL:$1|á\83\9bá\83\9dá\83\9bá\83®á\83\9bá\83\90á\83 á\83\94á\83\91á\83\94á\83\9aá\83\98\83\9bá\83\9dá\83\9bá\83®á\83\9bá\83\90á\83 á\83\94á\83\91á\83\94á\83\9aი}}",
+       "createacct-benefit-body3": "á\83\91á\83\9dá\83\9aá\83\9d {{PLURAL:$1|á\83 á\83\94á\83\93á\83\90á\83¥á\83¢á\83\9dá\83 á\83\98\83 á\83\94á\83\93á\83\90á\83¥á\83¢á\83\9dá\83 ი}}",
        "badretype": "თქვენს მიერ შეყვანილი პაროლები ერთმანეთს არ ემთხვევა.",
        "usernameinprogress": "ამ მომხმარებლისათვის ანგარიში იქმნება. გთხოვთ, დაიცადეთ.",
        "userexists": "ეს სახელი უკვე გამოყენებულია.\nგთხოვთ, აირჩიეთ სხვა.",
        "botpasswords-label-resetpassword": "პაროლის აღდგენა",
        "botpasswords-label-grants": "გამოყენებადი ნებართვები:",
        "botpasswords-help-grants": "ყოველი ნებართვა იძლევა წვდომას ჩამოთვლილ მომხმარებელთა უფლებებზე, რომელიც მომხმარებელს აქვს. იხილეთ [[Special:ListGrants|ნებართვების ცხრილი]] მეტი ინფორმაციისთვის.",
-       "botpasswords-label-restrictions": "გამოყენების შეზღუდვები:",
        "botpasswords-label-grants-column": "მინიჭებულია",
        "botpasswords-bad-appid": "ბოტის სახელი \"$1\" არ არის მართებული.",
        "botpasswords-insert-failed": "ბოტის სახელის $1\" დამატება შეუძლებელია. უკვე დამატებულია?",
        "htmlform-title-not-exists": "$1 არ არსებობს.",
        "htmlform-user-not-exists": "<strong>$1</strong> არ არსებობს.",
        "htmlform-user-not-valid": "<strong>$1</strong> არ არის სწორი მომხმარებლის სახელი.",
-       "sqlite-has-fts": "$1 სრული ტექსტის ძიების მხარდაჭერით",
-       "sqlite-no-fts": "$1 სრული ტექსტის ძიების მხარდაჭერის გარეშე",
        "logentry-delete-delete": "მომხმარებელმა $1 {{GENDER:$2|წაშალა}} გვერდი: „$3“",
        "logentry-delete-restore": "მომხმარებელმა $1 {{GENDER:$2|აღადგინა}} გვერდი $3",
        "logentry-delete-event": "მომხმარებელმა $1 {{GENDER:$2|შეცვალა}} {{PLURAL:$5|ჟურნალის ჩანაწერის|$5 ჟურნალის ჩანაწერების}} ხილვადობა $3-ზე: $4",
        "feedback-external-bug-report-button": "ტექნიკური დავალების გაგზავნა",
        "feedback-dialog-title": "გამოხმაურების გაგზავნა",
        "feedback-dialog-intro": "თქვენ შეგიძლიათ ისარგებლოთ ქვემოთ არსებული მარტივი ფორმით, რათა დატოვოთ თქვენი გამოძახილი. კომენტარები თქვენ მომხმარებლის სახელთან ერთად დამატებული იქნება \"$1\" გვერდზე",
-       "feedback-error-title": "შეცდომა",
        "feedback-error1": "შეცდომა. API-ს მოულოდნელი რეზულტატი.",
        "feedback-error2": "შეცდომა: რედაქტირება ვერ განხორციელდა",
        "feedback-error3": "შეცდომა. არ არის API-ს პასუხი .",
index 5eda368..1580a47 100644 (file)
@@ -7,7 +7,8 @@
                        "Mirzali",
                        "아라",
                        "Macofe",
-                       "Kumkumuk"
+                       "Kumkumuk",
+                       "Asmen"
                ]
        },
        "tog-underline": "Bınê gırey de xete bonce:",
        "hidden-categories": "{{PLURAL:$1|Kategoriya wedariyaiye|Kategoriyê wedariyaey}}",
        "hidden-category-category": "Kategoriyê wedariyaey",
        "category-subcat-count": "{{PLURAL:$2|Na kategoriye de ana kategoriya bınêne esta.|Na kategoriye de $2 ra pêro pia, {{PLURAL:$1|ana kategoriya bınêne esta|ani $1 kategoriyê bınêni estê.}}, be $2 ra pia.}}",
-       "category-subcat-count-limited": "Na kategoriye de {{PLURAL:$1|ana kategoriya bınêne esta|ani $1 kategoriyê bınêni estê}}.",
+       "category-subcat-count-limited": "Na kategoriya de {{PLURAL:$1|ana kategoriya bınêne esta|ani $1 kategoriyê bınêni estê}}.",
        "category-article-count": "{{PLURAL:$2|Na kategoriye de teyna ana pele esta.|Na kategoriye de $2 ra pêro pia, {{PLURAL:$1|ana pele esta|ani $1 peli estê.}}, be $2 ra pêro pia}}",
        "category-article-count-limited": "{{PLURAL:$1|Ana pele kategoriya peyêne dera|Ani $1 peli kategoriya peyêne derê}}.",
        "category-file-count": "{{PLURAL:$2|Na kategoriye de teyna ana dosya esta.|Na kategoriye de $2 ra pêro pia, {{PLURAL:$1|ana dosya esta|ani $1 dosyey estê.}}}}",
        "specialpage": "Pela xısusiye",
        "personaltools": "Hacetê keşi",
        "articlepage": "Pela zerreki bıvêne",
-       "talk": "Hurênais",
+       "talk": "Hurênayis",
        "views": "Asaişi",
        "toolbox": "Qutiya hacetu",
        "userpage": "Pela karberi bıvêne",
index 08b84e8..e02843f 100644 (file)
@@ -15,7 +15,8 @@
                        "Batyrbek.kz",
                        "Matma Rex",
                        "Nemo bis",
-                       "Mormegil"
+                       "Mormegil",
+                       "Mirgulkali"
                ]
        },
        "tog-underline": "Сілтеменің астын сызу:",
        "history": "Бет тарихы",
        "history_short": "Тарихы",
        "updatedmarker": "соңғы қаралғаннан кейін жаңартылған",
-       "printableversion": "Басып шығару нұсқасы",
+       "printableversion": "Басып шығару",
        "permalink": "Тұрақты сілтеме",
        "print": "Басып шығару",
        "view": "Қарау",
        "talk": "Талқылау",
        "views": "Көрініс",
        "toolbox": "Құралдар",
+       "tool-link-userrights": "{{GENDER:$1|Қатысушы}} топтарын өзгерту",
+       "tool-link-emailuser": "Бұл {{GENDER:$1|қатысушыға}} хат жіберу",
        "userpage": "Қатысушы бетін қарау",
        "projectpage": "Жоба бетін қарау",
        "imagepage": "Файл бетін қарау",
        "gotaccount": "Бұған дейін тіркеліп пе едіңіз? '''$1'''.",
        "gotaccountlink": "Кіріңіз",
        "userlogin-resetlink": "Қатысушы атын не құпия сөзді ұмыттыңыз ба?",
-       "userlogin-resetpassword-link": "Құпия сөздіңізді ұмыттыңыз ба?",
+       "userlogin-resetpassword-link": "Құпия сөзіңізді ұмыттыңыз ба?",
        "userlogin-helplink2": "Кіруге көмек",
        "userlogin-loggedin": "{{GENDER:$1|$1}} ретінде әлдеқашан кіргенсіз.\nТөмендегі пішінді басқа қатысушы кіруі ретінде қолданыңыз.",
        "userlogin-createanother": "Басқа тіркелгі жасау",
        "createaccountreason": "Себебі:",
        "createacct-reason": "Себебі:",
        "createacct-reason-ph": "Неге басқа тіркегі жасамақшысыз",
-       "createacct-submit": "Тіркелгіңізді жасаңыз",
+       "createacct-submit": "Тіркеліңіз",
        "createacct-another-submit": "Тіркелгі жасау",
        "createacct-continue-submit": "Тіркелуді жалғастыру",
        "createacct-benefit-heading": "{{SITENAME}} сіздермен жасалады.",
        "passwordtoopopular": "Көп жағдайда таңдалатын құпиясөзді қолдана алмайсыз. Басқа бірегей құпиясөз таңдаңыз.",
        "password-name-match": "Құпия сөзіңіз қатысушы атынан өзгеше болуы қажет.",
        "password-login-forbidden": "Бұл қатысушы аты мен құпия сөзін пайдалануға тыйым салынған.",
-       "mailmypassword": "Құпия сөзді қалпына кеттіру",
+       "mailmypassword": "Құпия сөзді қалпына келтіру",
        "passwordremindertitle": "{{SITENAME}} үшін жаңа уақытша құпия сөз",
        "passwordremindertext": "Біреу (IP мекенжайы: $1, бәлкім өзіңіз боларсыз) {{SITENAME}} жобасында жаңа құпия сөз жөнелету сұранымын жасаған ($4).\nҚатысушы «$2» үшін уақытша құпия сөз жасалды: «$3». Егер бұл сіздің сұранымыңыз болса қазір жүйеге кіріп жаңа құпия сөз таңдауыңыз керек. \nСіздің уақытша құпия сөзіңіз {{PLURAL:$5|бір күнге|$5 күнге}} дейін белсенді болады.\n\nЕгер бұл сұранымды басқа біреу жасаса, не құпия сөздіңізді еске түсіріп енді өзгерткіңіз келмесе ескі құпия сөзді қолдануды жалғастырып осы хатты елемеуіңізге да болады.",
        "noemail": "Осы арада жазылып алынған «$1» қатысушының е-пошта мекенжайы жоқ.",
        "eauthentsent": "Құптау хаты көрсетілген е-пошта мекенжайына жөнелтілді.\nКез-келген басқа е-пошта хатын тіркелгіге жөнелту алдынан, тіркелгі шынымен сіздікі екенін құптау үшін хаттағы нұсқамаларға лесіңіз.",
        "throttled-mailpassword": "Соңғы {{PLURAL:$1|сағатта|$1 сағатта}} құпия сөзді өзгерту хаты әлдеқашан жіберілді.\nҚиянатты қақпайлау үшін {{PLURAL:$1|сағат|$1 сағат}} сайын тек бір ғана құпия сөзді өзгерту хаты жіберіледі.",
        "mailerror": "Хат жөнелту қатесі: $1",
-       "acct_creation_throttle_hit": "Сіздің IP мекенжайыңызбен осы уикиге кірушілер соңғы күнде {{PLURAL:$1|1 тіркелгі|$1 тіркелгі}} жасапты. Одан артық бұл уақыт аралығында рұқсат етілмейді.\nНәтижесінде осы IP мекенжайды пайдаланып кірушілер дәл қазіргі уақытта бірнеше тіркелгі жасай алмайды.",
+       "acct_creation_throttle_hit": "Сіздің IP мекенжайыңызбен осы уикиге кірушілер соңғы $2 {{PLURAL:$1|1 тіркелгі|$1 тіркелгі}} жасапты. Одан артық бұл уақыт аралығында рұқсат етілмейді.\nНәтижесінде осы IP мекенжайды пайдаланып кірушілер дәл қазіргі уақытта бірнеше тіркелгі жасай алмайды.",
        "emailauthenticated": "Е-пошта мекенжайыңыз расталған кезі: $3, $2.",
        "emailnotauthenticated": "Е-пошта мекенжайыңыз әлі расталған жоқ.\nКелесі әрбір мүмкіндіктер үшін еш хат жөнелтілмейді.",
        "noemailprefs": "Осы мүмкіндіктер істеуі үшін е-пошта мекен-жайыңызды енгізіңіз.",
        "botpasswords-label-update": "Жаңарту",
        "botpasswords-label-cancel": "Болдырмау",
        "botpasswords-label-delete": "Жою",
-       "botpasswords-label-resetpassword": "Құпия сөзді қалпына кеттіру",
+       "botpasswords-label-resetpassword": "Құпия сөзді қалпына келтіру",
        "botpasswords-label-grants": "Қолданылатын гранттар:",
-       "botpasswords-label-restrictions": "Пайдалану шектеулері:",
        "botpasswords-bad-appid": "\"$1\" бот атауы жарамды емес.",
        "botpasswords-insert-failed": "\"$1\" бот атауын қосу орындалмады. Ол әлдеқашан қосылған ба еді?",
        "botpasswords-update-failed": "\"$1\" бот атауын жаңарту орындалмады. Ол әлдеқашан жойылған ба еді?",
        "passwordreset-emailtext-user": "$1 есімді қатысушы {{SITENAME}} сайтында ($4) құпия сөзді өзгертуге өтініш білдірді. Мына қатысушы {{PLURAL:$3|аккаунт|аккаунттар}} осы електронды почта қатысты:\n\n$2\n\n{{PLURAL:$3|Бұл уақытша құпия сөз|Бұл уақытша құпия сөздер}} {{PLURAL:$5|бір күнде|$5 күнде}}уақыты аяқталады.\nСіз кіруіңіз және жаңа құпия сөзді таңдауыңыз керек. Егер бұл өтінішті басқа біреу жасаса, немесе сіз  бұрынғы құпия сөзіңізді еске түсірсеңіз, және құпия сөзді ауыстыруды қаламасаңыз, сіз бұл хабарламаны ескермей және бұрыңғы құпия сөзді қолдана беруіңізге болады.",
        "passwordreset-emailelement": "Қатысушы есімі: \n$1\n\nУақытша құпия сөз: \n$2",
        "passwordreset-emailsentemail": "Бұл email мекенжайы тіркелгіңізге байланысқан, сол себепті құпия сөзді өзгерту электронды пошта арқылы жөнелтіледі.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|email has|emails have}}үшін құпия сөздің қалпына келтіру хабарламасы жіберілді. {{PLURAL:$1|username and password|list of usernames and passwords}} мында көрсетілген.",
+       "passwordreset-emailerror-capture2": "{{GENDER:$2|user}}-мен электронды поштамен хабарласу нәтижесіз қалды: $1 The {{PLURAL:$3|username and password|list of usernames and passwords}} мында көрсетілген.",
        "changeemail": "Е-пошта мекенжайын өзгерту немесе аластау",
        "changeemail-header": "Е-пошта мекен-жайының өзгертілуі",
        "changeemail-no-info": "Бұл бетке тікелей ену үшін жүйеге кіруіңіз керек.",
        "revdelete-text-file": "Жойылған файл нұсқалары әлі де бет тарихында көрінетін болады, бірақ олардың мағлұмат бөлшектері жалпыға қатынаулы болмайды.",
        "logdelete-text": "Жойылған журнал оқиғалары әлі де бет тарихында көрінетін болады, бірақ олардың мағлұмат бөлшектері жалпыға қатынаулы болмайды.",
        "revdelete-text-others": "Қосымша тиымдар қойылғанша басқа әкімшілер, жасырын мағлұматқа қатынай және оны қалпына келтіре алады.",
-       "revdelete-confirm": "Сіз осыны істеу ниетіңізде салдары қандай болатынын түсінінің және сіз  [[{{MediaWiki:Policy-url}}|ережеге]] сәйкес бұны істегеніңізді құптаңыз.",
+       "revdelete-confirm": "Сіз осыны істеу ниетіңіздің салдары қандай болатынын түсінініңіз және сіз [[{{MediaWiki:Policy-url}}|ережеге]] сәйкес бұны істегеніңізді құптаңыз.",
        "revdelete-suppress-text": "Жасыру <strong>тек</strong> төмендегідей жағдайларда қолданылады:\n* потенциялды ғайбат ақпарат\n* Орынсыз жеке ақпарат\n*: <em>мекенжай және телефон номерлері, жеке сәйкестендіру нөмерлері, тағы сол сияқтылар.</em>",
        "revdelete-legend": "Көрініс тиымдарын қою:",
        "revdelete-hide-text": "Түзету мәтінін жасыр",
        "right-noratelimit": "Еселік шектелімдері ықпал етпейді",
        "right-import": "Басқа уикилерден беттерді сырттан алу",
        "right-importupload": "Файлдарды жүктеу арқылы беттерді сырттан алу",
-       "right-patrol": "Басқарардың өңдемелерін тексерілді деп белгілеу",
+       "right-patrol": "Басқалардың өңдемелерін тексерілді деп белгілеу",
        "right-autopatrol": "Өз өңдемелерін тексерілді деп өздіктік белгілеу",
        "right-patrolmarks": "Жуықтағы өзгерістердегі зерттеу белгілерін көру",
        "right-unwatchedpages": "Бақыланылмаған бет тізімін көру",
        "trackingcategories-msg": "Санатты қадағалау",
        "trackingcategories-name": "Хабарлама атауы",
        "trackingcategories-desc": "Санаттарды қосу шарттары",
+       "restricted-displaytitle-ignored": "Еленбеген көретілетін атауларымен беттер",
        "noindex-category-desc": "Бұл бет роботтар арқылы индекстелмеген, себебі онда <code><nowiki>__NOINDEX__</nowiki></code> деген сиқырлы сөзі бар және бұл жалауша рұқсат етілген есім кеңістігінде орналасқан.",
        "index-category-desc": "Бұл бетте <code><nowiki>__INDEX__</nowiki></code> деген код бар (және бұл жалауша рұқсат етілген есім кеңістігінде орналасқан), демек мұнда қалыпты жағдайда роботтар арқылы индекстелмейді.",
        "post-expand-template-inclusion-category-desc": "Беттің мөлшері барлық үлгілерді кеңейткен соң мынадан <code>$wgMaxArticleSize</code> үлкенірек болады, сондықтан біраз үлгілер кеңейтілмейді.",
        "pageinfo-hidden-categories": "Жасырылған {{PLURAL:$1|санат|санаттар}} ($1)",
        "pageinfo-templates": "Кіріктірілген {{PLURAL:$1|үлгі|үлгілер}} ($1)",
        "pageinfo-transclusions": "Kіріктірілген {{PLURAL:$1|бет|беттер}} ($1)",
-       "pageinfo-toolboxlink": "Ð\91ұл Ð±ÐµÑ\82 Ñ\82Ñ\83Ñ\80алÑ\8b Ð¼әлімет",
+       "pageinfo-toolboxlink": "Ð\9cәлімет",
        "pageinfo-redirectsto": "Айдатылғандар",
        "pageinfo-redirectsto-info": "Информация",
        "pageinfo-contentpage": "Контент бетке санала ма?",
        "htmlform-title-not-exists": "$1 беті жоқ.",
        "htmlform-user-not-exists": "<strong>$1</strong> есімді қатысушы жоқ.",
        "htmlform-user-not-valid": "<strong>$1</strong> жарамды қатысушы есімі емес.",
-       "sqlite-has-fts": "$1 дегенмен барлық мәтінде іздеуді қолдайды",
-       "sqlite-no-fts": "$1дегенсіз барлық мәтінде іздеуді қолдайды",
        "logentry-delete-delete": "$1 $3 деген бетті {{GENDER:$2|жойды}}",
        "logentry-delete-restore": "$1 $3 деген бетті {{GENDER:$2|қалпына келтірді}}",
        "logentry-delete-event": "$1 $3 бетіндегі {{PLURAL:$5|журнал оқиғасы|$5 журнал оқиғасы}} көрінісін {{GENDER:$2|өзгертті}}: $4",
        "feedback-external-bug-report-button": "Техникалық тапсырманы жіберу",
        "feedback-dialog-title": "Пікірді жіберу",
        "feedback-dialog-intro": "Сіз пікіріңізді жіберу үшін төмендегі пішінді пайдалана аласыз. Сіздің пікіріңіз «$1» бетіне сіздің қатысушы есіміңізбен қосылады.",
-       "feedback-error-title": "Қате",
        "feedback-error1": "Қате: API-дан танылмаған нәтиже",
        "feedback-error2": "Қате: Өңдеме сәтсіздікке ұшырады",
        "feedback-error3": "Қате: API-дан жауап жоқ",
index 5d2c25c..c3926de 100644 (file)
@@ -36,6 +36,7 @@
        "tog-hideminor": "ಇತ್ತೀಚಿನ ಬದಲಾವಣೆಗಳಲ್ಲಿ ಚಿಕ್ಕಪುಟ್ಟ ಸಂಪಾದನೆಗಳನ್ನು ಅಡಗಿಸಿ",
        "tog-hidepatrolled": "ಪಹರೆಯಲ್ಲಿ ಆದ ಸಂಪಾದನೆಗಳನ್ನು ಇತ್ತೀಚೆಗಿನ ಬದಲಾವಣೆಗಳಲ್ಲಿ ಅಡಗಿಸು",
        "tog-newpageshidepatrolled": "ಪಹರೆಯಲ್ಲಿ ಆದ ಪುಟಗಳನ್ನು ಹೊಸ ಪುಟಗಳ ಪಟ್ಟಿಯಲ್ಲಿ ಅಡಗಿಸು",
+       "tog-hidecategorization": "ಪುಟಗಳ ವರ್ಗೀಕರಣವನ್ನು ಅಡಗಿಸು",
        "tog-extendwatchlist": "ಕೇವಲ ಇತ್ತೀಚೆಗಿನ ಬದಲಾವಣೆಗಳಲ್ಲದೆ, ಎಲ್ಲಾ ಬದಲಾವಣೆಗಳನ್ನು ತೋರುವಂತೆ ಪಟ್ಟಿಯನ್ನು ವಿಸ್ತರಿಸಿ",
        "tog-usenewrc": "ಹೆಚ್ಚು ವರ್ಧಿಸಲಾದ ಇತ್ತೀಚಿನ ಬದಲಾವಣೆಗಳು ಪುಟ ಬಳಸು",
        "tog-numberheadings": "ತಲೆಬರಹಗಳಿಗೆ ಅಂಕಿಗಳನ್ನು ತೋರಿಸು",
@@ -46,6 +47,7 @@
        "tog-watchdefault": "ನಾನು ಸಂಪಾದಿಸುವ ಪುಟಗಳನ್ನು ವೀಕ್ಷಣಾಪಟ್ಟಿಗೆ ಸೇರಿಸು",
        "tog-watchmoves": "ನಾನು ಸ್ಥಳಾಂತರಿಸುವ ಪುಟಗಳನ್ನು ನನ್ನ ವೀಕ್ಷಣಾಪಟ್ಟಿಗೆ ಸೇರಿಸು",
        "tog-watchdeletion": "ನಾನು ಅಳಿಸುವ ಪುಟಗಳನ್ನು ನನ್ನ ವೀಕ್ಷಣಾ ಪಟ್ಟಿಗೆ ಸೇರಿಸು",
+       "tog-watchuploads": "ನಾನು ಹೊಸದಾಗಿ ಅಪ್‍ಲೋಡ್ ಮಾಡಿದ ಫೈಲ್‍ಗಳನ್ನು ನನ್ನ ವೀಕ್ಷಣಾಪಟ್ಟಿಗೆ ಸೇರಿಸು",
        "tog-watchrollback": "ನಾನು ಹಿಮ್ಮರಳುವಿಕೆಯನ್ನು ನಡೆಸಿದ ಪುಟಗಳನ್ನು ನನ್ನ ಗಮನಸೂಚಿಗೆ ಸೇರಿಸು",
        "tog-minordefault": "ನನ್ನ ಎಲ್ಲಾ ಸಂಪಾದನೆಗಳನ್ನು ಚುಟುಕಾದವು ಎಂದು ಗುರುತು ಮಾಡು",
        "tog-previewontop": "ಮುನ್ನೋಟವನ್ನು ಸಂಪಾದನೆ ಚೌಕದ ಮುಂಚೆ ತೋರು",
@@ -55,7 +57,7 @@
        "tog-enotifminoredits": "ಚಿಕ್ಕ-ಪುಟ್ಟ ಬದಲಾವಣೆಗಳಾದಾಗಲೂ ಇ-ಅಂಚೆ ಕಳುಹಿಸು",
        "tog-enotifrevealaddr": "ಪ್ರಕಟಣೆ ಇ-ಅಂಚೆಗಳಲ್ಲಿ ನನ್ನ ಇ-ಅಂಚೆ ವಿಳಾಸ ತೋರು",
        "tog-shownumberswatching": "ಪುಟವನ್ನು ವೀಕ್ಷಿಸುತ್ತಿರುವ ಸದಸ್ಯರ ಸಂಖ್ಯೆಯನ್ನು ತೋರಿಸು",
-       "tog-oldsig": "ಪ್ರಸ್ತುತ ಸಹಿ",
+       "tog-oldsig": "ನಿಮà³\8dಮ à²ªà³\8dರಸà³\8dತà³\81ತ à²¸à²¹à²¿",
        "tog-fancysig": "ಸರಳ ಸಹಿಗಳು (ಕೊಂಡಿ ಇಲ್ಲದಿರುವಂತೆ)",
        "tog-uselivepreview": "ನೇರ ಮುನ್ನೋಟವನ್ನು ಉಪಯೋಗಿಸಿ",
        "tog-forceeditsummary": "ಸಂಪಾದನೆ ಸಾರಾಂಶವನ್ನು ಖಾಲಿ ಬಿಟ್ಟಲ್ಲಿ ನೆನಪಿಸು",
        "tog-watchlisthidebots": "ವೀಕ್ಷಣಾಪಟ್ಟಿಯಲ್ಲಿ ಬಾಟ್ ಸಂಪಾದನೆಗಳನ್ನು ಅಡಗಿಸು",
        "tog-watchlisthideminor": "ಚಿಕ್ಕ ಬದಲಾವಣೆಗಳನ್ನು ವೀಕ್ಷಣಾ ಪಟ್ಟಿಯಿಂದ ಅಡಗಿಸು",
        "tog-watchlisthideliu": "ಲಾಗ್ ಇನ್ ಆಗಿರುವ ಸದಸ್ಯರ ಸಂಪಾದನೆಗಳನ್ನು ವೀಕ್ಷಣಾಪಟ್ಟಿಯಲ್ಲಿ ಅಡಗಿಸು",
+       "tog-watchlistreloadautomatically": "ಯಾವುದೇ ಫಿಲ್ಟರು ಬದಲಾದಾಗ ವೀಕ್ಷಣಾಪಟ್ಟಿ ಮತ್ತೆ ಲೋಡ್ ಆಗಲಿ (ಜಾವಾಸ್ಕ್ರಿಪ್ಟ್ ಇರಬೇಕು)",
        "tog-watchlisthideanons": "ಅನಾಮಧೇಯ ಬಳಕೆದಾರರ ಸಂಪಾದನೆಗಳನ್ನು ವೀಕ್ಷಣಾಪಟ್ಟಿಯಲ್ಲಿ ಅಡಗಿಸು",
        "tog-watchlisthidepatrolled": "ವೀಕ್ಷಣಾ ಪತ್ತಿಯಲ್ಲಿ ಹಸ್ತುಕದರ್ ಬದಲಾವಣೆಗಳನ್ನು ಅದಗಿಸು",
+       "tog-watchlisthidecategorization": "ಪುಟಗಳ ವರ್ಗೀಕರಣವನ್ನು ಅಡಗಿಸು",
        "tog-ccmeonemails": "ಇತರರಿಗೆ ನಾನು ಕಳುಹಿಸುವ ಇ-ಅಂಚೆಯ ಪ್ರತಿಯನ್ನು ನನಗೂ ಕಳುಹಿಸು",
        "tog-diffonly": "ವ್ಯತ್ಯಾಸಗಳ ಕೆಳಗಿರುವ ಪುಟದ ವಿವರಗಳನ್ನು ತೋರಿಸಬೇಡ",
        "tog-showhiddencats": "ಅಡಗಿಸಲ್ಪಟ್ಟ ವರ್ಗಗಳನ್ನು ತೋರಿಸು",
-       "tog-norollbackdiff": "ತà³\8aಡà³\86ದà³\81ಹಾà²\95ಿದ à²¨à²\82ತರ à²µà³\8dಯತà³\8dಯಸವನà³\8dನà³\81 à²¬à²¿à²¦à³\81",
+       "tog-norollbackdiff": "ತà³\8aಡà³\86ದà³\81ಹಾà²\95ಿದ à²¨à²\82ತರ à²µà³\8dತà³\8dಯತà³\8dಯಾಸವನà³\8dನà³\81 à²¤à³\8bರಿಸಬà³\87ಡ",
        "tog-useeditwarning": "ಸಂಪಾದನೆಯನ್ನು ಉಳಿಸದೆ ಹೊರಟಲ್ಲಿ ನನಗೆ ಎಚ್ಚರಿಸು",
        "tog-prefershttps": "ಯಾವತ್ತು ಸಹ ಲಾಗಿನ್ ನಂತರ ಸುರಕ್ಷಿತ ಸಂಪರ್ಕವನ್ನು ಬಳಸಿ",
        "underline-always": "ಯಾವಾಗಲೂ",
        "october-date": "ಅಕ್ಟೋಬರ್ $1",
        "november-date": "ನವೆಂಬರ್ $1",
        "december-date": "ಡಿಸೆಂಬರ್ $1",
+       "period-am": "ಪೂರ್ವಾಹ್ನ",
+       "period-pm": "ಅಪರಾಹ್ನ",
        "pagecategories": "{{PLURAL:$1|ವರ್ಗ|ವರ್ಗಗಳು}}",
        "category_header": "\"$1\" ವರ್ಗದಲ್ಲಿರುವ ಲೇಖನಗಳು",
        "subcategories": "ಉಪವರ್ಗಗಳು",
        "newwindow": "(ಹೊಸ ಕಿಟಕಿಯಲ್ಲಿ ತೆರೆಯುತ್ತದೆ)",
        "cancel": "ರದ್ದುಮಾಡು",
        "moredotdotdot": "ಇನ್ನಷ್ಟು...",
-       "morenotlisted": "à²\88 à²ªà²\9fà³\8dà²\9fಿ à²ªà³\82ರ à²\87ಲà³\8dಲ.",
+       "morenotlisted": "à²\88 à²ªà²\9fà³\8dà²\9fಿ à²\85ಪರಿಪà³\82ರà³\8dಣವಾà²\97ಿರಬಹà³\81ದà³\81.",
        "mypage": "ಪುಟ",
        "mytalk": "ಚರ್ಚೆ",
        "anontalk": "ಚರ್ಚೆ",
        "actionthrottled": "ಕ್ರಿಯೆಯನ್ನು ನಿಯಂತ್ರಿಸಲಾಗಿದೆ",
        "actionthrottledtext": "ಸ್ಪ್ಯಾಮ್ ವಿರೋಧಿ ವಿಧಾನದ ಪ್ರಕಾರ, ನಿಮ್ಮನ್ನು ಸ್ವಲ್ಪ ಸಮಯದಲ್ಲಿ ಬಹಳ ಸಲ ಈ ಕ್ರಿಯೆಯನ್ನು ಮಾಡುವುದರಿಂದ ನಿಯಂತ್ರಿಸಲಾಗಿದೆ ಮತ್ತು ನೀವು ಸೀಮೆಯನ್ನು ಮಿರಿದ್ದಿರಿ. ಸ್ವಲ್ಪ ಸಮಯದ ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ.",
        "protectedpagetext": "ಈ ಪುಟವನ್ನು ಸಂಪಾದನೆ ಮಾಡಲಾಗದಂತೆ ಸಂರಕ್ಷಿಸಲಾಗಿದೆ.",
-       "viewsourcetext": "ಈ ಪುಟದ ಮೂಲವನ್ನು ನೀವು ವೀಕ್ಷಿಸಬಹುದು ಮತ್ತು ನಕಲು ಮಾಡಬಹುದು:",
-       "viewyourtext": "ನೀವು \"ನಿಮ್ಮ ಸಂಪಾದನೆಗಳ\"ನ್ನು ವಿಕ್ಷಿಸಿ ಮತ್ತು ಅದರ ಮೂಲವನ್ನು ಈ ಹಾಳೆಗೆ ನಕಲಿಸಬಹುದು:",
+       "viewsourcetext": "ಈ ಪುಟದ ಮೂಲವನ್ನು ನೀವು ವೀಕ್ಷಿಸಬಹುದು ಮತ್ತು ನಕಲು ಮಾಡಬಹುದು.",
+       "viewyourtext": "ನೀವು <strong>ನಿಮ್ಮ ಸಂಪಾದನೆಗಳನ್ನು</strong> ವೀಕ್ಷಿಸಿ ಮತ್ತು ಅದರ ಮೂಲವನ್ನು ಈ ಹಾಳೆಗೆ ನಕಲಿಸಬಹುದು.",
        "protectedinterface": "ಈ ಪುಟವು ತಾಂತ್ರಿಕತೆಗೆ ಸಂಪರ್ಕ ಪಠ್ಯವನ್ನು ವಿಕಿಯಲ್ಲಿ ಒದಗಿಸುತ್ತದೆ, ಹಾಗು ದುರುಪಯೋಗ ಆಗದಿರಲೆಂದು ಇದನ್ನು ಸಂರಕ್ಷಿಸಲಾಗಿದೆ. ಎಲ್ಲ ವಿಕಿಗಳಿಗೆ ಭಾಷಾಂತರವನ್ನು ಕೂಡಿಸಲು ಹಾಗು ಬದಲಿಸಲು, [https://translatewiki.net/ translatewiki.net], the MediaWiki localisation ಯೋಜನೆಯನ್ನು ಉಪಯೊಗಿಸಿ",
        "editinginterface": "'''ಎಚ್ಚರಿಕೆ:''' ನೀವು ತಂತ್ರಾಂಶವು ತಾಣವನ್ನು ಪ್ರದರ್ಶಿಸಲು ಉಪಯೋಗಿಸುವ ಪಠ್ಯವನ್ನು ಹೊಂದಿರುವ ಪುಟವೊಂದನ್ನು ಸಂಪಾದಿಸುತ್ತಿರುವಿರಿ.\nಈ ಪುಟದಲ್ಲಾಗುವ ಬದಲಾವಣೆಗಳು ಇತರ ಬಳಕೆದಾರರಿಗೆ ತಾಣವು ಕಾಣುವ ರೀತಿಯನ್ನು ಬದಲಾಯಿಸುತ್ತದೆ.\nಅನುವಾದಗಳನ್ನು ಮಾಡುತ್ತಿದ್ದರೆ, ದಯವಿಟ್ಟು ಮೀಡಿಯವಿಕಿಯ ಪ್ರಾಂತೀಯತೆ ಯೋಜನೆ [https://translatewiki.net/ translatewiki.net], the MediaWiki localisation project ಯೋಜನೆಯನ್ನು ಉಪಯೊಗಿಸಿ",
        "cascadeprotected": "ಈ ಪುಟವು ಸಂಪಾದನೆ ಮಾಡಲಾಗದಂತೆ ಸಂರಕ್ಷಿಸಲಾಗಿದೆ. ಇದಕ್ಕೆ ಕಾರಣ ಈ ಪುಟವನ್ನು ಈ ಕೆಳಗಿನ ತಡಸಲು-ಸಂರಕ್ಷಣೆ ಅಳವಡಿಸಲಾದ {{PLURAL:$1|ಪುಟದಲ್ಲಿ|ಪುಟಗಳಲ್ಲಿ}} ಉಪಯೋಗಿಸಲಾಗಿದೆ:\n$2",
        "mypreferencesprotected": "ನಿಮ್ಮ ಆಯ್ಕೆಗಳನ್ನು  ಸಂಪಾದಿಸಲು ನಿಮಗೆ ಅನುಮತಿ ಇಲ್ಲ",
        "ns-specialprotected": "ವಿಶೇಷ ಪುಟಗಳನ್ನು ಸಂಪಾದಿಸಲು ಆಗುವುದಿಲ್ಲ.",
        "titleprotected": "ಈ ಹೆಸರಿನ ಪುಟವನ್ನು ಸೃಷ್ಟಿಸಲಾಗದಂತೆ [[User:$1|$1]] ಅವರು ಸಂರಕ್ಷಿಸಿದ್ದಾರೆ.\nಸಂರಕ್ಷಣೆಗೆ ನೀಡಿರುವ ಕಾರಣ: <em>$2</em>.",
-       "filereadonlyerror": "\"$1\" ಕಡತವು ಓದಲು ಮಾತ್ರ ಸಾದ್ಯವಿರುವ ರೀತಿಯಲ್ಲಿರುವ\"$2\" ಸಂಪುಟದಲ್ಲಿರುವುದರಿಂದ ಇದನ್ನು  ಮಾರ್ಪಡಿಸಲು ಸಾದ್ಯವಾಗುತ್ತಿಲ್ಲ.\nಇದನ್ನು ಬದ್ದಗೊಳಿಸಿರುವ ನಿರ್ವಾಹಕರು \"$3\" ಈ ವಿವರಣೆಯನ್ನು ನೀಡುತ್ತಿದ್ದಾರೆ.",
+       "filereadonlyerror": "\"$1\" ಕಡತವು ಓದಲು ಮಾತ್ರ ಸಾದ್ಯವಿರುವ ರೀತಿಯಲ್ಲಿರುವ \"$2\" ಸಂಪುಟದಲ್ಲಿ ಇರುವುದರಿಂದ ಇದನ್ನು  ಮಾರ್ಪಡಿಸಲು ಸಾದ್ಯವಾಗುತ್ತಿಲ್ಲ.\nಇದನ್ನು ಬದ್ದಗೊಳಿಸಿರುವ ನಿರ್ವಾಹಕರು ಈ ವಿವರಣೆಯನ್ನು ನೀಡುತ್ತಿದ್ದಾರೆ: \"$3\"",
        "invalidtitle-knownnamespace": "\"$2\"ನೇಮ್ ಸ್ಪೇಸ್ ಮತ್ತು \"$3\"ಪಠ್ಯದೊಂದಿಗೆ ಅಸಮಂಜಸ ತಲೆಬರಹ",
        "invalidtitle-unknownnamespace": "$1ನೇಮ್ ಸ್ಪೇಸ್ ಮತ್ತು \"$2\"ಪಠ್ಯದೊಂದಿಗೆ ಅಸಮಂಜಸ ತಲೆಬರಹ",
        "exception-nologin": "ಲಾಗಿನ್ ಆಗಿಲ್ಲ",
-       "exception-nologin-text": "ಈ ಪುಟ ಅಥವಾ ಚಟುವಟಿಕೆಗೆ ನೀವು ಈ ವಿಕಿಗೆ [[Special:Userlogin|ಲಾಗಿನ್]] ಆಗಿರಬೇಕಾಗಿರುತ್ತದೆ.",
+       "exception-nologin-text": "ಈ ಪುಟವನ್ನು ವೀಕ್ಷಿಸಲು ಅಥವ ಚಟುವಟಿಕೆಯನ್ನು ಮಾಡಲು ಲಾಗಿನ್ ಆಗಬೇಕು.",
        "exception-nologin-text-manual": "ಈ ಪುಟ ಅಥವಾ ಚಟುವಟಿಕೆಗೆ $1 ಮಾಡಿ",
        "virus-badscanner": "ಅಸಮಂಜಸ ವಿನ್ಯಾಸ:ಅಪರಿಚಿತ ವೈರಸ್ ಸ್ಕಾನರ್:''$1''",
        "virus-scanfailed": "ಸ್ಕಾನ್ ವಿಫಲ (code $1)",
        "virus-unknownscanner": "ಅಪರಿಚಿತ ವೈರಾಣುನಾಶಕ:",
        "logouttext": "'''ನೀವು ಈಗ ಲಾಗ್ ಔಟ್ ಆಗಿರುವಿರಿ.'''\n \nಗಮನಿಸಿ: ನಿಮ್ಮ ಬ್ರೌಸರ್‍ನ cache ಅನ್ನು ಅಳಿಸುವವರೆಗೂ ಕೆಲವು ಪುಟಗಳು ನೀವಿನ್ನೂ ಲಾಗ್ ಇನ್ ಆಗಿರುವಂತೆ ಪ್ರದರ್ಶಿತವಾಗಬಹುದು.",
+       "cannotlogoutnow-title": "ಈಗ ಲಾಗ್ ಔಟ್ ಮಾಡಲಾಗುತ್ತಿಲ್ಲ",
+       "cannotlogoutnow-text": "$1 ಬಳಸುವಾಗ ಲಾಗ್ ಔಟ್ ಆಗಲು ಸಾಧ್ಯವಿಲ್ಲ.",
        "welcomeuser": "ಸುಸ್ವಾಗತ,$1!",
        "welcomecreation-msg": "ನಿಮ್ಮ ಖಾತೆ ತೆರೆಯಲಾಗಿದೆ.ನಿಮ್ಮ [[Special:Preferences|{{SITENAME}} preferences]]ಬದಲಾಯಿಸಲು ಮರೆಯಬೇಡಿ.",
        "yourname": "ನಿಮ್ಮ ಬಳಕೆಯ ಹೆಸರು",
        "yourpasswordagain": "ಪ್ರವೇಶ ಪದ ಮತ್ತೊಮ್ಮೆ ಟೈಪ್ ಮಾಡಿ",
        "createacct-yourpasswordagain": "ಪ್ರವೇಶಪದವನ್ನು ಧೃಡೀಕರಿಸಿ",
        "createacct-yourpasswordagain-ph": "ಪ್ರವೇಶಪದವನ್ನು ಮತ್ತೊಮ್ಮೆ ನಮೂದಿಸಿ",
-       "remembermypassword": "ಈ ಗಣಕಯಂತ್ರದಲ್ಲಿ ನನ್ನ ಲಾಗಿನ್ ನೆನಪಿನಲ್ಲಿಟ್ಟುಕೊ (ಗರಿಷ್ಠ $1 {{PLURAL:$1|ದಿನದ|ದಿನಗಳ}}ವರೆಗೆ)",
        "userlogin-remembermypassword": "ನನ್ನನ್ನು ಲಾಗಿನ್ ಆಗಿಯೇ ಇಡಿ",
        "userlogin-signwithsecure": "ಸುರಕ್ಷಿತವಾದ ಕನೆಕ್ಷನ್ ಉಪಯೋಗಿಸಿ.",
+       "cannotlogin-title": "ಲಾಗ್ ಇನ್ ಮಾಡಲಾಗುತ್ತಿಲ್ಲ",
+       "cannotlogin-text": "ಲಾಗ್ ಇನ್ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ.",
+       "cannotloginnow-title": "ಈಗ ಲಾಗ್ ಇನ್ ಮಾಡಲು ಆಗುತ್ತಿಲ್ಲ",
+       "cannotloginnow-text": "$1 ಬಳಸುವಾಗ ಲಾಗ್ ಇನ್ ಆಗಲು ಸಾಧ್ಯವಿಲ್ಲ.",
+       "cannotcreateaccount-title": "ಖಾತೆಗಳನ್ನು ಸೃಷ್ಟಿಸಲಾಗುತ್ತಿಲ್ಲ",
        "yourdomainname": "ನಿಮ್ಮ ಕ್ಷೇತ್ರ:",
        "password-change-forbidden": "ನೀವು ಈ ವಿಕಿಯಲ್ಲಿ ಪ್ರವೇಶಪದವನ್ನು ಬದಲಾಯಿಸಲು ಸಾದ್ಯವಿಲ್ಲ.",
        "login": "ಲಾಗ್ ಇನ್",
        "userlogin-resetlink": "ನಿಮ್ಮ ಲಾಗಿನ್ ವಿವರಗಳನ್ನು ಮರೆತಿದ್ದೀರಾ?",
        "userlogin-resetpassword-link": "ನಿಮ್ಮ ಪ್ರವೇಶಪದ ಮರೆತಿರೇ?",
        "userlogin-helplink2": "ಲಾಗಿನ್ ಆಗಲು ಸಹಾಯ",
+       "userlogin-reauth": "ನೀವು {{GENDER:$1|$1}} ಎಂದು ಖಾತ್ರಿ ಮಾಡಲು ಮತ್ತೆ ಲಾಗ್ ಇನ್ ಆಗಬೇಕು.",
        "userlogin-createanother": "ಇನ್ನೊಂದು ಖಾತೆಯನ್ನು ಸೃಷ್ಟಿಸಿ",
        "createacct-emailrequired": "ಇ-ಮೇಲ್ ವಿಳಾಸ:",
        "createacct-emailoptional": "ಮಿಂಚಂಚೆ ವಿಳಾಸ (ಐಚ್ಛಿಕ)",
        "createacct-reason": "ಕಾರಣ",
        "createacct-reason-ph": "ನೀವು ಯಾಕೆ ಇನ್ನೊಂದು ಖಾತೆ ತೆರೆಯುತ್ತಿದ್ದೀರಿ",
        "createacct-submit": "ಖಾತೆಯನ್ನು ಸೃಷ್ಟಿಸಿ",
-       "createacct-another-submit": "ಇನ್ನು ಒಂದು ಖಾತ ಮಾಡಿ",
+       "createacct-another-submit": "ಖಾತೆಯನ್ನು ಸೃಷ್ಟಿಸಿ",
+       "createacct-continue-submit": "ಖಾತೆಯ ಸೃಷ್ಟಿಯನ್ನು ಮುಂದುವರೆಸಿ",
+       "createacct-another-continue-submit": "ಖಾತೆಯ ಸೃಷ್ಟಿಯನ್ನು ಮುಂದುವರೆಸಿ",
        "createacct-benefit-heading": "{{SITENAME}} ನಿಮ್ಮಂತಹ ಜನರಿಂದಲೇ ಮಾಡಿದ್ದು.",
        "createacct-benefit-body1": "{{PLURAL:$1|ಸಂಪಾದನೆ|ಸಂಪಾದನೆಗಳು}}",
        "createacct-benefit-body2": "{{PLURAL:$1|ಪುಟ|ಪುಟಗಳು}}",
        "pt-createaccount": "ಹೊಸ ಖಾತೆ ತೆರೆಯಿರಿ",
        "pt-userlogout": "ಲಾಗ್ ಔಟ್",
        "changepassword": "ಪ್ರವೇಶ ಪದ ಬದಲಾಯಿಸಿ",
-       "resetpass_announce": "ನà³\80ವà³\81 à²¤à²¾à²¤à³\8dà²\95ಾಲಿà²\95 à²\87-à²\85à²\82à²\9aà³\86 à²\95à³\8bಡà³\8d à²\85ನà³\8dನà³\81 à²\89ಪಯà³\8bà²\97ಿಸಿ à²²à²¾à²\97à³\8d à²\87ನà³\8d à²\86à²\97ಿರà³\81ವಿರಿ.\nಲಾà²\97à³\8d à²\87ನà³\8d à²ªà³\82ರà³\8dಣà²\97à³\8aಳಿಸಲà³\81 à²¨à³\80ವಿಲà³\8dಲ à²¹à³\8aಸ à²ªà³\8dರವà³\87ಶಪದ à²¨à³\80ಡಬà³\87à²\95à³\81:",
+       "resetpass_announce": "ಲಾà²\97à³\8d à²\87ನà³\8d à²ªà³\82ರà³\8dಣà²\97à³\8aಳಿಸಲà³\81 à²¨à³\80ವà³\81 à²¹à³\8aಸ à²ªà³\8dರವà³\87ಶಪದವನà³\8dನà³\81 à²¨à²®à³\82ದಿಸಬà³\87à²\95à³\81.",
        "resetpass_header": "ಖಾತೆಯ ಪ್ರವೇಶಪದ ಬದಲಾಯಿಸಿ",
        "oldpassword": "ಹಳೆಯ ಪ್ರವೇಶ ಪದ",
        "newpassword": "ಹೊಸ ಪ್ರವೇಶ ಪದ",
        "retypenew": "ಹೊಸ ಪ್ರವೇಶಪದವನ್ನು ಮತ್ತೆ ಟೈಪಿಸು:",
        "resetpass_submit": "ಪ್ರವೇಶ ಪದವನ್ನು ನಿಶ್ಚಯಿಸಿ ಲಾಗ್ ಇನ್ ಆಗಿ",
-       "changepassword-success": "ನಿಮ್ಮ ಪ್ರವೇಶ ಪದವನ್ನು ಯಶಸ್ವಿಯಾಗಿ ಬದಲಾಯಿಸಲಾಗಿದೆ. ಈಗ ನಿಮ್ಮನ್ನು ಲಾಗ್ ಇನ್ ಮಾಡಲಾಗುತ್ತಿದೆ...",
+       "changepassword-success": "ನಿಮ್ಮ ಪ್ರವೇಶಪದವನ್ನು ಬದಲಾಯಿಸಲಾಗಿದೆ!",
+       "changepassword-throttled": "ನೀವು ಬಹಳ ಸಾರಿ ಲಾಗ್ ಇನ್ ಆಗಲು ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. \nಮತ್ತೆ ಪ್ರಯತ್ನಿಸಲು $1 ಕಾಯಬೇಕು.",
+       "botpasswords": "ಬಾಟ್ ಪ್ರವೇಶ ಪದಗಳು",
        "resetpass_forbidden": "ಪ್ರವೇಶಪದಗಳನ್ನು ಬದಲಾಯಿಸುವಂತಿಲ್ಲ.",
        "resetpass-no-info": "ನೀವು ಈ ಪುಟವನ್ನು ನೇರತಲುಪಲು ಲಾಗಿನ್ ಆಗಿರುವುದು ಆವಶ್ಯಕ.",
        "resetpass-submit-loggedin": "ಪ್ರವೇಶಪದ ಬದಲಾಯಿಸು",
        "sig_tip": "ಸಮಯಮುದ್ರೆಯೊಂದಿಗೆ ನಿಮ್ಮ ಸಹಿ",
        "hr_tip": "ಅಡ್ಡ ಗೆರೆ (ಆದಷ್ಟು ಕಡಿಮೆ ಉಪಯೋಗಿಸಿ)",
        "summary": "ಸಾರಾಂಶ:",
-       "subject": "ವಿಷಯ/ತಲೆಬರಹ:",
+       "subject": "ವಿಷಯ:",
        "minoredit": "ಇದು ಚುಟುಕಾದ ಬದಲಾವಣೆ",
        "watchthis": "ಈ ಪುಟವನ್ನು ವೀಕ್ಷಿಸಿ",
        "savearticle": "ಪುಟವನ್ನು ಉಳಿಸಿ",
+       "savechanges": "ಬದಲಾವಣೆಗಳನ್ನು ಉಳಿಸಿ",
        "publishpage": "ಪುಟವನ್ನು ಪ್ರಕಟಿಸು",
        "publishchanges": "ಬದಲಾವಣೆಗಳನ್ನು ಪ್ರಕಟಿಸು",
        "preview": "ಮುನ್ನೋಟ",
        "showpreview": "ಮುನ್ನೋಟ ತೋರಿಸು",
        "showdiff": "ಬದಲಾವಣೆಗಳನ್ನು ತೋರಿಸು",
-       "anoneditwarning": "'''ಎಚ್ಚರ:''' ನೀವು ಲಾಗ್ ಇನ್ ಆಗಿಲ್ಲ. ನಿಮ್ಮ ಐಪಿ ವಿಳಾಸವು ಪುಟದ ಸಂಪಾದನೆಗಳ ಇತಿಹಾಸದಲ್ಲಿ ದಾಖಲಾಗುತ್ತದೆ.",
+       "blankarticle": "<strong>ಎಚ್ಚರಿಕೆ:</strong> ನೀವು ಸೃಷ್ಟಿಸುತ್ತಿರುವ ಪುಟ ಖಾಲಿ ಇದೆ.\n\"{{int:savearticle}}\" ಅನ್ನು ಮತ್ತೆ ಕ್ಲಿಕ್ಕಿಸಿದರೆ, ಏನೂ ಇರದಂತೆಯೆ ಈ ಪುಟವು ಸೃಷ್ಟಿಯಾಗುತ್ತದೆ.",
+       "anoneditwarning": "<strong>ಎಚ್ಚರ:</strong> ನೀವು ಲಾಗ್ ಇನ್ ಆಗಿಲ್ಲ. ನೀವು ಸಂಪಾದನೆ ಮಾಡಿದಲ್ಲಿ ನಿಮ್ಮ ಐಪಿ ವಿಳಾಸವು ಎಲ್ಲರಿಗೂ ಕಾಣಲು ಸಿಗುತ್ತದೆ. ನೀವು <strong>[$1 ಲಾಗ್ ಇನ್ ಆದರೆ]</strong> ಅಥವ <strong>[$2 ಹೊಸ ಖಾತೆಯನ್ನು ಸೃಷ್ಟಿಸಿದರೆ]</strong>, ನಿಮ್ಮ ಸಂಪಾದನೆಗಳನ್ನು ನೀವು ನಿಮ್ಮ ಬಳಕೆದಾರ ಹೆಸರಿನ ಅಡಿಯಲ್ಲಿ ಪ್ರದರ್ಶಿಸಬಹುದು.",
        "anonpreviewwarning": "''ನೀವು ಲಾಗಿನ್ ಆಗಿಲ್ಲ . ಉಳಿಸಲು ಪ್ರಯತ್ನಿಸಿದಾಗ ನಿಮ್ಮ IP ವಿಳಾಸವನ್ನು ಈ ಪುಟದ ಸಂಪಾದನೆ ಇತಿಹಾಸದಲ್ಲಿ ನಮೂದಿಸಲಗುವುದು.''",
        "missingsummary": "'''ಗಮನಿಸಿ:''' ನಿಮ್ಮ ಸಂಪಾದನೆಯ ಸಾರಾಂಶವನ್ನು ನೀವು ನೀಡಿಲ್ಲ. ಮತ್ತೊಮ್ಮೆ \"ಉಳಿಸು\" ಗುಂಡಿಯನ್ನು ಒತ್ತಿದರೆ, ಸಾರಾಂಶವಿಲ್ಲದೆಯೇ ನಿಮ್ಮ ಸಂಪಾದನೆಯನ್ನು ಉಳಿಸಲಾಗುವುದು.",
        "missingcommenttext": "ಕೆಳಗೆ ಒಂದು ಟಿಪ್ಪಣಿ ನಮೂದಿಸಿ",
-       "missingcommentheader": "'''ಗಮನಿಸಿ:''' ಈ ವ್ಯಾಖ್ಯಾನಕ್ಕೆ ವಿಷಯ ಅಥವ ತಲೆಬರಹ ನೀವು ಸೂಚಿಸಿಲ್ಲ. ನೀವು \"{{int:savearticle}}\"\nಮತ್ತೊಮೆ ಒತ್ತಿದರೆ ನಿಮ್ಮ ಸಂಪಾದನೆಯನ್ನು ಹಾಗೆಯೇ ಉಳಿಸಲಾಗುವುದು.",
+       "missingcommentheader": "<strong>ಗಮನಿಸಿ:</strong> ನಿಮ್ಮ ಸಂಪಾದನೆಯ ಸಾರಾಂಶವನ್ನು ನೀವು ನೀಡಿಲ್ಲ. ಮತ್ತೊಮ್ಮೆ \"{{int:savearticle}}\" ಅನ್ನು ಒತ್ತಿದರೆ, ಸಾರಾಂಶವಿಲ್ಲದೆಯೇ ನಿಮ್ಮ ಸಂಪಾದನೆಯನ್ನು ಉಳಿಸಲಾಗುವುದು.",
        "summary-preview": "ತಾತ್ಪರ್ಯ ಮುನ್ನೋಟ:",
        "subject-preview": "ವಿಷಯದ ಮುನ್ನೋಟ:",
        "blockedtitle": "ಈ ಸದಸ್ಯರನ್ನು ತಡೆ ಹಿಡಿಯಲಾಗಿದೆ.",
        "whitelistedittext": "ಪುಟಗಳನ್ನು ಸಂಪಾದಿಸಲು ನೀವು $1 ಆಗಬೇಕು.",
        "confirmedittext": "ಪುಟಗಳನ್ನು ಸಂಪಾದಿಸುವ ಮುನ್ನ ನೀವು ನಿಮ್ಮ ಇ-ಅಂಚೆ ವಿಳಾಸವನ್ನು ಧೃಡೀಕರಿಸಬೇಕು.\nದಯವಿಟ್ಟು [[Special:Preferences|ಬಳಕೆದಾರ ಆಯ್ಕೆಗಳು]] ಪುಟದಲ್ಲಿ ತಮ್ಮ ಇ-ಅಂಚೆ ವಿಳಾಸವನ್ನು ನಮೂದಿಸಿ ಮತ್ತು ಧೃಡೀಕರಿಸಿ.",
        "nosuchsectiontitle": "ಆ ಹೆಸರಿನ ವಿಭಾಗ ಯಾವುದೂ ಇಲ್ಲ",
-       "nosuchsectiontext": "ನೀವು ಅಸ್ಥಿತ್ವದಲ್ಲಿ ಇರದ ಒಂದು ವಿಭಾಗವನ್ನು ಸಂಪಾದಿಸಲು ಪ್ರಯತ್ನಿಸಿದಿರಿ.",
+       "nosuchsectiontext": "ನೀವು ಅಸ್ಥಿತ್ವದಲ್ಲಿ ಇರದ ಒಂದು ವಿಭಾಗವನ್ನು ಸಂಪಾದಿಸಲು ಪ್ರಯತ್ನಿಸಿದಿರಿ.\nನೀವು ಪುಟವನ್ನು ವೀಕ್ಷಿಸುವಾಗ ಆ ವಿಭಾಗವು ಸ್ಥಳಾಂತರಗೊಂಡಿರಬಹುದು ಅಥವ ಅಳಿಸಲ್ಪಟ್ಟಿರಬಹುದು.",
        "loginreqtitle": "ಲಾಗಿನ್ ಆಗಬೇಕು",
        "loginreqlink": "ಲಾಗ್ ಇನ್",
        "loginreqpagetext": "ಇತರ ಪುಟಗಳನ್ನು ನೋಡಲು ನೀವು $1 ಆಗಬೇಕು.",
        "newarticle": "(ಹೊಸತು)",
        "newarticletext": "ಇನ್ನೂ ಅಸ್ಥಿತ್ವದಲ್ಲಿ ಇರದ ಪುಟದ ಲಿಂಕ್ ಅನ್ನು ನೀವು ಒತ್ತಿರುವಿರಿ.\nಈ ಪುಟವನ್ನು ಸೃಷ್ಟಿಸಲು ಕೆಳಗಿನ ಚೌಕದಲ್ಲಿ ಬರೆಯಲು ಆರಂಭಿಸಿರಿ.\n(ಹೆಚ್ಚು ಮಾಹಿತಿಗೆ [$1 ಸಹಾಯ ಪುಟ] ನೋಡಿ).\nಈ ಪುಟಕ್ಕೆ ನೀವು ತಪ್ಪಾಗಿ ಬಂದಿದ್ದಲ್ಲಿ ನಿಮ್ಮ ಬ್ರೌಸರ್‍ನ '''back''' ಬಟನ್ ಅನ್ನು ಒತ್ತಿ.",
        "anontalkpagetext": "----''ಇದು ಖಾತೆಯೊಂದನ್ನು ಹೊಂದಿರದ ಅನಾಮಧೇಯ ಬಳಕೆದಾರರೊಬ್ಬರ ಚರ್ಚೆ ಪುಟ.\nಖಾತೆಯಿಲ್ಲದಿರುವುದರಿಂದ ಅವರನ್ನು ಗುರುತಿಸಲು ಅವರ IP ವಿಳಾಸವನ್ನು ಉಪಯೋಗಿಸುತ್ತಿದ್ದೇವೆ.\nಈ ರೀತಿಯ IP ವಿಳಾಸವು ಅನೇಕ ಬಳಕೆದಾರರಿಂದ ಉಪಯೋಗದಲ್ಲಿರಬಹುದು.\nನೀವು ಅನಾಮಧೇಯ ಬಳಕೆದಾರರಾಗಿದ್ದಲ್ಲಿ, ಹಾಗು ನಿಮಗೆ ಸಂಬಂಧವಿಲ್ಲದಂತ ಸಂದೇಶಗಳು ಬರುತ್ತಿವೆ ಎಂದು ಅನಿಸಿದರೆ, ಮುಂದೆ ಬೇರೆ ಅನಾಮಧೇಯ ಬಳಕೆದಾರರೊಂದಿಗೆ ತಪ್ಪಾಗಿ ಗುರುತಿಸಬಾರದೆಂದಿದ್ದರೆ ದಯವಿಟ್ಟು [[Special:CreateAccount|ಸದಸ್ಯರಾಗಿ]] ಅಥವ [[Special:UserLogin|ಲಾಗ್ ಇನ್ ಆಗಿ]].''",
-       "noarticletext": "à²\88 à²ªà³\81à²\9fದಲà³\8dಲಿ à²¸à²¦à³\8dಯà²\95à³\8dà²\95à³\86 à²\8fನà³\82 à²\87ಲà³\8dಲ.\nನà³\80ವà³\81 à²\87ತರ à²ªà³\81à²\9fà²\97ಳಲà³\8dಲಿ [[Special:Search/{{PAGENAME}}|à²\88 à²¹à³\86ಸರನà³\8dನà³\81 à²¹à³\81ಡà³\81à²\95ಬಹà³\81ದà³\81]],\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} à²¸à²\82ಬà²\82ಧಿತ à²¦à²¾à²\96ಲà³\86à²\97ಳನà³\8dನà³\81 à²¹à³\81ಡà³\81à²\95ಬಹà³\81ದà³\81],\nà²\85ಥವ [{{fullurl:{{FULLPAGENAME}}|action=edit}} à²\88 à²ªà³\81à²\9fವನà³\8dನà³\81 à²¸à²\82ಪಾದಿಸಬಹುದು]</span>.",
-       "noarticletext-nopermission": "ಈ ಪುಟದಲ್ಲಿ ಸದ್ಯಕ್ಕೆ ಯಾವ ಪಠ್ಯವೂ ಇಲ್ಲ.\nನೀವು ಇತರ ಪುಟಗಳಲ್ಲಿ [[ವಿಶೇಷ:Search/{{PAGENAME}}|ಈ ಶೀರ್ಷಿಕೆಗಾಗಿ ಹುಡುಕಬಹುದು]],\nಅಥವಾ <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ಸಂಬಂಧಿಸಿದ ದಾಖಲಾತಿ ಹುಡುಕಬಹುದು]</span>, ಆದರೆ ನಿಮಗೆ ಈ ಪುಟವನ್ನು ಸಂಪಾದಿಸಲು ಅನುಮತಿಯಿಲ್ಲ.",
+       "noarticletext": "à²\88 à²ªà³\81à²\9fದಲà³\8dಲಿ à²¸à²¦à³\8dಯà²\95à³\8dà²\95à³\86 à²\8fನà³\82 à²\87ಲà³\8dಲ.\nನà³\80ವà³\81 à²\87ತರ à²ªà³\81à²\9fà²\97ಳಲà³\8dಲಿ [[Special:Search/{{PAGENAME}}|à²\88 à²¹à³\86ಸರನà³\8dನà³\81 à²¹à³\81ಡà³\81à²\95ಬಹà³\81ದà³\81]],\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} à²¸à²\82ಬà²\82ಧಿತ à²¦à²¾à²\96ಲà³\86à²\97ಳನà³\8dನà³\81 à²¹à³\81ಡà³\81à²\95ಬಹà³\81ದà³\81],\nà²\85ಥವ [{{fullurl:{{FULLPAGENAME}}|action=edit}} à²\88 à²ªà³\81à²\9fವನà³\8dನà³\81 à²¸à³\83ಷà³\8dà²\9fಿಸಬಹುದು]</span>.",
+       "noarticletext-nopermission": "ಈ ಪುಟದಲ್ಲಿ ಸದ್ಯಕ್ಕೆ ಯಾವ ಪಠ್ಯವೂ ಇಲ್ಲ.\nನೀವು ಇತರ ಪುಟಗಳಲ್ಲಿ [[Special:Search/{{PAGENAME}}|ಈ ಶೀರ್ಷಿಕೆಗಾಗಿ ಹುಡುಕಬಹುದು]], ಅಥವಾ <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ಸಂಬಂಧಿಸಿದ ದಾಖಲೆಗಳನ್ನು ಹುಡುಕಬಹುದು]</span>, ಆದರೆ ನಿಮಗೆ ಈ ಪುಟವನ್ನು ಸೃಷ್ಟಿಸಲು ಅನುಮತಿಯಿಲ್ಲ.",
        "userpage-userdoesnotexist": "ಬಳಕೆದಾರ ಖಾತೆ \"<nowiki>$1</nowiki>\" ದಾಖಲಾಗಿಲ್ಲ. ನೀವು ಇದೇ ಪುಟವನ್ನು ಸೃಷ್ಟಿ/ಸಂಪಾದನೆ ಮಾಡಬೇಕೆಂದಿರುವಿರಿ ಎಂದು ಖಾತ್ರಿ ಮಾಡಿಕೊಳ್ಳಿ.",
        "blocked-notice-logextract": "ಈ ಬಳಕೆದಾರರನ್ನು  ಪ್ರಸ್ತುತವಾಗಿ  ನಿರ್ಬಂಧಿಸಲಾಗಿದೆ. \nಇತ್ತೀಚಿನ  ನಿರ್ಬಂಧನೆಯ ದಾಖಲೆಯನ್ನು ಉಲ್ಲೇಖಕ್ಕಾಗಿ ಕೆಳಗೆ ಕೊಟ್ಟಿದೆ:",
        "usercssyoucanpreview": "'''ಗಮನಿಸಿ:''' ಉಳಿಸುವ ಮುನ್ನ 'ಮುನ್ನೋಟ' ಗುಂಡಿಯನ್ನು ಉಪಯೋಗಿಸಿ ನಿಮ್ಮ ಹೊಸ CSS ಅನ್ನು ಪ್ರಯೋಗ ಮಾಡಿ.",
        "revertmerge": "ಸೇರ್ಪಡೆಯನ್ನು ತೊಡೆದುಹಾಕು",
        "mergelogpagetext": "ಒಂದು ಪುಟದ ಇತಿಹಾಸವನ್ನು ಇನ್ನೊಂದರೊಳಗೆ ಇತ್ತೀಚೆಗೆ ಸೇರ್ಪಡೆ ಮಾಡಲಾಗಿರುವ ಪಟ್ಟಿ ಕೆಳಗಿದೆ.",
        "history-title": "\"$1\" ಪುಟದ ಬದಲಾವಣೆಗಳ ಇತಿಹಾಸ",
+       "difference-title": "\"$1\" ಆವೃತ್ತಿಗಳ ಮಧ್ಯದ ಬದಲಾವಣೆಗಳು",
        "lineno": "$1 ನೇ ಸಾಲು:",
        "compareselectedversions": "ಆಯ್ಕೆ ಮಾಡಿದ ಆವೃತ್ತಿಗಳನ್ನು ಹೊಂದಾಣಿಕೆ ಮಾಡಿ ನೋಡಿ",
        "showhideselectedversions": "ಆಯ್ದ ಆವೃತ್ತಿಗಳನ್ನು ತೋರಿಸು/ಅಡಗಿಸು",
        "editundo": "ಹಿಂದಿನಂತೆ",
        "diff-empty": "( ಯಾವುದೇ ವ್ಯತ್ಯಾಸವಿಲ್ಲ )",
+       "diff-multi-sameuser": "(ಅದೇ ಬಳಕೆದಾರನ {{PLURAL:$1|ಮಧ್ಯದಲ್ಲಿನ ಬದಲಾವಣೆಯನ್ನು|$1 ಮಧ್ಯದ ಬದಲಾವಣೆಗಳನ್ನು}} ತೋರಿಸುತ್ತಿಲ್ಲ)",
        "searchresults": "ಶೋಧನೆಯ ಫಲಿತಾಂಶಗಳು",
        "searchresults-title": "\"$1\" ಅನ್ನು ಹುಡುಕಿದ ಫಲಿತಾಂಶಗಳು",
        "titlematches": "ಹೊಂದಿಕೆಯಿರುವ ಪುಟ ಶೀರ್ಷಿಕೆಗಳು",
        "shown-title": "ಪ್ರತಿ ಪುಟದಲ್ಲಿಯೂ $1 {{PLURAL:$1|result|results}} ತೋರಿಸು",
        "viewprevnext": "ವೀಕ್ಷಿಸು ($1 {{int:pipe-separator}} $2) ($3)",
        "searchmenu-exists": "'''\"[[:$1]]\" ಹೆಸರಿನ ಪುಟ ಈ ವಿಕಿಯಲ್ಲಿದೆ.'''",
-       "searchmenu-new": "'''''[[:$1]]'' ಪುಟವನ್ನು ಈ ವಿಕಿಯಲ್ಲಿ ಸೃಷ್ಟಿಸಿ!'''",
+       "searchmenu-new": "<strong>\"[[:$1]]\" ಪುಟವನ್ನು ಈ ವಿಕಿಯಲ್ಲಿ ಸೃಷ್ಟಿಸಿ!!</strong> {{PLURAL:$2|0=|See also the page found with your search.|See also the search results found.}}",
        "searchprofile-articles": "ಲೇಖನ ಪುಟ",
        "searchprofile-images": "ಮಲ್ಟಿಮೀಡಿಯ",
        "searchprofile-everything": "ಪ್ರತಿಯೊಂದು",
        "searchprofile-everything-tooltip": "ಎಲ್ಲಾ ಮಾಹಿತಿಗಳನ್ನು ಹುಡುಕಿ (ಚರ್ಚೆಯನ್ನೂ ಸೇರಿಸಿ)",
        "searchprofile-advanced-tooltip": "ಬಳಕೆಯ ನಾಮವರ್ಗಗಳಲ್ಲಿ ಹುಡುಕಿ",
        "search-result-size": "$1 ({{PLURAL:$2|೧ ಪದ|$2 ಪದಗಳು}})",
-       "search-redirect": "(ಪುನರ್ನಿರ್ದೇಶನ $1)",
+       "search-redirect": "($1 ಇಂದ ಪುನರ್ನಿರ್ದೇಶಿತ)",
        "search-section": "(ವಿಭಾಗ $1)",
        "search-suggest": "ನೀವು ಇದನ್ನು ಹುಡುಕುತ್ತಿರುವಿರೆ: $1",
        "search-interwiki-caption": "ಬಳಗದ ಇತರ ಯೋಜನೆಗಳು",
        "recentchanges-label-unpatrolled": "ಈ ಸಂಪಾದನೆಯನ್ನು ಇನ್ನೂ ಪರೀಕ್ಷೆಗೆ ಒಳಪಡಿಸಿಲ್ಲ",
        "recentchanges-label-plusminus": "ಪುಟದ ಗಾತ್ರವು ಇಷ್ಟು ಸಂಖ್ಯೆಯ ಬೈಟ್‍ಗಳಿಂದ ಬದಲಾಯಿಸಲ್ಪಟ್ಟಿದೆ",
        "recentchanges-legend-heading": "<strong>ಪರಿವಿಡಿ:</strong>",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} ([[Special:NewPages|ಹೊಸ ಪುಟಗಳ ಪಟ್ಟಿ]]ಯನ್ನೂ ನೋಡಿ)",
        "rcnotefrom": "'''$2''' ಇಂದ ಆಗಿರುವ ಬದಲಾವಣೆಗಳು ಕೆಳಗಿವೆ (ಕೊನೆಯ '''$1'''ರವರೆಗೆ ತೋರಿಸಲಾಗಿದೆ).",
        "rclistfrom": "$3 $2 ಇಂದ ಪ್ರಾರಂಭಿಸಿ ಮಾಡಲಾದ ಬದಲಾವಣೆಗಳನ್ನು ನೋಡಿ",
        "rcshowhideminor": "ಚಿಕ್ಕಪುಟ್ಟ ಬದಲಾವಣೆಗಳನ್ನು $1",
        "deletereason-dropdown": "*ಸಾಮಾನ್ಯ ಅಳಿಸುವಿಕೆಯ ಕಾರಣಗಳು\n** ಸಂಪಾದಕರ ಕೋರಿಕೆ\n** ಕೃತಿಸ್ವಾಮ್ಯತೆಯ ಉಲ್ಲಂಘನೆ\n** Vandalism",
        "delete-edit-reasonlist": "ಅಳಿಸುವಿಕೆ ಕಾರಣಗಳನ್ನು ಸಂಪಾದಿಸು",
        "rollbacklink": "ತೊಡೆದುಹಾಕು",
+       "rollbacklinkcount": "$1 {{PLURAL:$1|ಸಂಪಾದನೆಯನ್ನು|ಸಂಪಾದನೆಗಳನ್ನು}} ತೊಡೆದುಹಾಕು",
        "changecontentmodel": "ಪುಟದ ವಿಷಯ ಮಾದರಿಯನ್ನು ಬದಲಾಯಿಸಿ",
        "changecontentmodel-legend": "ವಿಷಯ ಮಾದರಿಯನ್ನು ಬದಲಾಯಿಸಿ",
        "changecontentmodel-title-label": "ಪುಟ ಶೀರ್ಷಿಕೆ",
        "contributions": "{{GENDER:$1|User}} ಕಾಣಿಕೆಗಳು",
        "contributions-title": "$1 ಸದಸ್ಯರ ಕಾಣಿಕೆಗಳು",
        "mycontris": "ಕಾಣಿಕೆಗಳು",
+       "anoncontribs": "ಕಾಣಿಕೆಗಳು",
        "contribsub2": "$1 ($2) ಗೆ",
        "uctop": "(ಪ್ರಸಕ್ತ)",
        "month": "ಈ ತಿಂಗಳಿಂದ (ಮತ್ತು ಮುಂಚಿನ):",
        "whatlinkshere-next": "{{PLURAL:$1|ಮುಂದಿನ|ಮುಂದಿನ $1}}",
        "whatlinkshere-links": "← ಕೊಂಡಿಗಳು",
        "whatlinkshere-hideredirs": "$1 ಪುನರ್ನಿರ್ದೇಶನಗಳು",
-       "whatlinkshere-hidetrans": "$1 à²¸à³\87ರಿಸà³\81ವಿà²\95ೆಗಳು",
+       "whatlinkshere-hidetrans": "$1 à²¸à³\87ರà³\8dಪಡೆಗಳು",
        "whatlinkshere-hidelinks": "$1 ಕೊಂಡಿಗಳು",
        "whatlinkshere-hideimages": "$1 ಚಿತ್ರದ ಕೊಂಡಿಗಳು",
        "whatlinkshere-filters": "ಶೋಧಕಗಳು",
        "tooltip-pt-anonuserpage": "ನೀವು ಸಂಪಾದನೆ ಮಾಡುತ್ತಿರುವ ipಯ ಬಳಕೆದಾರ ಪುಟ",
        "tooltip-pt-mytalk": "ನಿಮ್ಮ ಚರ್ಚೆ ಪುಟ",
        "tooltip-pt-anontalk": "ಈ ip ವಿಳಾಸದಿಂದ ಮಾಡಲಾದ ಸಂಪಾದನೆಗಳ ಬಗ್ಗೆ ಚರ್ಚೆ",
-       "tooltip-pt-preferences": "ನನà³\8dನ ಆಯ್ಕೆಗಳು",
+       "tooltip-pt-preferences": "ನಿಮà³\8dಮ ಆಯ್ಕೆಗಳು",
        "tooltip-pt-watchlist": "ನೀವು ಬದಲಾವಣೆಗಳ ಮೇಲೆ ನಿಗಾ ವಹಿಸುತ್ತಿರುವ ಪುಟಗಳ ಪಟ್ಟಿ",
        "tooltip-pt-mycontris": "ನಿಮ್ಮ ಕಾಣಿಕೆಗಳ ಪಟ್ಟಿ",
        "tooltip-pt-login": "ನೀವು ಲಾಗ್ ಇನ್ ಆಗಬೇಕೆಂದು ಕೋರುತ್ತೇವೆ, ಆದರೆ ಅದು ಖಡ್ಡಾಯ ಎನೂ ಅಲ್ಲ.",
        "tooltip-t-recentchangeslinked": "ಈ ಪುಟದಿಂದ ಸಂಪರ್ಕ ಹೊಂದಿರುವ ಪುಟಗಳಲ್ಲಿನ ಇತ್ತೀಚಿನ ಬದಲಾವಣೆಗಳು",
        "tooltip-feed-rss": "ಈ ಪುಟಕ್ಕೆ RSS ಫೀಡು",
        "tooltip-feed-atom": "ಈ ಪುಟಕ್ಕೆ Atom ಫೀಡು",
-       "tooltip-t-contributions": "ಈ ಸದಸ್ಯರ ಕಾಣಿಕೆಗಳ ಪಟ್ಟಿಯನ್ನು ತೋರಿಸು",
+       "tooltip-t-contributions": "{{GENDER:$1|ಈ ಸದಸ್ಯರ}} ಕಾಣಿಕೆಗಳ ಪಟ್ಟಿ",
        "tooltip-t-emailuser": "ಈ ಸದಸ್ಯರಿಗೆ ಇ-ಅಂಚೆಯನ್ನು ಕಳುಹಿಸು",
        "tooltip-t-upload": "ಫೈಲನ್ನು ಮೇಲಕ್ಕೆರಿಸಿ",
        "tooltip-t-specialpages": "ಎಲ್ಲಾ ವಿಶೇಷ ಪುಟಗಳ ಪಟ್ಟಿ",
        "exif-bitspersample": "ಪ್ರತಿ ಭಾಗಕ್ಕಿರುವ ಬಿಟ್‍ಗಳು",
        "exif-compression": "ಕುಗ್ಗಿಸಲು ಉಪಯೋಗಿಸಿರುವ ಪ್ರಕಾರ",
        "exif-photometricinterpretation": "ಚಿತ್ರಬಿಂದು ರಚನೆ",
+       "exif-orientation": "ದೃಷ್ಟಿಕೋನ",
        "exif-ycbcrpositioning": "Y ಮತ್ತು C ಸ್ಥಾನ",
        "exif-datetime": "ಫೈಲು ಬದಲಾದ ದಿನಾಂಕ ಮತ್ತು ಕಾಲ",
        "exif-imagedescription": "ಚಿತ್ರದ ಶೀರ್ಷಿಕೆ",
        "exif-artist": "ಕರ್ತೃ",
        "exif-copyright": "ಕೃತಿಸ್ವಾಮ್ಯತೆಯನ್ನು ಹೊಂದಿರುವವರು",
        "exif-exifversion": "Exif ಆವೃತ್ತಿ",
+       "exif-colorspace": "ರಂಗ ವಿಸ್ತಾರ",
        "exif-pixelxdimension": "ಭಾವಚಿತ್ರದ ಅಗಲ",
        "exif-pixelydimension": "ಭಾವಚಿತ್ರದ ಎತ್ತರ",
        "exif-usercomment": "ಬಳಕೆದಾರನ ಟಿಪ್ಪಣಿ",
        "revdelete-summary": "ಸಂಪಾದನೆಯ ತಾತ್ಪರ್ಯ",
        "feedback-message": "ಸಂದೇಶ:",
        "feedback-subject": "ವಿಷಯ:",
-       "searchsuggest-search": "ಹುಡುಕು",
+       "searchsuggest-search": "{{SITENAME}} ಅನ್ನು ಹುಡುಕಿ",
        "duration-seconds": "$1 {{PLURAL:$1|ಕ್ಷಣ|ಕ್ಷಣಗಳು}}",
        "duration-minutes": "$1 {{PLURAL:$1|ನಿಮಿಷ|ನಿಮಿಷಗಳು}}",
        "duration-hours": "$1 {{PLURAL:$1|ಘಂಟೆ|ಘಂಟೆಗಳು}}",
index 74d60e9..bc06966 100644 (file)
@@ -90,7 +90,7 @@
        "tog-enotifminoredits": "문서나 파일의 사소한 편집도 이메일로 알림",
        "tog-enotifrevealaddr": "알림 메일에 내 이메일 주소를 밝히기",
        "tog-shownumberswatching": "주시하는 사용자 수 보이기",
-       "tog-oldsig": "현재 서명:",
+       "tog-oldsig": "당신의 기존 서명:",
        "tog-fancysig": "서명을 위키텍스트로 취급 (자동으로 링크를 걸지 않음)",
        "tog-uselivepreview": "실시간 미리 보기 사용하기",
        "tog-forceeditsummary": "편집 요약을 쓰지 않았을 때 내게 물어보기",
        "tog-showhiddencats": "숨은 분류 보이기",
        "tog-norollbackdiff": "되돌리기 후 차이를 보지 않기",
        "tog-useeditwarning": "바꾼 내용을 저장하지 않고 편집 페이지를 벗어날 때 내게 경고하기",
-       "tog-prefershttps": "ë¡\9cê·¸ì\9d¸í\95  ë\95\8c 항상 보안 연결 사용",
+       "tog-prefershttps": "ë¡\9cê·¸ì\9d¸í\95\98ë\8a\94 ë\8f\99ì\95\88 항상 보안 연결 사용",
        "underline-always": "항상",
        "underline-never": "항상 치지 않기",
        "underline-default": "스킨 또는 브라우저 기본값",
        "newwindow": "(새 창에서 열림)",
        "cancel": "취소",
        "moredotdotdot": "더 보기...",
-       "morenotlisted": "ì\9d´ ëª©ë¡\9dì\9d\80 ì\99\84ì\84±ë\90\98ì§\80 ì\95\8aì\95\98습니다.",
+       "morenotlisted": "ì\9d´ ëª©ë¡\9dì\9d\80 ì\99\84ì \84í\95\98ì§\80 ì\95\8aì\9d\84 ì\88\98 ì\9e\88습니다.",
        "mypage": "문서",
        "mytalk": "토론",
        "anontalk": "토론",
        "talk": "토론",
        "views": "보기",
        "toolbox": "도구",
+       "tool-link-userrights": "{{GENDER:$1|사용자}} 그룹 변경",
+       "tool-link-emailuser": "이 {{GENDER:$1|사용자}}에게 이메일 보내기",
        "userpage": "사용자 문서 보기",
        "projectpage": "프로젝트 문서 보기",
        "imagepage": "파일 문서 보기",
        "poolcounter-usage-error": "사용법 오류: $1",
        "aboutsite": "{{SITENAME}} 소개",
        "aboutpage": "Project:소개",
-       "copyright": "ë\82´ì\9a©ì\9d\80 ë³\84ë\8f\84ë¡\9c ëª\85ì\8b\9cí\95\98ì§\80 ì\95\8aì\9d\84 ê²½ì\9a° $1에 따라 사용할 수 있습니다.",
+       "copyright": "ë³\84ë\8f\84ë¡\9c ëª\85ì\8b\9cí\95\98ì§\80 ì\95\8aì\9d\80 ê²½ì\9a°, ë\82´ì\9a©ì\9d\80 $1에 따라 사용할 수 있습니다.",
        "copyrightpage": "{{ns:project}}:저작권",
        "currentevents": "요즘 화제",
        "currentevents-url": "Project:요즘 화제",
        "botpasswords-label-resetpassword": "비밀번호 재설정",
        "botpasswords-label-grants": "적용할 수 있는 부여:",
        "botpasswords-help-grants": "각각 부여된 값은 목록에서 사용자 계정을 이미 갖고 있는 사용자 권한에 접근할 수 있는 권한을 줍니다. 자세한 정보는 [[Special:ListGrants|부여 표]]을 보세요.",
-       "botpasswords-label-restrictions": "사용 제한:",
        "botpasswords-label-grants-column": "승인됨",
        "botpasswords-bad-appid": "\"$1\"이라는 봇 이름은 유효하지 않습니다.",
        "botpasswords-insert-failed": "\"$1\" 봇 이름을 추가하는데 실패했습니다. 이미 등록되지 않았는지 확인하기 바랍니다.",
        "invalid-content-data": "잘못된 내용 데이터입니다",
        "content-not-allowed-here": "\"$1\" 내용은 [[$2]] 문서예 허용하지 않습니다",
        "editwarning-warning": "이 페이지에서 벗어나면 저장하지 않은 바뀜이 모두 사라집니다.\n로그인을 했다면, 환경 설정의 \"{{int:prefs-editing}}\"에서 이 경고를 띄우지 않도록 설정할 수 있습니다.",
+       "editpage-invalidcontentmodel-title": "지원하지 않는 콘텐츠 모델",
+       "editpage-invalidcontentmodel-text": "\"$1\" 콘텐츠 모델은 지원되지 않습니다.",
        "editpage-notsupportedcontentformat-title": "지원하지 않는 내용 형식",
        "editpage-notsupportedcontentformat-text": "내용 형식 $1은(는) $2 내용 모델에서 지원하지 않습니다.",
        "content-model-wikitext": "위키텍스트",
        "prefs-personal": "사용자 정보",
        "prefs-rc": "최근 바뀜",
        "prefs-watchlist": "주시문서 목록",
-       "prefs-editwatchlist": "주시목록 편집",
+       "prefs-editwatchlist": "주ì\8b\9c문ì\84\9c ëª©ë¡\9d í\8e¸ì§\91",
        "prefs-editwatchlist-label": "주시문서 목록의 항목을 편집합니다:",
        "prefs-editwatchlist-edit": "주시문서의 제목을 보고 지우기",
        "prefs-editwatchlist-raw": "주시문서 목록 직접 편집하기",
        "file-thumbnail-no": "파일 이름이 <strong>$1</strong>으로 시작합니다.\n이 파일은 그림의 크기를 줄인 (섬네일) 파일인 것 같습니다.\n더 해상도가 좋은 파일이 있다면 그 파일을 올리거나 아니면 올리려는 파일 이름을 바꾸세요.",
        "fileexists-forbidden": "같은 이름의 파일이 이미 있고, 덮어쓸 수 없습니다.\n그래도 파일을 올리시려면, 뒤로 돌아가서 다른 이름으로 시도해 주시기 바랍니다.\n[[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "같은 이름의 파일이 이미 위키미디어 공용에 있습니다.\n그래도 파일을 올리려면 뒤로 돌아가서 다른 이름으로 시도해 주시기 바랍니다.\n[[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "업로드한 항목은 <strong>[[:$1]]</strong>의 현재 판과 완전히 중복입니다.",
+       "fileexists-duplicate-version": "업로드한 항목은 <strong>[[:$1]]</strong>의 {{PLURAL:$2|과거의 판}}과 완전히 중복입니다.",
        "file-exists-duplicate": "현재 올리고 있는 {{PLURAL:$1|파일}}이 아래 파일과 중복됩니다:",
        "file-deleted-duplicate": "이 파일과 같은 파일 ([[:$1]])이 이전에 삭제된 적이 있습니다. 파일을 다시 올리기 전에 문서의 삭제 기록을 확인해 주시기 바랍니다.",
        "file-deleted-duplicate-notitle": "이 파일과 같은 파일이 이전에 삭제된 적이 있으며, 제목은 숨겨져 있습니다.\n다시 올리기 전에 상확은 검토하기 위해 숨겨진 파일 데이터를 볼 수 있는 누군가에게 물어봐야 합니다.",
        "upload-dialog-disabled": "이 대화창을 이용한 파일 올리기는 이 위키에서 비활성화되어 있습니다.",
        "upload-dialog-title": "파일 올리기",
        "upload-dialog-button-cancel": "취소",
+       "upload-dialog-button-back": "뒤로",
        "upload-dialog-button-done": "완료",
        "upload-dialog-button-save": "저장",
        "upload-dialog-button-upload": "올리기",
        "apisandbox-results-fixtoken-fail": "\"$1\" 토크을 가져오는데 실패했습니다.",
        "apisandbox-alert-page": "이 문서에 있는 필드가 유효하지 않습니다.",
        "apisandbox-alert-field": "이 필드의 값이 유효하지 않습니다.",
+       "apisandbox-continue": "계속",
+       "apisandbox-continue-clear": "지우기",
        "booksources": "책 찾기",
        "booksources-search-legend": "책 원본 검색",
        "booksources-isbn": "ISBN:",
        "movelogpagetext": "아래는 이동된 모든 문서의 목록입니다.",
        "movesubpage": "{{PLURAL:$1|하위 문서}}",
        "movesubpagetext": "이 문서에는 다음 {{PLURAL:$1|하위 문서}} $1개가 있습니다.",
+       "movesubpagetalktext": "관련 토론 문서에 속한 $1개의 {{PLURAL:$1|하위 문서}}는 아래와 같습니다.",
        "movenosubpage": "이 문서에는 하위 문서가 존재하지 않습니다.",
        "movereason": "이유:",
        "revertmove": "되돌리기",
        "pageinfo-category-pages": "문서 수",
        "pageinfo-category-subcats": "하위 분류 수",
        "pageinfo-category-files": "파일 수",
+       "pageinfo-user-id": "사용자 ID",
        "markaspatrolleddiff": "점검한 문서로 표시",
        "markaspatrolledtext": "이 문서를 점검한 것으로 표시",
        "markaspatrolledtext-file": "이 파일 버전을 점검한 것으로 표시",
        "tag-filter": "[[Special:Tags|태그]] 필터:",
        "tag-filter-submit": "필터",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|태그}}]]: $2)",
+       "tag-mw-contentmodelchange": "콘텐츠 모델 변경",
        "tags-title": "태그",
        "tags-intro": "이 문서는 소프트웨어에서 편집에 대해 표시하는 태그와 그 의미를 설명하는 목록입니다.",
        "tags-tag": "태그 이름",
        "tags-actions-header": "동작",
        "tags-active-yes": "예",
        "tags-active-no": "아니오",
-       "tags-source-extension": "확장 기능에 의해 정의됨",
+       "tags-source-extension": "소프트웨어에 의해 정의됨",
        "tags-source-manual": "사용자나 봇에 의해 수동으로 적용됨",
        "tags-source-none": "더 이상 사용하지 않음",
        "tags-edit": "편집",
        "dberr-again": "잠시 기다리고 나서 다시 불러오세요.",
        "dberr-info": "(데이터베이스 서버에 연결할 수 없습니다: $1)",
        "dberr-info-hidden": "(데이터베이스 서버에 연결할 수 없습니다)",
-       "dberr-usegoogle": "그 동안 Google을 통해 검색할 수도 있습니다.",
+       "dberr-usegoogle": "그동안 Google을 통해 검색할 수도 있습니다.",
        "dberr-outofdate": "수집된 내용은 오래된 것일 수도 있음을 참고하세요.",
        "dberr-cachederror": "다음은 요청한 문서의 캐시된 복사본이며, 최신이 아닐 수도 있습니다.",
        "htmlform-invalid-input": "입력한 값에 문제가 있습니다.",
        "htmlform-cloner-create": "더 추가",
        "htmlform-cloner-delete": "제거",
        "htmlform-cloner-required": "적어도 하나의 값이 필요합니다.",
+       "htmlform-date-placeholder": "YYYY-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "YYYY-MM-DD HH:MM:SS",
        "htmlform-title-badnamespace": "[[:$1]] 문서는 \"{{ns:$2}}\" 이름공간에 없습니다.",
        "htmlform-title-not-creatable": "\"$1\"은 만들 수 없는 문서 제목입니다.",
        "htmlform-title-not-exists": "$1 문서는 존재하지 않습니다.",
        "htmlform-user-not-exists": "<strong>$1</strong> 문서는 존재하지 않습니다.",
        "htmlform-user-not-valid": "<strong>$1</strong>은 올바른 사용자 이름이 아닙니다.",
-       "sqlite-has-fts": "$1 (본문 전체 검색 지원)",
-       "sqlite-no-fts": "$1 (본문 전체 검색 지원 제외)",
        "logentry-delete-delete": "$1님이 $3 문서를 {{GENDER:$2|삭제했습니다}}",
        "logentry-delete-restore": "$1님이 $3 문서를 {{GENDER:$2|되살렸습니다}}",
        "logentry-delete-event": "$1님이 $3의 {{PLURAL:$1|기록 $5개}}에 대해 보이기 설정을 {{GENDER:$2|바꾸었습니다}}: $4",
        "feedback-external-bug-report-button": "기술적 보고 제기",
        "feedback-dialog-title": "피드백 제출",
        "feedback-dialog-intro": "당신의 피드백을 제출하기 위해 아래 쉬운 양식을 사용할 수 있습니다. 당신의 의견은 당신의 사용자 이름과 함께, \"$1\" 문서에 추가됩니다.",
-       "feedback-error-title": "오류",
        "feedback-error1": "오류: API 실행 결과를 인식할 수 없음",
        "feedback-error2": "오류: 편집 실패",
        "feedback-error3": "오류: API가 응답하지 않음",
        "feedback-thanks": "감사합니다! \"[$2 $1]\" 문서에 의견을 남겼습니다.",
        "feedback-thanks-title": "감사합니다!",
        "feedback-useragent": "사용자 에이전트:",
-       "searchsuggest-search": "검색",
+       "searchsuggest-search": "{{SITENAME}} 검색",
        "searchsuggest-containing": "다음 문자열 포함...",
        "api-error-autoblocked": "사용자의 IP 주소는 차단된 사용자에 의해 사용되었으므로 자동으로 차단된 상태입니다.",
        "api-error-badaccess-groups": "이 위키에 파일을 올릴 권한이 없습니다.",
        "unlinkaccounts-success": "계정의 연결이 해제되었습니다.",
        "authenticationdatachange-ignored": "인증 데이터 변경을 처리하지 못했습니다. 제공자를 설정하지 않으셨습니까?",
        "userjsispublic": "주목해 주십시오: 자바스크립트의 하위 문서들은 다른 사용자들이 볼 수 있기 때문에 기밀 데이터를 포함해서는 안 됩니다.",
-       "usercssispublic": "주목해 주십시오: CSS의 하위 문서들은 다른 사용자들이 볼 수 있기 때문에 기밀 데이터를 포함해서는 안 됩니다."
+       "usercssispublic": "주목해 주십시오: CSS의 하위 문서들은 다른 사용자들이 볼 수 있기 때문에 기밀 데이터를 포함해서는 안 됩니다.",
+       "restrictionsfield-badip": "유효하지 않은 IP 주소나 대역: $1",
+       "restrictionsfield-label": "허용된 IP 대역:",
+       "restrictionsfield-help": "줄 단위의 하나의 IP 주소 또는 CIDR 대역입니다. 모든 곳에 적용하려면, 다음을 사용하세요<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "오류: $1",
+       "edit-error-long": "오류:\n\n$1"
 }
index ebee06b..073f2a3 100644 (file)
@@ -18,7 +18,8 @@
                        "Uygar",
                        "MikaelF",
                        "Macofe",
-                       "Matma Rex"
+                       "Matma Rex",
+                       "Stryn"
                ]
        },
        "tog-underline": "Xetekê di bin girêdanê de çêke:",
        "yourpasswordagain": "Şîfreyê dîsa binivîse:",
        "createacct-yourpasswordagain": "Şîfreyê bipejirîne",
        "createacct-yourpasswordagain-ph": "Şîfreyê ji nû ve binivîse",
-       "remembermypassword": "Şifreya min di her têketina min de bîne bîra xwe (herî zêde $1 {{PLURAL:$1|rojekê|rojan}})",
        "userlogin-remembermypassword": "Min têketî bihêle",
        "userlogin-signwithsecure": "Girêdana parastî bikarbîne",
        "yourdomainname": "Domainê te",
        "preview": "Pêşdîtin",
        "showpreview": "Pêşdîtinê nîşan bide",
        "showdiff": "Guherandinan nîşan bide",
-       "anoneditwarning": "<strong>Hişyarî:<strong> Tu netêketî yî! Navnîşana IP'ya te wê di dîroka guherandina vê rûpelê de bê tomarkirin. Heke tu <strong>[$1 têkevî]</strong> an jî  <strong>[$2 hesabekî çêbikî]</strong>, li gel sûdên te yên din guhertinên ku tu bikî jî wê ji nasnavê te re bê atfkirin.",
+       "anoneditwarning": "<strong>Hişyarî:</strong> Tu netêketî yî! Navnîşana IP'ya te wê di dîroka guherandina vê rûpelê de bê tomarkirin. Heke tu <strong>[$1 têkevî]</strong> an jî <strong>[$2 hesabekî çêbikî]</strong>, li gel sûdên te yên din guhertinên ku tu bikî jî wê ji nasnavê te re bê atfkirin.",
        "anonpreviewwarning": "''Tu ne têketî yî. Tomarkirin wê navnîşana IP'ya te di dîroka guhertinan de nîşan bide.''",
        "missingsummary": "<span style=\"color:#990000;\">'''Zanibe:'''</span> Te nivîsekî kurt ji bo guherandinê ra nenivîsand. Eger tu niha carekî din li Tomar xê, guherandinê te vê nivîsekî kurt yê were tomarkirin.",
        "missingcommenttext": "Ji kerema xwe kurteya naverokê li jêr binivisîne.",
        "undo-success": "Ev guherandin dikare were şûndekirin. Ji kerema xwe ferqa piştî tomarkirinê bibîne, bê ka tu dixwazî vê guhertoyê tomar bikî an na. Ger te şaşîtiyek kir, ji kerema xwe derkeve.",
        "undo-failure": "Ev guhertin ji ber guherandinên piştî wê re nikare were şûndekirin.",
        "undo-summary": "Guhertoya $1 ya [[Special:Contributions/$2|$2]] ([[User talk:$2|gotûbêj]]) şûnde kir",
-       "cantcreateaccounttitle": "Hesab nikarîbû were çêkirin",
        "cantcreateaccount-text": "Çêkirinê hesaban ji vê IP'yê ('''$1''') hatiye qedexekirin ji [[User:$3|$3]].\n\nSedema qedexekirina $3 ev e: ''$2''",
        "viewpagelogs": "Guhertinên vê rûpelê bibîne",
        "nohistory": "Dîroka guherandina vê rûpelê nîne.",
        "feedback-back": "Paşve",
        "feedback-cancel": "Betal bike",
        "feedback-close": "Çêbû",
-       "feedback-error-title": "Çewtî",
        "feedback-message": "Peyam:",
        "feedback-subject": "Mijar:",
        "feedback-submit": "Tomar bike",
index 5c34a58..ee793ef 100644 (file)
        "tooltip-ca-move": "Movere hanc paginam",
        "tooltip-ca-watch": "Hanc paginam observandam habere",
        "tooltip-ca-unwatch": "Hanc paginam non iam observandam habere",
-       "tooltip-search": "Aliquid in {{grammar:ablative|{{SITENAME}}}} quaerere",
+       "tooltip-search": "Quaerere apud {{grammar:accusative|{{SITENAME}}}}",
        "tooltip-search-go": "Si modo sit, paginam huius ipsius tituli invisere",
        "tooltip-search-fulltext": "Hunc textum in paginis requirere",
        "tooltip-p-logo": "Ire ad paginam primam",
        "feedback-close": "Factum",
        "feedback-error2": "Error: Recensio non additur",
        "feedback-message": "Nuntius:",
-       "searchsuggest-search": "Quaerere",
+       "searchsuggest-search": "Quaerere apud {{grammar:accusative|{{SITENAME}}}}",
        "searchsuggest-containing": "continens...",
        "api-error-empty-file": "Fasciculus inmissus vacuus est.",
        "api-error-emptypage": "Vacuas novas paginas creare non licet.",
index abd9871..57262ad 100644 (file)
@@ -45,7 +45,7 @@
        "tog-enotifminoredits": "Schéckt mir och bei klengen Ännerungen op vu mir iwwerwaachte Säiten oder Fichieren eng E-Mail.",
        "tog-enotifrevealaddr": "Meng E-Mail-Adress an de Benoriichtegungsmaile weisen.",
        "tog-shownumberswatching": "D'Zuel vun de Benotzer déi dës Säit iwwerwaache weisen",
-       "tog-oldsig": "Aktuell Ënnerschrëft:",
+       "tog-oldsig": "Är Aktuell Ënnerschrëft:",
        "tog-fancysig": "Ënnerschrëft als Wiki-Text behandelen (Ouni automatesche Link)",
        "tog-uselivepreview": "Live-Preview benotzen",
        "tog-forceeditsummary": "Warnen, wa beim Späicheren de Resumé feelt",
@@ -62,7 +62,7 @@
        "tog-showhiddencats": "Verstoppt Kategorië weisen",
        "tog-norollbackdiff": "Ënnerscheed nom Zrécksetzen net weisen",
        "tog-useeditwarning": "Mech warne wann ech d'Ännerung vun enger Säit verloossen, ouni Ännerunge gespäichert ze hunn",
-       "tog-prefershttps": "Ëmmer eng sécher Verbindung benotze wann ageloggt",
+       "tog-prefershttps": "Benotzt ëmmer eng sécher Verbindung wann ageloggt",
        "underline-always": "Ëmmer",
        "underline-never": "Ni",
        "underline-default": "Skin oder Standard vum Browser",
        "newwindow": "(geet an enger neier Fënster op)",
        "cancel": "Zréck",
        "moredotdotdot": "Méi …",
-       "morenotlisted": "Dës Lëscht ass net komplett.",
+       "morenotlisted": "Dës Lëscht ass eventuell net komplett.",
        "mypage": "Säit",
        "mytalk": "Diskussioun",
        "anontalk": "Diskussioun",
        "talk": "Diskussioun",
        "views": "Affichagen",
        "toolbox": "Geschirkëscht",
+       "tool-link-userrights": "{{GENDER:$1|Benotzer}}gruppen änneren",
+       "tool-link-emailuser": "{{GENDER:$1|Dëser Benotzerin|Dësem Benotzer}} eng Mail schécken",
        "userpage": "Benotzersäit",
        "projectpage": "Meta-Text",
        "imagepage": "Billersäit kucken",
        "eauthentsent": "Eng Confirmatiouns-E-Mail gouf un déi Adress geschéckt déi Dir uginn hutt.\n\nIer iergendeng E-Mail vun anere Benotzer op dee Kont geschéckt ka ginn, musst Dir als éischt d'Instructiounen an der Confirmatiouns-E-Mail befollegen, fir ze bestätegen datt de Kont wierklech Ären eegenen ass.",
        "throttled-mailpassword": "An {{PLURAL:$1|der leschter Stonn|de leschte(n) $1 Stonnen}} eng E-Mail verschéckt fir d'Passwuert zréckzesetzen.\nFir de Mëssbrauch vun dëser Funktioun ze verhënneren kann nëmmen all {{PLURAL:$1|Stonn|$1 Stonnen}} sou eng Mail verschéckt ginn.",
        "mailerror": "Feeler beim Schécke vun der E-Mail: $1",
-       "acct_creation_throttle_hit": "Visiteure vun dëser Wiki déi Är IP-Adress hu {{PLURAL:$1|schonn $1 Benotzerkont|scho(nn) $1 Benotzerkonten}} an de leschten Deeg opgemaach, dëst ass déi maximal Zuel déi an dësem Zäitraum erlaabt ass.\nDofir kënne Visiteure déi dës IP-Adress benotzen den Ament keng Benotzerkonten opmaachen.",
+       "acct_creation_throttle_hit": "Visiteure vun dëser Wiki déi Är IP-Adress hu {{PLURAL:$1|schonn $1 Benotzerkont|scho(nn) $1 Benotzerkonten}} an de leschten $2 Deeg opgemaach, dëst ass déi maximal Zuel déi an dësem Zäitraum erlaabt ass.\nDofir kënne Visiteure déi dës IP-Adress benotzen den Ament keng Benotzerkonten opmaachen.",
        "emailauthenticated": "Är E-Mail-Adress gouf den $2 ëm $3 Auer bestätegt.",
        "emailnotauthenticated": "Är E-Mail Adress gouf nach net confirméiert.\nDowéinst gëtt fir keng vun dëse Funktiounen E-Maile geschéckt.",
        "noemailprefs": "Gitt eng E-Mailadress bei Ären Astellungen un, fir datt déi Funktioune funktionéieren.",
        "botpasswords-label-cancel": "Ofbriechen",
        "botpasswords-label-delete": "Läschen",
        "botpasswords-label-resetpassword": "D'Passwuert zrécksetzen",
+       "botpasswords-label-grants": "Applikabel Rechter:",
        "botpasswords-help-grants": "All Berechtegung gëtt Zougang op déi Benotzerrechter déi e Benotzerkont schonn huet. Kuckt d'[[Special:ListGrants|Tabell vun de Berechtigunge]] fir méi Informatiounen.",
-       "botpasswords-label-restrictions": "Limite fir d'Benotzen:",
        "botpasswords-label-grants-column": "Accordéiert",
        "botpasswords-bad-appid": "Den Numm vum Bot \"$1\" ass net valabel.",
        "botpasswords-insert-failed": "De Botnumm \"$1\" konnt net dobäigesat ginn. Gouf e schonn derbäigesat?",
+       "botpasswords-update-failed": "Den Numm vum Bot \"$1\" konnt net aktualiséiert ginn. Gouf e geläscht?",
        "botpasswords-created-title": "Botpasswuert ugeluecht",
        "botpasswords-created-body": "D'Botpasswuert fir de Bot-Numm \"$1\" vum Benotzer ''$2'' gouf ugeluecht.",
        "botpasswords-updated-title": "Botpasswuert aktualiséiert",
        "botpasswords-updated-body": "D'Botpasswuert fir de Bot-Numm \"$1\" vum Benotzer ''$2'' gouf aktualiséiert.",
        "botpasswords-deleted-title": "Botpasswuert geläscht",
        "botpasswords-deleted-body": "D'Botpasswuert fir de Bot-Numm \"$1\" vum Benotzer ''$2'' gouf geläscht.",
-       "botpasswords-newpassword": "Dat neit Passwuert fir sech mat <strong>$1</strong> anzeloggen ass <strong>$2</strong>.\n<em>Versuergt dat fir sech spéider dorop ze referéieren.</em>",
+       "botpasswords-newpassword": "Dat neit Passwuert fir sech mat <strong>$1</strong> anzeloggen ass <strong>$2</strong>.\n<em>Versuergt dat fir sech spéider dorop ze referéieren.</em><br />(Fir al Botten déi verlaangen datt de Login-Numm d'selwecht ass wéi den spéidere Benotzernumm, kënnt Dir och <strong>$3</strong> als Benotzernumm benotzten a(n) <strong>$4</strong> als Passwuert.)",
+       "botpasswords-no-provider": "BotPasswordsSessionProvider ass net disponibel.",
        "botpasswords-not-exist": "De Benotzer \"$1\" huet kee Botpasswuert mam Numm \"$2\".",
        "resetpass_forbidden": "Passwierder kënnen net geännert ginn.",
        "resetpass_forbidden-reason": "Passwierder kënnen net geännert ginn: $1",
        "invalid-content-data": "Donnéeë vum Inhalt sinn net valabel",
        "content-not-allowed-here": "\"$1\"-Inhalt ass op der Säit [[$2]] net erlaabt",
        "editwarning-warning": "Wann Dir dës Säit verloosst kann dat dozou féieren datt Dir all Ännerungen, déi Dir gemaach hutt, verléiert.\nWann Dir ageloggt sidd, kënnt Dir dës Warnung an der Sektioun \"{{int:prefs-editing}}\" vun Ären Astellungen ausschalten.",
+       "editpage-invalidcontentmodel-title": "Modell vum Inhalt gëtt net ënnerstëtzt",
+       "editpage-invalidcontentmodel-text": "Den Inhaltsmodell \"$1\" gëtt net ënnerstëtzt.",
        "editpage-notsupportedcontentformat-title": "Format vum Inhalt gëtt net ënnerstëtzt",
        "editpage-notsupportedcontentformat-text": "De Format vum Inhalt $1 gëtt net vum Modell vum Inhalt $2 ënnerstëtzt.",
        "content-model-wikitext": "Wikitext",
        "content-model-css": "CSS",
        "content-json-empty-object": "Eidelen Objet",
        "content-json-empty-array": "Eidel Tabell",
+       "deprecated-self-close-category": "Säiten déi net valabel 'self-closed' HTML-Tags benotzen",
        "duplicate-args-warning": "<strong>Opgepasst:</strong> [[:$1]] rifft [[:$2]] mat méi wéi engem Wäert fir de Parameter \"$3\" op. Nëmmen de leschte Wäert gëtt benotzt.",
        "duplicate-args-category": "Säiten, déi duebel Argumenter a Schablounenopriff gebrauchen",
        "expensive-parserfunction-warning": "'''Opgepasst:'' Dës Säit huet ze vill Ufroe vu komplexe Parserfunktiounen.\n\nEt däerfen net méi wéi $2 {{PLURAL:$2|Ufro|Ufroe}} sinn, aktuell {{PLURAL:$2|ass et $1 Ufro|sinn et $1 Ufroe}}.",
        "searchprofile-advanced-tooltip": "Sich an den Nummraim déi an de perséinlichen Astellungen festgeluecht sinn",
        "search-result-size": "$1 ({{PLURAL:$2|1 Wuert|$2 Wierder}})",
        "search-result-category-size": "{{PLURAL:$1|1 Säit|$1 Säiten}} ({{PLURAL:$2|1 Ënnerkategorie|$2 Ënnerkategorien}}, {{PLURAL:$3|1 Fichier|$3 Fichieren}})",
-       "search-redirect": "(Viruleedung $1)",
+       "search-redirect": "(Viruleedung vu(n) $1)",
        "search-section": "(Abschnitt $1)",
        "search-category": "(Kategorie $1)",
        "search-file-match": "(Inhalt vum Fichier passt)",
        "showingresultsinrange": "Hei drënner {{PLURAL:$1|<strong>gëtt 1</strong> Resultat|gi(nn) <strong>$1</strong> Resultater}} aus dem Beräich #<strong>$2</strong> bis #<strong>$3</strong>.",
        "search-showingresults": "{{PLURAL:$4|Resultat <strong>$1</strong> of <strong>$3</strong>|Resultater <strong>$1 - $2</strong> vu(n) <strong>$3</strong>}}",
        "search-nonefound": "Fir Är Ufro gouf näischt fonnt.",
+       "search-nonefound-thiswiki": "Et gouf op dësem Site näischt fonnt wat Ärer Ufro entsprécht.",
        "powersearch-legend": "Erweidert Sich",
        "powersearch-ns": "Sichen an den Nummraim:",
        "powersearch-togglelabel": "Markéieren:",
        "action-viewmyprivateinfo": "Är privat Informatioune kucken",
        "action-editmyprivateinfo": "Är privat Informatiounen änneren",
        "action-editcontentmodel": "de Modell vum Inhalt vun enger Säit änneren",
+       "action-deletechangetags": "Markéierungen aus der Datebank läschen",
        "action-purge": "dës Säit eidelzemaachen",
        "nchanges": "$1 {{PLURAL:$1|Ännerung|Ännerungen}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|zanter dem leschte Passage}}",
        "file-thumbnail-no": "Den Numm vum Fichier fänkt mat <strong>$1</strong> un.\nDa deit drop hin datt et eng Minitaur ''(thumbnail)'' ass.\nWann Dir dat Bild a méi enger grousser Opléisung hutt, da luet dëst erop, wann net dann ännert w.e.g. den Numm vum Fichier.",
        "fileexists-forbidden": "Et gëtt schonn e Fichier mat dësem Numm an dee kann net iwwerschriwwe ginn.\nWann Dir de Fichier nach ëmmer eropluede wëllt, da gitt w.e.g. zréck a benotzt en neien Numm. [[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "E Fichier mat dësem Numm gëtt et schonn an dem gedeelte Repertoire.\nWann Dir dëse Fichier trotzdeem eropluede wëllt da gitt w.e.g. zréck a luet dëse Fichier ënner engem aneren Numm erop. [[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "Den eropgeluedene Fichier ass en exakten Duplikat vun der aktueller Versioun vu(n) <strong>[[:$1]]",
+       "fileexists-duplicate-version": "Den eropgeluedene Fichier ass en exakten Duplikat vun {{PLURAL:$2|enger eelerer Versioun|eelere Versioune}} vu(n) <strong>[[:$1]]</strong>.",
        "file-exists-duplicate": "Dëse Fichier schéngt een Doublon vun {{PLURAL:$1|dësem Fichier|dëse Fichieren}} ze sinn:",
        "file-deleted-duplicate": "En identesche Fichier ([[:$1]]) gouf virdru geläscht. Kuckt w.e.g. an der Lëscht vum Läschen no, ier Dir en nach emol eropluet.",
        "file-deleted-duplicate-notitle": "En identesche Fichier gouf scho geläscht an den Titel gouf suppriméiert. Dir sollt e froen dee suppriméiert Date vu Fichiere kucken däerf fir d'Situatioun ze klären ier Dir de Fichier nach eng Kéier eroplued.",
        "php-uploaddisabledtext": "D'Eropluede vu Fichieren ass am PHP desaktivéiert. Kuckt w.e.g. d'Astellung ''file_uploads'' no.",
        "uploadscripted": "An dësem Fichier ass HTML- oder Scriptcode, dee vun engem Webbrowser falsch interpretéiert kéint ginn.",
        "upload-scripted-pi-callback": "Et ass net méiglech XML-Fichieren eropzelueden an deenen XML-Stylesheet Instruktioune fir d'Verschaffen drastinn",
+       "uploaded-hostile-svg": "Net sécheren CSS am Stilelement vum eropgeluedene SVG-Fichier fonnt.",
        "uploadscriptednamespace": "An dësem SVG-Fichier ass en illegalen Nummraum \"$1\"",
        "uploadinvalidxml": "Den XML am eropgelueden Fichier konnt net verschafft ginn.",
        "uploadvirus": "An dësem Fichier ass ee Virus! Detailer: $1",
        "upload-options": "Optioune vum Eroplueden",
        "watchthisupload": "Dëse Fichier iwwerwaachen",
        "filewasdeleted": "E Fichier mat dësem Numm gouf schonn eemol eropgelueden an duerno nees geläscht. Kuckt w.e.g op $1 no, ier Dir dee Fichier nach eng Kéier eropluet.",
+       "filename-thumb-name": "Dësen Numm gesäit aus wéi den Numm vun engem Miniaturbild. Luet w.e.g. keng Miniatur-Biller zréck op déi selwecht Wiki. Sollt et sech ëm een anert Bild handelen da sicht w.e.g. e Fichiersnumm dee méi verständlech ass an den net sou ufänkt wéi e Miniaturbild.",
        "filename-bad-prefix": "Den Numm vum Fichier fänkt mat '''„$1“''' un. Dësen Numm krut en automatesch vun der Kamera a seet näischt iwwer dat aus, wat drop ass. Gitt dem Fichier w.e.g. en Numm, deen den Inhalt besser beschreift, an deen net verwiesselt ka ginn.",
        "upload-proto-error": "Falsche Protokoll",
        "upload-proto-error-text": "D'URL muss mat <code>http://</code> oder <code>ftp://</code> ufänken.",
        "upload-dialog-disabled": "D'Eropluede vu Fichieren mat dësem Dialog ass op dëser Wiki desaktivéiert.",
        "upload-dialog-title": "Fichier eroplueden",
        "upload-dialog-button-cancel": "Ofbriechen",
+       "upload-dialog-button-back": "Zréck",
        "upload-dialog-button-done": "Fäerdeg",
        "upload-dialog-button-save": "Späicheren",
        "upload-dialog-button-upload": "Eroplueden",
        "apisandbox-request-time": "Dauer vun der Ufro: {{PLURAL:$1|$1 ms}}",
        "apisandbox-alert-page": "Felder op dëser Säit sinn net valabel.",
        "apisandbox-alert-field": "De wäert vun dësem Feld ass net valabel.",
+       "apisandbox-continue": "Virufueren",
+       "apisandbox-continue-clear": "Eidel maachen",
        "booksources": "Bicherreferenzen",
        "booksources-search-legend": "No Bicherreferenze sichen",
        "booksources-search": "Sichen",
        "changecontentmodel-success-title": "De Modell vum Inhalt gouf geännert",
        "changecontentmodel-success-text": "Den Typ vum Inhalt vu(n) [[:$1]] gouf geännert.",
        "changecontentmodel-cannot-convert": "Den Inhalt vu(n) [[:$1]] kann net op den Typ $2 ëmgewandelt ginn.",
+       "changecontentmodel-nodirectediting": "Den Inhaltsmodell $1 ënnerstëtzt keng direkt Ännerungen",
        "changecontentmodel-emptymodels-title": "Keng Modeller fir Inhalter disponibel",
        "logentry-contentmodel-change-revertlink": "zrécksetzen",
        "logentry-contentmodel-change-revert": "zrécksetzen",
        "movelogpagetext": "Dëst ass eng Lëscht vun alle geréckelte Säiten.",
        "movesubpage": "{{PLURAL:$1|Ënnersäit|Ënnersäiten}}",
        "movesubpagetext": "Dës Säit huet $1 {{PLURAL:$1|Ënnersäit|Ënnersäiten}} déi hei ënnendrënner stinn.",
+       "movesubpagetalktext": "D'Diskussiounssäit déi dozou gehéiert huet $1 {{PLURAL:$1|Ënnersäit|Ënnersäiten}} déi hei ënnendrënner stinn.",
        "movenosubpage": "Dës Säit huet keng Ënnersäiten.",
        "movereason": "Grond:",
        "revertmove": "zréck réckelen",
        "pageinfo-category-pages": "Zuel vun de Säiten",
        "pageinfo-category-subcats": "Zuel vun den Ënnerkategorien",
        "pageinfo-category-files": "Zuel vun de Fichieren",
+       "pageinfo-user-id": "Benotzernummer",
        "markaspatrolleddiff": "Als nogekuckt markéieren",
        "markaspatrolledtext": "Dës Säit als nogekuckt markéieren",
        "markaspatrolledtext-file": "Dës Versioun vum Fichier als nogekuckt markéieren",
        "tags-delete-explanation-initial": "Dir sidd am Gaang d'Markéierung (tag) \"$1\" aus der Datebank ze läschen.",
        "tags-delete-explanation-warning": "Dës Aktioun ass <strong>irreversibel</strong> a <strong>kann net réckgängeg gemaach ginn</strong>, net emol vun den Administrateure vun der Datebank. Sidd Iech sécher datt et dës Markéierung ass déi Dir läsche wëllt.",
        "tags-delete-reason": "Grond:",
+       "tags-delete-submit": "Dës Markéierung definitiv läschen",
        "tags-delete-not-found": "D'Markéierung (tag) ''$1'' gëtt et net.",
        "tags-activate-title": "Markéierung (tag) aktivéieren",
        "tags-activate-question": "Dir sidd am Gaang d'Markéierung \"$1\" z'aktivéieren.",
        "htmlform-cloner-create": "Méi derbäisetzen",
        "htmlform-cloner-delete": "Ewechhuelen",
        "htmlform-cloner-required": "Mindestens ee Wäert ass obligatoresch.",
+       "htmlform-date-placeholder": "JJJJ-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "JJJJ-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "De Wäert deen Dir aginn hutt gouf net als Datum erkannt. Probéiert de Format JJJJ-MM-DD ze benotzen.",
+       "htmlform-time-invalid": "De Wäert deen Dir aginn hutt gouf net als Zäit erkannt. Probéiert de Format HH:MM:SS ze benotzen.",
+       "htmlform-datetime-invalid": "De Wäert deen Dir aginn hutt gouf net als Datum an Zäit erkannt. Probéiert de Format JJJJ-MM-DD HH:MM:SS ze benotzen.",
+       "htmlform-date-toolow": "De Wäert deen Dir aginn hutt ass virun deem éischten erlaabten Datum vum $1.",
+       "htmlform-date-toohigh": "De wäert deen Dir aginn hutt ass nom leschten erlaabten Datum vum $1.",
+       "htmlform-time-toolow": "De Wäert deen Dir aginn hutt ass virun der éischter erlaabter Zäit vu(n) $1.",
+       "htmlform-time-toohigh": "De Wäert deen Dir aginn hutt ass no der leschter erlaabter Zäit vu(n) $1.",
+       "htmlform-datetime-toohigh": "De Wäert deen Dir uginn hutt ass nom leschten erlaabten Datum an der Zäit vu(n) $1.",
        "htmlform-title-badnamespace": "[[:$1]] ass net am Nummraum \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" ass kee Säitentitel deen ugeluecht ka ginn",
        "htmlform-title-not-exists": "$1 gëtt et net.",
        "htmlform-user-not-exists": "<strong>$1</strong> gëtt et net.",
        "htmlform-user-not-valid": "<strong>$1</strong> ass kee valabele Benotzernumm.",
-       "sqlite-has-fts": "$1 ënnerstëtzt d'Volltextsich",
-       "sqlite-no-fts": "$1 ënnerstëtzt d'Volltextsich net",
        "logentry-delete-delete": "$1 {{GENDER:$2|huet}} d'Säit $3 geläscht",
        "logentry-delete-restore": "$1 {{GENDER:$2|huet}} d'Säit $3 restauréiert",
        "logentry-delete-event": "$1 huet d'Visibilitéit vun {{PLURAL:$5|engem Evenement|$5 Evenementer}} am Logbuch op $3:$4 {{GENDER:$2|geännert}}",
        "logentry-newusers-create2": "De Benotzerkont $3 gouf vum $1 {{GENDER:$2|ugeluecht}}",
        "logentry-newusers-byemail": "De Benotzerkont $3 gouf vum $1 {{GENDER:$2|ugeluecht}} an d'Passwuert gouf per E-Mail geschéckt.",
        "logentry-newusers-autocreate": "De Benotzerkont $1 gouf automatesch {{GENDER:$2|ugeluecht}}",
+       "logentry-protect-unprotect": "$1 huet d'Spär vu(n) $3 {{GENDER:$2|ewechgeholl}}",
        "logentry-protect-protect": "$1 {{GENDER:$2|huet}} d'Säit $3 $4 gespaart",
        "logentry-protect-protect-cascade": "$1 {{GENDER:$2|huet}} d'Säit $3 $4 gespaart [Kaskadespär]",
        "logentry-rights-rights": "$1 {{GENDER:$2|huet}} d'Gruppen zou deenen {{GENDER:$6|d'|de}} $3 gehéiert vu(n) $4 op $5 geännert",
        "feedback-close": "Fäerdeg",
        "feedback-external-bug-report-button": "Eng technesch Aufgab notifizéieren",
        "feedback-dialog-title": "Feedback schécken",
-       "feedback-error-title": "Feeler",
        "feedback-error1": "Feeler: Resultat vum API gouf net erkannt",
        "feedback-error2": "Feeler: D'Ännerung gouf net gespäichert",
        "feedback-error3": "Feeler: Keng Äntwert vum API",
        "feedback-thanks": "Merci! Äre Feedback gouf op der Säit \"[$2 $1]\" gespäichert.",
        "feedback-thanks-title": "Merci!",
        "feedback-useragent": "User Agent:",
-       "searchsuggest-search": "Sichen",
+       "searchsuggest-search": "Op {{SITENAME}} sichen",
        "searchsuggest-containing": "mat ...",
        "api-error-autoblocked": "Är IP-Adress gouf automatesch gespaart wëll se vun engem gespaarte Benotzer  benotzt gouf",
        "api-error-badaccess-groups": "Et ass Iech net erlaabt fir Fichieren op dës Wiki eropzelueden.",
        "api-error-nomodule": "Interne Feeler: de Modul fir d'Eroplueden ass net agestallt.",
        "api-error-ok-but-empty": "Interne Feeler: keng Äntwert vum Server.",
        "api-error-overwrite": "D'Iwwerschreiwe vun engem Fichier ass net erlaabt.",
+       "api-error-ratelimited": "Dir probéiert fir méi ££Fichieren a kuerzer Zäit eropzeluede wéi der op dëser Wiki erlaabt sinn. Probéiert w.e.g. an e puer Minutten nach eng Kéier.",
        "api-error-stashfailed": "Interne Feeler: de Server konnt den temporäre Fichier net späicheren.",
        "api-error-publishfailed": "Interne Feeler: de Server konnt den temporäre Fichier net publizéieren.",
        "api-error-stasherror": "Beim Eropluede vum Fichier ass e Feeler geschitt.",
        "log-action-filter-block-reblock": "Ännere vun enger Spär",
        "log-action-filter-block-unblock": "Spär ophiewen",
        "log-action-filter-delete-delete": "Säite läschen",
+       "log-action-filter-delete-restore": "Säiterestauratioun",
+       "log-action-filter-delete-event": "Logbuch-Läschung",
        "log-action-filter-delete-revision": "Läsche vun enger Versioun",
        "log-action-filter-import-interwiki": "Transwiki-Import",
        "log-action-filter-import-upload": "Import duerch Eropluede vun engem XML",
+       "log-action-filter-managetags-create": "Uleeë vun engem Tag",
+       "log-action-filter-managetags-delete": "Läsche vun engem Tag",
+       "log-action-filter-managetags-activate": "Aktivatioun vun engem Tag",
+       "log-action-filter-managetags-deactivate": "Desaktivatioun vun engem Tag",
+       "log-action-filter-move-move": "Réckelen ouni Iwwerschreiwe vu Viruleedungen",
        "log-action-filter-move-move_redir": "Réckele mat Iwwerschreiwe vu Viruleedungen",
        "log-action-filter-newusers-create": "Ugeluecht vun engem anonyme Benotzer",
        "log-action-filter-newusers-create2": "Ugeluecht vun engem registréierte Benotzer",
        "authmanager-create-from-login": "Fir Äre Benotzerkont unzeleeën fëllt w.e.g. d'Felder hei drënner aus.",
        "authmanager-authplugin-setpass-failed-title": "Änner vum Passwuert huet net funktionéiert",
        "authmanager-authplugin-setpass-bad-domain": "Net valabelen Domain.",
+       "authmanager-autocreate-noperm": "Automatescht Uleeë vu Benotzerkonten ass net erlaabt.",
+       "authmanager-autocreate-exception": "Automatescht Uleeë vu Benotzerkonte gouf op Grond vu fréiere Feeler temporär ausgeschalt.",
        "authmanager-userdoesnotexist": "De Benotzerkont \"$1\" ass net registréiert.",
+       "authmanager-userlogin-remembermypassword-help": "Ob d'Passwuert méi laang verhal gi soll wéi d'Dauer vun der Sessioun.",
+       "authmanager-username-help": "Benotzernumm fir d'Authentifikatioun.",
+       "authmanager-password-help": "Passwuert fir d'Authentifikatioun.",
+       "authmanager-domain-help": "Domain fir extern Authentifikatioun",
        "authmanager-retype-help": "Passwuert nach eng Kéier fir ze konfirméieren",
        "authmanager-email-label": "E-Mail",
        "authmanager-email-help": "E-Mail-Adress",
        "authmanager-realname-label": "Richtegen Numm",
        "authmanager-realname-help": "Richtegen Numm vum Benotzer",
+       "authmanager-provider-password": "Authentifikatioun baséiert um Passwuert",
+       "authmanager-provider-password-domain": "Authentifikatioun baséiert um Passwuert an um Domain",
        "authmanager-provider-temporarypassword": "Temporäert Passwuert:",
+       "authprovider-confirmlink-request-label": "Benotzerkonten déi solle verbonn sinn",
+       "authprovider-confirmlink-success-line": "$1: Verbonn",
+       "authprovider-confirmlink-failed": "Verbanne vum Benotzerkont huet net richteg geklappt: $1",
        "authprovider-resetpass-skip-label": "Iwwersprangen",
        "authprovider-resetpass-skip-help": "D'Zrécksetze vum Passwuert iwwersprangen",
        "authform-notoken": "Toke feelt",
        "cannotlink-no-provider-title": "Et gëtt keng Benotzerkonte fir ze verlinken",
        "linkaccounts": "Benotzerkonte verbannen",
        "linkaccounts-submit": "Benotzerkonte verbannen",
-       "userjsispublic": "DEnkt drun: Op JavaScript-Ënnersäite solle keng vertraulech Informatioune stoe well se vun anere Benotzer kënne gesi ginn."
+       "userjsispublic": "DEnkt drun: Op JavaScript-Ënnersäite solle keng vertraulech Informatioune stoe well se vun anere Benotzer kënne gesi ginn.",
+       "restrictionsfield-badip": "Net valabel IP-Adress oder Beräich: $1",
+       "restrictionsfield-label": "Zougeloossen IP-Beräicher:",
+       "edit-error-short": "Feeler: $1",
+       "edit-error-long": "Feeler:\n\n$1"
 }
index f1d9a18..a497488 100644 (file)
        "yourname": "Уртахдин тӀвар",
        "yourpassword": "Парол",
        "yourpasswordagain": "Парол кхьин хъувун:",
-       "remembermypassword": "И браузерда зи логин рикӀел хуьхь (лап гзаф $1 {{PLURAL:$1|1=югъ|йикъар}})",
        "yourdomainname": "Куь домен",
        "login": "Гьахьун",
        "nav-login-createaccount": "Гьахьун/аккаунт туькӀуьрун",
        "youremail": "Электрон почта:",
        "username": "Уртахдин тӀвар",
        "yourrealname": "Xалис тIвар:",
-       "yourlanguage": "ЧIалар",
+       "yourlanguage": "ЧӀалар",
        "yournick": "ЦӀийи къул:",
        "yourgender": "Жинс:",
        "gender-male": "итимдин",
        "file-anchor-link": "Файл",
        "filehist": "Файлдин тарих",
        "filehist-help": "Файлдин виликан жуьре килигун патал, гьа а жуьредин тарих/вахт илиса,",
-       "filehist-deleteall": "виÑ\80и ÐºÑ\8aакÑ\8aудун",
-       "filehist-deleteone": "кÑ\8aакÑ\8aудун",
+       "filehist-deleteall": "виÑ\80и Ð°Ð»удун",
+       "filehist-deleteone": "алудун",
        "filehist-revert": "элкъуьрна хкун",
        "filehist-current": "алай",
        "filehist-datetime": "Тарих/вахт",
        "filedelete": "$1 алудун",
        "filedelete-legend": "Файл алудун",
        "filedelete-comment": "Кар",
-       "filedelete-submit": "Ð\9aÑ\8aакÑ\8aудун",
+       "filedelete-submit": "Ð\90лудун",
        "filedelete-reason-otherlist": "Муькуь себеб",
        "mimesearch": "MIME ахтармишун",
        "download": "АцIун",
        "unwatching": "Амма клигнай",
        "created": "туькIуьрнава",
        "changed": "дегишнава",
-       "deletepage": "Ð\9aÑ\8aакÑ\8aудун хъувун",
+       "deletepage": "Ð\90лудун хъувун",
        "confirm": "Тестикьун",
        "delete-confirm": "«$1» алудун",
-       "delete-legend": "Ð\9aÑ\8aакÑ\8aудун",
+       "delete-legend": "Ð\90лудун",
        "confirmdeletetext": "Квез чlуриз кlанзани чарар гьадан вири тарихар галаз.                                                                                                                         Буюр, сидикъара,куьне чlурзатlа, куьн агъавурда автlа вуч ийизатlа ва куьне ийизатlа жуьреда [[{{MediaWiki:Policy-url}}| политика]].",
        "actioncomplete": "Кар авунва",
        "actionfailed": "Кар йиз алакьнавач",
index 779c36c..8cc7e7d 100644 (file)
@@ -45,7 +45,7 @@
        "tog-enotifminoredits": "Versjik  mich 'ne e-mail bie klein bewirkinge op pagina's en bestenj op mien volglies",
        "tog-enotifrevealaddr": "Mien e-mailadres tuine in e-mailberichte",
        "tog-shownumberswatching": "'t Aantal gebroekers tuine die dees pagina volg",
-       "tog-oldsig": "Bestaonde ongerteikening:",
+       "tog-oldsig": "Dien bestaonde ongerteikening:",
        "tog-fancysig": "Es wikiteks behanjele (zonder autematische verwiezing)",
        "tog-uselivepreview": "\"live veurbesjouwing\" gebroeke",
        "tog-forceeditsummary": "'n Melding gaeve bie 'n laeg samevatting",
        "category-file-count-limited": "Dees categorie bevat {{PLURAL:$1|'t volgende bestandj|de volgende $1 bestenj}}.",
        "listingcontinuesabbrev": "wiejer",
        "index-category": "Geïndexeerde paazjes",
-       "noindex-category": "Óngeïndexeerde paazjes",
+       "noindex-category": "Neet-geïndexeerde pazjena's",
        "broken-file-category": "Pazjena's mit ónjuuste bestandjsverwiezinge",
        "about": "Informatie",
        "article": "Pagina",
        "newwindow": "(in nuuj venster)",
        "cancel": "Aafbraeke",
        "moredotdotdot": "Miè...",
-       "morenotlisted": "Deze lies is neet compleet.",
+       "morenotlisted": "Deze lies is mäögelik neet compleet.",
        "mypage": "Mien gebroekerspagina",
        "mytalk": "Euverlèk",
        "anontalk": "Euverlèk veur dit IP adres",
        "yourpassword": "Die wachwaord",
        "userlogin-yourpassword": "Wachwaord",
        "yourpasswordagain": "Wachwaord opnuuj intype",
-       "remembermypassword": "Mien wachwaord onthouwe veur later sessies (hoegstens $1 {{PLURAL:$1|daag|daag}})",
        "yourdomainname": "Die domein",
        "externaldberror": "d'r Is 'n fout opgetraoje biej 't aanmelje biej de database of doe höbs gén toesjtömming diene externe gebroeker biej te wèrke.",
        "login": "Aanmèlde",
        "htmlform-submit": "Slaon óp",
        "htmlform-reset": "Maak verangeringe óngedaon",
        "htmlform-selectorother-other": "Anges",
-       "sqlite-has-fts": "Zeuk versie $1 mit óngersteuning veur \"full-text\"",
-       "sqlite-no-fts": "Zeuk versie $1 zónger óngersteuning veur \"fulltext\"",
        "logentry-delete-delete": "$1 {{GENDER:$1|haet}} de pagina $3 gewösj",
        "logentry-delete-restore": "$1 haet de pagina $3 trögkgezat",
        "logentry-delete-event": "$1 haet de zichbaarheid van {{PLURAL:$5|'ne logbookregel|$5 logbookregels}} van $3 gewiezig: $4",
index 5194c8b..720810d 100644 (file)
@@ -16,7 +16,7 @@
                ]
        },
        "tog-underline": "Sottolineâ i collegamenti",
-       "tog-hideminor": "asconde e modifiche minori inte ùrtime modifiche",
+       "tog-hideminor": "Ascondi e modiffiche minoî inti urtime modiffiche",
        "tog-hidepatrolled": "Ascondi e modifiche verificæ inte ùrtime modifiche",
        "tog-newpageshidepatrolled": "Ascondi e paggine verificæ da  l'elenco de paggine ciù reçenti",
        "tog-hidecategorization": "Ascondi a categorizzassion de paggine",
        "tog-watchuploads": "Azonzi i noeuvi file che metto in osservaçion",
        "tog-watchrollback": "Azonzi a-i sotta osservassion e paggine dovve ho fæto un rollback",
        "tog-minordefault": "Indica de longo comme menô e modiffiche",
-       "tog-previewontop": "Veddi l'anteprimma de d'äto a-o spaçio pe cangiâ",
-       "tog-previewonfirst": "Veddi l'anteprimma a-o primmo cangiamento",
+       "tog-previewontop": "Mostra l'anteprimma de d'ato a-a casella de modiffica",
+       "tog-previewonfirst": "Mostra l'anteprimma in sciâ primma modiffica",
        "tog-enotifwatchlistpages": "Famme savéi via e-mail quande 'na paggina o in file inti mæ osservæ a ven cangiâ.",
        "tog-enotifusertalkpages": "Màndime un'e-mail se gh'é de modìffiche inta mæ pagina de discuscion.",
        "tog-enotifminoredits": "Mandime una email ascì pe e modifiche menoî de pagine e di file",
        "tog-enotifrevealaddr": "Mostra o mæ addresso inte e-mail de notiffica",
        "tog-shownumberswatching": "Mostra o numero di utenti che tegnan d'oeuggio sta pagina",
-       "tog-oldsig": "Firma attuale:",
+       "tog-oldsig": "Firma attoale:",
        "tog-fancysig": "Tratta a firma comme wikitesto (sensa un collegamento aotomatico)",
        "tog-uselivepreview": "Abillita a fonsion de l'anteprimma in diretta",
        "tog-forceeditsummary": "Domanda conferma se o campo ogetto o l'è veuo",
-       "tog-watchlisthideown": "Ascondi e mæ modiffiche da-a lista che tegno d'oeuggio",
-       "tog-watchlisthidebots": "Ascondi e modiffiche di bot da-a lista che tegno d'oeuggio",
-       "tog-watchlisthideminor": "Ascondi e modiffiche menoî da-a lista che tegno d'oeuggio",
-       "tog-watchlisthideliu": "Ascondi e modiffiche di utenti intræ da-a lista che tegno d'oeuggio",
+       "tog-watchlisthideown": "Ascondi e mæ modiffiche da-a lista sotta-oservaçion",
+       "tog-watchlisthidebots": "Ascondi e modiffiche di bot da-a lista sotta oservaçion",
+       "tog-watchlisthideminor": "Ascondi e modiffiche minoî da-a lista sotta oservaçion",
+       "tog-watchlisthideliu": "Ascondi e modiffiche di utenti intræ da-a lista sotta-oservaçion",
        "tog-watchlistreloadautomatically": "Recarrega aotomaticamente a lista di oservæ quande vegne cangiòu un filtro (ghe veu o JavaScript)",
-       "tog-watchlisthideanons": "Ascondi e modiffiche di utenti anonnimi da-a lista che tegno d'oeuggio",
-       "tog-watchlisthidepatrolled": "Ascondi e modiffiche za controllæ da-a lista che tegno d'oeuggio",
+       "tog-watchlisthideanons": "Ascondi e modiffiche di utenti anonnimi da-a lista sotta-oservaçion",
+       "tog-watchlisthidepatrolled": "Ascondi e modiffiche za controllæ da-a lista sotta-oservaçion",
        "tog-watchlisthidecategorization": "Ascondi a categorizzassion de paggine",
        "tog-ccmeonemails": "Mandime 'na coppia de e-mail che mando a-i atri utenti",
        "tog-diffonly": "No mostrâ o contegnuo da paggina sotta o confronto tra verscioin",
-       "tog-showhiddencats": "Fa vedde e categorîe ascose",
+       "tog-showhiddencats": "Fanni vedde e categorîe ascose",
        "tog-norollbackdiff": "Ometti o confronto tra verscioin doppo ch'ho fæto o ripristino",
        "tog-useeditwarning": "Avertime se lascio 'na paggina de modiffica sens'avei sarvou i cangi",
-       "tog-prefershttps": "Deuvia sempre una connescion segua quande se intra",
+       "tog-prefershttps": "Adœuvia delongo una connescion segua quande se intra",
        "underline-always": "Sempre",
        "underline-never": "Mâi",
        "underline-default": "Impostassioin predefinie do navegatô o da skin",
        "category-file-count-limited": "Questa categoria a contegne {{PLURAL:$1|o file indicao|i $1 file indicæ}} chi de sotta.",
        "listingcontinuesabbrev": "cont.",
        "index-category": "Paggine indiçizzæ",
-       "noindex-category": "Pàgine sénsa indiçe",
+       "noindex-category": "Paggine sença endexo",
        "broken-file-category": "Paggine con di colegamenti a di file che no ghe son",
        "about": "Informaçioìn",
-       "article": "Pagina di contegnùi",
+       "article": "Voxe",
        "newwindow": "(O s'arve inte 'n âtro barcon)",
        "cancel": "Scancella",
        "moredotdotdot": "De ciû...",
-       "morenotlisted": "Questa lista a no l'è completa.",
+       "morenotlisted": "Questa lista a poriæ ese incompleta.",
        "mypage": "Paggina",
        "mytalk": "Discuscioin",
        "anontalk": "Discuscion pe questo addresso IP",
        "talk": "Discuscion",
        "views": "Vìxite",
        "toolbox": "Arneixi",
+       "tool-link-userrights": "Modiffica groppi {{GENDER:$1|utente}}",
+       "tool-link-emailuser": "Manda un'e-mail a questo {{GENDER:$1|utente}}",
        "userpage": "Veddi a paggina utente",
-       "projectpage": "Veddi a paggina de servissio",
+       "projectpage": "Amia a paggina de serviççio",
        "imagepage": "Vizualizza a paggina do file",
        "mediawikipage": "Vizualizza o messaggio",
        "templatepage": "Vizualizza o modello",
        "userlogin-remembermypassword": "Mantegnime collegou",
        "userlogin-signwithsecure": "Adoeuvia una conescion segua",
        "cannotlogin-title": "Imposcibbile intrâ",
+       "cannotlogin-text": "L'accesso o no l'è poscibbile.",
        "cannotloginnow-title": "Aoa no se poeu intrâ",
        "cannotloginnow-text": "Quande s'adoeuvia $1 no se poeu intrâ.",
        "cannotcreateaccount-title": "Imposcibbile creâ di utençe",
+       "cannotcreateaccount-text": "A creaçion diretta de l'utença a no l'è attivâ insce questo wiki.",
        "yourdomainname": "Indirisso do scito:",
        "password-change-forbidden": "No ti peu cangiâ poula segretta in questa wiki.",
        "externaldberror": "Gh'è stæto un aro co-o server de aotenticaçion esterno, oppû no ti g'hæ i aotorizzaçioin pe aggiornâ o to accesso esterno.",
        "botpasswords-label-resetpassword": "Reimposta a poula segretta",
        "botpasswords-label-grants": "Assegnaçioin applicabile:",
        "botpasswords-help-grants": "Ogni assegnaçion a dà accesso a-i driti utente elencæ che un'utença a g'ha zà. Amia a [[Special:ListGrants|tabella d'e assegnaçioin]] pe de ulteioî informaçioin.",
-       "botpasswords-label-restrictions": "Restriçioin d'utilizzo:",
        "botpasswords-label-grants-column": "Assegnaçioin",
        "botpasswords-bad-appid": "O nomme bot \"$1\" o no l'è vallido.",
        "botpasswords-insert-failed": "Imposcibile azonze o nomme bot \"$1\". O l'è za stæto azonto?",
        "passwordreset-emailelement": "Nomme utente: \n$1\n\nPoula segretta temporannia: \n$2",
        "passwordreset-emailsentemail": "Se questo addresso de posta elettronnica o l'è associou a-a teu utença, alloa saiâ inviou un'e-mail pe rempostâ a poula segretta.",
        "passwordreset-emailsentusername": "Se gh'è un adreçço de posta elettronica associou con questo nomme utente, alloa saiâ inviou una email pe rempostâ a password.",
-       "passwordreset-emailsent-capture2": "L'email de rempostaçion da password {{PLURAL:$1|a l'è stæta inviâ|son stæte inviæ}}. {{PLURAL:$1|O nomme|L'elenco di nommi}} utente e password o l'è mostrou chì de sotta.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|L'|E }}e-mail de rempostaçion da password {{PLURAL:$1|a l'è stæta inviâ|son stæte inviæ}}. {{PLURAL:$1|O nomme|L'elenco di nommi}} utente e password o l'è mostrou chì.",
        "passwordreset-emailerror-capture2": "Invio de email {{GENDER:$2|a l'utente}} non ariescio: $1. {{PLURAL:$3|O nomme|L'elenco di nommi}} utente e password o l'è mostrou chì de sotta.",
        "passwordreset-nocaller": "Un chi ciamma ti g'hæ da dâlo",
        "passwordreset-nosuchcaller": "O ciamante o no l'existe: $1",
        "bold_tip": "Grascetto",
        "italic_sample": "Testo in corscivo",
        "italic_tip": "Corscivo",
-       "link_sample": "Nomme de l'ingancio",
+       "link_sample": "Tittolo de l'ingancio",
        "link_tip": "Ingancio interno",
-       "extlink_sample": "http://www.example.com Nomme de l'ingancio",
+       "extlink_sample": "http://www.example.com tittolo de l'ingancio",
        "extlink_tip": "Colegaménto esterno (inclûdde o prefisso http:// )",
        "headline_sample": "Tìtolo",
        "headline_tip": "Tìtolo de 2° livello",
        "searchprofile-advanced-tooltip": "Çerca inti namespace personalizæ",
        "search-result-size": "$1 ({{PLURAL:$2|1 paròlla|$2 paròlle}})",
        "search-result-category-size": "{{PLURAL:$1|1 utente|$1 utenti}} ({{PLURAL:$2|1 sottocategoria|$2 sottocategorie}}, {{PLURAL:$3|1 file|$3 file}})",
-       "search-redirect": "(redirect $1)",
+       "search-redirect": "(Rendriçço da $1)",
        "search-section": "(seçión $1)",
        "search-category": "(categoria $1)",
        "search-file-match": "(corrispondença into contegnuo do file)",
        "gender-unknown": "Into mençunâte, o software o l'adoeuviâ de paole de genere noeütro ogni votta che saiâ poscibile",
        "gender-male": "O l'è registrou insce {{SITENAME}}",
        "gender-female": "A l'è registrâ insce {{SITENAME}}",
-       "prefs-help-gender": "L'impostassion de sta preferensa a l'è opsionâ.\nO software o deuvia sto valô pe addressâse a ti e mensunate a-i atri deuviando o gennere grammaticale apropiou.\nQuesta informassion a saiâ pubblica.",
+       "prefs-help-gender": "L'impostaçion de sta preferença a l'è opçionâ.\nO software o doeuvia sto valô pe indriçâse a ti e mençunâte a-i atri doeuviando o gennere grammaticale apropiou.\nQuest'informaçion a saiâ pubbrica.",
        "email": "Posta elettronega",
        "prefs-help-realname": "O veo nomme o l'è facortativo.\nSe fornio, o poeu ese deuviou pe attribuite a paternitæ do to travaggio.",
        "prefs-help-email": "L'email a no l'é obligatöia, ma a te permette de reçéive a paròlla segrétta se ti l'ascòrdi.",
        "largefileserver": "O file o suppera e dimenscioin consentie da-a configuaçion do server.",
        "emptyfile": "O file apen-a caregou pâ esee voeuo. Questo poriæ ese dovuo a un aro into nomme do file. Controlla se ti voeu davei caregâ sto file.",
        "windows-nonascii-filename": "Questo wiki o no supporta di nommi de file con di caratteri speciali.",
-       "fileexists": "Un papê con sto nomme o l'existe za, pe piaxei danni 'n'euggiâ a <strong>[[:$1]]</strong> se no ti t'ê seguo de voeilo cangiâ.\n[[$1|thumb]]",
+       "fileexists": "Un file con sto nomme o l'existe za, pe piaxei danni 'n'oeuggiâ a <strong>[[:$1]]</strong> se no ti t'ê seguo de voeilo cangiâ.\n[[$1|thumb]]",
        "filepageexists": "A pagina de descriçion de questo file a l'è za stæta creâ a l'adreçço <strong>[[:$1]]</strong>, sciben che no ghe segge ancon un file con questo nomme. A descriçion de l'oggetto inseia in fase de caregamento a no l'appariâ in scia pagina de descriçion. Pe fâ scì che l'oggetto o comparisce in sciâ pagina de descriçion, saiâ necessaio modificala manualmente.\n[[$1|thumb]]",
        "fileexists-extension": "Un file co-in nomme scimile a questo o l'esiste za: [[$2|thumb]]\n* Nomme do file caregou: <strong>[[:$1]]</strong>\n* Nomme do file existente: <strong>[[:$2]]</strong>\nTi voeu miga çerne un nomme ciu caratteristego?",
-       "fileexists-thumbnail-yes": "O file caregou o pâ ese una miniatua ''(thumbnail)''. [[$1|thumb]]\nVerifica, pe confronto, il file <strong>[[:$1]]</strong>.\nSe se tratta da mæxima inmaggine, inte dimenscioin originale, no l'è necessaio caregâne un'atra in miniatua.",
+       "fileexists-thumbnail-yes": "O file caregou o pâ ese 'na miniatua ''(thumbnail)''. [[$1|thumb]]\nControlla o file <strong>[[:$1]]</strong>.\nSe se tratta da mæxima inmaggine, inte dimenscioin originale, no l'è necessaio caregâne un'atra in miniatua.",
        "file-thumbnail-no": "O nomme do file comença con <strong>$1</strong>; pâ ch'o segge un'inmaggine de dimenscioin redute ''(miniatua)''.\nSe ti dispon-i del'immaggine inta risoluçion originale, carreghila. Sedunque, pe piaxei, cangighe o nomme.",
        "fileexists-forbidden": "Un file con questo nomme o l'existe za e o no poeu ese soviascrito. Se ti voeu caregâ o to file, torna inderê e dagghe un atro nomme. [[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Un file con questo nomme o l'esiste za inte l'archivio de risorse multimediæ condivise. Se ti dexiddei ancon caregâ o file, torna inderê e modifica o nomme co-o quæ caregâ o file. [[File:$1|thumb|center|$1]]",
        "upload-source": "File de origine",
        "sourcefilename": "Nomme do file d'origgine:",
        "sourceurl": "URL de origine:",
-       "destfilename": "Nomme do file de destinassion:",
+       "destfilename": "Nomme do file de destinaçion:",
        "upload-maxfilesize": "Dimenscion mascima do file: $1",
        "upload-description": "Descriçion do file",
        "upload-options": "Opçioin de caregamento",
        "upload-dialog-disabled": "O caregamento di file tramite questo barcon de dialogo o l'è disabilitou inte questo wiki.",
        "upload-dialog-title": "Carrega file",
        "upload-dialog-button-cancel": "Anulla",
+       "upload-dialog-button-back": "Inderê",
        "upload-dialog-button-done": "Fæto",
        "upload-dialog-button-save": "Sarva",
        "upload-dialog-button-upload": "Carrega",
        "uploadstash-errclear": "O nettezzo di file o no l'è ariescio.",
        "uploadstash-refresh": "Aggiorna l'elenco di file",
        "uploadstash-thumbnail": "veddi miniatua",
+       "uploadstash-exception": "Imposcibile memoizâ o caregamento in stash ($1): \"$2\".",
        "invalid-chunk-offset": "Offset d'a parte non vallido.",
        "img-auth-accessdenied": "Accesso negou",
        "img-auth-nopathinfo": "PATH_INFO mancante.\nO server o no l'è impostou pe passâ quest'informaçion.\nO poriæ ese basou insce CGI e o no poeu supportâ img_auth.\nAmia https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization.",
        "upload-curl-error6-text": "Imposcibile razonze a URL specificâ. Verifica che a URL a sæ scrita correttamente e che o scito in question o sæ attivo.",
        "upload-curl-error28": "Tempo descheito pe l'upload",
        "upload-curl-error28-text": "O scito remoto o l'ha impiegou troppo tempo a risponde. Verifica che o sito o sæ attivo, attendi quarche menuto e proeuva torna, se mai inte 'n momento con meno traffego.",
-       "license": "Licensa:",
+       "license": "Liçençia:",
        "license-header": "Licensa",
        "nolicense": "Nisciûnn-a liçensa indicâa",
        "licenses-edit": "Modiffica opçioin de liçença",
        "apisandbox-results-fixtoken-fail": "Imposcibile recuperâ o token \"$1\".",
        "apisandbox-alert-page": "I campi insce questa pagina no son vallidi.",
        "apisandbox-alert-field": "O valô de questo campo o no l'è vallido.",
+       "apisandbox-continue": "Continnoa",
+       "apisandbox-continue-clear": "Nettezza",
        "booksources": "Fonte libraie",
        "booksources-search-legend": "Çerca e fonti",
        "booksources-isbn": "Codice ISBN:",
        "trackingcategories-disabled": "A categoria a l'è disabilitâ",
        "mailnologin": "Nisciun adreçço a chi mandâ o messaggio",
        "mailnologintext": "Pe inviâ di messaggi e-mail a di atri utenti l'è necessaio [[Special:UserLogin|accede a-o scito]] e avei registrou un adreçço vallido inte proppie [[Special:Preferences|preferençe]].",
-       "emailuser": "Invia 'na email a st'utente chi",
+       "emailuser": "Invia 'n'e-mail a questo utente",
        "emailuser-title-target": "Invia un'email a questo {{GENDER:$1|utente}}",
        "emailuser-title-notarget": "Invia una email a un utente",
        "emailpagetext": "Doeuvia o moddulo sottostante pe inviâ un messaggio e-mail a l'{{GENDER:$1|utente}} indicou. L'adreçço speçificou inte [[Special:Preferences|preferençe]] do mittente o l'appariâ into campo \"Da:\" do messaggio pe consentî a-o destinataio de risponde direttamente.",
        "undeletepage": "Veddi e recuppera e pagine scançellæ",
        "undeletepagetitle": "'''Quanto segue o l'è composto da de revixoin scassæ de [[:$1|$1]]'''.",
        "viewdeletedpage": "Veddi e paggine scassæ",
-       "undeletepagetext": "{{PLURAL:$1|A seguente pagina a l'è stæta scassâ, ma a l'è ancon in archivio e pertanto a poeu ese recuperâ|Le seguente pagine son stæte scassæ, ma son ancon in archivio e pertanto poeuan ese recuperæ}}. L'archivio o poeu ese vuou periodicamente.",
+       "undeletepagetext": "{{PLURAL:$1|A seguente pagina a l'è stæta scassâ, ma a l'è ancon in archivio e pertanto a poeu ese recuperâ|E seguente pagine son stæte scassæ, ma son ancon in archivio e pertanto poeuan ese recuperæ}}. L'archivio o poeu ese vuou periodicamente.",
        "undelete-fieldset-title": "Ripristina revixoin",
        "undeleteextrahelp": "Pe recuperâ l'intrega cronologia da pagina, lascia tutte e caselle deseleçionæ e fanni clic insce '''''{{int:undeletebtn}}'''''.\nPe effettuâ un ripristino selettivo, seleçion-a e caselle corrispondente a-e verscioin da ripristinâ e fanni clic insce '''''{{int:undeletebtn}}'''''.",
        "undeleterevisions": "{{PLURAL:$1|Una revixon scassâ|$1 revixoin scassæ}}",
        "movepagetalktext": "Se ti seleçion-i questa casella, a corispondente paggina de discuscion a saiâ mesciâ aotomaticamente a-o neuvo tittolo, a meno che existe zà una paggina de discuscion ch'a no segge veua.\n\nInte sti caxi, ti doviæ mesciâ o unî manoalmente a paggina, se proppio ti veu.",
        "moveuserpage-warning": "'''Attençione:''' Ti stæ pe mesciâ una pagina utente. Notta che solo a pagina a saiâ mesciâ. L'utente o ''no'' saiâ rinominou.",
        "movecategorypage-warning": "<strong>Attençione:</strong> ti stæ pe mesciâ una categoria. Notta che solo sta paggina a saiâ mesciâ e tutte e pagine inta vegia categoria <em>no</em> saian inseie inta noeuva.",
-       "movenologintext": "O stramuo dee paggine o l'è consentio solo che a-i utenti registræ ch'han eseguio l'[[Special:UserLogin|accesso]] a-o scito.",
+       "movenologintext": "O stramuo de paggine o l'è consentio solo che a-i utenti registræ ch'han eseguio l'[[Special:UserLogin|accesso]] a-o scito.",
        "movenotallowed": "No ti g'hæ o permisso pe mesciâ de paggine.",
        "movenotallowedfile": "No ti g'hæ o permisso pe mesciâ di file.",
        "cant-move-user-page": "No ti g'hæ o permisso pe mesciâ de pagine utente (escluse e sottopagine).",
        "allmessagesdefault": "Testo predefinio",
        "allmessagescurrent": "Testo corrente",
        "allmessagestext": "Sta chie a l'è a lista de tutti i messaggi de scistema disponibili into namespace MediaWiki.\nVixita [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation MediaWiki Localisation] e [https://translatewiki.net translatewiki.net] se ti voeu contribuî a-a localizzaçion generrica de MediaWiki.",
-       "allmessagesnotsupportedDB": "'''{{ns:special}}:Allmessages''' o non ti te peu vedde, perchè '''$wgUseDatabaseMessages''' o non l'è attivo.",
+       "allmessagesnotsupportedDB": "No l'è poscibbile doeuviâ sta paggina perchè o flag '''$wgUseDatabaseMessages''' o no l'è attivo.",
        "allmessages-filter-legend": "Filtro",
        "allmessages-filter": "Filtra pe stato de modiffica:",
        "allmessages-filter-unmodified": "Non modificæ",
        "tooltip-undo": "\"Anùlla\" o permette de anulâ sto cangiaménto e o l'arve o modulo de cangiaménto inta modalitæ anteprìmma. Ti peu ascì métte a raxón inte l'ogetto do cangiaménto.",
        "tooltip-preferences-save": "Sarva e preferençe",
        "tooltip-summary": "Scrîvi 'na scintexi",
-       "common.css": "/** i stili css scriti chie se applicana tutte e skin */",
+       "common.css": "/** i stili css scriti chì se apprican a tutte e skin */",
        "anonymous": "{{PLURAL:$1|Utente anonnimo|Utenti anonnimi}} de {{SITENAME}}",
        "siteuser": "$1, utente de {{SITENAME}}",
        "anonuser": "$1, utente anonnimo de {{SITENAME}}",
        "previousdiff": "← Diferensa precedénte",
        "nextdiff": "Pròscima diferensa →",
        "mediawarning": "'''Attençione''': Questo file o poriæ contegnî un codiçe maligno. A so esecuçion a poriæ dannezzâ o to scistema.",
-       "imagemaxsize": "Dimenscion mascima de ibmaggine:<br />''(pe-e paggine de descriçion do file)''",
+       "imagemaxsize": "Dimenscion mascima d'e inmaggine:<br />''(pe-e paggine de descriçion do file)''",
        "thumbsize": "Dimescion de l'imaginetta:",
        "widthheightpage": "$1 × $2, $3 {{PLURAL:$3|paggina|paggine}}",
        "file-info": "dimenscion do file: $1, tipo MIME: $2",
        "saturday-at": "Sabbo a $1",
        "sunday-at": "Domenega a $1",
        "yesterday-at": "Vei a $1",
-       "bad_image_list": "O formato o l'è coscì:\nVan conscideræ sôlo e righe che comensan co-o càratere *.\nO primmo ingancio in sce ògni riga o dev'ese 'n ingancio ch'o no fonçionn-a\nI inganci sucescivi, in scia mæxima riga, van conscideræ comme eceçioìn (pagine donde o file o pêu ese reciamòu normalmente).",
+       "bad_image_list": "O formato o l'è coscì:\nVan conscideræ sôlo e righe che comensan co-o càratere *.\nO primmo ingancio in sce ògni riga o dev'ese 'n ingancio ch'o no fonçionn-a\nI inganci sucescivi, in scia mæxima riga, van conscideræ comme eceçioìn (pagine donde o file o poeu ese reciamòu normalmente).",
        "metadata": "Metadati",
        "metadata-help": "Sto file o contegne de informaçioìn in ciù, fòscia misse da-a fotocamera ò dò-u scansô dêuviòu pe creâla ò digitalizâla. Se o file o l'è stæto cangiòu, çerti detàggi porieivan no corisponde a-i cangi aportæ.",
        "metadata-expand": "Fâ vedde dettaggi",
        "tag-filter-submit": "Filtro",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etichetta|Etichette}}]]: $2)",
        "tag-mw-contentmodelchange": "cangio a-o modello di contegnui",
+       "tag-mw-contentmodelchange-description": "Modiffiche che [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel cangian o modello di contegnui] de 'na paggina",
        "tags-title": "Etichette",
        "tags-intro": "Questa pagina a l'elenca i etichette che o software o poriæ associâ a 'na modiffica e o so scignificou.",
        "tags-tag": "Nomme de l'etichetta",
        "htmlform-cloner-create": "Azonzi de l'atro",
        "htmlform-cloner-delete": "Leva",
        "htmlform-cloner-required": "Ghe voeu a-o manco un valô.",
+       "htmlform-date-placeholder": "AAAA-MM-GG",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "AAAA-MM-GG HH:MM:SS",
+       "htmlform-date-invalid": "O valô specificou o no l'è riconoscito comme dæta. Prœuva a dœuviâ o formato AAAA-MM-GG.",
+       "htmlform-time-invalid": "O valô specificou o no l'è riconosciuo comme oraio. Prœuva a dœuviâ o formato HH:MM:SS.",
+       "htmlform-datetime-invalid": "O valô specificou o no l'è riconosciuo comme dæta e oa. Prœuva a dœuviâ o formato AAAA-MM-GG HH:MM:SS.",
+       "htmlform-date-toolow": "O valô specificou o l'è precedente a-a primma dæta consentia do $1.",
+       "htmlform-date-toohigh": "O valô specificou o l'è succescivo a l'urtima dæta consentia do $1.",
+       "htmlform-time-toolow": "O valô specificou o l'è precedente a-o primmo oraio consentio do $1.",
+       "htmlform-time-toohigh": "O valô specificou o l'è succescivo a l'urtimo oraio consentio do $1.",
+       "htmlform-datetime-toolow": "O valô specificou o l'è precedente a-a primma dæta e oa consentia do $1.",
+       "htmlform-datetime-toohigh": "O valô specificou o l'è succescivo a l'urtima dæta e oa consentia do $1.",
        "htmlform-title-badnamespace": "[[:$1]] a no se troeuva into namespace \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" o l'è o tittolo de una paggina non creabile",
        "htmlform-title-not-exists": "$1 a no l'existe.",
        "htmlform-user-not-exists": "'''$1''' o no l'existe.",
        "htmlform-user-not-valid": "<strong>$1</strong> o no l'è un nomme utente vallido.",
-       "sqlite-has-fts": "$1 co-a poscibilitæ de riçerca completa into testo",
-       "sqlite-no-fts": "$1 sença a poscibilitæ de riçerca completa into testo",
        "logentry-delete-delete": "$1 {{GENDER:$2|o l'ha scassou}} a paggina $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|o|a}} l'ha ripristinou a paggina $3",
        "logentry-delete-event": "$1 {{GENDER:$2|o|a}} l'ha modificou a vixibilitæ de {{PLURAL:$5|un'açion do registro|$5 açioin do registro}} de \"$3\": $4",
        "feedback-external-bug-report-button": "Documenta un problema tecnico",
        "feedback-dialog-title": "Invia un feedback",
        "feedback-dialog-intro": "Doeuvia o moddulo sottostante pe inviâ o to feedback. O to commento o l'appariâ inta paggina \"$1\", assemme a-o to nomme utente.",
-       "feedback-error-title": "Errô",
        "feedback-error1": "Errô: Da-a API l'è arrivou un risultou non riconosciuo",
        "feedback-error2": "Errô: No l'è stæto poscibbile eseguî a modiffica",
        "feedback-error3": "Errô: Nisciun-a risposta da-a API",
        "feedback-thanks": "Graççie! O to feedback o l'è stæto pubricou a-a paggina \"[$2 $1]\".",
        "feedback-thanks-title": "Graççie!",
        "feedback-useragent": "Agente utente:",
-       "searchsuggest-search": "Çerca",
+       "searchsuggest-search": "Çerca in {{SITENAME}}",
        "searchsuggest-containing": "ch'o conten...",
        "api-error-autoblocked": "O to adreçço IP o l'è stæto bloccou aotomaticamente, perché o l'è stæto doeuviou da un utente bloccou.",
        "api-error-badaccess-groups": "No t'ê aotorizzou a caregâ di file insce questa wiki.",
        "limitreport-expansiondepth": "Mascima profonditæ d'espanscion",
        "limitreport-expensivefunctioncount": "Nummero de fonçioin do parser dispendiose",
        "expandtemplates": "Espanscion di template",
-       "expand_templates_intro": "Questa pagina speciale a l'elabboa un testo espandendo tutti i template presenti.\nA carcoa ascì o risultou de fonçioon supportæ da-o parser comme\n<code><nowiki>{{</nowiki>#language:…}}</code> e de variabbile de scistema quæ\n<code><nowiki>{{</nowiki>CURRENTDAY}}</code>,\nsaiv'a dî inta prattica tutto 'lo che s'attroeuva tra parentexi graffe dogge.",
+       "expand_templates_intro": "Questa pagina speciale a l'elabboa un scrito espandendo tutti i template presenti.\nA calcola ascì o risultato de fonçioin supportæ da-o parser comme\n<code><nowiki>{{</nowiki>#language:…}}</code> e de variabbile de scistema quæ\n<code><nowiki>{{</nowiki>CURRENTDAY}}</code>,\nsaiv'a dî inta prattica tutto 'lo che s'attroeuva tra parentexi graffe dogge.",
        "expand_templates_title": "Contesto (pe {{FULLPAGENAME}} eçç.):",
        "expand_templates_input": "Testo da espande:",
        "expand_templates_output": "Risultou",
        "linkaccounts-submit": "Collega utençe",
        "unlinkaccounts": "Scollega utençe",
        "unlinkaccounts-success": "L'utença a l'è stæta scollegâ.",
-       "authenticationdatachange-ignored": "O cangiamento da dæta d'aotenticaçion o no l'è passou. Foscia che no gh'ea un provider configuou?"
+       "authenticationdatachange-ignored": "O cangiamento da dæta d'aotenticaçion o no l'è passou. Foscia che no gh'ea un provider configuou?",
+       "userjsispublic": "Regorda: e sottopaggine JavaScript no devan contegnî dæti riservæ percose son vixoalizabbile da-i atri utenti.",
+       "usercssispublic": "Regorda: e sottopagine CSS no devan contegnî dæti riservæ percose son vixoalizabbile da i atri utenti.",
+       "restrictionsfield-badip": "Intervallo d'adreççi IP non vallido:$1",
+       "restrictionsfield-label": "Intervalli IP consentii:",
+       "restrictionsfield-help": "Un adresso IP ò intervallo CIDR pe linnia. Pe consentî tutto, adœuvia<br><code>0.0.0.0/0</code><br><code>::/0</code>"
 }
index f3cf09b..5998caf 100644 (file)
        "tog-hidepatrolled": "Slėpti patikrintus keitimus paskutinių keitimų sąraše",
        "tog-newpageshidepatrolled": "Slėpti patikrintus puslapius iš naujausių straipsnių sąrašo",
        "tog-hidecategorization": "Slėpti puslapių kategorizavimą",
-       "tog-extendwatchlist": "Išplėsti stebimųjų sąrašą, kad rodytų visus tinkamus keitimus, ne tik pačius naujausius.",
+       "tog-extendwatchlist": "Išplėsti stebimųjų sąrašą, kad rodytų visus tinkamus keitimus, ne tik pačius naujausius",
        "tog-usenewrc": "Grupuoti pakeitimas pagal puslapį paskutinių keitimų ir stebėjimo sąrašuose",
        "tog-numberheadings": "Automatiškai numeruoti skyrelius",
        "tog-showtoolbar": "Rodyti redagavimo įrankių juosta",
        "tog-editondblclick": "Puslapių redagavimas dvigubu spustelėjimu (JavaScript)",
        "tog-editsectiononrightclick": "Įjungti skyrelių redagavimą paspaudus skyrelio pavadinimą dešiniuoju pelės klavišu (JavaScript)",
-       "tog-watchcreations": "Pridėti puslapius, kuriuos aš sukuriu, į stebimų sąrašą",
-       "tog-watchdefault": "Pridėti puslapius, kuriuos aš redaguoju, į stebimų sąrašą",
-       "tog-watchmoves": "Pridėti puslapius, kuriuos aš perkeliu, į stebimų sąrašą",
-       "tog-watchdeletion": "Pridėti puslapius, kuriuos aš ištrinu, į stebimų sąrašą",
+       "tog-watchcreations": "Pridėti mano sukuriamus puslapius į stebimųjų sąrašą",
+       "tog-watchdefault": "Pridėti puslapius, kuriuos aš redaguoju, į stebimų sąrašą",
+       "tog-watchmoves": "Pridėti puslapius ir failus, kuriuos aš perkeliu, į stebimųjų sąrašą",
+       "tog-watchdeletion": "Pridėti puslapius, kuriuos aš ištrinu, į stebimų sąrašą",
        "tog-watchuploads": "Pridėti naujus failus, kurios aš įkeliu, į mano stebimųjų sąrašą",
-       "tog-watchrollback": "Pridėti puslapius, kuriuose aš atlikau atmetimus į mano stebėjimo sąrašą",
+       "tog-watchrollback": "Pridėti puslapius, kuriuose aš atlikau atmetimus, į stebimųjų sąrašą",
        "tog-minordefault": "Pagal nutylėjimą pažymėti redagavimus kaip smulkius",
        "tog-previewontop": "Rodyti peržiūrą virš redagavimo lauko",
        "tog-previewonfirst": "Rodyti peržiūrą pirmą kartą pakeitus",
        "tog-enotifminoredits": "Siųsti man laišką, kai puslapio keitimas yra smulkus",
        "tog-enotifrevealaddr": "Rodyti mano el. pašto adresą priminimo laiškuose",
        "tog-shownumberswatching": "Rodyti stebinčių naudotojų skaičių",
-       "tog-oldsig": "Galiojantis parašas:",
+       "tog-oldsig": "Jūsų dabartinis parašas:",
        "tog-fancysig": "Laikyti parašą vikitekstu (be automatinių nuorodų)",
        "tog-uselivepreview": "Naudoti tiesioginę peržiūrą",
        "tog-forceeditsummary": "Klausti, kai palieku tuščią keitimo komentarą",
-       "tog-watchlisthideown": "Slėpti mano keitimus stebimų sąraše",
-       "tog-watchlisthidebots": "Slėpti robotų keitimus stebimų sąraše",
-       "tog-watchlisthideminor": "Slėpti smulkius keitimus stebimų sąraše",
+       "tog-watchlisthideown": "Slėpti mano keitimus stebimų sąraše",
+       "tog-watchlisthidebots": "Slėpti botų keitimus stebimųjų sąraše",
+       "tog-watchlisthideminor": "Slėpti smulkius keitimus stebimų sąraše",
        "tog-watchlisthideliu": "Slėpti prisijungusių naudotojų keitimus stebimųjų sąraše",
        "tog-watchlistreloadautomatically": "Atnaujinti stebėjimų sąrašą automatiškai, kai tik filtras yra pakeičiamas (reikalingas JavaScript)",
        "tog-watchlisthideanons": "Slėpti anoniminių naudotojų keitimus stebimųjų sąraše",
@@ -80,7 +80,7 @@
        "tog-showhiddencats": "Rodyti paslėptas kategorijas",
        "tog-norollbackdiff": "Nerodyti skirtumo atlikus atmetimą",
        "tog-useeditwarning": "Perspėti mane, kai palieku redagavimo puslapį, o jame yra neišsaugotų pakeitimų",
-       "tog-prefershttps": "Prisiregistruojant visada naudokite saugų ryšį",
+       "tog-prefershttps": "Visada naudoti saugų ryšį esant prisijungus",
        "underline-always": "Visada",
        "underline-never": "Niekada",
        "underline-default": "Pagal naršyklės nustatymus",
        "newwindow": "(atsidaro naujame lange)",
        "cancel": "Atšaukti",
        "moredotdotdot": "Daugiau...",
-       "morenotlisted": "Šis sąrašas nėra išsamus.",
+       "morenotlisted": "Šis sąrašas gali būti nepilnas.",
        "mypage": "Puslapis",
        "mytalk": "Aptarimas",
        "anontalk": "Aptarimas",
        "talk": "Aptarimas",
        "views": "Peržiūros",
        "toolbox": "Įrankiai",
+       "tool-link-userrights": "Keisti {{GENDER:$1|vartotojo|vartotojos}} grupes",
+       "tool-link-emailuser": "Siusti el. laišką {{GENDER:$1|šiam vartotojui|šiai vartotojai}}",
        "userpage": "Rodyti naudotojo puslapį",
        "projectpage": "Rodyti projekto puslapį",
        "imagepage": "Žiūrėti failo puslapį",
        "laggedslavemode": "Dėmesio: Puslapyje gali nesimatyti naujausių pakeitimų.",
        "readonly": "Duomenų bazė užrakinta",
        "enterlockreason": "Įveskite užrakinimo priežastį, taip pat datą, kada bus atrakinta",
-       "readonlytext": "Duomenų bazė šiuo metu yra užrakinta naujiems įrašams ar kitiems keitimams,\nturbūt duomenų bazės techninei profilaktikai,\npo to viskas vėl veiks kaip įprasta.\n\nUžrakinusiojo administratoriaus pateiktas rakinimo paaiškinimas: $1",
+       "readonlytext": "Duomenų bazė šiuo metu yra užrakinta naujiems įrašams ar kitiems keitimams,greičiausiai duomenų bazės techninei profilaktikai,\npo kurios viskas vėl veiks kaip įprasta.\n\nUžrakinusiojo sistemos administratoriaus pateiktas paaiškinimas: $1",
        "missing-article": "Duomenų bazė nerado puslapio teksto, kurį ji turėtų rasti, pavadinto „$1“ $2.\n\nPaprastai tai būna dėl pasenusios skirtumo ar istorijos nuorodos į puslapį, kuris buvo ištrintas.\n\nJei tai ne tas atvejis, jūs galbūt radote klaidą programinėje įrangoje.\nPrašome apie tai pranešti [[Special:ListUsers/sysop|administratoriui]], nepamiršdami nurodyti nuorodą.",
        "missingarticle-rev": "(versija#: $1)",
        "missingarticle-diff": "(Skirt.: $1, $2)",
        "title-invalid-magic-tilde": "Prašomo puslapio pavadinimas turi negalima magiška tildės seką (<nowiki>~~~</nowiki>).",
        "title-invalid-too-long": "Prašomo puslapio pavadinimas yra per ilgas. Jis turi būti ne ilgesnis nei {{PLURAL:$1|baitas|baitai}} UTF-8 koduotėje.",
        "title-invalid-leading-colon": "Prašomo puslapio pavadinimas turi neleistiną dvitaškį pradžioje.",
-       "perfcached": "Rodoma išsaugota duomenų kopija, todėl duomenys gali būti ne patys naujausi. Maksimaliai $1 {{PLURAL:$1|rezultatas|rezultatai|rezultatų}} yra saugoma.",
-       "perfcachedts": "Rodoma išsaugota duomenų kopija, kuri buvo atnaujinta $2 $3. Maksimaliai $4 {{PLURAL:$4|rezultatas|rezultatai|rezultatų}} yra saugoma.",
+       "perfcached": "Rodoma išsaugota duomenų kopija, todėl duomenys gali būti ne patys naujausi. Saugoma iki $1 {{PLURAL:$1|rezultatas|rezultatai|rezultatų}}.",
+       "perfcachedts": "Rodoma išsaugota duomenų kopija, kuri buvo atnaujinta $2 $3. Saugoma iki $4 {{PLURAL:$4|rezultatas|rezultatai|rezultatų}}.",
        "querypage-no-updates": "Atnaujinimai šiam puslapiui dabar yra išjungti. Duomenys čia dabar nebus atnaujinti.",
        "viewsource": "Žiūrėti kodą",
        "viewsource-title": "Peržiūrėti šaltinį $1",
        "actionthrottled": "Veiksmas apribotas",
-       "actionthrottledtext": "Kad būtų apsisaugota nuo reklamų, jums neleidžiama daug kartų atlikti šį veiksmą per trumpą laiko tarpą, bet jūs pasiekėte šį limitą. Prašome vėl pamėginti po kelių minučių.",
+       "actionthrottledtext": "Kad būtų apsisaugota nuo pažeidimų, jums neleidžiama pernelyg daug kartų atlikti šį veiksmą per trumpą laiko tarpą. Jūs viršijote šį limitą. Prašome vėl pamėginti po kelių minučių.",
        "protectedpagetext": "Šis puslapis yra užrakintas, saugant jį nuo redagavimo.",
        "viewsourcetext": "Jūs galite peržiūrėti ir kopijuoti puslapio kodą:",
        "viewyourtext": "Jūs galite peržiūrėti ir kopijuoti <strong>savo pakeitimų</strong> kodą į šį puslapį:",
        "eauthentsent": "Patvirtinimo laiškas buvo nusiųstas į paskirtąjį el. pašto adresą.\nPrieš išsiunčiant kitą laišką į jūsų dėžutę, jūs turite vykdyti nurodymus laiške, kad patvirtintumėte, kad dėžutė tikrai yra jūsų.",
        "throttled-mailpassword": "Slaptažodžio priminimas jau buvo išsiųstas, per {{PLURAL:$1|$1 paskutinę valandą|$1 paskutines valandas|$1 paskutinių valandų}}.\n\nNorint apsisaugoti nuo piktnaudžiavimo, slaptažodžio priminimas gali būti išsiųstas tik kas {{PLURAL:$1|$1 valandą|$1 valandas|$1 valandų}}.",
        "mailerror": "Klaida siunčiant laišką: $1",
-       "acct_creation_throttle_hit": "Šio projekto lankytojai, naudojantys jūsų IP adresą, sukūrė {{PLURAL:$1|$1 paskyrą|$1 paskyras|$1 paskyrų}} per paskutiniąją dieną, o tai yra didžiausias leidžiamas kiekis per šį laiko tarpą.\nTodėl šiuo metu lankytojai, naudojantys šį IP adresą, daugiau negali kurti paskyrų.",
+       "acct_creation_throttle_hit": "Šio projekto lankytojai, naudojantys jūsų IP adresą, sukūrė {{PLURAL:$1|$1 paskyrą|$1 paskyras|$1 paskyrų}} per $2, o tai yra didžiausias leidžiamas kiekis per šį laiko tarpą.\nTodėl šiuo metu lankytojai, naudojantys šį IP adresą, daugiau negali kurti paskyrų.",
        "emailauthenticated": "Jūsų el. pašto adresas buvo patvirtintas $2 d. $3.",
        "emailnotauthenticated": "Jūsų el. pašto adresas dar nėra patvirtintas. Jokie laiškai\nnebus siunčiami nei vienai žemiau išvardintai paslaugai.",
        "noemailprefs": "Nurodykite el. pašto adresą, kad šios funkcijos veiktų.",
        "pt-userlogout": "Atsijungti",
        "php-mail-error-unknown": "Nežinoma klaida PHP mail() funkcijoje",
        "user-mail-no-addy": "Bandyta išsiųsti elektroninį laišką be el. pašto adreso.",
-       "user-mail-no-body": "Mėginta siųsti tuščia ar pernelyg trumpą E-pašto žinutė.",
+       "user-mail-no-body": "Bandyta siųsti tuščią ar pernelyg trumpą el. pašto žinutę.",
        "changepassword": "Pakeisti slaptažodį",
        "resetpass_announce": "Norint užbaigti prisijungimą jums reikia nustatyti naująjį slaptažodį.",
        "resetpass_text": "<!-- Įterpkite čia tekstą -->",
        "botpasswords-label-resetpassword": "Atstatyti slaptažodį",
        "botpasswords-label-grants": "Taikomi leidimai:",
        "botpasswords-help-grants": "Kiekvienas leidimas suteikia prieigą prie išvardintų naudotojo leidimų, kuriuos paskyra jau turi.\nŽiūrėkite [[Special:ListGrants|leidimų lentelę]], norėdami rasti daugiau informacijos.",
-       "botpasswords-label-restrictions": "Naudojimo apribojimai:",
        "botpasswords-label-grants-column": "Leidžiama",
        "botpasswords-bad-appid": "Boto vardas \"$1\" nėra tinkamas.",
        "botpasswords-insert-failed": "Nepavyko pridėti boto vardo \"$1\". Gal jis jau pridėtas?",
        "resetpass-expired": "Jūsų slaptažodžio galiojimas baigėsi. Prašome nustatyti naują prisijungimo slaptažodį.",
        "resetpass-expired-soft": "Jūsų slaptažodžio galiojimas baigėsi ir jį reikia atkurti iš naujo. Pasirinkite naują slaptažodį dabar arba spauskite \"{{int:authprovider-resetpass-skip-label}}\", kad būtų atstatytas vėliau.",
        "resetpass-validity-soft": "Jūsų slaptažodis netinkamas: $1\n\nPasirinkite naują slaptažodį dabar arba spauskite \"{{int:authprovider-resetpass-skip-label}}\", kad būtų atkurtas vėliau.",
-       "passwordreset": "Atstatyti slaptažodį",
+       "passwordreset": "Atkurti slaptažodį",
        "passwordreset-text-one": "Užpildykite šią formą, norėdami atkurti savo slaptažodį.",
-       "passwordreset-text-many": "{{PLURAL:$1|Užpildykite vieną iš laukų slaptažodžio atkūrimui.}}",
+       "passwordreset-text-many": "{{PLURAL:$1|Užpildykite vieną iš laukelių, kad el. paštu gautumėte laikinąjį slaptažodį.}}",
        "passwordreset-disabled": "Slaptažodžių atstatymai šiame wikyje išjungti.",
        "passwordreset-emaildisabled": "El. pašto funkcijos uždraustos šiame wiki.",
        "passwordreset-username": "Naudotojo vardas:",
        "passwordreset-emailelement": "Naudotojo vardas: \n$1\n\nLaikinas slaptažodis: \n$2",
        "passwordreset-emailsentemail": "Jeigu šis el. pašto adresas yra susietas su jūsų paskyra, tada slaptažodžio atkūrimo laiškas bus išsiųstas.",
        "passwordreset-emailsentusername": "Jeigu buvo el. paštas susietas su šiuo naudotojo vardu, tai slaptažodžio atkūrimo el. laiškas bus išsiųstas.",
-       "passwordreset-emailsent-capture2": "Slaptažodžio keitimo {{PLURAL:$1|el. laiškas buvo išsiųstas|el. laiškai buvo išsiųsti}}. {{PLURAL:$1|vartotojo vardas ir slaptažodis rodomi|vartotojų vardų ir slaptažodžių sąrašas rodomas}} žemiau.",
-       "passwordreset-emailerror-capture2": "El. laiško siuntimas {{GENDER:$2|vartotojui}} nepavyko: $1 {{PLURAL:$3|vartotojo vardas ir slaptažodis rodomi|vartotojų vardų ir slaptažodžių sąrašas rodomas}} žemiau.",
+       "passwordreset-emailsent-capture2": "Slaptažodžio keitimo {{PLURAL:$1|el. laiškas buvo išsiųstas|el. laiškai buvo išsiųsti}}. {{PLURAL:$1|vartotojo vardas ir slaptažodis rodomi|vartotojų vardų ir slaptažodžių sąrašas rodomas}} čia.",
+       "passwordreset-emailerror-capture2": "El. laiško siuntimas {{GENDER:$2|vartotojui}} nepavyko: $1 {{PLURAL:$3|vartotojo vardas ir slaptažodis rodomi|vartotojų vardų ir slaptažodžių sąrašas rodomas}} čia.",
        "passwordreset-nocaller": "Skambinantysis turi būti nurodytas",
        "passwordreset-nosuchcaller": "Skambinantysis neegzistuoja: $1",
        "passwordreset-invalideamil": "Neteisingas el. pašto adresas",
        "subject-preview": "Temos peržiūra:",
        "previewerrortext": "Įvyko klaida bandant peržiūrėti jūsų pakeitimus.",
        "blockedtitle": "Naudotojas yra užblokuotas",
-       "blockedtext": "'''Jūsų naudotojo vardas arba IP adresas yra užblokuotas.'''\n\nUžblokavo $1. Nurodyta priežastis yra ''$2''.\n\n* Blokavimo pradžia: $8\n* Blokavimo pabaiga: $6\n* Numatytas blokuojamasis: $7\n\nJūs galite susisiekti su $1 arba kuriuo nors kitu [[{{MediaWiki:Grouppage-sysop}}|administratoriumi]] ir aptarti neaiškumus dėl blokavimo.\nAtkreipkite dėmesį, kad negalėsite naudotis funkcija „Rašyti laišką šiam naudotojui“, jei nesate užsiregistravę ir pateikę realaus savo el. pašto adreso naudotojo [[Special:Preferences|nustatymuose]], arba, jei jums užblokuotas šios funkcijos naudojimas.\nJūsų IP adresas yra $3, o blokavimo ID yra #$5.\nPrašome nurodyti vieną iš jų ar abu, kai kreipiatės dėl blokavimo.",
+       "blockedtext": "'''Jūsų naudotojo vardas arba IP adresas yra užblokuotas.'''\n\nUžblokavo $1. Nurodyta priežastis yra ''$2''.\n\n* Blokavimo pradžia: $8\n* Blokavimo pabaiga: $6\n* Užblokuotasis: $7\n\nJūs galite susisiekti su $1 arba kuriuo nors kitu [[{{MediaWiki:Grouppage-sysop}}|administratoriumi]] ir aptarti neaiškumus dėl blokavimo.\nAtkreipkite dėmesį, kad negalėsite naudotis funkcija „Rašyti laišką šiam naudotojui“, jei nesate užsiregistravę ir pateikę galiojančio el. pašto adreso naudotojo paskyros [[Special:Preferences|nustatymuose]], arba, jei jums užblokuotas šios funkcijos naudojimas.\nJūsų IP adresas yra $3, o blokavimo ID yra #$5.\nPrašome nurodyti vieną iš jų ar abu, kai kreipiatės dėl blokavimo.",
        "autoblockedtext": "Jūsų IP adresas buvo automatiškai užblokuotas, nes jį naudojo kitas naudotojas, kurį užblokavo $1.\nNurodyta priežastis yra ši:\n\n:''$2''\n\n* Blokavimo pradžia: $8\n* Blokavimo pabaiga: $6\n* Numatomas blokavimo laikas: $7\n\nJūs galite susisiekti su $1 arba kitu [[{{MediaWiki:Grouppage-sysop}}|administratoriumi]], kad aptartumėte neaiškumus dėl blokavimo.\n\nJūs negalite naudotis funkcija „Rašyti laišką šiam naudotojui“, jei nesate nurodę tikro el. pašto adreso savo [[Special:Preferences|naudotojo nustatymuose]]. Taip pat Jūs negalite naudotis šia funkcija, jei Jums užblokuotas jos naudojimas.\n\nJūsų IP adresas yra $3, blokavimo ID yra $5.\nPrašome nurodyti šiuos duomenis visais atvejais, kai kreipiatės dėl blokavimo.",
        "blockednoreason": "priežastis nenurodyta",
        "whitelistedittext": "Jūs turite $1, kad redaguotumėte puslapius.",
        "newarticletext": "Jūs patekote į dar neegzistuojantį puslapį.\nNorėdami sukurti puslapį, pradėkite rašyti žemiau esančiame įvedimo lauke\n(plačiau [$1 pagalbos puslapyje]).\nJei patekote čia per klaidą, paprasčiausiai spustelkite  naršyklės mygtuką '''atgal'''.",
        "anontalkpagetext": "----''Tai yra anoniminio naudotojo, nesusikūrusio arba nenaudojančio paskyros, aptarimų puslapis.\nDėl to naudojamas IP adresas jo identifikavimui.\nŠis IP adresas gali būti dalinamas keliems naudotojams.\nJeigu Jūs esate anoniminis naudotojas ir atrodo, kad komentarai nėra skirti Jums, [[Special:CreateAccount|sukurkite paskyrą]] arba [[Special:UserLogin|prisijunkite]], ir nebūsite tapatinamas su kitais anoniminiais naudotojais.''",
        "noarticletext": "Šiuo metu šiame puslapyje nėra jokio teksto.\nJūs galite [[Special:Search/{{PAGENAME}}|ieškoti šio puslapio pavadinimo]] kituose puslapiuose,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ieškoti susijusių įrašų] arba [{{fullurl:{{FULLPAGENAME}}|action=edit}} sukurti šį puslapį]</span>.",
-       "noarticletext-nopermission": "Šiuo metu šiame puslapyje nėra jokio teksto.\nJūs galite [[Special:Search/{{PAGENAME}}|ieškoti šio puslapio pavadinimo]] kituose puslapiuose,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ieškoti susijusių įrašų]</span>, bet jūs neturite teisės sukurti šį puslapį.",
+       "noarticletext-nopermission": "Šiuo metu šiame puslapyje nėra jokio teksto.\nJūs galite [[Special:Search/{{PAGENAME}}|ieškoti šio puslapio pavadinimo]] kituose puslapiuose,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ieškoti susijusių įrašų]</span>, tačiau jūs neturite teisės sukurti šio puslapio.",
        "missing-revision": "Puslapio peržiūra #$1 pavadinto „{{FULLPAGENAME}}“ neegzistuoja.\n\nTai paprastai atsitinka kai pasenusi nuoroda veda į puslapį, kuris buvo ištrintas.\nInformaciją galima rasti [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].",
        "userpage-userdoesnotexist": "Naudotojo paskyra „<nowiki>$1</nowiki>“ yra neužregistruota. Prašom patikrinti, ar jūs norite kurti/redaguoti šį puslapį.",
        "userpage-userdoesnotexist-view": "Naudotojo paskyra „$1“ neužregistruota.",
        "invalid-content-data": "Neleistinas turinys.",
        "content-not-allowed-here": "Turinys \"$1\" puslapyje [[$2]] nėra leistinas.",
        "editwarning-warning": "Palikdamas šį puslapį jūs galite prarasti visus padarytus pakeitimus.\nJei esate prisijungęs, galite išjungti šį perspėjimą jūsų nustatymų skyrelyje \"{{int:prefs-editing}}\".",
+       "editpage-invalidcontentmodel-title": "Turinio modelis nepalaikomas",
+       "editpage-invalidcontentmodel-text": "Turinio modulis „$1“ nėra palaikomas.",
        "editpage-notsupportedcontentformat-title": "Turinio formatas nepalaikomas",
        "editpage-notsupportedcontentformat-text": "Turinio formatas $1 nepalaiko turinio modelio $2.",
        "content-model-wikitext": "vikitekstas",
        "suppressionlog": "Trynimo sąrašas",
        "suppressionlogtext": "Žemiau yra trynimų ir blokavimų sąrašas, įtraukiant turinį, paslėptą nuo administratorių.\nŽiūrėkite [[Special:BlockList|blokavimų sąrašą]], kad rastumėte dabar veikiančius draudimus ir blokavimus.",
        "mergehistory": "Sujungti puslapių istorijas",
-       "mergehistory-header": "Šis puslapis leidžia jus prijungti vieno pirminio puslapio istorijos versijas į naujesnį puslapį. Įsitikinkite, kad šis pakeitimas palaikys istorinį puslapio tęstinumą.\n\n'''Turi likti bent dabartinė pirminio puslapio versija.'''",
+       "mergehistory-header": "Šis puslapis leidžia jums prijungti vieno pirminio puslapio istorijos versijas į naujesnį puslapį. Įsitikinkite, kad šis pakeitimas palaikys istorinį puslapio tęstinumą.\n\n'''Turi likti bent dabartinė pirminio puslapio versija.'''",
        "mergehistory-box": "Sujungti dviejų puslapių versijas:",
        "mergehistory-from": "Pirminis puslapis:",
        "mergehistory-into": "Paskirties puslapis:",
        "searchprofile-advanced-tooltip": "Ieškoti skirtingose vardų srityse",
        "search-result-size": "$1 ({{PLURAL:$2|1 žodis|$2 žodžiai|$2 žodžių}})",
        "search-result-category-size": "{{PLURAL:$1|1 narys|$1 narių}} ({{PLURAL:$2|1 subkategorijoje|$2 subkategorijų}}, {{PLURAL:$3|1 failas|$3 failų}})",
-       "search-redirect": "(peradresavimas $1)",
+       "search-redirect": "(peradresavimas iš $1)",
        "search-section": "(skyrius $1)",
        "search-category": "(kategorija $1)",
        "search-file-match": "(atitinka rinkmenos turinį)",
        "prefs-user-pages": "Naudotojo puslapiai",
        "prefs-personal": "Naudotojo profilis",
        "prefs-rc": "Naujausi keitimai",
-       "prefs-watchlist": "Stebimų sąrašas",
+       "prefs-watchlist": "Stebimų sąrašas",
        "prefs-editwatchlist": "Redaguoti stebimųjų sąrašą",
-       "prefs-editwatchlist-label": "Redaguoti įrašus savo stebėjimo sąraše:",
-       "prefs-editwatchlist-edit": "Peržiūrėti ir pašalinti pavadinmus savo stebėjimo sąraše",
+       "prefs-editwatchlist-label": "Redaguoti įrašus stebėjimųjų sąraše:",
+       "prefs-editwatchlist-edit": "Peržiūrėti ir pašalinti puslapius iš stebimųjų sąrašo",
        "prefs-editwatchlist-raw": "Redaguoti grynąjį stebimųjų sąrašą",
        "prefs-editwatchlist-clear": "Išvalyti stebimųjų sąrašą",
        "prefs-watchlist-days": "Dienos rodomos stebimųjų sąraše:",
        "timezoneregion-europe": "Europa",
        "timezoneregion-indian": "Indijos vandenynas",
        "timezoneregion-pacific": "Ramusis vandenynas",
-       "allowemail": "Leisti siųsti el. laiškus iš kitų naudotojų",
+       "allowemail": "Leisti kitiems naudotojams siųsti man el. laiškus",
        "prefs-searchoptions": "Paieška",
        "prefs-namespaces": "Vardų sritys",
        "default": "pagal nutylėjimą",
        "email": "El. paštas",
        "prefs-help-realname": "Tikrasis vardas yra neprivalomas.\nJei jūs jį įvesite, jis bus naudojamas pažymėti jūsų darbą.",
        "prefs-help-email": "E-pašto adresas yra neprivalomas, tačiau reikalingas slaptažodį naujo, turi tu pamiršai savo slaptažodį.",
-       "prefs-help-email-others": "Taip pat galite pasirinkti, kad žmonės galėtų susisiekti su jumis per jūsų naudotojo ar naudotojo aptarimo puslapį neatskleidžiant jūsų tapatybės.",
+       "prefs-help-email-others": "Taip pat galite pasirinkti, kad žmonės galėtų susisiekti su jumis el. paštu per jūsų naudotojo ar naudotojo aptarimo puslapyje esančią nuorodą. Jūsų el. pašto adresas, kitam naudotojui su jumis susisiekus, nėra atskleidžiamas.",
        "prefs-help-email-required": "El. pašto adresas yra būtinas.",
        "prefs-info": "Pagrindinė informacija",
        "prefs-i18n": "Kalbos nustatymai",
        "right-edituserjs": "Redaguoti kitų naudotojų JS failus",
        "right-editmyusercss": "Redaguoti savo vartotojo CSS failus",
        "right-editmyuserjs": "Redaguokite savo naudotojo vartotojo JavaScript failus",
-       "right-viewmywatchlist": "Peržiūrėti savo stebimų sąrašą",
+       "right-viewmywatchlist": "Peržiūrėti savo stebimų sąrašą",
        "right-editmywatchlist": "Keiskite savo stebimųjų sąrašą. Atminkite, kad kai kurie veiksmai vis vien pridės puslapius netgi be tokios teisės.",
        "right-viewmyprivateinfo": "Peržiūrėti asmeninius duomenis (pvz., elektroninis paštas, tikras vardas)",
        "right-editmyprivateinfo": "Keisti asmeninius duomenis (pvz., elektroninis paštas, tikras vardas)",
        "grant-generic": "\"$1\" teisių rinkinys",
        "grant-group-page-interaction": "Sąveikauti su puslapiais",
        "grant-group-file-interaction": "Sąveikauti su medija",
-       "grant-group-watchlist-interaction": "Sąveikauti su savo stebimu sąrašu",
+       "grant-group-watchlist-interaction": "Sąveikauti su savo stebimųjų sąrašu",
        "grant-group-email": "Siųsti el. laišką",
        "grant-group-high-volume": "Atlikti didelės apimties veiklą",
        "grant-group-customization": "Pritaikymas ir parinktys",
        "enhancedrc-history": "istorija",
        "recentchanges": "Naujausi keitimai",
        "recentchanges-legend": "Naujausių keitimų parinktys",
-       "recentchanges-summary": "Å iame puslapyje yra patys naujausi pakeitimai Å¡iame projekte.",
+       "recentchanges-summary": "Žemiau pateikiamas naujausių Å¡io projekto pakeitimų sÄ\85raÅ¡as.",
        "recentchanges-noresult": "Per nurodytą laiką atliktų keitimų, atitinkančių nurodytas sąlygas, nėra.",
        "recentchanges-feed-description": "Sekite pačius naujausius projekto keitimus šiame šaltinyje.",
        "recentchanges-label-newpage": "Šiuo keitimu sukurtas naujas puslapis",
        "upload-foreign-cant-upload": "Šis vikis nėra sukonfigūruotas failų įkėlimui į nurodytą išorinę failų talpyklą.",
        "upload-dialog-title": "Įkelti failą",
        "upload-dialog-button-cancel": "Atšaukti",
+       "upload-dialog-button-back": "Atgal",
        "upload-dialog-button-done": "Atlikta",
        "upload-dialog-button-save": "Išsaugoti",
        "upload-dialog-button-upload": "Įkelti",
        "listfiles-delete": "trinti",
        "listfiles-summary": "Šiame specialiame puslapyje rodomos visos įkeltos rinkmenos.",
        "listfiles_search_for": "Ieškoti failo pavadinimo:",
-       "listfiles-userdoesnotexist": "Vartotojo paskyrą „$1“ nėra registruota.",
+       "listfiles-userdoesnotexist": "Naudotojo paskyra „$1“ nėra užregistruota.",
        "imgfile": "rinkmena",
        "listfiles": "Failų sąrašas",
        "listfiles_thumb": "Miniatiūra",
        "statistics-users-active-desc": "Naudotojai, kurie per {{PLURAL:$1|paskutinę dieną|paskutines $1 dienų}} padarė keitimų",
        "pageswithprop": "Puslapiai su puslapio atributais",
        "pageswithprop-legend": "Puslapiai su puslapio atributais",
-       "pageswithprop-text": "Šiame puslapyje pateikiami puslapiai, kurie ypač naudoja puslapio atributus.",
-       "pageswithprop-prop": "Ypatybės pavadinimas:",
+       "pageswithprop-text": "Šiame puslapyje pateikiami puslapiai, turintys atitinkamą puslapio atributą.",
+       "pageswithprop-prop": "Atributo pavadinimas:",
        "pageswithprop-submit": "Eiti",
        "pageswithprop-prophidden-long": "ilgo teksto turto vertė paslėpta ($1)",
        "pageswithprop-prophidden-binary": "dvejetainė turto vertė paslėpta ($1)",
        "uncategorizedtemplates": "Šablonai, nepriskirti jokiai kategorijai",
        "unusedcategories": "Nenaudojamos kategorijos",
        "unusedimages": "Nenaudojami failai",
-       "wantedcategories": "Geidžiamiausios kategorijos",
-       "wantedpages": "Geidžiamiausi puslapiai",
+       "wantedcategories": "Reikiamiausios kategorijos",
+       "wantedpages": "Reikiamiausi puslapiai",
        "wantedpages-summary": "Sąrašas neegzistuojančių puslapių su daugiausią nuorodų į juos, išskyrus puslapius, kurie turi tik nukreipimus į juos. Jei norite pamatyti sąrašą neegzistuojančių puslapių, su nukreipimais į juos, žiūrėkite [[{{#special:BrokenRedirects}}|neveikiančių nuorodų sąrašą]].",
        "wantedpages-badtitle": "Neleistinas pavadinimas rezultatų rinkinyje: $1",
-       "wantedfiles": "Trokštami failai",
-       "wantedfiletext-cat": "Sekantys failai yra naudojami, bet neegzistuoja. Čia failai iš išorinių saugyklų gali būti išvardinti, nors jie jose ir egzistuoja. Failai netenkinantys šių sąlygų gali būti <del>perbraukti</del>. Papildomai peržiūrėkite [[:$1|puslapius]], kuriuose yra naudojami čia išvardinti neegzistuojantys failai.",
+       "wantedfiles": "Reikiamiausi failai",
+       "wantedfiletext-cat": "Šiame puslapyje pateikiami failai, kurie yra naudojami, bet neegzistuoja. Čia gali būti išvardinti failai iš išorinių saugyklų, nors jie jose ir egzistuoja. Tokiu atveju failų pavadinimai yra <del>perbraukti</del>. Be to, puslapiai, kuriuose esama neegzistuojančių failų, yra išvardinti [[:$1|čia]].",
        "wantedfiletext-cat-noforeign": "Šie failai yra naudojami, bet neegzistuoja. Be to, puslapiai su šiais failais, kurie neegzistuoja yra išvardinti [[:$1]].",
-       "wantedfiletext-nocat": "Sekantys failai yra naudojami, bet neegzistuoja. Čia failai iš išorinių saugyklų gali būti išvardinti, nors jie jose ir egzistuoja. Failai netenkinantys šių sąlygų gali būti <del>perbraukti</del>.",
+       "wantedfiletext-nocat": "Šiame puslapyje pateikiami failai, kurie yra naudojami, bet neegzistuoja. Čia gali būti išvardinti failai iš išorinių saugyklų, nors jie jose ir egzistuoja. Tokiu atveju failų pavadinimai yra <del>perbraukti</del>.",
        "wantedfiletext-nocat-noforeign": "Šios rinkmenos yra naudojamos, tačiau nesti.",
-       "wantedtemplates": "Trokštami šablonai",
+       "wantedtemplates": "Reikiamiausi šablonai",
        "mostlinked": "Daugiausiai nurodomi puslapiai",
        "mostlinkedcategories": "Daugiausiai nurodomos kategorijos",
        "mostlinkedtemplates": "Daugiausiai nurodomi šablonai",
        "apisandbox-results-fixtoken-fail": "Nepavyko gauti „$1“ žetono.",
        "apisandbox-alert-page": "Laukai šiame puslapyje yra negalimi.",
        "apisandbox-alert-field": "Šio lauko reikšmė yra neteisinga.",
+       "apisandbox-continue": "Tęsti",
+       "apisandbox-continue-clear": "Išvalyti",
        "booksources": "Knygų šaltiniai",
        "booksources-search-legend": "Knygų šaltinių paieška",
        "booksources-search": "Ieškoti",
        "mailnologin": "Nėra adreso",
        "mailnologintext": "Jums reikia būti [[Special:UserLogin|prisijungusiam]] ir turi būti įvestas teisingas el. pašto adresas jūsų [[Special:Preferences|nustatymuose]], kad siųstumėte el. laiškus kitiems nautotojams.",
        "emailuser": "Rašyti laišką šiam naudotojui",
-       "emailuser-title-target": "Siųsti E-pašto žinutę {{GENDER:$1|user}}",
+       "emailuser-title-target": "Siųsti el. pašto žinutę {{GENDER:$1|naudotojui|naudotojai}}",
        "emailuser-title-notarget": "El. pašto vartotojas",
-       "emailpagetext": "Jūs galite pasinaudoti šiuo pavyzdžiu, norėdami nusiųsti elektroninį laišką šiam naudotojui.\nElektroninio pašto adresas, kurį įvedėte [[Special:Preferences|savo naudotojo nustatymuose]], bus rodomas kaip el. pašto siuntėjo adresas, tam, kad gavėjas galėtų jums iškart atsakyti.",
+       "emailpagetext": "Jūs galite pasinaudoti šiuo pavyzdžiu, norėdami nusiųsti elektroninį laišką {{GENDER:$1|šiam naudotojui|šiai naudotojai}}.\nElektroninio pašto adresas, kurį įvedėte [[Special:Preferences|savo naudotojo nustatymuose]], bus rodomas kaip el. pašto siuntėjo adresas tam, kad gavėjas galėtų tiesiogiai jums atsakyti.",
        "defemailsubject": "{{SITENAME}} el. pašto iš vartotojo \" $1 \"",
        "usermaildisabled": "Naudotojo elektroninis paštas išjungtas",
        "usermaildisabledtext": "Jūs negalite siūlsti el. laiško kitiems šio wiki projekto naudotojams.",
        "emailuserfooter": "Šis el. laiškas buvo išsiųstas naudotojo $1 naudotojui $2 naudojant „{{int:emailuser}}“ funkciją {{SITENAME}}.",
        "usermessage-summary": "Paliekamas sistemos pranešimas.",
        "usermessage-editor": "Sistemos pranešėjas",
-       "watchlist": "Stebimų sąrašas",
-       "mywatchlist": "Stebimų sąrašas",
-       "watchlistfor2": "Naudotojo $1 $2",
+       "watchlist": "Stebimų sąrašas",
+       "mywatchlist": "Stebimų sąrašas",
+       "watchlistfor2": "Naudotojas: $1 $2",
        "nowatchlist": "Neturite nei vieno stebimo puslapio.",
        "watchlistanontext": "Prašome prisijungti, kad peržiūrėtumėte ar pakeistumėte elementus savo stebimųjų sąraše.",
        "watchnologin": "Neprisijungęs",
        "addwatch": "Pridėti į stebimųjų sąrašą",
        "addedwatchtext": "\"[[:$1]]\" ir jo aptarimo puslapis buvo įtraukti į Jūsų [[Special:Watchlist|stebėjimo sąrašą]].",
+       "addedwatchtext-talk": "\"[[:$1]]\" ir su juo susijęs puslapis buvo įtraukti į Jūsų [[Special:Watchlist|stebimųjų sąrašą]].",
        "addedwatchtext-short": "Puslapis „$1“ pridėtas į jūsų stebimųjų sąrašą.",
        "removewatch": "Pašalinti iš stebimųjų sąrašo",
        "removedwatchtext": "\"[[:$1]]\" ir jo aptarimo puslapis buvo pašalinti iš Jūsų [[Special:Watchlist|stebėjimo sąrašo]].",
+       "removedwatchtext-talk": "\"[[:$1]]\" ir su juo susijęs puslapis buvo pašalinti iš Jūsų [[Special:Watchlist|stebimųjų sąrašo]].",
        "removedwatchtext-short": "Puslapis „$1“ pašalintas iš jūsų stebimųjų sąrašo.",
        "watch": "Stebėti",
        "watchthispage": "Stebėti šį puslapį",
        "unwatchthispage": "Nustoti stebėti",
        "notanarticle": "Ne turinio puslapis",
        "notvisiblerev": "Versija buvo ištrinta",
-       "watchlist-details": "Stebima {{PLURAL:$1|$1 puslapis|$1 puslapiai|$1 puslapių}} neskaičiuojant aptarimų puslapių.",
+       "watchlist-details": "Stebima {{PLURAL:$1|$1 puslapis|$1 puslapiai|$1 puslapių}}, neskaičiuojant aptarimų puslapių.",
        "wlheader-enotif": "El. pašto pranešimai yra įjungti.",
        "wlheader-showupdated": "Puslapiai pakeisti nuo tada, kai paskutinį kartą apsilankėte juose, yra pažymėti '''pastorintai'''",
        "wlnote": "{{PLURAL:$1|Rodomas '''$1''' paskutinis pakeitimas, atliktas|Rodomi '''$1''' paskutiniai pakeitimai, atlikti|Rodoma '''$1''' paskutinių pakeitimų, atliktų}} per '''$2''' {{PLURAL:$2|paskutinę valandą|paskutines valandas|paskutinių valandų}}, nuo $3 $4.",
        "enotif_lastvisited": "Užeikite į $1, jei norite matyti pakeitimus nuo paskutiniojo apsilankymo.",
        "enotif_lastdiff": "Užeikite į $1, jei norite pamatyti šį pakeitimą.",
        "enotif_anon_editor": "anoniminis naudotojas $1",
-       "enotif_body": "$WATCHINGUSERNAME,\n\n\n$PAGEEDITDATE {{SITENAME}} projekte $PAGEEDITOR $CHANGEDORCREATED puslapį „$PAGETITLE“, dabartinę versiją rasite adresu $PAGETITLE_URL.\n\n$NEWPAGE\n\nRedaguotojo komentaras: $PAGESUMMARY $PAGEMINOREDIT\n\nSusisiekti su redaguotoju:\nel. paštu: $PAGEEDITOR_EMAIL\nwiki: $PAGEEDITOR_WIKI\n\nDaugiau pranešimų apie vėlesnius pakeitimus nebus siunčiama, jei neapsilankysite puslapyje.\nJūs taip pat galite išjungti pranešimo žymę visiems jūsų stebimiems puslapiams savo stebimųjų sąraše.\n\n Jūsų draugiškoji projekto {{SITENAME}} pranešimų sistema\n\n--\nNorėdami pakeisti e-paštu siunčiamų pranešimų nustatymus, užeikite į\n{{canonicalurl:{{#special:Preferences}}}}\n\nNorėdami pakeisti stebimų puslapių nustatymus, užeikite į\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nNorėdami puslapį iš stebimų puslapių sąrašo, užeikite į\n$UNWATCHURL\n\nAtsiliepimai ir pagalba:\n$HELPPAGE",
+       "enotif_body": "$WATCHINGUSERNAME,\n\n\n$PAGEEDITDATE {{SITENAME}} projekte $PAGEEDITOR $CHANGEDORCREATED puslapį „$PAGETITLE“, dabartinę versiją rasite adresu $PAGETITLE_URL.\n\n$NEWPAGE\n\nRedaguotojo komentaras: $PAGESUMMARY $PAGEMINOREDIT\n\nSusisiekti su redaguotoju:\nel. paštu: $PAGEEDITOR_EMAIL\nwiki: $PAGEEDITOR_WIKI\n\nDaugiau pranešimų apie vėlesnius pakeitimus nebus siunčiama, jei neapsilankysite puslapyje.\nJūs taip pat galite išjungti pranešimo žymę visiems jūsų stebimiems puslapiams savo stebimųjų sąraše.\n\n Jūsų draugiškoji projekto {{SITENAME}} pranešimų sistema\n\n--\nNorėdami pakeisti e-paštu siunčiamų pranešimų nustatymus, užeikite į\n{{canonicalurl:{{#special:Preferences}}}}\n\nNorėdami pakeisti stebimųjų puslapių nustatymus, užeikite į\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nNorėdami puslapį iš stebimųjų puslapių sąrašo, užeikite į\n$UNWATCHURL\n\nAtsiliepimai ir pagalba:\n$HELPPAGE",
        "created": "sukurė",
        "changed": "pakeitė",
        "deletepage": "Trinti puslapį",
        "delete-toobig": "Šis puslapis turi ilgą keitimų istoriją, daugiau nei $1 {{PLURAL:$1|revizija|revizijos|revizijų}}. Tokių puslapių trynimas yra apribotas, kad būtų išvengta atsitiktinio {{SITENAME}} žlugdymo.",
        "delete-warning-toobig": "Šis puslapis turi ilgą keitimų istoriją, daugiau nei $1 {{PLURAL:$1|revizija|revizijos|revizijų}}. Trinant jis gali sutrikdyti {{SITENAME}} duomenų bazės operacijas; būkite atsargūs.",
        "deleteprotected": "Jūs šio puslapio ištrinti negalite, nes jis apsaugotas.",
-       "deleting-backlinks-warning": "'''Dėmesio:''' [[Special:WhatLinksHere/{{FULLPAGENAME}}|Kiti puslapiai]] nurodo ar įtraukia puslapį, kurį ruošiatės trinti.",
+       "deleting-backlinks-warning": "<strong>Dėmesio:</strong> [[Special:WhatLinksHere/{{FULLPAGENAME}}|Kiti puslapiai]] nurodo ar įtraukia puslapį, kurį ruošiatės trinti.",
        "rollback": "Atmesti keitimus",
        "rollbacklink": "atmesti",
        "rollbacklinkcount": "atmesti $1 {{PLURAL:$1|keitimą|keitimus}}",
        "rollbacklinkcount-morethan": "atmesti daugiau nei $1 {{PLURAL:$1|keitimą|keitimų}}",
        "rollbackfailed": "Atmetimas nepavyko",
+       "rollback-missingrevision": "Nepavyko įkelti versijos duomenų.",
        "cantrollback": "Negalima atmesti redagavimo; paskutinis keitęs naudotojas yra šio puslapio autorius.",
        "alreadyrolled": "Nepavyko atmesti paskutinio [[User:$2|$2]] ([[User talk:$2|Aptarimas]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) daryto puslapio [[:$1]] keitimo;\nkažkas jau pakeitė puslapį arba suspėjo pirmas atmesti keitimą.\n\nPaskutimas keitimas darytas naudotojo [[User:$3|$3]] ([[User talk:$3|Aptarimas]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).",
        "editcomment": "Pateiktas toks keitimo paaiškinimas: <em>$1</em>.",
        "revertpage": "Atmestas [[Special:Contributions/$2|$2]] ([[User talk:$2|Aptarimas]]) pakeitimas; sugrąžinta [[User:$1|$1]] versija",
        "revertpage-nouser": "Atversti pakeitimai paslėpto vartotojo, grąžino prieš tai buvusią versiją {{GENDER:$1|[[User:$1|$1]]}}",
        "rollback-success": "Atmesti $1 pakeitimai;\ngrąžinta prieš tai buvusi $2 versija.",
+       "rollback-success-notify": "Atmesti $1 pakeitimai;\ngrąžinta prieš tai buvusi $2 versija. [$3 Rodyti skirtumus]",
        "sessionfailure-title": "Sesijos klaida",
        "sessionfailure": "Atrodo yra problemų su jūsų prisijungimo sesija; šis veiksmas buvo atšauktas kaip atsargumo priemonė prieš sesijos vogimą.\nPrašome paspausti „atgal“ ir perkraukite puslapį iš kurio atėjote, ir pamėginkite vėl.",
        "changecontentmodel": "Keisti puslapio turinio modelį",
        "changecontentmodel-cannot-convert": "Turinys [[:$1]] negali būti konvertuotas į $2 tipą.",
        "changecontentmodel-nodirectediting": "$1 turinio modelis nepalaiko tiesioginio redagavimo",
        "changecontentmodel-emptymodels-title": "Nėra prieinamų turinio modelių",
+       "changecontentmodel-emptymodels-text": "[[:$1]] turinys negali būti konvertuotas į jokį tipą.",
        "log-name-contentmodel": "Turinio modelio kaitos istorija",
        "log-description-contentmodel": "Įvykiai susiję su puslapio turinio modeliu",
+       "logentry-contentmodel-new": "$1 {{GENDER:$2|sukūrė}} puslapį $3, naudodamas nestandartinį turinio modelį \"$5\"",
        "logentry-contentmodel-change": "$1 {{GENDER:$2|atnaujino}} puslapio $3 turinio modelį iš $4 į $5",
        "logentry-contentmodel-change-revertlink": "atšaukti",
        "logentry-contentmodel-change-revert": "atšaukti",
        "protectlogtext": "Žemiau yra puslapių užrakinimų bei atrakinimų sąrašas.\nDabar veikiančių puslapių apsaugų sąrašą rasite [[Special:ProtectedPages|apsaugotų puslapių sąraše]].",
        "protectedarticle": "užrakino „[[$1]]“",
        "modifiedarticleprotection": "pakeistas „[[$1]]“ apsaugos lygis",
-       "unprotectedarticle": "pašalino apsaugą nuo „[[$1]]“",
+       "unprotectedarticle": "atrakino „[[$1]]“",
        "movedarticleprotection": "perkelti apsaugos nustatymai iš „[[$2]]“ į „[[$1]]“",
        "protect-title": "Nustatomas apsaugos lygis puslapiui „$1“",
        "protect-title-notallowed": "Peržiūrėti \"$1\" apsaugos lygį",
        "undeletehistorynoadmin": "Šis puslapis buvo ištrintas. Žemiau rodoma trynimo priežastis bei kas redagavo puslapį iki ištrynimo. Ištrintų puslapių tekstas yra galimas tik administratoriams.",
        "undelete-revision": "Ištrinta $1 versija, kurią $4 d. $5 sukūrė $3:",
        "undeleterevision-missing": "Neteisinga arba dingusi versija. Jūs turbūt turite blogą nuorodą, arba versija buvo atkurta arba pašalinta iš archyvo.",
+       "undeleterevision-duplicate-revid": "{{PLURAL:$1|Viena versija|$1 versijos}} negalėjo būti atkurtos, nes {{PLURAL:$1|jos|jų}} <code>rev_id</code> jau buvo naudojamas.",
        "undelete-nodiff": "Nerasta jokių ankstesnių versijų.",
        "undeletebtn": "Atkurti",
        "undeletelink": "žiūrėti/atkurti",
        "blanknamespace": "(Pagrindinis)",
        "contributions": "{{GENDER:$1|Naudotojo}} indėlis",
        "contributions-title": "{{GENDER:$1|Naudotojo|Naudotojos}} $1 indėlis",
-       "mycontris": "Įnašai",
-       "anoncontribs": "Įnašai",
-       "contribsub2": "Dėl {{GENDER:$3|$1}} ($2)",
+       "mycontris": "Indėlis",
+       "anoncontribs": "Indėlis",
+       "contribsub2": "Naudotojas: {{GENDER:$3|$1}} ($2)",
        "contributions-userdoesnotexist": "Naudotojo paskyra „$1“ neužregistruota.",
        "nocontribs": "Jokie keitimai neatitiko šių kriterijų.",
        "uctop": "(dabartinis)",
        "sp-contributions-newbies": "Rodyti tik naujų paskyrų keitimus",
        "sp-contributions-newbies-sub": "Neseniai prisiregistravusieji",
        "sp-contributions-newbies-title": "Naujai užsiregistravusių naudotojų indėlis",
-       "sp-contributions-blocklog": "Blokavimų sąrašas",
-       "sp-contributions-suppresslog": "ištrintas naudotojo indėlis",
-       "sp-contributions-deleted": "ištrintas naudotojo indėlis",
+       "sp-contributions-blocklog": "blokavimų sąrašas",
+       "sp-contributions-suppresslog": "ištrintas {{GENDER:$1|naudotojo|naudotojos}} indėlis",
+       "sp-contributions-deleted": "ištrintas {{GENDER:$1|naudotojo|naudotojos}} indėlis",
        "sp-contributions-uploads": "įkėlimai",
-       "sp-contributions-logs": "Specialiųjų veiksmų sąrašas",
+       "sp-contributions-logs": "specialiųjų veiksmų sąrašas",
        "sp-contributions-talk": "Aptarimas",
        "sp-contributions-userrights": "naudotojų teisių valdymas",
        "sp-contributions-blocked-notice": "Šis naudotojas šiuo metu užblokuotas.\nPateikiamas paskutinis blokavimo istorijos įrašas.",
        "sp-contributions-blocked-notice-anon": "Šis IP adresas yra užblokuotas.\nPaskutinis blokavimo įrašas pateikiamas žemiau:",
-       "sp-contributions-search": "Ieškoti įnašo",
+       "sp-contributions-search": "Ieškoti indėlio",
        "sp-contributions-username": "IP adresas arba naudotojo vardas:",
        "sp-contributions-toponly": "Rodyti tik paskutinius keitimus",
        "sp-contributions-newonly": "Rodyti tik tuos keitimus, kuriais sukurti nauji straipsniai",
-       "sp-contributions-hideminor": "Slėpti nedidelius pakeitimus",
+       "sp-contributions-hideminor": "Slėpti smulkius pakeitimus",
        "sp-contributions-submit": "Ieškoti",
        "whatlinkshere": "Susiję puslapiai",
        "whatlinkshere-title": "Puslapiai, kurie nurodo į „$1“",
        "ipb-unblock": "Atblokuoti naudotojo vardą arba IP adresą",
        "ipb-blocklist": "Rodyti egzistuojančius blokavimus",
        "ipb-blocklist-contribs": "{{GENDER:$1|$1}} indėlis",
-       "ipb-blocklist-duration-left": "$1 kairėje",
+       "ipb-blocklist-duration-left": "liko $1",
        "unblockip": "Atblokuoti naudotoją",
        "unblockiptext": "Naudokite šią formą, kad atkurtumėte redagavimo galimybę\nankščiau užblokuotam IP adresui ar naudotojui.",
        "ipusubmit": "Atblokuoti šį adresą",
        "blocklink": "blokuoti",
        "unblocklink": "atblokuoti",
        "change-blocklink": "keisti blokavimo nustatymus",
-       "contribslink": "įnašai",
+       "contribslink": "indėlis",
        "emaillink": "siųsti el. laišką",
        "autoblocker": "Jūs buvote automatiškai užblokuotas, nes jūsų IP adresą neseniai naudojo „[[User:$1|$1]]“. Nurodyta naudotojo $1 blokavimo priežastis: „$2“.",
        "blocklogpage": "Blokavimų sąrašas",
        "movenosubpage": "Šis puslapis neturi subpuslapių.",
        "movereason": "Priežastis:",
        "revertmove": "atmesti",
-       "delete_and_move_text": "==Reikia ištrinti==\n\nPaskirties puslapis „[[:$1]]“ jau yra. Ar norite jį ištrinti, kad galėtumėte pervardinti?",
+       "delete_and_move_text": "Paskirties puslapis „[[:$1]]“ jau yra. Ar norite jį ištrinti, kad galėtumėte pervardinti?",
        "delete_and_move_confirm": "Taip, trinti puslapį",
        "delete_and_move_reason": "Ištrinta dėl perkėlimo iš \"[[$1]]\"",
        "selfmove": "Šaltinio ir paskirties pavadinimai yra tokie patys; negalima pervardinti puslapio į save.",
        "move-leave-redirect": "Pervadinant palikti nukreipimą",
        "protectedpagemovewarning": "'''Dėmesio:''' Šis puslapis buvo užrakintas, kad tik naudotojai su administratoriaus teisėmis galėtų jį pervadinti.\nNaujausias įrašas žurnale yra pateiktas žemiau:",
        "semiprotectedpagemovewarning": "'''Pastaba''': Šis puslapis buvo užrakintas, kad tik registruoti naudotojai galėtų jį redaguoti.\nNaujausias įrašas žurnale yra pateiktas žemiau:",
-       "move-over-sharedrepo": "== Rinkmena jau yra ==\n[[:$1]] esti bendrojoje saugykloje. Įkėlus rinkmeną šiuo pavadinimu, ji pakeis bendrąją rinkmeną.",
+       "move-over-sharedrepo": "[[:$1]] esti bendrojoje saugykloje. Įkėlus rinkmeną šiuo pavadinimu, ji pakeis bendrąją rinkmeną.",
        "file-exists-sharedrepo": "Pasirinktas failo pavadinimas jau yra naudojamas bendrojoje saugykloje.\nPrašome pasirinkti kitą pavadinimą.",
        "export": "Eksportuoti puslapius",
        "exporttext": "Galite eksportuoti vieno puslapio tekstą ir istoriją ar kelių puslapių vienu metu tame pačiame XML atsakyme.\nŠie puslapiai galės būti importuojami į kitą projektą, veikiantį MediaWiki pagrindu, per [[Special:Import|importo puslapį]].\n\nNorėdami eksportuoti puslapius, įveskite pavadinimus žemiau esančiame tekstiniame lauke po vieną pavadinimą eilutėje, taip pat pasirinkite ar norite eksportuoti ir istoriją ar tik dabartinę versiją su paskutinio redagavimo informacija.\n\nPastaruoju atveju, jūs taip pat galite naudoti nuorodą, pvz. [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]] puslapiui „[[{{MediaWiki:Mainpage}}]]“.",
        "import-nonewrevisions": "Nebuvo importuotos jokios versijos (visos jau buvo įkeltos arba praleistos dėl klaidų).",
        "xml-error-string": "$1 $2 eilutėje, $3 stulpelyje ($4 baitas): $5",
        "import-upload": "Įkelti XML duomenis",
-       "import-token-mismatch": "Sesijos duomenys prarasti. Bandykite iš naujo.",
+       "import-token-mismatch": "Sesijos duomenys prarasti.\n\nGali būti, kad esate atsijungęs. <strong>Prašome patikrinti, ar vis dar esate prisijungęs, ir pabandyti iš naujo</strong>.\nJei ir toliau nepavyksta, pamėginkite [[Special:UserLogout|atsijungti]] ir vėl prisijungti, taip pat patikrinkite, ar jūsų naršyklė priima šios svetainės slapukus.",
        "import-invalid-interwiki": "Nepavyko importuoti iš nurodyto wiki projekto.",
        "import-error-edit": "Puslapis \"$1\" nebuvo įkeltas, nes jūs neturite teisės jį redaguoti.",
        "import-error-create": "Puslapis „$1“ nebuvo importuotas, nes jūs neturite teisės jį sukurti.",
        "confirm-unwatch-button": "Gerai",
        "confirm-unwatch-top": "Pašalinti šį puslapį iš jūsų stebimųjų sąrašo?",
        "confirm-rollback-button": "Gerai",
+       "confirm-rollback-top": "Atmesti šio puslapio pakeitimus?",
        "quotation-marks": "„$1“",
        "imgmultipageprev": "← ankstesnis puslapis",
        "imgmultipagenext": "kitas puslapis →",
        "lag-warn-high": "Dėl didelio duomenų bazės atsilikimo pakeitimai, naujesni nei $1 {{PLURAL:$1|sekundė|sekundės|sekundžių}}, šiame sąraše gali būti nerodomi.",
        "watchlistedit-normal-title": "Redaguoti stebimųjų sąrašą",
        "watchlistedit-normal-legend": "Šalinti puslapius iš stebimųjų sąrašo",
-       "watchlistedit-normal-explain": "Žemiau yra rodomi puslapiai jūsų stebimųjų sąraše.\nNorėdami pašalinti puslapį, prie jo uždėkite varnelė ir paspauskite „{{int:Watchlistedit-normal-submit}}“.\nJūs taip pat galite [[Special:EditWatchlist/raw|redaguoti grynąjį stebimųjų sąrašą]].",
+       "watchlistedit-normal-explain": "Žemiau yra rodomi puslapiai jūsų stebimųjų sąraše.\nNorėdami pašalinti puslapį, pažymėkite greta esančią varnelę ir paspauskite „{{int:Watchlistedit-normal-submit}}“.\nJūs taip pat galite [[Special:EditWatchlist/raw|redaguoti grynąjį stebimųjų sąrašą]].",
        "watchlistedit-normal-submit": "Šalinti puslapius",
        "watchlistedit-normal-done": "$1 {{PLURAL:$1|puslapis buvo pašalintas|puslapiai buvo pašalinti|puslapių buvo pašalinta}} iš jūsų stebimųjų sąrašo:",
        "watchlistedit-raw-title": "Redaguoti grynąjį stebimųjų sąrašą",
        "version-libraries-description": "Aprašymas",
        "version-libraries-authors": "Autoriai",
        "redirect": "Nukreiptas iš failo, naudotojo, versijos arba žurnalo įrašo ID",
-       "redirect-summary": "Šis specialus puslapis peradresuoją į failą (nurodant failo pavadinimą), puslapį (nurodant versijos ID ar puslapio ID), naudotojo puslapį (nurodant skaitinį naudotojo ID), arba žurnalo įrašą (nurodant žurnalo įrašo ID).\nNaudojimas: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]], [[{{#Special:Redirect}}/user/101]], arba[[{{#Special:Redirect}}/logid/186]].",
+       "redirect-summary": "Šis specialus puslapis peradresuoja į failą (nurodant failo pavadinimą), puslapį (nurodant versijos ID ar puslapio ID), naudotojo puslapį (nurodant skaitinį naudotojo ID), arba žurnalo įrašą (nurodant žurnalo įrašo ID). Naudojimas:\n[[{{#Special:Redirect}}/file/Example.jpg]],\n[[{{#Special:Redirect}}/page/64308]],[[{{#Special:Redirect}}/revision/328429]], [[{{#Special:Redirect}}/user/101]], arba\n[[{{#Special:Redirect}}/logid/186]].",
        "redirect-submit": "Eiti",
        "redirect-lookup": "Peržvalgos:",
        "redirect-value": "Vertė:",
        "redirect-file": "Failo vardas",
        "redirect-logid": "Žurnalo įrašo ID",
        "redirect-not-exists": "Vertė nėra nustatyta",
-       "fileduplicatesearch": "Ieškoti dublikuotų failų",
+       "fileduplicatesearch": "Ieškoti pasikartojančių failų",
        "fileduplicatesearch-summary": "Pasikartojančių failų paieška pagal jų kontrolinę sumą.",
        "fileduplicatesearch-filename": "Failo vardas:",
        "fileduplicatesearch-submit": "Ieškoti",
        "tag-filter": "[[Special:Tags|Žymų]] filtras:",
        "tag-filter-submit": "Filtras",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Žyma|Žymos}}]]: $2)",
+       "tag-mw-contentmodelchange": "turinio modulio keitimas",
+       "tag-mw-contentmodelchange-description": "Pakeitimai, kurie [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel keičia puslapio turinio modelį]",
        "tags-title": "Žymos",
        "tags-intro": "Šiame puslapyje yra žymų, kuriomis programinė įranga gali pažymėti keitimus, sąrašas bei jų reikšmės.",
        "tags-tag": "Žymos pavadinimas",
        "tags-actions-header": "Veiksmai",
        "tags-active-yes": "Taip",
        "tags-active-no": "Ne",
-       "tags-source-extension": "Apibrėžta papildinio",
+       "tags-source-extension": "Apibrėžta programinės įrangos",
        "tags-source-manual": "Taikoma vartotojų ar robotų rankiniu būdu",
        "tags-source-none": "Nebevartojamas",
        "tags-edit": "taisyti",
        "htmlform-title-not-exists": "$1 neegzistuoja.",
        "htmlform-user-not-exists": "<strong>$1</strong> neegzistuoja.",
        "htmlform-user-not-valid": "<strong>$1</strong> nėra tinkamas naudotojo vardas.",
-       "sqlite-has-fts": "$1 su visatekstės paieškos palaikymu",
-       "sqlite-no-fts": "$1 be visatekstės paieškos palaikymo",
        "logentry-delete-delete": "$1 {{GENDER:$2|ištrynė}} puslapį $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|atkūrė}} puslapį $3",
        "logentry-delete-event": "$1 {{GENDER:$2|pakeitė}} matomumą {{PLURAL:$5|žurnalo įvykio|$5 žurnalo įvykių}} $3: $4",
        "logentry-move-move-noredirect": "$1 {{GENDER:$2|perkėlė}} puslapį $3 į $4 be nukreipimo",
        "logentry-move-move_redir": "$1 {{GENDER:$2|perkėlė}} puslapį $3 į $4 (anksčiau buvo nukreipiamasis)",
        "logentry-move-move_redir-noredirect": "$1 {{GENDER:$2|pervadino}} puslapį $3 į $4, nesukurdamas nukreipimo",
-       "logentry-patrol-patrol": "$1 {{GENDER:$2|payžėmjo}} versiją $4 puslapio $3 kaip patruliuojama",
-       "logentry-patrol-patrol-auto": "$1 automatiškai {{GENDER:$2|pažymėjo}} versiją $4 puslapio $3 kaip patruliuojama",
-       "logentry-newusers-newusers": "Vartotojo paskyra $1 buvo {{GENDER:$2|sukurta}}",
+       "logentry-patrol-patrol": "$1 {{GENDER:$2|pažymėjo}} kaip patikrintą puslapio $3 versiją $4",
+       "logentry-patrol-patrol-auto": "$1 automatiškai {{GENDER:$2|pažymėjo}} kaip patikrintą puslapio $3 versiją $4",
+       "logentry-newusers-newusers": "Naudotojo paskyrą $1 {{GENDER:$2|sukūrė}}",
        "logentry-newusers-create": "$1 sukūrė naudotojo paskyrą",
-       "logentry-newusers-create2": "Vartotojo paskyra $3 buvo {{GENDER:$2|sukurta}} $1",
-       "logentry-newusers-byemail": "Vartotojo paskyra $3 buvo {{GENDER:$2|sukurta}} $1 ir slaptažodis išsiųstas el. paštu",
-       "logentry-newusers-autocreate": "Vartotojo paskyra $1 buvo {{GENDER:$2|sukurta}} automatiškai",
+       "logentry-newusers-create2": "$1 sukūrė naudotojo paskyrą $3",
+       "logentry-newusers-byemail": "Naudotojo paskyrą $3 {{GENDER:$2|sukūrė}} $1, slaptažodis išsiųstas el. paštu",
+       "logentry-newusers-autocreate": "Naudotojo paskyra $1 buvo {{GENDER:$2|sukurta}} automatiškai",
        "logentry-protect-move_prot": "$1 {{GENDER:$2|perkėlė}} apsaugos nustatymus iš $4 į $3",
-       "logentry-protect-unprotect": "$1 {{GENDER:$2|pašalino}} apsaugą nuo $3",
-       "logentry-protect-protect": "$1 {{GENDER:$2|apsaugojo}} $3 $4",
-       "logentry-protect-protect-cascade": "$1 {{GENDER:$2|apsaugojo}} $3 $4 [pakopinė]",
+       "logentry-protect-unprotect": "$1 {{GENDER:$2|atrakino}} $3",
+       "logentry-protect-protect": "$1 {{GENDER:$2|užrakino}} $3 $4",
+       "logentry-protect-protect-cascade": "$1 {{GENDER:$2|užrakino}} $3 $4 [pakopinė]",
        "logentry-protect-modify": "$1 {{GENDER:$2|pakeitė}} apsaugos lygį $3 $4",
        "logentry-protect-modify-cascade": "$1 {{GENDER:$2|pakeitė}} apsaugos lygį $3 $4 [pakopinė]",
        "logentry-rights-rights": "$1 {{GENDER:$2|pakeitė}} grupės narystę $3 iš $4 į $5",
        "feedback-external-bug-report-button": "Užpildyti techninę užduotį",
        "feedback-dialog-title": "Pateikti atsiliepimą",
        "feedback-dialog-intro": "Galite naudoti lengvą formą esančia žemiau, kad pateiktumėte savo atsiliepimus. Jūsų komentaras bus pridėtas prie puslapio \"$1\", kartu su jūsų vartotojo vardu.",
-       "feedback-error-title": "Klaida",
        "feedback-error1": "Klaida: Neatpažįstamas rezultatas iš API",
        "feedback-error2": "Klaida: Redagavimas nepavyko",
        "feedback-error3": "Klaida: Jokio atsakymo iš API",
        "feedback-useragent": "Vartotojo veiksnys:",
        "searchsuggest-search": "Ieškoti",
        "searchsuggest-containing": "turintys",
+       "api-error-autoblocked": "Jūsų IP adresas buvo automatiškai užblokuotas, nes jį naudojo užblokuotas naudotojas.",
        "api-error-badaccess-groups": "Jums neleidžiama įkelti failus į šią wiki.",
        "api-error-badtoken": "Vidinė klaida: blogai atpažinimo ženklas.",
+       "api-error-blocked": "Jus buvote užblokuotas, kad negalėtumėte redaguoti.",
        "api-error-copyuploaddisabled": "Siuntimas pagal URL yra išjungtas šiame serveryje.",
        "api-error-duplicate": "Jau {{PLURAL:$1|yra kitas failas|yra kiti failai}} puslapyje su tuo pačiu turiniu.",
        "api-error-duplicate-archive": "Jau {{PLURAL:$1|buvo kitas failas|buvo kitų failų}} puslapyje su tuo pačiu turiniu, bet {{PLURAL:$1|buvo ištrintas|buvo ištrinti}}.",
        "api-error-nomodule": "Vidinė klaida: nėra nustatytas įkėlimų modulis.",
        "api-error-ok-but-empty": "Vidinė klaida: nėra atsakymo iš serverio.",
        "api-error-overwrite": "Perrašymas esamą failą neleidžiamas.",
+       "api-error-ratelimited": "Jūs per trumpą laiko tarpą bandote įkelti daugiau failų, nei leidžiama šiame projekte.\nPabandykite dar kartą po keleto minučių.",
        "api-error-stashfailed": "Vidinė klaida: serveriui nepavyko išsaugoti laikinąjį failą.",
        "api-error-publishfailed": "Vidinė klaida: serveriui nepavyko paskelbti laikino failo.",
        "api-error-stasherror": "Įvyko klaida keliant failą į laikyklą.",
        "api-error-unknownerror": "Nežinoma klaida: \"$1\"",
        "api-error-uploaddisabled": "Įkėlimas išjungtas šioje wiki.",
        "api-error-verification-error": "Šis failas gali būti sugadintas arba turi neteisingą papildinį.",
+       "api-error-was-deleted": "Failas tokiu pavadinimu anksčiau jau yra buvęs įkeltas, o paskui ištrintas.",
        "duration-seconds": "$1 {{PLURAL:$1|sekundė|sekundės|sekundžių}}",
        "duration-minutes": "$1 {{PLURAL:$1|minutė|minutės|minučių}}",
        "duration-hours": "$1 {{PLURAL:$1|valanda|valandos|valandų}}",
        "expand_templates_generate_xml": "Rodyti XML nagrinėjimo medį",
        "expand_templates_generate_rawhtml": "Rodyti gryną HTML",
        "expand_templates_preview": "Peržiūra",
-       "expand_templates_preview_fail_html": "<em>Nes {{SITENAME}} turi įgalinta gryną HTML ir įvyko sesijos duomenų praradimas, peržiūra yra paslėpta kaip atsargos priemonė prieš JavaScript atakas.</em>\n\n<strong>Jei tai teisėtas peržiūros bandymas, prašome bandyti dar kartą.</strong>\nJei tai vistiek neveikia, pabandykite [[Special:UserLogout|atsijungti]] ir vėl prisijungti.",
+       "expand_templates_preview_fail_html": "<em>Kadangi {{SITENAME}} turi įgalinta gryną HTML ir įvyko sesijos duomenų praradimas, peržiūra yra paslėpta kaip atsargos priemonė prieš JavaScript atakas.</em>\n\n<strong>Jei tai teisėtas peržiūros bandymas, prašome bandyti dar kartą.</strong>\nJei ir toliau neveikia, pabandykite [[Special:UserLogout|atsijungti]] ir vėl prisijungti, taip pat patikrinkite, ar jūsų naršyklė priima šios svetainės slapukus.",
        "expand_templates_preview_fail_html_anon": "<em>Nes {{SITENAME}} turi įgalinta gryną HTML ir jūs esate neprisijungęs, peržiūra paslėpta kaip atsargumo priemonė prieš JavaScript atakas.</em>\n\n<strong>Jei tai teisėtas peržiūros bandymas prašome [[Special:UserLogin|prisijungti]] ir bandyti vėl.</strong>",
        "expand_templates_input_missing": "Turite pateikti bent truputį įvesties teksto.",
        "pagelanguage": "Keisti puslapio kalbą",
        "log-action-filter-delete": "Trynimo tipas:",
        "log-action-filter-import": "Importo tipas:",
        "log-action-filter-managetags": "Žymės tvarkymo veiksmo tipas:",
-       "log-action-filter-move": "Kėlimo tipas:",
+       "log-action-filter-move": "Perkėlimo tipas:",
        "log-action-filter-newusers": "Paskyros kūrimo tipas:",
+       "log-action-filter-patrol": "Patikrinimo tipas:",
        "log-action-filter-protect": "Apsaugos tipas:",
        "log-action-filter-rights": "Teisių tipo keitimas:",
        "log-action-filter-upload": "Įkėlimo tipas:",
        "log-action-filter-managetags-delete": "Žymės trynimas",
        "log-action-filter-managetags-activate": "Žymės aktyvavimas",
        "log-action-filter-managetags-deactivate": "Žymės deaktyvavimas",
+       "log-action-filter-move-move": "Perkėlimai, nepakeičiant nukreipimų",
+       "log-action-filter-move-move_redir": "Perkėlimai, pakeičiant buvusius nukreipimus",
        "log-action-filter-newusers-autocreate": "Automatinis kūrimas",
+       "log-action-filter-patrol-patrol": "„Rankinis“ patikrinimas",
+       "log-action-filter-patrol-autopatrol": "Automatinis patikrinimas",
        "log-action-filter-protect-protect": "Apsauga",
        "log-action-filter-protect-modify": "Apsaugos keitimas",
        "log-action-filter-protect-move_prot": "Apsauga perkelta",
        "log-action-filter-rights-autopromote": "Automatinis keitimas",
        "log-action-filter-upload-upload": "Naujas įkėlimas",
        "log-action-filter-upload-overwrite": "Kelti iš naujo",
+       "authmanager-authn-not-in-progress": "Autentifikavimas nevyksta arba buvo prarasti sesijos duomenys. Prašome pradėti iš naujo.",
        "authmanager-create-disabled": "Paskyros kūrimas yra išjungtas.",
        "authmanager-create-from-login": "Norėdami sukurti paskyrą užpildykite laukelius žemiau.",
+       "authmanager-create-not-in-progress": "Paskyros kūrimas nevyksta arba buvo prarasti sesijos duomenys. Prašome pradėti iš naujo.",
+       "authmanager-link-not-in-progress": "Paskyrų susiejimas nevyksta arba buvo prarasti sesijos duomenys. Prašome pradėti iš naujo.",
        "authmanager-authplugin-setpass-failed-title": "Slaptažodžio keitimas nepavyko",
        "authmanager-authplugin-setpass-bad-domain": "Negalimas domenas.",
        "authmanager-autocreate-noperm": "Automatinis paskyros kūrimas neleidžiamas.",
        "authmanager-provider-password": "Autentifikacija slaptažodžiu",
        "authmanager-provider-password-domain": "Autentifikavimas slaptažodžiu ir domenu",
        "authmanager-provider-temporarypassword": "Laikinas slaptažodis",
+       "authprovider-confirmlink-message": "Remiantis naujausiais jūsų prisijungimo bandymais, šios paskyros gali būti susietos su jūsų wiki paskyra. Jas susieję, galėsite prisijungti per šias paskyras. Prašome pasirinkti, kurios iš jų turėtų būti susietos.",
        "authprovider-confirmlink-request-label": "Paskyros, kurios turėtų būti susietos",
        "authprovider-confirmlink-success-line": "$1: Susieta sėkmingai.",
        "authprovider-confirmlink-failed": "Paskyros susiejimas nebuvo visiškai sėkmingas: $1",
        "authprovider-resetpass-skip-label": "Praleisti",
        "authprovider-resetpass-skip-help": "Praleisti slaptažodžio perstatymą.",
        "specialpage-securitylevel-not-allowed-title": "Neleidžiama",
+       "specialpage-securitylevel-not-allowed": "Apgailestaujame, tačiau jūs negalite naudotis šiuo puslapiu, nes nepavyko patvirtinti jūsų tapatybės.",
        "cannotauth-not-allowed-title": "Teisė nesuteikta",
        "cannotauth-not-allowed": "Jūs negalite naudotis šiuo puslapiu",
        "credentialsform-account": "Paskyros vardas:",
index e528dde..7c50f35 100644 (file)
@@ -51,7 +51,7 @@
        "tog-enotifminoredits": "Paziņot pa e-pastu arī par maznozīmīgiem labojumiem rakstos un failos",
        "tog-enotifrevealaddr": "Atklāt manu e-pasta adresi paziņojumu vēstulēs",
        "tog-shownumberswatching": "Rādīt uzraudzītāju skaitu",
-       "tog-oldsig": "Pašreizējais paraksts:",
+       "tog-oldsig": "Esošais paraksts:",
        "tog-fancysig": "Vienkāršs paraksts (bez automātiskās saites)",
        "tog-uselivepreview": "Lietot tūlītējo priekšskatījumu",
        "tog-forceeditsummary": "Atgādināt man, ja kopsavilkuma ailīte ir tukša",
        "newwindow": "(atveras jaunā logā)",
        "cancel": "Atcelt",
        "moredotdotdot": "Vairāk...",
-       "morenotlisted": "Šis saraksts nav pilnīgs.",
+       "morenotlisted": "Šis saraksts var nebūt pilnīgs.",
        "mypage": "Lapa",
        "mytalk": "Diskusijas",
        "anontalk": "Diskusijas",
        "talk": "Diskusija",
        "views": "Apskates",
        "toolbox": "Rīki",
+       "tool-link-emailuser": "Nosūtīt e-pastu {{GENDER:$1|šim dalībniekam|šai dalībniecei}}",
        "userpage": "Skatīt dalībnieka lapu",
        "projectpage": "Skatīt projekta lapu",
        "imagepage": "Skatīt faila lapu",
        "botpasswords-label-cancel": "Atcelt",
        "botpasswords-label-delete": "Dzēst",
        "botpasswords-label-resetpassword": "Atiestatīt paroli",
-       "botpasswords-label-restrictions": "Lietošanas ierobežojumi:",
        "botpasswords-label-grants-column": "Piešķirts",
        "botpasswords-created-title": "Bota parole izveidota",
        "botpasswords-updated-title": "Bota parole atjaunināta",
        "subject-preview": "Temata pirmskats:",
        "blockedtitle": "Dalībnieks ir bloķēts.",
        "blockedtext": "'''Tavs lietotāja vārds vai IP adrese ir nobloķēta.'''\n\n$1 nobloķēja tavu lietotāja vārdu vai IP adresi.\nBloķējot norādītais iemesls bija: ''$2''.\n\n*Bloka sākums: $8\n*Bloka beigas: $6\n*Bija domāts nobloķēt: $7\n\nTu vari sazināties ar $1 vai kādu citu [[{{MediaWiki:Grouppage-sysop}}|administratoru]] lai apspriestu šo bloku.\n\nPievērs uzmanību, tam, ka ja tu neesi norādījis derīgu e-pasta adresi ''[[Special:Preferences|savās izvēlēs]]'', tev nedarbosies \"sūtīt e-pastu\" iespēja.\n\nTava IP adrese ir $3 un bloka identifikators ir #$5. Lūdzu iekļauj vienu no tiem, vai abus, visos turpmākajos pieprasījumos.",
-       "autoblockedtext": "Tava IP adrese ir tikusi automātiski nobloķēta, tāpēc, ka to (nupat kā) ir lietojis cits lietotājs, kuru nobloķēja $1.\nNorādītais bloķēšanas iemesls bija:\n\n:''$2''\n\n* Bloka sākums: $8\n* Bloka beigas: $6\n* Bija domāts nobloķēt: $7\n\nTu vari sazināties ar $1 vai kādu citu [[{{MediaWiki:Grouppage-sysop}}|adminu]] lai apspriestu šo bloku.\n\nAtceries, ka tu nevari lietot \"sūtīt e-pastu šim lietotājam\" iespēju, ja tu neesi norādījis derīgu e-pasta adresi savās [[Special:Preferences|lietotāja izvelēs]] un bloķējot tev nav aizbloķēta iespēja sūtīt e-pastu.\n\nTava pašreizējā IP adrese ir $3 un  bloka ID ir $5.\nLūdzu iekļauj šos visos ziņojumos, kurus sūti adminiem, apspriežot šo bloku.",
+       "autoblockedtext": "Tava IP adrese ir tikusi automātiski nobloķēta, tāpēc, ka to (nupat kā) ir lietojis cits dalībnieks, kuru nobloķēja $1.\nNorādītais bloķēšanas iemesls bija:\n\n:''$2''\n\n* Bloka sākums: $8\n* Bloka beigas: $6\n* Bija domāts nobloķēt: $7\n\nTu vari sazināties ar $1 vai kādu citu [[{{MediaWiki:Grouppage-sysop}}|adminu]] lai apspriestu šo bloku.\n\nAtceries, ka tu nevari lietot \"sūtīt e-pastu šim dalībniekam\" iespēju, ja tu neesi norādījis derīgu e-pasta adresi savās [[Special:Preferences|dalībnieka izvelēs]] un bloķējot tev nav aizbloķēta iespēja sūtīt e-pastu.\n\nTava pašreizējā IP adrese ir $3 un  bloka ID ir $5.\nLūdzu iekļauj šos visos ziņojumos, kurus sūti adminiem, apspriežot šo bloku.",
        "blockednoreason": "iemesls nav norādīts",
        "whitelistedittext": "Lūdzu $1, lai varētu labot lapas.",
        "confirmedittext": "Lai varētu izmainīt lapas, vispirms jāapstiprina savu e-pasta adresi.\nNorādi un apstiprini e-pasta adresi savos [[Special:Preferences|lietotāja uzstādījumos]].",
        "userrights-no-interwiki": "Tev nav atļaujas izmainīt dalībnieku tiesības citos wiki.",
        "userrights-nodatabase": "Datubāze $1 neeksistē vai nav lokāla.",
        "userrights-nologin": "Tev ir [[Special:UserLogin|jāieiet iekšā]] kā adminam, lai varētu izmainīt dalībnieku grupas.",
-       "userrights-notallowed": "Jūsu lietotāja kontam nav atļaujas pievienot vai noņemt lietotāju tiesības.",
+       "userrights-notallowed": "Tev nav atļaujas pievienot vai noņemt dalībnieku tiesības.",
        "userrights-changeable-col": "Grupas, kuras tu vari izmainīt",
        "userrights-unchangeable-col": "Grupas, kuras tu nevari izmainīt",
        "group": "Grupa:",
        "upload-http-error": "HTTP kļūda: $1",
        "upload-dialog-title": "Augšupielādēt failu",
        "upload-dialog-button-cancel": "Atcelt",
+       "upload-dialog-button-back": "Atpakaļ",
        "upload-dialog-button-done": "Gatavs",
        "upload-dialog-button-save": "Saglabāt",
        "upload-dialog-button-upload": "Augšupielādēt",
        "nolicense": "Neviena licence nav izvēlēta",
        "license-nopreview": "(Priekšskatījums nav pieejams)",
        "upload_source_url": "(derīgs, publiski pieejams URL)",
-       "upload_source_file": "(fails datorā)",
+       "upload_source_file": "(tavs izvēlētais fails tavā datorā)",
        "listfiles-delete": "dzēst",
        "listfiles-summary": "Šajā īpašajā lapā ir redzami visi augšupielādētie faili.",
        "listfiles_search_for": "Meklēt failu pēc vārda:",
        "apisandbox-results": "Rezultāti",
        "apisandbox-request-url-label": "Pieprasījuma URL:",
        "apisandbox-request-time": "Pieprasījuma izpildes laiks: {{PLURAL:$1|$1 ms}}",
+       "apisandbox-continue-clear": "Notīrīt",
        "booksources": "Grāmatu avoti",
        "booksources-search-legend": "Meklēt grāmatu avotus",
        "booksources-search": "Meklēt",
        "activeusers-hidesysops": "Paslēpt administratorus",
        "activeusers-noresult": "Neviens dalībnieks nav atrasts.",
        "activeusers-submit": "Parādīt aktīvos dalībniekus",
-       "listgrouprights": "Lietotāju grupu tiesības",
+       "listgrouprights": "Dalībnieku grupu tiesības",
        "listgrouprights-summary": "Šis ir šajā viki definēto dalībnieku grupu uzskaitījums, kopā ar tām atbilstošajām piekļuves tiesībām.\nPapildu informāciju par katru individuālu piekļuves tiesību veidu, iespējams, var atrast [[{{MediaWiki:Listgrouprights-helppage}}|šeit]].",
        "listgrouprights-group": "Grupa",
        "listgrouprights-rights": "Tiesības",
        "trackingcategories-disabled": "Kategorija ir atslēgta",
        "mailnologin": "Nav adreses, uz kuru sūtīt",
        "mailnologintext": "Tev jābūt [[Special:UserLogin|iegājušam]], kā arī tev jābūt [[Special:Preferences|norādītai]] derīgai e-pasta adresei, lai sūtītu e-pastu citiem lietotājiem.",
-       "emailuser": "Sūtīt e-pastu šim lietotājam",
+       "emailuser": "Sūtīt e-pastu šim dalībniekam",
        "emailuser-title-target": "Nosūtīt e-pastu {{GENDER:$1|šim dalībniekam|šai dalībniecei}}",
        "emailuser-title-notarget": "Sūtīt e-pastu lietotājam",
        "emailpagetext": "Ar šo veidni ir iespējams nosūtīt e-pastu šim {{GENDER:$1|lietotājam}}.\nTā e-pasta adrese, kuru tu esi norādījis [[Special:Preferences|savā izvēļu lapā]], parādīsies e-pasta \"From\" lauciņā, tādejādi saņēmējs varēs tev atbildēt.",
        "emailccme": "Atsūtīt man uz e-pastu mana ziņojuma kopiju.",
        "emailsent": "E-pasts nosūtīts",
        "emailsenttext": "Tavs e-pasts ir nosūtīts.",
-       "emailuserfooter": "Šis e-pasts ir lietotāja $1 sūtīts lietotājam $2, izmantojot \"Sūtīt e-pastu šim lietotājam\" funkciju {{SITENAME}}.",
+       "emailuserfooter": "Šis e-pasts ir dalībnieka $1 sūtīts dalībniekam $2, izmantojot \"Sūtīt e-pastu šim dalībniekam\" funkciju {{SITENAME}}.",
        "usermessage-summary": "Atstāt sistēmas ziņojumu.",
        "usermessage-editor": "Sistēmas ziņotājs",
        "watchlist": "Mani uzraugāmie raksti",
        "year": "No gada (un senāki):",
        "sp-contributions-newbies": "Rādīt jauno lietotāju devumu",
        "sp-contributions-newbies-sub": "Jaunie lietotāji",
-       "sp-contributions-blocklog": "Bloķēšanas reģistrs",
+       "sp-contributions-blocklog": "bloķēšanas reģistrs",
        "sp-contributions-deleted": "dzēstais {{GENDER:$1|dalībnieka|dalībnieces}} devums",
        "sp-contributions-uploads": "augšupielādes",
        "sp-contributions-logs": "reģistri",
        "sp-contributions-talk": "diskusija",
-       "sp-contributions-userrights": "Lietotāju tiesību pārvaldība",
+       "sp-contributions-userrights": "dalībnieka tiesību pārvaldība",
        "sp-contributions-blocked-notice": "Šis lietotājs pašlaik ir nobloķēts.\nPēdējais bloķēšanas reģistra ieraksts ir apskatāms zemāk:",
        "sp-contributions-blocked-notice-anon": "Šī IP adrese pašlaik ir nobloķēta.\nPēdējais bloķēšanas reģistra ieraksts ir apskatāms zemāk:",
        "sp-contributions-search": "Meklēt lietotāju veiktās izmaiņas",
-       "sp-contributions-username": "IP adrese vai lietotāja vārds:",
+       "sp-contributions-username": "IP adrese vai dalībnieka vārds:",
        "sp-contributions-toponly": "Rādīt tikai labojumus, kuri ir jaunākās versijas",
        "sp-contributions-submit": "Meklēt",
        "whatlinkshere": "Norādes uz šo rakstu",
        "ipb-unblock-addr": "Atbloķēt $1",
        "ipb-unblock": "Atbloķēt lietotāju vai IP adresi",
        "ipb-blocklist": "Apskatīt esošos blokus",
-       "ipb-blocklist-contribs": "$1 devums",
+       "ipb-blocklist-contribs": "{{GENDER:$1|$1}} devums",
        "unblockip": "Atbloķēt lietotāju",
        "unblockiptext": "Šeit var atbloķēt iepriekš nobloķētu IP adresi vai lietotāja vārdu (atjaunot viņiem rakstīšanas piekļuvi).",
        "ipusubmit": "Noņemt šo bloku",
        "emailblock": "e-pasts bloķēts",
        "blocklist-nousertalk": "nevar izmainīt savu diskusiju lapu",
        "ipblocklist-empty": "Bloķēšanas saraksts ir tukšs.",
-       "ipblocklist-no-results": "Norādītā IP adrese vai lietotājs nav bloķēts.",
+       "ipblocklist-no-results": "Norādītā IP adrese vai dalībnieks nav bloķēts.",
        "blocklink": "bloķēt",
        "unblocklink": "atbloķēt",
        "change-blocklink": "izmainīt bloku",
        "newimages-legend": "Filtrs",
        "newimages-label": "Faila nosaukums (vai tā daļa):",
        "newimages-showbots": "Parādīt botu augšupielādētos failus",
+       "newimages-hidepatrolled": "Paslēpt pārbaudītās augšupielādes",
        "noimages": "Nav nekā ko redzēt.",
+       "gallery-slideshow-toggle": "Pārslēgt sīktēlus",
        "ilsubmit": "Meklēt",
        "bydate": "<b>pēc datuma</b>",
        "sp-newimages-showfrom": "Rādīt jaunos attēlus sākot no $1, $2",
        "tags-actions-header": "Darbības",
        "tags-active-yes": "Jā",
        "tags-active-no": "Nē",
-       "tags-source-extension": "Nosaka paplašinājums",
+       "tags-source-extension": "Nosaka programmatūra",
        "tags-source-none": "Vairs netiek izmantots",
        "tags-edit": "labot",
        "tags-delete": "dzēst",
        "htmlform-chosen-placeholder": "Izvēlieties iespēju",
        "htmlform-cloner-create": "Pievienot vairāk",
        "htmlform-cloner-delete": "Noņemt",
-       "sqlite-has-fts": "$1 ar pilnteksta meklēšanas atbalstu",
-       "sqlite-no-fts": "$1 bez pilnteksta meklēšanas atbalsta",
        "logentry-delete-delete": "$1 {{GENDER:$2|izdzēsa}} lapu $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|atjaunoja}} lapu $3",
        "revdelete-content-hid": "saturs slēpts",
        "feedback-cancel": "Atcelt",
        "feedback-close": "Gatavs",
        "feedback-dialog-title": "Iesniegt atsauksmes",
-       "feedback-error-title": "Kļūda",
        "feedback-error1": "Kļūda: API neatpazīts rezultāts",
        "feedback-error2": "Kļūda: Labojums neizdevās",
        "feedback-error3": "Kļūda: Nav atbildes no API",
        "feedback-submit": "Iesniegt",
        "feedback-thanks": "Paldies! Jūsu atsauksmes ir ievietotas lapā \"[$2  $1]\".",
        "feedback-thanks-title": "Paldies!",
-       "searchsuggest-search": "Meklēt",
+       "searchsuggest-search": "Meklēt {{SITENAME}}",
        "searchsuggest-containing": "Meklējamā frāze:",
        "api-error-badaccess-groups": "Jums nav atļauts augšupielādēt failus šajā wiki.",
        "api-error-copyuploaddisabled": "Augšupielāde no URL šajā serverī ir atspējota.",
        "authmanager-realname-label": "Tavs īstais vārds",
        "authmanager-realname-help": "Dalībnieka īstais vārds",
        "authprovider-resetpass-skip-label": "Izlaist",
-       "specialpage-securitylevel-not-allowed-title": "Nav atļauts"
+       "specialpage-securitylevel-not-allowed-title": "Nav atļauts",
+       "edit-error-short": "Kļūda: $1",
+       "edit-error-long": "Kļūdas:\n\n$1"
 }
index cd0a50d..7834379 100644 (file)
@@ -9,7 +9,8 @@
                        "Ibero-kolxi",
                        "Reedy",
                        "The Evil IP address",
-                       "아라"
+                       "아라",
+                       "Velg"
                ]
        },
        "tog-underline": "Link'iş tude kogu3’uxaçki:",
        "nstab-template": "Şabloni",
        "nstab-help": "Meşvelaşi but’k’a",
        "nstab-category": "Kʼatʼegori",
+       "mainpage-nstab": "Dudi But'k'a",
        "error": "Çilata",
        "missing-article": "Datʼabeizik, na igoren \"$1\" $2 coxoni butʼkʼaşi tekstʼi var az*iru.\n\nMuşeni? Çunki am butʼkʼa, jileri na ren a butʼkʼaşi golaxteri versiyoni ren.\n\nEger sebebi aya na va renna, pʼrogramis ar çilata z*irit.\nMu iqʼven! Aya, a [[Special:ListUsers/sysop|adminis]], URL-ti çʼareli şekʼilite rapʼortʼi doçʼarit.",
        "missingarticle-rev": "(revizyoni#: $1)",
        "userlogin-yourname": "Skani maxmare-coxo",
        "yourpassword": "Pʼarola-skani:",
        "userlogin-yourpassword": "Pʼarola-skani",
-       "remembermypassword": "Parola-skani goişini (for a maximum of $1 {{PLURAL:$1|day|days}})",
        "yourdomainname": "Skani domaini:",
        "login": "Sitʼeşa amaxti",
        "nav-login-createaccount": "Sitʼeşa amaxti / hesabi dokʼidi",
        "createacct-reason": "Muşen",
        "mailmypassword": "Ağne pʼarola-çkimi moncğoni",
        "loginlanguagelabel": "Nena: $1",
+       "pt-login": "Sitʼeşa amaxti",
+       "pt-createaccount": "Hesabi dokʼidi",
        "oldpassword": "Mcveşi p'arola:",
        "newpassword": "Ağani P'arola:",
        "passwordreset-username": "Skani maxmare-coxo:",
        "rc-enhanced-expand": "Detayepe ko3ʼiri (JavaScript-i unon)",
        "rc-enhanced-hide": "Detayepe doşinaxi",
        "recentchangeslinked": "Alakʼali na renan oktirobape",
+       "recentchangeslinked-toolbox": "Alakʼali na renan oktirobape",
        "recentchangeslinked-title": "\"$1\" kʼala alakʼali na renan oktirobape",
        "recentchangeslinked-summary": "Tude na çʼars listʼe, kʼiti na noğiru butʼkʼaşa (varna kʼiti na noğiru kʼatʼegorişi makʼaturepeşa) kʼontʼaktʼi na ikips butʼkʼapes na ixvenu çodinaşi oktirobapeşi listʼe ren.\n[[Special:Watchlist|Gotxozu na ginon butʼkʼapeşi listʼes]] na renan butʼkʼape '''mçxu''' nçʼaraten niçʼaru.",
        "recentchangeslinked-page": "Butʼkʼaşi coxo:",
        "tooltip-pt-login": "Ginon na sitʼeşa amaxti, mecburi va re",
        "tooltip-pt-logout": "Siteşen Kogamaxti",
        "tooltip-ca-talk": "Butʼkʼaş doloxe na içʼaren çʼarape şeni mutxanepe mi3ʼvit",
-       "tooltip-ca-edit": "Am butʼkʼa kodogaktiren. Mu iqʼven! ipti \"Evvelişen i3ʼkʼedi\" tʼuşi ixmari do na çʼari çʼara ikʼontʼroli, ukʼule ikʼayitʼi.",
+       "tooltip-ca-edit": "Butʼkʼa doktiri",
        "tooltip-ca-addsection": "Ağani burme dokʼidi.",
        "tooltip-ca-viewsource": "Am butʼkʼa içven. Xvala odudeş kʼodi gaz*iren. Doloxe muşi va gaktirinen.",
        "tooltip-ca-history": "Am butʼkʼaşi golaxteri versiyonepe",
        "watchlisttools-raw": "Kʼobo gotxozu listʼe doktiri",
        "specialpages": "Doxmeli butʼkʼape",
        "rightsnone": "(Va ren)",
+       "searchsuggest-search": "Mgori",
        "special-characters-group-latin": "Lat'ini",
        "special-characters-group-greek": "Xorumi",
        "special-characters-group-arabic": "Arabuli"
index d9d8ea0..ad92ab9 100644 (file)
        "tog-editsectiononrightclick": "अनुभाग शीर्षक पर दाहिन क्लिक करै पर अनुभाग सम्पादित करी",
        "tog-watchcreations": "हमर बनाओल पृष्ठ हमर साकांक्ष सूचीमे राखी",
        "tog-watchdefault": "हमर सम्पादित पृष्ठ हमर साकांक्ष सूचीमे देखाबी",
-       "tog-watchmoves": "हमरादà¥\8dवारा à¤\98सà¥\8dà¤\95ाà¤\93ल पृष्ठ हमर साकांक्ष सूचीमे राखी",
-       "tog-watchdeletion": "हमरादà¥\8dवारा à¤®à¥\87à¤\9fाà¤\93ल पृष्ठ हमर साकांक्ष सूचीमे राखी",
-       "tog-watchrollback": "हमरादà¥\8dवारा à¤°à¥\8bलबà¥\8dयाà¤\95 कएल पृष्ठ हमर सांकक्ष सूचीमे राखी",
-       "tog-minordefault": "हमर सभ सम्पादन पूर्वन्यस्त रूपमे मामूली कही",
-       "tog-previewontop": "समà¥\8dपादन à¤ªà¥\87à¤\9fà¥\80à¤\95 à¤\8aपर à¤¦à¥\83शà¥\8dय देखाबी",
+       "tog-watchmoves": "हमरादà¥\8dवारा à¤¸à¥\8dथानानà¥\8dतरित पृष्ठ हमर साकांक्ष सूचीमे राखी",
+       "tog-watchdeletion": "हमरादà¥\8dवारा à¤®à¥\87à¤\9fाà¤\8fल पृष्ठ हमर साकांक्ष सूचीमे राखी",
+       "tog-watchrollback": "हमरादà¥\8dवारा à¤ªà¥\82रà¥\8dववत कएल पृष्ठ हमर सांकक्ष सूचीमे राखी",
+       "tog-minordefault": "हमर सभ सम्पादनसभ छोट परिवर्तनक रूपमे चिह्नित करी",
+       "tog-previewontop": "समà¥\8dपादन à¤¸à¤¨à¥\8dदà¥\82à¤\95 à¤¸à¤\81 à¤ªà¤¹à¤¿à¤¨à¥\87 à¤\9dलà¤\95 देखाबी",
        "tog-previewonfirst": "पहिल सम्पादनक बाद पूर्वावलोकन देखाबी",
        "tog-enotifwatchlistpages": "जौं हमर ध्यानसूचीक कोनो पन्नामे परिवर्तन हुअए तँ हमरा इमेल पठाबी",
        "tog-enotifusertalkpages": "हमर वार्ता पृष्ठ परिवर्तित भेला पर हमरा इमेल करी",
        "tog-watchlisthideminor": "हमर साकांक्ष सूचीसँ मामूली सम्पादन नुकाबी",
        "tog-watchlisthideliu": "साकांक्षसूचीसँ सम्प्रवेशित प्रयोक्ताक सम्पादन हटाबी",
        "tog-watchlisthideanons": "साकांक्षसूचीसँ अनाम प्रयोक्ताक सम्पादन हटाबी",
-       "tog-watchlisthidepatrolled": "साकांक्ष सूचीसँ संचालित सम्पादन नुकाबी",
+       "tog-watchlisthidepatrolled": "साकांक्ष सूचीसँ परीक्षित सम्पादन नुकाबी",
+       "tog-watchlisthidecategorization": "पृष्ठसभक श्रेणीकरण नुकाबी",
        "tog-ccmeonemails": "हमरद्वारा दोसर प्रयोक्ताक पठाओल ई-पत्रक कपी पठाबी",
        "tog-diffonly": "फाइल-अन्तर प्रणालीक नीचाँ पन्नाक सामिग्री नै देखाबी",
        "tog-showhiddencats": "नुकाएल श्रेणी देखाबी",
-       "tog-norollbackdiff": "समà¥\8dपादन à¤µà¤¾à¤ªà¤¸ à¤² à¤²à¥\87ला बाद अन्तर नै देखाबी",
-       "tog-useeditwarning": "à¤\9cब à¤¹à¤® à¤\95à¥\8bनà¥\8b à¤¸à¤®à¥\8dपादन à¤ªà¥\83षà¥\8dठà¤\95à¥\87 à¤¬à¤¿à¤¨à¤¾ à¤¸à¥\81रà¤\95à¥\8dषित à¤\95à¥\87नà¥\88 à¤¬à¤¦à¤²à¤¾à¤µ à¤¸à¤\82à¤\97 à¤\9bà¥\8bडि à¤¦à¤¿ à¤¤ à¤¹à¤®à¤°à¤¾ à¤¸à¥\82à¤\9aित à¤\95रà¥\80 ।",
-       "tog-prefershttps": "समà¥\8dपà¥\8dरवà¥\87शित à¤\95रलाà¤\95 à¤¬à¤¾à¤¦ à¤¸à¤¦à¥\88व à¤¸à¥\81रà¤\95à¥\8dषित à¤\95नà¥\87à¤\95à¥\8dशनà¤\95à¥\87 प्रयोग करी",
+       "tog-norollbackdiff": "समà¥\8dपादन à¤µà¤¾à¤ªà¤¸ à¤\95रलाà¤\95 बाद अन्तर नै देखाबी",
+       "tog-useeditwarning": "à¤\9cब à¤¹à¤® à¤\95à¥\8bनà¥\8b à¤¸à¤®à¥\8dपादन à¤ªà¥\83षà¥\8dठà¤\95à¥\87 à¤¬à¤¿à¤¨à¤¾ à¤¸à¥\81रà¤\95à¥\8dषित à¤\95à¥\87नà¥\88 à¤¬à¤¦à¤²à¤¾à¤µ à¤¸à¤\82à¤\97 à¤\9bà¥\8bडि à¤¦à¥\80 à¤¤à¤\81 à¤¹à¤®à¤°à¤¾ à¤¸à¥\82à¤\9aित à¤\95रà¥\80।",
+       "tog-prefershttps": "समà¥\8dपà¥\8dरवà¥\87शित à¤\95रलाà¤\95 à¤¬à¤¾à¤¦ à¤¸à¤¦à¥\88व à¤¸à¥\81रà¤\95à¥\8dषित à¤\95नà¥\87à¤\95à¥\8dसनà¤\95 प्रयोग करी",
        "underline-always": "सदिखन",
        "underline-never": "कखनो नै",
        "underline-default": "पूर्वन्यस्त गवेषक",
        "period-am": "पूर्वाह्न",
        "period-pm": "अपराह्न",
        "pagecategories": "{{PLURAL:$1|श्रेणी|श्रेणीसभ}}",
-       "category_header": "श्रेणी \"$1\" मे पन्ना सभ",
+       "category_header": "\"$1\" श्रेणीमे पृष्ठसभ",
        "subcategories": "उपश्रेणी",
        "category-media-header": "श्रेणी \"$1\" मे मिडिया",
        "category-empty": "<em>ई श्रेणीमे ई समय कोनो पृष्ठ या मिडिया नै अछि।</em>",
        "category-file-count": "{{PLURAL:$2|ई श्रेणीमे मात्र निम्नलिखित फाइल अछि।|ई श्रेणीमे निम्नलिखित {{PLURAL:$1|फाइल|$1 फाइलसभ}} अछि, कुल फाइलसभ $2}}",
        "category-file-count-limited": "ई श्रेणीमे निम्नलिखित {{PLURAL:$1|फाइल अछि।|फाइलसभ अछि।}}",
        "listingcontinuesabbrev": "शेष आगाँ।",
-       "index-category": "à¤\95à¥\8dरम à¤\95à¤\8fल à¤ªà¤¨à¥\8dनासभ",
-       "noindex-category": "à¤\95à¥\8dरम à¤¨à¥\88 à¤\95à¤\8fल à¤ªà¤¨à¥\8dनासभ",
-       "broken-file-category": "पनà¥\8dनासभ à¤\9cाà¤\87मे फाइल लिङ्कसभ टूटल हुअए",
+       "index-category": "सà¥\82à¤\9aà¥\80बदà¥\8dध à¤ªà¥\83षà¥\8dठ",
+       "noindex-category": "à¤\95à¥\8dरम à¤¨à¥\88 à¤\95à¥\87ल à¤ªà¥\83षà¥\8dठ",
+       "broken-file-category": "पनà¥\8dनासभ à¤\9cाहिमे फाइल लिङ्कसभ टूटल हुअए",
        "about": "क विषयमे",
        "article": "सामग्री लेख",
        "newwindow": "(नव विन्डोमे खुजत)",
        "cancel": "रद्द करी",
        "moredotdotdot": "आर...",
-       "morenotlisted": "à¤\88 à¤ªà¥\81रा सूची नै छी।",
+       "morenotlisted": "à¤\88 à¤ªà¥\82रà¥\8dण सूची नै छी।",
        "mypage": "पन्ना",
        "mytalk": "वार्ता",
        "anontalk": "वार्ता",
        "navigation": "सञ्चार",
        "and": "&#32;आर",
        "qbfind": "ताकी",
-       "qbbrowse": "à¤\97वà¥\87षण करी",
+       "qbbrowse": "बà¥\8dराà¤\89à¤\9c करी",
        "qbedit": "सम्पादन करी",
        "qbpageoptions": "ई पृष्ठ",
        "qbmyoptions": "हमर पृष्ठसभ",
        "faq": "त्वरित प्रश्नोत्तरी",
        "faqpage": "Project: त्वरित प्रश्नोत्तरी",
        "actions": "क्रियासभ",
-       "namespaces": "à¤\9aà¥\87नà¥\8dहासà¥\80 समूहसभ",
-       "variants": "पà¥\8dरà¤\95ारसभ",
+       "namespaces": "नामसà¥\8dथान समूहसभ",
+       "variants": "सà¤\82सà¥\8dà¤\95रण",
        "navigation-heading": "दिक्चालन सूची",
        "errorpagetitle": "त्रुटि",
        "returnto": "$1 पर आबी।",
        "searcharticle": "जाए",
        "history": "पृष्ठ इतिहास",
        "history_short": "इतिहास",
-       "updatedmarker": "हमर à¤\85नà¥\8dतिम à¤\86à¤\97मनसà¤\81 à¤ªà¤¹à¤¿à¤¨à¥\87 à¤\85दà¥\8dयतन à¤\95à¤\8fल",
+       "updatedmarker": "हमर à¤\85नà¥\8dतिम à¤\86à¤\97मनसà¤\81 à¤ªà¤¹à¤¿à¤¨à¥\87 à¤\85दà¥\8dयतन à¤\95à¥\87ल",
        "printableversion": "प्रिन्ट करबा योग्य",
        "permalink": "स्थायी लिङ्क",
        "print": "छापी",
        "talk": "वार्तालाप",
        "views": "दर्शाव",
        "toolbox": "उपकरण",
+       "tool-link-userrights": "{{GENDER:$1|सदस्य}} समूह परिवर्तन करी",
+       "tool-link-emailuser": "ई {{GENDER:$1|प्रयोक्ता}}के इमेल भेजी",
        "userpage": "प्रयोक्ता पन्ना देखी",
        "projectpage": "परियोजना पन्ना देखी",
        "imagepage": "फाइल पृष्ठ देखी",
        "redirectedfrom": "($1सँ पुनर्निर्देशित)",
        "redirectpagesub": "पृष्ठ पुनर्निर्देशित करी",
        "redirectto": "कऽ अनुप्रेषित:",
-       "lastmodifiedat": "à¤\88 à¤ªà¥\83षà¥\8dठà¤\95 à¤ªà¤¹à¤¿à¤¨à¥\81à¤\95ा à¤¬à¤¦à¤²à¤¾à¤µ $1 के $2 बजे भेल छल।",
+       "lastmodifiedat": "à¤\88 à¤ªà¥\83षà¥\8dठà¤\95 à¤¨à¤µà¥\80नतम à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन $1 के $2 बजे भेल छल।",
        "viewcount": "ई पृष्ठ {{PLURAL:$1|एक|$1}} बेर देखल गेल छल।",
        "protectedpage": "सुरक्षित पृष्ठ",
        "jumpto": "एतय जाए:",
        "privacy": "गोपनीयताक नियम",
        "privacypage": "Project:गोपनीयता नियम",
        "badaccess": "आज्ञा गल्ती",
-       "badaccess-group0": "à¤\85हाà¤\81à¤\95 à¤\86à¤\97à¥\8dरह à¤\95à¤\8fल क्रियाक करबाक अनुमति नै अछि।",
-       "badaccess-groups": "à¤\85हाà¤\81 à¤\9cà¥\87 à¤\95à¥\8dरिया à¤\86à¤\9cमà¥\87नà¥\87 à¤\9bà¥\80 à¤\93 à¤®à¤¾à¤¤à¥\8dर {{PLURAL:$2|$1 à¤¸à¤®à¥\82ह|$1 à¤¸à¤®à¥\82हसभ}}à¤\95 à¤¸à¤¦à¤¸à¥\8dय à¤¹à¥\80 à¤\95रि à¤¸à¤\95à¤\8fत अछि।",
+       "badaccess-group0": "à¤\85हाà¤\81à¤\95 à¤\86à¤\97à¥\8dरह à¤\95à¥\87ल क्रियाक करबाक अनुमति नै अछि।",
+       "badaccess-groups": "à¤\85हाà¤\81 à¤\9cà¥\87 à¤\95à¥\8dरिया à¤\86à¤\9cमà¥\87नà¥\87 à¤\9bà¥\80 à¤\93 à¤®à¤¾à¤¤à¥\8dर {{PLURAL:$2|$1 à¤¸à¤®à¥\82ह|$1 à¤¸à¤®à¥\82हसभ}}à¤\95 à¤¸à¤¦à¤¸à¥\8dय à¤®à¤¾à¤¤à¥\8dर à¤\95रि à¤¸à¤\95à¥\88त अछि।",
        "versionrequired": "मिडियाविकिक संस्करण $1 चाही",
        "versionrequiredtext": "ई पृष्ठ प्रयोग करैक लेल मिडियाविकिक $1 अवतरण जरुरी अछि।\nदेखी [[Special:Version|अवतरण पृष्ठ]]।",
        "ok": "ठीक अछि",
        "databaseerror-query": "अनुरोध: $1",
        "databaseerror-function": "फङ्क्सन: $1",
        "databaseerror-error": "त्रुटि: $1",
-       "laggedslavemode": "'''चेतौनी:''' पन्नापर सम्भव जे अद्यतन परिवर्तन नै हुअए।",
-       "readonly": "दतà¥\8dतनिधि प्रतिबन्धित",
-       "enterlockreason": "पà¥\8dरतिबनà¥\8dध à¤²à¥\87ल à¤\95ारण à¤¬à¤¤à¤¾à¤¬à¥\80, à¤¸à¤\82à¤\97à¥\87 à¤\8fà¤\95à¤\9fा à¤\85नà¥\8dदाà¤\9c à¤¸à¥\87हà¥\8b à¤¬à¤¤à¤¾à¤¬à¥\80 à¤\9cà¥\87 à¤\95à¤\96न à¤\88 à¤ªà¥\8dरतिबनà¥\8dध à¤¹à¤\9fाà¤\8fल à¤\9cाà¤\8fत।",
+       "laggedslavemode": "<strong>चेतौनी:</strong> पन्नापर सम्भव जे अद्यतन परिवर्तन नै हुअए।",
+       "readonly": "डà¥\87à¤\9fाबà¥\87स प्रतिबन्धित",
+       "enterlockreason": "पà¥\8dरतिबनà¥\8dध à¤²à¥\87ल à¤\95ारण à¤¬à¤¤à¤¾à¤¬à¥\80, à¤¸à¤\82à¤\97à¥\87 à¤\8fà¤\95à¤\9fा à¤\85नà¥\8dदाà¤\9c à¤¸à¥\87हà¥\8b à¤¬à¤¤à¤¾à¤¬à¥\80 à¤\9cà¥\87 à¤\95à¤\96न à¤\88 à¤ªà¥\8dरतिबनà¥\8dध à¤¹à¤\9fाà¤\8fल à¤\9cाà¤\87त।",
        "readonlytext": "अखन दत्तांशनिधि नव प्रविष्टि आ आन संशोधन लेल प्रतिबन्धित अछि, सम्भवतः सामान्त दत्तांशनिधि देखभाल लेल, तकर बाद ई सामान्य भऽ जाएत।\n\nसञ्चालक जे एकरा प्रतिबन्धित कएने छथि ई कारण दै छथि:$1",
        "missing-article": "दत्तनिधि पृष्ठक वान्छित पाठ्य नै ताकि सकल, माने \"$1\" $2\nएकर कारण कोनो पुरान फाइल चेन्हासी वा ऐतिहासिक लिङ्कक पाछाँ जाएब अछि, जे मेटा देल गेल छै।\nजौं ई तकर कारण नै अछि, तखन अहाँ तन्त्रांशमे कोनो दोष भेटल अछि।\nएकर खबरि पहुँचाबी [[Special:ListUsers/sysop|प्रबन्धक]]केँ, अपन सार्वत्रिक विभव सङ्केत सूचित करैत।",
        "missingarticle-rev": "(संशोधन#: $1)",
        "virus-badscanner": "खराप विन्यास: अज्ञात विषविधि बिम्बक: <em>$1</em>",
        "virus-scanfailed": "बिम्ब विफल (विध्यादेश $1)",
        "virus-unknownscanner": "अज्ञात विषविधि निरोधक",
-       "logouttext": "'''अहाँ निष्क्रमण कऽ गेल छी।'''\n\nअहाँ {{अन्तर्जाल}} प्रयोग अनाम भऽ कऽ सकै छी, वा अहाँ <span class='plainlinks'>[$1 log in again]</span> वएह आकि कोनो आन प्रयोक्ताक रूपमे सेहू प्रयोक कऽ सकै छी।\nई मोन राखू जे किछु पन्ना एना देखा पड़ि सकैए जेना अहाँ अखनो सम्प्रवेशित होइ, जावत अहाँ अपन गवेषकक उपस्मृति मेटा नै दै छी।",
+       "logouttext": "<strong>आब अहाँ निष्क्रमण कऽ गेल छी।</strong>\n\nध्यान दी कि जाबे धरि अहाँ अपन ब्राउजर क्यास खाली नै करब, किछ पृष्ठपर अखनो अहाँ सम्प्रवेशित देखाएब।",
        "cannotlogoutnow-title": "अखन प्रस्थान नै भऽ रहल अछि",
        "cannotlogoutnow-text": "$1 क उपयोग समय प्रस्थान नै कएल जा सकएत अछि।",
        "welcomeuser": "अहाँक स्वागत अछि, $1!",
        "createacct-yourpasswordagain-ph": "कुटशब्द पुनः लिखी",
        "userlogin-remembermypassword": "हमरा सम्प्रवेशित राखी",
        "userlogin-signwithsecure": "सुरक्षित कनेक्शनक प्रयोग करी",
+       "cannotlogin-title": "अखन प्रवेश नै भऽ रहल अछि",
+       "cannotlogin-text": "प्रवेश असम्भव अछि",
        "cannotloginnow-title": "अखन प्रवेश नै भऽ रहल अछि",
        "cannotloginnow-text": "$1 क उपयोग समय प्रवेश नै कएल जा सकएत अछि।",
+       "cannotcreateaccount-title": "खाता नै बनि सकत",
+       "cannotcreateaccount-text": "प्रत्यक्ष खाता निर्माण एहि विकिपर सक्षम नै अछि।",
        "yourdomainname": "अहाँक डोमेन (प्रभावक्षेत्र):",
        "password-change-forbidden": "अहाँ ई विकिमे कुटशब्द नै बदल सकैत छी।",
        "externaldberror": "या त प्रमाणिकरण डेटाबेसमे त्रुटि भएल अछि या फेर अहाँक अपन बाह्य खाता अपडेट करैक अनुमति नै अछि।",
        "login": "सम्प्रवेश",
+       "login-security": "अपन पहचान सत्यापित करी",
        "nav-login-createaccount": "सम्प्रवेश / खाता खोली",
        "userlogin": "सम्प्रवेश/ खाता बनाबी",
        "userloginnocreate": "सम्प्रवेश",
        "createacct-email-ph": "अपन ई-मेल पता लिखी",
        "createacct-another-email-ph": "ईमेल पता प्रदान करी",
        "createaccountmail": "एक अस्थायी यादृच्छिक कूटशब्द चुनी आ ओ निर्दिष्ट ई-मेल पता पर भेजी",
+       "createaccountmail-help": "एकर उपयोग बिना पासवर्ड जानने कियो आन व्यक्तिके खाता खोलैक लिए उपयोग कएल जा सकैत अछि ।",
        "createacct-realname": "असली नाम (वैकल्पिक)",
        "createaccountreason": "कारण:",
        "createacct-reason": "कारण:",
-       "createacct-reason-ph": "अहा इगो आर दोसर खाता कियाक बनउने जा रहल छि",
+       "createacct-reason-ph": "अहाँ एक अन्य खाता कियाक बनाए रहल छी",
+       "createacct-reason-help": "खाता निर्माण लगमे ई सन्देस देखाएल जाइत।",
        "createacct-submit": "अपन खाता बनाबी",
        "createacct-another-submit": "खाता बनाबी",
-       "createacct-benefit-heading": "{{SITENAME}} अहाँ जोका लोगसभद्वारा बनाएल गेल अछि।",
+       "createacct-continue-submit": "खाता निर्माण जारी राखी",
+       "createacct-another-continue-submit": "खाता निर्माण जारी राखी",
+       "createacct-benefit-heading": "{{SITENAME}} अहाँ जका लोकसभद्वारा बनाएल गेल अछि।",
        "createacct-benefit-body1": "$1 {{PLURAL:$1|सम्पादन|सम्पादनसभ}}",
        "createacct-benefit-body2": "{{PLURAL:$1|पन्ना|पन्नासभ}}",
        "createacct-benefit-body3": "सन्निकट {{PLURAL:$1|योगदानकर्ता|योगदानकर्तासभ}}",
        "nocookieslogin": "{{SITENAME}} प्रयोक्ताक सम्प्रवेशित करबा लेल ज्ञापकक प्रयोग करैत अछि।\nअहाँ ज्ञापकक अशक्त केने छी।\nकृपा कऽ ओकरा सक्रिय करी आ फेरसँ प्रयास करी।",
        "nocookiesfornew": "प्रयोक्ता खाजा नै खुजल, कारण हम ओकर जडि पूर्ण रूपेँ नै ताकि सकलौ।\nई दृढ करी जे ज्ञापक सक्रिय अछि, ई पन्नाक फेरसँ भारित करी आ फेरसँ प्रयास करी।",
        "noname": "अहाँ वैध प्रयोक्तानाम नै देने छी।",
-       "loginsuccesstitle": "समà¥\8dपà¥\8dरवà¥\87श à¤­à¤\8fल",
+       "loginsuccesstitle": "समà¥\8dपà¥\8dरवà¥\87श à¤­à¥\87ल",
        "loginsuccess": "<strong>अहाँ सम्प्रवेश केलहुँ {{SITENAME}} \"$1\"'''क रूपमे। </strong>",
        "nosuchuser": "\"$1\" नामसँ कोनो प्रयोक्ता नै अछि।\nप्रयोक्तानाम ब्रह्मक्षर-लघ्वक्षर भेद युक्त अछि।\nअपन ह्रिजै जाँची, वा [[Special:CreateAccount|नव खाता बनाबी]] ।",
        "nosuchusershort": "\"$1\" नामक कोनो प्रयोक्ता नै अछि।\nअपन हिजए सुधारी।",
        "eauthentsent": "एकटा पावती ई-पत्र निर्धारित ई-पत्र संकेतपर पठा देल गेल अछि।\nऐ खातापर कोनो दोसर ई-पत्र पठाएल जएबासँ पहिने, अहाँकेँ ऐ ई-पत्रक निर्देशक पालन करए पड़त, जइसँ ई पुष्ट भऽ सकए जे ई खाता वास्तवमे अहींक अछि।",
        "throttled-mailpassword": "एकटा कूटशब्द स्मारक पहिनहिये पठाएल गेल अछि, {{PLURAL:$1|घण्टा|$1 घण्टा}}क भीतर।\nदुरुपयोग रोकबा लेल, मात्र एकटा कूटशब्द {{PLURAL:$1|घण्टा|$1 घण्टा}}मे पठाएल जाएत।",
        "mailerror": "ई-पत्र पठेबामे त्रुटी: $1",
-       "acct_creation_throttle_hit": "अहाँके आइ॰पि. पतासँ आएल आगंतुक चौबीस घण्टा सँ बैसी ई विकिमे {{PLURAL:$1|एक खाता|$1 खाता}} बनौलक अछि, इ समयावधिमे ई अधिकतम सिमा छी। अतः अखन ई आइ॰पि. पताके प्रयोग करए वाला आगंतुक आर कोनो खाता नै खोइल सकएत अछि ।",
+       "acct_creation_throttle_hit": "अहाँक आइपी ठेगान सँ आएल आगन्तुक $2 सँ बैसी ई विकिमे {{PLURAL:$1|एक खाता|$1 खाता}} बनौलक अछि, इ समयावधिमे ई अधिकतम सिमा छी। अतः अखन ई आइपी पताके प्रयोग करैवाला आगन्तुक आर कोनो खाता नै खोइल सकैत अछि।",
        "emailauthenticated": "अहाँक ई-पत्र सङ्केत $2 क $3 बजे सत्यापित भेल।",
        "emailnotauthenticated": "अहाँक ई-पत्र सङ्केत अखन धरि सत्यापित नै भेल अछि।\nनिचा देल गेल कोनो सुविधाक लेल अहाँक ई-पत्र नै भेजल जाएत।",
        "noemailprefs": "ई सुविधा सभ कऽ प्रयोग करएक लेल अपन विकल्पमे ई-पत्र पता राखी।",
        "cannotchangeemail": "खाता ई-पत्र सङ्केत ऐ विकिपर बदलल नै जा सकैए।",
        "emaildisabled": "ई अन्तर्जाल ई-पत्र नै पठाएत।",
        "accountcreated": "खाता खुजि गेल",
-       "accountcreatedtext": "[[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|वारà¥\8dता]]) à¤\95à¥\87 à¤²à¥\87ल à¤\96ाता à¤\96à¥\8bलल à¤\97ेल अछि।",
+       "accountcreatedtext": "[[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|वारà¥\8dता]]) à¤\95à¥\87 à¤²à¥\87ल à¤\96ाता à¤¨à¤¿à¤°à¥\8dमाण à¤­ेल अछि।",
        "createaccount-title": "{{SITENAME}}क लेल खाता बनाबी",
        "createaccount-text": "कियो अहाँक ई-पत्र सङ्केत लेल एकटा खाता {{SITENAME}} पर खोललन्हि ($4) नाम भेल \"$2\", कूटशब्द भेल \"$3\"।\nअहाँ सम्प्रवेश करी आ अपन कूटशब्द बदली।\n\nअहाँ ई सन्देशके बिसरि सकै छी, जँ ई खाता भ्रमवश बनल हुअए।",
        "login-throttled": "अहाँ ढ़ेर रास सम्प्रवेश प्रयास केलहुँ।\nफेर प्रयास करबासँ पहिने कने काल थम्हू।",
-       "login-abort-generic": "à¤\85हाà¤\81à¤\95 à¤¸à¤®à¥\8dपà¥\8dरवà¥\87श à¤¸à¤«à¤² à¤¨à¥\88 à¤­à¥\87ल- à¤°à¥\8bà¤\95ल à¤\97à¤\8fल",
-       "login-migrated-generic": "à¤\85हाà¤\81à¤\95à¥\87 à¤\96ाता à¤®à¤¾à¤\87à¤\97à¥\8dरà¥\87à¤\9f à¤\95à¤\8fल गेल अछि, आर अहाँके प्रयोक्ता नाम आब ई विकिमे नै अछि।",
-       "loginlanguagelabel": "भाषा : $1",
-       "suspicious-userlogout": "à¤\85हाà¤\81à¤\95 à¤¨à¤¿à¤·à¥\8dà¤\95à¥\8dरमणà¤\95 à¤\85नà¥\81रà¥\8bध à¤¨à¥\88 à¤®à¤¾à¤¨à¤² à¤\97à¥\87ल à¤\95ारण à¤\88 à¤²à¤¾à¤\97ल à¤\9cà¥\87 à¤\88 à¤ªà¥\81रान à¤\97वà¥\87षà¤\95à¤\95 à¤²à¤¾à¤\97ि à¤µà¤¾ à¤¦à¥\8bसराà¤\87त à¤\89पसà¥\8dमà¥\83तद्वारा पठाओल गेल छल।",
+       "login-abort-generic": "à¤\85हाà¤\81à¤\95 à¤¸à¤®à¥\8dपà¥\8dरवà¥\87श à¤¸à¤«à¤² à¤¨à¥\88 à¤­à¥\87ल- à¤°à¥\8bà¤\95ल à¤\97à¥\87ल",
+       "login-migrated-generic": "à¤\85हाà¤\81à¤\95à¥\87 à¤\96ाता à¤®à¤¾à¤\87à¤\97à¥\8dरà¥\87à¤\9f à¤\95à¥\87ल गेल अछि, आर अहाँके प्रयोक्ता नाम आब ई विकिमे नै अछि।",
+       "loginlanguagelabel": "भाषा: $1",
+       "suspicious-userlogout": "à¤\85हाà¤\81à¤\95 à¤¨à¤¿à¤·à¥\8dà¤\95à¥\8dरमणà¤\95 à¤\85नà¥\81रà¥\8bध à¤¨à¥\88 à¤®à¤¾à¤¨à¤² à¤\97à¥\87ल à¤\95ारण à¤\88 à¤²à¤¾à¤\97ल à¤\9cà¥\87 à¤\88 à¤ªà¥\81रान à¤¬à¥\8dराà¤\89à¤\9cर à¤¤à¥\81à¤\9fल à¤µà¤¾ à¤\95à¥\8dयाà¤\9aिà¤\99 à¤ªà¥\8dरà¤\95à¥\8dसà¥\80द्वारा पठाओल गेल छल।",
        "createacct-another-realname-tip": "मूल नाम वैकल्पिक अछि।\nजँ अहाँ एकरा देबा लेल प्रयोग करै छी, ई अहाँक काजक श्रेय देबा लेल एकर प्रयोग कएल जाएत।",
        "pt-login": "सम्प्रवेश",
        "pt-login-button": "सम्प्रवेश",
+       "pt-login-continue-button": "प्रवेश जारी राखी",
        "pt-createaccount": "खाता खोलल जाए",
        "pt-userlogout": "निष्क्रमण",
        "php-mail-error-unknown": "पी.एच.पी.कऽ समाद कार्य() मे अज्ञात दोष भेल।",
        "passwordreset-emailtext-user": "प्रयोक्ता $1 {{अन्तर्जाल}} पर अहाँक खाता विवरणक {{SITENAME}} लेल फेरसँ ($4) आग्रह केने छथि। ई प्रयोक्ता {{PLURAL:$3|खाता अछि|खाता सभ अछि}} ऐ ई-पत्र संकेतसँ जुड़ल: $2\n{{PLURAL:$3| ई अस्थायी कूटशब्द|ई सभ अस्थायी कूटशब्द}} खतम भऽ जाएत {{PLURAL:$5|एक दिन|$5 दिन}} मे।\nअहाँ सम्प्रवेश करू आ एकटा नव कूटशब्द आब चुनू। जँ कियो दोसर ई आग्रह केने छथि, वा जँ अहाँकेँ अपन मूल कूटशब्द मोन पड़ि गेल अछि, आ अहाँ आब ओइ कूटशब्दकेँ नै बदलऽ चाहै छी, अहाँ ऐ संदेशकेँ बिसरि सकै छी आ अपन पुरान कूटशब्दक प्रयोग जारी राखि सकै छी।",
        "passwordreset-emailelement": "प्रयोक्ता: \n$1\n\nअस्थायी कूटशब्द: \n$2",
        "passwordreset-emailsentemail": "एकटा ई-पत्र मोन पाड़बा लेल पठाओल गेल अछि।",
+       "passwordreset-invalideamil": "अवैध इमेल ठेगान",
+       "passwordreset-nodata": "प्रयोगकर्ता नाम वा इमेल ठेगान नै देल गेल छल",
        "changeemail": "ई-मेल पता परिवर्तित करी",
        "changeemail-header": "अपन ईमेल पता परिवर्तन हेतु एकरा पुरा करी। यदि अहाँ अपन वर्तमान ईमेल पता हटाबैलेल चाहैत छी, तँ एकरा खाली छोडि दी आ एकरा भेजी।",
        "changeemail-no-info": "अहाँक ई पन्नाक सोझे प्रयोग करबालेल सम्प्रवेशित हुअए पडत।",
        "changeemail-oldemail": "वर्तमान ई-मेल पता:",
        "changeemail-newemail": "नव ई-मेल पता:",
+       "changeemail-newemail-help": "यदि अहाँ अपन इमेल ठेगान रिक्त राखैलेल चाहए छी तँ अहाँ ई स्थान खाली छोडि सकैत छी। मुदा अहाँ अपन पासवर्ड बिसरि गेलापर ओकरा इमेलद्वारा प्राप्त नै करि पेबै।",
        "changeemail-none": "(कोनो नै)",
        "changeemail-password": "अहाँक {{SITENAME}} कूटशब्द:",
        "changeemail-submit": "ई-मेल बदली",
        "changeemail-throttled": "अहाँ ढेर रास सम्प्रवेश प्रयास केलहुँ।\nफेर प्रयास करबासँ पहिने कने $1 काल थम्हू।",
+       "changeemail-nochange": "कृपया कोनो नव इमेल पता प्रविष्ट करी।",
        "resettokens": "टोकन रीसेट करी",
        "resettokens-text": "जे स्तोक अहाँके खाता सँ सम्बद्ध किछु विशिष्ट व्यक्तिगत जानकारी प्रदान करएत अछि, अहाँ वोकरा एतए सँ रिसेट कऽ सकएत छी।\n\nयदि अहाँ एकरा गलती सँ केकरो देखा देनए छी वा अहाँ के खाता ह्याक भ गेल अछि तहन अहाँके एकरा रिसेट कऽ देना चाही।",
        "resettokens-no-tokens": "रीसेट करवाक लेल कोनो टोकन नै अछि।",
        "minoredit": "अल्प सम्पादन",
        "watchthis": "ई पृष्ठके ध्यानसूचीमे राखी",
        "savearticle": "पन्नाक रक्षण करी",
+       "savechanges": "रक्षण करी",
+       "publishpage": "पृष्ठ प्रकाशित करी",
+       "publishchanges": "परिवर्तन प्रकाशित करी",
        "preview": "पूर्वावलोकन",
        "showpreview": "पूर्वप्रदर्शन",
        "showdiff": "परिवर्तन देखाबी",
        "missingsummary": "<strong>स्मारक:</strong> अहाँ सम्पादन सार नै देने छी।\nजँ अहाँ फेरसँ क्लिक करब \"{{int:savearticle}}\", अहाँक सम्पादन बिना एकर संरक्षित भऽ जाएत।",
        "selfredirect": "<strong>चेतावनी:</strong> आहाँ स्वेम के ई पन्ना पुनः निर्देशीत कएर रहल छी।\nआहाँ अनुप्रेषित के लेल गलत लक्ष्य निर्दिष्ट भ्या सकएत अछि, या आहाँ गलत पन्ना कें संपादन कैर सकएत छी।\nआहाँ फेरो से \"{{int:savearticle}}\" क्लिक करएत छी, रीडायरेक्ट ओनाहो भी बनाबल जेल अछि।",
        "missingcommenttext": "कृपा कऽ अपन विचार नीचाँ प्रविष्ट करी।",
-       "missingcommentheader": "'''स्मरण:''' अहाँ कोनो विषय/ शीर्षक ऐ टिप्पणीक लेल नै देने छी।\nजँ अहाँ फेरसँ क्लिक करब \"{{int:savearticle}}\" , अहाँक सम्पादन बिना एकर संरक्षित भऽ जाएत।",
+       "missingcommentheader": "<strong>अनुस्मारक:</strong> अहाँ ई टिप्पणीके कोनो शीर्षक नै देनए छी।\nयदि अहाँ \"{{int:savearticle}}\" पर पुन: क्लिक करैत छी तँ अहाँक परिवर्तन बिना शीर्षक रक्षण कएल जाइत।",
        "summary-preview": "सारांश पूर्वावलोकन",
        "subject-preview": "विषयक झलक:",
        "previewerrortext": "अहाँक परिवर्तनके पूर्वावलोकन करहिक समय एक त्रुटि आएल।",
        "userpage-userdoesnotexist": "प्रयोक्ता खाता \"$1\" पञ्जीकृत नै अछि।\nनिश्चय करी जे की अहाँ ई पन्ना बनेबाक/ सम्पादित करबाक इच्छुक छी।",
        "userpage-userdoesnotexist-view": "प्रयोक्ता खाता \"$1\" पञ्जीकृत नै अछि।",
        "blocked-notice-logextract": "ई प्रयोक्ता अखन प्रतिबन्धित अछि।\nअद्यतन प्रतिबन्धित  वृत्तलेख लेखा सन्दर्भ लेल नीचाँ देल अछि:",
-       "clearyourcache": "'''टिप्पणी:''' संरक्षणक बाद, अहाँकेँ परिवर्तन देखबा लेल अपन गवेषकक उपस्मृतिकेँ हटबए पड़त।\n''' मोजिल्ला/ फायरफॉक्स/ सफारी:''' दाबि कऽ राखू ''शिफ्ट'' केँ ''पुनर्भारित'' क्लिक करबाक समए, वा दाबू चाहे ''Ctrl-F5'' वा ''Ctrl-R'' (''Command-R'' मैकिनटोशपर);\n'''कन्करर: ''' क्लिक करू ''पुनर्भारित करू'' वा दाबू''F5'';\n'''ओपेरा:''' उपस्मृति खतम करू ''Tools → Preferences'';\n'''इन्टरनेट एक्सप्लोरर:''' दाबि कऽ राखू ''Ctrl'' क्लिक करबा काल ''नवीकरण,'' वा दाबू ''Ctrl-F5'' ।",
+       "clearyourcache": "<strong>टिप्पणी:</strong> संरक्षणक बाद, अहाँक परिवर्तन देखबा लेल अपन ब्राउजरक उपस्मृतिक हटबए पडत।\n<strong>फायरफक्स/ सफारी:<strong> <em>सिफ्ट</em>के दाबि <em>रिलोड</em>, वा <em>Ctrl-F5</em> वा <em>Ctrl-R</em> (म्याकपर <em>⌘-R</em>)\n<strong>गुगल क्रोम:</strong> <em>Ctrl-Shift-R</em> दाबी(म्याकपर <em>⌘-Shift-R</em>)\n<strong>इन्टरनेट एक्सप्लोरर:</strong> <em>Refresh</em> क्लिक करि <em>Ctrl</em> दाबि, वा <em>Ctrl-F5</em> दाबी\n<strong>ओपेरा:</strong> <em>Menu → Settings</em> पर जाए (म्याकपर <em>Opera → Preferences</em>) आ ओकर बाद <em>Privacy & security → Clear browsing data → Cached images and files</em>\n ।",
        "usercssyoucanpreview": "<strong>सङ्केत:</strong> सङ्ग्रह करैसँ पहिने अहाँ अपन नव सियसयसक जाँच लेल \"{{int:पूर्वदृश्य देखाउ}}\" बटनक प्रयोग करी।",
        "userjsyoucanpreview": "<strong>टिप</strong>  प्रयोग करी \"{{int:showpreview}}\" बटन अपन नव जावास्क्रिप्ट संरक्षण जँचबाक लेल।",
        "usercsspreview": "''' मोन राखू जे अहाँ मात्र अपन प्रयोक्ता  सी.एस.एस. क पूर्वदृश्य देख रहल छी।'''\n''' ई अखन धरि संरक्षित नै भऽ सकल!'''",
        "previewnote": "'''मोन राखू ई मातर पूर्वावलोकन छी।'''\nअहाँक परिवर्तन अखन धरि सँचिआएल नै गेल अछि!",
        "continue-editing": "सम्पादन क्षेत्र जाए",
        "previewconflict": "ई पूर्वदृश्य देखबैए उपरका सम्पादन क्षेत्रक पाठ, ई आएत जखन अहाँ संरक्षित करब।",
-       "session_fail_preview": "''' दुखी छी! अहाँक सत्रक दत्तांश खतम भऽ गेल तै कारणसँ अहाँक सम्पादनक निपटारा नै भऽ सकल।'''\nफेरसँ प्रयास करू।\nजँ ई फेरसँ काज नै करैए, प्रयोग करू [[Special:UserLogout|निष्क्रमण]] आ फेर सम्प्रवेश करू।",
-       "session_fail_preview_html": "''' दुखी छी! हम अहाँक सम्पादनक निष्पादन नै कऽ सकलहुँ कारण सत्रक दत्तांश खतम भऽ गेल।'''\n''कारण {{अन्तर्जाल}} लग काँच एच.टी.एम.एल. दत्तांश सक्रिय छै, पूर्वदृश्य जावास्क्रिप्ट आक्रमणक डरसँ नुकाएल राखल गेल अछि।''\n'''जँ ई वैध सम्पादन प्रयास अछि, कृपा कऽ पुनः प्रयास करू।'''\nजँ ई अखनो काज नै कऽ रहल अछि, प्रयास करू [[Special:UserLogout|निष्क्रमण कऽ रहल छी]] आ फेरसँ सम्प्रवेश।",
+       "session_fail_preview": "'''क्षमा करी! सेशन डाटा नष्ट होमएक कारण अहाँक परिवर्तन रक्षण नै कएल जा सकल।'''\nकृपया पुन: प्रयास करी । यदि एकर बादो सफल नै भेल तँ कृपया [[Special:UserLogout|लग आउट]] करि पुनः सम्प्रवेश करी।",
+       "session_fail_preview_html": "क्षमा करी! सेशन डाटा नष्ट होमएक कारण अहाँक परिवर्तन रक्षण नै कएल जा सकल।\n\n<em>चूँकि {{SITENAME}} पर रव एचटिएमएल सक्षम अछि, जाभास्क्रिप्ट हमला सँ बचावक लेल झलक नै देखाएल गेल अछि।</em>\n\n<strong>अगर ई अहाँक वैध सम्पादन यत्न छल, तँ कृपया पुनः प्रयास करी।</strong>\nयदि एकर बादो सफल नै भेल तँ कृपया [[Special:UserLogout|लग आउट]] करि पुनः सम्प्रवेश करी तथा जाँची यदि अहाँक ब्राउजर एहि साइट सँ कुकिजक अनुमति दैत अछि।",
        "token_suffix_mismatch": "'''अहाँक सम्पादन अस्वीकार कऽ देल गेल अछि कारण अहाँक ग्राहक प्रेष्यमान अंक विधानक विराम चेन्ह सभकेँ नष्ट कऽ देलन्हि।'''\nई सम्पादन पन्नाक पाठकेँ दूषित होएबासँ बचेबा लेल अमान्य कऽ देल गेल।\nई कखनो काल होइए जखन अहाँ जाल आधारित अनाम दोसरा लेल चल सेवा प्रयुक्त करै छी।",
        "edit_form_incomplete": "<strong>सम्पादन आवेदनक किछु भाग वितरक धरि नै पहुँचल; एक बेर फेर देखी जे अहाँक सम्पादन दुरुस्त अछि आ फेरसँ प्रयास करी।</strong>",
        "editing": "सम्पादन होइए $1",
        "yourdiff": "अन्तर",
        "copyrightwarning": "कृपा कय बुझू जे सभटा योगदान {{SITENAME}} ई बुझि कय देल जा रहल अछि जे ई निम्नांकितक अंतर्गत अछि $2 (देखू $1 जनकारीक हेतु). जौँ अहाँ चाहैत छी जी अहाँक रचना बिना रोकटोकक संपादित नहि हो किंवा बाँटल नहि जाय, तँ एकर योगदान एतय नहि करू। <br />\nएतय अहाँ ईहो सप्पत खाइत छी जी ई अहाँक अपन रचना छी आकि अहाँ एकरा कोनो सार्वजनिक डोमेन किंवा ओह्ने कोनो मँगनीक संदर्भ-स्थलसँ कॉपी कएने छी।\n< दृढ़> सर्वाधिकार सुरक्षित कार्य एतय नहि दी।!</दृढ़>",
        "copyrightwarning2": "कृपा कऽ बुझू जे सभटा योगदान {{अन्तर्जाल}} योगदानकर्ता द्वारा सम्पादित, बदलल वा हटाएल जा सकैत अछि।. जौँ अहाँ चाहैत छी जी अहाँक रचना बिना रोकटोकक संपादित नहि हो किंवा बाँटल नहि जाय, तँ एकर योगदान एतय नहि करू। <br />\nएतय अहाँ ईहो सप्पत खाइत छी जी ई अहाँक अपन रचना छी आकि अहाँ एकरा कोनो सार्वजनिक डोमेन किंवा ओहने कोनो मँगनीक संदर्भ-स्थलसँ कॉपी कएने छी(देखू $1 वर्णन लेल)।\n''' सर्वाधिकार सुरक्षित कार्य एतय नहि दी।!'''",
+       "editpage-cannot-use-custom-model": "ई पृष्ठक मुख्य सामग्री परिवर्तित नै भेल।",
        "longpageerror": "'''भ्रम: पाठ जे अहाँ देने छी से $1 किलोबाइट नमगर अछि,  जे अधिकतम आकार $2 किलोबाइट सँ बेशी नमगर अछि।'''\nई संरक्षित नै कएल जा सकत।",
-       "readonlywarning": "''' चेतौनी: ई दत्तनिधि सुस्थापन लेल प्रतिबन्धित कएल गेल अछि, से अहाँ अपन सम्पादनकेँ अखन संरक्षित नै कऽ सकब।'''\nअहाँ पाठकेँ कर्तनलेपन द्वारा एकटा टेक्स्ट संचिकामे धऽ सकै छी आ भविष्य लेल सुरक्षित राखि सकै छी।\n\nसंचालक जे एकरा प्रतिबन्धित केलन्हि से ई कारण देलन्हि: $1",
+       "readonlywarning": "<strong>सावधान: डेटाबेस सुस्थापन लेल बन्द कएल गेल अछि, एहिलेल अहाँक सम्पादन अखन रक्षण नै कएल जा सकत।\nयदि अहाँ पाठ कपी-पेस्टद्वारा एकटा टेक्स्ट सञ्चिकामे धऽ सकै छी आ भविष्य लेल सुरक्षित राखि सकै छी।</strong>\n\nसञ्चालक जे एकरा बन्द केलन्हि से ई कारण देलन्हि: $1",
        "protectedpagewarning": "''' चेतौनी: ई पन्ना संरक्षित अछि से खाली संचालन अधिकारयुक्त प्रयोक्ता एकरा सम्पादित कऽ सकै छथि।'''\nअद्यतन वृतलेख उल्लेख नीचाँ सन्दर्भ लेल देल जा रहल अछि:",
        "semiprotectedpagewarning": "'''चेतौनी:''' ई पन्ना संरक्षित अछि से खाली पंजीकृत प्रयोक्ता एकरा सम्पादित कऽ सकै छथि।\nअद्यतन वृतलेख उल्लेख नीचाँ सन्दर्भ लेल देल जा रहल अछि:",
        "cascadeprotectedwarning": "'''चेतौनी:''' ई पन्ना संरक्षित अछि से खाली संचालन अधिकारयुक्त प्रयोक्ता एकरा सम्पादित कऽ सकै छथि, कारण ई तराउपड़ी संरक्षित {{PLURAL:$1|पन्ना|पन्ना}}  मे शामिल अछि।",
        "permissionserrorstext-withaction": "अहाँक अनुमति नै अछि $2 लेल, एकर लेल {{PLURAL:$1|कारण|कारणसभ}}सँ:",
        "recreate-moveddeleted-warn": "'''चेतौनी''': अहाँ फेरसँ ओ पन्ना बना रहल छी जे पहिने मेटा देल गेल छै।'''\n\nअहाँ विचारू जे की ई सम्पादन केनाइ उचित अछि।\nऐ पन्नाक मेटाएल बला आ हटाएल वृत्तलेख एतए सुविधा लेल देल जा रहल अछि:",
        "moveddeleted-notice": "ई पन्ना मेटाएल गेल अछि।\nई पन्ना लेल मेटाएल आ स्थानान्तरणक लग सन्दर्भ लेल नीचाँ देल गेल अछि।",
-       "log-fulllog": "सभà¤\9fा à¤µà¥\83तà¥\8dतलà¥\87à¤\96 देखी",
+       "log-fulllog": "समà¥\8dपà¥\82रà¥\8dण à¤²à¥\8cà¤\97 देखी",
        "edit-hook-aborted": "सम्पादन नोकसीसँ खतम भेल।\nई कोनो कारण नै देलक।",
        "edit-gone-missing": "पन्ना अद्यतन नै भऽ सकल।\nलगैए जे ई मेटा देल गेल अछि।",
        "edit-conflict": "सम्पादन अन्तर्विरोध",
        "expansion-depth-exceeded-warning": "पन्ना विस्तार गहिराई पार केनए अछि",
        "parser-unstrip-loop-warning": "Unstrip लूप पाओल गेल",
        "parser-unstrip-recursion-limit": "Unstrip पुनरावर्तन सीमा पार कइर गेल($1)",
-       "converter-manual-rule-error": "म्यानुअल भाषा परिवर्तन नियम में त्रुटि",
+       "converter-manual-rule-error": "म्यानुअल भाषा परिवर्तन नियममे त्रुटि",
        "undo-success": "ई सम्पादन पूर्ववत बदलल जा सकैए।\nकृपा क' नीचाँक तुलनाक जाँच करू ई देखैले जे ई वएह भेल अछि जे अहाँ चाहै छलहुँ, आ तखन सम्पादन ख़तम करबा लेल नीचाँक परिवर्तन सुरक्षित करू ।",
        "undo-failure": "मध्यवर्ती विरोधी सम्पादनक कारण ऐ सम्पादनकेँ खतम नै कएल जा सकैए।",
        "undo-norev": "ई सम्पादन खतम नै कएला जा सकैए कारण ई अछि नै वा मेटा देल गेल अछि।",
        "undo-summary-username-hidden": "नुकाएल गेल प्रयोक्ताद्वारा केल गेल परिवर्तन $1 के पूर्ववत केल गेल",
        "cantcreateaccount-text": "(<strong>$1</strong>) अनिकेत पतासँ खाता निर्माण प्रतिबन्धित कएल गेल [[User:$3|$3]]।\n$3 द्वारा देल कारण अछि ''$2''",
        "cantcreateaccount-range-text": "<strong>$1</strong> के श्रेणी में आबई वाला आई॰पी पता सऽ, जएमें आहाँ कें आई॰पी पता (<strong>$4</strong>) शामिल अछि, नया खाता के रचना [[User:$3|$3]] द्वारा अवरोधित केल गेल अछि। \n\n$3 द्वारा देल गेल कारण अछि: \"$2\"",
-       "viewpagelogs": "à¤\88 à¤ªà¤¨à¥\8dनाà¤\95 à¤µà¥\83तà¥\8dतलà¥\87à¤\96सभ देखी",
+       "viewpagelogs": "à¤\88 à¤ªà¤¨à¥\8dनाà¤\95 à¤²à¤\97 देखी",
        "nohistory": "ऐ पन्ना लेल कोनो सम्पादन इतिहास नै अछि।",
        "currentrev": "नूतन संशोधन",
        "currentrev-asof": "$1 क समकालिक तखुनका संशोधन",
        "revdelete-show-file-submit": "हँ",
        "revdelete-selected-text": "[[:$2]] {{PLURAL:$1|क|के}} चयनित अवतरण:",
        "revdelete-selected-file": "[[:$2]] {{PLURAL:$1|क|के}} चयनित फाइल अवतरण:",
-       "logdelete-selected": "{{PLURAL:$1|à¤\9aà¥\81नल à¤µà¥\83तà¥\8dतलà¥\87à¤\96 à¤\98à¤\9fना|à¤\9aà¥\81नल à¤µà¥\83तà¥\8dतलà¥\87à¤\96 घटनासभ}}:",
+       "logdelete-selected": "{{PLURAL:$1|à¤\9aà¥\81नल à¤²à¥\8cà¤\97 à¤\98à¤\9fना|à¤\9aà¥\81नल à¤²à¥\8cà¤\97 घटनासभ}}:",
        "revdelete-text-text": "हटाएल गेल अवतरण पृष्ठ इतिहासमें देखाएल जाएत मुदा वोकर सामग्री सार्वजनिक रूपसँ नै देखाएल जा सकएत अछि।",
        "revdelete-text-file": "हटाएल गेल अवतरण पृष्ठ इतिहासमें देखाएल जाएत मुदा वोकर सामग्री सार्वजनिक रूपसँ नै देखाएल जा सकएत अछि।",
        "logdelete-text": "हटाए गेल प्रवेश घटनासभ अखैनो भी लॉग में दिखाबल ज्यात, लेकिन ओकर सामग्री के कुछ भाग के सार्वजनीक करबाक के लेल दुर्गम भ्या जेत।",
        "revdelete-reasonotherlist": "दोसर कारण",
        "revdelete-edit-reasonlist": "मेटेबाक कारण बदली",
        "revdelete-offender": "संशोधन केनिहार:",
-       "suppressionlog": "दबाà¤\8fलà¤\97à¥\87ल à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
+       "suppressionlog": "नà¥\81à¤\95ाà¤\8fल à¤²à¥\8cà¤\97",
        "suppressionlogtext": "नीचाँ मेटाएल आ प्रतिबन्धक उल्लेख अछि जे संचालकसँ नुकाएल सामिग्री अछि।\nअखन स्थित प्रभावी प्रतिबन्ध आ अवरोध लेल देखू [[Special:BlockList|IP block list]] ।",
-       "mergehistory": "मिà¤\9cà¥\8dà¤\9dर à¤­à¥\87ल à¤ªà¤¨à¥\8dना à¤¸à¤­à¤\95 à¤\87तिहास",
+       "mergehistory": "पà¥\83षà¥\8dठà¤\95 à¤\87तिहास à¤\8fà¤\95तà¥\8dरित à¤\95रà¥\80",
        "mergehistory-header": "ई पन्ना अहाँकेँ एकटा स्रोत पन्नाक एकटा नव पन्नामे संशोधन इतिहासकेँ मिज्झर करबाक अनुमति दैत अछि।\nसुनिश्चित होउ जे ई परिवर्तन ऐतिहासिक पन्ना सांतत्य स्थापित करत।",
-       "mergehistory-box": "दà¥\82 à¤ªà¤¨à¥\8dनाà¤\95 à¤¸à¤\82शà¥\8bधन à¤®à¤¿à¤\9cà¥\8dà¤\9dर à¤\95रà¥\80।",
+       "mergehistory-box": "दà¥\81à¤\88 à¤ªà¥\83षà¥\8dठसभà¤\95 à¤\87तिहास à¤\8fà¤\95तà¥\8dरित à¤\95रà¥\80:",
        "mergehistory-from": "मूल पन्ना:",
        "mergehistory-into": "लक्ष्य पन्ना:",
-       "mergehistory-list": "मिà¤\9cà¥\8dà¤\9dर à¤¯à¥\8bà¤\97à¥\8dय सम्पादन इतिहास",
+       "mergehistory-list": "à¤\8fà¤\95तà¥\8dरितà¥\80à¤\95रण सम्पादन इतिहास",
        "mergehistory-merge": "[[:$1]] एकर संशोधन सभकेँ [[:$2]] मे मिलाएल जा सकैए।\nरेडियो बटन स्तम्भक प्रयोग मात्र संशोधनकेँ निर्धारित समए वा ओइसँ पहिने मिज्झर करबामे प्रयोग करू।\nमोन राखू जे उपर नीचाँक लागिक प्रयोग ऐ स्तम्भकेँ पुनर्स्थापित कऽ देत।",
-       "mergehistory-go": "मिà¤\9cà¥\8dà¤\9dर à¤¹à¥\8bà¤\87 à¤¯à¥\8bà¤\97à¥\8dय à¤¸à¤®à¥\8dपादन à¤¸à¤­à¤\95à¥\87à¤\81 à¤¦à¥\87à¤\96ाà¤\89",
-       "mergehistory-submit": "सà¤\82शà¥\8bधन à¤¸à¤­à¤\95à¥\87 à¤®à¤¿à¤\9cà¥\8dà¤\9dर करी",
-       "mergehistory-empty": "à¤\95à¥\8bनà¥\8b à¤¸à¤\82शà¥\8bधन à¤®à¤¿à¤\9cà¥\8dà¤\9dर à¤¨à¥\88 à¤\95à¤\8fल à¤\9cा à¤¸à¤\95à¥\88à¤\8f।",
+       "mergehistory-go": "à¤\8fà¤\95तà¥\8dरित à¤\95रà¥\88लà¥\87ल à¤²à¤¾à¤¯à¤\95 à¤¸à¤®à¥\8dपादन à¤¦à¥\87à¤\96ाबà¥\80",
+       "mergehistory-submit": "सà¤\82शà¥\8bधन à¤\8fà¤\95तà¥\8dरित करी",
+       "mergehistory-empty": "à¤\95à¥\8bनà¥\8b à¤­à¥\80 à¤\85वतरण à¤\8fà¤\95तà¥\8dरित à¤¨à¥\88 à¤\95à¤\8fल à¤\9cा à¤¸à¤\95ल।",
        "mergehistory-done": "$3 {{PLURAL:$3|संशोधन|संशोधन सभ}} एकर $1 सफलता पूर्वक मिज्झर कएल गेल [[:$2]] मे।",
        "mergehistory-fail": "इतिहासक मिश्रणकेँ नै कऽ सकल, कृपा कऽ पन्ना आ समए परिमितिकेँ फेरसँ जाँचू।",
+       "mergehistory-fail-bad-timestamp": "समय सङ्ख्या अमान्य।",
+       "mergehistory-fail-invalid-source": "अमान्य स्रोत पृष्ठ।",
+       "mergehistory-fail-invalid-dest": "अमान्य लक्ष्य पृष्ठ।",
+       "mergehistory-fail-no-change": "इतिहास विलय कोनो भी अवतरणके विलय नै करि सकल। कृपया लेख आ समय पुन: देखी।",
+       "mergehistory-fail-permission": "इतिहास विलय हेतु अधिकार नै अछि।",
+       "mergehistory-fail-self-merge": "स्रोत आ लक्ष्य पन्ना सभ एक्के नै भऽ सकैए।",
+       "mergehistory-fail-timestamps-overlap": "स्रोत अवतरण भेजैवाला अवतरणक बाद आबि रहल अछि।",
+       "mergehistory-fail-toobig": "इतिहास विलय सम्भव नै अछि कियाकि अवतरण सीमा $1 सँ अधिक {{PLURAL:$1|अवतरण|अवतरणसभ}}के स्थानान्तरित करै पडत।",
        "mergehistory-no-source": "स्रोत पन्ना $1 नै अछि।",
        "mergehistory-no-destination": "लक्ष्य पन्ना $1 नै अछि।",
        "mergehistory-invalid-source": "स्रोत पन्ना एकटा मान्य शीर्षक हेबाक चाही।",
        "mergehistory-comment": "[[:$1]] केँ [[:$2]] मे मिलाएल गेल: $3",
        "mergehistory-same-destination": "स्रोत आ लक्ष्य पन्ना सभ एक्के नै भऽ सकैए",
        "mergehistory-reason": "कारण:",
-       "mergelog": "मिà¤\9cà¥\8dà¤\9dरबला à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
+       "mergelog": "à¤\8fà¤\95तà¥\8dरà¥\80à¤\95रण à¤²à¥\8cà¤\97",
        "revertmerge": "नै मिज्झर",
        "mergelogpagetext": "नीचाँ एक पन्ना इतिहासक दोसरमे अद्यतन मिश्रणक सूची अछि।",
        "history-title": "\"$1\" क संशोधन इतिहास",
        "searchprofile-advanced-tooltip": "बनाएल नामस्थान सभमे ताकी",
        "search-result-size": "$1 ({{PLURAL:$2|1 शब्द|$2 शब्दसभ}})",
        "search-result-category-size": "{{PLURAL:$1|1 सदस्य|$1 सदस्य}} ({{PLURAL:$2|1 उपसंवर्ग|$2 उपसंवर्ग}}, {{PLURAL:$3|1 संचिका|$3 संचिका}})",
-       "search-redirect": "(रस्ता बदलेन $1)",
+       "search-redirect": "($1 सँ पुनर्निर्देशित)",
        "search-section": "(शाखा $1)",
        "search-category": "(श्रेणी $1)",
        "search-file-match": "(फाइल सामग्रीसे मेल खेलक अछि)",
        "search-suggest": "अहाँ मोने अछि जे:$1",
+       "search-rewritten": "$1 क परिणाम देखाए रहल अछि। ई $2 हेतु खोजि रहल अछि।",
        "search-interwiki-caption": "अन्य प्रकल्प",
        "search-interwiki-default": "$1 सँ परिणाम:",
        "search-interwiki-more": "(आर)",
        "showingresultsinrange": "नीचाँ एतऽ धरि {{PLURAL:$1|'''1''' परिणाम|'''$1''' परिणाम सभ}}  #'''$2''' सँ प्रारम्भ भऽ कऽ।",
        "search-showingresults": "{{PLURAL:$4|<strong>$3</strong> में से <strong>$1</strong> परिणाम|<strong>$3</strong> में सँ परिणाम <strong>$1 - $2</strong>}}",
        "search-nonefound": "अभ्यर्थनासँ मेल खाइत कोनो परिणाम नै भेटल।",
+       "search-nonefound-thiswiki": "अभ्यर्थनासँ मेल खाइत कोनो परिणाम नै भेटल।",
        "powersearch-legend": "विशेष खोज",
        "powersearch-ns": "निर्धारकमे खोज",
        "powersearch-togglelabel": "जाँची:",
        "prefs-watchlist-token": "साकांक्ष-सूची खेप:",
        "prefs-misc": "आर",
        "prefs-resetpass": "कूटशब्द बदली",
-       "prefs-changeemail": "à¤\88-पतà¥\8dर à¤¸à¤\82à¤\95à¥\87त à¤¬à¤¦à¤²à¥\82",
+       "prefs-changeemail": "à¤\87मà¥\87ल à¤ªà¤¤à¤¾ à¤ªà¤°à¤¿à¤µà¤°à¥\8dतित à¤\95रà¥\80",
        "prefs-setemail": "ई-पत्र ठेगान निर्धारित करी",
        "prefs-email": "ई-पत्र विकल्पसभ",
        "prefs-rendering": "मुँहकान",
        "saveprefs": "सङ्ग्रह करी",
-       "restoreprefs": "सभà¤\9fा à¤ªà¥\82रà¥\8dवनिरà¥\8dधारित à¤\9aयनà¤\95à¥\87à¤\81 à¤«à¥\87रसà¤\81 à¤\86नà¥\82",
+       "restoreprefs": "सभà¤\9fा à¤ªà¥\82रà¥\8dवनिरà¥\8dधारित à¤\9aयनà¤\95à¥\87à¤\81 à¤«à¥\87रसà¤\81 à¤\86नà¥\80",
        "prefs-editing": "सम्पादन कऽ रहल छी",
        "rows": "पाँतीसभ",
        "columns": "स्तम्भसभ",
        "searchresultshead": "ताकी",
-       "stub-threshold": "सà¥\80मा <a href=\"#\" class=\"stub\">à¤\95ाà¤\9fल à¤²à¤¾à¤\97ि</a> à¤¸à¤\81à¤\9aियाà¤\8fल (à¤\85षà¥\8dà¤\9fà¤\95):",
+       "stub-threshold": "à¤\86धार à¤²à¤¿à¤\99à¥\8dà¤\95 à¤¹à¥\87तà¥\81 à¤ªà¥\8dरारà¥\82पण ($1):",
        "stub-threshold-sample-link": "उदाहरण",
        "stub-threshold-disabled": "अशक्त कएल",
        "recentchangesdays": "आइ-काल्हिक परिवर्तनमे कतेक दिन देखाएल गेल:",
        "prefs-tokenwatchlist": "टोकन",
        "prefs-diffs": "अन्तर",
        "prefs-help-prefershttps": "इ प्राथमिकता अहाँके फेर स सम्प्रवेश करलाक बाद प्रभाव पडत।",
+       "prefswarning-warning": "अहाँ अपन पसन्दमे एहन परिवर्तन केनए छी जे अखनि धरि रक्षण नै केल गेल अछि। यदि अहाँ \"$1\" पर बिना क्लिक केनए ई पृष्ठ छोडि देबै तँ अहाँक पसन्द अपडेट नै केल जाइत।",
        "prefs-tabs-navigation-hint": "सुझाव: अहाँ टैब्स सूचीमे टैब्सके बीच आवागमन करवाक लेल बाम आर दाहिना बागलके कुंजिसभके उपयोग कइर सकैत छी।",
        "userrights": "प्रयोक्ता अधिकारक प्रबन्धन",
        "userrights-lookup-user": "प्रयोक्ता समूहसभक प्रबन्ध करी",
        "right-createaccount": "नव प्रयोक्ता खातासभ बनाबी",
        "right-autocreateaccount": "बाहरी खातासँ स्वतः प्रवेश",
        "right-minoredit": "सम्पादन सभकेँ मामूली चिन्हित करी",
-       "right-move": "पनà¥\8dना à¤\98सà¤\95ाबी",
-       "right-move-subpages": "पà¥\83षà¥\8dठ à¤\89पपà¥\83षà¥\8dठसभ à¤¸à¤¹à¤¿à¤¤ à¤\98सà¤\95ाबी",
-       "right-move-rootuserpages": "मà¥\82ल à¤ªà¥\8dरयà¥\8bà¤\95à¥\8dता à¤ªà¤¨à¥\8dना à¤\98सà¤\95ाबी",
-       "right-move-categorypages": "शà¥\8dरà¥\87णà¥\80 à¤ªà¥\83षà¥\8dठ à¤\98सà¤\95ाबी",
-       "right-movefile": "सञ्चिका सभ घसकाबी",
-       "right-suppressredirect": "पà¥\83षà¥\8dठ à¤\98सà¤\95à¥\87बाकाल पुनर्निर्देश नै छोडी",
+       "right-move": "पनà¥\8dना à¤¸à¥\8dथानानà¥\8dतरित à¤\95री",
+       "right-move-subpages": "पà¥\83षà¥\8dठ à¤\89पपà¥\83षà¥\8dठसभ à¤¸à¤¹à¤¿à¤¤ à¤¸à¥\8dथानानà¥\8dतरित à¤\95री",
+       "right-move-rootuserpages": "मà¥\82ल à¤ªà¥\8dरयà¥\8bà¤\95à¥\8dता à¤ªà¤¨à¥\8dना à¤¸à¥\8dथानानà¥\8dतरित à¤\95री",
+       "right-move-categorypages": "शà¥\8dरà¥\87णà¥\80 à¤ªà¥\83षà¥\8dठ à¤¸à¥\8dथानानà¥\8dतरित à¤\95री",
+       "right-movefile": "सञ्चिकासभ स्थानान्तरित करी",
+       "right-suppressredirect": "पà¥\83षà¥\8dठ à¤¸à¥\8dथानानà¥\8dतरित à¤\95रà¥\88तकाल पुनर्निर्देश नै छोडी",
        "right-upload": "सञ्चिकासभ उपारोपित करी",
        "right-reupload": "वर्तमान सञ्चिकासभक पुनर्लेखन करी",
        "right-reupload-own": "अपन उपारोपित पन्नासभक पुनर्लेखन करी",
        "right-delete": "पन्ना मेटाबी",
        "right-bigdelete": "बेसी इतिहास भएल पन्ना सभ मेटाबी",
        "right-deletelogentry": "विशिष्ट लग प्रविष्टिसभके नुकाउ आ देखाउ",
-       "right-deleterevision": "निरà¥\8dधारित à¤¸à¤\82शà¥\8bधित à¤ªà¤¨à¥\8dना à¤®à¥\87à¤\9fाà¤\89 à¤\86 à¤«à¥\87रसà¤\81 à¤\86नà¥\82",
+       "right-deleterevision": "पà¥\83षà¥\8dठसभà¤\95 à¤µà¤¿à¤¶à¤¿à¤·à¥\8dà¤\9f à¤\85वतरण à¤¹à¤\9fाबà¥\80 à¤¤à¤¥à¤¾ à¤ªà¥\81नरà¥\8dसà¥\8dथापित à¤\95रà¥\80",
        "right-deletedhistory": "मेटाएल इतिहास प्रविष्टि देखू, बिना लागिक पाठक",
        "right-deletedtext": "मेटाएल पाठ आ दूटा मेटाएल संशोधनक बीचक परिवर्तन देखी",
        "right-browsearchive": "मेटाएल पन्ना ताकी",
        "right-undelete": "पन्ना फेरसँ आनी",
        "right-suppressrevision": "संचालकसँ नुकाएल संशोधनकेँ पुनरीक्षित करी आ फेरसँ आनी",
        "right-viewsuppressed": "कोनो प्रयोक्ताके नुकाएल संसोधन देखु",
-       "right-suppressionlog": "वà¥\8dयà¤\95à¥\8dतिà¤\97त à¤µà¥\83तà¥\8dतलà¥\87à¤\96 देखी",
+       "right-suppressionlog": "निà¤\9cà¥\80 à¤²à¥\8cà¤\97 देखी",
        "right-block": "दोसर प्रयोक्ताकेँ सम्पादनसँ रोकी",
        "right-blockemail": "प्रयोक्ताकेँ ई-पत्र पठेबासँ रोकी",
        "right-hideuser": "एकटा प्रयोक्तानामकेँ प्रतिबन्धित करू, लोकसँ एकरा नुका कऽ",
        "right-noratelimit": "दरक सीमासँ प्रभावित नै",
        "right-import": "दोसर विकीसँ पन्ना लिअ",
        "right-importupload": "पन्नासभकेँ संचिका उपारोपणसँ आनू",
-       "right-patrol": "दà¥\8bसराà¤\95 à¤¸à¤®à¥\8dपादनà¤\95à¥\87à¤\81 à¤¸à¤\82à¤\9aालित à¤¦à¥\87à¤\96ाà¤\89",
-       "right-autopatrol": "अपन सम्पादनकेँ स्वचालित रूपेँ संचालित देखाउ",
+       "right-patrol": "à¤\85नà¥\8dय à¤¸à¤¦à¤¸à¥\8dयसभà¤\95 à¤¸à¤®à¥\8dपादन à¤ªà¤°à¥\80à¤\95à¥\8dषित à¤\9aिनà¥\8dहित à¤\95रà¥\80",
+       "right-autopatrol": "अपन सम्पादन स्वचालित रूपसँ परीक्षित चिन्हित करी",
        "right-patrolmarks": "हालक परिवर्तनमे संचालन चेन्ह देखू",
-       "right-unwatchedpages": "बिना à¤¸à¤\82à¤\9aालित à¤ªà¤¨à¥\8dना à¤¸à¤­à¤\95 à¤¸à¥\82à¤\9aà¥\80à¤\95à¥\87à¤\81 à¤¦à¥\87à¤\96à¥\82",
-       "right-mergehistory": "पनà¥\8dनाà¤\95 à¤\87तिहास à¤¸à¤­à¤\95à¥\87à¤\81 à¤®à¤¿à¤\9cà¥\8dà¤\9dर à¤\95रà¥\82",
+       "right-unwatchedpages": "à¤\8fहन à¤ªà¥\83षà¥\8dठसभà¤\95 à¤¸à¥\82à¤\9aà¥\80 à¤¦à¥\87à¤\96à¥\80 à¤\9cà¥\87 à¤\95à¥\87à¤\95रà¥\8b à¤§à¥\8dयानसà¥\82à¤\9aà¥\80मà¥\87 à¤¨à¥\88 à¤\85à¤\9bि",
+       "right-mergehistory": "पनà¥\8dनाà¤\95 à¤\87तिहास à¤\8fà¤\95तà¥\8dरित à¤\95रà¥\80",
        "right-userrights": "सभटा प्रयोक्ता अधिकारकेँ सम्पादित करू",
        "right-userrights-interwiki": "दोसर विकीपर प्रयोक्ताक प्रयोक्ता अधिकारक सम्पादन करी",
        "right-siteadmin": "दत्तनिधिकेँ प्रतिबन्धित करू आ फेर प्रतिबन्ध हटाउ",
        "right-override-export-depth": "५ परत धरि जा  पन्ना सभ निर्यात, जइमे लागिबला पन्ना सभ शामिल अछि, करू।",
        "right-sendemail": "ई-पत्र दोसर प्रयोक्ता लोकनिकेँ पठाउ",
        "right-passwordreset": "कूटशब्द पुनर्निर्धारण ई-पत्र देखू",
-       "right-managechangetags": "डेटाबेस से [[Special:Tags|नुकाबू]] बनाबु आर हटाबु",
+       "right-managechangetags": "[[Special:Tags|ट्यागसभ]] बनाबी आ नुकाबी",
        "right-applychangetags": "प्रयोग में लाबू [[Special:Tags|tags]] कक्रो बदलाव के साथ।",
        "right-changetags": "जमा करु आर हटाबु स्वतंत्र [[Special:Tags|टैग]] व्यक्तिगत अवतरण आर लॉग प्रविक्ति पे",
+       "right-deletechangetags": "डेटाबेस सँ [[Special:Tags|ट्यागसभ]] मेटाबी",
        "grant-generic": "\"$1\" अधिकार सङ्ग्रह",
        "grant-group-page-interaction": "पृष्ठसभसँ जोडी",
        "grant-group-file-interaction": "मिडियासँ जोडी",
-       "newuserlogpage": "प्रयोक्ता रचना वृत्तलेख",
+       "grant-group-watchlist-interaction": "ध्यानसूची सँ मेल करी",
+       "grant-group-email": "इमेल पठाबी",
+       "grant-group-high-volume": "उच्च कार्य गतिविधि करी",
+       "grant-group-customization": "पसन्द आ तय",
+       "grant-group-administration": "प्रबन्धकीय कार्य करी",
+       "grant-group-private-information": "अपन सम्बन्धमे निजी डेटा आनी",
+       "grant-group-other": "अन्य गतिविधि",
+       "grant-blockusers": "प्रतिबन्धित आ अप्रतिबन्धित करनाए",
+       "grant-createaccount": "खाता खोलल जाए",
+       "grant-createeditmovepage": "निर्माण, सम्पादन, आ स्थानान्तरण करनाए",
+       "grant-delete": "लेख, अवतरण आ लग हटेनाए",
+       "grant-editinterface": "मिडियाविकि नामस्थान आ सदस्य सिएसएस/जेएस सम्पादित करनाए",
+       "grant-editmycssjs": "अपन सदस्य सिएसएस/जेएस सम्पादित करी",
+       "grant-editmyoptions": "अपन सदस्य पसन्द सम्पादित करी",
+       "grant-editmywatchlist": "अपन साकांक्षसूची सम्पादित करी",
+       "grant-editpage": "बनल पृष्ठ सम्पादित करी",
+       "grant-editprotected": "सुरक्षित पृष्ठ सम्पादित करी",
+       "grant-highvolume": "अत्यधिक तेजी सँ सम्पादन",
+       "grant-oversight": "सदस्य नुकाबी आ अवतरण हटाबी",
+       "grant-patrol": "पृष्ठसभके जाँचल चिन्हित करी",
+       "grant-privateinfo": "निजी जानकारी आनी",
+       "grant-protect": "पृष्ठसभ सुरक्षित व असुरक्षित करनाए",
+       "grant-rollback": "पृष्ठ सँ सम्पादन पूर्ववत केनाए",
+       "grant-sendemail": "अन्य प्रयोगकर्ताके इ-मेल भेजी",
+       "grant-uploadeditmovefile": "फाइल अपलोड, बदलनाए, स्थानान्तरण करनाए",
+       "grant-uploadfile": "नव सञ्चिकासभ उपारोपित करी",
+       "grant-basic": "सामान्य अधिकार",
+       "grant-viewdeleted": "मेटाएल फाइल व पृष्ठ देखी",
+       "grant-viewmywatchlist": "अपन साकांक्षसूची देखी",
+       "newuserlogpage": "प्रयोक्ता रचना लग",
        "newuserlogpagetext": "ई प्रयोक्ता निर्माणक वृत्तलेख अछि।",
-       "rightslog": "पà¥\8dरयà¥\8bà¤\95à¥\8dता à¤\85धिà¤\95ार à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
+       "rightslog": "पà¥\8dरयà¥\8bà¤\95à¥\8dता à¤\85धिà¤\95ार à¤²à¥\8cà¤\97",
        "rightslogtext": "ई प्रयोक्ता अधिकार परिवर्तन सभक वृतलेख छी।",
        "action-read": "ई पन्ना पढी",
        "action-edit": "ई पन्नाक सम्पादित करी",
-       "action-createpage": "पृष्ठ बनाबी",
-       "action-createtalk": "वार्ता पन्ना बनाबी",
+       "action-createpage": "à¤\88 à¤ªà¥\83षà¥\8dठ à¤¬à¤¨à¤¾à¤¬à¥\80",
+       "action-createtalk": "à¤\88 à¤µà¤¾à¤°à¥\8dता à¤ªà¤¨à¥\8dना à¤¬à¤¨à¤¾à¤¬à¥\80",
        "action-createaccount": "ई प्रयोक्ता खाता बनाबी",
-       "action-history": "पन्नाक इतिहास मिज्झर करी",
+       "action-autocreateaccount": "स्वतः बाहरी सदस्य खाता बनाबी",
+       "action-history": "ई पृष्ठक इतिहास देखी",
        "action-minoredit": "ऐ सम्पादनके मामूली कही",
-       "action-move": "à¤\90 à¤ªà¥\83षà¥\8dठà¤\95à¥\87 à¤\98सà¤\95ाबी",
-       "action-move-subpages": "à¤\90 à¤ªà¤¨à¥\8dना à¤\86 à¤\8fà¤\95र à¤\89पपनà¥\8dनाà¤\95à¥\87 à¤\98सà¤\95ाबी",
-       "action-move-rootuserpages": "मà¥\82ल à¤ªà¥\8dरयà¥\8bà¤\95à¥\8dता à¤ªà¤¨à¥\8dना à¤\98सà¤\95ाबी",
-       "action-move-categorypages": "शà¥\8dरà¥\87णà¥\80 à¤ªà¥\83षà¥\8dठ à¤\98सà¤\95ाबी",
-       "action-movefile": "à¤\88 à¤¸à¤\82à¤\9aिà¤\95ाà¤\95à¥\87à¤\81 à¤\98सà¤\95ाà¤\89",
+       "action-move": "à¤\88 à¤ªà¥\83षà¥\8dठà¤\95à¥\87 à¤¸à¥\8dथानानà¥\8dतरित à¤\95री",
+       "action-move-subpages": "à¤\88 à¤ªà¤¨à¥\8dना à¤\86 à¤\8fà¤\95र à¤\89पपनà¥\8dनाà¤\95à¥\87 à¤¸à¥\8dथानानà¥\8dतरित à¤\95री",
+       "action-move-rootuserpages": "मà¥\82ल à¤ªà¥\8dरयà¥\8bà¤\95à¥\8dता à¤ªà¤¨à¥\8dना à¤¸à¥\8dथानानà¥\8dतरित à¤\95री",
+       "action-move-categorypages": "शà¥\8dरà¥\87णà¥\80 à¤ªà¥\83षà¥\8dठ à¤¸à¥\8dथानानà¥\8dतरित à¤\95री",
+       "action-movefile": "à¤\88 à¤¸à¤\9eà¥\8dà¤\9aिà¤\95ा à¤¸à¥\8dथानानà¥\8dतरण à¤\95रà¥\80",
        "action-upload": "ई संचिकाकेँ उपारोपित करू",
        "action-reupload": "ई संचिकाक पुनर्लेखन करू",
        "action-reupload-shared": "ई संचिकाकेँ साझी बखारीमे नजरि नै दिअ",
        "action-rollback": "कृपा कऽ अन्तिम प्रयोक्ताक सम्पादनकेँ प्रत्यावर्तित करू जे एक खास पन्नाकेँ सम्पादित केलन्हि",
        "action-import": "ऐ पन्नाकेँ दोसर विकीसँ आनू",
        "action-importupload": "ऐ पन्नाकेँ संचिका उपारोपणसँ आनू",
-       "action-patrol": "दà¥\8bसराà¤\95 à¤¸à¤®à¥\8dपादनà¤\95à¥\87à¤\81 à¤¸à¤\82à¤\9aालित à¤¦à¥\87à¤\96ाà¤\89",
-       "action-autopatrol": "अपन सम्पादनकेँ संचालित देखाउ",
+       "action-patrol": "à¤\85नà¥\8dय à¤¸à¤¦à¤¸à¥\8dयसभà¤\95 à¤¸à¤®à¥\8dपादन à¤ªà¤°à¥\80à¤\95à¥\8dषित à¤\95रà¥\80",
+       "action-autopatrol": "अपन सम्पादन स्वचालित रूपसँ परीक्षित करी",
        "action-unwatchedpages": "बिना संचालित पन्ना सभक सूचीकेँ देखू",
-       "action-mergehistory": "पनà¥\8dनाà¤\95 à¤\87तिहासà¤\95à¥\87à¤\81 à¤®à¤¿à¤\9cà¥\8dà¤\9dर à¤\95रà¥\82",
+       "action-mergehistory": "à¤\88 à¤ªà¥\83षà¥\8dठà¤\95 à¤\87तिहास à¤\8fà¤\95तà¥\8dरित à¤\95रà¥\80",
        "action-userrights": "सभटा प्रयोक्ता अधिकारकेँ सम्पादित करू",
        "action-userrights-interwiki": "दोसर विकीपर प्रयोक्ताक प्रयोक्ता अधिकारक सम्पादन करू",
        "action-siteadmin": "दत्तनिधिकेँ प्रतिबन्धित करू आ फेर प्रतिबन्ध हटाउ",
        "action-editmywatchlist": "काँच साकांक्षसूची संपादित करू",
        "action-viewmywatchlist": "अपन काँच साकांक्षसूची देखु",
        "action-viewmyprivateinfo": "अपन व्यक्तिगत जानकारी देखु",
-       "action-editmyprivateinfo": "à¤\85पन à¤µà¥\8dयà¤\95à¥\8dतिà¤\97त à¤\9cानà¤\95ारà¥\80 à¤¸à¤®à¥\8dपादित à¤\95रà¥\81",
+       "action-editmyprivateinfo": "à¤\85पन à¤µà¥\8dयà¤\95à¥\8dतिà¤\97त à¤\9cानà¤\95ारà¥\80 à¤¸à¤®à¥\8dपादित à¤\95रà¥\80",
        "action-editcontentmodel": "एक पन्ना के सामग्री मॉडल कें सम्पादन।",
-       "action-managechangetags": "डà¥\87à¤\9fाबà¥\87स à¤¸à¥\87 à¤\9aिपà¥\8dपि à¤¬à¤¨à¤¾à¤¬à¥\81 à¤\86र à¤¹à¤\9fाबà¥\81",
+       "action-managechangetags": "à¤\9fà¥\8dयाà¤\97 à¤¬à¤¨à¤¾à¤¬à¥\80 à¤\86 à¤¸à¤\95à¥\8dषम (à¤\85सà¤\95à¥\8dषम) à¤\95रà¥\80",
        "action-applychangetags": "आहाँ के बदलाव के साथ टैग जोडू।",
        "action-changetags": "जमा करु आर हटाबु स्वतंत्र टैग व्यक्तिगत अवतरण आर लॉग प्रविक्ति पे",
+       "action-deletechangetags": "डेटाबेस सँ ट्याग मेटाबी",
+       "action-purge": "पृष्ठक क्यास खाली करी",
        "nchanges": "$1 {{PLURAL:$1|परिवर्त्तन|परिवर्त्तन}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|अंतिम बेर देखला के बाद स}}",
        "enhancedrc-history": "इतिहास",
        "recentchanges": "लगक परिवर्तनसभ",
        "recentchanges-legend": "नव परिवर्तन सम्बन्धी विकल्प",
-       "recentchanges-summary": "à¤\88 à¤ªà¤¨à¥\8dनापर à¤µà¤¿à¤\95à¥\80मà¥\87 à¤­à¥\87ल à¤¸à¤­ à¤¸à¤\81 à¤\85दà¥\8dयतन à¤ªà¤°à¤¿à¤µà¤°à¥\8dतनपर à¤¨à¤\9cरि à¤°à¤¾à¤\96à¥\80।",
+       "recentchanges-summary": "à¤\88 à¤µà¤¿à¤\95िमà¥\87 à¤­à¥\87ल à¤¸à¤¨à¥\8dनिà¤\95à¤\9f à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\88 à¤ªà¥\83षà¥\8dठपर à¤¦à¥\87à¤\96ल à¤\9cा à¤¸à¤\95à¥\88त à¤\85à¤\9bि।",
        "recentchanges-noresult": "इ अवधिके दौरान इ मापदंडके पूर्ण करेत समय कोनो परिवर्तन नै केएल गेल अछि।",
        "recentchanges-feed-description": "ई सूचना-तंत्रांशमे विकीमे भेल सभसँ लगक परिवर्तन ताकी।",
        "recentchanges-label-newpage": "ई सम्पादन एकटा नव पन्नाक निर्माण केलक।",
        "recentchanges-label-minor": "ई एकटा लघु सम्पादन छी",
        "recentchanges-label-bot": "ई सम्पादन यान्त्रिक छल।",
-       "recentchanges-label-unpatrolled": "à¤\90 à¤¸à¤®à¥\8dपादनà¤\95 à¤ªà¥\81नरà¥\80à¤\95à¥\8dषण à¤\85à¤\96न à¤§à¤°à¤¿ à¤¨à¥\88 à¤\95à¤\8fल à¤\97à¥\87ल à¤\85à¤\9bि।",
+       "recentchanges-label-unpatrolled": "à¤\88 à¤¸à¤®à¥\8dपादन à¤\85à¤\96न à¤\9cाà¤\81à¤\9aल à¤¨à¥\88 à¤\97à¥\87ल à¤\85à¤\9bि",
        "recentchanges-label-plusminus": "पन्ना आकार ई बाइट सङ्ख्या सँ बदलल गेल",
        "recentchanges-legend-heading": "<strong>कुञ्जी:</strong>",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} ([[Special:NewPages|नव पन्नसभक सूची]] सेहो देखी)",
+       "recentchanges-submit": "देखाबी",
        "rcnotefrom": "नीचाँमे '''$2''' सँ भेल परिवर्तन अछि ('''$1''' धरि देखाएल)।",
        "rclistfrom": "$3 $2 सँ शुरू भेल नव परिवर्तन देखी",
        "rcshowhideminor": "$1 अल्प सम्पादन",
        "rcshowhideminor-show": "देखाबी",
        "rcshowhideminor-hide": "नुकाबी",
-       "rcshowhidebots": "$1 स्वचालक",
+       "rcshowhidebots": "स्वचालक $1",
        "rcshowhidebots-show": "देखाबी",
        "rcshowhidebots-hide": "नुकाबी",
        "rcshowhideliu": "पञ्जीकृत प्रयोगकर्तासभ $1",
        "rcshowhidemine": "$1 हमर सम्पादनसभ",
        "rcshowhidemine-show": "देखाबी",
        "rcshowhidemine-hide": "नुकाबी",
+       "rcshowhidecategorization": "$1 पृष्ठ श्रेणीकरण",
        "rcshowhidecategorization-show": "देखाबी",
        "rcshowhidecategorization-hide": "नुकाबी",
        "rclinks": "पिछला $2 दिनमे भएल $1 परिवर्तन देखाबी<br />$3",
        "boteditletter": "ब",
        "unpatrolledletter": "!",
        "number_of_watching_users_pageview": "[$1 ध्यान राखैवाला {{PLURAL:$1|प्रयोक्ता|प्रयोक्तासभ}}]",
-       "rc_categories": "सà¤\82वरà¥\8dà¤\97 à¤¸à¥\80मित (\"|\" à¤¸à¤\81 à¤¹à¤\9fाà¤\89)",
-       "rc_categories_any": "कोनो",
+       "rc_categories": "शà¥\8dरà¥\87णà¥\80सभ à¤§à¤°à¤¿ à¤¸à¥\80मà¥\80त à¤°à¤¾à¤\96à¥\80 (\"|\" à¤¸à¤\81 à¤\85लà¤\97 à¤\95रà¥\80)",
+       "rc_categories_any": "कोनो भी चुनिन्दा",
        "rc-change-size": "$1",
        "rc-change-size-new": "परिवर्तनक बाद $1 {{PLURAL:$1|बाइट}}",
        "newsectionsummary": "/* $1 */ नव अनुभाग",
        "recentchangeslinked-summary": "ई विशेष पन्नासँ सम्बद्ध पन्ना सभमे (आकि कोनो विशेष वर्गक समूहमे) भेल परिवर्तनक सूची छी ।\n[[Special:Watchlist|your watchlist]]  पर पन्नासभ '''गाढ़''' अछि।",
        "recentchangeslinked-page": "पन्नाक नाम:",
        "recentchangeslinked-to": "देल पन्नाक सम्बन्धी पन्नामे परिवर्तन देखाबी",
+       "recentchanges-page-added-to-category": "[[:$1]] श्रेणीमे जुडल",
+       "recentchanges-page-removed-from-category": "[[:$1]] श्रेणी सँ हटल",
+       "autochange-username": "मिडियाविकि स्वतः परिवर्तन",
        "upload": "फाइल अपलोड करी",
        "uploadbtn": "फाइल अपलोड",
        "reuploaddesc": "उपारोपण रद्द करी आ उपारोपण आवेदन-पत्रपर जाए।",
        "upload-recreate-warning": "'''चेतौनी: ऐ नामक संचिका मेटा वा हटा देल गेल अछि।'''",
        "uploadtext": "निचुक्का पत्र संचिका उपारोपित करबा लेल प्रयोग करू।\nपहिलुका उपारोपित संचिका देखबा वा तकबा लेल जाउ [[Special:FileList|उपारोपित संचिका सभक सूची]], (पुनः) उपारोपित सेहो सम्प्रवेशित अछि [[Special:Log/upload|उपारोपित वृत्तलेख]] मे, मेटाएल सभ [[Special:Log/delete|मेटाएल वृत्तलेख]] मे।\nपन्नमे एकटा संचिका देबा लेल, ऐ पत्र सभमेसँ कोनो लागिक प्रयोग करू:\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:File.jpg]]</nowiki></code>''' संचिकाक पूर्ण संस्करण देखबा लेल\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:File.png|200px|thumb|left|alt text]]</nowiki></code>'''  २०० चित्राणु चाकर प्रकटन एकटा बक्शामे \"वैकल्पिक पाठ\" वामा कात वर्णनक रूपमे लिखल प्रयोग करू\n* '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:File.ogg]]</nowiki></code>''' बिना संचिका देखेने सोझे संचिकाक लागि देब",
        "upload-permitted": "अनुमतित फाइल  {{PLURAL:$2|प्रकार}}: $1।",
-       "upload-preferred": "मà¥\8bनपसिनà¥\8dन à¤¸à¤\82à¤\9aिà¤\95ा à¤ªà¥\8dरà¤\95ार:$1 ।",
-       "upload-prohibited": "पà¥\8dरतिबनà¥\8dधित à¤¸à¤\82à¤\9aिà¤\95ा à¤ªà¥\8dरà¤\95ार:$1 ।",
-       "uploadlogpage": "à¤\89पारà¥\8bपण à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
+       "upload-preferred": "पसनà¥\8dदिदा à¤«à¤¾à¤\87ल {{PLURAL:$2|पà¥\8dरà¤\95ार|पà¥\8dरà¤\95ारसभ}}: $1।",
+       "upload-prohibited": "पà¥\8dरतिबनà¥\8dधित à¤¸à¤\9eà¥\8dà¤\9aिà¤\95ा {{PLURAL:$2|पà¥\8dरà¤\95ार|पà¥\8dरà¤\95ारसभ}}:$1 ।",
+       "uploadlogpage": "à¤\89पारà¥\8bपण à¤²à¥\8cà¤\97",
        "uploadlogpagetext": "नीचाँ अद्यतन सञ्चिका उपारोपणक वर्णन अछि।\nदेखी [[Special:NewFiles|नव सञ्चिकाक बखारी]] बेसी स्पष्ट समुच्चा दृश्य लेल।",
        "filename": "सञ्चिका नाम",
        "filedesc": "संक्षेप",
        "file-thumbnail-no": "संचिकानाम शुरू होइए <strong>$1</strong> सँ।\nलगैए जे ई छोट आकारक ''(लघुचित्र)'' क चित्र अछि।\nजँ अहाँ लग पूर्ण आनन्तर्यक चित्र अछि तँ से उपारोपित करू, नै तँ संचिकानाम बदलू।",
        "fileexists-forbidden": "ऐ नामक एकटा संचिका पहिनहियेसँ अछि, आ फेरसँ ओ पुनर्लेखित नै कएल जा सकैए।\nजँ अहाँ तैयो अपन संचिका उपारोपित करए चाहै छी तँ कृपा कऽ पाछाँ जाउ आ एकटा नव नाम चुनू।\n[[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "ऐ नामसँ एकटा संचिका साझी संचिका बखारीमे पहिनहियेसँ अछि।\nजँ अहाँ अखनो अपन संचिका उपारोपित करए चाहै छी, कृपा कऽ पाछाँ जाउ आ एकटा नव नाम चुनू।\n[[File:$1|thumb|center|$1]]",
-       "file-exists-duplicate": "à¤\88 à¤«à¤¾à¤\87ल à¤\8fà¤\95र {{PLURAL:$1|file|files}} à¤¦à¥\8dवितà¥\80यà¤\95 अछि:",
+       "file-exists-duplicate": "à¤\88 à¤«à¤¾à¤\87ल à¤¨à¤¿à¤®à¥\8dनलिà¤\96ित {{PLURAL:$1|फाà¤\87ल|फाà¤\87लसभ}}à¤\95 à¤ªà¥\8dरति अछि:",
        "file-deleted-duplicate": "ऐ संचिका ([[:$1]]) सँ मेल खाइत संचिका पहिनहिये मेटा देल गेल अछि।\nअहाँ ओइ संचिकाक मेटाएल जएबाक इतिहास फेरसँ उपारोपित करबासँ पहिने देखू।",
        "file-deleted-duplicate-notitle": "ऐ स पहिले इ फाइलके अहिने एगो फाइलके हटाएल गेल अछि , आर शीर्षक नुकाएल गेल अछि।\nएकरा फेर स अपलोड करै स पहिले अहाँ कोनो एहन व्यक्ति स स्थितिके  समीक्षा करै लेल कहु जेकरा लंग नुकाएल गेल फाइल देखवाक क्षमता अछि।",
        "uploadwarning": "उपारोपण चेतौनी",
        "uploaddisabledtext": "संचिका उपारोपण सभ अशक्त अछि।",
        "php-uploaddisabledtext": "पी.एच.पी.मे संचिका उपारोपण अशक्त अछि।\nकृपा कऽ संचिका उपारोपण विकल्प जाँचू।",
        "uploadscripted": "ई संचिका पर्यंकभाषा वा कूटलिपि युक्त अछि जे गवेषक द्वारा गलत रूपमे व्याख्यायित कएल जा सकैए।",
+       "upload-scripted-pi-callback": "ओ फाइल अपलोड नै केल जा सकैत अछि जाहिमे एक्सएमएल-स्टाइलसिट प्रसंस्करण निर्देश समाविष्ट अछि।",
+       "uploaded-script-svg": "अपलोड केल गेल एसभिजी फाइलमे स्क्रिप्ट अवयव \"$1\" पाबल गेल।",
        "uploadscriptednamespace": "इ एस॰वी॰जी फाइलमे अमान्य नामस्थान \"$1\" अछि।",
        "uploadinvalidxml": "अपलोड केएल गेल फाइलमे स्थित XML पार्स नै केएल जा सकैत अछि।",
        "uploadvirus": "ई संचिका विषविधियुक्त अछि।\nवर्णन:$1",
        "uploadstash-summary": "ई पन्ना उपारोपित संचिका सभक प्रवेश द्वार छी (वा उपारोपणक प्रक्रियामे) मुदा अखन धरि विकीमे प्रकाशित नै भेल अछि। ई सभ संचिका प्रयोक्ताक अतिरिक्त ककरो द्वारा देखल नै जा सकैए।",
        "uploadstash-clear": "नुकाएल बखारी सभक संचिकाकेँ साफ खतम करू",
        "uploadstash-nofiles": "अहाँ लग कोनो नुकाएल संचिका सभ नै अछि।",
-       "uploadstash-badtoken": "ओइ कार्यक सम्पादन असफल रहल, प्रायः अहाँक सम्पादन योग्यता खतम भऽ गेल अछि। फेरसँ प्रयास करू।",
-       "uploadstash-errclear": "सà¤\82à¤\9aिà¤\95ा à¤¸à¤­à¤\95à¥\87à¤\81 à¤\96तम à¤\95रब असफल रहल।",
+       "uploadstash-badtoken": "ओ कार्यक सम्पादन असफल रहल, प्रायः अहाँक सम्पादन योग्यता खतम भऽ गेल अछि। फेर सँ प्रयास करी।",
+       "uploadstash-errclear": "फाà¤\87लसभà¤\95à¥\87 à¤¸à¤¾à¤« à¤\95रनाà¤\8f असफल रहल।",
        "uploadstash-refresh": "संचिका सभक सूचीकेँ ताजा करू।",
+       "uploadstash-thumbnail": "छवि देखी",
        "invalid-chunk-offset": "एकट्ठे अमान्य बौस्तु",
        "img-auth-accessdenied": "प्रवेश प्रतिबन्धित",
        "img-auth-nopathinfo": "बाटक जानकारी नै अछि।\nअहाँक वितरक ऐ सूचनाकेँ प्रसारित नै कऽ सकत।\nई सी.जी.आइ.आधारित अछि आ चित्र-समर्थन केँ समर्थन नै दऽ सकत।\n[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization देखू image authorization.]",
        "filedelete-nofile-old": "'''$1''' एकर कोनो संचित संस्करण खास गुणक संग नै अछि।",
        "filedelete-otherreason": "दोसर/ अतिरिक्त कारण:",
        "filedelete-reason-otherlist": "दोसर कारण",
-       "filedelete-reason-dropdown": "* à¤¸à¤¾à¤®à¤¾à¤¨à¥\8dय à¤¹à¤\9fà¥\87बाà¤\95 à¤\95ारण\n** à¤¸à¤°à¥\8dवाधिà¤\95ार à¤\89लà¥\8dलà¤\82à¤\98न\n** à¤¦à¥\8dवितà¥\80यà¤\95 à¤¸à¤\82à¤\9aिà¤\95ा",
+       "filedelete-reason-dropdown": "* à¤¸à¤¾à¤®à¤¾à¤¨à¥\8dय à¤¹à¤\9fà¥\87बाà¤\95 à¤\95ारण\n** à¤¸à¤°à¥\8dवाधिà¤\95ार à¤\89लà¥\8dलà¤\99à¥\8dà¤\98न\n** à¤ªà¥\8dरतिलिपि à¤«à¤¾à¤\87ल",
        "filedelete-edit-reasonlist": "मेटेबाक कारणक सम्पादन करू",
        "filedelete-maintenance": "सुस्थापन कालमे संचिकाकेँ मेटएबाक आ फेरसँ अनबाक क्रिया कनी काल लेल अशक्त कएल गेल अछि।",
        "filedelete-maintenance-title": "संचिका हटा नै सकैए",
        "mimetype": "माइम प्रकार:",
        "download": "अवारोपन",
        "unwatchedpages": "बिन ध्यान देल पन्ना",
-       "listredirects": "रसà¥\8dता à¤¬à¤¦à¤²à¥\87नक सूची",
+       "listredirects": "पà¥\81नरà¥\8dनिरà¥\8dदà¥\87शनसभक सूची",
        "listduplicatedfiles": "डुप्लिकेट के साथ फाइलसभ के सूची।",
        "listduplicatedfiles-entry": "[[:File:$1|$1]] राखैत अछि  [[$3|{{PLURAL:$2|एक प्रतिलिपि|$2 duplicates}}]] ।",
        "unusedtemplates": "बिना प्रयोगक नमूना सभ",
        "unusedtemplateswlh": "दोसर लागि सभ",
        "randompage": "अव्यवस्थित पृष्ठ",
        "randompage-nopages": "ऐमे दोसर पन्ना नै अछि {{PLURAL:$2|namespace|namespaces}}: $1 ।",
-       "randomincategory": "श्रेणी में यादृच्छिक (रैंडम) पन्ना",
+       "randomincategory": "श्रेणीमे यादृच्छिक पृष्ठ",
        "randomincategory-invalidcategory": "\"$1\" एक मान्य श्रेणी नाम नै अछि।",
+       "randomincategory-nopages": "[[:Category:$1|$1]] श्रेणीमे कोनो पृष्ठ नै अछि।",
        "randomincategory-category": "श्रेणी:",
-       "randomredirect": "मिज्झर बदलेनबला लागि",
+       "randomincategory-legend": "श्रेणीमे यादृच्छिक पृष्ठ",
+       "randomincategory-submit": "जाए",
+       "randomredirect": "कोनो एक पुनर्निर्देशन पर जाए",
        "randomredirect-nopages": "नामस्थान \"$1\" मे कोनो बदलेनबला लागि नै अछि।",
        "statistics": "सांख्यिकी",
        "statistics-header-pages": "पन्नाक तथ्याङ्क",
        "statistics-header-hooks": "दोसर तथ्याङ्क",
        "statistics-articles": "सामग्री पृष्ठ",
        "statistics-pages": "पन्ना",
-       "statistics-pages-desc": "वारà¥\8dता à¤ªà¤¨à¥\8dना, à¤¬à¤¦à¤²à¥\87न à¤\87तà¥\8dयादि à¤¸à¤¹à¤¿à¤¤ à¤¸à¤­à¤\9fा à¤µà¤¿à¤\95ि à¤ªà¤¨à¥\8dना à¤¸à¤­।",
+       "statistics-pages-desc": "वारà¥\8dता à¤ªà¥\83षà¥\8dठ, à¤ªà¥\81नरà¥\8dनिरà¥\8dदà¥\87शन à¤\86दि à¤¸à¤®à¥\87त à¤µà¤¿à¤\95िà¤\95 à¤¸à¤­ à¤ªà¥\83षà¥\8dठ।",
        "statistics-files": "उपारोपित सञ्चिका",
        "statistics-edits": "{{SITENAME}} अएबासँ लऽ कऽ भेल पन्ना सम्पादन",
        "statistics-edits-average": "प्रति पन्ना औसत सम्पादन",
        "statistics-users": "पञ्जीकृत [[Special:ListUsers|प्रयोक्ता]]",
        "statistics-users-active": "सक्रिय प्रयोक्ता",
        "statistics-users-active-desc": "प्रयोक्ता जे अन्तिम {{PLURAL:$1|दिन|$1 दिन}} मे कोनो काज केने छथि",
-       "pageswithprop-submit": "जाऊ",
-       "doubleredirects": "द्वितीयक लागएबला बदलेन",
+       "pageswithprop": "पृष्ठ जाहिमे पृष्ठ गुण अछि",
+       "pageswithprop-legend": "पृष्ठ जाहिमे पृष्ठ गुण अछि",
+       "pageswithprop-text": "ई पृष्ठ पृष्ठ गुणक उपयोग करि रहल पन्नासभ सूचीबद्ध करैत अछि।",
+       "pageswithprop-prop": "गुणक नाम:",
+       "pageswithprop-submit": "जाए",
+       "pageswithprop-prophidden-long": "लम्बा पाठक गुण नुकाएल ($1) अछि",
+       "pageswithprop-prophidden-binary": "बाइनरी गुण ($1) नुकाएल अछि।",
+       "doubleredirects": "दुगुना पुनर्निर्देश",
        "doubleredirectstext": "ई पन्ना ओइ पन्ना सभक संकलन छी जे बदलेन करैए दोसर बदलेनबला पन्नासँ।\nप्रत्येक पाँती पहिल आ दोसर बदलेनक लागि रखने अछि आ संगे दोसर बदलेनक लक्ष्य सेहो, जे वास्तवमे \"वास्तव\" लक्ष्य पन्ना अछि, जकरापर पहिल बदलेनकेँ जेबाक चाही। \n <del>Crossed out</del> प्रविष्टिक हल भेटल अछि।",
        "double-redirect-fixed-move": "[[$1]] घसकाएल गेल।\nई आब [[$2]] दिस जा रहल अछि।",
-       "double-redirect-fixed-maintenance": "द्वितीयक बदलेन [[$1]] सँ [[$2]] कएल गेल।",
-       "double-redirect-fixer": "बदलà¥\87न à¤¸à¥\8dथायितà¥\8dव",
-       "brokenredirects": "à¤\9fà¥\82à¤\9fल à¤¬à¤¦à¤²à¥\87न à¤¸à¤­",
-       "brokenredirectstext": "à¤\88 à¤¬à¤¦à¤²à¥\87न सभ नै अवस्थित पन्ना सभक दिस जाइत अछि।",
+       "double-redirect-fixed-maintenance": "[[$1]] सँ [[$2]]क दुगुणा पुनर्प्रेषणक रखरखाव कार्यमे स्वतः ठीक करि रहल अछि।",
+       "double-redirect-fixer": "पà¥\81नरà¥\8dपà¥\8dरà¥\87षण à¤®à¤¿à¤¸à¥\8dतà¥\8dरà¥\80",
+       "brokenredirects": "तà¥\81à¤\9fल à¤ªà¥\81नरà¥\8dनिरà¥\8dदà¥\87शन à¤ªà¥\83षà¥\8dठ",
+       "brokenredirectstext": "à¤\88 à¤ªà¥\81नरà¥\8dनिरà¥\8dदà¥\87शनसभ नै अवस्थित पन्ना सभक दिस जाइत अछि।",
        "brokenredirects-edit": "सम्पादन करी",
        "brokenredirects-delete": "मेटाबी",
        "withoutinterwiki": "बिना भाषा लिङ्कक पन्ना",
        "prefixindex": "उपसर्गक संग सभटा पृष्ठ",
        "prefixindex-namespace": "उपसर्ग भएल सभ पृष्ठ ($1 नामस्थान)",
        "prefixindex-strip": "सूची में उपसर्ग नुकाउ",
-       "shortpages": "पनà¥\8dना à¤¸à¤­ à¤\9bाà¤\81à¤\9fà¥\82",
+       "shortpages": "à¤\9bà¥\8bà¤\9f à¤ªà¥\83षà¥\8dठसभ",
        "longpages": "नमगर पन्ना सभ",
        "deadendpages": "एकदमसँ अन्त भऽ जाएबला पन्ना सभ",
        "deadendpagestext": "ई पन्ना सभ {{SITENAME}} क दोसर पन्नासँ लागिमे नै रहत।",
        "protectedpages": "सुरक्षित पृष्ठ",
        "protectedpages-indef": "अनन्तकालिक सुरक्षा मात्र",
        "protectedpages-cascade": "तराउपड़ी सुरक्षा मात्र",
-       "protectedpages-noredirect": "बदलà¥\87न à¤¨à¥\81à¤\95ाà¤\8aà¤\81",
+       "protectedpages-noredirect": "पà¥\81नरà¥\8dनिरà¥\8dदà¥\87श à¤¨à¥\81à¤\95ाबà¥\80",
        "protectedpagesempty": "कोनो पन्ना ऐ सभ परिमिति लेल सुरक्षित नै राखल गेल अछि।",
        "protectedpages-timestamp": "समएकाल",
        "protectedpages-page": "पृष्ठ",
        "newpages-username": "प्रयोक्तानाम:",
        "ancientpages": "सभसँ पुरान पन्नासभ",
        "move": "स्थानान्तरण",
-       "movethispage": "à¤\88 à¤ªà¥\83षà¥\8dठà¤\95à¥\87 à¤\98सà¤\95ाबी",
+       "movethispage": "पà¥\83षà¥\8dठà¤\95 à¤¨à¤¾à¤® à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\95री",
        "unusedimagestext": "ई सभ संचिका अछि मुदा कोनो पन्नामे निवशित नै अछि।\nकृपा कऽ ई बुझू जे दोसर जालस्थल सभ सोझ सार्वत्रिक विभव संकेतबला कोनो संचिकासँ लागि बना सकैए, आ तँए सरिय प्रयोगक बादो अखनो एतए सूचित कएल जा सकैए।",
        "unusedcategoriestext": "ई संवर्ग पन्ना सभ अछि, ओना कोनो दोसर पन्ना वा संवर्ग ओकर प्रयोग करैत अछि।",
        "notargettitle": "बिन लक्ष्यक",
        "booksources-invalid-isbn": "देल आइ.एस.बी.एन. संख्या मान्य नै बुझाइत अछि; कृपा कऽ मूल स्रोतसँ द्वितीयक बनेबा काल भेल भ्रमकेँ जाँचू।",
        "specialloguserlabel": "कर्ता:",
        "speciallogtitlelabel": "प्रयोजन (शीर्षक अथवा {{ns:user}}:प्रयोगकर्तानाम):",
-       "log": "वृत्तलेख",
-       "all-logs-page": "सभ सार्वजनिक वृत्तलेख",
+       "log": "लौग",
+       "logeventslist-submit": "देखाबी",
+       "all-logs-page": "सभ सार्वजनिक लौग",
        "alllogstext": "{{अन्तर्जाल}} क सभटा उपलब्ध वृत्तलेखक संयुक्त दृश्य।\nअहाँ दृश्यकेँ संकीर्ण करबा लेल वृत्तलेखक एकटा प्रकार चुनि सकै छी, प्रयोक्तानाम (ब्रह्मक्षर-लघ्वक्षर विचारणीय), वा प्रभावित पन्ना (एतौ ब्रह्मक्षर-लघ्वक्षर विचारणीय)।",
        "logempty": "वृत्तलेखमे कोनो मेल खाइबला बौस्तु नै।",
        "log-title-wildcard": "खोज शीर्षक सभ ऐ पाठसँ प्रारम्भ",
        "showhideselectedlogentries": "देखाबी/ नुकाबी चयनित लग",
        "log-edit-tags": "चुनल गेल लग प्रविक्तिसभ एक सम्पादन ट्याग",
+       "checkbox-select": "चुनी: $1",
+       "checkbox-all": "सभटा",
+       "checkbox-none": "कोनो नै",
+       "checkbox-invert": "बदली",
        "allpages": "सभ पन्ना",
        "nextpage": "अगिला पन्ना ($1)",
        "prevpage": "पहिलुका पन्ना ($1)",
        "cachedspecial-viewing-cached-ts": "अहाँ इ पृष्ठ के क्यास कएल गएल अवतरण देख रहल छी, जे कि संभवतः वर्तमान अवस्था सँ भिन्न भऽ सकएत अछि।",
        "cachedspecial-refresh-now": "लब्का देखु",
        "categories": "श्रेणीसभ",
+       "categories-submit": "देखाबी",
        "categoriespagetext": "ई {{PLURAL:$1|संवर्गमे अछि|संवर्ग सभमे अछि}} पन्ना वा मीडिया।\n[[Special:UnusedCategories|Unused categories]] एतए देखाएल नै अछि।\nईहो देखू [[Special:WantedCategories|wanted categories]]।",
        "categoriesfrom": "पन्ना प्रदर्शन प्रारम्भ भेल:",
        "deletedcontributions": "मेटाएल प्रयोक्ता योगदान",
        "listusers-submit": "देखाबी",
        "listusers-noresult": "कोनो प्रयोक्ता नै",
        "listusers-blocked": "(प्रतिबन्धित)",
-       "activeusers": "सक्रिय प्रयोक्ता सभक सूची",
+       "activeusers": "सक्रिय प्रयोक्तासभक सूची",
        "activeusers-intro": "ई ओहेन प्रयोक्ता सभक सूची अछि जे पछिला $1 {{PLURAL:$1|दिन|दिन}} मे किछु सक्रियता देखेने छथि।",
-       "activeusers-count": "$1 {{PLURAL:$1|समà¥\8dपादन}} à¤µà¤¿à¤\97त $3 {{PLURAL:$3|दिन|दिन}}मे",
+       "activeusers-count": "$1 {{PLURAL:$1|à¤\95ारà¥\8dय}} à¤ªà¤¿à¤\9bला $3 {{PLURAL:$3|दिन|दिनसभ}}मे",
        "activeusers-from": "प्रयोक्ता प्रदर्शन प्रारम्भ भेल:",
        "activeusers-hidebots": "स्वचालक नुकाबी",
        "activeusers-hidesysops": "प्रबन्धक नुकाबी",
        "activeusers-noresult": "कोनो प्रयोक्ता नै भेटल",
+       "activeusers-submit": "सक्रिय प्रयोगकर्ता देखाबी",
        "listgrouprights": "प्रयोगकर्ता समूह अधिकार",
        "listgrouprights-summary": "ई सभ प्रयोक्ता संवर्गक एकटा सूची अछि जे ऐ विकीपरपरिभाषित अछि ओकर संसर्गित प्रवेश अधिकारक संग।\nएतए [[{{MediaWiki:Listgrouprights-helppage}}|additional information]] व्यक्तिगत अधिकार लेल भऽ सकैए।",
        "listgrouprights-key": "* <span class=\"listgrouprights-granted\">देल अधिकार</span>\n* <span class=\"listgrouprights-revoked\">निकालल अधिकार</span>",
        "listgrouprights-namespaceprotection-header": "नामस्थान प्रतिबन्धित",
        "listgrouprights-namespaceprotection-namespace": "नामस्थान",
        "listgrouprights-namespaceprotection-restrictedto": "सांच(सभ) के संपादन करए लेल",
-       "trackingcategories": "श्रेणीके ट्रयाक करु",
+       "listgrants": "प्रदान",
+       "listgrants-summary": "ई प्रदान केल गेल सूची छी। सदस्य अपन खाताक अनुपयोगक द्वारा उपयोग करि सकैत अछि, मुदा मात्र किछ सीमित अधिकार धरि। ई अधिकार सदस्यद्वारा देल गेल अधिकार धरि सीमित रहैत अछि । एतय [[{{MediaWiki:Listgrouprights-helppage}}|अन्य जानकारी]] सेहो अछि, जे एक अधिकारक बारेमे बताबैत अछि।",
+       "listgrants-grant": "अधिकार",
+       "listgrants-rights": "अधिकार",
+       "trackingcategories": "चिह्नित श्रेणीसभ",
+       "trackingcategories-summary": "ई पृष्ठ पर ओ जोडवाला श्रेणीसभक सूची मिलैत अछि जे स्वतः रूप सँ मिडियाविकि सफ्टवेयरद्वारा बनैत अछि। ओ सभक नाम सम्बन्धित प्रणाली सन्देस बदलै सँ {{ns:8}} नामस्थानमे बदलल जा सकैत अछि।",
        "trackingcategories-msg": "चिह्नित श्रेणी",
        "trackingcategories-name": "सन्देश नाम",
        "trackingcategories-desc": "श्रेणी समावेशीकरण मापदण्ड",
        "emailsubject": "विषय:",
        "emailmessage": "सन्देश:",
        "emailsend": "पठाबी",
-       "emailccme": "हमर à¤¸à¤¨à¥\8dदà¥\87शà¤\95 à¤¦à¥\8dवितà¥\80यà¤\95 à¤¹à¤®à¤° à¤\88-पतà¥\8dरपर पठाबी",
-       "emailccsubject": "à¤\85हाà¤\81à¤\95 à¤¸à¤\82दà¥\87शà¤\95 à¤¦à¥\8dवितà¥\80यà¤\95 $1: $2",
+       "emailccme": "हमर à¤¸à¤¨à¥\8dदà¥\87शà¤\95 à¤ªà¥\8dरति à¤¹à¤®à¤° à¤\87मà¥\87लमà¥\87 पठाबी",
+       "emailccsubject": "à¤\85हाà¤\81à¤\95 à¤\87मà¥\87लà¤\95 à¤ªà¥\8dरति à¤\9cà¥\87 $1à¤\95 à¤­à¥\87à¤\9cल à¤\97à¥\87ल: $2",
        "emailsent": "ई-पत्र पठेलौं",
        "emailsenttext": "अहाँक ई-पत्र सन्देश पठाएल गेल।",
        "emailuserfooter": "ई ई-मेल $1 {{GENDER:$1|द्वारा}} {{GENDER:$2|$2}}क भेजल गेल छल जेकर लेल \"{{int:emailuser}}\" कार्यके {{SITENAME}} पर प्रयोगमे लाबल गेल छल।",
        "wlheader-showupdated": "पन्ना सभ जे अहाँक एतए अन्तिम बेर अएलाक बाद बदलल अछि तकर सूची देल अछि '''गाढ़''' मे",
        "wlnote": "नीचाँ {{PLURAL:$1|is the last change|are the last '''$1''' changes}} अन्तिम {{PLURAL:$2|hour|'''$2''' hours}} $3, $4 जेना।",
        "wlshowlast": "देखाउ अन्तिम $1 घण्टा $2 दिन",
+       "watchlist-hide": "नुकाबी",
+       "watchlist-submit": "देखाबी",
+       "wlshowtime": "समय श्रेणी देखाबी:",
+       "wlshowhideminor": "छोट सम्पादन",
+       "wlshowhidebots": "स्वचालक",
+       "wlshowhideliu": "पञ्जीकृत प्रयोक्तासभ",
+       "wlshowhideanons": "बेनामी प्रयोक्तासभ",
+       "wlshowhidepatr": "परीक्षित सम्पादन",
+       "wlshowhidemine": "हमर सम्पादन",
+       "wlshowhidecategorization": "पृष्ठ श्रेणीकरण",
        "watchlist-options": "साकांक्षसूचीक विकल्प",
        "watching": "ताकिमे...",
        "unwatching": "छोडल ...",
        "enotif_impersonal_salutation": "{{SITENAME}} प्रयोगकर्ता",
        "enotif_subject_deleted": "{{SITENAME}} पन्ना $1 के {{gender:$2|$2}} हटेलक",
        "enotif_subject_created": "{{SITENAME}} पन्ना $1 को {{gender:$2|$2}} बनेलक",
-       "enotif_subject_moved": "{{SITENAME}} पृष्ठ $1 के {{gender:$2|$2}} घसकेलक",
+       "enotif_subject_moved": "{{SITENAME}} पृष्ठ $1 के {{gender:$2|$2}} स्थानान्तरित करि देलक",
+       "enotif_subject_restored": "{{SITENAME}} पृष्ठ $1 के {{gender:$2|$2}}द्वारा पुनर्स्थापित करल गेल अछि",
+       "enotif_subject_changed": "{{SITENAME}} पृष्ठ $1 के {{gender:$2|$2}}द्वारा परिवर्तित केल गेल अछि",
+       "enotif_body_intro_deleted": "{{SITENAME}} पृष्ठ $1 के {{gender:$2|$2}}द्वारा $PAGEEDITDATE क मेटाए देलक, देखी $3।",
+       "enotif_body_intro_created": "{{SITENAME}} पृष्ठ $1 के {{gender:$2|$2}}द्वारा $PAGEEDITDATE क बनाएल अछि, वर्तमान अवतरणक लेल $3 देखी।",
+       "enotif_body_intro_moved": "{{SITENAME}} पृष्ठ $1 के {{gender:$2|$2}}द्वारा $PAGEEDITDATE क स्थानान्तरित केनए अछि, वर्तमान अवतरणक लेल $3 देखी।",
+       "enotif_body_intro_restored": "{{SITENAME}} पृष्ठ $1 के {{gender:$2|$2}}द्वारा $PAGEEDITDATE क पुनर्स्थापित केनए अछि, वर्तमान अवतरणक लेल $3 देखी।",
+       "enotif_body_intro_changed": "{{SITENAME}} पृष्ठ $1 के {{gender:$2|$2}}द्वारा $PAGEEDITDATE क परिवर्तित केनए अछि, वर्तमान अवतरणक लेल $3 देखी।",
        "enotif_lastvisited": "देखू $1 अपन अन्तिम बेर अएलाक बादक परिवर्तन लेल।",
        "enotif_lastdiff": "ऐ परिवर्तनकेँ देखबा लेल $1 देखू।",
        "enotif_anon_editor": "गुप्त प्रयोक्ता $1",
        "deletepage": "पन्ना मेटाउ",
        "confirm": "पक्का छी",
        "excontent": "विषय छल:\"$1\"",
-       "excontentauthor": "पाठ छल:\"$1\" (आ एकमात्र योगदान दैबला छल \"[[Special:Contributions/$2|$2]]\")",
+       "excontentauthor": "पाठ छल:\"$1\" (आ एकमात्र योगदान दैबला छल \"[[Special:Contributions/$2|$2]]\" ([[User talk:$2|वार्ता]])",
        "exbeforeblank": "खतम होएबाक पहिने पाठ छल:\"$1\"",
        "delete-confirm": "$1 के मेटाबी",
        "delete-legend": "मेटाबी",
        "historywarning": "'''चेतौनी:''' जे पन्ना अहाँ मेटबैबला छी तकर इतिहास अछि लगभग $1 {{PLURAL:$1|revision|revisions}}:",
+       "historyaction-submit": "देखाबी",
        "confirmdeletetext": "अहाँ सभटा इतिहासक संग ऐ पन्नाकेँ हटाबऽ जा रहल छी।\nअहाँ ई सुनिश्चित करू जे अहाँ ई करऽ चाहै छी, अहाँकेँ एकर परिणामक अवगति अछि आ अहाँ ई ऐ [[{{MediaWiki:Policy-url}}|नीति]] क अनुसार कऽ रहल छी।",
        "actioncomplete": "क्रिया पूर्ण",
        "actionfailed": "कार्य नै भेल",
        "deletedtext": "\"$1\" केँ मेटा देल गेल अछि।\nदेखू $2 हालक मेटाएल सामिग्रीक अभिलेख लेल।",
-       "dellogpage": "मà¥\87à¤\9fाà¤\8fल à¤¸à¤¾à¤®à¤¿à¤\97à¥\8dरà¥\80à¤\95 à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
+       "dellogpage": "मà¥\87à¤\9fाà¤\8fल à¤²à¥\8cà¤\97",
        "dellogpagetext": "नीचाँ एकदम लगक मेटाएल पन्नाकऽ सूची छी।",
-       "deletionlog": "मà¥\87à¤\9fाà¤\8fल à¤¸à¤¾à¤®à¤¿à¤\97à¥\8dरà¥\80à¤\95 à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
+       "deletionlog": "मà¥\87à¤\9fाà¤\8fल à¤²à¥\8cà¤\97",
        "reverted": "पुरान कोनो संशोधन धरि घुराउ",
        "deletecomment": "कारण:",
        "deleteotherreason": "दोसर/ अतिरिक्त कारण:",
        "delete-toobig": "ऐ पन्नामे बड्ड बेसी सम्पादन इतिहास अछि, $1 सँ बेसी {{PLURAL:$1|revision|revisions}}।\nओइ सभ पन्नाक मेटाएब प्रतिबन्धित कएल गेल अछि जइसँ आकस्मिक क्षति नै हुअए {{जालस्थलक}}।",
        "delete-warning-toobig": "ऐ पन्नामे बड्ड सम्पादन इतिहास अछि, $1 सँ बेसी {{PLURAL:$1|revision|revisions}}।\nएकरा मेटेलापर दत्तनिधि क्रिया {{जालस्थल}} खतरामे पड़त;\nसतर्कीसँ आगाँ बढ़ू।",
        "deleteprotected": "अहाँ इ पन्ना नै मेटा सकए छी कियाकि ई सुरक्षण कएल गेल अछि",
-       "deleting-backlinks-warning": "'''चेतौनी:''' जे पृष्ठ अहाँ हटावए लेल जा रहल छी वोकरा में  [[Special:WhatLinksHere/{{FULLPAGENAME}}|अन्य पृष्ठ]] जुड़एत अछि अथवा वोकरा ट्रान्सक्ल्युड करएत अछि।",
+       "deleting-backlinks-warning": "<strong>चेतावनी:</strong> जे पृष्ठ अहाँ मेटाबै लेल जा रहल छी ओ  [[Special:WhatLinksHere/{{FULLPAGENAME}}|अन्य पृष्ठसभ]] सँ जुडल अछि अथवा ट्रान्सक्ल्युड करैत अछि।",
        "rollback": "प्रत्यावर्तित सम्पादन",
        "rollbacklink": "प्रत्यावर्तन",
        "rollbacklinkcount": "$1 {{PLURAL:$1|सम्पादन}} पूर्ववत करी",
        "revertpage": "सम्पादन आपस कएल गेल [[Special:Contributions/$2|$2]] ([[User talk:$2|talk]]) सँ अन्तिम संशोधन धरि एकरा द्वारा [[User:$1|$1]]।",
        "revertpage-nouser": "(प्रयोक्ताक नाम हटा देल गेल अछि) द्वारा केल गेल संपादनकेँ फेरसँ पुरान स्थितिमे आनि कऽ एकर पहिलुक [[User:$1|$1]] सँ बनल संस्करणकेँ फेरसँ ताजा संस्करण बनाऊ।",
        "rollback-success": "$1 केर सम्पादन हटाबी। \n$2 केर सम्पादित आखिरी अवतरणक पुनर्स्थापित करल गेल।",
+       "rollback-success-notify": "$1द्वारा पूर्ववत सम्पादन;\n$2द्वारा केल अन्तिम अवतरण पर वापस। [$3 परिवर्तन देखाबी]",
        "sessionfailure-title": "सत्र विफल भ गेल",
        "sessionfailure": "एहन लागैत अछि जे अहां के लागिन सत्र में कोनो त्रुटि अछि. सत्र अपहरण से बचाबय  सं सावधानीक लेल अहां के अहि क्रियाकलाप क रद्द क देल गेल. अहां पाछां के पृष्ठ पर जौउ आ पृष्ठ के फेर सं लोड क दोबारा कोशिश करू.",
-       "protectlogpage": "सुरक्षा लग",
+       "changecontentmodel": "पृष्ठ सामग्री मोडल परिवर्तन करी",
+       "changecontentmodel-legend": "पृष्ठ सामग्रीक नमूना",
+       "changecontentmodel-title-label": "पृष्ठ शीर्षक",
+       "changecontentmodel-model-label": "नव सामग्रीक नमूना",
+       "changecontentmodel-reason-label": "कारण:",
+       "changecontentmodel-submit": "परिवर्तन",
+       "changecontentmodel-success-title": "सामग्री नमूना परिवर्तन भेल",
+       "changecontentmodel-success-text": "[[:$1]]के सामग्रीक प्रकार परिवर्तित भेल।",
+       "changecontentmodel-cannot-convert": "[[:$1]]क सामग्री प्रकार $2 मे नै परिवर्तित केल जा सकल।",
+       "changecontentmodel-nodirectediting": "$1 सामग्री सीधा सम्पादन समर्थित नै करैत अछि",
+       "changecontentmodel-emptymodels-title": "कोनो सामग्री प्रारूप उपलब्ध नै",
+       "changecontentmodel-emptymodels-text": "[[:$1]]मे रहल सामग्री प्रकार परिवर्तित नै केल जा सकत।",
+       "log-name-contentmodel": "सामग्री परिवर्तन लग",
+       "log-description-contentmodel": "आयोजन जे ई पृष्ठक सामग्री सँ एनमेन होए",
+       "logentry-contentmodel-new": "$1द्वारा  $3 पृष्ठक {{GENDER:$2|निर्माण}} कोनो बिना मूल सामग्री प्रारूपके \"$5\"",
+       "logentry-contentmodel-change": "$1द्वारा $3 पृष्ठक सामग्री \"$4\" सँ \"$5\" {{GENDER:$2|परिवर्तित केलक}}",
+       "logentry-contentmodel-change-revertlink": "पूर्ववत करी",
+       "logentry-contentmodel-change-revert": "पूर्ववत करी",
+       "protectlogpage": "सुरक्षा लौग",
        "protectlogtext": "नीचाँ किछु पन्ना सुरक्षा परिवर्तनक सूची अछि।\nदेखू [[Special:ProtectedPages|protected pages list]] लगक कार्यरत पन्ना सुरक्षाकऽ सूची लेल।",
        "protectedarticle": "रक्षित \"[[$1]]\" कएल गेल",
        "modifiedarticleprotection": "\"[[$1]]\" लेल बदलैत रक्षा स्तर",
        "protect-locked-blocked": "अहाँ प्रतिबन्धमे रहि कऽ सुरक्षा स्तर नै बदलि सकै छी।\nएतए पन्ना '''$1''' लेल वर्तमान नियत कएल विकल्प अछि:",
        "protect-locked-dblock": "सक्रिय दत्तनिधि प्रतिबन्धक कारण सुरक्षा स्तर नै बदलल जा सकैए।\nएतए '''$1''' लेल वर्तमान नियत विकल्प देल अछि:",
        "protect-locked-access": "अहाँक खाता अहाँकेँ रक्षा स्तरमे परिवर्तनक अधिकार नै दैत अछि।\nएतए '''$1'''पन्नाक वर्तमान परिस्थिति देल गेल अछि:",
-       "protect-cascadeon": "à¤\88 à¤ªà¤¨à¥\8dना à¤\85à¤\96न à¤°à¤\95à¥\8dषित à¤\85à¤\9bि à¤\95ारण à¤\88 à¤\90 à¤®à¥\87 à¤¸à¤®à¥\8dमिलित à¤\85à¤\9bि {{PLURAL:$1|पनà¥\8dना, à¤\9cà¥\87 à¤\85à¤\9bि|पनà¥\8dना à¤¸à¤­, à¤\9cà¥\87 à¤¸à¤­ à¤\85à¤\9bि}} à¤¤à¤°à¤¾à¤\89पड़à¥\80 à¤°à¤\95à¥\8dषण à¤²à¤¾à¤\97à¥\82।\nà¤\85हाà¤\81 à¤\90 à¤ªà¤¨à¥\8dनाà¤\95 à¤°à¤\95à¥\8dषा à¤¸à¥\8dतरà¤\95à¥\87à¤\81 à¤¬à¤¦à¤²à¤¿ à¤¸à¤\95à¥\88 à¤\9bà¥\80, à¤®à¥\81दा à¤¤à¤¾à¤\87 à¤¸à¤\81 à¤¤à¤°à¤¾à¤\89पड़à¥\80 à¤°à¤\95à¥\8dषापर à¤\85सर à¤¨à¥\88 à¤ªà¤¡à¤¼त।",
+       "protect-cascadeon": "à¤\88 à¤ªà¤¨à¥\8dना à¤\85à¤\96न à¤¸à¤\82रà¤\95à¥\8dषित à¤\85à¤\9bि à¤\95ियाà¤\95à¥\80 à¤\8fहिमà¥\87 {{PLURAL:$1|पनà¥\8dना, à¤\9cà¥\87 à¤\85à¤\9bि|पनà¥\8dना à¤¸à¤­, à¤\9cà¥\87 à¤¸à¤­ à¤\85à¤\9bि}} à¤\95à¥\8dयासà¤\95à¥\87डिà¤\99 à¤¸à¤\82रà¤\95à¥\8dषण à¤¸à¤\95à¥\8dषम à¤\85à¤\9bि।\nà¤\85हाà¤\81 à¤\88 à¤ªà¤¨à¥\8dनाà¤\95 à¤¸à¥\81रà¤\95à¥\8dषा à¤¸à¥\8dतर à¤¬à¤¦à¤²à¤¿ à¤¸à¤\95à¥\88त à¤\9bà¥\80, à¤®à¥\81दा à¤¤à¤¾à¤¹à¤¿ à¤¸à¤\81 à¤\95à¥\8dयासà¤\95à¥\87डिà¤\99 à¤°à¤\95à¥\8dषापर à¤\85सर à¤¨à¥\88 à¤ªà¤¡त।",
        "protect-default": "सभ प्रयोक्ताकेँ अधिकार दएल जाए",
        "protect-fallback": "\"$1\" अधिकार भेल प्रयोक्तासभके अनुमति दएल जाए",
        "protect-level-autoconfirmed": "मात्र स्वत: स्थापित प्रयोक्ताकेँ अनुमति दएल जाए",
        "maximum-size": "अधिक आकार:",
        "pagesize": "(अष्टक)",
        "restriction-edit": "संपादन",
-       "restriction-move": "à¤\98सà¤\95ाà¤\89",
+       "restriction-move": "सà¥\8dथानानà¥\8dतरण",
        "restriction-create": "बनाउ",
        "restriction-upload": "उपारोपण",
        "restriction-level-sysop": "पूर्ण सुरक्षित",
        "restriction-level-autoconfirmed": "अर्ध-रक्षित",
        "restriction-level-all": "कोनो स्तर",
-       "undelete": "मà¥\87à¤\9fाà¤\8fल à¤ªà¤¨à¥\8dना à¤¦à¥\87à¤\96à¥\82",
-       "undeletepage": "दà¥\87à¤\96à¥\82 à¤\86 à¤«à¥\87रसà¤\81 à¤®à¥\87à¤\9fाà¤\8fल à¤ªà¤¨à¥\8dना à¤\86नà¥\82",
+       "undelete": "मà¥\87à¤\9fाà¤\8fल à¤ªà¤¨à¥\8dना à¤¦à¥\87à¤\96à¥\80",
+       "undeletepage": "मà¥\87à¤\9fाà¤\8fल à¤\97à¥\87ल à¤ªà¥\83षà¥\8dठ à¤¦à¥\87à¤\96à¥\80 à¤\86 à¤ªà¥\81नरà¥\8dसà¥\8dथापित à¤\95रà¥\80",
        "undeletepagetitle": "''' ई मेटाएल संशोधन लेने अछि [[:$1|$1]]एकर''' ।",
-       "viewdeletedpage": "मà¥\87à¤\9fाà¤\8fल à¤ªà¤¨à¥\8dना à¤¦à¥\87à¤\96à¥\82",
+       "viewdeletedpage": "मà¥\87à¤\9fाà¤\8fल à¤ªà¤¨à¥\8dना à¤¦à¥\87à¤\96à¥\80",
        "undeletepagetext": "ई {{PLURAL:$1|page has been deleted but is|$1 pages have been deleted but are}} अखनो जोगाएल पेटारमे अछि आ फेरसँ आनल नै जा सकैए।\nई जोगाएल पेटार बीच-बीचमे साफ करबाक चाही।",
        "undelete-fieldset-title": "संशोधन सभकेँ घुराउ",
        "undeleteextrahelp": "'''''{{int:undeletebtn}}''''' केँ क्लिक करू पन्नाक पूर्ण इतिहास अनबा लेल, सभटा विकल्पबक्सासँ चेन्ह हटाउ।\n'''''{{int:undeletebtn}}''''' क्लिक करू छाँटल मौलिक आकारमे अनबा लेल, संशोधन सभकेँ अनबा लेल सम्बन्धित बक्सा सभमे चेन्ह लगाउ।",
-       "undeleterevisions": "$1{{PLURAL:$1|संशोधन|संशोधन सभ}} पेटारमे जोगाएल",
+       "undeleterevisions": "$1{{PLURAL:$1|संशोधन|संशोधनसभ}} मेटाएल",
        "undeletehistory": "जँ अहाँ पन्नाकेँ फेरसँ अनै छी, सभटा संशोधन पुरान स्तरपर संशोधित भऽ जाएत।\nमेटेलाक बाद जँ एकटा नव पन्ना ओही नामसँ बनाएल गेल, आनल संशोधन सभ पुरान इतिहासमे आएत।",
        "undeleterevdel": "पुनः अननाइ सफल नै हएत जँ ई पन्नाक शीर्ष वा संचिका संशोधनकेँ आंशिक रूपेँ मेटबैए।\nओहेन स्थितिमे, अहाँ सभसँ नव मेटाएल संशोधनक आग्रह खतम कऽ सकै छी वा सोझाँ आनि सकै छी।",
        "undeletehistorynoadmin": "ई पन्ना मेटा देल गेल अछि।\nमेटेबाक कारण नीचाँक सारांशमे देल गेल अछि, प्रयोक्ता विवरणक संग जे ऐ पन्नाकेँ मेटेबासँ पूर्व संशोधित केने छथि।\nऐ मेटाएल संशोधन सभक पाठ मात्र संचालक सभ लग उपलब्ध अछि।",
        "undeletedrevisions": "{{PLURAL:$1|1 revision|$1 revisions}} घुराएल",
        "undeletedrevisions-files": "{{PLURAL:$1|1 संशोधन|$1 संशोधन}} and {{PLURAL:$2|1 संचिका|$2 संचिका}} आनल",
        "undeletedfiles": "{{PLURAL:$1|1 संचिका|$1 संचिका सभ}} आनल",
-       "cannotundelete": "फà¥\87रसà¤\81 à¤¨à¥\88 à¤\86बि à¤¸à¤\95ल:\n$",
+       "cannotundelete": "à¤\95िà¤\9b à¤µà¤¾ à¤¸à¤­ à¤®à¥\87à¤\9fाà¤\8fल à¤µà¤¾à¤ªà¤¿à¤¸ à¤\85सफल:\n$1",
        "undeletedpage": "'''$1 के पुनर्स्थापित करल गेल अछि'''\n\nलग पास में हटाओल गेल आ पुनर्स्थापित कएल गेल पन्ना सभके जानकारी के लेल [[Special:Log/delete|हटाओल गेल लग]] देखु।",
        "undelete-header": "हालक मेटाएल पन्ना के लेल [[Special:Log/delete|हटाएल लग]] देखू।",
-       "undelete-search-title": "मà¥\87à¤\9fाà¤\8fल à¤ªà¤¨à¥\8dनाà¤\95à¥\87à¤\81 à¤¤à¤¾à¤\95à¥\82",
-       "undelete-search-box": "मेटाएल पन्ना सभकेँ ताकू",
+       "undelete-search-title": "मà¥\87à¤\9fाà¤\8fल à¤\97à¥\87ल à¤ªà¥\83षà¥\8dठ à¤¤à¤¾à¤\95à¥\80",
+       "undelete-search-box": "मेटाएल पन्नासभ ताकी",
        "undelete-search-prefix": "से शुरु भेल पन्ना देखाबू.",
        "undelete-search-submit": "ताकू",
        "undelete-no-results": "एहेन पन्ना मेटाएल पेटारमे नै भेटल।",
        "namespace": "चेन्हासी समूह:",
        "invert": "उनटा चयन",
        "tooltip-invert": "ऐ बक्साकेँ सही करू पन्ना परिवर्तनकेँ नुकेबा लेल चयनित नामस्थानक भीतर (आ संग लागल नामस्थान जँ सही कएल अछि तखन)",
+       "tooltip-whatlinkshere-invert": "चुनल गेल नामस्थान पृष्ठसभ सँ लिङ्कसभ नुकाबैक लेल ई सन्दूकके चिन्हित करी",
        "namespace_association": "सम्बद्ध चेन्हासी",
        "tooltip-namespace_association": "ई बक्साकेँ सही करी जइसँ वार्ता आ विषय नामस्थान समाहित कएल जा सकए चुनल नामस्थानमे",
        "blanknamespace": "(मुख्य)",
        "sp-contributions-newbies": "मात्र नव खाताक योगदान देखाबी",
        "sp-contributions-newbies-sub": "नब प्रयोक्ताकऽ लेल",
        "sp-contributions-newbies-title": "नब प्रयोक्ताकऽ योगदान",
-       "sp-contributions-blocklog": "पà¥\8dरतिबनà¥\8dधित à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
-       "sp-contributions-suppresslog": "मेटाएल प्रयोक्ता योगदान सभ",
-       "sp-contributions-deleted": "प्रयोक्ताकऽ मेटाएल योगदान सभ",
+       "sp-contributions-blocklog": "पà¥\8dरतिबनà¥\8dधित à¤²à¥\8cà¤\97",
+       "sp-contributions-suppresslog": "{{GENDER:$1|प्रयोगकर्ता}} योगदान दबाबी",
+       "sp-contributions-deleted": "{{GENDER:$1|प्रयोगकर्ता}}क मेटाएल योगदान",
        "sp-contributions-uploads": "उपारोपण",
-       "sp-contributions-logs": "वà¥\83तà¥\8dतलà¥\87à¤\96 à¤¸à¤­",
+       "sp-contributions-logs": "लà¥\8cà¤\97",
        "sp-contributions-talk": "वार्त्ता",
        "sp-contributions-userrights": "प्रयोक्ता अधिकारकऽ प्रबन्धन",
        "sp-contributions-blocked-notice": "ई प्रयोक्ता अखन प्रतिबन्धित अछि।\nनव प्रतिबन्धित वृत्तलेख लेख सन्दर्भ नीचाँ देल अछि:",
        "sp-contributions-username": "अनिकेत संकेत वा प्रयोक्तानाम:",
        "sp-contributions-toponly": "मात्र ओइ सम्पादनकेँ देखाउ जे अद्यतन संशोधन छी।",
        "sp-contributions-newonly": "मात्र ओइ सम्पादन देखाउ जे पृष्ठ निर्मित भेल अछि",
+       "sp-contributions-hideminor": "अल्प सम्पादन नुकाबी",
        "sp-contributions-submit": "ताकू",
        "whatlinkshere": "एतय कोन लिङ्क अछि",
        "whatlinkshere-title": "\"$1\" सँ सम्बन्धित पन्नासभ",
        "whatlinkshere-hideredirs": "$1 पुनर्निर्देश",
        "whatlinkshere-hidetrans": "$1 ट्रान्स्क्ल्युजन्स",
        "whatlinkshere-hidelinks": "$1 लिङ्क",
-       "whatlinkshere-hideimages": "$1 à¤«à¤¾à¤\87ल à¤\9cडà¥\80 à¤¸à¤­",
+       "whatlinkshere-hideimages": "$1 à¤«à¤¾à¤\87ल à¤²à¤¿à¤\99à¥\8dà¤\95",
        "whatlinkshere-filters": "चलनीसभ",
+       "whatlinkshere-submit": "जाए",
        "autoblockid": "स्वतःप्रतिबन्धित #$1",
        "block": "प्रयोक्ताकेँ प्रतिबन्धित करू",
-       "unblock": "प्रयोक्ताकेँ प्रतिबन्धसँ हटाउ",
+       "unblock": "प्रयोक्ताकेँ प्रतिबन्ध सँ हटाबी",
        "blockip": "{{GENDER:$1|प्रयोक्ता}}क प्रतिबन्धित करी",
        "blockip-legend": "प्रयोक्ताकेँ प्रतिबन्धित करू",
        "blockiptext": "नीचाँक आवेदनक प्रयोग कोनो खास अनिकेत वा प्रयोक्तानामक लिखैक प्रवेशकेँ प्रतिबन्धित करबा लेल करू।\nई अतत्तः करैबलाक विरुद्ध प्रयुक्त हुअए, आ एकर अनुसार [[{{MediaWiki:Policy-url}}|policy]]।\nनीचाँ स्पष्ट कारण लिखू (जेना, खास पन्नाकेँ देखबैत जतए अतत्तः कएल गेल अछि)।",
        "ipb-unblock": "प्रयोक्ता वा अनिकेतकें अप्रतिबंधित करू",
        "ipb-blocklist": "अखुनका प्रतिबंधित देखू",
        "ipb-blocklist-contribs": "$1 लेल अवदान",
-       "unblockip": "प्रयोक्ताकेँ प्रतिबन्धसँ हटाउ",
+       "ipb-blocklist-duration-left": "$1 बाकी",
+       "unblockip": "प्रयोक्ताकेँ प्रतिबन्ध सँ हटाबी",
        "unblockiptext": "पहिनेसँ प्रतिबन्धित अनिकेत वा प्रयोक्तानामकेँ लिखबाक अधिकार देबा लेल निचुलका आवेदन भरू।",
        "ipusubmit": "ई  प्रतिबन्ध हटाउ",
        "unblocked": "[[User:$1|$1]] अप्रतिबन्धित कएल गेल",
        "contribslink": "योगदान",
        "emaillink": "ई-पत्र पठाउ",
        "autoblocker": "अहाँक अनिकेत \"[[User:$1|$1]]\" द्वारा प्रयोगक कारण स्वचालित रूपेँ प्रतिबन्धित भऽ गेल।\n$1 एकर प्रतिबन्धक कारण अछि : \"$2\"",
-       "blocklogpage": "पà¥\8dरतिबनà¥\8dधित à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
+       "blocklogpage": "पà¥\8dरतिबनà¥\8dधित à¤²à¥\8cà¤\97",
        "blocklog-showlog": "ऐ प्रयोक्ताकेँ पहिनहिये प्रतिबन्धित कऽ देल गेल अछि।\nप्रतिबन्धक वृत्तलेख सन्दर्भ लेल नीचाँ देल जा रहल अछि:",
        "blocklog-showsuppresslog": "ऐ प्रयोक्ताकेँ पहिनहिये प्रतिबन्धित आ अदृश्य कऽ देल गेल अछि।\nदबाएल वृत्तलेख सन्दर्भ लेल नीचाँ देल जा रहल अछि:",
        "blocklogentry": "प्रतिबन्धित [[$1]] एकर अन्तिम तिथि अछि $2 $3",
        "block-log-flags-hiddenname": "प्रयोक्तानाम नुकाएल",
        "range_block_disabled": "समूह खण्ड बनेबाक संचालकक क्षमता अशक्त कएल गेल।",
        "ipb_expiry_invalid": "खतम हेबाक समए सही नै अछि।",
+       "ipb_expiry_old": "समाप्ती समय बीत चुकल अछि।",
        "ipb_expiry_temp": "नुकाएल प्रयोक्तानाम खण्ड स्थायी हेबाक चाही।",
        "ipb_hide_invalid": "ऐ खाताकेँ द्बा नै सकलौं; ऐ मे बड्ड बेसी सम्पादन हएत।",
        "ipb_already_blocked": "\"$1\" पहिनहियेसँ प्रतिबन्धित अछि",
        "proxyblockreason": "अहाँक अनिकेत पता प्रतिबन्धित भेल अछि कारण ई सोझे-सोझ दोसराइत अछि।\nअहाँ अपन अन्तर्जाल सेवा दाता वा तकनीकी सहायकसँ सम्पर्क करू आ ऐ गम्भीर सुरक्षा समस्याक सूचना दिअ।",
        "sorbsreason": "अहाँक अनिकेत सूचित अछि सोझे-सोझ दोसराइतक रूपमे {{जालस्थल}} क डी.एन.एस.बी.एल.मे।",
        "sorbs_create_account_reason": "अहाँक अनिकेत एतए सूचित अछि खुजल दोसराइत सन डी.एन.बी.एस.एल. मे जे प्रयोग कएल जाइए {{अन्तर्जाल}} द्वारा।",
+       "xffblockreason": "एक आइपी पता जे एक्स-फरवार्डेड-डर हेडरमे मौजूद छल, या तँ अहाँक छी या ओ प्रक्सी सर्भरक अछि जेकर अहाँ प्रयोग करि रहल छी आ ओहि पर प्रतिबन्ध लगाएल गेल अछि। वास्तविक कारण छल: $1",
        "cant-see-hidden-user": "जै प्रयोक्ताकेँ अहाँ प्रतिबन्धित करऽ चाहै छी से पहिनहियेसँ प्रतिबन्धित आ अदृश्य अछि।\nकारण अहाँ लग प्रयोक्ताकेँ अदृश्य करबाक अधिकार नै अछि, अहाँ प्रयोक्ताक प्रतिबन्धकेँ देख वा सम्पादित नै कऽ सकै छी।",
        "ipbblocked": "अहाँ दोसर प्रयोक्ताकेँ प्रतिबन्धित वा अप्रतिबन्धित नै कऽ सकै छी, कारण अहाँ स्वयं प्रतिबन्धित छी",
        "ipbnounblockself": "अहाँ अपने अप्रतिबन्धित नै भऽ सकै छी",
        "lockdbsuccesstext": "दत्तनिधि प्रतिबन्ध लगाएल गेल| <br />\nमोन राखू [[Special:UnlockDB|remove the lock]]अहांक रखरखाव ख़तम भेलाक बाद ।",
        "unlockdbsuccesstext": "दत्तनिधि अप्रतिबंधित ।",
        "lockfilenotwritable": "दत्तांशनिधि प्रतिबन्ध संचिका लिखबा योग्य नै अछि।\nदत्तांशनिधिकेँ प्रतिबन्धित वा अप्रतिबन्धित करबा लेल एकरा जाल वितरक द्वारा लिखबा योग्य हेबाक चाही।",
+       "databaselocked": "डाटाबेस पहिने सँ बन्द अछि।",
        "databasenotlocked": "दत्तांशनिधि प्रतिबन्धित नै अछि।",
        "lockedbyandtime": "(द्वारा {{GENDER:$1|$1}} केँ $2 बजे $3)",
-       "move-page": "$1हटाउ",
-       "move-page-legend": "पनà¥\8dना à¤\98सà¤\95ाà¤\89",
-       "movepagetext": "नà¥\80à¤\9aाà¤\81à¤\95 à¤«à¥\89रà¥\8dमà¤\95 à¤ªà¥\8dरयà¥\8bà¤\97 à¤ªà¤¨à¥\8dनाà¤\95 à¤¨à¤¾à¤® à¤¬à¤¦à¤²à¤¿ à¤¦à¥\87त, à¤\8fà¤\95र à¤¸à¤­à¤\9fा à¤\87तिहासà¤\95à¥\87à¤\81 à¤¨à¤µ à¤¨à¤¾à¤®à¤\95 à¤\85नà¥\8dतरà¥\8dà¤\97त à¤°à¤¾à¤\96ि à¤¦à¥\87त।\nपà¥\81रान à¤¶à¥\80रà¥\8dषà¤\95 à¤¨à¤µ à¤ªà¤¨à¥\8dना à¤²à¥\87ल à¤\8fà¤\95à¤\9fा à¤\98à¥\81रबà¥\88बला à¤ªà¤¨à¥\8dना à¤¬à¤¨à¤¿ à¤\9cाà¤\8fत।\nà¤\85हाà¤\81 à¤\98à¥\81रबà¥\88बला à¤ªà¤¨à¥\8dनाà¤\95à¥\87à¤\81 à¤\85दà¥\8dयतन à¤\95ऽ à¤¸à¤\95à¥\88 à¤\9bà¥\80 à¤\9cà¥\87 à¤®à¥\82ल à¤¶à¥\80रà¥\8dषà¤\95पर à¤¸à¥\8dवà¤\9aालित à¤°à¥\82पà¥\87à¤\81 à¤\9cाà¤\87त à¤\85à¤\9bि।\nà¤\9cà¥\8cà¤\82 à¤\85हाà¤\81 à¤\88 à¤¨à¥\88 à¤\95रबाà¤\95 à¤¨à¤¿à¤°à¥\8dणय à¤\95रà¥\88 à¤\9bà¥\80, à¤¨à¤¿à¤¶à¥\8dà¤\9aय à¤\95रà¥\82 à¤¤à¤\95बा à¤²à¥\87ल [[Special:DoubleRedirects|double]] à¤µà¤¾\n[[Special:BrokenRedirects|broken redirects]]\nà¤\85हाà¤\81 à¤\90 à¤²à¥\87ल à¤\9cिमà¥\8dमà¥\80दार à¤\9bà¥\80 à¤\9cà¥\87 à¤¸à¤®à¥\8dबनà¥\8dधित à¤²à¤¿à¤\82à¤\95 à¤\93तà¥\88 à¤\9cाà¤\8f à¤\9cतà¤\8f à¤\93à¤\95रा à¤\9cà¥\87बाà¤\95 à¤\9aाहà¥\80।\n\nमà¥\8bन à¤°à¤¾à¤\96à¥\82 à¤\95ि à¤ªà¤¨à¥\8dना '''नà¥\88''' à¤\98सà¤\95ाà¤\89 à¤\9cà¥\8cà¤\82 à¤¨à¤µ à¤¶à¥\80रà¥\8dषà¤\95पर à¤ªà¤¹à¤¿à¤¨à¤¹à¤¿à¤¯à¥\87सà¤\81 à¤ªà¤¨à¥\8dना à¤\85à¤\9bि, à¤\86 à¤¤à¤\96नà¥\87 à¤\88 à¤\95रà¥\82 à¤\9cà¤\96न à¤\93 à¤\96ालà¥\80 à¤¹à¥\81à¤\85à¤\8f à¤µà¤¾ à¤\93 à¤\8fà¤\95à¤\9fा à¤\98à¥\81मबà¥\88बला à¤ªà¤¨à¥\8dना à¤¹à¥\81à¤\85à¤\8f à¤µà¤¾ à¤\93à¤\87 à¤ªà¤¨à¥\8dनाà¤\95 à¤\95à¥\8bनà¥\8b à¤­à¥\82तà¤\95ालà¤\95 à¤¸à¤®à¥\8dपादन à¤\87तिहास à¤¨à¥\88 à¤¹à¥\81à¤\85à¤\8f।\nà¤\8fà¤\95र à¤®à¤¾à¤¨à¥\87 à¤­à¥\87ल à¤\9cà¥\87 à¤\85हाà¤\81 à¤\95à¥\8bनà¥\8b à¤ªà¤¨à¥\8dनाà¤\95 à¤¨à¤¾à¤® à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\95ऽ à¤ªà¤¾à¤\9bाà¤\81 à¤²à¤½ à¤\9cा à¤¸à¤\95à¥\88 à¤\9bà¥\80 à¤\9cतà¤\8f à¤\8fà¤\95र à¤¨à¤¾à¤®à¤®à¥\87 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\95à¤\8fल à¤\97à¥\87ल à¤°à¤¹à¤\8f à¤\9cà¥\8cà¤\82 à¤\85हाà¤\81सà¤\81 à¤\97लतà¥\80 à¤­à¥\87ल à¤\85à¤\9bि, à¤\86 à¤\85हाà¤\81 à¤\93à¤\87 à¤ªà¤¨à¥\8dनाà¤\95à¥\87à¤\81 à¤«à¥\87रसà¤\81 à¤¦à¥\8bबारा à¤¨à¥\88 à¤²à¤¿à¤\96 à¤¸à¤\95à¥\88 à¤\9bà¥\80।\n\n\n'''à¤\9aà¥\87तà¥\8cनà¥\80!'''\nà¤\88 à¤\8fà¤\95à¤\9fा à¤²à¥\8bà¤\95पà¥\8dरिय à¤ªà¤¨à¥\8dनाà¤\95 à¤²à¥\87ल à¤\8fà¤\95à¤\9fा à¤­à¤¯à¤\82à¤\95र à¤\86 à¤¬à¤¿à¤¨à¤¾ à¤\86शाà¤\95 à¤\95à¤\8fल à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤­à¤½ à¤¸à¤\95à¥\88à¤\8f।\nà¤\86à¤\97ाà¤\81 à¤¬à¤¢à¤¼à¥\88सà¤\81 à¤ªà¤¹à¤¿à¤¨à¥\87 à¤\85हाà¤\81 à¤\88 à¤¸à¥\81निशà¥\8dà¤\9aित à¤\95रà¥\82 जे अहाँ एकर परिणाम बुझै छी।",
+       "move-page": "$1 स्थानान्तरित करी",
+       "move-page-legend": "पà¥\83षà¥\8dठ à¤¸à¥\8dथानानà¥\8dतरण",
+       "movepagetext": "नà¥\80à¤\9aाà¤\81à¤\95 à¤«à¤°à¥\8dमà¤\95 à¤ªà¥\8dरयà¥\8bà¤\97 à¤ªà¤¨à¥\8dनाà¤\95 à¤¨à¤¾à¤® à¤¬à¤¦à¤²à¤¿ à¤¦à¥\87त, à¤\8fà¤\95र à¤¸à¤­à¤\9fा à¤\87तिहास à¤¨à¤µ à¤¨à¤¾à¤®à¤\95 à¤\85नà¥\8dतरà¥\8dà¤\97त à¤°à¤¾à¤\96ि à¤¦à¥\87त।\nपà¥\81रान à¤¶à¥\80रà¥\8dषà¤\95 à¤¨à¤µ à¤ªà¤¨à¥\8dना à¤²à¥\87ल à¤\8fà¤\95à¤\9fा à¤ªà¥\81नारà¥\8dनिरà¥\8dदà¥\87शित à¤ªà¤¨à¥\8dना à¤¬à¤¨à¤¿ à¤\9cाà¤\87त।\nà¤\85हाà¤\81 à¤ªà¥\81नरà¥\8dनिरà¥\8dदà¥\87शन à¤ªà¤¨à¥\8dनाà¤\95 à¤\85दà¥\8dयतन à¤\95ऽ à¤¸à¤\95à¥\88 à¤\9bà¥\80 à¤\9cà¥\87 à¤®à¥\82ल à¤¶à¥\80रà¥\8dषà¤\95पर à¤¸à¥\8dवà¤\9aालित à¤°à¥\82पà¥\87à¤\81 à¤\9cाà¤\87त à¤\85à¤\9bि।\nà¤\9cà¥\8cà¤\82 à¤\85हाà¤\81 à¤\88 à¤¨à¥\88 à¤\95रबाà¤\95 à¤¨à¤¿à¤°à¥\8dणय à¤\95रà¥\88 à¤\9bà¥\80, à¤¨à¤¿à¤¶à¥\8dà¤\9aय à¤\95रà¥\80 à¤¤à¤\95बा à¤²à¥\87ल [[Special:DoubleRedirects|बहà¥\81 à¤ªà¥\81नरà¥\8dनिरà¥\8dदà¥\87शन]] à¤µà¤¾\n[[Special:BrokenRedirects|तà¥\81à¤\9fल à¤ªà¥\81नरà¥\8dनिरà¥\8dदà¥\87शन]]\nà¤\85हाà¤\81 à¤\88 à¤²à¥\87ल à¤\9cिमà¥\8dमà¥\87दार à¤\9bà¥\80 à¤\9cà¥\87 à¤¸à¤®à¥\8dबनà¥\8dधित à¤²à¤¿à¤\99à¥\8dà¤\95 à¤\93तà¥\88 à¤\9cाà¤\8f à¤\9cतà¤\8f à¤\93à¤\95रा à¤\9cà¥\87बाà¤\95 à¤\9aाहà¥\80।\n\nमà¥\8bन à¤°à¤¾à¤\96à¥\82 à¤\95ि à¤ªà¤¨à¥\8dना <strong>नà¥\88</strong> à¤¸à¥\8dथानानà¥\8dतरित à¤\9cà¥\8cà¤\82 à¤¨à¤µ à¤¶à¥\80रà¥\8dषà¤\95पर à¤ªà¤¹à¤¿à¤¨à¤¹à¤¿à¤¯à¥\87सà¤\81 à¤ªà¤¨à¥\8dना à¤\85à¤\9bि, à¤\86 à¤¤à¤\96नà¥\87 à¤\88 à¤\95रà¥\80 à¤\9cà¤\96न à¤\93 à¤\96ालà¥\80 à¤¹à¥\81à¤\85à¤\8f à¤µà¤¾ à¤\93 à¤\8fà¤\95à¤\9fा à¤ªà¥\81नरà¥\8dनिरà¥\8dदà¥\87शित à¤ªà¤¨à¥\8dना à¤¹à¥\81à¤\85à¤\8f à¤µà¤¾ à¤\93à¤\87 à¤ªà¤¨à¥\8dनाà¤\95 à¤\95à¥\8bनà¥\8b à¤­à¥\82तà¤\95ालà¤\95 à¤¸à¤®à¥\8dपादन à¤\87तिहास à¤¨à¥\88 à¤¹à¥\81à¤\85à¤\8f।\nà¤\8fà¤\95र à¤®à¤¾à¤¨à¥\87 à¤­à¥\87ल à¤\9cà¥\87 à¤\85हाà¤\81 à¤\95à¥\8bनà¥\8b à¤ªà¤¨à¥\8dनाà¤\95 à¤¨à¤¾à¤® à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\95ऽ à¤ªà¤¾à¤\9bाà¤\81 à¤²à¤½ à¤\9cा à¤¸à¤\95à¥\88 à¤\9bà¥\80 à¤\9cतà¤\8f à¤\8fà¤\95र à¤¨à¤¾à¤®à¤®à¥\87 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\95à¤\8fल à¤\97à¥\87ल à¤°à¤¹à¤\8f à¤\9cà¥\8cà¤\82 à¤\85हाà¤\81सà¤\81 à¤\97लतà¥\80 à¤­à¥\87ल à¤\85à¤\9bि, à¤\86 à¤\85हाà¤\81 à¤\93à¤\87 à¤ªà¤¨à¥\8dनाà¤\95à¥\87à¤\81 à¤«à¥\87रसà¤\81 à¤¦à¥\8bबारा à¤¨à¥\88 à¤²à¤¿à¤\96 à¤¸à¤\95à¥\88 à¤\9bà¥\80।\n\n\n<strong>à¤\9aà¥\87तावनà¥\80!</strong>\nà¤\88 à¤\8fà¤\95à¤\9fा à¤²à¥\8bà¤\95पà¥\8dरिय à¤ªà¤¨à¥\8dनाà¤\95 à¤²à¥\87ल à¤\8fà¤\95à¤\9fा à¤­à¤¯à¤\82à¤\95र à¤\86 à¤¬à¤¿à¤¨à¤¾ à¤\86शाà¤\95 à¤\95à¤\8fल à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤­à¤½ à¤¸à¤\95à¥\88à¤\8f।\nà¤\86à¤\97ाà¤\81 à¤¬à¤¢à¥\88सà¤\81 à¤ªà¤¹à¤¿à¤¨à¥\87 à¤\85हाà¤\81 à¤\88 à¤¸à¥\81निशà¥\8dà¤\9aित à¤\95रà¥\80 जे अहाँ एकर परिणाम बुझै छी।",
        "movepagetext-noredirectfixer": "नीचाँक फॉर्मक प्रयोग पन्नाक नाम बदलि देत, एकर सभटा इतिहासकेँ नव नामक अन्तर्गत राखि देत।\nपुरान शीर्षक नव पन्ना लेल एकटा घुरबैबला पन्ना बनि जाएत।\nनिश्चय करू तकबा लेल [[Special:DoubleRedirects|double]] वा[[Special:BrokenRedirects|broken redirects]]।\nअहाँ ऐ लेल जिम्मीदार छी जे सम्बन्धित लिंक ओतै जाए जतए ओकरा जेबाक चाही।\n\nमोन राखू कि पन्ना '''नै''' घसकत जौं नव शीर्षकपर पहिनहियेसँ पन्ना अछि, आ तखने ई करू जखन ओ खाली हुअए वा ओ एकटा घुमबैबला पन्ना हुअए वा ओइ पन्नाक कोनो भूतकालक सम्पादन इतिहास नै हुअए।\nएकर माने भेल जे अहाँ कोनो पन्नाक नाम परिवर्तन कऽ पाछाँ लऽ जा सकै छी जतए एकर नाममे परिवर्तन कएल गेल रहए जौं अहाँसँ गलती भेल अछि, आ अहाँ ओइ पन्नाकेँ फेरसँ दोबारा नै लिख सकै छी।\n\n\n'''चेतौनी!'''\nई एकटा लोकप्रिय पन्नाक लेल एकटा भयंकर आ बिना आशाक कएल परिवर्तन भऽ सकैए।\nआगाँ बढ़ैसँ पहिने अहाँ ई सुनिश्चित करू जे अहाँ एकर परिणाम बुझै छी।",
        "movepagetalktext": "सम्बन्धित चौबटिया पन्ना स्वचालित रूपेँ घसकत एकर संग '''जौं:'''\n*एकटा खाली-नै चौबटिया पन्ना पहिनहियेसँ नव नामक संग अछि, वा\n*अहाँ नीचाँक बॉक्स टिक हटा दी।\n\nताइ परिस्थितिमे, अहाँकेँ अपनेसँ पन्नाकेँ, आवश्यकतानुसार, घसकाबऽ वा मिज्झर करऽ पड़त।",
        "moveuserpage-warning": "'''चेतौनी!'''अहाँ एकटा प्रयोक्ता पन्ना घसका रहल छी | मोन राखू कि खाली पन्ना घसकत आ प्रयोक्ताक नाम ''नै'' बदलत ।",
        "movenotallowedfile": "अहाँकेँ संचिका सभकेँ घसकेबाक अधिकार नै अछि।",
        "cant-move-user-page": "अहाँकेँ प्रयोक्ता पन्ना सभकेँ घसकेबाक अधिकार नै अछि (उपपन्ना सभकेँ छोड़ि कऽ)।",
        "cant-move-to-user-page": "अहाँकेँ कोनो पन्नाकेँ प्रयोक्ता पन्ना लग घसकेबाक अधिकार नै अछि (प्रयोक्ता उपपन्ना लग छोड़ि कऽ)।",
-       "newtitle": "नव शीर्षकपर:",
-       "move-watch": "à¤\9cड़ि à¤ªà¤¨à¥\8dना à¤\86 à¤\9bà¥\80प à¤ªà¤¨à¥\8dना à¤¦à¥\87à¤\96à¥\82",
-       "movepagebtn": "पनà¥\8dना à¤\98सà¤\95ाबी",
+       "newtitle": "नव शीर्षक:",
+       "move-watch": "लिà¤\99à¥\8dà¤\95 à¤ªà¤¨à¥\8dना à¤\86 à¤²à¤\95à¥\8dषित à¤ªà¤¨à¥\8dना à¤¦à¥\87à¤\96à¥\80",
+       "movepagebtn": "नाम à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\95री",
        "pagemovedsub": "घसकल",
        "movepage-moved": "'''\"$1\" घसकाएल गेल \"$2\"''' पर",
        "movepage-moved-redirect": "एकटा पुनर्निर्देशन बनाओल गेल छै.",
        "movepage-moved-noredirect": "पुनर्निर्देशन नहि बनाओल गेल छै.",
        "articleexists": "ओइ नामक एकटा पन्ना पहिनहियेसँ अछि, वा जे नाम अहाँ चयन केने छी से वांछित नै अछि। \nकृपा कऽ दोसर नामक चयन करू।",
        "cantmove-titleprotected": "नब शीर्षक बनाबै  सें रोकहि के कारण, अहां अहि ठाम पर कोनो आन पृष्ठक ठाम बदलि नहि सकब.",
-       "movetalk": "सम्बन्धित वार्ता पृष्ठ सेहो घसकाबी",
+       "movetalk": "समà¥\8dबनà¥\8dधित à¤µà¤¾à¤°à¥\8dता à¤ªà¥\83षà¥\8dठ à¤¸à¥\87हà¥\8b à¤\98à¥\81सà¤\95ाबà¥\80",
        "move-subpages": "उपपृष्ठ सेहो लेल जाऊ ($1 धरि)",
        "move-talk-subpages": "वार्ता पृष्ठक उपपृष्ठ लेने जाऊ ($1 धरि)",
        "movepage-page-exists": "पन्ना $1 पहिनहियेसँ अछि आ स्वचालित रूपेँ मेटाएल नै जा सकैए।",
        "movepage-page-moved": "पन्ना $1 केँ $2 लग घसका देल गेल अछि।",
        "movepage-page-unmoved": "पन्ना $1 केँ $2 लग नै घसकाएल जा सकैए।",
        "movepage-max-pages": "बेसी सें बेसी $1 पृष्ठ बदलि के {{PLURAL:$1| क देल गेल अछि|क देल गेल अछि}}, आब आर पृष्ठ अपने आप नहि बदलत.",
-       "movelogpage": "स्थानान्तरण लग",
+       "movelogpage": "सà¥\8dथानानà¥\8dतरण à¤²à¥\8cà¤\97",
        "movelogpagetext": "नाम बदलल गेल लेख कऽ सूचि नीचां देल गेल अछि",
        "movesubpage": "{{PLURAL:$1|उप पन्ना|उप पन्ना}}",
        "movesubpagetext": "नीचां $1 {{PLURAL:$1| पन्ना देखाओल गएल अछि, जे अहि पन्नाकऽ उप पन्ना अछि|पन्ना देखावोल गएल अछि, जे अहि पन्नाकऽ उप पन्ना अछि}}।",
        "movenosubpage": "अहि पन्ना कऽ कोनो उप पन्ना नहि अछि।",
        "movereason": "कारण:",
        "revertmove": "फेरसँ वएह",
-       "delete_and_move_text": "==हटाबैक जरूरत==\nलक्ष्य पृष्ठ \"[[:$1]]\" पहिने सें अस्तित्व में अछि. \nनाम के बदलहि ले की अहां एकरा हटाबय चाहैत छी ?",
+       "delete_and_move_text": "लक्ष्य पृष्ठ \"[[:$1]]\" पहिने सँ अस्तित्वमे अछि।\nअहाँ एकरा स्थानान्तरण करै लेल एकरा मेटाबैलेल चाहै छी?",
        "delete_and_move_confirm": "हँ, पन्ना मेटाउ",
        "delete_and_move_reason": "\"[[$1]]\" सँ घसकेबा लेल जगह बनेबा लेल मेटाएल गेल",
        "selfmove": "स्रोत आ लक्ष्यक शीर्षक एक अछि;\nपृष्ठ अप्पन ठाम पर स्थानांतरित नहि भ सकत.",
        "immobile-target-namespace-iw": "अंतरविकी लिँक पन्ना घसकेबा लेल उचित लक्ष्य नै अछि।",
        "immobile-source-page": "अहि पृष्ठ के अहां कतौ नहि ल जा सकब",
        "immobile-target-page": "ओइ लक्ष्य शीर्षक धरि नै घसका सकल।",
+       "bad-target-model": "वाञ्छित स्थान भिन्न सामग्री नमूनाक प्रयोग करैत अछि। $1 के बदलि $2 नै केल जा सकैत अछि।",
        "imagenocrossnamespace": "संचिकाकेँ गएर संचिका नामस्थान धरि नै लए जा सकल।",
        "nonfile-cannot-move-to-file": "गएर संचिकाकेँ  संचिका नामस्थान धरि नै लए जा सकल।",
        "imagetypemismatch": "नव संचिका विस्तारक अपन प्रकारसँ मेल नै खाइए।",
        "imageinvalidfilename": "लक्ष्यित संचिकाक नाम अवैध अछि",
        "fix-double-redirects": "मूल शीर्षक धरि जाहि बला सभटा पुनर्निर्देशनों के सेहो बदलु.",
-       "move-leave-redirect": "एकटा बदलेन के पांछा छोडि के जाऊ",
+       "move-leave-redirect": "एक पुनर्निर्देशन पाछा छोडी",
        "protectedpagemovewarning": "''' चेतौनी: ई पन्ना संरक्षित अछि से खाली संचालन अधिकारयुक्त प्रयोक्ता एकरा घुसका सकैत छथि।'''\nनव वृतलेख उल्लेख नीचाँ सन्दर्भ लेल देल जा रहल अछि:",
        "semiprotectedpagemovewarning": "'''नोट:''' ई पन्ना संरक्षित अछि से खाली पंजीकृत प्रयोक्ता एकरा घुसका सकैत छथि।\nनव वृतलेख उल्लेख नीचाँ सन्दर्भ लेल देल जा रहल अछि:",
-       "move-over-sharedrepo": "[[:$1]] अछि एकटा साझी बखारीमे। कोनो संचिकाकेँ ऐ नामसँ अनलापर साझीबला एकटा संचिका मेटा जाएत।",
+       "move-over-sharedrepo": "साझा बखारीमे [[:$1]] अछि। कोनो सञ्चिकाके ई नाम सँ आनलापर एकटा सञ्चिका मेटा जाइत।",
        "file-exists-sharedrepo": "साझी बखारीमे ऐ नामसँ पहिनहियेसँ एकटा संचिका अछि।\nकृपा कऽ दोसर नाम चुनू।",
-       "export": "पनà¥\8dना à¤¸à¤­à¤\95à¥\87à¤\81 à¤ªà¤ à¤¾à¤\89",
+       "export": "पà¥\83षà¥\8dठसभ à¤¨à¤¿à¤°à¥\8dयात à¤\95रà¥\80",
        "exporttext": "अहाँ पाठ आ कोनो पन्ना/ वा पन्ना-सभक सम्पादन इतिहासकेँ दोसर ठाम कोनो एक्स.एम.एल. संचिकामे लपेट कऽ पठा सकै छी।\nई कोनो दोसर विकीमे मीडियाविकीक प्रयोग कऽ [[Special:Import|import page]] द्वारा आयात कएल जा सकैए।\n\nपन्ना सभक निर्यात लेल, नीचाँक पाठ बक्शामे शीर्षक सभ भरू, प्रति पाँती एक शीर्षक, आ चुनू जे अहाँ अखुनका आ पहिलुका सभटा संशोधन राखऽ चाहै छी, पन्ना इतिहास पाँतीक संग, आकि अखुनका संशोधन पछिला सम्पादनक सूचनाक संग।\n\nबादबला स्थितिमे अहाँ एकटा लागिक प्रयोग कऽ सकै छी, जेना \"[[{{MediaWiki:Mainpage}}]]\" पन्ना लेल [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]]।",
        "exportall": "पन्ना सभकेँ निर्यात करू",
        "exportcuronly": "अखुनका संशोधन मात्र लिअ, पूरा इतिहास नै।",
        "export-download": "संचिका रूपमे संरक्षण करू",
        "export-templates": "सभटा नमूना शामिल करू",
        "export-pagelinks": "लागिबला पन्ना सभकेँ एतेक तह धरि राखू:",
+       "export-manual": "स्वयं सँ पृष्ठ जोडी:",
        "allmessages": "प्रणालीक सन्देश",
        "allmessagesname": "नाम",
        "allmessagesdefault": "पूर्वनिर्धारित सन्देश पाठ",
        "allmessages-prefix": "उपसर्गक आधारपर छाँटू:",
        "allmessages-language": "भाषा:",
        "allmessages-filter-submit": "चलू",
-       "allmessages-filter-translate": "à¤\85नà¥\81वाद à¤\95रà¥\81",
+       "allmessages-filter-translate": "à¤\85नà¥\81वाद à¤\95रà¥\80",
        "thumbnail-more": "पैग",
        "filemissing": "संचिका हेराएल",
        "thumbnail_error": "लघुचित्र निर्माण कालमे भ्रम:$1",
        "djvu_page_error": "डेजावू पन्ना सकक बाहर अछि",
        "djvu_no_xml": "डेजावू संचिकाक एक्स.एम.एल. नै आनि सकलौं",
        "thumbnail-temp-create": "अस्थायी थम्बनेल फाइल बनाबए में असफल",
+       "thumbnail-dest-create": "थम्बनेलके ई स्थान पर सुरक्षित नै केल जा सकैए।",
        "thumbnail_invalid_params": "अमान्य लघुचित्र परिमिति",
+       "thumbnail_toobigimagearea": "सञ्चिका जेकर आकार $1 सँ बेसी अछि।",
        "thumbnail_dest_directory": "लक्ष्य निर्देशिका नै बना सकल",
        "thumbnail_image-type": "चित्र प्रकार समर्थित नै अछि",
        "thumbnail_gd-library": "अपूर्ण जी.डी.पुस्तकालय विन्यास: प्रकार्य $1 अनुपस्थित",
        "import-interwiki-text": "एकटा विकी आ पन्ना शीर्षक आनैलेल चुनू।\nसंशोधन तिथि आ सम्पादकक नाम सुरक्षित रहत।\nसभटा ट्रान्सविकी आयात क्रिया सम्प्रवेशित [[Special:Log/import|आयात लग]] पर रहत।",
        "import-interwiki-sourcewiki": "मूल विकि:",
        "import-interwiki-sourcepage": "मूल पन्ना:",
-       "import-interwiki-history": "à¤\85à¤\8f à¤ªà¤¨à¥\8dनाà¤\95 à¤¸à¤­à¤\9fा à¤\87तिहास à¤¸à¤\82शà¥\8bधनà¤\95 à¤¦à¥\8dवितà¥\80यà¤\95 à¤¬à¤¨à¤¾à¤\89",
-       "import-interwiki-templates": "सभà¤\9fा à¤¨à¤®à¥\82ना à¤¶à¤¾à¤®à¤¿à¤² à¤\95रà¥\82",
-       "import-interwiki-submit": "à¤\86नà¥\82",
+       "import-interwiki-history": "à¤\88 à¤ªà¤¨à¥\8dनाà¤\95 à¤¸à¤­à¤\9fा à¤\87तिहास à¤¸à¤\82शà¥\8bधनà¤\95 à¤\95पà¥\80 à¤\95रà¥\80",
+       "import-interwiki-templates": "सभà¤\9fा à¤\86à¤\95à¥\83ति à¤¶à¤¾à¤®à¤¿à¤² à¤\95रà¥\80",
+       "import-interwiki-submit": "à¤\86यात",
        "import-mapping-default": "पूर्व निर्धारित स्थान सभ पर आयात करी",
        "import-mapping-namespace": "कोनो नामस्थान पर आयात करी",
        "import-mapping-subpage": "निम्न लिखित पृष्ठ के उपपृष्ठ के रूप में आयात करी:",
        "import-nonewrevisions": "सभटा संशोधन पहिनहियेसँ आयातित अछि।",
        "xml-error-string": "$1 पाँतीपर $2, col $3 (byte $4): $5",
        "import-upload": "एक्स.एम.एल. दत्तांश उपारोपित करू",
-       "import-token-mismatch": "à¤\8fà¤\95 à¤\89à¤\96राहाà¤\95 à¤¦à¤¤à¥\8dताà¤\82श à¤\96तम à¤­à¤½ à¤\97à¥\87ल।\nफà¥\87रसà¤\81 à¤ªà¥\8dरयास à¤\95रà¥\82।",
+       "import-token-mismatch": "सà¥\87शन à¤¡à¤¾à¤\9fा à¤¨à¤·à¥\8dà¤\9f à¤­à¥\87ल।\nà¤\85हाà¤\81 à¤¸à¤¾à¤¯à¤¦ à¤²à¤\97 à¤\86à¤\89à¤\9f à¤\95 à¤\97à¥\87ल à¤\9bà¥\80।<strong>à¤\95à¥\83पया à¤\9cाà¤\81à¤\9a à¤\95रà¥\80 à¤\95à¥\80 à¤\85हाà¤\81 à¤¸à¤®à¥\8dपà¥\8dरवà¥\87शित à¤\9bà¥\80</strong>।\nयदि à¤\8fà¤\95र à¤¬à¤¾à¤¦à¥\8b à¤¸à¤«à¤² à¤¨à¥\88 à¤­à¥\87ल à¤¤à¤\81 à¤\95à¥\83पया [[Special:UserLogout|लà¤\97 à¤\86à¤\89à¤\9f]] à¤\95रि à¤ªà¥\81नà¤\83 à¤¸à¤®à¥\8dपà¥\8dरवà¥\87श à¤\95रà¥\80।",
        "import-invalid-interwiki": "विशिष्ट विकीसँ आयात नै कऽ सकै छी।",
        "import-error-edit": "\"$1\" पन्ना आयातित नै कएल गेल अछि कारण अहाँकेँ एकरा सम्पादित करबाक अधिकार नै अछि।",
        "import-error-create": "\"$1\" पन्ना आयातित नै कएल गेल अछि कारण अहाँकेँ एकरा निर्माण करबाक अधिकार नै अछि।",
        "import-error-interwiki": "पृष्ठ \"$1\" आयात नै केल गेल कियाकि एकर नाम अन्तरविकि जडी बनाबै के लेल आरक्षित अछि।",
        "import-error-special": "पृष्ठ \"$1\" आयात नै केल गेल कियाकि इ एक एहन विशेष नामस्थान के अन्तर्गत आबैत अछि जे में पृष्ठ पृष्ठ नै बनाएल जा सकैत अछि।",
        "import-error-invalid": "पृष्ठ \"$1\" आयात नै केल गेल कियाकि इ आयात पश्चात जे नाम रहत यो इ विकी पर अमान्य अछि।",
+       "import-error-unserialize": "पृष्ठ \"$1\" क संशोधन $2के क्रम सँ हटाएल नै जा सकल। संशोधनक बारेमे बताएल गेल अछि की सामग्री नमूना $3 क क्रम $4 के रूप प्रयोगमे लाबल गेल छल।",
        "import-options-wrong": "गलत {{PLURAL:$2|विकल्प}}: <nowiki>$1</nowiki>",
        "import-rootpage-invalid": "दयाल गेल उपसर्ग पन्ना शीर्षक अमान्य अछि ।",
        "import-rootpage-nosubpage": "दयाल गेल उपसर्ग पन्ना \"$1\" के नामस्थान में उप-पन्ना नै बनाबाल जा सकएत अछि ।",
        "importlogpage": "आयात सूची",
        "importlogpagetext": "पन्ना सभक प्रशासनिक आयात दोसर विकीक सम्पादन इतिहासक संग।",
-       "import-logentry-upload-detail": "$1 {{PLURAL:$1|सुधार|सुधार सभ}}",
+       "import-logentry-upload-detail": "$1 अवतरण आयात {{PLURAL:$1|केलक|कएल गेल}}",
        "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|सुधार|सुधार सभ}} $2 सँ",
        "javascripttest": "जावास्क्रिप्ट परिक्षण",
        "javascripttest-pagetext-unknownaction": "अज्ञात क्रिया \"$1\" ।",
        "tooltip-pt-preferences": "{{GENDER:|अहाँक}} अभिरुचीसभ",
        "tooltip-pt-watchlist": "पन्नासभ जेकर परिवर्तन पर अहाँक नजरि अछि",
        "tooltip-pt-mycontris": "{{GENDER:|अहाँक}} योगदानक सूची",
+       "tooltip-pt-anoncontribs": "ई आइपी पता सँ सम्पादनक सूची",
        "tooltip-pt-login": "अहाँक खाता खोलक लेल प्रोत्साहित कएल जाइत अछि; मुदा ई अनिवार्य नै अछि",
        "tooltip-pt-logout": "फेर आयब",
        "tooltip-pt-createaccount": "अहाँक खाता खोलक लेल प्रोत्साहित कएल जाइत अछि; मुदा ई अनिवार्य नै अछि",
        "tooltip-t-whatlinkshere": "सभ विकी-पन्नाक सूची जकर एतय लिङ्क अछि",
        "tooltip-t-recentchangeslinked": "ई पृष्ठक लगक पन्नामे भेल नव परिवर्तनसभ",
        "tooltip-feed-rss": "ऐ पन्ना लेल आर.एस.एस. सूचना",
-       "tooltip-feed-atom": "à¤\90 à¤ªà¤¨à¥\8dना à¤²à¥\87ल à¤\85णà¥\81 à¤¸à¤®à¤¦à¤¿à¤¯à¤¾",
+       "tooltip-feed-atom": "à¤\88 à¤ªà¥\83षà¥\8dठà¤\95 à¤\8fà¤\9fम à¤«à¤¿à¤¡",
        "tooltip-t-contributions": "ई {{GENDER:$1|प्रयोक्ताक}} योगदानक सूची देखी",
-       "tooltip-t-emailuser": "ई प्रयोगकर्ताक ई-पत्र पठाबी",
+       "tooltip-t-emailuser": "{{GENDER:$1|ई प्रयोगकर्ता}}के इमेल भेजी",
        "tooltip-t-info": "ई पृष्ठ के सम्बन्धमें आर बैंसी जानकारी",
        "tooltip-t-upload": "चित्र आकि मिडिया फाइल अपलोड करी",
-       "tooltip-t-specialpages": "सभà¤\9fा à¤µà¤¿à¤¶à¥\87ष à¤ªà¤¨à¥\8dनाक सूची",
+       "tooltip-t-specialpages": "समà¥\8dपà¥\82रà¥\8dण à¤µà¤¿à¤¶à¥\87ष à¤ªà¤¨à¥\8dनासभक सूची",
        "tooltip-t-print": "ई पृष्ठक छपैबला रूप",
        "tooltip-t-permalink": "पृष्ठक ई संस्करणक स्थायी लिङ्क",
        "tooltip-ca-nstab-main": "सामग्री वाला पृष्ठ देखी",
        "tooltip-ca-nstab-user": "प्रयोक्ता पन्ना देखी",
-       "tooltip-ca-nstab-media": "मà¥\80डिया à¤ªà¥\83षà¥\8dठ à¤¦à¥\87à¤\96à¥\82",
+       "tooltip-ca-nstab-media": "मिडिया à¤ªà¥\83षà¥\8dठ à¤¦à¥\87à¤\96à¥\80",
        "tooltip-ca-nstab-special": "ई एकटा विशिष्ट पन्ना छी, आ अहाँ एकरा सम्पादित नै कऽ सकै छी",
        "tooltip-ca-nstab-project": "परियोजना पन्ना देखी",
        "tooltip-ca-nstab-image": "सञ्चिकाक पृष्ठ देखी",
        "tooltip-ca-nstab-mediawiki": "प्रणालीक सन्देश देखी",
        "tooltip-ca-nstab-template": "नमूना देखी",
-       "tooltip-ca-nstab-help": "सहायता à¤ªà¥\83षà¥\8dठ à¤¦à¥\87à¤\96à¥\82",
+       "tooltip-ca-nstab-help": "सहायता à¤ªà¥\83षà¥\8dठ à¤¦à¥\87à¤\96à¥\80",
        "tooltip-ca-nstab-category": "श्रेणी पन्ना देखी",
        "tooltip-minoredit": "एकरा मामली सम्पादन चिन्हित करू",
        "tooltip-save": "अपन परिवर्तन सुरक्षित करी",
+       "tooltip-publish": "परिवर्तन प्रकाशित करी",
        "tooltip-preview": "परिवर्तनक प्रदर्शन, संरक्षण सँ पहिने एकर प्रयोग करी!",
        "tooltip-diff": "ई पाठमे अहाँद्वारा कएल परिवर्तन देखी।",
        "tooltip-compareselectedversions": "ऐ पन्नाक दू टा चयन कएल संशोधनक बीचक अन्तर देखू",
        "pageinfo-article-id": "पन्ना आई॰डी॰",
        "pageinfo-language": "पन्ना सामग्री भाषा",
        "pageinfo-content-model": "पन्ना सामग्री के नमूना",
+       "pageinfo-content-model-change": "परिवर्तन",
        "pageinfo-robot-policy": "बोटद्वारा अनुक्रमण",
        "pageinfo-robot-index": "मान्य",
        "pageinfo-robot-noindex": "अमान्य",
        "pageinfo-watchers": "जानकारक संख्या",
+       "pageinfo-visiting-watchers": "पृष्ठ देखनिहारक सङ्ख्या जे हालक सम्पादनमे आबए।",
        "pageinfo-few-watchers": "$1 स कम ध्यान दीए {{PLURAL:$1|वाला}}",
+       "pageinfo-few-visiting-watchers": "भ सकैत अछि या नै भी कि कियो ई हाल क सम्पादनद्वारा कोनो प्रयोक्ता आएल होए।",
        "pageinfo-redirects-name": "ई पन्नाक पुनर्निर्देशसभ सङ्ख्या",
        "pageinfo-subpages-name": "इ पन्ना के उप-पन्ना",
        "pageinfo-subpages-value": "$1 ($2 {{PLURAL:$2|पुनर्निर्देश}}; $3 {{PLURAL:$3|ग़ैर-पुनर्निर्देश}})",
        "pageinfo-protect-cascading-from": "सुरक्षा-विकल्प व्यापक भऽ रहल अछि स्थान-सऽ",
        "pageinfo-category-info": "संवर्ग जानकारी",
        "pageinfo-category-total": "सम्पादनक संख्या",
-       "pageinfo-category-pages": "पà¥\83षà¥\8dठ à¤¸à¤\82ख्या",
+       "pageinfo-category-pages": "पà¥\83षà¥\8dठ à¤¸à¤\99à¥\8dख्या",
        "pageinfo-category-subcats": "उपसंवर्ग के संख्या",
        "pageinfo-category-files": "फाइल सभके संख्या",
        "markaspatrolleddiff": "जाँच सम्पन्न करी",
        "markaspatrolledtext": "देखि लेल गेल, एहन चिन्ह लगाऊ",
+       "markaspatrolledtext-file": "ई फाइल संस्करणके जांचल चिन्हित करी",
        "markedaspatrolled": "जाँच सम्पन्न करी",
        "markedaspatrolledtext": "[[:$1]]क चयनित अवतरणक जाँच सम्पन्न भेल।",
        "rcpatroldisabled": "हालमे भेल परिवर्तनक परीक्षण अक्षम अछि",
        "markedaspatrollederror-noautopatrol": "अहाँ अपन कएल संशोधनकेँ संचालित नै कहि सकै छी।",
        "markedaspatrollednotify": "$1 पृष्ठ में कएल गएल ऐ परिवर्तन जाँचल गेल चिन्हासी कएल गेल।",
        "markedaspatrollederrornotify": "जाँचल चिन्हासी असफल भेल।",
-       "patrol-log-page": "सà¤\82à¤\9aालन à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
-       "patrol-log-header": "à¤\88 à¤¸à¤\82à¤\9aालित à¤¸à¤\82शà¥\8bधन à¤¸à¤­à¤\95 à¤µà¥\83तà¥\8dतलà¥\87à¤\96 छी।",
-       "log-show-hide-patrol": "$1 à¤¨à¤¿à¤°à¥\80à¤\95à¥\8dषण à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
+       "patrol-log-page": "परà¥\80à¤\95à¥\8dषण à¤²à¥\8cà¤\97",
+       "patrol-log-header": "à¤\88 à¤ªà¤°à¥\80à¤\95à¥\8dषित à¤\85वतरणसभà¤\95 à¤²à¥\8cà¤\97 छी।",
+       "log-show-hide-patrol": "$1 à¤¨à¤¿à¤°à¥\80à¤\95à¥\8dषण à¤²à¥\8cà¤\97",
        "log-show-hide-tag": "$1 ट्याग लग",
        "deletedrevision": "पुरान संशोधन $1 हटा देलौं",
        "filedeleteerror-short": "संचिका मेटेबामे भ्रम : $1",
        "svg-long-error": "अमान्य एस॰वी॰जी फ़ाइल: $1",
        "show-big-image": "पूर्ण आनन्तर्य",
        "show-big-image-preview": "ऐ पूर्वदृश्यक आकार: $1.",
+       "show-big-image-preview-differ": "पूर्वावलोकन $3 क आकार $2 फाइल: $1",
        "show-big-image-other": "दोसर {{PLURAL:$2|resolution|resolutions}}: $1।",
        "show-big-image-size": "$1 × $2 चित्राणु",
        "file-info-gif-looped": "घुरियाएल",
        "variantname-zh-sg": "sg",
        "variantname-zh-my": "my",
        "variantname-zh": "zh",
-       "metadata": "पà¥\8dरदतà¥\8dताà¤\82श",
+       "metadata": "मà¥\87à¤\9fाडà¥\87à¤\9fा",
        "metadata-help": "ई फाइल अतिरिक्त सूचना दैत अछि, सम्भवतः ई अंकीय कैमरा वा स्कैनर द्वारा बनाएल वा अंकण कए जोड़ल गेल अछि।\nजौं फाइलकेँ मूल रूपसँ परिवर्धित कएल गेल हएत तँ किछु विवरण पूर्ण रूपसँ परिवर्धित फाइलमे नै देखाएल गेल हएत।",
        "metadata-expand": "बढ़ाओल विवरण देखाउ।",
        "metadata-collapse": "विस्तृत विवरण नुकाउ",
        "exif-orientation-1": "सामान्य",
        "exif-orientation-2": "अनुदैर्घ्य मिज्झर",
        "exif-orientation-3": "180° पर घुमायल गेल",
-       "exif-orientation-4": "à¤\85नà¥\81पà¥\8dरसà¥\8dथ à¤®à¤¿à¤\9cà¥\8dà¤\9dर",
+       "exif-orientation-4": "भरà¥\8dà¤\9fिà¤\95लà¥\80 à¤«à¥\8dलिप à¤\95रà¥\80",
        "exif-orientation-5": "90° सी.सी.डब्लू. घुमाओल गेल आ अनुप्रस्थ रूपेँ मिज्झर कएल गेल",
        "exif-orientation-6": "९०° सी.सी.डब्लू. घुमाएल गेल",
        "exif-orientation-7": "९०° सी.डब्लू. घुमाओल गेल आ अनुप्रस्थ रूपेँ मिज्झर कएल गेल",
        "exif-customrendered-0": "सामान्य प्रक्रिया",
        "exif-customrendered-1": "वैकल्पिक प्रक्रिया",
        "exif-exposuremode-0": "स्वयं देखबैत",
-       "exif-exposuremode-1": "सà¤\82à¤\9aालित à¤¦à¥\87à¤\96ाà¤\8fब",
+       "exif-exposuremode-1": "मà¥\88नà¥\8dयà¥\81à¤\85ल à¤\8fà¤\95à¥\8dपà¥\8bà¤\9cर",
        "exif-exposuremode-2": "स्वचालित कोष्ठक",
        "exif-whitebalance-0": "स्वचालित उज्जर सन्तुलन",
        "exif-whitebalance-1": "संचालित उज्जर सन्तुलन",
        "confirm-watch-top": "ऐ पन्नाकेँ अपन साकांक्ष सूचीमे जोड़ू",
        "confirm-unwatch-button": "ठीक अछि",
        "confirm-unwatch-top": "ऐ पन्नाकेँ हमर साकांक्ष सूचीसँ हटाउ",
+       "confirm-rollback-button": "ठीक अछि",
+       "confirm-rollback-top": "ई पृष्ठ सम्पादन पूर्ववत करी?",
        "quotation-marks": "\"$1\"",
        "imgmultipageprev": "← पहिलुका पृष्ठ",
        "imgmultipagenext": "अगुलका पृष्ठ →",
        "imgmultigoto": "$1 पृष्ठ पर जाए",
        "img-lang-default": "(डिफल्ट भाषा)",
        "img-lang-info": "ई चित्र को $1. $2 में ढालु",
-       "img-lang-go": "à¤\9cाà¤\8a",
+       "img-lang-go": "à¤\9cाà¤\8f",
        "ascending_abbrev": "asc",
        "descending_abbrev": "जानकारी",
        "table_pager_next": "अगला पृष्ठ",
        "table_pager_prev": "पहिलुका पृष्ठ",
-       "table_pager_first": "पहला पृष्ठ",
+       "table_pager_first": "पहिल पृष्ठ",
        "table_pager_last": "अन्तिम पृष्ठ",
        "table_pager_limit": "एक पृष्ठ पर $1 सामग्री देखाबी",
        "table_pager_limit_label": "सामग्री प्रति पृष्ठ",
        "table_pager_limit_submit": "जाए",
        "table_pager_empty": "कोनो परिणाम नहि",
-       "autosumm-blank": "पà¥\83षà¥\8dठ à¤\95à¥\87 à¤\96ालà¥\80 à¤\95रल गेल",
+       "autosumm-blank": "पà¥\83षà¥\8dठ à¤\96ालà¥\80 à¤\95à¤\8fल गेल",
        "autosumm-replace": "\"$1\" सहित पाठ परिवर्तित भेल",
        "autoredircomment": "[[$1]] के अनुप्रेषित",
-       "autosumm-new": "'$1' à¤¸à¤\82à¤\97 à¤¨à¤¬ पृष्ठ बनाओल गेल",
+       "autosumm-new": "'$1' à¤¸à¤\82à¤\97 à¤¨à¤µ पृष्ठ बनाओल गेल",
        "autosumm-newblank": "खालि पन्ना बनाओल गेल",
        "lag-warn-normal": "$1 सँ नव बदलल गेल {{PLURAL:$1|सेकेण्ड|सेकेण्ड}} ऐ सूचीमे नै देखाएल गेल।",
        "lag-warn-high": "उच्च दत्तनिधि वितरक देरीक कारण, $1 सँ नव परिवर्तन {{PLURAL:$1|सेकेण्ड|सेकेण्ड}} ऐ सूचीमे नै देखाएल जा सकल।",
        "watchlistedit-raw-done": "अहाँक साकांक्ष-सूची अद्यतन कएल गेल।",
        "watchlistedit-raw-added": "{{PLURAL:$1|1 शीर्षक छल|$1शीर्षक सभ रहए}} जोड़ल गेल:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|1 शीर्षक छल|$1शीर्षक सभ रहए}} हटाएल गेल:",
-       "watchlistedit-clear-title": "साà¤\95ाà¤\82à¤\95à¥\8dष-सà¥\82à¤\9aà¥\80 à¤®à¥\87à¤\9fाà¤\93ल à¤\97à¥\87ल",
-       "watchlistedit-clear-legend": "साà¤\95ाà¤\82à¤\95à¥\8dष-सà¥\82à¤\9aà¥\80 à¤®à¥\87à¤\9fाà¤\89",
+       "watchlistedit-clear-title": "धà¥\8dयानसà¥\82à¤\9aà¥\80 à¤\96ालà¥\80 à¤\95रà¥\80",
+       "watchlistedit-clear-legend": "साà¤\95ाà¤\82à¤\95à¥\8dष-सà¥\82à¤\9aà¥\80 à¤®à¥\87à¤\9fाबà¥\80",
        "watchlistedit-clear-explain": "एही ठाम रहल सभ शिर्षक अहाँक साकांक्ष-सूची से मेटा जाएत",
        "watchlistedit-clear-titles": "शीर्षक",
        "watchlistedit-clear-submit": "साकांक्ष-सूची मेटाउ (ई स्थायी छि!)",
        "watchlistedit-clear-done": "अहाँक साकांक्ष-सूची मेटाओल गेल।",
        "watchlistedit-clear-removed": "{{PLURAL:$1|1 शीर्षक छल|$1शीर्षक सभ रहए}} हटाएल गेल:",
-       "watchlistedit-too-many": "à¤\8fतà¥\87à¤\95 à¤¬à¤¹à¥\81त à¤°à¤¾à¤¸ à¤ªà¤¨à¥\8dना à¤¸à¤­ à¤¦à¥\87à¤\96ावà¥\8bल à¤\9cाà¤\8fत।",
-       "watchlisttools-clear": "साà¤\95ाà¤\82à¤\95à¥\8dष-सà¥\82à¤\9aà¥\80 à¤®à¥\87à¤\9fाà¤\89",
+       "watchlistedit-too-many": "à¤\8fतय à¤¦à¤°à¥\8dशावà¥\88à¤\95 à¤²à¥\87ल à¤\85तà¥\8dयधिà¤\95 à¤ªà¥\83षà¥\8dठ à¤\85à¤\9bि।",
+       "watchlisttools-clear": "साà¤\95ाà¤\82à¤\95à¥\8dष-सà¥\82à¤\9aà¥\80 à¤®à¥\87à¤\9fाबà¥\80",
        "watchlisttools-view": "सम्बन्धित परिवर्तन सभकेँ देखी",
        "watchlisttools-edit": "साकांक्षसूची देखी आ सम्पादित करी",
        "watchlisttools-raw": "काँच साकांक्षसूची सम्पादित करी",
        "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|वार्ता]])",
+       "timezone-local": "स्थानीय",
        "duplicate-defaultsort": "'''चेतौनी:''' पूर्वनिर्धारित विन्यास चाभी \"$2\" पहिलुका पूर्वनिर्धारित विन्यास चाभी \"$1\" केँ खतम करैए।",
        "duplicate-displaytitle": "<strong>चेतना:</strong> शीर्षक दिखाबु \"$2\" पूर्व दिखाएल गेल शीर्षक \"$1\" पे हाबी भऽ रहल अछि।",
+       "restricted-displaytitle": "<strong>चेतावनी :</strong> प्रदर्शित शीर्षक \"$1\" नजरअन्दाज केल गेल अछि, कियाकि ई वास्तविक शीर्षक सँ नै मिलैत अछि।",
        "invalid-indicator-name": "<strong>त्रुटि:</strong> पन्ना स्थिति सुचीत <code>नाम</code> गुण खाली नै रहना चाही।",
        "version": "संस्करण",
        "version-extensions": "संस्करणक आगाँ",
        "version-ext-colheader-description": "विवरण",
        "version-ext-colheader-credits": "लेखक",
        "version-license-title": "$1 के लेल अधिकार",
+       "version-license-not-found": "ई एक्सटेन्सनक लेल कोनो विस्तृत लाइसेन्स जानकारी नै भेट सकल।",
        "version-credits-title": "$1 के लेल श्रेय",
+       "version-credits-not-found": "ई एक्सटेन्सनक लेल कोनो विस्तृत श्रेय जानकारी नै भेट सकल।",
        "version-poweredby-credits": "ई विकी चालित अछि '''[https://www.mediawiki.org/ MediaWiki]''', copyright © 2001-$1 $2",
        "version-poweredby-others": "आन",
        "version-poweredby-translators": "translatewiki.net अनुवादक",
        "version-libraries": "स्थापित लाइब्रेरी",
        "version-libraries-library": "लाइब्रेरी",
        "version-libraries-version": "संस्करण",
-       "redirect": "अनुप्रेषित करु फ़ाइल, प्रयोगकर्ता, वा संशोधन पहीचान के आधार में",
-       "redirect-summary": "ई विशेष पन्ना फ़ाइलनाम प्रदान करै पे फ़ाइल नाम के, पन्न आइ॰दी अथवा अवतरण आइ॰दी दुनु पे पन्ना के,आर साथी सदस्य आइ॰दी दुनु पे सदस्य पन्ना के पुनर्प्रेषित करएत अछि । उदाहरण: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]], या [[{{#Special:Redirect}}/user/101]]।",
-       "redirect-submit": "जाऊ",
+       "version-libraries-license": "अनुज्ञापत्र",
+       "version-libraries-description": "विवरण",
+       "version-libraries-authors": "लेखक",
+       "redirect": "फाइल, सदस्य, पृष्ठ, अवतरण या लग आइडीद्वारा अनुप्रेषित",
+       "redirect-summary": "ई विशेष पन्ना फाइलनाम प्रदान करै पर फाइल नामके, पन्न आइडी अथवा अवतरण आइडी दुनु पर पन्नाके, आर साथी सदस्य आइडी दुनु पर सदस्य पन्नाके पुनर्प्रेषित करैत अछि । उदाहरण: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]], या [[{{#Special:Redirect}}/user/101]]।",
+       "redirect-submit": "जाए",
        "redirect-lookup": "ताकू:",
        "redirect-value": "मूल्य:",
        "redirect-user": "प्रयोक्ता आई॰डी॰",
        "redirect-page": "पन्ना आई॰डी॰",
        "redirect-revision": "पन्ना अवतरण संख्या",
        "redirect-file": "फाइल नाम",
+       "redirect-logid": "प्रवेश आइडी",
        "redirect-not-exists": "बैनर नैं मिल्ल",
-       "fileduplicatesearch": "दà¥\8dवितà¥\80यà¤\95 à¤¸à¤\82à¤\9aिà¤\95ा à¤¤à¤¾à¤\95à¥\82",
-       "fileduplicatesearch-summary": "हà¥\88श à¤®à¤¾à¤¨à¤\95 à¤\86धारपर à¤¦à¥\8dवितà¥\80यà¤\95 à¤¸à¤\82à¤\9aिà¤\95ा à¤¤à¤¾à¤\95à¥\82।",
+       "fileduplicatesearch": "पà¥\8dरतिलिपि à¤«à¤¾à¤\87ल à¤¤à¤¾à¤\95à¥\80",
+       "fileduplicatesearch-summary": "हà¥\8dयाश à¤®à¤¾à¤¨à¤\95 à¤\86धारपर à¤ªà¥\8dरतिलà¥\8dपà¥\80 à¤«à¤¾à¤\87ल à¤¤à¤¾à¤\95à¥\80।",
        "fileduplicatesearch-filename": "संचिकानाम:",
        "fileduplicatesearch-submit": "ताकू",
        "fileduplicatesearch-info": "$1 × $2 चित्राणु<br /> फाइल आकार: $3<br /> माइम प्रकार: $4",
-       "fileduplicatesearch-result-1": "सà¤\82à¤\9aिà¤\95ा \"$1\" à¤²à¥\87ल à¤\95à¥\8bनà¥\8b à¤¤à¤¾à¤¦à¤¾à¤¤à¥\8dमà¥\8dय à¤¦à¥\8dवितà¥\80यà¤\95 à¤¨à¥\88।",
-       "fileduplicatesearch-result-n": "सà¤\82à¤\9aिà¤\95ा \"$1\" à¤\95à¥\87à¤\81 à¤\9bà¥\88 {{PLURAL:$2|1 à¤¤à¤¾à¤¦à¤¾à¤¤à¥\8dमà¥\8dय à¤¦à¥\8dवितà¥\80यà¤\95|$2तादातà¥\8dमà¥\8dय à¤¦à¥\8dवितà¥\80यà¤\95}}.",
+       "fileduplicatesearch-result-1": "फाà¤\87ल \"$1\" à¤®à¥\87 à¤\95à¥\8bनà¥\8b à¤ªà¥\8dरतिलिपि à¤¨à¥\88 à¤\85à¤\9bि।",
+       "fileduplicatesearch-result-n": "फाà¤\87ल \"$1\" à¤®à¥\87 {{PLURAL:$2|1 à¤¤à¤¾à¤¦à¤¾à¤¤à¥\8dमà¥\8dय à¤¦à¥\8dवितà¥\80यà¤\95|$2 à¤¤à¤¾à¤¦à¤¾à¤¤à¥\8dमà¥\8dय à¤¦à¥\8dवितà¥\80यà¤\95}} à¤­à¥\87à¤\9fल à¤\85à¤\9bि।",
        "fileduplicatesearch-noresults": "कोनो \"$1\" नाम्ना संचिका नै।",
        "specialpages": "विशेष पन्नासभ",
        "specialpages-note-top": "कुंजी",
        "specialpages-group-maintenance": "सुस्थापन प्रतिवेदन",
        "specialpages-group-other": "दोसर विशेष पन्ना",
        "specialpages-group-login": "सम्प्रवेश/ सम्प्रवेश आवेदन",
-       "specialpages-group-changes": "हालà¤\95 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\86 à¤µà¥\83तà¥\8dतलà¥\87à¤\96",
+       "specialpages-group-changes": "सनà¥\8dनिà¤\95à¤\9f à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\86 à¤²à¥\8cà¤\97",
        "specialpages-group-media": "मीडिया प्रतिवेदन आ उपारोपण",
        "specialpages-group-users": "प्रयोक्ता आ अधिकार",
-       "specialpages-group-highuse": "बà¥\87सà¥\80 à¤ªà¥\8dरयà¥\8bà¤\97बला à¤ªà¤¨à¥\8dना à¤¸à¤­",
+       "specialpages-group-highuse": "à¤\85तà¥\8dयधिà¤\95 à¤\89पयà¥\8bà¤\97à¥\80 à¤ªà¥\83षà¥\8dठ",
        "specialpages-group-pages": "पन्ना सभक सूची",
        "specialpages-group-pagetools": "पन्नाक औजार सभ",
        "specialpages-group-wiki": "विकी दत्तांश आ औजार सभ",
        "intentionallyblankpage": "ई पन्ना पलानि कऽ खाली छोड़ल गेल।",
        "external_image_whitelist": "# ऐ पाँतीकेँ एकदम ओहिना छोड़ि दियौ जेना ई अछि<pre>\n# सामान्य वैचारिक खण्ड नीचाँ राखू (// क बीचक खण्ड मात्र)।\n# ई सभ बाहरी (ताजाताजी लागि) चित्रक सार्वत्रिक विभव संकेतसँ मेल खुआएल जाएत\n# ओ सभ जे मेल खाएत से चित्रक रूपमे प्रदर्शित हएत, नै तँ खाली एकटा चित्रक लागि देखाएल जाएत\n# # सँ शुरू भेल पाँती टिप्पणीक रूपमे देखल जाएत।\n# ई ब्रह्मक्षर-लघ्वक्षरक फेरासँ स्वतंत्र अछि।\n\n# सभटा सामान्य कथन ऐ पाँतीसँ ऊपर राखू। ऐ पाँतीकेँ एकदम ओहिना छोड़ू जेना ई अछि </pre>",
        "tags": "मान्य परिवर्तन चेन्ह सभ",
-       "tag-filter": "[[Special:Tags|Tag]] छन्ना:",
+       "tag-filter": "[[Special:Tags|ट्याग]] छन्ना:",
        "tag-filter-submit": "चलनी",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|ट्याग|ट्यागसभ}}]]: $2)",
+       "tag-mw-contentmodelchange": "सामग्री परिवर्तन लग",
        "tags-title": "चेन्ह सभ",
        "tags-intro": "ई पन्ना चेन्ह सभकेँ सूचित करैए जे तंत्रांश सम्पादनसँ चिन्हित करए, आ ओकर अर्थ सेहो।",
        "tags-tag": "चेन्हक नाम",
-       "tags-display-header": "परिवरà¥\8dतन à¤¸à¥\82à¤\9aà¥\80 à¤¸à¤­à¤\95 à¤°à¥\82परà¤\82à¤\97",
+       "tags-display-header": "परिवरà¥\8dतन à¤¸à¥\82à¤\9aिसभमà¥\87 à¤ªà¥\8dरदरà¥\8dशन",
        "tags-description-header": "अर्थक पूर्ण विवरण",
        "tags-source-header": "स्रोत",
        "tags-active-header": "सक्रिय?",
        "tags-actions-header": "क्रिया सभ",
        "tags-active-yes": "हँ",
        "tags-active-no": "नै",
-       "tags-source-extension": "à¤\8fà¤\95à¥\8dसà¤\9fà¥\87नà¥\8dसनद्वारा परिभाषित",
+       "tags-source-extension": "सफà¥\8dà¤\9fवà¥\87यरद्वारा परिभाषित",
        "tags-source-manual": "प्रयोक्तासभ आर बोटद्वारा नियमानुसार लागू",
        "tags-source-none": "आब प्रयोग में नै",
        "tags-edit": "सम्पादन करी",
        "tags-deactivate": "निष्क्रिय करी",
        "tags-hitcount": "$1 {{PLURAL:$1|परिवर्तन|परिवर्तनसभ}}",
        "tags-manage-no-permission": "अहाँकेँ पन्ना घसकेबाक अधिकार नै अछि।",
+       "tags-manage-blocked": "अहाँ प्रतिबन्धित रहैत समय ट्यागमे कोनो जोडए या हटाबैक कार्य नै करि सकैत छी।",
        "tags-create-heading": "एकटा नयाँ विकि-समूह बनाबु",
        "tags-create-explanation": "पुनः निर्धारित रूप से, नवनिर्मित टैग प्रयोगकर्तासभ आर बॉट के लेल हाजीर राहत।",
        "tags-create-tag-name": "चेन्हक नाम:",
        "tags-edit-title": "ट्याग सम्पादन",
        "tags-edit-manage-link": "ट्याग व्यवस्थापन",
        "tags-edit-revision-selected": "[[:$2]] {{PLURAL:$1|क|के}} चयनित अवतरण:",
-       "tags-edit-logentry-selected": "{{PLURAL:$1|à¤\9aà¥\81नल à¤µà¥\83तà¥\8dतलà¥\87à¤\96 à¤\98à¤\9fना|à¤\9aà¥\81नल à¤µà¥\83तà¥\8dतलà¥\87à¤\96 à¤\98à¤\9fना सभ}}:",
-       "tags-edit-existing-tags-none": "''कोनो नै''",
+       "tags-edit-logentry-selected": "{{PLURAL:$1|à¤\9aà¥\81नल à¤²à¥\8cà¤\97 à¤\98à¤\9fना|à¤\9aà¥\81नल à¤²à¥\8cà¤\97 à¤\98à¤\9fनासभ}}:",
+       "tags-edit-existing-tags-none": "<em>कोनो नै</em>",
        "tags-edit-new-tags": "नव ट्याग:",
        "tags-edit-add": "इ ट्यागसभ जोडी:",
        "tags-edit-remove": "इ ट्यागसभ हटाबी:",
        "tags-edit-chosen-placeholder": "किछु ट्याग चुनी",
        "tags-edit-chosen-no-results": "ए नामक ट्याग नै भेटल",
        "tags-edit-reason": "कारण:",
+       "tags-edit-revision-submit": "बदलाव जोडी {{PLURAL:$1|ई अवतरण|$1 अवतरण}}मे",
+       "tags-edit-logentry-submit": "बदलाव जोडी {{PLURAL:$1|ई लग प्रवक्ति|$1 लग प्रवक्तिसभ}}मे",
+       "tags-edit-success": "बदलाव सफलता लागू भेल।",
+       "tags-edit-failure": "परिवर्तन नै जोडल जा सकैत अछि: $1",
+       "tags-edit-nooldid-title": "अमान्य लक्ष्य संशोधन",
        "comparepages": "पन्ना सभक तुलना करू",
        "compare-page1": "पन्ना १",
        "compare-page2": "पन्ना २",
        "compare-title-not-exists": "जे शीर्षक अहाँ कहलौं से अछिये नै।",
        "compare-revision-not-exists": "जे संशोधन अहाँ कहलौं से अछिये नै।",
        "dberr-problems": "दुखी छी! ई जालस्थल तकनीकी समस्या अनुभव कऽ अछि।",
-       "dberr-again": "à¤\95िà¤\9bà¥\81 à¤\95ाल à¤¬à¤¾à¤\9f à¤¤à¤¾à¤\95à¥\82 à¤\86 à¤«à¥\87रसà¤\81 à¤­à¤¾à¤°à¤¿à¤¤ à¤\95रà¥\82।",
+       "dberr-again": "à¤\95िà¤\9bà¥\81 à¤\95ाल à¤°à¥\81à¤\95à¥\80 à¤\86 à¤«à¥\87रसà¤\81 à¤\9cानà¤\95ारà¥\80 à¤­à¤°à¥\80।",
        "dberr-info": "(दत्तनिधि वितरकके सम्पर्क नै कऽ सकल: $1)",
        "dberr-info-hidden": "(दत्तनिधि वितरकके सम्पर्क नै कऽ सकल: $1)",
        "dberr-usegoogle": "ऐ बीचमे अहाँ गूगलसँ खोज कऽ सकै छी।",
        "htmlform-chosen-placeholder": "एकटा विकल्प चुनु",
        "htmlform-cloner-create": "आर जोडु",
        "htmlform-cloner-delete": "हटाउ",
-       "sqlite-has-fts": "$1 पूर्ण-पाठ खोज सहायता युक्त",
-       "sqlite-no-fts": "$1 बिन पूर्ण-पाठ खोज सहायताक",
        "logentry-delete-delete": "$1 पृष्ठ $3 {{GENDER:$2|मेटौलक}}",
        "logentry-delete-restore": "$1 {{GENDER:$2|restored}} page $3",
-       "logentry-delete-event": "$1 {{GENDER:$2|changed}} एकर दृश्य{{PLURAL:$5| एकटा वृत्तलेख|$5 वृत्तलेख}}  $3: $4 केँ",
-       "logentry-delete-revision": "$1 {{GENDER:$2|परिवर्तन कियल गैल}} एकर दृश्य{{PLURAL:$5| एकटा संशोधन|$5 संशोधन}}  पन्ना $3: $4 पर",
-       "logentry-delete-event-legacy": "$1 {{GENDER:$2|changed}}  $3 पर वृत्तलेख दृश्य",
-       "logentry-delete-revision-legacy": "$1 {{GENDER:$2|changed}}  $3 पर वृत्तलेख संशोधन",
+       "logentry-delete-event": "$1द्वारा $3 पृष्ठक लौग {{PLURAL:$5|प्रविष्टि|प्रविष्टिसभ}}क दृश्यता {{GENDER:$2|परिवर्तित केलक}}: $4",
+       "logentry-delete-revision": "$1 द्वारा $3 पृष्ठक {{PLURAL:$5|एक अवतरण|$5 अवतरणसभ}}क दृश्यता {{GENDER:$2|परिवर्तित}}: $4",
+       "logentry-delete-event-legacy": "$1द्वारा $3 पृष्ठ पर लौग क्रियासभक दृश्यता {{GENDER:$2|परिवर्तित केलक}}",
+       "logentry-delete-revision-legacy": "$1द्वारा $3 पृष्ठ पर अवतरणसभक दृश्यता {{GENDER:$2|परिवर्तित केलक}}",
        "logentry-suppress-delete": "$1 {{GENDER:$2|दबाएल}} page $3",
        "logentry-suppress-event": "$1 चोरिसँ {{GENDER:$2|परिवर्तन कियल गैल}} एकर दृश्य{{PLURAL:$5| एकटा वृत्तलेख|$5 वृत्तलेख}}  $3: $4 पर",
        "logentry-suppress-revision": "$1 चोरिसँ {{GENDER:$2|changed}} एकर दृश्य{{PLURAL:$5| एकटा संशोधन|$5 संशोधन}}  $3: $4 पर",
-       "logentry-suppress-event-legacy": "$1 नुका क {{GENDER:$2|परिवर्तन}}  $3 पर वृत्तलेख दृश्य",
+       "logentry-suppress-event-legacy": "$1द्वारा गुप्त रूपसँ $3 पृष्ठ पर लौग क्रियासभक दृश्यता {{GENDER:$2|परिवर्तित केलक}}",
        "logentry-suppress-revision-legacy": "$1 नुका कऽ {{GENDER:$2|changed}}  $3 पर संशोधन दृश्य",
        "revdelete-content-hid": "सामिग्री नुकाएल",
        "revdelete-summary-hid": "नुकाएल सारांश सम्पादन",
        "revdelete-restricted": "संचालक लेल प्रायोगिक प्रतिबन्ध",
        "revdelete-unrestricted": "संचालक लेल हटाओल प्रतिबन्ध",
        "logentry-import-upload": "$1 {{GENDER:$2|आयात केल गेल}} $3 संचिका उपारोपन के माध्यम सँ",
-       "logentry-import-interwiki": "$1 {{GENDER:$2|à¤\86यात à¤\95à¥\87ल à¤\97à¥\87ल}} $3 à¤\95à¥\8bनà¥\8b à¤\94र à¤µà¤¿à¤\95ि सँ",
+       "logentry-import-interwiki": "$1 {{GENDER:$2|à¤\86यात à¤\95à¤\8fल à¤\97à¥\87ल}} $3 à¤\95à¥\8bनà¥\8b à¤\94र à¤µà¤¿à¤\95िसँ",
        "logentry-merge-merge": "$1 {{GENDER:$2|विलय केल गेल}} $3 के $4 में (संशोधन $5 धरि)",
        "logentry-move-move": "$1द्वारा $3 पृष्ठ $4 पर {{GENDER:$2|स्थानान्तरित}} कएलक",
-       "logentry-move-move-noredirect": "$1 {{GENDER:$2|हटाएल}} पन्ना $3 सँ $4 घुमौआकेँ बिना छोड़ने",
-       "logentry-move-move_redir": "$1 {{GENDER:$2|हटाएल}} पन्ना $3 सँ $4 घुमौआक अतिरिक्त",
-       "logentry-move-move_redir-noredirect": "$1 {{GENDER:$2|हटाएल}} पन्ना $3 सँ $4 घुमौआक अतितिक्त घुमौआकेँ बिना छोड़ने",
+       "logentry-move-move-noredirect": "$1 द्वारा $3 पर पुनर्निर्देशन नै छोडि ओकरा $4 पर {{GENDER:$2|स्थानान्तरित}} केलक",
+       "logentry-move-move_redir": "$1 द्वारा $4 सँ पुनर्निर्देशन हटाए $3 क ओहिपर {{GENDER:$2|स्थानान्तरित}} केलक",
+       "logentry-move-move_redir-noredirect": "$1 द्वारा $4 सँ पुनार्निर्देश हटाए $3 पर पुनर्निर्देश नै छोडि $3 के $4 पर {{GENDER:$2|स्थानान्तरित}} केलक",
        "logentry-patrol-patrol": "$1 {{GENDER:$2|चिन्हित}} संशोधन $4 $3 पन्नाक निरीक्षित",
        "logentry-patrol-patrol-auto": "$1 स्वतः {{GENDER:$2|चिन्हित}} संशोधन $4 $3 पन्नाक निरीक्षित",
        "logentry-newusers-newusers": "$1 {{GENDER:$2|बनाएल}} एकटा प्रयोक्ता खाता",
        "logentry-newusers-byemail": "$1 द्वारा प्रयोक्ता खाता $3 {{GENDER:$2|बनाओल}} गेल आ कूटशब्द ई-पत्र द्वारा भेजल गेल",
        "logentry-newusers-autocreate": "खाता $1 छल {{GENDER:$2|बनाएल}} स्वतः",
        "logentry-upload-upload": "$1 {{GENDER:$2|ए}} $3 अपलोड केलक",
-       "log-name-tag": "ट्याग लग",
+       "log-name-tag": "à¤\9fà¥\8dयाà¤\97 à¤²à¥\8cà¤\97",
        "rightsnone": "(कोनो नै)",
        "revdelete-summary": "सम्पादन सारांश",
        "feedback-adding": "पन्ना उपर प्रतिक्रिया जोडु ...",
        "feedback-back": "पाछां",
        "feedback-bugcheck": "बहुत निक! जांच करु कि [ $1 known bugs] पहिले स त नै अछि ।",
        "feedback-bugnew": "हम जाँच केलौ। एक नव बग रिपोर्ट करी",
-       "feedback-cancel": "रदà¥\8dद à¤\95रà¥\81",
+       "feedback-cancel": "रदà¥\8dद à¤\95रà¥\80",
        "feedback-close": "भ गेल",
-       "feedback-error-title": "त्रुटि",
        "feedback-error1": "त्रुटि: नै पहचानल गेल परिणाम एपीआईसँ",
        "feedback-error2": "त्रुटि: संपादन विफल भेल",
        "feedback-error3": "त्रुटि:एपीआईसँग कोनो प्रतिक्रिया नै",
        "expand_templates_remove_comments": "टिप्पणी हटाउ",
        "expand_templates_remove_nowiki": "परिणाम में <nowiki> ट्याग हटाउ",
        "expand_templates_generate_xml": "XML के पार्स (parse) वृक्ष देखाउ",
+       "pagelanguage": "पृष्ठ भाषा परिवर्तन करी",
        "pagelang-name": "पन्ना",
        "pagelang-language": "भाषा",
+       "pagelang-use-default": "डिफल्ट भाषा प्रयोग करी",
        "pagelang-select-lang": "भाषा चुनु",
-       "right-pagelang": "पृष्ठ के भाषा परिवर्तन करू",
-       "action-pagelang": "पृष्ठ के भाषा परिवर्तन करू",
+       "pagelang-submit": "भेजी",
+       "right-pagelang": "पृष्ठ भाषा परिवर्तन करी",
+       "action-pagelang": "पृष्ठ भाषा परिवर्तन करी",
+       "log-name-pagelang": "भाषा परिवर्तन लग",
+       "log-description-pagelang": "ई पृष्ठ भाषासभमे परिवर्तनक लग छी।",
+       "logentry-pagelang-pagelang": "$1 {{GENDER:$2|बदलि देल गेल}} पृष्ठ भाषा $3 क लेल $4 सँ $5।",
+       "mediastatistics": "मिडिया तथ्याङ्क",
        "special-characters-group-latin": "ल्याटिन",
        "special-characters-group-latinextended": "ल्याटिन विस्तारित",
        "special-characters-group-ipa": "आइपीए",
        "special-characters-group-khmer": "खमेर",
        "special-characters-title-endash": "एन डैश",
        "special-characters-title-emdash": "एम डैश",
-       "special-characters-title-minus": "ऋण चिह्न"
+       "special-characters-title-minus": "ऋण चिह्न",
+       "randomrootpage": "अविशिष्ट मूल पृष्ठ",
+       "log-action-filter-block": "प्रतिबन्धक प्रकार:",
+       "log-action-filter-delete": "मेटबैक प्रकार:",
+       "log-action-filter-import": "आयातक प्रकार:",
+       "log-action-filter-move": "स्थानान्तरणक प्रकार:",
+       "log-action-filter-newusers": "खाता निर्माणक प्रकार:",
+       "log-action-filter-patrol": "परीक्षणक प्रकार:",
+       "log-action-filter-protect": "सुरक्षाक प्रकार:",
+       "log-action-filter-rights": "अधिकार परिवर्तनक प्रकार:",
+       "log-action-filter-all": "सभटा",
+       "log-action-filter-block-block": "अवरोध",
+       "log-action-filter-block-reblock": "अवरोध परिवर्तन",
+       "log-action-filter-block-unblock": "अवरोधरहित",
+       "log-action-filter-contentmodel-change": "सामग्रीक नमूना परिवर्तन"
 }
index c1006b7..d4eeb0c 100644 (file)
        "oct": "Шыжа",
        "nov": "Кылме",
        "dec": "Теле",
-       "pagecategories": "{{PLURAL:$1|Категорий|Категорий}}",
+       "pagecategories": "{{PLURAL:$1|Категорий|Категорий-влак}}",
        "category_header": "\"$1\" категорийыште лаштык-влак",
        "subcategories": "Ӱлылкатегорий-влак",
        "category-media-header": "\"$1\" категорийыште файл-влак",
        "category-empty": "''Ты жаплан тиде категорийыште нимоат уке.''",
        "hidden-categories": "{{PLURAL:$1|Шылтыме категорий|Шылтыме категорий-влак}}",
        "hidden-category-category": "Шылтымо категорий-влак",
-       "category-subcat-count": "{{PLURAL:$2|Тиде категорийыш ик ӱлылкатегорий гына пура.|{{PLURAL:$1|1=Тыгай $1 ӱлылкатегорий|Тыгане $1 ӱлылкатегорий-влак}} тиде категорийыште, чыла $2.}}",
-       "category-article-count": "{{PLURAL:$2|Тиде категорийыш ик лаштык гына пура.|{{PLURAL:$1|1=Тыгай $1 лаштык|Тыгане $1 лаштык-влак}} тиде категорийыште, чыла $2.}}",
+       "category-subcat-count": "{{PLURAL:$2|Тиде категорийыш ик ӱлылкатегорий гына пура.|{{PLURAL:$1|1=Тыгай лӱман $1 ӱлылкатегорий}} тиде категорийыште верланен, чылажге $2 уло.}}",
+       "category-article-count": "{{PLURAL:$2|Тиде категорийыш ик лаштык гына пура.|{{PLURAL:$1|1=$1 лаштыкым ончыктымо}} тиде категорийыште, чылажге $2 уло.}}",
        "category-file-count": "{{PLURAL:$2|Тиде категорийыш ик лаштык гына пура.|{{PLURAL:$1|1=$1 лаштык|$1 лаштык}} тиде категорийыште, чылажге $2.}}",
        "listingcontinuesabbrev": "(умбакыжым)",
        "noindex-category": "Шотыш налдыме лаштык-влак",
        "actions": "Сомылка-влак",
        "namespaces": "Лӱм-влак ора",
        "variants": "Вариант-влак",
+       "navigation-heading": "Навигаций",
        "errorpagetitle": "Йоҥылыш",
        "returnto": "$1 деке пӧртылаш.",
        "tagline": "{{SITENAME}} гыч",
        "nstab-template": "Ямдылык",
        "nstab-help": "Полыш лаштык",
        "nstab-category": "Категорий",
+       "mainpage-nstab": "Тӱҥ лаштык",
        "nosuchspecialpage": "Тыгай спецлаштык уке.",
        "error": "Йоҥылыш",
        "databaseerror-error": "Йоҥылыш: $1",
        "yourpasswordagain": "Шолыпмутым угыч пуртымаш:",
        "createacct-yourpasswordagain": "Шолыпмутым пеҥгыдемде",
        "createacct-yourpasswordagain-ph": "Шолыпмутым угыч пурто",
-       "remembermypassword": "Тиде компьютерыште мыйым шарнаш (эн шуко $1 {{PLURAL:$1|1=кечылан|кечылан}})",
        "yourdomainname": "Тендан домен:",
        "login": "Шке денет палдаре",
        "nav-login-createaccount": "Пураш/Регистрацийым эрте",
        "preview": "Ончылгоч ончымаш",
        "showpreview": "Ончылгоч ончымаш",
        "showdiff": "Тӧрлатымашым ончыкташ",
-       "anoneditwarning": "'''Тӱткӧ лий:''': Тый авторизацийым эртен отыл. Тыйын IP-адресет лаштыкын вашталтымаш эртымгорныштыжо возалт кодеш.",
+       "anoneditwarning": "'''Тӱткӧ лий:''': Тый авторизацийым эртен отыл. Тыйын IP-адресет лаштыкын вашталтымаш историйыштыже возалт кодеш. Шке лӱмет ден пурет але регистрацийым эртет гын, шкаланет пашам ышташ йӧнлырак лиеш.",
        "summary-preview": "Тӧрлатымаш нерген ончылгоч ончымаш:",
        "accmailtitle": "Шолыпмут колтымо.",
        "newarticle": "(У)",
        "newarticletext": "Тыгай лӱман лаштык уке.\nЛаштыкым ышташлан ӱлнӧ возаш тӱҥал (сайынрак палашлан [$1 полшыкым] ончал).\nТый тышке йонгылыш логалынат гын, браузерыште '''шенгек''' полдышым темдал.",
-       "noarticletext": "Ð\9aÑ\8bзÑ\8bÑ\82Ñ\81е Ð¶Ð°Ð¿Ð»Ð°Ð½ Ñ\82иде Ð»Ð°Ñ\88Ñ\82Ñ\8bкÑ\8bÑ\88Ñ\82е Ð½Ð¸Ð¼Ð¾Ð¼ Ð²Ð¾Ð·Ñ\8bмо Ð¾Ð³Ñ\8bл.\nТÑ\8bй Ñ\82иде Ð»Ð°Ñ\88Ñ\82Ñ\8bкÑ\8bн Ð»Ó±Ð¼Ð¶Ñ\8bм Ð²ÐµÑ\81 Ð»Ð°Ñ\88Ñ\82Ñ\8bк-влакÑ\8bÑ\88Ñ\82е [[Special:Search/{{PAGENAME}}|кÑ\8bÑ\87алÑ\8bн]] ÐºÐµÑ\80Ñ\82аÑ\82, Ð°Ð»Ðµ <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} Ð¶Ñ\83Ñ\80нал-влакÑ\8bÑ\88Ñ\82е ÐºÑ\8bÑ\87алÑ\8bн] ÐºÐµÑ\80Ñ\82аÑ\82, Ð°Ð»Ðµ [{{fullurl:{{FULLPAGENAME}}|action=edit}} Ñ\82Ñ\8bгай Ð»Ó±Ð¼Ð°Ð½ Ð»Ð°Ñ\88Ñ\82Ñ\8bкÑ\8bм Ñ\8bÑ\88Ñ\82аÑ\88] кертат</span>.",
+       "noarticletext": "Ð\9aÑ\8bзÑ\8bÑ\82Ñ\81е Ð¶Ð°Ð¿Ð»Ð°Ð½ Ñ\82иде Ð»Ð°Ñ\88Ñ\82Ñ\8bкÑ\8bÑ\88Ñ\82е Ð½Ð¸Ð¼Ð¾Ð¼ Ð²Ð¾Ð·Ñ\8bмо Ð¾Ð³Ñ\8bл.\nТÑ\8bй Ñ\82иде Ð»Ð°Ñ\88Ñ\82Ñ\8bкÑ\8bн Ð»Ó±Ð¼Ð¶Ñ\8bм Ð²ÐµÑ\81 Ð»Ð°Ñ\88Ñ\82Ñ\8bк-влакÑ\8bÑ\88Ñ\82е [[Special:Search/{{PAGENAME}}|кÑ\8bÑ\87алÑ\8bн]] ÐºÐµÑ\80Ñ\82аÑ\82, Ð°Ð»Ðµ <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} Ð¶Ñ\83Ñ\80нал-влакÑ\8bÑ\88Ñ\82е ÐºÑ\8bÑ\87алÑ\8bн] ÐºÐµÑ\80Ñ\82аÑ\82, Ð°Ð»Ðµ [{{fullurl:{{FULLPAGENAME}}|action=edit}} Ñ\82Ñ\8bгай Ð»Ó±Ð¼Ð°Ð½ Ð»Ð°Ñ\88Ñ\82Ñ\8bкÑ\8bм Ñ\8bÑ\88Ñ\82ен] кертат</span>.",
        "clearyourcache": "'''Замечание.''' Возможно, после сохранения вам придётся очистить кэш своего браузера, чтобы увидеть изменения.\n* '''Firefox / Safari:''' Удерживая клавишу ''Shift'', нажмите на панели инструментов ''Обновить'' либо нажмите ''Ctrl-F5'' или ''Ctrl-R'' (''⌘-R'' на Mac)\n* '''Google Chrome:''' Нажмите ''Ctrl-Shift-R'' (''⌘-Shift-R'' на Mac)\n* '''Internet Explorer:''' Удерживая ''Ctrl'', нажмите ''Обновить'' либо нажмите ''Ctrl-F5''\n* '''Opera:''' Выберите очистку кэша в меню ''Инструменты → Настройки''",
        "previewnote": "'''Тиде ончылгоч ончымаш гына;\nвашталтыш-влакым эше аралыме огыл!'''",
        "editing": "Тӧрлаталтеш $1",
        "templatesusedpreview": "Тиде лаштыкыште кучылтмо {{PLURAL:$1|1=ямыдылык|ямдылык-влак}}:",
        "template-protected": "(тӧрлаташ чарыме)",
        "template-semiprotected": "(верын аралыме)",
-       "hiddencategories": "Тиде лаштык $1 {{PLURAL:$1|1=шылтыме категорийыш|шылтыме категорийыш}} лектеш:",
-       "permissionserrorstext-withaction": "Тыйын '''$2''' кертмашет шагал. Тиде {{PLURAL:$1|1=амал ден|амал дене}}:",
+       "hiddencategories": "Тиде лаштык $1 {{PLURAL:$1|1=шылтыме категорий-влак}} радамыш пура:",
+       "permissionserrorstext-withaction": "'''$2''' пашам ыштен от керт. {{PLURAL:$1|1=Амалже}} тыгай:",
        "recreate-moveddeleted-warn": "'''Йолташ, тиде лаштыкым тиддеч ончыч шӧреныт.''' Тудым илаҥдарыме деч ончыч, тыгай лаштык кӱлешак мо - тергыман. Ӱлнырак шӧрымаш да лӱм вашталтымаш журнал-влакым шергал лекташ лиеш.",
        "moveddeleted-notice": "Тиде лаштык шӧралтын.\nЛаштыклан шӧрымӧ да кусарыме нерген журнал ӱлнӧ ончыктымо.",
        "viewpagelogs": "Тиде лаштыклан журнал-влакым ончыкташ",
        "currentrev": "Кызытсе версий",
        "currentrev-asof": "$1 кызытсе версий",
        "revisionasof": "$1 версий",
-       "revision-info": "$1; $2 деч версий",
+       "revision-info": "$1 деч версий; {{GENDER:$6|$2}}$7",
        "previousrevision": "← Ончычсо версий",
        "nextrevision": "Весе →",
        "currentrevisionlink": "Кызытсе",
        "prevn": "кодшо {{PLURAL:$1|$1}}",
        "nextn": "весе {{PLURAL:$1|$1}}",
        "prevn-title": "Кодшо $1 {{PLURAL:$1|результат}}",
-       "nextn-title": "Ð\92еÑ\81е $1 {{PLURAL:$1|лекÑ\82Ñ\8bÑ\88|лекÑ\82Ñ\8bÑ\88}}",
-       "shown-title": "Лаштыкыште $1 {{PLURAL:$1|1=возымаш|возымашым}} ончыкташ",
+       "nextn-title": "ЭÑ\88е $1 {{PLURAL:$1|лаÑ\88Ñ\82Ñ\8bкÑ\8bм}}",
+       "shown-title": "Лаштыкыште $1 {{PLURAL:$1|1=возымашым}} ончыкташ",
        "viewprevnext": "Ончал ($1 {{int:pipe-separator}} $2) ($3)",
-       "searchmenu-new": "'''Тиде вики-проектыште «[[:$1]]» лӱман лаштыкым ышташ!'''",
+       "searchmenu-new": "<strong>'''Тиде вики-проектыште «[[:$1]]» лӱман лаштыкым ышташ!'''</strong>\n{{PLURAL:$2|0=|Тыйын йодмет почеш кычалын муымо лаштыкым ончал.}}",
        "searchprofile-articles": "Возымо лаштык-влак",
        "searchprofile-images": "Мультимедий",
        "searchprofile-everything": "Чыла",
        "searchprofile-advanced-tooltip": "Искать в заданных пространствах имён",
        "search-result-size": "$1 ({{PLURAL:$2|1 мут|$2 мут}})",
        "search-result-category-size": "$1 {{PLURAL:$1|вхождение|вхождения|вхождений}} ($2 {{PLURAL:$2|подкатегория|подкатегории|подкатегорий}}, $3 {{PLURAL:$3|файл|файла|файлов}}).",
-       "search-redirect": "($1 Ð²ÐµÑ\81 Ð²ÐµÑ\80е ÐºÐ¾Ð»Ñ\82Ñ\8bмаÑ\88)",
+       "search-redirect": "($1 Ð³Ñ\8bÑ\87 ÐºÐ¾Ð»Ñ\82Ñ\8bмо)",
        "search-section": "(ужаш $1)",
        "search-suggest": "Але те $1 возынеда ыле",
        "search-interwiki-caption": "Родо проект-влак",
        "recentchanges-label-bot": "Тиде тӧрлатымашым бот ыштен",
        "recentchanges-label-unpatrolled": "Тиде тӧрлатымашым нигӧ терген огыл",
        "recentchanges-legend-heading": "<strong>Легенде:</strong>",
-       "recentchanges-legend-newpage": "$1 - у лаштык",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (тыгак [[Special:NewPages|у лаштык-влак лӱмерым]] ончо)",
        "rcnotefrom": "Ниже перечислены изменения с '''$2''' (не более '''$1''').",
        "rclistfrom": "$3 $2 гыч тӱҥалын у вашталтымашым ончыкташ",
        "rcshowhideminor": "Изи тӧрлатымашым $1",
        "rcshowhideminor-hide": "шылташ",
        "rcshowhidebots": "Бот-влакым $1",
        "rcshowhidebots-show": "ончыкташ",
-       "rcshowhideliu": "Шолып пайдаланыше-влакым $1",
+       "rcshowhideliu": "$1 шолып пайдаланыше",
        "rcshowhideliu-hide": "шылташ",
        "rcshowhideanons": "Ончыкталтше пайдаланыше-влакым $1",
        "rcshowhideanons-hide": "шылташ",
        "filehist-filesize": "Файлын кугытшо",
        "filehist-comment": "Файл нерген:",
        "imagelinks": "Файлым кучылтмаш",
-       "linkstoimage": "Тиде {{PLURAL:$1|1=$1 лаштык саде файл дене кылдалтын|$1 лаштык-влак саде файл дене кылдалтыныт}}:",
+       "linkstoimage": "Тиде {{PLURAL:$1|1=$1 лаштык саде файл дене кылдалтын}}:",
        "nolinkstoimage": "Тиде файл дене кылдалтше ик лаштыкат уке.",
        "sharedupload": "Тиде файлын верже: $1, туге гынат, тудым моло веренат кучылташ лиеш.",
        "uploadnewversion-linktext": "Тиде файлын у версийжым пурташ",
        "brokenredirects-edit": "тӧрлаташ",
        "brokenredirects-delete": "шӧраш",
        "withoutinterwiki-submit": "ончыкташ",
-       "nbytes": "$1 {{PLURAL:$1|байт|байт}}",
-       "nmembers": "$1 {{PLURAL:$1|1=лаштык|лаштык-влак}}",
+       "nbytes": "$1 {{PLURAL:$1|байт}}",
+       "nmembers": "$1 {{PLURAL:$1|1=лаштык}}",
        "lonelypages": "Тулык лаштык-влак",
        "wantedcategories": "Ыштыман категорий-влак",
        "wantedpages": "Ыштышаш лаштык-влак",
        "whatlinkshere-next": "{{PLURAL:$1|вес|$1 вес}}",
        "whatlinkshere-links": "← кылвер-влак",
        "whatlinkshere-hideredirs": "вес вере колтымаш-влакым $1",
-       "whatlinkshere-hidetrans": "пуртымашым $1",
-       "whatlinkshere-hidelinks": "кылвер-влакым $1",
+       "whatlinkshere-hidetrans": "$1 пуртымаш",
+       "whatlinkshere-hidelinks": "$1 кылвер",
        "whatlinkshere-hideimages": "сӱрет деке кылвер-влакым $1",
        "whatlinkshere-filters": "Фильтр-влак",
        "blockip": "Пайдаланышылан йӧным петыраш",
        "allmessages-filter-all": "Чыла",
        "thumbnail-more": "Кугемдаш",
        "thumbnail_error": "Изи сӱретым ыштыме годым йоҥылыш: $1",
-       "tooltip-pt-userpage": "Тыйын лаштыкет",
-       "tooltip-pt-mytalk": "Тыйын каҥашымаш лаштыкет",
-       "tooltip-pt-preferences": "Мыйын келыштарымашем",
+       "tooltip-pt-userpage": "{{GENDER:|Тыйын}} лаштыкет",
+       "tooltip-pt-mytalk": "{{GENDER:|Тыйын}} каҥашымаш лаштыкет",
+       "tooltip-pt-preferences": "{{GENDER:|Тыйын}} келыштарымашет",
        "tooltip-pt-watchlist": "Мыйын эскерыме лаштык-влак лӱмер",
-       "tooltip-pt-mycontris": "Тыйын пашатым эскерыме лаштык",
+       "tooltip-pt-mycontris": "{{GENDER:|Тыйын}} пашатым эскерыме лаштык",
        "tooltip-pt-login": "Тыште регистрацийым эртен кертат. Регистраций деч поснаат пашам ышташ лиеш.",
        "tooltip-pt-logout": "Системе гыч лекташ",
+       "tooltip-pt-createaccount": "Ме тыланда регистрацийым эрташ да системыш пураш темлена.",
        "tooltip-ca-talk": "Лаштыкыште возымым каҥашаш",
-       "tooltip-ca-edit": "Тый тиде лаштыкым тӧрлатен кертат. Лаштыкым аралыме деч ончыч тудым тергаш ит мондо.",
+       "tooltip-ca-edit": "Тиде лаштыкым тӧрлаташ",
        "tooltip-ca-addsection": "У ужашым тӱҥалаш",
        "tooltip-ca-viewsource": "Тиде лаштыкым аралыме.\nТый тудын тӱҥалтыш текстшым ончалын кертат.",
        "tooltip-ca-history": "Лаштыкын ондаксе тӧрлатымаш",
        "tooltip-t-recentchangeslinked": "Тиде лаштык дене кылдалтше пытартыш тӧрлатымаш-влак",
        "tooltip-feed-rss": "Тиде лаштыклан RSS-кыл",
        "tooltip-feed-atom": "Тиде лаштыклан Atom-кыл",
-       "tooltip-t-contributions": "Пайдаланышын ыштыме пашажым ончалаш",
+       "tooltip-t-contributions": "{{GENDER:$1|Пайдаланышын ыштыме пашажым}} ончалаш",
        "tooltip-t-emailuser": "Тиде пайдаланышылан электрон серышым возаш",
        "tooltip-t-upload": "Файл-влакым пурташ",
        "tooltip-t-specialpages": "Лӱмын ыштыме лаштык-влак",
        "tooltip-t-permalink": "Тиде лашткыш кондышо кылвер (ссылка)",
        "tooltip-ca-nstab-main": "Лаштыкыште возымым ончыкташ",
        "tooltip-ca-nstab-user": "Пайдаланышын лаштыкшым ончалаш",
-       "tooltip-ca-nstab-special": "Тиде лӱмын ыштыме лаштык, тудым тый тӧрлатен от керт",
+       "tooltip-ca-nstab-special": "Тиде спецлаштык, тый тудым тӧрлатен от керт",
        "tooltip-ca-nstab-project": "Проект нерген лаштыкым ончыкташ",
        "tooltip-ca-nstab-image": "Файлын лаштыкшым ончалаш",
        "tooltip-ca-nstab-template": "Ямдылыкым ончыкташ",
        "tooltip-watch": "Тиде лаштыкым эскерымаш лаштыкышкет ешараш",
        "tooltip-rollback": "\"Пӧртылаш\" ик темдалтыш дене пытартыш пайдаланышын тӧрлатымашым мӧҥгешла пӧртылеш",
        "tooltip-undo": "\"Чараш\" тиде тӧрлатымашым мӧҥгешла пӧртыла да ончылгоч ончымашым почеш.\nТый тӧрлатымаш амалже нерген возымо верыште  возын кертат.",
+       "pageinfo-toolboxlink": "Лаштык нерген",
        "previousdiff": "← Ончычсо тӧрлатымаш-влак",
        "nextdiff": "Вес тӧрлатымаш →",
        "widthheightpage": "$1 × $2, $3 {{PLURAL:$3|1=лаштык|лаштык}}",
        "file-info-size": "$1 × $2 пиксел, файлын кугытшо: $3, MIME-тип: $4",
        "file-nohires": "Кугурак чаплык уке.",
        "svg-long-desc": "SVG файл, шкенжын кугытшо: $1 × $2 пиксел, файлын кугытшо: $3",
-       "show-big-image": "ШкенжÑ\8bн Ñ\87аплÑ\8bкÑ\88е",
+       "show-big-image": "ТӱҥалÑ\82Ñ\8bÑ\88 Ñ\84айл",
        "show-big-image-size": "$1 × $2 пиксел",
        "newimages-legend": "Фильтр",
        "ilsubmit": "Кычал",
index 7f522e6..eb5a34a 100644 (file)
@@ -47,7 +47,7 @@
        "tog-enotifminoredits": "Испраќај ми е-пошта и за ситни промени во страниците и податотеките",
        "tog-enotifrevealaddr": "Откриј ја мојата е-поштенска адреса во пораките за известување",
        "tog-shownumberswatching": "Прикажи го бројот на корисници кои набљудуваат",
-       "tog-oldsig": "Ð\9fостоечки потпис:",
+       "tog-oldsig": "Ð\92аÑ\88иоÑ\82 Ð¿остоечки потпис:",
        "tog-fancysig": "Сметај го потписот за викитекст (без автоматска врска)",
        "tog-uselivepreview": "Користи преглед во живо",
        "tog-forceeditsummary": "Извести ме кога нема опис на промените",
        "newwindow": "(се отвора во нов прозорец)",
        "cancel": "Откажи",
        "moredotdotdot": "Повеќе...",
-       "morenotlisted": "Ð\9eвоÑ\98 Ñ\81пиÑ\81ок Ð½Ðµ Ðµ целосен.",
+       "morenotlisted": "Ð\9eвоÑ\98 Ñ\81пиÑ\81ок Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ðµ Ð½Ðµцелосен.",
        "mypage": "Страница",
        "mytalk": "разговор",
        "anontalk": "Разговор",
        "talk": "Разговор",
        "views": "Посети",
        "toolbox": "Алатки",
+       "tool-link-userrights": "Смени ги {{GENDER:$1|корисничките}} групи",
+       "tool-link-emailuser": "Испрати е-пошта на {{GENDER:$1|корисников}}",
        "userpage": "Преглед на корисничката страница",
        "projectpage": "Преглед на проектната страница",
        "imagepage": "Преглед на страницата на податотеката",
        "eauthentsent": "На назначената адреса е испратена потврдна порака.\nПред да се испрати друга порака на корисничката сметка, ќе морате да ги проследите напатствијата во пораката, за да потврдите дека таа корисничка сметка е навистина ваша.",
        "throttled-mailpassword": "Веќе е испратена порака за измена на лозинката во {{PLURAL:$1|изминатиов час|изминативе $1 часа}}.\nЗа да се спречи злоупотреба, само едно потсетување може да се праќа на {{PLURAL:$1|секој час|секои $1 часа}}.",
        "mailerror": "Грешка при испраќање на е-поштата: $1",
-       "acct_creation_throttle_hit": "Ð\9aоÑ\80иÑ\81ниÑ\86и Ð½Ð° Ð¾Ð²Ð° Ð²Ð¸ÐºÐ¸ ÐºÐ¾Ñ\80иÑ\81Ñ\82еÑ\98Ñ\9cи Ñ\98а Ð²Ð°Ñ\88аÑ\82а IP-адÑ\80еÑ\81а Ñ\81оздале {{PLURAL:$1|1 ÐºÐ¾Ñ\80иÑ\81ниÑ\87ка Ñ\81меÑ\82ка|$1 ÐºÐ¾Ñ\80иÑ\81ниÑ\87ки Ñ\81меÑ\82ки}} Ð²Ð¾ Ð¿Ð¾Ñ\81ледниве Ð´ÐµÐ½Ð¾Ð²Ð¸, при што е достигнат максималниот број на кориснички сметки предвиден и овозможен за овој период.\nКако резултат на ова, посетителите кои ја користат оваа IP-адреса во моментов нема да можат да создаваат нови сметки.",
+       "acct_creation_throttle_hit": "Ð\9fоÑ\81еÑ\82иÑ\82ели Ð½Ð° Ð¾Ð²Ð° Ð²Ð¸ÐºÐ¸ ÐºÐ¾Ñ\80иÑ\81Ñ\82еÑ\98Ñ\9cи Ñ\98а Ð²Ð°Ñ\88аÑ\82а IP-адÑ\80еÑ\81а Ñ\81оздале {{PLURAL:$1|1 Ñ\81меÑ\82ка|$1 Ñ\81меÑ\82ки}} Ð²Ð¾ Ð¿Ð¾Ñ\81ледниве $2, при што е достигнат максималниот број на кориснички сметки предвиден и овозможен за овој период.\nКако резултат на ова, посетителите кои ја користат оваа IP-адреса во моментов нема да можат да создаваат нови сметки.",
        "emailauthenticated": "Вашата е-пошта адреса е потврдена на $2 во $3 ч.",
        "emailnotauthenticated": "Вашата е-поштенска адреса сè уште не е потврдена.\nНема да биде испратена е-пошта во ниту еден од следниве случаи.",
        "noemailprefs": "Наведете е-поштенска адреса за да функционираат следниве својства.",
        "botpasswords-label-resetpassword": "Ставете нова лозинка",
        "botpasswords-label-grants": "Применливи доделувања:",
        "botpasswords-help-grants": "Секое доделување дава пристап до список до наведени права што веќе ги има корисничката сметка. Повеќе ќе најдете на [[Special:ListGrants|табелата со доделувања]].",
-       "botpasswords-label-restrictions": "Ограничувања на употребата:",
        "botpasswords-label-grants-column": "Доделено",
        "botpasswords-bad-appid": "Името на ботот „$1“ е неважечко.",
        "botpasswords-insert-failed": "Не успеав да го додадам името на ботот „$1“. Да не е веќе додадено?",
        "passwordreset-emailelement": "Корисничко име: \n$1\n\nПривремена лозинка: \n$2",
        "passwordreset-emailsentemail": "Ако ова е регистрираната е-пошта поврзана со вашата сметка, тогаш ќе ви биде испратено писмо за задавање на нова лозинка.",
        "passwordreset-emailsentusername": "Ако има соодветна регистрирана е-пошта поврзана со ова корисничко име, тогаш ќе ви биде испратена порака за промена на лозинката.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Ð\95-поÑ\88Ñ\82аÑ\82а Ð·Ð° Ð·Ð°Ð´Ð°Ð²Ð°Ñ\9aе Ð½Ð° Ð½Ð¾Ð²Ð° Ð»Ð¾Ð·Ð¸Ð½ÐºÐ°|Ð\95-поÑ\88Ñ\82аÑ\82а Ð·Ð° Ð·Ð°Ð´Ð°Ð²Ð°Ñ\9aе Ð½Ð° Ð½Ð¾Ð²Ð¸ Ð»Ð¾Ð·Ð¸Ð½ÐºÐ¸}} Ðµ Ð¸Ñ\81пÑ\80аÑ\82ена. Ð\9fодолÑ\83 е {{PLURAL:$1|е прикажано корисничкото име и лозинката|прикажан список на кориснички имиња и лозинки}}.",
-       "passwordreset-emailerror-capture2": "Ð\98Ñ\81пÑ\80аÑ\9cаÑ\9aеÑ\82о Ðµ-поÑ\88Ñ\82а Ð½Ð° {{GENDER:$2|коÑ\80иÑ\81никоÑ\82}} Ð½Ðµ Ñ\83Ñ\81пеа: $1 Ð\9fодолÑ\83 е {{PLURAL:$3|прикажано корисничкото име и лозинката|прикажан список на кориснички имиња и лозинки}}.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Ð\95-поÑ\88Ñ\82аÑ\82а Ð·Ð° Ð·Ð°Ð´Ð°Ð²Ð°Ñ\9aе Ð½Ð° Ð½Ð¾Ð²Ð° Ð»Ð¾Ð·Ð¸Ð½ÐºÐ°|Ð\95-поÑ\88Ñ\82аÑ\82а Ð·Ð° Ð·Ð°Ð´Ð°Ð²Ð°Ñ\9aе Ð½Ð° Ð½Ð¾Ð²Ð¸ Ð»Ð¾Ð·Ð¸Ð½ÐºÐ¸}} Ðµ Ð¸Ñ\81пÑ\80аÑ\82ена. Ð¢Ñ\83ка е {{PLURAL:$1|е прикажано корисничкото име и лозинката|прикажан список на кориснички имиња и лозинки}}.",
+       "passwordreset-emailerror-capture2": "Ð\98Ñ\81пÑ\80аÑ\9cаÑ\9aеÑ\82о Ðµ-поÑ\88Ñ\82а Ð½Ð° {{GENDER:$2|коÑ\80иÑ\81никоÑ\82}} Ð½Ðµ Ñ\83Ñ\81пеа: $1 Ð¢Ñ\83ка е {{PLURAL:$3|прикажано корисничкото име и лозинката|прикажан список на кориснички имиња и лозинки}}.",
        "passwordreset-nocaller": "Мора да се укаже повикувач",
        "passwordreset-nosuchcaller": "Повикувачот не постои: $1",
        "passwordreset-ignored": "Менувањето на лозинката не успеа. Можеби не е поставен услужник?",
        "page_first": "прв",
        "page_last": "последен",
        "histlegend": "Разлика помеѓу преработките: Означете ги преработките што сакате да ги споредите и притиснете на Enter или копчето на дното од страницата.<br />\nЛегенда: '''({{int:cur}})''' = разлика со последна преработка, '''({{int:last}})''' = разлика со претходна преработка, '''{{int:minoreditletter}}''' = ситна промена.",
-       "history-fieldset-title": "Ð\9fÑ\80елиÑ\81Ñ\82Ñ\83ваÑ\9aе Ð½Ð° Ð¸Ñ\81Ñ\82оÑ\80иÑ\98а",
+       "history-fieldset-title": "Ð\9fÑ\80еглед Ð½Ð° Ð¸Ñ\81Ñ\82оÑ\80иÑ\98аÑ\82а",
        "history-show-deleted": "Само избришани",
        "histfirst": "најстари",
        "histlast": "најнови",
        "searchprofile-advanced-tooltip": "Пребарување во именски простори по избор",
        "search-result-size": "$1 ({{PLURAL:$2|еден збор|$2 збора}})",
        "search-result-category-size": "{{PLURAL:$1|1 член|$1 членови}} ({{PLURAL:$2|1 поткатегорија|$2 поткатегории}}, {{PLURAL:$3|1 податотека|$3 податотеки}})",
-       "search-redirect": "(пренасочување $1)",
+       "search-redirect": "(пренасочување од $1)",
        "search-section": "(пасус $1)",
        "search-category": "(категорија $1)",
        "search-file-match": "(се совпаѓа со содржината на податотеката)",
        "grant-basic": "Основни права",
        "grant-viewdeleted": "Преглед на избришани податотеки и страници",
        "grant-viewmywatchlist": "Преглед на вашите набљудувања",
+       "grant-viewrestrictedlogs": "Погл. ограничени дневнички ставки",
        "newuserlogpage": "Дневник на регистрирања на корисници",
        "newuserlogpagetext": "Ова е дневник на регистрирани корисници.",
        "rightslog": "Дневник на корисничките права",
        "upload-dialog-disabled": "Подигањето на податотеки со помош на овој дијалог е оневозможено на ова вики.",
        "upload-dialog-title": "Подигни податотека",
        "upload-dialog-button-cancel": "Откажи",
+       "upload-dialog-button-back": "Назад",
        "upload-dialog-button-done": "Готово",
        "upload-dialog-button-save": "Зачувај",
        "upload-dialog-button-upload": "Подигни",
        "apisandbox-results-fixtoken-fail": "Не успеав да ја добијам шифрата „$1“.",
        "apisandbox-alert-page": "Полињата на страницава се неважечки.",
        "apisandbox-alert-field": "Вредноста на полево е неважечка.",
+       "apisandbox-continue": "Продолжи",
+       "apisandbox-continue-clear": "Исчисти",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} ќе [https://www.mediawiki.org/wiki/API:Query#Continuing_queries продолжи] со последното барање; „{{int:apisandbox-continue-clear}}“ ќе ги исчисти параметрите поврзани со продолжување.",
        "booksources": "Печатени извори",
        "booksources-search-legend": "Пребарување на извори за книга",
        "booksources-isbn": "ISBN:",
        "sp-contributions-newbies-title": "Придонеси на нови корисници",
        "sp-contributions-blocklog": "Дневник на блокирања",
        "sp-contributions-suppresslog": "притаени придонесите на {{GENDER:$1|корисникот|корисничката}}",
-       "sp-contributions-deleted": "избришани придонесите на {{GENDER:$1|корисникот|корисничката}}",
+       "sp-contributions-deleted": "избришани придонеси на {{GENDER:$1|корисникот}}",
        "sp-contributions-uploads": "подигања",
        "sp-contributions-logs": "дневници",
        "sp-contributions-talk": "разговор",
        "movelogpagetext": "Подолу е наведен список на преместени страници.",
        "movesubpage": "{{PLURAL:$1|Потстраница|Потстраници}}",
        "movesubpagetext": "Оваа страница има $1 {{PLURAL:$1|потстраница прикажана|потстраници прикажани}} подолу.",
+       "movesubpagetalktext": "Оваа страница има $1 {{PLURAL:$1|потстраница прикажана|потстраници прикажани}} подолу.",
        "movenosubpage": "Оваа страница нема потстраници.",
        "movereason": "Причина:",
        "revertmove": "врати",
        "pageinfo-category-pages": "Број на страници",
        "pageinfo-category-subcats": "Број на поткатегории",
        "pageinfo-category-files": "Број на податотеки",
+       "pageinfo-user-id": "Корисничка назнака",
        "markaspatrolleddiff": "Означи како проверена верзија",
        "markaspatrolledtext": "Означи ја верзијата како проверена",
        "markaspatrolledtext-file": "Означи ја верзијава како испатролирана",
        "newimages-showbots": "Прикажувај подигања од ботови",
        "newimages-hidepatrolled": "Сокриј испатролриани подигања",
        "noimages": "Нема ништо.",
+       "gallery-slideshow-toggle": "Преод на минијатури",
        "ilsubmit": "Барај",
        "bydate": "по датум",
        "sp-newimages-showfrom": "Прикажи нови податотеки од $2, $1",
        "htmlform-cloner-create": "Додај уште",
        "htmlform-cloner-delete": "Отстрани",
        "htmlform-cloner-required": "Се бара барем една вредност.",
+       "htmlform-date-placeholder": "ГГГГ-ММ-ДД",
+       "htmlform-time-placeholder": "ЧЧ:ММ:СС",
+       "htmlform-datetime-placeholder": "ГГГГ-ММ-ДД ЧЧ:ММ:СС",
+       "htmlform-date-invalid": "Не можам да ја препознаам внесената вредност. Користете го форматот ГГГГ-ММ-ДД.",
+       "htmlform-time-invalid": "Не можам да ја препознаам внесената вредност за време. Користете го форматот ЧЧ:ММ:СС.",
+       "htmlform-datetime-invalid": "Не можам да ја препознаам внесената вредност за датум и време. Користете го форматот ГГГГ-ММ-ДД ММ:СС.",
+       "htmlform-date-toolow": "Укажаната вредност е пред најраниот допуштен датум — $1.",
+       "htmlform-date-toohigh": "Укажаната вредност е по најдоцниот допуштен датум — $1.",
+       "htmlform-time-toolow": "Укажаната вредност е пред најраното допуштено време — $1.",
+       "htmlform-time-toohigh": "Укажаната вредност е по најдоцното допуштено време — $1.",
+       "htmlform-datetime-toolow": "Укажаната вредност е пред најраниот допуштен датум и време — $1.",
+       "htmlform-datetime-toohigh": "Укажаната вредност е по најдоцниот допуштен датум и време — $1.",
        "htmlform-title-badnamespace": "[[:$1]] не се наоѓа во именскиот простор „{{ns:$2}}“.",
        "htmlform-title-not-creatable": "Насловот „$1“ не може да се создава",
        "htmlform-title-not-exists": "$1 не постои.",
        "htmlform-user-not-exists": "<strong>$1</strong> не постои.",
        "htmlform-user-not-valid": "<strong>$1</strong> не претставува важечко корисничко име.",
-       "sqlite-has-fts": "$1 со поддршка за пребарување по цели текстови",
-       "sqlite-no-fts": "$1 без поддршка за пребарување по цели текстови",
        "logentry-delete-delete": "$1 {{GENDER:$2|ја избриша}} страницата $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|ја возобнови}} страницата $3",
        "logentry-delete-event": "$1 {{GENDER:$2|ја измени}} видливоста на {{PLURAL:$5|настан во дневникот|$5 настани во дневникот}} на $3: $4",
        "feedback-external-bug-report-button": "Поднеси техничка задача",
        "feedback-dialog-title": "Поднеси мислење",
        "feedback-dialog-intro": "Послужете се со едноставниот образец подолу за да го поднесете вашето мислење. Коментарот ќе ви биде додаден на страницата „$1“, заедно со вашето корисничко име.",
-       "feedback-error-title": "Грешка",
        "feedback-error1": "Грешка: Непрепознаен резултат од извршникот",
        "feedback-error2": "Грешка: Уредувањето не успеа",
        "feedback-error3": "Грешка: Извршникот не одговара",
        "feedback-thanks": "Благодариме! Вашиот одѕив е објавен на страницата „[$2 $1]“.",
        "feedback-thanks-title": "Ви благодариме!",
        "feedback-useragent": "Кориснички вршител:",
-       "searchsuggest-search": "Пребарување",
+       "searchsuggest-search": "Пребарајте по {{SITENAME}}",
        "searchsuggest-containing": "содржи...",
        "api-error-autoblocked": "Вашата IP-адреса е автоматски блокирана бидејќи ја има користено блокиран корисник.",
        "api-error-badaccess-groups": "Не ви е дозволено да подигате податотеки на ова вики.",
        "unlinkaccounts-success": "Сметката е одврзана.",
        "authenticationdatachange-ignored": "Промената на податоците во заверката не е обработена. Можеби не е поставен услужник?",
        "userjsispublic": "Напомена: потстраниците со JavaScript не треба да содржат дсоверливи податоци бидејќи истите се видливи и за други корисници.",
-       "usercssispublic": "Напомена: потстраниците со CSS не треба да содржат дсоверливи податоци бидејќи истите се видливи и за други корисници."
+       "usercssispublic": "Напомена: потстраниците со CSS не треба да содржат дсоверливи податоци бидејќи истите се видливи и за други корисници.",
+       "restrictionsfield-badip": "Неважечки IP-дијапазон на адреси: $1",
+       "restrictionsfield-label": "Допуштени IP-опсези:",
+       "restrictionsfield-help": "Една IP-адреса или CIDR-опсег по ред. За да овозможите сè, користете<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Грешка: $1",
+       "edit-error-long": "Грешки:\n\n$1"
 }
index 389d307..022f07f 100644 (file)
@@ -57,7 +57,7 @@
        "tog-enotifminoredits": "ചെറുതിരുത്തുകൾക്കും എനിക്ക് ഇമെയിൽ അയയ്ക്കുക",
        "tog-enotifrevealaddr": "അറിയിപ്പ് മെയിലുകളിൽ എന്റെ ഇമെയിൽ വിലാസം വെളിവാക്കാൻ അനുവദിക്കുക",
        "tog-shownumberswatching": "ശ്രദ്ധിക്കുന്ന ഉപയോക്താക്കളുടെ എണ്ണം കാണിക്കുക",
-       "tog-oldsig": "നിലവിലുള്ള ഒപ്പ്:",
+       "tog-oldsig": "താà´\99àµ\8dà´\95à´³àµ\81à´\9fàµ\86 à´¨à´¿à´²à´µà´¿à´²àµ\81à´³àµ\8dà´³ à´\92à´ªàµ\8dà´ªàµ\8d:",
        "tog-fancysig": "ഒപ്പ് ഒരു വിക്കി എഴുത്തായി പരിഗണിക്കുക (കണ്ണി സ്വയം ചേർക്കേണ്ടതില്ല)",
        "tog-uselivepreview": "തത്സമയ പ്രിവ്യൂ ഉപയോഗപ്പെടുത്തുക",
        "tog-forceeditsummary": "തിരുത്തുകളുടെ ചുരുക്കം നൽകിയില്ലെങ്കിൽ എന്നെ ഓർമ്മിപ്പിക്കുക",
        "yourpasswordagain": "രഹസ്യവാക്ക് ഒരിക്കൽക്കൂടി:",
        "createacct-yourpasswordagain": "രഹസ്യവാക്ക് സ്ഥിരീകരിക്കുക",
        "createacct-yourpasswordagain-ph": "രഹസ്യവാക്ക് വീണ്ടും നൽകുക",
-       "remembermypassword": "എന്റെ പ്രവേശനം ഈ ബ്രൗസറിൽ ({{PLURAL:$1|ഒരു ദിവസം|$1 ദിവസം}}) ഓർത്തുവെക്കുക",
        "userlogin-remembermypassword": "ഞാൻ പ്രവേശിച്ചതായിത്തന്നെ ഓർത്തിരിക്കുക",
        "userlogin-signwithsecure": "സുരക്ഷിത കണക്ഷൻ ഉപയോഗിക്കുക",
        "cannotloginnow-title": "ഇപ്പോൾ പ്രവേശിക്കാൻ കഴിയില്ല",
        "botpasswords-label-delete": "മായ്ക്കുക",
        "botpasswords-label-resetpassword": "രഹസ്യവാക്ക് പുനഃക്രമീകരിക്കുക",
        "botpasswords-label-grants": "ബാധകമായ അനുമതികൾ:",
-       "botpasswords-label-restrictions": "ഉപയോഗത്തിന്റെ പരിമിതപ്പെടുത്തലുകൾ:",
        "botpasswords-label-grants-column": "അനുവദിച്ചിരിക്കുന്നവ",
        "resetpass_forbidden": "രഹസ്യവാക്കുകൾ മാറ്റുന്നത് അനുവദിക്കുന്നില്ല",
        "resetpass-no-info": "ഈ താൾ നേരിട്ടു കാണുന്നതിന് താങ്കൾ ലോഗിൻ ചെയ്തിരിക്കണം.",
        "htmlform-title-not-exists": "$1 നിലവിലില്ല.",
        "htmlform-user-not-exists": "<strong>$1</strong> നിലവിലില്ല.",
        "htmlform-user-not-valid": "<strong>$1</strong> സാധുതയുള്ള ഉപയോക്തൃനാമമല്ല.",
-       "sqlite-has-fts": "പൂർണ്ണ-എഴുത്ത് തിരച്ചിൽ പിന്തുണയുള്ള $1",
-       "sqlite-no-fts": "പൂർണ്ണ-എഴുത്ത് തിരച്ചിൽ പിന്തുണയില്ലാത്ത $1",
        "logentry-delete-delete": "$3 എന്ന താൾ $1 {{GENDER:$2|മായ്ച്ചിരിക്കുന്നു}}",
        "logentry-delete-restore": "$3 എന്ന താൾ $1 {{GENDER:$2|പുനഃസ്ഥാപിച്ചിരിക്കുന്നു}}",
        "logentry-delete-event": "$3 എന്ന {{PLURAL:$5|രേഖയിലെ മാറ്റത്തിന്റെ|രേഖയിലെ $5 മാറ്റങ്ങളുടെ}} ദർശനീയത $1 {{GENDER:$2|മാറ്റിയിരിക്കുന്നു}}: $4",
        "feedback-external-bug-report-button": "ഒരു സാങ്കേതിക കർത്തവ്യം ചേർക്കുക",
        "feedback-dialog-title": "അഭിപ്രായം സമർപ്പിക്കുക",
        "feedback-dialog-intro": "താങ്കളുടെ അഭിപ്രായം സമർപ്പിക്കാൻ താങ്കൾക്ക് താഴെയുള്ള ലളിതമായ ഫോം ഉപയോഗിക്കാം. താങ്കളുടെ കുറിപ്പ് \"$1\" എന്ന താളിൽ താങ്കളുടെ ഉപയോക്തൃനാമത്തോടൊപ്പം ചേർക്കപ്പെടുന്നതാണ്.",
-       "feedback-error-title": "പിഴവ്",
        "feedback-error1": "പിഴവ്: എ.പി.ഐ.യിൽ നിന്നും തിരിച്ചറിയാനാകാത്ത ഫലം",
        "feedback-error2": "പിഴവ്: തിരുത്തൽ പരാജയപ്പെട്ടു",
        "feedback-error3": "പിഴവ്: എ.പി.ഐ.യിൽ നിന്നും യാതൊരു പ്രതികരണവുമില്ല",
index 533ebef..3e85f15 100644 (file)
@@ -77,7 +77,7 @@
        "tog-enotifminoredits": "मला पानांच्या आणि संचिकांच्या छोट्या बदलांकरीता सुद्धा विरोप पाठवा",
        "tog-enotifrevealaddr": "सूचना विरोपात माझा विरोपाचा (ई-मेल ) पत्ता दाखवा",
        "tog-shownumberswatching": "पहारा देणाऱ्या सदस्यांचा आकडा दाखवा",
-       "tog-oldsig": "सध्याची सही:",
+       "tog-oldsig": "à¤\86पलà¥\80 à¤¸à¤§à¥\8dयाà¤\9aà¥\80 à¤¸à¤¹à¥\80:",
        "tog-fancysig": "सही विकिसंज्ञा म्हणून वापरा (आपोआप दुव्याशिवाय)",
        "tog-uselivepreview": "सजीव झलक दाखवा",
        "tog-forceeditsummary": "जर ’बदलांचा आढावा’ दिला नसेल तर मला सूचित करा",
@@ -94,7 +94,7 @@
        "tog-showhiddencats": "लपविलेले वर्ग दाखवा",
        "tog-norollbackdiff": "द्रुतमाघार घेतल्यास बदल वगळा",
        "tog-useeditwarning": "जर मी संपादित करीत असलेल्या पानावरील माझे संपादिलेले बदल जतन न केल्यास मला इशारा द्या",
-       "tog-prefershttps": "सनोंद प्रवेशतांना प्रत्येक वेळी  सुरक्षित अनुबंध वापरा",
+       "tog-prefershttps": "सनà¥\8bà¤\82द à¤ªà¥\8dरवà¥\87शित à¤\85सताà¤\82ना à¤ªà¥\8dरतà¥\8dयà¥\87à¤\95 à¤µà¥\87ळà¥\80  à¤¸à¥\81रà¤\95à¥\8dषित à¤\85नà¥\81बà¤\82ध à¤µà¤¾à¤ªà¤°à¤¾",
        "underline-always": "नेहमी",
        "underline-never": "कधीच नाही",
        "underline-default": "त्वचा अथवा न्याहाळक अविचल (स्कीन अथवा ब्राऊजर डिफॉल्ट)",
        "category-file-count-limited": "खालील {{PLURAL:$1|संचिका|$1 संचिका}} या वर्गात आहेत.",
        "listingcontinuesabbrev": "पुढे चला",
        "index-category": "अनुक्रमित पाने",
-       "noindex-category": "अनुक्रम नसलेली पाने",
+       "noindex-category": "अनुक्रमित नसलेली पाने",
        "broken-file-category": "तुटलेल्या संचिका दुव्यांसह असलेली पाने",
        "about": "च्या विषयी",
        "article": "आशयाचे पान",
        "newwindow": "(नवीन खिडकीत उघडते.)",
        "cancel": "रद्द करा",
        "moredotdotdot": "अजून...",
-       "morenotlisted": "हà¥\80 à¤¯à¤¾à¤¦à¥\80 à¤ªà¥\82रà¥\8dण à¤¨à¤¾à¤¹à¥\80.",
+       "morenotlisted": "हà¥\80 à¤¯à¤¾à¤¦à¥\80 à¤\85पà¥\82रà¥\8dण à¤\85सà¥\82 à¤¶à¤\95तà¥\87.",
        "mypage": "पान",
        "mytalk": "चर्चा",
        "anontalk": "चर्चा पान",
        "talk": "चर्चा",
        "views": "दृष्ये",
        "toolbox": "साधने",
+       "tool-link-emailuser": "{{GENDER:$1|सदस्याला}} विपत्र पाठवा",
        "userpage": "सदस्य पृष्ठ",
        "projectpage": "प्रकल्प पान पहा",
        "imagepage": "संचिका पृष्ठ पहा",
        "createacct-yourpasswordagain-ph": "पुन्हा परवलीचा शब्द टाका",
        "userlogin-remembermypassword": "मला नोंदीकृतच(लॉग्ड-ईन) ठेवा",
        "userlogin-signwithsecure": "सुरक्षित अनुबंध(सेक्युअर कनेक्शन) वापरा",
+       "cannotlogin-title": "सनोंद प्रवेश करु शकत नाही",
        "cannotloginnow-title": "आता सनोंद प्रवेश घेऊ शकत नाही",
        "cannotloginnow-text": "$1 वापरत असतांना सनोंद प्रवेश करणे शक्य नाही.",
        "yourdomainname": "तुमचे क्षेत्र (डोमेन) :",
        "eauthentsent": "नमूद केलेल्या ई-मेल पत्त्यावर एक निश्चितता स्वीकारक ई-मेल पाठविला गेला आहे.\nखात्यावर कोणताही इतर ई-मेल पाठविण्यापूर्वी - तो ई-मेल पत्ता तुमचाच आहे, हे सुनिश्चित करण्यासाठी - तुम्हाला त्या ई-मेल मधील सूचनांचे पालन करावे लागेल.",
        "throttled-mailpassword": "मागील {{PLURAL:$1|तासात|$1 तासांत}} परवलीचा शब्द बदलण्यासाठीची सूचना विपत्राद्वारे पाठविलेली आहे. दुरुपयोग टाळण्यासाठी, {{PLURAL:$1|एका तासामध्ये|$1 तासांमध्ये}} फक्त एकदाच सूचना दिली जाईल.",
        "mailerror": "विपत्र पाठवण्यात त्रुटी: $1",
-       "acct_creation_throttle_hit": "à¤\86पला à¤\85à¤\82à¤\95पतà¥\8dता à¤µà¤¾à¤ªà¤°à¥\81न à¤¯à¤¾ à¤µà¤¿à¤\95िस à¤­à¥\87à¤\9f à¤¦à¥\87णाऱà¥\8dयाà¤\82नà¥\80 à¤\95ाल {{PLURAL:$1|१ à¤\96ातà¥\87|$1 à¤\96ातà¥\80}} à¤\89à¤\98डलà¥\80 à¤\86हà¥\87त à¤¤à¥\80 à¤¯à¤¾ à¤\95ालावधà¥\80तà¥\80ल à¤®à¤¹à¤¤à¥\8dतम à¤\86हà¥\87त.\n\nतà¥\8dयाà¤\9aा à¤ªà¤°à¤¿à¤ªà¤¾à¤\95 à¤®à¥\8dहणà¥\82न à¤¸à¤§à¥\8dया à¤¹à¤¾ à¤\85à¤\82à¤\95पतà¥\8dता à¤µà¤¾à¤ªà¤°à¥\81न à¤­à¥\87à¤\9f à¤¦à¥\87णाऱà¥\8dयास अधिक खाते उघडता येणार नाहीत.",
+       "acct_creation_throttle_hit": "à¤\86पला à¤\85à¤\82à¤\95पतà¥\8dता à¤µà¤¾à¤ªà¤°à¥\81न à¤¯à¤¾ à¤µà¤¿à¤\95िस à¤­à¥\87à¤\9f à¤¦à¥\87णाऱà¥\8dयाà¤\82नà¥\80 à¤®à¤¾à¤\97à¥\80ल $2 à¤®à¤§à¥\8dयà¥\87 {{PLURAL:$1|१ à¤\96ातà¥\87|$1 à¤\96ातà¥\80}} à¤\89à¤\98डलà¥\80 à¤\86हà¥\87त à¤¤à¥\80 à¤¯à¤¾ à¤\95ालावधà¥\80तà¥\80ल à¤®à¤¹à¤¤à¥\8dतम à¤\86हà¥\87त.\n\nतà¥\8dयाà¤\9aा à¤ªà¤°à¤¿à¤ªà¤¾à¤\95 à¤®à¥\8dहणà¥\82न à¤¸à¤§à¥\8dया à¤¹à¤¾ à¤\85à¤\82à¤\95पतà¥\8dता à¤µà¤¾à¤ªà¤°à¥\81न à¤­à¥\87à¤\9f à¤¦à¥\87णाऱà¥\8dयाला अधिक खाते उघडता येणार नाहीत.",
        "emailauthenticated": "तुमचा विपत्रपत्ता $2 ला $3 यावेळी तपासण्यात आला आहे.",
        "emailnotauthenticated": "तुमच्या ई-मेल पत्त्याची अद्याप निश्चिती झालेली नाही. खालील कोणत्याही फिचर्ससाठी ई-मेल पाठविला जाणार नाही.",
        "noemailprefs": "खालील सुविधा कार्यान्वित करण्यासाठी,पसंतीक्रमात ई-मेल पत्ता नमूद करा.",
        "botpasswords-label-resetpassword": "परवलीच्या शब्दाची पुनर्स्थापना करा",
        "botpasswords-label-grants": "लागू अनुदाने:",
        "botpasswords-help-grants": "प्रत्येक अनुदान हे सदस्य खात्यास आधीच असलेल्या यादीकृत सदस्य अधिकारास पोहोच देते.अधिक माहितीसाठी [[Special:ListGrants|अनुदानांचा तक्ता]] हे बघा.",
-       "botpasswords-label-restrictions": "वापराचे प्रतिबंध:",
        "botpasswords-label-grants-column": "मंजूर",
        "botpasswords-bad-appid": "\"$1\" हे सांगकाम्याचे नाव वैध नाही.",
        "botpasswords-insert-failed": "\"$1\" हे सांगकाम्याचे नाव जोडण्यात अयशस्वी. ते पूर्वीच जोडले होते काय?",
        "searchprofile-advanced-tooltip": "पारंपरित(कस्टम) नामविश्वांमध्ये शोधा",
        "search-result-size": "$1 ({{PLURAL:$2|१ शब्द|$2 शब्द}})",
        "search-result-category-size": "{{PLURAL:$1|१ सदस्य|$1 सदस्य}} ({{PLURAL:$2|१ उपवर्ग|$2 उपवर्ग}}, {{PLURAL:$3|1 संचिका|$3 संचिका}})",
-       "search-redirect": "(पुनर्निर्देशन $1)",
+       "search-redirect": "($1 पासून पुनर्निर्देशन)",
        "search-section": "(विभाग $1)",
        "search-category": "(वर्ग $1)",
        "search-file-match": "(संचिका आशयाशी अनुरुपते)",
        "upload-dialog-disabled": "हा डायलॉग वापरून  या विकिवर संचिका अपभारण अक्षम केले आहे.",
        "upload-dialog-title": "संचिकेचे अपभारण करा",
        "upload-dialog-button-cancel": "रद्द करा",
+       "upload-dialog-button-back": "परत जा",
        "upload-dialog-button-done": "झाले",
        "upload-dialog-button-save": "जतन करा",
        "upload-dialog-button-upload": "अपभारण करा",
        "movelogpagetext": "स्थानांतरित केलेल्या पानांची यादी.",
        "movesubpage": "{{PLURAL:$1|उपपान|उपपाने}}",
        "movesubpagetext": "या पानास $1 {{PLURAL:$1|उपपान|उपपाने}} असून ती पुढे दर्शवली आहेत:",
+       "movesubpagetalktext": "संबंधित चर्चा पानाची $1 {{PLURAL:$1|उपपान|उपपाने}} खाली दर्शविली आहेत.",
        "movenosubpage": "या पानात उपपाने नाहीत.",
        "movereason": "कारण:",
        "revertmove": "पूर्वपदास न्या",
        "pageinfo-article-id": "पृष्ठ-परिचय",
        "pageinfo-language": "पानाच्या मजकूराची भाषा",
        "pageinfo-content-model": "पान आशय नमूना",
+       "pageinfo-content-model-change": "बदला",
        "pageinfo-robot-policy": "यंत्रमानवाद्वारे अनुक्रमन",
        "pageinfo-robot-index": "अनुमती दिली",
        "pageinfo-robot-noindex": "अनुमती दिल्या जात नाही",
        "tag-filter": "[[Special:Tags|खूणपताका]] गाळक:",
        "tag-filter-submit": "गाळक",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|खूणपताका}}]]: $2)",
-       "tags-title": "खुणा",
-       "tags-intro": "प्रणालीतून विशिष्ट संपादनांच्या अर्थासहित  खुणांची  यादी नमूद करणारे पान",
+       "tags-title": "à¤\96à¥\81णपताà¤\95ा",
+       "tags-intro": "प्रणालीतून, विशिष्ट संपादनांच्या अर्थासहित  खुणपताकांची  यादी नमूद करणारे पान",
        "tags-tag": "खूण नाव",
        "tags-display-header": "बदल सुचीवर कसे दिसेल",
        "tags-description-header": "अर्थाची पूर्ण माहिती",
        "tags-hitcount": "$1 {{PLURAL:$1|बदल|बदल}}",
        "tags-manage-blocked": "आपण प्रतिबंधित असतांना बदल खूणपताकांचे व्यवस्थापन करु शकत नाही.",
        "tags-create-heading": "नवीन बिल्ला तयार करा",
+       "tags-create-explanation": "अविचलरित्या, नविन तयार केलेल्या खुणपताका सदस्यांना व सांगकाम्यांना वापरासाठी उपलब्ध होतील.",
        "tags-create-tag-name": "खूणपताकेचे नाव:",
        "tags-create-reason": "कारण:",
        "tags-create-submit": "निर्मित करा",
        "htmlform-cloner-create": "अधिक जोडा",
        "htmlform-cloner-delete": "हटवा",
        "htmlform-cloner-required": "किमान एक किंमत हवी",
+       "htmlform-date-placeholder": "वववव-मम-दिदि",
+       "htmlform-time-placeholder": "ताता:मिमि:सेसे",
+       "htmlform-datetime-placeholder": "वववव-मम-दिदि ताता:मिमि:सेसे",
+       "htmlform-date-invalid": "आपण नमूद केलेली किंमत ही अनोळखी दिनांक आहे. वववव-मम-दिदि प्रारुपणाचा वापर करण्याबाबत विचार करा.",
+       "htmlform-time-invalid": "आपण नमूद केलेली किंमत ही अनोळखी आहे. ताता:मिमि:सेसे प्रारुपणाचा वापर करण्याबाबत विचार करा.",
+       "htmlform-datetime-invalid": "आपण नमूद केलेली किंमत ही अनोळखी दिनांक व वेळ आहे. वववव-मम-दिदि ताता:मिमि:सेसे प्रारुपणाचा वापर करण्याबाबत विचार करा.",
+       "htmlform-time-toohigh": "आपण नमूद केलेली किंमत ही $1च्या परवानगी असलेल्या वेळ मर्यादेबाहेर आहे.",
+       "htmlform-datetime-toohigh": "आपण नमूद केलेली किंमत ही $1च्या परवानगी असलेल्या दिनांक व वेळ मर्यादेबाहेर आहे.",
        "htmlform-title-badnamespace": "[[:$1]] हे \"{{ns:$2}}\" नामविश्वात नाही.",
        "htmlform-title-not-creatable": "\"$1\" हे पान तयार करण्यासाठीचे शीर्षक नाही",
        "htmlform-title-not-exists": "$1 अस्तीत्वात नाही.",
        "htmlform-user-not-exists": "<strong>$1</strong> अस्तीत्वात नाही.",
        "htmlform-user-not-valid": "<strong>$1</strong> हे वैध सदस्यनाम नाही.",
-       "sqlite-has-fts": "पूर्ण-मजकूर शोध समर्थनासहित $1",
-       "sqlite-no-fts": "पूर्ण-मजकूर शोध समर्थनाविरहित $1",
        "logentry-delete-delete": "$1 {{GENDER:$2|वगळलेले पान}} $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|पुनर्स्थापित पृष्ठ}} $3",
        "logentry-delete-event": "$1 ने $3 वर{{PLURAL:$5|नोंद-प्रसंग|$5 नोंद प्रसंगांची}} दृष्यता{{GENDER:$2|बदलली}}:$4",
        "feedback-cancel": "रद्द करा",
        "feedback-close": "झाले",
        "feedback-dialog-title": "प्रतिक्रिया सादर करा",
-       "feedback-error-title": "चूक",
        "feedback-error1": "चूक: API कडून अनोळखी परिणाम",
        "feedback-error2": "त्रुटी: संपादन रद्द",
        "feedback-error3": "त्रुटी:एपीआय तर्फे काहीच प्रत्युत्तर नाही",
        "feedback-thanks": " \"[$2 $1]\" या पानात आपला पश्चप्रदाय (फिडबॅक) टाकत आहोत.",
        "feedback-thanks-title": "आपणास धन्यवाद!",
        "feedback-useragent": "सदस्य प्रतिनीधी:",
-       "searchsuggest-search": "शोधा",
+       "searchsuggest-search": "शोधा {{SITENAME}}",
        "searchsuggest-containing": ".......हे असलेले",
        "api-error-badaccess-groups": "आपणास ह्या विकिवर संचिका चढवण्याची परवानगी नाही",
        "api-error-badtoken": "अंतर्गत चूक: अयोग्य टोकन",
        "randomrootpage": "अविशिष्ट मूळ पान",
        "log-action-filter-suppress-block": "रोधामार्फत सदस्य दाबणे",
        "changecredentials": "अधिकारपत्रे (क्रेडेंटियल्स)बदला",
-       "removecredentials": "अधिकारपत्रे (क्रेडेंटियल्स) हटवा"
+       "removecredentials": "अधिकारपत्रे (क्रेडेंटियल्स) हटवा",
+       "edit-error-short": "त्रुटी: $1",
+       "edit-error-long": "त्रुटी:$1"
 }
index fb7b918..e2b8e1b 100644 (file)
@@ -41,6 +41,8 @@
        "tog-watchdefault": "ကျွန်ုပ် တည်းဖြတ်ခဲ့သည့် စာမျက်နှာများနှင့် ဖိုင်များကို စောင့်ကြည့်စာရင်းသို့  ပေါင်းထည့်ပါ။",
        "tog-watchmoves": "ကျွန်ုပ်ရွှေ့လိုက်သော စာမျက်နှာများနှင့် ဖိုင်များကို စောင့်ကြည့်စာရင်းသို့ ပေါင်းထည့်ရန်",
        "tog-watchdeletion": "ဖျက်လိုက်သောစာမျက်နှာများနှင့် ဖိုင်များကို စောင့်ကြည့်စာရင်သို့ ပေါင်းထည့်ရန်",
+       "tog-watchuploads": "ကျွန်ုပ်တင်လိုက်သော ဖိုင်အသစ်များအား ကျွန်ုပ်၏ စောင့်ကြည့်စာရင်းသို့ ပေါင်းထည့်ရန်",
+       "tog-watchrollback": "နောက်ပြန်ပြင်ခြင်း ဆောင်ရွက်လိုက်သည့် စာမျက်နှာများအား ကျွန်ုပ်၏ စောင့်ကြည့်စာရင်းသို့ ပေါင်းထည့်ရန်",
        "tog-minordefault": "တည်းဖြတ်မှုအားလုံးသည် အရေးမကြီးသော တည်းဖြတ်မှုဟု ပုံသေသတ်မှတ်ရန်",
        "tog-previewontop": "တည်းဖြတ်သည့်အကွက်မတိုင်မီ နမူနာကို ပြရန်",
        "tog-previewonfirst": "ပထမတည်းဖြတ်မှုတွင် နမူနာကို ပြရန်",
@@ -49,7 +51,7 @@
        "tog-enotifminoredits": "စာမျက်နှာများနှင့် ဖိုင်များ၏ အရေးမကြီးသော တည်းဖြတ်မှုများကိုလည်း အီးမေးပို့ရန်",
        "tog-enotifrevealaddr": " အသိပေးချက်အီးမေးများတွင် ကျွန်ုပ်၏ အီးမေးလိပ်စာကို ဖော်ပြရန်",
        "tog-shownumberswatching": "စောင့်ကြည့်နေသော အသုံးပြုသူအရေအတွက်ကို ပြရန်",
-       "tog-oldsig": "á\80\9bá\80¾á\80­á\80\94á\80¾á\80\84á\80·á\80ºá\80\95á\80¼á\80®á\80¸á\80\9eá\80¬á\80¸ á\80\9cá\80\80á\80ºá\80\99á\80¾á\80\90á\80º -",
+       "tog-oldsig": "á\80\9eá\80\84á\80ºá\81\8f á\80\9bá\80¾á\80­á\80\94á\80¾á\80\84á\80·á\80ºá\80\95á\80¼á\80®á\80¸á\80\9eá\80¬á\80¸ á\80\9cá\80\80á\80ºá\80\99á\80¾á\80\90á\80º:",
        "tog-fancysig": "လက်မှတ်ကို ဝီကီလင့်အဖြစ် သတ်မှတ်ရန် (အလိုအလျောက်လင့်မပါဘဲနှင့်)",
        "tog-forceeditsummary": "တည်းဖြတ်အတိုချုပ် ဗလာဖြစ်နေလျှင် သတိပေးရန်",
        "tog-watchlisthideown": "ကျွန်ုပ်၏ တည်းဖြတ်မှုများကို စောင့်ကြည့်စာရင်းမှ ဝှက်ထားရန်",
@@ -63,7 +65,7 @@
        "tog-diffonly": "ကွဲပြားမှုများအောက်ရှိ စာမျက်နှာတွင်ပါဝင်သည်များကို မပြပါနှင့်",
        "tog-showhiddencats": "ဝှက်ထားသော ကဏ္ဍများကို ပြရန်",
        "tog-useeditwarning": "မသိမ်းရသေးသော ပြောင်းလဲမှုများ နှင့် တည်းဖြတ်ဆဲစာမျက်နှာမှ ထွက်သွားလျှင် သတိပေးပါ",
-       "tog-prefershttps": "log in ဝင်တိုင်း လုံခြုံသော ဆက်သွယ်မှုကို အသုံးပြုရန်",
+       "tog-prefershttps": "လော့ဂ်အင်ဝင်ချိန်တွင် လုံခြုံသော ဆက်သွယ်မှုကို အမြဲတမ်း အသုံးပြုရန်",
        "underline-always": "အမြဲ",
        "underline-never": "ဘယ်သောအခါမျှ",
        "underline-default": "ဘရောက်ဆာ သို့ Skin default အတိုင်း",
        "category-file-count-limited": "အောက်ပါ {{PLURAL:$1|စာမျက်နှာ|$1 စာမျက်နှာများ}} သည် လက်ရှိစာမျက်နှာတွင် ရှိသည်။",
        "listingcontinuesabbrev": "ပံ့ပိုး",
        "index-category": "အက္ခရာစဉ် စာမျက်နှာများ",
-       "noindex-category": "á\80¡á\80\80á\80¹á\80\81á\80\9bá\80¬á\80\85á\80\89á\80º á\80\85á\80¬á\80\99á\80»á\80\80á\80ºá\80\94á\80¾á\80¬á\80\99á\80»á\80¬á\80¸á\80\99á\80\9bá\80¾á\80­",
+       "noindex-category": "á\80¡á\80\80á\80¹á\80\81á\80\9bá\80¬á\80\99á\80\85á\80\89á\80ºá\80\91á\80¬á\80¸á\80\9eá\80±á\80¬ á\80\85á\80¬á\80\99á\80»á\80\80á\80ºá\80\94á\80¾á\80¬á\80\99á\80»á\80¬á\80¸",
        "broken-file-category": "ကျိုးပျက်နေသော ဖိုင်လင့်များပါသည့် စာမျက်နှာများ",
        "about": "အကြောင်း",
        "article": "စာမျက်နှာ",
        "newwindow": "(ဝင်းဒိုးအသစ်တခုကိုဖွင့်ရန်)",
        "cancel": "မ​လုပ်​တော့​",
        "moredotdotdot": "နောက်ထပ်...",
-       "morenotlisted": "ဤစာရင်းမှာ မပြည့်စုံပါ။",
+       "morenotlisted": "á\80¤á\80\85á\80¬á\80\9bá\80\84á\80ºá\80¸á\80\99á\80¾á\80¬ á\80\99á\80\95á\80¼á\80\8aá\80·á\80ºá\80\85á\80¯á\80¶á\80\94á\80­á\80¯á\80\84á\80ºá\80\95á\80«á\81\8b",
        "mypage": "စာမျက်နှာ",
        "mytalk": "ဆွေးနွေးချက်",
        "anontalk": "ဆွေးနွေးရန်",
        "directorycreateerror": "လမ်းညွှန် \"$1\" ကို ဖန်တီးမရနိုင်ပါ။",
        "filenotfound": "ဖိုင် \"$1\" ကို ရှာမတွေ့ပါ။",
        "formerror": "အမှား - ဖောင်သွင်းနိုင်ခြင်းမရှိပါ",
+       "badarticleerror": "ဤလုပ်ဆောင်မှုအား ဤစာမျက်နှာတွင် လုပ်ဆောင်၍ မရနိုင်ပါ။",
        "cannotdelete": "\"$1\" စာမျက်နှာ သို့မဟုတ် ဖိုင်ကို ဖျက်၍ မရပါ။\nတစ်စုံတစ်ဦးမှ ဖျက်နှင့်ပြီး ဖြစ်နိုင်ပါသည်။",
        "cannotdelete-title": "\"$1\" စာမျက်နှာကို ဖျက်၍ မရပါ",
+       "delete-hook-aborted": "ရှင်းလင်းပြချက် မပေးထားပါ။",
        "badtitle": "ညံ့ဖျင်းသော ခေါင်းစဉ်",
        "badtitletext": "တောင်းဆိုထားသော စာမျက်နှာ ခေါင်းစဉ်သည် တရားမဝင်ပါ (သို့) ဗလာဖြစ်နေသည် (သို့) အခြားဘာသာများ(inter-language or inter-wiki title)သို့ မှားယွင်းစွာ လင့်ချိတ်ထားသည်။",
        "viewsource": "ရင်းမြစ်ကို ကြည့်ရန်",
        "viewsource-title": "$1၏ ရင်းမြစ်ကို ကြည့်ရန်",
        "protectedpagetext": "ဤစာမျက်နှာအား တည်းဖြတ်ခြင်းနှင့် အခြားလုပ်ဆောင်မှုများ မလုပ်ဆောင်နိုင်အောင် ကာကွယ်ထားသည်။",
+       "viewsourcetext": "ဤစာမျက်နှာ၏ ရင်းမြစ်ကို ကြည့်ရှု၍ ကူးယူနိုင်သည်။",
+       "viewyourtext": "ဤစာမျက်နှာရှိ <strong>သင့်တည်းဖြတ်မှုများ</strong>၏ ရင်းမြစ်ကို ကြည့်ရှုပြီး ကူးယူနိုင်သည်။",
        "namespaceprotected": "'''$1''' စာညွှန်းဖြင့် စာမျက်နှာကို တည်းဖြတ်ရန် ခွင့်ပြုချက် မရှိပါ။",
        "mycustomcssprotected": "ဤ CSS စာမျက်နှာကို သင်တည်းဖြတ်ပြင်ဆင်ခွင့် မရှိပါ။",
        "mycustomjsprotected": "ဤ JavaScript စာမျက်နှာကို သင်တည်းဖြတ်ပြင်ဆင်ခွင့် မရှိပါ။",
        "deleteotherreason": "အခြားသော/နောက်ထပ် အကြောင်းပြချက် -",
        "deletereasonotherlist": "အခြား အကြောင်းပြချက်",
        "delete-edit-reasonlist": "ဖျက်ပစ်ရသော အကြောင်းရင်းများကို တည်းဖြတ်ရန်",
+       "deleting-backlinks-warning": "<strong>သတိပေးချက်။</strong> သင်ဖျက်ပစ်တော့မည့် စာမျက်နှာအား [[Special:WhatLinksHere/{{FULLPAGENAME}}|အခြားစာမျက်နှာများမှ]] ချိတ်ဆက်ထားခြင်း သို့မဟုတ် ထည့်သွင်းထားခြင်း ရှိနေသည်။",
        "rollbacklink": "နောက်ပြန် ပြန်သွားရန်",
        "rollbacklinkcount": "{{PLURAL:$1|တည်းဖြတ်မှု|တည်းဖြတ်မှုများ}} $1 ကို နောက်ပြန်ပြင်ရန်",
        "protectlogpage": "ကာကွယ်မှုများ၏ မှတ်တမ်း",
        "others": "အခြား",
        "pageinfo-language": "စာမျက်နှာ စာကိုယ် ဘာသာစကား",
        "pageinfo-toolboxlink": "စာမျက်နှာ အချက်အလက်များ",
+       "markaspatrolleddiff": "စောင့်ကြပ်စစ်ဆေးပြီးကြောင်း မှတ်သားရန်",
+       "markaspatrolledtext": "ဤစာမျက်နှာအား စောင့်ကြပ်စစ်ဆေးပြီးကြောင်း မှတ်သားရန်",
        "filedeleteerror-short": "ဖိုင်ဖျက်ရာတွင် အမှားအယွင်း - $1",
        "previousdiff": "← တည်းဖြတ်မူ အဟောင်း",
        "nextdiff": "ပိုသစ်သော တည်းဖြတ်မှု",
index 97f653d..7bae28c 100644 (file)
@@ -13,7 +13,8 @@
                        "Игорь Бродский",
                        "아라",
                        "Denö",
-                       "Macofe"
+                       "Macofe",
+                       "Rueter"
                ]
        },
        "tog-underline": "Сюлмавома петнень алга черькстамс:",
        "category-file-count-limited": "{{PLURAL:$1|Те файлась|Неть $1 файлатне}} вановиця категориянтень кандови.",
        "listingcontinuesabbrev": "поладксозо моли",
        "index-category": "Индекс марто лопатне",
-       "noindex-category": "Индекстэме лопатне",
+       "noindex-category": "Индекстэме лопат",
        "broken-file-category": "Лопат, конатнесэ файлань яжазь сюлмавомапеть",
        "about": "Эстедензэ",
        "article": "Потмокслопа",
        "nstab-template": "Лопа парцун",
        "nstab-help": "Лезкс лопа",
        "nstab-category": "Категория",
+       "mainpage-nstab": "Прявтлопа",
        "nosuchaction": "Истямо тев арась",
        "nosuchspecialpage": "Истямо башка лопа арась",
        "nospecialpagetext": "<strong>Лопась, конань вешик, арась.</strong>\n\nВант те лемрисьменть [[Special:SpecialPages|{{int:specialpages}}]].",
        "yourpasswordagain": "Омбоцеде сёрмадык кирдицянь леметь:",
        "createacct-yourpasswordagain": "Кемекстык салававалонть",
        "createacct-yourpasswordagain-ph": "Совавтык салававалонть одов",
-       "remembermypassword": "Кирдемс мельсэ совамо валом те бравзерсэнть (сех кувать $1 {{PLURAL:$1|чи|чить}})",
        "userlogin-remembermypassword": "Кирдемизь совавтозекс",
        "userlogin-signwithsecure": "Нолдак тевс ванстозь сюлмавкс",
        "yourdomainname": "Эсеть доменэть:",
        "preview": "Васнянь неевтезэ",
        "showpreview": "Максомс васнянь невтевкс",
        "showdiff": "Невтемс мезе полавтовсь",
-       "anoneditwarning": "'''Ванок:''' Зярс эзить сова. IP адресэть совавтови те лопанть витнема-петнема икелькс умантень.",
+       "anoneditwarning": "<strong>Ванок!</strong> Зярс эзить сова. IP адресэть карми неявомо весенень карминдерят витнеме-петнеме. <strong>[$1 Совиндерят]</strong> эли <strong>[$2 шкиндерят совамо тарка]</strong>, весе витнема-петнема теветь аравтовить совамовалот лемс истя кода и лия изнявксоткак.",
        "missingcommenttext": "Инеськеть мелеть-арьсемат путта тезэнь алов.",
        "summary-preview": "Цётомань седеикелев вановкс:",
        "subject-preview": "Темань/коняксонь васнянь невтема:",
        "post-expand-template-argument-warning": "'''Ванок''': Те лопасонть ули лопапарцунонь вейке эли седе ламо аргумент, конась вельть покш. Сеть аргументтнэ нардазь.",
        "post-expand-template-argument-category": "Лопатнесэ улить лопа парцунонь нардань аргументт",
        "parser-template-loop-warning": "Лопа парцунсто \"чары реве\" муевсь: [[$1]]",
-       "cantcreateaccounttitle": "Сёрмадома таркынесь а тееви",
        "viewpagelogs": "Ванномс те лопас совамодо-лисемадо тевть",
        "nohistory": "Те лопанть витнемадо-петнемадо икелькс умазо арась.",
        "currentrev": "Тевате лиякстомтома",
        "searchprofile-advanced-tooltip": "Вешнемс башка теезь лемпотмотнестэ",
        "search-result-size": "$1 ({{PLURAL:$2|1 вал|$2 валт}})",
        "search-result-category-size": "{{PLURAL:$1|1 совицязо|$1 совицянзо}} ({{PLURAL:$2|1 явкскатегориязо|$2 явкскатегориянзо}}, {{PLURAL:$3|1 файла|$3 файлат}})",
-       "search-redirect": "(йутавтт $1-с)",
+       "search-redirect": "(ютавтт $1 лопасто)",
        "search-section": "(пелькс $1)",
        "search-suggest": "Истя мерикскелить: $1",
        "search-interwiki-caption": "Дугакс проектт",
        "right-upload": "Ёвкстамс файлат",
        "right-reupload": "Одонь сёрмадомга уликс файланть нардамс",
        "right-upload_by_url": "Ёвкстамс файлат URL адресстэ",
+       "right-writeapi": "Кода нолдамс тевс сёрмадома API-нть",
        "right-delete": "Нардамс лопатнень",
        "right-bigdelete": "Нардамс кувака икелькс ума марто лопатнень",
        "right-browsearchive": "Вешнемс нардань файлатнесэ",
        "newpageletter": "О",
        "boteditletter": "б",
        "rc_categories_any": "Кочказетнень эйстэ кодамо-понгсь",
+       "rc-change-size-new": "Полавтнемадонть мейле {{PLURAL:$1|байттнэде}}: $1",
        "newsectionsummary": "/* $1 */ од пелькс",
        "rc-enhanced-expand": "Невтемс седе ламо тень ланга",
        "rc-enhanced-hide": "Кекшемс келейстэ ёвтазенть",
        "whatlinkshere-prev": "{{PLURAL:$1|седе икелень|седе икелень $1}}",
        "whatlinkshere-next": "{{PLURAL:$1|сыця|сыця $1}}",
        "whatlinkshere-links": "← сюлмавомапеть",
-       "whatlinkshere-hideredirs": "$1 ютавты козонь-козонь",
-       "whatlinkshere-hidetrans": "$1 сюлмавозь пелькстнэнь",
-       "whatlinkshere-hidelinks": "$1 сюлмавома петь",
+       "whatlinkshere-hideredirs": "лияв-лияв ютавтовкстнэде $1",
+       "whatlinkshere-hidetrans": "сюлмавозь пелькстнэде $1",
+       "whatlinkshere-hidelinks": "сюлмавома петнеде $1",
        "whatlinkshere-hideimages": "$1 файланть сюлмавомапензэ",
        "whatlinkshere-filters": "Фильтрат",
        "block": "Аравтомс теицянть саймас",
        "tooltip-pt-mycontris": "Мезесэ лездынь мезе путынь",
        "tooltip-pt-login": "Совавтовлить эсь прят тезэнь, арась мелеть, иля.",
        "tooltip-pt-logout": "Лисемс",
+       "tooltip-pt-createaccount": "Меревлинек тонеть совамо таркань шкамодо-совамодо, арась мелеть, иля",
        "tooltip-ca-talk": "Кортавтома пек паро лопадонть",
        "tooltip-ca-edit": "Витнемс-петнемс те лопанть",
        "tooltip-ca-addsection": "Ушодомс од явкс.",
        "tooltip-ca-nstab-main": "Ваномс потмо лопанзо",
        "tooltip-ca-nstab-user": "Ваномс теицянь лопанть",
        "tooltip-ca-nstab-media": "Ваномс медиа лопанть",
-       "tooltip-ca-nstab-special": "Те Ð±Ð°Ñ\88ка Ñ\82евенÑ\8c Ð»Ð¾Ð¿Ð°Ñ\81Ñ\8c, Ñ\81онÑ\81Ñ\8c Ð»Ð¾Ð¿Ð°Ñ\81Ñ\8c Ð° Ð²Ð¸Ñ\82неви-пеÑ\82неви",
+       "tooltip-ca-nstab-special": "Те Ð±Ð°Ñ\88ка Ñ\82евенÑ\8c Ð»Ð¾Ð¿Ð°Ñ\81Ñ\8c, Ñ\82е Ð»Ð¾Ð¿Ð°Ð½Ñ\82Ñ\8c Ð° Ð²Ð¸Ñ\82неÑ\81ак-пеÑ\82неÑ\81ак",
        "tooltip-ca-nstab-project": "Ваннынк проетной лопанть",
        "tooltip-ca-nstab-image": "Ванык файлань лопанть",
        "tooltip-ca-nstab-mediawiki": "Ваномс системань пачтямнэнть",
        "pageinfo-subpages-name": "Те лопанть явкслопанзо",
        "pageinfo-edits": "Зяроксть витнезь-петнезь",
        "pageinfo-authors": "Весемезэ зяро авторонзо",
+       "pageinfo-toolboxlink": "Лопадо иформация",
        "markaspatrolleddiff": "Тешкстамс ванстнемань ютазекс",
        "markaspatrolledtext": "Тешкстамс те лопанть ванстнемань ютазекс",
        "markedaspatrolled": "Тешкстазь ванстнемань ютазекс",
        "file-nohires": "Арась версия покш разрешения марто.",
        "svg-long-desc": "SVG файла, $1 × $2 пиксельть, файланть покшолмазо: $3",
        "show-big-image": "Васень файла",
+       "show-big-image-size": "$1 × $2 пиксель",
        "file-info-gif-looped": "кирьксэс аравтозь",
        "file-info-png-looped": "кирьксэс аравтозь",
        "newimages": "Од файлатьнень галлереясь",
index d60887a..369ba48 100644 (file)
@@ -11,7 +11,8 @@
                        "아라",
                        "Fitoschido",
                        "Taresi",
-                       "Macofe"
+                       "Macofe",
+                       "Akapochtli"
                ]
        },
        "tog-underline": "Mokìnxòîkuilòtzàswis tzòwilistìn:",
@@ -64,8 +65,8 @@
        "thu": "Mācuililhui",
        "fri": "6 ilhui",
        "sat": "7 ilhui",
-       "january": "Ic cē mētztli",
-       "february": "Ic ōmemētztli",
+       "january": "Icce metztli",
+       "february": "Icome metztli",
        "march": "Ic ēyi mētztli",
        "april": "Ic nāuhtetl mētztli",
        "may_long": "Ic mācuīlli mētztli",
        "october-date": "Īcmahtlactlimētztli $1",
        "november-date": "Īcmahtlactlioncēmētztli $1",
        "december-date": "Īcmahtlactliomōmemētztli $1",
-       "pagecategories": "{{PLURAL:$1|Tlaìxmatkàyòtlàlilòtl|Tlaìxmatkàyòtlàlilòme}}",
+       "pagecategories": "{{PLURAL:$1|Neneuhcayotl|Neneuhcayomeh}}",
        "category_header": "Tlâkuilòlpiltin ìpan tlaìxmatkàtlàlilòtl \"$1\"",
        "subcategories": "Tlaìxmatkàtlàlilòpilòmë",
        "category-media-header": "Media \"$1\" neneuhcāyōc",
        "category-empty": "''Cah ahtlein inīn neneuhcāyōc.''",
        "hidden-categories": "{{PLURAL:$1|tlatlàtìlli tlaìxmatkàyòtlàlilòtl|tlatlàtìltìn tlaìxmatkàyòtlàlilòme}}",
        "hidden-category-category": "Tlatlàtìlkàtlaìxmatkàtlàlilòmë",
-       "category-subcat-count": "{{PLURAL:$2|Inìn tlaìxmatkàyòtlàlilòtl kipia san inìn tlaìxmatkàyòtlàlilòpilli.|Inìn tlaìxmatkàyòtlàlilòtl {{PLURAL:$1|kipia inìn tlaìxmatkàyòtlàlilòpilli|kimpia inîke $1 tlaìxmatkàyòtlàlilòpiltìn}}, ìpan $2.}}",
+       "category-subcat-count": "{{PLURAL:$2|Inin neneuhcayotl zan quipiya in tetoquilli tlani-neneuhcayotl.|Inn neneuhcayotl {{PLURAL:$1|quipiya intetoquilli tlani-neneuhcayotl|in tetoquiltin $1 tlani-neneuhcayomeh}}, itech tlacecempohualoni $2.}}",
        "category-subcat-count-limited": "Inīn {{PLURAL:$1|neneuhcāyōtzintli cah|$1 neneuhcāyōtzintli cateh}} inīn neneuhcāyōc.",
-       "category-article-count": "{{PLURAL:$2|Inìn tlaìxmatkàyòtlàlilòtl san kipia|Inìn tlaìxmatkàyòtlàlilòtl kimpia {{PLURAL:$1|inìn tlaìxtlapalli|inîke $1 tlaìxtlapaltìn}}, ìwikpa $2.}}",
+       "category-article-count": "{{PLURAL:$2|Inin neneuhcayotl zan quipiya in tetoquilli tlahcuilolli.|{{PLURAL:$1|In tetoquilli tlahcuilolli itech pohui|In tetoquiltin $1 tlahcuiloltin itech pohui}}, inin neneuhcayotl itech tlacecempohualoni ipan $2.}}",
        "category-article-count-limited": "Inīn {{PLURAL:$1|zāzanilli cah|$1 zāzanilli cateh}} inīn neneuhcāyōc.",
        "category-file-count": "{{PLURAL:$2|Inìn tlaìxmatkàyòtlàlilòtl san kipia|Inìn tlaìxmatkàyòtlalilòtl kimpia {{PLURAL:$1|inìn èwalli|inîke $1 èwaltìn}}, ìwikpa $2.}}",
        "category-file-count-limited": "{{PLURAL:$1|Inìn tlâkuilòlèwalli kä|Inîkë $1 tlâkuilòlèwaltìn katêkë}} ìpan inìn tlaìxmatkàtlàlilòtl.",
        "cancel": "Xiccāhua",
        "moredotdotdot": "Huehca ōmpa...",
        "mypage": "Noāmauh",
-       "mytalk": "Nozānīl",
+       "mytalk": "Teixnamiquiliztli",
        "anontalk": "Tēixnāmiquiliztli",
        "navigation": "Nēnemōhualiztli",
-       "and": "&#32;īhuān",
+       "and": "&#32;ihuan",
        "qbfind": "Xicahci",
        "qbbrowse": "Xitlatepotztoca",
        "qbedit": "Xicpatla",
        "faq": "Zan īc tētlatlanīliztli",
        "faqpage": "Project:FAQ",
        "actions": "Āyiliztli",
-       "namespaces": "Tōcātlacāuhtli",
+       "namespaces": "Tocatlacauhtli",
        "variants": "Nepāpan",
-       "navigation-heading": "Nemiliztlahtōlpōhualāmatl",
+       "navigation-heading": "Nemiliztlahtolpohualamatl",
        "errorpagetitle": "Aiuhcāyōtl",
        "returnto": "Ximocuepa īhuīc $1.",
-       "tagline": "Īhuīcpa {{SITENAME}}",
-       "help": "Tēpalēhuiliztli",
-       "search": "Mà motèmo",
-       "searchbutton": "Tictēmōz",
+       "tagline": "Itechcopa {{SITENAME}}",
+       "help": "Tepalehuiliztli",
+       "search": "Tlatemoliztli",
+       "searchbutton": "Tlatemoliztli",
        "go": "Xiyauh",
        "searcharticle": "Xiyauh",
        "history": "Tlaīxtli ītlahtōllo",
-       "history_short": "Tlahtōllōtl",
+       "history_short": "Tlahtollotl",
        "updatedmarker": "ōmoyancuīx īhuīcpa xōcoyōc notlahpololiz",
        "printableversion": "Tepoztlahcuilōlli",
        "permalink": "Mochipa tzonhuiliztli",
        "unprotectthispage": "Xicpatla inīn tlaīxtli ītlapiyaliz",
        "newpage": "Yancuic tlaīxtli",
        "talkpage": "Xictlahto inīn tlaīxtli ītechcopa",
-       "talkpagelinktext": "Nenônòtzalistli",
+       "talkpagelinktext": "Teixnamiquiliztli",
        "specialpage": "Nònkuâkìskàtlaìxtlapalli",
        "personaltools": "In tlein nitēquitiltilia",
        "articlepage": "Xiquitta in tlamantlaīxtli",
-       "talk": "Zānīlli",
+       "talk": "Teixnamiquiliztli",
        "views": "Tlachiyaliztli",
-       "toolbox": "Tequitīhuani",
+       "toolbox": "Tequitihualoni",
        "userpage": "Xiquitta tlatequitiltilīlli zāzanilli",
        "projectpage": "Xiquitta tlachīhualiztli zāzanilli",
        "imagepage": "Xiquitta in zāzanilli īāma",
        "otherlanguages": "Occequīntīn tlahtōlcopa",
        "redirectedfrom": "(Ōmotlacuep īhuīcpa $1)",
        "redirectpagesub": "Ōmotlacuep zāzanilli",
-       "lastmodifiedat": "Inīn zāzanilli ōtlapatlac catca īpan $2, $1.",
+       "lastmodifiedat": "Inin tlahcuilolli omopatlac immanin $1, ipan $2.",
        "viewcount": "Inīn zāzanilli quintlapōhua {{PLURAL:$1|cē tlahpololiztli|$1 tlahpololiztli}}.",
        "protectedpage": "Ōmoquīxtix zāzanilli",
        "jumpto": "Īhuīcpa ticholōz:",
        "jumptonavigation": "nēnemōhualiztli",
-       "jumptosearch": "tlatēmoliztli",
-       "aboutsite": "Ītechcopa {{SITENAME}}",
-       "aboutpage": "Project:Ītechcopa",
+       "jumptosearch": "Tlatemoliztli",
+       "aboutsite": "Itechcopa {{SITENAME}}",
+       "aboutpage": "Project:Itechcopa",
        "copyright": "In tlahcuilōlli cah tlacēcencāhuani īpan $1 tel ahmo intlā īcuepca motēnēhua.",
        "copyrightpage": "{{ns:project}}:Tlachīhualōni ītlapiyaliz",
-       "currentevents": "Āxcāncāyōtl",
+       "currentevents": "Axcancayotl",
        "currentevents-url": "Project:Āxcāncāyōtl",
-       "disclaimers": "Nahuatīllahtōl",
+       "disclaimers": "tlamamalquixtiliztli",
        "edithelp": "Tlapatlaliztechcopa tēpalēhuiliztli",
        "helppage-top-gethelp": "Tēpalēhuiliztli",
-       "mainpage": "Huēyitlaīxtli",
-       "mainpage-description": "Huēyitlaīxtli",
+       "mainpage": "Yacatlahcuilolli",
+       "mainpage-description": "Yacatlahcuilolli",
        "policy-url": "Project:Nahuatīltōn",
        "portal": "Calīxcuātl tocalpōl",
        "portal-url": "Project:Calīxcuātl tocalpōl",
-       "privacy": "Tlahcuilōlli piyaliznahuatīlli",
+       "privacy": "Tlahcuilolli piyaliznahuatilli",
        "privacypage": "Project:Tlahcuilōlpiyaliztechcopa nahuatīltōn",
        "badaccess": "Tlahuelītiliztechcopa ahcuallōtl",
        "badaccess-group0": "Tehhuātl ahmo tiquichīhua inōn tiquiēlēhuia.",
        "editold": "xicpatla",
        "viewsourceold": "xiquitta mēyalli",
        "editlink": "xicpatla",
-       "viewsourcelink": "xiquitta mēyalli",
+       "viewsourcelink": "Tiquittaz itzintiliz",
        "editsectionhint": "Xicpatla in: $1",
-       "toc": "Inīn tlahcuilōlco",
+       "toc": "In tlein quipiya inin tlahcuilolli",
        "showtoc": "xicnēxti",
        "hidetoc": "xictlāti",
        "collapsible-collapse": "Motlàtìs",
        "site-atom-feed": "$1 Atom huelītiliztli",
        "page-rss-feed": "\"$1\" RSS huelītiliztli",
        "page-atom-feed": "\"$1\" RSS huelītiliztli",
-       "red-link-title": "$1 (ayāc in centlaīxtli)",
-       "nstab-main": "Tlaīxtli",
+       "red-link-title": "$1 (ahmo oncah tlahcuilolli)",
+       "nstab-main": "Tlahcuilolli-amatl",
        "nstab-user": "Tlatequitiltilīlli",
        "nstab-media": "Mēdiatl",
-       "nstab-special": "Nònkuâkìskàtlaìxtlapalli",
+       "nstab-special": "Noncuahquizqui tlahcuilolli",
        "nstab-project": "Ìtlaìxtlapal in tlayẻkàntekitl",
-       "nstab-image": "Ihcuilōlli",
+       "nstab-image": "Tlahcuilolpiyalli",
        "nstab-mediawiki": "Tlahcuilōltzintli",
        "nstab-template": "Nemachiòtl",
        "nstab-help": "Tèpalèwilistli",
        "nstab-category": "Tlaìxmatkàyòtlàlilòtl",
-       "mainpage-nstab": "Huēyitlaīxtli",
+       "mainpage-nstab": "Yacatlahcuilolli",
        "nosuchaction": "Ahmo ia tlachīhualiztli",
        "nosuchspecialpage": "Âmò ka inòn nònkuâkìskàtlaìxtlapalli",
        "nospecialpagetext": "<strong>Tiknẻki sè nònkuâkìskàtlaìxtlapalli tlèn âmò kä.</strong>\n\nKualli tikỉtas sè ìntlapòpòwaltekpànal in nònkuâkìskàtlaìxtlapaltìn ìpan [[Special:SpecialPages|{{int:specialpages}}]].",
        "welcomeuser": "Ximopanōlti, $1!",
        "yourname": "Tequihuihcātōcāitl:",
        "userlogin-yourname": "Tequihuihcātōcāitl",
+       "userlogin-yourname-ph": "Xiquihcuilo motoca iuhqui tequitihuani",
        "yourpassword": "Motlahtōlichtacāyo",
+       "userlogin-yourpassword": "Ichtacamachiyotl",
+       "createacct-yourpassword-ph": "Xictlali centetl ichtacamachiyotl",
        "yourpasswordagain": "Motlahtōlichtacāyo occeppa",
-       "remembermypassword": "Ticpiyāz motlacalaquiliz inīn chīuhpōhualhuazco (īxquich {{PLURAL:$1|tōnalli}})",
+       "createacct-yourpasswordagain": "Xicneltilia in ichtacamachiyotl",
+       "createacct-yourpasswordagain-ph": "Occepa xictlali in ichtacamachiyotl",
        "yourdomainname": "Moāxcāyō",
        "login": "Xicalaqui",
        "nav-login-createaccount": "Ximocalaqui / ximomachiyōmaca",
        "createaccount": "Xicchīhua tlapōhualli",
        "gotaccount": "¿Ye ticpiya cē tlapōhualli? '''$1'''.",
        "gotaccountlink": "Ximocalaqui",
+       "createacct-email-ph": "xiquihcuilo mocorreo electrónico",
        "createaccountmail": "Ticnemītīz ahmo cemihcac zāzoichtacātlahtōlli nō in tiquēhualtīz in maltzinteyōtl monetitlanizyeyān",
        "createaccountreason": "Tleīpampa:",
        "createacct-reason": "Tleīpampa",
        "pt-login": "Xicalaqui",
        "pt-login-button": "Xicalaqui",
        "pt-createaccount": "Xicchīhua motlapōhual",
+       "pt-userlogout": "Tiquizaz",
        "changepassword": "Xicpatla motlahtōlichtacāyo",
        "resetpass_header": "Xicpatla motlahtōlichtacāyo",
        "oldpassword": "Huēhueh motlahtōlichtacayo:",
        "revertmerge": "Tiquīxipehuaz",
        "history-title": "«$1» ītlaceppahuiliztlahtōllo",
        "lineno": "Pāntli $1:",
-       "editundo": "Tichuelōz",
-       "searchresults": "Tlatēmoliztli",
+       "editundo": "Ticxitiniz",
+       "searchresults": "motlatemoliz itlananquilizhuan",
        "searchresults-title": "«$1» tlatēmōliztli īmochīhualiz",
        "prevn": "{{PLURAL:$1|$1}} achtopa",
        "nextn": "niman {{PLURAL:$1|$1}}",
        "searchprofile-images-tooltip": "Tiquintēmōz tlahcuilōlli",
        "searchprofile-everything-tooltip": "Tictēmōz mochi tlapiyalizpan (mopiyah tēixnāmiquiliztli zāzanilli)",
        "search-result-size": "$1 ({{PLURAL:$2|1 tlahtōl|$2 tlahtōltin}})",
-       "search-redirect": "(tlacuepaliztli $1)",
+       "search-redirect": "(ixquichca ompa mitzhuica $1)",
        "search-section": "(tlahtōltzintli $1)",
        "search-category": "(tlaìxmatkàyòtlàlilòtl $1)",
        "search-suggest": "Ahnōceh tiquihtōznequiya: $1",
        "rcshowhidemine": "$1 notlahcuilōl",
        "rcshowhidemine-show": "Xicnēxti",
        "rclinks": "Xiquintta xōcoyōc $1 tlapatlaliztli xōcoyōc $2 tōnalpan.<br />$3",
-       "diff": "ahneneuh",
-       "hist": "tlahtōl",
+       "diff": "ahneneuhqui",
+       "hist": "tlahtollotl",
        "hide": "Tiquintlātīz",
        "show": "Xicnēxti",
        "minoreditletter": "p",
        "newsectionsummary": "Yancuīc tlahtōltzintli: /* $1 */",
        "recentchangeslinked": "Tlapatlaliztli tzonhuilizpan",
        "recentchangeslinked-feed": "Tlapatlaliztli tzonhuilizpan",
-       "recentchangeslinked-toolbox": "Tlapatlaliztli tzonhuilizpan",
+       "recentchangeslinked-toolbox": "Itloc itlapatlalizhuan",
        "recentchangeslinked-title": "Tlapatlaliztli \"$1\" ītechcopa",
        "recentchangeslinked-page": "Tlaīxtli ītōcā:",
-       "upload": "Tlahcuilōlquetza",
+       "upload": "Tlahcuilolquetzaliztli",
        "uploadbtn": "Tlahcuilōlquetza",
        "uploadnologin": "Ahmo ōtimocalac",
        "uploaderror": "Tlaquetzaliztli ahcuallōtl",
        "filehist-user": "Tequihuihqui",
        "filehist-dimensions": "Octacayōtl",
        "filehist-comment": "TlahtōIcaquiliztīlōni",
-       "imagelinks": "Ihcuilōlli ītequiuh",
+       "imagelinks": "In canin oquitlalihqueh",
        "linkstoimage": "Inīn {{PLURAL:$1|zāzanilli motzonhuilia|$1 zāzanilli motzonhuiliah}} inīn tlahcuilōlhuīc:",
        "nolinkstoimage": "Ahmo cateh zāzaniltin tlein tzonhuiliah inīn tlahcuilōlhuīc.",
        "morelinkstoimage": "Tiquinttāz [[Special:WhatLinksHere/$1|achi tzonhuiliztli]] inīn tlahcuilōlhuīc.",
        "blanknamespace": "(Huēyi)",
        "contributions": "In {{GENDER:$1|tlatequitiltilīlli}} ītlahcuilōl",
        "contributions-title": "Tlatequitiltilīlli $1 ītlahcuilōl",
-       "mycontris": "Notlahcuilōl",
+       "mycontris": "Notlahcuilol",
        "contribsub2": "$1 ($2)",
        "uctop": "(āxcān tlapatlaliztli)",
        "month": "Īhuīcpa mētztli (auh achtopa):",
        "sp-contributions-search": "Tiquintlatēmōz tlapatlaliztli",
        "sp-contributions-username": "IP nozo tlatequitiltilīlli ītōcā:",
        "sp-contributions-submit": "Tlatēmōz",
-       "whatlinkshere": "In tlein quitzonhuilia nicān",
+       "whatlinkshere": "In tlein quitzonhuilia nican",
        "whatlinkshere-title": "Zāzaniltin quitzonhuiliah $1",
        "whatlinkshere-page": "Zāzanilli:",
        "linkshere": "Inīn zāzaniltin quitzonhuiliah '''[[:$1]]''' īhuīc:",
        "tooltip-pt-mycontris": "{{GENDER:|Motlahcuilōl}}",
        "tooltip-pt-login": "Tihuelīti timocalaqui, tēl ahmo tihuīquilia.",
        "tooltip-pt-logout": "Tiquīzāz",
-       "tooltip-ca-talk": "Inīn tlahcuilōlli zānīllī ītechcopa",
-       "tooltip-ca-edit": "Xicpatla inīn tlaīxtli",
+       "tooltip-ca-talk": "Iteixnamiquiliz itechpa inin tlahcuilolli",
+       "tooltip-ca-edit": "Ticpatlaz inin tlahcuilolli",
        "tooltip-ca-addsection": "Tictzintīz yancuic xeliuhcāyōtl.",
        "tooltip-ca-viewsource": "Inīn zāzanilli ōmoquīxti. Tihuelīti tiquitta ītlahtōlcaquiliztilōni.",
        "tooltip-ca-history": "Achtopa āxcān zāzanilli īhuān in tlatequitiltilīlli ōquinchīuhqueh",
        "tooltip-ca-watch": "Ticcēntilīz inīn zāzanilli motlachiyalizhuīc",
        "tooltip-ca-unwatch": "Ahtictlachiyāz inīn zāzanilli",
        "tooltip-search": "Tlatēmōz īpan {{SITENAME}}",
-       "tooltip-search-go": "Tiyaz in zāzanilhuīc īca inīn huel melāhuac tōcaitl intlā yez",
+       "tooltip-search-go": "Tiyaz ihuicpa tlahcuilolli ica inin huel melahuac tocaitl intla oncah",
        "tooltip-search-fulltext": "Tictemōz inīn tlahcuilōlli in āmac",
-       "tooltip-p-logo": "Xiquitta in tohuēyitlaīx",
-       "tooltip-n-mainpage": "Tiquittaz in huēyitlaīxtli",
+       "tooltip-p-logo": "Tiquittaz in yacatlahcuilolli",
+       "tooltip-n-mainpage": "Tiquittaz in yacatlahcuilolli",
        "tooltip-n-mainpage-description": "Xiquitta in tohuēyitlaīx",
        "tooltip-n-portal": "Tlachīhualiztechcopa, inōn tihuelīti titlachīhua, tlatēmoyān",
        "tooltip-n-recentchanges": "Yancuic īpan tlapatlaliztli in huiqui",
        "tooltip-n-randompage": "Tiquittaz centlaīxtli",
        "tooltip-n-help": "In tēmachtīlōyān",
        "tooltip-t-whatlinkshere": "Mochīntīn zāzaniltin huiquipan quitzonhuiliah nicān",
-       "tooltip-t-recentchangeslinked": "Yancuic tlapatlaliztli inīn zāzanilhuīcpa moquintzonhuilia",
+       "tooltip-t-recentchangeslinked": "Yancuic tlapatlaliztli ipan tlahcuiloltin tlein quitzonhuilia nican",
        "tooltip-feed-rss": "RSS tlachicāhualiztli inīn zāzaniltechcopa",
        "tooltip-feed-atom": "Atom tlachicāhualiztli inīn zāzaniltechcopa",
        "tooltip-t-contributions": "Tlapōhualmatl ītechpa {{GENDER:$1|inīn tlatequitiltilīlli}} ītlahcuilōl",
        "tooltip-t-emailuser": "Tiquihcuilōz inīn tlatequitiltililhuīc",
-       "tooltip-t-upload": "Tiquinquetzāz tlahcuilōlli",
+       "tooltip-t-upload": "Tiquinquetzaz tlahcuiloltin",
        "tooltip-t-specialpages": "Ìntlapòpòwaltekpànal mochtìn in nònkuâkìskàtlaìxtlapaltìn",
-       "tooltip-t-print": "Tepoztlahcuilōlli",
-       "tooltip-ca-nstab-main": "Xiquitta in tlamantlaīxtli",
+       "tooltip-t-print": "Tepoztlahcuilolli",
+       "tooltip-ca-nstab-main": "Tiquittaz tlein quipiya in tlahcuilolli",
        "tooltip-ca-nstab-user": "Xiquitta tlatequitiltilīlli īzāzanil",
        "tooltip-ca-nstab-special": "Inīn nōncuahquīzqui āmatl, auh ahmohuelitizpatla",
        "tooltip-ca-nstab-project": "Xiquitta in tlatequipanōllaīxtli",
        "fileduplicatesearch-filename": "Tlahcuilōlli ītōcā:",
        "fileduplicatesearch-submit": "Tlatēmōz",
        "fileduplicatesearch-info": "$1 × $2 pixelli<br />Tlahcuilōlli īxquichiliz: $3<br />MIME iuhcāyōtl: $4",
-       "specialpages": "Nònkuâkìskàtlaìxtlapaltìn",
+       "specialpages": "Noncuahquizqui tlahcuilolli",
        "specialpages-note": "* Yeliztli nōncuahquīzqui āmatl.\n* <span class=\"mw-specialpagerestricted\">Tlaquīxtīlli nōncuahquīzqui āmatl.</span>\n* <span class=\"mw-specialpagecached\">Tlatlātīlli nōncuahquīzqui āmatl (aocmo monemitīa).</span>",
        "specialpages-group-other": "Oksẻki nònkuâkìskàtlaìxtlapaltìn",
        "specialpages-group-login": "Ximocalaqui / ximomachiyōmaca",
        "htmlform-selectorother-other": "Occē",
        "rightsnone": "ahtlein",
        "revdelete-summary": "ticpatlāz tlahcuilōltōn",
-       "searchsuggest-search": "Mà motèmo",
+       "searchsuggest-search": "Tlatemoliztli",
        "api-error-ok-but-empty": "Tlâtek îtlakawilistli: Âmò tènankilia in tlatèmakani.",
        "api-error-overwrite": "Awel motlâkuilnepanòltis sè èwalli tlèn yi katki.",
        "api-error-stashfailed": "Tlâtek îtlakawilistli: In tlatèmakani awel òkeuh in èwalpanòni.",
index c72ae68..b46c21b 100644 (file)
        "nextrevision": "Khah-sin ê siu-tēng-pún→",
        "currentrevisionlink": "khoàⁿ siōng sin ê siu-tēng-pún",
        "cur": "taⁿ",
-       "next": "下一个",
+       "next": "āu",
        "last": "chêng",
        "page_first": "Tùi thâu-chêng",
        "page_last": "Tùi āu-piah",
        "tag-list-wrapper": "([[Special:Tags|$1 ê piau-chhiam]]: $2)",
        "logentry-move-move": "$1 {{GENDER:$2|sóa}} $3 chit ia̍h khì $4",
        "logentry-newusers-create": "已經{{GENDER:$2|開好}}用者口座 $1",
-       "searchsuggest-search": "Chhoē",
+       "searchsuggest-search": "Chhoē {{SITENAME}}",
        "expandtemplates": "Khok-chhiong pang-bô͘",
        "expand_templates_input": "Su-ji̍p bûn-jī:",
        "expand_templates_output": "Kiat-kó:",
index 5a1a330..6d21b41 100644 (file)
        "htmlform-title-not-exists": "$1 nun esiste.",
        "htmlform-user-not-exists": "<strong>$1</strong> nun esiste.",
        "htmlform-user-not-valid": "<strong>$1</strong> nun è nu nomme buono.",
-       "sqlite-has-fts": "$1 cu supporto 'e ricerche full-text",
-       "sqlite-no-fts": "$1 senza supporto 'e ricerche full-text",
        "logentry-delete-delete": "$1 {{GENDER:$2|scancellaje}} 'a paggena $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|arrepigliaje}} 'a paggena $3",
        "logentry-delete-event": "$1 {{GENDER:$2|cagnaie}} 'a vesibbiletà 'e {{PLURAL:$5|n'azione d' 'o riggistro|$5 aziune d' 'o riggistro}} ncopp' 'a 'a $3: $4",
index 0eb17e9..20db454 100644 (file)
@@ -49,7 +49,8 @@
                        "Matma Rex",
                        "SuperPotato",
                        "Nemo bis",
-                       "Telaneo"
+                       "Telaneo",
+                       "Jon Harald Søby"
                ]
        },
        "tog-underline": "Strek under lenker:",
        "newwindow": "(åpnes i et nytt vindu)",
        "cancel": "Avbryt",
        "moredotdotdot": "Mer …",
-       "morenotlisted": "Denne lista er ufullstendig.",
+       "morenotlisted": "Denne lista er muligens ufullstendig.",
        "mypage": "Min brukerside",
        "mytalk": "Diskusjon",
        "anontalk": "Brukerdiskusjon",
        "talk": "Diskusjon",
        "views": "Visninger",
        "toolbox": "Verktøy",
+       "tool-link-userrights": "Endre {{GENDER:$1|brukergrupper}}",
+       "tool-link-emailuser": "Send {{GENDER:$1|brukeren}} en e-post",
        "userpage": "Vis brukerside",
        "projectpage": "Vis prosjektside",
        "imagepage": "Vis filside",
        "versionrequired": "MediaWiki-versjon $1 er påkrevd",
        "versionrequiredtext": "MediaWiki-versjon $1 er nødvendig for å bruke denne siden. Se [[Special:Version|versjonsiden]]",
        "ok": "OK",
+       "pagetitle": "$1 – {{SITENAME}}",
        "retrievedfrom": "Hentet fra «$1»",
        "youhavenewmessages": "Du har $1 ($2).",
        "youhavenewmessagesfromusers": "Du har $1 fra {{PLURAL:$3|en annen bruker| $3 brukere}} ($2).",
        "createacct-yourpasswordagain-ph": "Gjenta passordet",
        "userlogin-remembermypassword": "Hold meg innlogget",
        "userlogin-signwithsecure": "Logg inn med sikker tjener",
+       "cannotlogin-title": "Kan ikke logge inn",
+       "cannotlogin-text": "Innlogging er ikke mulig.",
        "cannotloginnow-title": "Kan ikke logge inn nå",
        "cannotloginnow-text": "Å logge inn er ikke mulig ved bruk av $1.",
+       "cannotcreateaccount-title": "Kan ikke opprette kontoer",
+       "cannotcreateaccount-text": "Direkte kontooppretting er ikke slått på på denne wikien.",
        "yourdomainname": "Ditt domene",
        "password-change-forbidden": "Du kan ikke endre passord på denne wikien.",
        "externaldberror": "Det var en ekstern autentifiseringsfeil, eller du kan ikke oppdatere din eksterne konto.",
        "eauthentsent": "En bekreftelsesmelding ble sendt til oppgitt e-postadresse. Før andre e-poster kan sendes til kontoen må du følge instruksjonene i e-posten for å bekrefte at kontoen faktisk er din.",
        "throttled-mailpassword": "En passordtilbakestillingsepost har allerede blitt sendt for mindre enn {{PLURAL:$1|en time|$1 timer}} siden.\nFor å forhindre misbruk kan kun én passordtilbakestillingsepost sendes per {{PLURAL:$1|time|$1 timer}}.",
        "mailerror": "Feil under sending av e-post: $1",
-       "acct_creation_throttle_hit": "Gjester med samme IP-adresse som deg har opprettet {{PLURAL:$1|én konto|$1 kontoer}} det siste døgnet, og det er ikke tillatt å opprette flere.\nSom et resultat kan det ikke opprettes flere kontoer fra denne IP-adressen.",
+       "acct_creation_throttle_hit": "Gjester med samme IP-adresse som deg har opprettet {{PLURAL:$1|én konto|$1 kontoer}} i løpet av $2, og det er ikke tillatt å opprette flere.\nSom et resultat kan det for tiden ikke opprettes flere kontoer fra denne IP-adressen.",
        "emailauthenticated": "Din e-postadresse ble bekreftet den $2 kl. $3.",
        "emailnotauthenticated": "Din e-postadresse er ikke bekreftet. Du vil ikke kunne motta e-post for noen av følgende egenskaper.",
        "noemailprefs": "Oppgi en e-postadresse for at disse funksjonene skal fungere.",
        "botpasswords-label-resetpassword": "Tilbakestill passord",
        "botpasswords-label-grants": "Tilgjengelige tildelinger:",
        "botpasswords-help-grants": "Hver tildeling gir tilgang til opplistede brukerrettigheter som brukerkontoen allerede har. Se [[Special:ListGrants|tildelingstabellen]] for mer informasjon.",
-       "botpasswords-label-restrictions": "Bruksbegrensninger:",
        "botpasswords-label-grants-column": "Bevilget",
        "botpasswords-bad-appid": "Robotnavnet \"$1\" er ikke gyldig.",
        "botpasswords-insert-failed": "Kunne ikke legge til robotnavnet \"$1\". Har det allerede blitt lagt til?",
        "botpasswords-updated-body": "Robotpassordet for boten «$1» til brukeren «$2» ble oppdatert.",
        "botpasswords-deleted-title": "Robotpassord slettet",
        "botpasswords-deleted-body": "Robotpassordet for boten «$1» til brukeren «$2» ble slettet.",
-       "botpasswords-newpassword": "Det nye passordet for å logge inn med <strong>$1</strong> er <strong>$2</strong>. <em>Vennligst lagre dette for fremtidig referanse.</em>",
+       "botpasswords-newpassword": "Det nye passordet for å logge inn med <strong>$1</strong> er <strong>$2</strong>. <em>Vennligst lagre dette for fremtidig referanse.</em> <br /> (For gamle roboter som trenger samme innloggingsnavn og brukernavn kan du også bruke <strong>$3</strong> som brukernavn og <strong>$4</strong> som passord.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider er ikke tilgjengelig.",
        "botpasswords-restriction-failed": "Begrensninger for robotpassord tillater ikke denne innloggingen.",
        "botpasswords-invalid-name": "Det angitte brukernavnet inneholder ikke separasjonstegnet for robotpassord (\"$1\").",
        "passwordreset-emailelement": "Brukernavn: \n$1\n\nMidlertidig passord: \n$2",
        "passwordreset-emailsentemail": "Hvis denne epostadressen er koblet til din konto, så vil det bli sendt en epost om tilbakestilling av passord.",
        "passwordreset-emailsentusername": "Hvis det finnes en epostadresse knyttet til dette brukernavnet, vil en epost med informasjon om tilbakestilling av passord bli sendt.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|E-post}} om passordtilbakestilling har blitt sendt. {{PLURAL:$1|Brukernavnet og passordet|Listen over brukernavn og passord}} vises under.",
-       "passwordreset-emailerror-capture2": "Kunne ikke sende e-post til {{GENDER:$2|brukeren}}: $1 {{PLURAL:$3|Brukernavnet og passordet|Listen over brukernavn og passord}} vises under.",
+       "passwordreset-emailsent-capture2": "{{PLURALS:$1|E-posten|E-postene}} om passordtilbakestilling har blitt sendt. {{PLURAL:$1|Brukernavnet og passordet|Listen over brukernavn og passord}} vises under.",
+       "passwordreset-emailerror-capture2": "Kunne ikke sende e-post til {{GENDER:$2|brukeren}}: $1 {{PLURAL:$3|Brukernavnet og passordet|Listen over brukernavn og passord}} vises her.",
        "passwordreset-nocaller": "En bruker må angis",
        "passwordreset-nosuchcaller": "Brukeren finnes ikke: $1",
        "passwordreset-ignored": "Passordtilbakestillingen ble ikke håndtert. Har ingen leverandør blitt konfigurert?",
        "invalid-content-data": "Ugyldig innhold",
        "content-not-allowed-here": "Innholdsmodellen «$1» er ikke tillatt på siden [[$2]]",
        "editwarning-warning": "Ved å forlate siden kan du miste alle endringer du har gjort.\nHvis du er innlogget, kan du slå av denne advarselen under \"{{int:prefs-editing}}\"-avsnittet i dine innstillinger.",
+       "editpage-invalidcontentmodel-title": "Innholdsmodellen støttes ikke",
+       "editpage-invalidcontentmodel-text": "Innholdsmodellen «$1» støttes ikke.",
        "editpage-notsupportedcontentformat-title": "Innholdsformatet er ikke støttet",
        "editpage-notsupportedcontentformat-text": "Innholdsformatet $1 er ikke støttet av innholdsmodellen $2.",
        "content-model-wikitext": "wikitekst",
        "prefs-help-prefershttps": "Denne preferansen vil virke etter neste innlogging.",
        "prefswarning-warning": "Du har gjort endringer i dine innstillinger som ikke er lagret ennå.\nDersom du forlater denne siden utenk å klikke på \"$1\" blir ikke innstillingene dine oppdatert.",
        "prefs-tabs-navigation-hint": "Tips: Du kan bruke venstre- og høyrepiltastene for å navigere mellom fanene i fanelisten",
-       "userrights": "Rettighets&shy;kontroll",
+       "userrights": "Bruker&shy;rettighets&shy;kontroll",
        "userrights-lookup-user": "Ordne brukergrupper",
        "userrights-user-editname": "Fyll inn et brukernavn:",
        "editusergroup": "Endre {{GENDER:$1|brukergrupper}}",
        "upload-dialog-disabled": "Filopplastinger med denne dialogen er slått av for denne wikien.",
        "upload-dialog-title": "Last opp fil",
        "upload-dialog-button-cancel": "Avbryt",
+       "upload-dialog-button-back": "Tilbake",
        "upload-dialog-button-done": "Utført",
        "upload-dialog-button-save": "Lagre",
        "upload-dialog-button-upload": "Last opp",
        "listusers": "Brukerliste",
        "listusers-editsonly": "Vis bare brukere med redigeringer",
        "listusers-creationsort": "Sorter etter opprettelsesdato",
-       "listusers-desc": "Sorter i avtakende rekkefølge",
+       "listusers-desc": "Sorter i synkende rekkefølge",
        "usereditcount": "{{PLURAL:$1|én redigering|$1 redigeringer}}",
        "usercreated": "{{GENDER:$3|Opprettet}} $2 $1",
        "newpages": "Nye sider",
        "nopagetext": "Siden du ville flytte finnes ikke.",
        "pager-newer-n": "{{PLURAL:$1|1 nyere|$1 nyere}}",
        "pager-older-n": "{{PLURAL:$1|1 eldre|$1 eldre}}",
-       "suppress": "Historikkrydding",
+       "suppress": "Undertrykk",
        "querypage-disabled": "Denne spesialsiden er deaktivert av ytelsesårsaker.",
        "apihelp": "API hjelp",
        "apihelp-no-such-module": "Modulen «$1» ikke funnet.",
        "apisandbox-results-fixtoken-fail": "Henting av nøkkelen «$1» mislyktes.",
        "apisandbox-alert-page": "Felter på denne siden er ugyldige.",
        "apisandbox-alert-field": "Verdien til dette feltet er ugyldig.",
+       "apisandbox-continue": "Fortsett",
+       "apisandbox-continue-clear": "Tøm",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} vil [https://www.mediawiki.org/wiki/API:Query#Continuing_queries fortsette] forrige forespørsel; {{int:apisandbox-continue-clear}} vil tømme fortsettelsesrelaterte parametre.",
        "booksources": "Bokkilder",
        "booksources-search-legend": "Søk etter bokkilder",
        "booksources-search": "Søk",
        "listgrouprights-namespaceprotection-header": "Navneromsbegrensinger",
        "listgrouprights-namespaceprotection-namespace": "Navnerom",
        "listgrouprights-namespaceprotection-restrictedto": "Rettighet(er) som tillater at brukeren redigerer",
+       "listgrants": "Tildelinger",
        "listgrants-summary": "Følgende er en liste over tildelinger samt hvilke brukerrettigheter de gir tilgang til. Brukere kan autorisere applikasjoner til å bruke kontoen deres, med rettigheter begrenset til de gitt av tildelingene brukeren har godkjent. En applikasjon som handler på vegne av en bruker kan imidlertid aldri benytte seg av rettigheter brukeren ikke selv har.\nDet kan finnes [[{{MediaWiki:Listgrouprights-helppage}}|ytterligere informasjon]] om de ulike rettighetene.",
+       "listgrants-grant": "Tildeling",
        "listgrants-rights": "Rettigheter",
        "trackingcategories": "Sporingskategori",
        "trackingcategories-summary": "Denne siden lister sporingskategorier som er automatisk befolket av Mediawiki-programvaren. Navnene deres kan endres ved å redigere de tilhørende systembeskjedene i {{ns:8}}-navnerommet.",
        "trackingcategories-name": "Beskjednavn",
        "trackingcategories-desc": "Kategori-inklusjonskriterium",
        "restricted-displaytitle-ignored": "Sider med ignorerte visningstitler",
+       "restricted-displaytitle-ignored-desc": "Denne sidens <code><nowiki>{{DISPLAYTITLE}}</nowiki></code> er ignorert fordi den ikke tilsvarer sidens faktiske tittel.",
        "noindex-category-desc": "Denne siden indekseres ikke av roboter fordi den er merket med det magiske ordet <code><nowiki>__NOINDEX__</nowiki></code> og er i navnerom der dette flagget tillates.",
        "index-category-desc": "Denne siden er påført det magiske ordet <code><nowiki>__INDEX__</nowiki></code> (og er i et navnerom hvor flagget er tillatt), og vil derfor bli indeksert av roboter selv når det normalt ikke ville skjedd.",
        "post-expand-template-inclusion-category-desc": "Sidestørrelsen er større enn <code>$wgMaxArticleSize</code> etter at alle maler er utvidet, så noen maler ble ikke utvidet.",
        "watchnologin": "Ikke logget inn",
        "addwatch": "Legg til i overvåkningslisten",
        "addedwatchtext": "«[[:$1]]» og den tilhørende diskusjonssiden er lagt til i [[Special:Watchlist|overvåkningslisten]] din.",
+       "addedwatchtext-talk": "«[[:$1]]» og dens tilhørende side har blitt lagt til i [[Special:Watchlist|overvåkningslista di]].",
        "addedwatchtext-short": "Siden «$1» har blitt lagt til i overvåkningslisten din.",
        "removewatch": "Fjern fra overvåkningslisten",
        "removedwatchtext": "«[[:$1]]» og den tilhørende diskusjonssiden har blitt fjernet fra [[Special:Watchlist|overvåkningslisten din]].",
+       "removedwatchtext-talk": "«[[:$1]]» og dens tilhørende side har blitt fjernet fra [[Special:Watchlist|overvåkningslista di]].",
        "removedwatchtext-short": "Siden «$1» har blitt fjernet fra overvåkningslisten din.",
        "watch": "Overvåk",
        "watchthispage": "Overvåk denne siden",
        "rollbacklinkcount": "tilbakestill {{PLURAL:$1|én endring|$1 endringer}}",
        "rollbacklinkcount-morethan": "tilbakestill mer enn $1 {{PLURAL:$1|endring|endringer}}",
        "rollbackfailed": "Kunne ikke tilbakestille",
+       "rollback-missingparam": "Påkrevde parametere i forespørselen mangler.",
+       "rollback-missingrevision": "Kunne ikke laste revisjonsdata.",
        "cantrollback": "Kan ikke fjerne redigering; den siste brukeren er den eneste forfatteren.",
        "alreadyrolled": "Kan ikke fjerne den siste redigeringen på [[$1]] av [[User:$2|$2]] ([[User talk:$2|diskusjon]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]); en annen har allerede redigert siden eller fjernet redigeringen.\n\nDen siste redigeringen ble foretatt av [[User:$3|$3]] ([[User talk:$3|diskusjon]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).",
        "editcomment": "Redigeringskommentaren var: <em>$1</em>",
        "revertpage": "Tilbakestilte endringer av [[Special:Contributions/$2|$2]] ([[User talk:$2|brukerdiskusjon]]) til siste versjon av [[User:$1|$1]]",
        "revertpage-nouser": "Tilbakestilt endringer av skjult bruker til siste versjon av\n{{GENDER:$1|[[User:$1|$1]]}}",
        "rollback-success": "Tilbakestilte endringer av $1; endret til siste versjon av $2.",
+       "rollback-success-notify": "Tilbakestilte endringer av $1;\nendret tilbake til siste revisjon av $2. [$3 Vis endringer]",
        "sessionfailure-title": "Sesjonsfeil",
        "sessionfailure": "Det ser ut til å være et problem med innloggingen din, og den ble avbrutt av sikkerhetshensyn. Trykk ''Tilbake'' i nettleseren din, oppdater siden og prøv igjen.",
        "changecontentmodel": "Endre innholdsmodell for en side",
        "changecontentmodel-title-label": "Sidetittel",
        "changecontentmodel-model-label": "Ny innholdsmodell",
        "changecontentmodel-reason-label": "Begrunnelse:",
+       "changecontentmodel-submit": "Endre",
        "changecontentmodel-success-title": "Innholdsmodellen ble endret",
        "changecontentmodel-success-text": "Innholdstypen for [[:$1]] har blitt endret.",
        "changecontentmodel-cannot-convert": "Innholdet på [[:$1]] kan ikke konverteres til en type av $2.",
        "changecontentmodel-nodirectediting": "Innholdsmodellen $1 støtter ikke direkte redigering",
+       "changecontentmodel-emptymodels-title": "Ingen innholdsmodeller er tilgjengelige",
+       "changecontentmodel-emptymodels-text": "Innholdet på [[:$1]] kan ikke konverteres til noen type.",
        "log-name-contentmodel": "Logg over endringer i endringsloggen",
        "log-description-contentmodel": "Hendelseslogg relatert til innholdsmodellen for en side",
+       "logentry-contentmodel-new": "$1 {{GENDER:$2|opprettet}} siden $3 med den ikke-standard innholdsmodellen «$5»",
        "logentry-contentmodel-change": "$1 {{GENDER:$2|endret}} innholdsmodellen for siden $3 fra «$4» til «$5»",
        "logentry-contentmodel-change-revertlink": "tilbakestill",
        "logentry-contentmodel-change-revert": "tilbakestill",
        "undeletehistorynoadmin": "Denne artikkelen har blitt slettet. Grunnen for slettingen vises i oppsummeringen nedenfor, sammen med detaljer om brukerne som redigerte siden før den ble slettet. Teksten i disse slettede revisjonene er kun tilgjengelig for administratorer.",
        "undelete-revision": "Slettet revisjon av $1 (per $4 $5) av $3:",
        "undeleterevision-missing": "Ugyldig eller manglende revisjon. Du kan ha en ødelagt lenke, eller revisjonen har blitt fjernet fra arkivet.",
+       "undeleterevision-duplicate-revid": "{{PLURAL:$1|Én revisjon|$1 revisjoner}} kunne ikke gjenopprettes, fordi {{PLURAL:$1|dens|deres}} <code>rev_id</code> allerede er i bruk.",
        "undelete-nodiff": "Ingen tidligere revisjoner funnet.",
        "undeletebtn": "Gjenopprett",
        "undeletelink": "vis/gjenopprett",
        "sp-contributions-newbies-sub": "For nybegynnere",
        "sp-contributions-newbies-title": "Bidrag av nye kontoer",
        "sp-contributions-blocklog": "blokkeringslogg",
-       "sp-contributions-suppresslog": "undertrykte brukerbidrag",
-       "sp-contributions-deleted": "slettede brukerbidrag",
+       "sp-contributions-suppresslog": "undertrykte {{GENDER:$1|brukerbidrag}}",
+       "sp-contributions-deleted": "slettede {{GENDER:$1|brukerbidrag}}",
        "sp-contributions-uploads": "opplastinger",
        "sp-contributions-logs": "logger",
        "sp-contributions-talk": "diskusjon",
        "sp-contributions-username": "IP-adresse eller brukernavn:",
        "sp-contributions-toponly": "Vis kun endringer som er gjeldende revisjoner",
        "sp-contributions-newonly": "Bare vis bidrag som er sideopprettinger",
+       "sp-contributions-hideminor": "Skjul mindre endringer",
        "sp-contributions-submit": "Søk",
        "whatlinkshere": "Hva lenker hit",
        "whatlinkshere-title": "Sider som lenker til «$1»",
        "unblock": "Fjern blokkering av bruker",
        "blockip": "Blokker {{GENDER:$1|bruker}}",
        "blockip-legend": "Blokker bruker",
-       "blockiptext": "Bruk skjemaet under for å blokkere en IP-adresses tilgang til å redigere artikler. Dette må kun gjøres for å forhindre hærverk, og i overensstemmelse med [[{{MediaWiki:Policy-url}}|retningslinjene]]. Fyll ut en spesiell begrunnelse under.",
+       "blockiptext": "Bruk skjemaet under for å blokkere skrivetilgangen til en spesifikk IP-adresse eller et brukernavn.\nDette bør kun gjøres for å forhindre vandalisme, og i samsvar med [[{{MediaWiki:Policy-url}}|retningslinjene]].\nSkriv inn en spesifikk grunn nedenfor (for eksempel ved å angi hvilke sider som ble vandalisert).\nDu kan blokkere IP-intervaller med [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing CIDR]-syntaks; det største tillatte intervallet er /$1 for IPv4 og /$2 for IPv6.",
        "ipaddressorusername": "IP-adresse eller brukernavn",
        "ipbexpiry": "Varighet:",
        "ipbreason": "Årsak:",
        "ipb-unblock": "Opphev blokkering av et brukernavn eller en IP-adresse",
        "ipb-blocklist": "Vis gjeldende blokkeringer",
        "ipb-blocklist-contribs": "Bidrag fra {{GENDER:$1|$1}}",
+       "ipb-blocklist-duration-left": "$1 igjen",
        "unblockip": "Opphev blokkering",
        "unblockiptext": "Bruk skjemaet under for å gjenopprette skriveadgangen for en tidligere blokkert adresse eller bruker.",
        "ipusubmit": "Opphev blokkering",
        "block-log-flags-hiddenname": "brukernavn skjult",
        "range_block_disabled": "Muligheten til å blokkere flere IP-adresser om gangen er slått av.",
        "ipb_expiry_invalid": "Ugyldig utløpstid.",
+       "ipb_expiry_old": "Utløpstiden har allerede vært.",
        "ipb_expiry_temp": "For å skjule brukernavnet må blokkeringen være permanent.",
        "ipb_hide_invalid": "Denne kontoen kan ikke skjules; den har mer enn {{PLURAL:$1|én redigering|$1 redigeringer}}.",
        "ipb_already_blocked": "«$1» er allerede blokkert",
        "lockdbsuccesstext": "Databasen er låst.<br />Husk å [[Special:UnlockDB|låse den opp]] når du er ferdig med vedlikeholdet.",
        "unlockdbsuccesstext": "Databasen er låst opp.",
        "lockfilenotwritable": "Kan ikke skrive til databasen. For å låse eller åpne databasen, må denne kunne skrives til av tjeneren.",
+       "databaselocked": "Databasen er allerede låst.",
        "databasenotlocked": "Databasen er ikke låst.",
        "lockedbyandtime": "(av $1 den $2, kl $3)",
        "move-page": "Flytt $1",
        "move-page-legend": "Flytt side",
-       "movepagetext": "Når du bruker skjemaet nedenfor døper du om en side og flytter hele historikken til det nye navnet.\nDen gamle tittelen blir en omdirigeringsside til den nye tittelen.\nDu kan oppdatere omdirigeringer som peker til den opprinnelige tittelen automatisk.\nOm du velger å ikke gjøre det, sjekk at flyttingen ikke fører til [[Special:DoubleRedirects|doble]] eller [[Special:BrokenRedirects|ødelagte omdirigeringer]].\nDu er ansvarlig for at lenker fortsetter å peke til de sidene de er ment å peke til.\n\nLegg merke til at siden '''ikke''' kan flyttes hvis det allerede finnes en side med den nye tittelen, med mindre sistnevnte er tom eller er en omdirigeringsside uten historikk.\nDet betyr at du kan flytte en side tilbake dit den kom fra hvis du gjør en feil, og du kan ikke overskrive eksisterende sider ved et uhell.\n\n'''Advarsel!'''\nDette kan være en drastisk og uventet endring for en populær side;\nvær sikker på at du forstår konsekvensene av dette før du fortsetter.",
-       "movepagetext-noredirectfixer": "Skjemaet nedenfor vil gi en side ny tittel og flytte historikken dens til det nye navnet.\nDen gamle tittelen vil bli en omdirigering til den nye.\nSjekk om det blir [[Special:DoubleRedirects|doble]] eller [[Special:BrokenRedirects|ødelagte omdirigeringer]].\nDu er ansvarlig for å sjekke at lenker fortsetter å gå dit de skal.\n\nMerk at sider '''ikke''' blir flyttet om det allerede finnes en side med den tittelen, med mindre siden er tom eller en omdirigering og ikke har noen redigeringshistorikk.\nDette betyr at du kan endre tittelen til en tittel siden hadde tidligere, og at du ikke kan skrive over en eksisterende side.\n\n'''Advarsel!'''\nDette kan være en drastisk og uventet endring for en populær side;\nvær sikker på at du forstår konsekvensene av dette før du fortsetter.",
-       "movepagetalktext": "Den tilhørende diskusjonssiden vil automatisk bli flyttet sammen med siden '''med mindre:'''\n*Det allerede finnes en diskusjonsside som ikke er tom under det nye navnet, eller\n*Du fjerner markeringen i boksen nedenfor.\n\nI disse tilfellene er du nødt til å flytte eller flette siden manuelt, om ønskelig.",
+       "movepagetext": "Når du bruker skjemaet nedenfor døper du om en side og flytter hele historikken til det nye navnet.\nDen gamle tittelen blir en omdirigeringsside til den nye tittelen.\nDu kan oppdatere omdirigeringer som peker til den opprinnelige tittelen automatisk.\nOm du velger å ikke gjøre det, sjekk at flyttingen ikke fører til [[Special:DoubleRedirects|doble]] eller [[Special:BrokenRedirects|ødelagte omdirigeringer]].\nDu er ansvarlig for at lenker fortsetter å peke til de sidene de er ment å peke til.\n\nLegg merke til at siden <strong>ikke</strong> kan flyttes hvis det allerede finnes en side med den nye tittelen, med mindre sistnevnte er tom eller er en omdirigeringsside uten historikk.\nDet betyr at du kan flytte en side tilbake dit den kom fra hvis du gjør en feil, og du kan ikke overskrive eksisterende sider ved et uhell.\n\n<strong>Merk:</strong>\nDette kan være en drastisk og uventet endring for en populær side;\nvær sikker på at du forstår konsekvensene av dette før du fortsetter.",
+       "movepagetext-noredirectfixer": "Skjemaet nedenfor vil gi en side ny tittel og flytte historikken dens til det nye navnet.\nDen gamle tittelen vil bli en omdirigering til den nye.\nSjekk om det blir [[Special:DoubleRedirects|doble]] eller [[Special:BrokenRedirects|ødelagte omdirigeringer]].\nDu er ansvarlig for å sjekke at lenker fortsetter å gå dit de skal.\n\nMerk at sider <strong>ikke</strong> blir flyttet om det allerede finnes en side med den tittelen, med mindre siden er en omdirigering og ikke har noen redigeringshistorikk.\nDette betyr at du kan endre tittelen til en tittel siden hadde tidligere, og at du ikke kan skrive over en eksisterende side.\n\n<strong>Merk:</strong>\nDette kan være en drastisk og uventet endring for en populær side;\nvær sikker på at du forstår konsekvensene av dette før du fortsetter.",
+       "movepagetalktext": "Om du merker av denne boksen vil den tilhørende diskusjonssiden også flyttes til den nye tittelen, med mindre en ikke-tom diskusjonsside allerede finnes der.\n\nOm det er tilfelle må du flytte eller flette siden manuelt om det er ønskelig.",
        "moveuserpage-warning": "'''Advarsel:''' Du er i ferd med å flytte en brukerside. Merk at kun siden vil bli flyttet; brukernavnet vil ''ikke'' bli endret.",
        "movecategorypage-warning": "<strong>Advarsel:</strong> Du er i ferd med å flytte en kategoriside. Merk at kun siden blir flyttet, og at sider i det gamle kategorinavnet <em>ikke</em> blir omkategorisert til det nye navnet.",
        "movenologintext": "Du må være registrert bruker og være [[Special:UserLogin|logget på]] for å flytte en side.",
        "movenosubpage": "Denne siden har ingen undersider.",
        "movereason": "Årsak:",
        "revertmove": "tilbakestill",
-       "delete_and_move_text": "==Sletting nødvendig==\nMålsiden «[[:$1]]» finnes allerede. Vil du slette den så denne siden kan flyttes dit?",
+       "delete_and_move_text": "Målsiden «[[:$1]]» finnes fra før.\nØnsker du å slette den for å muliggjøre flyttingen?",
        "delete_and_move_confirm": "Ja, slett siden",
        "delete_and_move_reason": "Slettet for å muliggjøre flytting fra \"[[$1]]\"",
        "selfmove": "Kilde- og destinasjonstittel er den samme; kan ikke flytte siden.",
        "move-leave-redirect": "La det være igjen en omdirigering",
        "protectedpagemovewarning": "'''Advarsel:''' Denne siden har blitt låst slik at kun brukere med administratorrettigheter kan flytte den.\nDet siste loggelementet er oppgitt under som referanse:",
        "semiprotectedpagemovewarning": "'''Merk:''' Denne siden har blitt låst slik at kun registrerte brukere kan flytte den.\nDet siste loggelementet er oppgitt under som referanse:",
-       "move-over-sharedrepo": "== Filen finnes ==\n[[:$1]] finnes på en delt kilde. Dersom du flytter en fil til dette navnet, vil du overstyre den delte filen.",
+       "move-over-sharedrepo": "[[:$1]] finnes på et delt fillager. Flytting av filen til denne tittelen vil overstyre den delte filen.",
        "file-exists-sharedrepo": "Det valgte filnavnet er allerede i bruk på en delt kilde.\nVennligst velg et annet navn.",
        "export": "Eksporter sider",
        "exporttext": "Du kan eksportere teksten og redigeringshistorikken for en bestemt side eller en gruppe sider i XML.\nDette kan senere importeres til en annen wiki som bruker MediaWiki ved hjelp av [[Special:Import|importsiden]].\n\nFor å eksportere sider, skriv inn titler i tekstboksen under, én tittel per linje, og velg om du vil ha kun nåværende versjon, eller alle versjoner i historikken.\n\nDersom du bare vil ha nåværende versjon, kan du også bruke en lenke, for eksempel [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]] for siden «[[{{MediaWiki:Mainpage}}]]».",
        "export-download": "Lagre som fil",
        "export-templates": "Ta med maler",
        "export-pagelinks": "Inkluder lenkede sider med en dybde på:",
+       "export-manual": "Legg til sider manuelt:",
        "allmessages": "Systemmeldinger",
        "allmessagesname": "Navn",
        "allmessagesdefault": "Standardtekst",
        "import-nonewrevisions": "Ingen revisjoner ble importert: De var enten allerede på plass, eller hoppet over pga. feil.",
        "xml-error-string": "$1 på linje $2, kolonne $3 (byte: $4): $5",
        "import-upload": "Last opp XML-data",
-       "import-token-mismatch": "Sesjonsdata mistet. Venligst prøv igjen.",
+       "import-token-mismatch": "Sesjonsdata mistet.\n\nDu kan ha blitt logget ut. <strong>Sjekk at du fortsatt er logget inn og prøv igjen.</strong>\nOm det fortsatt ikke fungerer, prøv å [[Special:UserLogout|logge ut]] og logge inn igjen, og sjekk om netteleseren din tillater informasjonskapsler fra denne siden.",
        "import-invalid-interwiki": "Kan ikke importere fra angitt wiki.",
        "import-error-edit": "Siden «$1» ble ikke importert fordi du ikke har tillatelse til å redigere den.",
        "import-error-create": "Siden «$1» ble ikke importert fordi du ikke har tillatelse til å opprette den.",
        "tooltip-feed-rss": "RSS-mating for denne siden",
        "tooltip-feed-atom": "Atom-mating for denne siden",
        "tooltip-t-contributions": "En liste over bidrag fra {{GENDER:$1|denne brukeren}}",
-       "tooltip-t-emailuser": "Send en e-post til denne brukeren",
+       "tooltip-t-emailuser": "Send en e-post til {{GENDER:$1|denne brukeren}}",
        "tooltip-t-info": "Mer informasjon om denne siden",
        "tooltip-t-upload": "Last opp filer",
        "tooltip-t-specialpages": "Liste over alle spesialsider",
        "tooltip-ca-nstab-category": "Vis kategorisiden",
        "tooltip-minoredit": "Merk dette som en mindre endring",
        "tooltip-save": "Lagre endringene dine",
+       "tooltip-publish": "Publiser endringene dine",
        "tooltip-preview": "Forhåndsvis endringene dine, vennligst gjør dette før du lagrer!",
        "tooltip-diff": "Vis hvilke endringer du har gjort på teksten",
        "tooltip-compareselectedversions": "Se forskjellen mellom de to valgte revisjonene av denne siden",
        "pageinfo-article-id": "Side-ID",
        "pageinfo-language": "Språk for sideinnholdet",
        "pageinfo-content-model": "Modell for sideinnhold",
+       "pageinfo-content-model-change": "endre",
        "pageinfo-robot-policy": "Bot-indeksering",
        "pageinfo-robot-index": "Tillatt",
        "pageinfo-robot-noindex": "Ikke tillatt",
        "pageinfo-category-files": "Antall filer",
        "markaspatrolleddiff": "Merk som patruljert",
        "markaspatrolledtext": "Merk denne siden som patruljert",
+       "markaspatrolledtext-file": "Merk denne filversjonen som patruljert",
        "markedaspatrolled": "Merket som patruljert",
        "markedaspatrolledtext": "Den valgte revisjonen av [[:$1]] har blitt merket som patruljert.",
        "rcpatroldisabled": "Siste endringer-patruljering er slått av",
        "newimages-legend": "Filnavn",
        "newimages-label": "Filnavn (helt eller delvis):",
        "newimages-showbots": "Vis opplastinger av botter",
+       "newimages-hidepatrolled": "Skjul patruljerte opplastinger",
        "noimages": "Ingenting å se.",
        "ilsubmit": "Søk",
        "bydate": "etter dato",
        "confirmemail_body_set": "Noen med IP-adresse $1, mest sannsynlig deg, har satt e-postadressen for kontoen «$2» til denne adressen på {{SITENAME}}.\n\nFor å bekrefte at denne kontoen faktisk tilhører deg og for å slå på e-post-tjenestene fra {{SITENAME}}, må du åpne denne lenken i nettleseren din:\n\n$3\n\nOm kontoen *ikke* tilhører deg, følg denne lenken for å avbryte e-post-bekreftelsen:\n\n$5\n\nDenne bekreftelseskoden utløper $4.",
        "confirmemail_invalidated": "Bekreftelse av e-postadresse avbrutt",
        "invalidateemail": "Avbryt bekreftelse av e-postadresse",
+       "notificationemail_subject_changed": "Registrert epostadresse på {{SITENAME}} har blitt endret",
+       "notificationemail_subject_removed": "Registrert epostadresse på {{SITENAME}} har blitt fjernet",
+       "notificationemail_body_changed": "Noen, antageligvis du (fra IP-adressen $1), har endret epostadressen til kontoen «$2» til «$3» på {{SITENAME}}.\n\nOm det ikke var du som gjorde det, kontakt en sideadministrator umiddelbart.",
+       "notificationemail_body_removed": "Noen, antageligvis deg (fra IP-adressen $1), har fjernet epostadressen til kontoen «$2» på {{SITENAME}}.\n\nOm det ikke var du som gjorde det, kontakt en sideadministrator umiddelbart.",
        "scarytranscludedisabled": "[Interwiki-transkludering er slått av]",
        "scarytranscludefailed": "[Malen kunne ikke hentes for $1]",
        "scarytranscludefailed-httpstatus": "[Henting av mal for $1 feilet: HTTP $2]",
        "confirm-watch-top": "Legg denne siden til overvåkningslisten din?",
        "confirm-unwatch-button": "OK",
        "confirm-unwatch-top": "Fjern denne siden fra overvåkningslisten din?",
+       "confirm-rollback-button": "OK",
+       "confirm-rollback-top": "Tilbakestill redigeringer på denne siden?",
        "quotation-marks": "«$1»",
        "imgmultipageprev": "← forrige side",
        "imgmultipagenext": "neste side &rarr;",
        "hebrew-calendar-m11-gen": "Ab",
        "hebrew-calendar-m12-gen": "Elúl",
        "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|diskusjon]])",
+       "timezone-local": "Lokal",
        "duplicate-defaultsort": "Advarsel: Standardsorteringen «$2» tar over for den tidligere sorteringen «$1».",
        "duplicate-displaytitle": "<strong>Advarsel:</strong> Visningstittel \"$2\" erstatter tidligere visningstittel \"$1\".",
-       "invalid-indicator-name": "<p>Feil:</strong> Sidestatus-indikatornes <code>navn</code>-attributt kan ikke være tomt.",
+       "restricted-displaytitle": "<strong>Advarsel:</strong> Visningstittelen «$1» ble ignorert siden den ikke tilsvarer sidens faktiske tittel.",
+       "invalid-indicator-name": "<p>Feil:</strong> Sidestatus-indikatornes <code>name</code>-attributt kan ikke være tomt.",
        "version": "Versjon",
        "version-extensions": "Installerte utvidelser",
        "version-skins": "Installerte drakter",
        "version-libraries-license": "Lisens",
        "version-libraries-description": "Beskrivelse",
        "version-libraries-authors": "Forfattere",
-       "redirect": "Omdiriger via filnavn, bruker eller versjonsid",
-       "redirect-summary": "Denne spesialsiden omdirigerer til en fil (hvis et filnavn angis), en side (hvis et redigeringsnummer angis) eller en brukerside (hvis en numerisk brukeridentifikator angis).\nEksempler:[[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/revision/328429]], or [[{{#Special:Redirect}}/user/101]].",
+       "redirect": "Omdiriger via filnavn, bruker-, side-, revisjons- eller logg-ID.",
+       "redirect-summary": "Denne spesialsiden omdirigerer til en fil (hvis et filnavn angis), en side (om revisjons- eller side-ID angis), en brukerside (om bruker-ID angis), eller en loggoppføring (om logg-ID angis). Bruk: [[{{#Special:Redirect}}/file/Eksempel.jpg]], [[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]], [[{{#Special:Redirect}}/user/101]] eller [[{{#Special:Redirect}}/logid/186]].",
        "redirect-submit": "Gå",
        "redirect-lookup": "Oppslag:",
        "redirect-value": "Verdi:",
        "redirect-page": "Side-ID",
        "redirect-revision": "Sideversjon",
        "redirect-file": "Filnavn",
+       "redirect-logid": "Logg-ID",
        "redirect-not-exists": "Verdi er ikke funnet",
        "fileduplicatesearch": "Søk etter duplikatfiler",
        "fileduplicatesearch-summary": "Søk etter duplikatfiler basert på dets hash-verdi.",
        "tag-filter": "Filter for [[Special:Tags|tagger]]:",
        "tag-filter-submit": "Filtrer",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Tagg|Tagger}}]]: $2)",
+       "tag-mw-contentmodelchange": "innholdsmodellendring",
+       "tag-mw-contentmodelchange-description": "Redigeringer som [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel endrer innholdsmodellen] til en side",
        "tags-title": "Tagger",
        "tags-intro": "Denne siden lister opp taggene programvaren kan merke en endring med, og hva de betyr.",
        "tags-tag": "Taggnavn",
        "tags-actions-header": "Handlinger",
        "tags-active-yes": "Ja",
        "tags-active-no": "Nei",
-       "tags-source-extension": "Definert av en utvidelse",
+       "tags-source-extension": "Definert av programvaren",
        "tags-source-manual": "Brukes manuelt av brukere og roboter",
        "tags-source-none": "Brukes ikke lenger",
        "tags-edit": "rediger",
        "tags-deactivate": "deaktiver",
        "tags-hitcount": "{{PLURAL:$1|én endring|$1 endringer}}",
        "tags-manage-no-permission": "Du har ikke tillatelse til å behandle tagger.",
+       "tags-manage-blocked": "Du kan ikke behandle endringstagger mens du er blokkert.",
        "tags-create-heading": "Opprett ny tagg",
        "tags-create-explanation": "Som standard vil nyopprettede tagger være tilgjengelige for brukere og roboter.",
        "tags-create-tag-name": "Taggnavn:",
        "tags-delete-not-found": "Taggen «$1» finnes ikke.",
        "tags-delete-too-many-uses": "Taggen «$1» brukes på mer enn $2 {{PLURAL:$2|revisjon|revisjoner}}, hvilket betyr at den ikke kan slettes.",
        "tags-delete-warnings-after-delete": "Taggen «$1» ble slettet, men følgende {{PLURAL:$2|advarsel|advarsler}} dukket opp:",
+       "tags-delete-no-permission": "Du har ikke tillatelse til å slette endringstagger.",
        "tags-activate-title": "Aktiver taggen",
        "tags-activate-question": "Du er i ferd med å aktivere taggen «$1».",
        "tags-activate-reason": "Årsak:",
        "tags-deactivate-not-allowed": "Det er ikke mulig å deaktivere taggen «$1».",
        "tags-deactivate-submit": "Deaktiver",
        "tags-apply-no-permission": "Du har ikke tilgang til å legge til merker sammen med dine endringer.",
+       "tags-apply-blocked": "Du kan ikke bruke endringstagger med endringene dine mens du er blokkert.",
        "tags-apply-not-allowed-one": "Merket «$1» kan ikke legges til manuelt.",
        "tags-apply-not-allowed-multi": "{{PLURAL:$2|Det følgende merket|De følgende merkene}} kan ikke legges til manuelt: $1",
        "tags-update-no-permission": "Du har ikke tilgang til å legge til eller fjerne merker fra individuelle revisjoner eller loggposter.",
+       "tags-update-blocked": "Du kan ikke legge til eller fjerne endringstagger mens du er blokkert.",
        "tags-update-add-not-allowed-one": "Merket «$1» kan ikke legges til manuelt.",
        "tags-update-add-not-allowed-multi": "{{PLURAL:$2|Det følgende merket|De følgende merkene}} kan ikke legges til manuelt: $1",
        "tags-update-remove-not-allowed-one": "Merket «$1» kan ikke fjernes.",
        "htmlform-cloner-create": "Legg til mer",
        "htmlform-cloner-delete": "Fjern",
        "htmlform-cloner-required": "Minst én verdi kreves.",
+       "htmlform-date-placeholder": "ÅÅÅÅ-MM-DD",
+       "htmlform-time-placeholder": "TT:MM:SS",
+       "htmlform-datetime-placeholder": "ÅÅÅÅ-MM-DD TT:MM:SS",
+       "htmlform-date-invalid": "Verdien du anga gjenkjennes ikke som en dato. Prøv formatet ÅÅÅÅ-MM-DD.",
+       "htmlform-time-invalid": "Verdien du anga gjenkjennes ikke som et tidspunkt. Prøv formatet TT:MM:SS.",
+       "htmlform-datetime-invalid": "Verdien du anga gjenkjennes ikke som en dato og et tidspunkt. Prøv formatet ÅÅÅÅ-MM-DD TT:MM:SS.",
+       "htmlform-date-toolow": "Verdien du anga er før den tidligste tillatte datoen $1.",
+       "htmlform-date-toohigh": "Verdien du anga er etter den siste tillatte datoen $1.",
+       "htmlform-time-toolow": "Verdien du anga er før det tidligste tillatte tidspunktet $1.",
+       "htmlform-time-toohigh": "Verdien du anga er etter det siste tillatte tidspunktet $1.",
+       "htmlform-datetime-toolow": "Verdien du anga er før den tidligste tillatte datoen og tidspunktet $1.",
+       "htmlform-datetime-toohigh": "Verdien du anga er etter den siste tillatte datoen og tidspunktet $1.",
        "htmlform-title-badnamespace": "[[:$1]] er ikke i «{{ns:$2}}»-navnerommet",
        "htmlform-title-not-creatable": "«$1» er ikke en opprettbar sidetittel",
        "htmlform-title-not-exists": "$1 forefinnes ikke.",
        "htmlform-user-not-exists": "<strong>$1</strong> eksisterer ikke.",
        "htmlform-user-not-valid": "<strong>$1</strong> er ikke et gyldig brukernavn.",
-       "sqlite-has-fts": "$1 med støtte for fulltekstsøk",
-       "sqlite-no-fts": "$1 uten støtte for fulltekstsøk",
        "logentry-delete-delete": "$1 {{GENDER:$2|slettet}} siden $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|gjenopprettet}} siden $3",
        "logentry-delete-event": "$1 {{GENDER:$2|endret}} synligheten av {{PLURAL:$5|en logghendelse|$5 logghendelser}} på $3: $4",
        "feedback-external-bug-report-button": "Registrer en teknisk sak",
        "feedback-dialog-title": "Send tilbakemelding",
        "feedback-dialog-intro": "Bruk det enkle skjemaet under om du vil gi tilbakemelding. Kommentaren din vil bli lagt ut på siden «$1» sammen med brukernavnet ditt.",
-       "feedback-error-title": "Feil",
        "feedback-error1": "Feil: Ukjent resultat fra API",
        "feedback-error2": "Feil: Redigering feilet",
        "feedback-error3": "Feil: Ingen respons fra API",
        "feedback-thanks": "Din tilbakemelding til siden \"[ $2  $1 ]\" er sendt. Takk skal du ha!",
        "feedback-thanks-title": "Takk!",
        "feedback-useragent": "Brukeragent",
-       "searchsuggest-search": "Søk",
+       "searchsuggest-search": "Søk i {{SITENAME}}",
        "searchsuggest-containing": "inneholder …",
+       "api-error-autoblocked": "Din IP-adresse har blitt blokkert automatisk fordi den ble brukt av en blokkert bruker.",
        "api-error-badaccess-groups": "Du har ikke tillatelse til å laste opp filer til denne wikien.",
        "api-error-badtoken": "Intern feil: Ugyldig nøkkel.",
+       "api-error-blocked": "Du har blitt blokkert fra å redigere.",
        "api-error-copyuploaddisabled": "Opplasting ved URL er deaktivert på denne tjeneren.",
        "api-error-duplicate": "Det er allerede {{PLURAL:$1|en annen fil|flere andre filer}} på denne siden med samme innhold.",
        "api-error-duplicate-archive": "Det fantes {{PLURAL:$1|en annen fil|noen andre filer}} på siden som hadde samme innhold, men {{PLURAL:$1|den|de}} ble slettet.",
        "api-error-nomodule": "Intern feil: ingen opplastningsmodul har blitt valgt.",
        "api-error-ok-but-empty": "Intern feil: ingen svar fra server.",
        "api-error-overwrite": "Det er ikke tillatt å overskrive eksisterende filer.",
+       "api-error-ratelimited": "Du prøver å laste opp flere filer enn wikien tillater i et kort tidsrom.\nPrøv igjen om noen minutter.",
        "api-error-stashfailed": "Internal error: tjeneren greide ikke å lagre midlertidig fil.",
        "api-error-publishfailed": "Intern feil: Tjeneren greide ikke å publisere midlertidig fil.",
        "api-error-stasherror": "Det oppstod en feil mens filen ble lastet opp til stash.",
        "api-error-unknownerror": "Ukjent feil: «$1».",
        "api-error-uploaddisabled": "Opplastning har blitt deaktivert på denne wikien.",
        "api-error-verification-error": "Filen kan være korrupt, eller ha feil filendelse.",
+       "api-error-was-deleted": "En fil med dette navnet har tidligere blitt lastet opp og senere slettet.",
        "duration-seconds": "$1 {{PLURAL:$1|sekund|sekunder}}",
        "duration-minutes": "$1 {{PLURAL:$1|minutt|minutter}}",
        "duration-hours": "$1 {{PLURAL:$1|time|timer}}",
        "expand_templates_preview": "Forhåndsvisning",
        "expand_templates_preview_fail_html": "<em>Fordi {{SITENAME}} har slått på rå HTML og sesjonsdata ble tapt er forhåndsvisningen skjult for å beskytte mot JavaScript-angrep.</em>\n\n<strong>Om dette er et legitimt forsøk på å forhåndsvise, prøv på nytt.</strong> Om det fortsatt ikke fungerer, prøv å [[Special:UserLogout|logge ut]] og logge inn igjen, og sjekk at nettleseren din godtar nettkapsler fra dette nettstedet.",
        "expand_templates_preview_fail_html_anon": "<em>Fordi {{SITENAME}} har slått på rå HTML og du ikke er logget inn er forhåndsvisningen skjult for å beskytte mot JavaScript-angrep.</em>\n\n<strong>Om dette er et legitimt forsøk på å forhåndsvise, [[Special:UserLogin|logg inn]] og prøv igjen.</strong>",
+       "expand_templates_input_missing": "Du må angi noe inndata.",
        "pagelanguage": "Endre sidespråk",
        "pagelang-name": "Side",
        "pagelang-language": "Språk",
        "log-name-pagelang": "Logg for språkendringer",
        "log-description-pagelang": "Dette er en logg som viser endringer i sidespråk",
        "logentry-pagelang-pagelang": "$1 {{GENDER:$2|endret}} språk for $3 fra $4 til $5.",
-       "default-skin-not-found": "Ops! Standarddrakten for wikien din, definert i <code dir=\"ltr\">$wgDefaultSkin</code> som <code>$1</code>, er ikke tilgjengelig.\n\nInstallasjonen din ser ut til å inneholde følgende {{PLURAL:$4|drakt|drakter}}. Se [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual: Skin configuration] for informasjon om hvordan du kan slå {{PLURAL:$4|denne på|disse på og velge en standarddrakt}}.\n\n$2\n\n; Om du nettopp har installert MediaWiki:\n: Du har trolig installert fra git, eller direkte fra kildekoden med en annen metode. Dette er forventet. Prøv å installere noen drakter fra [https://www.mediawiki.org/wiki/Category:All_skins mediawiki.org sin draktbase] ved å\n:* laste ned [https://www.mediawiki.org/wiki/Download tarball-installereren], som kommer med flere drakter og utvidelser. Du kan kopiere og lime inn <code>skins/</code>-mappen fra denne.\n:* laste ned individuelle drakter fra [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org].\n:* klone en av <code>mediawiki/skins/*</code>-lagrene via git inn i <code>skins/</code> -mappen av din MediaWiki-installasjon.\n: Å gjøre dette skal ikke forstyrre git-mappen din om du er en MediaWiki-utvikler.\n\n; Om du nettopp har oppgradert MediaWiki:\n: MediaWiki 1.24 og nyere slår ikke lenger på automatisk installerte drakter (se [https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery Manual: Skin autodiscovery]). Du kan lime inn følgende {{PLURAL:$5|linje|linjer}} i <code>LocalSettings.php</code> for å slå på {{PLURAL:$5|den|alle}} nåværende installerte {{PLURAL:$5|drakten|drakter}}:\n\n<pre dir=\"ltr\">$3</pre>\n\n; Om du nettopp har endret <code>LocalSettings.php</code>:\n: Dobbelsjekk draktnavnene for skrivefeil.",
-       "default-skin-not-found-no-skins": "Ops! Standarddrakten for wikien din, definert i <code>$wgDefaultSkin</code> som <code>$1</code>, er ikke tilgjengelig.\n\nDu har ingen installerte drakter.\n\n;Om du nettopp har installert eller oppgradert MediaWiki:\n: Du installerte trolig fra git, eller direkte fra kildekoden med en annen metode. Dette er forventet. MediaWiki 1.24 og nyere inkluderer ingen drakter i hovedarkivet. Prøv å installere noen drakter fra [https://www.mediawiki.org/wiki/Category:All_skins mediawiki.orgs draktmappe], ved å:\n:* laste ned [https://www.mediawiki.org/wiki/Download tarball-installereren], som kommer med mange drakter og tillegg. Du kan kopiere og lime inn <code>skins/</code>-mappen fra denne.\n:* laste ned individuelle drakt-tarballer fra [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org].\n:* klone en av <code>mediawiki/skins/*</code>-arkivene via git til <code dir=\"ltr\">skins/</code>-mappa i din MediaWiki-installasjon.\n: Å gjøre dette vil ikke forstyrre ditt git-arkiv om du er en MediaWiki-utvikler. Se [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual:Skin configuration] for informasjon om hvordan du slår på drakter og velger en standarddrakt.",
+       "default-skin-not-found": "Ops! Standarddrakten for wikien din, definert i <code dir=\"ltr\">$wgDefaultSkin</code> som <code>$1</code>, er ikke tilgjengelig.\n\nInstallasjonen din ser ut til å inneholde følgende {{PLURAL:$4|drakt|drakter}}. Se [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual: Skin configuration] for informasjon om hvordan du kan slå {{PLURAL:$4|denne på|disse på og velge en standarddrakt}}.\n\n$2\n\n; Om du nettopp har installert MediaWiki:\n: Du har trolig installert fra git, eller direkte fra kildekoden med en annen metode. Dette er forventet. Prøv å installere noen drakter fra [https://www.mediawiki.org/wiki/Category:All_skins mediawiki.org sin draktbase] ved å\n:* laste ned [https://www.mediawiki.org/wiki/Download tarball-installereren], som kommer med flere drakter og utvidelser. Du kan kopiere og lime inn <code>skins/</code>-mappen fra denne.\n:* laste ned individuelle drakter fra [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org].\n:* [https://www.mediawiki.org/wiki/Download_from_Git#Using_Git_to_download_MediaWiki_skins Bruk Git for å laste ned drakter].\n: Å gjøre dette skal ikke forstyrre git-mappen din om du er en MediaWiki-utvikler.\n\n; Om du nettopp har oppgradert MediaWiki:\n: MediaWiki 1.24 og nyere slår ikke lenger på automatisk installerte drakter (se [https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery Manual: Skin autodiscovery]). Du kan lime inn følgende {{PLURAL:$5|linje|linjer}} i <code>LocalSettings.php</code> for å slå på {{PLURAL:$5|den|alle}} installerte {{PLURAL:$5|drakten|drakter}}:\n\n<pre dir=\"ltr\">$3</pre>\n\n; Om du nettopp har endret <code>LocalSettings.php</code>:\n: Dobbelsjekk draktnavnene for skrivefeil.",
+       "default-skin-not-found-no-skins": "Ops! Standarddrakten for wikien din, definert i <code>$wgDefaultSkin</code> som <code>$1</code>, er ikke tilgjengelig.\n\nDu har ingen installerte drakter.\n\n;Om du nettopp har installert eller oppgradert MediaWiki:\n: Du installerte trolig fra git, eller direkte fra kildekoden med en annen metode. Dette er forventet. MediaWiki 1.24 og nyere inkluderer ingen drakter i hovedarkivet. Prøv å installere noen drakter fra [https://www.mediawiki.org/wiki/Category:All_skins mediawiki.orgs draktmappe], ved å:\n:* laste ned [https://www.mediawiki.org/wiki/Download tarball-installereren], som kommer med mange drakter og tillegg. Du kan kopiere og lime inn <code>skins/</code>-mappen fra denne.\n:* laste ned individuelle drakt-tarballer fra [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org].\n:* [https://www.mediawiki.org/wiki/Download_from_Git#Using_Git_to_download_MediaWiki_skins Bruk Git for å laste ned drakter].\n: Å gjøre dette vil ikke forstyrre ditt git-arkiv om du er en MediaWiki-utvikler. Se [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual:Skin configuration] for informasjon om hvordan du slår på drakter og velger en standarddrakt.",
        "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (slått på)",
        "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 (<strong>slått av</strong>)",
        "mediastatistics": "Mediestatistikk",
        "special-characters-group-ipa": "IPA",
        "special-characters-group-symbols": "Symboler",
        "special-characters-group-greek": "Gresk",
+       "special-characters-group-greekextended": "Utvidet gresk",
        "special-characters-group-cyrillic": "Kyrillisk",
        "special-characters-group-arabic": "Arabisk",
        "special-characters-group-arabicextended": "Utvidet arabisk",
        "mw-widgets-dateinput-placeholder-month": "ÅÅÅÅ-MM",
        "mw-widgets-titleinput-description-new-page": "siden eksisterer ikke ennå",
        "mw-widgets-titleinput-description-redirect": "omdiriger til $1",
+       "sessionmanager-tie": "Kan ikke kombinere flere forespørselsautentiseringstyper: $1",
        "sessionprovider-generic": "$1 sesjoner",
        "sessionprovider-mediawiki-session-cookiesessionprovider": "informasjons&shy;kapsel-baserte sesjoner",
-       "randomrootpage": "Tilfeldig rotside"
+       "sessionprovider-nocookies": "Informasjonskapsler er kanskje slått av. Sjekk at du har slått på informasjonskapsler og prøv igjen.",
+       "randomrootpage": "Tilfeldig rotside",
+       "log-action-filter-block": "Type blokkering:",
+       "log-action-filter-contentmodel": "Type innholdsmodellendring:",
+       "log-action-filter-delete": "Type sletting:",
+       "log-action-filter-import": "Type import:",
+       "log-action-filter-managetags": "Type tagghåndteringshandling:",
+       "log-action-filter-move": "Type flytting:",
+       "log-action-filter-newusers": "Type kontooppretting:",
+       "log-action-filter-patrol": "Type patruljering:",
+       "log-action-filter-protect": "Type beskyttelse:",
+       "log-action-filter-rights": "Type rettighetsendring:",
+       "log-action-filter-suppress": "Type undertrykking:",
+       "log-action-filter-upload": "Type opplasting:",
+       "log-action-filter-all": "Alle",
+       "log-action-filter-block-block": "Blokkering",
+       "log-action-filter-block-reblock": "Blokkeringsendring",
+       "log-action-filter-block-unblock": "Avblokkering",
+       "log-action-filter-contentmodel-change": "Endring av innholdsmodell",
+       "log-action-filter-contentmodel-new": "Oppretting av side med ikke-standard innholdsmodell",
+       "log-action-filter-delete-delete": "Sidesletting",
+       "log-action-filter-delete-restore": "Sidegjenoppretting",
+       "log-action-filter-delete-event": "Loggsletting",
+       "log-action-filter-delete-revision": "Revisjonssletting",
+       "log-action-filter-import-interwiki": "Transwiki-importering",
+       "log-action-filter-import-upload": "XML-opplastingsimportering",
+       "log-action-filter-managetags-create": "Taggopprettelse",
+       "log-action-filter-managetags-delete": "Taggsletting",
+       "log-action-filter-managetags-activate": "Taggaktivering",
+       "log-action-filter-managetags-deactivate": "Taggdeaktivering",
+       "log-action-filter-move-move": "Flytting uten overskriving av omdirigeringer",
+       "log-action-filter-move-move_redir": "Flytting med overskriving av omdirigeringer",
+       "log-action-filter-newusers-create": "Opprettelse av anonym bruker",
+       "log-action-filter-newusers-create2": "Opprettelse av registrert bruker",
+       "log-action-filter-newusers-autocreate": "Automatisk opprettelse",
+       "log-action-filter-newusers-byemail": "Opprettelse med passord sendt på epost",
+       "log-action-filter-patrol-patrol": "Manuell patruljering",
+       "log-action-filter-patrol-autopatrol": "Automatisk patruljering",
+       "log-action-filter-protect-protect": "Beskyttelse",
+       "log-action-filter-protect-modify": "Beskyttelsesendring",
+       "log-action-filter-protect-unprotect": "Avbeskyttelse",
+       "log-action-filter-protect-move_prot": "Flyttingsbeskyttelse",
+       "log-action-filter-rights-rights": "Manuell endring",
+       "log-action-filter-rights-autopromote": "Automatisk endring",
+       "log-action-filter-suppress-event": "Loggundertrykking",
+       "log-action-filter-suppress-revision": "Revisjonsundertrykking",
+       "log-action-filter-suppress-delete": "Sideundertrykking",
+       "log-action-filter-suppress-block": "Brukerundertrykking ved blokkering",
+       "log-action-filter-suppress-reblock": "Brukerundertrykking ved gjenblokkering",
+       "log-action-filter-upload-upload": "Ny opplasting",
+       "log-action-filter-upload-overwrite": "Gjenopplasting",
+       "authmanager-authn-not-in-progress": "Autentisering foregår ikke eller sesjonsdata er tapt. Start igjen fra begynnelsen.",
+       "authmanager-authn-no-primary": "De oppgitte akkreditivene kunne ikke autentiseres.",
+       "authmanager-authn-no-local-user": "De oppgitte akkreditivene tilhører ingen bruker på denne wikien.",
+       "authmanager-authn-no-local-user-link": "De oppgitte akkreditivene er gyldige men tilhører ingen brukere på denne wikien. Logg inn på en annen måte eller opprett en ny bruker, og du vil ha mulighet til å lenke dine tidligere akkreditiver med den kontoen.",
+       "authmanager-authn-autocreate-failed": "Autooprrettelse av lokal konto mislyktes: $1",
+       "authmanager-change-not-supported": "De oppgitte akkreditivene kan ikke endres, siden ingenting ville bruke dem.",
+       "authmanager-create-disabled": "Kontoopprettelse er deaktivert.",
+       "authmanager-create-from-login": "For å opprette kontoen din, fyll inn feltene nedenfor.",
+       "authmanager-create-not-in-progress": "Kontoopprettelse foregår ikke eller sesjonsdata er tapt. Start igjen fra begynnelsen.",
+       "authmanager-create-no-primary": "De oppgitte akkreditivene kunne ikke brukes for kontooppretting.",
+       "authmanager-link-no-primary": "De oppgitte akkreditivene kunne ikke brukes for kontolenking.",
+       "authmanager-link-not-in-progress": "Kontolenking foregår ikke eller sesjonsdata er tapt. Start igjen fra begynnelsen.",
+       "authmanager-authplugin-setpass-failed-title": "Passordendring mislyktes",
+       "authmanager-authplugin-setpass-failed-message": "Autentiseringspluginen avviste passordendringen.",
+       "authmanager-authplugin-create-fail": "Autentiseringspluginen avviste kontoopprettelsen.",
+       "authmanager-authplugin-setpass-denied": "Autentiseringspluginen tillater ikke endring av passord.",
+       "authmanager-authplugin-setpass-bad-domain": "Ugyldig domene.",
+       "authmanager-autocreate-noperm": "Automatisk kontoopprettelse tillates ikke.",
+       "authmanager-autocreate-exception": "Automatisk kontoopprettelse er midlertidig deaktivert på grunn av tidligere feil.",
+       "authmanager-userdoesnotexist": "Brukerkontoen «$1» er ikke registrert.",
+       "authmanager-userlogin-remembermypassword-help": "Hvorvidt passordet skal huskes lenger enn sesjonslengden.",
+       "authmanager-username-help": "Brukernavn for autentisering.",
+       "authmanager-password-help": "Passord for autentisering.",
+       "authmanager-domain-help": "Domene for ekstern autentisering.",
+       "authmanager-retype-help": "Passord igjen for å bekrefte.",
+       "authmanager-email-label": "Epost",
+       "authmanager-email-help": "Epostadresse",
+       "authmanager-realname-label": "Virkelig navn",
+       "authmanager-realname-help": "Brukerens virkelige navn",
+       "authmanager-provider-password": "Passordbasert autentisering",
+       "authmanager-provider-password-domain": "Passord- og domenebasert autentisering",
+       "authmanager-provider-temporarypassword": "Midlertidig passord",
+       "authprovider-confirmlink-message": "Basert på dine nylige innloggingsforsøk kan følgende kontoer lenkes til den wikikonto. Å lenke dem muliggjør innlogging via de kontoene. Vennligst velg hvilke som skal lenkes.",
+       "authprovider-confirmlink-request-label": "Kontoer som skal lenkes",
+       "authprovider-confirmlink-success-line": "$1: Lenking gjennomført.",
+       "authprovider-confirmlink-failed": "Konto kunne ikke lenkes fullstendig: $1",
+       "authprovider-confirmlink-ok-help": "Fortsett etter at feilmeldinger om lenking har blitt vist.",
+       "authprovider-resetpass-skip-label": "Hopp over",
+       "authprovider-resetpass-skip-help": "Hopp over nullstilling av passordet.",
+       "authform-nosession-login": "Autentiseringen lyktes, men nettleseren din kan ikke «huske» å være innlogget.\n\n$1",
+       "authform-nosession-signup": "Kontoen ble opprettet, men nettleseren kan ikke «huske» å være innlogget.\n\n$1",
+       "authform-newtoken": "Manglende nøkkel. $1",
+       "authform-notoken": "Mangler nøkkel",
+       "authform-wrongtoken": "Feil nøkkel",
+       "specialpage-securitylevel-not-allowed-title": "Ikke tillatt",
+       "specialpage-securitylevel-not-allowed": "Beklager, du har ikke tillatelse til å bruke denne siden fordi identiteten din ikke kunne bekreftes.",
+       "authpage-cannot-login": "Kunne ikke starte innlogging.",
+       "authpage-cannot-login-continue": "Kunne ikke fortsette innlogging. Sesjonen din har trolig fått et tidsavbrudd.",
+       "authpage-cannot-create": "Kunne ikke starte kontoopprettelse.",
+       "authpage-cannot-create-continue": "Kunne ikke fortsette kontoopprettelse. Sesjonen din har trolig fått et tidsavbrudd.",
+       "authpage-cannot-link": "Kunne ikke starte kontolenking.",
+       "authpage-cannot-link-continue": "Kunne ikke fortsette kontolenking. Sesjonen din har trolig fått et tidsavbrudd.",
+       "cannotauth-not-allowed-title": "Ingen tilgang",
+       "cannotauth-not-allowed": "Du har ikke tillatelse til å bruke denne siden",
+       "changecredentials": "Endre akkreditiver",
+       "changecredentials-submit": "Endre akkreditiver",
+       "changecredentials-invalidsubpage": "$1 er ikke en gyldig akkreditivtype.",
+       "changecredentials-success": "Akkreditivene dine har blitt endret.",
+       "removecredentials": "Fjern akkreditiver",
+       "removecredentials-submit": "Fjern akkreditiver",
+       "removecredentials-invalidsubpage": "$1 er ikke en gyldig akkreditivtype.",
+       "removecredentials-success": "Akkreditivene dine har blitt fjernet.",
+       "credentialsform-provider": "Akkreditivtype:",
+       "credentialsform-account": "Kontonavn:",
+       "cannotlink-no-provider-title": "Det er ingen kontoer som kan lenkes",
+       "cannotlink-no-provider": "Det er ingen kontoer som kan lenkes.",
+       "linkaccounts": "Lenk kontoer",
+       "linkaccounts-success-text": "Kontoen ble lenket.",
+       "linkaccounts-submit": "Lenk kontoer",
+       "unlinkaccounts": "Fjern lenking av kontoer",
+       "unlinkaccounts-success": "Kontoens lenking ble fjernet.",
+       "authenticationdatachange-ignored": "Autentiseringsdataendringen ble ikke håndtert. Muligens ble ingen tilbyder konfigurert?",
+       "userjsispublic": "Merk: JavaScript-undersidene bør ikke inneholde konfidensielle data, siden de kan ses av andre brukere.",
+       "usercssispublic": "Merk: CSS-undersidene bør ikke inneholde konfidensielle data siden de kan ses av andre brukere.",
+       "restrictionsfield-badip": "Ugyldig IP-adresse eller intervall: $1",
+       "restrictionsfield-label": "Tillatte IP-intervaller:",
+       "restrictionsfield-help": "Én IP-adresse eller CIDR-intervall per linje. For å slå på alt, bruk <br /><code>0.0.0.0/0</code><br /><code>::/0</code>"
 }
index fd3ccea..0456e94 100644 (file)
@@ -28,6 +28,7 @@
        "tog-hideminor": "सामान्य सम्पादनहरूलाई नयाँ परिवर्तनहरूबाट लुकाउने",
        "tog-hidepatrolled": "गस्ती गरिएका सम्पादनहरूलाई नयाँ परिवर्तनहरूबाट लुकाउने",
        "tog-newpageshidepatrolled": "गस्ती गरिएका पृष्ठहरूलाई नयाँ पृष्ठ सूचीबाट लुकाउने",
+       "tog-hidecategorization": "पृष्ठहरूको श्रेणीकरण हटाउनुहोस्",
        "tog-extendwatchlist": "निगरानी सूचीलाई सबै परिवर्तनहरू देखाउने गरी बढाउने, हालैको परिवर्तनहरू बाहेक",
        "tog-usenewrc": "पृष्ठका भर्खरका परिवर्तन र अवलोकन सूचीको आधारमा सामूहिक परिवर्तनहरू",
        "tog-numberheadings": "शीर्षकहरूलाई स्वत:अङ्कित गर्नुहोस्",
@@ -38,6 +39,7 @@
        "tog-watchdefault": "मैले सम्पादन गरेको पृष्ठ र फाइल निगरानी सूचीमा थप्ने",
        "tog-watchmoves": "मैले सारेका पृष्ठहरू र फाइलहरूलाई निगरानी सूचीमा थप्ने",
        "tog-watchdeletion": "मैले हटाएका पृष्ठहरू र फाइलहरूलाई निगरानी सूचीमा थप्ने",
+       "tog-watchuploads": "मेरा नयाँ फाइलहरूलाई मेरो निगरानी सूचीमा राख्ने ।",
        "tog-watchrollback": "मैले रोलब्याक गरेका पृष्ठहरूलाई मेरो निगरानी सूचीमा थप्ने।",
        "tog-minordefault": "सबै सम्पादनहरूलाई पूर्वनिर्धारित रुपमा सामान्य चिनो लगाउने",
        "tog-previewontop": "सम्पादन सन्दुक अघि पूर्वरुप देखाउने",
        "tog-watchlisthidebots": "बोट सम्पादनहरू निगरानी सूचीबाट लुकाउने",
        "tog-watchlisthideminor": "सामान्य सम्पादनहरू निगरानी सूचीबाट लुकाउने",
        "tog-watchlisthideliu": "प्रवेश गरेका प्रयोगकर्ताहरूको सम्पादन निगरानी सूचीबाट लुकाउने",
+       "tog-watchlistreloadautomatically": "जहिले पनि छननी बदल्न निगरानी सूचीलाई आफै लोड गर्नुहोस् (जावास्क्रिप्ट अनिवार्य)",
        "tog-watchlisthideanons": "अज्ञात प्रयोगकर्ताहरूबाट गरिएको सम्पादन निगरानी सूचीबाट लुकाउने",
        "tog-watchlisthidepatrolled": "गस्ती गरिएका सम्पादनहरू मेरो निगरानी सूचीबाट लुकाउने",
+       "tog-watchlisthidecategorization": "पृष्ठहरूको श्रेणीकरण हटाउनुहोस्",
        "tog-ccmeonemails": "मैले अन्य प्रयोगकर्ताहरूलाई पठाउने इ-मेलको प्रतिलिपि मलाई पठाउने",
        "tog-diffonly": "तलका पृष्ठहरूको भिन्नहरू सामग्री नदेखाउने",
        "tog-showhiddencats": "लुकाइएको श्रेणीहरू देखाउने",
        "october-date": "अक्टोबर $1",
        "november-date": "नोभेम्बर $1",
        "december-date": "डिसेम्बर $1",
+       "period-am": "पूर्वाह्न",
+       "period-pm": "अपराह्न",
        "pagecategories": "{{PLURAL:$1|श्रेणी|श्रेणीहरू}}",
        "category_header": "\"$1\" श्रेणीमा भएका लेखहरू",
        "subcategories": "उपश्रेणीहरू",
        "newwindow": "(नयाँ विन्डोमा खुल्छ)",
        "cancel": "रद्द",
        "moredotdotdot": "थप...",
-       "morenotlisted": "यà¥\8b à¤¸à¥\82à¤\9aà¥\80 à¤ªà¥\82रà¥\8dण à¤¹à¥\88न।",
+       "morenotlisted": "यà¥\8b à¤¸à¥\82à¤\9aà¥\80 à¤ªà¥\82रà¥\8dण à¤\9bà¥\88न ।",
        "mypage": "पृष्ठ",
        "mytalk": "वार्ता",
        "anontalk": "वार्ता",
        "qbedit": "सम्पादन गर्ने",
        "qbpageoptions": "यो पेज",
        "qbmyoptions": "मेरो पेज",
-       "faq": "धà¥\88रà¥\88 à¤¸à¥\8bधिà¤\8fà¤\95ा à¤ªà¥\8dरशà¥\8dनहरà¥\81",
-       "faqpage": "Project:धà¥\88रà¥\88 à¤¸à¥\8bधिà¤\8fà¤\95ा à¤ªà¥\8dरशà¥\8dनहरà¥\81",
+       "faq": "धà¥\88रà¥\88 à¤¸à¥\8bधिà¤\8fà¤\95ा à¤ªà¥\8dरशà¥\8dनहरà¥\82",
+       "faqpage": "Project:धà¥\88रà¥\88 à¤¸à¥\8bधिà¤\8fà¤\95ा à¤ªà¥\8dरशà¥\8dनहरà¥\82",
        "actions": "कार्यहरु",
        "namespaces": "नेमस्पेस",
        "variants": "बहुरुपहरू",
        "tagline": "{{SITENAME}}बाट",
        "help": "सहयोग",
        "search": "खोज्ने",
+       "search-ignored-headings": " #<!-- leave this line exactly as it is --> <pre>\n# Headings that will be ignored by search.\n# Changes to this take effect as soon as the page with the heading is indexed.\n# You can force page reindexing by doing a null edit.\n# The syntax is as follows:\n#   * Everything from a \"#\" character to the end of the line is a comment.\n#   * Every non-blank line is the exact title to ignore, case and everything.\nReferences\nExternal links\nSee also\n #</pre> <!-- leave this line exactly as it is -->",
        "searchbutton": "खोज्नुहोस्",
        "go": "जाने",
        "searcharticle": "खोज्ने",
        "backlinksubtitle": "← $1",
        "retrievedfrom": " \"$1\" बाट निकालिएको",
        "youhavenewmessages": "तपाईंको लागि ($2) मा  $1 छ ।",
-       "youhavenewmessagesfromusers": "तपाईंको लागि  {{PLURAL:$3|प्रयोगकर्ता|$3 प्रयोगकर्ताहरू}} ($2) बाट $1",
-       "youhavenewmessagesmanyusers": "तपाà¤\88à¤\81लाई धेरै प्रयोगकर्ताहरू($2) बाट $1 छ ।",
+       "youhavenewmessagesfromusers": "तपाईंको लागि {{PLURAL:$3|प्रयोगकर्ता|$3 प्रयोगकर्ताहरू}} का $1 छन् । ($2)",
+       "youhavenewmessagesmanyusers": "तपाà¤\88à¤\82लाई धेरै प्रयोगकर्ताहरू($2) बाट $1 छ ।",
        "newmessageslinkplural": "{{PLURAL:$1|एउटा नयाँ सन्देश|999=नयाँ सन्देशहरू}}",
        "newmessagesdifflinkplural": "अन्तिम {{PLURAL:$1|परिवर्तन|999=परिवर्तनहरू}}",
        "youhavenewmessagesmulti": "तपाईंको लागि $1 मा  नयाँ सन्देशहरू छन्",
        "nstab-project": "आयोजना पृष्ठ",
        "nstab-image": "फाइल",
        "nstab-mediawiki": "सन्देश",
-       "nstab-template": "ढाँचा (टेम्प्लेट)",
+       "nstab-template": "ढाँचा",
        "nstab-help": "सहायता पृष्ठ",
        "nstab-category": "श्रेणी",
        "mainpage-nstab": "मुख्य पृष्ठ",
        "databaseerror-query": "क्वेरी: $1",
        "databaseerror-function": "फङ्सन : $1",
        "databaseerror-error": "त्रुटि: $1",
+       "transaction-duration-limit-exceeded": "To avoid creating high replication lag, this transaction was aborted because the write duration ($1) exceeded the $2 second limit.\nIf you are changing many items at once, try doing multiple smaller operations instead.",
        "laggedslavemode": "<strong>चेतावनी:</strong> पृष्ठमा हालका अद्यतनहरू नहुनसक्छन् ।",
        "readonly": "डेटाबेस बन्द गरिएको छ",
        "enterlockreason": "ताल्चा मार्नुको कारण दिनुहोस्, साथै ताल्चा हटाउने समयको अवधि अनुमान लगाउनुहोस्।",
        "missingarticle-rev": "(संशोधन #: $1)",
        "missingarticle-diff": "(परि: $1, $2)",
        "readonly_lag": "डेटाबेस स्वतः बन्द गरिएको छ जबकि अधिनस्थ डेटाबेस सर्वरले मूल पहिल्याउँदैछ।",
+       "nonwrite-api-promise-error": "'Promise-Non-Write-API-Action' लाई एचटीटीपी शीर्षक द्वारा पठाईयो तर एपीआईमा लेखन मोडल छ ।",
        "internalerror": "आन्तरिक त्रुटि",
        "internalerror_info": "आन्तरिक त्रुटि: $1",
        "internalerror-fatal-exception": "प्रकारको गम्भीर अपवाद \"$1\"",
        "viewsource": "स्रोत हेर्नुहोस",
        "viewsource-title": " $1 को स्रोत हेर्नुहोस",
        "actionthrottled": "कार्य रोकियो",
-       "actionthrottledtext": "सà¥\8dपाम à¤°à¥\8bà¤\95थामà¤\95à¥\8b à¤²à¤¾à¤\97ि , à¤¤à¤ªà¤¾à¤\88à¤\81लाई यो कार्य थोरै समयमा धेरै पटक गर्नबाट सिमित गरिएको छ, र तपाईंले आफ्नो सिमा पार गरिसक्नु भयो ।\nकृपया केही मिनेट पछि पुन: प्रयास गर्नुहोस्  ।",
+       "actionthrottledtext": "सà¥\8dपाम à¤°à¥\8bà¤\95थामà¤\95à¥\8b à¤²à¤¾à¤\97ि , à¤¤à¤ªà¤¾à¤\88à¤\82लाई यो कार्य थोरै समयमा धेरै पटक गर्नबाट सिमित गरिएको छ, र तपाईंले आफ्नो सिमा पार गरिसक्नु भयो ।\nकृपया केही मिनेट पछि पुन: प्रयास गर्नुहोस्  ।",
        "protectedpagetext": "यो पृष्ठ सम्पादन हुनबाट बचाउन सम्पादनमा तथा अन्यकार्यमा रोक लगाइएको छ।",
-       "viewsourcetext": "तपाà¤\88à¤\81लà¥\87 यस पृष्ठको स्रोत हेर्न र प्रतिलिपी गर्न सक्नुहुन्छ ।",
-       "viewyourtext": "यस à¤ªà¥\83षà¥\8dठमा à¤°à¤¹à¥\87à¤\95ा '''तपाà¤\88à¤\81का सम्पादनहरू''' हेर्न या प्रतिलिपी गर्न सक्नुहुन्छ :",
+       "viewsourcetext": "तपाà¤\88à¤\82 यस पृष्ठको स्रोत हेर्न र प्रतिलिपी गर्न सक्नुहुन्छ ।",
+       "viewyourtext": "यस à¤ªà¥\83षà¥\8dठमा à¤°à¤¹à¥\87à¤\95ा '''तपाà¤\88à¤\82का सम्पादनहरू''' हेर्न या प्रतिलिपी गर्न सक्नुहुन्छ :",
        "protectedinterface": "यो पृष्ठले सफ्टवेयरको लागि अन्तरमोहडा पाठ प्रदान गर्दछ , र यसलाई दुरुपयोग हुनबाट बचाउन सुरक्षा प्रादन गरिएको छ।\nसम्पूर्ण विकिहरूका लागि अनुवादमा परिवर्तन गर्नको लागि [https://translatewiki.net/ translatewiki.net], प्रयोग गर्नुहोस् ,  मिडियाविकि स्थानियकरण परियोजना ।",
        "editinginterface": "<strong>चेतावनी:</strong> तपाईं यस पृष्ठलाई सम्पादन गर्नुहुँदैछ, जसले सफ्टवेयरको लागि \nइन्टरफेस सामग्रीहरू प्रदान गर्दछ।\nयस पृष्ठमा गरिएकोपरिवर्तनले यस विकिमा अरु प्रयोगकर्ताको इन्टरफेसको प्रदर्शनमा प्रभाव पार्नेछ ।",
        "translateinterface": "सबै विकिहरूको लागी अनुवाद जोड्न वा परिवर्तन गर्नका लागि मीडियाविकि क्षेत्रीयकरण परियोजना [https://translatewiki.net/ ट्रान्सलेटविकि.नेट]को प्रयोग गर्नुहोस।",
        "namespaceprotected": " '''$1'''  नेमस्पेसमा रहेका पृष्ठहरू सम्पादन गर्ने अनुमति यहाँलाई छैन ।",
        "customcssprotected": "तपाईंलाई यो  पृष्ठ सम्पादन गर्ने अनुमति छैन, किनकी यसमा कुनै अर्को प्रयोगकर्ताको व्यक्तिगत अभिरुचीहरू संग्रहित छन् ।",
        "customjsprotected": "तपाईंलाई यो जाभास्कृप्ट पृष्ठ सम्पादन गर्ने अनुमति छैन, किनकी यसमा कुनै अर्को प्रयोगकर्ताको व्यक्तिगत अभिरुचीहरू संग्रहित छन् ।",
-       "mycustomcssprotected": "यस CSSपà¥\83षà¥\8dठ à¤¸à¤®à¥\8dपादन à¤\97रà¥\8dनà¤\95à¥\8b à¤²à¤¾à¤\97ि à¤²à¤¾à¤\97ि à¤¤à¤ªà¤¾à¤\88à¤\81लाई अनुमति छैन ।",
-       "mycustomjsprotected": "यस JavaScript à¤ªà¥\83षà¥\8dठ à¤¸à¤®à¥\8dपादन à¤\97रà¥\8dनà¤\95à¥\8b à¤²à¤¾à¤\97ि à¤²à¤¾à¤\97ि à¤¤à¤ªà¤¾à¤\88à¤\81लाई अनुमति छैन ।",
-       "myprivateinfoprotected": "तपाà¤\88à¤\81सà¤\81à¤\97 à¤¤à¤ªà¤¾à¤\88à¤\81को निजी जानकारीहरू सम्पादन गर्ने अनुमती छैन",
-       "mypreferencesprotected": "तपाà¤\88à¤\81सà¤\81à¤\97 à¤¤à¤ªà¤¾à¤\88à¤\81को अभिरुचीहरू सम्पादन गर्ने अनुमती छैन",
+       "mycustomcssprotected": "यà¥\8b CSSपà¥\83षà¥\8dठ à¤¸à¤®à¥\8dपादन à¤\97रà¥\8dनà¤\95à¥\8b à¤²à¤¾à¤\97ि à¤²à¤¾à¤\97ि à¤¤à¤ªà¤¾à¤\88à¤\82लाई अनुमति छैन ।",
+       "mycustomjsprotected": "यà¥\8b à¤\9cावासà¥\8dà¤\95à¥\8dरिपà¥\8dà¤\9f à¤ªà¥\83षà¥\8dठ à¤¸à¤®à¥\8dपादन à¤\97रà¥\8dनà¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¤à¤ªà¤¾à¤\88à¤\82लाई अनुमति छैन ।",
+       "myprivateinfoprotected": "तपाà¤\88à¤\82सà¤\81à¤\97 à¤¤à¤ªà¤¾à¤\88à¤\82को निजी जानकारीहरू सम्पादन गर्ने अनुमती छैन",
+       "mypreferencesprotected": "तपाà¤\88à¤\82सà¤\81à¤\97 à¤¤à¤ªà¤¾à¤\88à¤\82को अभिरुचीहरू सम्पादन गर्ने अनुमती छैन",
        "ns-specialprotected": "विशेष पृष्ठहरू सम्पादन गर्न सकिदैन।",
        "titleprotected": "[[User:$1|$1]]द्वारा यो शीर्षक निर्माणहुनबाट जोगाइएको छ।\nकारण <em>$2</em> हो ।",
        "filereadonlyerror": "फाइल \"$1\" लाई परिवर्तन गर्न सकिँदैन किन भने फाइल भण्डार  \"$2\" केवल पढ्ने स्थिति (read-only mode)मा छ।\n\nयसलाई सुरक्षित गर्ने प्रवन्धकले  यो कारण दिएकाछन् : ''$3''।",
        "welcomecreation-msg": "तपाईंको खाता तयार भयो । \nतपाईंले चाहनु भएको खण्डमा {{SITENAME}} [[Special:Preferences|प्राथमिकताहरू]] परिवर्तन गर्न सक्नु हुनेछ ।",
        "yourname": "प्रयोगकर्ता नाम:",
        "userlogin-yourname": "प्रयोगकर्ता नाम",
-       "userlogin-yourname-ph": "तपाà¤\88à¤\81को प्रयोगकर्तानाम लेख्नुहोस्",
+       "userlogin-yourname-ph": "तपाà¤\88à¤\82को प्रयोगकर्तानाम लेख्नुहोस्",
        "createacct-another-username-ph": "प्रयोगकर्तानाम लेख्नुहोस्",
        "yourpassword": "पासवर्ड",
        "userlogin-yourpassword": "पासवर्ड",
-       "userlogin-yourpassword-ph": "तपाà¤\88à¤\81को पासवर्ड लेख्नुहोस्",
+       "userlogin-yourpassword-ph": "तपाà¤\88à¤\82को पासवर्ड लेख्नुहोस्",
        "createacct-yourpassword-ph": "पासवर्ड लेख्नुहोस्",
        "yourpasswordagain": "पासवर्ड फेरि टाईप गर्नुहोस्",
        "createacct-yourpasswordagain": "पासवर्ड निश्चित गर्नुहोस्",
        "createaccountreason": "कारण:",
        "createacct-reason": "कारण",
        "createacct-reason-ph": "किन तपाईं नयाँ खाता खोलिरहनु भएको हो ?",
-       "createacct-submit": "तपाà¤\88à¤\81को खाता सिर्जना गर्नुहोस",
+       "createacct-submit": "तपाà¤\88à¤\82को खाता सिर्जना गर्नुहोस",
        "createacct-another-submit": "खाता खोल्नुहोस्",
-       "createacct-benefit-heading": "{{SITENAME}} à¤¤à¤ªà¤¾à¤\88à¤\81 जस्तै मानिसहरूद्वारा सिर्जना गरिएको हो ।",
+       "createacct-benefit-heading": "{{SITENAME}} à¤¤à¤ªà¤¾à¤\88à¤\82 जस्तै मानिसहरूद्वारा सिर्जना गरिएको हो ।",
        "createacct-benefit-body1": "{{PLURAL:$1|सम्पादन|सम्पादनहरू}}",
        "createacct-benefit-body2": "{{PLURAL:$1|पृष्ठ|पृष्ठहरू}}",
        "createacct-benefit-body3": "हालैका {{PLURAL:$1|योगदानकर्ता|योगदानकर्ताहरू}}",
        "loginerror": "प्रवेश त्रुटि",
        "createacct-error": "खाता बनाउँदा त्रुटि",
        "createaccounterror": "खाता बनाउन सकिएन: $1",
-       "nocookiesnew": "तपाà¤\88à¤\81à¤\95à¥\8b à¤\96ाता à¤¬à¤¨à¤¾à¤\87यà¥\8b, à¤¤à¤° à¤¤à¤ªà¤¾à¤\88à¤\81 à¤ªà¥\8dरवà¥\87श à¤\97रà¥\8dनà¥\81भà¤\8fà¤\95à¥\8b à¤\9bà¥\88न à¥¤\n{{SITENAME}} à¤²à¥\87 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤ªà¥\8dरवà¥\87श à¤\97राà¤\89न à¤\95à¥\81à¤\95à¥\80हरà¥\82 à¤ªà¥\8dरयà¥\8bà¤\97 à¤\97रà¥\8dà¤\9b à¥¤\nतपाà¤\88à¤\81à¤\95ा à¤\95à¥\81à¤\95à¥\80हरà¥\82 à¤¨à¤¿à¤¸à¥\8dà¤\95à¥\8dरिय à¤\9bनà¥\8d।\nà¤\95à¥\83पया à¤¸à¤\95à¥\8dरिय à¤¬à¤¨à¤¾à¤\87 , à¤¨à¤¾à¤® à¤° à¤ªà¥\8dरवà¥\87शशव्द राखी प्रवेश गर्नुहोला ।",
-       "nocookieslogin": "{{SITENAME}} ले प्रयोगकर्ता प्रवेश गराउन कुकीहरू प्रयोग गर्छ । तपाईँको कुकीहरू निस्क्रिय गरिएको छ। कृपया सक्रिय बनाइ , नाम र प्रवेशशव्द राखी प्रवेश गर्नुहोला ।",
+       "nocookiesnew": "तपाà¤\88à¤\82à¤\95à¥\8b à¤\96ाता à¤¬à¤¨à¤¾à¤\87यà¥\8b, à¤¤à¤° à¤¤à¤ªà¤¾à¤\88à¤\82 à¤ªà¥\8dरवà¥\87श à¤\97रà¥\8dनà¥\81भà¤\8fà¤\95à¥\8b à¤\9bà¥\88न à¥¤\n{{SITENAME}} à¤²à¥\87 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤ªà¥\8dरवà¥\87श à¤\97राà¤\89न à¤\95à¥\81à¤\95à¥\80हरà¥\82 à¤ªà¥\8dरयà¥\8bà¤\97 à¤\97रà¥\8dà¤\9b à¥¤\nतपाà¤\88à¤\82à¤\95ा à¤\95à¥\81à¤\95à¥\80हरà¥\82 à¤¨à¤¿à¤¸à¥\8dà¤\95à¥\8dरिय à¤\9bनà¥\8d à¥¤\nà¤\95à¥\83पया à¤¸à¤\95à¥\8dरिय à¤¬à¤¨à¤¾à¤\87 , à¤¨à¤¾à¤® à¤° à¤ªà¥\8dरवà¥\87शशब्द राखी प्रवेश गर्नुहोला ।",
+       "nocookieslogin": "{{SITENAME}} ले प्रयोगकर्ता प्रवेश गराउन कुकीहरू प्रयोग गर्छ। तपाईंको कुकीहरू निष्कृय गरिएको छ। कृपया सक्रिय बनाइ पुन प्रवेश गर्नुहोला।",
        "nocookiesfornew": "प्रयोगकर्ताको खाता निर्माण गरिएन, हामीले यसको मूल स्रोत निर्धारण गर्न सकेनौं।\nनिश्चित गर्नुहोस् तपाईंले कुकी सक्रिय गर्नुभएको छ, पुनः यस पृष्ठलाई खोल्ने प्रयास गर्नुहोस्।",
        "nocookiesforlogin": "{{int:nocookieslogin}}",
        "noname": "तपाईंले सही प्रयोगकर्ता नाम दिनु भएन।",
        "loginsuccesstitle": "प्रवेश सफल",
        "loginsuccess": "'''तपाईंले {{SITENAME}}मा  \"$1\" को रुपमा प्रवेश गर्नुभएकोछ।'''",
        "nosuchuser": "\"$1\" को नामबाट कुनै पनि प्रयोगकर्ता भेटिएनन् ।\nप्रयोगकर्ता नाम वर्णसंवेदनशील हुन्छन् ।\nहिज्जे जाँच्नुहोस् , या [[Special:CreateAccount|नयाँ खाता बनाउनुहोस्]].",
-       "nosuchusershort": " \"$1\" à¤¨à¤¾à¤®à¤\95à¥\8b à¤\95à¥\81नà¥\88 à¤ªà¤¨à¤¿ à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤­à¥\87à¤\9fिà¤\8fन।\n à¤¤à¤ªà¤¾à¤\88à¤\81को हिज्जे जाँच्नुहोस् ।",
+       "nosuchusershort": " \"$1\" à¤¨à¤¾à¤®à¤\95à¥\8b à¤\95à¥\81नà¥\88 à¤ªà¤¨à¤¿ à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤­à¥\87à¤\9fिà¤\8fन।\n à¤¤à¤ªà¤¾à¤\88à¤\82को हिज्जे जाँच्नुहोस् ।",
        "nouserspecified": "तपाँईले प्रयोगकर्ताको नाम जनाउनुपर्छ।",
        "login-userblocked": "यस प्रयोगकर्तालाई रोक लगाइएको छ। प्रवेश गर्ने अनुमति छैन।",
        "wrongpassword": "पासवर्ड गलत हालियो।\nकृपया फेरि प्रयास गर्नुहोला।",
        "passwordtooshort": "पासवर्ड कम्तिमा {{PLURAL:$1|१ अक्षर|$1 अक्षरहरू}}को हुनुपर्छ।",
        "passwordtoolong": "पासवर्ड {{PLURAL:$1|१ अक्षर|$1 अक्षरहरू}} भन्दा लामो हुनु हुदैन ।",
        "password-name-match": "तपाईँको प्रवेशशव्द प्रयोगकर्ता नाम भन्दा फरक हुनुपर्छ ।",
-       "password-login-forbidden": "यà¥\8b à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤¨à¤¾à¤® à¤° à¤ªà¥\8dरवà¥\87श à¤¶à¤µ्द वर्जित गरिएकोछ ।",
+       "password-login-forbidden": "यà¥\8b à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤¨à¤¾à¤® à¤° à¤ªà¥\8dरवà¥\87श à¤¶à¤¬्द वर्जित गरिएकोछ ।",
        "mailmypassword": "पासवर्ड पूर्वनिर्धारित गर्नुहोस्",
        "passwordremindertitle": "{{SITENAME}}को लागि नयाँ अस्थायी पासवर्ड",
-       "passwordremindertext": "à¤\95सà¥\88लà¥\87 (सायद à¤¤à¤ªà¤¾à¤\88à¤\81, IP à¤ à¥\87à¤\97ाना $1 à¤¬à¤¾à¤\9f), {{SITENAME}}($4) à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¨à¤¯à¤¾à¤\81 à¤ªà¥\8dरवà¥\87सशबà¥\8dद à¤\85नà¥\81रà¥\8bध à¤\97रà¥\8dनà¥\81भà¤\8fà¤\95à¥\8b à¤\9b à¥¤ à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता \"$2\" à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¨à¤¯à¤¾à¤\81 à¤\85सà¥\8dथायà¥\80 à¤ªà¥\8dरवà¥\87सशबà¥\8dद \"$3\"तयार à¤ªà¤¾à¤°à¤¿à¤\8fà¤\95à¥\8b à¤\9b à¥¤ à¤¯à¤¦à¤¿ à¤¯à¥\8b à¤¤à¤ªà¤¾à¤\88à¤\82à¤\95à¥\8b à¤\87à¤\9aà¥\8dà¤\9bामा à¤­à¤\8fà¤\95à¥\8b à¤­à¤\8f à¤\85हिलà¥\87 à¤¤à¤ªà¤¾à¤\88à¤\81लà¥\87 à¤ªà¥\8dरवà¥\87शà¤\97रà¥\80 à¤¨à¤¯à¤¾à¤\81 à¤ªà¥\8dरवà¥\87सशबà¥\8dद à¤\9bानà¥\8dनà¥\81 à¤ªà¤°à¥\8dनà¥\87 à¤¹à¥\81नà¥\8dà¤\9b।\nतपाà¤\88à¤\82à¤\95à¥\8b à¤\85सà¥\8dथायà¥\80 à¤ªà¥\8dरवà¥\87सशबà¥\8dद  {{PLURAL:$5|à¤\8fà¤\95 à¤¦à¤¿à¤¨|$5 à¤¦à¤¿à¤¨à¤¹à¤°à¥\82 à¤ªà¤\9bि}} à¤\85मानà¥\8dय à¤¹à¥\81नà¥\87à¤\9b à¥¤\n\nयदि à¤\95à¥\8bहà¥\80 à¤\85रà¥\81लà¥\87 à¤¨à¥\88 à¤\85नà¥\81रà¥\8bध à¤\97रà¥\87à¤\95à¥\8b à¤¹à¥\8b à¤­à¤¨à¥\87 , à¤¯à¤¾ à¤¤à¤ªà¤¾à¤\88à¤\82लà¥\87 à¤\86फà¥\8dनà¥\8b à¤ªà¥\8dरवà¥\87सशबà¥\8dद à¤¸à¤®à¥\8dà¤\9dिनà¥\81 à¤­à¤¯à¥\8b à¤­à¤¨à¥\87, à¤\85थवा\nतà¥\8dयसलाà¤\88 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\97रà¥\8dन à¤\9aाहनà¥\81हà¥\81नà¥\8dन à¤­à¤¨à¥\87, à¤¤à¤ªà¤¾à¤\88à¤\81लà¥\87 à¤¯à¥\8b à¤¸à¤¨à¥\8dदà¥\87सà¤\95à¥\8b à¤µà¥\87वासà¥\8dता à¤\97रà¥\8dनसà¤\95à¥\8dनà¥\81हà¥\81नà¥\8dà¤\9b à¤° à¤ªà¥\81रानà¥\88 à¤ªà¥\8dरवà¥\87सशब्द प्रयोग गरिरहन सक्नुहुन्छ ।",
+       "passwordremindertext": "à¤\95सà¥\88लà¥\87 (सायद à¤¤à¤ªà¤¾à¤\88à¤\82, IP à¤ à¥\87à¤\97ाना $1 à¤¬à¤¾à¤\9f), {{SITENAME}}($4) à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¨à¤¯à¤¾à¤\81 à¤ªà¥\8dरवà¥\87शशबà¥\8dद à¤\85नà¥\81रà¥\8bध à¤\97रà¥\8dनà¥\81भà¤\8fà¤\95à¥\8b à¤\9b à¥¤ à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता \"$2\" à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¨à¤¯à¤¾à¤\81 à¤\85सà¥\8dथायà¥\80 à¤ªà¥\8dरवà¥\87शशबà¥\8dद \"$3\"तयार à¤ªà¤¾à¤°à¤¿à¤\8fà¤\95à¥\8b à¤\9b à¥¤ à¤¯à¤¦à¤¿ à¤¯à¥\8b à¤¤à¤ªà¤¾à¤\88à¤\82à¤\95à¥\8b à¤\87à¤\9aà¥\8dà¤\9bामा à¤­à¤\8fà¤\95à¥\8b à¤­à¤\8f à¤\85हिलà¥\87 à¤¤à¤ªà¤¾à¤\88à¤\81लà¥\87 à¤ªà¥\8dरवà¥\87शà¤\97रà¥\80 à¤¨à¤¯à¤¾à¤\81 à¤ªà¥\8dरवà¥\87शशबà¥\8dद à¤\9bानà¥\8dनà¥\81 à¤ªà¤°à¥\8dनà¥\87 à¤¹à¥\81नà¥\8dà¤\9b à¥¤\nतपाà¤\88à¤\82à¤\95à¥\8b à¤\85सà¥\8dथायà¥\80 à¤ªà¥\8dरवà¥\87शशबà¥\8dद  {{PLURAL:$5|à¤\8fà¤\95 à¤¦à¤¿à¤¨|$5 à¤¦à¤¿à¤¨à¤¹à¤°à¥\82 à¤ªà¤\9bि}} à¤\85मानà¥\8dय à¤¹à¥\81नà¥\87à¤\9b à¥¤\n\nयदि à¤\95à¥\8bहà¥\80 à¤\85रà¥\81लà¥\87 à¤¨à¥\88 à¤\85नà¥\81रà¥\8bध à¤\97रà¥\87à¤\95à¥\8b à¤¹à¥\8b à¤­à¤¨à¥\87 , à¤¯à¤¾ à¤¤à¤ªà¤¾à¤\88à¤\82लà¥\87 à¤\86फà¥\8dनà¥\8b à¤ªà¥\8dरवà¥\87शशबà¥\8dद à¤¸à¤®à¥\8dà¤\9dिनà¥\81 à¤­à¤¯à¥\8b à¤­à¤¨à¥\87, à¤\85थवा\nतà¥\8dयसलाà¤\88 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\97रà¥\8dन à¤\9aाहनà¥\81हà¥\81नà¥\8dन à¤­à¤¨à¥\87, à¤¤à¤ªà¤¾à¤\88à¤\82लà¥\87 à¤¯à¥\8b à¤¸à¤¨à¥\8dदà¥\87शà¤\95à¥\8b à¤µà¥\87वासà¥\8dता à¤\97रà¥\8dनसà¤\95à¥\8dनà¥\81हà¥\81नà¥\8dà¤\9b à¤° à¤ªà¥\81रानà¥\88 à¤ªà¥\8dरवà¥\87शशब्द प्रयोग गरिरहन सक्नुहुन्छ ।",
        "noemail": "प्रयोगकर्ता  \"$1\"को लागि कुनै पनि इ-मेल दर्ता गरिएको छैन ।",
        "noemailcreate": "तपाईंले सही ई-मेल ठेगाना दिनुपर्छ",
        "passwordsent": "\"$1\" को लागि दर्ता गरिएको ई-मेल ठेगानामा एक प्रवेशशव्द पठाइएको छ।\nकृपया त्यसलाई प्राप्त गरेपछि प्रवेश गर्नुहोला ।",
        "blocked-mailpassword": "तपाईंको IP ठेगानालाई सम्पादनगर्नबाट रोक लगाइएको छ, र त्यसैले दुरुपयोग रोक्नको लागि प्रवेसशब्द पुनर्लाभ प्रक्रिया प्रयोग गर्न अनुमति छैन ।",
-       "eauthentsent": "दिà¤\87à¤\8fà¤\95à¥\8b à¤\87मà¥\87ल à¤ à¥\87à¤\97ानामा à¤\87मà¥\87ल à¤ªà¤ à¤¾à¤\87à¤\8fà¤\95à¥\8b à¤\9b à¥¤\nतपाà¤\88à¤\81à¤\95à¥\8b à¤\96ातामा à¤\85रà¥\81 à¤\87मà¥\87ल à¤ªà¤ à¤\89नà¥\81 à¤\85à¤\98ि , à¤\87मà¥\87लमा à¤²à¥\87à¤\96िà¤\8fà¤\95à¥\8b à¤®à¤¾à¤°à¥\8dà¤\97दरà¥\8dशन à¤\85नà¥\81सार , à¤¤à¥\8dयà¥\8b à¤\96ाता à¤¤à¤ªà¤¾à¤\88à¤\81कै हो भनेर निश्चित गर्नु पर्नेछ ।",
+       "eauthentsent": "दिà¤\87à¤\8fà¤\95à¥\8b à¤\87मà¥\87ल à¤ à¥\87à¤\97ानामा à¤\87मà¥\87ल à¤ªà¤ à¤¾à¤\87à¤\8fà¤\95à¥\8b à¤\9b à¥¤\nतपाà¤\88à¤\82à¤\95à¥\8b à¤\96ातामा à¤\85रà¥\81 à¤\87मà¥\87ल à¤ªà¤ à¤\89नà¥\81 à¤\85à¤\98ि , à¤\87मà¥\87लमा à¤²à¥\87à¤\96िà¤\8fà¤\95à¥\8b à¤®à¤¾à¤°à¥\8dà¤\97दरà¥\8dशन à¤\85नà¥\81सार , à¤¤à¥\8dयà¥\8b à¤\96ाता à¤¤à¤ªà¤¾à¤\88à¤\82कै हो भनेर निश्चित गर्नु पर्नेछ ।",
        "throttled-mailpassword": "बितेको {{PLURAL:$1|घण्टा|$1 घण्टाहरु}} भित्र एउटा पासवर्ड अनुस्मारक पठाई सकिएको छ।\nदुरुपयोगबाट बचाउकोलागि प्रत्येक {{PLURAL:$1|घण्टा|$1 घण्टाहरु}}मा केवल एउटा पासवर्ड अनुस्मारक पठाइन्छ।",
        "mailerror": " चिठी :$1 पठाउँदा त्रुटी भयो",
        "acct_creation_throttle_hit": "तपाईंको आईपी ठेगानाबाट आएका आगन्तुकद्वारा बितेको चौबिस घण्टामा यस विकिमा {{PLURAL:$1|एउटा खाता बनाइसकिएको छ|$1 खाताहरु बनाइसकिएका छन्}}, यस समयावधिमा यति नैं अधिकतम सीमा हो।\nअतः यस समय यस आईपी ठेगानाको प्रयोग गर्ने आगन्तुकले अरु खाता खोल्न सक्नेछैनन्।",
        "emailauthenticated": "तपाईंको इमेल ठेगाना $2 को $3 मा प्रमाणित गरिएको थियो।",
-       "emailnotauthenticated": "तपाà¤\88à¤\81को इमेल ठेगाना अहिले सम्म प्रमाणित गरिएको छैन ।\nनिम्न सुविधाको लागि कुनै पनि इमेल पठाइने छैन ।",
+       "emailnotauthenticated": "तपाà¤\88à¤\82को इमेल ठेगाना अहिले सम्म प्रमाणित गरिएको छैन ।\nनिम्न सुविधाको लागि कुनै पनि इमेल पठाइने छैन ।",
        "noemailprefs": "निम्न सुविधाहरू राम्ररी काम गर्नको लागि तपाईंको अभिरुचिमा आफ्नो ई-मेल ठेगाना खुलाउनुहोस् ।",
        "emailconfirmlink": "तपाईंको ई-मेल ठेगाना पक्का गर्नुहोस्",
        "invalidemailaddress": "ई-मेल ठेगाना स्वीकार गर्न सकिएन किन भनें यो सही प्रारूपमा छैन, कृपया सही प्रारूपको  ठेगाना दिनुहोस्।",
        "resetpass_header": "खाताको पासवर्ड परिवर्तन गर्ने",
        "oldpassword": "पुरानो पासवर्ड:",
        "newpassword": "नयाँ पासवर्ड:",
-       "retypenew": "पà¥\8dरवà¥\87श à¤¶à¤µ्द पुन: दिनुहोस् :",
+       "retypenew": "पà¥\8dरवà¥\87श à¤¶à¤¬्द पुन: दिनुहोस् :",
        "resetpass_submit": "पासवर्ड व्यवस्थित गरी र प्रवेशगर्ने",
-       "changepassword-success": "तपाà¤\88à¤\81को पासवर्ड सफलतापूर्वक परिवर्तन भयो!",
+       "changepassword-success": "तपाà¤\88à¤\82को पासवर्ड सफलतापूर्वक परिवर्तन भयो!",
        "changepassword-throttled": "तपाईंले भर्खरै धेरै पल्ट प्रवेश (लग इन)को निम्ति प्रयास गर्नुभएको छ। \nकृपया $1 पर्खेर मात्र प्रयास गर्नुहोस्।",
        "resetpass_forbidden": "पासवर्ड परिवर्तन गर्न मिल्दैन",
        "resetpass-no-info": "यो पृष्ठ सिधै हेर्नको लागि तपाईँले प्रवेश गर्नुपर्छ ।",
-       "resetpass-submit-loggedin": "पà¥\8dरवà¥\87शशव्द परिवर्तन गर्ने",
+       "resetpass-submit-loggedin": "पà¥\8dरवà¥\87सशब्द परिवर्तन गर्ने",
        "resetpass-submit-cancel": "रद्द गर्ने",
-       "resetpass-wrong-oldpass": "à¤\85सà¥\8dथायà¥\80 à¤\85थवा à¤¹à¤¾à¥\8dलिà¤\8fà¤\95à¥\8b à¤ªà¥\8dरवà¥\87श à¤¶à¤µà¥\8dद à¤\85मानà¥\8dय\nतपाà¤\88à¤\82लà¥\87 à¤\85à¤\98िबाà¤\9f à¤¨à¥\88à¤\82 à¤ªà¥\8dरवà¥\87श à¤¶à¤µà¥\8dद à¤¸à¤«à¤²à¤¤à¤¾ à¤ªà¥\82रà¥\8dवà¤\95 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\97रिसà¤\95à¥\8dनà¥\81 à¤­à¤\8fà¤\95à¥\8b à¤¹à¥\8b à¤µà¤¾ à¤¨à¤¯à¤¾à¤\81 à¤ªà¥\8dरवà¥\87श à¤¶à¤µ्दको निम्ति निवेदन गर्नुभएकोछ।",
+       "resetpass-wrong-oldpass": "à¤\85सà¥\8dथायà¥\80 à¤\85थवा à¤¹à¤¾à¤²à¤¿à¤\8fà¤\95à¥\8b à¤ªà¥\8dरवà¥\87श à¤¶à¤¬à¥\8dद à¤\85मानà¥\8dय\nतपाà¤\88à¤\82लà¥\87 à¤\85à¤\98िबाà¤\9f à¤¨à¥\88à¤\82 à¤ªà¥\8dरवà¥\87श à¤¶à¤¬à¥\8dद à¤¸à¤«à¤²à¤¤à¤¾ à¤ªà¥\82रà¥\8dवà¤\95 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\97रिसà¤\95à¥\8dनà¥\81 à¤­à¤\8fà¤\95à¥\8b à¤¹à¥\8b à¤µà¤¾ à¤¨à¤¯à¤¾à¤\81 à¤ªà¥\8dरवà¥\87श à¤¶à¤¬्दको निम्ति निवेदन गर्नुभएकोछ।",
        "resetpass-recycled": "कृपया वर्तमान पासर्वड भन्दा फरक पासर्वडलाई पुनः मिलाउनुहोस् ।",
        "resetpass-temp-emailed": "तपाईं अस्थाई इमेल कोडले प्रवेश गर्नुभएको छ।\nप्रवेश सफल पार्नका लागि, तपाईंले यहाँ एउटा नयाँ पासवर्ड राख्नु पर्नेछ:",
        "resetpass-temp-password": "अस्थाइ पासवर्ड",
        "passwordreset": "प्रवेशशव्द पुनः तय गर्ने",
        "passwordreset-text-one": "इमेल मार्फल अस्थायी पासवर्ड प्राप्त गर्नको लागी यस फारमलाई पूर्ण रूपमा भर्नुहोस् ।",
        "passwordreset-text-many": "{{PLURAL:$1|कृपया यहाँ मध्ये एउटा क्षेत्र भरि अस्थाई पासवर्ड इमेल मार्फत प्राप्त गर्नुहोस।}}",
-       "passwordreset-disabled": "पà¥\8dरवà¥\87श à¤¶à¤µà¥\8dद à¤ªà¥\81नà¤\83 à¤¨à¤¿à¤°à¥\8dधारण à¤\97रà¥\8dनà¥\87 à¤µà¥\8dयवसà¥\8dथा à¤¯à¤¸ à¤µà¤¿à¤\95िमा à¤¨à¤¿à¤¸à¥\8dà¤\95à¥\8dरिय à¤ªà¤¾à¤°à¤¿à¤\8fà¤\95à¥\8b à¤\9b।",
+       "passwordreset-disabled": "पà¥\8dरवà¥\87श à¤¶à¤¬à¥\8dद à¤ªà¥\81नà¤\83 à¤¨à¤¿à¤°à¥\8dधारण à¤\97रà¥\8dनà¥\87 à¤µà¥\8dयवसà¥\8dथा à¤¯à¤¸ à¤µà¤¿à¤\95िमा à¤¨à¤¿à¤¸à¥\8dà¤\95à¥\8dरिय à¤ªà¤¾à¤°à¤¿à¤\8fà¤\95à¥\8b à¤\9b ।",
        "passwordreset-emaildisabled": "इमेल सुविधा यस विकिमा निस्क्रिय बनाइएको छ ।",
        "passwordreset-username": "प्रयोगकर्ता नाम:",
        "passwordreset-domain": "डोमेन",
        "passwordreset-capture-help": "यदि तपाईंले यो कोठामा दाग दिनुभयो भनें यो इमेल (अस्थायी पासवर्ड सहित) तपाईंलाई देखा पर्नेछ साथै प्रयोगकर्तालाई पनि पठाइनेछ।",
        "passwordreset-email": "इमेल ठेगाना:",
        "passwordreset-emailtitle": "{{SITENAME}}मा खाता विवरण",
-       "passwordreset-emailtext-ip": "कसैले (सायद तपाईंले, $1 आईपि ठेगानाबाट) {{SITENAME}} ($4)मा तपाईंको खाता विवरणको निम्ति एउटा अनुस्मारकको अनुरोध गरेको छ। निम्न प्रयोगकर्ता {{PLURAL:$3|खाता यस इमेल ठेगानासित सम्बन्धित छ|खाताहरू यस इमेल ठेगानासित सम्बन्धित छन्}}:\n\n$2\n\n{{PLURAL:$3|यो अस्थाई पासवर्डको|यी अस्थाई पासवर्डहरुको}} समय {{PLURAL:$5|एक दिन|$5 दिन}}मा सकिनेछ।\nतपाईंले प्रवेश गरेर अहिले नैं नयाँ पासवर्ड छान्नुहोस्। यदि अरु कसैले अनुरोध गरेको भए अथवा यदि तपाईंलाई मूल पासवर्ड याद भए अनि यसलाई परिवर्तन गर्न चाहनुहुन्न भने, तपाईंले यस सन्देशलाई अनदेखा गर्नुहोस् र पुरानै पासवर्डलाई चालू राख्नुहोस्।",
-       "passwordreset-emailtext-user": "{{SITENAME}} को $1 प्रयोगकर्ताले  {{SITENAME}} ($4)को लागि खाता विवरणको निम्ति एउटा अनुस्मारकको अनुरोध गरेको छ। निम्न प्रयोगकर्ता {{PLURAL:$3|खाता यस इमेल ठेगानासित सम्बन्धित छ|खाताहरू यस इमेल ठेगानासित सम्बन्धित छन्}}:\n\n$2\n\n{{PLURAL:$3|यो अस्थाई पासवर्डको|यी अस्थाई पासवर्डहरूको}} समय {{PLURAL:$5|एक दिन|$5 दिन}}मा सकिनेछ।\nतपाईंले प्रवेश गरेर अहिले नैं नयाँ पासवर्ड छान्नुहोस्। यदि अरु कसैले अनुरोध गरेको भए अथवा यदि तपाईंलाई मूल पासवर्ड याद भए अनि यसलाई परिवर्तन गर्न चाहनुहुन्न भनें, तपाईंले यस सन्देशलाई अनदेखा गर्नुहोस् र पुरानै पासवर्डलाई चालू राख्नुहोस्।",
+       "passwordreset-emailtext-ip": "कसैले (सायद तपाईंले, $1 आईपि ठेगानाबाट) {{SITENAME}} ($4)मा तपाईंको खाता विवरणको निम्ति एउटा अनुस्मारकको अनुरोध गरेको छ। निम्न प्रयोगकर्ता {{PLURAL:$3|खाता यस इमेल ठेगानासित सम्बन्धित छ|खाताहरू यस इमेल ठेगानासित सम्बन्धित छन्}}:\n\n$2\n\n{{PLURAL:$3|यो अस्थाई पासवर्डको|यी अस्थाई पासवर्डहरुको}} समय {{PLURAL:$5|एक दिन|$5 दिन}}मा सकिनेछ।\nतपाईंले प्रवेश गरेर अहिले नैं नयाँ पासवर्ड छान्नुहोस्। यदि अरु कसैले अनुरोध गरेको भए अथवा यदि तपाईंलाई मूल पासवर्ड याद भए अनि यसलाई परिवर्तन गर्न चाहनुहुन्न भने, तपाईंले यस सन्देशलाई अनदेखा गर्नुहोस् र पुरानै पासवर्डलाई चालू राख्नुहोस्।",
+       "passwordreset-emailtext-user": "{{SITENAME}} को $1 प्रयोगकर्ताले  {{SITENAME}} ($4)को लागि खाता विवरणको निम्ति एउटा अनुस्मारकको अनुरोध गरेको छ । निम्न प्रयोगकर्ता {{PLURAL:$3|खाता यस इमेल ठेगानासित सम्बन्धित छ|खाताहरू यस इमेल ठेगानासित सम्बन्धित छन् ।}}:\n\n$2\n\n{{PLURAL:$3|यो अस्थाई पासवर्डको|यी अस्थाई पासवर्डहरूको}} समय {{PLURAL:$5|एक दिन|$5 दिन}}मा सकिनेछ ।\nतपाईंले प्रवेश गरेर अहिले नैं नयाँ पासवर्ड छान्नुहोस्। यदि अरु कसैले अनुरोध गरेको भए अथवा यदि तपाईंलाई मूल पासवर्ड याद भए अनि यसलाई परिवर्तन गर्न चाहनुहुन्न भने, तपाईंले यस सन्देशलाई अनदेखा गर्नुहोस् र पुरानै पासवर्डलाई चालू राख्नुहोस् ।",
        "passwordreset-emailelement": "प्रयोगकर्ताको नाम: \n$1\n\nअस्थाई पासवर्ड: \n$2",
        "passwordreset-emailsentemail": "पासवर्ड परिवर्तनको लागि इमेल पठाइएको छ।",
        "changeemail": "इमेल ठेगाना परिवर्तन गर्नुहोस",
        "minoredit": "यो सानो सम्पादन हो",
        "watchthis": "यो पृष्ठ अवलोकन गर्नुहोस्",
        "savearticle": "सङ्ग्रह गर्ने",
+       "savechanges": "परिवर्तन सङ्ग्रह गर्नुहोस्",
        "preview": "पूर्वावलोकन",
        "showpreview": "पूर्वालोकन देखाउनुहोस्",
        "showdiff": "परिवर्तन देखाउनुहोस्",
        "subject-preview": "विषय/शीर्षपंक्ति पूर्वरुप:",
        "previewerrortext": "तपाईंको परिवर्तनको पूर्वावलोकन बनाउन खोज्दा समस्या आएको छ ।",
        "blockedtitle": "प्रयोककर्तालाई रोक लगाइएको छ",
-       "blockedtext": "'''तपाà¤\88à¤\81à¤\95à¥\8b à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤¨à¤¾à¤® à¤¯à¤¾ IP ठेगानालाई रोक लगाइएको छ ।'''\n\nरोक लगाउने  $1.\nरोक लगाउनाको कारण ''$2''.\n\n* रोक सुरू हुने : $8\n* रोक सकिने: $6\n* रोकबाट लक्षित: $7\n\nतपाईंले  $1 वा अरु कुनै  [[{{MediaWiki:Grouppage-sysop}}|प्रवन्धक]] सँग रोकको बारेमा छलफल गर्न सम्पर्क गर्न सक्नुहुन्छ ।\nतपाईँले  'प्रयोगकर्तालाई इ-मेल गर्ने ' सुविधा मान्य इमेल ठेगाना [[Special:Preferences|अभिरुचीहरू]]मा नखुलाए सम्म प्रयोगगर्न पाउनुहुने छैन र यसको प्रयोग गर्नबाट रोक लगाइएको छैन ।\nतपाईंको IP ठेगाना $3 को, र रोक्का संख्या #$5.\nकृपया तपाईँको प्रश्नमा सबै जानकारी खुलाउनुहोला ।",
+       "blockedtext": "'''तपाà¤\88à¤\82à¤\95à¥\8b à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤¨à¤¾à¤® à¤¯à¤¾ à¤\86à¤\87 à¤ªà¥\80 ठेगानालाई रोक लगाइएको छ ।'''\n\nरोक लगाउने  $1.\nरोक लगाउनाको कारण ''$2''.\n\n* रोक सुरू हुने : $8\n* रोक सकिने: $6\n* रोकबाट लक्षित: $7\n\nतपाईंले  $1 वा अरु कुनै  [[{{MediaWiki:Grouppage-sysop}}|प्रवन्धक]] सँग रोकको बारेमा छलफल गर्न सम्पर्क गर्न सक्नुहुन्छ ।\nतपाईँले  'प्रयोगकर्तालाई इ-मेल गर्ने ' सुविधा मान्य इमेल ठेगाना [[Special:Preferences|अभिरुचीहरू]]मा नखुलाए सम्म प्रयोगगर्न पाउनुहुने छैन र यसको प्रयोग गर्नबाट रोक लगाइएको छैन ।\nतपाईंको IP ठेगाना $3 को, र रोक्का संख्या #$5.\nकृपया तपाईँको प्रश्नमा सबै जानकारी खुलाउनुहोला ।",
        "autoblockedtext": "तपाईंको IP ठेगानामाथि रोक लगाइएकोछ किन भनें यो अर्को प्रयोगकर्ताले प्रयोग गरेको थियो, जसलाई $1ले रोक लगाएका थिए। \nरोक लगाउनुको कारण:\n:''$2''  \n\n* रोकावट सुरु: $8\n* रोकावट सकिने: $6\n* रोकावटको प्रयोजन: $7\n\nतपाईं $1 सित सम्पर्क गर्न सक्नुहुन्छ अथवा कुनै [[{{MediaWiki:Grouppage-sysop}}|प्रबन्धक]]सँग रोकबारे चर्चा गर्न सक्नुहुन्छ ।\n\nध्यान दिनुहोस् कि तपाईंले यस प्रयोगकर्ताका लागि ई-मेलको प्रयोग तबसम्म गर्नसक्नुहुन्न जबसम्म तपाईंको [[Special:Preferences|अभिरुचि]] पंजिकृत गर्नु हुन्न वा यस ई-मेलको प्रयोगमाथि रोक लगाइएको हुँदैन । \n\nतपाईंको वर्तमान IP ठेगाना हो- $3, अनि रोक लगाइएको ID हो- #$5.\nकृपया कुनै बेला सोधनी गर्नु परे उपर्युक्त विवरण दर्शाउनु होला ।",
        "blockednoreason": "कारण दिइएको छैन",
        "whitelistedittext": "पाना सम्पादन गर्न तपाँईले $1 गर्नु पर्दछ।",
        "hiddencategories": "यो पृष्ठ निम्न {{PLURAL:$1|1 लुकाइएको श्रेणी|$1 लुकाइएका श्रेणीहरू}}को सदस्य हो :",
        "edittools": "<!-- Text here will be shown below edit and upload forms. -->",
        "edittools-upload": "-",
-       "nocreatetext": "{{SITENAME}} à¤²à¥\87 à¤¨à¤¯à¤¾à¤\81 à¤ªà¥\83षà¥\8dठ à¤¸à¥\83à¤\9cना à¤\97रà¥\8dन à¤¸à¤\95à¥\8dनà¥\87 à¤\95à¥\8dषमतामा à¤°à¥\8bà¤\95 à¤²à¤\97ाà¤\8fà¤\95à¥\8b à¤\9b।\nतपाà¤\88à¤\81 à¤ªà¤\9bाडि à¤\9cानà¥\81 à¤­à¤\87 à¤°à¤¹à¤¿à¤\86à¤\8fà¤\95à¥\8b à¤ªà¥\83षà¥\8dठ à¤¸à¤®à¥\8dपादन à¤\97रà¥\8dनसà¤\95à¥\8dनà¥\81हà¥\81नà¥\8dà¤\9b , à¤\85थवा [[Special:UserLogin|पà¥\8dरवà¥\87श à¤\97रà¥\8dनà¥\81हà¥\8bस à¤¯à¤¾ à¤¨à¤¯à¤¾à¤\81 à¤\96ाता à¤¸à¥\83à¤\9cना à¤\97रà¥\8dनà¥\81हà¥\8bसà¥\8d ]]।",
-       "nocreate-loggedin": "नयाà¤\81 à¤ªà¥\83षà¥\8dठ à¤¸à¥\83à¤\9cनाà¤\97रà¥\8dनà¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¤à¤ªà¤¾à¤\88à¤\81लाई अनुमति छैन ।",
+       "nocreatetext": "{{SITENAME}} à¤²à¥\87 à¤¨à¤¯à¤¾à¤\81 à¤ªà¥\83षà¥\8dठ à¤¸à¥\83à¤\9cना à¤\97रà¥\8dन à¤¸à¤\95à¥\8dनà¥\87 à¤\95à¥\8dषमतामा à¤°à¥\8bà¤\95 à¤²à¤\97ाà¤\8fà¤\95à¥\8b à¤\9b।\nतपाà¤\88à¤\82 à¤ªà¤\9bाडि à¤\97à¤\8fर à¤¯à¤¹à¤¾à¤\81 à¤°à¤¹à¥\87à¤\95ा à¤ªà¥\83षà¥\8dठ à¤¸à¤®à¥\8dपादन à¤\97रà¥\8dनसà¤\95à¥\8dनà¥\81हà¥\81नà¥\8dà¤\9b , à¤\85थवा [[Special:UserLogin|पà¥\8dरवà¥\87श à¤\97रà¥\8dनà¥\81हà¥\8bस à¤¯à¤¾ à¤¨à¤¯à¤¾à¤\81 à¤\96ाता à¤\96à¥\8bलà¥\8dनà¥\81हà¥\8bसà¥\8d]]।",
+       "nocreate-loggedin": "नयाà¤\81 à¤ªà¥\83षà¥\8dठ à¤¸à¥\83à¤\9cनाà¤\97रà¥\8dनà¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¤à¤ªà¤¾à¤\88à¤\82लाई अनुमति छैन ।",
        "sectioneditnotsupported-title": "खण्ड सम्पादन असमर्थित",
        "sectioneditnotsupported-text": "यस पृष्ठमा खण्ड सम्पादन असमर्थित",
        "permissionserrors": "अनुमति नभएको",
-       "permissionserrorstext": "तपाà¤\88à¤\81लाà¤\88 à¤¯à¤¸à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤\85नà¥\81मति à¤\9bà¥\88न ,निमà¥\8dन {{PLURAL:$1|à¤\95ारण|à¤\95ारणहरà¥\81}}ले गर्दा:",
-       "permissionserrorstext-withaction": "$2 à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¤à¤ªà¤¾à¤\88à¤\81लाà¤\88 à¤\85नà¥\81मति à¤\9bà¥\88न , à¤¨à¤¿à¤®à¥\8dन {{PLURAL:$1|à¤\95ारणलà¥\87|à¤\95ारणहरà¥\81ले}} गर्दा :",
+       "permissionserrorstext": "तपाà¤\88à¤\81लाà¤\88 à¤¯à¤¸à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤\85नà¥\81मति à¤\9bà¥\88न ,निमà¥\8dन {{PLURAL:$1|à¤\95ारण|à¤\95ारणहरà¥\82}}ले गर्दा:",
+       "permissionserrorstext-withaction": "$2 à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¤à¤ªà¤¾à¤\88लाà¤\88 à¤\85नà¥\81मति à¤\9bà¥\88न , à¤¨à¤¿à¤®à¥\8dन {{PLURAL:$1|à¤\95ारणलà¥\87|à¤\95ारणहरà¥\82ले}} गर्दा :",
        "recreate-moveddeleted-warn": "'''चेतावनी: तपाईं अघिबाट मेटिएको पृष्ठ पुनर्निर्माण गर्नुहुँदैछ'''\n\nतपाईंको विचारमा के यो उचित छ कि यसको सम्पादन जारी राखियोस्, \nयस पृष्ठको मेटिएको र सारिएको लग सुविधाको निम्ति यहाँ दिइएकोछ :",
        "moveddeleted-notice": "पृष्ठ मेटिएको छ ।\nमेटिएका तथा सारिएका पृष्ठहरूको सूची तल सन्दर्भको लागि दिइएको छ ।",
        "log-fulllog": "पूरा लग हेर्नुहोस्",
        "edit-hook-aborted": "हुकले सम्पादन बन्द गरिदियो ।\nयसले कुनै कारण दिएन ।",
        "edit-gone-missing": "पृष्ठ अद्यतन गर्न सकिएन\nयो मेटिएको जस्तो देखिन्छ ।",
        "edit-conflict": "द्वन्द्व सम्पादन गर्ने ।",
-       "edit-no-change": "तपाà¤\88à¤\81को सम्पादन वेवास्ता गरियो, किनकि कुनै पनि पाठ परिवर्तन गरिएन ।",
+       "edit-no-change": "तपाà¤\88à¤\82को सम्पादन वेवास्ता गरियो, किनकि कुनै पनि पाठ परिवर्तन गरिएन ।",
        "postedit-confirmation-created": "पृष्ठ सिर्जना गरियो ।",
        "postedit-confirmation-restored": "पृष्ठ पूर्वरूपमा फर्कायो ।",
        "postedit-confirmation-saved": "तपाईंको सम्पादन संग्रह गरिएको छ ।",
        "duplicate-args-category-desc": "पेज जस्तै तर्कहरूको नक्क्लको उपयोग गर्ने ढाँचा कल, जस्तै <code><nowiki>{{foo|bar=1|bar=2}}</nowiki></code> र <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>.",
        "expensive-parserfunction-warning": "'''चेतावनी:''' यस पृष्टका अति धेरै संख्याका महँगा पार्सर फंक्सन कल्स (expensive parser function calls)  छन्।\nयसमा $2 भन्दा कम {{PLURAL:$2|कल|कल्स}} हुनुपर्छ,  यहाँ {{PLURAL:$1|अहिले $1 कल छ|अहिले $1 कल्स छ्न्}}.",
        "expensive-parserfunction-category": "अति धेरै मेहनत पर्ने '''पार्सर फङ्सन कल'''हरू भएका पृष्ठहरू",
-       "post-expand-template-inclusion-warning": "'''à¤\9aà¥\87तावनà¥\80:''' à¤¸à¤®à¥\87à¤\9fà¥\8dनà¥\81परà¥\8dनà¥\87 à¤\9fà¥\87मà¥\8dपà¥\8dलà¥\87à¤\9f(नमà¥\81ना) à¤\86à¤\95ार à¤\85ति à¤ à¥\82लà¥\8b à¤\9b।\nà¤\95à¥\87हà¥\80 à¤\9fà¥\87मà¥\8dपà¥\8dलà¥\87à¤\9fहरà¥\81(नमà¥\81नाहरà¥\81) समेटिने छैनन् ।",
+       "post-expand-template-inclusion-warning": "'''à¤\9aà¥\87तावनà¥\80:''' à¤¸à¤®à¥\87à¤\9fà¥\8dनà¥\81परà¥\8dनà¥\87 à¤¢à¤¾à¤\81à¤\9aा (नमà¥\81ना) à¤\86à¤\95ार à¤\85ति à¤ à¥\82लà¥\8b à¤\9b à¥¤\nà¤\95à¥\87हà¥\80 à¤¢à¤¾à¤\81à¤\9aाहरà¥\82 (नमà¥\81नाहरà¥\82) समेटिने छैनन् ।",
        "post-expand-template-inclusion-category": "यस्ता पृष्ठहरू जहाँ ढाँचा (टेम्पलेट) राख्ने सिमा हुनुपर्ने भन्दा बढि छ ।",
-       "post-expand-template-argument-warning": "'''à¤\9aà¥\87तावनà¥\80:''' à¤¯à¥\8b à¤ªà¥\83षà¥\8dठà¤\95मा à¤\95मà¥\8dतिमा à¤\8fà¤\95 à¤\9fà¥\87मà¥\8dपà¥\8dलà¥\87à¤\9f à¤®à¤¾à¤¨ à¤°à¤¹à¥\87à¤\95à¥\8b à¤\9b à¤\9cसà¤\95à¥\8b à¤§à¥\87रà¥\88 à¤ à¥\82लà¥\8b à¤¬à¤¢à¥\8bतà¥\8dतरà¥\80 à¤\86à¤\95ार à¤°à¤¹à¥\87à¤\95à¥\8b à¤\9b।\nयसà¥\8dता à¤®à¤¾à¤¨à¤¹à¤°à¥\81 हटाइएका छन् ।",
+       "post-expand-template-argument-warning": "'''à¤\9aà¥\87तावनà¥\80:''' à¤¯à¥\8b à¤ªà¥\83षà¥\8dठमा à¤\95मà¥\8dतिमा à¤\8fà¤\95 à¤¢à¤¾à¤\81à¤\9aा à¤®à¤¾à¤¨ à¤°à¤¹à¥\87à¤\95à¥\8b à¤\9b à¤\9cसà¤\95à¥\8b à¤§à¥\87रà¥\88 à¤ à¥\82लà¥\8b à¤¬à¤¢à¥\8bतà¥\8dतरà¥\80 à¤\86à¤\95ार à¤°à¤¹à¥\87à¤\95à¥\8b à¤\9b à¥¤\nयसà¥\8dता à¤®à¤¾à¤¨à¤¹à¤°à¥\82 हटाइएका छन् ।",
        "post-expand-template-argument-category": "मेटिएका ढाँचाहरूसँग सम्बन्ध रहेका पृष्ठहरू",
        "parser-template-loop-warning": "ढाँचागत ग़ाँठो पर्‍यो : [[$1]]",
        "parser-template-recursion-depth-warning": "ढाँचा पुन:चक्र गहिराई सिमा ($1) भन्दा बढि भयो",
        "revdelete-nooldid-title": "अमान्य पुनरावलोकन लक्ष",
        "revdelete-nooldid-text": "यस क्रियालाई गर्नको लागि तपाईंले लक्ष्य अवतरण दिनु भएको छैन, वा तपाईंले दिएको अवतरण अस्तित्वमा छैन वा तपाईं सद्य अवतरणलाई लुकाउने प्रयत्न गर्दै हुनुहुन्छ।",
        "revdelete-no-file": "खुलाइएको पृष्ठ अस्तित्वमा छैन",
-       "revdelete-show-file-confirm": "तपाà¤\88à¤\81 $2 बाट $3 मा मेटिएको फाइल \"<nowiki>$1</nowiki>\" को पुनरावलोकन हेर्न चाहनुहुन्छ भन्ने कुरामा निश्चित हुनुहुन्छ ?",
+       "revdelete-show-file-confirm": "तपाà¤\88à¤\82 $2 बाट $3 मा मेटिएको फाइल \"<nowiki>$1</nowiki>\" को पुनरावलोकन हेर्न चाहनुहुन्छ भन्ने कुरामा निश्चित हुनुहुन्छ ?",
        "revdelete-show-file-submit": "हो",
        "revdelete-selected-text": "[[:$2]] को {{PLURAL:$1|छानिएको संशोधन|छानिएका संशोधनहरू}}:",
        "revdelete-selected-file": "[[:$2]] को {{PLURAL:$1|छानिएको फाइल संस्करण|छानिएका फाइल संस्करणहरू}}:",
        "revdelete-no-change": "'''चेतावनी:''' $2, $1मिति भइको वस्तुको पहिले नै अनुरोध गरे अनुसारको दृश्य सेटिङ्गहरु छन् ।",
        "revdelete-concurrent-change": " $2, $1 मिति गरिएको वस्तु परिवर्तन गर्न सकिएन: यसको स्थितीले तपाईंले परिवर्तन गर्नलाग्नुहुँदा कोहीअरुले नै परिवर्तन गरेजस्तो देखाउँछ\nकृपया लगहरू हेर्नुहोला ।",
        "revdelete-only-restricted": "$2, $1 मिति भएको वस्तु लुकाउदा त्रुटी भएको छ:तपाईंले वस्तुहरूलाई प्रवन्धकहरूको दृष्टीबाट दमन गर्न सक्नुहुन्न अझ कुनै पनि अरु दृष्टी विकल्पहरू नछानीकन।",
-       "revdelete-reason-dropdown": "मà¥\87à¤\9fाà¤\89नà¤\95ा à¤¸à¤¾à¤®à¤¾à¤¨à¥\8dय à¤\95ारणहरà¥\81\n** à¤\95पà¥\80राà¤\87à¤\9f à¤\89लà¥\8dलà¤\82à¤\98न\n** à¤\85नà¥\81à¤\9aित à¤µà¥\8dयà¤\95à¥\8dतिà¤\97त à¤\9cानà¤\95ारà¥\80\n** à¤\85नà¥\81à¤\9aित à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤¨à¤¾à¤®\n** à¤¸à¤\82भावित अपमानजनक जानकारी",
+       "revdelete-reason-dropdown": "मà¥\87à¤\9fाà¤\89नà¤\95ा à¤¸à¤¾à¤®à¤¾à¤¨à¥\8dय à¤\95ारणहरà¥\82\n** à¤\95पà¥\80राà¤\87à¤\9f à¤\89लà¥\8dलà¤\99à¥\8dà¤\98न\n** à¤\85नà¥\81à¤\9aित à¤µà¥\8dयà¤\95à¥\8dतिà¤\97त à¤\9cानà¤\95ारà¥\80\n** à¤\85नà¥\81à¤\9aित à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤¨à¤¾à¤®\n** à¤¸à¤®à¥\8dभावित अपमानजनक जानकारी",
        "revdelete-otherreason": "अन्य/थप कारण:",
        "revdelete-reasonotherlist": "अरु कारण",
        "revdelete-edit-reasonlist": "मेट्ने कार्यहरु सम्पादन गर्ने",
        "nextn": "अर्को {{PLURAL:$1|$1}}",
        "prev-page": "अघिल्लो पृष्ठ",
        "next-page": "अर्को पृष्ठ",
-       "prevn-title": "पहिलà¥\87à¤\95à¥\8b  $1 {{PLURAL:$1|नतिà¤\9cा|नतिà¤\9cाहरà¥\81}}",
-       "nextn-title": "यस à¤ªà¤\9bिà¤\95à¥\8b $1 {{PLURAL:$1|नतिà¤\9cा |नतिà¤\9cाहरà¥\81}}",
+       "prevn-title": "पहिलà¥\87à¤\95à¥\8b  $1 {{PLURAL:$1|नतिà¤\9cा|नतिà¤\9cाहरà¥\82}}",
+       "nextn-title": "यस à¤ªà¤\9bिà¤\95à¥\8b $1 {{PLURAL:$1|नतिà¤\9cा |नतिà¤\9cाहरà¥\82}}",
        "shown-title": "देखाउने $1 {{PLURAL:$1|नतिजा|नतिजाहरू}} प्रति पृष्ठ",
        "viewprevnext": "हेर्नुहोस् ($1 {{int:pipe-separator}} $2) ($3)",
        "searchmenu-exists": "''' \"[[:$1]]\" नाम गरेको पृष्ठ  यो विकीमा रहेको छ'''",
        "showingresults": "देखाउँदै  {{PLURAL:$1|'''१''' नतिजा|'''$1''' नतिजाहरू }} , #'''$2''' बाट सुरुहुने ।",
        "showingresultsinrange": "देखाई रहेको छ{{PLURAL:$1|<strong>1</strong> result|<strong>$1</strong> परिणाम}} सम्म पहुँच  #<strong>$2</strong> देखि #<strong>$3</strong> मा।",
        "search-showingresults": "{{PLURAL:$4|<strong>$3</strong> मा बाट <strong>$1</strong> परिणाम|<strong>$3</strong> मा बाट परिणाम <strong>$1 - $2</strong>}}",
-       "search-nonefound": "तपाà¤\88à¤\82à¤\95à¥\8b à¤\95à¥\8dवà¥\87रà¥\80सँग मेल खाने नतिजाहरू भेटिएनन्",
+       "search-nonefound": "तपाà¤\88à¤\82à¤\95à¥\8b à¤\96à¥\8bà¤\9cसँग मेल खाने नतिजाहरू भेटिएनन्",
        "powersearch-legend": "उन्नत खोज",
        "powersearch-ns": "नेमस्पेसेजहरूमा खोज्ने :",
        "powersearch-togglelabel": "जाँच्ने :",
        "prefs-resetpass": "प्रवेश शब्द परिवर्तन",
        "prefs-changeemail": "इमेल परिवर्तन गर्ने",
        "prefs-setemail": "इमेल ठेगाना प्रविष्ट गर्ने",
-       "prefs-email": "इमेल  विकल्पहरु",
+       "prefs-email": "इमेल विकल्पहरू",
        "prefs-rendering": "स्वरुप",
        "saveprefs": "संग्रह",
        "restoreprefs": "सबै पूर्वनिर्धारित स्थिती कायम गर्ने(सबै खण्डहरूमा)",
        "timezoneregion-europe": "युरोप",
        "timezoneregion-indian": "हिन्द महासागर",
        "timezoneregion-pacific": "प्राशान्त महासागर",
-       "allowemail": "à¤\85रà¥\81 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dताहरà¥\81बाà¤\9f à¤ªà¥\8dरापà¥\8dत à¤¹à¥\81नà¥\87 à¤\88मà¥\87ल enable गर्नुहोस् ।",
+       "allowemail": "à¤\85रà¥\81 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dताहरà¥\82बाà¤\9f à¤ªà¥\8dरापà¥\8dत à¤¹à¥\81नà¥\87 à¤\88मà¥\87ल à¤¸à¤\95à¥\8dषम गर्नुहोस् ।",
        "prefs-searchoptions": "खोज्ने",
        "prefs-namespaces": "नेमस्पेसेज",
        "default": "पूर्वनिर्धारित",
        "prefs-custom-css": "अनुकुलित CSS",
        "prefs-custom-js": "अनुकुलित JS",
        "prefs-common-css-js": "साझा CSS/जाभा स्क्रिप्ट सबै त्वचा(स्किन)को लागि:",
-       "prefs-reset-intro": "तपाà¤\88à¤\81 यो पृष्ठलाई आफ्नो अभिरुचीहरू साइट पूर्वावस्थामा फर्काउन प्रयोग गर्न सक्नुहुन्छ । त्यस पछि यसलाई रद्द गर्न सक्नुहुन्न ।",
+       "prefs-reset-intro": "तपाà¤\88à¤\82 यो पृष्ठलाई आफ्नो अभिरुचीहरू साइट पूर्वावस्थामा फर्काउन प्रयोग गर्न सक्नुहुन्छ । त्यस पछि यसलाई रद्द गर्न सक्नुहुन्न ।",
        "prefs-emailconfirm-label": "इ-मेल एकिन प्रक्रिया :",
        "youremail": "ईमेल",
        "username": "{{GENDER:$1|प्रयोगकर्ता नाम}}:",
        "yourvariant": "लेखको भाषा संस्करण:",
        "prefs-help-variant": "तपाईंको मनपरेको संस्करण वा हिज्जे यस विकि भित्र सामग्री पृष्ठहरू प्रदर्शित गर्नका निमित्त।",
        "yournick": "नयाँ हस्ताक्षर:",
-       "prefs-help-signature": "वारà¥\8dतालाप à¤ªà¥\83षà¥\8dठà¤\95ा à¤\9fिपà¥\8dपणà¥\80हरà¥\82 \"<nowiki>~~~~</nowiki>\" à¤¦à¥\8dवारा à¤¦à¤¸à¥\8dतà¤\96त à¤\97रिनà¥\81परà¥\8dà¤\9b ,à¤\9cà¥\81न à¤ªà¤\9bि à¤¤à¤ªà¤¾à¤\88à¤\81को दस्तखत र समयरेखामा रुपान्तरित हुनेछ ।",
+       "prefs-help-signature": "वारà¥\8dतालाप à¤ªà¥\83षà¥\8dठà¤\95ा à¤\9fिपà¥\8dपणà¥\80हरà¥\82 \"<nowiki>~~~~</nowiki>\" à¤¦à¥\8dवारा à¤¦à¤¸à¥\8dतà¤\96त à¤\97रिनà¥\81परà¥\8dà¤\9b ,à¤\9cà¥\81न à¤ªà¤\9bि à¤¤à¤ªà¤¾à¤\88à¤\82को दस्तखत र समयरेखामा रुपान्तरित हुनेछ ।",
        "badsig": "अमान्य कच्चा दस्तखत।\nHTML ट्यागहरु जाँच्नुहोस् ।",
        "badsiglength": "तपाईंको दस्तखत धेरै लामो छ।\nयो $1 {{PLURAL:$1|अक्षर|अक्षरहरू}} भन्दा लामो हुनु हुँदैन ।",
        "yourgender": "कसरी वताउन चाहनुहुन्छ ?",
        "prefs-help-gender": "यो जानकारी दिनु वैकल्पिक छ।\nयो सफ्टवेयरमा लिङ्गको आधारमा तपाईंको लागि सहि सम्बोधन गर्नको निमित्त हुन्छ।\nयो जानकारी सार्वजनिक गरिनेछ।",
        "email": "ईमेल",
        "prefs-help-realname": "वास्तविक नाम ऐच्छिक हो ।\nतपाईंले खुलाउनु भएको खण्डमा तपाईंको कामको श्रेय दिनको लागि यसको प्रयोग गरिने छ ।",
-       "prefs-help-email": "à¤\87मà¥\87ल à¤ à¥\87à¤\97ाना à¤\90à¤\9aà¥\8dà¤\9bिà¤\95 à¤¹à¥\8b, à¤¤à¤°  à¤ªà¥\8dरवà¥\87श à¤¶à¤µà¥\8dदà¤\95à¥\8b à¤ªà¥\81नरà¥\8dसà¥\8dथापनाà¤\95à¥\8b à¤²à¤¾à¤\97ि à¤\86वशà¥\8dयà¤\95ता à¤\9b, à¤\95à¥\87 à¤¤à¤ªà¤¾à¤\88à¤\82लà¥\87 à¤ªà¥\8dरवà¥\87श à¤¶à¤µà¥\8dद à¤­à¥\81लà¥\8dनà¥\81 à¤¹à¥\81नà¥\8dथà¥\8dयà¥\8b।",
-       "prefs-help-email-others": "तपाà¤\88à¤\82लà¥\87 à¤¯à¥\8b à¤ªà¤¨à¤¿ à¤\9aयन à¤\97रà¥\8dन à¤¸à¤\95à¥\8dनà¥\81हà¥\81नà¥\8dà¤\9b à¤\95ि à¤\85रà¥\81हरà¥\81लà¥\87 à¤¤à¤ªà¤¾à¤\88à¤\82à¤\95à¥\8b à¤ªà¤°à¤¿à¤\9aय à¤¨à¤ªà¤¾à¤\88 à¤¤à¤ªà¤¾à¤\88à¤\82सित à¤¤à¤ªà¤¾à¤\88à¤\82à¤\95à¥\8b à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤\85थवा à¤µà¤¾à¤°à¥\8dतालाप à¤ªà¥\83षà¥\8dठà¤\95à¥\8b à¤®à¤¾à¤§à¥\8dयमलà¥\87 à¤¸à¤®à¥\8dपरà¥\8dà¤\95 à¤°à¤¾à¤\96à¥\81नà¥\8d à¥¤",
+       "prefs-help-email": "à¤\87मà¥\87ल à¤ à¥\87à¤\97ाना à¤\90à¤\9aà¥\8dà¤\9bिà¤\95 à¤¹à¥\8b, à¤¤à¤°  à¤ªà¥\8dरवà¥\87श à¤¶à¤¬à¥\8dदà¤\95à¥\8b à¤ªà¥\81नरà¥\8dसà¥\8dथापनाà¤\95ा à¤²à¤¾à¤\97ि à¤\86वशà¥\8dयà¤\95ता à¤\9b, à¤¤à¤ªà¤¾à¤\88à¤\82लà¥\87 à¤ªà¥\8dरवà¥\87श à¤¶à¤¬à¥\8dद à¤¤ à¤\95à¥\87 à¤­à¥\81लà¥\8dनà¥\81 à¤¹à¥\81नà¥\8dथà¥\8dयà¥\8b ।",
+       "prefs-help-email-others": "तपाईंले यो पनि चयन गर्न सक्नुहुन्छ कि अरुले तपाईंको परिचय नपाई तपाईंसित तपाईंको प्रयोगकर्ता अथवा वार्तालाप पृष्ठको माध्यमले सम्पर्क राखुन् ।",
        "prefs-help-email-required": "इमेल ठेगामा चाहिन्छ ।",
        "prefs-info": "साधारण जानकारी",
        "prefs-i18n": "अन्तर्राष्ट्रियकरण",
        "prefs-editor": "सम्पादक",
        "prefs-preview": "पूर्वावलोकन",
        "prefs-advancedrc": "उन्नत विकल्पहरू",
-       "prefs-advancedrendering": "à¤\89नà¥\8dनत à¤µà¤¿à¤\95लà¥\8dपहरà¥\81",
+       "prefs-advancedrendering": "à¤\89नà¥\8dनत à¤µà¤¿à¤\95लà¥\8dपहरà¥\82",
        "prefs-advancedsearchoptions": "उन्नत विकल्पहरू",
        "prefs-advancedwatchlist": "उन्नत विकल्पहरू",
        "prefs-displayrc": "प्रदर्शन विकल्पहरू",
        "userrights-nodatabase": "डेटाबेस $1 उपलब्ध छैन या स्थानीय हैन।",
        "userrights-nologin": "प्रयोगकर्ता अधिकार प्रदान गर्न तपाईंले प्रबन्धक खाताबाट [[Special:UserLogin|प्रवेश]] गर्नुपर्छ।",
        "userrights-notallowed": "प्रयोगकर्तालाई अधिकार प्रदान गर्ने वा हटाउने अनुमति तपाईंलाई छैन।",
-       "userrights-changeable-col": "परिवरà¥\8dतन à¤\97रà¥\8dन à¤¸à¤\95िनà¥\87 à¤¸à¤®à¥\82हहरà¥\81",
+       "userrights-changeable-col": "तपाà¤\88à¤\82लà¥\87 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\97रà¥\8dन à¤¸à¤\95à¥\8dनà¥\87 à¤¸à¤®à¥\82हहरà¥\82",
        "userrights-unchangeable-col": "तपाईंले परिवर्तन गर्न नसक्ने समूहहरू",
        "userrights-irreversible-marker": "$1*",
        "userrights-conflict": "प्रयोगकर्ताको अधिकार परिवर्तनमा मतभेद भयो ! कृपया तपाईंको परिवर्तन पुनरावलोकन तथा पुष्टि गर्नुहोस् ।",
        "right-purge": "साइटको क्याश( cache) निश्चित नगरिकनै पर्ज(Purge) गर्ने",
        "right-autoconfirmed": "आइपी दर सीमाले असर नपार्ने",
        "right-bot": "स्वाचालित कार्यको रुपमा व्यवहार गर्ने",
-       "right-nominornewtalk": "वारà¥\8dता à¤ªà¥\83षà¥\8dठहरà¥\82मा à¤¸à¤¾à¤¨à¥\8b à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\97रà¥\8dदा à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dताहरà¥\82लाà¤\88 \"तपाà¤\88à¤\82à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¨à¤¯à¤¾à¤\81 à¤¸à¤¨à¥\8dदà¥\87श à¤\9b\" à¤­à¤¨à¥\80 à¤¨à¥\8dदà¥\87à¤\96ाà¤\89नà¥\87",
+       "right-nominornewtalk": "वार्ता पृष्ठहरूमा सानो परिवर्तन गर्दा प्रयोगकर्ताहरूलाई \"तपाईंको लागि नयाँ सन्देश छ\" भनी देखाउने",
        "right-apihighlimits": "API खोजको लागि उच्च सीमा प्रयोग गर्नुहोस्",
        "right-writeapi": "लेखन API प्रयोग गर्ने",
        "right-delete": "पृष्ठहरू मेट्ने",
        "right-editusercssjs": "अरु प्रयोगकर्ताको CSS र JS फाइलहरू सम्पादन गर्ने",
        "right-editusercss": "अरु प्रयोगकर्ताको CSS फाइलहरू सम्पादन गर्ने",
        "right-edituserjs": "अरु प्रयोकर्ताको जाभास्क्रिप्ट फाइलहरू सम्पादन गर्ने",
-       "right-editmyusercss": "तपाà¤\88à¤\81को आफ्नो CSS फाइलहरू सम्पादन गर्नुहोस्",
-       "right-editmyuserjs": "तपाà¤\88à¤\81को आफ्नो जाभा स्क्रिप्ट फाइलहरू सम्पादन गर्ने",
-       "right-viewmywatchlist": "तपाà¤\88à¤\81à¤\95à¥\8b à¤¨à¤¿à¤\97रानà¥\80 à¤¸à¥\81ची हेर्नुहोस्",
+       "right-editmyusercss": "तपाà¤\88à¤\82को आफ्नो CSS फाइलहरू सम्पादन गर्नुहोस्",
+       "right-editmyuserjs": "तपाà¤\88à¤\82को आफ्नो जाभा स्क्रिप्ट फाइलहरू सम्पादन गर्ने",
+       "right-viewmywatchlist": "तपाà¤\88à¤\82à¤\95à¥\8b à¤¨à¤¿à¤\97रानà¥\80 à¤¸à¥\82ची हेर्नुहोस्",
        "right-editmywatchlist": "आफ्नो अबलोकन सूची सम्पादन गर्नुहोस् । ख्याल राख्नु यस अधिकार विना पनि केहि कार्यबाट पृष्ठहरू थप गर्न सकिन्छ ।",
        "right-viewmyprivateinfo": "आफ्नो व्यक्तिगत डेटा हेर्नुहोस (उदाहरण इमेल ठेगाना, सहि नाम)",
        "right-editmyprivateinfo": "आफ्नो निजी जानकारी (जस्तैः इमेल ठेगाना, बास्तविक नाम) सम्पादन गर्नुहोस्",
        "right-patrolmarks": "हालका सम्पादन पट्रोल(गस्ती) चिनो लगाउने",
        "right-unwatchedpages": "निगरानी नगरिएका पृष्ठहरूको सूची हेर्ने",
        "right-mergehistory": "पृष्ठका इतिहासहरु बुझाउने",
-       "right-userrights": "पà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dताà¤\95ा à¤\85धिà¤\95ारहरà¥\81 सम्पादन गर्ने",
+       "right-userrights": "पà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dताà¤\95ा à¤\85धिà¤\95ारहरà¥\82 सम्पादन गर्ने",
        "right-userrights-interwiki": "अरु विकिहरूमा प्रयोगकर्ताहरूको अधिकार सम्पादन गर्ने",
        "right-siteadmin": "डेटाबेसको ताल्चामार्ने र ताल्चाखोल्ने",
        "right-override-export-depth": "गहिराइ ५ सम्मको लिंक गरिएका पृष्ठहरू सहित निर्यात गर्ने",
        "action-autopatrol": "तपाईंको सम्पादनलाई गश्त रुपमा दाग दिनुहोस्",
        "action-unwatchedpages": "अवलोकन नगरिएका  पृष्ठहरूको सूची हेर्ने",
        "action-mergehistory": "यस पृष्ठको इतिहासलाई मिसाउने",
-       "action-userrights": "सबà¥\88 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dताà¤\95ा à¤\85धिà¤\95ारहरà¥\81 सम्पादन गर्ने",
+       "action-userrights": "सबà¥\88 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dताà¤\95ा à¤\85धिà¤\95ारहरà¥\82 सम्पादन गर्ने",
        "action-userrights-interwiki": "अरु विकिका प्रयोगकर्ताहरूको प्रयोगकर्ता अधिकारलाई सम्पादन गर्ने",
        "action-siteadmin": "डेटाबेस बन्दगर्ने वा खोल्ने",
        "action-sendemail": "इमेलहरु पठाउने",
-       "action-editmywatchlist": "तपाà¤\88à¤\81à¤\95à¥\8b à¤¨à¤¿à¤\97रानà¥\80 à¤¸à¥\81ची सम्पादन गर्नुहोस",
-       "action-viewmywatchlist": "तपाà¤\88à¤\81à¤\95à¥\8b à¤¨à¤¿à¤\97रानà¥\80 à¤¸à¥\81à¤\9aà¥\80 à¤¹à¥\87रà¥\8dनà¥\81हà¥\8bस",
-       "action-viewmyprivateinfo": "तपाà¤\88à¤\81को व्यक्तिगत जानकारी हेर्नुहोस",
-       "action-editmyprivateinfo": "तपाà¤\88à¤\81को व्यक्तिगत जानकारी सम्पादन गर्नुहोस",
+       "action-editmywatchlist": "तपाà¤\88à¤\82à¤\95à¥\8b à¤¨à¤¿à¤\97रानà¥\80 à¤¸à¥\82ची सम्पादन गर्नुहोस",
+       "action-viewmywatchlist": "तपाà¤\88à¤\82à¤\95à¥\8b à¤¨à¤¿à¤\97रानà¥\80 à¤¸à¥\82à¤\9aà¥\80 à¤¹à¥\87रà¥\8dनà¥\81हà¥\8bसà¥\8d",
+       "action-viewmyprivateinfo": "तपाà¤\88à¤\82को व्यक्तिगत जानकारी हेर्नुहोस",
+       "action-editmyprivateinfo": "तपाà¤\88à¤\82को व्यक्तिगत जानकारी सम्पादन गर्नुहोस",
        "action-editcontentmodel": "पृष्ठको सामग्री नमुना सम्पादन",
        "action-managechangetags": "डाटाबेसबाट ट्यागहरू बनाउने र मेटाउने",
        "action-applychangetags": "तपाईंको परिवर्तनसँगै ट्यागहरू लागु गर्ने",
        "destfilename": "गन्तव्य फाइलनाम :",
        "upload-maxfilesize": "अधिकतम फाइल आकार : $1",
        "upload-description": "फाइल वर्णन",
-       "upload-options": "à¤\89रà¥\8dधà¥\8dवभरण à¤µà¤¿à¤\95लà¥\8dपहरà¥\81",
+       "upload-options": "à¤\89रà¥\8dधà¥\8dवभरण à¤µà¤¿à¤\95लà¥\8dपहरà¥\82",
        "watchthisupload": "यो पृष्ठ निगरानी गर्नुहोस्",
        "filewasdeleted": "यस नामको एक फाइल पहिले पनि अपलोड गरे पछि हटाई सकिएको छ।\nपुनः अपलोड गर्नु पूर्व तपाईं $1 लाई राम्रोसँग जाँच गर्नुहोला।",
        "filename-bad-prefix": "तपाईं जुन फाइल अपलोड गर्दै हुनुहुन्छ त्यसको नाम <strong>\"$1\"</strong>बाट शुरू हुन्छ, जुन डिजिटल क्यामराद्वारा दिइएको नाम हो।\nकृपया यस फाइलको लागि कुनै दोश्रो अधिक जानकारीयुक्त नाम छान्नुहोस्।",
        "filedelete-success-old": "<strong>[[Media:$1|$1]]</strong> को संस्करणलाघ $3, $2 हुने गरि मेटाइएको छ ।",
        "filedelete-nofile": "'''$1''' अस्तित्वमा छैन ।",
        "filedelete-nofile-old": "<strong>$1</strong> को तपाईंद्वारा दिइएको विशेषताहरू सहितको सङ्ग्रहित अवतरण छैन।",
-       "filedelete-otherreason": "à¤\85नà¥\8dय/थप à¤\95ारणहरà¥\81:",
+       "filedelete-otherreason": "à¤\85नà¥\8dय/थप à¤\95ारणहरà¥\82:",
        "filedelete-reason-otherlist": "अरु कारण",
-       "filedelete-reason-dropdown": "*मà¥\87à¤\9fà¥\8dनà¥\81à¤\95ा à¤¸à¤¾à¤®à¤¾à¤¨à¥\8dय à¤\95ारणहरà¥\81\n** कपी राइट उल्लघन\n** सारिएको फाइल",
+       "filedelete-reason-dropdown": "*मà¥\87à¤\9fà¥\8dनà¥\81à¤\95ा à¤¸à¤¾à¤®à¤¾à¤¨à¥\8dय à¤\95ारणहरà¥\82\n** कपी राइट उल्लघन\n** सारिएको फाइल",
        "filedelete-edit-reasonlist": "मेट्नका कारण संपादन गर्नुहोस्।",
        "filedelete-maintenance": "रखरखाव चलिरहेको हुँदा अस्थायी रुपमा फाइलहरू मेटाउने र मेटाइएकोलाई पुनर्बहाली गर्न निष्क्रिय गरिएकोछ।",
        "filedelete-maintenance-title": "फाइल मेट्न सकिएन",
        "listduplicatedfiles": "दोरोएको फाइलहरूको सूची",
        "listduplicatedfiles-summary": "यो एउटा यस्तो फाइलहरूको सूची हो जसको नवीनतम संस्करण दोश्रो फाइलहरूको नवीनतम संस्करणको प्रतिलिपि हो । मात्रै स्थानीय फाइलहरूलाई विचार गरिएको छ।",
        "listduplicatedfiles-entry": "[[:File:$1|$1]] को [[$3|{{PLURAL:$2|दोहोरो फाइल|$2 दोहोरो फाइलहरू}}]] छ ।",
-       "unusedtemplates": "पà¥\8dरयà¥\8bà¤\97 à¤¨à¤\97रिà¤\8fà¤\95à¥\8b à¤\9fà¥\87मà¥\8dपà¥\8dलà¥\87à¤\9f",
+       "unusedtemplates": "पà¥\8dरयà¥\8bà¤\97 à¤¨à¤\97रिà¤\8fà¤\95à¥\8b à¤¢à¤¾à¤\81à¤\9aाहरà¥\82",
        "unusedtemplatestext": "यस पृष्ठमा {{ns:template}} नामस्थान भएको ती सबै पृष्ठ समावेश छन् जुन कुनै अन्य पृष्ठमा सामेल छैनन्। यसलाई हटाउनभन्दा पहिले यी ढाँचाहरूको र लिङ्कहरूलाई जाँच गर्नुहोला।",
        "unusedtemplateswlh": "अन्य कड़ीहरु",
        "randompage": "कुनै एक लेख",
        "uncategorizedpages": "श्रेणीकरण नभएका पृष्ठहरू",
        "uncategorizedcategories": "श्रेणीकरण नभएका श्रेणीहरू",
        "uncategorizedimages": "श्रेणीकरण नभएका फाइलहरू",
-       "uncategorizedtemplates": "शà¥\8dरà¥\87णà¥\80à¤\95रण à¤¨à¤­à¤\8fà¤\95ा à¤\9fà¥\87मà¥\8dपà¥\8dलà¥\87à¤\9fहरà¥\81",
+       "uncategorizedtemplates": "शà¥\8dरà¥\87णà¥\80à¤\95रण à¤¨à¤­à¤\8fà¤\95ा à¤¢à¤¾à¤\81à¤\9aाहरà¥\82",
        "unusedcategories": "प्रयोग नभएका श्रेणीहरू",
        "unusedimages": "प्रयोग नभएका फाइलहरू",
        "wantedcategories": "माग भएका श्रेणीहरू",
        "wantedfiletext-cat-noforeign": "निम्नलिखित फाइल प्रयोगमा छ तर यहाँ छैन। यस अतिरिक्त, पृष्ठ जुन यस गैर-अवस्थित फाइलहरूलाई सङ्ग्रह गरेका छन् त्यसको सूची [[:$1]]मा छ।",
        "wantedfiletext-nocat": "निम्न फाइलहरू प्रयोगमा छन् तर यहाँ छैन । वाह्य भण्डारहरूको फाइलहरू उपस्थित भए पनि सूचीमा हुन सक्छ। यस्तो कुनै पनि गलत प्रविष्टिहरू <del>काटिएको हुनेछ</del>।",
        "wantedfiletext-nocat-noforeign": "तलका फाइलहरू प्रयोगमा भए पनि उपलब्ध छैन् ।",
-       "wantedtemplates": "माà¤\97 à¤­à¤\8fà¤\95ा à¤\9fà¥\87मà¥\8dपà¥\8dलà¥\87à¤\9fहरà¥\81",
+       "wantedtemplates": "माà¤\97 à¤­à¤\8fà¤\95ा à¤¢à¤¾à¤\81à¤\9aाहरà¥\82",
        "mostlinked": "सबैभन्दा बढि लिंक भएको पृष्ठ",
        "mostlinkedcategories": "सबैभन्दा बढी लिंक भएका श्रेणीहरू",
        "mostlinkedtemplates": "सबैभन्दा बढि ट्रान्सक्ल्युडेड पृष्ठहरू",
        "protectedpages-submit": "पानाहरू देखाउनुहोस्",
        "protectedpages-unknown-timestamp": "अज्ञात",
        "protectedpages-unknown-performer": "अज्ञात प्रयोगकर्ता",
-       "protectedtitles": "सà¥\81रà¤\95à¥\8dषा à¤\97रिà¤\8fà¤\95ा à¤¶à¤¿à¤°à¥\8dषà¤\95हरà¥\81",
+       "protectedtitles": "सà¥\81रà¤\95à¥\8dषित à¤\97रिà¤\8fà¤\95ा à¤¶à¤¿à¤°à¥\8dषà¤\95हरà¥\82",
        "protectedtitles-summary": "यो पृष्ठ ती सबै पृष्ठहरूको सूची दिन्छ जुन अब सुरक्षित छन्। ती सबै पृष्ठहरूको सूची जान्नका लागि जुन बनाउनबाट सुरक्षित गरिएका छन्, हेर्नुहोस [[{{#special:ProtectedPages}}|{{int:protectedpages}}]]",
        "protectedtitlesempty": "दिइएको प्यारामिटर प्रयोग गरि सुरक्षा गरिएका शीर्षकहरु छैनन् ।",
        "protectedtitles-submit": "शीर्षकहरू देखाउनुहोस्",
        "activeusers-noresult": "प्रयोगकर्ताहरू भेटिएनन्।",
        "activeusers-submit": "सक्रिय प्रयोगकर्ताहरू देखाउनुहोस्",
        "listgrouprights": "प्रयोगकर्ता समूह अधिकार",
-       "listgrouprights-summary": "निमà¥\8dन à¤¸à¥\82à¤\9aà¥\80 à¤¯à¤¸ à¤µà¤¿à¤\95िमा à¤ªà¤°à¤¿à¤­à¤¾à¤·à¤¿à¤¤ à¤¸à¤®à¥\82हहरà¥\81 à¤° à¤¤à¤¿à¤¨à¥\80हरà¥\81लà¥\87 à¤ªà¥\8dरयà¥\8bà¤\97à¤\97रà¥\8dन à¤¸à¤\95à¥\8dनà¥\87 à¤¸à¤\82बदà¥\8dध  à¤\85धिà¤\95ारहरà¥\81à¤\95à¥\8b à¤¹à¥\8b।\nयसमा à¤¨à¤¿à¤\9cà¥\80 à¤\85धिà¤\95ारहरà¥\81को बारेमा [[{{MediaWiki:Listgrouprights-helppage}}|अतिरिक्त सूचना]] हुनसक्छ।",
+       "listgrouprights-summary": "निमà¥\8dन à¤¸à¥\82à¤\9aà¥\80 à¤¯à¤¸ à¤µà¤¿à¤\95िमा à¤ªà¤°à¤¿à¤­à¤¾à¤·à¤¿à¤¤ à¤¸à¤®à¥\82हहरà¥\82 à¤° à¤¤à¤¿à¤¨à¥\80हरà¥\82लà¥\87 à¤ªà¥\8dरयà¥\8bà¤\97à¤\97रà¥\8dन à¤¸à¤\95à¥\8dनà¥\87 à¤¸à¤\82बदà¥\8dध  à¤\85धिà¤\95ारहरà¥\82à¤\95à¥\8b à¤¹à¥\8b à¥¤\nयसमा à¤¨à¤¿à¤\9cà¥\80 à¤\85धिà¤\95ारहरà¥\82को बारेमा [[{{MediaWiki:Listgrouprights-helppage}}|अतिरिक्त सूचना]] हुनसक्छ।",
        "listgrouprights-key": "* <span class=\"listgrouprights-granted\">प्रदान गरिएका अधिकारहरू</span>\n* <span class=\"listgrouprights-revoked\">फिर्ता गरिएका अधिकारहरू</span>",
        "listgrouprights-group": "समूह",
-       "listgrouprights-rights": "à¤\85धिà¤\95ारहरà¥\81",
-       "listgrouprights-helppage": "Help:सामà¥\82हिà¤\95 à¤\85धिà¤\95ारहरà¥\81",
+       "listgrouprights-rights": "à¤\85धिà¤\95ारहरà¥\82",
+       "listgrouprights-helppage": "Help:सामà¥\82हिà¤\95 à¤\85धिà¤\95ारहरà¥\82",
        "listgrouprights-members": "(सदस्यहरूको सूची)",
        "listgrouprights-addgroup": "{{PLURAL:$2|समूह|समूहहरु}}: $1 थप्ने",
        "listgrouprights-removegroup": "{{PLURAL:$2|समूह|समूहहरु}}: $1 हटाउने",
        "usermaildisabledtext": "यस विकिमा तपाईं अरु प्रयोगकर्तालाई ई-मेल पठाउन सक्नुहुन्न",
        "noemailtitle": "ईमेल ठेगाना नभएको",
        "noemailtext": "प्रयोगकर्ताले सही ई-मेल ठेगाना दर्शाएको छैन।",
-       "nowikiemailtext": "यà¥\80 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dतालà¥\87 à¤\85रà¥\81 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dताहरà¥\81बाट ई-मेल स्वीकार नगर्ने छनोट गरेकाछन्।",
+       "nowikiemailtext": "यà¥\80 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dतालà¥\87 à¤\85रà¥\81 à¤ªà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dताहरà¥\82बाट ई-मेल स्वीकार नगर्ने छनोट गरेकाछन्।",
        "emailnotarget": "प्राप्तकर्ताको रुपमा नभएको अथवा अमान्य प्रयोगकर्ता।",
        "emailtarget": "प्राप्तकर्ताको प्रयोगकर्ता नाम हाल्नुहोस्",
        "emailusername": "प्रयोगकर्ता-नाम:",
        "emailmessage": "सन्देश:",
        "emailsend": "पठाउनुहोस्",
        "emailccme": "मेरो सन्देशको एउटा प्रति मलाई ई-मेल गरिदिनुहोस्।",
-       "emailccsubject": "तपाà¤\88à¤\81को सन्देशको प्रतिलिपि  $1: $2लाई",
+       "emailccsubject": "तपाà¤\88à¤\82को सन्देशको प्रतिलिपि  $1: $2लाई",
        "emailsent": "इमेल पठाईयो",
        "emailsenttext": "तपाईंको ई-मेल सन्देश पठाइयो।",
        "emailuserfooter": "यो ईमेल $1 ले $2 लाई \"ई-मेल प्रयोगकर्ता\" कार्यानुरुप {{SITENAME}}मा पठाएको थियो।",
        "enotif_body_intro_created": "{{SITENAME}} पृष्ठ $1 लाई {{gender:$2|$2}} ले $PAGEEDITDATE मा बनाएको हो, वर्तमान अवतरण को लागि $3 हेर्नुहोस।",
        "enotif_body_intro_moved": "{{SITENAME}} पृष्ठ $1 लाई {{gender:$2|$2}} ले $PAGEEDITDATE मा सारेको हो, वर्तमान अवतरण को लागि $3 हेर्नुहोस।",
        "enotif_body_intro_restored": "{{SITENAME}} पृष्ठ $1 लाई {{gender:$2|$2}} ले $PAGEEDITDATE मा पुनर्स्थापित गरेको हो, वर्तमान अवतरण को लागि $3 हेर्नुहोस।",
-       "enotif_body_intro_changed": "{{SITENAME}} पृष्ठ $1 लाई {{gender:$2|$2}} ले $PAGEEDITDATE मा परिवर्तन गरेको हो, वर्तमान अवतरण को लागि $3 हेर्नुहोस।",
-       "enotif_lastvisited": "à¤\85à¤\98िलà¥\8dलà¥\8b à¤¹à¥\87राà¤\87पà¤\9bिà¤\95ा à¤¸à¤¬à¥\88 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतनहरà¥\81को निम्ति हेर्नुहोस्: $1",
+       "enotif_body_intro_changed": "{{SITENAME}} à¤ªà¥\83षà¥\8dठ $1 à¤²à¤¾à¤\88 {{gender:$2|$2}} à¤²à¥\87 $PAGEEDITDATE à¤®à¤¾ à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\97रà¥\87à¤\95à¥\8b à¤¹à¥\8b, à¤µà¤°à¥\8dतमान à¤\85वतरण à¤\95à¥\8b à¤²à¤¾à¤\97ि $3 à¤¹à¥\87रà¥\8dनà¥\81हà¥\8bसà¥\8d à¥¤",
+       "enotif_lastvisited": "तपाà¤\88à¤\82à¤\95à¥\8b à¤\85नà¥\8dतिम à¤¹à¥\87राà¤\87पà¤\9bिà¤\95ा à¤¸à¤¬à¥\88 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतनहरà¥\82को निम्ति हेर्नुहोस्: $1",
        "enotif_lastdiff": "यस परिवर्तनको निम्ति यो $1 हेर्नुहोस्",
        "enotif_anon_editor": "अज्ञात  प्रयोगकर्ता  $1",
        "enotif_body": "प्रिय $WATCHINGUSERNAME,\n\n\n{{SITENAME}}को पृष्ठ $PAGETITLE  $PAGEEDITDATE को दिन $PAGEEDITORद्वारा $CHANGEDORCREATED, \nहालको संशोधनको निम्ति हेर्नुहोस्  $PAGETITLE_URL ।\n\n$NEWPAGE\n\nसम्पादकको सारांश: $PAGESUMMARY $PAGEMINOREDIT\n\nसम्पादकसित सम्पर्क राख्नुहोस्:\nमेल: $PAGEEDITOR_EMAIL\nविकि: $PAGEEDITOR_WIKI\n\nतपाईं यस पृष्ठमा नगएसम्म अब उसो कुनै परिवर्तन भएका खण्डमा कुनै सूचना दिनेछैन।\nतपाईंका सम्पूर्ण निगरानी पृष्ठहरूको लागि तपाईंले सूचना पताकालाई निगरानी सूचीमा पुनर्बहाली गर्न सक्नुहुन्छ। \n\n             तपाईंको मित्र {{SITENAME}} सूचना प्रणाली\n--\nइमेल सूचना व्यवस्था परिवर्तन गर्न, जानुहोस्\n{{canonicalurl:{{#special:Preferences}}}}\n\nनिगरानी सूची व्यवस्थित गर्न, जानुहोस्\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nनिगरानी सूची मेट्न, जानुहोस्\n$UNWATCHURL\n\nप्रतिक्रिया र अन्य सहयोगको निम्ति:\n$HELPPAGE",
        "deletecomment": "कारण :",
        "deleteotherreason": "अरू/थप कारणहरू :",
        "deletereasonotherlist": "अरु कारण",
-       "deletereason-dropdown": "*मà¥\87à¤\9fà¥\8dनà¤\95ा à¤¸à¤¾à¤®à¤¾à¤¨à¥\8dय à¤\95ारणहरà¥\81\n** à¤¸à¥\8dपà¥\8dयाम\n** à¤¹à¥\81लà¥\8dयाहापन(Vandalism) \n** à¤ªà¥\8dरतिलिपà¥\80 à¤\85धिà¤\95ार à¤\89लà¥\8dलà¤\82घन\n** लेखकको अनुरोध\n** टुटेको अनुप्रेषण",
+       "deletereason-dropdown": "*मà¥\87à¤\9fà¥\8dनà¤\95ा à¤¸à¤¾à¤®à¤¾à¤¨à¥\8dय à¤\95ारणहरà¥\82\n** à¤¸à¥\8dपà¥\8dयाम\n** à¤¹à¥\81लà¥\8dयाहापन(Vandalism) \n** à¤ªà¥\8dरतिलिपà¥\80 à¤\85धिà¤\95ार à¤\89लà¥\8dलà¤\99à¥\8dघन\n** लेखकको अनुरोध\n** टुटेको अनुप्रेषण",
        "delete-edit-reasonlist": "मेट्नुको कारण सम्पादन गर्नुहोस्",
        "delete-toobig": "यो पृष्ठको सम्पादन इतिहास धेरै र  $1 {{PLURAL:$1|पुनरावलोक|पुनरावलोकहरू}}भन्दा बढी रहेको छ।\n {{SITENAME}}मा दुर्घटनाको कारणले गडबडी आउनसक्ने कुरालाई रोक्न यस्ता पृष्ठहरूलाई मेट्नबाट निषेध गरिएको छ ।",
        "delete-warning-toobig": "This page has a large edit history, over $1 {{PLURAL:$1|revision|revisions}}.\nDeleting it may disrupt database operations of {{SITENAME}};\nproceed with caution.",
        "protectexpiry": "सकिने:",
        "protect_expiry_invalid": "सकिने समयावधि अमान्य ।",
        "protect_expiry_old": "समाप्ती समय बितिसक्यो ।",
-       "protect-unchain-permissions": "à¤\86à¤\97ामà¥\80 à¤¸à¥\81रà¤\95à¥\8dषा à¤µà¤¿à¤\95लà¥\8dपहरà¥\81 खोल्ने",
-       "protect-text": "तपाà¤\88à¤\81  यहाँ '''$1''' पृष्ठको सुरक्षा स्तर हेर्न र परिवर्तन गर्न सक्नुहुन्छ ।",
+       "protect-unchain-permissions": "à¤\86à¤\97ामà¥\80 à¤¸à¥\81रà¤\95à¥\8dषा à¤µà¤¿à¤\95लà¥\8dपहरà¥\82 खोल्ने",
+       "protect-text": "तपाà¤\88à¤\82  यहाँ '''$1''' पृष्ठको सुरक्षा स्तर हेर्न र परिवर्तन गर्न सक्नुहुन्छ ।",
        "protect-locked-blocked": "तपाईं प्रतिबन्धित भएको अवस्थामा सुरक्षा स्तरमा परिवर्तन गर्न सक्नुहुन्न।\nपृष्ठ <strong>$1</strong> को वर्तमान स्थिति यो छ:",
        "protect-locked-dblock": "डेटाबेसमा सक्रिय बन्देज भएको कारणले सुरक्षा स्तरमा कुनै परिवर्तन गर्न सकिंदैन।\nपृष्ठ <strong>$1</strong> को वर्तमान स्थिति यो छ:",
        "protect-locked-access": "तपाईँको खातालाई पृष्ठको सुरक्षा स्तरहरू परिवर्तन गर्ने अनुमति छैन ।\n'''$1''पृष्ठको हालको स्थिति  निम्न छ :",
        "protect-expiring-local": "समाप्ति समय $1",
        "protect-expiry-indefinite": "अनिश्चित काल",
        "protect-cascade": "यो पृष्ठमा संलग्न सुरक्षित पृष्ठहरू(लामबद्द सुरक्षा)",
-       "protect-cantedit": "तपाà¤\88à¤\81 à¤¯à¤¸ à¤ªà¥\83षà¥\8dठà¤\95à¥\8b à¤¸à¥\81रà¤\95à¥\8dषा à¤¸à¥\8dतर à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\97रà¥\8dन à¤¸à¤\95à¥\8dनà¥\81हà¥\81नà¥\8dन , à¤\95िन à¤\95ि à¤¤à¤ªà¤¾à¤\88à¤\81लाà¤\88 à¤¯à¤¸à¤\95à¥\8b à¤¸à¤®à¥\8dपादनà¤\95à¥\8b अनुमति छैन ।",
+       "protect-cantedit": "तपाà¤\88à¤\82 à¤¯à¤¸ à¤ªà¥\83षà¥\8dठà¤\95à¥\8b à¤¸à¥\81रà¤\95à¥\8dषा à¤¸à¥\8dतर à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\97रà¥\8dन à¤¸à¤\95à¥\8dनà¥\81हà¥\81नà¥\8dन , à¤\95िन à¤\95ि à¤¤à¤ªà¤¾à¤\88à¤\82लाà¤\88 à¤¯à¥\8b à¤\95ाम à¤\97रà¥\8dन अनुमति छैन ।",
        "protect-othertime": "अरु समय :",
        "protect-othertime-op": "अरु समय",
        "protect-existing-expiry": "वर्तमान समय सीमा :$3, $2",
        "protect-existing-expiry-infinity": "वर्तमान समाप्त समयः अनन्त",
-       "protect-otherreason": "à¤\85रà¥\81/थप à¤\95ारणहरà¥\81 :",
+       "protect-otherreason": "à¤\85रà¥\81/थप à¤\95ारणहरà¥\82 :",
        "protect-otherreason-op": "अरु कारण",
-       "protect-dropdown": "*सामानà¥\8dय à¤¸à¥\81रà¤\95à¥\8dषाà¤\95ा à¤\95ारणहरà¥\81\n** अत्यधिक बर्बरता\n** अत्यधिक अचाहिंदा सन्देश\n** जवाबी सम्पादन-झगडा\n** अधिकतम खोलिने पृष्ठ",
-       "protect-edit-reasonlist": "सà¥\81रà¤\95à¥\8dषाà¤\95à¥\8b à¤\95ारणहरà¥\81 सम्पादन गर्नुहोस्",
+       "protect-dropdown": "*सामानà¥\8dय à¤¸à¥\81रà¤\95à¥\8dषाà¤\95ा à¤\95ारणहरà¥\82\n** अत्यधिक बर्बरता\n** अत्यधिक अचाहिंदा सन्देश\n** जवाबी सम्पादन-झगडा\n** अधिकतम खोलिने पृष्ठ",
+       "protect-edit-reasonlist": "सà¥\81रà¤\95à¥\8dषाà¤\95à¥\8b à¤\95ारणहरà¥\82 सम्पादन गर्नुहोस्",
        "protect-expiry-options": " १ घण्टा:1 hour, १ दिन :1 day, १ हप्ता:1 week, २ हप्ता:2 weeks, १ महिना:1 month, ३ महिना:3 months,६ महिना:6 months, १ वर्ष:1 year, अनिश्चितकाल:infinite",
        "restriction-type": "अनुमति:",
        "restriction-level": "प्रतिबन्ध स्तरः",
        "sp-contributions-blocklog": "रोकावट लग",
        "sp-contributions-suppresslog": "प्रयोगकर्ताको योगदानहरू दबाइएको छ ।",
        "sp-contributions-deleted": "प्रयोगकर्ताका योगदानहरू मेटाइयो",
-       "sp-contributions-uploads": "à¤\89रà¥\8dधà¥\8dवभरणहरà¥\81",
+       "sp-contributions-uploads": "à¤\89रà¥\8dधà¥\8dवभरणहरà¥\82",
        "sp-contributions-logs": "लगहरू",
        "sp-contributions-talk": "वार्ता",
        "sp-contributions-userrights": "प्रयोगकर्ता अधिकार व्यवस्थापन",
        "moveuserpage-warning": "'''चेतावनी:''' तपाईंले प्रयोगकर्ता पृष्ठ सार्न आँट्नु भएकोछ। कृपया याद राख्नुहोस् पृष्ठ मात्र सारिने छ र प्रयोगकर्ताको अर्को नाम राख्न '''सकिंदैन'''।",
        "movecategorypage-warning": "<strong>चेतावनी:</strong> तपाईं एउटा श्रेणी पृष्ठलाई स्थानान्तरित गर्न जादै हुनुहुन्छ। याद राख्नुहोस् कि मात्रै यो पृष्ठ स्थानान्तरित हुनेछ र पुरानो श्रेणीमा सामेल पृष्ठ नयाँ श्रेणी अन्तर्गत <em>जाने</em> छैन।",
        "movenologintext": "पृष्ठ सार्नको लागि तपाईं दर्ता गरिएको र [[Special:UserLogin|प्रवेश गरेको]] प्रयोगकर्ता हुनुपर्छ ।",
-       "movenotallowed": "तपाà¤\88à¤\81लाई पृष्ठ सार्ने अनुमति छैन",
-       "movenotallowedfile": "फाà¤\87ल à¤¹à¤\9fाà¤\89नà¥\87 à¤\85नà¥\81मति à¤¤à¤ªà¤¾à¤\88à¤\81लाई  छैन।",
+       "movenotallowed": "तपाà¤\88à¤\82लाई पृष्ठ सार्ने अनुमति छैन",
+       "movenotallowedfile": "फाà¤\87ल à¤¹à¤\9fाà¤\89नà¥\87 à¤\85नà¥\81मति à¤¤à¤ªà¤¾à¤\88à¤\82लाई  छैन।",
        "cant-move-user-page": "तपाईसँग प्रयोगकर्ता पृष्ठहरू सार्न अनुमती छैन (सहपृष्ठहरू बाहेक)",
        "cant-move-to-user-page": "तपाईंलाई पृष्ठहरू प्रयोगकर्ता पृष्ठमा सार्न अनुमती छैन (प्रयोगकर्ता सहपृष्ठहरूमा बाहेक)",
        "cant-move-category-page": "तपाईंलाई श्रेणीको पृष्ठहरू सार्ने अनुमति छैन ।",
        "import-interwiki-sourcewiki": "श्रोत विकिः",
        "import-interwiki-sourcepage": "श्रोत पृष्ठः",
        "import-interwiki-history": "यो पृष्ठकोलागि सबै इतिहास संशोधनहरू प्रतिलिपि गर्ने",
-       "import-interwiki-templates": "सबà¥\88 à¤\9fà¥\87मà¥\8dपà¥\8dलà¥\87à¤\9fहरà¥\81(नमà¥\81ना) समेट्ने",
+       "import-interwiki-templates": "सबà¥\88 à¤¢à¤¾à¤\81à¤\9aा समेट्ने",
        "import-interwiki-submit": "आयात",
        "import-mapping-default": "पूर्वनिर्धारित स्थानहरूमा आयात",
        "import-mapping-namespace": "नेमस्पेसमा आयातः",
        "javascripttest-pagetext-unknownaction": "अज्ञात कारवाही \"$1\" ।",
        "javascripttest-qunit-intro": "mediawiki.org मा [$1 जाँचको कागजात] हेर्नुहोस् ।",
        "tooltip-pt-userpage": "{{GENDER:| तपाईंको प्रयोगकर्ता}} पृष्ठ",
-       "tooltip-pt-anonuserpage": "तपाà¤\88à¤\81 जुन IP ठेगानाको रुपमा सम्पादन गर्दै हुनुहुन्छ , त्यसको प्रयोगकर्ता पृष्ठ निम्न छ :",
+       "tooltip-pt-anonuserpage": "तपाà¤\88à¤\82 जुन IP ठेगानाको रुपमा सम्पादन गर्दै हुनुहुन्छ , त्यसको प्रयोगकर्ता पृष्ठ निम्न छ :",
        "tooltip-pt-mytalk": "{{GENDER:|तपाईंको}} वार्ता पृष्ठ",
        "tooltip-pt-anontalk": "यो IP ठेगानाबाट गरिएका सम्पादनका बारेमा बार्तालाप",
        "tooltip-pt-preferences": "{{GENDER:|तपाईंका}} अभिरुचिहरू",
        "tooltip-ca-undelete": "मेटिएको भए पनि यो पृष्ठको सम्पादनहरू पुन:प्राप्त गर्नुहोस्",
        "tooltip-ca-move": "यो पृष्ठलाई सार्नुहोस्",
        "tooltip-ca-watch": "यो पृष्ठलाई तपाईंको अवलोकनसूचीमा थप्नुहोस्",
-       "tooltip-ca-unwatch": "यà¥\8b à¤ªà¥\83षà¥\8dठलाà¤\88 à¤¤à¤ªà¤¾à¤\88à¤\81को अवलोकनसूचीबाट हटाउनुहोस्",
+       "tooltip-ca-unwatch": "यà¥\8b à¤ªà¥\83षà¥\8dठलाà¤\88 à¤¤à¤ªà¤¾à¤\88à¤\82को अवलोकनसूचीबाट हटाउनुहोस्",
        "tooltip-search": "{{SITENAME}} मा खोज्नुहोस्",
        "tooltip-search-go": "यदि यो नामको पृष्ठ रहेको छ भने त्यसमा जाने",
        "tooltip-search-fulltext": "यो पाठको लागि पृष्ठहरू खोज्नुहोस्",
        "tooltip-preview": "तपाईंको परिवर्तनको पूर्वरूप , कृपया सङ्ग्रह गर्नु अघि यो प्रयोग गर्नुहोला !",
        "tooltip-diff": "तपाईंले पाठमा के के परिवर्तन गर्नुभयो भनेर देखाउने",
        "tooltip-compareselectedversions": "यस पृष्ठको छानिएका दुई पुनरावलोकन बीच फरक हेर्नुहोस्",
-       "tooltip-watch": "यà¥\8b à¤ªà¥\83षà¥\8dठलाà¤\88 à¤¤à¤ªà¤¾à¤\88à¤\81को अवलोकनसूचीमा थप्नुहोस्",
+       "tooltip-watch": "यà¥\8b à¤ªà¥\83षà¥\8dठलाà¤\88 à¤¤à¤ªà¤¾à¤\88à¤\82को अवलोकनसूचीमा थप्नुहोस्",
        "tooltip-watchlistedit-normal-submit": "शीर्षकहरू हटाउने",
        "tooltip-watchlistedit-raw-submit": "निगरानी सूची अध्यावधि गर्ने",
        "tooltip-recreate": "मेटिएको भए ता पनि यो पृष्ट पुन:निर्माण गर्नुहोस् ।",
        "yesterday-at": "हिजो $1मा",
        "bad_image_list": "(* बाट शुरु हुने पंक्ति)को  विषय सूची मात्र मान्य छ।  पंक्तिको पहिलो लिङ्क नराम्रो फाइलसित लिङ्क हुनैपर्छ । एउटै पंक्तिमा कुनै पछिबाट हुने लिंकलाई अपवाद मानिनेछ अर्थात् जुन पृष्ठमा फाइल इन-लाइन हुनसक्छ।",
        "metadata": "मेटाडेटा",
-       "metadata-help": "यस à¤«à¤¾à¤\87लमा à¤\85तिरिà¤\95à¥\8dत à¤\9cानà¤\95ारà¥\80हरà¥\82 à¤\9bनà¥\8d, à¤¯à¤¸à¤²à¤¾à¤\88 à¤¬à¤¨à¤¾à¤\89न à¤¸à¤®à¥\8dभवतà¤\83 à¤¡à¤¿à¤\9cिà¤\9fल à¤\95à¥\8dयामà¥\87रा à¤\85थवा à¤¸à¥\8dà¤\95à¥\8dयानर à¤ªà¥\8dरयà¥\8bà¤\97 à¤\97रिà¤\8fà¤\95à¥\8b à¤¹à¥\81नà¥\81परà¥\8dà¤\9b à¥¤ à¤¯à¤¦à¤¿ à¤¯à¤¸ à¤«à¤¾à¤\87ललाà¤\88 à¤®à¥\82ल à¤\85वसà¥\8dथाबाà¤\9f à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\97रिà¤\8fà¤\95à¥\8b à¤¹à¥\8b à¤­à¤¨à¥\87  à¤¯à¤¸ à¤«à¤¾à¤\87ललà¥\87  à¤¸à¤®à¥\8dपà¥\82रà¥\8dण à¤µà¤¿à¤µà¤°à¤£ à¤ªà¥\8dरतिबिमà¥\8dबित à¤\97रà¥\8dन à¤¸à¤\95à¥\8dनà¥\87à¤\9bà¥\88न à¥¤",
+       "metadata-help": "यस फाइलमा अतिरिक्त जानकारीहरू छन्, यसलाई बनाउन सम्भवतः डिजिटल क्यामरा अथवा स्क्यानर प्रयोग गरिएको हुनुपर्छ । यदि यस फाइललाई मूल अवस्थाबाट परिवर्तन गरिएको हो भने  यस फाइलले  सम्पूर्ण विवरण प्रतिबिम्बित गर्न सक्नेछैन ।",
        "metadata-expand": "लामो विबरण हेर्ने",
        "metadata-collapse": "लामो विवरण लुकाउने",
        "metadata-fields": "मेटाडाटा तालिकालाई लघुरूप गरियो भने यस सन्देशमा सूचीबद्ध इएक्सआयएफ मेटाडाटा जानकारिहरू छवि प्रदर्शित हुने बेला सम्मिलित गरिने छ ।\nअन्य डिफल्ट रूपसँग लुकिरहने छ ।\n* make \n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
        "exif-dc-date": "मिति(हरू)",
        "exif-dc-publisher": "प्रकाशक",
        "exif-dc-relation": "सम्वन्धित मेडिया",
-       "exif-dc-rights": "à¤\85धिà¤\95ारहरà¥\81",
+       "exif-dc-rights": "à¤\85धिà¤\95ारहरà¥\82",
        "exif-dc-source": "स्रोत मेडिया",
        "exif-dc-type": "मेडियाको प्रकार",
        "exif-rating-rejected": "अस्विकृत",
        "confirmemail_invalidated": "ई मेल ठेगाना रद्द भएको पुष्टिकरण",
        "invalidateemail": "इमेल यकिन कार्य रद्द गर्नुहोस्",
        "scarytranscludedisabled": "[अन्तरविकि दस्तावेज अन्तरकरण निस्क्रिय]",
-       "scarytranscludefailed": "[ $1à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤\9fà¥\87मà¥\8dपà¥\8dलà¥\87à¤\9f ल्याउन असफल]",
+       "scarytranscludefailed": "[ $1à¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¢à¤¾à¤\81à¤\9aा ल्याउन असफल]",
        "scarytranscludefailed-httpstatus": "[$1 को लागि ढाँचा पाउन सकिएन, त्रुटि: HTTP $2]",
        "scarytranscludetoolong": "[URL अति लामो छ ]",
        "deletedwhileediting": "'''चेतावनी''': तपाईंले सम्पादन सुरु गरेपछि यो पृष्ठ मेटिएकोछ!",
        "table_pager_limit": "प्रतिपृष्ठ $1 वस्तुहरु देखाउने",
        "table_pager_limit_label": "प्रति पृष्ठ सामग्री:",
        "table_pager_limit_submit": "जाउ",
-       "table_pager_empty": "नतिà¤\9cाहरà¥\81 छैन ।",
+       "table_pager_empty": "नतिà¤\9cाहरà¥\82 छैन ।",
        "autosumm-blank": "पृष्ठ खाली गरीयो",
        "autosumm-replace": "पृष्ठलाई '$1' संग हटाइदै",
        "autoredircomment": "पृष्ठ[[$1]]मा पठाइएको",
        "specialpages": "विशेष पृष्ठ",
        "specialpages-note-top": "आदर्श वाक्य",
        "specialpages-note": "* साधारण विशेष पृष्ठहरू।\n* <span class=\"mw-specialpagerestricted\">निषेधित विशेष पृष्ठहरू।</span>",
-       "specialpages-group-maintenance": "मरà¥\8dमत à¤ªà¥\8dरतिवà¥\87दनहरà¥\81",
+       "specialpages-group-maintenance": "मरà¥\8dमत à¤ªà¥\8dरतिवà¥\87दनहरà¥\82",
        "specialpages-group-other": "अरू विशेष पृष्ठहरू",
        "specialpages-group-login": "प्रवेश गर्ने / नयाँ खाता बनाउने",
        "specialpages-group-changes": "भर्खरैका परिवर्तन र लगहरू",
-       "specialpages-group-media": "मà¥\87डिया à¤ªà¥\8dरतिवà¥\87दन à¤° à¤\89रà¥\8dधà¥\8dवभरणहरà¥\81",
-       "specialpages-group-users": "पà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤° à¤\85धिà¤\95ारहरà¥\81",
+       "specialpages-group-media": "मिडिया à¤ªà¥\8dरतिवà¥\87दन à¤° à¤\89रà¥\8dधà¥\8dवभरणहरà¥\82",
+       "specialpages-group-users": "पà¥\8dरयà¥\8bà¤\97à¤\95रà¥\8dता à¤° à¤\85धिà¤\95ारहरà¥\82",
        "specialpages-group-highuse": "उच्च प्रयोग भएका पृष्ठहरू",
        "specialpages-group-pages": "पृष्ठहरूको सूची:",
        "specialpages-group-pagetools": "पृष्ठ उपकरणहरू",
-       "specialpages-group-wiki": "डà¥\87à¤\9fा à¤° à¤\94à¤\9cारहरà¥\81",
+       "specialpages-group-wiki": "डà¥\87à¤\9fा à¤° à¤\94à¤\9cारहरà¥\82",
        "specialpages-group-redirects": "विशेष पृष्ठमा पठाउने",
        "specialpages-group-spam": "स्पाम उपकरणहरू",
        "specialpages-group-developer": "विकासकर्ता उपकरणहरू",
        "tags-title": "ट्यागहरु",
        "tags-intro": "यो पृष्ठले पुच्छरहरु सुचीकृत गर्छ जससँग यो सफ्टवेयरले चिनो लगाउन र सम्पादन गर्न सक्छ र तिनका अर्थहरु ।",
        "tags-tag": "आन्तरिक ट्याग नाम",
-       "tags-display-header": "परिवरà¥\8dतन à¤¸à¥\82à¤\9aà¥\80हरà¥\81माथि झलक",
+       "tags-display-header": "परिवरà¥\8dतन à¤¸à¥\82à¤\9aà¥\80हरà¥\82माथि झलक",
        "tags-description-header": "पूर्ण अर्थको वर्णन",
        "tags-source-header": "स्रोत",
        "tags-active-header": "सक्रिय?",
        "tags-activate": "सक्रिय गर्ने",
        "tags-deactivate": "निष्क्रिय गर्ने",
        "tags-hitcount": "$1 {{PLURAL:$1|परिवर्तन|परिवर्तनहरू}}",
-       "tags-manage-no-permission": "à¤\9fà¥\8dयाà¤\97 à¤®à¤¿à¤²à¤¾à¤¨ à¤\97रà¥\8dनà¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¤à¤ªà¤¾à¤\88à¤\81लाà¤\88 à¤\85नà¥\81मति à¤\9bà¥\88न।",
+       "tags-manage-no-permission": "à¤\9fà¥\8dयाà¤\97 à¤®à¤¿à¤²à¤¾à¤¨ à¤\97रà¥\8dनà¤\95à¥\8b à¤²à¤¾à¤\97ि à¤¤à¤ªà¤¾à¤\88à¤\82लाà¤\88 à¤\85नà¥\81मति à¤\9bà¥\88न ।",
        "tags-create-heading": "नयाँ ट्याग बनाउने",
        "tags-create-explanation": "पुनः निर्धारित रूपले, नवनिर्मित ट्याग प्रयोगकर्ताहरू र बोटहरूको लागी रहनेछ।",
        "tags-create-tag-name": "ट्याग नाम:",
        "tags-apply-no-permission": "परिवर्तन ट्यागहरूलाई आफ्नो ट्यागसँग जोड्न तपाईंलाई अनुमति छैन।",
        "tags-apply-not-allowed-one": "ट्याग \"$1\" मानवीय रूपले जोड्न सक्ने अनुमति छैन।",
        "tags-apply-not-allowed-multi": "निम्नलिखित {{PLURAL:$2|ट्यागलाई अनुमति छैन|ट्यागहरूलाई अनुमति छैन}} कि त्यसलाई मानवीय रूपले प्रयोगमा ल्याउन सकियोस: $1",
-       "tags-update-no-permission": "तपाà¤\88à¤\82लाà¤\88 à¤µà¥\8dयà¤\95à¥\8dतिà¤\97त à¤¸à¤\82शà¥\8bधनहरà¥\82 à¤µà¤¾ à¤²à¤\97 à¤ªà¥\8dरविषà¥\8dà¤\9fिहरà¥\82सà¤\81à¤\97 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\9cà¥\8bड़ने वा हटाउने अनुमति छैन।",
+       "tags-update-no-permission": "तपाà¤\88à¤\82लाà¤\88 à¤µà¥\8dयà¤\95à¥\8dतिà¤\97त à¤¸à¤\82शà¥\8bधनहरà¥\82 à¤µà¤¾ à¤²à¤\97 à¤ªà¥\8dरविषà¥\8dà¤\9fिहरà¥\82सà¤\81à¤\97 à¤ªà¤°à¤¿à¤µà¤°à¥\8dतन à¤\9cà¥\8bडà¥\8dने वा हटाउने अनुमति छैन।",
        "tags-update-add-not-allowed-one": "ट्याग \"\"$1\" लाई मानवीय रूपले जोड्न सकिंदैन।",
        "tags-update-add-not-allowed-multi": "निम्नलिखित {{PLURAL:$2|ट्याग|वा ट्यागहरू}} मानवीय रूपले जोड्न सकिंदैन: $1",
        "tags-update-remove-not-allowed-one": "ट्याग \"$1\" मेटाउने अनुमति छैन ।",
        "htmlform-cloner-create": "अरू जोड्ने",
        "htmlform-cloner-delete": "हटाउने",
        "htmlform-cloner-required": "कम्तिमा एउटामा आवश्यक छ ।",
-       "sqlite-has-fts": "$1 पूरा पाठ खोज समर्थन सहित",
-       "sqlite-no-fts": "$1 पूरा पाठ खोज समर्थन बिना",
        "logentry-delete-delete": "$1 द्वारा पृष्ठ $3 {{GENDER:$2|मेटाइयो}}",
        "logentry-delete-restore": "$3 पृष्ठ $1ले {{GENDER:$2|पुनर्स्थापित}} गरेको हो",
        "logentry-delete-event": "$1 ले $3 पृष्ठको लग {{PLURAL:$5|प्रविष्टि|प्रविष्टिहरू}}को दृश्यता {{GENDER:$2|परिवर्तन गर्यो}}: $4",
        "feedback-external-bug-report-button": "प्राविधिक कार्य पेश गर्नुहोस्",
        "feedback-dialog-title": "प्रतिक्रिया दिनुहोस्",
        "feedback-dialog-intro": "तपाईं तल दिइएको सरल फारमको प्रयोग गरेर आफ्नो प्रतिपुष्टि पठाउन सक्नुहुन्छ। तपाईंको टिप्पणी पृष्ठ \"$1\" स तपाईंको प्रयोगकर्तानामको अगाडी जोडिनेछ ।",
-       "feedback-error-title": "त्रुटि",
        "feedback-error1": "त्रुटीः एपिआईबाट अज्ञात परिणाम",
        "feedback-error2": "त्रुटि: सम्पादन असफल",
        "feedback-error3": "त्रुटीः एपिआईबाट कुनै प्रतिक्रिया नआएको",
        "mediastatistics-header-text": "पाठ",
        "mediastatistics-header-executable": "कार्यान्वयन गर्न मिल्नेहरू",
        "mediastatistics-header-archive": "संकुचित ढाँचाहरू",
-       "mediastatistics-header-total": "सबà¥\88 à¤«à¤¾à¤\87लहरà¥\81",
+       "mediastatistics-header-total": "सबà¥\88 à¤«à¤¾à¤\87लहरà¥\82",
        "json-warn-trailing-comma": "$1 पछाडी रहेको छ {{PLURAL:$1|कोमा को|कोमाहरूको}} जेएसओएनबाट हटाइयो",
        "json-error-unknown": "जेएसओएन मा समस्या छ । समस्याः $1",
        "json-error-depth": "स्ट्याकको अधिकतम गहिराई बढी सकेको छ",
index 442c685..8f06a69 100644 (file)
        "tog-enotifminoredits": "Mij e-mailen bij kleine bewerkingen van pagina’s en bestanden op mijn volglijst",
        "tog-enotifrevealaddr": "Mijn e-mailadres weergeven in e-mailberichten",
        "tog-shownumberswatching": "Het aantal gebruikers weergeven dat deze pagina volgt",
-       "tog-oldsig": "Bestaande ondertekening:",
+       "tog-oldsig": "Uw bestaande ondertekening:",
        "tog-fancysig": "Handtekening als wikitekst behandelen (zonder automatische koppeling)",
        "tog-uselivepreview": "Livevoorvertoning gebruiken",
        "tog-forceeditsummary": "Een melding geven bij een lege bewerkingssamenvatting",
        "newwindow": "(opent in een nieuw venster)",
        "cancel": "Annuleren",
        "moredotdotdot": "Meer…",
-       "morenotlisted": "Deze lijst is niet compleet.",
+       "morenotlisted": "Deze lijst kan onvolledig zijn.",
        "mypage": "Gebruikerspagina",
        "mytalk": "Overleg",
        "anontalk": "Overleg",
        "talk": "Overleg",
        "views": "Weergaven",
        "toolbox": "Hulpmiddelen",
+       "tool-link-userrights": "{{GENDER:$1|Gebruikersgroepen}} wijzigen",
+       "tool-link-emailuser": "Deze {{GENDER:$1|gebruiker}} e-mailen",
        "userpage": "Gebruikerspagina bekijken",
        "projectpage": "Projectpagina bekijken",
        "imagepage": "Bestandspagina bekijken",
        "createacct-yourpasswordagain-ph": "Geef het wachtwoord opnieuw in",
        "userlogin-remembermypassword": "Aangemeld blijven",
        "userlogin-signwithsecure": "Beveiligde verbinding gebruiken",
+       "cannotlogin-title": "Niet mogelijk om aan te melden",
+       "cannotlogin-text": "Aanmelden is niet mogelijk.",
        "cannotloginnow-title": "Niet mogelijk om aan te melden",
        "cannotloginnow-text": "Aanmelden is niet mogelijk bij het gebruik van $1.",
+       "cannotcreateaccount-title": "Kan geen accounts aanmaken",
        "yourdomainname": "Uw domein:",
        "password-change-forbidden": "U kunt uw wachtwoord niet wijzigen in deze wiki.",
        "externaldberror": "Er is een fout opgetreden bij het aanmelden bij de database of u hebt geen toestemming uw externe gebruiker bij te werken.",
        "botpasswords-label-resetpassword": "Het wachtwoord opnieuw instellen",
        "botpasswords-label-grants": "Van toepassing zijnde rechten:",
        "botpasswords-help-grants": "Iedere toestemming geeft toegang tot de opgegeven gebruikersrechten die de gebruiker al heeft. Zie [[Special:ListGrants|overzicht van rechten]] voor meer informatie.",
-       "botpasswords-label-restrictions": "Gebruiksbeperkingen:",
        "botpasswords-label-grants-column": "Toegewezen",
        "botpasswords-bad-appid": "De botnaam \"$1\" is niet geldig.",
        "botpasswords-insert-failed": "Toevoegen van botnaam \"$1\" mislukt. Is deze misschien al toegevoegd?",
        "passwordreset-emailelement": "Gebruikersnaam: \n$1\n\nTijdelijk wachtwoord: \n$2",
        "passwordreset-emailsentemail": "Als dit e-mailadres aan uw account gekoppeld is, dan wordt er een e-mail verzonden om uw wachtwoord opnieuw in te stellen.",
        "passwordreset-emailsentusername": "Als er een e-mailadres geregistreerd is voor die gebruikersnaam, dan wordt er een e-mail verzonden om uw wachtwoord opnieuw in te stellen.",
+       "passwordreset-emailerror-capture2": "Het e-mailen naar de {{GENDER:$2|gebruiker}} is mislukt: $1 {{PLURAL:$3|De gebruikersnaam en het wachtwoord|De lijst met gebruikersnamen en wachtwoorden}} wordt hieronder weergegeven.",
        "passwordreset-invalideamil": "Ongeldig e-mailadres",
+       "passwordreset-nodata": "Er is geen gebruikersnaam of e-mailadres opgegeven",
        "changeemail": "E-mailadres wijzigen of verwijderen",
        "changeemail-header": "Vul dit formulier in om uw e-mailadres te wijzigen. Als u het e-mailadres wilt ontkoppelen van uw account, laat het e-mailadres dan leeg als u het formulier opslaat.",
        "changeemail-no-info": "U moet aangemeld zijn om rechtstreeks toegang te hebben tot deze pagina.",
        "searchprofile-advanced-tooltip": "Zoeken in opgegeven naamruimten",
        "search-result-size": "$1 ({{PLURAL:$2|1 woord|$2 woorden}})",
        "search-result-category-size": "{{PLURAL:$1|1 categorielid|$1 categorieleden}} ({{PLURAL:$2|1 ondercategorie|$2 ondercategorieën}}, {{PLURAL:$3|1 bestand|$3 bestanden}})",
-       "search-redirect": "(doorverwijzing $1)",
+       "search-redirect": "(doorverwijzing vanaf $1)",
        "search-section": "(subkop $1)",
        "search-category": "(categorie $1)",
        "search-file-match": "(komt overeen met de inhoud van het bestand)",
        "recentchangeslinked-page": "Paginanaam:",
        "recentchangeslinked-to": "Wijzigingen aan pagina's met koppelingen naar deze pagina bekijken",
        "recentchanges-page-added-to-category": "[[:$1]] aan categorie toegevoegd",
-       "recentchanges-page-added-to-category-bundled": "[[:$1]] en [[Special:WhatLinksHere/$1|{{PLURAL:$2|één pagina|$2 pagina's}}]] zijn toegevoegd aan categorie",
+       "recentchanges-page-added-to-category-bundled": "[[:$1]] is toegevoegd aan de categorie, [[Special:WhatLinksHere/$1|deze pagina is opgenomen in andere pagina's]]",
        "recentchanges-page-removed-from-category": "[[:$1]] is verwijderd uit categorie",
-       "recentchanges-page-removed-from-category-bundled": "[[:$1]] en {{PLURAL:$2|één pagina|$2 pagina's}} zijn verwijderd uit categorie",
+       "recentchanges-page-removed-from-category-bundled": "[[:$1]] is verwijderd uit de categorie, [[Special:WhatLinksHere/$1|deze pagina is opgenomen in andere pagina's]]",
        "autochange-username": "Automatische wijziging van MediaWiki",
        "upload": "Bestand uploaden",
        "uploadbtn": "Bestand uploaden",
        "upload-foreign-cant-upload": "Deze wiki is niet geconfigureerd om bestanden te uploaden naar de bestandsrepository op een andere site.",
        "upload-dialog-title": "Bestand uploaden",
        "upload-dialog-button-cancel": "Annuleren",
+       "upload-dialog-button-back": "Terug",
        "upload-dialog-button-done": "Afgerond",
        "upload-dialog-button-save": "Opslaan",
        "upload-dialog-button-upload": "Uploaden",
        "apisandbox-results-fixtoken-fail": "Het ophalen van het token van type \"$1\" is mislukt.",
        "apisandbox-alert-page": "Velden op deze pagina zijn niet geldig.",
        "apisandbox-alert-field": "De waarde van dit veld is niet geldig.",
+       "apisandbox-continue-clear": "Wissen",
        "booksources": "Boekinformatie",
        "booksources-search-legend": "Bronnen en gegevens over een boek zoeken",
        "booksources-search": "Zoeken",
        "addedwatchtext": "\"[[:$1]]\" en de bijhorende overlegpagina zijn toegevoegd aan uw [[Special:Watchlist|volglijst]].",
        "addedwatchtext-short": "De pagina \"$1\" is aan uw volglijst toegevoegd.",
        "removewatch": "Verwijderen uit volglijst",
-       "removedwatchtext": "\"[[:$1]]\" en de overlegpagina zijn verwijderd van [[Special:Watchlist|uw volglijst]].",
+       "removedwatchtext": "\"[[:$1]]\" en de bijhorende overlegpagina zijn verwijderd van uw [[Special:Watchlist|volglijst]].",
+       "removedwatchtext-talk": "\"[[:$1]]\" en de bijhorende pagina zijn verwijderd van uw [[Special:Watchlist|volglijst]].",
        "removedwatchtext-short": "De pagina \"$1\" is van uw volglijst verwijderd.",
        "watch": "Volgen",
        "watchthispage": "Pagina volgen",
        "undeletedrevisions": "$1 {{PLURAL:$1|versie|versies}} teruggeplaatst",
        "undeletedrevisions-files": "{{PLURAL:$1|1 versie|$1 versies}} en {{PLURAL:$2|1 bestand|$2 bestanden}} teruggeplaatst",
        "undeletedfiles": "{{PLURAL:$1|1 bestand|$1 bestanden}} teruggeplaatst",
-       "cannotundelete": "Het terugplaatsen is mislukt:\n$1",
+       "cannotundelete": "Het terugplaatsen is (gedeeltelijk) mislukt:\n$1",
        "undeletedpage": "'''$1 is teruggeplaatst'''\n\nIn het [[Special:Log/delete|verwijderingslogboek]] staan recente verwijderingen en herstelhandelingen.",
        "undelete-header": "Zie het [[Special:Log/delete|verwijderingslogboek]] voor recent verwijderde pagina's.",
        "undelete-search-title": "Verwijderde pagina's zoeken",
        "sp-contributions-newbies-title": "Bijdragen van nieuwe gebruikers",
        "sp-contributions-blocklog": "blokkeerlogboek",
        "sp-contributions-suppresslog": "onderdrukte gebruikersbijdragen",
-       "sp-contributions-deleted": "verwijderde bijdragen",
+       "sp-contributions-deleted": "verwijderde {{GENDER:$1|gebruiker}}sbijdragen",
        "sp-contributions-uploads": "uploads",
        "sp-contributions-logs": "logboeken",
        "sp-contributions-talk": "overleg",
        "pageinfo-article-id": "Paginanummer",
        "pageinfo-language": "Taal voor de pagina",
        "pageinfo-content-model": "Paginainhoudmodel",
+       "pageinfo-content-model-change": "wijzigen",
        "pageinfo-robot-policy": "Indexering door robots",
        "pageinfo-robot-index": "Toegestaan",
        "pageinfo-robot-noindex": "Niet toegestaan",
        "watchlistedit-raw-done": "Uw volglijst is bijgewerkt.",
        "watchlistedit-raw-added": "Er {{PLURAL:$1|is 1 pagina|zijn $1 pagina's}} toegevoegd:",
        "watchlistedit-raw-removed": "Er {{PLURAL:$1|is 1 pagina|zijn $1 pagina's}} verwijderd:",
-       "watchlistedit-clear-title": "Volglijst gewist",
+       "watchlistedit-clear-title": "Volglijst wissen",
        "watchlistedit-clear-legend": "Volglijst wissen",
        "watchlistedit-clear-explain": "Alle pagina's worden van uw volglijst verwijderd",
        "watchlistedit-clear-titles": "Pagina's:",
        "htmlform-cloner-create": "Meer toevoegen",
        "htmlform-cloner-delete": "Verwijderen",
        "htmlform-cloner-required": "Ten minste één waarde is vereist.",
+       "htmlform-date-placeholder": "JJJJ-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "JJJJ-MM-DD HH:MM:SS",
        "htmlform-title-badnamespace": "[[:$1]] bevindt zich niet in de naamruimte \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" is geen paginanaam die aangemaakt kan worden",
        "htmlform-title-not-exists": "$1 bestaat niet.",
        "htmlform-user-not-exists": "<strong>$1</strong> bestaat niet.",
        "htmlform-user-not-valid": "<strong>$1</strong> is geen geldige gebruikersnaam.",
-       "sqlite-has-fts": "Versie $1 met ondersteuning voor \"full-text\" zoeken",
-       "sqlite-no-fts": "Versie $1 zonder ondersteuning voor \"full-text\" zoeken",
        "logentry-delete-delete": "$1 {{GENDER:$2|heeft}} de pagina $3 verwijderd",
        "logentry-delete-restore": "$1 {{GENDER:$2|heeft}} de pagina $3 teruggeplaatst",
        "logentry-delete-event": "$1 {{GENDER:$2|heeft}} de zichtbaarheid van {{PLURAL:$5|een logboekregel|$5 logboekregels}} van $3 gewijzigd: $4",
        "feedback-external-bug-report-button": "Een technische taak indienen",
        "feedback-dialog-title": "Terugkoppeling verzenden",
        "feedback-dialog-intro": "U kunt het eenvoudige formulier gebruiken om uw terugkoppeling in te sturen. Uw reactie wordt toegevoegd aan de pagina \"$1\" samen met uw gebruikersnaam.",
-       "feedback-error-title": "Fout",
        "feedback-error1": "Fout: onbekend resultaat uit de API",
        "feedback-error2": "Fout: de bewerking is mislukt",
        "feedback-error3": "Fout: geen reactie van de API",
        "searchsuggest-containing": "bevat...",
        "api-error-badaccess-groups": "U mag geen bestanden uploaden in deze wiki.",
        "api-error-badtoken": "Interne fout: het token klopt niet.",
+       "api-error-blocked": "U bent geblokkeerd en kunt niet bewerken.",
        "api-error-copyuploaddisabled": "Uploaden via URL is uitgeschakeld op deze server.",
        "api-error-duplicate": "Er {{PLURAL:$1|staat al een bestand|staan al bestanden}} met dezelfde inhoud in de wiki.",
        "api-error-duplicate-archive": "Er {{PLURAL:$1|was al een ander bestand|waren al $1 andere bestanden}}  op de site met dezelfde inhoud, maar {{PLURAL:$1|dat is|die zijn}} verwijderd.",
        "api-error-nomodule": "Interne fout: er is geen uploadmodule ingesteld.",
        "api-error-ok-but-empty": "Interne fout: de server heeft geen gegevens teruggeleverd.",
        "api-error-overwrite": "Het overschrijven van een bestand bestand is niet toegestaan.",
+       "api-error-ratelimited": "U probeert meer bestanden te uploaden in een korte periode dan deze wiki toelaat.\nProbeer het over een aantal minuten opnieuw.",
        "api-error-stashfailed": "Interne fout: de server kon het tijdelijke bestand niet opslaan.",
        "api-error-publishfailed": "Interne fout: de server kon het tijdelijke bestand niet publiceren.",
        "api-error-stasherror": "Er is een fout opgetreden tijdens het uploaden van het bestand naar de tijdelijke opslagruimte.",
        "authmanager-email-help": "E-mailadres",
        "authmanager-realname-label": "Echte naam",
        "authmanager-realname-help": "Echte naam van de gebruiker",
+       "authmanager-provider-password": "Op wachtwoord gebaseerde authenticatie",
        "authmanager-provider-temporarypassword": "Tijdelijk wachtwoord",
        "authprovider-resetpass-skip-label": "Overslaan",
-       "specialpage-securitylevel-not-allowed-title": "Niet toegestaan"
+       "specialpage-securitylevel-not-allowed-title": "Niet toegestaan",
+       "cannotauth-not-allowed-title": "Geen toegang",
+       "changecredentials": "Authenticatiegegevens wijzigen",
+       "changecredentials-submit": "Authenticatiegegevens wijzigen",
+       "changecredentials-success": "Uw authenticatiegegevens zijn gewijzigd.",
+       "removecredentials": "Authenticatiegegevens verwijderen",
+       "removecredentials-submit": "Authenticatiegegevens verwijderen",
+       "removecredentials-success": "Uw authenticatiegegevens zijn verwijderd.",
+       "credentialsform-provider": "Soort authenticatiegegevens:",
+       "credentialsform-account": "Gebruikersnaam:",
+       "cannotlink-no-provider-title": "Er zijn geen accounts om te koppelen",
+       "cannotlink-no-provider": "Er zijn geen accounts om te koppelen.",
+       "linkaccounts": "Accounts koppelen",
+       "linkaccounts-success-text": "Het account is gekoppeld.",
+       "linkaccounts-submit": "Accounts koppelen",
+       "unlinkaccounts": "Accounts ontkoppelen",
+       "unlinkaccounts-success": "Het account is ontkoppeld."
 }
index 58b6b3d..b92995c 100644 (file)
        "newarticle": "(Ny)",
        "newarticletext": "Du har følgt ei lenkje til ei side som ikkje finst enno.\nFor å opprette sida, kan du skrive i boksen under (sjå [$1 hjelpesida] for meir informasjon).\nHamna du her ved ein feil, klikk på '''attende'''-knappen i nettlesaren din.",
        "anontalkpagetext": "----''Dette er ei diskusjonsside for ein anonym brukar som ikkje har oppretta konto eller ikkje har logga inn.\nVi er difor nøydde til å bruke den numeriske IP-adressa til å identifisere brukaren. Same IP-adresse kan vere knytt til fleire brukarar. Om du er ein anonym brukar og meiner at du har fått irrelevante kommentarar på ei slik side, [[Special:CreateAccount|opprett ein brukarkonto]] eller [[Special:UserLogin|logg inn]] slik at vi unngår framtidige forvekslingar med andre anonyme brukarar.''",
-       "noarticletext": "Det er nett no ikkje noko tekst på denne sida.\nDu kan [[Special:Search/{{PAGENAME}}|søkja etter sidetittelen]] i andre sider, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} søkja i dei relaterte loggane]\neller [{{fullurl:{{FULLPAGENAME}}|action=edit}} endra denne sida]</span>.",
+       "noarticletext": "Det er nett no ikkje noko tekst på denne sida.\nDu kan [[Special:Search/{{PAGENAME}}|søkja etter sidetittelen]] i andre sider, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} søkja i dei relaterte loggane]\neller [{{fullurl:{{FULLPAGENAME}}|action=edit}} opprette denne sida]</span>.",
        "noarticletext-nopermission": "Der er nett no ikkje noko tekst på denne sida.\nDu kan [[Special:Search/{{PAGENAME}}|søkja etter sidetittelen]] i andre sider\neller <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} søkja i dei relaterte loggane]</span>, men du har ikkje løyve til å oppretta denne sida.",
        "missing-revision": "Versjonen #$1 av sida med namnet «{{FULLPAGENAME}}» finst ikkje.\n\nDette skriv seg som oftast frå at ei forelda historikklenkje vart fylgd til ei side som er sletta.\nDetaljar kan ein finna i [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} sletteloggen].",
        "userpage-userdoesnotexist": "Brukarkontoen «<nowiki>$1</nowiki>» finst ikkje. Vil du verkeleg opprette/endre denne sida?",
        "searchprofile-advanced-tooltip": "Søk i visse namnerom",
        "search-result-size": "$1 ({{PLURAL:$2|eitt|$2}} ord)",
        "search-result-category-size": "{{PLURAL:$1|1 medlem|$1 medlemmer}} ({{PLURAL:$2|1 underkategori|$2 underkategoriar}}, {{PLURAL:$3|1 fil|$3 filer}})",
-       "search-redirect": "(omdirigering $1)",
+       "search-redirect": "(omdirigering frå $1)",
        "search-section": "(bolken $1)",
        "search-category": "(kategorien $1)",
        "search-suggest": "Meinte du: «$1»",
        "days": "{{PLURAL:$1|$1 dag|$1 dagar}}",
        "weeks": "{{PLURAL:$1|$1 veke|$1 veker}}",
        "months": "{{PLURAL:$1|éin månad|$1 månader}}",
-       "years": "{{PLURAL:$1|éitt år|$1 år}}",
+       "years": "{{PLURAL:$1|eitt år|$1 år}}",
        "ago": "$1 sidan",
        "just-now": "akkurat no",
        "hours-ago": "$1 {{PLURAL:$1|time|timar}} sidan",
        "htmlform-no": "Nei",
        "htmlform-yes": "Ja",
        "htmlform-chosen-placeholder": "Vel ein",
-       "sqlite-has-fts": "$1 med støtte for fulltekstsøk",
-       "sqlite-no-fts": "$1 utan støtte for fulltekstsøk",
        "logentry-delete-delete": "$1 {{GENDER:$2|sletta}} sida $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|attoppretta}} sida $3",
        "logentry-delete-event": "$1 {{GENDER:$2|endra}} synlegdomen av {{PLURAL:$5|éi loggoppføring|$5 loggoppføringar}} på $3: $4",
        "feedback-subject": "Emne:",
        "feedback-submit": "Send",
        "feedback-thanks": "Takk! Attendemeldinga di er lagd inn på sida «[$2 $1]».",
-       "searchsuggest-search": "Søk",
+       "searchsuggest-search": "Søk i {{SITENAME}}",
        "searchsuggest-containing": "som inneheld …",
        "api-error-badaccess-groups": "Du har ikkje løyve til å lasta opp filer til wikien.",
        "api-error-badtoken": "Intern feil: ugild token.",
index 79c3ea9..97dffa4 100644 (file)
        "oct": "Diphalane",
        "nov": "Dibatsela",
        "dec": "Manthole",
+       "january-date": "$1 Pherekgong",
+       "february-date": "$1 Dibokwane",
+       "march-date": "$1 Hlakola",
+       "april-date": "$1 Moranang",
+       "may-date": "$1 Mopitlo",
+       "june-date": "$1 Phupu",
+       "july-date": "$1 Mosegamanye",
+       "august-date": "$1 Phato",
+       "september-date": "$1 Lewedi",
+       "october-date": "$1 Diphalane",
+       "november-date": "$1 Dibatsela",
+       "december-date": "$1 Mathole",
        "pagecategories": "{{PLURAL:$1|Sehlopha|Dihlopha}}",
        "category_header": "Matlakala go sehlopha \"$1\"",
        "subcategories": "Dihlophana",
        "moredotdotdot": "Tše dingwe...",
        "mypage": "Letlakala",
        "mytalk": "Bolela",
-       "anontalk": "Poledišano ya IP ye",
+       "anontalk": "Poledišano",
        "navigation": "Tšwelotšo",
        "and": "&#32;le",
        "qbfind": "Humana",
+       "qbbrowse": "Leba",
        "qbedit": "Fetola",
        "qbpageoptions": "Letlakala le",
        "qbmyoptions": "Matlakala a ka",
        "updatedmarker": "fetotšwe esale ketelo yaka ya mafelelo",
        "printableversion": "''Version'' ya go gatišega",
        "permalink": "Hlomaganyo yao e tiišeditšwego",
+       "view": "Leba",
+       "view-foreign": "Leba go $1",
        "edit": "Fetola",
        "create": "Tlhoma",
        "editthispage": "Fetola letlakala  le",
        "disclaimers": "Hlapa-matsogo",
        "disclaimerpage": "Project:Hlapa-Matsogo",
        "edithelp": "Thušo ya go fetola",
+       "helppage-top-gethelp": "Thušo",
        "mainpage": "Letlakala la Pele",
        "mainpage-description": "Letlakala la Pele",
        "policy-url": "Project:Melao",
-       "portal": "''Portal'' ya badudi",
-       "portal-url": "Project:Portal ya Badudi",
+       "portal": "Sebaka sa badudi",
+       "portal-url": "Project:Sebaka sa Badudi",
        "privacy": "Melao ya praebesi",
        "privacypage": "Project:Polisi ya praefesi",
        "badaccess": "Thušo ya tumello",
        "toc": "Mateng",
        "showtoc": "bontšha",
        "hidetoc": "fihla",
+       "confirmable-yes": "Ee",
+       "confirmable-no": "Aowa",
        "thisisdeleted": "Nyakorela goba hlaphola $1?",
        "viewdeleted": "Nyakorela $1?",
        "restorelink": "{{PLURAL:$1|e tee phetogo ye phumutšwego|phetogo tše $1 tše phumutšwego}}",
        "protectedpagetext": "Letlakala le le notletšwe go thibela diphetogo.",
        "viewsourcetext": "O ka lebelela goba wa kôpiša mothapo wa letlakala le:",
        "namespaceprotected": "Ga ona tokelo ya go fetola matlakala  go  '''$1''' .",
+       "exception-nologin": "Ga wa tsena",
        "yourname": "Leina la mošomiši:",
        "yourpassword": "Ditlhaka-tša-siphiri:",
        "yourpasswordagain": "Tlanya ditlhaka-tša-siphiri gape:",
-       "remembermypassword": "Gopola sedi yaka ya go tsena khomphutha ye (bogolo bja  $1 ya {{PLURAL:$1| letšatši le|matšatši a}})",
        "login": "Tsena",
        "nav-login-createaccount": "Tsena / Tlhola tšhupaleloko (''account'')",
        "userlogin": "Tsena / tlhola tšhupaleloko (''account'')",
+       "userloginnocreate": "Tsena",
        "logout": "Etšwa/Tswalela",
        "userlogout": "Etšwa/Tswalela",
        "notloggedin": "Ga wa tsena",
        "createaccountreason": "Lebaka:",
        "badretype": "Ditlhaka-tša-siphiri tše o di šomišitšego ga di swane.",
        "noname": "Gawa fana ka leina la mošomiši la go loka.",
-       "loginsuccesstitle": "O tsene ka katlego",
+       "loginsuccesstitle": "O tsene",
        "loginsuccess": "'''Bjale o tsene go {{SITENAME}} bjalo ka \"$1\".'''",
-       "nosuchuser": "Ga gona mošomiši wa leina la \"$1\".\nMaina a huduetša ke ditlhaka.\nLebele mopeleto wa gago goba [[Special:CreateAccount|o tlhome mošomiši yo mophsa]].",
+       "nosuchuser": "Ga gona mošomiši wa leina la \"$1\".\nMaina a huduetša ke seemo sa ditlhaka (case sensitive).\nLebele mopeleto wa gago goba [[Special:CreateAccount|o tlhome mošomiši yo mophsa]].",
        "nosuchusershort": "Ga gona mošomiši wa leina la \"$1\". Hlokomela mopeleto wa gago.",
        "nouserspecified": "O swanela ke go fana ka leina la mošomiši.",
        "wrongpassword": "O loketše ditlhaka-tša-siphiri tšeo e sego tšona. Ka kgopelo, leka gape.",
        "passwordremindertext": "Motho yo mongwe (goba wena, gotšwa IP atrese $1) o\nkgopetše gore re moromele Ditlhaka-tša-siphiri tše mfsa tša {{SITENAME}} ($4).\n\nDitlhaka-tša-siphiri tša  mošomiši \"$2\" go tloga bjale ke  \"$3\".\n\nDitlhaka-tša-siphiri di tla šoma {{PLURAL:$5|letšatši|matšatši a $5}}.\n\nGa eba motho yo mongwe esego wena o dirile kgopelo ye, goba o gopola Ditlhaka-tša-siphiri gomme ga o sa\nhloka gore e fetolwe, hlokomologa molaetša wo, o tšwele pele o šumiše Ditlhaka-tša-siphiri tša kgale.",
        "noemail": "Ga gona e-mail atrese ya mošomiši \"$1\".",
        "passwordsent": "\nDihlaka tša siphiri (''password'') tše mphsa di rometšwe go e-mail atrese ya \"$1\".\nRe kgopela gore o tsene ge fetša go e hwetša.",
-       "blocked-mailpassword": "IP atrese ya gago e thibetšwe go dira diphetogo, ka fao ga wa dumellwa\ngo šomiša thulusu ya go hwetša Ditlhaka-tša-siphiri go thibela go hlapanya.",
+       "blocked-mailpassword": "IP atrese ya gago e thibetšwe go dira diphetogo.\nGo thibela go hlapanya, ga wa dumellwa\ngo šomiša thulusu ya go hwetša Ditlhaka-tša-siphiri ka aterese ye.",
        "eauthentsent": "Molaetša wa go tiišetša o  rometšwe go e-mail atrese.\n\nPele re romela melaetša ye mengwe go atrese ye, o kgopelwa go latela ditaelo tšeo dilego molaetšeng go tiišetša gore atrese ke ya gago.",
        "throttled-mailpassword": "Kgopelo ya go fetola ditlhaka-tša-siphiri e rometšwe {{PLURAL:$1|iring|diiring tše $1}} tša gofeta.\nGo thibela go hlapanya/kgobošo, kgopotšo e tee ka {{PLURAL:$1|iri|diiri tše $1}} e tla romellwa.",
        "mailerror": "Gobile le phošo go romeleng molaetša  : $1",
-       "acct_creation_throttle_hit": "Ka maswabi, IP Aterese ya gago e tlhomile {{PLURAL:$1|tšhupaleloko|$1 tša ditšhupaleloko}} e se kgale.\nGa wa dumelwa go tlhoma tše dingwe ka se sebaka.",
+       "acct_creation_throttle_hit": "Ka maswabi, IP Aterese ya gago e tlhomile {{PLURAL:$1|tšhupaleloko|$1 tša ditšhupaleloko}} sebakeng sa $2.\nGa wa dumelwa go tlhoma tše dingwe ka se sebaka.",
        "emailauthenticated": "E-mail atrese ya gago e kgonthišitšwe ka $2  $3.",
        "accountcreated": "Tšhupaleloko (Account) e tlhodilwe",
        "accountcreatedtext": "Tšhupaleloko (account) ya modiri [[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|talk]]) e tlhodilwe.",
        "loginlanguagelabel": "Polelo: $1",
+       "pt-login": "Tsena",
+       "pt-login-button": "Tsena",
+       "pt-createaccount": "Bula tšhupaleloko",
+       "pt-userlogout": "Etšwa/Tswalela",
        "changepassword": "Fetola ditlhaka-tša-siphiri",
        "resetpass_text": "<!-- Tsenya ditlhaka mo -->",
        "oldpassword": "Ditlhaka-tša-siphiri tša kgale:",
        "newpassword": "Ditlhaka-tša-siphiri tše mpsha:",
        "retypenew": "Tlanya ditlhaka tše mphsa tša siphiri gape:",
-       "changepassword-success": "Ditlhaka tša siphiri di fetotšwe ka katlego!",
+       "resetpass_submit": "Lokela ditlhaka-tša-siphiri o tsene",
+       "changepassword-success": "Ditlhaka tša siphiri di fetotšwe!",
        "bold_sample": "Mongwalo wa '''Bold'''",
        "bold_tip": "Ditlhaka tše Bold",
        "italic_sample": "Ditlhaka tše Italic",
        "accmailtext": "Ditlhaka-tša-siphiri tša  [[User talk:$1|$1]]  di rometšwe go $2. Di ka fetolwa go letlaka la <em>[[Special:ChangePassword|go fetola ditlhaka-tša-siphiri ]]</em> ge o tsena.",
        "newarticle": "(mpsha)",
        "newarticletext": "O latetše hlomaganyo go letlakala leo le sego gona ka se sebaka.\nGo tlhola letlakala, thoma go ngwalo lepokising le letelago\n(lebelela [$1 letlakala la thušo] go hwetša šedi).\nGa eba o le fa ka phošo, o ka boela morago ka go šumiša konopo ya '''back''' go ''browser'' ya gago.",
-       "noarticletext": "Ga gona ditlhaka letlakaleng le, oka [[Special:Search/{{PAGENAME}}|fetleka leina la letlakala]] matlakaleng a mangwe, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} fetleka \"logs\"], goba [{{fullurl:{{FULLPAGENAME}}|action=edit}} wa fetola letlakala le]</span>.",
-       "noarticletext-nopermission": "Ga gona ditlhaka letlakaleng le, \noka [[Special:Search/{{PAGENAME}}|fetleka leina la letlakala]] matlakaleng a mangwe,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} fetleka \"logs\"],\n goba [{{fullurl:{{FULLPAGENAME}}|action=edit}} wa fetola letlakala le]</span>.",
+       "noarticletext": "Ga gona ditlhaka letlakaleng le.\nO ka [[Special:Search/{{PAGENAME}}|fetleka leina la letlakala]] matlakaleng a mangwe, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} fetleka \"logs\"], goba [{{fullurl:{{FULLPAGENAME}}|action=edit}} wa fetola letlakala le]</span>.",
+       "noarticletext-nopermission": "Ga gona ditlhaka letlakaleng le.\nO ka [[Special:Search/{{PAGENAME}}|fetleka leina la letlakala]] matlakaleng a mangwe,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} fetleka \"logs\"],\n goba [{{fullurl:{{FULLPAGENAME}}|action=edit}} wa fetola letlakala le]</span>.",
        "note": "'''Ela hloko:'''",
        "previewnote": "'''Elelwa gore ye ke taetšo ya sebopego sa letlakala fela.'''\nDiphetogo tša gago ga šetšo di bolokwa!",
        "editing": "O fetola $1",
        "yourlanguage": "Polelo:",
        "yournick": "Tshaeno:",
        "badsiglength": "Leina la boreelo le letelele kudu.\nLe swanela goba fase ga $1 {{PLURAL:$1|ya tlhaka|tša ditlhaka}}",
-       "prefs-help-realname": "Leina la nnete gale gapeletšwe, efela ge o kgetha go fana ka lona, le tla šomišwa go bontšha diabe mešomong ya gago.",
+       "prefs-help-realname": "Leina la nnete gale gapeletšwe.\nGe o kgetha go fana ka lona, le tla šomišwa go bontšha diabe mešomong ya gago.",
        "prefs-help-email": "Aterese ya E-poso gae hlokagale, efela e ka hlokagala ge dihlaka tša sephiri di fetolwa, ge o ka lebala dihlaka tša gago tša sephiri",
        "prefs-help-email-others": "O ka kgetha gore batho ba bangwe ba bolele le wena ka  e-poso ga kgokaganyo letlakala la gago goba letlakala la dipoledišano.\nGa re fane ka e-poso ya gago go bašumiši ba bangwe ge ba polela le wena ka yona.",
        "prefs-help-email-required": "E-mail atrese eya nyakega.",
        "rightslog": "''log'' ya ditumello tša mošomiši",
        "action-edit": "Fetola letlakala  le",
        "nchanges": "$1 {{PLURAL:$1|phetogo|diphetogo}}",
+       "enhancedrc-history": "histori",
        "recentchanges": "Diphetogo tša bjale",
        "recentchanges-legend": "Dikgetho tša diphetogo tša bjale",
        "recentchanges-summary": "Lebalana diphetogo tše di mphsa-mphsa go wiki  letlakaleng le.",
        "rcnotefrom": "Tlase ke diphetogo go tloga ka <strong>$3, $4</strong> (go  fihla ka <strong>$1</strong>).",
        "rclistfrom": "Laêtša dipheto tše mfsa go thoma go $3 $2",
        "rcshowhideminor": "$1 ya diphetogo tše nnyenyane",
+       "rcshowhideminor-hide": "Fihla",
        "rcshowhidebots": "$1 bots",
+       "rcshowhidebots-show": "Bontšha",
        "rcshowhideliu": "$1 bašumiši bao batsebjawago",
+       "rcshowhideliu-hide": "Fihla",
        "rcshowhideanons": "$1 bašumiši bago se tsebege",
+       "rcshowhideanons-hide": "Fihla",
        "rcshowhidepatr": "$1 diphetogo tše ''patrolled''",
        "rcshowhidemine": "$1 diphetogo tsa ka",
+       "rcshowhidemine-hide": "Fihla",
        "rclinks": "Bontšha diphetogo tša bofelo tše $1 matšatšing a  $2  a bofelo <br />$3",
        "diff": "phapang",
        "hist": "histori",
        "blanknamespace": "(Hlogo)",
        "contributions": "Diabe tša mošomiši",
        "contributions-title": "Diabe tša mošumiši go $1",
-       "mycontris": "Diabe tša ka",
+       "mycontris": "Diabe",
        "contribsub2": "Ya $1 ($2)",
-       "uctop": "(godimo)",
+       "uctop": "(bjale)",
        "month": "Go tloga kgweding (le peleng):",
        "year": "Go tloga ngwageng (le peleng):",
        "sp-contributions-newbies": "Laetša diabe tša bašumiši ba bafsa fela",
        "tooltip-pt-login": "O a kgothatšwa gore o tsene, e efela ga se kgapeletšo.",
        "tooltip-pt-logout": "Etšwa fa/Tswalela/Log out",
        "tooltip-ca-talk": "Poledišano mabapi le letlakala le",
-       "tooltip-ca-edit": "O ka fetola letlakala le. Kgopelo ke gore o šumiše konopo ya go Laetša sebopego sa letlakala pele o le boloka.",
+       "tooltip-ca-edit": "Fetola letlakala  le",
        "tooltip-ca-addsection": "Lokela sekgao se seswa",
        "tooltip-ca-viewsource": "Letlakala le le lotilew. O ka lebelela mothopo fela.",
        "tooltip-ca-history": "Lebelela thumeletšo ya go feta ya letlakala le",
        "lastmodifiedatby": "Letlakala le  fetotšwe la mafelelo ka $2, $1 ke $3.",
        "others": "tše dingwe",
        "siteusers": "{{SITENAME}} {{PLURAL:$2|mošumiši|bašumiši}} $1",
+       "pageinfo-toolboxlink": "Tsebo ya Letlakala",
        "filedeleteerror-short": "Phošo go phumuleng faele: $1",
        "filedeleteerror-long": "Diphošo di hlagile ge go phumulwa faele:\n\n$1",
        "filedelete-missing": "Faele \"$1\" ga e phumulege ka ge e segona.",
        "specialpages": "Matlakala a kgethegilego",
        "external_image_whitelist": " #Tlogela letlakale ka mokgwa wo<pre>\n#Tsenya  \"regular expression fragments\" (parata ya magareng ga //) below\n#These will be matched with the URLs of external (hotlinked) images\n#Those that match will be displayed as images, otherwise only a link to the image will be shown\n#Lines beginning with # are treated as comments\n#This is case-insensitive\n\n#Put all regex fragments above this line. Leave this line exactly as it is</pre>",
        "tag-filter": "[[Special:Tags|Tag]] \"filter\":",
+       "searchsuggest-search": "Fetleka  {{SITENAME}}",
        "expand_templates_output": "Phetho"
 }
index 750bc46..b77db9d 100644 (file)
@@ -50,7 +50,7 @@
        "tog-showhiddencats": "Ozuta peitetyt kategouriet",
        "tog-norollbackdiff": "Älä ozuta eroloi, konzu olet ottanuh järilleh aijemban versien järilleh tuondu -toimindol",
        "tog-useeditwarning": "Ollen lähtemäs sivulpäi iäre tallendamattah muutoksii, huomaita minuu",
-       "tog-prefershttps": "Käytä ainos suojattuu yhtevytty ku olet kirjutannuhes",
+       "tog-prefershttps": "Käytä ainos suojattuu yhtevytty, ku olet kirjutannuhes",
        "underline-always": "Ainos",
        "underline-never": "Nikonzu",
        "underline-default": "Käytä livaimen piäazetuksii",
        "minoredit": "Tämä on pieni kohendus",
        "watchthis": "Tarkaile tädä sivuu",
        "savearticle": "Tallenda sivu",
+       "savechanges": "Tallenda muutokset",
        "preview": "Ezikačo",
        "showpreview": "Ezikačo",
        "showdiff": "Luajitut kohendukset",
        "content-model-text": "perustekstu",
        "content-model-javascript": "JavaScript",
        "content-json-empty-object": "Tyhjy objektu",
-       "cantcreateaccounttitle": "Ei voi luadie tunnustu",
        "cantcreateaccount-text": "Tunnuksien luadimine täs IP-adressaspäi ('''$1''') on estetty. Estäjänny on [[User:$3|$3]].\n\nKäyttäjän $3 annettu syy on ''$2''",
        "cantcreateaccount-range-text": "Tunnuksien luadimine IP-adressilois adressualovehel <strong>$1</strong>, kuduah kuuluu sinungi käytetty IP-adressu(<strong>$4</strong>), on estetty. Eston on azetannuh [[User:$3|$3]].\n\nKäyttäjän $3 annettu syy estole on \"$2\".",
        "viewpagelogs": "Ozuta tämän sivun lougat",
        "searchprofile-everything-tooltip": "Eči kaikil sivuloil (dai paginois)",
        "searchprofile-advanced-tooltip": "Eči nämmien nimitiloin keskes",
        "search-result-size": "$1 ({{PLURAL:$2|1 sana|$2 sanua}})",
-       "search-redirect": "(siirretty $1)",
+       "search-redirect": "(siirretty sivus $1)",
        "search-section": "(alalugu $1)",
        "search-category": "(kategourii $1)",
        "search-suggest": "Tarkoititgo: $1",
index ba5db3b..849c619 100644 (file)
@@ -32,6 +32,7 @@
        "tog-watchdefault": "ମୁଁ ବଦଳେଇଥିବା ପୃଷ୍ଠା ଏବଂ ଫାଇଲଗୁଡ଼ିକୁ ମୋର ଦେଖଣାତାଲିକାରେ ଯୋଡ଼ନ୍ତୁ",
        "tog-watchmoves": "ମୁଁ ଘୁଞ୍ଚାଇଥିବା ପୃଷ୍ଠା ଏବଂ ଫାଇଲଗୁଡ଼ିକୁ ମୋର ଦେଖଣାତାଲିକାରେ ଯୋଡ଼ନ୍ତୁ",
        "tog-watchdeletion": "ମୁଁ ଲିଭାଇଥିବା ପୃଷ୍ଠା ଏବଂ ଫାଇଲଗୁଡ଼ିକୁ ମୋର ଦେଖଣାତାଲିକାରେ ଯୋଡ଼ନ୍ତୁ",
+       "tog-watchuploads": "ମୋ ଦେଖଣାତାଲିକାରେ ମୁଁ ଅପଲୋଡ଼ କରୁଥିବା ନୂଆ ଫାଇଲ ଯୋଡ଼ନ୍ତୁ",
        "tog-watchrollback": "ମୁଁ ପଛକୁ ଫେରାଇଦେଇଥିବା ମୋ ଦେଖଣାତାଲିକାର ପୃଷ୍ଠାସବୁକୁ ଯୋଡ଼ନ୍ତୁ",
        "tog-minordefault": "ସବୁଯାକ ସମ୍ପାଦନାକୁ ଆପେ ଛୋଟ ବଦଳ ଭାବରେ ସୂଚିତ କରିବେ",
        "tog-previewontop": "ଏଡ଼ିଟ ବାକ୍ସ ଆଗରୁ ଦେଖଣା ଦେଖାଇବେ",
@@ -41,7 +42,7 @@
        "tog-enotifminoredits": "ପୃଷ୍ଠାରେ ଏବଂ ଫାଇଲଗୁଡିକରେ ଛୋଟ ଛୋଟ ବଦଳ ହେଲେ ବି ମୋତେ ଇ-ମେଲ କରିବେ",
        "tog-enotifrevealaddr": "ନୋଟିଫିକେସନ ଇମେଲରେ ମୋ ଇ-ମେଲ ଦେଖାଇବେ",
        "tog-shownumberswatching": "ଦେଖୁଥିବା ବ୍ୟବହାରକାରୀଙ୍କ ସଂଖ୍ୟା ଦେଖାନ୍ତୁ",
-       "tog-oldsig": "à¬\8fବà­\87à¬\95ାର ଦସ୍ତଖତ:",
+       "tog-oldsig": "à¬\86ପଣà¬\99à­\8dà¬\95ର à¬\8fବà­\87ର ଦସ୍ତଖତ:",
        "tog-fancysig": "ଦସ୍ତଖତକୁ ଉଇକିଟେକ୍ସଟ ଭାବରେ ଗଣିବେ (ଆପେଆପେ ଥିବା ଲିଙ୍କ ବିନା)",
        "tog-uselivepreview": "ସାଥେ ସାଥେ ଚାଲିଥିବା ଦେଖଣା ବ୍ୟବହାର କରିବେ",
        "tog-forceeditsummary": "ଖାଲି ସମ୍ପାଦନା ସାରକଥାକୁ ଯିବା ବେଳେ ମୋତେ ଜଣାଇବେ",
        "unprotectthispage": "ଏହି ପୃଷ୍ଠା ପାଇଁ ସୁରକ୍ଷାର ପ୍ରକାର ବଦଳାଇବେ",
        "newpage": "ନୂଆ ପୃଷ୍ଠା",
        "talkpage": "ପୃଷ୍ଠାକୁ ଆଲୋଚନା କରନ୍ତୁ",
-       "talkpagelinktext": "à¬\95ଥାଭାଷା",
+       "talkpagelinktext": "à¬\86ଲà­\8bà¬\9aନା",
        "specialpage": "ବିଶେଷ ପୃଷ୍ଠା",
        "personaltools": "ନିଜର ଟୁଲ",
        "articlepage": "ସୂଚୀ ପୃଷ୍ଠାଟି ଦେଖାଇବେ",
        "cannotdelete-title": "\"$1\" ପୃଷ୍ଠାଟି ଲିଭଯାଇପାରିବ ନାହିଁ",
        "delete-hook-aborted": "ସମ୍ପାଦନା ଏକ ହୁକ (hook) ଦେଇ ବାରଣ କରାଗଲା ।\nଏହା କିଛି ବି କାରଣ ଦେଇନାହିଁ ।",
        "no-null-revision": "\"$1\" ପୃଷ୍ଠାଟି ପାଇଁ ଫାଙ୍କା ସଂସ୍କରଣଟିଏ ତିଆରି କରିପାରିଲୁ ନାହିଁ",
-       "badtitle": "à¬\96ରାପ à¬¨à¬¾à¬\86à¬\81",
+       "badtitle": "à¬\96ରାପ à¬¨à¬¾à¬®",
        "badtitletext": "ଆପଣ ଅନୁରୋଧ କରିଥିବା ପୃଷ୍ଠାଟି ଭୁଲ, ଖାଲି ଅଛି ବା ବାକି ଭାଷା ସାଙ୍ଗରେ ଭୁଲରେ ଯୋଡ଼ା ଯାଇଛି ବା ଭୁଲ ଇଣ୍ଟର ଉଇକି ନାମ ଦିଆଯାଇଛି ।\nଏଥିରେ ଥିବା ଗୋଟିଏ ବା ଦୁଇଟି ଅକ୍ଷର ଶିରୋନାମା ଭାବରେ ବ୍ୟବହାର କରାଯାଇ ପାରିବ ନାହିଁ ।",
        "title-invalid-empty": "ଅନୁରୋଧ କରାଯାଇଥିବା ପୃଷ୍ଠାର ଶର୍ଷକଟି ଖାଲି ଅଛି କିମ୍ବା ନେମସ୍ପସର ନାମ ଅଛି ।",
        "title-invalid-utf8": "ଅନୁରୋଧ କରାଯାଇଥିବା ପୃଷ୍ଠାର ଶର୍ଷକରେ ଅବୈଧ UTF-8 ଧାରା ଅଛି ।",
        "minoredit": "ଏହା ଏକ ସାମାନ୍ୟ ସମ୍ପାଦନା",
        "watchthis": "ଏହି ପୃଷ୍ଠାଟିକୁ ଦେଖିବେ",
        "savearticle": "ସାଇତିବେ [Save]",
+       "savechanges": "ସାଇତିବେ ['''Save''']",
        "preview": "ସାଇତିବା ଆଗରୁ ଦେଖନ୍ତୁ",
        "showpreview": "ଦେଖଣା [Preview]",
        "showdiff": "ବଦଳଗୁଡ଼ିକ ଦେଖାଇବେ",
        "newarticle": "(ନୁଆ)",
        "newarticletext": "ଆପଣ ଖୋଲିଥିବା ଲିଙ୍କଟିରେ ଏଯାଏଁ କିଛିବି ପୃଷ୍ଠା ନାହିଁ ।\nଏହି ପୃଷ୍ଠାଟିକୁ ତିଆରି କରିବା ପାଇଁ ତଳ ବାକ୍ସରେ ଟାଇପ କରନ୍ତୁ (ଅଧିକ ଜାଣିବା ପାଇଁ [$1 ସାହାଯ୍ୟ ପୃଷ୍ଠା] ଦେଖନ୍ତୁ) ।\nଯଦି ଆପଣ ଏଠାକୁ ଭୁଲରେ ଆସିଯାଇଥାନ୍ତି ତେବେ ଆପଣଙ୍କ ବ୍ରାଉଜରର '''Back''' ପତିଟି ଦବାନ୍ତୁ ।",
        "anontalkpagetext": "----''ଏହା ଏକ ଖାତା ଖୋଲିନଥିବା ବା ଖାତା ବ୍ୟବହାର କରିନଥିବା ଜଣେ ବେନାମି ସଭ୍ୟଙ୍କର ଆଲୋଚନା ପୃଷ୍ଠା ।''\nତେଣୁ ଆମ୍ଭେ ସଂଖ୍ୟା ଦେଇ ସୂଚୀତ IP ଠିକଣା ଦେଇ ତାଙ୍କୁ ଜାଣିବା ।\nଏହି ପ୍ରକାରର ଗୋଟିଏ IP ଠିକଣା ବହୁ ସଭ୍ୟଙ୍କ ଦେଇ ବ୍ୟବହାର କରାଯାଇପାରେ । \nଯଦି ଆପଣ ଜଣେ ଅଜଣା ସଭ୍ୟ ଓ ଭାବୁଛନ୍ତି ଇଆଡୁ ସିଆଡୁ ମତାମତ ସବୁ ଆପଣଙ୍କ ପାଇଁ ଦିଆଯାଇଛି ତେବେ ଦୟାକରି [[Special:CreateAccount|ନୂଆ ଖାତାଟିଏ ଖୋଲନ୍ତୁ]] କିମ୍ବା [[Special:UserLogin|ଆଗରୁ ଥିବା ଖାତାରେ ଲଗ ଇନ କରନ୍ତୁ]] ଯାହା ବେନାମି ସଭ୍ୟଙ୍କୁ ନେଇ ଉପୁଜିଥିବା ଦ୍ଵନ୍ଦର ସମାଧାନ କରିବ ।",
-       "noarticletext": "à¬\8fହି à¬ªà­\83ଷà­\8dଠାà¬\9fିରà­\87 à¬\95ିà¬\9bି à¬¬à¬¿ à¬²à­\87à¬\96ା à¬¨à¬¾à¬¹à¬¿à¬\81 à¥¤\nà¬\86ପଣ [[Special:Search/{{PAGENAME}}|à¬\8fହି à¬²à­\87à¬\96ାà¬\9fିର à¬¨à¬¾à¬\86à¬\81]] à¬¬à¬¾à¬\95ି à¬ªà­\83ଷà­\8dଠାମାନà¬\99à­\8dà¬\95ରà­\87 à¬\96à­\8bà¬\9cି à¬ªà¬¾à¬°à¬¨à­\8dତି,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}}ରà­\87 à¬¯à­\8bଡ଼ାଯାà¬\87ଥିବା à¬¬à¬¾à¬\95ି à¬ªà­\83ଷà­\8dଠାସବà­\81à¬\95à­\81 à¬\96à­\8bà¬\9cି à¬ªà¬¾à¬°à¬¨à­\8dତି],\nà¬\95ିମà­\8dବା [{{fullurl:{{FULLPAGENAME}}|action=edit}} à¬\8fହି à¬ªà­\83ଷà­\8dଠାà¬\9fିà¬\95à­\81 à¬¬à¬¦à¬³à¬¾à¬\87 ପାରନ୍ତି]</span> ।",
+       "noarticletext": "à¬\8fହି à¬ªà­\83ଷà­\8dଠାà¬\9fିରà­\87 à¬\95à­\8cଣସି à¬²à­\87à¬\96ା à¬¨à¬¾à¬¹à¬¿à¬\81 à¥¤\nà¬\86ପଣ [[Special:Search/{{PAGENAME}}|à¬\8fହି à¬²à­\87à¬\96ାà¬\9fିର à¬¨à¬¾à¬®]] à¬¬à¬¾à¬\95ି à¬ªà­\83ଷà­\8dଠାମାନà¬\99à­\8dà¬\95ରà­\87 à¬\96à­\8bà¬\9cିପାରନà­\8dତି,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}}ରà­\87 à¬¯à­\8bଡ଼ାଯାà¬\87ଥିବା à¬¬à¬¾à¬\95ି à¬ªà­\83ଷà­\8dଠାସବà­\81à¬\95à­\81 à¬\96à­\8bà¬\9cି à¬ªà¬¾à¬°à¬¨à­\8dତି],\nà¬\95ିମà­\8dବା [{{fullurl:{{FULLPAGENAME}}|action=edit}} à¬\8fହି à¬ªà­\83ଷà­\8dଠାà¬\9fି à¬¤à¬¿à¬\86ରି à¬\95ରିପାରନ୍ତି]</span> ।",
        "noarticletext-nopermission": "ଏବେ ଏହି ପୃଷ୍ଠାଟିରେ କିଛି ବି ଲେଖା ନାହିଁ ।\nଆପଣ [[Special:Search/{{PAGENAME}}|ଏହି ଲେଖାଟିର ନାଆଁ]] ବାକି ପୃଷ୍ଠାମାନଙ୍କରେ ଖୋଜି ପାରନ୍ତି, କିମ୍ବା\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}}ରେ ଯୋଡ଼ାଯାଇଥିବା ବାକି ପୃଷ୍ଠାସବୁକୁ ଖୋଜି ପାରନ୍ତି]\n</span>, କିନ୍ତୁ ଏହି ପୃଷ୍ଠାଟିକୁ ଆପଣ ତିଆରି କରିପାରିବେ ନାହିଁ ।",
        "missing-revision": "\"{{FULLPAGENAME}}\" ନାମରେ ଥିବା ପୃଷ୍ଠାଟିର #$1 ପୁନରାବୃତ୍ତି ନାହିଁ ।\n\nପୁରୁଣା ହୋଇଯାଇଥିବା ଇତିହାସ ଲିଙ୍କ ଯାହା ଏକ ଲିଭାଯାଇଥିବା ପୃଷ୍ଠାକୁ ଦିଆଯାଇଥିବାରୁ ଏହା ସାଧାରଣତଃ ହୋଇଥାଏ ।\nଅଧିକ ବିବରଣୀ [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log]ରେ ମିଳିପାରିବ ।",
        "userpage-userdoesnotexist": "ଇଉଜର ଖାତା \"$1\" ଟି ତିଆରି କରାଯାଇନାହିଁ ।\nଆପଣ ଏହି ପୃଷ୍ଠାଟିକୁ ତିଆରି କରିବାକୁ ଚାହାନ୍ତି କି ନାହିଁ ଦୟାକରି ପରଖି ନିଅନ୍ତୁ ।",
        "sectioneditnotsupported-text": "ଏହି ପୃଷ୍ଠାରେ ବିଭାଗ ସମ୍ପାଦନା କାମ କରିବ ନାହିଁ ।",
        "permissionserrors": "ଅନୁମତି ମିଳିବାରେ ଅସୁବିଧା",
        "permissionserrorstext": "ତଳଲିଖିତ {{PLURAL:$1|କାରଣ|କାରଣସବୁ}} ପାଇଁ ଆପଣଙ୍କୁ ଏହା କରିବା ନିମନ୍ତେ ଅନୁମତି ନାହିଁ:",
-       "permissionserrorstext-withaction": "ତଳଲିଖିତ {{PLURAL:$1|କାରଣ|କାରଣସବୁ}} ପାଇଁ ଆପଣଙ୍କୁ $2 ଭିତରକୁ ଅନୁମତି ନାହିଁ:",
+       "permissionserrorstext-withaction": "ତଳଲିଖିତ {{PLURAL:$1|କାରଣ|କାରଣସବୁ}} ପାଇଁ ଆପଣଙ୍କୁ $2ରେ ଅନୁମତି ନାହିଁ:",
        "recreate-moveddeleted-warn": "'''ସୂଚନା: ଆଗରୁ ଲିଭାଯାଇଥିବା ପୃଷ୍ଠାଟିଏକୁ ଆପଣ ଆଉଥରେ ତିଆରୁଛନ୍ତି ।'''\n\nଆପଣ ଏହି ପୃଷ୍ଠାଟିକୁ ସମ୍ପାଦନା କରିବା ଉଚିତ କି ନୁହେଁ ବିଚାର କରିବା ଦରକାର ।\nଏହି ପୃଷ୍ଠାର ଲିଭାଇବା ଓ ଘୁଞ୍ଚାଇବା ଇତିହାସ ଏଠାରେ ସୁବିଧା ନିମନ୍ତେ ଦିଆଗଲା ।:",
-       "moveddeleted-notice": "à¬\8fହି à¬ªà­\83ଷà­\8dଠାà¬\9fିà¬\95à­\81 à¬²à¬¿à¬­à¬¾à¬\87 à¬¦à¬¿à¬\86ଯାà¬\87à¬\85à¬\9bି à¥¤\nà¬\8fହାର à¬²à¬¿à¬­à¬¾à¬\87ବା à¬\93 à¬\98à­\81à¬\9eà­\8dà¬\9aାà¬\87ବା à¬\87ତିହାସ à¬\86ଧାର à¬¨à¬¿à¬®à¬¨à­\8dତà­\87 à¬¤à¬³à­\87 à¬¦à¬¿à¬\86à¬\97ଲା à¥¤",
+       "moveddeleted-notice": "ଏହି ପୃଷ୍ଠାଟିକୁ ଲିଭାଇ ଦିଆଯାଇଛି ।\nଏହାର ଲିଭାଇବା ଓ ଘୁଞ୍ଚାଇବା ଇତିହାସ ଆଧାର ନିମନ୍ତେ ତଳେ ଦିଆଗଲା ।",
        "log-fulllog": "ପୁରା ଲଗ ଇତିହାସ ଦେଖନ୍ତୁ",
        "edit-hook-aborted": "ସମ୍ପାଦନା ଏକ ହୁକ (hook) ଦେଇ ବାରଣ କରାଗଲା ।\nଏହା କିଛି ବି କାରଣ ଦେଇନାହିଁ ।",
        "edit-gone-missing": "ଏହି ପୃଷ୍ଠାଟିକୁ ସତେଜ କରାଯାଇପାରିବ ନାହିଁ ।\nଏହାକୁ ଲିଭାଇ ଦିଆଗଲା ପରି ମନେ ହେଉଛି ।",
        "mergelog": "ମିଶ୍ରଣ ଲଗ୍",
        "revertmerge": "ମିଶାଇବା ନାହିଁ",
        "mergelogpagetext": "ତଳେ ସବୁଠାରୁ ନଗଦ ଯୋଡ଼ାଯାଇଥିବା ପୃଷ୍ଠାର ଇତିହାସ ଆଉ ଗୋଟିଏ ସହ ଦିଆଯାଇଅଛି ।",
-       "history-title": "\"$1\" à¬° à¬ªà­\81ନରାବà­\83ତି ଇତିହାସ",
+       "history-title": "\"$1\" à¬° à¬ªà­\81ନରà­\8dସà¬\82ସà­\8dà¬\95ରଣ ଇତିହାସ",
        "difference-title": "\"$1\" ପୃଷ୍ଠାର ସଂସ୍କରଣ‌ଗୁଡ଼ିକ ମଧ୍ୟରେ ତଫାତ",
        "difference-title-multipage": "ପୃଷ୍ଠା \"$1\" ଏବଂ \"$2\" ମଧ୍ୟରେ ଥିବା ପାର୍ଥକ୍ୟ",
        "difference-multipage": "(ପୃଷ୍ଠା ଭିତରେ ଥିବା ତଫାତ)‌",
        "searchprofile-advanced-tooltip": "ନିଜେ ତିଆରିକରିହେବା ଭଳି ନେମସ୍ପେସରେ ଖୋଜିବେ",
        "search-result-size": "$1 ({{PLURAL:$2|ଗୋଟେ ଶବ୍ଦ|$2 ଟି ଶବ୍ଦ}})",
        "search-result-category-size": "{{PLURAL:$1|ଜଣେ ସଭ୍ୟ|$1 ଜଣ ସଭ୍ୟ}} ({{PLURAL:$2|ଗୋଟିଏ ଶ୍ରେଣୀy|$2ଟି ଶ୍ରେଣୀ ସମୂହ}}, {{PLURAL:$3|ଗୋଟିଏ ଫାଇଲ|$3ଟି ଫାଇଲ}})",
-       "search-redirect": "($1 à¬\95à­\81 à¬\86à¬\97à¬\95à­\81 à¬¬à¬¢à­\87à¬\87ନିà¬\85 )",
+       "search-redirect": "($1 à¬°à­\81 à¬²à­\87à¬\89à¬\9fାଣି)",
        "search-section": "(ଭାଗ $1)",
        "search-category": "(ଶ୍ରେଣୀ $1)",
        "search-file-match": "(ଫାଇଲରେ ଥିବା ବିଷୟବସ୍ତୁ ସାଙ୍ଗେ ମେଳ)",
        "rcshowhidemine": "ମୋର ସମ୍ପାଦନା $1",
        "rcshowhidemine-show": "ଦେଖାଇବେ",
        "rcshowhidemine-hide": "ଲୁଚାଇବେ",
+       "rcshowhidecategorization": "$1 ପୃଷ୍ଠା ଶ୍ରେଣୀବିଭାଗ",
        "rclinks": "ଗଲା $2 ଦିନର $1 ବଦଳଗୁଡ଼ିକୁ ଦେଖାଇବେ<br />$3",
        "diff": "ଅଦଳ ବଦଳ",
        "hist": "ଇତିହାସ",
        "number_of_watching_users_pageview": "[$1 {{PLURAL:$1|ସଭ୍ୟ|ସଭ୍ୟଗଣା}}ଙ୍କୁ ଦେଖୁଅଛି]",
        "rc_categories": "ଶ୍ରେଣୀସମୂହ ପାଇଁ ସୀମା ( \"|\" ଦେଇ ଅଲଗା କରିବେ)",
        "rc_categories_any": "ଯେ କୌଣସି",
-       "rc-change-size-new": "ବଦଳ ପରେ $1 {{PLURAL:$1|ବାଇଟ|ବାଇଟ}}",
+       "rc-change-size-new": "ବଦଳ ପରେ $1 {{PLURAL:$1|ବାଇଟ|ବାଇଟସବୁ}}",
        "newsectionsummary": "/* $1 */ ନୂଆ ଭାଗ",
        "rc-enhanced-expand": "ସବିଶେଷ ଦେଖାନ୍ତୁ",
        "rc-enhanced-hide": "ବେଶି କଥାସବୁ ଲୁଚାଇଦିଅ",
        "wlheader-showupdated": "ଆପଣ ଶେଷଥର ଦେଖିଥିବା ପୃଷ୍ଠାଗୁଡ଼ିକ '''ମୋଟା ଅକ୍ଷର'''ରେ ଦେଖାଯାଉଅଛି ।",
        "wlnote": "$3, $4 ଅନୁସାରେ ବିଗତ {{PLURAL:$2|ଘଣ୍ଟାକରେ|<strong>$2</strong> ଘଣ୍ଟାରେ}}{{PLURAL:$1|ଶେଷ ବଦଳ|ଶେଷ <strong>$1</strong> ବଦଳ ତଳେ ଦିଆଗଲା}} ।",
        "wlshowlast": "ଗତ $1 ଘଣ୍ଟା $2 ଦିନ ଦେଖାନ୍ତୁ",
+       "wlshowhidecategorization": "ପୃଷ୍ଠା ଶ୍ରେଣୀବିଭାଗ",
        "watchlist-options": "ଦେଖଣା ବିକଳ୍ପସବୁ",
        "watching": "ଦେଖୁଛି...",
        "unwatching": "ଦେଖୁନାହିଁ...",
        "deleting-backlinks-warning": "''' ଚେତାବନୀ:''' [[Special:WhatLinksHere/{{FULLPAGENAME}}|ବାକି ପୃଷ୍ଠା]] ଆପଣ ଲିଭାଇବାକୁ ଯାଉଥିବା ପୃଷ୍ଠାଟି ସହିତ ଲିଙ୍କ କରନ୍ତୁ କିମ୍ବା ତାହାକୁ କାଢ଼ନ୍ତୁ ।",
        "rollback": "ପୁରାପୁରି ପଛକୁ ଫେରିବା ବଦଳ",
        "rollbacklink": "ପୂରାପୂରି ପଛକୁ ଫେରିଯିବେ",
-       "rollbacklinkcount": "{{PLURAL:$1|edit|edits}} $1 ପଛକୁ ଫେରାଇବେ",
+       "rollbacklinkcount": "$1ଟି {{PLURAL:$1|ସମ୍ପାଦନା|ସମ୍ପାଦନା ସବୁ}} ପଛକୁ ଫେରାଇବେ",
        "rollbacklinkcount-morethan": "{{PLURAL:$1|edit|edits}} $1ରୁ ଅଧିକ ପଛକୁ ଫେରାଇବେ",
        "rollbackfailed": "ପୁରାପୁରି ପଛକୁ ଫେରିବା ବିଫଳ ହେଲା",
        "cantrollback": "ବଦଳକୁ ପଛକୁ ଫେରାଇ ପାରିବେ ନାହିଁ;\nଶେଷ ଦାତାଜଣଙ୍କ ଏହି ପୃଷ୍ଠାର ଜଣେମାତ୍ର ଦାତା ।",
        "whatlinkshere-prev": "{{PLURAL:$1|ଆଗ|ଆଗ $1}}",
        "whatlinkshere-next": "{{PLURAL:$1|ପର|ପର $1}}",
        "whatlinkshere-links": "← ଲିଙ୍କ",
-       "whatlinkshere-hideredirs": "$1 କୁ ଲେଉଟାଣି",
-       "whatlinkshere-hidetrans": "$1 ଆଧାର ସହ ଭିତରେ ରଖିବା",
-       "whatlinkshere-hidelinks": "$1 ଟି ଲିଙ୍କ",
+       "whatlinkshere-hideredirs": "$1ଟି ଲେଉଟାଣି",
+       "whatlinkshere-hidetrans": "$1ଟି ବାଦ ଦିଆଯାଇଛି",
+       "whatlinkshere-hidelinks": "$1ଟି ଲିଙ୍କ",
        "whatlinkshere-hideimages": "$1 ଫାଇଲର ଲିଙ୍କସବୁ",
        "whatlinkshere-filters": "ଛଣା",
        "autoblockid": "#$1ଙ୍କୁ ଆପେଆପେ ଅଟକାଇଦେବେ",
        "tooltip-watchlistedit-raw-submit": "ଦେଖଣା ତାଲିକାକୁ ଅପଡ଼େଟ କରିବେ",
        "tooltip-recreate": "ଏହି ପୃଷ୍ଠାଟି ଲିଭାଇଦିଆଯାଇଥିଲେ ବି ଆଉଥରେ ତିଆରି କରନ୍ତୁ",
        "tooltip-upload": "ଅପଲୋଡ଼ କରନ୍ତୁ",
-       "tooltip-rollback": "\"ଫà­\87ରିବା\" à¬\8fହି à¬«à¬°à¬¦à¬°à­\87 à¬¶à­\87ଷ à¬¦à¬¾à¬¤à¬¾à¬\99à­\8dà¬\95 à¬¦à­\87à¬\87 à¬\95ରାଯାà¬\87ଥିବା à¬¸à¬¬à­\81ଯାà¬\95 à¬¬à¬¦à¬³à¬\95à­\81  à¬\8fà¬\95ାଥରà¬\95ରà­\87 à¬ªà¬\9bà¬\95à­\81 à¬«à­\87ରାà¬\87ଦà­\87ବ",
+       "tooltip-rollback": "\"ଫà­\87ରିବା\" à¬\8fହି à¬ªà­\83ଷà­\8dଠାରà­\87 à¬¶à­\87ଷ à¬\85ବଦାନà¬\95ାରà­\80à¬\99à­\8dà¬\95 à¬¦à­\87à¬\87 à¬\95ରାଯାà¬\87ଥିବା à¬¸à¬¬à­\81ଯାà¬\95 à¬¬à¬¦à¬³à¬\95à­\81  à¬\8fà¬\95ାଥରà¬\95ରà­\87 à¬ªà¬\9bà¬\95à­\81 à¬«à­\87ରାà¬\87ଦିà¬\8f",
        "tooltip-undo": "\"କରନାହିଁ\" ଦବାଇଲେ ଆଗରୁ ହୋଇଥିବା ସମ୍ପାଦନାଟିଏ ପଛକୁ ଲେଉଟିଯାଏ ଓ ତାହା ସମ୍ପାଦନା ପୃଷ୍ଠାଟିକୁ '''ଦେଖଣା''' ଭାବେ ଖୋଲେ । ଆପଣଙ୍କୁ ଏହା ସାରକଥାରେ କାରଣଟିଏ ଲେଖିବାର ସୁଯୋଗ ଦିଏ ।",
        "tooltip-preferences-save": "ଆପଣା ପସନ୍ଦ ସାଇତିବେ",
        "tooltip-summary": "ଛୋଟ ସାରକଥାଟିଏ ଦିଅନ୍ତୁ",
        "pageinfo-magic-words": "ଚମତ୍କାର {{PLURAL:$1|word|words}} ($1)",
        "pageinfo-hidden-categories": "{{PLURAL:$1|category|categories}} ($1) ଲୁଚାଗଲା",
        "pageinfo-templates": "{{PLURAL:$1|template|templates}} ($1) ଯୋଡିହେଇଥିବା",
-       "pageinfo-transclusions": "{{PLURAL:$1|Page|Pages}} ($1)ରେ ଯୋଡାଗଲା",
+       "pageinfo-transclusions": "{{PLURAL:$1|ପୃଷ୍ଠା|ପୃଷ୍ଠାସବୁ}} ($1)ରେ ଯୋଡାଗଲା",
        "pageinfo-toolboxlink": "ପୃଷ୍ଠା ସୂଚନା",
        "pageinfo-redirectsto": "କୁ ଲେଉଟାଣି",
        "pageinfo-redirectsto-info": "ସୂଚନା",
        "exif-xresolution": "ଭୂସମାନ୍ତର ରେଜଲୁସନ",
        "exif-yresolution": "ଭୁଲମ୍ବ ରେଜଲୁସନ",
        "exif-stripoffsets": "ଛବି ଡାଟା ଅବସ୍ଥାନ",
-       "exif-rowsperstrip": "ପà¬\9fି à¬ªà¬¿à¬\9bା à¬¸à­\8dତମà­\8dଭ à¬¸à¬\99à­\8dଖ୍ୟା",
+       "exif-rowsperstrip": "ପà¬\9fି à¬ªà¬¿à¬\9bା à¬¸à­\8dତମà­\8dଭ à¬¸à¬\82ଖ୍ୟା",
        "exif-stripbytecounts": "ସଙ୍କୁଚିତ ପଟି ପିଛା ବାଇଟ",
        "exif-jpeginterchangeformat": "Offset ରୁ JPEG SOI",
        "exif-jpeginterchangeformatlength": "JPEG ଡାଟାର ବାଇଟ",
        "exif-subsectimedigitized": "DateTimeDigitized ସାନ ସେକେଣ୍ଡ",
        "exif-exposuretime": "ଏକ୍ସପୋଜର କାଳ",
        "exif-exposuretime-format": "$1 ସେକେଣ୍ଡ ($2)",
-       "exif-fnumber": "F à¬¸à¬\99à­\8dà¬\96à­\8dà­\9fା",
+       "exif-fnumber": "F à¬¨à¬®à­\8dବର",
        "exif-exposureprogram": "ଏକ୍ସପୋଜର ପ୍ରୋଗ୍ରାମ",
        "exif-spectralsensitivity": "ବର୍ଣ୍ଣାଳି ସମ୍ବେଦନଶୀଳତା",
        "exif-isospeedratings": "ISO ବେଗ ସୂଚାଙ୍କ",
        "tags": "ବୈଧ ସମ୍ପାଦନା ଚିହ୍ନ",
        "tag-filter": "[[Special:Tags|ଟାଗ]] ଛଣା:",
        "tag-filter-submit": "ଛାଣିବା",
-       "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|ଟ୍ୟାଗ|ଟ୍ୟାଗ}}]]: $2)",
+       "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|ଟ୍ୟାଗ|ଟ୍ୟାଗସବୁ}}]]: $2)",
        "tags-title": "ସୂଚକ",
        "tags-intro": "ଏହି ପୃଷ୍ଠା ସଫ୍ଟୱାର ଏକ ବଦଳ ଭାବେ ଚିହ୍ନିତ କରୁଥିବା ଚିହ୍ନସବୁର ମାନେ ସହ ତାଲିକା ତିଆରି କରିଥାଏ ।",
        "tags-tag": "ଚିହ୍ନ ନାମ",
        "htmlform-cloner-create": "ଅଧିକ ଯୋଡ଼ନ୍ତୁ",
        "htmlform-cloner-delete": "ବାହାର କରନ୍ତୁ",
        "htmlform-cloner-required": "ଅତି କମରେ ଗୋଟିଏ ମୂଲ୍ୟ ଲୋଡ଼ା",
-       "sqlite-has-fts": "ପୁରା ଟେକ୍ସ୍ଟ ଖୋଜା ସହଯୋଗ ସହିତ $1",
-       "sqlite-no-fts": "ପୂରା ଟେକ୍ସଟ ଖୋଜା ସହଯୋଗ ବିନା $1",
        "logentry-delete-delete": "$1, $3 ପୃଷ୍ଠାଟି {{GENDER:$2|ଲିଭାଇଦେଲେ}}",
        "logentry-delete-restore": "$1, $3 ପୃଷ୍ଠାଟି {{GENDER:$2|ପୁନସ୍ଥାପନ କଲେ}}",
        "logentry-delete-event": "$1 {{PLURAL:$5|ଲଗ ଘଟଣାଟିଏ|$5 ଗୋଟି ଲଗ ଘଟଣା}}ର ଦେଖଣା $3 ପୃଷ୍ଠାରେ {{GENDER:$2|ବଦଳାଇଲେ}}: $4",
        "feedback-bugornote": "ଦୟାକରି ଆପଣ ଏକ କାରିଗରି ଅସୁବିଧାଟିଏ ଜଣାଇବା ପାଇଁ ଚାହୁଁଥିଲେ ଦୟାକରି [$1 ଏଠାରେ ଅସୁବିଧାଟି ଜଣାନ୍ତୁ] । \nଅଥବା, ଆପଣ ତଳେ ଠିଆ ସହଜ ଆବେଦନ ପତ୍ରଟି ପୁରଣ କରିପାରିବେ ।  ଆପଣଙ୍କ ବ୍ୟବହାରକାରୀ ନାମ ଓ ଆପଣ ବ୍ୟବହାର କରୁଥିବା ବ୍ରାଉଜର ଅନୁସାରେ ଆପଣଙ୍କ ମତାମତ \"[$3 $2]\"ରେ ଯୋଡ଼ାଯିବ ।",
        "feedback-cancel": "ନାକଚ",
        "feedback-close": "ହୋଇଗଲା",
-       "feedback-error-title": "ଅସୁବିଧା",
        "feedback-error1": "ଭୁଲ: API ରୁ ଅଚିହ୍ନା ଫଳାଫଳ",
        "feedback-error2": "ଅସୁବିଧା: ସମ୍ପାଦନା ବିଫଳ ହେଲା",
        "feedback-error3": "ଅସୁବିଧା: API ରୁ କିଛି ଉତ୍ତର ମିଳିଲା ନାହିଁ",
index c66b261..705cc5c 100644 (file)
        "newwindow": "(otwiera się w nowym oknie)",
        "cancel": "Anuluj",
        "moredotdotdot": "Więcej...",
-       "morenotlisted": "Nie jest to kompletna lista.",
+       "morenotlisted": "Ta lista może być niekompletna.",
        "mypage": "Strona",
        "mytalk": "Dyskusja",
        "anontalk": "Dyskusja",
        "talk": "Dyskusja",
        "views": "Widok",
        "toolbox": "Narzędzia",
+       "tool-link-userrights": "Zmiana grup {{GENDER:$1|użytkownika|użytkowniczki}}",
+       "tool-link-emailuser": "Wyślij e-mail do {{GENDER:$1|tego użytkownika|tej użytkowniczki}}",
        "userpage": "Pokaż stronę użytkownika",
        "projectpage": "Pokaż stronę projektu",
        "imagepage": "Pokaż stronę pliku",
        "eauthentsent": "Potwierdzenie zostało wysłane na adres e‐mail.\nZanim jakiekolwiek inne wiadomości zostaną wysłane na ten adres, należy wykonać zawarte w mailu instrukcje. Potwierdzisz w ten sposób, że ten adres e‐mail należy do Ciebie.",
        "throttled-mailpassword": "Przypomnienie hasła zostało już wysłane w ciągu {{PLURAL:$1|ostatniej godziny|ostatnich $1 godzin}}.\nAby zapobiec nadużyciom nadużyć możliwość wysyłania przypomnień została ograniczona do jednego na {{PLURAL:$1|godzinę|$1 godziny|$1 godzin}}.",
        "mailerror": "W trakcie wysyłania wiadomości e‐mail wystąpił błąd: $1",
-       "acct_creation_throttle_hit": "Z adresu IP, z którego korzystasz {{PLURAL:$1|ktoś już utworzył dziś konto|utworzono dziś $1 konta|utworzono dziś $1 kont}}, co jest maksymalną dopuszczalną liczbą w tym czasie.\nW związku z tym, osoby korzystające z tego adresu IP w chwili obecnej nie mogą założyć kolejnego.",
+       "acct_creation_throttle_hit": "Z adresu IP, z którego korzystasz {{PLURAL:$1|ktoś już utworzył dziś konto|utworzono dziś $1 konta|utworzono dziś $1 kont}} w ciągu ostatnich $2, co jest maksymalną dopuszczalną liczbą w tym czasie.\nW związku z tym, osoby korzystające z tego adresu IP w chwili obecnej nie mogą założyć kolejnego.",
        "emailauthenticated": "Twój adres e‐mail został potwierdzony $2 o $3.",
        "emailnotauthenticated": "Twój adres '''e‐mail nie został potwierdzony'''.\nPoniższe funkcje poczty nie działają.",
        "noemailprefs": "Podaj adres e‐mail w preferencjach, by skorzystać z tych funkcji.",
        "botpasswords-label-delete": "Usuń",
        "botpasswords-label-resetpassword": "Zresetuj hasło",
        "botpasswords-label-grants": "Zastosowane uprawnienia:",
-       "botpasswords-label-restrictions": "Ograniczenia użytkowania:",
        "botpasswords-label-grants-column": "Przyznane",
        "botpasswords-bad-appid": "Nazwa bota \"$1\" nie jest prawidłowa.",
        "botpasswords-insert-failed": "Nie udało się dodać robota o nazwie \"$1\". Czy był już wcześniej dodany?",
        "botpasswords-updated-body": "Hasło bota \"$1\" użytkownika \"$2\" zostało zaktualizowane.",
        "botpasswords-deleted-title": "Hasło bota usunięte",
        "botpasswords-deleted-body": "Hasło bota \"$1\" użytkownika \"$2\" zostało usunięte.",
-       "botpasswords-newpassword": "Nowe hasło do zalogowania przez <strong>$1</strong> to <strong>$2</strong>. <em>Proszę je zapisać w celu wykorzystania w przyszłości.</em>",
+       "botpasswords-newpassword": "Nowe hasło do zalogowania się przez <strong>$1</strong> to <strong>$2</strong>. <em>Proszę je zapisać w celu wykorzystania w przyszłości.</em> <br> (Dla starszych botów, które wymagają loginu takiego samego jak ewentualna nazwa użytkownika można użyć <strong>$3</strong> jako nazwę użytkownika i <strong>$4</strong> jako hasło.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider nie jest dostępne.",
        "botpasswords-restriction-failed": "Logowanie nie powiodło się z powodu ograniczeń na hasło bota.",
        "botpasswords-invalid-name": "Określona nazwa użytkownika nie zawiera separatora hasła bota (\"$1\").",
        "passwordreset-emailelement": "Nazwa użytkownika: \n$1\n\nTymczasowe hasło: \n$2",
        "passwordreset-emailsentemail": "Jeśli ten adres e‐mail jest przypisany do Twojego konta, zostanie na niego wysłany e-mail do odzyskiwania hasła.",
        "passwordreset-emailsentusername": "Jeśli z tym kontem powiązany jest adres e‐mail, zostanie na niego wysłany e-mail do odzyskiwania hasła.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Został wysłany e-mail|Zostały wysłane e-mail}} z informacjami o resetowaniu hasła. {{PLURAL:$1|Użytkownik i hasło jest pokazany|Lista użytkowników i haseł jest pokazana}} poniżej.",
-       "passwordreset-emailerror-capture2": "Wysyłanie e-maila do {{GENDER:$2|użytkownika|użytkowniczki}} nie powiodło się: $1 {{PLURAL:$3|Użytkownik i hasło jest pokazany|Lista użytkowników i haseł jest pokazana}} poniżej.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Został wysłany e-mail|Zostały wysłane e-maile}} z informacjami o resetowaniu hasła. {{PLURAL:$1|Użytkownik i hasło jest pokazany|Lista użytkowników i haseł jest pokazana}} tutaj.",
+       "passwordreset-emailerror-capture2": "Wysyłanie e-maila do {{GENDER:$2|użytkownika|użytkowniczki}} nie powiodło się: $1 {{PLURAL:$3|Użytkownik i hasło jest pokazany|Lista użytkowników i haseł jest pokazana}} tutaj.",
        "passwordreset-nocaller": "Musi być podany wywołujący",
        "passwordreset-nosuchcaller": "Wywołujący nie istnieje: $1",
        "passwordreset-invalideamil": "Nieprawidłowy adres e-mail",
        "userpage-userdoesnotexist": "Użytkownik „<nowiki>$1</nowiki>” nie jest zarejestrowany.\nUpewnij się, czy na pewno zamierza{{GENDER:|łeś|łaś|sz}} utworzyć lub zmodyfikować właśnie tę stronę.",
        "userpage-userdoesnotexist-view": "Konto użytkownika „$1” nie jest zarejestrowane.",
        "blocked-notice-logextract": "{{GENDER:$1|Ten użytkownik|Ta użytkowniczka}} jest obecnie {{GENDER:$1|zablokowany|zablokowana}}.\nOstatni wpis rejestru blokad jest pokazany poniżej.",
-       "clearyourcache": "<strong>Uwaga:</strong> aby zobaczyć zmiany po zapisaniu, może zajść potrzeba wyczyszczenia pamięci podręcznej przeglądarki.\n* <strong>Firefox / Safari:</strong> Przytrzymaj <em>Shift</em> podczas klikania <em>Odśwież bieżącą stronę</em>, lub naciśnij klawisze <em>Ctrl+F5</em> lub <em>Ctrl+R</em> (<em>⌘-R</em> na komputerze Mac)\n* <strong>Google Chrome:</strong> Naciśnij <em>Ctrl-Shift-R</em> (<em>⌘-Shift-R</em> na komputerze Mac)\n* <strong>Internet Explorer:</strong> Przytrzymaj <em>Ctrl</em>, jednocześnie klikając <em>Odśwież</em>, lub naciśnij klawisze <em>Ctrl+F5</em>\n* <strong>Opera:</strong> Wyczyść pamięć podręczną w <em>Narzędzia → Preferencje</em>",
+       "clearyourcache": "<strong>Uwaga:</strong> aby zobaczyć zmiany po zapisaniu, może zajść potrzeba wyczyszczenia pamięci podręcznej przeglądarki.\n* <strong>Firefox / Safari:</strong> Przytrzymaj <em>Shift</em> podczas klikania <em>Odśwież bieżącą stronę</em>, lub naciśnij klawisze <em>Ctrl+F5</em> lub <em>Ctrl+R</em> (<em>⌘-R</em> na komputerze Mac)\n* <strong>Google Chrome:</strong> Naciśnij <em>Ctrl-Shift-R</em> (<em>⌘-Shift-R</em> na komputerze Mac)\n* <strong>Internet Explorer:</strong> Przytrzymaj <em>Ctrl</em>, jednocześnie klikając <em>Odśwież</em>, lub naciśnij klawisze <em>Ctrl+F5</em>\n* <strong>Opera:</strong> Przejdź do <em>Menu → Ustawienia</em> (<em>Opera → Preferencje</em> w Mac), a następnie <em>Prywatność i bezpieczeństwo → Wyczyść dane przeglądania → Opróżnij pamięć podręczną</em>.",
        "usercssyoucanpreview": "'''Podpowiedź:''' Użyj przycisku „Podgląd”, aby przetestować nowy arkusz stylów CSS przed jego zapisaniem.",
        "userjsyoucanpreview": "'''Podpowiedź:''' Użyj przycisku „Podgląd”, aby przetestować nowy kod JavaScript przed jego zapisaniem.",
        "usercsspreview": "'''Pamiętaj, że to tylko podgląd arkusza stylów CSS – nic jeszcze nie zostało zapisane!'''",
        "invalid-content-data": "Zawartość strony zawiera nieprawidłowe dane",
        "content-not-allowed-here": "Zawartość tego typu ($1) nie jest dozwolona na stronie [[$2]]",
        "editwarning-warning": "Opuszczenie tej strony może spowodować utratę wprowadzonych przez Ciebie zmian.\nJeśli jesteś zalogowany, możesz wyłączyć wyświetlanie tego ostrzeżenia w zakładce „{{int:prefs-editing}}” w swoich preferencjach.",
+       "editpage-invalidcontentmodel-title": "Model zawartości nie jest obsługiwany",
+       "editpage-invalidcontentmodel-text": "Model zawartości „$1” nie jest obsługiwany.",
        "editpage-notsupportedcontentformat-title": "Nieobsługiwany format zawartości",
        "editpage-notsupportedcontentformat-text": "Format zawartości $1 nie jest obsługiwany modelem treści $2.",
        "content-model-wikitext": "wikitekst",
        "mergehistory-fail-bad-timestamp": "Znacznik czasu jest nieprawidłowy.",
        "mergehistory-fail-invalid-source": "Strona źródłowa jest nieprawidłowa.",
        "mergehistory-fail-invalid-dest": "Strona docelowa jest nieprawidłowa.",
+       "mergehistory-fail-no-change": "Łączenie historii nie połączyło żadnych wersji. Proszę ponownie sprawdzić stronę i parametry czasowe.",
        "mergehistory-fail-permission": "Brak uprawnień, aby połączyć historię.",
        "mergehistory-fail-self-merge": "Strona źródłowa i docelowa są takie same.",
        "mergehistory-fail-toobig": "Nie można połączyć historii, gdyż wymagałoby to przeniesienia więcej niż maksymalnej dopuszczalnej liczby $1 {{PLURAL:$1|wersji}}.",
        "searchprofile-advanced-tooltip": "Szukanie w wybranych przestrzeniach nazw",
        "search-result-size": "$1 ({{PLURAL:$2|1 słowo|$2 słowa|$2 słów}})",
        "search-result-category-size": "{{PLURAL:$1|1 element|$1 elementy|$1 elementów}} ({{PLURAL:$2|1 kategoria|$2 kategorie|$2 kategorii}}, {{PLURAL:$3|1 plik|$3 pliki|$3 plików}})",
-       "search-redirect": "(przekierowanie $1)",
+       "search-redirect": "(przekierowanie $1)",
        "search-section": "(sekcja $1)",
        "search-category": "(kategoria $1)",
        "search-file-match": "(odpowiada zawartości pliku)",
        "grant-group-high-volume": "Czynności na dużą skalę",
        "grant-group-customization": "Dostosowywanie i preferencje",
        "grant-group-administration": "Czynności administracyjne",
+       "grant-group-private-information": "Dostęp do prywatnych danych o tobie",
        "grant-group-other": "Różne czynności",
        "grant-blockusers": "Blokowanie i odblokowywanie użytkowników",
        "grant-createaccount": "Tworzenie kont",
        "grant-highvolume": "Masowe edytowanie",
        "grant-oversight": "Ukrywanie użytkowników i wersji stron",
        "grant-patrol": "Patrolować zmiany w stronach",
+       "grant-privateinfo": "Dostęp do prywatnych danych",
        "grant-protect": "Zabezpieczanie i odbezpieczanie stron",
        "grant-rollback": "Wycofywanie zmian na stronach",
        "grant-sendemail": "Wysyłanie e‐maili do innych użytkowników",
        "file-thumbnail-no": "Nazwa pliku zaczyna się od <strong>$1</strong>.\nWydaje się, że jest to pomniejszona grafika ''(miniaturka)''.\nJeśli posiadasz tę grafikę w pełnym rozmiarze – prześlij ją. Jeśli chcesz wysłać tę – zmień nazwę przesyłanego obecnie pliku.",
        "fileexists-forbidden": "Plik o tej nazwie już istnieje i nie może zostać nadpisany.\nJeśli chcesz przesłać plik cofnij się i prześlij go pod inną nazwą. [[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Plik o tej nazwie już istnieje we współdzielonym repozytorium plików.\nCofnij się i załaduj plik pod inną nazwą. [[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "Przesyłany plik jest identyczny z aktualną wersją <strong>[[:$1]]</strong>.",
        "fileexists-duplicate-version": "{{PLURAL:$2|Przesłany plik jest dokładną kopią starszej wersji pliku|Przesłane pliki są dokładnymi kopiami starszych wersji plików}} <strong>[[:$1]]</strong>.",
        "file-exists-duplicate": "Ten plik jest kopią {{PLURAL:$1|pliku|następujących plików}}:",
        "file-deleted-duplicate": "Identyczny do tego plik ([[:$1]]) został wcześniej usunięty.\nSprawdź historię usunięć tamtego pliku zanim prześlesz go ponownie.",
        "upload-dialog-disabled": "Przesyłanie plików przy pomocy tego okna jest wyłączone na tej wiki.",
        "upload-dialog-title": "Prześlij plik",
        "upload-dialog-button-cancel": "Anuluj",
+       "upload-dialog-button-back": "Wstecz",
        "upload-dialog-button-done": "Gotowe",
        "upload-dialog-button-save": "Zapisz",
        "upload-dialog-button-upload": "Prześlij",
        "apisandbox-results-fixtoken-fail": "Nie udało się pobrać tokena „$1”.",
        "apisandbox-alert-page": "Pola na tej stronie są nieprawidłowe.",
        "apisandbox-alert-field": "Wartość tego pola jest nieprawidłowa.",
+       "apisandbox-continue": "Kontynuuj",
+       "apisandbox-continue-clear": "Wyczyść",
        "booksources": "Książki",
        "booksources-search-legend": "Szukaj informacji o książkach",
        "booksources-search": "Szukaj",
        "changecontentmodel-success-text": "Typ zawartości [[:$1]] został zmieniony.",
        "changecontentmodel-cannot-convert": "Zawartość [[:$1]] nie może być przekształcona do typu $2.",
        "changecontentmodel-nodirectediting": "Model zawartości $1 nie obsługuje bezpośredniego edytowania",
+       "changecontentmodel-emptymodels-title": "Nie ma dostępnych modeli treści",
        "changecontentmodel-emptymodels-text": "Zawartość [[:$1]] nie może być przekształcona do żadnego typu.",
        "log-name-contentmodel": "Rejestr zmian modelu zawartości",
        "log-description-contentmodel": "Wydarzenia związane z modelami zawartości stron",
        "pageinfo-category-pages": "Liczba stron",
        "pageinfo-category-subcats": "Liczba podkategorii",
        "pageinfo-category-files": "Liczba plików",
+       "pageinfo-user-id": "ID użytkownika",
        "markaspatrolleddiff": "oznacz edycję jako „sprawdzoną”",
        "markaspatrolledtext": "Oznacz tę stronę jako „sprawdzoną”",
        "markaspatrolledtext-file": "Oznacz tę wersję pliku jako „sprawdzoną”",
        "newimages-showbots": "Pokaż pliki przesłane przez boty",
        "newimages-hidepatrolled": "Ukryj sprawdzone pliki",
        "noimages": "Brak plików do pokazania.",
+       "gallery-slideshow-toggle": "Przełączanie miniatur",
        "ilsubmit": "Szukaj",
        "bydate": "według daty",
        "sp-newimages-showfrom": "pokaż nowe pliki począwszy od $2, $1",
        "blankpage": "Pusta strona",
        "intentionallyblankpage": "Tę stronę umyślnie pozostawiono pustą.",
        "external_image_whitelist": " #Pozostaw tę linię dokładnie tak, jak jest.<pre>\n#Wstaw poniżej fragmenty wyrażeń regularnych (tylko to, co znajduje się między //).\n#Wyrażenia te zostaną dopasowane do adresów URL zewnętrznych (bezpośrednio linkowanych) grafik.\n#Dopasowane adresy URL zostaną wyświetlone jako grafiki, w przeciwnym wypadku będzie pokazany jedynie link do grafiki.\n#Linie zaczynające się od # są traktowane jako komentarze.\n#We wpisach ma znaczenie wielkość znaków.\n\n#Wstaw wszystkie deklaracje wyrażeniami regularnymi poniżej tej linii. Pozostaw tę linię dokładnie tak, jak jest.</pre>",
-       "tags": "Sprawdź zmiany w oparciu o wzorce tekstu",
+       "tags": "Znaczniki zmian",
        "tag-filter": "Filtr [[Special:Tags|znaczników]]:",
        "tag-filter-submit": "Filtr",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Znacznik|Znaczniki}}]]: $2)",
+       "tag-mw-contentmodelchange": "zmiana modelu zawartości",
+       "tag-mw-contentmodelchange-description": "Edycje, które [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel zmieniają model zawartości] strony",
        "tags-title": "Znaczniki",
        "tags-intro": "Na tej stronie znajduje się lista znaczników, którymi oprogramowanie może oznaczyć edycje, oraz ich opisy.",
        "tags-tag": "Nazwa znacznika",
        "tags-actions-header": "Działania",
        "tags-active-yes": "Tak",
        "tags-active-no": "Nie",
-       "tags-source-extension": "Określony przez rozszerzenie",
+       "tags-source-extension": "Określony przez oprogramowanie",
        "tags-source-manual": "Ręcznie wprowadzany przez użytkowników i boty",
        "tags-source-none": "Nieużywany",
        "tags-edit": "edytuj",
        "htmlform-cloner-create": "Dodaj więcej",
        "htmlform-cloner-delete": "Usuń",
        "htmlform-cloner-required": "Wymagana jest co najmniej jedna wartość.",
+       "htmlform-date-placeholder": "RRRR-MM-DD",
+       "htmlform-time-placeholder": "GG:MM:SS",
+       "htmlform-datetime-placeholder": "RRRR-MM-DD GG:MM:SS",
+       "htmlform-date-invalid": "Podana przez Ciebie wartość nie jest rozpoznawana jako data. Spróbuj użyć formatu RRRR-MM-DD.",
+       "htmlform-time-invalid": "Podana przez Ciebie wartość nie jest rozpoznawana jako czas. Spróbuj użyć formatu GG:MM:SS.",
+       "htmlform-datetime-invalid": "Podana przez Ciebie wartość nie jest rozpoznawana jako data i czas. Spróbuj użyć formatu RRRR-MM-DD GG:MM:SS.",
+       "htmlform-date-toolow": "Podana przez Ciebie wartość jest wcześniejsza niż dozwolona data $1.",
+       "htmlform-date-toohigh": "Podana przez Ciebie wartość jest późniejsza niż dozwolona data $1.",
+       "htmlform-time-toolow": "Podana przez Ciebie wartość jest wcześniejsza niż dozwolony czas $1.",
+       "htmlform-time-toohigh": "Podana przez Ciebie wartość jest późniejsza niż dozwolony czas $1.",
+       "htmlform-datetime-toolow": "Podana przez Ciebie wartość jest wcześniejsza niż dozwolona data i czas $1.",
+       "htmlform-datetime-toohigh": "Podana przez Ciebie wartość jest późniejsza niż dozwolona data i czas $1.",
        "htmlform-title-badnamespace": "[[:$1]] nie znajduje się w przestrzeni nazw „{{ns:$2}}”.",
        "htmlform-title-not-creatable": "Nie można użyć „$1” do utworzenia tytułu strony",
        "htmlform-title-not-exists": "$1 nie istnieje.",
        "htmlform-user-not-exists": "<strong>$1</strong> nie istnieje.",
        "htmlform-user-not-valid": "<strong>$1</strong> nie jest prawidłową nazwą użytkownika.",
-       "sqlite-has-fts": "$1 z obsługą pełnotekstowego wyszukiwania",
-       "sqlite-no-fts": "$1 bez obsługi pełnotekstowego wyszukiwania",
        "logentry-delete-delete": "$1 {{GENDER:$2|usunął|usunęła}} stronę $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|odtworzył|odtworzyła}} stronę $3",
        "logentry-delete-event": "$1 {{GENDER:$2|zmienił|zmieniła}} widoczność {{PLURAL:$5|zdarzenia|$5 zdarzeń}} w rejestrze $3, wykonano następujące operacje: $4",
        "feedback-external-bug-report-button": "Zgłoś problem techniczny",
        "feedback-dialog-title": "Prześlij opinię",
        "feedback-dialog-intro": "Możesz użyć tego prostego formularza w celu zgłoszenia swojej opinii. Twój komentarz, wraz z Twoją nazwą użytkownika (albo numerem IP) pojawi się na stronie $1.",
-       "feedback-error-title": "Błąd",
        "feedback-error1": "Błąd – nierozpoznana odpowiedź API",
        "feedback-error2": "Błąd – edycja nieudana",
        "feedback-error3": "Błąd – brak odpowiedzi API",
        "feedback-thanks": "Dziękujemy! Twoja opinia została opublikowana na stronie \"[$2 $1]\".",
        "feedback-thanks-title": "Dziękujemy!",
        "feedback-useragent": "Aplikacja klienta:",
-       "searchsuggest-search": "Szukaj",
+       "searchsuggest-search": "Przeszukaj {{GRAMMAR:B.lp|{{SITENAME}}}}",
        "searchsuggest-containing": "zawierające...",
        "api-error-autoblocked": "Twój adres IP został automatycznie zablokowany, ponieważ był używany przez zablokowanego użytkownika.",
        "api-error-badaccess-groups": "Nie masz uprawnień aby przesyłać pliki do tej wiki.",
        "authform-notoken": "Brakujący token",
        "authform-wrongtoken": "Nieprawidłowy token",
        "specialpage-securitylevel-not-allowed": "Niestety, nie możesz korzystać z tej strony, ponieważ twoja tożsamość nie może zostać zweryfikowana.",
+       "authpage-cannot-login": "Nie można uruchomić logowania.",
        "authpage-cannot-login-continue": "Nie można kontynuować logowania. Sesja najprawdopodobniej wygasła.",
        "authpage-cannot-create": "Nie można rozpocząć tworzenie konta.",
        "authpage-cannot-create-continue": "Nie można kontynuować tworzenia konta. Twoja sesja najprawdopodobniej wygasła.",
        "linkaccounts-success-text": "Konto zostało połączone.",
        "linkaccounts-submit": "Połącz konta",
        "unlinkaccounts": "Odłącz konta",
-       "unlinkaccounts-success": "Konta zostały odłączone."
+       "unlinkaccounts-success": "Konta zostały odłączone.",
+       "userjsispublic": "Uwaga: Podstrony z kodem JavaScript są widoczne publicznie i nie powinny zawierać poufnych danych.",
+       "usercssispublic": "Uwaga: Podstrony z kodem CSS są widoczne publicznie i nie powinny zawierać poufnych danych.",
+       "restrictionsfield-badip": "Nieprawidłowy adres IP lub zakres adresów: $1",
+       "restrictionsfield-label": "Dozwolone zakresy adresów IP:",
+       "restrictionsfield-help": "Jeden adres IP lub zakres CIDR w wierszu. Aby zaznaczyć wszystkie, użyj<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Błąd: $1",
+       "edit-error-long": "Błędy:\n\n$1"
 }
index 21272c1..15b5bee 100644 (file)
@@ -12,7 +12,8 @@
                        "Obaid Raza",
                        "Macofe",
                        "Matma Rex",
-                       "Saanvel"
+                       "Saanvel",
+                       "Satdeep gill"
                ]
        },
        "tog-underline": "حوڑ تھلے لین:",
        "yourpasswordagain": "کنجی فیر لکھو:",
        "createacct-yourpasswordagain": "کنجی پکی کرو",
        "createacct-yourpasswordagain-ph": "کنجی فیر پاؤ",
-       "remembermypassword": "اس براؤزر تے میرا ورتن ناں یاد رکھو ($1 {{PLURAL:$1|دن|دناں}} واسطے)",
        "userlogin-remembermypassword": "مینوں لاگ ان رکھو",
        "yourdomainname": "تواڈا علاقہ:",
        "externaldberror": "ڈیٹابیس چ توانوں پہچاننے چ کوئی مسئلہ ہویا اے یا فیر تسی اپنا بارلا کھاتا نئیں بدل سکدے۔",
        "passwordreset-emailtext-user": "ورتنوالے $1 نے {{سائیٹناں}} تے تواڈے کھاتے بارے پچھیا اے {{SITENAME}} لئی ($4)۔ تھلے دتا گیا ورتن {{PLURAL:$3|کھاتہ|کھاتے}} ایس ای-میل نال جڑدا اے۔\n\n$2\n\n{{PLURAL:$3|ایہ عارضی کنجی|اے عارضی کنجیاں}} مک جائیگا {{PLURAL:$5|اک دن|$5 دن}}۔ تسیں ہن لاکان ہوو تے نویں کنجی چنو۔ اگر کسے ہور نے اے چٹھی پیجی یا توانوں اپنی پہلی کنجی یاد آگئی اے تے تسیں اونوں بدلنا نئیں چاندے تے تسیں ایس سنیعے نوں پھل جاؤ تے پرانی کنجی نال ای کم چلاؤ۔",
        "passwordreset-emailelement": "ورتن ناں: \n$1\n\nعارضی کنجی: \n$2",
        "passwordreset-emailsentemail": "یاد کران واسطے اک ای-میل پیج دتی گئی اے۔",
-       "passwordreset-emailsent-capture": "اک یاد کران والی ای-میل پیج دتی گئی اے، جیہڑی تھلے دسی گئی اے۔",
-       "passwordreset-emailerror-capture": "اک یادکراؤ ای-میل بنائی گئی اے، جیہڑی کہ تھلے دسی گئی اے، پر ورتن والے تک پیجنا نئیں ہوسکیا:$1",
        "changeemail": "ای-میل پتہ بدلو",
        "changeemail-header": "کھاتے دا ای-میل پتہ بدلو",
        "changeemail-no-info": "تسی لاگ ان ہوکے ای اس صفحے نوں ویکھ سکدے او۔",
        "minoredit": "اے نکا جیا کم اے",
        "watchthis": "اس صفے تے اکھ رکھو",
        "savearticle": "کم بچاؤ",
+       "savechanges": "کم بچاؤ",
        "preview": "وکھاؤ",
        "showpreview": "کچا کم ویکھو",
        "showdiff": "تبدیلیاں وکھاؤ",
        "undo-failure": "تبدیلی واپس نئیں ہوسکدی وشکار ہویاں تبدیلیاں ہون دی وجہ توں۔",
        "undo-norev": "تبدیلی واپس نئیں ہوسکدی کیوں جے ایہ ہے ای نئیں یا مٹا دتی گئی اے۔",
        "undo-summary": "$1 دی کیتی ہوئی ریوین [[Special:Contributions/$2|$2]] ([[User talk:$2|گل]]) واپس کرو",
-       "cantcreateaccounttitle": "کھاتہ نئیں کھول سکدے",
        "cantcreateaccount-text": "کھاتہ بنانا ایس آئی پی پتے  ('''$1''')  لئی  [[User:$3|$3]] نے روک دتی اے۔\n$3 نے ''$2'' وجہ دسی اے۔",
        "viewpagelogs": "صفحے دے لاگ ویکھو",
        "nohistory": "اس صفحے دی پرانی لکھائی دی کوئی تاریخ نئیں۔",
        "htmlform-submit": "رکھو",
        "htmlform-reset": "تبدیلیاں واپس",
        "htmlform-selectorother-other": "ہور",
-       "sqlite-has-fts": "$1 پوری لکھت کھوج مدد نال",
-       "sqlite-no-fts": "$1 بنا کسے لکھت مدد دے",
        "logentry-delete-delete": "$1 {{GENDER:$2|مٹایا}} صفہ $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|بچایا}} صفہ $3",
        "logentry-delete-event": "$1 پلٹے وکھالہ {{PLURAL:$5|اک لاگ ایونٹ|$5 لاگ ایونٹس}} تے $3: $4",
        "special-characters-group-gujarati": "گجراتی",
        "special-characters-group-thai": "تھائی",
        "special-characters-group-lao": "لاؤ",
-       "special-characters-group-khmer": "کھیمر",
-       "api-error-blacklisted": "مہربانی کرکے وکھری سرخی چنو۔"
+       "special-characters-group-khmer": "کھیمر"
 }
index 5dac084..668515e 100644 (file)
@@ -99,7 +99,9 @@
                        "Anderson Costa",
                        "LucyDiniz",
                        "Tusca",
-                       "Cristofer Alves"
+                       "Cristofer Alves",
+                       "Tark",
+                       "O Andarilho"
                ]
        },
        "tog-underline": "Sublinhar links:",
        "tog-enotifminoredits": "Notificar-me por email também sobre edições menores de páginas ou arquivos",
        "tog-enotifrevealaddr": "Revelar meu endereço de email nas mensagens de notificação",
        "tog-shownumberswatching": "Mostrar o número de usuários que estão vigiando",
-       "tog-oldsig": "Assinatura existente:",
+       "tog-oldsig": "Sua Assinatura Existente:",
        "tog-fancysig": "Tratar assinatura como wikitexto (sem link automático)",
        "tog-uselivepreview": "Utilizar pré-visualização em tempo real",
        "tog-forceeditsummary": "Avisar-me ao introduzir um sumário de edição vazio",
        "tog-showhiddencats": "Exibir categorias ocultas",
        "tog-norollbackdiff": "Omitir diferenças após desfazer edições em bloco",
        "tog-useeditwarning": "Avisar-me quando eu deixar uma janela de edição sem ter salvo as alterações",
-       "tog-prefershttps": "Usar sempre uma conexão segura quando estiver conectado",
+       "tog-prefershttps": "Usar sempre uma conexão segura enquanto estiver conectado",
        "underline-always": "Sempre",
        "underline-never": "Nunca",
        "underline-default": "Padrão do navegador/skin",
        "newwindow": "(abre numa nova janela)",
        "cancel": "Cancelar",
        "moredotdotdot": "Mais...",
-       "morenotlisted": "Esta lista não está completa.",
+       "morenotlisted": "Esta lista está incompleta.",
        "mypage": "Página",
        "mytalk": "Discussão",
        "anontalk": "Discussão",
        "botpasswords-label-resetpassword": "Redefinir a sua senha",
        "botpasswords-label-grants": "Permissões aplicáveis",
        "botpasswords-help-grants": "Cada permissão da acesso à lista permissões de usuários que um usuário já tenha. Veja o [[Special:ListGrants|Lista de Permissões]] para mais informações.",
-       "botpasswords-label-restrictions": "Restrições de uso:",
        "botpasswords-label-grants-column": "Concedido",
        "botpasswords-bad-appid": "O nome de robô \"$1\" não é válido.",
        "botpasswords-insert-failed": "Falha ao adicionar o nome de robô \"$1\". Ele já foi adicionado?",
        "rightslogtext": "Este é um registro de mudanças nos privilégios de usuários.",
        "action-read": "ler esta página",
        "action-edit": "editar esta página",
-       "action-createpage": "criar esta páginas",
-       "action-createtalk": "criar esta páginas de discussão",
+       "action-createpage": "criar esta página",
+       "action-createtalk": "criar esta página de discussão",
        "action-createaccount": "criar esta conta de usuário",
        "action-autocreateaccount": "Criar uma conta de usuário externa automaticamente",
        "action-history": "Ver o histórico desta página",
        "htmlform-title-not-exists": "$1 não existe.",
        "htmlform-user-not-exists": "<strong>$1</strong> não existe.",
        "htmlform-user-not-valid": "<strong>$1</strong> não é um nome de usuário válido.",
-       "sqlite-has-fts": "$1 com suporte de pesquisa de texto completo",
-       "sqlite-no-fts": "$1 sem suporte de pesquisa de texto completo",
        "logentry-delete-delete": "$1 apagou a página $3",
        "logentry-delete-restore": "$1 restaurou a página $3",
        "logentry-delete-event": "$1 alterou a visibilidade {{PLURAL:$5|de uma entrada|de $5 entradas}} do registro $3: $4",
index 0f214ff..fbd2f57 100644 (file)
@@ -90,7 +90,7 @@
        "tog-watchdefault": "Adicionar as páginas e ficheiros que eu editar às minhas páginas vigiadas",
        "tog-watchmoves": "Adicionar as páginas e ficheiros que eu mover às minhas páginas vigiadas",
        "tog-watchdeletion": "Adicionar as páginas e ficheiros que eu eliminar às minhas páginas vigiadas",
-       "tog-watchuploads": "Adicionar novos ficheiros carregados por mim à minha lista de artigos vigiados",
+       "tog-watchuploads": "Adicionar novos ficheiros carregados por mim à minha lista de páginas vigiadas",
        "tog-watchrollback": "Adicionar páginas onde fiz uma reversão às minhas páginas vigiadas",
        "tog-minordefault": "Por omissão, marcar todas as edições como menores",
        "tog-previewontop": "Mostrar a antevisão antes da caixa de edição",
        "tog-enotifminoredits": "Notificar-me por correio electrónico também sobre edições menores de páginas ou ficheiros",
        "tog-enotifrevealaddr": "Revelar o meu endereço de correio electrónico nas notificações",
        "tog-shownumberswatching": "Mostrar o número de utilizadores a vigiar",
-       "tog-oldsig": "Assinatura atual:",
+       "tog-oldsig": "A sua assinatura atual:",
        "tog-fancysig": "Tratar assinatura como texto wiki (sem hiperligações automáticas)",
        "tog-uselivepreview": "Usar a antevisão ao vivo",
        "tog-forceeditsummary": "Avisar-me se deixar o resumo da edição vazio",
        "category_header": "Páginas na categoria \"$1\"",
        "subcategories": "Subcategorias",
        "category-media-header": "Multimédia na categoria \"$1\"",
-       "category-empty": "''Esta categoria não contém atualmente nenhuma página ou ficheiro multimédia.''",
+       "category-empty": "<em>Esta categoria não contém atualmente nenhuma página ou ficheiro multimédia.</em>",
        "hidden-categories": "{{PLURAL:$1|Categoria oculta|Categorias ocultas}}",
        "hidden-category-category": "Categorias ocultas",
        "category-subcat-count": "{{PLURAL:$2|Esta categoria só contém a seguinte subcategoria.|Esta categoria contém {{PLURAL:$1|a seguinte subcategoria|as seguintes $1 subcategorias}} (de um total de $2).}}",
        "newwindow": "(abre numa janela nova)",
        "cancel": "Cancelar",
        "moredotdotdot": "Mais...",
-       "morenotlisted": "Esta lista não está completa.",
+       "morenotlisted": "Esta lista pode estar incompleta.",
        "mypage": "Página",
        "mytalk": "Discussão",
        "anontalk": "Discussão",
        "talk": "Discussão",
        "views": "Vistas",
        "toolbox": "Ferramentas",
+       "tool-link-userrights": "Alterar grupos {{GENDER:$1|do utilizador|da utilizadora}}",
+       "tool-link-emailuser": "Enviar correio eletrónico a {{GENDER:$1|este utilizador|esta utilizadora|este(a) utilizador(a)}}",
        "userpage": "Ver página de utilizador",
        "projectpage": "Ver página de projeto",
        "imagepage": "Ver página de ficheiro",
        "nstab-category": "Categoria",
        "mainpage-nstab": "Página principal",
        "nosuchaction": "Operação não existe",
-       "nosuchactiontext": "A operação especificada pela URL é inválida.\nÉ possível que tenha escrito mal a URL ou seguido uma ligação incorreta.\nIsto pode também indicar um defeito no software da {{SITENAME}}.",
+       "nosuchactiontext": "A operação especificada pelo URL é inválida.\nÉ possível que tenha escrito mal o URL ou seguido uma ligação incorreta.\nIsto pode também indicar um defeito no software da {{SITENAME}}.",
        "nosuchspecialpage": "Esta página especial não existe",
        "nospecialpagetext": "<strong>Solicitou uma página especial inválida.</strong>\n\nEncontra uma lista das páginas especiais válidas em [[Special:SpecialPages|{{int:specialpages}}]].",
        "error": "Erro",
        "databaseerror-query": "Consulta: $1",
        "databaseerror-function": "Função: $1",
        "databaseerror-error": "Erro: $1",
-       "transaction-duration-limit-exceeded": "Para evitar a criação de lag replicação alta, esta operação foi abortada porque a duração de gravação ($1) excedeu o limite de $2 {{PLURAL:$2|segundo|segundos}}. Se está a mudar muitos itens de uma vez, tente fazer várias operações menores em vez disso.",
+       "transaction-duration-limit-exceeded": "Para evitar grandes atrasos na replicação, esta operação foi cancelada porque a duração de gravação ($1) excedeu o limite de $2 {{PLURAL:$2|segundo|segundos}}. Se está a mudar muitos objetos de uma só vez, tente desmultiplicar a operação em várias de menor dimensão.",
        "laggedslavemode": "'''Aviso:''' A página pode não conter as atualizações mais recentes.",
        "readonly": "Base de dados bloqueada (limitada a leituras)",
        "enterlockreason": "Introduza um motivo para bloquear, incluindo uma estimativa de quando será desbloqueada",
        "readonlytext": "A base de dados está atualmente bloqueada para novas entradas e outras modificações, provavelmente para uma manutenção de rotina, após a qual voltará à sua normalidade.\n\nO administrador que a bloqueou deu a seguinte explicação: $1",
-       "missing-article": "A base de dados não encontrou o texto de uma página que deveria ter encontrado, com o nome \"$1\" $2.\n\nGeralmente, esta situação ocorre ao clicar numa ligação para diferenças desatualizada ou para o histórico de uma página que tenha sido removida.\n\nSe nenhuma destas situações se verifica, pode ter encontrado um defeito no programa.\nAnote a URL e reporte este incidente a um [[Special:ListUsers/sysop|administrador]], por favor.",
+       "missing-article": "A base de dados não encontrou o texto de uma página que deveria ter encontrado, com o nome \"$1\" $2.\n\nGeralmente, esta situação ocorre ao clicar numa ligação para diferenças desatualizada ou para o histórico de uma página que tenha sido removida.\n\nSe nenhuma destas situações se verifica, pode ter encontrado um defeito no programa.\nAnote o URL e reporte este incidente a um [[Special:ListUsers/sysop|administrador]], por favor.",
        "missingarticle-rev": "(revisão#: $1)",
        "missingarticle-diff": "(Dif.: $1, $2)",
        "readonly_lag": "A base de dados foi automaticamente bloqueada enquanto os servidores secundários se sincronizam com o primário",
+       "nonwrite-api-promise-error": "O cabeçalho HTTP 'Promise-Non-Write-API-Action' foi enviado, mas o pedido está a ser feito a um módulo de escrita da API.",
        "internalerror": "Erro interno",
        "internalerror_info": "Erro interno: $1",
        "internalerror-fatal-exception": "Exceção fatal do tipo \"$1\"",
        "createacct-yourpasswordagain-ph": "Digite a palavra-passe novamente",
        "userlogin-remembermypassword": "Manter-me autenticado",
        "userlogin-signwithsecure": "Usar uma ligação segura",
+       "cannotlogin-title": "Não é possível iniciar sessão",
+       "cannotlogin-text": "Não é possível iniciar sessão.",
        "cannotloginnow-title": "Não é possível iniciar sessão agora",
        "cannotloginnow-text": "Não pode iniciar a sessão quando utilizar $1.",
+       "cannotcreateaccount-title": "Não é possível criar contas",
+       "cannotcreateaccount-text": "A criação direta de contas não está ativada nesta wiki.",
        "yourdomainname": "O seu domínio:",
        "password-change-forbidden": "Não pode alterar palavras-passe nesta wiki.",
        "externaldberror": "Ocorreu um erro externo à base de dados durante a autenticação ou não lhe é permitido atualizar a sua conta externa.",
        "eauthentsent": "Foi enviada uma mensagem de confirmação para o endereço de correio eletrónico que especificou.\nAntes que seja enviada qualquer outra mensagem para a conta, terá de seguir as instruções na mensagem enviada, de modo a confirmar que a conta lhe pertence.",
        "throttled-mailpassword": "Já foi enviada um email de recuperação de palavra-passe {{PLURAL:$1|na última hora|nas últimas $1 horas}}.\nPara prevenir abusos, só um email de recuperação de palavra-passe pode ser enviado a cada {{PLURAL:$1|hora|$1 horas}}.",
        "mailerror": "Erro ao enviar correio electrónico: $1",
-       "acct_creation_throttle_hit": "Visitantes desta wiki com o seu endereço IP criaram $1 {{PLURAL:$1|conta|contas}} no último dia, o que é o máximo permitido neste período de tempo.\nEm resultado, visitantes com este endereço IP não podem criar mais nenhuma conta neste momento.",
+       "acct_creation_throttle_hit": "Visitantes desta wiki com endereço IP igual ao seu criaram {{PLURAL:$1|uma conta|$1 contas}} nos últimos (ou últimas) $2, o que é o máximo permitido neste período de tempo.\nEm resultado, visitantes com este endereço IP não podem criar mais nenhuma conta de momento.",
        "emailauthenticated": "O seu endereço de correio eletrónico foi confirmado a $2, às $3.",
        "emailnotauthenticated": "O seu endereço de correio eletrónico ainda não foi confirmado.\nNão lhe serão enviadas mensagens por nenhuma das seguintes funcionalidades.",
        "noemailprefs": "Especifique um endereço de correio eletrónico nas suas preferências para ativar estas funcionalidades.",
        "changepassword-success": "A sua palavra-passe foi alterada!",
        "changepassword-throttled": "Realizou demasiadas tentativas de início de sessão com esta conta.\nAguarde $1 antes de tentar novamente, por favor.",
        "botpasswords": "Palavras-passe de robô",
-       "botpasswords-summary": "As <em>palavras-passe de robô</em> permitem o acesso a uma conta de utilizador através da API sem utilizar as principais credenciais de login da conta. Os direitos de um utilizador, ao iniciar sessão com uma palavra-passe de robô, podem estar limitados.\n\nSe não sabe o que o leva a fazer isso, provavelmente não deveria fazê-lo. Ninguém deve solicitar que gere uma destas palavras-passe e a entregue.",
+       "botpasswords-summary": "As <em>palavras-passe de robô</em> permitem o acesso a uma conta de utilizador através da API, sem utilizar as credenciais principais de autenticação dessa conta. Os direitos de um utilizador, ao iniciar uma sessão com a palavra-passe de robô, podem estar limitados.\n\nSe não sabe para que necessita desta palavra-passe provavelmente não deveria criá-la. Nunca lhe deve ser solicitado que gere e entregue uma destas palavras-passe.",
        "botpasswords-disabled": "As palavras-passe de robô estão desactivadas.",
        "botpasswords-no-central-id": "Para utilizar palavras-passe de robô, deve iniciar sessão com uma conta centralizada.",
        "botpasswords-existing": "Palavras-passe de robô existentes",
        "botpasswords-label-cancel": "Cancelar",
        "botpasswords-label-delete": "Eliminar",
        "botpasswords-label-resetpassword": "Redefinir palavra-passe",
-       "botpasswords-label-grants": "Permissões aplicáveis:",
-       "botpasswords-label-restrictions": "Restrições de uso:",
+       "botpasswords-label-grants": "Atribuições aplicáveis:",
+       "botpasswords-help-grants": "Cada atribuição dá acesso às permissões listadas que uma conta de utilizador já possua. Consulte a [[Special:ListGrants|tabela de atribuições]] para mais informação.",
        "botpasswords-label-grants-column": "Concedido",
        "botpasswords-bad-appid": "O nome do robô \"$1\" não é válido.",
        "botpasswords-insert-failed": "Falhou ao adicionar o nome do robô \"$1\". Já foi adicionado?",
        "botpasswords-update-failed": "Falha ao atualizar o nome do robô \"$1\". Será que foi eliminado?",
        "botpasswords-created-title": "Criada palavra-passe para o robô",
        "botpasswords-created-body": "A palavra-passe de robô para o robô \"$1\" do utilizador \"$2\" foi criada.",
-       "botpasswords-updated-title": "A palavra-passe de robô foi actualizada.",
+       "botpasswords-updated-title": "A palavra-passe de robô foi atualizada.",
        "botpasswords-updated-body": "O robô palavra-passe para o nome do robô \"$1\" do utilizador \"$2\" foi atualizado.",
        "botpasswords-deleted-title": "Palavra-passe de robô eliminada",
        "botpasswords-deleted-body": "O robô palavra-passe para o nome do robô \"$1\"do utilizador \"$2\" foi eliminado.",
-       "botpasswords-newpassword": "A nova palavra-passe para iniciar sessão com <strong>$1</strong> é <strong>$2</strong>. Por favor, recorde-se dela para futura referência.</em>",
+       "botpasswords-newpassword": "A nova palavra-passe para iniciar sessão com <strong>$1</strong> é <strong>$2</strong>. <em>Anote-a para referência futura, por favor.</em> <br> (Para robôs antigos cujo nome de acesso tenha de ser igual ao eventual nome de utilizador, também pode usar o nome de utilizador <strong>$3</strong> e a palavra-passe <strong>$4</strong>.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider não está disponível.",
-       "botpasswords-restriction-failed": "Restrições de senha de robô evitam esta autenticação.",
+       "botpasswords-restriction-failed": "Restrições de palavra-passe de robô evitam esta autenticação.",
        "botpasswords-invalid-name": "O nome de utilizador especificado não contém o separador de palavra-passe de robô (\"$1\").",
-       "botpasswords-not-exist": "O usuário \"$1\" não possui uma senha de robô \"$2\".",
+       "botpasswords-not-exist": "O utilizador \"$1\" não possui uma palavra-passe de robô \"$2\".",
        "resetpass_forbidden": "Não é possível alterar palavras-passe",
        "resetpass_forbidden-reason": "As palavras-passe não podem ser alteradas: $1",
        "resetpass-no-info": "Precisa de iniciar sessão para aceder diretamente a esta página.",
        "passwordreset-emailelement": "{{GENDER:$1|Utilizador|Utilizadora}}: \n$1\n\nPalavra-passe temporária: \n$2",
        "passwordreset-emailsentemail": "Se este é o endereço de correio eletrónico associado a esta conta, ser-lhe-á enviada uma palavra-passe de reposição.",
        "passwordreset-emailsentusername": "Se houver um endereço de correio eletrónico associado a esta conta, ser-lhe-á enviada uma mensagem para redefinir a sua palavra-passe.",
-       "passwordreset-emailsent-capture2": "A redefinição da senha {{PLURAL:$1|do e-mail|dos e-mails}} foi enviada. {{PLURAL:$1|O nome de usuário e senha|A lista de nomes de usuário e senhas}} encontram-se a seguir.",
-       "passwordreset-emailerror-capture2": "O envio do correio {{GENDER:$2|ao usuário|à usuária}} falhou: $1 {{PLURAL:$3|O nome de usuário e senha são mostradas abaixo|A lista de nomes de usuários e senhas é mostrada abaixo}}.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|A mensagem|As mensagens}} de redefinição da palavra-passe {{PLURAL:$1|foi enviada|foram enviadas}} para o seu correio eletrónico. {{PLURAL:$1|O nome de utilizador e palavra-passe encontram-se|A lista de nomes de utilizador e palavras-passe encontra-se}} a seguir.",
+       "passwordreset-emailerror-capture2": "O envio do correio {{GENDER:$2|ao utilizador|à utilizadora|a(o) utilizador(a)}} falhou: $1 {{PLURAL:$3|O nome de utilizador e palavra-passe são mostrados aqui|A lista de nomes de utilizador e palavras-passe é mostrada aqui}}.",
        "passwordreset-nocaller": "Um interlocutor deve ser fornecido",
        "passwordreset-nosuchcaller": "A pessoa que chama não existe: $1",
-       "passwordreset-ignored": "A reposição de palavra-passe não foi realizada. Talvez não tenha sido configurado o provedor?",
+       "passwordreset-ignored": "A reposição de palavra-passe não foi realizada. Talvez o fornecedor não tenha sido configurado?",
        "passwordreset-invalideamil": "Correio eletrónico inválido",
        "passwordreset-nodata": "Não foram fornecidos nome de utilizador(a) nem endereço de correio eletrónico",
        "changeemail": "Alterar ou remover o endereço de correio eletrónico",
        "explainconflict": "A página foi alterada por alguém desde que começou a editá-la.\nA caixa de texto abaixo mostra o texto existente neste momento.\nAs suas mudanças são mostradas na área ao fundo da página.\nTerá de reintegrar as suas mudanças no texto da caixa abaixo.\n'''Só''' o texto desta caixa será gravado quando clicar \"{{int:savearticle}}\".",
        "yourtext": "O seu texto",
        "storedversion": "Versão gravada",
-       "nonunicodebrowser": "'''Aviso: O seu navegador não é compatível com as especificações Unicode.\nFoi activado um sistema de edição alternativo que lhe permite editar as páginas com segurança: os caracteres não-ASCII aparecerão na caixa de edição no formato de códigos hexadecimais.'''",
+       "nonunicodebrowser": "<strong>Aviso: O seu navegador não é compatível com as especificações Unicode.</strong>\nFoi ativado um sistema de edição alternativo que lhe permite editar as páginas com segurança: os caracteres não-ASCII aparecerão na caixa de edição no formato de códigos hexadecimais.",
        "editingold": "'''Aviso: Está a editar uma revisão desatualizada desta página.'''\nSe gravar, todas as mudanças feitas a partir desta revisão serão perdidas.",
        "yourdiff": "Diferenças",
        "copyrightwarning": "Note, por favor, que todas as suas contribuições na {{SITENAME}} são consideradas publicadas nos termos da licença $2 (consulte $1 para mais detalhes).\nSe não deseja que o seu texto possa ser inexoravelmente editado e redistribuído, não o envie.\nGarante-nos também que isto é algo escrito por si, ou copiado do domínio público ou de outra fonte de teor livre.<br />\n'''Não envie conteúdos cujos direitos de autor estão protegidos, sem ter a devida permissão!'''",
        "invalid-content-data": "Dados de conteúdo inválidos",
        "content-not-allowed-here": "Conteúdo do tipo \"$1\" não é permitido na página [[$2]]",
        "editwarning-warning": "Sair desta página fará com que perca quaisquer alterações feitas por si.\nSe iniciou sessão, pode desativar este aviso na secção \"{{int:prefs-editing}}\" das suas preferências.",
+       "editpage-invalidcontentmodel-title": "Modelo de conteúdo não suportado",
+       "editpage-invalidcontentmodel-text": "O modelo de conteúdo \"$1\" não é suportado.",
        "editpage-notsupportedcontentformat-title": "Formato de conteúdo não suportado",
        "editpage-notsupportedcontentformat-text": "O formato de conteúdo $1 não é suportado pelo modelo de conteúdo $2.",
        "content-model-wikitext": "wikitexto",
        "content-json-empty-object": "Objeto vazio",
        "content-json-empty-array": "Matriz vazia",
        "deprecated-self-close-category": "Páginas com etiquetas HTML de autofechamento não válidas",
+       "deprecated-self-close-category-desc": "Esta página contém marcações HTML auto-fechadas, que são inválidas, tais como <code>&lt;b/></code> ou <code>&lt;span/></code>.  O comportamento destas tags será alterado em breve, para ser consistente com a especificação HTML5, pelo que o seu uso na notação wiki foi descontinuado.",
        "duplicate-args-warning": "<strong>Aviso:</strong> [[:$1]] chama [[:$2]] com mais de um valor para o parâmetro \"$3\". Somente o último valor fornecido será utilizado.",
        "duplicate-args-category": "Páginas com argumentos de predefinições duplicados",
        "duplicate-args-category-desc": "A página contém campos de predefinições que utilizam duplicatas de argumentos, tais como <code><nowiki>{{foo|bar=1|bar=2}}</nowiki></code> ou <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>.",
        "logdelete-selected": "{{PLURAL:$1|Evento do registo selecionado|Eventos do registo selecionados}}:",
        "revdelete-text-text": "Revisões eliminadas ainda aparecerão no histórico da página, mas parte do seu conteúdo estará inacessível para o público.",
        "revdelete-text-file": "Versões eliminadas do ficheiro ainda aparecerão no histórico da página, mas parte do seu conteúdo estará inacessível para o público.",
-       "logdelete-text": "Os eventos eliminados ainda aparecerão no histórico da página, mas pare de seu conteúdo será inacessível ao público.",
+       "logdelete-text": "Os eventos eliminados ainda aparecerão no histórico da página, mas parte do seu conteúdo será inacessível ao público.",
        "revdelete-text-others": "Outros administradores serão ainda capazes de aceder ao conteúdo oculto e torná-lo visível novamente, a menos que sejam definidas restrições adicionais.",
        "revdelete-confirm": "Por favor, confirme que pretende executar esta operação, que compreende as suas consequências e que o faz em concordância com as [[{{MediaWiki:Policy-url}}|políticas e recomendações]].",
        "revdelete-suppress-text": "A supressão '''só''' deverá ser usada nos seguintes casos:\n* Informação potencialmente caluniosa, difamatória ou injuriosa\n* Informação pessoal imprópria\n*: ''endereços de domicílio e números de telefone, números de identificação nacional, etc''",
        "revdelete-legend": "Definir restrições de visibilidade",
-       "revdelete-hide-text": "Revisão do texto",
+       "revdelete-hide-text": "Texto da revisão",
        "revdelete-hide-image": "Ocultar conteúdo do ficheiro",
        "revdelete-hide-name": "Ocultar destino e parâmetros",
        "revdelete-hide-comment": "Resumo da edição",
-       "revdelete-hide-user": "Nome de utilizador/endereço de IP",
+       "revdelete-hide-user": "Nome de utilizador/endereço IP",
        "revdelete-hide-restricted": "Ocultar dados dos administradores e de todos os outros",
        "revdelete-radio-same": "(manter)",
        "revdelete-radio-set": "Oculto",
        "mergehistory-fail-bad-timestamp": "Registo data/hora inválido",
        "mergehistory-fail-invalid-source": "Página de origem inválida.",
        "mergehistory-fail-invalid-dest": "Página de destino inválida.",
+       "mergehistory-fail-no-change": "A fusão de histórico não fundiu nenhuma revisão. Verifique os parâmetros de página e tempo, por favor.",
        "mergehistory-fail-permission": "Privilégios insuficientes para fundir os históricos.",
        "mergehistory-fail-self-merge": "As páginas de origem e de destino não podem ser a mesma.",
+       "mergehistory-fail-timestamps-overlap": "As revisões de origem sobrepõem ou são posteriores às revisões de destino.",
        "mergehistory-fail-toobig": "Não é possível fundir o histórico, já que um número de revisão(ões) acima do limite ($1 {{PLURAL:$1|revisão|revisões}}) seriam movidos.",
        "mergehistory-no-source": "A página de origem $1 não existe.",
        "mergehistory-no-destination": "A página de destino $1 não existe.",
        "right-purge": "Limpar a ''cache'' de uma página no servidor sem confirmação",
        "right-autoconfirmed": "Não ser afetado pelos limites de frequência baseados no número de IP",
        "right-bot": "Ser tratado como um processo automatizado",
-       "right-nominornewtalk": "Não despoletar o aviso de mensagens novas ao fazer edições menores a páginas de discussão",
+       "right-nominornewtalk": "Não desencadear o aviso de mensagens novas ao fazer edições menores a páginas de discussão",
        "right-apihighlimits": "Usar limites superiores nas consultas ''(queries)'' via API",
        "right-writeapi": "Usar a API de escrita",
        "right-delete": "Eliminar páginas",
        "right-edituserjs": "Editar os ficheiros JS de outros utilizadores",
        "right-editmyusercss": "Editar os seus próprios ficheiros CSS de utilizador",
        "right-editmyuserjs": "Editar os seus próprios ficheiros JavaScript de utilizador",
-       "right-viewmywatchlist": "Ver a sua lista de vigiados",
+       "right-viewmywatchlist": "Ver a sua lista de páginas vigiadas",
        "right-editmywatchlist": "Editar a sua própria lista de páginas vigiadas. Observe que algumas ações continuaram a adicionar páginas, mesmo sem este direito.",
        "right-viewmyprivateinfo": "Ver os seus próprios dados privados (ex.: endereço de correio eletrónico, nome real)",
        "right-editmyprivateinfo": "Editar os seus próprios dados privados (ex.: endereço de correio eletrónico, nome real)",
        "grant-generic": "Conjunto de direitos \"$1\"",
        "grant-group-page-interaction": "Interagir com páginas",
        "grant-group-file-interaction": "Interagir com conteúdo multimédia",
-       "grant-group-watchlist-interaction": "Interagir com a sua lista de vigiados",
+       "grant-group-watchlist-interaction": "Interagir com a sua lista de páginas vigiadas",
        "grant-group-email": "Enviar correio electrónico",
-       "grant-group-high-volume": "Realizar actividades em grande quantidade",
+       "grant-group-high-volume": "Realizar atividades em grande quantidade",
        "grant-group-customization": "Personalização e preferências",
        "grant-group-administration": "Executar acções administrativas",
        "grant-group-private-information": "Aceder aos seus dados privados",
-       "grant-group-other": "Actividade diversa",
+       "grant-group-other": "Atividades diversas",
        "grant-blockusers": "Bloquear e desbloquear utilizadores",
        "grant-createaccount": "Criar contas",
        "grant-createeditmovepage": "Criar, editar e mover páginas",
        "grant-editinterface": "Editar o domínio MediaWiki e o CSS/JavaScript do utilizador",
        "grant-editmycssjs": "Editar o seu CSS/JavaScript personalizado",
        "grant-editmyoptions": "Editar as suas preferências de utilizador",
-       "grant-editmywatchlist": "Editar a sua lista de vigiados",
+       "grant-editmywatchlist": "Editar a sua lista de páginas vigiadas",
        "grant-editpage": "Editar páginas existentes",
        "grant-editprotected": "Editar páginas protegidas",
        "grant-highvolume": "Alta quantidade de edições",
        "grant-oversight": "Ocultar utilizadores e edições suprimidas",
        "grant-patrol": "Patrulhar alterações a páginas",
+       "grant-privateinfo": "Aceder a informação privada",
        "grant-protect": "Proteger e desproteger páginas",
        "grant-rollback": "Reverter alterações a páginas",
        "grant-sendemail": "Enviar correio electrónico a outros utilizadores",
        "grant-uploadfile": "Carregar novos ficheiros",
        "grant-basic": "Direitos básicos",
        "grant-viewdeleted": "Ver páginas e ficheiros eliminados",
-       "grant-viewmywatchlist": "Ver a sua lista de vigiados",
+       "grant-viewmywatchlist": "Ver a sua lista de páginas vigiadas",
+       "grant-viewrestrictedlogs": "Ver entradas de registo restritas",
        "newuserlogpage": "Registo de criação de utilizadores",
        "newuserlogpagetext": "Este é um registo de novas contas de utilizador",
        "rightslog": "Registo de privilégios de utilizadores",
        "action-upload": "enviar este ficheiro",
        "action-reupload": "sobrescrever este ficheiro existente",
        "action-reupload-shared": "sobrepor este ficheiro num repositório partilhado",
-       "action-upload_by_url": "enviar este ficheiro através de uma URL",
+       "action-upload_by_url": "enviar este ficheiro através de um URL",
        "action-writeapi": "utilizar o modo de escrita da API",
        "action-delete": "eliminar esta página",
        "action-deleterevision": "eliminar esta edição",
        "action-managechangetags": "criar e (des)ativar etiquetas",
        "action-applychangetags": "aplicar etiquetas juntamente com as suas alterações",
        "action-changetags": "adicionar e remover etiquetas arbitrárias em revisões e entradas de registo individuais",
+       "action-deletechangetags": "eliminar etiquetas da base de dados",
        "action-purge": "recarregar esta página",
        "nchanges": "$1 {{PLURAL:$1|alteração|alterações}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|desde a última visita}}",
        "upload_directory_read_only": "O servidor de Internet não possui permissão de escrita no diretório de carregamento de ficheiros ($1).",
        "uploaderror": "Erro ao carregar",
        "upload-recreate-warning": "'''Aviso: Um ficheiro com esse nome foi eliminado ou movido.'''\n\nPara sua conveniência, é apresentado de seguida o registo de eliminação e de movimento da página:",
-       "uploadtext": "Utilize o formulário abaixo para fazer o carregamento de novos ficheiros.\nPara ver ou pesquisar ficheiros anteriormente enviados, consulte a [[Special:FileList|lista de ficheiros]].\nOs reenvios de um ficheiro são também registados no [[Special:Log/upload|registo de carregamentos]] e as eliminações no [[Special:Log/delete|registo de eliminações]].\n\nPara utilizar um ficheiro numa página, depois de ter feito o carregamento, insira uma ligação com um dos seguintes formatos:\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:ficheiro.jpg]]</nowiki></code>''' para mostrar uma imagem nas suas dimensões originais;\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:ficheiro.png|200px|thumb|left|texto]]</nowiki></code>''' para mostrar uma imagem com a dimensão horizontal de 200 pixeis, dentro de uma caixa, na margem esquerda, contendo 'texto' como descrição (pode usar subconjuntos destas características);\n* '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:ficheiro.ogg]]</nowiki></code>''' para apresentar uma ligação direta para o ficheiro em vez de mostrá-lo, quer este tenha por conteúdo uma imagem ou outros dados.",
+       "uploadtext": "Utilize o formulário abaixo para fazer o carregamento de novos ficheiros.\nPara ver ou pesquisar ficheiros anteriormente enviados, consulte a [[Special:FileList|lista de ficheiros]].\nOs reenvios de um ficheiro são também registados no [[Special:Log/upload|registo de carregamentos]] e as eliminações no [[Special:Log/delete|registo de eliminações]].\n\nPara utilizar um ficheiro numa página, depois de ter feito o carregamento, insira uma ligação com um dos seguintes formatos:\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:ficheiro.jpg]]</nowiki></code>''' para mostrar uma imagem nas suas dimensões originais;\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:ficheiro.png|200px|thumb|left|texto]]</nowiki></code>''' para mostrar uma imagem com a dimensão horizontal de 200 píxeis, dentro de uma caixa, na margem esquerda, contendo 'texto' como descrição (pode usar subconjuntos destas características);\n* '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:ficheiro.ogg]]</nowiki></code>''' para apresentar uma ligação direta para o ficheiro em vez de mostrá-lo, quer este tenha por conteúdo uma imagem ou outros dados.",
        "upload-permitted": "{{PLURAL:$2|Tipo|Tipos}} de ficheiro {{PLURAL:$2|permitido|permitidos}}: $1.",
        "upload-preferred": "{{PLURAL:$2|Tipo|Tipos}} de ficheiro {{PLURAL:$2|preferido|preferidos}}: $1.",
        "upload-prohibited": "{{PLURAL:$2|Tipo|Tipos}} de ficheiro {{PLURAL:$2|proibido|proibidos}}: $1.",
        "file-thumbnail-no": "O nome do ficheiro começa por <strong>$1</strong>.\nParece ser uma imagem de tamanho reduzido (uma ''miniatura'' ou ''thumbnail)''.\nSe tiver a imagem original de maior dimensão, envie-a em vez desta. Se não, altere o nome do ficheiro, por favor.",
        "fileexists-forbidden": "Já existe um ficheiro com este nome, e não pode ser reescrito.\nSe ainda pretende carregar o seu ficheiro volte atrás e use outro nome, por favor. [[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Já existe um ficheiro com este nome no repositório de ficheiros partilhados.\nCaso deseje, mesmo assim, carregar o seu ficheiro, volte atrás e envie-o com um novo nome. [[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "O ficheiro carregado é um duplicado exato da versão atual de <strong>[[:$1]]</strong>.",
+       "fileexists-duplicate-version": "O ficheiro carregado é um duplicado exato {{PLURAL:$2|de uma versão anterior|de uma das versões anteriores}} de <strong>[[:$1]]</strong>.",
        "file-exists-duplicate": "Este ficheiro é um duplicado {{PLURAL:$1|do seguinte|dos seguintes}}:",
        "file-deleted-duplicate": "Um ficheiro idêntico a este ([[:$1]]) foi eliminado anteriormente.\nVerifique o motivo da eliminação do ficheiro antes de prosseguir com o re-envio.",
        "file-deleted-duplicate-notitle": "Um ficheiro idêntico já foi eliminado e o seu título suprimido. Devia pedir a alguém capaz de ver os dados dos ficheiros eliminados para verificar a situação antes de carregá-lo novamente.",
        "uploaddisabledtext": "O carregamento de ficheiros está desativado.",
        "php-uploaddisabledtext": "O carregamento de ficheiros está desativado no PHP.\nVerifique a configuração file_uploads, por favor.",
        "uploadscripted": "Este ficheiro contém HTML ou código que pode ser erradamente interpretado por um navegador.",
-       "upload-scripted-pi-callback": "Não se podem carregar arquivos que contenham instruções de processamento de páginas de estilo XML",
+       "upload-scripted-pi-callback": "Não é possível carregar ficheiros que contenham instruções de processamento de páginas de estilo XML.",
        "uploaded-script-svg": "Encontrou um elemento scriptable no ficheiro \"$1\" SVG carregado.",
-       "uploaded-hostile-svg": "Encontrou-se um código CSS não seguro no elemento de estilo do arquivo SVG carregado.",
-       "uploaded-event-handler-on-svg": "Não está permitido configurar atributos controladores de eventos <code>$1=\"$2\"</code> nos arquivos SVG.",
-       "uploaded-image-filter-svg": "Foi encontrado um filtro de imagem com a URL: <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG carregado.",
+       "uploaded-hostile-svg": "Encontrou-se um código CSS não seguro no elemento de estilo do ficheiro SVG carregado.",
+       "uploaded-event-handler-on-svg": "Não á permitido configurar atributos controladores de eventos <code>$1=\"$2\"</code> nos ficheiros SVG.",
+       "uploaded-href-attribute-svg": "Os atributos <code>href</code> em ficheiros SVG só estão autorizados a ligar a endereços http:// ou https://, mas foi encontrado <code>&lt;$1 $2=\"$3\"&gt;</code>.",
+       "uploaded-href-unsafe-target-svg": "Detetado <code>href</code> para dados inseguros: alvo URI <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG carregado.",
+       "uploaded-animate-svg": "Foi detetado um elemento \"animate\" que pode estar a alterar <code>href</code>, usando o atributo \"from\" <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG carregado.",
+       "uploaded-setting-event-handler-svg": "A definição de atributos controladores de eventos está bloqueada. Foi detetado <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG carregado.",
+       "uploaded-setting-href-svg": "O uso da tag \"set\" para adicionar o atributo \"href\" ao elemento mãe está bloqueado.",
+       "uploaded-wrong-setting-svg": "O uso da tag \"set\" para adicionar um destino remoto/de dados/<i>script</i> a qualquer atributo está bloqueado. No ficheiro SVG enviado foi encontrado <code>&lt;set to=\"$1\"&gt;</code>.",
+       "uploaded-setting-handler-svg": "A configuração do atributo \"handler\" com destino remoto/de dados/<i>script</i> em ficheiros SVG está bloqueada. Foi detetado <code>$1=\"$2\"</code> no ficheiro SVG carregado.",
+       "uploaded-remote-url-svg": "A configuração de qualquer atributo de estilo com um URL remoto em ficheiros SVG está bloqueada. Foi detetado <code>$1=\"$2\"</code> no ficheiro SVG carregado.",
+       "uploaded-image-filter-svg": "Foi encontrado um filtro de imagem com o URL: <code>&lt;$1 $2=\"$3\"&gt;</code> no ficheiro SVG carregado.",
        "uploadscriptednamespace": "Este ficheiro SVG contém um domínio que não é permitido \"$1\".",
        "uploadinvalidxml": "Erro detectado na análise do XML do ficheiro carregado.",
        "uploadvirus": "O ficheiro contém um vírus! \nDetalhes: $1",
        "upload-file-error-text": "Ocorreu um erro interno ao tentar criar um ficheiro temporário no servidor.\nContacte um [[Special:ListUsers/sysop|administrador]], por favor.",
        "upload-misc-error": "Erro de carregamento desconhecido",
        "upload-misc-error-text": "Ocorreu um erro desconhecido durante o envio.\nVerifique se o endereço (URL) é válido e acessível e tente novamente.\nCaso o problema persista, contacte um [[Special:ListUsers/sysop|administrador]].",
-       "upload-too-many-redirects": "A URL continha demasiados redirecionamentos",
+       "upload-too-many-redirects": "O URL continha demasiados redirecionamentos",
        "upload-http-error": "Ocorreu um erro HTTP: $1",
        "upload-copy-upload-invalid-domain": "Não é possível realizar carregamentos remotos neste domínio.",
        "upload-foreign-cant-upload": "Esta wiki não está configurada para carregar ficheiros para o repositório externo solicitado.",
+       "upload-foreign-cant-load-config": "Não foi possível inserir a configuração de carregamento de ficheiros no repositório externo.",
+       "upload-dialog-disabled": "O carregamento de ficheiros através deste diálogo está desativado na wiki.",
        "upload-dialog-title": "Carregar ficheiro",
        "upload-dialog-button-cancel": "Cancelar",
+       "upload-dialog-button-back": "Voltar",
        "upload-dialog-button-done": "Feito",
        "upload-dialog-button-save": "Gravar",
        "upload-dialog-button-upload": "Carregar",
        "upload-form-label-infoform-title": "Detalhes",
        "upload-form-label-infoform-name": "Nome",
+       "upload-form-label-infoform-name-tooltip": "Um título descritivo e único para ser usado como nome do ficheiro. Pode usar linguagem normal e espaços. Não inclua a extensão do ficheiro.",
        "upload-form-label-infoform-description": "Descrição",
+       "upload-form-label-infoform-description-tooltip": "Descreva de forma breve todos os elementos notórios sobre o trabalho.\nPara uma fotografia, mencione os principais destaques, a ocasião ou o lugar.",
        "upload-form-label-usage-title": "Uso",
        "upload-form-label-usage-filename": "Nome do ficheiro",
        "upload-form-label-own-work": "Este é minha obra própria",
        "uploadstash-errclear": "Não foi possível apagar os ficheiros.",
        "uploadstash-refresh": "Atualizar a lista de ficheiros",
        "uploadstash-thumbnail": "ver miniatura",
+       "uploadstash-exception": "Não foi possível gravar o carregamento na área de ficheiros escondidos ($1): \"$2\".",
        "invalid-chunk-offset": "Deslocamento de fragmento inválido",
        "img-auth-accessdenied": "Acesso negado",
        "img-auth-nopathinfo": "PATH_INFO em falta.\nO seu servidor não está configurado para passar esta informação.\nPode ser baseado em CGI e não consegue suportar img_auth.\nConsulte a documentação em https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization.",
        "img-auth-streaming": "A fazer a transmissão de \"$1\".",
        "img-auth-public": "A função do img_auth.php é produzir ficheiros a partir de uma wiki privada.\nEsta wiki está configurada como uma wiki pública.\nPara optimizar a segurança, o img_auth.php está impossibilitado de executar.",
        "img-auth-noread": "O utilizador não tem acesso de leitura ao ficheiro \"$1\".",
-       "http-invalid-url": "URL inválida: $1",
-       "http-invalid-scheme": "URL iniciadas pelo prefixo \"$1\" não são aceites.",
+       "http-invalid-url": "URL inválido: $1",
+       "http-invalid-scheme": "URL iniciados pelo prefixo \"$1\" não são aceites.",
        "http-request-error": "O pedido HTTP falhou devido a um erro desconhecido.",
        "http-read-error": "Erro de leitura HTTP.",
        "http-timed-out": "O pedido HTTP expirou.",
-       "http-curl-error": "Ocorreu um erro ao aceder à URL: $1",
+       "http-curl-error": "Ocorreu um erro ao aceder ao URL: $1",
        "http-bad-status": "Ocorreu um problema durante o pedido HTTP: $1 $2",
-       "upload-curl-error6": "Não foi possível aceder à URL",
-       "upload-curl-error6-text": "Não foi possível aceder à URL.\nVerifique se o endereço está correto e o sítio disponível, por favor.",
+       "upload-curl-error6": "Não foi possível aceder ao URL",
+       "upload-curl-error6-text": "Não foi possível aceder ao URL.\nVerifique se o endereço está correto e o sítio disponível, por favor.",
        "upload-curl-error28": "Tempo limite para o envio do ficheiro excedido",
        "upload-curl-error28-text": "O sítio demorou muito tempo a responder. Verifique que o sítio está disponível, aguarde alguns momentos e tente novamente, por favor. Talvez queira tentar num horário menos congestionado.",
        "license": "Licença:",
        "nolicense": "Nenhuma selecionada",
        "licenses-edit": "Editar opções de licença",
        "license-nopreview": "(Antevisão indisponível)",
-       "upload_source_url": "(um ficheiro de uma URL válida, publicamente acessível)",
+       "upload_source_url": "(um ficheiro de um URL válido, publicamente acessível)",
        "upload_source_file": "(um ficheiro no seu computador)",
        "listfiles-delete": "eliminar",
        "listfiles-summary": "Esta página especial mostra todos os ficheiros carregados.",
        "filerevert-submit": "Reverter",
        "filerevert-success": "'''[[Media:$1|$1]]''' foi revertida para a [$4 versão das $3 de $2].",
        "filerevert-badversion": "Não há uma versão local anterior deste ficheiro no período de tempo especificado.",
+       "filerevert-identical": "A versão atual do ficheiro já é idêntica à selecionada.",
        "filedelete": "Eliminar $1",
        "filedelete-legend": "Eliminar ficheiro",
        "filedelete-intro": "Está prestes a eliminar o ficheiro '''[[Media:$1|$1]]''' e todo o seu histórico.",
        "filedelete-success": "'''$1''' foi eliminado.",
        "filedelete-success-old": "A versão de '''[[Media:$1|$1]]''' tal como $3, $2 foi eliminada.",
        "filedelete-nofile": "'''$1''' não existe.",
-       "filedelete-nofile-old": "Não há nenhuma versão de '''$1''' em arquivo com os parâmetros especificados.",
+       "filedelete-nofile-old": "Não há nenhuma versão de <strong>$1</strong> em arquivo com os atributos especificados.",
        "filedelete-otherreason": "Outro/motivo adicional:",
        "filedelete-reason-otherlist": "Outro motivo",
        "filedelete-reason-dropdown": "*Motivos comuns para eliminação\n** Violação de direitos de autor\n** Ficheiro duplicado",
        "ancientpages": "Páginas mais antigas",
        "move": "Mover",
        "movethispage": "Mover esta página",
-       "unusedimagestext": "Os seguintes ficheiros existem mas não são usados na wiki.\nNo entanto, outros sítios na Internet podem ter ligação para um ficheiro através de uma URL direta e, por isso, podem estar listados ficheiros que estão a ser ativamente usados por entidades externas.",
+       "unusedimagestext": "Os seguintes ficheiros existem mas não são usados na wiki.\nNo entanto, outros sítios na Internet podem ter ligação para um ficheiro através de um URL direto e, por isso, podem estar listados ficheiros que estão a ser ativamente usados por entidades externas.",
        "unusedcategoriestext": "As seguintes categorias existem, embora nenhuma página ou categoria faça uso delas.",
        "notargettitle": "Sem alvo",
        "notargettext": "Especifique sobre que página alvo ou utilizador pretende executar esta função.",
        "apihelp": "Ajuda API",
        "apihelp-no-such-module": "Módulo \"$1\" não encontrado.",
        "apisandbox": "Testes da API",
+       "apisandbox-jsonly": "Para usar a área de testes da API é necessário o JavaScript.",
        "apisandbox-api-disabled": "A API está desativada neste site.",
        "apisandbox-intro": "Use esta página para fazer experiências com a <strong>API de serviços da web do MediaWiki</strong>.\nConsulte a [[mw:API:Main page|documentação da API]] para informações sobre o uso da API. Exemplo: [https://www.mediawiki.org/wiki/API#A_simple_example obter o conteúdo da Página Principal]. Selecione uma operação para ver mais exemplos.\n\nNote que, embora esta seja uma área de testes, as operações que executar nesta página podem modificar a wiki.",
        "apisandbox-fullscreen": "Expandir painel",
        "apisandbox-fullscreen-tooltip": "Expandir o painel da página de testes para preencher a janela do navegador.",
        "apisandbox-unfullscreen": "Mostrar página",
+       "apisandbox-unfullscreen-tooltip": "Reduza o painel da área de testes, para que as ligações de navegação estejam disponíveis.",
        "apisandbox-submit": "Fazer o pedido",
        "apisandbox-reset": "Limpar",
        "apisandbox-retry": "Tentar novamente",
        "apisandbox-results": "Resultados",
        "apisandbox-sending-request": "A enviar solicitação de API...",
        "apisandbox-loading-results": "A receber resultados da API...",
+       "apisandbox-results-error": "Ocorreu um erro ao carregar a resposta à consulta por API: $1",
        "apisandbox-request-url-label": "URL do pedido:",
        "apisandbox-request-time": "Tempo de processamento: {{PLURAL:$1|$1 ms}}",
        "apisandbox-results-fixtoken": "Corrija o identificador e volte a submete-lo",
        "apisandbox-results-fixtoken-fail": "Não foi possível obter o identificador \"$1\".",
        "apisandbox-alert-page": "Os campos nesta página não são válidos.",
        "apisandbox-alert-field": "O valor deste campo não é válido.",
+       "apisandbox-continue": "Continuar",
+       "apisandbox-continue-clear": "Limpar",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries continuará] o último pedido; {{int:apisandbox-continue-clear}} limpará os parâmetros relativos à continuação.",
        "booksources": "Fontes bibliográficas",
        "booksources-search-legend": "Pesquisar referências bibliográficas",
        "booksources-search": "Pesquisar",
        "listgrouprights-namespaceprotection-namespace": "Domínio",
        "listgrouprights-namespaceprotection-restrictedto": "Direito(s) do utilizador para editar",
        "listgrants": "Atribuições",
-       "listgrants-summary": "Esta é uma lista de atribuições com os respetivos acessos às permissões de utilizador. Os utilizadores podem autorizar aplicações a utilizar suas contas, mas com permissões limitadas baseadas nas atribuições dadas pelos utilizadores a cada aplicação. No entanto, uma aplicação agindo em nome de um utilizador não pode utilizar permissões que o utilizador não possui.\nPode haver [[{{MediaWiki:Listgrouprights-helppage}}|informação adicional]] sobre permissões individuais.",
+       "listgrants-summary": "Esta é uma lista de atribuições com os respetivos acessos às permissões de utilizador. Os utilizadores podem autorizar aplicações a utilizar as suas contas, mas com permissões limitadas baseadas nas atribuições dadas pelos utilizadores a cada aplicação. No entanto, uma aplicação que age em nome de um utilizador não pode utilizar permissões que o utilizador não possui.\nPode haver [[{{MediaWiki:Listgrouprights-helppage}}|informação adicional]] sobre as permissões individuais.",
        "listgrants-grant": "Atribuição",
        "listgrants-rights": "Direitos",
        "trackingcategories": "Categorias de monitorização",
-       "trackingcategories-summary": "Esta página lista as categorias monitoradas que foram geradas automaticamente pelo software MediaWiki. Os seus nomes podem ser alterados ao editar sua mensagem correspondente no domínio {{ns:8}}.",
+       "trackingcategories-summary": "Esta página lista as categorias de monitorização geradas automaticamente pelo software MediaWiki. Os nomes das categorias podem ser alterados modificando as mensagens de sistema relevantes no domínio {{ns:8}}.",
        "trackingcategories-msg": "Categoria monitorada",
        "trackingcategories-name": "Nome da mensagem",
        "trackingcategories-desc": "Critérios de inclusão",
        "restricted-displaytitle-ignored": "Páginas com títulos de exibição ignorados",
        "restricted-displaytitle-ignored-desc": "Esta página tem um <code><nowiki>{{DISPLAYTITLE}}</nowiki></code> ignorado porque não é equivalente ao título verdadeiro da página.",
-       "noindex-category-desc": "A página não é indexada por robôs porque contém a palavra mágica <code><nowiki>__NOINDEX__</nowiki></code> e está num domínio onde o estatuto é permitido.",
+       "noindex-category-desc": "A página não é indexada por robôs porque contém a palavra mágica <code><nowiki>__NOINDEX__</nowiki></code> e está num domínio onde esta palavra mágica é permitida.",
        "index-category-desc": "A página contém a palavra mágica <code><nowiki>__INDEX__</nowiki></code> (e está num domínio em que essa marca é permitida) e, portanto, será indexada pelos robôs mesmo quando normalmente não o seria.",
        "post-expand-template-inclusion-category-desc": "O tamanho da página é superior a <code>$wgMaxArticleSize</code>, após a expansão de todas as predefinições, pelo que algumas predefinições não foram expandidas.",
        "post-expand-template-argument-category-desc": "O tamanho da página é superior a <code>$wgMaxArticleSize</code>, após a expansão de um argumento de predefinição (algo em chavetas triplas, como <code>{{{Foo}}}</code>).",
        "undeletehistorynoadmin": "Esta página foi eliminada. O motivo de eliminação é apresentado no sumário abaixo, junto dos detalhes do utilizador que editou esta página antes de eliminar. O texto atual destas edições eliminadas encontra-se agora apenas disponível para administradores.",
        "undelete-revision": "Edição eliminada da página $1 (das $5 de $4), por $3:",
        "undeleterevision-missing": "Edição inválida ou não encontrada.\nPode ter usado uma ligação incorreta ou talvez a revisão tenha sido restaurada ou removida do arquivo.",
+       "undeleterevision-duplicate-revid": "Não foi possível restaurar {{PLURAL:$1|uma revisão|$1 revisões}}, porque {{PLURAL:$1|a sua <code>rev_id</code> já estava a ser usada|as respetivas <code>rev_id</code> já estavam a ser usadas}}.",
        "undelete-nodiff": "Não foram encontradas edições anteriores.",
        "undeletebtn": "Restaurar",
        "undeletelink": "ver/restaurar",
        "whatlinkshere-hideredirs": "$1 redirecionamentos",
        "whatlinkshere-hidetrans": "$1 transclusões",
        "whatlinkshere-hidelinks": "$1 ligações",
-       "whatlinkshere-hideimages": "$1 links para arquivos",
+       "whatlinkshere-hideimages": "$1 ligações para ficheiros",
        "whatlinkshere-filters": "Filtros",
        "whatlinkshere-submit": "Ir",
        "autoblockid": "Bloqueio automático nº$1",
        "movelogpagetext": "Abaixo encontra-se uma lista de páginas movidas.",
        "movesubpage": "{{PLURAL:$1|Subpágina|Subpáginas}}",
        "movesubpagetext": "Esta página tem $1 {{PLURAL:$1|subpágina mostrada|subpáginas mostradas}} abaixo.",
+       "movesubpagetalktext": "A página de discussão correspondente tem $1 {{PLURAL:$1|subpágina|subpáginas}}, mostradas abaixo.",
        "movenosubpage": "Esta página não tem subpáginas.",
        "movereason": "Motivo:",
        "revertmove": "reverter",
        "tooltip-ca-talk": "Discussão sobre o conteúdo da página",
        "tooltip-ca-edit": "Editar esta página",
        "tooltip-ca-addsection": "Iniciar uma nova secção",
-       "tooltip-ca-viewsource": "Esta página está protegida.\nApenas pode visualizar o seu conteúdo",
+       "tooltip-ca-viewsource": "Esta página está protegida.\nSó pode ver o conteúdo.",
        "tooltip-ca-history": "Edições anteriores desta página.",
        "tooltip-ca-protect": "Proteger esta página",
        "tooltip-ca-unprotect": "Alterar a proteção desta página",
        "tooltip-compareselectedversions": "Ver as diferenças entre as duas versões selecionadas desta página.",
        "tooltip-watch": "Adicionar esta página à lista de páginas vigiadas",
        "tooltip-watchlistedit-normal-submit": "Remover títulos",
-       "tooltip-watchlistedit-raw-submit": "Atualizar a lista de vigiados",
+       "tooltip-watchlistedit-raw-submit": "Atualizar a lista de páginas vigiadas",
        "tooltip-recreate": "Recriar a página apesar de ter sido eliminada",
        "tooltip-upload": "Iniciar o carregamento",
        "tooltip-rollback": "\"{{int:rollbacklink}}\" reverte, com um só clique, as edições do último editor desta página.",
        "nocredits": "Não há informação disponível sobre os créditos desta página.",
        "spamprotectiontitle": "Filtro de proteção contra spam",
        "spamprotectiontext": "A página que deseja gravar foi bloqueada pelo filtro de ''spam''.\nEste bloqueio foi provavelmente causado por uma ligação para um sítio externo que consta da lista negra.",
-       "spamprotectionmatch": "O seguinte texto activou o filtro de spam: $1",
+       "spamprotectionmatch": "O seguinte texto ativou o filtro de <i>spam</i>: $1",
        "spambot_username": "MediaWiki limpeza de spam",
        "spam_reverting": "A reverter para a última revisão que não contém ligação para $1",
        "spam_blanking": "Todas as revisões continham ligações para $1; a esvaziar",
        "pageinfo-article-id": "ID da página",
        "pageinfo-language": "Idioma do conteúdo da página",
        "pageinfo-content-model": "Modelo de conteúdo de página",
+       "pageinfo-content-model-change": "alterar",
        "pageinfo-robot-policy": "Indexação por robôs",
        "pageinfo-robot-index": "Permitida",
        "pageinfo-robot-noindex": "Não permitida",
        "pageinfo-redirectsto-info": "informação",
        "pageinfo-contentpage": "Contada como página de conteúdo",
        "pageinfo-contentpage-yes": "Sim",
-       "pageinfo-protect-cascading": "A protecção é em cascata a partir daqui",
+       "pageinfo-protect-cascading": "A proteção é em cascata a partir daqui",
        "pageinfo-protect-cascading-yes": "Sim",
        "pageinfo-protect-cascading-from": "As proteções são em cascata a partir de",
        "pageinfo-category-info": "Informações da categoria",
        "pageinfo-category-pages": "Número de páginas",
        "pageinfo-category-subcats": "Número de subcategorias",
        "pageinfo-category-files": "Número de ficheiros",
+       "pageinfo-user-id": "Identificador do utilizador",
        "markaspatrolleddiff": "Marcar como patrulhada",
        "markaspatrolledtext": "Marcar esta página como patrulhada",
        "markaspatrolledtext-file": "Marcar esta versão do ficheiro como patrulhada",
        "thumbsize": "Tamanho da miniatura:",
        "widthheightpage": "$1 × $2, $3 {{PLURAL:$3|página|páginas}}",
        "file-info": "tamanho: $1, tipo MIME: $2",
-       "file-info-size": "$1 × $2 pixels, tamanho: $3, tipo MIME: $4",
-       "file-info-size-pages": "$1 × $2 pixels, tamanho do ficheiro: $3, tipo MIME: $4, $5 {{PLURAL:$5|página|páginas}}",
+       "file-info-size": "$1 × $2 píxeis, tamanho: $3, tipo MIME: $4",
+       "file-info-size-pages": "$1 × $2 píxeis, tamanho do ficheiro: $3, tipo MIME: $4, $5 {{PLURAL:$5|página|páginas}}",
        "file-nohires": "Sem resolução maior disponível.",
-       "svg-long-desc": "ficheiro SVG, de $1 × $2 pixels, tamanho: $3",
-       "svg-long-desc-animated": "ficheiro SVG animado, de $1 × $2 pixels, tamanho: $3",
+       "svg-long-desc": "ficheiro SVG, de $1 × $2 píxeis, tamanho: $3",
+       "svg-long-desc-animated": "ficheiro SVG animado, de $1 × $2 píxeis, tamanho: $3",
        "svg-long-error": "Ficheiro SVG inválido: $1",
        "show-big-image": "Ficheiro original",
        "show-big-image-preview": "Tamanho desta antevisão: $1.",
        "show-big-image-preview-differ": "Tamanho desta antevisão em $3 do ficheiro $2: $1",
        "show-big-image-other": "{{PLURAL:$2|Outra resolução|Outras resoluções}}: $1.",
-       "show-big-image-size": "$1 × $2 pixels",
+       "show-big-image-size": "$1 × $2 píxeis",
        "file-info-gif-looped": "cíclico",
        "file-info-gif-frames": "$1 {{PLURAL:$1|quadro|quadros}}",
        "file-info-png-looped": "ciclo infinito",
        "newimages-showbots": "Mostrar carregamentos feitos por robôs",
        "newimages-hidepatrolled": "Ocultar carregamentos patrulhados",
        "noimages": "Nada para ver.",
+       "gallery-slideshow-toggle": "Alternar miniaturas",
        "ilsubmit": "Pesquisar",
        "bydate": "por data",
        "sp-newimages-showfrom": "Mostrar novos ficheiros a partir das $2 de $1",
        "exif-imagelength": "Altura",
        "exif-bitspersample": "Bits por componente",
        "exif-compression": "Esquema de compressão",
-       "exif-photometricinterpretation": "Composição pixel",
+       "exif-photometricinterpretation": "Composição do píxel",
        "exif-orientation": "Orientação",
        "exif-samplesperpixel": "Número de componentes",
        "exif-planarconfiguration": "Arranjo de dados",
        "monthsall": "todos",
        "confirmemail": "Confirmar endereço de correio eletrónico",
        "confirmemail_noemail": "Não tem um endereço de correio eletrónico válido nas suas [[Special:Preferences|preferências de utilizador]].",
-       "confirmemail_text": "{{SITENAME}} requer que valide o seu endereço de correio eletrónico antes de usar as funcionalidades de correio.\nClique o botão abaixo para enviar uma mensagem de confirmação para o seu endereço.\nA mensagem incluirá uma URL que contém um código;\ninsira a URL no seu navegador para confirmar que o seu endereço de correio eletrónico é válido.",
+       "confirmemail_text": "{{SITENAME}} requer que valide o seu endereço de correio eletrónico antes de usar as funcionalidades de correio.\nClique o botão abaixo para enviar uma mensagem de confirmação para o seu endereço.\nA mensagem incluirá um URL que contém um código;\ninsira o URL no seu navegador para confirmar que o seu endereço de correio eletrónico é válido.",
        "confirmemail_pending": "Um código de confirmação já lhe foi enviado;\ncaso tenha criado a conta recentemente, é recomendado que aguarde alguns minutos até o receber antes de tentar pedir um novo código.",
        "confirmemail_send": "Enviar código de confirmação",
        "confirmemail_sent": "Correio de confirmação enviado.",
        "confirmemail_success": "O seu endereço de correio eletrónico foi confirmado.\nPode agora [[Special:UserLogin|autenticar-se]] e desfrutar da wiki.",
        "confirmemail_loggedin": "O seu endereço de correio eletrónico foi confirmado.",
        "confirmemail_subject": "Confirmação de endereço de correio eletrónico da {{SITENAME}}",
-       "confirmemail_body": "Alguém, provavelmente você a partir do endereço IP $1,\nregistou uma conta \"$2\" com este endereço de correio electrónico em {{SITENAME}}.\n\nPara confirmar que esta conta é realmente sua e activar\nas funcionalidades de correio electrónico em {{SITENAME}}, abra a seguinte ligação no seu navegador:\n\n$3\n\nSe a conta *não* é sua, abra a seguinte ligação para cancelar a confirmação do endereço de correio electrónico:\n\n$5\n\nEste código de confirmação expira a $4.",
+       "confirmemail_body": "Alguém, provavelmente você a partir do endereço IP $1,\nregistou uma conta \"$2\" com este endereço de correio eletrónico em {{SITENAME}}.\n\nPara confirmar que esta conta é realmente sua e ativar\nas funcionalidades de correio eletrónico em {{SITENAME}}, abra a seguinte ligação no seu navegador:\n\n$3\n\nSe a conta *não* é sua, abra a seguinte ligação para cancelar a confirmação do endereço de correio eletrónico:\n\n$5\n\nEste código de confirmação expira a $4.",
        "confirmemail_body_changed": "Alguém, provavelmente você a partir do endereço IP $1,\nalterou o endereço de correio eletrónico da conta \"$2\" para este em {{SITENAME}}.\n\nPara confirmar que esta conta é realmente sua e reativar\nas funcionalidades de correio eletrónico em {{SITENAME}},\nabra o seguinte ligação no seu navegador:\n\n$3\n\nCaso a conta *não* lhe pertença, abra a seguinte ligação\npara cancelar a confirmação do endereço de correio eletrónico:\n\n$5\n\nEste código de confirmação expira a $4.",
        "confirmemail_body_set": "Alguém, provavelmente você a partir do endereço IP $1,\ndefiniu o seu endereço de correio eletrónico como correio da conta \"$2\" em {{SITENAME}}.\n\nPara confirmar que esta conta é realmente sua e reativar\nas funcionalidades de correio eletrónico em {{SITENAME}},\nabra a seguinte ligação no seu navegador:\n\n$3\n\nCaso a conta *não* lhe pertença, abra a seguinte ligação\npara cancelar a confirmação do endereço de correio eletrónico:\n\n$5\n\nEste código de confirmação expira a $4.",
        "confirmemail_invalidated": "Confirmação de endereço de correio eletrónico cancelada",
        "scarytranscludedisabled": "[Transclusão interwikis foi impossibilitada]",
        "scarytranscludefailed": "[Não foi possível obter a predefinição a partir de $1]",
        "scarytranscludefailed-httpstatus": "[Não foi possível obter a predefinição a partir de $1: HTTP $2]",
-       "scarytranscludetoolong": "[URL longa demais]",
+       "scarytranscludetoolong": "[O URL é demasiado longo]",
        "deletedwhileediting": "<strong>AVISO:</strong> Esta página foi eliminada depois de ter começado a editá-la!",
-       "confirmrecreate": "Depois de ter começado a editar esta página, {{GENDER:$2|o utilizador|a utilizadora|o(a) utilizador(a)}} [[User:$1|$1]] ([[User talk:$1|discussão]]) eliminou-a pelo seguinte motivo:\n: <em>$2</em>\nPor favor, confirme que quer realmente recriar esta página.",
+       "confirmrecreate": "Depois de ter começado a editar esta página, {{GENDER:$1|o utilizador|a utilizadora|o(a) utilizador(a)}} [[User:$1|$1]] ([[User talk:$1|discussão]]) eliminou-a pelo seguinte motivo:\n: <em>$2</em>\nPor favor, confirme que quer realmente recriar esta página.",
        "confirmrecreate-noreason": "{{GENDER:$1|O utilizador|A utilizadora|O(a) utilizador(a)}} [[User:$1|$1]] ([[User talk:$1|discussão]]) eliminou esta página depois de ter começado a editá-la. Confirme que deseja recriar a página, por favor.",
        "recreate": "Recriar",
        "confirm_purge_button": "OK",
        "version-license-not-found": "Não foi encontrada informação detalhada da licença para esta extensão.",
        "version-credits-title": "Créditos de autoria da extensão $1",
        "version-credits-not-found": "Não foi encontrada informação detalhada dos créditos para esta extensão.",
-       "version-poweredby-credits": "Este é um wiki <strong>[https://www.mediawiki.org/ MediaWiki]</strong>, copyright © 2001-$1 $2.",
+       "version-poweredby-credits": "Esta é uma wiki <strong>[https://www.mediawiki.org/ MediaWiki]</strong>, copyright © 2001-$1 $2.",
        "version-poweredby-others": "outros",
        "version-poweredby-translators": "os tradutores da translatewiki.net",
        "version-credits-summary": "Gostaríamos de reconhecer as seguintes pessoas pela sua contribuição para o [[Special:Version|MediaWiki]].",
        "version-libraries-description": "Descrição",
        "version-libraries-authors": "Autores",
        "redirect": "Redirecionar por ficheiro, utilizador, página, revisão, ou ID de registo",
-       "redirect-summary": "Esta página especial redireciona para um ficheiro (dado o nome do ficheiro), para uma página (dado um ID de revisão ou página) ou para uma página de utilizador (dado um ID numérico do utilizador), ou para uma entrada do registo (dado o ID do registo). Utilização: [[{{#Special:Redirect}}/file/Example.jpg]], \n[[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]], [[{{#Special:Redirect}}/user/101]], ou [[{{#Special:Redirect}}/logid/186]].",
+       "redirect-summary": "Esta página especial redireciona para um ficheiro (dado o nome do ficheiro), para uma página (dado um ID de revisão ou página), para uma página de utilizador (dado um ID numérico do utilizador) ou para uma entrada do registo (dado o ID do registo). Utilização: [[{{#Special:Redirect}}/file/Example.jpg]], \n[[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]], [[{{#Special:Redirect}}/user/101]], ou [[{{#Special:Redirect}}/logid/186]].",
        "redirect-submit": "Ir",
        "redirect-lookup": "Pesquisa:",
        "redirect-value": "Valor:",
        "fileduplicatesearch-summary": "Procure ficheiros duplicados tendo por base o seu resumo criptográfico.",
        "fileduplicatesearch-filename": "Ficheiro:",
        "fileduplicatesearch-submit": "Pesquisar",
-       "fileduplicatesearch-info": "$1 × $2 pixels<br />Tamanho: $3<br />tipo MIME: $4",
+       "fileduplicatesearch-info": "$1 × $2 píxeis<br />Tamanho: $3<br />tipo MIME: $4",
        "fileduplicatesearch-result-1": "O ficheiro \"$1\" não possui cópias idênticas.",
        "fileduplicatesearch-result-n": "O ficheiro \"$1\" possui {{PLURAL:$2|uma cópia idêntica|$2 cópias idênticas}}.",
        "fileduplicatesearch-noresults": "Não foi encontrado nenhum ficheiro com o nome \"$1\".",
        "specialpages-group-developer": "Ferramentas de desenvolvimento",
        "blankpage": "Página em branco",
        "intentionallyblankpage": "Esta página foi intencionalmente deixada em branco",
-       "external_image_whitelist": " # Deixe esta linha exatamente como ela está<pre>\n# Coloque fragmentos de expressões regulares (apenas a parte entre //) abaixo\n# Estas serão comparadas com as URL das imagens externas (com ligação direta)\n# As que corresponderem serão apresentadas como imagens, caso contrário apenas será apresentado um link para a imagem\n# As linhas que começam com um símbolo de cardinal (#) são tratadas como comentários\n# Esta lista não distingue maiúsculas de minúsculas\n\n# Coloque todos os fragmentos de expressões regulares (regex) acima desta linha. Deixe esta linha exatamente como ela está</pre>",
+       "external_image_whitelist": " # Deixe esta linha exatamente como ela está<pre>\n# Coloque fragmentos de expressões regulares (apenas a parte entre //) abaixo\n# Estas serão comparadas com os URL das imagens externas (com ligação direta)\n# As que corresponderem serão apresentadas como imagens, caso contrário apenas será apresentado um link para a imagem\n# As linhas que começam com um símbolo de cardinal (#) são tratadas como comentários\n# Esta lista não distingue maiúsculas de minúsculas\n\n# Coloque todos os fragmentos de expressões regulares (regex) acima desta linha. Deixe esta linha exatamente como ela está</pre>",
        "tags": "Etiquetas de modificação válidas",
        "tag-filter": "Filtro de [[Special:Tags|etiquetas]]:",
        "tag-filter-submit": "Filtrar",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etiqueta|Etiquetas}}]]: $2)",
+       "tag-mw-contentmodelchange": "alteração do modelo de conteúdo",
+       "tag-mw-contentmodelchange-description": "Edições que [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel alteram o modelo de conteúdo] de uma página",
        "tags-title": "Etiquetas",
        "tags-intro": "Esta página lista as etiquetas com que o software poderá marcar uma edição, e o seu significado.",
        "tags-tag": "Nome da etiqueta",
        "tags-actions-header": "Ações",
        "tags-active-yes": "Sim",
        "tags-active-no": "Não",
-       "tags-source-extension": "Definida por uma extensão",
+       "tags-source-extension": "Definida pelo software",
        "tags-source-manual": "Aplicada manualmente pelos utilizadores e robôs",
        "tags-source-none": "Já não está em uso",
        "tags-edit": "editar",
        "tags-delete-not-found": "A etiqueta \"$1\" não existe.",
        "tags-delete-too-many-uses": "A etiqueta \"$1\" está aplicada em mais que $2 {{PLURAL:$2|edição|edições}}, o que significa que não pode ser eliminada.",
        "tags-delete-warnings-after-delete": "A etiqueta \"$1\" foi eliminada, mas {{PLURAL:$2|o seguinte aviso foi encontrado|os seguintes avisos foram encontrados}}:",
+       "tags-delete-no-permission": "Não tem permissão para eliminar etiquetas de modificação.",
        "tags-activate-title": "Ativar etiqueta",
        "tags-activate-question": "Está prestes a ativar a etiqueta \"$1\".",
        "tags-activate-reason": "Motivo:",
        "tags-deactivate-not-allowed": "Não é possível desativar a etiqueta \"$1\".",
        "tags-deactivate-submit": "Desativar",
        "tags-apply-no-permission": "Não possui privilégios para aplicar alterações a etiquetas em conjunto com as suas modificações.",
+       "tags-apply-blocked": "Não pode aplicar etiquetas de modificação nas suas alterações enquanto estiver bloqueado(a).",
        "tags-apply-not-allowed-one": "A etiqueta \"$1\" não pode ser aplicada manualmente.",
        "tags-apply-not-allowed-multi": "{{PLURAL:$2|A seguinte etiqueta não pode ser aplicada|As seguintes etiquetas não podem ser aplicadas}} manualmente: $1",
        "tags-update-no-permission": "Não possui privilégios para adicionar ou remover etiquetas de revisões individuais ou entradas de registo.",
+       "tags-update-blocked": "Não pode adicionar ou remover etiquetas de modificação enquanto estiver bloqueado(a).",
        "tags-update-add-not-allowed-one": "A etiqueta \"$1\" não pode ser adicionada manualmente.",
        "tags-update-add-not-allowed-multi": "{{PLURAL:$2|A seguinte etiqueta não pode ser adicionada|As seguintes etiquetas não podem ser adicionadas}} manualmente: $1",
        "tags-update-remove-not-allowed-one": "A remoção da etiqueta \"$1\" não é permitida.",
        "htmlform-cloner-create": "Adicionar mais",
        "htmlform-cloner-delete": "Remover",
        "htmlform-cloner-required": "Pelo menos um valor é necessário.",
+       "htmlform-date-placeholder": "AAAA-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "AAAA-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "O valor especificado não é reconhecido como data. Tente usar o formato AAAA-MM-DD.",
+       "htmlform-time-invalid": "O valor especificado não é reconhecido como hora. Tente usar o formato HH:MM:SS.",
+       "htmlform-datetime-invalid": "O valor especificado não é reconhecido como data e hora. Tente usar o formato AAAA-MM-DD HH:MM:SS.",
+       "htmlform-date-toolow": "O valor especificado é anterior à data mais antiga que é permitida, $1.",
+       "htmlform-date-toohigh": "O valor especificado é posterior à data mais recente que é permitida, $1.",
+       "htmlform-time-toolow": "O valor especificado é anterior à hora mínima permitida, $1.",
+       "htmlform-time-toohigh": "O valor especificado é anterior à hora máxima permitida, $1.",
+       "htmlform-datetime-toolow": "O valor especificado é anterior à data e hora mínima permitida, $1.",
+       "htmlform-datetime-toohigh": "O valor especificado é posterior à data e hora máxima permitida, $1.",
        "htmlform-title-badnamespace": "[[:$1]] não se encontra no domínio \"{{ns:$2}}\".",
        "htmlform-title-not-creatable": "\"$1\" não é um título que possa ser atribuído a uma página",
        "htmlform-title-not-exists": "$1 não existe.",
        "htmlform-user-not-exists": "<strong>$1</strong> não existe.",
        "htmlform-user-not-valid": "<strong>$1</strong> não é um nome de utilizador válido.",
-       "sqlite-has-fts": "$1 com suporte de pesquisa de texto completo",
-       "sqlite-no-fts": "$1 sem suporte de pesquisa de texto completo",
        "logentry-delete-delete": "$1 apagou a página $3",
        "logentry-delete-restore": "$1 restaurou a página $3",
        "logentry-delete-event": "$1 alterou a visibilidade de {{PLURAL:$5|uma entrada|$5 entradas}} em $3: $4",
        "logentry-delete-revision-legacy": "$1 {{GENDER:$2|alterou}} a visibilidade de revisões na página $3",
        "logentry-suppress-delete": "$1 {{GENDER:$2|suprimiu}} a página $3",
        "logentry-suppress-event": "$1 {{GENDER:$2|alterou}} secretamente a visibilidade de {{PLURAL:$5|uma entrada|$5 entradas}} em $3: $4",
-       "logentry-suppress-revision": "$1 secretamente alterou a visibilidade de {{PLURAL:$5|uma revisão|$5 revisões}} em $3: $4",
+       "logentry-suppress-revision": "$1 alterou secretamente a visibilidade de {{PLURAL:$5|uma revisão|$5 revisões}} em $3: $4",
        "logentry-suppress-event-legacy": "$1 {{GENDER:$2|alterou}} secretamente a visibilidade de entradas de registo em $3",
        "logentry-suppress-revision-legacy": "$1 {{GENDER:$2|alterou}} secretamente a visibilidade de revisões da página $3",
        "revdelete-content-hid": "conteúdo oculto",
        "logentry-suppress-block": "$1 {{GENDER:$2|bloqueou}} {{GENDER:$4|$3}} com expiração a $5 $6",
        "logentry-suppress-reblock": "$1 {{GENDER:$2|modificou}} parâmetros de bloqueio de {{GENDER:$4|$3}} com expiração a $5 $6",
        "logentry-import-upload": "$1 {{GENDER:$2|importou}} $3 através de carregamento de ficheiro",
+       "logentry-import-upload-details": "$1 {{GENDER:$2|importou}} $3 por carregamento de ficheiro($4 {{PLURAL:$4|revisão|revisões}})",
        "logentry-import-interwiki": "$1 {{GENDER:$2|importou}} $3 de outra wiki",
+       "logentry-import-interwiki-details": "$1 {{GENDER:$2|importou}} $3 de $5 ($4 {{PLURAL:$4|revisão|revisões}})",
        "logentry-merge-merge": "$1 {{GENDER:$2|fundiu}} $3 com $4 (edições até $5)",
        "logentry-move-move": "$1 moveu a página $3 para $4",
        "logentry-move-move-noredirect": "$1 moveu a página $3 para $4 sem deixar um redirecionamento",
        "feedback-external-bug-report-button": "Assinalar erro técnico",
        "feedback-dialog-title": "Enviar opinião",
        "feedback-dialog-intro": "Pode usar o fácil formulário abaixo para enviar os seus comentários. A sua opinião será adicionada à página \"$1\", juntamente com o seu nome de utilizador(a).",
-       "feedback-error-title": "Erro",
        "feedback-error1": "Erro: O resultado da API não foi reconhecido",
        "feedback-error2": "Erro: A edição falhou",
        "feedback-error3": "Erro: A API não responde",
        "feedback-thanks": "Obrigado! O seu comentário foi adicionado à página \"[$2 $1]\".",
        "feedback-thanks-title": "Obrigado!",
        "feedback-useragent": "Agente de utilizador:",
-       "searchsuggest-search": "Pesquisa",
+       "searchsuggest-search": "Pesquisar em {{SITENAME}}",
        "searchsuggest-containing": "contendo...",
        "api-error-autoblocked": "O seu endereço de IP foi bloqueado automaticamente, pois foi utilizado por um utilizador bloqueado.",
        "api-error-badaccess-groups": "Não tem permissão para enviar ficheiros para esta wiki.",
        "api-error-nomodule": "Erro interno: Não está definido nenhum módulo para o carregamento de ficheiros.",
        "api-error-ok-but-empty": "Erro interno: o servidor não respondeu.",
        "api-error-overwrite": "Não é permitido sobrescrever um ficheiro existente.",
+       "api-error-ratelimited": "Está a tentar carregar mais ficheiros do que esta wiki permite num espaço de tempo curto. Tente de novo dentro de alguns minutos, por favor.",
        "api-error-stashfailed": "Erro interno: O servidor não conseguiu armazenar o ficheiro temporário.",
        "api-error-publishfailed": "Erro interno: Servidor não conseguiu publicar ficheiro temporário.",
        "api-error-stasherror": "Ocorreu um erro no carregamento do ficheiro escondido.",
-       "api-error-stashedfilenotfound": "O ficheiro do stash não foi encontrado ao tentar carregá-lo.",
+       "api-error-stashedfilenotfound": "O ficheiro escondido não foi encontrado ao tentar carregá-lo.",
        "api-error-stashpathinvalid": "O caminho no qual o ficheiro escondido deveria ter sido encontrado era inválido.",
        "api-error-stashfilestorage": "Ocorreu um erro no carregamento do ficheiro escondido.",
        "api-error-stashzerolength": "O servidor não pôde esconder o ficheiro, porque ele tinha de comprimento zero.",
-       "api-error-stashnotloggedin": "Você deve estar com sessão iniciaca para gravar ficheiros no carregamento do stash.",
-       "api-error-stashwrongowner": "O ficheiro que estava a tentar aceder o stash não pertence a você.",
-       "api-error-stashnosuchfilekey": "O ficheiro de chave que está a tentar aceder no stash não existe.",
+       "api-error-stashnotloggedin": "Tem de ter uma sessão iniciada para gravar ficheiros na área de ficheiros escondidos.",
+       "api-error-stashwrongowner": "O ficheiro a que estava a tentar aceder na área de ficheiros escondidos não lhe pertence.",
+       "api-error-stashnosuchfilekey": "O chave do ficheiro a que estava a tentar aceder na área de ficheiros escondidos não existe.",
        "api-error-timeout": "O servidor não respondeu no prazo esperado.",
        "api-error-unclassified": "Ocorreu um erro desconhecido",
        "api-error-unknown-code": "Erro desconhecido: \"$1\"",
        "log-name-pagelang": "Registo de alteração de idioma",
        "log-description-pagelang": "Este é um registo de alterações aos idiomas das páginas.",
        "logentry-pagelang-pagelang": "$1 {{GENDER:$2|alterou}} o idioma da página $3 de $4 para $5.",
+       "default-skin-not-found": "O tema padrão da sua wiki definido em <code dir=\"ltr\">$wgDefaultSkin</code>, <code>$1</code>, não está disponível.\n\nA instalação parece incluir {{PLURAL:$4|o seguinte tema|os seguintes temas}}. Consulte [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual: Configuração de Temas] para saber como {{PLURAL:$4|ativá-lo|ativá-los e escolher o tema padrão}}.\n\n$2\n\n; Se acabou de instalar o MediaWiki:\n: Provavelmente instalou-o a partir do git, ou diretamente do código fonte usando outro método. O comportamento é o esperado. Tente instalar temas a partir do [https://www.mediawiki.org/wiki/Category:All_skins diretório de temas da mediawiki.org], assim:\n:* Descarregue o  [https://www.mediawiki.org/wiki/Download tarball de instalação], que contém vários temas e extensões. Pode copiar o diretório <code>skins/</code> nele incluído.\n:* Descarregue tarballs de temas individuais, da [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org].\n:* [https://www.mediawiki.org/wiki/Download_from_Git#Using_Git_to_download_MediaWiki_skins Use o Git para descarregar temas].\n: Se é programador(a) do MediaWiki, isto não deverá interferir com o seu repositório git.\n\n; Se fez uma atualização do MediaWiki:\n: O MediaWiki 1.24 e versões mais recentes não ativam automaticamente os temas instalados (consulte [https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery Manual: Autodescoberta do Tema]). Pode copiar {{PLURAL:$5|a linha seguinte|as linhas seguintes}} para o ficheiro <code>LocalSettings.php</code> para ativar {{PLURAL:$5|o tema instalado|os temas instalados}}:\n\n<pre dir=\"ltr\">$3</pre>\n\n; Se acabou de modificar o <code>LocalSettings.php</code>:\n: Verifique cuidadosamente se o nome de cada tema está bem soletrado.",
+       "default-skin-not-found-no-skins": "O tema padrão da sua wiki definido em <code dir=\"ltr\">$wgDefaultSkin</code>, <code>$1</code>, não está disponível.\n\nNão tem nenhum tema instalado.\n\n; Se acabou de instalar ou atualizar o MediaWiki:\n: Provavelmente instalou-o a partir do git, ou diretamente do código fonte usando outro método. O comportamento é o esperado. O MediaWiki 1.24 e versões mais recentes não incluem qualquer tema no repositório principal. Tente instalar temas a partir do [https://www.mediawiki.org/wiki/Category:All_skins diretório de temas da mediawiki.org], assim:\n:* Descarregue o  [https://www.mediawiki.org/wiki/Download tarball de instalação], que contém vários temas e extensões. Pode copiar o diretório <code>skins/</code> nele incluído.\n:* Descarregue tarballs de temas individuais, da [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org].\n:* [https://www.mediawiki.org/wiki/Download_from_Git#Using_Git_to_download_MediaWiki_skins Use o Git para descarregar temas].\n: Se é programador(a) do MediaWiki, isto não deverá interferir com o seu repositório git. Consulte [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual: Configuração de Temas] para saber como ativar temas e escolher o tema padrão.",
        "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (ativado)",
        "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 (<strong>desativado</strong>)",
        "mediastatistics": "Estatísticas multimédia",
        "log-action-filter-suppress-revision": "Supressão de revisões",
        "log-action-filter-suppress-delete": "Supressão de página",
        "log-action-filter-suppress-block": "Supressão de utilizadores por bloqueio",
+       "log-action-filter-suppress-reblock": "Supressão de utilizador por rebloqueio",
        "log-action-filter-upload-upload": "Novo carregamento",
        "log-action-filter-upload-overwrite": "Recarregar",
+       "authmanager-authn-not-in-progress": "A autenticação não está em curso ou os dados da sessão foram perdidos. Comece novamente desde o princípio, por favor.",
        "authmanager-authn-no-primary": "As informações de identificação fornecidas não podem ser autenticadas.",
+       "authmanager-authn-no-local-user": "As credenciais fornecidas não estão associadas a nenhum utilizador nesta wiki.",
+       "authmanager-authn-no-local-user-link": "As credenciais fornecidas são válidas mas não estão associadas a nenhum utilizador nesta wiki. Inicie a sessão de outra forma, ou crie um novo utilizador, e terá a opção de ligar as credenciais anteriores a essa conta.",
        "authmanager-authn-autocreate-failed": "A criação automática de uma conta local falhou: $1",
+       "authmanager-change-not-supported": "As credenciais fornecidas não podem ser alteradas porque ninguém as utiliza.",
        "authmanager-create-disabled": "A criação de contas está desativada.",
        "authmanager-create-from-login": "Para criar a sua conta, por favor, preencha os campos abaixo.",
+       "authmanager-create-not-in-progress": "A criação da conta não está em curso ou os dados da sessão foram perdidos. Comece novamente desde o princípio, por favor.",
+       "authmanager-create-no-primary": "Não foi possível criar uma conta com as credenciais fornecidas.",
+       "authmanager-link-no-primary": "Não foi possível ligar a conta usando as credenciais fornecidas.",
+       "authmanager-link-not-in-progress": "A ligação da conta não está em curso ou os dados da sessão foram perdidos. Comece novamente desde o princípio, por favor.",
        "authmanager-authplugin-setpass-failed-title": "A alteração de palavra-passe falhou",
        "authmanager-authplugin-setpass-failed-message": "O plugin de autenticação negou a alteração de palavra-passe.",
        "authmanager-authplugin-create-fail": "O plugin de autenticação negou a criação de conta.",
        "authmanager-autocreate-noperm": "A criação automática de contas não é permitida.",
        "authmanager-autocreate-exception": "A criação automática de contas foi temporariamente desativada devido a erros prévios.",
        "authmanager-userdoesnotexist": "A conta de utilizador(a) \"$1\" não está registada.",
+       "authmanager-userlogin-remembermypassword-help": "Se a palavra-passe deve ser memorizada por um período superior à duração da sessão.",
        "authmanager-username-help": "Nome de utilizador(a) para autenticação.",
        "authmanager-password-help": "Palavra-passe para autenticação.",
        "authmanager-domain-help": "Domínio para a autenticação externa.",
        "authmanager-provider-password-domain": "Autenticação baseada em palavra-passe e domínio",
        "authmanager-provider-temporarypassword": "Palavra-passe temporária",
        "authprovider-confirmlink-message": "Com base nas tuas últimas tentativas para iniciar sessão, as seguintes contas podem ser ligadas à tua conta wiki. Vinculá-las permite que inicie sessão através das mesmas. Selecione quais pretende vincular.",
-       "authprovider-confirmlink-success-line": "$1: Ligado com êxito.",
+       "authprovider-confirmlink-request-label": "Contas que devem ser ligadas",
+       "authprovider-confirmlink-success-line": "$1: Ligação realizada.",
+       "authprovider-confirmlink-failed": "A ligação das contas não foi totalmente realizada: $1",
+       "authprovider-confirmlink-ok-help": "Continuar depois de mostrar as mensagens de erro na ligação.",
        "authprovider-resetpass-skip-label": "Ignorar",
        "authprovider-resetpass-skip-help": "Ignorar redefinição de palavra-passe",
+       "authform-nosession-login": "A autenticação ocorreu, mas o seu navegador não se \"recorda\" de ter iniciado uma sessão.\n\n$1",
+       "authform-nosession-signup": "A conta foi criada, mas o seu navegador não se \"recorda\" de ter iniciado uma sessão.\n\n$1",
        "authform-newtoken": "Chave em falta. $1",
        "authform-notoken": "Chave em falta",
        "authform-wrongtoken": "Chave errada",
        "linkaccounts-success-text": "A conta foi associada.",
        "linkaccounts-submit": "Associar contas",
        "unlinkaccounts": "Desassociar contas",
-       "unlinkaccounts-success": "A conta foi desassociada."
+       "unlinkaccounts-success": "A conta foi desassociada.",
+       "authenticationdatachange-ignored": "A alteração dos dados de autenticação não foi realizada. Talvez o fornecedor não tenha sido configurado?",
+       "userjsispublic": "Nota: As subpáginas de Javascript não devem conter dados confidenciais porque podem ser vistas por outros utilizadores.",
+       "usercssispublic": "Nota: As subpáginas de CSS não devem conter dados confidenciais porque podem ser vistas por outros utilizadores.",
+       "restrictionsfield-badip": "Endereço IP (ou gama de endereços IP) inválido: $1",
+       "restrictionsfield-label": "Gamas de endereços IP permitidas:",
+       "restrictionsfield-help": "Um endereço IP ou uma gama CIDR por linha. Para ativar todos,\nuse<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Erro: $1",
+       "edit-error-long": "Erros:\n\n$1"
 }
index 7fe220b..04048d4 100644 (file)
        "navigation": "This is shown as a section header in the sidebar of most skins.\n\n{{Identical|Navigation}}",
        "and": "The translation for \"and\" appears in the [[Special:Version]] page, between the last two items of a list. If a comma is needed, add it at the beginning without a gap between it and the \"&\". &amp;#32; is a blank space, one character long. Please leave it as it is.\n\nThis can also appear in the credits page if the credits feature is enabled,for example [{{canonicalurl:Support|action=credits}} the credits of the support page]. (To view any credits page type <nowiki>&action=credits</nowiki> at the end of any URL in the address bar.)\n{{Identical|And}}",
        "qbfind": "Alternative for \"search\" as used in Cologne Blue skin.\n{{Identical|Find}}",
-       "qbbrowse": "Heading in sidebar menu in CologneBlue skin as seen in http://i.imgur.com/I08Y3jW.png\n{{Identical|Browse}}",
+       "qbbrowse": "Heading in sidebar menu in CologneBlue skin as seen in [[File:CologneBlue sidebar qqx.png]]\n{{Identical|Browse}}",
        "qbedit": "Heading in sidebar menu in CologneBlue skin as seen in http://i.imgur.com/I08Y3jW.png\n{{Identical|Edit}}",
        "qbpageoptions": "Heading in sidebar menu in CologneBlue skin as seen in http://i.imgur.com/I08Y3jW.png\n{{Identical|This page}}",
        "qbmyoptions": "Heading in the Cologne Blue skin user menu containing links to user (talk) page, preferences, watchlist, etc.\n{{Identical|My pages}}",
        "talk": "Used as display name for the tab to all {{msg-mw|Talk}} pages. These pages accompany all content pages and can be used for discussing the content page. Example: [[Talk:Example]].\n\nSee also:\n* {{msg-mw|Talk}}\n* {{msg-mw|Accesskey-ca-talk}}\n* {{msg-mw|Tooltip-ca-talk}}\n{{Identical|Discussion}}",
        "views": "Subtitle for the list of available views, for the current page. In \"monobook\" skin the list of views are shown as tabs, so this sub-title is not shown. For an example, see [{{canonicalurl:Main_Page|useskin=simple}} Main Page using simple skin].\n\n'''Note:''' This is \"views\" as in \"appearances\"/\"representations\", '''not''' as in \"visits\"/\"accesses\".\n{{Identical|View}}",
        "toolbox": "The title of the toolbox below the search menu.\n{{Identical|Tool}}",
+       "tool-link-userrights": "Link to [[Special:UserRights]] (user rights management) in the sidebar toolbox.\n\nParameters:\n* $1 - Name of user for the user group management (usable for GENDER)",
+       "tool-link-emailuser": "Link to [[Special:EmailUser]] (email user tool) in the sidebar toolbox.\n\nParameters:\n* $1 - Name of user who would receive the email\n\nSee also:\n* {{msg-mw|Emailuser-title-target}}",
        "userpage": "Used in user talk pages as the text of the link to the user page, with the Cologne Blue skin.",
        "projectpage": "Used as link text in Talk page of project page with the Cologne Blue skin.",
        "imagepage": "Used as link text in Talk page of file page.",
        "signupend": "{{notranslate}}",
        "signupend-https": "{{notranslate}}",
        "mailerror": "Used as error message in sending confirmation mail to user. Parameters:\n* $1 - new mail address",
-       "acct_creation_throttle_hit": "Error message at [[Special:CreateAccount]].\n\n\"in the last day\" precisely means: during the lasts 86400 seconds (24 hours) ending right now.\n\nParameters:\n* $1 - number of accounts",
+       "acct_creation_throttle_hit": "Error message at [[Special:CreateAccount]].\n\nParameters:\n* $1 - number of accounts\n* $2 - period",
        "emailauthenticated": "In user preferences ([[Special:Preferences]] > {{int:prefs-personal}} > {{int:email}}) and on [[Special:ConfirmEmail]].\n\nParameters:\n* $1 - (Unused) obsolete, date and time\n* $2 - date\n* $3 - time",
        "emailnotauthenticated": "Message in [[Special:Preferences]] > {{int:prefs-personal}} > {{int:email}}.\n\nIt appears after saving your email address but before you confirm it.",
        "noemailprefs": "Message appearing in the \"Email options\" section of the \"User profile\" page in [[Special:Preferences|Preferences]], when no user email address has been entered.",
        "botpasswords-label-resetpassword": "Label for the checkbox to reset the actual password for the current bot password.",
        "botpasswords-label-grants": "Label for the checkmatrix for selecting grants allowed when the bot password is used.\n\ngrant: Vidu http://komputeko.net/index_en.php?vorto=grant sed \"konced/i\" egale funkcius.",
        "botpasswords-help-grants": "Help text for the grant selection checkmatrix.",
-       "botpasswords-label-restrictions": "Label for the textarea field in which JSON defining access restrictions (e.g. which IP address ranges are allowed) is entered.",
        "botpasswords-label-grants-column": "Label for the checkbox column on the checkmatrix for selecting grants allowed when the bot password is used.",
        "botpasswords-bad-appid": "Used as an error message when an invalid \"bot name\" is supplied on [[Special:BotPasswords]]. Parameters:\n* $1 - The rejected bot name.",
        "botpasswords-insert-failed": "Error message when saving a new bot password failed. It's likely that the failure was because the user resubmitted the form after a previous successful save. Parameters:\n* $1 - Bot name",
        "group-bot": "{{doc-group|bot}}\n{{Identical|Bot}}",
        "group-sysop": "{{doc-group|sysop}}\n{{Identical|Administrator}}",
        "group-bureaucrat": "{{doc-group|bureaucrat}}",
-       "group-suppress": "{{doc-group|suppress}}\nThis is an optional (disabled by default) user group, meant for the [[mw:RevisionDelete|RevisionDelete]] feature, to change the visibility of revisions through [[Special:RevisionDelete]].\n\n{{Identical|Suppress}}",
+       "group-suppress": "{{doc-group|suppress}}\nThis is an optional (disabled by default) user group, meant for the suppression feature in [[mw:Flow|Flow]]. It is not to be confused with the Oversighters group, which also has access to the [[mw:RevisionDelete|RevisionDelete]] feature, to change the visibility of revisions through [[Special:RevisionDelete]].\n\n{{Identical|Suppress}}",
        "group-all": "The name of the user group that contains all users, including anonymous users\n\n{{Identical|All}}",
        "group-user-member": "{{doc-group|user|member}}\n{{Identical|User}}",
        "group-autoconfirmed-member": "{{doc-group|autoconfirmed|member}}",
        "grant-basic": "Name for grant \"basic\".\n{{Related|Grant}}",
        "grant-viewdeleted": "Name for grant \"viewdeleted\".\n{{Related|Grant}}",
        "grant-viewmywatchlist": "Name for grant \"viewmywatchlist\".\n{{Related|Grant}}\n{{Identical|View your watchlist}}",
+       "grant-viewrestrictedlogs": "Name for grant \"viewrestrictedlogs\".\n{{Related|Grant}}",
        "newuserlogpage": "{{doc-logpage}}\n\nPart of the \"Newuserlog\" extension. It is both the title of [[Special:Log/newusers]] and the link you can see in [[Special:RecentChanges]].",
        "newuserlogpagetext": "Part of the \"Newuserlog\" extension. It is the description you can see on [[Special:Log/newusers]].",
        "rightslog": "{{doc-logpage}}\n\nIn [[Special:Log]]",
        "upload-dialog-disabled": "Message shown when the upload dialog functionality is disabled. (This doesn't mean that uploads in general are disabled, only this specific method of uploading.)",
        "upload-dialog-title": "Title of the upload dialog box\n{{Identical|Upload file}}",
        "upload-dialog-button-cancel": "Button to cancel the dialog\n{{Identical|Cancel}}",
+       "upload-dialog-button-back": "Button to go back the dialog\n{{Identical|Back}}",
        "upload-dialog-button-done": "Button to close the dialog once upload is complete\n{{Identical|Done}}",
        "upload-dialog-button-save": "Button to save the file after upload finishes and metadata is filled out, part 2 of a multi-step upload form\n{{Identical|Save}}",
        "upload-dialog-button-upload": "Button to initiate upload, part 1 of a multi-step upload form\n{{Identical|Upload}}",
        "apisandbox-results-fixtoken-fail": "Displayed as an error message from JavaScript when a CSRF token could not be fetched.\n\nParameters:\n* $1 - Token type",
        "apisandbox-alert-page": "Tooltip for the alert icon on a module's page tab when the page contains fields with issues.",
        "apisandbox-alert-field": "Tooltip for the alert icon on a field when the field has issues.",
+       "apisandbox-continue": "Button text for sending another request using query continuation.\n{{Identical|Continue}}",
+       "apisandbox-continue-clear": "Button text for clearing query continuation parameters.\n{{Identical|Clear}}",
+       "apisandbox-continue-help": "Help text for the continue and clear buttons.",
        "booksources": "{{doc-special|BookSources}}\n\n'''This message shouldn't be changed unless it has serious mistakes.'''\n\nIt's used as the page name of the configuration page of [[Special:BookSources]]. Changing it breaks existing sites using the default version of this message.\n\nSee also:\n* {{msg-mw|Booksources|title}}\n* {{msg-mw|Booksources-text|text}}",
        "booksources-summary": "{{doc-specialpagesummary|booksources}}",
        "booksources-search-legend": "Box heading on [[Special:BookSources|book sources]] special page. The box is for searching for places where a particular book can be bought or viewed.",
        "undeletehistorynoadmin": "Used in [[Special:Undelete]].\n\nSee also:\n* {{msg-mw|Undeletehistory}}\n* {{msg-mw|Undeleterevdel}}",
        "undelete-revision": "Shown in \"View and restore deleted pages\" ([[Special:Undelete/$1]]).\nParameters:\n* $1 - deleted page name\n* $2 - (unused)\n* $3 - username (author of revision, not who deleted it)\n* $4 - date of the revision (localized)\n* $5 - time of the revision (localized)\nExample (in English):\n* Deleted revision of [[Main Page]] (as of 14 September 2013, at 08:17) by [[User:Username|Username]]:",
        "undeleterevision-missing": "Used as warning when undeleting the revision.",
-       "undeleterevision-duplicate-revid": "Used as warning when some revisions could not be undeleted due to <code>rev_id</code> collisions.  Parameters:\n* - Number of revisions that could not be restored for this reason.",
+       "undeleterevision-duplicate-revid": "Used as warning when some revisions could not be undeleted due to <code>rev_id</code> collisions.  Parameters:\n* $1 - Number of revisions that could not be restored for this reason.",
        "undelete-nodiff": "Used in [[Special:Undelete]].",
        "undeletebtn": "Shown on [[Special:Undelete]] as button caption and on [[Special:Log/delete|deletion log]] after each entry (for sysops).\n\n{{Identical|Restore}}",
        "undeletelink": "Display name of link to undelete a page used on [[Special:Log/delete]]\n\n{{Identical|View}}\n{{Identical|Restore}}",
        "movepage-max-pages": "PROBABLY (A GUESS): when moving a page, you can select an option of moving its subpages, but there is a maximum that can be moved automatically.\n\nParameters:\n* $1 - maximum moved pages, defined in the variable [[mw:Special:MyLanguage/Manual:$wgMaximumMovedPages|$wgMaximumMovedPages]]",
        "movelogpage": "{{doc-logpage}}\n\nTitle of [[Special:Log/move]]. Used as heading on that page, and in the dropdown menu on log pages.",
        "movelogpagetext": "Text on the special page 'Move log'.",
-       "movesubpage": "This is a section header on [[Special:MovePage]], below is a list of subpages.\n\nParameters:\n* $1 - number of subpages\nSee also:\n* {{msg-mw|movenosubpage|without subpage}}\n* {{msg-mw|movesubpagetext|with subpages}}",
-       "movesubpagetext": "Used in [[Special:MovePage]]. Parameters:\n* $1 - number of subpages\nSee also:\n* {{msg-mw|movesubpage|section header}}\n* {{msg-mw|movenosubpage|without subpage}}",
-       "movenosubpage": "See also:\n* {{msg-mw|movesubpage|section header}}\n* {{msg-mw|movenosubpage|without subpage}}\n* {{msg-mw|movesubpagetext|with subpages}}",
+       "movesubpage": "This is a section header on [[Special:MovePage]], below is a list of subpages.\n\nParameters:\n* $1 - number of subpages\nSee also:\n* {{msg-mw|movenosubpage|without subpage}}\n* {{msg-mw|movesubpagetext|with subpages}}\n* {{msg-mw|movesubpagetalktext|with talk subpages}}",
+       "movesubpagetext": "Used in [[Special:MovePage]]. Parameters:\n* $1 - number of subpages\nSee also:\n* {{msg-mw|movesubpage|section header}}\n* {{msg-mw|movenosubpage|without subpage}}\n* {{msg-mw|movesubpagetalktext|with talk subpages}}",
+       "movesubpagetalktext": "Used in [[Special:MovePage]] when corresponding talk page has subpages. Parameters:\n* $1 - number of subpages\nSee also:\n* {{msg-mw|movesubpage|section header}}\n* {{msg-mw|movenosubpage|without subpage}}",
+       "movenosubpage": "See also:\n* {{msg-mw|movesubpage|section header}}\n* {{msg-mw|movenosubpage|without subpage}}\n* {{msg-mw|movesubpagetext|with subpages}}\n* {{msg-mw|movesubpagetalktext|with talk subpages}}",
        "movereason": "Used in [[Special:MovePage]]. The text for the inputbox to give a reason for the page move.\n\nSee also:\n* {{msg-mw|Move-page-legend|legend for the form}}\n* {{msg-mw|newtitle|label for new title}}\n* {{msg-mw|Movetalk|label for checkbox}}\n* {{msg-mw|Move-leave-redirect|label for checkbox}}\n* {{msg-mw|Fix-double-redirects|label for checkbox}}\n* {{msg-mw|Move-subpages|label for checkbox}}\n* {{msg-mw|Move-talk-subpages|label for checkbox}}\n* {{msg-mw|Move-watch|label for checkbox}}\n{{Identical|Reason}}",
        "move-redirect-text": "{{ignored}}The text that's added to a redirected page when that redirect is created.",
        "category-move-redirect-override": "{{ignored}}The text that's added to a redirected category page when that redirect is created.",
        "pageinfo-category-pages": "See also:\n* {{msg-mw|Pageinfo-category-subcats}}\n* {{msg-mw|Pageinfo-category-files}}\n{{Identical|Number of pages}}",
        "pageinfo-category-subcats": "See also:\n* {{msg-mw|Pageinfo-category-pages}}\n* {{msg-mw|Pageinfo-category-files}}",
        "pageinfo-category-files": "See also:\n* {{msg-mw|Pageinfo-category-pages}}\n* {{msg-mw|Pageinfo-category-subcats}}",
+       "pageinfo-user-id": "The numeric ID for a user",
        "markaspatrolleddiff": "{{doc-actionlink}}\nSee also:\n* {{msg-mw|Markaspatrolledtext}}\n{{Identical|Mark as patrolled}}",
        "markaspatrolledlink": "{{notranslate}}\nParameters:\n* $1 - link which has text {{msg-mw|Markaspatrolledtext}}",
        "markaspatrolledtext": "{{doc-actionlink}}\nSee also:\n* {{msg-mw|Markaspatrolleddiff}}",
        "newimages-showbots": "Used as label for a checkbox. When checked, [[Special:NewImages]] will also display uploads by users in the bots group.",
        "newimages-hidepatrolled": "Used as label for a checkbox. When checked, [[Special:NewImages]] will not display patrolled uploads.\n\nCf. {{msg-mw|tog-hidepatrolled}} and {{msg-mw|apihelp-feedrecentchanges-param-hidepatrolled}}.",
        "noimages": "This is shown on the special page [[Special:NewImages]], when there aren't any recently uploaded files.",
+       "gallery-slideshow-toggle": "Tooltip for the icon that toggles thumbnails on a slideshow  gallery.",
        "ilsubmit": "Used as label for input box in the MIMESearch form on [[Special:MIMESearch]].\n\nSee also:\n* {{msg-mw|Mimesearch|page title}}\n* {{msg-mw|Mimetype|label for input box}}\n{{Identical|Search}}",
        "bydate": "{{Identical|Date}}",
        "sp-newimages-showfrom": "This is a link on [[Special:NewImages]] which takes you to a gallery of the newest files.\n* $1 is a date (example: ''19 March 2008'')\n* $2 is a time (example: ''12:15'')",
        "htmlform-cloner-create": "Used as the text for the button that adds a row to a multi-input HTML form element.\n\nSee also:\n* {{msg-mw|htmlform-cloner-delete}}\n* {{msg-mw|htmlform-cloner-required}}",
        "htmlform-cloner-delete": "Used as the text for the button that removes a row from a multi-input HTML form element\n\nSee also:\n* {{msg-mw|htmlform-cloner-create}}\n* {{msg-mw|htmlform-cloner-required}}\n{{Identical|Remove}}",
        "htmlform-cloner-required": "Used as an error message in HTML forms.\n\nSee also:\n* {{msg-mw|htmlform-required}}\n* {{msg-mw|htmlform-cloner-create}}\n* {{msg-mw|htmlform-cloner-delete}}",
+       "htmlform-date-placeholder": "Used as initial placeholder text in \"date\" input boxes. This date MUST be formatted as a 4-digit year, 2-digit month, and 2-digit day, in the Gregorian calendar, separated with ASCII hyphen ('-') characters. You can localise the letters to your language or script, but you should not change the format.",
+       "htmlform-time-placeholder": "Used as initial placeholder text in \"time\" input boxes. This time MUST be formatted as a 2-digit hour 00 to 23, a 2-digit minute, and an optional 2-digit second, all separated by ASCII colons. You can localise the letters to your language or script, but you should not change the format.",
+       "htmlform-datetime-placeholder": "Used as initial placeholder text in \"datetime\" input boxes. This date and time MUST be formatted as a 4-digit year, 2-digit month, and 2-digit day, in the Gregorian calendar, separated with ASCII hyphen ('-') characters, followed by a space (or the letter 'T'), followed by a time formatted as a 2-digit hour 00 to 23, a 2-digit minute, and an optional 2-digit second, all separated by ASCII colons. You can localise the letters to your language or script, but you should not change the format.",
+       "htmlform-date-invalid": "Used as error message in HTML forms. This date MUST be formatted as a 4-digit year, 2-digit month, and 2-digit day, in the Gregorian calendar, separated with ASCII hyphen ('-') characters. You can localise the letters to your language or script, but you should not change the format.\n\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Apifeatureusage-htmlform-date-placeholder}}\n* {{msg-mw|Apifeatureusage-htmlform-date-toolow}}\n* {{msg-mw|Apifeatureusage-htmlform-date-toohigh}}\n* {{msg-mw|Htmlform-required}}",
+       "htmlform-time-invalid": "Used as error message in HTML forms. This time MUST be formatted as a 2-digit hour 00 to 23, a 2-digit minute, and an optional 2-digit second, all separated by ASCII colons. You can localise the letters to your language or script, but you should not change the format.\n\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Apifeatureusage-htmlform-time-placeholder}}\n* {{msg-mw|Apifeatureusage-htmlform-time-toolow}}\n* {{msg-mw|Apifeatureusage-htmlform-time-toohigh}}\n* {{msg-mw|Htmlform-required}}",
+       "htmlform-datetime-invalid": "Used as error message in HTML forms. This date and time MUST be formatted as a 4-digit year, 2-digit month, and 2-digit day, in the Gregorian calendar, separated with ASCII hyphen ('-') characters, followed by a space (or the letter 'T'), followed by a time formatted as a 2-digit hour 00 to 23, a 2-digit minute, and an optional 2-digit second, all separated by ASCII colons. You can localise the letters to your language or script, but you should not change the format.\n\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Apifeatureusage-htmlform-datetime-placeholder}}\n* {{msg-mw|Apifeatureusage-htmlform-datetime-toolow}}\n* {{msg-mw|Apifeatureusage-htmlform-datetime-toohigh}}\n* {{msg-mw|Htmlform-required}}",
+       "htmlform-date-toolow": "Used as error message in HTML forms. Parameters:\n* $1 - minimum date\nSee also:\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Htmlform-required}}\n* {{msg-mw|Apifeatureusage-htmlform-date-invalid}}\n* {{msg-mw|Apifeatureusage-htmlform-date-toohigh}}",
+       "htmlform-date-toohigh": "Used as error message in HTML forms. Parameters:\n* $1 - maximum date\nSee also:\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Htmlform-required}}\n* {{msg-mw|Apifeatureusage-htmlform-date-invalid}}\n* {{msg-mw|Apifeatureusage-htmlform-date-toolow}}",
+       "htmlform-time-toolow": "Used as error message in HTML forms. Parameters:\n* $1 - minimum date\nSee also:\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Htmlform-required}}\n* {{msg-mw|Apifeatureusage-htmlform-time-invalid}}\n* {{msg-mw|Apifeatureusage-htmlform-time-toohigh}}",
+       "htmlform-time-toohigh": "Used as error message in HTML forms. Parameters:\n* $1 - maximum date\nSee also:\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Htmlform-required}}\n* {{msg-mw|Apifeatureusage-htmlform-time-invalid}}\n* {{msg-mw|Apifeatureusage-htmlform-time-toolow}}",
+       "htmlform-datetime-toolow": "Used as error message in HTML forms. Parameters:\n* $1 - minimum date\nSee also:\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Htmlform-required}}",
+       "htmlform-datetime-toohigh": "Used as error message in HTML forms. Parameters:\n* $1 - maximum date\nSee also:\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Htmlform-required}}",
        "htmlform-title-badnamespace": "Error message shown if the page title provided by the user is not in the required namespace. $1 is the page, $2 is the numerical namespace index.",
        "htmlform-title-not-creatable": "Error message shown if the page title provided by the user is not creatable (a special page). $1 is the page title.",
        "htmlform-title-not-exists": "Error message shown if the page title provided by the user does not exist. $1 is the page title.",
        "htmlform-user-not-exists": "Error message shown if a user with the name provided by the user does not exist. $1 is the username.",
        "htmlform-user-not-valid": "Error message shown if the name provided by the user isn't a valid username. $1 is the username.",
        "rawmessage": "{{notranslate}} Used to pass arbitrary text as a message specifier array",
-       "sqlite-has-fts": "Shown on [[Special:Version]].\nParameters:\n* $1 - version",
-       "sqlite-no-fts": "Shown on [[Special:Version]].\nParameters:\n* $1 - version",
        "logentry-delete-delete": "{{Logentry|[[Special:Log/delete]]}}",
        "logentry-delete-restore": "{{Logentry|[[Special:Log/delete]]}}",
        "logentry-delete-event": "{{Logentry|[[Special:Log/delete]]}}\n{{Logentryparam}}\n* $5 - count of affected log events",
        "feedback-external-bug-report-button": "A button for submitting an external technical bug report.",
        "feedback-dialog-title": "Title of the feedback dialog",
        "feedback-dialog-intro": "An introduction at the top of the feedback dialog. $1 - Feedback page link",
-       "feedback-error-title": "{{Identical|Error}}",
        "feedback-error1": "Error message, appears when an unknown error occurs submitting feedback",
        "feedback-error2": "Error message, appears when we could not add feedback",
        "feedback-error3": "Error message, appears when we lose our connection to the wiki",
        "feedback-thanks": "Thanks message, appears if feedback was successful. Parameters:\n* $1 - \"Feedback\"\n* $2 - Feedback page URL",
        "feedback-thanks-title": "The title of the thank you dialog at the end of the submission process.\n{{Identical|Thank you}}",
        "feedback-useragent": "A label denoting the user agent in the feedback that is posted to the feedback page.\n{{Identical|User agent}}",
-       "searchsuggest-search": "Greyed out default text in the simple search box in the Vector skin. (It disappears and lets the user enter the requested search terms when the search box receives focus.)\n\n{{Identical|Search}}",
+       "searchsuggest-search": "Greyed out default text in the simple search box in the Vector skin. (It disappears and lets the user enter the requested search terms when the search box receives focus.)\n{{Identical|Search}}",
        "searchsuggest-containing": "Label used in the special item of the search suggestions list which gives the user an option to perform a full text search for the term.",
        "api-error-autoblocked": "API error message that can be used for client side localisation of API errors.\n\nCf. {{msg-mw|Autoblockedtext}}.",
        "api-error-badaccess-groups": "API error message that can be used for client side localisation of API errors.",
        "api-error-was-deleted": "API error message that can be used for client side localisation of API errors.",
        "duration-seconds": "Used as duration. Parameters:\n* $1 - number of seconds\n{{Related|Duration}}\n{{Identical|Second}}",
        "duration-minutes": "Used as duration. Parameters:\n* $1 - number of minutes\n{{Related|Duration}}\n{{Identical|Minute}}",
-       "duration-hours": "Used as duration. Parameters:\n* $1 - number of hours\n{{Related|Duration}}",
-       "duration-days": "Used as duration. Parameters:\n* $1 - number of days\n{{Related|Duration}}",
-       "duration-weeks": "Used as duration. Parameters:\n* $1 - number of weeks\n{{Related|Duration}}",
-       "duration-years": "Used as duration. Parameters:\n* $1 - number of years\n{{Related|Duration}}",
+       "duration-hours": "Used as duration. Parameters:\n* $1 - number of hours\n{{Related|Duration}}\n{{Identical|Hour}}",
+       "duration-days": "Used as duration. Parameters:\n* $1 - number of days\n{{Related|Duration}}\n{{Identical|Day}}",
+       "duration-weeks": "Used as duration. Parameters:\n* $1 - number of weeks\n{{Related|Duration}}\n{{Identical|Week}}",
+       "duration-years": "Used as duration. Parameters:\n* $1 - number of years\n{{Related|Duration}}\n{{Identical|Year}}",
        "duration-decades": "Used as duration. Parameters:\n* $1 - number of decades\n{{Related|Duration}}",
        "duration-centuries": "Used as duration. Parameters:\n* $1 - number of centuries\n{{Related|Duration}}",
        "duration-millennia": "Used as duration. Parameters:\n* $1 - number of millennia\n{{Related|Duration}}",
        "unlinkaccounts-success": "Account unlinking form success message",
        "authenticationdatachange-ignored": "Shown when authentication data change was unsuccessful due to configuration problems.\n\nCf. e.g. {{msg-mw|Passwordreset-ignored}}.",
        "userjsispublic": "A reminder to users that Javascript subpages are not preferences but normal pages, and thus can be viewed by other users and the general public. This message is shown to a user whenever they are editing a subpage in their own user-space that ends in .js. See also {{msg-mw|usercssispublic}}.",
-       "usercssispublic": "A reminder to users that CSS subpages are not preferences but normal pages, and thus can be viewed by other users and the general public. This message is shown to a user whenever they are editing a subpage in their own user-space that ends in .css. See also {{msg-mw|userjsispublic}}"
+       "usercssispublic": "A reminder to users that CSS subpages are not preferences but normal pages, and thus can be viewed by other users and the general public. This message is shown to a user whenever they are editing a subpage in their own user-space that ends in .css. See also {{msg-mw|userjsispublic}}",
+       "restrictionsfield-badip": "An error message shown when one entered an invalid IP address or range in a restrictions field (such as Special:BotPassword). $1 is the IP address.",
+       "restrictionsfield-label": "Field label shown for restriction fields (e.g. on Special:BotPassword).",
+       "restrictionsfield-help": "Placeholder text displayed in restriction fields (e.g. on Special:BotPassword).",
+       "edit-error-short": "Error message. Parameters:\n* $1 - the error details\nSee also:\n* {{msg-mw|edit-error-long}}\n{{Identical|Error}}",
+       "edit-error-long": "Error message. Parameters:\n* $1 - the error details\nSee also:\n* {{msg-mw|edit-error-short}}\n{{Identical|Error}}"
 }
index bb89a09..45543b5 100644 (file)
        "notextmatches": "Manam ima p'anqakunap qillqankunapipas tarisqachu",
        "prevn": "{{PLURAL:$1|$1}} ñawpaq",
        "nextn": "{{PLURAL:$1|$1}} qatiq",
+       "prev-page": "ñawpaqnin p'anqa",
+       "next-page": "qatiqnin p'anqa",
        "prevn-title": "Ñawpaq $1 {{PLURAL:$1|taripasqa|taripasqakuna}}",
        "nextn-title": "Qatiq $1 {{PLURAL:$1|taripasqa|taripasqakuna}}",
        "shown-title": "Huk p'anqapi $1 {{PLURAL:$1|taripasqata|taripasqakunata}} rikuchiy",
        "htmlform-chosen-placeholder": "Akllanata akllay",
        "htmlform-cloner-create": "Astawan yapay",
        "htmlform-cloner-delete": "Qichuy",
-       "sqlite-has-fts": "$1 hunt'a qillqa maskana yanapawan",
-       "sqlite-no-fts": "$1 mana hunt'a qillqa maskana yanapawan",
        "logentry-delete-delete": "{{GENDER:$2|}}$1 sutiyuq ruraqqa $3 nisqa p'anqatam qullun",
        "logentry-delete-restore": "{{GENDER:$2|}}$1 sutiyuq ruraqqa $3 nisqa p'anqatam qullusqamanta paqarichin",
        "logentry-delete-event": "{{GENDER:$2|}}$1 sutiyuq ruraqqa {{PLURAL:$5|huk hallch'ay|$5 hallch'ay}} ruraypa rikunalla kayninta wakinchan $3 p'anqapi: $4",
index 2a2e31c..52111d3 100644 (file)
@@ -12,7 +12,8 @@
                        "아라",
                        "Macofe",
                        "Matma Rex",
-                       "Translaziuns"
+                       "Translaziuns",
+                       "Terfili"
                ]
        },
        "tog-underline": "Suttastritgar colliaziuns:",
        "otherlanguages": "En autras linguas",
        "redirectedfrom": "(renvià da $1)",
        "redirectpagesub": "questa pagina renviescha tar in'auter artitgel",
+       "redirectto": "Renviescha a:",
        "lastmodifiedat": "Questa pagina è vegnida modifitgada l'ultima giada ils $1 a las $2.",
        "viewcount": "Questa pagina è vegnida contemplada {{PLURAL:$1|ina giada|$1 giadas}}.",
        "protectedpage": "Pagina protegida",
        "nstab-template": "Model",
        "nstab-help": "Agid",
        "nstab-category": "Categoria",
+       "mainpage-nstab": "Pagina principala",
        "nosuchaction": "Talas acziuns n'existan betg",
        "nosuchactiontext": "L'acziun specifitgada per questa URL è faussa.\nTi has endatà fauss la URL, u es suandà in link incorrect.\nI po dentant er esser ina errur en la software da {{SITENAME}}.",
        "nosuchspecialpage": "I n'exista betg ina tala pagina speziala",
        "welcomeuser": "Bainvegni, $1!",
        "welcomecreation-msg": "Tes conto è vegnì creà. \nN'emblida betg da midar tias [[Special:Preferences|{{SITENAME}} preferenzas]].",
        "yourname": "Num d'utilisader",
+       "userlogin-yourname": "Num d'utilisader",
        "userlogin-yourname-ph": "Endatescha tes num d'utilisader",
        "createacct-another-username-ph": "Endatescha in num d'utilisader",
        "yourpassword": "pled-clav",
        "yourpasswordagain": "repeter pled-clav",
        "createacct-yourpasswordagain": "Confermar il pled-clav",
        "createacct-yourpasswordagain-ph": "Endatescha il pled-clav anc ina giada",
-       "remembermypassword": "S'annunziar permanantamain sin quest computer (per maximalmain $1 {{PLURAL:$1|di|dis}})",
        "userlogin-remembermypassword": "Restar annunzià",
        "userlogin-signwithsecure": "Duvrar ina connexiun segira",
        "yourdomainname": "Vossa domain",
        "pt-login": "T'annunziar",
        "pt-login-button": "T'annunziar",
        "pt-createaccount": "Crear in conto d'utilisader",
+       "pt-userlogout": "Sortir",
        "php-mail-error-unknown": "Errur nunenconuschenta en la funcziun mail() da PHP",
        "user-mail-no-addy": "Empruvà da trametter in e-mail senza ina adressa dad e-mail.",
        "changepassword": "Midar pled-clav",
        "passwordreset-emailtext-user": "L'utilisader $1 sin {{SITENAME}} ha dumandà da redefinir il pled-clav per {{SITENAME}} ($4). \n{{PLURAL:$3|Il suandant conto d'utilisader è collià|Ils suandants contos d'utilisader èn colliads}} cun questa adressa dad e-mail:\n\n$2\n\n{{PLURAL:$3|Quest pled-clav temporar|Quests pled-clav temporars}} èn valids {{PLURAL:$5|in di|$5 dis}}.\nTi duessas t'annunziar ussa e tscherner in nov pled-clav. Sche ti na levas betg quests novs pleds-clav u sche ti ta regordas puspè da tes pled-clav original e na vuls betg pli midar il pled-clav pos ti ignorar quest messadi e cuntinuar dad utilisar tes pled-clav original.",
        "passwordreset-emailelement": "Num d'utilisader: \n$1\n\nPled-clav temporar: \n$2",
        "passwordreset-emailsentemail": "In e-mail per redefinir il pled-clav è vegnì tramess.",
-       "passwordreset-emailsent-capture": "In e-mail (sco mussà sutvart) per redefinir il pled-clav è vegnì tramess.",
-       "passwordreset-emailerror-capture": "In e-mail (sco mussà sutvart) per redefinir il pled-clav è vegnì generà ma n'ha betg pudì envià a l'{{GENDER:$2|utilisader|utilisadra}}: $1",
        "changeemail": "Midar l'adressa dad e-mail",
        "changeemail-header": "Midar l'adressa dad e-mail dal conto",
        "changeemail-no-info": "Ti stos t'annunziar per acceder directamain questa pagina.",
        "newarticle": "(Nov)",
        "newarticletext": "Ti has cliccà ina colliaziun ad ina pagina che n'exista anc betg. Per crear ina pagina, entschaiva a tippar en la stgaffa sutvart (guarda [$1 la pagina d'agid] per t'infurmar).",
        "anontalkpagetext": "----''Quai è la pagina da discussiun per in utilisader anomim che n'ha anc betg creà in conto d'utilisader u che n'al utilisescha betg.\nPerquai avain nus d'utilisar l'adressa dad IP per l'identifitgar.\nIna tala adressa dad IP po vegnir utilisada da differents utilisaders.\nSche ti es in utilisaders anonim e pensas che commentaris che na pertutgan betg tai vegnan adressads a tai, lura [[Special:CreateAccount|creescha in conto]] u [[Special:UserLogin|t'annunzia]] per evitar en futur che ti vegns sbaglià cun auters utilisaders.''",
-       "noarticletext": "Quest artitgel na cuntegna actualmain nagin text.\nTi pos [[Special:Search/{{PAGENAME}}|tschertgar il term]] sin in'autra pagina,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} tschertgar en ils protocols],\nu [{{fullurl:{{FULLPAGENAME}}|action=edit}} crear questa pagina]</span>.",
+       "noarticletext": "Questa pagina na cuntegna actualmain nagin text.\nTi pos [[Special:Search/{{PAGENAME}}|tschertgar il term]] sin in'autra pagina,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} tschertgar en ils protocols],\nu [{{fullurl:{{FULLPAGENAME}}|action=edit}} crear questa pagina]</span>.",
        "noarticletext-nopermission": "Questa pagina na cuntegna actualmain nagin text.\nTi pos [[Special:Search/{{PAGENAME}}|tschertgar quest titel]] en autras paginas u <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} tschertgar en ils protocols correspundents]</span>, ma ti n'has betg ils dretgs da crear questa pagina.",
        "missing-revision": "La versiun #$1 da la pagina cun il num \"{{FULLPAGENAME}}\" n'exista betg.\n\nQuai capita savnes sche ti cliccas sin ina colliaziun antiquada en la cronologia per ina pagina ch'è vegnida stizzada.\nDetagls pon vegnri chattads en il [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} protocol da stizzar].",
        "userpage-userdoesnotexist": "Il conto d'utilisader \"<nowiki>$1</nowiki>\" n'èxista betg.\nControllescha sch ti vuls propi crear/modiftgar questa pagina.",
        "undo-failure": "La modificaziun na pudeva betg vegnir revocada causa modificaziuns pli novas che stattan en conflict cun questa acziun.",
        "undo-norev": "La modificaziun na pudeva betg vegnir revocada perquai ch'ella n'exista betg u è vegnida stizzada.",
        "undo-summary": "Revocar la versiun $1 da [[Special:Contributions/$2|$2]] ([[User talk:$2|discussiun]])",
-       "cantcreateaccounttitle": "Betg pussaivel da crear il conto",
        "cantcreateaccount-text": "La creaziun da contos du'utilisader è vegnida bloccada da l'utilisader [[User:$3|$3]] per questa adressa IP ('''$1''').\n\nIl motiv inditgà da $3 è ''$2''",
        "viewpagelogs": "Guardar ils protocols da questa pagina",
        "nohistory": "Per questa pagina n'exista nagina cronologia.",
        "action-siteadmin": "bloccar u debloccar la banca da datas",
        "action-sendemail": "trametter e-mails",
        "nchanges": "$1 {{PLURAL:$1|midada|midadas}}",
+       "enhancedrc-history": "Cronologia",
        "recentchanges": "Ultimas midadas",
        "recentchanges-legend": "Opziuns per las ultimas midadas",
        "recentchanges-summary": "Sin questa pagina pos ti suandar las ultimas midadas sin '''{{SITENAME}}'''.",
        "querypage-disabled": "Questa pagina speciala è deactivada ord motivs da prestaziun.",
        "booksources": "Tschertga da ISBN",
        "booksources-search-legend": "Tschertgar pussaivladad da cumpra per cudeschs",
+       "booksources-search": "Tschertgar",
        "booksources-text": "Sutvart è ina glista da las colliaziuns ad autras paginas che vendan cudeschs novs ed utilisads e che pudessan avair dapli infurmaziuns davart ils cudeschs che ti tschertgas:",
        "booksources-invalid-isbn": "Il numer ISBN na para betg dad esser valid; controllescha che ti n'has betg fatg errurs cun la scriver.",
        "specialloguserlabel": "Acziun exequida da:",
        "contributions": "Contribuziuns {{GENDER:$1|da l'utilisader|da l'utilisadra}}",
        "contributions-title": "Contribuziuns d'utilisader da $1",
        "mycontris": "Contribuziuns",
+       "anoncontribs": "Contribuziuns",
        "contribsub2": "Per {{GENDER:$3|$1}} ($2)",
        "nocontribs": "Chattà naginas modificaziuns che correspundan a quests criteris.",
        "uctop": "(actual)",
        "import-logentry-interwiki-detail": "{{PLURAL:$1|Ina versiun|$1 versiuns}} da $2",
        "javascripttest": "Test da JavaScript",
        "javascripttest-qunit-intro": "Legia la [$1 documentaziun da tests] sin mediawiki.org.",
-       "tooltip-pt-userpage": "Mussar tia pagina d'utilisader",
+       "tooltip-pt-userpage": "Mussar {{GENDER:|tia pagina d'utilisader}}",
        "tooltip-pt-anonuserpage": "La pagina d'utilisader per l'adressa IP cun la quala che ti fas modificaziuns",
-       "tooltip-pt-mytalk": "Mussar tia pagina da discussiun",
+       "tooltip-pt-mytalk": "Mussar {{GENDER:|tia}} pagina da discussiun",
        "tooltip-pt-anontalk": "Discussiun davart modificaziuns che derivan da questa adressa dad IP",
        "tooltip-pt-preferences": "mias preferenzas",
        "tooltip-pt-watchlist": "La glista da las paginas da las qualas jau observ las midadas",
        "tooltip-pt-login": "I fiss bun sche ti s'annunziassas, ti na stos dentant betg.",
        "tooltip-pt-logout": "Sortir",
        "tooltip-ca-talk": "Discussiuns davart il cuntegn da l'artitgel",
-       "tooltip-ca-edit": "Ti pos modifitgar questa pagina.\nUtilisescha per plaschair il buttun 'mussar prevista' avant che memorisar.",
+       "tooltip-ca-edit": "Modifitgar questa pagina",
        "tooltip-ca-addsection": "Cumenzar nov paragraf",
        "tooltip-ca-viewsource": "Questa pagina è protegida.\nTi pos vesair il code-fundamental.",
        "tooltip-ca-history": "Versiuns pli veglias da questa pagina",
        "tooltip-t-recentchangeslinked": "Ultimas midadas sin paginas colliadas cun questa pagina",
        "tooltip-feed-rss": "RSS feed per questa pagina",
        "tooltip-feed-atom": "Atom feed per questa pagina",
-       "tooltip-t-contributions": "Mussar las contribuziuns da quest utilisader",
+       "tooltip-t-contributions": "Mussar las contribuziuns da {{GENDER:$1|quest utilisader}}",
        "tooltip-t-emailuser": "Trametter in e-mail a quest utilisader",
        "tooltip-t-upload": "Chargiar si datotecas",
        "tooltip-t-specialpages": "Glista da tut las paginas spezialas",
        "htmlform-submit": "Trametter",
        "htmlform-reset": "Revocar las midadas",
        "htmlform-selectorother-other": "Auters",
-       "sqlite-has-fts": "$1 cun sustegn per la retschertga da text integrala",
-       "sqlite-no-fts": "$1 senza sustegn per la retschertga da text integrala",
        "logentry-delete-delete": "$1 {{GENDER:$2|ha stizzà}} la pagina $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|ha restaurà}} la pagina $3",
        "logentry-delete-event": "$1 ha midà la visibilitad da{{PLURAL:$5|d ina occurrenza en il protocol| $5 occurrenzas en il protocol}} da '''$3''': $4",
        "revdelete-uname-unhid": "dà liber il num d'utilisader",
        "revdelete-restricted": "applitgà restricziuns per administraturs",
        "revdelete-unrestricted": "allontanà restricziuns per administraturs",
-       "logentry-move-move": "$1 ha spustà la pagina $3 a $4",
+       "logentry-move-move": "$1 {{GENDER:$2|ha spustà}} la pagina $3 a $4",
        "logentry-move-move-noredirect": "$1 ha spustà la pagina $3 a $4 senza crear in renviament",
        "logentry-move-move_redir": "$1 ha spustà la pagina $3 a $4 e surscrit quatras in renviament",
        "logentry-move-move_redir-noredirect": "$1 ha spustà la pagina $3 a $4 e surscrit quatras in renviament senza crear in renviament",
        "logentry-patrol-patrol": "$1 ha marcà la versiun $4 da la pagina $3 sco controllada",
        "logentry-patrol-patrol-auto": "$1 ha marcà automaticamain la versiun $4 da la pagina $3 sco controllada",
        "logentry-newusers-newusers": "Il conto $1 è vegnì creà",
-       "logentry-newusers-create": "Il conto $1 è vegnì creà",
+       "logentry-newusers-create": "Il conto $1 è vegnì {{GENDER:$2|creà}}",
        "logentry-newusers-create2": "Il conto $3 è vegnì creà da $1",
        "logentry-newusers-autocreate": "Il conto $1 è vegnì creà automaticamain",
        "logentry-rights-rights": "$1 ha midà la commembranza da gruppas per $3 da $4 a $5",
index cc77f46..d113101 100644 (file)
@@ -58,7 +58,7 @@
        "tog-enotifminoredits": "Trimite-mi, de asemenea, un e-mail în caz de modificări minore asupra paginilor și fișierelor",
        "tog-enotifrevealaddr": "Afișează-mi adresa de e-mail în mesajele de notificare",
        "tog-shownumberswatching": "Arată numărul utilizatorilor care urmăresc",
-       "tog-oldsig": "Semnătură actuală:",
+       "tog-oldsig": "Semnătura actuală:",
        "tog-fancysig": "Tratează semnătura ca wikitext (fără o legătură automată)",
        "tog-uselivepreview": "Folosește previzualizarea în timp real",
        "tog-forceeditsummary": "Avertizează-mă când uit să descriu modificările",
        "newwindow": "(se deschide într-o fereastră nouă)",
        "cancel": "Revocare",
        "moredotdotdot": "Mai mult…",
-       "morenotlisted": "Această listă nu este completă.",
+       "morenotlisted": "Această listă ar putea fi incompletă.",
        "mypage": "Pagină",
        "mytalk": "Discuții",
        "anontalk": "Discuții",
        "talk": "Discuție",
        "views": "Vizualizări",
        "toolbox": "Unelte",
+       "tool-link-userrights": "Schimbă grupurile {{GENDER:$1|utilizatorului|utilizatoarei}}",
+       "tool-link-emailuser": "Trimiteți un mesaj {{GENDER:$1|acestui utilizator|acestei utilizatoare}}",
        "userpage": "Vizualizați pagina utilizatorului",
        "projectpage": "Vizualizați pagina proiectului",
        "imagepage": "Vizualizați pagina fișierului",
        "perfcachedts": "Informațiile de mai jos provin din cache, ultima actualizare efectuându-se la $1. Un maxim de {{PLURAL:$4|un rezultat este disponibil|$4 rezultate sunt disponibile}} în cache.",
        "querypage-no-updates": "Actualizările acestei pagini sunt momentan dezactivate. Informațiile de aici nu sunt împrospătate.",
        "viewsource": "Sursă pagină",
-       "viewsource-title": "Vizualizare sursă pentru $1",
+       "viewsource-title": "Vizualizare sursă pentru „$1”",
        "actionthrottled": "Acțiune limitată",
        "actionthrottledtext": "Ca o măsură anti-spam, aveți permisiuni limitate în a efectua această acțiune de prea multe ori într-o perioadă scurtă de timp, iar dumneavoastră tocmai ați depășit această limită.\nVă rugăm să încercați din nou în câteva minute.",
        "protectedpagetext": "Această pagină este protejată împotriva modificărilor sau a altor acțiuni.",
        "botpasswords-disabled": "Parolele de roboți sunt dezactivate.",
        "botpasswords-no-central-id": "Pentru a folosi parole pentru roboți, trebuie să fiți logat într-un cont centralizat.",
        "botpasswords-existing": "Parole de robot existente",
+       "botpasswords-createnew": "Creați o nouă parolă de bot",
+       "botpasswords-editexisting": "Editați o parolă de bot",
        "botpasswords-label-appid": "Numele robotului:",
        "botpasswords-label-create": "Creare",
        "botpasswords-label-update": "Actualizează",
        "botpasswords-label-delete": "Șterge",
        "botpasswords-label-resetpassword": "Resetează parola",
        "botpasswords-label-grants": "Permisiuni aplicabile:",
-       "botpasswords-label-restrictions": "Restricții de utilizare:",
        "botpasswords-label-grants-column": "Permise",
        "botpasswords-bad-appid": "Numele de robot „$1” nu este valid.",
        "resetpass_forbidden": "Parolele nu pot fi schimbate.",
        "expensive-parserfunction-warning": "Atenție: Această pagină conține prea multe apelări costisitoare ale funcțiilor parser.\n\nAr trebui să existe mai puțin de $2 {{PLURAL:$2|apelare|apelări}}, acolo există {{PLURAL:$1|$1 apelare|$1 apelări}}.",
        "expensive-parserfunction-category": "Pagini cu prea multe apelări costisitoare de funcții parser",
        "post-expand-template-inclusion-warning": "Atenție: Formatele incluse sunt prea mari.\nUnele formate nu vor fi incluse.",
-       "post-expand-template-inclusion-category": "Paginile în care este inclus formatul are o dimensiune prea mare",
+       "post-expand-template-inclusion-category": "Pagini în care formatele incluse au o dimensiune prea mare",
        "post-expand-template-argument-warning": "Atenție: Această pagină conține cel puțin un argument al unui format care are o mărime prea mare atunci când este expandat.\nAcsete argumente au fost omise.",
        "post-expand-template-argument-category": "Pagini care conțin formate cu argumente omise",
        "parser-template-loop-warning": "Buclă de formate detectată: [[$1]]",
        "grant-generic": "set de permisiuni „$1”",
        "grant-group-page-interaction": "Interacționează cu paginile",
        "grant-group-file-interaction": "Interacționează cu conținut media",
+       "grant-highvolume": "Volum mare de editare",
+       "grant-oversight": "Ascunde utilizatori și suprimă versiuni",
+       "grant-patrol": "Patrulează schimbările paginilor",
        "grant-basic": "Drepturi de bază",
        "newuserlogpage": "Jurnal utilizatori noi",
        "newuserlogpagetext": "Acesta este jurnalul creărilor conturilor de utilizator.",
        "uploadstash-badtoken": "Execuția acestei acțiuni nu a reușit, probabil deoarece informațiile dumneavoastră de identificare au expirat. Încercați din nou.",
        "uploadstash-errclear": "Golirea fișierelor nu a reușit.",
        "uploadstash-refresh": "Reîmprospătează lista de fișiere",
+       "uploadstash-thumbnail": "arată miniatura",
+       "uploadstash-exception": "Nu pot stoca încărcare în spațiul temporar ($1): \"$2\"",
        "invalid-chunk-offset": "Decalaj de segment nevalid",
        "img-auth-accessdenied": "Acces interzis",
        "img-auth-nopathinfo": "PATH_INFO lipsește.\nServerul dumneavoastră nu a fost setat pentru a trece aceste informații.\nS-ar putea să fie bazat pe CGI și să nu suporte img_auth.\nVedeți https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization.",
        "delete-toobig": "Această pagină are un istoric al modificărilor important, cu mai mult de $1 {{PLURAL:$1|versiune|versiuni|de versiuni}}.\nȘtergerea unei astfel de pagini a fost restricționată pentru a preveni apariția unor erori în {{SITENAME}}.",
        "delete-warning-toobig": "Această pagină are un istoric al modificărilor mult prea mare, cu mai mult de $1 {{PLURAL:$1|versiune|versiuni|de versiuni}}.\nȘtergerea sa poate afecta baza de date a sitului {{SITENAME}};\nacționați cu precauție.",
        "deleteprotected": "Nu puteți șterge această pagină, deoarece este protejată.",
-       "deleting-backlinks-warning": "'''Atenție:''' [[Special:WhatLinksHere/{{FULLPAGENAME}}|Alte pagini]] se leagă sau transclud pagina pe care doriți să o ștergeți.",
+       "deleting-backlinks-warning": "<strong>Atenție:</strong> [[Special:WhatLinksHere/{{FULLPAGENAME}}|Alte pagini]] se leagă sau transclud pagina pe care doriți să o ștergeți.",
        "rollback": "Editări de revenire",
        "rollbacklink": "revenire",
        "rollbacklinkcount": "revenire asupra {{PLURAL:$1|unei modificări|a $1 modificări|a $1 de modificări}}",
        "sp-contributions-username": "Adresă IP sau nume de utilizator:",
        "sp-contributions-toponly": "Afișează numai versiunile recente",
        "sp-contributions-newonly": "Afișează numai modificările care au dus la crearea de pagini",
+       "sp-contributions-hideminor": "Ascunde modificările minore",
        "sp-contributions-submit": "Căutare",
        "whatlinkshere": "Ce trimite aici",
        "whatlinkshere-title": "Pagini care conțin legături spre „$1”",
        "recreate": "Recreează",
        "confirm_purge_button": "OK",
        "confirm-purge-top": "Doriți să reîncărcați pagina?",
-       "confirm-purge-bottom": "Actualizaea unei pagini șterge cache-ul și forțează cea mai recentă variantă să apară.",
+       "confirm-purge-bottom": "Actualizarea unei pagini șterge cache-ul și forțează cea mai recentă variantă să apară.",
        "confirm-watch-button": "OK",
        "confirm-watch-top": "Adăugați această pagină la lista de pagini urmărite?",
        "confirm-unwatch-button": "OK",
        "autosumm-replace": "Pagină înlocuită cu „$1”",
        "autoredircomment": "Redirecționat înspre [[$1]]",
        "autosumm-new": "Pagină nouă: $1",
-       "autosumm-newblank": "A creat o pagină goală",
+       "autosumm-newblank": "Creat o pagină goală",
        "size-bytes": "{{PLURAL:$1|un octet|$1 octeți|$1 de octeți}}",
        "size-pixel": "$1 {{PLURAL:$1|pixel|pixeli|de pixeli}}",
        "lag-warn-normal": "Modificările mai noi de $1 {{PLURAL:$1|secondă|seconde}} pot să nu apară în listă.",
        "htmlform-title-not-exists": "$1 nu există.",
        "htmlform-user-not-exists": "<strong>$1</strong> nu există.",
        "htmlform-user-not-valid": "<strong>$1</strong> nu este un nume de utilizator valid.",
-       "sqlite-has-fts": "$1 cu suport de căutare în tot textul",
-       "sqlite-no-fts": "$1 fără suport de căutare în tot textul",
        "logentry-delete-delete": "$1 {{GENDER:$2|a șters}} pagina $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|a restaurat}} pagina $3",
        "logentry-delete-event": "$1 {{GENDER:$2|a schimbat}} vizibilitatea {{PLURAL:$5|unui eveniment din jurnal|a $5 evenimente din jurnal|a $5 de evenimente din jurnal}} pentru $3: $4",
        "feedback-external-bug-report-button": "Semnalare problemă tehnică",
        "feedback-dialog-title": "Trimitere păreri",
        "feedback-dialog-intro": "Puteți folosi formularul simplificat de mai jos pentru a vă trimite părerile. Comentariul dumneavoastră va fi adăugat în pagina „$1”, alături de numele dumneavoastră de utilizator.",
-       "feedback-error-title": "Eroare",
        "feedback-error1": "Eroare: Rezultat necunoscut de la API",
        "feedback-error2": "Eroare: editarea nu a reușit",
        "feedback-error3": "Eroare: Niciun răspuns de la API",
        "log-action-filter-rights-rights": "Modificare manuală",
        "log-action-filter-rights-autopromote": "Schimbare automată",
        "log-action-filter-upload-upload": "Încărcare nouă",
-       "log-action-filter-upload-overwrite": "Reîncărcare"
+       "log-action-filter-upload-overwrite": "Reîncărcare",
+       "linkaccounts-submit": "Leagă conturile",
+       "unlinkaccounts": "Dezleagă conturile",
+       "unlinkaccounts-success": "Contul a fost dezlegat"
 }
index e9da190..9a10860 100644 (file)
        "tog-enotifminoredits": "Уведомлять даже при незначительных изменениях страниц и файлов",
        "tog-enotifrevealaddr": "Показывать мой почтовый адрес в сообщениях оповещения",
        "tog-shownumberswatching": "Показывать число участников, включивших страницу в свой список наблюдения",
-       "tog-oldsig": "Текущая подпись:",
+       "tog-oldsig": "Ð\92аÑ\88а Ñ\82екущая подпись:",
        "tog-fancysig": "Собственная вики-разметка подписи (без автоматической ссылки)",
        "tog-uselivepreview": "Использовать быстрый предварительный просмотр",
        "tog-forceeditsummary": "Предупреждать, когда не заполнено поле описания правки",
        "newwindow": "&nbsp;(в новом окне)",
        "cancel": "Отменить",
        "moredotdotdot": "Далее…",
-       "morenotlisted": "ЭÑ\82оÑ\82 Ñ\81пиÑ\81ок Ð½ÐµÐ¿Ð¾Ð»Ð¾Ð½.",
+       "morenotlisted": "ЭÑ\82оÑ\82 Ñ\81пиÑ\81ок Ð¼Ð¾Ð¶ÐµÑ\82 Ð±Ñ\8bÑ\82Ñ\8c Ð½ÐµÐ¿Ð¾Ð»Ð½Ñ\8bм.",
        "mypage": "Страница",
        "mytalk": "Обсуждение",
        "anontalk": "Обсуждение",
        "talk": "Обсуждение",
        "views": "Просмотры",
        "toolbox": "Инструменты",
+       "tool-link-userrights": "Изменить группы {{GENDER:$1|участника|участницы}}",
+       "tool-link-emailuser": "Написать письмо {{GENDER:$1|участнику|участнице}}",
        "userpage": "Просмотреть страницу участника",
        "projectpage": "Просмотреть страницу проекта",
        "imagepage": "Просмотреть страницу файла",
        "eauthentsent": "На указанный адрес электронной почты отправлено письмо. \nЧтобы получать письма в дальнейшем, следуйте изложенным там инструкциям для подтверждения, что этот адрес действительно принадлежит вам.",
        "throttled-mailpassword": "Функция напоминания пароля уже использовалась в течение {{PLURAL:$1|1=последнего часа|последних $1 часов}}.\nДля предотвращения злоупотреблений, разрешено запрашивать не более одного напоминания {{PLURAL:$1|за $1 час|за $1 часов|за $1 часа|1=в час}}.",
        "mailerror": "Ошибка при отправке почты: $1",
-       "acct_creation_throttle_hit": "Ð\97а Ñ\81Ñ\83Ñ\82ки Ñ\81 Ð²Ð°Ñ\88его IP-адÑ\80еÑ\81а {{PLURAL:$1|бÑ\8bла Ñ\81оздана $1 Ñ\83Ñ\87Ñ\91Ñ\82наÑ\8f Ð·Ð°Ð¿Ð¸Ñ\81Ñ\8c|бÑ\8bло Ñ\81оздано $1 Ñ\83Ñ\87Ñ\91Ñ\82нÑ\8bÑ\85 Ð·Ð°Ð¿Ð¸Ñ\81ей|бÑ\8bли Ñ\81озданÑ\8b $1 Ñ\83Ñ\87Ñ\91Ñ\82нÑ\8bÑ\85 Ð·Ð°Ð¿Ð¸Ñ\81и|1=Ñ\83же Ð±Ñ\8bла Ñ\81оздана Ñ\83Ñ\87Ñ\91Ñ\82наÑ\8f Ð·Ð°Ð¿Ð¸Ñ\81Ñ\8c}} — это предельное количество для данного отрезка времени.\nВ результате, пользователи с этим IP-адресом в данный момент больше не могут создавать новых учётных записей.",
+       "acct_creation_throttle_hit": "Ð\9fоÑ\81еÑ\82иÑ\82ели Ñ\81 Ð²Ð°Ñ\88его IP-адÑ\80еÑ\81а {{PLURAL:$1|бÑ\8bла Ñ\81оздана $1 Ñ\83Ñ\87Ñ\91Ñ\82наÑ\8f Ð·Ð°Ð¿Ð¸Ñ\81Ñ\8c|бÑ\8bло Ñ\81оздано $1 Ñ\83Ñ\87Ñ\91Ñ\82нÑ\8bÑ\85 Ð·Ð°Ð¿Ð¸Ñ\81ей|бÑ\8bли Ñ\81озданÑ\8b $1 Ñ\83Ñ\87Ñ\91Ñ\82нÑ\8bÑ\85 Ð·Ð°Ð¿Ð¸Ñ\81и}} Ð·Ð° Ð¿Ð¾Ñ\81ледние $2 — это предельное количество для данного отрезка времени.\nВ результате, пользователи с этим IP-адресом в данный момент больше не могут создавать новых учётных записей.",
        "emailauthenticated": "Ваш адрес электронной почты подтверждён $2 в $3.",
        "emailnotauthenticated": "Ваш адрес электронной почты ещё не был подтверждён.\nПисьма не будут отправляться ни для одной из следующий функций.",
        "noemailprefs": "Адрес электронной почты не был указан, функции вики-движка по работе с эл. почтой отключены.",
        "botpasswords-label-resetpassword": "Сбросить пароль",
        "botpasswords-label-grants": "Применимые разрешения:",
        "botpasswords-help-grants": "Каждое разрешение даёт доступ к перечисленным правам участника, которые уже есть у учётной записи участника. См. [[Special:ListGrants|таблицу разрешений]] для получения дополнительной информации.",
-       "botpasswords-label-restrictions": "Ограничения на использование:",
        "botpasswords-label-grants-column": "Разрешено",
        "botpasswords-bad-appid": "Имя бота «$1» является недопустимым.",
        "botpasswords-insert-failed": "Не удалось добавить бота с именем «$1». Возможно, он был уже добавлен?",
        "passwordreset-emailelement": "Имя участника: \n$1\n\nВременный пароль: \n$2",
        "passwordreset-emailsentemail": "Если это адрес электронной почты связан с вашей учётной записью, вам будет отправлено письмо для сброса пароля.",
        "passwordreset-emailsentusername": "Если есть адрес электронной почты, связанный с этим именем участника, то будет отправлено письмо для восстановления пароля.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Ð\9fиÑ\81Ñ\8cмо|Ð\9fиÑ\81Ñ\8cма}} Ð´Ð»Ñ\8f Ñ\81бÑ\80оÑ\81а Ð¿Ð°Ñ\80олÑ\8f {{PLURAL:$1|бÑ\8bло Ð¾Ñ\82пÑ\80авлено|бÑ\8bли Ð¾Ñ\82пÑ\80авленÑ\8b}}. {{PLURAL:$1|Ð\9bогин Ð¸ Ð¿Ð°Ñ\80олÑ\8c Ð¿Ð¾ÐºÐ°Ð·Ð°Ð½Ñ\8b|СпиÑ\81ок Ð»Ð¾Ð³Ð¸Ð½Ð¾Ð² Ð¸ Ð¿Ð°Ñ\80олей Ð¿Ð¾ÐºÐ°Ð·Ð°Ð½}} Ð½Ð¸Ð¶Ðµ.",
-       "passwordreset-emailerror-capture2": "Отправка {{GENDER:$2|участнику}} письма по электронной почте не удалась: $1 В {{PLURAL:$3|логин и пароль показаны|список логинов и паролей показан}} ниже.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Ð\9fиÑ\81Ñ\8cмо|Ð\9fиÑ\81Ñ\8cма}} Ð´Ð»Ñ\8f Ñ\81бÑ\80оÑ\81а Ð¿Ð°Ñ\80олÑ\8f {{PLURAL:$1|бÑ\8bло Ð¾Ñ\82пÑ\80авлено|бÑ\8bли Ð¾Ñ\82пÑ\80авленÑ\8b}}. {{PLURAL:$1|Ð\9bогин Ð¸ Ð¿Ð°Ñ\80олÑ\8c Ð¿Ð¾ÐºÐ°Ð·Ð°Ð½Ñ\8b|СпиÑ\81ок Ð»Ð¾Ð³Ð¸Ð½Ð¾Ð² Ð¸ Ð¿Ð°Ñ\80олей Ð¿Ð¾ÐºÐ°Ð·Ð°Ð½}} Ð·Ð´ÐµÑ\81Ñ\8c.",
+       "passwordreset-emailerror-capture2": "Отправка {{GENDER:$2|участнику|участнице}} письма по электронной почте не удалась: $1\n{{PLURAL:$3|Логин и пароль показаны|Список логинов и паролей показан}} здесь.",
        "passwordreset-nocaller": "Должен быть предоставлен источник вызова",
        "passwordreset-nosuchcaller": "Источник вызова не существует: $1",
        "passwordreset-ignored": "Сброс пароля не был обработан. Может быть, не был настроен ни один провайдер?",
        "minoredit": "Малое изменение",
        "watchthis": "Следить за этой страницей",
        "savearticle": "Записать страницу",
-       "savechanges": "СоÑ\85Ñ\80аниÑ\82Ñ\8c Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ\8f",
+       "savechanges": "Ð\97апиÑ\81аÑ\82Ñ\8c Ñ\81Ñ\82Ñ\80аниÑ\86Ñ\83",
        "publishpage": "Создать страницу",
        "publishchanges": "Записать страницу",
        "preview": "Предпросмотр",
        "content-model-css": "CSS",
        "content-json-empty-object": "Пустой объект",
        "content-json-empty-array": "Пустой массив",
-       "deprecated-self-close-category": "Страницы, использующие недопустимые самозакрывающеся HTML-теги",
+       "deprecated-self-close-category": "СÑ\82Ñ\80аниÑ\86Ñ\8b, Ð¸Ñ\81полÑ\8cзÑ\83Ñ\8eÑ\89ие Ð½ÐµÐ´Ð¾Ð¿Ñ\83Ñ\81Ñ\82имÑ\8bе Ñ\81амозакÑ\80Ñ\8bваÑ\8eÑ\89иеÑ\81Ñ\8f HTML-Ñ\82еги",
        "deprecated-self-close-category-desc": "Страница содержит недопустимые самозакрывающиеся HTML-теги, такие как <code>&lt;b/></code> или <code>&lt;span/></code>. В скором времени их действие изменится, чтобы соответствовать спецификации HTML5, так что использование этих устаревших тегов в вики-тексте нежелательно.",
        "duplicate-args-warning": "<strong>Внимание:</strong> [[:$1]] вызывает [[:$2]] с более чем одним значением параметра «$3». Будет использовано только последнее указанное значение.",
        "duplicate-args-category": "Страницы, использующие повторяющиеся аргументы в вызовах шаблонов",
        "upload-dialog-disabled": "На этом вики-сайте отключена возможность загрузки файлов с помощью этого диалогового окна.",
        "upload-dialog-title": "Загрузить файл",
        "upload-dialog-button-cancel": "Отменить",
+       "upload-dialog-button-back": "Назад",
        "upload-dialog-button-done": "Готово",
        "upload-dialog-button-save": "Сохранить",
        "upload-dialog-button-upload": "Загрузить",
        "apisandbox-results-fixtoken-fail": "Не удалось вызвать токен «$1».",
        "apisandbox-alert-page": "Поля на этой странице некорректны.",
        "apisandbox-alert-field": "Значение этого поля является недопустимым.",
+       "apisandbox-continue": "Продолжить",
+       "apisandbox-continue-clear": "Очистить",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries продолжит] последний запрос; {{int:apisandbox-continue-clear}} очистит связанные с продолжением параметры.",
        "booksources": "Источники книг",
        "booksources-search-legend": "Поиск информации о книге",
        "booksources-isbn": "ISBN:",
        "movelogpagetext": "Ниже представлен список переименованных страниц.",
        "movesubpage": "{{PLURAL:$1|1=Подстраница|Подстраницы}}",
        "movesubpagetext": "У этой страницы $1 {{PLURAL:$1|подстраница|подстраницы|подстраниц}}.",
+       "movesubpagetalktext": "У соответствующей страницы обсуждения есть $1 {{PLURAL:$1|подстраница, показанная |подстраниц, показанных|подстраницы, показанные}} ниже.",
        "movenosubpage": "У этой страницы нет подстраниц.",
        "movereason": "Причина:",
        "revertmove": "возврат",
        "pageinfo-category-pages": "Количество страниц",
        "pageinfo-category-subcats": "Количество подкатегорий",
        "pageinfo-category-files": "Количество файлов",
+       "pageinfo-user-id": "Идентификатор участника",
        "markaspatrolleddiff": "Отметить как проверенную",
        "markaspatrolledtext": "Отметить эту статью как проверенную",
        "markaspatrolledtext-file": "Пометить эту версию файла как отпатрулированную",
        "newimages-showbots": "Показать загрузки ботов",
        "newimages-hidepatrolled": "Скрыть отпатрулированные загрузки",
        "noimages": "Изображения отсутствуют.",
+       "gallery-slideshow-toggle": "Переключить миниатюры",
        "ilsubmit": "Найти",
        "bydate": "по дате",
        "sp-newimages-showfrom": "Показать новые файлы, начиная с $2, $1",
        "tag-filter": "Фильтр [[Special:Tags|меток]]:",
        "tag-filter-submit": "Отфильтровать",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|1=Метка|Метки}}]]: $2)",
+       "tag-mw-contentmodelchange": "изменение модели содержимого",
+       "tag-mw-contentmodelchange-description": "Правки, которые [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel изменяют модель содержимого] страницы",
        "tags-title": "Метки",
        "tags-intro": "На этой странице приведён список меток, которыми программное обеспечение отмечает правки, а также значения этих меток.",
        "tags-tag": "Имя метки",
        "tags-actions-header": "Действия",
        "tags-active-yes": "Да",
        "tags-active-no": "Нет",
-       "tags-source-extension": "Определяется расширением",
+       "tags-source-extension": "Определяется программным обеспечением",
        "tags-source-manual": "Вносятся вручную участниками и ботами",
        "tags-source-none": "Больше не используется",
        "tags-edit": "править",
        "htmlform-cloner-create": "Добавить ещё",
        "htmlform-cloner-delete": "Удалить",
        "htmlform-cloner-required": "Требуется по крайней мере одно значение.",
+       "htmlform-date-placeholder": "ГГГГ-ММ-ДД",
+       "htmlform-time-placeholder": "ЧЧ:ММ:СС",
+       "htmlform-datetime-placeholder": "ГГГГ-ММ-ДД ЧЧ:ММ:СС",
+       "htmlform-date-invalid": "Указанное вами значение не похоже на дату. Попробуйте использовать формат ГГГГ-ММ-ДД.",
+       "htmlform-time-invalid": "Указанное вами значение не похоже на время. Попробуйте использовать формат ЧЧ-ММ-СС.",
+       "htmlform-datetime-invalid": "Указанное вами значение не похоже на дату и время. Попробуйте использовать формат ГГГГ-ММ-ДД ЧЧ-ММ-СС.",
+       "htmlform-date-toolow": "Указанное вами значение меньше самой ранней разрешённой даты — $1.",
+       "htmlform-date-toohigh": "Указанное вами значение больше самой поздней разрешённой даты — $1.",
+       "htmlform-time-toolow": "Указанное вами значение меньше самого раннего разрешённого времени — $1.",
+       "htmlform-time-toohigh": "Указанное вами значение больше самого позднего разрешённого времени — $1.",
+       "htmlform-datetime-toolow": "Указанное вами значение меньше самым ранних разрешённых даты и времени — $1.",
+       "htmlform-datetime-toohigh": "Указанное вами значение больше самых поздних разрешённых даты и времени — $1.",
        "htmlform-title-badnamespace": "[[:$1]] находится не в пространстве имён «{{ns:$2}}».",
        "htmlform-title-not-creatable": "«$1» — заголовок страницы, которая не может быть создана",
        "htmlform-title-not-exists": "$1 не существует.",
        "htmlform-user-not-exists": "<strong>$1</strong> не существует.",
        "htmlform-user-not-valid": "<strong>$1</strong> — недопустимое имя учётной записи.",
-       "sqlite-has-fts": "$1 с поддержкой полнотекстового поиска",
-       "sqlite-no-fts": "$1 без поддержки полнотекстового поиска",
        "logentry-delete-delete": "$1 {{GENDER:$2|удалил|удалила}} страницу $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|восстановил|восстановила}} страницу $3",
        "logentry-delete-event": "$1 {{GENDER:$2|изменил|изменила}} видимость {{PLURAL:$5|$5 записи|$5 записей|1=записи}} журнала для $3: $4",
        "feedback-external-bug-report-button": "Отправить техническое задание",
        "feedback-dialog-title": "Отправить отзыв",
        "feedback-dialog-intro": "Вы можете воспользоваться простой формой ниже, чтобы оставить свой отзыв. Комментарий с вашим именем участника будет добавлен на страницу «$1».",
-       "feedback-error-title": "Ошибка",
        "feedback-error1": "Ошибка. Неизвестный результат из API",
        "feedback-error2": "Ошибка. Сбой редактирования",
        "feedback-error3": "Ошибка. Нет ответа от API",
        "feedback-thanks": "Спасибо! Ваш отзыв размещён на странице «[$2 $1]».",
        "feedback-thanks-title": "Спасибо!",
        "feedback-useragent": "Браузер:",
-       "searchsuggest-search": "Ð\9fоиÑ\81к",
+       "searchsuggest-search": "Ð\98Ñ\81каÑ\82Ñ\8c Ð² {{grammar:prepositional|{{SITENAME}}}}",
        "searchsuggest-containing": "содержащие…",
        "api-error-autoblocked": "Ваш IP-адрес был автоматически заблокирован, потому что он был использован заблокированным участником.",
        "api-error-badaccess-groups": "Вам не разрешено загружать файлы в эту вики.",
        "unlinkaccounts-success": "Учетная запись была отвязан.",
        "authenticationdatachange-ignored": "Изменение данных для проверки подлинности не было обработано. Может быть, не был настроен ни один провайдер?",
        "userjsispublic": "Обратите внимание: подстраницы JavaScript не должны содержать конфиденциальные сведения, поскольку они доступны для просмотра другим участникам.",
-       "usercssispublic": "Обратите внимание: подстраницы CSS не должны содержать конфиденциальные сведения, поскольку они доступны для просмотра другим участникам."
+       "usercssispublic": "Обратите внимание: подстраницы CSS не должны содержать конфиденциальные сведения, поскольку они доступны для просмотра другим участникам.",
+       "restrictionsfield-badip": "Недопустимый IP-адрес или диапазон адресов: $1",
+       "restrictionsfield-label": "Разрешённые диапазоны IP-адресов:",
+       "restrictionsfield-help": "По одному IP-адресу или CIDR-диапазону в строке. Чтобы разрешить всё, используйте <br /><code>0.0.0.0/0</code><br /><code>::/0</code>",
+       "edit-error-short": "Ошибка: $1",
+       "edit-error-long": "Ошибки: $1"
 }
index 8f664fc..9591937 100644 (file)
        "minoredit": "इदं लघु सम्पादनम्",
        "watchthis": "इदं पृष्ठं निरीक्षताम्",
        "savearticle": "पृष्ठं रक्ष्यताम्",
+       "savechanges": "परिवर्तनानि रक्ष्यन्ताम्",
        "publishpage": "पृष्ठं प्रकाश्यताम्",
        "publishchanges": "परिवर्तनानि प्रकाश्यन्ताम्",
        "preview": "प्राग्दृश्यम्",
        "htmlform-cloner-create": "अधिकं योज्यताम्",
        "htmlform-cloner-delete": "निष्कास्यताम्",
        "htmlform-cloner-required": "न्यूनातिन्यूनम् एकं मूल्यम् अपेक्ष्यते ।",
-       "sqlite-has-fts": "$1 अन्वेषणसमर्थपूर्णपाठेन सह",
-       "sqlite-no-fts": "$1 अन्वेषणसमर्थपूर्णपाठेन विना",
        "logentry-delete-delete": "$1 {{GENDER:$2|अपाकृतं}} पृष्ठं $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|पुनस्स्थापितं}} पृष्ठं $3",
        "logentry-delete-event": "$3: $4 इत्यत्र {{PLURAL:$5|संरक्षिताऽऽवलेः घटनायाः|$5 संरक्षिताऽऽवलीनां घटनानां}} दर्शनीयता $1 द्वारा {{GENDER:$2|परिवर्तिता}}",
index 4dca72d..598e10d 100644 (file)
@@ -15,7 +15,8 @@
                        "Macofe",
                        "Matma Rex",
                        "Мария Олесова",
-                       "Ай-Куо"
+                       "Ай-Куо",
+                       "Туллук"
                ]
        },
        "tog-underline": "Сигэлэри аннынан тардыы:",
@@ -42,7 +43,7 @@
        "tog-enotifminoredits": "Кыра да уларытыы киирдэҕинэ эл. почтанан биллэрээр",
        "tog-enotifrevealaddr": "Мин почтам аадырыһын биллэриилэргэ көрдөр",
        "tog-shownumberswatching": "Сирэйи кэтээн көрөр дьон ахсаанын көрдөр",
-       "tog-oldsig": "Билиҥҥи илии баттааһын:",
+       "tog-oldsig": "Билигин туттар илии баттааһынын",
        "tog-fancysig": "Бэйэ илии баттааһына (сигэтэ суох)",
        "tog-uselivepreview": "Хайдах буолуохтааҕын тутатына эрдэ көрүүнү туттуу",
        "tog-forceeditsummary": "Тугу уларыппытым туһунан суруйбатахпына сэрэт",
        "yourpasswordagain": "Киирии тылгын хатылаа:",
        "createacct-yourpasswordagain": "Киирии тылгын бигэргэт",
        "createacct-yourpasswordagain-ph": "Киирии тылгын хатылаа",
-       "remembermypassword": "Миигин бу көмпүүтэргэ сигээ ($1 {{PLURAL:$1|күн|күнтэн ордуга суох}})",
        "userlogin-remembermypassword": "Тиһиликтэн тахсыма",
        "userlogin-signwithsecure": "Бигэ холбонуу",
        "cannotloginnow-title": "Сип-билигин киирэр кыах суох",
        "botpasswords-label-resetpassword": "Аһарыгы саҥаттан",
        "botpasswords-label-grants": "Туттуллар көҥүллэр:",
        "botpasswords-help-grants": " Кыттааччы учуоттуур суруйуутугар баар ыйыллыбыт кыттааччы быраабыгар киирэргэ кыах биэрэр. к. [[Special:ListGrants|көҥүллэр табылыыссаларын]] эбии информацияны ылар туһугар.",
-       "botpasswords-label-restrictions": "Туттарга хааччахтаах:",
        "botpasswords-label-grants-column": "Көҥүллэннэ",
        "botpasswords-bad-appid": "Маннык аат «$1» сатаммат.",
        "botpasswords-insert-failed": "«$1» диэн ааттаах оруобаты эбэр табыллыбата. Баҕар хайыы-үйэ эбиллибитэ буолаарай?",
        "tag-filter": "[[Special:Tags|Бэлиэлэр]] фильтрдара:",
        "tag-filter-submit": "Фильтр",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Тиэк|Тиэктэр}}]]: $2)",
+       "tag-mw-contentmodelchange": "Иһинээҕи киэбин уларытыы сурунаала",
        "tags-title": "Бэлиэлэр (тиэктэр)",
        "tags-intro": "Бу сирэйгэ бырагыраамма уларытыылары бэлиэтиир анал бэлиэлэрин (тиэктэрин) тиһиктэрэ уонна ол бэлиэлэр суолталара көстөр.",
        "tags-tag": "Бэлиэ (тиэк) аата",
        "htmlform-title-not-exists": "$1 суох.",
        "htmlform-user-not-exists": "<strong>$1</strong> суох.",
        "htmlform-user-not-valid": "<strong>$1</strong> — маннык аат сатаммат.",
-       "sqlite-has-fts": "$1 толору тиэкистээх көрдөөһүнү өйүүр",
-       "sqlite-no-fts": "$1 толору тиэкистээх көрдөөһүнү өйөөбөт",
        "logentry-delete-delete": "$3 сирэйи $1 соппут",
        "logentry-delete-restore": "$3 сирэйи $1 сөргүппүт",
        "logentry-delete-event": "Сурунаал $5 суругун көстүүтүн манна $3 $1 уларыппыт: $4",
index 15d45cf..f3a4340 100644 (file)
        "tog-showtoolbar": "سنوار اوزار ڏيکاريو",
        "tog-editondblclick": "ٻٽي ڪلڪ تي صفحا سنواريو",
        "tog-watchcreations": "منهنجا سرجيل صفحا ۽ منهنجا چاڙهيل فائيل منهنجي زيرِ نظر فهرست تي رکو",
-       "tog-watchdefault": "منهنجا ترميميل صفحا ۽ فائيل  منهنجي زير نظر فهرست تي رکو",
-       "tog-watchmoves": "جيڪي صفحا ۽ فائيل آءُٗ چوريان، سي منهنجي زير نظر فهرست ۾ شامل ڪريو.",
-       "tog-watchdeletion": "آءُٗ جيڪي صفحا ۽ فائيل  ڊاهيان، سي منهنجي زير نظر فهرست تي رکو",
-       "tog-watchrollback": "انهن صفحن کي منهنجي زير نظر فهرست تي رکو، جن ۾ تبديلين کي مون واپس ورايو آهي.",
+       "tog-watchdefault": "منهنجا ترميميل صفحا ۽ فائيل  منهنجي نظرھيٺ فھرست ۾ رکو",
+       "tog-watchmoves": "جيڪي صفحا ۽ فائيل آءُٗ چوريان، سي منهنجي نظرھيٺ فھرست ۾ شامل ڪريو.",
+       "tog-watchdeletion": "آءُٗ جيڪي صفحا ۽ فائيل  ڊاهيان، سي منهنجي نظرھيٺ فھرست تي رکو",
+       "tog-watchrollback": "انهن صفحن کي منهنجي نظرھيٺ فھرست تي رکو، جن ۾ تبديلين کي مون واپس ورايو آهي.",
        "tog-minordefault": "سمورين تبديلين کي بنان چئي معمولي ترميم تصور ڪريو",
-       "tog-previewontop": "ترÙ\85Ù\8aÙ\85Ù\8a Ø¨Ø§ÚªØ³ Ù\85ٿاÙ\86 Ù¾Ù\8aØ´ Ù\86گاÙ\87Û\81 ڏيکاريو",
-       "tog-previewonfirst": "پهرين ترميم تي پيش نگاهہ ڏيکاريو",
-       "tog-enotifwatchlistpages": "مونکي ايميل ڪريو جڏهن منهنجي زير نظر فهرست ڪا صفحو يا فائيل تبديل ڪيو وڃي",
+       "tog-previewontop": "ترÙ\85Ù\8aÙ\85Ù\8a Ø¯Ù»Ù\8a Ù\85ٿاÙ\86 Ù¾Ù\8aØ´ Ù\86گاھ ڏيکاريو",
+       "tog-previewonfirst": "پهرين ترميم تي پيش نگاھ ڏيکاريو",
+       "tog-enotifwatchlistpages": "مون کي ايميل ڪريو جڏهن منهنجي نظرھيٺ فھرست ۾ ڪو صفحو يا فائيل تبديل ڪيو وڃي",
        "tog-enotifusertalkpages": "منهنجي مباحثي صفحي ۾ تبديليءَ جي صورت ۾ مون کي برق ٽپال اماڻيو",
        "tog-enotifminoredits": "صفحن ۾ معمولي ترميمن جي صورت ۾ بہ مون کي برق ٽپال ڪريو",
        "tog-enotifrevealaddr": "پڌراين ۾ منهنجو برق ٽپال پتو ظاهر ڪريو.",
        "tog-shownumberswatching": "ڏسندڙ يوزرس جو انگ ڏيکاريو",
-       "tog-oldsig": "موجوده دستخط",
+       "tog-oldsig": "توھان جو موجوده دستخط:",
+       "tog-fancysig": "صحيح کي وڪيٽيڪسٽ سمجھو (ڪنھن خوڪار ڳنڍڻي کانسواءِ)",
        "tog-uselivepreview": "سڌي سنئين پيش نگاھہ استعمال ڪريو",
        "tog-watchlisthideown": "زير نظر فهرست مان منهنجون ڪيل ترميمون لڪايو",
        "tog-watchlisthidebots": "ٽيٽ فهرست تان بوٽ جون ترميمون لڪايو",
        "tog-watchlisthideminor": "ٽيٽ فهرست تان معمولي ترميمون لڪايو",
        "tog-watchlisthideliu": "لاگ اِن ٿيل يوزرس جون ڪيل ترميمون زيرنظر فهرست ۾ نہ ڏيکاريو",
        "tog-watchlisthideanons": "ٽيٽ فهرست تان اڻڄاتل يوزر جون ترميمون لڪايو",
+       "tog-watchlisthidepatrolled": "نظرھيٺ فھرست مان گشت ڪيل ترميمون لڪايو",
        "tog-watchlisthidecategorization": "صفحن جا زمرا لڪايو",
        "tog-ccmeonemails": "ٻين يوزرس ڏانهن منهنجي موڪليل برق ٽپال جو پرت مون کي اماڻيو",
        "tog-diffonly": "تفاوت هيٺان صفحي جو مواد نہ ڏيکاريو",
        "tog-showhiddencats": "لڪل زمرا ڏيکاريو",
        "tog-useeditwarning": "مونکي خبردار ڪريو جڏهن مان هڪ ترميم وارو صفحو بغير تبديلين سانڍڻ جي ڇڏيان",
-       "tog-prefershttps": "هميشه محفوظ ڪنيڪشن استعمال ڪريو جڏهن لاگ اِن ٿيل هجو",
+       "tog-prefershttps": "هميشہ محفوظ ڪنيڪشن استعمال ڪريو جڏهن داخل ٿيل هجو",
        "underline-always": "هميشہ",
        "underline-never": "ڪڏهن بہ نہ",
        "editfont-style": "ايراضي جو فونٽ اسٽائيل سنواريو:",
+       "editfont-sansserif": "سينس-سيرف فونٽ",
        "editfont-serif": "سيرِف اِنڊو",
        "sunday": "آچر",
        "monday": "سومر",
@@ -67,8 +70,8 @@
        "march": "مارچ",
        "april": "اپريل",
        "may_long": "مَئي",
-       "june": "جÙ\8fÙ\88Ù\86Ù\90",
-       "july": "جÙ\8fÙ\88Ù\84اءÙ\90",
+       "june": "جÙ\88Ù\86",
+       "july": "جولاءِ",
        "august": "آگسٽ",
        "september": "سيپٽمبر",
        "october": "آڪٽوبر",
@@ -80,7 +83,7 @@
        "april-gen": "اپريل",
        "may-gen": "مَئي",
        "june-gen": "جُونِ",
-       "july-gen": "جÙ\8fÙ\88Ù\84اءÙ\90",
+       "july-gen": "جولاءِ",
        "august-gen": "آگسٽ",
        "september-gen": "سيپٽمبر",
        "october-gen": "آڪٽوبر",
@@ -90,9 +93,9 @@
        "feb": "فيبروري",
        "mar": "مارچ",
        "apr": "اپريل",
-       "may": "مَئي",
-       "jun": "جÙ\8fÙ\88Ù\86Ù\90",
-       "jul": "جÙ\8fÙ\88Ù\84اءÙ\90",
+       "may": "مئي",
+       "jun": "جÙ\88Ù\86",
+       "jul": "جولاءِ",
        "aug": "آگسٽ",
        "sep": "سيپٽمبر",
        "oct": "آڪٽوبر",
        "august-date": "آگسٽ $1",
        "september-date": "سيپٽمبر $1",
        "october-date": "آڪٽوبر $1",
-       "november-date": "Ù\86Ù\8eÙ\88Ù\90مبر $1",
+       "november-date": "Ù\86Ù\88مبر $1",
        "december-date": "ڊسمبر $1",
        "period-am": "صبح جو",
        "period-pm": "منجھند کان بعد",
        "category-article-count-limited": "هيٺِون {{PLURAL:$1|صفحو آهي|$1 صفحا آهن}} تازي زمري ۾.",
        "category-file-count": "{{PLURAL:$2|هن زمري ۾ صرف هيٺيون فائيل آهي.|هيٺيون يا هيٺيان {{PLURAL:$1|فائيل آهي|$1 فائيل آهن}} هن زمري ۾، سمورن $2 مان.}}",
        "category-file-count-limited": "هيٺيون يا هيٺيان {{PLURAL:$1|فائيل آهي|$1 فائيل آهن}} هن تازي زمري ۾.",
-       "listingcontinuesabbrev": "جاري..",
+       "listingcontinuesabbrev": "جاري.",
        "index-category": "ڏسڻيل صفحا",
        "noindex-category": "غيرڏسڻيل صفحا",
        "broken-file-category": "فائيل جي ٽٽل ڳنڍڻن وارا صفحا",
        "newwindow": "(نئين دريءَ ۾ کلندو)",
        "cancel": "رد",
        "moredotdotdot": "اڃا...",
-       "morenotlisted": "فهرست مڪمل ڪانهي.",
+       "morenotlisted": "ھي فھرست نامڪمل بہ ٿي سگھي ٿي.",
        "mypage": "منهنجو صفحو",
-       "mytalk": "ڳالهہ ٻول",
-       "anontalk": "ڳالھ ٻولھ",
+       "mytalk": "بحث",
+       "anontalk": "بحث",
        "navigation": "رهنمائي",
        "and": "&#32؛۽",
        "qbfind": "ڳوليو",
        "faq": "ڪپس",
        "faqpage": "Project:ڪپوس",
        "actions": "فعل",
-       "namespaces": "نانءُ پولار:",
+       "namespaces": "نانءُپولارَ",
        "variants": "بَدَلَ",
        "navigation-heading": "رهنما مينيو",
        "errorpagetitle": "چُڪَ",
        "search": "ڳولا",
        "searchbutton": "ڳوليو",
        "go": "کوليو",
-       "searcharticle": "کوليو",
+       "searcharticle": "وڃو",
        "history": "صفحي جي سوانح",
        "history_short": "سوانح",
        "printableversion": "ڇپائتو پرت",
        "permalink": "مسقتل ڳنڍڻو",
        "print": "ڇاپيو",
-       "view": "نگاهہ",
+       "view": "ڏسو",
        "view-foreign": "$1 تي ڏسو",
        "edit": "سنواريو",
        "edit-local": "مقامي تشريح کي ترميميو",
        "talk": "بحث",
        "views": "ڏيٺون",
        "toolbox": "اوزارَ",
+       "tool-link-userrights": "{{GENDER:$1|يوزر}} گروھ تبديل ڪريو",
+       "tool-link-emailuser": "ھن {{GENDER:$1|يوزر}} ڏانھن برقٽپال موڪليو",
        "userpage": "يوزر صفحو ڏسو",
        "projectpage": "رٿائي صفحو ڏسو",
        "imagepage": "ذريعاتي صفحو ڏسو",
        "otherlanguages": "ٻين ٻولين ۾",
        "redirectedfrom": "($1 کان چوريل)",
        "redirectpagesub": "چوريل صفحو",
-       "redirectto": "ڏانهن چوريو",
+       "redirectto": "ڏانھن چوريو:",
        "lastmodifiedat": "هيءُ صفحو آخري دفعو $2، $1ع تي سنواريو ويو هو.",
        "viewcount": "هيءُ صفحو {{PLURAL:$1|دفعو|$1 دفعا}} ڏسجي چڪو آهي.",
        "protectedpage": "تحفظيل صفحو",
-       "jumpto": "ڏانهن ٽپ ڏيو",
+       "jumpto": "ڏانھن ٽپ ڏيو:",
        "jumptonavigation": "رهنمائي",
        "jumptosearch": "ڳولا",
+       "view-pool-error": "معذرت سان سرور هاڻي تمام گھڻو سُڪ آهي.\nتمام گھڻا يوزر ھن صفحي کي ڏسڻ جي ڪوشش ڪري رھيا آھن.\nمهرباني ڪري ٿورو ترسو انکان اڳ جو توھان ھن صفحي تائين رسڻ لاءِ ٻيھر ڪوشش ڪريو.\n\n$1",
        "generic-pool-error": "معذرت سان سرور هاڻي تمام گھڻو سُڪ آهي.\nتمام گھڻا يوزر هتي موجود آهن.\nمهرباني ڪري ٿورو ترسي پوءِ ڪوشش ڪريو.",
        "pool-errorunknown": "اڻ ڄاتل چُڪَ",
        "poolcounter-usage-error": "استعمال جي خرابي: $1",
        "aboutsite": "{{SITENAME}} بابت",
        "aboutpage": "Project:بابت",
        "copyright": "ڪجھہ ٻيو ڄاڻايل نہ هجڻ جي صورت ۾ سمورو مواد $1 تحت ميسر ڪجي ٿو.",
-       "copyrightpage": "{{ns:project}}:Ø­Ù\82 Û½ Ù\88اسطا",
+       "copyrightpage": "{{ns:project}}:تاÙ\84Ù\8aÙ\81 Ø¬Ø§ Ø­Ù\82",
        "currentevents": "ھاڻوڪا واقعا",
-       "currentevents-url": "Project: اعداد",
+       "currentevents-url": "Project:ھاڻوڪا واقعا",
        "disclaimers": "غيرجوابداريناما",
        "disclaimerpage": "Project:عام غيرجوابدارينامو",
        "edithelp": "مدد براءِ ترميم",
        "helppage-top-gethelp": "مدد",
-       "mainpage": "مُک صفحو",
-       "mainpage-description": "مُک صفحو",
+       "mainpage": "مک صفحو",
+       "mainpage-description": "مک صفحو",
        "policy-url": "Project:پاليسي",
        "portal": "نياتي باب",
        "portal-url": "Project:نياتي باب",
        "retrievedfrom": "\"$1\" تان ورتل",
        "youhavenewmessages": "توهان لاءِ $1 ($2) آهن.",
        "youhavenewmessagesmanyusers": "توهان لاءِ ڪيترن ئي يُوزرس ($2) طرفان $1 آيل آهن.",
+       "newmessageslinkplural": "{{PLURAL:$1|ھڪ نئون پيغام|999=نوان پيغام}}",
+       "newmessagesdifflinkplural": "آخري {{PLURAL:$1|تبديلي|999=تبديليون}}",
        "youhavenewmessagesmulti": "$1 تي توهان لاءِ نوان نياپا آهن",
        "editsection": "سنواريو",
        "editold": "سنواريو",
        "editlink": "سنواريو",
        "viewsourcelink": "ڪوڊ ڏسو",
        "editsectionhint": "سنواريو سيڪشن: $1",
-       "toc": "فهرست",
+       "toc": "فھرست",
        "showtoc": "ڏيکاريو",
        "hidetoc": "لڪايو",
        "collapsible-collapse": "بند ڪريو",
        "site-atom-feed": "$1 اڻو روان رسد",
        "page-rss-feed": "\"$1\" RSS برق مواد",
        "page-atom-feed": "\"$1\" اڻو روان رسد",
-       "red-link-title": "$1 (صفحو وجود نہ ٿو رکي)",
+       "red-link-title": "$1 (صفحو وجود نٿو رکي)",
        "sort-descending": "لهندڙ ترتيب ڏيو",
        "sort-ascending": "چڙهندڙ ترتيب ڏيو",
        "nstab-main": "صفحو",
        "databaseerror-query": "استفسار: $1",
        "databaseerror-function": "ڪاڄ: $1",
        "databaseerror-error": "چُڪَ: $1",
+       "laggedslavemode": "<strong>چتاءُ:</strong> صفحي ۾ ھاڻوڪيون تبديليون نه ھجڻ جو امڪان آھي.",
        "readonly": "اعدادخانو بنديل",
        "missingarticle-rev": "(ڀيرو#: $1)",
        "missingarticle-diff": "(تفاوت: $1، $2)",
        "title-invalid-interwiki": "ڄاڻايل عنوان ۾ اهڙو بين‌الوڪِي ڳنڍڻو شامل آهي، جيڪو عنوانن ۾ استعمال ڪري نہ ٿو سگھجي.",
        "title-invalid-characters": "صفحي جي ڄاڻايل عنوان ۾ ناقابل ڪار اکر شامل آهن: $1",
        "title-invalid-leading-colon": "صفحي جي ڄاڻايل عنوان جي ابتدا ۾ ناقابل ڪار ڪالن شامل آهي.",
-       "viewsource": "ڪوڊ ڏسو",
+       "viewsource": "ذريعو ڏسو",
        "viewsource-title": "$1 جو ڪوڊ ڏسو",
        "protectedpagetext": "هيءُ صفحو ترميمن کان تحفظيل آهي.",
        "viewsourcetext": "توهان هن صفحي جو ڪوڊ ڏسي ۽ نقل ڪري سگھو ٿا:",
        "mypreferencesprotected": "توهان جي پنهنجون ترجيحات سنوارڻ جي اجات حاصل ڪانهي.",
        "ns-specialprotected": "خاص صفحا سنواري نٿا سگھجن.",
        "titleprotected": "[[User:$1|$1]] اهڙي عنوان سان صفحو سرجڻ تي روڪ لڳائي ڇڏي آهي. سبب <em>$2</em> ڄاڻايو ويو آهي.",
-       "exception-nologin": "لا اِن ٿيل ناهيو",
+       "exception-nologin": "داخل ٿيل ناهيو",
        "virus-unknownscanner": "اڻ ڄاتل نِس وائرس:",
-       "cannotlogoutnow-title": "ھاڻÙ\8a Ù\84اگ Ø¢Ø¦Ù\88Ù½ Ù\86Ù¿Ù\88 ڪري سگھجي",
-       "cannotlogoutnow-text": "$1 Ø§Ø³ØªØ¹Ù\85اÙ\84 ÚªØ±Ú» Ø¯Ù\88راÙ\86 Ù\84اگ Ø¢Ø¦Ù\88Ù½ ڪرڻ ممڪن نہ آھي.",
+       "cannotlogoutnow-title": "ھاڻÙ\8a Ù»Ø§Ú¾Ø± Ù\86Ù¿Ù\88 Ù\86ڪري سگھجي",
+       "cannotlogoutnow-text": "$1 Ø§Ø³ØªØ¹Ù\85اÙ\84 ÚªØ±Ú» Ø¯Ù\88راÙ\86 Ù»Ø§Ú¾Ø± Ù\86ڪرڻ ممڪن نہ آھي.",
        "welcomeuser": "ڀلي ڪري آيا، $1!",
        "yourname": "يُوزرنانءُ:",
        "userlogin-yourname": "يوزرنانءُ",
        "userlogin-yourname-ph": "پنهنجو يوزرنانءُ ڄاڻايو",
        "createacct-another-username-ph": "يُوزرنانءُ ڄاڻايو",
-       "yourpassword": "ڳجھو لفظ:",
-       "userlogin-yourpassword": "ڳجھو لفظ",
-       "userlogin-yourpassword-ph": "پنهنجو ڳجھو لفظ ڄاڻايو",
-       "createacct-yourpassword-ph": "ڳجھو لفظ ڄاڻايو",
+       "yourpassword": "ڳجھولفظ:",
+       "userlogin-yourpassword": "ڳجھولفظ",
+       "userlogin-yourpassword-ph": "پنهنجو ڳجھولفظ ڄاڻايو",
+       "createacct-yourpassword-ph": "ڳجھولفظ ڄاڻايو",
        "yourpasswordagain": "يُوزرنان ٻيهر ٽائيپ ڪريو:",
        "createacct-yourpasswordagain": "ڳجھي لفظ جي خاطري ڪريو",
-       "createacct-yourpasswordagain-ph": "ٻيهر ڳجھو لفظ داخل ڪريو",
-       "remembermypassword": "هن برائوزر تي منهنجي لاگ ان کي (وڌ ۾ وڌ $1 {{PLURAL:$1|ڏينهن}} لاءِ) ياد رکو",
-       "userlogin-remembermypassword": "مون کي لاگ اِن رکو",
+       "createacct-yourpasswordagain-ph": "ٻيھر ڳجھولفظ داخل ڪريو",
+       "userlogin-remembermypassword": "مون کي داخل ٿيل رکو",
        "userlogin-signwithsecure": "محفوظ ڳانڍاپو استعمال ڪريو",
-       "cannotloginnow-title": "ھاڻي لاگ ان نٿو ڪري سگھجي",
-       "cannotloginnow-text": "$1 استعمال ڪرڻ دوران لاگ ان ڪرڻ ممڪن نہ آھي.",
+       "cannotlogin-title": "داخل نٿو ٿي سگھجي",
+       "cannotlogin-text": "داخل ٿيڻ ممڪن نه آھي",
+       "cannotloginnow-title": "ھاڻي داخل نٿو ٿي سگھجي",
+       "cannotloginnow-text": "$1 استعمال ڪرڻ دوران داخل ٿيڻ ممڪن نہ آھي.",
+       "cannotcreateaccount-title": "کاتا نٿو کولي سگھي",
        "yourdomainname": "توهان جو ميدان:",
-       "password-change-forbidden": "هن وڪِي تي توهان ڳجھو لفظ بدلائي نہ ٿا سگھو.",
-       "login": "لاگ اِن",
-       "nav-login-createaccount": "لاگ اِن ٿيو / کاتو کوليو",
-       "userlogin": "لاگ اِن ٿيو / کاتو کوليو",
-       "userloginnocreate": "لاگ اِن",
-       "logout": "لاگ آئوٽ",
-       "userlogout": "لاگ آئوٽ",
-       "notloggedin": "لاگ اِن ٿيل ناهيو",
-       "userlogin-noaccount": "کاتو نہ ٿا رکو؟",
+       "password-change-forbidden": "هن وڪِي تي توهان ڳجھالفظ بدلائي نٿا سگھو.",
+       "login": "داخل ٿيو",
+       "login-security": "پنھنجي سڃاڻپ جي خاطري ڪريو",
+       "nav-login-createaccount": "داخل ٿيو / کاتو کوليو",
+       "userlogin": "داخل ٿيو / کاتو کوليو",
+       "userloginnocreate": "داخل ٿيو",
+       "logout": "ٻاھر نڪرو",
+       "userlogout": "ٻاھر نڪرو",
+       "notloggedin": "داخل ٿيل ناهيو",
+       "userlogin-noaccount": "کاتو نٿا رکو؟",
        "userlogin-joinproject": "{{SITENAME}} ۾ شامل ٿيو",
        "nologin": " کاتو نہ ٿا رکو؟ '''$1'''.",
        "nologinlink": "نئون کاتو کوليو",
        "createaccount": "کاتو کوليو",
        "gotaccount": "ڇا اڳي ئي کاتو رکو ٿا؟ '''$1'''.",
-       "gotaccountlink": "لاگ اِن",
-       "userlogin-resetlink": "پنهنجي لاگ اِن جا تفصيل وساري ويٺا؟",
-       "userlogin-resetpassword-link": "ڳجھو لفظ وساري ويٺا آهيو؟",
-       "userlogin-helplink2": "لاگ اِن ٿيڻ ۾ مدد",
+       "gotaccountlink": "داخل ٿيو",
+       "userlogin-resetlink": "پنهنجي داخل ٿيڻ جا تفصيل وساري ويٺا؟",
+       "userlogin-resetpassword-link": "ڳجھولفظ وساري ويٺا آهيو؟",
+       "userlogin-helplink2": "داخل ٿيڻ ۾ مدد",
+       "userlogin-reauth": "اھو پڪ ڪرڻ لاءِ ته توھان {{GENDER:$1|$1}} آھيو توھان کي ٻيھر داخل ٿيڻو پوندو.",
        "userlogin-createanother": "ٻيو کاتو کوليو",
        "createacct-emailrequired": "برق ٽپال پتو",
        "createacct-emailoptional": "برق ٽپال پتو (مرضيءَ موجب)",
        "createacct-reason-ph": "توهان ٻيو کاتو ڇو کولي رهيا آهيو",
        "createacct-submit": "پنهنجو کاتو کوليو",
        "createacct-another-submit": "کاتو کوليو",
+       "createacct-continue-submit": "کاتو کولڻ جاري رکو",
+       "createacct-another-continue-submit": "کاتو کولڻ جاري رکو",
        "createacct-benefit-heading": "{{SITENAME}} توهان جهڙن سڄڻن ٺاهيو آهي.",
        "createacct-benefit-body1": "{{PLURAL:$1|ترميم|ترميمون}}",
        "createacct-benefit-body2": "{{PLURAL:$1|صفحو|صفحا}}",
        "createacct-benefit-body3": "حاليه {{PLURAL:$1|ڀاڱيدار}}",
-       "badretype": "توهان جو ڄاڻايل ڳجھو لفظ درست نہ آهي.",
+       "badretype": "توهان جو ڄاڻايل ڳجھولفظ درست نہ آهي.",
        "usernameinprogress": "ان يُوزرنانءُ لاءِ کاتو اڳ ۾ ئي تياريءَ هيٺ آهي. مهرباني ڪري انتظار فرمايو.",
        "userexists": "ڄاڻايل يوزرنانءُ اڳ ۾ ئي استعمال هيٺ آهي. مهرباني ڪري ڪو ٻيو يُوزرنانءُ چونڊيو.",
-       "loginerror": "لاگ اِن چُڪَ",
+       "loginerror": "داخل ٿيڻ ۾ چُڪَ",
        "createacct-error": "کاٿو کولڻ ۾ چُڪَ",
        "createaccounterror": "کاتو کُلي نہ سگھيو: $1",
-       "nocookiesnew": "يُوزر کاتو کلي چڪو، پر توهان لاگ اِن نہ ٿيا آهيو. يُوزرس کي لاگ اِن ڪرڻ لاءِ {{SITENAME}} ڪوڪيز استعمال ڪندي آهي. توهان ڪوڪيز کي ناڪاره بڻائي رکيو آهي. لاگ اِن ٿيڻ لاءِ ڪوڪيز کي ڪارائتو بڻايو.",
+       "nocookiesnew": "يُوزر کاتو کلي چڪو، پر توهان داخل نہ ٿيا آهيو. يُوزرس کي داخل ڪرڻ لاءِ {{SITENAME}} ڪوڪيز استعمال ڪندي آهي. توهان ڪوڪيز کي ناڪاره بڻائي رکيو آهي. داخل ٿيڻ لاءِ ڪوڪيز کي ڪارائتو بڻايو.",
        "nocookieslogin": "يُوزرس کي لاگ اِن ڪرڻ لاءِ {{SITENAME}} ڪوڪيز استعمال ڪندي آهي. توهان ڪوڪيز کي ناڪاره بڻائي رکيو آهي. لاگ اِن ٿيڻ لاءِ ڪوڪيز کي ڪارائتو بڻايو.",
        "noname": "توهان جو ڄاڻايل يُوزرنانءُ ناقابل ڪار آهي.",
-       "loginsuccesstitle": "لاگ اِن ٿيل",
-       "loginsuccess": "'''هاڻي توهان {{SITENAME}} تي بطور \"$1\" لاگ اِن ٿيل آهيو.'''",
+       "loginsuccesstitle": "داخل ٿيل",
+       "loginsuccess": "'''هاڻي توهان {{SITENAME}} تي بطور \"$1\" داخل ٿيل آهيو.'''",
        "nosuchuser": "\"$1\" نالي سان ڪو بہ يوزر نہ آهي.\nننڍن وڏن اکرن ۾ امتياز ڪرڻ لازمي آهي. \nهِجي چڪاسيو، يا [[Special:CreateAccount|نئون کاتو تخليق ڪريو]]",
        "nosuchusershort": "\"$1\" نالي ڪو بہ يُوزر ناهي.\nهِجي جي پڪ ڪندا.",
        "nouserspecified": "توهان کي ڪو يوزرنانءُ ڄاڻائڻو پوندو.",
-       "login-userblocked": "هيءُ يُوزر بندشيل آهي. لاگ اِن جي اجازت نہ ٿي ڏجي.",
-       "wrongpassword": "ڏنل ڳجھو لفظ غير درست آهي. مهرباني ڪري ٻيهر ڪوشش ڪندا.",
-       "wrongpasswordempty": "ڏنل ڳجھو لفظ خالي هو. مهرباني ڪري وري ڪوشش ڪندا.",
-       "passwordtooshort": "ڳجھÙ\8a لفظ گھٽ ۾ گھٽ  {{PLURAL:$1|1 اکر|$1 اکرَن}} تي ٻڌل هوڻ گھرجي.",
-       "passwordtoolong": "ڳجھو لفظ {{PLURAL:$1|1 اکر|$1 اکرن}} کان وڏو نہ ٿو ٿي سگھي.",
-       "password-name-match": "توهان جو ڳجھو لفظ توهان جي يوزرنانءُ کان مختلف هجڻ گھرجي.",
-       "mailmypassword": "ڳجھو لفظ  نئين سِر مقرر ڪريو",
-       "passwordremindertitle": "{{SITENAME}} لاءِ نئون عارضي ڳجھو لفظ",
+       "login-userblocked": "هيءُ يُوزر بندشيل آهي. داخل ٿيڻ جي اجازت نٿي ڏجي.",
+       "wrongpassword": "ڏنل ڳجھولفظ غير درست آهي. مھرباني ڪري ٻيھر ڪوشش ڪندا.",
+       "wrongpasswordempty": "ڏنل ڳجھولفظ خالي هو.\nمهرباني ڪري وري ڪوشش ڪندا.",
+       "passwordtooshort": "ڳجھÙ\88لفظ گھٽ ۾ گھٽ  {{PLURAL:$1|1 اکر|$1 اکرَن}} تي ٻڌل هوڻ گھرجي.",
+       "passwordtoolong": "ڳجھولفظ {{PLURAL:$1|1 اکر|$1 اکرن}} کان وڏو نٿو ٿي سگھي.",
+       "password-name-match": "توهان جو ڳجھولفظ توهان جي يوزرنانءُ کان مختلف هجڻ گھرجي.",
+       "mailmypassword": "ڳجھولفظ ٻيھر مقرر ڪريو",
+       "passwordremindertitle": "{{SITENAME}} لاءِ نئون عارضي ڳجھولفظ",
        "passwordremindertext": "ڪنهن (شايد توهان آءِ پي پتي $1 تان) اسان کي {{SITENAME}} ($4) لاءِ نئون ڳجھو لفظ اماڻڻ جي گھُرَ ڪئي.\"$2\" يوزر لاءِ هڪ ڳجھُ لفظ تخليق ڪيو ويو آهي \"$3\" تي ترتيب ڏنو ويو هو. جيڪڏهن اهو توهان جي ارادو هيو، ته هاڻي توهان کي هينئر ئي لاگ اِن ٿي پنهنجو ڳجھو لفظ تبديل ڪرڻ گھرجي.\nتوهان جو عارضي ڳجھو لفظ {{PLURAL:$5|هڪ ڏينهُن|$5 ڏينهَن}} ۾ ختم ٿيندو.\n\nجيڪڏهن اها گھُرَ اوهان نه ڪئي هئي، يا هاڻي اوهان کي پنهنجو ڳجھو لفظ ياد اچي ويو آهي ۽ توهان ان کي تبديل ڪرڻ نه ٿا چاهيو، ته توهان هن نياپي کي نظر انداز ڪندي پنهنجو پراڻو ڳجھو لفظ ئي استعمال ڪري سگھو ٿا.",
        "noemail": "يُوزر \"$1\" جي ڪو بہ برق ٽپال پتو درج ٿيل ناهي.",
        "noemailcreate": "توهان کي قابل ڪار برق ٽپال پتو مهيا ڪرڻو پوندو.",
        "accountcreated": "کاتو کلي چڪو",
        "accountcreatedtext": "يوزر کاتو [[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|talk]]) جي لاءِ تخليق ٿي چڪو آهي.",
        "createaccount-title": "{{SITENAME}} تي کاتو کولڻ",
-       "login-throttled": "توهان تازو ئي لاگ اِن ٿيڻ جون هيڪانديون گھڻيون ڪوششون ڪيون آهن. مهرباني ڪري $1 لاءِ ترسي پوءِ وري ڪوشش ڪريو.",
-       "login-abort-generic": "توهان جو لاگ اِن ناڪام ويو.",
+       "login-throttled": "توهان تازو ئي داخل ٿيڻ جون هيڪانديون گھڻيون ڪوششون ڪيون آهن. مهرباني ڪري $1 لاءِ ترسي پوءِ وري ڪوشش ڪريو.",
+       "login-abort-generic": "توهان جو داخل ٿيڻ ناڪام ويو - بند ڪيل",
        "login-migrated-generic": "توهان جو کاتو لڏي چڪو آهي، ۽ هن وڪيءَ تي توهان جو يُوزنانءُ هاڻي وجود نہ ٿو رکي.",
        "loginlanguagelabel": "ٻولي: $1",
        "createacct-another-realname-tip": "اصل نالو ڄاڻائڻ اختياري آهي. جيڪڏهن توهان اصل نالو ڄاڻايو ٿا، تہ اهو توهان کي توهان جي ڪم جي مڃتا ڏيڻ لاءِ ڪم آندو ويندو.",
-       "pt-login": "لاگ ان ٿيو",
-       "pt-login-button": "لاگ اِن",
+       "pt-login": "داخل ٿيو",
+       "pt-login-button": "داخل ٿيو",
+       "pt-login-continue-button": "داخل ٿيڻ جاري رکو",
        "pt-createaccount": "کاتو کوليو",
-       "pt-userlogout": "Ù\84اگ Ø¢Ø¦Ù\88Ù½",
+       "pt-userlogout": "ٻاھر Ù\86ڪرÙ\88",
        "php-mail-error-unknown": "پي ايڇ پي جي  ڪاڄ اندر اڻڄاتل چُڪَ.",
        "user-mail-no-addy": "برق ٽپال پتو ڄاڻائڻ کان سواءِ برق ٽپال اماڻڻ جي ڪوشش ڪئي وئي.",
-       "changepassword": "ڳجھو لفظ تبديل ڪريو",
-       "resetpass_announce": "لاگ اِن جو عمل پورو ڪرڻ لاءِ، توهان کي نئون ڳجھو لفظ اختيار مقرر ڪرڻو پوندو.",
-       "resetpass_header": "کاتي جو ڳجھو لفظ بدلايو",
-       "oldpassword": "اڳوڻو ڳجھو لفظ:",
-       "newpassword": "نئون ڳجھو لفظ:",
-       "retypenew": "نئون ڳجھو لفظ ٻيهر ٽائيپ ڪندا:",
-       "resetpass_submit": "ڳجھو لفظ طَي ڪريو ۽ لاگ اِن ٿيو",
+       "changepassword": "ڳجھولفظ تبديل ڪريو",
+       "resetpass_announce": "داخل ٿيڻ جو عمل پورو ڪرڻ لاءِ، توهان کي نئون ڳجھولفظ اختيار مقرر ڪرڻو پوندو.",
+       "resetpass_header": "کاتي جو ڳجھولفظ بدلايو",
+       "oldpassword": "اڳوڻو ڳجھولفظ:",
+       "newpassword": "نئون ڳجھولفظ:",
+       "retypenew": "نئون ڳجھولفظ ٻيهر ٽائيپ ڪندا:",
+       "resetpass_submit": "ڳجھولفظ طَي ڪريو ۽ داخل ٿيو",
        "changepassword-success": "توهان جو ڳجھولفظ بدلايو ويو آھي!",
-       "changepassword-throttled": "توهان تازو ئي لاگ اِن ٿيڻ جون هيڪانديون گھڻيون ڪوششون ڪيون آهن. مهرباني ڪري $1 لاءِ ترسي پوءِ وري ڪوشش ڪريو.",
+       "changepassword-throttled": "توهان تازو ئي داخل ٿيڻ جون هيڪانديون گھڻيون ڪوششون ڪيون آهن. مهرباني ڪري $1 لاءِ ترسي پوءِ وري ڪوشش ڪريو.",
        "botpasswords-label-create": "سرجيو",
        "botpasswords-label-update": "تجديد",
        "botpasswords-label-cancel": "رد",
        "botpasswords-label-delete": "ڊاهيو",
-       "botpasswords-label-resetpassword": "ڳجھو لفظ  نئين سِر مقرر ڪريو",
-       "resetpass_forbidden": "ڳجھو لفظ بدلائي نہ ٿو سگھجي.",
-       "resetpass-no-info": "هيءُ صفحو پڙهڻ لاءِ لاگ اِن ٿيڻ ضروري آهي.",
-       "resetpass-submit-loggedin": "ڳجھو لفظ بدلايو",
+       "botpasswords-label-resetpassword": "ڳجھولفظ ٻيھر مقرر ڪريو",
+       "resetpass_forbidden": "ڳجھالفظ بدلائي نٿا سگھجن",
+       "resetpass_forbidden-reason": "ڳجھالفظ بدلائي نٿا سگھجن:$1",
+       "resetpass-no-info": "هيءُ صفحو پڙهڻ لاءِ داخل ٿيڻ ضروري آهي.",
+       "resetpass-submit-loggedin": "ڳجھولفظ بدلايو",
        "resetpass-submit-cancel": "رد",
        "resetpass-wrong-oldpass": "ناقابل ڪار هاڻوڪو يا عارضي ڳجھولفظ. \nتوهان پنهنجو ڳجھو لفظ اڳ ۾ ئي بدلائي چڪا آهيو يا نئين ڳجھي لفظ لاءِ درخواست ڏئي چڪا آهيو.",
        "resetpass-recycled": "مهرباني ڪري پنهنجي هاڻوڪي ڳجھي لفظ کان ڪو مختلف ڳجھو لفظ چونڊيو.",
        "resetpass-temp-emailed": "توهان برق ٽپال ذريعي اماڻيل عارضي ڳجھي لفظ سان لاگ اِن ٿيا آهيو. لاگ اِن کي مڪمل ڪرڻ لاءِ توهان کي هتي نئون ڳجھو لفظ طَي ڪرڻو ئي پوندو:",
-       "resetpass-temp-password": "عارضي ڳجھو لفظ:",
-       "resetpass-expired": "توهان جو ڳجھو لفظ مدي خارج ٿي چڪو آهي. نئون ڳجھو لفظ مقرر ڪريو ۽ لاگ اِن ٿيو.",
+       "resetpass-temp-password": "عارضي ڳجھولفظ:",
+       "resetpass-expired": "توهان جو ڳجھولفظ مدي خارج ٿي چڪو آهي. نئون ڳجھولفظ مقرر ڪريو ۽ داخل ٿيو.",
        "resetpass-expired-soft": "توهان جو ڳجھو لفظ مدي خارج ٿي چڪو آهي. مهرباني ڪري نئون ڳجھو لفظ چونڊيو، يا ساڳيو ڪم ڪنهن ٻي وقت ڪرڻ لاءِ \"{{int:authprovider-resetpass-skip-label}}\" تي ڪلڪ ڪريو.",
-       "resetpass-validity-soft": "توهان جو ڳجھو لفظ ناقابل ڪار آهي: $1\nمهرباني ڪري نئون ڳجھو لفظ چونڊيو، يا ساڳيو ڪم ڪنهن ٻي وقت ڪرڻ لاءِ \"{{int:authprovider-resetpass-skip-label}}\" تي ڪلڪ ڪريو.",
-       "passwordreset": "ڳجھو لفظ مَٽايو",
-       "passwordreset-text-one": "برق ٽپال ذريعي عارضي ڳجھو لفظ حاصل ڪرڻ لاءِ هيءُ فارم پُر ڪريو.",
-       "passwordreset-disabled": "هن وڪيءَ تي ڳجھو لفظ نئين سِر مقرر ڪرڻ وارو چارو غير فعال بڻايو ويو آهي.",
+       "resetpass-validity-soft": "توهان جو ڳجھولفظ ناقابل ڪار آهي: $1\nمهرباني ڪري نئون ڳجھولفظ چونڊيو، يا ساڳيو ڪم ڪنهن ٻي وقت ڪرڻ لاءِ \"{{int:authprovider-resetpass-skip-label}}\" تي ڪلڪ ڪريو.",
+       "passwordreset": "ڳجھولفظ مَٽايو",
+       "passwordreset-text-one": "برق ٽپال ذريعي عارضي ڳجھولفظ حاصل ڪرڻ لاءِ هيءُ فارم پُر ڪريو.",
+       "passwordreset-disabled": "هن وڪيءَ تي ڳجھولفظ ٻيھر مقرر ڪرڻ وارو چارو غير فعال بڻايو ويو آهي.",
        "passwordreset-emaildisabled": "هن وڪيءَ تي برق‌ٽپال واريون خصوصيتون غير فعال بڻايون ويون آهن.",
        "passwordreset-username": "يُوزرنانءُ:",
        "passwordreset-domain": "ميدان:",
        "passwordreset-emailtitle": "{{SITENAME}} واري کاتي جا تفصيل",
        "passwordreset-emailelement": "يُوزر نانءُ: \n$1\n\nعارضي ڳجھو لفظ:\n$2",
        "changeemail": "برق ٽپال پتو مِٽايو يا بدلايو",
-       "changeemail-passwordrequired": "توهانکي هن تبديلي جي تصديق ڪرڻ جي لاءِ پنهنجو ڳجھو لفظ داخل ڪرڻ جي ضرورت پوندي.",
        "changeemail-oldemail": "هاڻوڪو برق ٽپال پتو:",
        "changeemail-newemail": "نئون برق ٽپال پتو:",
        "changeemail-none": "(ڪو بہ نہ)",
        "resettokens-tokens": "ٽوڪنس:",
        "resettokens-token-label": "$1 (حاليہ قدر: $2)",
        "resettokens-resetbutton": "چونڊيل ٽوڪن ٻيهر ترتيب ڪريو",
-       "bold_sample": "گهري تحرير",
-       "bold_tip": "گهري لکت",
+       "bold_sample": "گھري لکت",
+       "bold_tip": "گھري لکت",
        "italic_sample": "ترڇي لکت",
        "italic_tip": "ترڇي لکت",
        "link_sample": "ڳنڍڻي جو عنوان",
        "link_tip": "داخلي ڳنڍڻو",
        "extlink_sample": "http://www.example.com ڳنڍڻي جو عنوان",
        "extlink_tip": "خارجي ڳنڍڻو (اڳياڙي http://  نہ وساريندا)",
-       "headline_sample": "سرخي",
+       "headline_sample": "سرخي جي لکت",
        "headline_tip": "سطح 2 جي سرخي",
        "nowiki_tip": "وڪي فارميٽڱ کي نظرانداز ڪريو",
        "image_tip": "جَڙيل فائيل",
        "minoredit": "هيءَ هڪ معمولي ترميم آهي",
        "watchthis": "هيءُ صفحو سانڍيو",
        "savearticle": "صفحو سانڍيو",
-       "preview": "پيش نگاهہ",
-       "showpreview": "پيش نگاهہ",
+       "savechanges": "تبديليون سانڍيو",
+       "publishpage": "صفحو ڇاپيو",
+       "publishchanges": "تبديليون ڇاپيو",
+       "preview": "پيش نگاھ",
+       "showpreview": "پيش نگاھ",
        "showdiff": "تبديليون ڏيکاريو",
-       "anoneditwarning": "<strong>خبردار:</strong> توهان لاگ اِن ٿيل نہ آهيو. جيڪڏهن توهان ڪي ترميمون ڪيون تہ هن صفحي جي سوانح ۾ توهان جو آءِ پي پتو درج ڪيو ويندو. جي توهان <strong>[$1 لاگ اِن]</strong> ٿيو ٿا <strong>[$2 کاتو کوليو] </strong> ٿا، تہ توهان جو ترميمون توهان جي يوزرنانءُ سن منسوب ڪيون وينديون، جنهن جا ٻيا بہ فائدا ٿي سگھن ٿا.",
-       "anonpreviewwarning": "توهان لاگ اِن ٿيل نہ آهيو. جيڪڏهن توهان صفحي ۾ تبديليون سانڍيون تہ اهڙين تبديلين ساڻ توهان جو آءِ پي پتو درج ڪيو ويندو.",
+       "anoneditwarning": "<strong>خبردار:</strong> توهان داخل ٿيل نہ آهيو. جيڪڏهن توهان ڪي ترميمون ڪيون تہ هن صفحي جي سوانح ۾ توهان جو آءِ پي پتو درج ڪيو ويندو. جي توهان <strong>[$1 داخل]</strong> ٿيو ٿا < يا strong>[$2 کاتو کوليو] </strong> ٿا، تہ توهان جو ترميمون توهان جي يوزرنانءُ سن منسوب ڪيون وينديون، جنهن جا ٻيا بہ فائدا ٿي سگھن ٿا.",
+       "anonpreviewwarning": "توهان داخل ٿيل نہ آهيو. جيڪڏهن توهان صفحي ۾ تبديليون سانڍيون تہ اهڙين تبديلين ساڻ توهان جو آءِپي پتو درج ڪيو ويندو.",
        "missingcommenttext": "براءِ مهرباني هيٺ پنهنجا تاثرات درج ڪندا.",
-       "summary-preview": "تت تي پيش نگاهہ:",
-       "subject-preview": "موضوع پيش نگاهہ:",
+       "summary-preview": "تت تي پيش نگاھ:",
+       "subject-preview": "موضوع پيش نگاھ:",
        "blockedtitle": "يُوزر بندشيل آهي.",
        "blockedtext": "'''توهان جي يوزرنانءُ يا آءِ پي کي بندشيو ويو آهي.'''\n\nبندش $1 هنئي. جڏهن تہ ڄاڻايل سبب ''$2'' آهي.\n\n\n* بندش جو آغاز: $8\n* بندش جو انجام: $6\n* بندش جو هدف: $7\n\nاهڙي روڪ تي بحث ڪرڻ لاءِ توهان $1 يا ڪنهن ٻي [[{{MediaWiki:Grouppage-sysop}}|منتظم]] سان رابطو ڪري سگھو ٿا. جيڪڏهن توهان جو درست [[Special:ترجيحات|کاتو ترجيحات]] ۾ درست برق ٽپال پتو درج ٿيل نہ آهي تہ توهان 'هن يوزر کي برق ٽپال ڪريو' وارو فيچر نہ ٿا \nYou cannot use the 'e-mail this user' feature unless a valid e-mail address is specified in your [[Special:Preferences|account preferences]] and you have not been blocked from using it.\nاستعمال ڪري سگھو. توهان جو هاڻوڪو آءِ پي پتو $3 آهي، ۽ بندش سڃاڻپ $5 آهي. مهرباني ڪري ڪنهن بہ پڇا ڳاڇا يا لهوچڙ لاءِ انهن مان ڪنهن هڪ يا ٻنهي جو حوالو ڏيندا.",
        "blockednoreason": "سبب اڻڄاڻايل",
        "whitelistedittext": "صفحا سنوارڻ لاءِ مهرباني ڪري $1.",
        "confirmedittext": "صفحا سنوارڻ کان اڳ توهان کي پنهنجي ايميل پتي جي تصديق ڪرڻي پوندي. مهرباني ڪري [[Special:Preferences|use preferences]] ذريعي پنهنجو ايميل پتو ڄاڻايو ۽ تصديقيو.",
        "nosuchsectiontitle": "سيڪشن نٿو لهي سگهي",
-       "loginreqtitle": "لاگ اِن گھربل آهي",
-       "loginreqlink": "لاگ اِن",
+       "loginreqtitle": "داخل ٿيڻ گھربل آهي",
+       "loginreqlink": "داخل ٿيو",
        "loginreqpagetext": "ٻيا صفحا ڏسڻ لاءِ مهرباني ڪري $1",
-       "accmailtitle": "ڳجھو لفظ اماڻجي چڪو.",
+       "accmailtitle": "ڳجھولفظ اماڻجي چڪو",
        "newarticle": "(نئون)",
-       "newarticletext": "توهان اهڙي صفحي جو ڳنڍڻو وٺي هتي پهتا آهيو، جيڪو اڃا وجود نہ ٿو رکي. اهڙو صفحو جوڙڻ لاءِ هيٺين باڪس ۾ ٽائيپ ڪرڻ شروع ڪريو (وڌيڪ ڄاڻڻ لاءِ [$1 امدادي صفحو] ڏسندا). جي توهان هتي غلطيءَ ۾ اچي ويا آهيو تہ رڳو پنهنجي جهانگُوءَ جو '''back''' بٽڻ ڪلڪ ڪندا.",
+       "newarticletext": "توهان اهڙي صفحي جو ڳنڍڻو وٺي هتي پهتا آهيو، جيڪو اڃا وجود نٿو رکي.\nاهڙو صفحو جوڙڻ لاءِ، هيٺين باڪس ۾ ٽائيپ ڪرڻ شروع ڪريو (وڌيڪ ڄاڻڻ لاءِ [$1 امدادي صفحو] ڏسندا).\nجي توهان هتي غلطيءَ ۾ اچي ويا آهيو، تہ رڳو پنهنجي جهانگُوءَ جو <strong>back</strong> تي ٽڙڪ ڪريو.",
        "noarticletext": "في‌الوقت هن صفحي اندر ڪو بہ ٽيڪسٽ نہ آهي.\nتوهان ٻين صفحن ۾ [[Special:Search/{{PAGENAME}}|search ساڳي عنوان جي ڳولا]] ڪري سگھو ٿا،  \n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} لاڳاپيل لاگس ۾ ڳوليو]،\nor [{{fullurl:{{FULLPAGENAME}}|action=edit}} هيءُ صفحو ترميميو]</span>.",
        "userpage-userdoesnotexist-view": "يُوزر کاتو $1 درج ٿيل نہ آهي.",
        "blocked-notice-logextract": "هيءَ يُوزر في‌الحال بندشيل آهي. تازو بندش لاگ حوالي طور پيش ڪجي ٿو:",
        "updated": "(تجديديل)",
        "note": "<strong>نوٽ:</strong>",
-       "previewnote": "<strong>'''هيءَ محظ پيش نگاهہ آهي.</strong> ترميمون اڃا سانڍجوين ناهن!'''",
+       "previewnote": "<strong>هيءَ فقط پيش نگاھ آهي.</strong>\nتوھان جون ترميمون اڃان نہ سانڍيون ويون آھن!",
        "continue-editing": "ترميم گاھ ڏانهن وڃو",
-       "editing": "زير ترميم $1",
+       "editing": "$1 سنواريندي",
        "creating": "$1 سرجيندي",
        "editingsection": "زير ترميم $1 (سيڪشن)",
        "editingcomment": "ترميم هيٺ $1 (نئون سيڪشن)",
        "protectedpagewarning": "<strong>چتاءُ: هيءَ صفحو اهڙيءَ ريت تحفظيو ويو آهي جو فقط منتظمين ئي ان کي سنواري سگھن ٿا. </strong>\nتازه ترين لاگ حوالي طور پيش ڪجي ٿو:",
        "semiprotectedpagewarning": "<strong>نوٽ: هيءَ صفحو اهڙيءَ ريت تحفظيو ويو آهي جو فقط کاتيدار يُوزرس ئي ان کي سنواري سگھن ٿا. </strong>\nتازه ترين لاگ حوالي طور پيش ڪجي ٿو:",
        "templatesused": "هن صفحي تي استعمال ٿيندڙ {{PLURAL:$1|سانچو|سانچا}}:",
-       "templatesusedpreview": "هن پيش نگاهہ ۾ استعمال ٿيل {{PLURAL:$1|سانچو|سانچا}}:",
+       "templatesusedpreview": "هن پيش نگاھ ۾ استعمال ٿيل {{PLURAL:$1|سانچو|سانچا}}:",
        "templatesusedsection": "هن سيڪشن ۾ استعمال ٿيل {{PLURAL:$1|سانچو|سانچا}}:",
        "template-protected": "(تحفظيل)",
        "template-semiprotected": "(نيم تحفظيل)",
        "content-json-empty-array": "خالي اري",
        "duplicate-args-warning": "چتاءُ: [[:$2]] کي [[:$1]] ڪال ڪري رهيو آهي، جنهن منجھہ ’$3‘ نيم‌پيما لاءِ هڪ کان وڌيڪ قدر ڄاڻايل آهن. فقط آخري ڄاڻايل قدر استعمال ڪيو ويندو.",
        "parser-template-loop-warning": "سانچو چڪر لڌو ويو: [[$1]]",
-       "cantcreateaccounttitle": "کاتو کولي نہ ٿو سگھجي",
        "cantcreateaccount-text": "هن آءِ پي پتي تان کاتي جي تخليق تي يُوز (<strong>$1</strong>)  [[User:$3|$3]] روڪ لڳائي آهي.\n\n$3 جو ڄاڻايل سبب آهي <em>$2</em> آهي.",
        "cantcreateaccount-range-text": "آءِپي پتن جي حد <strong>$1</strong> ۾ [[User:$3|$3]] کاتو کولڻ تي روڪ لڳائي وئي آهي،$4 جنهن ۾ توهان جو آءِپي پتو بہ (<strong>$4</strong>)،  پڻ شامل آهي. \n\n$3 ان روڪَ جو سبب \"$2\" ڄاڻايو آهي.",
        "viewpagelogs": "هن صفحي جا لاگس ڏسو",
        "history-show-deleted": "رڳو ڊاٺل",
        "histfirst": "اوائلي ترين",
        "histlast": "تازه ترين",
-       "historysize": "({{PLURAL:$1|1 ٻاٽڻ|$1 ٻاٽڻيون}})",
+       "historysize": "({{PLURAL:$1|1 بائيٽ|$1 بائيٽس}})",
        "historyempty": "(خالي)",
        "history-feed-title": "ترميمي سوانح",
        "history-feed-description": "وڪي جي هن صفحي جي ترميمي سوانح",
        "history-feed-item-nocomment": "$2 تي $1",
+       "rev-deleted-comment": "(ترميمي خلاصو ھٽايل)",
        "rev-deleted-user": "(يُوزرنانءُ ڊاٺو ويو)",
        "rev-deleted-event": "(لاگ تفصيل هٽايا ويا)",
        "rev-deleted-user-contribs": "[يُوزرنانءُ يا آءِ پِي پتو مِٽايو ويو - ڀاڱيدارين مان ترميمون لڪايون ويون]",
        "searchprofile-everything-tooltip": "سموري مواد ۾ ڳوليو",
        "searchprofile-advanced-tooltip": "مرضيءَ جي نانءُپولارن ۾ ڳوليو",
        "search-result-size": "$1 ({{PLURAL:$2|لفظُ|$2 لفظَ}})",
-       "search-redirect": "($1 کي چوريو)",
+       "search-redirect": "($1 کان چوريو)",
        "search-section": "(سيڪشن $1)",
        "search-category": "(ذمرو $1)",
        "search-suggest": "ڇا توهان جو مطلب $1 آهي؟",
        "preferences": "ترجيحات",
        "mypreferences": "ترجيحات",
        "prefs-edits": "ترميمن جو تعداد:",
-       "prefsnologintext2": "پنهنجون ترجيحات بدلائڻ لاءِ لاگ اِن ٿيو.",
+       "prefsnologintext2": "پنهنجون ترجيحات بدلائڻ لاءِ داخل ٿيو.",
        "prefs-skin": "چَمَ",
        "skin-preview": "پيش نگاهہ",
        "datedefault": "بلا ترجيحا",
        "prefs-user-pages": "يُوزر صفحو",
        "prefs-personal": "يُوزر جو خدوخال",
        "prefs-rc": "تازيون تبديليون",
-       "prefs-watchlist": "Ù½Ù\8aÙ½ Ù\81Ù\87رست",
-       "prefs-editwatchlist": "Ù½Ù\8aÙ½ Ù\81Ù\87رست کي سنواريو",
-       "prefs-editwatchlist-label": "Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù½Ù\8aÙ½ Ù\81Ù\87رست ۾ درج ٿيل شين کي سنواريو:",
-       "prefs-editwatchlist-edit": "پنهنجي ٽيٽ فهرست ۾ موجود عنوان ڏسو ۽ مٽايو",
-       "prefs-editwatchlist-raw": "ÚªÚ\86Ù\8a Ù½Ù\8aÙ½ Ù\81Ù\87رست سنواريو",
-       "prefs-editwatchlist-clear": "Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù½Ù\8aÙ½ Ù\81Ù\87رست ڊاهيو",
-       "prefs-watchlist-days": "Ù½Ù\8aÙ½ Ù\81Ù\87رست Û¾ Ú\8fÙ\8aکارڻ Ù\84اءÙ\90 Ú\8fÙ\8aÙ\86Ù\87Ù\86 :",
+       "prefs-watchlist": "Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست",
+       "prefs-editwatchlist": "Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست کي سنواريو",
+       "prefs-editwatchlist-label": "Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست ۾ درج ٿيل شين کي سنواريو:",
+       "prefs-editwatchlist-edit": "پنھنجي نظرھيٺ فھرست ۾ موجود عنوان ڏسو ۽ مٽايو",
+       "prefs-editwatchlist-raw": "ÚªÚ\86Ù\8a Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست سنواريو",
+       "prefs-editwatchlist-clear": "Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست ڊاهيو",
+       "prefs-watchlist-days": "Ù\86ظرھÙ\8aÙº Ù\81ھرست Û¾ Ú\8fÙ\8aکارڻ Ù\84اءÙ\90 Ú\8fÙ\8aÙ\86Ù\87Ù\86:",
        "prefs-watchlist-days-max": "وڌ ۾ وڌ $1 {{PLURAL:$1|ڏينهن}}",
        "prefs-watchlist-edits-max": "وڌ ۾ وڌ تعداد: 1000",
-       "prefs-watchlist-token": "Ù½Ù\8aÙ½ Ù\84سٽ جو ٽوڪن:",
+       "prefs-watchlist-token": "Ù\86ظرھÙ\8aÙº Ù\81ھرست جو ٽوڪن:",
        "prefs-misc": "متفرق",
-       "prefs-resetpass": "ڳجھو لفظ بدلايو",
+       "prefs-resetpass": "ڳجھولفظ بدلايو",
        "prefs-changeemail": "برق ٽپال پتو مِٽايو يا بدلايو",
        "prefs-setemail": "ڪو برق ٽپال پتو ڄاڻايو",
        "prefs-email": "برق ٽپال چارا",
        "prefs-dateformat": "تاريخ جو طرز",
        "prefs-advancedediting": "عمومي چارا",
        "prefs-editor": "ايڊيٽر",
-       "prefs-preview": "پيش نگاهہ",
+       "prefs-preview": "پيش نگاھ",
        "prefs-advancedrc": "متقدم چارا",
        "prefs-advancedrendering": "متقدم چارا",
        "prefs-advancedsearchoptions": "متقدم چارا",
        "prefs-displaywatchlist": "نماڪار چارا",
        "prefs-tokenwatchlist": "ٽوڪن",
        "prefs-diffs": "تفاوت",
-       "prefs-help-prefershttps": "هيءَ ترجيح توهان جي ايندڙ لاگ اِن تي عمل ۾ ايندي.",
+       "prefs-help-prefershttps": "هيءَ ترجيح توهان جي ايند داخل ٿيڻ تي عمل ۾ ايندي.",
        "userrights": "يُوزر حقن جو بندوبست",
        "userrights-lookup-user": "يوزر گروپَ سنڀاليو",
        "userrights-user-editname": "يُوزرنانءُ ڄاڻايو:",
        "group-bureaucrat": "ڪامورا",
        "group-all": "(سڀ)",
        "group-user-member": "{{GENDER:$1|يُوزر}}",
+       "group-bot-member": "{{GENDER:$1|بوٽ}}",
        "group-sysop-member": "{{GENDER:$1|منتظم}}",
+       "group-bureaucrat-member": "{{GENDER:$1|ڪامورو}}",
+       "group-suppress-member": "{{GENDER:$1|دٻائيندڙ}}",
        "grouppage-user": "{{ns:project}}:يُوزرس",
+       "grouppage-autoconfirmed": "{{ns:project}}:خودڪارنموني پڪ ڪيل رڪن",
+       "grouppage-bot": "{{ns:project}}:بوٽس",
        "grouppage-sysop": "{{ns:project}}:منتظمين",
        "grouppage-bureaucrat": "{{ns:project}}:ڪامورا",
+       "grouppage-suppress": "{{ns:project}}:دٻايو",
        "right-read": "صفحا پڙهو",
        "right-edit": "صفحا سنواريو",
        "right-createpage": "صفحا سنواريو (جيڪي مباحثي صفحا نہ آهن)",
        "right-undelete": "ڪو صفحو اڻڊاهيو",
        "right-unblockself": "ڪنهن تان بندش ختم ڪريو",
        "right-editinterface": "يُوزر باهمرُو کي سنواريو",
-       "right-viewmywatchlist": "Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù½Ù\8aÙ½ Ù\84سٽ ڏسو",
+       "right-viewmywatchlist": "Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù\86ظرھÙ\8aÙº Ù\81ھرست ڏسو",
        "right-editmyoptions": "پنهنجون ترجيحات سنواريو",
        "right-import": "ٻين وڪيز کان صفحا درآمديو",
        "right-importupload": "ڪو فائيل چاڙهي صفحا درآمديو",
        "right-override-export-depth": "5ئين اونهائيءَ تائين ڳنڍيل صفحن سميت صفحا برآمديو",
        "right-sendemail": "ٻين يوزرس ڏانهن ايميل موڪليو",
        "right-passwordreset": "ڳجھو لفظ مقرري برق ٽپالون ڏسو",
-       "right-managechangetags": "اعدادخاني ۾ [[Special:Tags|ٽيگس]] سرجيو ۽ ڊاهيو.",
+       "right-managechangetags": "[[Special:Tags|ٽيگس]] سرجيو ۽ ڊاهيو.",
        "grant-group-email": "برق ٽپال اماڻيو",
        "grant-blockusers": "يُوزرس کي بندشيو ۽ اڻبندشيو",
        "grant-createaccount": "نئون کاتو کوليو",
-       "grant-editmywatchlist": "پنهنجي ٽيٽ فهرست سنواريو",
+       "grant-editmywatchlist": "پنھنجي نظرھيٺ فھرست سنواريو",
        "grant-editprotected": "تحفظيل صفحا سنواريو",
        "grant-rollback": "صفحن ۾ ڪيل تبديليون واپس ورايو",
        "grant-sendemail": "ٻين يوزرس ڏانهن ايميل موڪليو",
        "grant-uploadfile": "نئون فائيل چاڙهيو",
        "grant-basic": "بنيادي حقَ",
        "grant-viewdeleted": "ڊَٺَلَ فائيلَ ۽ صفحا ڏسو",
-       "grant-viewmywatchlist": "Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù½Ù\8aÙ½ Ù\81Ù\87رست ڏسو",
+       "grant-viewmywatchlist": "Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست ڏسو",
        "newuserlogpage": "يوزر کاتن جو لاگ",
        "rightslog": "يُوزر حق لاگ",
        "action-read": "هي صفحو پڙهو",
        "action-rollback": "ڪنهن مخصوص صفحي تي آخري ترميم ڪندڙ يُوزر جي سمورين ترميمن کي ترت واپس ورايو",
        "action-import": "ٻي ڪنهن وڪي کان صفحا درآمد ڪريو",
        "action-importupload": "ڪو فائيل چاڙهي صفحا درآمديو",
-       "action-unwatchedpages": "اڻ ٽيٽيل صفحن جي فهرست ڏسو",
+       "action-unwatchedpages": "اڻ ڏٺل صفحن جي فھرست ڏسو",
        "action-mergehistory": "هن صفحي جي سوانح ضم ڪريو",
        "action-userrights": "سڀ يوزر حق ترميم ڪريو",
        "action-userrights-interwiki": "ٻين وڪيز جي يوزرس جا حق ترميم ڪريو",
        "action-siteadmin": "اعدادخاني کي بند ڪريو يا کوليو",
        "action-sendemail": "برق ٽپال اماڻيو",
-       "action-editmywatchlist": "پنهنجي ٽيٽ فهرست سنواريو",
-       "action-viewmywatchlist": "Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù½Ù\8aÙ½ Ù\81Ù\87رست ڏسو",
+       "action-editmywatchlist": "پنھنجي نظرھيٺ فھرست سنواريو",
+       "action-viewmywatchlist": "Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست ڏسو",
        "action-viewmyprivateinfo": "پنهنجي ذاتي معلومات ڏسو",
        "action-editmyprivateinfo": "پنهنجي ذاتي معلومات سنواريو",
        "nchanges": "$1 {{PLURAL:$1|تبديلي|تبديليون}}",
        "enhancedrc-history": "سوانح",
        "recentchanges": "تازيون تبديليون",
-       "recentchanges-legend": "تازين تبديلين جو آپشن",
+       "recentchanges-legend": "تازين تبديلين جا چارا",
        "recentchanges-summary": "هن صفحي تي وڪيءَ ۾ ڪيل تازيون ترين ترميمون ڏيکاريو.",
        "recentchanges-feed-description": "ۡهن روان رسد ۾ آيل تازيون تبديليون لهو",
-       "recentchanges-label-newpage": "هن ترميم سان نئون صفحو جڙيو.",
-       "recentchanges-label-minor": "هيءُ هڪ معمولي ترميم آهي.",
+       "recentchanges-label-newpage": "هن ترميم سان نئون صفحو جڙيو",
+       "recentchanges-label-minor": "هيء هڪ معمولي ترميم آهي",
        "recentchanges-label-bot": "هيءُ ترميم بوٽ عمل ۾ آندي.",
-       "recentchanges-label-plusminus": "هن صفحي جي ماپ ۾ هيترين ٻاٺڻين جو ڦير آيو آهي",
-       "recentchanges-legend-heading": "<strong>\"ڪنجي.</strong>",
+       "recentchanges-label-unpatrolled": "ھن ترميم جو اڃان گشت نہ ڪيو ويو آھي",
+       "recentchanges-label-plusminus": "هن صفحي جي ماپ ۾ هيترين بائيٽس جو ڦير آيو آهي",
+       "recentchanges-legend-heading": "<strong>ڪنجي:</strong>",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (پڻ ڏسو [[Special:NewPages|نون صفحن جي فهرست]])",
        "recentchanges-submit": "ڏيکاريو",
        "rcnotefrom": "هيٺ {{PLURAL:$5|تبديلي آهي|تبديليون آهن}} کان <strong>$3, $4</strong> (تائين <strong>$1</strong> ) ڏيکاريل آهن.",
-       "rclistfrom": "$3 $2 کان شروع ٿيندڙ نيون تبديليون",
+       "rclistfrom": "$2، $3 کان شروع ٿيندڙ نيون تبديليون ڏيکاريو",
        "rcshowhideminor": "$1 معمولي ترميمون",
-       "rcshowhideminor-show": "نمايو",
+       "rcshowhideminor-show": "ڏيکاريو",
        "rcshowhideminor-hide": "لڪايو",
        "rcshowhidebots": "$1 بوٽس",
-       "rcshowhidebots-show": "نمايو",
+       "rcshowhidebots-show": "ڏيکاريو",
        "rcshowhidebots-hide": "لڪايو",
        "rcshowhideliu": "$1 کاتيدار يوزرس",
        "rcshowhideliu-show": "ڏيکاريو",
        "rcshowhideliu-hide": "لڪايو",
        "rcshowhideanons": "$1 نامعلوم يُوزرس",
-       "rcshowhideanons-show": "نمايو",
+       "rcshowhideanons-show": "ڏيکاريو",
        "rcshowhideanons-hide": "لڪايو",
        "rcshowhidepatr": "$1 تاڻيل ترميمون",
        "rcshowhidepatr-show": "ڏيکاريو",
        "rcshowhidepatr-hide": "لڪايو",
-       "rcshowhidemine": "منهنجون ترميمون $1",
-       "rcshowhidemine-show": "نمايو",
+       "rcshowhidemine": "منھنجون ترميمون $1",
+       "rcshowhidemine-show": "ڏيکاريو",
        "rcshowhidemine-hide": "لڪايو",
        "rcshowhidecategorization": "$1 صفحاتي زمراڪاري",
        "rcshowhidecategorization-show": "ڏيکاريو",
        "recentchangeslinked-feed": "لاڳاپيل تبديليون",
        "recentchangeslinked-toolbox": "لاڳاپيل تبديليون",
        "recentchangeslinked-title": "\"$1\" سان لاڳاپيل تبديليون",
-       "recentchangeslinked-page": "صفحي جو عنوان",
+       "recentchangeslinked-page": "صفحي جو نالو:",
        "recentchangeslinked-to": "رڳو ڄاڻايل صفحي سان ڳانڍيل صفحن ۾ ٿيل تبديليون نمايو",
        "upload": "فائيل چاڙهيو",
        "uploadbtn": "فائيل چاڙهيو",
-       "uploadnologin": "لاگ اِن ٿيل نہ آهيو",
+       "uploadnologin": "داخل ٿيل ناھيو",
        "uploadnologintext": "فائيل چاڙهڻ لاءِ $1.",
-       "uploaderror": "چاڙهہ چُڪَ",
-       "uploadlogpage": "چاڙهہ لاگ",
+       "uploaderror": "چاڙھ چُڪَ",
+       "uploadlogpage": "چاڙھ لاگ",
        "filename": "فائيل نانءُ",
        "filedesc": "خلاصو",
        "fileuploadsummary": "خلاصو:",
        "upload-http-error": "ايڇ ٽي ٽي پي جي چُڪَ ٿي آهي: $1",
        "upload-dialog-title": "فائيل چاڙهيو",
        "upload-dialog-button-cancel": "رد",
+       "upload-dialog-button-back": "واپس",
        "upload-dialog-button-done": "ٿي ويو",
        "upload-dialog-button-save": "سانڍيو",
        "upload-dialog-button-upload": "چاڙهيو",
        "filedelete-maintenance-title": "فائيل ڊهي نہ سگھيو",
        "mimesearch": "مائيم ڳولا",
        "download": "اتاريو",
-       "unwatchedpages": "اڻ ٽيٽيل صفحا",
+       "unwatchedpages": "اڻ ڏٺل صفحا",
        "listredirects": "چورڻن جي فهرست",
        "unusedtemplates": "اڻ استعماليل سانچا",
        "unusedtemplateswlh": "ٻيا ڳنڍڻا",
        "withoutinterwiki": "ڪنهن بہ ٻي ٻوليءَ سان نہ ڳنڍيل صفحا",
        "withoutinterwiki-summary": "هيٺيان صفحا ڪنهن بہ ٻي ٻوليءَ ۾ ساڳي صفحي سان ڳنڍيل نہ آهن.",
        "withoutinterwiki-legend": "اڳياڙي",
-       "withoutinterwiki-submit": "نمايو",
+       "withoutinterwiki-submit": "ڏيکاريو",
        "fewestrevisions": "گھٽانگھٽ ترميميل صفحا",
-       "nbytes": "$1 {{PLURAL:$1|ٻاٽڻ|ٻاٽڻيون}}",
+       "nbytes": "$1 {{PLURAL:$1|بائيٽ|بائيٽس}}",
        "ncategories": "$1 {{PLURAL:$1|زمرو|زمرا}}",
        "ninterwikis": "$1 {{PLURAL:$1|بين‌الوڪي}}",
        "nlinks": "$1 {{PLURAL:$1|ڳنڍڻو|ڳنڍڻا}}",
        "apisandbox-dynamic-parameters-add-label": "نيمپيما شامل ڪريو",
        "apisandbox-dynamic-parameters-add-placeholder": "نيمپيما نانءُ",
        "apisandbox-results": "نتيجا",
+       "apisandbox-continue": "جاري رکو",
        "booksources": "ڪتابي وسيلا",
        "booksources-search-legend": "ڪتابي ذريعن جي ڳولا ڪريو",
        "booksources-search": "ڳوليو",
        "sp-deletedcontributions-contribs": "ڀاڱيداريون",
        "linksearch-ns": "نانءُپولار",
        "linksearch-ok": "ڳوليو",
-       "listusers-submit": "نمايو",
+       "listusers-submit": "ڏيکاريو",
        "listusers-noresult": "ڪو بہ يُوزر نہ لڌو",
        "listusers-blocked": "(بندشيل)",
        "activeusers": "سرگرم يُوزرس جي فهرست",
        "trackingcategories-nodesc": "ڪا به تشريح موجود نه آهي.",
        "trackingcategories-disabled": "زمرو ناقابلِ ڪار بڻايل آهي.",
        "emailuser": "هن يوزر کي برق ٽپال اماڻيو",
+       "emailuser-title-target": "ھن {{GENDER:$1|يوزر}} ڏانھن برقٽپال موڪليو",
        "emailuser-title-notarget": "يُوزر ڏانهن برق ٽپال اماڻيو",
        "usermaildisabled": "يوزر ايميل ناقابلِ ڪار بڻيل",
        "usermaildisabledtext": "توهان هن وڪي تي ٻين يوزرس ڏانهن ايميل نٿا موڪلي سگھو",
        "emailccme": "نياپي جو پرت مون کي برق ٽپال ڪريو.",
        "emailsent": "برق ٽپال اماڻجي چڪي",
        "emailsenttext": "توهان جو برق ٽپال نياپو اماڻجي چڪو آهي.",
-       "watchlist": "Ù½Ù\8aÙ½ Ù\81Ù\87رست",
-       "mywatchlist": "Ù½Ù\8aÙ½ Ù\81Ù\87رست",
-       "addwatch": "Ù½Ù\8aÙ½ Ù\81Ù\87رست ۾ شامل ڪريو",
-       "addedwatchtext": "صÙ\81Ø­Ù\88\"[[:$1]]\" Ø§Ù\86 Ø¬Ù\8a Ø¨Ø­Ø« Ù\88ارÙ\88 ØµÙ\81Ø­Ù\88 Ø§Ù\88Ù\87اÙ\86 Ø¬Ù\8a [[Special:Watchlist|Ù½Ù\8aÙ½ Ù\81Ù\87رست]] ۾ شامل ڪيو ويو آهي.",
-       "removewatch": "Ù½Ù\8aÙ½ Ù\81Ù\87رست Ù\85اÙ\86 Ø®Ø§Ø±Ø¬ ÚªØ±يو",
-       "removedwatchtext": "صÙ\81Ø­Ù\88 Ø¨Ø¹Ù\86Ù\88اÙ\86 \"[[:$1]]\" ØªÙ\88Ù\87اÙ\86 Ø¬Ù\8a [[Special:Watchlist|Ù½Ù\8aÙ½ Ù\81Ù\87رست]] مان هٽي چڪو آهي.",
-       "removedwatchtext-short": "\"صÙ\81Ø­Ù\88 Ø¨Ø¹Ù\86Ù\88اÙ\86 \"$1\" ØªÙ\88Ù\87اÙ\86 Ø¬Ù\8a Ù½Ù\8aÙ½ Ù\81Ù\87رست مان هٽي چڪو آهي.\"",
-       "watch": "Ù½Ù\8aÙ½Ù\8aو",
-       "watchthispage": "Ù\87Ù\8aØ¡Ù\8f ØµÙ\81Ø­Ù\88 Ù½Ù\8aÙ½Ù\8aو",
-       "unwatch": "اڻ ٽيٽيو",
-       "unwatchthispage": "Ù½Ù\8aÙ½ڻ ڇڏيو",
+       "watchlist": "Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست",
+       "mywatchlist": "Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست",
+       "addwatch": "Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست ۾ شامل ڪريو",
+       "addedwatchtext": "صÙ\81Ø­Ù\88\"[[:$1]]\" Ø§Ù\86 Ø¬Ù\8a Ø¨Ø­Ø« Ù\88ارÙ\88 ØµÙ\81Ø­Ù\88 Ø§Ù\88Ù\87اÙ\86 Ø¬Ù\8a [[Special:Watchlist|Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست]] ۾ شامل ڪيو ويو آهي.",
+       "removewatch": "Ù\86ظرھÙ\8aÙº Ù\81ھرست Ù\85اÙ\86 Ú¾Ù½Ø§يو",
+       "removedwatchtext": "صÙ\81Ø­Ù\88 Ø¨Ø¹Ù\86Ù\88اÙ\86 \"[[:$1]]\" ØªÙ\88Ù\87اÙ\86 Ø¬Ù\8a [[Special:Watchlist|Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست]] مان هٽي چڪو آهي.",
+       "removedwatchtext-short": "\"صÙ\81Ø­Ù\88 Ø¨Ø¹Ù\86Ù\88اÙ\86 \"$1\" ØªÙ\88Ù\87اÙ\86 Ø¬Ù\8a Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست مان هٽي چڪو آهي.\"",
+       "watch": "Ù\86ظرھÙ\8aÙº Ø±Ú©و",
+       "watchthispage": "Ù\87Ù\8aØ¡Ù\8f ØµÙ\81Ø­Ù\88 Ù\86ظرھÙ\8aÙº Ø±Ú©و",
+       "unwatch": "نظرھيٺ نہ رکو",
+       "unwatchthispage": "Ù\86ظرھÙ\8aÙº Ø±Ú©ڻ ڇڏيو",
        "notanarticle": "غير موادي صفحو",
        "watchlist-details": "{{PLURAL:$1|$1 صفحو|$1 صفحا}} توهان جي ٽيٽ فهرست، ڳالھ ٻولھ جا صفحا الڳ شمار نٿا ٿين.",
        "wlshowlast": "گذريل $1 ڪلاڪ $2 ڏينهن ڏيکاريو",
        "wlshowhideliu": "کاتيدار يُوزرس",
        "wlshowhideanons": "گمنام يُوزرس",
        "wlshowhidemine": "منهنجون ترميمون",
-       "watchlist-options": "زيرِ نظر فهرست جا چارا",
-       "watching": "Ù½Ù\8aÙ½Ù\8aندي...",
-       "unwatching": "اڻ ٽيٽيندي...",
+       "watchlist-options": "نظرھيٺ فھرست جا چارا",
+       "watching": "Ù\86ظرھÙ\8aÙº Ø±Ú©ندي...",
+       "unwatching": "نظرھيٺان ڪڍندي...",
        "enotif_reset": "سڀ گھميل صفحن تي نشان لڳايو",
        "enotif_impersonal_salutation": "{{SITENAME}} يُوزر",
        "enotif_lastdiff": "هي تبديلي ڏسڻ لاءِ $1 ڏسو",
        "protect-expiry-options": "1 ڪلاڪ:1 hour,1 ڏينهن:1 day,1 هفتو:1 week,2 هفتو:2 weeks,1 مهينا:1 month,3 مهينا:3 months,6 مهينا:6 months,1 سال:1 year,اڻ کٽ:infinite",
        "restriction-type": "اجازتنامو:",
        "restriction-level": "روڪ سطح:",
-       "pagesize": "(ٻاٽڻيون)",
+       "pagesize": "(بائيٽس)",
        "restriction-edit": "سنواريو",
        "restriction-move": "چوريو",
        "restriction-create": "سرجيو",
        "contribsub2": "{{GENDER:$3|$1}} ($2) لاءِ",
        "contributions-userdoesnotexist": "يُوزر کاتو \"$1\" درج ٿيل نہ آهي.",
        "uctop": "(هاڻوڪو)",
-       "month": "Ù\85Ù\87Ù\8aÙ\86Ù\88 (۽ اڳوڻيون):",
-       "year": "سال (۽ اڳوڻيون):",
+       "month": "Ù\85Ù\87Ù\8aÙ\86Ù\8a Ú©Ø§Ù\86 (۽ اڳوڻيون):",
+       "year": "سال کان (۽ اڳوڻيون):",
        "sp-contributions-newbies": "صرف نون کاتن جون ڀاڱيداريون ڏيکاريو",
        "sp-contributions-newbies-sub": "نون کاتن لاءِ",
        "sp-contributions-newbies-title": "نون کاتن جي لاءِ يوزر جون ڀاڱيداريون",
-       "sp-contributions-blocklog": "بÙ\86سش لاگ",
-       "sp-contributions-deleted": "يُوزر جون ڊاٺل ڀاڱيداريون",
+       "sp-contributions-blocklog": "بÙ\86دش لاگ",
+       "sp-contributions-deleted": "ڊاٿل {{GENDER:$1|يوزر}} ڀاڱيداريون",
        "sp-contributions-uploads": "چاڙھَ",
        "sp-contributions-logs": "لاگس",
-       "sp-contributions-talk": "ڳالھہ",
+       "sp-contributions-talk": "ڳالھ",
        "sp-contributions-userrights": "يُوزر حقن جي سنڀال",
        "sp-contributions-search": "ڀاڱيدارين لاءِ ڳولا ڪريو",
        "sp-contributions-username": "آءِپي پتو يا يوزرنانءُ:",
        "unlockbtn": "اعدادخاني کي کوليو",
        "move-page": "$1 چوريو",
        "move-page-legend": "صفحو چوريو",
-       "movepagetext": "هيٺيون فارم استعمال ڪندي ڪنهن صفحي کي نئون عنوان ڏئي سگھجي ٿو، جنهن سان سمورو صفحو نئين عنوان ڏانهن هليو ويندو. \nاڳوڻو عنوان نئين عنوان ڏانهن چورڻو بنجي ويندو. \nتوهان  چورڻن کي سنواري سگھو ٿا جيڪي اصل عنوان ڏانهن خودبخود اشارو ڪن ٿا.\nIf you choose not to, be sure to check for [[Special:DoubleRedirects|double]] or [[Special:BrokenRedirects|broken redirects]].\nان ڳالهه جي پڪ ڪرڻ ذميواري توهان تي آهي ته ڳنڍڻا اتي ئي وٺي وڃن ٿا جتي انهن کي وٺي وڃڻ گھرجي.\n\nياد رکندا ته جيڪڏهن نئين عنوان سان اڳي ئي ڪو مضمون موجود آهي ته پوءِ صفحو '''نه''' چوريو ويندو، سوا ان جي ته موجوده صفحو محظ خالي آهي يا ڪا به سوانح نه رکندڙ ڪو چورڻو آهي.\n\n<strong>خبردار!</strong>\nاها هڪ مقبول صفحي لاءِ ڪا غير متوقه ۽ انتهائي اڻوڻندڙ تبديلي ثابت ٿي سگھي ٿي؛ براءِ مهرباني اڳتي وڌڻ کان اڳ پڪ ڪندا ته توهان اها تبديلي آڻڻ جي نتيجن کان چڱيءَ ريت واقف آهيو.",
+       "movepagetext": "هيٺيون فارم استعمال ڪندي ڪنهن صفحي کي نئون عنوان ڏئي سگھجي ٿو، جنهن سان سمورو صفحو نئين عنوان ڏانهن هليو ويندو. \nاڳوڻو عنوان نئين عنوان ڏانهن چورڻو بنجي ويندو. \nتوهان  چورڻن کي سنواري سگھو ٿا جيڪي اصل عنوان ڏانهن خودبخود اشارو ڪن ٿا.\nIf you choose not to, be sure to check for [[Special:DoubleRedirects|double]] or [[Special:BrokenRedirects|broken redirects]].\nان ڳالهه جي پڪ ڪرڻ ذميواري توهان تي آهي ته ڳنڍڻا اتي ئي وٺي وڃن ٿا جتي انهن کي وٺي وڃڻ گھرجي.\n\nياد رکندا ته جيڪڏهن نئين عنوان سان اڳي ئي ڪو مضمون موجود آهي ته پوءِ صفحو '''نه''' چوريو ويندو، سوا ان جي ته موجوده صفحو محظ خالي آهي يا ڪا به سوانح نه رکندڙ ڪو چورڻو آهي.\n\n<strong>نوٽ!</strong>\nاها هڪ مقبول صفحي لاءِ ڪا غير متوقه ۽ انتهائي اڻوڻندڙ تبديلي ثابت ٿي سگھي ٿي؛ براءِ مهرباني اڳتي وڌڻ کان اڳ پڪ ڪندا ته توهان اها تبديلي آڻڻ جي نتيجن کان چڱيءَ ريت واقف آهيو.",
        "movepagetalktext": "جيڪڏهن توهان هن خاني کي نشان لڳائيندئو، واسطيدار مباحثي صفحو پاڻ ئي چوريو ويندو ماسواءِ اتي ڪو اڳ ئي ڪو غيرخالي مباحثي صفحو موجود هجي.\n\nان صورت ۾، جيڪڏهن توهان چاهيو ته صفحي کي پاڻ چوري يا ضم ڪري سگھو ٿا.",
        "movenotallowed": "توهان کي صفحا چورڻ جي اجازت حاصل ڪانهي.",
        "movenotallowedfile": "توهان کي فائيلس چورڻ جي اجازت حاصل ڪانهي.",
        "tooltip-pt-userpage": "{{GENDER:|توھانجو يوزر}} صفحو",
        "tooltip-pt-mytalk": "{{GENDER:|توھانجو}} يوزر صفحو",
        "tooltip-pt-preferences": "{{GENDER:|توھانجون}} ترجيحات",
-       "tooltip-pt-watchlist": "توهان جي ٽيٽ فهرست ۾ شامل صفحا",
+       "tooltip-pt-watchlist": "توھان جي تبديلين جي نظرھيٺ صفحن جي فھرست",
        "tooltip-pt-mycontris": "{{GENDER:|توھانجي}} ڀاڱيدارين جي فھرست",
-       "tooltip-pt-login": "توهان کي همٿائجي ٿو تہ توهان لاگ اِن ٿيو، بهرحال اهو لازمي نہ آهي.",
-       "tooltip-pt-logout": "Ù\84اگ Ø¢Ø¦Ù\88Ù½",
-       "tooltip-pt-createaccount": "کاتو کولڻ ۽ لاگ اِن ٿيڻ تي توهان کي همٿايو ويندو؛  جيتوڻيڪ، اهو ضروري نہ آهي",
+       "tooltip-pt-login": "توھان کي ھمٿائجي ٿو تہ توهان داخل ٿيو؛ بھرحال، اھو لازمي ناھي",
+       "tooltip-pt-logout": "ٻاھر Ù\86ڪرÙ\88",
+       "tooltip-pt-createaccount": "کاتو کولڻ ۽ داخل ٿيڻ تي توھان کي ھمٿايو وڃي ٿو؛  جيتوڻيڪ، اهو ضروري ناھي",
        "tooltip-ca-talk": "موادي صفحي تي بحث",
        "tooltip-ca-edit": "هيءُ صفحو سنواريو",
        "tooltip-ca-addsection": "نئون سيڪشن شروع ڪريو",
-       "tooltip-ca-viewsource": "هيءُ صفحو تحفظيل آهي. توهان ان جو ڪوڊ ڏسي سگھو ٿا.",
+       "tooltip-ca-viewsource": "هيءُ صفحو تحفظيل آهي. توهان ان جو ذريعو ڏسي سگھو ٿا.",
        "tooltip-ca-history": "هن صفحي جا اڳوڻا ڀيرا",
        "tooltip-ca-protect": "هيءُ صفحو تحفظيو",
        "tooltip-ca-delete": "هيءُ صفحو ڊاهيو",
        "tooltip-ca-move": "هيءُ صفحو چوريو",
-       "tooltip-ca-watch": "Ù\87Ù\8aØ¡Ù\8f ØµÙ\81Ø­Ù\88 Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù½Ù\8aÙ½ Ù\81Ù\87رست ۾ شامل ڪريو",
-       "tooltip-ca-unwatch": "Ù\87Ù\8aØ¡Ù\8f ØµÙ\81Ø­Ù\88 Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù½Ù\8aÙ½ Ù\81Ù\87رست تان هٽايو",
+       "tooltip-ca-watch": "Ù\87Ù\8aØ¡Ù\8f ØµÙ\81Ø­Ù\88 Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست ۾ شامل ڪريو",
+       "tooltip-ca-unwatch": "Ù\87Ù\8aØ¡Ù\8f ØµÙ\81Ø­Ù\88 Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست تان هٽايو",
        "tooltip-search": "{{SITENAME}} ۾ ڳوليو",
        "tooltip-search-go": "تز ان ئي نالي سان ڪو صفحو موجود آهي تہ کوليو",
        "tooltip-search-fulltext": "هن متن لاءِ صفحا ڳوليو",
        "tooltip-p-logo": "مک صفحو گھمو",
        "tooltip-n-mainpage": "مک صفحو گھمو",
        "tooltip-n-mainpage-description": "مک صفحو گھمو",
-       "tooltip-n-portal": "هن رٿا بابت، توهان ڇا ٿا ڪري سگھو، ڪهڙي شَي ڪٿي ملندي",
-       "tooltip-n-currentevents": "تازن واقعن تي تفصيلي ڄاڻ لهو",
-       "tooltip-n-recentchanges": "هن وڪيءَ ۾ تازين تبديلين جي فهرست.",
-       "tooltip-n-randompage": "بلاترتيب ڪو بہ صفحو اتاريو",
-       "tooltip-n-help": "ڳولي لهڻ جي جاءِ",
-       "tooltip-t-whatlinkshere": "هتان ڳنڍيل سمورا وڪي صفحا",
+       "tooltip-n-portal": "ھن رٿا بابت، توھان ڇا ٿا ڪري سگھو، شيون ڪٿي ڳولھجن",
+       "tooltip-n-currentevents": "تازن واقعن تي تفصيلي ڄاڻ لھو",
+       "tooltip-n-recentchanges": "ھن وڪيءَ ۾ تازين تبديلين جي فھرست",
+       "tooltip-n-randompage": "ڪو بہ بلاترتيب صفحو اتاريو",
+       "tooltip-n-help": "ڳولي لھڻ جي جاءِ",
+       "tooltip-t-whatlinkshere": "ھتان ڳنڍيل سمورن وڪي صفحن جي فھرست",
        "tooltip-t-recentchangeslinked": "ويجھڙائيءَ ۾ صفحن ۾ ٿيل تبديليون هن صفحي سان ڳنڍيل آهن",
        "tooltip-feed-atom": "هن صفحي لاءِ ايٽم فيڊ",
        "tooltip-t-contributions": "{{GENDER:$1|ھن يوزر}} جي ڀاڱيدارين جي فھرست",
        "tooltip-t-permalink": "صفحي جي ان نظرثاليءَ ڏانهن مستقل ڳنڍڻو",
        "tooltip-ca-nstab-main": "مواد جي صفحي کي ڏسو",
        "tooltip-ca-nstab-user": "هن جو يُوزر صفحو ڏسو",
-       "tooltip-ca-nstab-special": "هيءُ خاص صفحو آهي، ان ۾ ترميم ڪري نہ ٿي سگھجي.",
+       "tooltip-ca-nstab-special": "هيءُ خاص صفحو آهي، ان ۾ ترميم ڪري نٿي سگھجي",
        "tooltip-ca-nstab-project": "رٿائي صفحو ڏسو",
        "tooltip-ca-nstab-image": "هن فائيل جو صفحو ڏسو",
        "tooltip-ca-nstab-template": "سانچو ڏسو",
        "tooltip-ca-nstab-help": "امدادي صفحو ڏسو",
        "tooltip-ca-nstab-category": "هن زمري جو صفحو ڏسو",
        "tooltip-minoredit": "ان کي هڪ معمولي ترميم ڄاڻايو",
-       "tooltip-save": "پنهنجون ڪيل تبديليون سانڍيو",
-       "tooltip-preview": "سانڍڻ کان اڳ براءِ مهرباني پنهنجي تبديلين تي پيش نگاهه وجھندا!",
-       "tooltip-diff": "Ù¾Ù\86Ù\87Ù\86جÙ\88Ù\86 ÚªÙ\8aÙ\84 ØªØ¨Ø¯Ù\8aÙ\84Ù\8aÙ\88Ù\86 Ú\8fسÙ\88.",
+       "tooltip-save": "پنهنجون تبديليون سانڍيو",
+       "tooltip-preview": "پنھنجي تبديلين تي نگاھ وجھو. براءِ مھرباني اھو سانڍڻ کان اڳ ڪندا.",
+       "tooltip-diff": "Ù\84کت Û¾ ÚªÙ\8aÙ\84 Ù¾Ù\86Ù\87Ù\86جÙ\88Ù\86 ØªØ¨Ø¯Ù\8aÙ\84Ù\8aÙ\88Ù\86 Ú\8fسÙ\88",
        "tooltip-compareselectedversions": "هن صفحي جن ٻن چونڊيل پرتن درميان تفاوت ڏسو.",
-       "tooltip-watch": "Ù\87Ù\8aØ¡Ù\8f ØµÙ\81Ø­Ù\88 Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù½Ù\8aÙ½ Ù\81Ù\87رست ۾ شامل ڪريو",
+       "tooltip-watch": "Ù\87Ù\8aØ¡Ù\8f ØµÙ\81Ø­Ù\88 Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست ۾ شامل ڪريو",
        "tooltip-rollback": "\"واپس پرايو\" هن صفحي ۾ پوئين ڀاڱيدار جي ڪيل ترميم (ترميمن) کي هڪ ڪلڪ سان اڻڪري ٿو.",
        "tooltip-summary": "ننڍو خلاصو ڏيو",
        "anonymous": "گمنام {{PLURAL:$1|يوزر|يوزرس}} جو {{SITENAME}}",
        "file-nohires": "اڃا سنهو تحلل ميسر ناهي.",
        "svg-long-desc": "ايس وي جي فائيل، اٽڪل $1 × $2 عڪسلون، فائيل سائيز: $3",
        "show-big-image": "اصلوڪو فائيل",
-       "show-big-image-preview": "هن پيش نگاهہ جي ماپ: $1",
+       "show-big-image-preview": "هن پيش نگاھ جي ماپ: $1",
        "show-big-image-other": "ٻيا {{PLURAL:$2|تحلل}}:$1",
        "show-big-image-size": "$1*$2 پڪزلس",
        "newimages": "نون فائيلن جي گيلري",
        "confirmemail_subject": "{{SITENAME}} برق ٽپال پتي جي تصديق",
        "recreate": "ورسرجيو",
        "confirm-watch-button": "ٺيڪ",
-       "confirm-watch-top": "Ù\87Ù\8aØ¡Ù\8f ØµÙ\81Ø­Ù\88 Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù½Ù\8aÙ½ Ù\81Ù\87رست ۾ شامل ڪندا؟",
+       "confirm-watch-top": "Ù\87Ù\8aØ¡Ù\8f ØµÙ\81Ø­Ù\88 Ù¾Ù\86Ù\87Ù\86جÙ\8a Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست ۾ شامل ڪندا؟",
        "confirm-unwatch-button": "ٺيڪ",
        "confirm-unwatch-top": "هيءُ صفحو پنهنجي ٽيٽ فهرست مان هٽائيندا؟",
        "quotation-marks": "\"$1\"",
        "table_pager_limit_label": "وَٿُون في صفحو:",
        "table_pager_limit_submit": "ھلو",
        "table_pager_empty": "ڪو بہ نتيجو نہ مليو",
-       "watchlistedit-normal-title": "Ù½Ù\8aÙ½ Ù\81Ù\87رست کي سنواريو",
+       "watchlistedit-normal-title": "Ù\86ظرھÙ\8aÙº Ù\81Ú¾رست کي سنواريو",
        "watchlistedit-raw-titles": "عنوانَ:",
        "watchlistedit-clear-titles": "عنوانَ:",
        "watchlisttools-view": "لاڳاپيل تبديليون ڏسو",
        "watchlisttools-edit": "ٽيٽ فهرست ڏسو ۽ سنواريو",
        "watchlisttools-raw": "ڪچي ٽيٽ فهرست سنواريو",
-       "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|ڳالهہ]])",
+       "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|ڳالھ]])",
        "version": "ڀيرو",
        "version-extensions": "تنصيب شده توسيعات",
        "version-skins": "تنصيب شده چَمڙيون",
        "feedback-back": "پوئتي",
        "feedback-cancel": "رد",
        "feedback-close": "ٿي ويو",
-       "feedback-error-title": "چُڪَ",
        "feedback-message": "نياپو:",
        "feedback-subject": "موضوع:",
        "feedback-submit": "جمع ڪرايو",
        "feedback-thanks-title": "توهان جي مهرباني!",
-       "searchsuggest-search": "ڳوليو",
+       "searchsuggest-search": "ڳوليو {{SITENAME}}",
        "api-error-filename-tooshort": "فائيل‌نانءَُ هيڪاندو ننڍو آهي.",
        "api-error-unclassified": "ڪا اڻجاتل چُڪَ واقع ٿي.",
        "api-error-unknown-code": "اڻڄاتل چُڪَ: \"$1\".",
index 9d36abb..5105d79 100644 (file)
        "category-file-count-limited": "ဢၼ်ပဵၼ် {{PLURAL:$1|ၾၢႆႇၼႆႉ|$1 ၾၢႆႇၸိူဝ်းၼႆႉ}} မီးဝႆႉတီႈၼႂ်း တွၼ်ႈၵၼ်ၼႆ့။",
        "listingcontinuesabbrev": "သိုပ်ႇ",
        "index-category": "ၼႃႈလိၵ်ႈ ၸိူဝ်းၸီ့ဝႆ့",
-       "noindex-category": "ၼႃႈလိၵ်ႈ ၸိူဝ်းၸီ့ဝႆ့",
+       "noindex-category": "ၼႃႈလိၵ်ႈၸိူဝ်း ဢမ်ႇမီး တူဝ်ၸီႉ",
        "broken-file-category": "ၼႃႈလိၵ်ႈၸိူဝ်းမီးဝႆႉ ႁဵင်းၵွင်ႉၾၢႆႇဢၼ်လူ့လႅဝ်",
        "about": "လွင်ႈတၢင်း",
        "article": "ၼမ်းၼႂ်း",
        "newwindow": "(ပိုတ်ႇၼင်ႇဝိၼ်းတူဝ်း ဢၼ်မႂ်ႇ)",
        "cancel": "ဢမ်ႇႁဵတ်း",
        "moredotdotdot": "ထႅင်ႈ...",
-       "morenotlisted": "သဵၼ်ႈမၢႆဢၼ်ၼႆႉ ဢမ်ႇတဵမ်ထူၼ်ႈ။",
+       "morenotlisted": "á\80\9eá\80µá\81¼á\80ºá\82\88á\80\99á\81¢á\82\86á\80¢á\81¼á\80ºá\81¼á\82\86á\82\89 á\80¢á\80\99á\80ºá\82\87á\80¢á\81¢á\80\95á\80ºá\82\88á\80\90á\80µá\80\99á\80ºá\80\91á\80°á\81¼á\80ºá\82\88á\81\8b",
        "mypage": "ၼႃႈလိၵ်ႈ",
        "mytalk": "တွၼ်ႈဢုပ်ႇ",
        "anontalk": "တွၼ်ႈဢုပ်ႇ",
        "talk": "တႃႇဢုပ်ႇ",
        "views": "လူတူၺ်း",
        "toolbox": "ၶိူင်ႈၵမ်ႉၵႅမ်",
+       "tool-link-userrights": "လႅၵ်ႈလၢႆႈ {{GENDER:$1|ၽူႈၸႂ်ႉတိုဝ်း}} ၸုမ်း",
+       "tool-link-emailuser": "သူင်ႇဢီးမေးလ်ဢၼ်ၼႆႉ {{GENDER:$1|ၽူႈၸႂ်ႉတိုဝ်း}}",
        "userpage": "တူၺ်းၼႃႈလိၵ်ႈၽူႈၸႂ်ႉတိုဝ်း",
        "projectpage": "တူၺ်းၼႃႈလိၵ်ႈ ပရေႃးၵျႅၵ်ႉ",
        "imagepage": "တူၺ်းၼႃႈလိၵ်ႈၾၢႆႇ",
        "yourpasswordagain": "ၶိုၼ်းပေႃႉပၼ် ၶေႃႈလပ်ႉ :",
        "createacct-yourpasswordagain": "ၼႄႉၼွၼ်းပၼ် ၶေႃႈလပ်ႉ",
        "createacct-yourpasswordagain-ph": "ပေႃႉသႂ်ႇၶေႃႈလပ်ႉထႅင်ႈၵမ်းၼိုင်ႈ",
-       "remembermypassword": "တွင်းဝႆႉပၼ် လွၵ်ႉဢိၼ်ႇၵဝ်ၶႃႈ တီႈၼႂ်း ၶိူင်ႈပိုတ်ႇဝႆႉၼႆႉ  (တီႈႁိုင်ႁိုင်မၼ်း $1 {{PLURAL:$1|ၼိုင်ႈဝၼ်း|ဝၼ်း}})",
        "userlogin-remembermypassword": "သိုပ်ႇဢဝ်ၵဝ်ၶႃႈ လွၵ်ႉဢိၼ်ႇဝႆႉလႄႈ",
        "userlogin-signwithsecure": "ၸႂ်ႉၵွင်ႉသၢၼ် ႁူမ်ႇလူမ်ႈ",
+       "cannotlogin-title": "ဢမ်ႇၸၢင်ႈၶဝ်ႈ လွၵ်ႉဢိၼ်ႇ",
+       "cannotlogin-text": "လွင်ႈၶဝ်ႈလွၵ်ႉဢိၼ်ႇ ဢမ်ႇပႆႇပဵၼ်လႆႈ",
        "cannotloginnow-title": "ဢမ်ႇၸၢင်ႈၶဝ်ႈ လွၵ်ႉဢိၼ်ႇ ယၢမ်းလဵဝ်",
        "cannotloginnow-text": "တေဢမ်ႇၸၢင်ႈ လွၵ်ႉၶဝ်ႈ ၽွင်းမိူဝ်ႈၸႂ်ႉ $1",
+       "cannotcreateaccount-title": "ဢမ်ႇၸၢင်ႈၵေႃႇတင်ႈ ဢၶွင်ႉ",
+       "cannotcreateaccount-text": "​လွင်ႈၵေႃႇတင်ႈဢၶွင်ႉၵမ်းသိုဝ်ႈၼၼ်ႉ ဢမ်ႇလႆႈပိုတ်ႇဝႆႉပၼ်ၵႃႈတီႈ ဝီႇၶီႇၼႆႉ။",
        "yourdomainname": "တူဝ်ႇမဵင်း ၸဝ်ႈၵဝ်ႇ :",
        "password-change-forbidden": "ၸဝ်ႈၵဝ်ႇတေဢမ်ႇၸၢင်ႈ ​လႅၵ်ႈလၢႆႈ ၶေႃႈလပ်ႉ ၵႃႈတီႈၼိူဝ် ဝီႇၶီႇၼႆႉ",
+       "externaldberror": "ၼႆႉမၼ်းလႆႈပဵၼ် ယွၼ်ႉ လွင်ႈၽိတ်းပိူင်ႈ ၵၢၼ်လူတ်းပွႆႇ ယွင်ၶေႃႈမုၼ်း ဢမ်ႇၼၼ် ယွၼ်ႉပိူဝ်ႈ ၸဝ်ႈၵဝ်ႇၼႆႉ ဢမ်ႇထုၵ်ႇၶႂၢင်းပၼ် တႃႇတေႁဵတ်း ဢၢပ်ႉတိတ်ႉ ဢၶွင်ႉၽၢႆႇၼွၵ်ႈ။",
        "login": "လွၵ်ႉဢိၼ်ႇ",
        "login-security": "ၼႄႉၼွၼ်း မၢႆၽၢင်ၸဝ်ႈၵဝ်ႇ",
        "nav-login-createaccount": "လွၵ်ႉဢိၼ်ႇ / သၢင်ႈဢၶွင်ႉ",
        "createacct-email-ph": "ပေႃႉသႂ်ႇပၼ် ႁဵင်းလိၵ်ႈ ဢီးမေးၸဝ်ႈၵဝ်ႇ",
        "createacct-another-email-ph": "ပေႃႉသႂ်ႇပၼ် ႁဵင်းလိၵ်ႈ ဢီးမေးလ်",
        "createaccountmail": "ၸႂ်ႉပၼ် ၶေႃႈလပ်ႉၸူဝ်ႈၵႅပ်ႉ သူင်ႇၼၼ်ႉၵႂႃႇၸူး ႁဵင်းလိၵ်ႈဢီးမေးလ် ဢၼ်မၵ်းမၼ်ႈဝႆႉ ပၼ်ၼၼ်ႉ။",
+       "createaccountmail-help": "ပေႃးဢမ်ႇမီး လွင်ႈလဵပ်ႈႁဵၼ်း ၶေႃႈလပ်ႉၼႆ တေဢမ်ႇၸၢင်ႈဢဝ်ၸႂ်ႉ တႃႇတေၵေႃႇတင်ႈ ဢၶွင်ႉတွၼ်ႈတႃႇ ၵူၼ်းတၢင်ႇၵေႃႉ။",
        "createacct-realname": "ၸိုဝ်ႈတႄႉတႄႉ (ဢဝ်ၸႂ်ဝႃႈ)",
        "createaccountreason": "လွင်ႈတၢင်း :",
        "createacct-reason": "လွင်ႈတၢင်း :",
        "loginerror": "လွၵ်ႉဢိၼ်ႇ ၽိတ်းပိူင်ႈ",
        "createacct-error": "ၵၢၼ်ၵေႃႇသၢင်ႈ ဢၶွင်ႉ ၽိတ်းပိူင်ႈ",
        "createaccounterror": "ဢမ်ႇၸၢင်ႈၵေႃႇသၢင်ႈ ဢၶွင်ႉ : $1",
+       "nocookiesnew": "ဢၶွင်ႉ ၽူႈၸႂ်ႉတိုဝ်းၼႆႉ ထုၵ်ႇၵေႃႇသၢင်ႈယဝ်ႉယဝ်ႈ၊ ၵူၺ်းၵႃႈ ၸဝ်ႈၵဝ်ႇဢမ်ႇပႆႇလႆႈၶဝ်ႈ လွၵ်ႉဢိၼ်ႇဝႆႉ။ {{SITENAME}} ၸႂ်ႉ ၶုၵ်ႉၵီး တႃႇတေၶဝ်ႈလွၵ်ႉဢိၼ်ႇ ၽူႈၸႂ်ႉတိုဝ်း။\nၸဝ်ႈၵဝ်ႇလႆႈဢိုတ်းဝႆႉ ၶုၵ်ႉၵီး။\nၶႅၼ်ႈတေႃႈ ပိုတ်ႇပၼ်ၸိူဝ်းၼၼ်ႉသေ ၶဝ်ႈလွၵ်ႉဢိၼ်ႇပၼ်တင်း ၸိုဝ်ႈၽူႈၸႂ်ႉတိုဝ်း ၸဝ်ႈၵဝ်ႇ ဢၼ်မႂ်ႇလႄႈတင်း ၶေႃႈလပ်ႉၼၼ်ႉလႄႈ။",
+       "nocookieslogin": "{{SITENAME}} ၸႂ်ႉ ၶုၵ်ႉၵီး တႃႇတေၶဝ်ႈလွၵ်ႉဢိၼ်ႇ ၽူႈၸႂ်ႉတိုဝ်း။\nၸဝ်ႈၵဝ်ႇလႆႈဢိုတ်းဝႆႉ ၶုၵ်ႉၵီး။\nၶႅၼ်ႈတေႃႈ ပိုတ်ႇပၼ်ၸိူဝ်းၼၼ်ႉသေ ၶတ်းၸႂ်တူၺ်းထႅမ်ႈလႄႈ။",
+       "nocookiesfornew": "ဢၶွင်ႉၽူႈၸႂ်ႉတိုဝ်းၼႆႉ ဢမ်ႇထုၵ်ႇၵေႃႇသၢင်ႈ ယွၼ်ႉပိူဝ်ႈႁဝ်းၶႃႈ ဢမ်ႇၸၢင်ႈၼႄႉၼွၼ်း ငဝ်ႈငႃႇမၼ်း။\nၶႅၼ်းတေႃႈ ပိုတ်ႇပၼ် ၶုၵ်ႉၵီးၸဝ်ႈၵဝ်ႇယဝ်ႉသေ ၶိုၼ်းတူင်ႉပိုတ်ႇၼႃႈလိၵ်ႈၼႆႉသေ ၶတ်းၸႂ်တူၺ်းထႅင်ႈၶႃႈလႄႈ။",
+       "createacct-loginerror": "ဢၶွင်ႉ ၵေႃႇတင်ႈၶႅမ်ႉလႅပ်ႈၵႂႃႇသေတႃႉ ၸဝ်ႈၵဝ်ႇ တေဢမ်ႇပႆႇၸၢင်ႈၶဝ်ႈ လွၵ်ႉဢိၼ်ႇ ႁင်းၶေႃႈ။ ၶႅၼ်းတေႃႈ ႁဵတ်းတႃႇ  [[Special:UserLogin|manual login]].",
        "noname": "ၸဝ်ႈၵဝ်ႇ ဢမ်ႇလႆႈ မၵ်းမၼ်ႈဝႆႉပၼ် ၸိုဝ်ႈၽူႈၸႂ်ႉတိုဝ်း ဢၼ်ၸႂ်ႉလႆႈ။",
        "loginsuccesstitle": "လွၵ်ႉဢိၼ်ႇဝႆႉယဝ်ႉ",
        "loginsuccess": "<strong>ၸဝ်ႈၵဝ်ႇ လွၵ်ႉဢိၼ်ႇၶဝ်ႈၸူး  {{SITENAME}} ၼင်ႇ \"$1\".</strong> ယဝ်ႉဢေႃႈ ယၢမ်းလဵဝ်",
+       "nosuchuser": "ၸိုဝ်ႈ တွၼ်ႈတႃႇတႃႇၽူႈၸႂ်ႉတိုဝ်း \"$1\" ဢၼ်ၼႆႉ မၼ်းဢမ်ႇမီးဝႆႉ။\nၸိုဝ်ႈၽူႈၸႂ်ႉတိုဝ်းၼႆႉ မၼ်းမီးလိူင်ႈတူဝ်လဵၵ်ႉတူဝ်ယႂ်ႇ။\nၵူတ်ႇထတ်းတူၺ်း တူဝ်လေႃးမၼ်း ဢမ်ႇၼၼ် [[Special:CreateAccount|create a new account]].",
        "nosuchusershort": "ဢၼ်ပဵၼ်ၸိုဝ်ႈ ၽူႈၸႂ်ႉတိုဝ်း \"$1\" ဢၼ်ၼႆႉ မၼ်းဢမ်ႇမီး။\nမႄးၵူတ်ႇတူၺ်း တူဝ်လိၵ်ႈမၼ်းလီလီလႄႈ။",
        "nouserspecified": "ၸဝ်ႈၵဝ်ႇ ထုၵ်ႇလီမၵ်းမၼ်ႈ ၸိုဝ်ႈၽူႈၸႂ်ႉတိုဝ်း",
        "login-userblocked": "ၽူႈၸႂ်ႉတိုဝ်းၵေႃႉၼႆႉ ထုၵ်ႇႁႄႉတတ်းဝႆႉ။ ဢမ်ႇမီးသုၼ်ႇတႃႇ လွၵ်ႉဢိၼ်ႇ",
        "passwordreset-emailelement": "ၸိုဝ်ႈၽူႈၸႂ်ႉတိုဝ်း:\n$1\n\nၶေႃႈလပ်ႉ ၸူဝ်ႈၵႅပ်ႉ:\n$2",
        "passwordreset-emailsentemail": "ႁဵင်းလိၵ်ႈ ဢီးမေးလ်ဢၼ်ၼႆႉၼႆႉ မၼ်းၵပ်းၵၢႆႇၵၼ်တင်း ဢၶွင်ႉၸဝ်ႈၵဝ်ႇ၊ ဢၼ်ပဵၼ် ဢီးမေးလ် တႃႇတင်ႈၶိုၼ်းမၢႆလပ်ႉၼၼ်ႉ တေထုၵ်ႇသူင်ႇၸူးယူႇ.",
        "passwordreset-emailsentusername": "ႁဵင်းလိၵ်ႈ ဢီးမေးလ်ဢၼ်ၼႆႉၼႆႉ မၼ်းၵပ်းၵၢႆႇၵၼ်တင်း ၸိုဝ်ႈၽူႈၸႂ်ႉတိုဝ်း ဢၼ်ၼႆႉ၊ ဢၼ်ပဵၼ် ဢီးမေးလ် တႃႇတင်ႈၶိုၼ်းမၢႆလပ်ႉၼၼ်ႉ တေထုၵ်ႇသူင်ႇၸူးယူႇ.",
-       "passwordreset-emailsent-capture": "ဢီးမေးလ် ၵၢၼ်တင်ႈၶိုၼ်း ​မၢႆလပ်ႉၼၼ်ႉ ထုၵ်ႇသူင်ႇၵႂႃႇၸူး ဢၼ်ၼႄဝႆႉၼင်ႇ ၽၢႆႇတႂ်ႈၼႆႉ။",
        "passwordreset-invalideamil": "ႁဵင်းလိၵ်ႈ ဢီႈမေးလ် ၽိတ်းဝႆႉ။",
        "passwordreset-nodata": "ၸိုဝ်ႈၽူႈၸႂ်ႉတိုဝ်းလႄႈ ႁဵင်းလိၵ်ႈဢီးမေးလ် ဢမ်ႇလႆႈၵမ်ႉထႅမ်ဝႆႉ သေဢၼ်။",
        "changeemail": "လႅၵ်ႈလၢႆႈ ဢမ်ႇၼၼ် ထွၼ်ပႅတ်ႈ ႁဵင်းလိၵ်ႈ ဢီးမေးလ်",
        "minoredit": "ပဵၼ်လွင်ႈမူၼ်ႉမႄးဢိတ်းဢီႈ",
        "watchthis": "တူၺ်းၼႃႈလိၵ်ႈၼႆႉ",
        "savearticle": "ၵဵပ်းသိမ်း ၼႃႈလိၵ်ႈ",
+       "savechanges": "သိမ်းလွင်ႈလႅၵ်ႈလၢႆႈ",
        "publishpage": "ပိုၼ်ဢွၵ်ႇ ၼႃႈလိၵ်ႈ",
+       "publishchanges": "ပိုတ်ႇဢွၵ်ႇ လွင်ႈလႅၵ်ႈလၢႆႈ",
        "preview": "တူၺ်းလူင်ႈၼႃႈ",
        "showpreview": "ၼႄတူဝ်ယၢင်ႇ",
        "showdiff": "ၼႄလွင်ႈလႅၵ်ႈလၢႆႈ",
        "content-json-empty-object": "ၵၢၼ်ပဝ်ႇ",
        "content-json-empty-array": "ထႅဝ်ပဝ်ႇ",
        "post-expand-template-inclusion-warning": "<strong>ၶေႃႈၽၢင်ႉ</strong> - ပိူင်ဢဝ်မႃးႁူမ်ႈၼၼ်ႉယႂ်ႇပူၼ်ႉၼႃႇ။\nပိူင်မၢင်ၼႃႈတေဢမ်ႇႁူမ်ႈပႃးၸွမ်း။",
-       "cantcreateaccounttitle": "ဢမ်ႇၸၢင်ႈၵေႃႇသၢင်ႈ ဢၶွင်ႉ",
        "viewpagelogs": "တူၺ်းသၢႆမၢႆ တွၼ်ႈတႃႇၼႃႈလိၵ်ႈၼႆႉ",
        "nohistory": "တီႈၼႆႈ ဢမ်ႇမီး ပိုၼ်းထတ်းသၢင်ႈ တွၼ်ႈတႃႇၼႃႈလိၵ်ႈၼႆႉ",
        "currentrev": "ၵၢၼ်ၶူၼ်ႉလူ ၵမ်းလိုၼ်းသုတ်း",
        "rightslogtext": "ဢၼ်ၼႆႉပဵၼ် သဵၼ်ႈမၢႆ လွင်ႈလႅၵ်ႈလၢႆႈ သုၼ်ႈလႆႈ ၽူႈၸႂ်ႉတိုဝ်း",
        "action-read": "လူၼႃႈလိၵ်ႈၼႆႉ",
        "action-edit": "မူၼ်ႉမႄး ၼႃႈလိၵ်ႈၼႆႉ",
-       "action-createpage": "á\81µá\80±á\82\83á\82\88á\80\9eá\81¢á\80\84á\80ºá\82\88 á\81¼á\82\83á\82\88á\80\9cá\80­á\81µá\80ºá\82\88",
-       "action-createtalk": "ၵေႃႇသၢင်ႈ ၼႃႈလိၵ်ႈ ဢုပ်ႇဢူဝ်းၵၼ်",
+       "action-createpage": "á\81µá\80±á\82\83á\82\87á\80\9eá\81¢á\80\84á\80ºá\82\88 á\81¼á\82\83á\82\88á\80\9cá\80­á\81µá\80ºá\82\88á\81¼á\82\86á\82\89",
+       "action-createtalk": "ၵေႃႇသၢင်ႈ ၼႃႈလိၵ်ႈ ဢုပ်ႇဢူဝ်းၵၼ်ဢၼ်ၼႆႉ",
        "action-createaccount": "ၵေႃႇသၢင်ႈ ဢၶွင်ႉၽူႈၸႂ်ႉတိုဝ်း ဢၼ်ၼႆႉ",
        "action-autocreateaccount": "ၵေႃႇသၢင်ႈ ဢၶွင်ႉၽူႈၸႂ်ႉတိုဝ်း ၽၢႆႇၼွၵ်ႈ ႁင်းတူဝ်",
        "action-history": "တူၺ်း ပိုၼ်းၼႃႈလိၵ်ႈဢၼ်ၼႆႉ",
        "upload-form-label-own-work": "ဢၼ်ၼႆႉပဵၼ် ၼႃႈၵၢၼ်တူဝ်ၶႃႈ။",
        "upload-form-label-infoform-categories": "လိူင်ႈ",
        "upload-form-label-infoform-date": "ဝၼ်းထီႉ",
+       "backend-fail-stream": "ဢမ်ႇၸၢင်ႈပိုတ်ႇလႆၾၢႆႇ \"$1\" ဢၼ်ၼႆႉ။",
+       "backend-fail-backup": "ဢမ်ႇၸၢင်ႈႁဵတ်း ၵႅမ်လင်ၾၢႆႇ \"$1\" ၼႆႉ။",
+       "backend-fail-notexists": "ၾၢႆႇ $1 ၼႆႉ မၼ်းဢမ်ႇလႆႈမီးဝႆႉ။",
+       "backend-fail-hashes": "ဢမ်ႇၸၢင်ႈဢဝ် ၾၢႆႇဢၼ်ယွႆႈ တွၼ်ႈတႃႇတေမႃး ၶဵင်ႇထတ်းၵၼ်။",
+       "backend-fail-notsame": "ၾၢႆႇဢၼ်ဢမ်ႇပႆႇလႆႈ ထတ်းသၢင်ႈၼၼ်ႉ မီးဝႆႉလူင်ႈၼႃႈ ၵႃႈတီႈ \"$1\" ။",
+       "backend-fail-invalidpath": "\"$1\" ၼႆႉ သၢႆတၢင်းတႃႇတေသိမ်းမၼ်း ၽိတ်းဝႆႉ။",
+       "backend-fail-delete": "ဢမ်ႇၸၢင်ႈမွတ်ႇပႅတ်ႈ ၾၢႆႇ \"$1\".",
+       "backend-fail-describe": "ဢမ်ႇၸၢင်ႈလႅၵ်ႈလၢႆႈ ၶေႃႈမုၼ်းၽၢႆႇလင် တွၼ်ႈတႃႇၾၢႆႇ \"$1\" ။",
+       "backend-fail-alreadyexists": "ၾၢႆႇ \"$1\" မီးဝႆႉထႃႈယဝ်ႉ။",
+       "backend-fail-store": "ဢမ်ႇၸၢင်ႈသိမ်းၾၢႆႇ \"$1\" ၵႃႈတီႈ \"$2\" ။",
+       "backend-fail-copy": "ဢမ်ႇၸၢင်ႈထုတ်ႇဢဝ် ၾၢႆႇ \"$1\" ၸူး \"$2\".",
+       "backend-fail-move": "ဢမ်ႇၸၢင်ႈၶၢႆႉၾၢႆႇ \"$1\" ၸူး \"$2\" ။",
+       "backend-fail-opentemp": "ဢမ်ႇၸၢင်ႈပိုတ်ႇၾၢႆႇတိုဝ်းၸူဝ်ႈၵႅပ်ႉ။",
+       "backend-fail-writetemp": "ဢမ်ႇၸၢင်ႈတႅမ်ႈသႂ်ႇၸူး ၾၢႆႇတိုဝ်းၸူဝ်ႈၵႅပ်ႉ။",
+       "backend-fail-closetemp": "ဢမ်ႇၸၢင်ႈဢိုတ်း ၾၢႆႇတိုဝ်းၸူဝ်ႈၵႅပ်ႉ။",
+       "backend-fail-read": "ဢမ်ႇၸၢင်ႈလူၾၢႆႇ \"$1\" ။",
+       "backend-fail-create": "ဢမ်ႇၸၢင်ႈတႅမ်ႈၾၢႆႇ \"$1\" ။",
+       "backend-fail-maxsize": "ဢမ်ႇၸၢင်ႈတႅမ်ႈၾၢႆႇ \"$1\" ယွၼ်ႉပိူဝ်ႈဝႃႈ မၼ်းၼႆႉ ယႂ်ႇလိူဝ်သေ {{PLURAL:$2|ၼိုင်ႈပၢႆႉ|$2 ပၢႆႉ}}",
+       "backend-fail-readonly": "တီႈသိမ်းသုတ်းလင် \"$1\" ၼႆႉ ယၢမ်းလဵဝ် မၼ်းတေၸၢင်ႈလူလႆႈၵူၺ်း။ လွင်ႈတၢင်း ဢၼ်လႆႈပၼ်ဝႆႉတႄႉ ပဵၼ် <em>$2</em>",
+       "backend-fail-synced": "ၾၢႆႇ \"$1\" ၼႆႉ မၼ်းပဵၼ်သၢႆႇငၢႆ ဢၼ်ဢမ်ႇမႃးငမ်ႇမႅၼ်ႈၵၼ် တီႈၼႂ်း ဢွင်ႈသိမ်းသုတ်းလင် ၽၢႆႇၼႂ်း။",
+       "backend-fail-connect": "ဢမ်ႇၸၢင်ႈၵွင်ႉသိုပ်ႇၸူး ဢွင်ႈသိမ်းသုတ်းလင် \"$1\" ။",
+       "backend-fail-internal": "လွင်ႈၽိတ်းပိူင်ႈ ဢၼ်ဢမ်ႇႁူႉလွင်ႈမၼ်း လႆႈပဵၼ်ဝႆႉ ၵႃႈတီႈၼႂ်း ဢွင်ႈသိမ်းသုတ်းလင် \"$1\" ။",
+       "backend-fail-contenttype": "ဢမ်ႇၸၢင်ႈတႅပ်းတတ်းလိူင်ႈၾၢႆႇ ဢၼ်တႃႇတေသိမ်းၵႃႈတီႈ \"$1\" ။",
+       "backend-fail-batchsize": "ဢွင်ႈတီႈသိမ်းသုတ်းလင် ထုၵ်ႇပၼ်ဝႆႉ ၸုမ်းၾၢႆႇ $1 ၾၢႆႇ\n{{PLURAL:$1|ၵၢၼ်ႁဵတ်း|ၵၢၼ်ႁဵတ်း}}; တီႈမၵ်းၶၢၼ်းမၼ်းပဵၼ် $2\n{{PLURAL:$2|ၵၢၼ်ႁဵတ်း|ၵၢၼ်ႁဵတ်း}}.",
+       "backend-fail-usable": "ဢမ်ႇၸၢင်ႈလူ ဢမ်ႇၼၼ် ဢမ်ႇၸၢင်ႈတႅမ်ႈ ၾၢႆႇ \"$1\" ယွၼ်ႉပိူဝ်ႈဝႃႈ ၵၢၼ်လူတ်းပွႆႇ ဢမ်ႇတဵမ်ထူၼ်ႈ ဢမ်ႇၼၼ် ႁၢမ်းဝႆႉ ဢွင်ႈတီႈသိမ်း။",
+       "filejournal-fail-dbconnect": "ဢမ်ႇၸၢင်ႈၵွင်ႉသိုပ်ႇၸူး ယေးၶေႃႈမုၼ်း ၵျႃႇၼႄႇ တွၼ်ႈတႃႇ ဢွင်ႈတီႈသိမ်းသုတ်းလင် \"$1\" ။",
+       "filejournal-fail-dbquery": "ဢမ်ႇၸၢင်ႈဢၢပ်ႉတိတ်ႉ ယေးၶေႃႈမုၼ်း ၵျႃႇၼႄႇ တွၼ်ႈတႃႇ ဢွင်ႈတီႈသိမ်းသုတ်းလင် \"$1\" ။",
        "lockmanager-notlocked": "ဢမ်ႇၸၢင်ႈ ပိုတ်ႇသေႃး \"$1\"; ၼၼ်ႉမၼ်းဢမ်ႇလႆႈ ၶတ်းဝႆႉ။",
        "lockmanager-fail-closelock": "ဢမ်ႇၸၢင်ႈဢိုတ်း ၾၢႆႇဢၼ်ၶတ်းဝႆႉ တွၼ်ႈတႃႇ \"$1\" ။",
        "lockmanager-fail-deletelock": "ဢမ်ႇၸၢင်ႈမွတ်ႇပႅတ်ႈ ၾၢႆႇဢၼ်ၶတ်းဝႆႉ တွၼ်ႈတႃႈ \"$1\".",
        "lockmanager-fail-acquirelock": "ဢမ်ႇၸၢင်ႈဢဝ် ၶတ်းတွၼ်ႈတႃႇ \"$1\" ။",
        "lockmanager-fail-openlock": "ဢမ်ႇၸၢင်ႈဢိုတ်း ၾၢႆႇဢၼ်ၶတ်းဝႆႉ တွၼ်ႈတႃႇ \"$1\" ။",
        "lockmanager-fail-releaselock": "ဢမ်ႇၸၢင်ႈပွႆႇပၼ် ဢၼ်ၶတ်း တွၼ်ႈတႃႈ \"$1\" ။",
+       "lockmanager-fail-db-bucket": "ဢမ်ႇၸၢင်ႈၵပ်းသိုပ်ႇလႆႈ ယေးၶေႃႈမုၼ်းဢၼ်ၶတ်းဝႆႉ ၵႃႈတီႈၼႂ်း ပုင်း $1 ၼၼ်ႉ။",
        "lockmanager-fail-db-release": "ဢမ်ႇၸၢင်ႈပွႆႇပၼ်ၵၢၼ်ၶတ်း ၵႃႈတီႈ ယွင်ၶေႃႈမုၼ်း $1 ။",
        "lockmanager-fail-svr-acquire": "ဢမ်ႇၸၢင်ႈဢဝ်လႆႈ ၵၢၼ်ၶတ်း ၵႃႈတီႈၼိူဝ် သႃႇပိူဝ်ႇ $1 ။",
        "lockmanager-fail-svr-release": "ဢမ်ႇၸၢင်ႈပွႆႇပၼ် ၵၢၼ်ၶတ်း ၵႃႈတီႈၼိူဝ် သႃႇပိူဝ်ႇ $1 ။",
+       "zip-file-open-error": "ၽွင်းမိူဝ်ႈပိုတ်ႇၽၢႆႇ တွၼ်ႈတႃႇ ၵူတ်ႇထတ်း ZIP ၼၼ်ႉ လႆႈထူပ်းၺႃး လွင်ႈၽိတ်းပိူင်ႈ။",
        "zip-wrong-format": "ၾၢႆႇဢၼ်မၵ်းမၼ်ႈဝႆႉပၼ်ၼၼ်ႉ မၼ်းဢမ်ႇၸႂ်ႈ ၾၢႆႇ ZIP ။",
        "zip-bad": "ၾၢႆႇၼႆႉ မၼ်းၵွႆဝႆႉ ဢမ်ႇၼၼ် မၼ်းပဵၼ် ၾၢႆႇ ZIP ဢၼ်ဢမ်ႇလူႇလႆႈ။\nမၼ်းဢမ်ႇၸၢင်ႈ ၵူတ်ႇတူၺ်း တွၼ်ႈတႃႇ ပၢႆးႁူမ်ႇလူမ်ႈ လႆႈလီလီ။",
        "zip-unsupported": "ၾၢႆႇၼႆႉပဵၼ် ZIP ၾၢႆႇ ဢၼ်ၸႂ်ႉဝႆႉ ၽၢင်ႁၢင်ႈၵၢၼ် ZIP ဢၼ် သိူဝ်ႇၶၢဝ်ႇဝီႇၶီႇ ဢမ်ႇၵမ်ႉထႅမ်ဝႆႉ။  မၼ်းဢမ်ႇၸၢင်ႈ ၵူတ်ႇတူၺ်း တွၼ်ႈတႃႇ ပၢႆးႁူမ်ႇလူမ်ႈ လႆႈလီလီ။",
        "uploadstash": "လူတ်ႇၶိုၼ်ႈ ၵၢၼ်သိူင်ႇ",
+       "uploadstash-summary": "ၼႃႈလိၵ်ႈၼႆႉ ၵမ်ႉထႅမ်ပၼ် တႃႇၶဝ်ႈၸႂ်ႉ ၾၢႆႇဢၼ်လူတ်ႇၶိုၼ်ႈဝႆႉ ဢမ်ႇၼၼ် ဢၼ်တိုၵ်ႉမီးၼႂ်းၵၢၼ်လူတ်ႇၶိုၼ်ႈၼၼ်ႉ၊ ၵူၺ်းၵႃႈ တေပဵၼ်ၸိူဝ်းဢၼ်ဢမ်ႇပႆႇလႆႈ ​ပိုတ်ႇၽႄ ၸူးၵႃႈတီႈ ဝီႇၶီႇ။ ၾၢႆႇၸိူဝ်းၼႆႉၼႆႉ ၵူၼ်းတၢင်ႇၸိူဝ်းတေဢမ်ႇလႆႈႁၼ်၊ ၵူၺ်းၵႃႈဝႃႈ ၵူၼ်းၸိူဝ်းလူတ်ႇၶိုၼ်ႈၶဝ်ႈတႄႉ တေၸၢင်ႈႁၼ်လႆႈယူႇ။",
        "uploadstash-clear": "ၽဵဝ်ႈလၢင်ႈ ၾၢႆႇၸိူဝ်းသိူင်ႇသိမ်းဝႆႉ",
        "uploadstash-nofiles": "တီႈၸဝ်ႈၵဝ်ႇ ဢမ်ႇမီးၾၢႆႇသိူင်ႇသိမ်းသင်။",
+       "uploadstash-badtoken": "ႁဵတ်းသၢင်ႈ ၸိူဝ်းလွင်ႈႁဵတ်းဢၼ်လႆႈ တူၵ်းသုမ်းၵႂႃႇၼၼ်ႉ၊ မၢင်ၽဝ်ႇတေပဵၼ်ယွၼ်ႉလူၺ်ႈ ၶေႃႈၵမ်ႉတူဝ် ၵၢၼ်မႄးထတ်းၸဝ်ႈၵဝ်ႇၼၼ်ႉ ဢႃႇယုသုတ်းၵႂႃႇလႄႈႁိုဝ်။ ၶိုၼ်းမႄး ၶတ်းၸႂ်တူၺ်းထႅင်ႈၵမ်းၼိုင်ႈလႄႈ။",
        "uploadstash-errclear": "လွင်ႈၽဵဝ်ႈလၢင်ႉၾၢႆႇဢမ်ႇၶႅမ်ႉလႅပ်ႈ။",
        "uploadstash-refresh": "သၢႆႇၶိုၼ်း သဵၼ်ႈမၢႆၾၢႆႇ",
        "uploadstash-thumbnail": "တူၺ်းၼင်ႇ ႁၢင်ႈလဵၵ်ႉ",
+       "uploadstash-exception": "ဢမ်ႇၸၢင်ႈသိမ်း ၵၢၼ်လူတ်ႇၶိုၼ်ႈ ၵႃႈတီႈၼႂ်း တီႈသိူင်ႇ($1): \"$2\" ။",
+       "invalid-chunk-offset": "ပွတ်းတူဝ်ၵၢမ်း ၽိတ်းပိူင်ႈ",
        "img-auth-accessdenied": "ၵၢၼ်ၸႂ်ႉတိုဝ်း ထုၵ်ႇထဵင်ၶိုၼ်း။",
+       "img-auth-notindir": " သၢႆတၢင်းဢၼ်တုၵ်းယွၼ်းမႃးၼၼ်ႉ မၼ်းဢမ်ႇမီးၵႃႈတီႈၼႂ်း သၢႆတၢင်းလူတ်ႇၶိုၼ်ႈ ဢၼ်မႄးၵုမ်းဝႆႉ။",
        "img-auth-nologinnWL": "ၸဝ်ႈၵဝ်ႇ ဢမ်ႇလႆႈၶဝ်ႈ လွၵ်ႉဢိၼ်ဝႆႉသေ \"$1\" ၼႆႉ မၼ်းဢမ်ႇမီးဝႆႉ တီႈၼႂ်း သဵၼ်ႈမၢႆၶၢဝ်။",
        "img-auth-nofile": "ၾၢႆႇ \"$1\" ၼႆႉ မၼ်းဢမ်ႇမီးဝႆႉ။",
        "img-auth-isdir": "ၸဝ်ႈၵဝ်ႇ တိုၵ်ႉၶတ်းၸႂ်ႉ ၶဝ်ႈၸႂ်ႉ ၾူဝ်ႇတိူဝ်ႇ \"$1\" ယူႇ။\nၶႂၢင်းဝႆႉပၼ် ၵၢၼ်ၸႂ်ႉတိုဝ်းၾၢႆႇၵူၺ်း။",
        "unusedtemplates": "လွၵ်းပိူင် ဢၼ်ဢမ်ႇၸႂ်ႉဝႆႉ",
        "unusedtemplateswlh": "ႁဵင်းၵွင်ႉ တၢင်ႇၸိူဝ်း",
        "randompage": "ဢဝ်ၼႃႈလိၵ်ႈသၢင်ႇထုၵ်ႇဝႃႈ",
-       "randompage-nopages": "á\81¸á\80½á\80\99á\80ºá\80¸á\81¼á\80\84á\80ºá\82\87á\80\95á\82\83á\82\88á\80\90á\82\82á\80ºá\82\88á\81¼á\82\86á\82\89 á\80\99á\81¼á\80ºá\80¸á\80¢á\80\99á\80ºá\82\87á\80\99á\80®á\80¸ ဝႆႉ ၼႃႈလိၵ်ႈသင်\n{{PLURAL:$2|လွၵ်းၸိုဝ်ႈ|လွၵ်းၸိုဝ်ႈ}}: $1.",
+       "randompage-nopages": "á\80\90á\81¢á\80\84á\80ºá\80¸á\81½á\81¢á\82\86á\82\87á\80\90á\82\82á\80ºá\82\88á\81¼á\81¼á\80ºá\82\89 á\80¢á\80\99á\80ºá\82\87á\80\99á\80®á\80¸ဝႆႉ ၼႃႈလိၵ်ႈသင်\n{{PLURAL:$2|လွၵ်းၸိုဝ်ႈ|လွၵ်းၸိုဝ်ႈ}}: $1.",
        "randomincategory": "ၼႃႈလိၵ်ႈၵမ်ႉသၢင်ႇတေႃႇ ၵႃႈတီႈၼႂ်း လိူင်ႈ",
        "randomincategory-invalidcategory": "\"$1\" ၼႆႉ ပဵၼ်ၸိုဝ်ႈလိူင်ႈ ဢၼ်ဢမ်ႇပဵၼ်လႆႈ။",
        "randomincategory-nopages": "မၼ်းဢမ်ႇမီးဝႆ ၼႃႈလိၵ်ႈသင် ၵႃႈတီႈၼႂ်း [[:Category:$1|$1]] လိူင်ႈ။",
        "nbytes": "$1 {{PLURAL:$1|ၿႆႉ|ၿႆႉ}}",
        "ncategories": "{{PLURAL:$1|လိူင်ႈ|လိူင်ႈတင်းလၢႆ}}",
        "ninterwikis": "$1 {{PLURAL:$1|ဝီႇၶီႇၽၢႆႇၼႂ်း|ဝီႇၶီႇၸိူဝ်းၽၢႆႇၼႂ်း}}",
-       "nlinks": "$1 {{PLURAL:$1|ႁဵင်းၵွင်ႉ|ႁဵင်းၵွင်ႉ}}",
+       "nlinks": "$1 {{PLURAL:$1|ႁဵင်းၵွင်ႉ|ႁဵင်းၵွင်ႉၼမ်}}",
        "nmembers": "$1 {{PLURAL:$1|member|ၽူႈၶဝ်ႈၸုမ်း}}",
-       "nmemberschanged": "$1 → $2 {{PLURAL:$2|ၽူႈၶဝ်ႈၸုမ်း|ၽူႈၶဝ်ႈၸုမ်း}}",
+       "nmemberschanged": "$1 → $2 {{PLURAL:$1|member|ၽူႈၶဝ်ႈၸုမ်း}}",
        "nrevisions": "$1 {{PLURAL:$1|​ၶေႃႈၶူၼ်ႉလူ|ၶေႃႈၶူၼ်ႉလူ}}",
-       "nimagelinks": "á\81¸á\82\82á\80ºá\82\89á\80\9dá\82\86á\82\89á\81µá\82\83á\82\88á\80\90á\80®á\82\88á\81¼á\80­á\80°á\80\9dá\80º $1 {{PLURAL:$1|á\81¼á\82\83á\82\88á\80\9cá\80­á\81µá\80ºá\82\88|ၼႃႈလိၵ်ႈ}}",
-       "ntransclusions": "ၸႂ်ႉဝႆႉၵႃႈတီႈၼိူဝ် $1 {{PLURAL:$1|ၼႃႈလိၵ်ႈ|ၼႃႈလိၵ်ႈ}}",
+       "nimagelinks": "á\81¸á\82\82á\80ºá\82\88á\80\9dá\82\86á\82\89 á\80\90á\80®á\82\88 $1 {{PLURAL:$1|page|ၼႃႈလိၵ်ႈ}}",
+       "ntransclusions": "ၸႂ်ႉဝႆႉၵႃႈတီႈၼိူဝ် $1 {{PLURAL:$|page|ၼႃႈလိၵ်ႈ}}",
        "specialpage-empty": "တွၼ်ႈတႃႇ ၶေႃႈပွင်ႇၼႄ ဢၼ်ၼႆႉၼႆႉ မၼ်းဢမ်ႇမီး ၽွၼ်းလႆႈ။",
        "lonelypages": "ၼႃႈလိၵ်ႈ ႁၢမ်းႁိူၼ်း",
        "lonelypagestext": "ၼႃႈလိၵ်ႈၸိူဝ်းပႃႈတႂ်ႈၼႆႉ မၼ်းဢမ်ႇလႆႈ ၵွင်ႉဝႆႉ ဢမ်ႇၼၼ် ဢမ်ႇလႆႈၶဝ်ႈပႃႈဝႆႉ တႂ်ႈၼႂ်း ၼႃႈလိၵ်ႈတႃႇၸိူဝ်း ၼင်ႇ  {{SITENAME}} ၼႆႉ။",
        "listusers-editsonly": "ၼႄပၼ် ၽူႈၸႂ်ႉတိုဝ်း ၸိူဝ်းမႄးထတ်းၼၼ်ႉၵူၺ်း",
        "listusers-creationsort": "ၶပ်ႉၸႅၼ်ၸွမ်း ဝၼ်းထီႉ ၵေႃႇသၢင်ႈ",
        "listusers-desc": "ၶပ်ႉၸႅၼ်ႇၸွမ်း မၢႆၶပ်ႉတူဝ်လဵၵ်ႉ",
-       "usereditcount": "$1 {{PLURAL:$1|မႄးထတ်း|မႄးထတ်း}}",
+       "usereditcount": "$1 {{PLURAL:$1|edit|မႄးထတ်း}}",
        "usercreated": "{{GENDER:$3|ၵေႃႇသၢင်ႈယဝ်ႉ}} မိူဝ်ႈ $1 မိူဝ်ႈ$2",
        "newpages": "ၼႃႈလိၵ်ႈမႂ်ႇ",
        "newpages-submit": "ၼႄ",
        "notargettext": "ၸဝ်ႈၵဝ်ႇ ဢမ်ႇလႆႈမၵ်းမၼ်ႈဝႆႉ ၼႃႈလိၵ်ႈတီႈယိူင်း ဢမ်ႇၼၼ် ၽူႈၸႂ်ႉတိုဝ်း တွၼ်ႈတႃႇႁဵတ်း ၼႃႈၵၢၼ်ၼႆႉ။",
        "nopagetitle": "ဢမ်ႇမီး ၼႃႈလိၵ်ႈ တီႈယိူင်းၸူး",
        "pager-older-n": "{{PLURAL:$1|older 1|ဢၼ်ၵဝ်ႇၵဝ်ႇ $1}}",
+       "apisandbox-reset": "ၽဵဝ်ႈလၢင်ႉ",
+       "apisandbox-retry": "ၶိုၼ်းၶတ်းၸႂ်တူၺ်း",
+       "apisandbox-loading": "တိုၵ်ႉပိုတ်ႇ လွၼ်ႉၶၢဝ်ႇတႃႇ module APL \"$1\"...",
+       "apisandbox-load-error": "ၽွင်းမိူဝ်ႈတိုၵ်ႉပိုတ်ႇ လွၼ်ႉၶၢဝ်ႇ module API \"$1\" : $2 ၼၼ်ႉ မၼ်းမီးဝႆႉ လွင်ႈၽိတ်းပိူင်ႈ",
+       "apisandbox-no-parameters": "​API module ဢၼ်ၼႆႉ မၼ်းဢမ်ႇမီးဝႆႉ ပႃႇရႃႇမီႇတႃႇ။",
+       "apisandbox-helpurls": "ႁဵင်းၵွင်ႉ တၢင်းၸွႆႈထႅမ်",
+       "apisandbox-examples": "တူဝ်ယၢင်ႇ",
+       "apisandbox-dynamic-parameters": "ပႃႇရႃႇမီႇတႃႇ ဢၼ်ၵႅမ်",
+       "apisandbox-dynamic-parameters-add-label": "ထႅမ်သႂ်ႇ ပႃႇရႃႇမီႇတႃႇ :",
+       "apisandbox-dynamic-parameters-add-placeholder": "ၸိုဝ်ႈ ပႃႇရႃႇမီႇတႃႇ",
+       "apisandbox-dynamic-error-exists": "ပႃႇရႃႇမီႇတႃႇ ဢၼ်ပၼ်ၸိုဝ်ႈဝႆႉဝႃႈ \"$1\" ၼၼ်ႉ မၼ်းမီးဝႆႉယဝ်ႉ။",
+       "apisandbox-deprecated-parameters": "ပႃႇရႃႇမီႇတႃႇ ဢၼ်ထုၵ်ႇဝႃႈၽိတ်းဝႆႉ",
+       "apisandbox-fetch-token": "ထႅမ်မႂ်ၶပ်ႉၵႂႃႇ ႁင်းၵူၺ်း",
+       "apisandbox-submit-invalid-fields-title": "လွၵ်းမၢင်ၸိူဝ်းၼႆႉ ၽိတ်းပိူင်ႈဝႆႉ",
+       "apisandbox-submit-invalid-fields-message": "ၶႅၼ်းတေႃႈ ၶိုၼ်းမႄးထတ်းတူၺ်း လွၵ်းၸိူဝ်းပၼ်မၢႆဝႆႉသေ ၶိုၼ်းသိုပ်ႇ ၶတ်းၸႂ်တူၺ်းထႅင်ႈလႄႈ။",
+       "apisandbox-results": "ၽွၼ်းလႆႈ",
+       "apisandbox-sending-request": "တိုၵ်ႉသူင်ႇ ၶေႃႈတုၵ်းယွၼ်း API...",
+       "apisandbox-loading-results": "တိုၵ်ႉႁပ်ႉဢဝ် ၽွၼ်းလႆႈ API...",
+       "apisandbox-results-error": "ၽွင်းတိုၵ်ႉပိုတ်ႇ ​ၶေႃႈတွပ်ႇတႃႇ ၵၢၼ်ၸွပ်ႇႁႃ API : $1 ၼၼ်ႉ လႆႈမီး လွင်ႈၽိတ်းပိူင်ႈဝႆႉ။",
+       "apisandbox-request-url-label": " URL ဢၼ်တုၵ်းယွၼ်း :",
+       "apisandbox-request-time": "ၶၢဝ်းယၢမ်းတုၵ်းယွၼ်း : {{PLURAL:$1|$1 ms}}",
+       "apisandbox-results-fixtoken": "မႂ်ၶပ်ႉမၢၼ်ႇမႅၼ်ႈ လႄႈ ၶိုၼ်းမၵ်းမၼ်ႈ",
+       "apisandbox-results-fixtoken-fail": "တႃႇႁွင်ႉဢဝ် မႂ်ၶပ်ႉ \"$1\" ၼၼ်ႉ ဢမ်ႇၶႅမ်ႉလႅပ်ႉ",
+       "apisandbox-alert-page": "လွၵ်းၸိူဝ်းဢၼ်မီးတီႈၼိူဝ် ၼႃႈလိၵ်ႈၼႆႉ မၼ်းဢမ်ႇၸႂ်ႉလႆႈ",
+       "apisandbox-alert-field": "ၵႃႈၶၼ်တွၼ်ႈတႃႇ လွၵ်းဢၼ်ၼႆႉ မၼ်းဢမ်ႇၸႂ်ႉလႆႈ",
+       "apisandbox-continue": "သိုပ်ႇၼႃႈ",
+       "apisandbox-continue-clear": "ၽဵဝ်ႈလၢင်ႉ",
        "booksources": "ငဝ်ႈငႃႇ ပပ်ႉလိၵ်ႈ",
        "booksources-search-legend": "ၶူၼ်ႉႁႃတႃႇ ငဝ်ႇငႃႇပပ်ႉ",
        "booksources-search": "ၶူၼ်ႉႁႃ",
+       "booksources-invalid-isbn": "ISBN ဢၼ်ပၼ်ဝႆႉၼၼ်ႉ မၼ်းဢွၵ်ႇၼႄဝႃႈ ဢမ်ႇၸႂ်ႈလႆႈ၊ ၵူတ်ႇတူၺ်း လွင်ႇထုတ်ႇဢဝ် ၵႃႈတီႈ ငဝ်ႈတိုၼ်း မၼ်းၼၼ်ႉလႄႈ။",
+       "specialloguserlabel": "တူဝ်​ႁဵတ်းသၢင်ႈ :",
+       "speciallogtitlelabel": "တီႈယိူင်း (ႁူဝ်ၶေႃႈ ဢမ်ႇၼၼ် {{ns:user}}: ၸိုဝ်ႈၽူႈၸႂ်ႉတိုဝ်း တႃႇ ၽူႈၸႂ်ႉတိုဝ်း):",
        "log": "သၢႆမၢႆ",
+       "logeventslist-submit": "ၼႄ",
+       "all-logs-page": "သဵၼ်ႈမၢႆၵူၼ်းတင်းၼမ် တင်းမူတ်း",
+       "logempty": "ဢမ်ႇငမ်ႇၵၼ်တင်း တီႈၼႂ်းသဵၼ်ႈမၢႆ",
+       "log-title-wildcard": "ဢဝ်လိၵ်ႈၸိူဝ်းၼႆႉသေ တႄႇသွၵ်ႈႁႃ ႁူဝ်ၶေႃႈ",
+       "showhideselectedlogentries": "လႅၵ်ႈလၢႆႈ ၵၢၼ်ႁၼ်လႆႈ ၶွင် ၶေႃႈၶူၼ်ႉဢၢၼ်ႇ ၸိူဝ်းလိူၵ်ႈဝႆႉ",
+       "log-edit-tags": "မႄးထတ်ႈမႂ်တိင် ၶွင် ၶေႃႈၶူၼ်ႉဢၢၼ်ႇ ၸိူဝ်းလိူၵ်ႈဝႆႉ",
+       "checkbox-select": "လိူၵ်ႈ : $1",
+       "checkbox-all": "တင်းမူတ်း",
+       "checkbox-none": "ဢမ်ႇမီးသင်",
+       "checkbox-invert": "ပိၼ်ႈၽိုၼ်",
        "allpages": "ၼႃႈ​လိၵ်ႈ​တင်း​သဵင်ႈ",
+       "nextpage": "ၼႃးလိၵ်ႈ တေမႃး ($1)",
+       "prevpage": "ၼႃးလိၵ်ႈ ပူၼ်ႉမႃး ($1)",
+       "allpagesfrom": "ၼႃႈလိၵ်ႈဢၼ်ၼႄ တႄႇတီႈ :",
+       "allpagesto": "ၼႃႈလိၵ်ႈဢၼ်ၼႄ သုတ်းတီႈ :",
        "allarticles": "ၼႃႈ​လိၵ်ႈ​တင်း​သဵင်ႈ",
+       "allinnamespace": "ၼႃႈလိၵ်ႈတင်းမူတ်း ($1 ဢွင်ႈၸိုဝ်ႈ)",
        "allpagessubmit": "ၶူၼ်ႉႁႃ",
+       "allpagesprefix": "ၼႃးလိၵ်ႈဢၼ်ၼႄ ဢိၵ်ႇတင်း ၶေႃႈလူင်ႈၼႃႈ",
        "categories": "လိူင်ႈ",
        "mywatchlist": "သဵၼ်ႈမၢႆပႂ်ႉတူၺ်း",
        "watch": "ပႂ်ႉတူၺ်း",
index 3480e4f..24230f6 100644 (file)
        "tog-numberheadings": "Automaticky číslovať nadpisy",
        "tog-showtoolbar": "Zobraziť panel nástrojov úprav",
        "tog-editondblclick": "Upravovať stránky po dvojitom kliknutí",
-       "tog-editsectiononrightclick": "Umožniť upravovanie sekcie pravým kliknutím na nadpisy sekcií",
+       "tog-editsectiononrightclick": "Umožniť upravovanie sekcie kliknutím pravým tlačidlom myši na nadpisy sekcií",
        "tog-watchcreations": "Pridávať stránky, ktoré vytvorím a súbory, ktoré nahrám medzi sledované",
        "tog-watchdefault": "Pridávať stránky a súbory, ktoré upravím medzi sledované",
        "tog-watchmoves": "Pridávať stránky a súbory, ktoré presuniem medzi sledované",
        "tog-watchdeletion": "Pridávať stránky a súbory, ktoré zmažem medzi sledované",
-       "tog-watchrollback": "Pridať stránky na ktorých som použil rollback do môjho zoznamu sledovaných stránok",
+       "tog-watchuploads": "Pridať nové súbory, ktoré nahrám, do môjho zoznamu sledovaných",
+       "tog-watchrollback": "Pridať do môjho zoznamu sledovaných stránok stránky, na ktorých som použil vrátenie",
        "tog-minordefault": "Označovať všetky zmeny štandardne ako drobné",
        "tog-previewontop": "Zobrazovať náhľad pred textovým poľom úprav, nie až za ním",
        "tog-previewonfirst": "Zobraziť náhľad pred prvou úpravou",
        "tog-enotifwatchlistpages": "Upozorniť ma e-mailom, keď sa zmení stránka alebo súbor z môjho zoznamu sledovaných",
        "tog-enotifusertalkpages": "Upozorniť ma e-mailom po zmene mojej používateľskej diskusnej stránky",
        "tog-enotifminoredits": "Upozorniť ma e-mailom aj na drobné úpravy stránok a súborov",
-       "tog-enotifrevealaddr": "Zobraziť moju mailovú adresu v notifikačných e-mailoch",
+       "tog-enotifrevealaddr": "Zobraziť moju emailovú adresu v emailoch s upozornením",
        "tog-shownumberswatching": "Zobraziť počet používateľov sledujúcich stránku",
-       "tog-oldsig": "Súčasný podpis:",
+       "tog-oldsig": "Váš súčasný podpis:",
        "tog-fancysig": "Považovať podpisy za wikitext (bez automatických odkazov)",
        "tog-uselivepreview": "Používať živý náhľad",
        "tog-forceeditsummary": "Upozoriť ma, keď nevyplním zhrnutie úprav",
        "newwindow": "(otvorí v novom okne)",
        "cancel": "Zrušiť",
        "moredotdotdot": "Viac...",
-       "morenotlisted": "Tento zoznam nie je úplný.",
+       "morenotlisted": "Tento zoznam nemusí byť úplný.",
        "mypage": "Stránka",
        "mytalk": "Diskusia",
        "anontalk": "Diskusia",
        "tagline": "Z {{GRAMMAR:genitív|{{SITENAME}}}}",
        "help": "Pomoc",
        "search": "Hľadať",
+       "search-ignored-headings": " #<!-- tento riadok je nutné nechať bez zmeny --> <pre>\n# Nadpisy, ktoré bude vyhľadávanie ignorovať.\n# Tieto zmenu sa prejavia akonáhle bude stránka s nadpisom zaindexovaná.\n# Reindexovanie stránky môžete vynútiť uložením prázdnej úpravy.\n# Syntax je nasledovná:\n#   * Všetko počínajúc znakom „#“ do konca riadka je komentár.\n#   * Každý neprázdny riadok je presný názov, ktorý má byť ignorovaný, presne ako je napísaný, pričom na veľkosti písmen záleží.\nReferencie\nExterné odkazy\nPozri aj\n #</pre> <!-- tento riadok je nutné nechať bez zmeny -->",
        "searchbutton": "Hľadať",
        "go": "Vykonať",
        "searcharticle": "Ísť na",
        "talk": "Diskusia",
        "views": "Zobrazenia",
        "toolbox": "Nástroje",
+       "tool-link-userrights": "Zmeniť používateľské skupiny {{GENDER:$1|tohoto použivateľa|tejto používateľky}}",
+       "tool-link-emailuser": "Poslať e-mail {{GENDER:$1|tomuto používateľovi|tejto používateľke}}",
        "userpage": "Zobraziť stránku používateľa",
        "projectpage": "Zobraziť projektovú stránku",
        "imagepage": "Zobraziť stránku súboru",
        "pool-timeout": "Bol prekročený vyhradený čas čakania na zámok",
        "pool-queuefull": "Front je plný",
        "pool-errorunknown": "Neznáma chyba",
-       "pool-servererror": "Služba riadiaca prístup k serverom nieje dostupná ($1).",
+       "pool-servererror": "Služba riadiaca prístup k serverom nie je dostupná ($1).",
        "poolcounter-usage-error": "Chyba použitia: $1",
        "aboutsite": "O {{GRAMMAR:lokál|{{SITENAME}}}}",
        "aboutpage": "Project:Úvod",
        "toc": "Obsah",
        "showtoc": "zobraziť",
        "hidetoc": "skryť",
-       "collapsible-collapse": "skry",
-       "collapsible-expand": "rozbaľ",
+       "collapsible-collapse": "Skryť",
+       "collapsible-expand": "Rozbaliť",
        "confirmable-confirm": "Ste si {{GENDER:$1|istý|istá|istí}}?",
        "confirmable-yes": "Áno",
        "confirmable-no": "Nie",
        "nospecialpagetext": "<strong>Vyžiadali ste si neplatnú špeciálnu stránku.</strong>\n\nZoznam platných špeciálnych stránok nájdete na [[Special:SpecialPages|{{int:specialpages}}]].",
        "error": "Chyba",
        "databaseerror": "Chyba v databáze",
-       "databaseerror-text": "Došlo k chybe pri otázke do databázy.\nMôže to byť spôsobené chybou v softvéri.",
+       "databaseerror-text": "Došlo k chybe pri kladení požiadavky do databázy.\nMôže to byť spôsobené chybou v softvéri.",
        "databaseerror-textcl": "Vyskytla sa chyba dopytu do databázy.",
-       "databaseerror-query": "Otázka: $1",
+       "databaseerror-query": "Požiadavka: $1",
        "databaseerror-function": "Funkcia: $1",
        "databaseerror-error": "Chyba: $1",
+       "transaction-duration-limit-exceeded": "Aby predišlo veľkému oneskoreniu pri replikácii, táto transakcia bola prerušená, pretože doba jej zápisu ($1) prekročila limit $2 sekúnd.\nAk robíte naraz veľa zmien, skúste radšej robiť viacero menších operácií.",
        "laggedslavemode": "Upozornenie: Je možné, že stránka neobsahuje posledné aktualizácie.",
        "readonly": "Databáza je zamknutá",
        "enterlockreason": "Zadajte dôvod požadovaného zamknutia vrátane odhadu, kedy očakávate odomknutie",
        "missingarticle-rev": "(č. revízie: $1)",
        "missingarticle-diff": "(rozdiel: $1, $2)",
        "readonly_lag": "Databáza bola automaticky zamknutá pokým záložné databázové servery nedoženú hlavný server",
+       "nonwrite-api-promise-error": "Bola odoslaná hlavička HTTP „Promise-Non-Write-API-Action“, ale požiadavka smerovala do modulu API na zápis.",
        "internalerror": "Vnútorná chyba",
        "internalerror_info": "Vnútorná chyba: $1",
        "internalerror-fatal-exception": "Kritická výnimka typu „$1“",
        "filerenameerror": "Nebolo možné premenovať súbor „$1“ na „$2“.",
        "filedeleteerror": "Nebolo možné vymazať súbor „$1“.",
        "directorycreateerror": "Nebolo možné vytvoriť adresár „$1“.",
-       "directoryreadonlyerror": "Adresár \"$1\" je iba na čítanie.",
-       "directorynotreadableerror": "Adresár \"$1\" sa nedá čítať.",
+       "directoryreadonlyerror": "Adresár „$1“ je iba na čítanie.",
+       "directorynotreadableerror": "Adresár „$1“ nie je možné čítať.",
        "filenotfound": "Nebolo možné nájsť súbor „$1“.",
        "unexpected": "Neočakávaná hodnota: „$1“=„$2“.",
        "formerror": "Chyba: nepodarilo sa odoslať formulár",
        "no-null-revision": "Nepodarilo sa vytvoriť novú prázdnu revíziu stránky „$1“",
        "badtitle": "Neplatný nadpis",
        "badtitletext": "Požadovaný nadpis bol neplatný, nezadaný, alebo nesprávne odkazovaný z inej jazykovej verzie {{GRAMMAR:genitív|{{SITENAME}}}}. Mohol tiež obsahovať jeden alebo viac znakov, ktoré nie je možné použiť v nadpisoch.",
+       "title-invalid-empty": "Požadovaný názov stránky je prázdny alebo obsahuje iba menný priestor.",
+       "title-invalid-utf8": "Požadovaný názov stránky obsahuje neplatnú postupnosť UTF-8.",
+       "title-invalid-interwiki": "Požadovaný názov stránky obsahuje odkaz interwiki, ktorý nie je možné používať v názvoch stránky.",
+       "title-invalid-talk-namespace": "Požadovaný názov stránky odkazuje na neexistujúcu diskusnú stránku.",
+       "title-invalid-characters": "Požadovaný názov stránky obsahuje neplatné znaky: „$1“.",
+       "title-invalid-relative": "Názov stránky má relatívnu cestu. Relatívne názvy stránky (./, ../) sú neplatné, pretože by často boli nedostupné, keď s nimi pracuje prehliadač používateľa.",
+       "title-invalid-magic-tilde": "Požadovaný názov stránky obsahuje neplatnú magickú postupnosť vlnoviek (<nowiki>~~~</nowiki>).",
+       "title-invalid-too-long": "Požadovaný názov stránky je príliš dlhý. Nesmie byť dlhšií ako $1 {{PLURAL:$1|bajt|bajty|bajtov}} v kódovaní UTF-8.",
+       "title-invalid-leading-colon": "Požadovaný názov stránky obsahuje na začiatku neplatnú dvojbodku.",
        "perfcached": "Nasledujúce údaje pochádzajú z vyrovnávacej pamäte a nemusia byť úplne aktuálne. Vo vyrovnávacej pamäti {{PLURAL:$1|je dostupný|sú dostupné|je dostupných}} najviac {{PLURAL:$1|jeden výsledok|$1 výsledky|$1 výsledkov}}.",
        "perfcachedts": "Nasledujúce údaje pochádzajú z vyrovnávacej pamäte a naposledy boli aktualizované $1. Vo vyrovnávacej pamäti {{PLURAL:$4|je dostupný|sú dostupné|je dostupných}} najviac {{PLURAL:$4|jeden výsledok|$4 výsledky|$4 výsledkov}}.",
        "querypage-no-updates": "Aktualizácie tejto stránky sú momentálne vypnuté. Tieto dáta sa v súčasnosti nebudú obnovovať.",
        "viewsourcetext": "Môžete si zobraziť a kopírovať zdroj tejto stránky:",
        "viewyourtext": "Môžete si prehliadnuť a skopírovať zdrojový kód <strong>vašich úprav</strong> tejto stránky:",
        "protectedinterface": "Táto stránka poskytuje text používateľského rozhrania tejto wiki a je zamknutá, aby sa predišlo jej zneužitiu.\nAk chcete pridať alebo zmeniť preklady pre všetky wiki, prosím, použite [https://translatewiki.net/ translatewiki.net], projekt lokalizácie MediaWiki.",
-       "editinginterface": "'''Upozornenie:''' Upravujete stránku, ktorá poskytuje text používateľského rozhrania.\nZmeny tejto stránky ovplyvnia vzhľad používateľského rozhrania ostatným používateľom.\nAk chcete pridať alebo zmeniť preklady pre všetky wiki, prosím, použite [https://translatewiki.net/ translatewiki.net], projekt lokalizácie MediaWiki.",
+       "editinginterface": "<strong>Upozornenie:</strong> Upravujete stránku, ktorá poskytuje text používateľského rozhrania.\nZmeny tejto stránky ovplyvnia vzhľad používateľského rozhrania ostatným používateľom.\nAk chcete pridať alebo zmeniť preklady pre všetky wiki, prosím, použite [https://translatewiki.net/ translatewiki.net], projekt lokalizácie MediaWiki.",
        "translateinterface": "Na pridanie a zmeny prekladov pre všetky wiki použite [https://translatewiki.net/ translatewiki.net], projekt na lokalizáciu MediaWiki.",
        "cascadeprotected": "Táto stránka bola zamknutá proti úpravám, pretože je použitá na {{PLURAL:$1|nasledovnej stránke, ktorá je zamknutá|nasledovných stránkach, ktoré sú zamknuté}} voľbou „kaskádového zamknutia“:\n$2",
        "namespaceprotected": "Nemáte povolenie upravovať stránky v mennom priestore '''$1'''.",
        "invalidtitle-unknownnamespace": "Neplatný názov s neznámym číslom menného priestoru „$1“ a textom „$2“",
        "exception-nologin": "Nie ste prihlásený",
        "exception-nologin-text": "Táto stránka alebo operácia vyžaduje, aby ste boli prihlásený.",
-       "exception-nologin-text-manual": "Pre prístup na túto stránku alebo k tejto akcii sa musíte $1.",
+       "exception-nologin-text-manual": "Pre prístup na túto stránku alebo k tejto operácii sa musíte $1.",
        "virus-badscanner": "Chybná konfigurácia: neznámy antivírus: ''$1''",
        "virus-scanfailed": "kontrola zlyhala (kód $1)",
        "virus-unknownscanner": "neznámy antivírus:",
-       "logouttext": "'''Práve ste sa odhlásili.'''\n\nUvedomte si, že niektoré stránky sa môžu naďalej zobrazovať ako keby ste boli prihlásený, až kým nevymažete vyrovnávaciu pamäť vášho prehliadača.",
+       "logouttext": "<strong>Práve ste sa odhlásili.</strong>\n\nUvedomte si, že niektoré stránky sa môžu naďalej zobrazovať ako keby ste boli prihlásený, až kým nevymažete vyrovnávaciu pamäť vášho prehliadača.",
+       "cannotlogoutnow-title": "Teraz nie je možné odhlásiť sa",
+       "cannotlogoutnow-text": "Nie je možné odhlásiť sa, keď používate $1",
        "welcomeuser": "Vitajte,  $1 !",
        "welcomecreation-msg": "Váš účet bol vytvorený.\nNezabudnite zmeniť svoje [[Special:Preferences|Predvoľby {{GRAMMAR:genitív|{{SITENAME}}}}]].",
        "yourname": "Používateľské meno:",
        "yourpasswordagain": "Zopakujte heslo:",
        "createacct-yourpasswordagain": "Potvrdiť heslo",
        "createacct-yourpasswordagain-ph": "Zadajte heslo znova",
-       "userlogin-remembermypassword": "Zapamätať si ma",
+       "userlogin-remembermypassword": "Zapamätať si moje prihlásenie",
        "userlogin-signwithsecure": "Použiť zabezpečené pripojenie",
+       "cannotlogin-title": "Nie je možné prihlásiť sa",
+       "cannotlogin-text": "Prihlásenie nie je možné.",
+       "cannotloginnow-title": "Teraz nie je možné prihlásiť sa",
+       "cannotloginnow-text": "Nie je možné odhlásiť sa, keď používate $1.",
+       "cannotcreateaccount-title": "Nie je možné vytvárať účty",
+       "cannotcreateaccount-text": "Priame vytváranie účtu nie je na tejto wiki povolené.",
        "yourdomainname": "Vaša doména:",
        "password-change-forbidden": "Na tejto wiki si nemôžete zmeniť heslo.",
        "externaldberror": "Buď nastala chyba externej autentifikačnej databázy alebo vám nie je povolené aktualizovať váš externý účet.",
        "userlogin-resetlink": "Zabudli ste svoje prihlasovacie údaje?",
        "userlogin-resetpassword-link": "Zabudli ste heslo?",
        "userlogin-helplink2": "Pomoc s prihlásením",
-       "userlogin-loggedin": "Ste už {{GENDER:$1|prihĺasený|prihlásená}} ako $1.\nPomocou formulára nižšie sa môžete prihlásiť ako iný redaktor.",
+       "userlogin-loggedin": "Ste už {{GENDER:$1|prihlasený|prihlásená}} ako $1.\nPomocou formulára nižšie sa môžete prihlásiť ako iný používateľ.",
        "userlogin-reauth": "Aby ste preukázali, že ste $1, musíte sa znovu prihlásiť.",
        "userlogin-createanother": "Vytvoriť ďalší účet",
-       "createacct-emailrequired": "E-mailová adresa",
-       "createacct-emailoptional": "E-mailová adresa (nepovinné)",
-       "createacct-email-ph": "Zadajte vašu e-mailovú adresu",
-       "createacct-another-email-ph": "Zadajte vašu e-mailovú adresu",
-       "createaccountmail": "Použiť dočasné náhodné heslo a poslať ho na uvedenú e-mailovú adresu",
+       "createacct-emailrequired": "Emailová adresa",
+       "createacct-emailoptional": "Emailová adresa (nepovinné)",
+       "createacct-email-ph": "Zadajte svoju emailovú adresu",
+       "createacct-another-email-ph": "Zadajte svoju emailovú adresu",
+       "createaccountmail": "Použiť dočasné náhodné heslo a poslať ho na uvedenú emailovú adresu",
        "createaccountmail-help": "Môže byť použité na vytvorenie účtu pre inú osobu bez prezradenia hesla.",
        "createacct-realname": "Skutočné meno (nepovinné)",
        "createaccountreason": "Dôvod:",
        "createacct-reason": "Dôvod",
        "createacct-reason-ph": "Prečo si vytvárate ďalší účet",
        "createacct-reason-help": "Správa zobrazená v knihe nových používateľov",
-       "createacct-submit": "Vytvoriť účet",
+       "createacct-submit": "Vytvoriť si účet",
        "createacct-another-submit": "Vytvoriť účet",
-       "createacct-continue-submit": "Pokračovať v zakladaní účtu",
-       "createacct-another-continue-submit": "Pokračovať v zakladaní účtu",
-       "createacct-benefit-heading": "{{GRAMMAR:akuzatív|{{SITENAME}}}} tvoria ľudia ako vy.",
+       "createacct-continue-submit": "Pokračovať vo vytváraní účtu",
+       "createacct-another-continue-submit": "Pokračovať vo vytváraní účtu",
+       "createacct-benefit-heading": "{{GRAMMAR:akuzatív|{{SITENAME}}}} tvoria ľudia ako ste vy.",
        "createacct-benefit-body1": "{{PLURAL:$1|úprava|úpravy|úprav}}",
        "createacct-benefit-body2": "{{PLURAL:$1|stránka|stránky|stránok}}",
        "createacct-benefit-body3": "{{PLURAL:$1|nedávny prispievateľ|nedávni prispievatelia|nedávnych prispievateľov}}",
        "badretype": "Zadané heslá nie sú rovnaké.",
-       "usernameinprogress": "Vytváranie účtu s týmto menom už prebieha. Počkajte prosím.",
+       "usernameinprogress": "Vytváranie účtu s týmto menom už prebieha. Prosím, počkajte.",
        "userexists": "Zadané používateľské meno sa už používa.\nProsím, zvoľte si iné meno.",
        "loginerror": "Chyba pri prihlasovaní",
        "createacct-error": "Chyba pri vytváraní účtu",
        "botpasswords-no-central-id": "Aby ste mohli použiť heslá pre botov musíte byť prihlásený k centrálnemu účtu.",
        "botpasswords-existing": "Jestvujúce heslá pre botov",
        "botpasswords-createnew": "Vytvoriť nové heslo pre botov",
+       "botpasswords-editexisting": "Zmeniť existujúce heslo bota",
        "botpasswords-label-appid": "Názov bota:",
        "botpasswords-label-create": "Vytvoriť",
        "botpasswords-label-update": "Aktualizovať",
        "botpasswords-label-cancel": "Zrušiť",
        "botpasswords-label-delete": "Vymazať",
        "botpasswords-label-resetpassword": "Obnoviť heslo",
+       "botpasswords-label-grants": "Príslušné oprávnenia:",
+       "botpasswords-help-grants": "Každé oprávnenie poskytuje prístup k uvedeným právam používateľa, ktoré už používateľský účet má. Ďalšie informácie nájdete v [[Special:ListGrants|tabuľke oprávnení]].",
+       "botpasswords-label-grants-column": "Udelené",
+       "botpasswords-bad-appid": "Názov bota „$1“ nie je platný.",
+       "botpasswords-insert-failed": "Nepodarilo sa pridať názov bota „$1“. Je už pridaný?",
+       "botpasswords-update-failed": "Nepodarilo sa aktualizovať názov bota „$1“. Bol zmazaný?",
+       "botpasswords-created-title": "Heslo bota bolo vytvorené",
+       "botpasswords-created-body": "Heslo bota s názvom „$1“ patriaceho používateľovi „$2“ bolo vytvorené.",
+       "botpasswords-updated-title": "Heslo bota bolo aktualizované",
+       "botpasswords-updated-body": "Heslo bota s názvom „$1“ patriaceho používateľovi „$2“ bolo aktualizované.",
+       "botpasswords-deleted-title": "Heslo bota bolo odstránené",
+       "botpasswords-deleted-body": "Heslo bota s názvom „$1“ patriaceho používateľovi „$2“ bolo odstránené.",
+       "botpasswords-newpassword": "Nové prihlasovacie heslo pre <strong>$1</strong> je <strong>$2</strong>. <em>Prosím, zaznačte si ho na použitie v budúcnosti.</em> <br> (Pre staré boty, ktoré vyžadujú, aby prihlasovacie meno bolo rovnaké ako prípadné používateľské meno môžu tiež použiť <strong>$3</strong> ako používateľské meno a <strong>$4</strong> ako heslo.)",
+       "botpasswords-no-provider": "BotPasswordsSessionProvider nie je k dispozícii.",
+       "botpasswords-restriction-failed": "Obmedzenia hesla bota bránenia tomuto prihláseniu.",
+       "botpasswords-invalid-name": "Zadané používateľské meno neobsahuje oddeľovač hesla bota („$1“).",
+       "botpasswords-not-exist": "Používateľ „$1“ nemá heslo bota s názvom „$2“.",
        "resetpass_forbidden": "Heslá nie je možné zmeniť",
+       "resetpass_forbidden-reason": "Heslá nie je možné zmeniť: $1",
        "resetpass-no-info": "Aby ste mohli priamo pristupovať k tejto stránke, musíte sa prihlásiť.",
        "resetpass-submit-loggedin": "Zmeniť heslo",
        "resetpass-submit-cancel": "Zrušiť",
        "passwordreset-emailelement": "Používateľské meno: \n$1\n\nDočasné heslo:\n$2",
        "passwordreset-emailsentemail": "Pokiaľ je toto e-mailová adresa zaregistrovaná k vášmu účtu, bude na ňu zaslaný e-mail pre získanie nového hesla.",
        "passwordreset-emailsentusername": "Pokiaľ je príslušná mailová adresa zaregistrovaná, bude na ňu zaslaný e-mail s novým heslom.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Email|Emaily}} na obnovenie hesla {{PLURAL:$1|bol odoslaný|boli odoslané}}. {{PLURAL:$1|Používateľské meno a heslo|Zoznam používateľských mien a hesiel}} je uvedený nižšie.",
        "changeemail": "Zmeniť alebo odstrániť e-mailovú adresu",
-       "changeemail-header": "Zmena e-mailovej adresy pre účet",
+       "changeemail-header": "Vyplňte tento formulár, ak chcete zmeniť svoju emailovú adresu. Ak chcete odstrániť priradenie akejkoľvek emailovej adresy k vášmu účtu, nechajte pri odosielaní formulára emailovú adresu nevyplnenú",
        "changeemail-no-info": "Na prístup k tejto stránke musíte byť prihlásený.",
        "changeemail-oldemail": "Súčasná e-mailová adresa:",
        "changeemail-newemail": "Nová e-mailová adresa:",
        "missingsummary": "'''Pripomienka:''' Neposkytli ste zhrnutie úprav. Ak kliknete znova na Uložiť, vaše úpravy sa uložia bez zhrnutia úprav.",
        "selfredirect": "<strong>Upozornenie:</strong> Snažíte sa túto stránku presmerovať samú na seba.\nMožno ste zadali chybný cieľ presmerovania, alebo editujete nesprávnu stránku.\nAk znova kliknete na „{{int:savearticle}}“, bude presmerovanie aj napriek tomu vytvorené.",
        "missingcommenttext": "Prosím, dolu napíšte komentár.",
-       "missingcommentheader": "'''Pripomienka:''' Neposkytli ste predmet/hlavičku tohto komentára.\nAk znova kliknete na tlačidlo „{{int:savearticle}}“, vaša úprava sa uloží bez nej.",
+       "missingcommentheader": "<strong>Pripomienka:</strong> Neposkytli ste predmet/hlavičku tohto komentára.\nAk znova kliknete na tlačidlo „{{int:savearticle}}“, vaša úprava sa uloží bez nej.",
        "summary-preview": "Náhľad zhrnutia:",
-       "subject-preview": "Náhľad predmetu/hlavičky:",
+       "subject-preview": "Náhľad predmetu:",
        "previewerrortext": "Pri pokuse o zobrazenie náhľadu došlo k chybe.",
        "blockedtitle": "Používateľ je zablokovaný",
        "blockedtext": "'''Vaše používateľské meno alebo IP adresa bola zablokovaná.'''\n\nZablokoval vás správca $1. Udáva tento dôvod:<br />''$2''\n\n* Blokovanie začalo: $8\n* Blokovanie vyprší: $6\n* Kto mal byť zablokovaný: $7\n\nMôžete kontaktovať $1 alebo s jedného z ďalších [[{{MediaWiki:Grouppage-sysop}}|správcov]] a prediskutovať blokovanie.\nUvedomte si, že nemôžete použiť funkciu „{{int:Emailuser}}“, pokiaľ nemáte registrovanú platnú e-mailovú adresu vo svojich [[Special:Preferences|nastaveniach]].\nVaša IP adresa je $3 a ID blokovania je #$5.\nProsím, uveďte oba tieto údaje do každej správy, ktorú posielate.",
        "accmailtext": "Náhodne vytvorené heslo pre používateľa [[User talk:$1|$1]] bolo poslané na $2. Je možné ho zmeniť na stránke ''[[Special:ChangePassword|zmena hesla]]'' po prihlásení.",
        "newarticle": "(Nový)",
        "newarticletext": "Sledovali ste odkaz na stránku, ktorá zatiaľ neexistuje.\nStránku vytvoríte tak, že začnete písať do poľa nižšie (viac informácií nájdete na stránkach [$1 nápovedy]).\nAk ste sa sem dostali nechtiac, kliknite na tlačidlo <strong>späť</strong> vo svojom prehliadači.",
-       "anontalkpagetext": "----''Toto je diskusná stránka anonymného používateľa, ktorý nemá vytvorené svoje konto alebo ho nepoužíva.\nPreto musíme na jeho identifikáciu použiť numerickú IP adresu. Je možné, že takúto IP adresu používajú viacerí používatelia.\nAk ste anonymný používateľ a máte pocit, že vám boli adresované irelevantné diskusné príspevky, [[Special:CreateAccount|vytvorte si konto]] alebo sa [[Special:UserLogin|prihláste]], aby sa zamedzilo budúcim zámenám s inými anonymnými používateľmi.''",
+       "anontalkpagetext": "----\n<em>Toto je diskusná stránka anonymného používateľa, ktorý nemá vytvorené svoje konto alebo ho nepoužíva.</em>\nPreto musíme na jeho identifikáciu použiť numerickú IP adresu. Je možné, že takúto IP adresu používajú viacerí používatelia.\nAk ste anonymný používateľ a máte pocit, že vám boli adresované irelevantné diskusné príspevky, [[Special:CreateAccount|vytvorte si konto]] alebo sa [[Special:UserLogin|prihláste]], aby sa zamedzilo budúcim zámenám s inými anonymnými používateľmi.",
        "noarticletext": "Na tejto stránke sa momentálne nenachádza žiadny text.\nMôžete [[Special:Search/{{PAGENAME}}|vyhľadávať názov tejto stránky]] v obsahu iných stránok,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} vyhľadávať v súvisiacich záznamoch] alebo [{{fullurl:{{FULLPAGENAME}}|action=edit}} vytvoriť túto stránku]</span>.",
        "noarticletext-nopermission": "Táto stránka momentálne neobsahuje žiadny text.\nMôžete [[Special:Search/{{PAGENAME}}|hľadať názov tejto stránky]] v texte iných stránok\nalebo <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} hľadať v súvisiacich záznamoch]</span>, ale nemáte oprávnenie túto stránku vytvoriť.",
        "missing-revision": "Revízia #$1 stránky s názvom „{{FULLPAGENAME}}“ neexistuje.\n\nPravdepodobne ste nasledovali zastaraný odkaz na historickú verziu stránky, ktorá bola medzičasom odstránená.\nPodrobnosti nájdete v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname zmazaní].",
        "userpage-userdoesnotexist": "Používateľský účet „<nowiki>$1</nowiki>“ nie je registrovaný. Prosím, skontrolujte, či naozaj chcete vytvoriť/upravovať túto stránku.",
        "userpage-userdoesnotexist-view": "Používateľský účet „$1“ nie je registrovaný.",
        "blocked-notice-logextract": "Tento používateľ je momentálne zablokovaný.\nDolu je pre informáciu posledná položka zo záznamu blokovaní:",
-       "clearyourcache": "'''Poznámka:''' Aby sa zmeny prejavili, po uložení musíte vymazať vyrovnávaciu pamäť vášho prehliadača.\n* '''Mozilla Firefox / Safari:''' Držte stlačený ''Shift'' a kliknite na ''Reload'' alebo stlačte buď ''Ctrl-F5'' alebo ''Ctrl-R'' (''⌘-R'' na Mac)\n* '''Google Chrome:''' Stlačte ''Ctrl-Shift-R'' (''⌘-Shift-R'' na Mac)\n* '''Internet Explorer:''' Držte ''Ctrl'' a kliknite na ''Refresh'' alebo stlačte ''Ctrl-F5''\n* '''Opera:''' Vymazať vyrovnávaciu pamäť prehliadača v ponuke ''Tools→Preferences''",
+       "clearyourcache": "<strong>Poznámka:</strong> Aby sa zmeny prejavili, po uložení musíte vymazať vyrovnávaciu pamäť vášho prehliadača.\n* <strong>Mozilla Firefox / Safari:</strong> Držte stlačený <em>Shift</em> a kliknite na ''Reload'' alebo stlačte buď <em>Ctrl-F5</em> alebo <em>Ctrl-R</em> (<em>⌘-R</em> na Mac)\n* <strong>Google Chrome:</strong> Stlačte <em>Ctrl-Shift-R</em> (<em>⌘-Shift-R</em> na Mac)\n* <strong>Internet Explorer:</strong> Držte <em>Ctrl</em> a kliknite na <em>Refresh</em> alebo stlačte <em>Ctrl-F5</em>\n* <strong>Opera:</strong> Prejdite do <em>Menu → Settings</em> (<em>Opera → Preferences</em> on a Mac) a potom do <em>Privacy & security → Clear browsing data → Cached images and files</em>.",
        "usercssyoucanpreview": "'''Tip:''' Váš nový CSS pred uložením otestujete stlačením tlačidla „{{int:showpreview}}“.",
        "userjsyoucanpreview": "'''Tip:''' Váš nový JS pred uložením otestujete stlačením tlačidla „{{int:showpreview}}“.",
        "usercsspreview": "'''Nezabudnite, že toto je iba náhľad vášho používateľského CSS, ešte nebolo uložené!'''",
        "previewnote": "'''Nezabudnite, toto je iba náhľad stránky, ktorú upravujete.\nZmeny ešte nie sú uložené!'''",
        "continue-editing": "Pokračovať v úpravách",
        "previewconflict": "Tento náhľad upravenej stránky zobrazuje text z horného poľa s textom tak, ako sa zobrazí potom, keď ju uložíte.",
-       "session_fail_preview": "'''Prepáčte, nemohli sme spracovať váš príspevok kvôli strate údajov relácie.\nSkúste to prosím ešte raz.\nAk to nebude fungovať, skúste sa [[Special:UserLogout|odhlásiť]] a znovu prihlásiť.'''",
-       "session_fail_preview_html": "'''Prepáčte! Nemohli sme spracovať vašu úpravu kvôli strate údajov relácie.'''\n\n''Pretože {{SITENAME}} má použitie HTML umožnené, náhľad sa nezobrazí (prevencia pred JavaScript útokmi).''\n\n'''Ak je toto legitímny pokus o úpravu, skúste to prosím znova. Ak to stále nefunguje, skúste sa [[Special:UserLogout|odhlásiť]] a znovu prihlásiť.'''",
+       "session_fail_preview": "Prepáčte, nemohli sme spracovať váš príspevok kvôli strate údajov relácie.\n\n<strong>Prosím, uistite sa, že ste prihlásený a skúste to prosím znova.</strong>.\nAk to nebude fungovať, skúste sa [[Special:UserLogout|odhlásiť]] a znovu prihlásiť. Skontrolujte, či váš prehliadač prijíma cookies z tejto webstránky.",
+       "session_fail_preview_html": "Prepáčte! Nemohli sme spracovať vašu úpravu kvôli strate údajov relácie.\n\n<em>Pretože {{SITENAME}} má použitie HTML umožnené, náhľad sa nezobrazí (prevencia pred JavaScript útokmi).</em>\n\n<strong>Ak je toto legitímny pokus o úpravu, skúste to prosím znova.</strong>.\nAk to nebude fungovať, skúste sa [[Special:UserLogout|odhlásiť]] a znovu prihlásiť. Skontrolujte, či váš prehliadač prijíma cookies z tejto webstránky.",
        "token_suffix_mismatch": "'''Vaša úprava bola zamietnutá, pretože váš klient pokazil znaky s diakritikou v editačnom symbole (token). Úprava bola zamietnutá, aby sa zabránilo poškodeniu textu stránky. Toto sa občas stáva, keď používate chybnú anonymnú proxy službu cez webové rozhranie.'''",
        "edit_form_incomplete": "'''Niektoré časti editačného formulára nedosiahli server. Prosím, znova skontrolujte, že vaše úpravy sú nepoškodené a skúste to znova.'''",
        "editing": "Úprava stránky $1",
        "explainconflict": "Niekto iný zmenil túto stránku, zatiaľ čo ste ju upravovali vy.\nHorné okno na úpravy obsahuje text stránky tak, ako je momentálne platný.\nVaše úpravy sú uvedené v dolnom okne na úpravy.\nBudete musieť zlúčiť vaše zmeny s existujúcim textom.\n'''Iba''' obsah horného okna sa uloží, keď stlačíte „{{int:savearticle}}“.",
        "yourtext": "Váš text",
        "storedversion": "Uložená verzia",
-       "nonunicodebrowser": "'''UPOZORNENIE: Váš prehliadač nepodporuje unicode. Dočasným riešením ako bezpečne upravovať stránky je, že ne-ASCII znaky sa v upravovacom textovom poli zobrazia ako zodpovedajúce hexadecimálne hodnoty.'''",
-       "editingold": "'''UPOZORNENIE: Upravujete starú\nverziu tejto stránky. Ak vašu úpravu uložíte, prepíšete tým všetky úpravy, ktoré nasledovali po tejto starej verzii.'''",
+       "nonunicodebrowser": "<strong>UPOZORNENIE: Váš prehliadač nepodporuje Unicode.</strong>\nDočasným riešením ako bezpečne upravovať stránky je, že ne-ASCII znaky sa v upravovacom textovom poli zobrazia ako zodpovedajúce hexadecimálne hodnoty.",
+       "editingold": "<strong>UPOZORNENIE: Upravujete starú verziu tejto stránky.</strong>\nAk vašu úpravu uložíte, prepíšete tým všetky úpravy, ktoré nasledovali po tejto starej verzii.",
        "yourdiff": "Rozdiely",
-       "copyrightwarning": "Nezabudnite, že všetky príspevky do {{GRAMMAR:genitív|{{SITENAME}}}} sa považujú za príspevky pod licenciou $2 (podrobnosti pozri pod $1). Ak nechcete, aby bolo to, čo ste napísali, neúprosne upravované a ďalej ľubovoľne rozširované, tak sem váš text neumiestňujte.<br />\n\nTýmto sa právne zaväzujete, že ste tento text buď napísali sám, alebo že je skopírovaný\nz voľného diela (public domain) alebo podobného zdroja neobmedzeného autorskými právami.\n'''NEUMIESTŇUJTE TU BEZ POVOLENIA DIELA CHRÁNENÉ AUTORSKÝM PRÁVOM!'''",
-       "copyrightwarning2": "Prosím uvedomte si, že všetky príspevky do {{GRAMMAR:genitív|{{SITENAME}}}} môžu byť upravované, skracované alebo odstránené inými prispievateľmi. Ak nechcete, aby Vaše texty boli menené, tak ich tu neuverejňujte.<br />\n\nTýmto sa právne zaväzujete, že ste tento text buď napísali sám, alebo že je skopírovaný\nz voľného diela (public domain) alebo podobného zdroja neobmedzeného autorskými právami (podrobnosti: $1).\n'''NEUMIESTŇUJTE SEM BEZ POVOLENIA DIELA CHRÁNENÉ AUTORSKÝM PRÁVOM!'''",
+       "copyrightwarning": "Nezabudnite, že všetky príspevky do {{GRAMMAR:genitív|{{SITENAME}}}} sa považujú za príspevky pod licenciou $2 (podrobnosti pozri pod $1). Ak nechcete, aby bolo to, čo ste napísali, neúprosne upravované a ďalej ľubovoľne rozširované, tak sem váš text neumiestňujte.<br />\n\nTýmto sa právne zaväzujete, že ste tento text buď napísali sám, alebo že je skopírovaný\nz voľného diela (public domain) alebo podobného zdroja neobmedzeného autorskými právami.\n<strong>NEUMIESTŇUJTE SEM BEZ POVOLENIA DIELA CHRÁNENÉ AUTORSKÝM PRÁVOM!</strong>",
+       "copyrightwarning2": "Prosím uvedomte si, že všetky príspevky do {{GRAMMAR:genitív|{{SITENAME}}}} môžu byť upravované, skracované alebo odstránené inými prispievateľmi. Ak nechcete, aby Vaše texty boli menené, tak ich tu neuverejňujte.<br />\n\nTýmto sa právne zaväzujete, že ste tento text buď napísali sám, alebo že je skopírovaný\nz voľného diela (public domain) alebo podobného zdroja neobmedzeného autorskými právami (podrobnosti: $1).\n<strong>NEUMIESTŇUJTE SEM BEZ POVOLENIA DIELA CHRÁNENÉ AUTORSKÝM PRÁVOM!</strong>",
        "longpageerror": "'''Chyba: Text, ktorý ste poslali má {{PLURAL:$1|jeden kilobajt|$1 kilobajty|$1 kilobajtov}}, čo je viac ako maximum {{PLURAL:$2|jeden kilobajt|$2 kilobajty|$2 kilobajtov}}.'''",
-       "readonlywarning": "'''UPOZORNENIE: Databáza bola počas upravovania stránky zamknutá z dôvodu údržby,\ntakže svoje úpravy momentálne nemôžete uložiť.'''\nMôžete skopírovať a vložiť text do textového súboru a uložiť si ho na neskôr.\n\nSprávca, ktorý ju zamkol, uviedol nasledovné vysvetlenie: $1",
+       "readonlywarning": "<strong>UPOZORNENIE: Databáza bola počas upravovania stránky zamknutá z dôvodu údržby,\ntakže svoje úpravy momentálne nemôžete uložiť.</strong>\nMôžete skopírovať a vložiť text do textového súboru a uložiť si ho na neskôr.\n\nSprávca systému, ktorý ju zamkol, uviedol nasledovné vysvetlenie: $1",
        "protectedpagewarning": "'''Upozornenie: Táto stránka bola zamknutá, takže ju môžu upravovať iba používatelia s oprávnením správcu.''' Dolu je pre informáciu posledná položka zo záznamu:",
        "semiprotectedpagewarning": "'''Poznámka:''' Táto stránka bola zamknutá tak, aby ju mohli upravovať iba registrovaní používatelia. Dolu je pre informáciu posledná položka zo záznamu:",
        "cascadeprotectedwarning": "'''Upozornenie:''' Táto stránka bola zamknutá (takže ju môžu upravovať iba používatelia s privilégiami správcu), pretože je použitá na {{PLURAL:$1|nasledovnej stránke|nasledovných stránkach}} s kaskádovým zamknutím:",
        "invalid-content-data": "Neplatné dáta obsahu",
        "content-not-allowed-here": "Obsah „$1“ nie je povolený na stránke [[$2]]",
        "editwarning-warning": "Ak opustíte túto stránku, môžete tým stratiť všetky vykonané zmeny.\nAk ste prihlásený, toto upozornenie môžete vypnúť v sekcii „{{int:prefs-editing}}“ svojich nastavení.",
-       "editpage-notsupportedcontentformat-title": "Obsahový formát nieje podporovaný",
+       "editpage-notsupportedcontentformat-title": "Formát obsahu nie je podporovaný",
        "content-model-wikitext": "wikitext",
        "content-model-text": "čistý text",
        "content-model-javascript": "JavaScript",
        "content-model-css": "CSS",
        "content-json-empty-object": "Prázdny objekt",
        "content-json-empty-array": "Prázdne pole",
+       "deprecated-self-close-category": "Stránky s neplatnými samouzavrenými HTML značkami",
+       "deprecated-self-close-category-desc": "Stránka obsahuje neplatné samouzatvárajúce HTML značky, napr. <code>&lt;b/></code> alebo <code>&lt;span/></code>. Ich správanie sa v záujme konzistencie so špecifikáciou HTML5 čoskoro zmení a použitie je preto vo wikitexte zastarané.",
        "duplicate-args-warning": "<strong>Upozornenie:</strong> Stránka [[:$1]] volá [[:$2]] s viacerými hodnotami parametra „$3“. Použitá bude len posledná odovzdaná hodnota.",
        "duplicate-args-category": "Stránky s duplicitnými parametrami pri volaniach šablón",
        "duplicate-args-category-desc": "Stránka obsahuje volania šablóny používajúce duplicitné parametere, ako napríklad <code><nowiki>{{foo|bar=1|bar=2}}</nowiki></code> alebo <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>.",
        "parser-unstrip-loop-warning": "Zistené zacyklenie volania rozširovacej značky",
        "parser-unstrip-recursion-limit": "Prektočený limit rekurzie volania rozširovacej značky ($1)",
        "converter-manual-rule-error": "Bola zistená chyba v pravidle manuálnej konverzie jazyka",
-       "undo-success": "Úpravu je možné vrátiť. Prosím skontrolujte tento rozdiel, čím overíte, že táto úprava je tá, ktorú chcete, a následne uložte zmeny, čím ukončíte vrátenie.",
+       "undo-success": "Úpravu je možné vrátiť.\nProsím, skontrolujte tento rozdiel, čím overíte, že táto úprava je tá, ktorú chcete. Následne uložte zmeny, čím ukončíte vrátenie.",
        "undo-failure": "Úpravu nie je možné vrátiť kvôli konfliktným medziľahlým úpravám.",
        "undo-norev": "Túto úpravu nie je možné vrátiť, pretože neexistuje alebo bola zmazaná.",
        "undo-nochange": "Zdá sa, že úprava už bola zrušená.",
        "undo-summary": "Revízia $1 používateľa [[Special:Contributions/$2|$2]] ([[User talk:$2|diskusia]]) bola vrátená",
        "undo-summary-username-hidden": "Vrátiť revíziu $1, ktorú vykonal skrytý používateľ",
-       "cantcreateaccount-text": "Zakladanie nových účtov z tejto IP adresy ('''$1''') bolo zablokované {{GENDER:$3|používateľom|používateľkou}} [[User:$3|$3]].\n\nDôvod, ktorý $3 {{GENDER:$3|uviedol|uviedla}}, je: ''$2''",
-       "cantcreateaccount-range-text": "Zakladanie nových účtov z IP adries v rozsahu <strong>$1</strong>, ktorý zahŕňa aj vašu IP adresu (<strong>$4</strong>), bolo zablokované {{GENDER:$3|používateľom|používateľkou}} [[User:$3|$3]].\n\nDôvod, ktorý $3 {{GENDER:$3|uviedol|uviedla}}, je: <em>$2</em>",
+       "cantcreateaccount-text": "Zakladanie nových účtov z tejto IP adresy (<strong>$1</strong>) bolo zablokované {{GENDER:$3|používateľom|používateľkou}} [[User:$3|$3]].\n\nDôvod, ktorý $3 {{GENDER:$3|uviedol|uviedla}}, je: <em>$2</em>",
+       "cantcreateaccount-range-text": "Zakladanie nových účtov z IP adries v rozsahu <strong>$1</strong>, do ktorého spadá aj vaša IP adresu (<strong>$4</strong>), bolo zablokované {{GENDER:$3|používateľom|používateľkou}} [[User:$3|$3]].\n\nDôvod, ktorý $3 {{GENDER:$3|uviedol|uviedla}}, je: <em>$2</em>",
        "viewpagelogs": "Zobraziť záznamy pre túto stránku",
        "nohistory": "Pre túto stránku neexistuje história.",
        "currentrev": "Aktuálna verzia",
        "rev-deleted-user-contribs": "[používateľské meno alebo IP adresa odstránená - úprava skrytá pred prispievateľmi]",
        "rev-deleted-text-permission": "Táto revízia stránky bola '''zmazaná'''.\nPodrobnosti nájdete v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname mazaní].",
        "rev-suppressed-text-permission": "Táto revízia stránky bola <strong>potlačená</strong>. Podrobnosti nájdete v [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zázname potlačení].",
-       "rev-deleted-text-unhide": "Táto revízia stránky bola '''zmazaná'''.\nPodrobnosti nájdete v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname mazaní].\nAko správca máte stále možnosť [$1 zobraziť túto revíziu] ak chcete.",
-       "rev-suppressed-text-unhide": "Táto revízia stránky bola '''potlačená'''.\nPodrobnosti nájdete v [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zázname potlačení].\nAko správca máte stále možnosť [$1 zobraziť túto revíziu] ak chcete.",
+       "rev-deleted-text-unhide": "Táto revízia stránky bola <strong>zmazaná</strong>.\nPodrobnosti nájdete v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname mazaní].\nAko správca máte stále možnosť [$1 zobraziť túto revíziu] ak chcete.",
+       "rev-suppressed-text-unhide": "Táto revízia stránky bola <strong>potlačená</strong>.\nPodrobnosti nájdete v [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zázname potlačení].\nAko správca máte stále možnosť [$1 zobraziť túto revíziu] ak chcete.",
        "rev-deleted-text-view": "Táto revízia stránky bola '''zmazaná'''.\nAko správca {{GRAMMAR:genitív|{{SITENAME}}}} si ju môžete prezrieť;\npodrobnosti nájdete v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname mazaní].",
-       "rev-suppressed-text-view": "Táto revízia stránky bola '''potlačená'''.\nPodrobnosti nájdete v [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zázname potlačení].",
+       "rev-suppressed-text-view": "Táto revízia stránky bola <strong>potlačená</strong>.\nPodrobnosti nájdete v [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zázname potlačení].",
        "rev-deleted-no-diff": "Tento rozdiel nemôžete zobraziť, pretože bol '''zmazaný'''.\nPodrobnosti môžete nájsť v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname mazaní].",
        "rev-suppressed-no-diff": "Nemôžete zobraziť tento rozdiel, pretože jedna z revízií bola '''zmazaná'''.",
-       "rev-deleted-unhide-diff": "Jedna z revízií tohto rozdielu bola '''zmazaná'''.\nPodrobnosti môžete nájsť v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname mazaní].\nAko správca {{GRAMMAR:genitív|{{SITENAME}}}} si [$1 tento rozdiel môžete prezrieť].",
-       "rev-suppressed-unhide-diff": "Jedna z revízií tohto rozdielu bola '''potlačená'''.\nPodrobnosti môžete nájsť v [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zázname potlačení].\nAko správca {{GRAMMAR:genitív|{{SITENAME}}}} si [$1 tento rozdiel môžete prezrieť].",
-       "rev-deleted-diff-view": "Jedna z revízií tohto rozdielu bola '''zmazaná'''.\nAko správca si môžete tento rozdiel zobraziť; podrobnosti môžete nájsť v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname mazaní].",
-       "rev-suppressed-diff-view": "Jedna z revízií tohto rozdielu bola '''potlačená'''.\nAko správca si môžete tento rozdiel zobraziť; podrobnosti môžete nájsť v [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zázname potlačení].",
+       "rev-deleted-unhide-diff": "Jedna z revízií tohto rozdielu bola <strong>zmazaná</strong>.\nPodrobnosti môžete nájsť v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname mazaní].\nAko správca {{GRAMMAR:genitív|{{SITENAME}}}} si [$1 tento rozdiel môžete prezrieť].",
+       "rev-suppressed-unhide-diff": "Jedna z revízií tohto rozdielu bola <strong>potlačená</strong>.\nPodrobnosti môžete nájsť v [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zázname potlačení].\nAko správca {{GRAMMAR:genitív|{{SITENAME}}}} si [$1 tento rozdiel môžete prezrieť].",
+       "rev-deleted-diff-view": "Jedna z revízií tohto rozdielu bola <strong>zmazaná</strong>.\nAko správca si môžete tento rozdiel zobraziť; podrobnosti môžete nájsť v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname mazaní].",
+       "rev-suppressed-diff-view": "Jedna z revízií tohto rozdielu bola <strong>potlačená</strong>.\nAko správca si môžete tento rozdiel zobraziť; podrobnosti môžete nájsť v [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zázname potlačení].",
        "rev-delundel": "zobraziť/skryť",
        "rev-showdeleted": "zobraziť",
        "revisiondelete": "Zmazať/obnoviť revízie",
        "revdelete-legend": "Nastaviť obmedzenia viditeľnosti",
        "revdelete-hide-text": "Text revízie",
        "revdelete-hide-image": "Skryť obsah súboru",
-       "revdelete-hide-name": "Skryť činnosť a cieľ",
+       "revdelete-hide-name": "Skryť cieľ a parametre",
        "revdelete-hide-comment": "Zhrnutie úprav",
        "revdelete-hide-user": "Používateľské meno/IP redaktora",
        "revdelete-hide-restricted": "Zatajiť údaje pred všetkými, aj pred správcami",
        "revdelete-submit": "Použiť na {{PLURAL:$1|zvolenú revíziu|zvolené revízie}}",
        "revdelete-success": "'''Viditeľnosť revízie bola úspešne aktualizovaná.'''",
        "revdelete-failure": "'''Viditeľnosť revízie nebolo možné aktualizovať:'''\n$1",
-       "logdelete-success": "'''Viditeľnosť záznamu bola úspešne nastavená.'''",
+       "logdelete-success": "Viditeľnosť záznamu bola úspešne nastavená.",
        "logdelete-failure": "'''Viditeľnosť záznamu nebolo možné nastaviť:'''\n$1",
        "revdel-restore": "Zmeniť viditeľnosť",
        "pagehist": "História stránky",
        "showhideselectedversions": "Zobraziť/skryť vybrané revízie",
        "editundo": "vrátiť",
        "diff-empty": "(Žiaden rozdiel)",
-       "diff-multi-sameuser": "({{PLURAL:$1|Jedna medziľahlá úprava|$1 medziľahlé úpravy|$1 medziľahlých úprav}} od rovnakého používateľa.)",
+       "diff-multi-sameuser": "({{PLURAL:$1|Jedna medziľahlá úprava|$1 medziľahlé úpravy|$1 medziľahlých úprav}} od rovnakého používateľa nie {{PLURAL:$1|je zobrazená|sú zobrazené|je zobrazených}}.)",
        "diff-multi-otherusers": "({{PLURAL:$1|Jedna medziľahlá úprava|$1 medziľahlé úpravy|$1 medziľahlých úprav}} od {{PLURAL:$2|jedného ďalšieho používateľa|$2 ďalších používateľov}} {{PLURAL:$1|nie je zobrazená|nie sú zobrazené|nie je zobrazených}})",
        "diff-multi-manyusers": "({{PLURAL:$1|$1 medziľahlá revízia|$1 medziľahlé revízie|$1 medziľahlých revízií}} od viac ako {{PLURAL:$2|$2 používateľa|$2 používateľov}} {{PLURAL:$1|nie je zobrazená|nie sú zobrazené|nie je zobrazených}})",
        "difference-missing-revision": "{{PLURAL:$2|$2 revízia|$2 revízie|$2 revízií}} pre požadovaný rozdiel ($1) {{PLURAL:$2|neexistuje|neexistujú|neexistuje}}.\n\nPravdepodobne ste nasledovali zastaraný odkaz na rozdiel revízií, z ktorých niektorá bola medzičasom odstránená.\nPodrobnosti nájdete v [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} zázname zmazaní].",
        "searchprofile-advanced-tooltip": "Hľadať vo vymenovaných menných priestoroch",
        "search-result-size": "$1 ({{PLURAL:$2|1 slovo|$2 slová|$2 slov}})",
        "search-result-category-size": "{{PLURAL:$1|1 člen|$1 členovia|$1 členov}} ({{PLURAL:$2|1 podkategória|$2 podkategórie|$2 podkategórií}}, {{PLURAL:$3|1 súbor|$3 súbory|$3 súborov}})",
-       "search-redirect": "(presmerovanie $1)",
+       "search-redirect": "(presmerovanie $1)",
        "search-section": "(sekcia $1)",
        "search-category": "($1 kategória)",
+       "search-file-match": "(výskyt v obsahu súboru)",
        "search-suggest": "Mali ste na mysli „$1“?",
        "search-rewritten": "Zobrazujú sa výsledky pre $1. Vyhľadať namiesto toho $2.",
        "search-interwiki-caption": "Sesterské projekty",
-       "search-interwiki-default": "$1 výsledkov:",
+       "search-interwiki-default": "Výsledky z $1:",
        "search-interwiki-more": "(viac)",
        "search-relatedarticle": "Súvisiace",
        "searchrelated": "súvisiace",
        "prefs-watchlist-token": "Token zoznamu sledovaných?",
        "prefs-misc": "Rôzne",
        "prefs-resetpass": "Zmeniť heslo",
-       "prefs-changeemail": "Zmeniť email",
+       "prefs-changeemail": "Zmeniť alebo odstrániť e-mailovú adresu",
        "prefs-setemail": "Nastaviť emailovú adresu",
        "prefs-email": "Možnosti e-mailu",
        "prefs-rendering": "Vzhľad",
        "rows": "Riadky:",
        "columns": "Stĺpce:",
        "searchresultshead": "Vyhľadávanie",
-       "stub-threshold": "Prah formátovania odkazu ako výhonok:",
+       "stub-threshold": "Prah formátovania odkazu ako výhonok ($1):",
        "stub-threshold-sample-link": "príklad",
        "stub-threshold-disabled": "Vypnuté",
        "recentchangesdays": "Koľko dní zobrazovať v posledných úpravách:",
        "prefs-files": "Súbory",
        "prefs-custom-css": "Vlastný CSS",
        "prefs-custom-js": "Vlastný JS",
-       "prefs-common-css-js": "Spoločné CSS/JS pre všetky témy vzhľadu:",
+       "prefs-common-css-js": "Spoločné CSS/JS pre všetky témy:",
        "prefs-reset-intro": "Túto stránku môžete použiť na vrátenie predvolených hodnôt vašich nastavení.\nTúto operáciu nemožno vrátiť.",
        "prefs-emailconfirm-label": "Overenie e-emailu:",
        "youremail": "Váš e-mail²",
        "badsig": "Neplatný podpis v pôvodnom tvare; skontrolujte HTML značky.",
        "badsiglength": "Váš podpis je príliš dlhý.\nMusí obsahovať menej ako $1 {{PLURAL:$1|znak|znaky|znakov}}.",
        "yourgender": "Ako si želáte byť označovaný?",
-       "gender-unknown": "Radšej nechcem uviesť",
+       "gender-unknown": "Softvér bude používať rodovo neutrálne slová, vždy keď je to možné, keď vás spomína",
        "gender-male": "On upravuje wiki stránky",
        "gender-female": "Ona upravuje wiki stránky",
        "prefs-help-gender": "Nastavenie tejto voľby nie je povinné.\nSoftvér používa toto nastavenie na správne oslovenie a označenie vás ostatným v závislosti od gramatického rodu. Táto informácia bude verejná.",
        "prefs-dateformat": "Formát dátumu",
        "prefs-timeoffset": "Časový posun",
        "prefs-advancedediting": "Všeobecné možnosti",
-       "prefs-editor": "Redaktor",
+       "prefs-editor": "Používateľ",
        "prefs-preview": "Náhľad",
        "prefs-advancedrc": "Rozšírené možnosti",
        "prefs-advancedrendering": "Rozšírené možnosti",
        "editusergroup": "Upraviť skupiny {{GENDER:$1|používateľa|používateľky}}",
        "editinguser": "Zmena práv používateľa '''[[User:$1|$1]]''' $2",
        "userrights-editusergroup": "Upraviť skupiny používateľa",
-       "saveusergroups": "Uložiť skupiny používateľa",
+       "saveusergroups": "Uložiť skupiny {{GENDER:$1|používateľa|používateľky}}",
        "userrights-groupsmember": "{{GENDER:$2|Člen|Členka}} {{PLURAL:$1|skupiny|skupín}}:",
        "userrights-groupsmember-auto": "Implicitne {{GENDER:$2|člen|členka}} {{PLURAL:$1|skupiny|skupín}}:",
        "userrights-groups-help": "Môžete zmeniť skupiny, do ktorých je {{GENDER:$1|používateľ zaradený|používateľka zaradená}}.\n* Zaškrtnuté pole znamená, že {{GENDER:$1|používateľ|používateľka}} je v skupine.\n* Nezaškrtnuté pole znamená, že {{GENDER:$1|používateľ|používateľka}} nie je v skupine.\n* Hviezdička (*) znamená, že nemôžete odstrániť skupinu, keď ste ju už pridali resp. naopak.",
        "right-edit": "Upravovať stránky (ktoré nie sú diskusné stránky)",
        "right-createpage": "Vytvárať stránky (ktoré nie sú diskusné stránky)",
        "right-createtalk": "Vytvárať diskusné stránky",
-       "right-createaccount": "Vytvárať nové používateľské účty",
+       "right-createaccount": "Vytvárať nové používateľské kontá",
+       "right-autocreateaccount": "Automatické prihlásenie s externým používateľským kontom",
        "right-minoredit": "Označovať úpravy ako drobné",
        "right-move": "Presúvať stránky",
        "right-move-subpages": "Presunúť stránky aj s podstránkami",
        "right-move-rootuserpages": "Presunúť koreňové stránky používateľa",
-       "right-move-categorypages": "Premiestňovanie stránok kategórií",
+       "right-move-categorypages": "Premiestňovať stránky kategórií",
        "right-movefile": "Presunúť súbory",
        "right-suppressredirect": "Nevytvoriť presmerovanie zo starého názvu pri presúvaní stránky",
        "right-upload": "Nahrávať súbory",
        "right-writeapi": "Použitie API na zápis",
        "right-delete": "Mazať stránky",
        "right-bigdelete": "Mazať stránky s veľkou históriou",
-       "right-deletelogentry": "Odstrániť a obnoviť špecifické položky",
+       "right-deletelogentry": "Odstrániť a obnoviť špecifické položky záznamu",
        "right-deleterevision": "Mazať a obnovovať konkrétne revízie stránok",
        "right-deletedhistory": "Zobrazovať zmazané položky histórie bez ich plného textu",
        "right-deletedtext": "Zobrazovať zmazané texty a zmeny medzi zmazanými verziami",
        "right-override-export-depth": "Exportovať stránky vrátane okdazovaných stránok do hĺbky 5 odkazov",
        "right-sendemail": "Posielať e-mail ostatným používateľom",
        "right-passwordreset": "Prezeranie e-mailov pre znovunastavovanie hesla",
+       "grant-generic": "balík práv „$1“",
+       "grant-group-page-interaction": "Interagovať so stránkami",
+       "grant-group-file-interaction": "Interagovať s multimédiami",
+       "grant-group-watchlist-interaction": "Interagovať s vašim zoznamom sledovaných stránok",
        "grant-group-email": "Poslať email",
+       "grant-group-high-volume": "Vykonávať činnosti vo veľkom objeme",
+       "grant-group-customization": "Nastavenie a prispôsobenie",
+       "grant-group-administration": "Vykonávať činnosti správcu",
+       "grant-group-private-information": "Pristupovať k osobným údajom o vás",
+       "grant-group-other": "Rozličné činnosti",
+       "grant-blockusers": "Blokovať a odblokovať používateľov",
+       "grant-createaccount": "Vytvárať účty",
+       "grant-createeditmovepage": "Vytvárať, upravovať a presúvať stránky",
+       "grant-delete": "Odstraňovať stránky, revízie a položky záznamu",
+       "grant-editinterface": "Upravovať menný priestor MediaWiki a používateľský CSS/JavaScript",
+       "grant-editmycssjs": "Upravovať váš používateľský CSS/JavaScript",
+       "grant-editmyoptions": "Upravovať nastavenia vášho používateľského účtu",
+       "grant-editmywatchlist": "Upravovať váš zoznam sledovaných stránok",
+       "grant-editpage": "Upravovať existujúce stránky",
+       "grant-editprotected": "Upravovať chránené stránky",
+       "grant-highvolume": "Úpravy vo veľkom objeme",
+       "grant-oversight": "Skrývať používateľov a potláčať revízie",
+       "grant-patrol": "Sledovať zmeny stránok",
+       "grant-privateinfo": "Pristupovať k súkromným informáciám",
+       "grant-protect": "Zapínať a vypínať ochranu stránok",
+       "grant-rollback": "Vracať zmeny stránok",
+       "grant-sendemail": "Posielať emaily ostatným používateľom",
+       "grant-uploadeditmovefile": "Nahrávať, nahradzovať a presúvať súbory",
+       "grant-uploadfile": "Nahrávať nové súbory",
+       "grant-basic": "Základné oprávnenia",
+       "grant-viewdeleted": "Zobrazovať vymazané súbory a stránky",
+       "grant-viewmywatchlist": "Zobrazovať váš zoznam sledovaných stránok",
        "newuserlogpage": "Záznam vytvorených používateľov",
        "newuserlogpagetext": "Toto je záznam naposledy vytvorených používateľských účtov.",
        "rightslog": "Záznam používateľských práv",
        "rightslogtext": "Toto je záznam zmien práv používateľa.",
        "action-read": "čítať túto stránku",
        "action-edit": "upravovať túto stránku",
-       "action-createpage": "vytvárať stránky",
-       "action-createtalk": "vytvárať diskusné stránky",
+       "action-createpage": "vytvoriť túto stránku",
+       "action-createtalk": "vytvoriť túto diskusnú stránku",
        "action-createaccount": "vytvoriť tento používateľský účet",
+       "action-autocreateaccount": "automaticky vytvoriť tento externý používateľský účet",
        "action-history": "zobraziť históriu tejto stránky",
        "action-minoredit": "označiť túto úpravu ako drobnú",
        "action-move": "presunúť túto stránku",
        "action-viewmyprivateinfo": "zobraziť vaše súkromné údaje",
        "action-editmyprivateinfo": "upraviť vaše súkromné údaje",
        "action-editcontentmodel": "upraviť model obsahu stránky",
-       "action-managechangetags": "vytvorte a odstráňte značky z databázy",
+       "action-managechangetags": "vytvoriť a (de)aktivovať značky",
+       "action-applychangetags": "použiť značky spolu s vašimi zmenami",
+       "action-changetags": "pridávať a odstraňovať ľubovoľné značky na jednotlivé revízie a položky záznamu",
+       "action-deletechangetags": "odstraňovať značky z databázy",
+       "action-purge": "vyčistiť vyrovnávacou pamäť tejto stránky",
        "nchanges": "$1 {{PLURAL:$1|úprava|úpravy|úprav}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|od poslednej návštevy}}",
        "enhancedrc-history": "história",
        "rcshowhidebots": "$1 botov",
        "rcshowhidebots-show": "Zobraziť",
        "rcshowhidebots-hide": "Skryť",
-       "rcshowhideliu": "$1 registrovaných používateľov",
+       "rcshowhideliu": "$1 registrovaných",
        "rcshowhideliu-show": "Zobraziť",
        "rcshowhideliu-hide": "Skryť",
-       "rcshowhideanons": "$1 anonymných používateľov",
+       "rcshowhideanons": "$1 anonymov",
        "rcshowhideanons-show": "Zobraziť",
        "rcshowhideanons-hide": "Skryť",
        "rcshowhidepatr": "$1 úpravy strážených stránok",
        "rcshowhidemine": "$1 moje úpravy",
        "rcshowhidemine-show": "Zobraziť",
        "rcshowhidemine-hide": "Skryť",
-       "rcshowhidecategorization": "$1 kategorizáciu stránok",
+       "rcshowhidecategorization": "$1 kategorizáciu",
        "rcshowhidecategorization-show": "Zobraziť",
        "rcshowhidecategorization-hide": "Skryť",
        "rclinks": "Zobraziť posledných $1 úprav za posledných $2 dní<br />$3",
        "boteditletter": "b",
        "number_of_watching_users_pageview": "[$1 {{PLURAL:$1|sledujúci používateľ|sledujúci používatelia|sledujúcich používateľov}}]",
        "rc_categories": "Obmedziť na kategórie (oddeľte znakom „|“)",
-       "rc_categories_any": "akékoľvek",
+       "rc_categories_any": "Akékoľvek z vybraných",
        "rc-change-size-new": "$1 {{PLURAL:$1|bajt|bajty|bajtov}} po zmene",
        "newsectionsummary": "/* $1 */ nová sekcia",
        "rc-enhanced-expand": "Zobraziť podrobnosti",
        "recentchangeslinked-page": "Názov stránky:",
        "recentchangeslinked-to": "Zobraziť zmeny na stránkach, ''ktoré odkazujú na'' zadanú stránku",
        "recentchanges-page-added-to-category": "[[:$1]] zaradená do kategórie",
-       "recentchanges-page-added-to-category-bundled": "[[:$1]] a [[Special:WhatLinksHere/$1|{{PLURAL:$2|jedna ďalšia zaradené|$2 ďalšie zaradené|$2 ďalších zaradených}}]] do kategórie",
+       "recentchanges-page-added-to-category-bundled": "[[:$1]] zaradená do kategórie. [[Special:WhatLinksHere/$1|Táto stránka je vložená do iných stránok.]",
        "recentchanges-page-removed-from-category": "[[:$1]] vyradená z kategórie",
-       "recentchanges-page-removed-from-category-bundled": "[[:$1]] a {{PLURAL:$2|jedna ďalšia vyradené|$2 ďalšie vyradené|$2 ďalších vyradených}} z kategórie",
+       "recentchanges-page-removed-from-category-bundled": "[[:$1]] odstránená z kategórie. [[Special:WhatLinksHere/$1|Táto stránka je vložená do iných stránok.]",
        "autochange-username": "Automatická úprava MediaWiki",
        "upload": "Nahrať súbor",
        "uploadbtn": "Nahrať súbor",
        "file-thumbnail-no": "Názov súboru začína <strong>$1</strong>.\nZdá sa, že je to obrázok redukovanej veľkosti ''(náhľad)''.\nAk máte tento obrázok v plnom rozlíšení, nahrajte ho, inak prosím zmeňte názov.",
        "fileexists-forbidden": "Súbor s týmto názvom už existuje a nie je možné ho prepísať.\nAk si aj tak želáte nahrať svoj súbor, choďte prosím späť a nahrajte tento súbor pod iným názvom. [[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Súbor s týmto názvom už existuje v zdieľanom úložisku súborov.\nAk ho chcete aj napriek tomu nahrať, choďte prosím späť a použite iný názov. [[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "Nahraný súbor je presný duplikát aktuálnej verzie súboru <strong>[[:$1]]</strong>.",
+       "fileexists-duplicate-version": "Nahraný súbor je presný duplikát {{PLURAL:$2|staršej verzie|starších verzií}} súboru <strong>[[:$1]]</strong>.",
        "file-exists-duplicate": "Tento súbor je duplikátom {{PLURAL:$1|nasledovného súboru|nasledovných súborov}}:",
        "file-deleted-duplicate": "Súbor zhodný s týmto súborom ([[:$1]]) už bol v minulosti zmazaný. Mali by ste skontrolovať históriu nahrávania tohto súboru predtým, než budete pokračovať v jeho nahrávaní.",
+       "file-deleted-duplicate-notitle": "Súbor rovnaký ako tento súbor už bol v minulosti odstránený a jeho názov bol potlačený.\nMali by ste sa spýtať niekoho s oprávnením prehliadať potlačené údaje súbor, aby preskúmal situáciu predtým, než ho nahráte.",
        "uploadwarning": "Varovanie pri nahrávaní",
        "uploadwarning-text": "Prosím, zmeňte popis súboru nižšie a skúste to znova.",
        "savefile": "Uložiť súbor",
        "uploaddisabledtext": "Nahrávanie súborov je vypnuté.",
        "php-uploaddisabledtext": "Nahrávanie PHP súborov je vypnuté. Prosím, skontrolujte nastavenie file_uploads.",
        "uploadscripted": "Tento súbor obsahuje kód HTML alebo skript, ktorý može byť chybne interpretovaný prehliadačom.",
+       "upload-scripted-pi-callback": "Nemožno nahrať súbor, ktorý obsahuje inštrukcie spracovania štýlu XML",
+       "uploaded-script-svg": "V nahranom súbore SVG bol nájdený skriptovateľný prvok „$1“.",
+       "uploaded-hostile-svg": "V elemente „style“ nahraného súboru SVG bolo nájdené nebezpečné CSS.",
+       "uploaded-event-handler-on-svg": "Nastavenie atribútov <code>$1=\"$2\"</code> na obsluhu udalostí v súboroch SVG nie je povolené.",
+       "uploaded-href-attribute-svg": "V súboroch SVG je pri atribútoch href povolené iba to, aby odkazovali na ciele http:// alebo https://, ale našiel sa odkaz <code>&lt;$1 $2=\"$3\"&gt;</code>.",
+       "uploaded-href-unsafe-target-svg": "Boli nájdené nebezpečné dáta: cieľ URI <code>&lt;$1 $2=\"$3\"&gt;</code> v nahranom súbore SVG",
        "uploadvirus": "Súbor obsahuje vírus! Podrobnosti: $1",
        "uploadjava": "Súbor je vo formáte ZIP, ktorý obsahuje Java súbor .class.\nNahrávanie súborov Java nie je povolené, pretože môžu spôsobiť obídenie bezpečnostných obmedzení.",
        "upload-source": "Zdrojový súbor",
        "upload-copy-upload-invalid-domain": "Kopírovanie nahraných súborov nie je dostupné z tejto domény.",
        "upload-dialog-title": "Nahrať súbor",
        "upload-dialog-button-cancel": "Zrušiť",
+       "upload-dialog-button-back": "Späť",
        "upload-dialog-button-done": "Hotovo",
        "upload-dialog-button-save": "Uložiť",
        "upload-dialog-button-upload": "Nahrať",
        "upload-form-label-infoform-title": "Podrobnosti",
        "upload-form-label-infoform-name": "Meno",
        "upload-form-label-infoform-name-tooltip": "Jedinečný popis súboru, ktorý bude slúžiť ako názov súboru. Môžete použiť bežný jazyk s medzerami, ako aj znaky s diakritikou. Nezadávajte príponu súboru.",
+       "upload-form-label-infoform-description": "Popis",
+       "upload-form-label-usage-title": "Použitie",
+       "upload-form-label-usage-filename": "Názov súboru",
+       "upload-form-label-own-work": "Toto je moje vlastné dielo",
+       "upload-form-label-infoform-categories": "Kategórie",
+       "upload-form-label-infoform-date": "Dátum",
+       "upload-form-label-own-work-message-generic-local": "Potvrdzujem, že som nahrávam tento súbor v súlade s podmienkami služby a licenčnou politikou {{GRAMMAR:genitív|{{SITENAME}}}}.",
+       "upload-form-label-not-own-work-message-generic-local": "Ak tento súbor nie ste schopní nahrať v súlade s politikou {{GRAMMAR:genitív|{{SITENAME}}}}, prosím zatvorte toto dialógové okno a skúste použiť iný spôsob.",
+       "upload-form-label-not-own-work-local-generic-local": "Môžete tiež skúsiť [[Special:Upload|predvolenú nahrávaciu stránku]].",
+       "upload-form-label-own-work-message-generic-foreign": "Rozumiem, že nahrávam tento súbor do zdieľaného úložiska. Potvrdzujem, že pritom dodržiavam tamojšie podmienky služby a licenčné politiky.",
+       "upload-form-label-not-own-work-message-generic-foreign": "Ak tento súbor nie ste schopní nahrať v súlade s politikou zdieľaného úložiska, prosím zatvorte toto dialógové okno a skúste použiť iný spôsob.",
+       "upload-form-label-not-own-work-local-generic-foreign": "Môžete tiež skúsiť použiť [[Special:Upload|nahrávaciu stránku na {{GRAMMAR:genitív|{{SITENAME}}}}]] ak je v súlade s ich politikou možné tento súbor nahrať.",
        "backend-fail-stream": "$1 je názov súboru.",
        "backend-fail-backup": "Nebolo možné zálohovať súbor $1.",
        "backend-fail-notexists": "Súbor $1 neexistuje.",
        "backend-fail-read": "Nebolo možné prečítať súbor „$1“.",
        "backend-fail-create": "Nebolo možné zapísať súbor $1.",
        "backend-fail-maxsize": "Nie je možné zapísať súbor  $1  pretože je väčší ako  {{PLURAL:$2| jeden byte| $2  bajtov}}.",
-       "backend-fail-readonly": "Úložisko „$1“ je momentálne v režime len na čítanie. Udaný dôvod: „$2“",
+       "backend-fail-readonly": "Úložisko „$1“ je momentálne v režime len na čítanie. Udaný dôvod: „<em>$2</em>“",
        "backend-fail-synced": "Súbor „$1“ je v nekonzistentnom stave v rámci vnútorného úložiska",
        "backend-fail-connect": "Nepodarilo sa pripojiť k úložisku „$1“.",
        "backend-fail-internal": "Vyskytla sa neznáma chyba v úložisku „$1“.",
        "uploadstash-summary": "Táto stránka poskytuje prístup k súborom nahraným (alebo práve nahrávaným), ktoré zatiaľ nie sú zverejnené na wiki. Tieto súbory nevidí nikto iný okrem používateľa, ktorý ich nahral.",
        "uploadstash-clear": "Vymazať skrýšu nahraných súborov",
        "uploadstash-nofiles": "Nemáte žiadne súbory v skrýši nahraných súborov.",
-       "uploadstash-badtoken": "Vykonanie operácie sa nepodarilo, možno preto, že platnosť vašich prihlasovacích údajov vypršala. Skúste to znova.",
+       "uploadstash-badtoken": "Vykonanie operácie sa nepodarilo, možno preto, že platnosť vašich prihlasovacích údajov vypršala. Prosím, skúste to znova.",
        "uploadstash-errclear": "Vymazanie súborov bolo neúspešné.",
        "uploadstash-refresh": "Obnoviť zoznam súborov",
+       "uploadstash-thumbnail": "zobraziť náhľad",
+       "uploadstash-exception": "Načítaný súbor sa nepodarilo uložiť do skrýše ($1): „$2“.",
        "invalid-chunk-offset": "Neplatný posun bloku",
        "img-auth-accessdenied": "Prístup zamietnutý",
        "img-auth-nopathinfo": "Váš server nie je nastavený tak, aby poskytoval tieto informácie.\nMôže byť založený na CGI a nedokáže podporovať img_auth.\nPozri https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization.",
        "filerevert-submit": "Obnoviť",
        "filerevert-success": "'''[[Media:$1|$1]]''' bol obnovený na [$4 verziu z $2, $3].",
        "filerevert-badversion": "Neexistuje predchádzajúca lokálna verzia tohto súboru s požadovanou časovou značkou.",
+       "filerevert-identical": "Aktuálna verzia súboru už zodpovedá zadanej verzii.",
        "filedelete": "Zmazať $1",
        "filedelete-legend": "Zmazať súbor",
        "filedelete-intro": "Chystáte sa zmazať súbor '''[[Media:$1|$1]]''' spolu s celou jeho históriou.",
        "download": "stiahnuť",
        "unwatchedpages": "Nesledované stránky",
        "listredirects": "Zoznam presmerovaní",
+       "listduplicatedfiles": "Zoznam súborov s duplikátmi",
+       "listduplicatedfiles-summary": "Toto je zoznam súborov, u ktorých najnovšia verzia súboru je duplikát najnovšej verzie nejakého iného súboru. Berú sa do úvahy iba lokálne súbory.",
+       "listduplicatedfiles-entry": "[[:File:$1|$1]] má [[$3|{{PLURAL:$2|duplikát|$2 duplikáty|$2 duplikátov}}]].",
        "unusedtemplates": "Nepoužité šablóny",
        "unusedtemplatestext": "Táto stránka obsahuje zoznam všetkých stránok v mennom priestore {{ns:template}}:, ktoré nie sú vložené v žiadnej inej stránke. Pred zmazaním nezabudnite skontrolovať ostatné odkazy!",
        "unusedtemplateswlh": "iné odkazy",
        "doubleredirects": "Dvojité presmerovania",
        "doubleredirectstext": "Táto stránka obsahuje zoznam stránok, ktoré presmerovávajú na iné presmerovacie stránky.\nKaždý riadok obsahuje odkaz na prvé a druhé presmerovanie a tiež prvý riadok z textu na ktorý odkazuje druhé presmerovanie, ktoré zvyčajne odkazuje na „skutočný“ cieľ, na ktorý má odkazovať prvé presmerovanie.\n<del>Prečiarknuté</del> položky boli vyriešené.",
        "double-redirect-fixed-move": "Stránka [[$1]] bola presunutá.\nBola automaticky aktualizovaná a teraz presmerováva na [[$2]]",
-       "double-redirect-fixed-maintenance": "Opravuje sa dvojité presmerovanie z [[$1]] na [[$2]].",
+       "double-redirect-fixed-maintenance": "V rámci úlohy údržby sa automaticky sa opravuje dvojité presmerovanie z [[$1]] na [[$2]].",
        "double-redirect-fixer": "Korektor presmerovaní",
        "brokenredirects": "Pokazené presmerovania",
        "brokenredirectstext": "Nasledovné presmerovania odkazujú na neexistujúce stránky:",
        "wantedpages-badtitle": "Neplatný názov vo výsledkoch: $1",
        "wantedfiles": "Žiadané súbory",
        "wantedfiletext-cat": "Nasledovné súbory sa používajú, ale nie sú k dispozícii. Súbory z cudzích repozitárov môžu byť uvedené aj napriek tomu, že existujú. Takéto falošné poplachy budú <del>prečiarknuté</del>. Okrem toho stránky, ktoré obsahujú vložené súbory, ktoré nie sú k dispozícii sú uvedené na [[:$1]].",
+       "wantedfiletext-cat-noforeign": "Následujúce súbory sa používajú, ale neexistujú. Stránky, ktoré vkladajú neexistujúce súbory, sú naviac uvedené v [[:$1]].",
        "wantedfiletext-nocat": "Nasledovné súbory sa používajú, ale nie sú k dispozícii. Súbory z cudzích repozitárov môžu byť uvedené aj napriek tomu, že existujú. Takéto falošné poplachy budú <del>prečiarknuté</del>.",
+       "wantedfiletext-nocat-noforeign": "Následujúce súbory sa používajú, ale neexistujú.",
        "wantedtemplates": "Žiadané šablóny",
        "mostlinked": "Najčastejšie odkazované stránky",
        "mostlinkedcategories": "Najčastejšie odkazované kategórie",
        "protectedpages-reason": "Dôvod",
        "protectedpages-submit": "Zobraziť stránky",
        "protectedpages-unknown-timestamp": "Neznáme",
-       "protectedpages-unknown-performer": "Neznámy redaktor",
+       "protectedpages-unknown-performer": "Neznámy používateľ",
        "protectedtitles": "Zamknuté názvy",
        "protectedtitles-summary": "Táto stránka obsahuje zoznam názvov, ktoré sú momentálne zamknuté proti vytvoreniu. Zoznam existujúcich zamknutých stránok nájdete na stránke [[{{#special:ProtectedPages}}|{{int:protectedpages}}]].",
        "protectedtitlesempty": "Tieto parametre momentálne nezamykajú žiadne názvy stránok.",
        "nopagetext": "Cieľová stránka, ktorú ste uviedli neexistuje.",
        "pager-newer-n": "{{PLURAL:$1|1 novší|$1 novšie|$1 novších}}",
        "pager-older-n": "{{PLURAL:$1|1 starší|$1 staršie|$1 starších}}",
-       "suppress": "Dozor",
+       "suppress": "Potlačenie",
        "querypage-disabled": "Táto špeciálna stránka bola zakázaná z výkonnostných dôvodov.",
+       "apihelp": "Pomocník API",
+       "apihelp-no-such-module": "Modul „$1” nebol nájdený.",
        "apisandbox": "API pieskovisko",
+       "apisandbox-jsonly": "Na použitie pieskoviska API je nutný JavaScript.",
        "apisandbox-api-disabled": "API je na tejto stránke vypnuté.",
+       "apisandbox-intro": "Pomocou tejto stránky môžete experimentovať s <strong>API webovej služby MediaWiki</strong>.\nPodrobnosti využitia API nájdete v [[mw:API:Main page|jeho dokumentácii]]. Príklad: [https://www.mediawiki.org/wiki/API#A_simple_example získanie obsahu Hlavnej stránky]. Ďalšie príklady uvidíte vybraním operácie.\n\nUvedomte si, že napriek tomu, že ste na pieskovisku, môžu operácie vykonané na tejto stránke wiki zmeniť.",
        "apisandbox-fullscreen": "Rozbaliť panel",
        "apisandbox-unfullscreen": "Zobraziť stránku",
        "apisandbox-submit": "Odoslať dopyt",
        "apisandbox-reset": "Vyčistiť",
        "apisandbox-retry": "Skúsiť znova",
        "apisandbox-examples": "Príklady",
-       "apisandbox-results": "Výsledok",
+       "apisandbox-results": "Výsledky",
        "apisandbox-request-url-label": "URL požiadavky:",
        "booksources": "Knižné zdroje",
        "booksources-search-legend": "Vyhľadávať knižné zdroje",
        "booksources-text": "Nižšie je zoznam odkazov na iné stránky, ktoré predávajú nové a použité knihy a tiež môžu obsahovať ďalšie informácie o knihách, ktoré hľadáte:",
        "booksources-invalid-isbn": "Zdá sa, že dané ISBN nie je platné. Skontrolujte, či ste neurobili chybu pri kopírovaní z pôvodného zdroja.",
        "specialloguserlabel": "Pôvodca:",
-       "speciallogtitlelabel": "Cieľ (názov alebo používateľ):",
+       "speciallogtitlelabel": "Cieľ (názov alebo {{ns:user}}:Používateľské meno):",
        "log": "Záznamy",
        "logeventslist-submit": "Zobraziť",
        "all-logs-page": "Všetky verejné záznamy",
        "watchnologin": "Nie ste prihlásený/á",
        "addwatch": "Pridať do zoznamu sledovaných stránok",
        "addedwatchtext": "Stránka „[[:$1]]“ a jej diskusná stránka boli pridané do vášho zoznamu [[Special:Watchlist|sledovaných stránok]].",
+       "addedwatchtext-talk": "„[[:$1]]“ a súvisiaca stránka boli pridané do vášho zoznamu [[Special:Watchlist|sledovaných stránok]].",
        "addedwatchtext-short": "Stránka „$1“ bola pridaná do vášho zoznamu sledovaných.",
        "removewatch": "Odstrániť zo zoznamu sledovaných",
        "removedwatchtext": "Stránka „[[:$1]]“ a jej diskusná stránka boli odstránené z vášho [[Special:Watchlist|zoznamu sledovaných stránok]].",
+       "removedwatchtext-talk": "„[[:$1]]“ a súvisiaca stránka boli odstránené z vášho [[Special:Watchlist|zoznamu sledovaných stránok]].",
        "removedwatchtext-short": "Stránka „$1“ bola odstránená z vášho zoznamu sledovaných.",
        "watch": "Sledovať",
        "watchthispage": "Sledovať túto stránku",
        "wlshowlast": "Zobraziť posledných $1 hodín $2 dní",
        "watchlist-hide": "Skryť",
        "watchlist-submit": "Zobraziť",
-       "wlshowtime": "Zobraziť posl.:",
+       "wlshowtime": "Obdobie:",
        "wlshowhideminor": "drobné úpravy",
        "wlshowhidebots": "botov",
        "wlshowhideliu": "registrovaných",
        "exbeforeblank": "obsah pred vyčistením stránky bol: '$1'",
        "delete-confirm": "Zmazať „$1“",
        "delete-legend": "Zmazať",
-       "historywarning": "'''Upozornenie:''' Stránka, ktorú sa chystáte zmazať má históriu obsahujúcu približne $1 {{PLURAL:$1|revíziu|revízie|revízií}}:",
+       "historywarning": "<strong>Upozornenie:</strong> Stránka, ktorú sa chystáte zmazať má históriu obsahujúcu $1 {{PLURAL:$1|revíziu|revízie|revízií}}:",
        "historyaction-submit": "Zobraziť",
        "confirmdeletetext": "Chystáte sa trvalo zmazať z databázy stránku alebo obrázok spolu so všetkými jeho/jej predošlými verziami. Potvrďte, že máte v úmysle tak urobiť, že ste si vedomý následkov, a že to robíte v súlade so [[{{MediaWiki:Policy-url}}|zásadami a smernicami {{GRAMMAR:genitív|{{SITENAME}}}}]].",
        "actioncomplete": "Úloha bola dokončená",
        "delete-toobig": "Táto stránka má veľkú históriu úprav, viac ako $1 {{PLURAL:$1|revíziu|revízie|revízií}}. Mazanie takýchto stránok bolo obmedzené, aby sa zabránilo náhodnému poškodeniu {{GRAMMAR:genitív|{{SITENAME}}}}.",
        "delete-warning-toobig": "Táto stránka má veľkú históriu úprav, viac ako $1 {{PLURAL:$1|revíziu|revízie|revízií}}. Jej zmazanie by mohlo narušiť databázové operácie {{GRAMMAR:genitív|{{SITENAME}}}}; postupujte opatrne.",
        "deleteprotected": "Túto stránku nemôžete vymazať, pretože je zamknutá.",
-       "deleting-backlinks-warning": "'''Upozornenie:''' Stránka, ktorú sa chystáte zmazať, je odkazovaná [[Special:WhatLinksHere/{{FULLPAGENAME}}|z iných stránok]], prípadne do nich vložená.",
+       "deleting-backlinks-warning": "<strong>Upozornenie:</strong> Na stránku, ktorú sa chystáte zmazať, odkazujú [[Special:WhatLinksHere/{{FULLPAGENAME}}|iné stránky]], prípadne je do nich vložená.",
        "rollback": "Vrátiť späť úpravy",
        "rollbacklink": "vrátiť",
        "rollbacklinkcount": "vrátenie $1 {{PLURAL:$1|úpravy|úprav}}",
        "revertpage": "Posledné úpravy používateľa [[Special:Contributions/$2|$2]] ([[User talk:$2|diskusia]]) vrátené; bola obnovená posledná úprava $1",
        "revertpage-nouser": "Vrátené úpravy od skrytého používateľa na poslednú revíziu od {{GENDER:$1|[[User:$1|$1]]}}",
        "rollback-success": "Úpravy $1 vrátené; obnovená posledná verzia od $2.",
+       "rollback-success-notify": "Úpravy používateľa $1 boli vrátené;\nobnovená posledná revízia od používateľa $2. [$3 Zobraziť zmeny]",
        "sessionfailure-title": "Chyba relácie",
        "sessionfailure": "Zdá sa, že je problém s vašou prihlasovacou reláciou;\ntáto akcia bola zrušená ako prevencia proti zneužitiu relácie (session).\nProsím, stlačte \"naspäť\", obnovte stránku, z ktorej ste sa sem dostali, a skúste to znova.",
+       "changecontentmodel": "Zmeniť model obsahu stránky",
+       "changecontentmodel-legend": "Zmeniť model obsahu",
+       "changecontentmodel-title-label": "Názov stránky",
+       "changecontentmodel-model-label": "Nový model obsahu",
+       "changecontentmodel-reason-label": "Dôvod:",
+       "changecontentmodel-submit": "Zmeniť",
+       "changecontentmodel-success-title": "Model obsahu bol zmenený",
+       "changecontentmodel-success-text": "Typ obsahu [[:$1]] bol zmenený.",
+       "changecontentmodel-cannot-convert": "Obsah na [[:$1]] nie je možné konvertovať na typ $2.",
+       "changecontentmodel-nodirectediting": "Model obsahu $1 nepodporuje priame úpravy",
+       "changecontentmodel-emptymodels-title": "Žiadne modely obsahu nie sú k dispozícii",
+       "changecontentmodel-emptymodels-text": "Obsah na [[:$1]] nie je možné konvertovať na žiaden typ.",
        "log-name-contentmodel": "Záznam zmien modelov obsahu",
        "log-description-contentmodel": "Udalosti, týkajúce sa modelov obsahu stránok",
+       "logentry-contentmodel-new": "$1 {{GENDER:$2|vytvoril|vytvorila}} stránku $3 pomocou neštandardného modelu obsah „$5“",
+       "logentry-contentmodel-change": "$1 {{GENDER:$2|zmenil|zmenila}} model obsahu stránky $3 zo „$4“ na „$5“",
+       "logentry-contentmodel-change-revertlink": "vrátiť",
+       "logentry-contentmodel-change-revert": "vrátiť",
        "protectlogpage": "Záznam zamknutí",
        "protectlogtext": "Nižšie je zoznam zmien stavu ochrany stránok.\nMôžete si pozrieť aj [[Special:ProtectedPages|zoznam momentálne platných ochrán stránok]].",
        "protectedarticle": "zamyká „[[$1]]“",
        "protect-locked-blocked": "Nemôžete meniť úroveň ochrany, kým ste zablokovaný.\nTu sú aktuálne nastavenia stránky '''$1''':",
        "protect-locked-dblock": "Nie je možné zmeniť úroveň ochrany z dôvodu aktívneho zámku databázy.\nTu sú aktuálne nastavenia stránky '''$1''':",
        "protect-locked-access": "Váš účet nemá oprávnenie meniť úroveň ochrany stránky.\nTu sú aktuálne nastavenia stránky '''$1''':",
-       "protect-cascadeon": "Táto stránka je momentálne zamknutá, lebo je použitá na {{PLURAL:$1|nasledovnej stránke, ktorá má|nasledovných stránkach, ktoré majú}} zapnutú kaskádovú ochranu. Zmeny úrovne ochrany tejto stránky neovplyvnia kaskádovú ochranu.",
+       "protect-cascadeon": "Táto stránka je momentálne zamknutá, lebo je vložená v {{PLURAL:$1|nasledovnej stránke, ktorá má|nasledovných stránkach, ktoré majú}} zapnutú kaskádovú ochranu. Zmeny úrovne ochrany tejto stránky neovplyvnia kaskádovú ochranu.",
        "protect-default": "Povoliť všetkých používateľov",
        "protect-fallback": "Povoliť iba používateľov s oprávnením „$1“",
        "protect-level-autoconfirmed": "Povoliť iba používateľov s potvrdeným emailom",
        "undeletepagetext": "{{PLURAL:$1|Táto stránka bola zmazaná, ale je stále v archíve a\nmožno ju obnoviť|Tieto stránky boli zmazané, ale sú stále v archíve a\nmožno ich obnoviť}}. Archív môže byť pravidelne vyprázdnený.",
        "undelete-fieldset-title": "Obnoviť revízie",
        "undeleteextrahelp": "Ak chcete obnoviť celú stránku, nechajte všetky zaškrtávacie polia nezaškrtnuté a kliknite na '''''{{int:undeletebtn}}'''''.\nAk chcete vykonať selektívnu obnovu, zašktrnite polia zodpovedajúce revíziám, ktoré sa majú obnoviť a kliknite na '''''{{int:undeletebtn}}'''''.",
-       "undeleterevisions": "$1 {{PLURAL:verzia je archivovaná|verzie sú archivované|verzií je archivovaných}}",
+       "undeleterevisions": "$1 {{PLURAL:verzia je zmazaná|verzie sú zmazané|verzií je zmazaných}}",
        "undeletehistory": "Ak obnovíte túto stránku, obnovia sa aj všetky predchádzajúce verzie do histórie predchádzajúcich verzií.\nAk bola od zmazania vytvorená nová stránka s rovnakým názvom, obnovené revízie sa objavia v histórii stránky.",
        "undeleterevdel": "Obnovenie sa nevykoná, ak by malo mať za dôsledok čiastočné zmazanie poslednej revízie. V takých prípadoch musíte odznačiť alebo odkryť najnovšie zmazané revízie.",
        "undeletehistorynoadmin": "Táto stránka bola zmazaná. Dôvod zmazania je zobrazený dolu v zhrnutí spolu s podrobnosťami o používateľoch, ktorí túto stránku upravovali pred zmazaním. Samotný text týchto zmazaných revízií je prístupný iba správcom.",
        "undelete-revision": "Zmazaná revízia $1 ($4, $5) od $3:",
        "undeleterevision-missing": "Neplatná alebo chýbajúca revízia. Zrejme ste použili zlý odkaz alebo revízia bola obnovená alebo odstránená z histórie.",
+       "undeleterevision-duplicate-revid": "{{PLURAL:$1|Jednu revíziu|$1 revízií}} nebolo možné obnoviť, pretože {{PLURAL:$1|jej|ich}} <code>rev_id</code> sa už požíval.",
        "undelete-nodiff": "Nebola nájdená žiadna predošlá revízia.",
        "undeletebtn": "Obnoviť!",
        "undeletelink": "zobraziť/obnoviť",
        "undeletedrevisions": "{{PLURAL:$1|jedna verzia bola obnovená|$1 verzie boli obnovené|$1 verzií bolo obnovených}}",
        "undeletedrevisions-files": "{{PLURAL:$1|Jedna revízia|$1 revízie|$1 revízií}} a {{PLURAL:$2|jeden súbor bol obnovený|$2 súbory boli obnovené|$2 súborov bolo obnovených}}",
        "undeletedfiles": "{{PLURAL:$1|Jeden súbor bol obnovený|$1 súbory boli obnovené|$1 súborov bolo obnovených}}",
-       "cannotundelete": "Obnovenie sa nepodarilo:\n$1",
+       "cannotundelete": "Časť alebo celé obnovenie sa nepodarilo:\n$1",
        "undeletedpage": "'''$1 bol obnovený'''\n\nZoznam posledných mazaní a obnovení nájdete v [[Special:Log/delete|Zázname mazaní]].",
        "undelete-header": "Pozri nedávno zmazané stránky v [[Special:Log/delete|zázname mazaní]].",
        "undelete-search-title": "Hľadať zmazané stránky",
        "sp-contributions-newbies-sub": "Príspevky nováčikov",
        "sp-contributions-newbies-title": "Príspevky nových používateľov",
        "sp-contributions-blocklog": "záznam blokovaní",
-       "sp-contributions-suppresslog": "utajené príspevky redaktora",
-       "sp-contributions-deleted": "zmazané príspevky používateľa",
+       "sp-contributions-suppresslog": "utajené príspevky {{GENDER:$1|používateľa|používateľky}}",
+       "sp-contributions-deleted": "zmazané príspevky {{GENDER:$1|používateľa|používateľky}}",
        "sp-contributions-uploads": "nahrané súbory",
        "sp-contributions-logs": "záznamy",
        "sp-contributions-talk": "diskusia",
        "sp-contributions-username": "IP adresa alebo meno používateľa:",
        "sp-contributions-toponly": "Zobraziť len posledné revízie",
        "sp-contributions-newonly": "Zobraziť len založenia stránok",
+       "sp-contributions-hideminor": "Skryť drobné úpravy",
        "sp-contributions-submit": "Hľadať",
        "whatlinkshere": "Odkazy na túto stránku",
        "whatlinkshere-title": "Stránky odkazujúce na „$1“",
        "whatlinkshere-hideredirs": "$1 presmerovania",
        "whatlinkshere-hidetrans": "$1 transklúzie",
        "whatlinkshere-hidelinks": "$1 odkazy",
-       "whatlinkshere-hideimages": "$1 odkazov na súbor",
+       "whatlinkshere-hideimages": "$1 {{PLURAL:$1|odkaz|odkazy|odkazov}} na súbor",
        "whatlinkshere-filters": "Filtre",
        "whatlinkshere-submit": "Zobraziť",
        "autoblockid": "Autoblokovanie #$1",
        "block": "Zablokovať používateľa",
        "unblock": "Odblokovať používateľa",
-       "blockip": "Zablokovať používateľa",
+       "blockip": "Zablokovať {{GENDER:$1|používateľa|používateľku}}",
        "blockip-legend": "Zablokovať používateľa",
-       "blockiptext": "Použite tento formulár na zablokovanie možnosti zápisov uskutočnených z konkrétnej IP adresy alebo od používateľa.\nMali by ste to urobiť len v prípade bránenia vandalizmu a v súlade so [[{{MediaWiki:Policy-url}}|zásadami a smernicami {{GRAMMAR:genitív|{{SITENAME}}}}]].\nNižšie uveďte konkrétny dôvod (napríklad uveďte konkrétne stránky, ktoré padli za obeť vandalizmu).",
+       "blockiptext": "Tento formulár použite na zablokovanie možnosti zápisu z konkrétnej IP adresy alebo od konkrétneho používateľa.\nMali by ste to urobiť len na zabránenie vandalizmu a v súlade so [[{{MediaWiki:Policy-url}}|zásadami a smernicami {{GRAMMAR:genitív|{{SITENAME}}}}]].\nNižšie uveďte konkrétny dôvod (napríklad uveďte konkrétne stránky, ktoré padli za obeť vandalizmu).\nRozsahy IP adreies môžete blokovať pomocou syntaxe [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing CIDR]; najväčší povolený rozsah je /$1 v prípade IPv4 a /$2 v prípade IPv6.",
        "ipaddressorusername": "IP adresa/meno používateľa:",
        "ipbexpiry": "Ukončenie:",
        "ipbreason": "Dôvod:",
        "ipb-unblock": "Odblokovať používateľa alebo IP adresu",
        "ipb-blocklist": "Zobraziť existujúce blokovania",
        "ipb-blocklist-contribs": "Príspevky {{GENDER:redaktora|redaktorky}} $1",
+       "ipb-blocklist-duration-left": "zostáva $1",
        "unblockip": "Odblokovať používateľa",
        "unblockiptext": "Použite tento formulár na obnovenie možnosti zápisov\nz/od momentálne zablokovanej IP adresy/používateľa.",
        "ipusubmit": "Zrušiť toto blokovanie",
        "block-log-flags-hiddenname": "používateľské meno skryté",
        "range_block_disabled": "Možnosť správcov vytvárať rozsah zablokovaní je vypnutá.",
        "ipb_expiry_invalid": "Neplatný čas ukončenia.",
+       "ipb_expiry_old": "Čas uplynutia je v minulosti.",
        "ipb_expiry_temp": "Blokovania skrytých používateľských mien by mali byť trvalé.",
        "ipb_hide_invalid": "Nepodarilo sa potlačiť tento účet; má viac ako {{PLURAL:$1|jednu úpravu|$1 úpravy|$1 úprav}}.",
        "ipb_already_blocked": "„$1“ je už zablokovaný",
        "lockdbsuccesstext": "Databáza bola zamknutá.<br />\nNezabudnite po dokončení údržby [[Special:UnlockDB|odstrániť zámok]].",
        "unlockdbsuccesstext": "Databáza {{GRAMMAR:genitív|{{SITENAME}}}} bola odomknutá.",
        "lockfilenotwritable": "Súbor, ktorý zamyká databázu nie je zapisovateľný. Aby bolo možné zamknúť či odomknúť databázu, je potrebné, aby doňho mohol web server zapisovať.",
+       "databaselocked": "Databáza už je zamknutá.",
        "databasenotlocked": "Databáza nie je zamknutá.",
        "lockedbyandtime": "({{GENDER:$1|$1}}, $2 $3 )",
        "move-page": "Presunúť $1",
        "move-page-legend": "Presunúť stránku",
        "movepagetext": "Pomocou tohto formulára premenujete stránku a premiestnite všetky jej predchádzajúce verzie pod zadaný nový názov.\nStarý názov sa stane presmerovacou stránkou na nový názov.\nMôžete automaticky aktualizovať odkazy odkazujúce na pôvodný názov.\nAk sa rozhodnete túto možnosť nevyužiť, ubezpečte sa, že ste skontrolovali\nvýskyt [[Special:DoubleRedirects|dvojitých]] a [[Special:BrokenRedirects|pokazených]] presmerovaní.\nVy ste zodpovedný za to, aby odkazy naďalej ukazovali tam, kam majú.\n\nUvedomte si, že stránka sa <strong>nepremiestni</strong>, ak pod novým názvom už stránka existuje.\nToto neplatí iba ak je stránka prázdna alebo presmerovacia a nemá žiadne predchádzajúce verzie.\nTo znamená, že môžete premenovať stránku späť na názov, ktorý mala pred premenovaním, ak ste sa pomýlili, a že nemôžete prepísať\nexistujúcu stránku.\n\n<strong>UPOZORNENIE!</strong>\nToto môže byť drastická a nečakaná zmena pre populárnu stránku;\nubezpečte sa preto, skôr ako budete pokračovať, že chápete dôsledky svojho činu.",
        "movepagetext-noredirectfixer": "Pomocou tohto formulára premenujete stránku a premiestnite všetky jej predchádzajúce verzie pod zadaný nový názov.\nStarý názov sa stane presmerovacou stránkou na nový názov.\nUbezpečte sa, že ste skontrolovali výskyt [[Special:DoubleRedirects|dvojitých]] a [[Special:BrokenRedirects|pokazených]] presmerovaní.\nVy ste zodpovedný za to, aby odkazy naďalej ukazovali tam, kam majú.\n\nUvedomte si, že stránka sa <strong>nepremiestni</strong>, ak pod novým názvom už stránka existuje.\nToto neplatí iba ak je stránka prázdna alebo presmerovacia a nemá žiadne predchádzajúce verzie.\nTo znamená, že môžete premenovať stránku späť na názov, ktorý mala pred premenovaním, ak ste sa pomýlili, a že nemôžete prepísať\nexistujúcu stránku.\n\n<strong>UPOZORNENIE!</strong>\nToto môže byť drastická a nečakaná zmena pre populárnu stránku;\nubezpečte sa preto, skôr ako budete pokračovať, že chápete dôsledky svojho činu.",
-       "movepagetalktext": "Príslušná diskusná stránka (ak existuje) bude premiestnená spolu so samotnou stránkou; '''nestane sa tak, iba ak:'''\n*už existuje Diskusná stránka pod týmto novým menom, alebo\n*nezaškrtnete nižšie sa nachádzajúci textový rámček.\n\nV takých prípadoch budete musieť, ak si to želáte, premiestniť alebo zlúčiť stránku ručne.",
+       "movepagetalktext": "Ak zaškrtnete toto pole, príslušná diskusná stránka (ak existuje) bude automaticky premiestnená na nový názov; nestane sa tak iba ak už pod týmto novým menom existuje neprázdna Diskusná stránka.\n\nV takom prípade budete musieť, ak si to želáte, premiestniť alebo zlúčiť stránku ručne.",
        "moveuserpage-warning": "'''Upozornenie:''' Chystáte sa presunúť používateľskú stránku. Pamätajte, že týmto presuniete iba stránku a používateľ ''nebude'' premenovaný.",
        "movecategorypage-warning": "<strong>Upozornenie:</strong> Chystáte sa presunúť stránku kategórie. Uvedomte si, že presunutá bude iba táto stránka a že žiadne stránky v pôvodnej kategórii <em>nebudú</em> do novej kategórie automaticky preradené.",
        "movenologintext": "Musíte byť registrovaný používateľ a [[Special:UserLogin|prihlásený]], aby ste mohli presunúť stránku.",
        "cant-move-to-user-page": "Nemáte oprávnenie presunúť stránku na stránku používateľa (iba na podstránku používateľa).",
        "cant-move-category-page": "Nemáte oprávnenie presúvať stránky kategórií.",
        "cant-move-to-category-page": "Nemáte oprávnenie presunúť stránku na stránku kategórie.",
-       "newtitle": "Na nový názov:",
+       "newtitle": "Nový názov:",
        "move-watch": "Sledovať túto stránku",
        "movepagebtn": "Presunúť stránku",
        "pagemovedsub": "Presun bol úspešný",
        "movenosubpage": "Táto stránka nemá podstránky.",
        "movereason": "Dôvod:",
        "revertmove": "obnoviť",
-       "delete_and_move_text": "==Je potrebné zmazať stránku==\n\nCieľová stránka „[[:$1]]“ už existuje. Chcete ho vymazať a vytvoriť tak priestor pre presun?",
+       "delete_and_move_text": "Cieľová stránka „[[:$1]]“ už existuje.\nChcete ju vymazať a vytvoriť tak priestor na presun?",
        "delete_and_move_confirm": "Áno, zmaž stránku",
        "delete_and_move_reason": "Vymazané, aby sa umožnil presun z „[[$1]]“",
        "selfmove": "Zdrojový a cieľový názov sú rovnaké; nemožno presunúť stránku na seba samú.",
        "move-leave-redirect": "Zanechať presmerovanie",
        "protectedpagemovewarning": "'''Upozornenie:''' Táto stránka bola zamknutá, aby ju mohli presunúť iba používatelia s oprávnením správcu. Dolu je pre informáciu posledná položka zo záznamu:",
        "semiprotectedpagemovewarning": "'''Poznámka:''' Táto stránka bola zamknutá, aby ju mohli presunúť iba zaregistrovaní používatelia. Dolu je pre informáciu posledná položka zo záznamu:",
-       "move-over-sharedrepo": "== Súbor existuje ==\n[[:$1]] existuje v zdieľanom úložisku. Presunutím súboru na tento názov prekryjete zdieľaný súbor.",
+       "move-over-sharedrepo": "[[:$1]] existuje v zdieľanom úložisku. Presunutím súboru na tento názov prekryjete zdieľaný súbor.",
        "file-exists-sharedrepo": "Názov súboru, ktorý ste zvolili sa už používa na zdieľanom úložisku.\nProsím, zvoľte iný názov.",
        "export": "Exportovať stránky",
        "exporttext": "Môžete exportovať text a históriu úprav konkrétnej\nstránky alebo množiny stránok do XML; tieto môžu byť potom importované do inej\nwiki používajúceho MediaWiki softvér pomocou stránky Special:Import.\n\nPre export stránok zadajte názvy do tohto poľa, jeden názov na riadok, a zvoľte, či chcete iba súčasnú verziu s informáciou o poslednej úprave alebo aj všetky staršie verzie s históriou úprav.\n\nV druhom prípade môžete tiež použiť odkaz, napr. [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]] pre stránku [[{{MediaWiki:Mainpage}}]].",
        "export-download": "Ponúknuť uloženie ako súbor",
        "export-templates": "Vrátane šablón",
        "export-pagelinks": "Vrátane odkazovaných stránok do hĺbky:",
+       "export-manual": "Pridať stránky ručne:",
        "allmessages": "Všetky systémové správy",
        "allmessagesname": "Názov",
        "allmessagesdefault": "štandardný text",
        "thumbnail_image-missing": "Zdá sa, že súbor chýba: $1",
        "thumbnail_image-failure-limit": "V poslednej dobe došlo k nejmenej $1 pokusom o vygenerovanie tohoto náhľadu. Skúste to prosím neskôr.",
        "import": "Import stránok",
-       "importinterwiki": "Transwiki import",
-       "import-interwiki-text": "Zvoľte wiki a názov stránky, ktorá sa má importovať.\nDátumy revízií a mená používateľov budú zachované.\nVšetky transwiki importy sa zaznamenávajú v [[Special:Log/import|Zázname importov]].",
+       "importinterwiki": "Importovať z inej wiki",
+       "import-interwiki-text": "Zvoľte wiki a názov stránky, ktorá sa má importovať.\nDátumy revízií a mená používateľov budú zachované.\nVšetky importy z iných sa zaznamenávajú v [[Special:Log/import|Zázname importov]].",
        "import-interwiki-sourcewiki": "Zdrojová wiki:",
        "import-interwiki-sourcepage": "Zdrojová stránka:",
        "import-interwiki-history": "Skopírovať všetky historické revízie tejto stránky",
        "import-interwiki-templates": "Vložiť všetky šablóny",
        "import-interwiki-submit": "Importovať",
+       "import-mapping-default": "Importovať na predvolené umiestnenia",
+       "import-mapping-namespace": "Importovať do menného priestoru:",
+       "import-mapping-subpage": "Importovať ako podstránky nasledujúcej stránky:",
        "import-upload-filename": "Názov súboru:",
        "import-comment": "komentár:",
        "importtext": "Prosím, exportujte súbor zo zdrojovej wiki použitím [[Special:Export|nástroja na export]].\nUložte ho na svoj disk a nahrajte sem.",
        "importcantopen": "Nedal sa otvoriť súbor importu",
        "importbadinterwiki": "Zlý interwiki odkaz",
        "importsuccess": "Import dokončený!",
-       "importnosources": "Neboli definované žiadne zdroje pre transwiki import a priame nahranie histórie je vypnuté.",
+       "importnosources": "Neboli definované žiadne wiki, z ktorých sa má importovať a priame nahranie histórie je vypnuté.",
        "importnofile": "Nebol nahraný import súbor.",
        "importuploaderrorsize": "Nahranie alebo import súboru zlyhal. Súbor je väčší ako maximálna povolená veľkosť.",
        "importuploaderrorpartial": "Nahranie alebo import súboru zlyhal. Súbor bol nahraný iba čiastočne.",
        "import-nonewrevisions": "Žiadne revízie neboli importované (buď už boli všetky  importované skôr, alebo boli preskočené kvôli chybám).",
        "xml-error-string": "$1 na riadku $2, stĺpec $3 (bajt $4): $5",
        "import-upload": "Nahrať XML údaje",
-       "import-token-mismatch": "Strata údajov relácie. Prosím, skúste to znova.",
+       "import-token-mismatch": "Strata údajov relácie.\n\nJe možné, že ste boli odhlásení. <strong>Prosím, overte, či ste ešte prihlásení a skúste to znova</strong>.\nAk to stále nefunguje, skúste [[Special:UserLogout|sa odhlásiť]] a opäť prihlásiť a skontrolujte, či váš prehliadač povoľuje cookies z týchto stránok.",
        "import-invalid-interwiki": "Nie je možné importovať zo zadanej wiki.",
        "import-error-edit": "Stránka „$1“ nebola importovaná, pretože nemáte oprávnenie na jej úpravu.",
        "import-error-create": "Stránka „$1“ nebola importovaná, pretože nemáte oprávnenie na jej vytvorenie.",
-       "import-error-interwiki": "Stránka „$1“ nie je importovaná, pretože jej názov je vyhradený pre externé odkazy (interwiki).",
-       "import-error-special": "Stránka „$1“ nie je importovaná, pretože patrí do špeciálneho menného priestoru, ktorý nepovoľuje stránky.",
-       "import-error-invalid": "Stránka „$1“ nie je importovaná, pretože jej názov je neplatný.",
+       "import-error-interwiki": "Stránka „$1“ nebola importovaná, pretože jej názov je vyhradený pre externé odkazy (interwiki).",
+       "import-error-special": "Stránka „$1“ nebola importovaná, pretože patrí do špeciálneho menného priestoru, ktorý nepovoľuje stránky.",
+       "import-error-invalid": "Stránka „$1“ nebola importovaná, pretože názov, na ktorý by bola importovaná je na tejto wiki neplatný.",
        "import-error-unserialize": "Nepodarilo sa deserializovať revíziu $2 stránky „$1“. Revízia mala používať model obsahu $3 serializovaný ako $4.",
        "import-error-bad-location": "Revíziu $2 s modelom obsahu $3 nie je možné uložiť na \"$1\" na tejto wiki. Takýto model obsahu tu nie je podporovaný.",
        "import-options-wrong": "{{PLURAL:$2|Nesprávna voľba|Nesprávne voľby}}: <nowiki>$1</nowiki>",
        "import-rootpage-nosubpage": "Menný priestor „$1“ koreňovej stránky nepodporuje podstránky.",
        "importlogpage": "Záznam importov",
        "importlogpagetext": "Administratívny import stránok vrátane histórie úprav z iných wiki.",
-       "import-logentry-upload-detail": "$1 {{PLURAL:$1|revízia|revízie|revízií}}",
-       "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|revízia|revízie|revízií}} z $2",
+       "import-logentry-upload-detail": "{{PLURAL:$1|importovaná $1 revízia|importované $1 revízie|importovaných $1 revízií}}",
+       "import-logentry-interwiki-detail": "{{PLURAL:$1|importovaná $1 revízia|importované $1 revízie|importovaných $1 revízií}} z $2",
        "javascripttest": "Testovanie JavaScriptu",
        "javascripttest-pagetext-unknownaction": "Neznáma akcia: „$1“.",
        "javascripttest-qunit-intro": "Pozri [$1 dokumentácia testovania] na mediawiki.org.",
        "tooltip-ca-nstab-category": "Zobraziť stránku s kategóriami",
        "tooltip-minoredit": "Označiť túto úpravu ako drobnú",
        "tooltip-save": "Uložiť vaše úpravy",
+       "tooltip-publish": "Zverejniť vaše zmeny",
        "tooltip-preview": "Náhľad úprav, prosím použite pred uložením!",
        "tooltip-diff": "Zobraziť, aké zmeny ste urobili v texte.",
        "tooltip-compareselectedversions": "Zobraziť rozdiely medzi dvomi zvolenými verziami tejto stránky.",
        "pageinfo-article-id": "ID stránky",
        "pageinfo-language": "Jazyk obsahu stránky",
        "pageinfo-content-model": "Model obsahu stránky",
+       "pageinfo-content-model-change": "zmeniť",
        "pageinfo-robot-policy": "Indexovanie robotmi",
        "pageinfo-robot-index": "Povolené",
        "pageinfo-robot-noindex": "Nepovolené",
        "exif-compression-4": "CCITT Group 4 faxové kódovanie",
        "exif-copyrighted-true": "Chránené autorským právom",
        "exif-copyrighted-false": "Príznak ochrany autorským právom nenastavený",
+       "exif-photometricinterpretation-1": "Čierna a biela (čierna je 0)",
        "exif-unknowndate": "Neznámy dátum",
        "exif-orientation-1": "Normálna",
        "exif-orientation-2": "Horizontálne prevrátená",
        "confirmemail_body_set": "Niekto, pravdepodobne vy, z IP adresy $1\nnastavil e-mailovú adresu účtu „$2“ na túto adresu na {{GRAMMAR:genitív|{{SITENAME}}}}.\n\nAk chcete potvrdiť, že tento účet skutočne patrí vám a aktivovať\ne-mailové funkcie na {{GRAMMAR:genitív|{{SITENAME}}}}, otvorte tento odkaz vo vašom prehliadači:\n\n$3\n\nAk účet nie je *nepatrí* patrí k vám, nasledujte tento odkaz,\nktorý zruší potvrdenie e-mailovej adresy:\n\n$5\n\nPlatnosť tohto potvrdzovacieho kódu vyprší $4.",
        "confirmemail_invalidated": "Potvrdenie emailovej adresy bolo zrušené",
        "invalidateemail": "Zrušiť potvrdenie emailovej adresy",
+       "notificationemail_subject_changed": "Email zaregistrovaný na {{GRAMMAR:lokál|{{SITENAME}}}} bol zmenený",
+       "notificationemail_subject_removed": "Email zaregistrovaný na {{GRAMMAR:lokál|{{SITENAME}}}} bol odstránený",
+       "notificationemail_body_changed": "Niekoho, pravdepodobne vy, z IP adresy $1, zmenil na {{GRAMMAR:lokál|{{SITENAME}}}} emailovú adresu účtu „$2“ na „$3“.\n\nAk ste to neboli vy, čo najskôr sa obráťte na správcu {{GRAMMAR:akuzatív|{{SITENAME}}}}.",
+       "notificationemail_body_removed": "Niekoho, pravdepodobne vy, z IP adresy $1, odstránil na {{GRAMMAR:lokál|{{SITENAME}}}} emailovú adresu účtu „$2“.\n\nAk ste to neboli vy, čo najskôr sa obráťte na správcu {{GRAMMAR:akuzatív|{{SITENAME}}}}.",
        "scarytranscludedisabled": "[Transklúzia interwiki je vypnutá]",
        "scarytranscludefailed": "[Nepodarilo sa priniesť šablónu pre $1]",
        "scarytranscludefailed-httpstatus": "[Stiahnutie šablóny zlyhalo pre $1: HTTP $2]",
        "scarytranscludetoolong": "[URL je príliš dlhé]",
        "deletedwhileediting": "'''Upozornenie''': Táto stránka bola zmazaná potom ako ste začali s jej úpravami!",
-       "confirmrecreate": "Používateľ [[User:$1|$1]] ([[User talk:$1|diskusia]]) zmazal túto stránku potom, ako ste ju začali upravovať, s odôvodnením:\n: ''$2''\nProsím, potvrďte, že túto stránku chcete skutočne znovu vytvoriť.",
-       "confirmrecreate-noreason": "Používateľ [[User:$1|$1]] ([[User talk:$1|diskusia]]) zmazal túto stránku potom, ako ste ju začali upravovať. Prosím, potvrďte, že túto stránku chcete skutočne znovu vytvoriť.",
+       "confirmrecreate": "{{GENDER:$1|Používateľ|Používateľka}} [[User:$1|$1]] ([[User talk:$1|diskusia]]) {{GENDER:$1|zmazal|zmazala}} túto stránku potom, ako ste ju začali upravovať, s odôvodnením:\n: <em>$2</em>\nProsím, potvrďte, že túto stránku chcete skutočne znovu vytvoriť.",
+       "confirmrecreate-noreason": "{{GENDER:$1|Používateľ|Používateľka}} [[User:$1|$1]] ([[User talk:$1|diskusia]]) {{GENDER:$1|zmazal|zmazala}} túto stránku potom, ako ste ju začali upravovať. Prosím, potvrďte, že túto stránku chcete skutočne znovu vytvoriť.",
        "recreate": "Znova vytvoriť",
        "confirm_purge_button": "OK",
        "confirm-purge-top": "Vyčistiť vyrovnávaciu pamäť (cache) tejto stránky?",
        "confirm-watch-top": "Pridať túto stránku do vášho zoznamu sledovaných?",
        "confirm-unwatch-button": "OK",
        "confirm-unwatch-top": "Odstrániť túto stránku z vášho zoznamu sledovaných?",
+       "confirm-rollback-button": "OK",
+       "confirm-rollback-top": "Vrátiť úpravy na tejto stránke?",
        "quotation-marks": "„$1“",
        "imgmultipageprev": "&larr; predošlá stránka",
        "imgmultipagenext": "ďalšia stránka &rarr;",
        "watchlistedit-raw-done": "Váš zoznam sledovaných stránok bol aktualizovaný.",
        "watchlistedit-raw-added": "{{PLURAL:$1|Jedna položka bola pridaná|$1 položky boli pridané|$1 položiek bolo pridaných}}:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|Jedna položka bola odstránená|$1 položky boli odstránené|$1 položiek bolo odstránených}}:",
-       "watchlistedit-clear-title": "Vyprázdnenie zoznamu sledovaných stránok",
+       "watchlistedit-clear-title": "Vyprázdniť zoznam sledovaných stránok",
        "watchlistedit-clear-legend": "Vyprázdniť zoznam sledovaných stránok",
        "watchlistedit-clear-explain": "Z vášho zoznamu sledovaných stránok budú odstránené všetky názvy",
        "watchlistedit-clear-titles": "Názvy:",
        "timezone-local": "miestny čas",
        "duplicate-defaultsort": "Upozornenie: DEFAULTSORT s triediacim kľúčom „$2“ prepisuje vyššie nastavenú hodnotu „$1“.",
        "duplicate-displaytitle": "<strong>Upozornenie:</strong> Predchádzajúci titulok (DISPLAYTITLE) „$1“ je nahradený titulkom „$2“.",
+       "restricted-displaytitle": "<strong>Upozornenie:</strong> Zobrazovaný názov „$1“ bol ignorovaný pretože sa nezhoduje so skutočným názvom stránky.",
        "invalid-indicator-name": "<strong>Chyba:</strong> Atribút <code>name</code> indikátoru stavu stránky nesmie byť prázdny.",
        "version": "Verzia",
        "version-extensions": "Nainštalované rozšírenia",
        "version-ext-colheader-description": "Popis",
        "version-ext-colheader-credits": "Autori",
        "version-license-title": "Licencia pre $1",
+       "version-license-not-found": "Nenašli sa žiadne podrobné licenčné informácie k tomuto rozšíreniu.",
        "version-poweredby-credits": "Táto wiki beží na '''[https://www.mediawiki.org/ MediaWiki]''', copyright © 2001-$1 $2.",
        "version-poweredby-others": "ďalší",
        "version-poweredby-translators": "prekladatelia na translatewiki.net",
        "redirect-page": "ID stránky",
        "redirect-revision": "Revíziu stránky",
        "redirect-file": "Názov súboru",
+       "redirect-logid": "ID záznamu",
        "redirect-not-exists": "Hodnota nebola nájdená",
        "fileduplicatesearch": "Hľadať duplicitné súbory",
        "fileduplicatesearch-summary": "Hľadanie duplicitných súborov na základe ich haš hodnôt.",
        "tag-filter": "Filter [[Special:Tags|značiek]]:",
        "tag-filter-submit": "Filter",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Značka|Značky}}]]: $2)",
+       "tag-mw-contentmodelchange": "zmena modelu obsahu",
+       "tag-mw-contentmodelchange-description": "Úpravy, ktoré [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel menia model obsahu] stránky",
        "tags-title": "Značky",
        "tags-intro": "Táto stránka obsahuje zoznam a význam značiek, ktorými môže softvér označovať jednotlivé úpravy.",
        "tags-tag": "Názov značky",
        "tags-actions-header": "Akcie",
        "tags-active-yes": "Áno",
        "tags-active-no": "Nie",
+       "tags-source-extension": "Definované softvérom",
+       "tags-source-manual": "Pridané manuálne používateľmi a botmi",
+       "tags-source-none": "Už sa nepoužíva",
        "tags-edit": "upraviť",
+       "tags-delete": "zmazať",
+       "tags-activate": "aktivovať",
+       "tags-deactivate": "deaktivovať",
        "tags-hitcount": "$1 {{PLURAL:$1|úprava|úpravy|úprav}}",
+       "tags-manage-no-permission": "Nemáte oprávnenie spravovať značky zmien.",
+       "tags-manage-blocked": "Nemôžete spravovať značky, pokým ste {{GENDER:|zablokovaný|zablokovaná}}.",
+       "tags-create-heading": "Vytvoriť novú značku",
+       "tags-create-explanation": "Novo vytvorené značky sú implicitne k dispozícii používateľom a botom.",
+       "tags-create-tag-name": "Názov stránky:",
+       "tags-create-reason": "Dôvod:",
+       "tags-create-submit": "Vytvoriť",
+       "tags-create-no-name": "Musíte zadať názov značky.",
+       "tags-create-invalid-chars": "Názvy značiek nesmú obsahovať čiarky (<code>,</code>) ani lomky (<code>/</code>).",
+       "tags-create-invalid-title-chars": "Názvy značiek nesmú obsahovať znaky, ktoré nemožno použiť v názvoch stránok.",
+       "tags-create-already-exists": "Značka „$1“ už existuje",
+       "tags-create-warnings-above": "Pri pokuse vytvoriť značku „$1“ {{PLURAL:$2|bolo zistené následujúce upozornenie|boli zistené následujúce upozornenia}}:",
+       "tags-create-warnings-below": "Chcete napriek tomu značku vytvoriť?",
+       "tags-delete-title": "Zmazať značku",
+       "tags-delete-explanation-initial": "Chystáte sa zmazať značku „$1“ z databázy.",
+       "tags-delete-reason": "Dôvod:",
        "tags-deactivate-reason": "Dôvod:",
        "tags-edit-title": "Upraviť značky",
        "tags-edit-new-tags": "Nové značky:",
        "htmlform-cloner-create": "Pridať ďalšie",
        "htmlform-cloner-delete": "Odstrániť",
        "htmlform-cloner-required": "Je povinná najmenej jedna hodnota.",
-       "sqlite-has-fts": "$1 s podporou vyhľadávania v plnom texte",
-       "sqlite-no-fts": "$1 bez podpory vyhľadávania v plnom texte",
+       "htmlform-date-placeholder": "RRRR-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "RRRR-MM-DD HH:MM:SS",
        "logentry-delete-delete": "$1 zmazal stránku $3",
        "logentry-delete-restore": "$1 obnovil stránku $3",
        "logentry-delete-event": "$1 zmenil viditeľnosť {{PLURAL:$5|záznamu udalostí|$5 záznamov udalostí}} k stránke $3: $4",
        "feedback-bugornote": "Ak ste pripravený podrobne popísať technický problém, prosím pošlite [$1 hlásenie o chybe]. \nV opačnom prípade môžete použiť zjednodušený formulár nižšie. Váš komentár sa pridá na stránku „[$3 $2]“ spolu s vašim používateľským meno a prehliadačom, ktorý používate.",
        "feedback-cancel": "Zrušiť",
        "feedback-close": "Hotovo",
+       "feedback-external-bug-report-button": "Založiť technickú úlohu",
        "feedback-dialog-title": "Odoslať názor",
-       "feedback-error-title": "Chyba",
+       "feedback-dialog-intro": "Pomocou formulára nižšie môžete odoslať svoj názor. Váš komentár sa spolu s vašim použivateľským menom pridá na stránku „$1“.",
        "feedback-error1": "Chyba: Nerozpoznaný výsledok z API",
        "feedback-error2": "Chyba: Úprava sa nepodarila",
        "feedback-error3": "Chyba: Žiadna odpoveď z API",
        "feedback-message": "Správa:",
        "feedback-subject": "Predmet:",
        "feedback-submit": "Odoslať",
+       "feedback-terms": "Beriem na vedomie, že informácie o mojom prehliadači zahŕňajú jeho presnú verziu spolu s verziou operačného systému a budú zverejnené pri mojom komentári.",
+       "feedback-termsofuse": "Súhlasím s tým, že budem poskytovať spätnú väzbu v súlade s Podmienkami použitia.",
        "feedback-thanks": "Ďakujeme. Váš komentár bol odoslaný na stránku „[$2 $1]“.",
        "feedback-thanks-title": "Ďakujeme",
        "feedback-useragent": "Prehliadač:",
-       "searchsuggest-search": "Hľadať",
+       "searchsuggest-search": "Hľadať {{SITENAME}}",
        "searchsuggest-containing": "obsahuje...",
+       "api-error-autoblocked": "Vaše IP adresa bola automaticky zablokovaná, pretože ju používal zablokovaný používateľ.",
        "api-error-badaccess-groups": "Nemáte oprávnenie nahrávať súbory na tejto wiki.",
        "api-error-badtoken": "Vnútorná chyba: Zlý token.",
+       "api-error-blocked": "Možnosť editovať vám bola zablokovaná.",
        "api-error-copyuploaddisabled": "Nahrávanie z URL je na tomto serveri zakázané.",
        "api-error-duplicate": "{{PLURAL:$1|ďalší súbor|ďalšie súbory}} s rovnakým obsahom už na tejto wiki existujú",
        "api-error-duplicate-archive": "{{PLURAL:$1|ďalší súbor|ďalšie súbory}} s rovnakým obsahom už na tejto wiki existoval, ale {{PLURAL:$1|bol zmazaný|boli zmazané}}.",
        "expand_templates_generate_xml": "Zobraziť strom XML",
        "expand_templates_generate_rawhtml": "Zobraziť surové HTML",
        "expand_templates_preview": "Náhľad",
-       "pagelanguage": "Voľba jazyka stránky",
+       "pagelanguage": "Zmeniť jazyk stránky",
        "pagelang-name": "Stránka",
        "pagelang-language": "Jazyk",
        "pagelang-use-default": "Použiť predvolený jazyk",
        "pagelang-select-lang": "Vybrať jazyk",
+       "pagelang-submit": "Odoslať",
        "right-pagelang": "Zmeniť jazyk stránky",
        "action-pagelang": "meniť jazyk stránky",
        "default-skin-not-found": "Uups! Základná tapeta pre Vašu wiki, popísanú v <code dir=\"ltr\">$wgDefaultSkin</code> ako <code>$1</code>, nie je dostupná. \n\nVaša inštalácia pravdepodobne obsahuje nasledovné tapety. Pozri [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual: Skin configuration] pre viac informácii o ich aktivácii a zvoľte základnú.\n\n$2\n\n; Ak ste MediaWiki len teraz nainštalovali\n; Zrejme ste to nainštalovali z gitu alebo priamo zo zdrojového kódu inou metódou. Je to očakávané. Skúste nainštalovať nejaké tapety z [https://www.mediawiki.org/wiki/Category:All_skins mediawiki.org's skin directory];\n:*Stiahnutím [https://www.mediawiki.org/wiki/Download tarball installer], ktorý ponúka viacero tapiet a rozšírení. Skopírovať a nalepiť možno priamo z <code>skins/</code>.\n:*Klonovanie jednej zo <code>mediawiki/skins/*</code> schránok cez git do <code dir=\"ltr\">skins/</code> priečinku Vašej Media Wiki inštalácie.\n: S existujúcou git schránkou, ak ste vývojár MediaWiki, by nemal byť konflikt.\n\n: Ak ste upgradeovali MediaWiki\n: MediaWiki 1.24 a novšie už tapety automaticky neaktivujú. (see [https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery Manual: Skin autodiscovery]). Nasledovný kód môžete skopírovať do <code>LocalSettings.php</code> pre aktivovanie všetkých dostupných tapiet.\n\n<pre dir=\"ltr\">$3</pre>\n\n; Ak ste upravili <code>LocalSettings.php</code>:\n: Skontrolujte chyby.",
        "mediastatistics-header-text": "Text",
        "mediastatistics-header-executable": "Spustiteľné súbory",
        "mediastatistics-header-archive": "Komprimované formáty",
+       "mediastatistics-header-total": "Všetky súbory",
        "json-warn-trailing-comma": "Z JSONu {{PLURAL:$1|bola odstránená 1 koncová čiarka|boli odstránené $1 koncové čiarky|bolo odstránených $1 koncových čiarok}}",
        "json-error-unknown": "Došlo k problému s JSONom. Chyba: $1",
        "json-error-depth": "Maximálna hĺbka zásobníka bola prekročená",
        "special-characters-group-ipa": "IPA",
        "special-characters-group-symbols": "Symboly",
        "special-characters-group-greek": "Grécke",
+       "special-characters-group-greekextended": "Grécke rozšírené",
        "special-characters-group-cyrillic": "Azbuka",
        "special-characters-group-arabic": "Arabské",
        "special-characters-group-arabicextended": "Arabské rozšírené",
        "mw-widgets-dateinput-placeholder-month": "RRRR-MM",
        "mw-widgets-titleinput-description-new-page": "stránka zatiaľ neexistuje",
        "mw-widgets-titleinput-description-redirect": "presmerovanie na $1",
-       "randomrootpage": "Náhodná koreňová stránka"
+       "randomrootpage": "Náhodná koreňová stránka",
+       "changecredentials": "Zmena prihlasovacích údajov",
+       "removecredentials": "Odstránenie prihlasovacích údajov"
 }
index 88c6886..3a024d8 100644 (file)
@@ -40,7 +40,7 @@
        "tog-enotifminoredits": "Pošlji e-pošto tudi za manjše spremembe strani in datotek",
        "tog-enotifrevealaddr": "V sporočilih z obvestili o spremembah razkrij moj e-poštni naslov",
        "tog-shownumberswatching": "Prikaži število uporabnikov, ki spremljajo temo",
-       "tog-oldsig": "Trenutni podpis:",
+       "tog-oldsig": "Vaš trenutni podpis:",
        "tog-fancysig": "Obravnavaj podpis kot wikibesedilo (brez samodejne povezave)",
        "tog-uselivepreview": "Uporabi hitri predogled",
        "tog-forceeditsummary": "Ob vpisu praznega povzetka urejanja me opozori",
        "newwindow": "(odpre se novo okno)",
        "cancel": "Prekliči",
        "moredotdotdot": "Več ...",
-       "morenotlisted": "Seznam ni popoln.",
+       "morenotlisted": "Seznam morda ni popoln.",
        "mypage": "Stran",
        "mytalk": "Pogovor",
        "anontalk": "Pogovorna stran",
        "talk": "Pogovor",
        "views": "Pogled",
        "toolbox": "Orodja",
+       "tool-link-userrights": "Spremeni {{GENDER:$1|uporabnikove|uporabničine}} skupine",
+       "tool-link-emailuser": "Pošlji e-pošto {{GENDER:$1|uporabniku|uporabnici}}",
        "userpage": "Prikaži uporabnikovo stran",
        "projectpage": "Prikaži projektno stran",
        "imagepage": "Pokaži stran z datoteko",
        "editold": "spremeni",
        "viewsourceold": "izvorno besedilo",
        "editlink": "uredi",
-       "viewsourcelink": "izvorna koda",
+       "viewsourcelink": "izvorno besedilo",
        "editsectionhint": "Spremeni razdelek: $1",
        "toc": "Vsebina",
        "showtoc": "prikaži",
        "eauthentsent": "E-sporočilo je bilo poslano na navedeni e-naslov.\nČe želite tja poslati še katero, sledite navodilom v e-sporočilu, da potrdite lastništvo računa.",
        "throttled-mailpassword": "E-pošto za ponastavitev gesla smo v {{PLURAL:$1|zadnji uri|zadnjih $1 urah}} že poslali.\nZa preprečevanje zlorab lahko na {{PLURAL:$1|uro|$1 uri|$1 ure|$1 ur}} pošljemo samo eno sporočilo za ponastavitev gesla.",
        "mailerror": "Napaka pri pošiljanju pošte: $1",
-       "acct_creation_throttle_hit": "Obiskovalci {{GRAMMAR:rodilnik|{{SITENAME}}}} so s tem IP-naslovom v zadnjih 24 urah ustvarili že $1 {{PLURAL:$1|uporabniški račun|uporabniška računa|uporabniške račune|uporabniških računov|uporabniških računov}} in s tem dosegli največje dopustno število v omenjenem časovnem obdobju. Novih računov zato s tem IP-naslovom trenutno žal ne morete več ustvariti.\n\n== Urejate prek posredniškega strežnika? ==\n\nČe urejate prek AOL ali iz Bližnjega vzhoda, Afrike, Avstralije, Nove Zelandije ali iz šole, knjižnice ali podjetja, si IP-naslov morda delite z drugimi uporabniki. Če je tako, ste to sporočilo morda prejeli, čeprav niste ustvarili še nobenega računa. Znova se lahko poskusite registrirati po nekaj urah.",
+       "acct_creation_throttle_hit": "Obiskovalci {{GRAMMAR:rodilnik|{{SITENAME}}}} so s tem IP-naslovom v zadnjih $2 ustvarili že $1 {{PLURAL:$1|uporabniški račun|uporabniška računa|uporabniške račune|uporabniških računov}} in s tem dosegli največje dopustno število v omenjenem časovnem obdobju. Novih računov zato s tem IP-naslovom trenutno žal ne morete več ustvariti.",
        "emailauthenticated": "Vaš e-poštni naslov je bil potrjen dne $2 ob $3.",
        "emailnotauthenticated": "Vaš e-poštni naslov še ni potrjen.\nZa navedene možnosti e-pošte ne bomo pošiljali.",
        "noemailprefs": "E-poštnega naslova niste vnesli, zato naslednje možnosti ne bodo delovale.",
        "botpasswords-label-resetpassword": "Ponastavi geslo",
        "botpasswords-label-grants": "Veljavne pravice:",
        "botpasswords-help-grants": "Vsaka pravica dodeli dostop do navedenih uporabniških pravic, ki jih uporabniški račun že ima. Za več informacij si oglejte [[Special:ListGrants|tabelo pravic]].",
-       "botpasswords-label-restrictions": "Omejitve uporabe:",
        "botpasswords-label-grants-column": "Odobreno",
        "botpasswords-bad-appid": "Ime bota »$1« ni veljavno.",
        "botpasswords-insert-failed": "Dodajanje imena bota »$1« ni uspelo. Ste ga že dodali?",
        "botpasswords-updated-body": "Posodobili smo geslo bota »$1« uporabnika »$2«.",
        "botpasswords-deleted-title": "Izbrisali smo geslo bota",
        "botpasswords-deleted-body": "Izbrisali smo geslo bota »$1« uporabnika »$2«.",
-       "botpasswords-newpassword": "Novo geslo za prijavo z imenom <strong>$1</strong> je <strong>$2</strong>. <em>Prosimo, zabeležite si to za uporabo v prihodnje.</em>",
+       "botpasswords-newpassword": "Novo geslo za prijavo z imenom <strong>$1</strong> je <strong>$2</strong>. <em>Prosimo, zabeležite si to za uporabo v prihodnje.</em> <br> (Za starejše bote, pri katerih mora biti prijavno ime enako uporabniškemu imenu, lahko uporabite <strong>$3</strong> kot uporabniško ime in <strong>$4</strong> kot geslo.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider ni na voljo.",
        "botpasswords-restriction-failed": "Omejitve gesla bota preprečujejo to prijavo.",
        "botpasswords-invalid-name": "Navedeno uporabniško ime ne vsebuje ločila za geslo bota (»$1«).",
        "passwordreset-emailelement": "Uporabniško ime: \n$1\n\nZačasno geslo: \n$2",
        "passwordreset-emailsentemail": "Če je e-poštni naslov povezan z vašim računom, vam bomo poslali e-pošto za postavitev gesla.",
        "passwordreset-emailsentusername": "Če obstaja e-poštni naslov, povezan s tem uporabniškim imenom, vam bomo poslali e-pošto za postavitev gesla.",
-       "passwordreset-emailsent-capture2": "Poslali smo {{PLURAL:$1|e-pošto|e-pošti|e-pošte}} za ponastavitev gesla. {{PLURAL:$1|Uporabniško ime in geslo sta navedena spodaj.|Seznam uporabniških imen in gesel je naveden spodaj.}}",
-       "passwordreset-emailerror-capture2": "Pošiljanje e-pošte {{GENDER:$2|uporabniku|uporabnici}} je spodletelo: $1 {{PLURAL:$3|Uporabniško ime in geslo sta navedena spodaj.|Seznam uporabniških imen in gesel je naveden spodaj.}}",
+       "passwordreset-emailsent-capture2": "Poslali smo {{PLURAL:$1|e-pošto|e-pošti|e-pošte}} za ponastavitev gesla. {{PLURAL:$1|Uporabniško ime in geslo sta navedena tukaj.|Seznam uporabniških imen in gesel je naveden tukaj.}}",
+       "passwordreset-emailerror-capture2": "Pošiljanje e-pošte {{GENDER:$2|uporabniku|uporabnici}} je spodletelo: $1 {{PLURAL:$3|Uporabniško ime in geslo sta navedena tukaj.|Seznam uporabniških imen in gesel je naveden tukaj.}}",
        "passwordreset-nocaller": "Podati morate klicatelja",
        "passwordreset-nosuchcaller": "Klicatelj ne obstaja: $1",
        "passwordreset-ignored": "Ponastavitve gesla nismo izvedli. Morda ni nastavljen noben ponudnik?",
        "invalid-content-data": "Neveljavni podatki vsebine",
        "content-not-allowed-here": "Vsebina »$1« ni dovoljena na strani [[$2]]",
        "editwarning-warning": "Če zapustite stran, boste morda izgubili vse spremembe, ki ste jih naredili.\nČe ste prijavljeni, lahko to opozorilo onemogočite v razdelku »{{int:prefs-editing}}« v svojih nastavitvah.",
+       "editpage-invalidcontentmodel-title": "Model vsebine ni podprt",
+       "editpage-invalidcontentmodel-text": "Model vsebine »$1« ni podprt.",
        "editpage-notsupportedcontentformat-title": "Oblika vsebine ni podprta",
        "editpage-notsupportedcontentformat-text": "Model vsebine $2 ne podpira oblike vsebine $1.",
        "content-model-wikitext": "wikibesedilo",
        "searchprofile-advanced-tooltip": "Iskanje v imenskih prostorih po meri",
        "search-result-size": "$1 ({{PLURAL:$2|1 beseda|2 besedi|$2 besede|$2 besed|$2 besed}})",
        "search-result-category-size": "$1 {{PLURAL:$1|član|člana|člani|članov}} ($1 {{PLURAL:$2|podkategorija|podkategoriji|podkategorije|podkategorij}}, $1 {{PLURAL:$3|datoteka|datoteki|datoteke|datotek}})",
-       "search-redirect": "(preusmeritev $1)",
+       "search-redirect": "(preusmeritev s strani $1)",
        "search-section": "(razdelek $1)",
        "search-category": "(kategorija $1)",
        "search-file-match": "(ujema se z vsebino datoteke)",
        "grant-basic": "Osnovne pravice",
        "grant-viewdeleted": "Ogled izbrisanih datotek in strani",
        "grant-viewmywatchlist": "Ogled svojega spiska nadzorov",
+       "grant-viewrestrictedlogs": "Ogled omejenih dnevniških vnosov",
        "newuserlogpage": "Dnevnik registracij uporabnikov",
        "newuserlogpagetext": "Prikazan je dnevnik nedavnih registracij novih uporabnikov.",
        "rightslog": "Dnevnik uporabniških pravic",
        "upload-dialog-disabled": "Nalaganj datotek z uporabo tega obrazca je na wikiju onemogočeno.",
        "upload-dialog-title": "Naloži datoteko",
        "upload-dialog-button-cancel": "Prekliči",
+       "upload-dialog-button-back": "Nazaj",
        "upload-dialog-button-done": "Končano",
        "upload-dialog-button-save": "Shrani",
        "upload-dialog-button-upload": "Naloži",
        "apisandbox-results-fixtoken-fail": "Pridobivanje žetona »$1« je spodletelo.",
        "apisandbox-alert-page": "Polja na strani niso veljavna.",
        "apisandbox-alert-field": "Vrednost polja ni veljavna.",
+       "apisandbox-continue": "Nadaljuj",
+       "apisandbox-continue-clear": "Počisti",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} bo [https://www.mediawiki.org/wiki/API:Query#Continuing_queries nadaljevalo] zadnjo zahtevo; {{int:apisandbox-continue-clear}} bo počistilo parametre, povezane z nadaljevanjem.",
        "booksources": "Viri knjig",
        "booksources-search-legend": "Išči knjižne vire",
        "booksources-search": "Išči",
        "movelogpagetext": "Prikazujem seznam prestavljenih strani.",
        "movesubpage": "{{PLURAL:$1|Podstran|Podstrani}}",
        "movesubpagetext": "Ta stran ima $1 {{PLURAL:$1|podstran prikazano|podstrani prikazane}} spodaj.",
+       "movesubpagetalktext": "Pripadajoča stran ima $1 {{PLURAL:$1|podstran, prikazano|podstrani, prikazani|podstrani, prikazane|podstrani, prikazanih}} spodaj.",
        "movenosubpage": "Ta stran nima podstrani.",
        "movereason": "Razlog:",
        "revertmove": "vrni",
        "pageinfo-category-pages": "Število strani",
        "pageinfo-category-subcats": "Število podkategorij",
        "pageinfo-category-files": "Število datotek",
+       "pageinfo-user-id": "ID uporabnika",
        "markaspatrolleddiff": "Označite kot nadzorovano",
        "markaspatrolledtext": "Označite stran kot nadzorovano",
        "markaspatrolledtext-file": "Označite različico datoteke kot nadzorovano",
        "newimages-showbots": "Prikaži nalaganja botov",
        "newimages-hidepatrolled": "Skrij nadzorovana nalaganja",
        "noimages": "Nič ni videti.",
+       "gallery-slideshow-toggle": "Preklopi sličice",
        "ilsubmit": "Išči",
        "bydate": "po datumu",
        "sp-newimages-showfrom": "Prikaži datoteke, naložene od $2, $1 naprej",
        "tag-filter": "Filter [[Special:Tags|oznak]]:",
        "tag-filter-submit": "Filtriraj",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Oznaka|Oznaki|Oznake}}]]: $2)",
+       "tag-mw-contentmodelchange": "sprememba modela vsebine",
+       "tag-mw-contentmodelchange-description": "Urejanja, ki [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel spremenijo model vsebine] strani",
        "tags-title": "Etikete",
        "tags-intro": "Ta stran navaja etikete, s katerimi lahko programje označi urejanja, in njihov pomen.",
        "tags-tag": "Ime oznake",
        "tags-actions-header": "Dejanja",
        "tags-active-yes": "Da",
        "tags-active-no": "Ne",
-       "tags-source-extension": "Opredeljuje jo razširitev",
+       "tags-source-extension": "Opredeljuje jo programje",
        "tags-source-manual": "Ročno jo uporabljajo uporabniki in boti",
        "tags-source-none": "Se ne uporablja več",
        "tags-edit": "uredi",
        "htmlform-cloner-create": "Dodaj več",
        "htmlform-cloner-delete": "Odstrani",
        "htmlform-cloner-required": "Zahtevana je vsaj ena vrednost.",
+       "htmlform-date-placeholder": "LLLL-MM-DD",
+       "htmlform-time-placeholder": "UU:MM:SS",
+       "htmlform-datetime-placeholder": "LLLL-MM-DD UU:MM:SS",
+       "htmlform-date-invalid": "Navedena vrednost ni prepoznan datum. Poskusite uporabiti obliko LLLL-MM-DD.",
+       "htmlform-time-invalid": "Navedena vrednost ni prepoznan čas. Poskusite uporabiti obliko UU:MM:SS.",
+       "htmlform-datetime-invalid": "Navedena vrednost ni prepoznan datum in čas. Poskusite uporabiti obliko LLLL-MM-DD UU:MM:SS.",
+       "htmlform-date-toolow": "Navedena vrednost je časovno pred najzgodnejšim dovoljenim datumom $1.",
+       "htmlform-date-toohigh": "Navedena vrednost je časovno po najpoznejšim dovoljenim datumom $1.",
+       "htmlform-time-toolow": "Navedena vrednost je časovno pred najzgodnejšim dovoljenim časom $1.",
+       "htmlform-time-toohigh": "Navedena vrednost je časovno po najpoznejšim dovoljenim časom $1.",
+       "htmlform-datetime-toolow": "Navedena vrednost je časovno pred najzgodnejšim dovoljenim datumom in časom $1.",
+       "htmlform-datetime-toohigh": "Navedena vrednost je časovno po najpoznejšim dovoljenim datumom in časom $1.",
        "htmlform-title-badnamespace": "[[:$1]] ni v imenskem prostoru »{{ns:$2}}«.",
        "htmlform-title-not-creatable": "»$1« je naslov strani, ki ga ni mogoče ustvariti",
        "htmlform-title-not-exists": "$1 ne obstaja.",
        "htmlform-user-not-exists": "<strong>$1</strong> ne obstaja.",
        "htmlform-user-not-valid": "<strong>$1</strong> ni veljavno uporabniško ime.",
-       "sqlite-has-fts": "$1 s podporo iskanju polnih besedil",
-       "sqlite-no-fts": "$1 brez podpore iskanju polnih besedil",
        "logentry-delete-delete": "$1 je {{GENDER:$2|izbrisal|izbrisala|izbrisal(-a)}} stran $3",
        "logentry-delete-restore": "$1 je {{GENDER:$2|obnovil|obnovila|obnovil(-a)}} stran $3",
        "logentry-delete-event": "$1 je {{GENDER:$2|spremenil|spremenila|spremenil(-a)}} vidljivost $5 {{PLURAL:$5|dnevniškega dogodka|dnevniških dogodkov}} na $3: $4",
        "feedback-external-bug-report-button": "Vloži tehnično opravilo",
        "feedback-dialog-title": "Pošljite povratne informacije",
        "feedback-dialog-intro": "Spodnji enostavni obrazec lahko uporabite za pošiljanje povratnih informacij. Vašo pripombo bomo dodali na stran »$1« skupaj z vašim uporabniškim imenom.",
-       "feedback-error-title": "Napaka",
        "feedback-error1": "Napaka: Neznan rezultat iz API",
        "feedback-error2": "Napaka: Urejanje je spodletelo",
        "feedback-error3": "Napaka: Ni odgovora od API",
        "feedback-thanks": "Havala! Vaše povratne informacije smo objavili na strani »[$2 $1]«.",
        "feedback-thanks-title": "Hvala!",
        "feedback-useragent": "Uporabniški agent:",
-       "searchsuggest-search": "Iskanje",
+       "searchsuggest-search": "Iskanje po {{GRAMMAR:dajalnik|{{SITENAME}}}}",
        "searchsuggest-containing": "vsebujoč ...",
        "api-error-autoblocked": "Vaš IP-naslov smo samodejno blokirali, saj ga je uporabljal blokiran uporabnik.",
        "api-error-badaccess-groups": "Nalaganje datotek na ta wiki vam ni dovoljeno.",
        "unlinkaccounts-success": "Račun smo razvezali.",
        "authenticationdatachange-ignored": "Sprememba overitvenih podatkov ni bila obdelana. Morda ni bil konfiguriran noben ponudnik?",
        "userjsispublic": "Pomnite: Podstrani JavaScript naj ne vsebujejo zaupnih podatkov, saj so vidne tudi drugim uporabnikom.",
-       "usercssispublic": "Pomnite: Podstrani CSS naj ne vsebujejo zaupnih podatkov, saj so vidne tudi drugim uporabnikom."
+       "usercssispublic": "Pomnite: Podstrani CSS naj ne vsebujejo zaupnih podatkov, saj so vidne tudi drugim uporabnikom.",
+       "restrictionsfield-badip": "Neveljaven IP-naslov ali obseg: $1",
+       "restrictionsfield-label": "Dovoljeni IP-obsegi:",
+       "restrictionsfield-help": "En IP-naslov ali CIDR-območje na vrstico. Da omogočite vse, uporabite<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Napaka: $1",
+       "edit-error-long": "Napake:\n\n$1"
 }
index fce5916..6df0bf4 100644 (file)
        "nstab-special": "Bogga khaaska ah",
        "nstab-project": "Bogga mashruuca",
        "nstab-image": "Gal",
-       "nstab-mediawiki": "Fariin",
+       "nstab-mediawiki": "Farriin",
        "nstab-template": "Tusmo",
        "nstab-help": "Bogga caawinaada",
        "nstab-category": "Qeybta",
        "yourpasswordagain": "Markale qor ereysirka:",
        "createacct-yourpasswordagain": "Hubi erey sirta",
        "createacct-yourpasswordagain-ph": "Mar kale gali erey sirta",
-       "remembermypassword": "Kumbuyuutarkaan ku xasuusnaaw magaceyga gudagalka (ilaa  $1 {{PLURAL:$1|maalin|maalmood}})",
        "userlogin-remembermypassword": "Ka dhig mid diyaar ah mar waliba",
        "userlogin-signwithsecure": "Adeegso khad la hubo",
        "yourdomainname": "Magacaga shabakada",
        "eauthentsent": "Xaqiijin e-mail ah ayaa loo  diray e-mailkan aad dooratay.\nIntii aadan wax e-mail ah lagu soo dirin koontada, waa in aad daba kacdaa waxa kuugu jiro e-mailka, si aad u xaqiijisid  in aad adiga  leedahay akoon'ka.",
        "mailerror": "Qalad dirida e-mailka: $1",
        "acct_creation_throttle_hit": "Dadka soo booqanaayo wiki:gaan oo isticmaalaayo cinwaankaaga IP:ka waxay sameeyeen {{PLURAL:$1|1 magac gudagale ah|$1 magac  gudagalayaal ah}} maalintii ugu dambeysay, taasina waa inta ugu badan ee la'ogolyahay muddadaas. Sidaas daraadeed, booqoshadayaasha isticmaalaya cinwaankaan-IP:ka hadda ma'sameysankaraan magac gudagale danbe.",
-       "emailauthenticated": "E-mailkaada waxaa lagu xaqiijiyay $2 markey ahayd $3.",
+       "emailauthenticated": "E-mailkaada waxaa la xaqiijiyay $2 saacadduna ahayd $3.",
        "emailnotauthenticated": "Ciwaankaada e-mailka weli lama xaqiijinin.\nWax e-mail ah oo ku saabsan arrimaha soo socdo looma soo diridoono.",
        "emailconfirmlink": "Soo xaqiiji ciwaankaada e-mailka",
        "invalidemailaddress": "e-mailkaan lama ogolaan karo ayada oo ku ku jirto format la aqoonsan..\nFadlan ku qor ciwaan leh format sax ah ama ebar ka dhig  meesha.",
        "moveddeleted-notice": "Boggaan waa la tirtiray.\nTirtiraha iyo wareejinta gudagalaha boggaan waxaad ka arki kartaa hoostaan.",
        "edit-conflict": "Wax bedel isku dhacay",
        "edit-already-exists": "Bog cusub lama samayn karo, wuu jiraa bogaan.",
+       "duplicate-args-warning": "<strong>Digniin:</strong> [[:$1]] u yeeris [[:$2]] in ka badan hal qiimayn ee ku saabsan \"$3\" cabbiraad. Kaliya qiimihii ugu dambaysay baa la adeegsan doonaa.",
        "post-expand-template-inclusion-warning": "'''Digniin:''' Aad oo u weyn yahay tusmo'da aad ku dartay.\nTusmooyinka qaar lagumo dari doono.",
        "post-expand-template-inclusion-category": "Boggaga ku xad gudbay weyninka tusmo'da",
        "post-expand-template-argument-warning": "'''Digniin:'''Boggaan waxaa ku jira ugu yaraan hal iyo wixii ka badan oo template ah, waxaana ku xiran kuwa kale.",
        "stub-threshold-sample-link": "tusaale",
        "stub-threshold-disabled": "Howlgab",
        "recentchangesdays": "Tirada maalmaha lagu tusaayo isbedelada dhow:",
+       "recentchangescount": "Tirada isbedellada guud ahaan muuqda:",
        "savedprefs": "Dooqyadaada waa la keydiyey.",
        "timezonelegend": "Soonaha waqtiga:",
        "localtime": "Waqtigaaga",
        "yournick": "Saxiix cusub:",
        "prefs-help-signature": "Waan in la saxiixaa wadahdalada ku dhaca bogga wadhadalka adigoo adeegsaanaya \"<nowiki>~~~~</nowiki>\", kaasoo u rogi doona saxiixa iyo waqtiga.",
        "badsiglength": "Naaneysta aad bey u dheertahay.\nWaa in aysan ka badanin $1 {{PLURAL:$1|eray|erayo}}.",
-       "yourgender": "Jinsi:",
-       "gender-unknown": "Aana la qeexin",
-       "gender-male": "Lab",
-       "gender-female": "Dhedig",
+       "yourgender": "Qaabkee baad doonayssaa in laguu qeeqo?",
+       "gender-unknown": "Haddii lagu soo hadal qaado, barnaamijka waxa uu adeegsan doonaa ereyo nooc dhexdhexaad ah goor weliba ay suuragal tahay",
+       "gender-male": "Wuxuu wax ka bedelaa bogagga wikiga",
+       "gender-female": "Waxa ay wax ka bedeshaa bogagga wikipedia",
        "prefs-help-gender": "Ahaysiinta xulashaan waa mid dooqasha ah.\nBarnaamijkaan adeegsigiisa waxay qiima u yeelaysaa wadahadalkaada iyo kuwa kale iyadoo bedelaysa habka qofka sida lab ama dheddig.\nMacluumadkaan waa mid la wada arkayo.",
        "email": "E-mail",
-       "prefs-help-realname": "Optional: if you choose to provide it this will be used for giving you attribution for your work.",
+       "prefs-help-realname": "Magaca runta ah waa dooqasho.\nHaddii aad doorato in aan keento, waxaa loo adeegsan karaa mid tilmaama howshaada.",
        "prefs-help-email": "E-mail waa wax aad xor u leedahay. laakiin waa loo baahanyahay hadii aad eraysirka badaleesid, hadii aad ilaawdo eraygaaga sirta ah",
        "prefs-help-email-others": "Waxaa kale oo aad u isticmaali kartaa in ee dadka kale kugula soo xiriiraan e-mail ayaga oo isticmaalaayo linki isticmaalahaada ama bogga wadahadalka.\nE-mailkaada mala sheegaayo markii ee dadka kale kula soo xiriirayaan.",
        "prefs-help-email-required": "Waxaa loo baahanyahay e-mail.",
        "prefs-info": "Macluumaadka asaasiga ah",
        "prefs-i18n": "Caalamiyeen",
        "prefs-signature": "Saxiixa",
+       "prefs-advancedediting": "Xulasho guud",
        "prefs-advancedrc": "Xulasho horumarin ah",
+       "prefs-displayrc": "Dooga bandhigista",
        "prefs-diffs": "Farqiga",
        "prefs-help-prefershttps": "Waxaa lahagaajin doonaan dooqaan marka xiga ee aad soo gasho",
        "saveusergroups": "Kaydi kooxaha isticmaalayaasha",
index c82f7ff..2697621 100644 (file)
@@ -49,6 +49,7 @@
        "tog-watchdefault": "Shto faqet dhe skedat e redaktuara prej meje tek lista e faqeve nën mbikqyrje",
        "tog-watchmoves": "Shto faqet dhe skedat e zhvendosura prej meje tek lista e faqeve nën mbikqyrje",
        "tog-watchdeletion": "Shto faqet dhe skedat e grisura prej meje tek lista e faqeve  nën mbikqyrje",
+       "tog-watchuploads": "Shtoni fotografitë e rreja që ngarkoj në listën mbikëqyrëse",
        "tog-watchrollback": "Shto faqet ku unë kam kryer një rikthim tek lista ime mbikqyrëse",
        "tog-minordefault": "Shëno të gjitha redaktimet si të vogla automatikisht",
        "tog-previewontop": "Trego se si do të duket faqja mbi kutinë redaktimit",
@@ -58,7 +59,7 @@
        "tog-enotifminoredits": "Më njofto me email edhe kur ka redaktime të vogla të faqeve dhe skedave",
        "tog-enotifrevealaddr": "Trego adresën time të emailit në emailet njoftuese",
        "tog-shownumberswatching": "Trego numrin e përdoruesve që vëzhgojnë këtë faqe",
-       "tog-oldsig": "Nënshkrimi ekzistues:",
+       "tog-oldsig": "Nënshkrimi juaj ekzistues:",
        "tog-fancysig": "Mbaje nënshkrimin si wikitekst (pa lidhje automatike)",
        "tog-uselivepreview": "Trego parapamjen drejtpërdrejt",
        "tog-forceeditsummary": "Më njofto kur përmbledhjen e redaktimit e lë bosh",
@@ -66,6 +67,7 @@
        "tog-watchlisthidebots": "Fshih redaktimet e robotëve nga lista e faqeve të vëzhguara",
        "tog-watchlisthideminor": "Fshih redaktimet e vogla nga lista e faqeve të vëzhguara",
        "tog-watchlisthideliu": "Fshih redaktimet e përdoruesve nga lista e faqeve të vëzhguara",
+       "tog-watchlistreloadautomatically": "Rifreskoni listën mbikëqyrëse automatikisht sa herë një filtër ndryshohet (JavaScript e domosdoshme)",
        "tog-watchlisthideanons": "Fshih redaktimet përdoruesve anonim nga lista e faqeve të vëzhguara",
        "tog-watchlisthidepatrolled": "Fshih redaktimet e vrojtuara nga lista e faqeve të vëzhguara",
        "tog-watchlisthidecategorization": "Fshih kategorizimin e faqeve",
        "newwindow": "(hapet në një dritare të re)",
        "cancel": "Anulo",
        "moredotdotdot": "Më shumë...",
-       "morenotlisted": "Kjo listë nuk është e plotë.",
+       "morenotlisted": "Kjo listë mund të mos jetë e plotë.",
        "mypage": "Faqja",
        "mytalk": "Diskuto",
        "anontalk": "Diskutimi",
        "yourpasswordagain": "Fusni fjalëkalimin përsëri",
        "createacct-yourpasswordagain": "Konfirmoni fjalëkalimin",
        "createacct-yourpasswordagain-ph": "Shtypni fjalëkalimin përsëri",
-       "remembermypassword": "Mbaj mënd fjalëkalimin tim për tërë vizitat e ardhshme (për një kohë maksimale prej $1 {{PLURAL:$1|dite|ditësh}})",
        "userlogin-remembermypassword": "Më mbaj të kyçur",
        "userlogin-signwithsecure": "Përdor lidhje të sigurtë",
        "yourdomainname": "Faqja juaj",
        "minoredit": "Ky është një redaktim i vogël",
        "watchthis": "Vëzhgoje këtë faqe",
        "savearticle": "Kryej ndryshimet",
+       "savechanges": "Ruaj ndryshimet",
        "publishpage": "Publiko faqen",
        "publishchanges": "Publiko ndryshimet",
        "preview": "Shqyrto",
        "defaultmessagetext": "Teksti i porosisë së parazgjedhur",
        "invalid-content-data": "Të pavlefshme të dhënave e përmbajtjes",
        "editwarning-warning": "Duke e lënë këtë faqe mund të shkaktojë ju për të humbur të gjitha ndryshimet që keni bërë ju.\nNëse ju jeni regjistruar, ju mund të çaktivizoni këtë paralajmërim në \"{{int:prefs-editing}}\" seksionin e preferencave tuaja.",
+       "content-model-wikitext": "wikitekst",
        "content-model-text": "tekst i thejshtë",
        "content-model-javascript": "JavaScript",
        "content-json-empty-object": "Objekt bosh",
        "content-json-empty-array": "Fushë boshe",
+       "deprecated-self-close-category": "Faqet përdorin tag HTML mbyllës jo të sakt",
        "expensive-parserfunction-warning": "Kujdes: Kjo faqe ka shumë kërkesa që kërkojnë analizë gramatikore të kushtueshme për sistemin.\n\nDuhet të ketë më pakë se $2, {{PLURAL:$2|kërkesë|kërkesa}}, kurse tani {{PLURAL:$1|është $1 kërkesë|janë $1 kërkesa}}.",
        "expensive-parserfunction-category": "Faqe me shumë shprehje të kushtueshmë për analizë gramatikore",
        "post-expand-template-inclusion-warning": "'''Kujdes''': Numri i shablloneve që perfshihen është shumë i madh.\nDisa shabllone nuk do të përfshihen.",
        "columns": "Kollona:",
        "searchresultshead": "Kërkimi",
        "stub-threshold": "Kufiri për formatin e <a href=\"#\" class=\"stub\">lidhjeve cung</a> (B):",
+       "stub-threshold-sample-link": "shembull",
        "stub-threshold-disabled": "Çaktivizuar",
        "recentchangesdays": "Numri i ditëve të treguara në ndryshime së fundmi:",
        "recentchangesdays-max": "(maksimum $1 {{PLURAL:$1|dit|ditë}})",
        "right-managechangetags": "Krijoni dhe fshini [[Special:Tags|tags]] nga baza e të dhënave",
        "right-applychangetags": "Aplikoni [[Special:Tags|tags]] së bashku me ndryshimet",
        "right-changetags": "Shtoni dhe të largoni në mënyrë arbitrare [[Special:Tags|tags]] në rishikimet individuale dhe regjistrimet e historikut",
+       "grant-group-email": "Dërgoni email",
+       "grant-group-administration": "Kryej veprime administrative",
+       "grant-group-private-information": "Qasu të dhënave private në lidhje me ju",
+       "grant-group-other": "Veprimtari të ndryshme",
        "grant-blockusers": "Blloko dhe zhblloko përdoruesit",
+       "grant-createaccount": "Krijo llogari",
+       "grant-createeditmovepage": "Krijoni, redaktoni, dhe lëvizni faqet",
+       "grant-editmywatchlist": "Redaktoni listën tuaj mbikqyrëse",
+       "grant-editpage": "Redaktoni faqet ekzistuese",
+       "grant-editprotected": "Redakto faqet e mbrojtura",
        "newuserlogpage": "Regjistri i llogarive",
        "newuserlogpagetext": "Ky është një regjistër i llogarive të fundit që janë hapur",
        "rightslog": "Regjistri i privilegjeve të përdoruesit",
        "recentchanges-label-plusminus": "Madhësia e faqes ndryshoi me këtë numër bajtësh",
        "recentchanges-legend-heading": "<strong>Legjenda:</strong>",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (shiko gjithashtu [[Special:NewPages|listën e faqeve të reja]])",
+       "recentchanges-submit": "Shfaq",
        "rcnotefrom": "Më poshtë {{PLURAL:$5|është shfaqur ndryshimi|janë shfaqur ndryshimet}} që nga <strong>$3, $4</strong> (deri në <strong>$1</strong>).",
        "rclistfrom": "Tregon ndryshime së fundmi duke filluar nga $3 $2",
        "rcshowhideminor": "$1 redaktimet e vogla",
        "rcshowhidemine": "$1 redaktimet e mia",
        "rcshowhidemine-show": "Shfaq",
        "rcshowhidemine-hide": "Fshih",
+       "rcshowhidecategorization-show": "Shfaq",
+       "rcshowhidecategorization-hide": "Fshih",
        "rclinks": "Trego $1 ndryshime gjatë $2 ditëve<br />$3",
        "diff": "ndrysh",
        "hist": "hist",
        "upload-copy-upload-invalid-domain": "Ngarkesat e kopjimit nuk janë në dispozicion nga ky domein.",
        "upload-dialog-title": "Ngarko skedën",
        "upload-dialog-button-cancel": "Anulo",
+       "upload-dialog-button-back": "Prapa",
        "upload-dialog-button-done": "Mbyll",
        "upload-dialog-button-save": "Ruaj",
        "upload-dialog-button-upload": "Ngarko",
+       "upload-form-label-infoform-title": "Detaje",
+       "upload-form-label-infoform-name": "Emri",
+       "upload-form-label-usage-title": "Përdorimi",
+       "upload-form-label-usage-filename": "Emri i skedarit",
+       "upload-form-label-own-work": "Kjo është e puna ime",
+       "upload-form-label-infoform-categories": "Kategoritë",
+       "upload-form-label-infoform-date": "Data",
        "backend-fail-stream": "Nuk mund të kalojë skedën $1.",
        "backend-fail-backup": "Nuk mund të rezervojë skedën $1.",
        "backend-fail-notexists": "Skeda $1 nuk ekziston.",
        "license": "Licencimi:",
        "license-header": "Licencimi:",
        "nolicense": "Asnjë nuk është zgjedhur",
+       "licenses-edit": "Redakto opsionet e licencës",
        "license-nopreview": "(Nuk ka parapamje)",
        "upload_source_url": " (URL e vlefshme, publikisht e përdorshme)",
        "upload_source_file": " (skeda në kompjuterin tuaj)",
        "mostrevisions": "Artikuj më të redaktuar",
        "prefixindex": "Të gjitha faqet me parashtesa",
        "prefixindex-namespace": "Të gjitha faqet me parashtesë (hapësira $1)",
+       "prefixindex-submit": "Shfaq",
        "shortpages": "Artikuj të shkurtër",
        "longpages": "Artikuj të gjatë",
        "deadendpages": "Artikuj pa rrugëdalje",
        "protectedpages": "Faqe të mbrojtura",
        "protectedpages-indef": "Vetëm mbrojtjet pa afat",
        "protectedpages-cascade": "Vetëm mbrojtjet",
+       "protectedpages-noredirect": "Fshih përcjellimet",
        "protectedpagesempty": "Nuk ka faqe të mbrojtura me të dhënat e kërkuara.",
        "protectedpages-page": "Faqja",
        "protectedpages-expiry": "Skadon",
        "protectedpages-reason": "Arsyeja",
+       "protectedpages-submit": "Shfaq faqet",
+       "protectedpages-unknown-timestamp": "E panjohur",
+       "protectedpages-unknown-performer": "Përdorues i panjohur",
        "protectedtitles": "Titujt e mbrojtur",
+       "protectedtitles-summary": "Kjo faqe liston titujt që aktualisht janë të mbrojtura nga krijimi. Për një listë të faqeve ekzistuese që janë të mbrojtura, shih [[{{#special:ProtectedPages}}|{{int:protectedpages}}]].",
        "protectedtitlesempty": "Asnjë titull i mbrojtur nuk u gjet në këtë hapësirë.",
+       "protectedtitles-submit": "Shfaq titujt",
        "listusers": "Lista e përdoruesve",
        "listusers-editsonly": "Trego vetëm përdoruesit me redaktime",
        "listusers-creationsort": "Radhiti sipas datës së krijimit",
        "usereditcount": "$1 {{PLURAL:$1|redaktim|redaktime}}",
        "usercreated": "{{GENDER:$3|Krijuar}} më $1 në $2",
        "newpages": "Artikuj të rinj",
+       "newpages-submit": "Shfaq",
        "newpages-username": "Përdoruesi:",
        "ancientpages": "Artikuj më të vjetër",
        "move": "Zhvendose",
        "pager-older-n": "{{PLURAL:$1|1 më i vjetër|$1 më të vjetra}}",
        "suppress": "Shtypur",
        "querypage-disabled": "Kjo faqe speciale është çaktivizuar për arsye të performancës.",
+       "apihelp": "API ndihmë",
        "apihelp-no-such-module": "Moduli \"$1\" nuk u gjet.",
+       "apisandbox": "API livadhi",
+       "apisandbox-jsonly": "JavaScript është e domosdoshme që të përdorni API livadhi.",
+       "apisandbox-api-disabled": "API nuk është në dispozicion për këtë faqe.",
+       "apisandbox-unfullscreen": "Shfaq faqen",
+       "apisandbox-submit": "Bëj kërkesë",
+       "apisandbox-reset": "Pastro",
+       "apisandbox-retry": "Riprovo",
+       "apisandbox-examples": "Shembuj",
+       "apisandbox-dynamic-parameters": "Parametra shtesë",
+       "apisandbox-dynamic-parameters-add-label": "Shto parametër:",
+       "apisandbox-dynamic-parameters-add-placeholder": "Emri i parametrit",
+       "apisandbox-results": "Rezultatet",
        "booksources": "Burime librash",
        "booksources-search-legend": "Kërkim burimor librash",
        "booksources-search": "Kërko",
        "htmlform-submit": "Dërgo",
        "htmlform-reset": "Zhbëj ndryshimin",
        "htmlform-selectorother-other": "Gjitha",
-       "sqlite-has-fts": "$1 me mbështetje të kërkimit me teskt të plotë",
-       "sqlite-no-fts": "$1 pa mbështetje të kërkimit me teskt të plotë",
        "logentry-delete-delete": "$1 {{GENDER:$2|grisi}} faqen $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|riktheu}} faqen $3",
        "logentry-delete-event": "$1 {{GENDER:$2|ndryshoi}} dukshmërinë e {{PLURAL:$5|e një ngjarjeje regjistri|$5 ngjarjeve regjistri}} në $3: $4",
index b04c775..f9c7738 100644 (file)
        "qbfind": "Пронађи",
        "qbbrowse": "Потражи",
        "qbedit": "Уреди",
-       "qbpageoptions": "Ð\9fоÑ\81Ñ\82авке Ñ\81Ñ\82Ñ\80аниÑ\86е",
+       "qbpageoptions": "Ð\9eва Ñ\81Ñ\82Ñ\80аниÑ\86а",
        "qbmyoptions": "Моје странице",
        "faq": "НПП",
        "faqpage": "Project:НПП",
        "history": "Историја странице",
        "history_short": "Историја",
        "updatedmarker": "ажурирано од моје последње посете",
-       "printableversion": "Ð\97а штампање",
+       "printableversion": "Ð\92еÑ\80зиÑ\98а Ð·а штампање",
        "permalink": "Трајна веза",
        "print": "Штампај",
        "view": "Погледај",
        "talk": "Разговор",
        "views": "Прегледи",
        "toolbox": "Алатке",
+       "tool-link-userrights": "Уреди {{GENDER:$1|корисничке}} групе",
+       "tool-link-emailuser": "Пошаљи {{GENDER:$1|имејл}}",
        "userpage": "Погледај корисничку страницу",
        "projectpage": "Погледај страницу пројекта",
        "imagepage": "Погледај страницу датотеке",
        "translateinterface": "Да додате или промените преводе за све викије, посетите [https://translatewiki.net/ Транслејтвики], пројекат за локализацију Медијавикија.",
        "cascadeprotected": "Ова страница је закључана јер садржи {{PLURAL:$1|следећу страницу која је заштићена|следеће странице које су заштићене}} „преносивом“ заштитом:\n$2",
        "namespaceprotected": "Немате дозволу да уређујете странице у именском простору <strong>$1</strong>.",
-       "customcssprotected": "Ð\9dемаÑ\82е Ð´Ð¾Ð·Ð²Ð¾Ð»Ñ\83 Ð´Ð° Ð¼ÐµÑ\9aаÑ\82е Ð¾Ð²Ñ\83 CSS Ñ\81Ñ\82Ñ\80аниÑ\86Ñ\83 Ñ\98еÑ\80 Ñ\81адÑ\80жи Ð»Ð¸Ñ\87не Ð¿Ð¾Ñ\81Ñ\82авке другог корисника.",
+       "customcssprotected": "Ð\9dемаÑ\82е Ð´Ð¾Ð·Ð²Ð¾Ð»Ñ\83 Ð´Ð° Ð¼ÐµÑ\9aаÑ\82е Ð¾Ð²Ñ\83 CSS Ñ\81Ñ\82Ñ\80аниÑ\86Ñ\83 Ñ\98еÑ\80 Ñ\81адÑ\80жи Ð»Ð¸Ñ\87на Ð¿Ð¾Ð´ÐµÑ\88аваÑ\9aа другог корисника.",
        "customjsprotected": "Немате дозволу да мењате ову страницу јаваскрипта јер садржи личне поставке другог корисника.",
        "mycustomcssprotected": "Немате дозволу за мењање ове CSS странице.",
        "mycustomjsprotected": "Немате дозволу за мењање ове JavaScript странице.",
        "userlogin": "Пријава/регистрација",
        "userloginnocreate": "Пријава",
        "logout": "Одјава",
-       "userlogout": "Ð\9eдÑ\98ави Ð¼Ðµ",
+       "userlogout": "Ð\9eдÑ\98ава",
        "notloggedin": "Нисте пријављени",
        "userlogin-noaccount": "Немате налог?",
        "userlogin-joinproject": "Отворите га",
        "noemailcreate": "Морате навести исправну имејл адресу.",
        "passwordsent": "Нова лозинка је послата на имејл адресу {{GENDER:$1|корисника|кориснице|корисника}} $1.\nПријавите се пошто је примите.",
        "blocked-mailpassword": "Ваша IP адреса има забрану уређивања. Ради спречавања злоупотребе, није дозвољено враћање лозинке са ње.",
-       "eauthentsent": "Ð\9dа Ð½Ð°Ð²ÐµÐ´ÐµÐ½Ñ\83 Ð¸Ð¼ÐµÑ\98л Ð°Ð´Ñ\80еÑ\81Ñ\83 Ñ\98е Ð¿Ð¾Ñ\81лаÑ\82 Ð¿Ð¾Ñ\82вÑ\80дни ÐºÐ¾Ð´.\nÐ\9fÑ\80е Ð½ÐµÐ³Ð¾ Ñ\88Ñ\82о Ð¿Ð¾Ñ\88аÑ\99емо Ð´Ð°Ñ\99Ñ\9aе Ð¿Ð¾Ñ\80Ñ\83ке, Ð¿Ñ\80аÑ\82иÑ\82е Ñ\83пÑ\83Ñ\82Ñ\81Ñ\82ва Ñ\81 Ð¸Ð¼ÐµÑ\98ла Ð´Ð° Ð±Ð¸Ñ\81Ñ\82е Ð¿Ð¾Ñ\82вÑ\80дили Ð´Ð° Ñ\81Ñ\82е Ð²и отворили налог.",
+       "eauthentsent": "Ð\9dа Ð½Ð°Ð²ÐµÐ´ÐµÐ½Ñ\83 Ð¸Ð¼ÐµÑ\98л Ð°Ð´Ñ\80еÑ\81Ñ\83 Ñ\98е Ð¿Ð¾Ñ\81лаÑ\82 Ð¿Ð¾Ñ\82вÑ\80дни ÐºÐ¾Ð´.\nÐ\9fÑ\80е Ð½ÐµÐ³Ð¾ Ñ\88Ñ\82о Ð¿Ð¾Ñ\88аÑ\99емо Ð´Ð°Ñ\99Ñ\9aе Ð¿Ð¾Ñ\80Ñ\83ке, Ð¿Ñ\80аÑ\82иÑ\82е Ñ\83пÑ\83Ñ\82Ñ\81Ñ\82ва Ñ\81 Ð¸Ð¼ÐµÑ\98ла Ð´Ð° Ð±Ð¸Ñ\81Ñ\82е Ð¿Ð¾Ñ\82вÑ\80дили Ð´Ð° Ñ\81Ñ\82е Ð\92и отворили налог.",
        "throttled-mailpassword": "Порука за промену лозинке је послата у {{PLURAL:$1|1=последњих сат времена|последња $1 сата|последњих $1 сати}}.\nДа бисмо спречили злоупотребу, подсетник шаљемо само једном у року од {{PLURAL:$1|1=сат времена|$1 сата|$1 сати}}.",
        "mailerror": "Грешка при слању поруке: $1",
-       "acct_creation_throttle_hit": "Посетиоци овог викија који користе вашу ИП адресу су већ отворили {{PLURAL:$1|1=један налог|$1 налога|$1 налога}} претходни дан, што је највећи дозвољени број у том временском периоду.\nЗбог тога посетиоци с ове ИП адресе тренутно не могу отворити више налога.",
+       "acct_creation_throttle_hit": "Посетиоци овог викија који користе вашу ИП адресу су већ отворили {{PLURAL:$1|1=један налог|$1 налога}} претходни $2, што је највећи дозвољени број у том временском периоду.\nЗбог тога посетиоци с ове ИП адресе тренутно не могу отворити више налога.",
        "emailauthenticated": "Ваша имејл адреса је потврђена $2 у $3.",
-       "emailnotauthenticated": "Ð\92аÑ\88а Ð¸Ð¼ÐµÑ\98л Ð°Ð´Ñ\80еÑ\81а Ñ\98оÑ\88 Ð½Ð¸Ñ\98е Ð¿Ð¾Ñ\82вÑ\80Ñ\92ена.\nÐ\9fоÑ\80Ñ\83ке Ð½ÐµÑ\9bе Ð±Ð¸Ñ\82и Ð¿Ð¾Ñ\81лаÑ\82е ни у једном од следећих случајева.",
+       "emailnotauthenticated": "Ð\92аÑ\88а Ð¸Ð¼ÐµÑ\98л Ð°Ð´Ñ\80еÑ\81а Ñ\98оÑ\88 Ð½Ð¸Ñ\98е Ð¿Ð¾Ñ\82вÑ\80Ñ\92ена.\nÐ\98меÑ\98л Ð½ÐµÑ\9bе Ð±Ð¸Ñ\82и Ð¿Ð¾Ñ\81лаÑ\82 ни у једном од следећих случајева.",
        "noemailprefs": "Унесите имејл адресу како би ове могућности радиле.",
        "emailconfirmlink": "Потврдите своју имејл адресу",
        "invalidemailaddress": "Имејл адреса не може бити прихваћена јер је неисправног облика.\nУнесите исправну адресу или оставите празно поље.",
        "pt-createaccount": "Отвори налог",
        "pt-userlogout": "Одјави ме",
        "php-mail-error-unknown": "Непозната грешка у функцији PHP mail().",
-       "user-mail-no-addy": "Ð\9fокÑ\83Ñ\88али Ñ\81Ñ\82е Ð´Ð° Ð¿Ð¾Ñ\88аÑ\99еÑ\82е Ð¿Ð¾Ñ\80Ñ\83кÑ\83 без имејл адресе.",
+       "user-mail-no-addy": "Ð\9fокÑ\83Ñ\88али Ñ\81Ñ\82е Ð´Ð° Ð¿Ð¾Ñ\88аÑ\99еÑ\82е Ð¸Ð¼ÐµÑ\98л без имејл адресе.",
        "user-mail-no-body": "Покушано слање имејла с празним или неразумно кратким садржајем.",
        "changepassword": "Промени лозинку",
        "resetpass_announce": "Да бисте завршили пријаву, подесите нову лозинку овде.",
        "resetpass_submit": "Постави лозинку и пријави ме",
        "changepassword-success": "Ваша лозинка је успешно промењена!",
        "changepassword-throttled": "Превише пута сте покушали да се пријавите.\nМолимо вас да сачекате $1 пре него што покушате поново.",
+       "botpasswords": "Лозинке ботова",
+       "botpasswords-label-appid": "Име бота:",
+       "botpasswords-label-create": "Направи",
+       "botpasswords-label-update": "Ажурирај",
        "botpasswords-label-cancel": "Откажи",
        "botpasswords-label-delete": "Обриши",
+       "botpasswords-label-grants-column": "Одобрено",
        "resetpass_forbidden": "Лозинка не може бити промењена",
        "resetpass-no-info": "Морате бити пријављени да бисте приступили овој страници.",
        "resetpass-submit-loggedin": "Промени лозинку",
        "resetpass-submit-cancel": "Откажи",
        "resetpass-wrong-oldpass": "Неисправна привремена или текућа лозинка.\nМожда сте већ променили лозинку или сте затражили нову привремену лозинку.",
        "resetpass-recycled": "Унели сте садашњу лозинку, да бисте ресетовали лозинку морате унети нову.",
-       "resetpass-temp-emailed": "Ð\9fÑ\80иÑ\98авили Ñ\81Ñ\82е Ñ\81е Ñ\81а Ð¿Ñ\80ивÑ\80еменим ÐºÐ¾Ð´Ð¾Ð¼ Ð¸Ð· Ðµ-поÑ\88Ñ\82е.\nДа бисте завршили пријављивање морате поставити нову лозинку овде:",
+       "resetpass-temp-emailed": "Ð\9fÑ\80иÑ\98авили Ñ\81Ñ\82е Ñ\81е Ñ\81а Ð¿Ñ\80ивÑ\80еменим ÐºÐ¾Ð´Ð¾Ð¼ Ð¸Ð· Ð¸Ð¼ÐµÑ\98ла.\nДа бисте завршили пријављивање морате поставити нову лозинку овде:",
        "resetpass-temp-password": "Привремена лозинка:",
        "resetpass-abort-generic": "Промену лозинке је спречио додатак.",
        "resetpass-expired": "Ваша лозинка је истекла. Поставите нову лозинку да бисте се пријавили.",
        "passwordreset-emaildisabled": "Имејл је онемогућен на овом викију.",
        "passwordreset-username": "Корисничко име:",
        "passwordreset-domain": "Домен:",
-       "passwordreset-capture": "Погледати крајњу поруку?",
-       "passwordreset-capture-help": "Ако означите ову кућицу, имејл с привременом лозинком ће бити приказан и послат кориснику.",
+       "passwordreset-capture": "Погледати крајњи имејл?",
+       "passwordreset-capture-help": "Ако означите ову кућицу, имејл (с привременом лозинком) ће бити приказан и послат кориснику.",
        "passwordreset-email": "Имејл адреса:",
        "passwordreset-emailtitle": "Детаљи налога на викију {{SITENAME}}",
        "passwordreset-emailtext-ip": "Неко (вероватно Ви, са ИП адресе $1) је затражио нову лозинку на викију {{SITENAME}} ($4).\nСледећи {{PLURAL:$3|кориснички налог је повезан|кориснички налози су повезани}} с овом имејл адресом:\n\n$2\n\n{{PLURAL:$3|Привремена лозинка истиче|Привремене лозинке истичу}} за {{PLURAL:$5|један дан|$5 дана}}.\nПријавите се и изаберите нову лозинку. Ако је неко други захтевао ову радњу или сте се сетили лозинке и не желите да је мењате, занемарите ову поруку и наставите користити стару лозинку.",
        "changeemail-newemail": "Нова имејл адреса:",
        "changeemail-none": "(ништа)",
        "changeemail-password": "Ваша лозинка:",
-       "changeemail-submit": "Промени",
+       "changeemail-submit": "Промени имејл",
        "changeemail-throttled": "Превише пута сте покушали да се пријавите.\nМолимо вас да сачекате $1 пре него што покушате поново.",
        "changeemail-nochange": "Унесите другу имејл адресу.",
        "resettokens": "Ресетовање жетона",
        "subject-preview": "Преглед теме:",
        "previewerrortext": "Догодила се грешка приликом приказивања ваших измена.",
        "blockedtitle": "Корисник је блокиран",
-       "blockedtext": "<strong>Ваше корисничко име или ИП адреса је блокирана.</strong>\n\nБлокирање је {{GENDER:$4|извршио|извршила}} $1.\nРазлог: <em>$2</em>.\n\n* Датум блокирања: $8\n* Блокирање истиче: $6\n* Име корисника: $7\n\nОбратите се {{GENDER:$4|кориснику|корисници}} $1 или [[{{MediaWiki:Grouppage-sysop}}|администратору]] да разјасните ствар.\nНе можете користити могућност „Пошаљи имејл овом кориснику“ ако нисте унели исправну имејл адресу у [[Special:Preferences|подешавањима]].\nВаша блокирана ИП адреса је $3, а ID блокирања $5.\nНаведите све податке изнад при стварању било каквих упита.",
+       "blockedtext": "<strong>Ваше корисничко име или ИП адреса је блокирана.</strong>\n\nБлокирање је {{GENDER:$4|извршио|извршила}} $1.\nРазлог је <em>$2</em>.\n\n* Датум блокирања: $8\n* Блокирање истиче: $6\n* Име корисника: $7\n\nОбратите се {{GENDER:$4|кориснику|корисници}} $1 или [[{{MediaWiki:Grouppage-sysop}}|администратору]] да разјасните ствар.\nНе можете користити могућност „Пошаљи имејл овом кориснику“ ако нисте унели исправну имејл адресу у [[Special:Preferences|подешавањима]].\nВаша блокирана ИП адреса је $3, а ID блокирања $5.\nНаведите све податке изнад при стварању било каквих упита.",
        "autoblockedtext": "Ваша ИП адреса је блокирана јер ју је употребљавао други корисник, кога је {{GENDER:$4|блокирао|блокирала}} $1.\nРазлог:\n\n:<em>$2</em>\n\n* Датум блокирања: $8\n* Блокирање истиче: $6\n* Име корисника: $7\n\nОбратите се {{GENDER:$4|кориснику|корисници}} $1 или [[{{MediaWiki:Grouppage-sysop}}|администратору]] да разјасните ствар.\n\nНе можете користити могућност „Пошаљи имејл овом кориснику“ ако нисте унели исправну имејл адресу у [[Special:Preferences|подешавањима]].\n\nВаша блокирана ИП адреса је $3, а ID $5.\nНаведите све податке изнад при стварању било каквих упита.",
        "blockednoreason": "разлог није наведен",
        "whitelistedittext": "За уређивање странице је потребно да будете $1.",
        "invalid-content-data": "Неисправни подаци садржаја",
        "content-not-allowed-here": "Садржај модела „$1“ није дозвољен на страници [[$2]]",
        "editwarning-warning": "Ако напустите ову страницу, изгубићете све измене које сте направили. Ако сте пријављени, можете онемогућити ово упозорење у својим подешавањима, у одељку „{{int:prefs-editing}}“.",
+       "editpage-invalidcontentmodel-title": "Модел садржаја није подржан",
+       "editpage-invalidcontentmodel-text": "Модел садржаја „$1“ није подржан.",
        "editpage-notsupportedcontentformat-title": "Формат садржаја није подржан",
        "editpage-notsupportedcontentformat-text": "Формат садржаја $1 није подржан за модел садржаја $2.",
        "content-model-wikitext": "викитекст",
        "revdelete-show-no-access": "Грешка при приказивању ставке од $1, $2: означена је као „ограничена“.\nНемате приступ до ње.",
        "revdelete-modify-no-access": "Грешка при мењању ставке од $1, $2: означена је као „ограничена“.\nНемате приступ до ње.",
        "revdelete-modify-missing": "Грешка при мењању ИБ ставке $1: она не постоји у бази података.",
-       "revdelete-no-change": "'''Упозорење:''' ставка од $1, $2 већ поседује затражене поставке видљивости.",
+       "revdelete-no-change": "<strong>Упозорење:</strong> ставка од $1, $2 већ поседује затражена подешавања видљивости.",
        "revdelete-concurrent-change": "Грешка при мењању ставке од $1, $2: њено стање је у међувремену промењено од стране другог корисника.\nПогледајте историју.",
        "revdelete-only-restricted": "Грешка при сакривању ставке од $1, $2: не можете сакрити ставке од администратора без избора других могућности видљивости.",
        "revdelete-reason-dropdown": "*Уобичајени разлози за брисање\n** Кршење ауторског права\n** Неприкладан коментар или лични подаци\n** Неприкладно корисничко име\n** Увредљиви подаци",
        "searchprofile-advanced-tooltip": "Претражите прилагођене именске просторе",
        "search-result-size": "$1 ({{PLURAL:$2|1 реч|$2 речи|$2 речи}})",
        "search-result-category-size": "{{PLURAL:$1|1 члан|$1 члана|$1 чланова}}, ({{PLURAL:$2|1 поткатегорија|$2 поткатегорије|$2 поткатегорија}}, {{PLURAL:$3|1 датотека|$3 датотеке|$3 датотека}})",
-       "search-redirect": "(преусмерење $1)",
+       "search-redirect": "(преусмерено са $1)",
        "search-section": "(одељак $1)",
        "search-category": "(категорија $1)",
        "search-file-match": "(подудара се садржај датотеке)",
        "right-move-categorypages": "премештање категорија",
        "right-movefile": "премештање датотека",
        "right-suppressredirect": "премештање страница без остављања преусмерења",
-       "right-upload": "отпремање датотека",
+       "right-upload": "Ð\9eтпремање датотека",
        "right-reupload": "замењивање постојећих датотека",
        "right-reupload-own": "замењивање сопствених датотека",
        "right-reupload-shared": "мењање датотека на дељеном складишту мултимедије",
-       "right-upload_by_url": "оÑ\82пÑ\80емаÑ\9aе Ð´Ð°Ñ\82оÑ\82ека Ñ\81а Ð²ÐµÐ± адресе",
+       "right-upload_by_url": "Ð\9eÑ\82пÑ\80емаÑ\9aе Ð´Ð°Ñ\82оÑ\82ека Ñ\81а Ð²ÐµÐ±-адресе",
        "right-purge": "чишћење кеш меморије странице без потврде",
        "right-autoconfirmed": "без ограничавања ставки за ИП адресе",
        "right-bot": "сматрање измена као аутоматски процес",
        "right-viewsuppressed": "прегледање измена скривених од свих корисника",
        "right-suppressionlog": "прегледање приватних дневника",
        "right-block": "блокирање даљих измена других корисника",
-       "right-blockemail": "онемогÑ\83Ñ\9bаваÑ\9aе ÐºÐ¾Ñ\80иÑ\81ниÑ\86има Ð´Ð° Ñ\88аÑ\99Ñ\83 Ð¸Ð¼ÐµÑ\98лове",
+       "right-blockemail": "Ð\91локиÑ\80аÑ\98 ÐºÐ¾Ñ\80иÑ\81никÑ\83 Ñ\81лаÑ\9aе Ð¸Ð¼ÐµÑ\98ла",
        "right-hideuser": "блокирање корисничког имена и његово сакривање од јавности",
        "right-ipblock-exempt": "заобилажење блокирања ИП адресе, аутоматска блокирања и блокирања опсега",
        "right-unblockself": "деблокирање самог себе",
        "right-editmyuserjs": "уређивање сопствених JavaScript датотека",
        "right-viewmywatchlist": "види сопствени списак надгледања",
        "right-editmywatchlist": "уређивање сопственог списка надгледања; неке предузете радње ће свеједно додати странице на списак и без овог права",
-       "right-viewmyprivateinfo": "видиÑ\82е Ñ\81воÑ\98е Ð»Ð¸Ñ\87не Ð¿Ð¾Ð´Ð°Ñ\82ке (нпÑ\80. Ð°Ð´Ñ\80еÑ\81Ñ\83 Ðµ-поÑ\88Ñ\82е, право име)",
-       "right-editmyprivateinfo": "уређивање сопствених личних података (нпр. имејл адреса, право име)",
+       "right-viewmyprivateinfo": "Ð\92идиÑ\82е Ñ\81воÑ\98е Ð»Ð¸Ñ\87не Ð¿Ð¾Ð´Ð°Ñ\82ке (нпÑ\80. Ð¸Ð¼ÐµÑ\98л Ð°Ð´Ñ\80еÑ\81Ñ\83, право име)",
+       "right-editmyprivateinfo": "Уређивање сопствених личних података (нпр. имејл адреса, право име)",
        "right-editmyoptions": "уређивање сопствених подешавања",
        "right-rollback": "брзо враћање измена последњег корисника који је мењао одређену страницу",
        "right-markbotedits": "означавање враћених измена као измене бота",
        "right-userrights-interwiki": "уређивање корисничких права на другим викијима",
        "right-siteadmin": "закључавање и откључавање базе података",
        "right-override-export-depth": "извоз страница укључујући и повазене странице до дубине од пет веза",
-       "right-sendemail": "слање имејла другим корисницима",
+       "right-sendemail": "Пошаљи имејл другим корисницима",
        "right-passwordreset": "прегледање порука за обнављање лозинке",
        "right-managechangetags": "прављење и (де)активирање [[Special:Tags|ознака]]",
        "right-applychangetags": "примењивање [[Special:Tags|ознака]] на нечије измене",
        "grant-rollback": "Враћање измена",
        "grant-sendemail": "Слање имејлова другим корисницима",
        "grant-uploadeditmovefile": "Отпремање, замена и премештање датотека",
-       "grant-uploadfile": "Слање нових датотека",
+       "grant-uploadfile": "Ð\9eÑ\82пÑ\80емање нових датотека",
        "grant-basic": "Основна права",
        "grant-viewdeleted": "Преглед обрисаних страница и датотека",
        "grant-viewmywatchlist": "Преглед вашег списак надгледања",
        "action-move-rootuserpages": "премештање основних корисничких страница",
        "action-move-categorypages": "премештање категорија",
        "action-movefile": "премештање ове датотеке",
-       "action-upload": "слање ове датотеке",
+       "action-upload": "отпреми ову датотеку",
        "action-reupload": "замењивање постојеће датотеке",
        "action-reupload-shared": "постављање ове датотеке на заједничко складиште",
-       "action-upload_by_url": "слање ове датотеке преко URL адресе",
+       "action-upload_by_url": "отпремање ове датотеке преко веб-адресе",
        "action-writeapi": "писање АПИ-ја",
        "action-delete": "брисање ове странице",
        "action-deleterevision": "брисање ове измене",
        "action-managechangetags": "прављење и (де)активирање ознака",
        "action-applychangetags": "додавање ознака на ваше измене",
        "action-changetags": "додавање и уклањање разних ознака на појединачним изменама и уносима у дневницима",
+       "action-purge": "чишћење привремене меморије ове странице",
        "nchanges": "$1 {{PLURAL:$1|измена|измене|измена}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|измена од ваше последње посете}}",
        "enhancedrc-history": "историја",
        "recentchanges-page-removed-from-category": "[[:$1]] је уклоњена из категорије",
        "recentchanges-page-removed-from-category-bundled": "[[:$1]] и још [[Special:WhatLinksHere/$1|{{PLURAL:$2|једна страница|$2 странице}}]] су уклоњене из категорије",
        "autochange-username": "Медијавики аутоматска измена",
-       "upload": "Ð\9fоÑ\88аÑ\99и датотеку",
-       "uploadbtn": "Ð\9fоÑ\88аÑ\99и датотеку",
+       "upload": "Ð\9eÑ\82пÑ\80еми датотеку",
+       "uploadbtn": "Ð\9eÑ\82пÑ\80еми датотеку",
        "reuploaddesc": "Назад на образац за отпремање",
        "upload-tryagain": "Пошаљи измењени опис датотеке",
        "uploadnologin": "Нисте пријављени",
-       "uploadnologintext": "Морате бити $1 да бисте отпремали датотеке.",
+       "uploadnologintext": "$1 да бисте отпремали датотеке.",
        "upload_directory_missing": "Фасцикла за слање ($1) недостаје и сервер је не може направити.",
        "upload_directory_read_only": "Сервер не може да пише по фасцикли за слање ($1).",
        "uploaderror": "Грешка при отпремању",
        "uploadwarning-text": "Измените опис датотеке и покушајте поново.",
        "savefile": "Сачувај датотеку",
        "uploaddisabled": "Отпремање је онемогућено.",
-       "copyuploaddisabled": "СлаÑ\9aе Ð¿Ñ\83Ñ\82ем URL адресе је онемогућено.",
+       "copyuploaddisabled": "Ð\9eÑ\82пÑ\80емаÑ\9aе Ð¿Ñ\83Ñ\82ем Ð²ÐµÐ±-адресе је онемогућено.",
        "uploaddisabledtext": "Отпремање датотека је онемогућено.",
-       "php-uploaddisabledtext": "СлаÑ\9aе Ð´Ð°Ñ\82оÑ\82ека Ñ\98е Ð¾Ð½ÐµÐ¼Ð¾Ð³Ñ\83Ñ\9bено Ñ\83 PHP-Ñ\83.\nÐ\9fÑ\80овеÑ\80иÑ\82е Ð¿Ð¾Ñ\81Ñ\82авке file_uploads.",
+       "php-uploaddisabledtext": "Ð\9eÑ\82пÑ\80емаÑ\9aе Ð´Ð°Ñ\82оÑ\82ека Ñ\98е Ð¾Ð½ÐµÐ¼Ð¾Ð³Ñ\83Ñ\9bено Ñ\83 PHP-Ñ\83.\nÐ\9fÑ\80овеÑ\80иÑ\82е Ð¿Ð¾Ð´ÐµÑ\88аваÑ\9aа file_uploads.",
        "uploadscripted": "Датотека садржи HTML или скриптни код који може бити погрешно протумачен од стране прегледача.",
        "upload-scripted-pi-callback": "Датотека која садржи инструкције за обраду XML стилског облика се не може отпремити.",
        "uploaded-script-svg": "Пронађен скриптни елеменат „$1“ у постављеној SVG датотеци.",
        "destfilename": "Назив:",
        "upload-maxfilesize": "Максимална величина датотеке: $1",
        "upload-description": "Опис датотеке",
-       "upload-options": "Поставке слања",
+       "upload-options": "Поставке отпремања",
        "watchthisupload": "Надгледај ову датотеку",
        "filewasdeleted": "Датотека с овим називом је раније послата, али је обрисана.\nПроверите $1 пре него што наставите с поновним слањем.",
        "filename-bad-prefix": "Назив датотеке коју шаљете почиње са <strong>„$1“</strong>, а њега обично додељују дигитални фотоапарати.\nИзаберите назив датотеке који описује њен садржај.",
        "upload-copy-upload-invalid-domain": "Примерци отпремања нису доступни на овом домену.",
        "upload-dialog-title": "Отпремање датотека",
        "upload-dialog-button-cancel": "Откажи",
+       "upload-dialog-button-back": "Назад",
        "upload-dialog-button-done": "Готово",
        "upload-dialog-button-save": "Сачувај",
-       "upload-dialog-button-upload": "Ð\9fоÑ\88аÑ\99и",
+       "upload-dialog-button-upload": "Ð\9eÑ\82пÑ\80еми",
        "upload-form-label-infoform-title": "Детаљи",
        "upload-form-label-infoform-name": "Назив",
        "upload-form-label-infoform-description": "Опис",
        "invalid-chunk-offset": "Неисправна полазна тачка",
        "img-auth-accessdenied": "Приступ је одбијен",
        "img-auth-nopathinfo": "Недостаје PATH_INFO.\nВаш сервер није подешен да прослеђује овакве податке.\nМожда је заснован на CGI-ју који не подржава img_auth.\nПогледајте https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization?uselang=sr-ec.",
-       "img-auth-notindir": "Захтевана путања није у подешеној фасцикли за слање.",
+       "img-auth-notindir": "Захтевана путања није у подешеној фасцикли за отпремање.",
        "img-auth-badtitle": "Не могу да створим исправан наслов за „$1“.",
        "img-auth-nologinnWL": "Нисте пријављени и „$1“ није на списку дозвољених.",
        "img-auth-nofile": "Датотека „$1“ не постоји.",
        "http-bad-status": "Дошло је до проблема током захтева HTTP: $1 $2",
        "upload-curl-error6": "Не могу да приступим адреси",
        "upload-curl-error6-text": "Не могу да приступим наведеној адреси.\nПроверите да ли је адреса исправна и доступна.",
-       "upload-curl-error28": "Слање је истекло",
+       "upload-curl-error28": "Ð\9eÑ\82пÑ\80емање је истекло",
        "upload-curl-error28-text": "Сервер не одговара на упит.\nПроверите да ли сајт ради, мало осачекајте и покушајте поново.\nПробајте касније када буде мање оптерећење.",
        "license": "Лиценца:",
        "license-header": "Лиценца:",
        "sharedupload-desc-create": "Ова датотека се налази на $1 и може да се користи на другим пројектима.\nЊен опис можете да измените на [$2 одговарајућој страници].",
        "filepage-nofile": "Не постоји датотека с овим називом.",
        "filepage-nofile-link": "Не постоји датотека с овим називом, али је можете [$1 послати].",
-       "uploadnewversion-linktext": "Ð\9fоÑ\88аÑ\99и нову верзију ове датотеке",
+       "uploadnewversion-linktext": "Ð\9eÑ\82пÑ\80еми нову верзију ове датотеке",
        "shared-repo-from": "из $1",
        "shared-repo": "заједничко складиште",
        "shared-repo-name-wikimediacommons": "Викимедијина остава",
        "apisandbox-reset": "Очисти",
        "apisandbox-results": "Резултати",
        "apisandbox-request-url-label": "Адреса захтева:",
+       "apisandbox-continue": "Настави",
+       "apisandbox-continue-clear": "Очисти",
        "booksources": "Штампани извори",
        "booksources-search-legend": "Тражи књижевне изворе",
        "booksources-isbn": "ISBN:",
        "trackingcategories-nodesc": "Опис није доступан.",
        "trackingcategories-disabled": "Категорија је онемогућена",
        "mailnologin": "Нема адресе за слање",
-       "mailnologintext": "Морате бити [[Special:UserLogin|пријављени]] и имати исправан имејл у [[Special:Preferences|подешавањима]] да бисте слали имејлове другим корисницима.",
+       "mailnologintext": "Морате бити [[Special:UserLogin|пријављени]] и имати исправан имејл адресу у [[Special:Preferences|подешавањима]] да бисте слали имејлове другим корисницима.",
        "emailuser": "Пошаљи имејл",
        "emailuser-title-target": "Слање имејла {{GENDER:$1|кориснику|корисници}}",
        "emailuser-title-notarget": "Слање имејла кориснику",
        "emailpagetext": "Можете да користите доњи образац да пошаљете имејл {{GENDER:$1|овом кориснику|овој корисници}}.\nИмејл који сте унели у вашим [[Special:Preferences|подешавањима]] ће се приказати у пољу „Од“, тако да ће прималац моћи да вам одговори директно.",
-       "defemailsubject": "{{SITENAME}} — Имејл од {{GENDER:$1|корисника|кориснице}} $1",
-       "usermaildisabled": "Ð\9aоÑ\80иÑ\81ниÑ\87ка Ðµ-поÑ\88Ñ\82а Ñ\98е Ð¾Ð½ÐµÐ¼Ð¾Ð³Ñ\83Ñ\9bена",
+       "defemailsubject": "{{SITENAME}} — Имејл од {{GENDER:$1|корисника|кориснице}} „$1”",
+       "usermaildisabled": "Ð\9aоÑ\80иÑ\81ниÑ\87ки Ð¸Ð¼ÐµÑ\98л Ñ\98е Ð¾Ð½ÐµÐ¼Ð¾Ð³Ñ\83Ñ\9bен",
        "usermaildisabledtext": "Не можете да шаљете имејлове другим корисницима на овом викију",
        "noemailtitle": "Нема имејл адресе",
        "noemailtext": "Овај корисник није навео исправну имејл адресу.",
        "emailtarget": "Унос корисничког имена примаоца",
        "emailusername": "Корисничко име:",
        "emailusernamesubmit": "Пошаљи",
-       "email-legend": "СлаÑ\9aе Ð¸Ð¼ÐµÑ\98ла другом кориснику",
+       "email-legend": "Ð\9fоÑ\88аÑ\99и Ð¸Ð¼ÐµÑ\98л другом кориснику",
        "emailfrom": "Од:",
        "emailto": "За:",
        "emailsubject": "Наслов:",
        "emailsend": "Пошаљи",
        "emailccme": "Пошаљи ми копију поруке на мој имејл.",
        "emailccsubject": "Копија ваше поруке кориснику $1: $2",
-       "emailsent": "Ð\9fоÑ\80Ñ\83ка Ñ\98е Ð¿Ð¾Ñ\81лаÑ\82а",
-       "emailsenttext": "Ваш имејл је послат.",
+       "emailsent": "Ð\98меÑ\98л Ñ\98е Ð¿Ð¾Ñ\81лаÑ\82",
+       "emailsenttext": "Ваша имејл порука је послата.",
        "emailuserfooter": "Овај имејл је {{GENDER:$1|послао|послала}} $1 {{GENDER:$2|кориснику|корисници}} $2 помоћу „{{int:emailuser}}“ с викија {{SITENAME}}.",
        "usermessage-summary": "Слање системске поруке.",
        "usermessage-editor": "Уређивач системских порука",
        "enotif_subject_created": "Страницу $1 на {{SITENAME}} {{GENDER:$2|направио је|направила је|направио је}} $2",
        "enotif_subject_moved": "Страницу $1 на {{SITENAME}} {{GENDER:$2|преместио је|преместила је}} $2",
        "enotif_subject_restored": "Страницу $1 на {{SITENAME}} {{GENDER:$2|вратио је|вратила је|вратио је}} $2",
-       "enotif_subject_changed": "Страницу $1 на {{SITENAME}} {{GENDER:$2|променио је|променила је|променио је}} $2",
+       "enotif_subject_changed": "Страницу $1 на {{SITENAME}} {{GENDER:$2|променио|променила}} је $2",
        "enotif_body_intro_deleted": "Страницу $1 на {{SITENAME}} {{GENDER:$2|обрисао|обрисала}} је $2 дана $PAGEEDITDATE Погледајте $3.",
        "enotif_body_intro_created": "Страницу $1 на {{SITENAME}} {{GENDER:$2|направио|направила}} је $2 дана $PAGEEDITDATE Тренутна измена налази се на $3.",
        "enotif_body_intro_moved": "Страницу $1 на {{SITENAME}} {{GENDER:$2|преместио|преместила}} је $2 дана $PAGEEDITDATE Тренутна измена налази се на  $3.",
        "enotif_lastvisited": "Погледајте $1 за све измене од ваше последње посете.",
        "enotif_lastdiff": "Погледајте $1 да видите ову измену.",
        "enotif_anon_editor": "анониман корисник $1",
-       "enotif_body": "Ð\9fоÑ\88Ñ\82овани $WATCHINGUSERNAME,\n \t\n$PAGEINTRO $NEWPAGE\n\nÐ\9eпиÑ\81: $PAGESUMMARY $PAGEMINOREDIT\n\nÐ\9aонÑ\82акÑ\82:\nе-поÑ\88Ñ\82а: $PAGEEDITOR_EMAIL\nвики: $PAGEEDITOR_WIKI\n\nÐ\9dеÑ\9bе Ð±Ð¸Ñ\82и Ð´Ñ\80Ñ\83гиÑ\85 Ð¾Ð±Ð°Ð²ÐµÑ\88Ñ\82еÑ\9aа Ñ\83 Ñ\81лÑ\83Ñ\87аÑ\98Ñ\83 Ð´Ð°Ñ\99иÑ\85 Ð¸Ð·Ð¼ÐµÐ½Ð° Ñ\83колико Ð½Ðµ Ð¿Ð¾Ñ\81еÑ\82иÑ\82е Ð¾Ð²Ñ\83 Ñ\81Ñ\82Ñ\80аниÑ\86Ñ\83 ÐºÐ°Ð´Ð° Ñ\81Ñ\82е Ð¿Ñ\80иÑ\98авÑ\99ени.\nÐ\9cожеÑ\82е Ð¸ Ð´Ð° Ð¿Ð¾Ð½Ð¸Ñ\88Ñ\82иÑ\82е Ð¿Ð¾Ñ\81Ñ\82авке Ð¾Ð±Ð°Ð²ÐµÑ\88Ñ\82еÑ\9aа Ð·Ð° Ñ\81ве Ñ\81Ñ\82Ñ\80аниÑ\86е Ñ\83 Ð²Ð°Ñ\88ем Ñ\81пиÑ\81кÑ\83 Ð½Ð°Ð´Ð³Ð»ÐµÐ´Ð°Ñ\9aа.\n\nСÑ\80даÑ\87ан Ð¿Ð¾Ð·Ð´Ñ\80ав, {{SITENAME}}\n\n--\nÐ\94а Ð±Ð¸Ñ\81Ñ\82е Ð¿Ñ\80оменили Ð¿Ð¾Ñ\81Ñ\82авке Ñ\83 Ð²ÐµÐ·Ð¸ Ñ\81а Ðµ-обавеÑ\88Ñ\82еÑ\9aима, Ð¿Ð¾Ñ\81еÑ\82иÑ\82е\n{{canonicalurl:{{#special:Preferences}}}}\n\nÐ\94а Ð±Ð¸Ñ\81Ñ\82е Ð¿Ñ\80оменили Ð¿Ð¾Ñ\81Ñ\82авке Ñ\83 Ð²ÐµÐ·Ð¸ Ñ\81а Ñ\81пиÑ\81ком надгледања, посетите\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nДа бисте уклонили ову страницу са списка надгледања, посетите\n$UNWATCHURL\n\nПодршка и даља помоћ:\n$HELPPAGE",
+       "enotif_body": "Ð\9fоÑ\88Ñ\82овани $WATCHINGUSERNAME,\n \t\n$PAGEINTRO $NEWPAGE\n\nÐ\9eпиÑ\81: $PAGESUMMARY $PAGEMINOREDIT\n\nÐ\9aонÑ\82акÑ\82:\nмеÑ\98л: $PAGEEDITOR_EMAIL\nвики: $PAGEEDITOR_WIKI\n\nÐ\9dеÑ\9bе Ð±Ð¸Ñ\82и Ð´Ñ\80Ñ\83гиÑ\85 Ð¾Ð±Ð°Ð²ÐµÑ\88Ñ\82еÑ\9aа Ñ\83 Ñ\81лÑ\83Ñ\87аÑ\98Ñ\83 Ð´Ð°Ñ\99иÑ\85 Ð¸Ð·Ð¼ÐµÐ½Ð° Ñ\83колико Ð½Ðµ Ð¿Ð¾Ñ\81еÑ\82иÑ\82е Ð¾Ð²Ñ\83 Ñ\81Ñ\82Ñ\80аниÑ\86Ñ\83 ÐºÐ°Ð´Ð° Ñ\81Ñ\82е Ð¿Ñ\80иÑ\98авÑ\99ени.\nÐ\9cожеÑ\82е Ð¸ Ð´Ð° Ð¿Ð¾Ð½Ð¸Ñ\88Ñ\82иÑ\82е Ð¿Ð¾Ñ\81Ñ\82авке Ð¾Ð±Ð°Ð²ÐµÑ\88Ñ\82еÑ\9aа Ð·Ð° Ñ\81ве Ñ\81Ñ\82Ñ\80аниÑ\86е Ñ\83 Ð²Ð°Ñ\88ем Ñ\81пиÑ\81кÑ\83 Ð½Ð°Ð´Ð³Ð»ÐµÐ´Ð°Ñ\9aа.\n\nСÑ\80даÑ\87ан Ð¿Ð¾Ð·Ð´Ñ\80ав, {{SITENAME}}\n\n--\nÐ\94а Ð±Ð¸Ñ\81Ñ\82е Ð¿Ñ\80оменили Ð¿Ð¾Ñ\81Ñ\82авке Ð¸Ð¼ÐµÑ\98л Ð¾Ð±Ð°Ð²ÐµÑ\88Ñ\82еÑ\9aа, Ð¿Ð¾Ñ\81еÑ\82иÑ\82е\n{{canonicalurl:{{#special:Preferences}}}}\n\nÐ\94а Ð±Ð¸Ñ\81Ñ\82е Ð¿Ñ\80оменили Ð¿Ð¾Ñ\81Ñ\82авке Ñ\81пиÑ\81ка надгледања, посетите\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nДа бисте уклонили ову страницу са списка надгледања, посетите\n$UNWATCHURL\n\nПодршка и даља помоћ:\n$HELPPAGE",
        "created": "направљена",
        "changed": "измењена",
        "deletepage": "Обриши страницу",
        "protectedarticle": "је заштитио „[[$1]]“",
        "modifiedarticleprotection": "промењен степен заштите за „[[$1]]“",
        "unprotectedarticle": "је скинуо заштиту са странице „[[$1]]“",
-       "movedarticleprotection": "је преместио поставке заштите са „[[$2]]“ на „[[$1]]“",
+       "movedarticleprotection": "је преместио подешавања заштите са „[[$2]]“ на „[[$1]]“",
        "protect-title": "Степен заштите за „$1“",
        "protect-title-notallowed": "Преглед степена заштите за „$1“",
        "prot_1movedto2": "је преместио [[$1]] на [[$2]]",
        "restriction-edit": "уређивање",
        "restriction-move": "премештање",
        "restriction-create": "прављење",
-       "restriction-upload": "слање",
+       "restriction-upload": "отпремање",
        "restriction-level-sysop": "потпуно заштићено",
        "restriction-level-autoconfirmed": "полузаштићено",
        "restriction-level-all": "сви нивои",
        "undeletedrevisions": "{{PLURAL:$1|измена враћено}} $1",
        "undeletedrevisions-files": "$1 {{PLURAL:$1|измена|измене|измена}} и $2 {{PLURAL:$2|датотека је враћена|датотеке су враћене|датотека је враћено}}",
        "undeletedfiles": "{{PLURAL:$1|датотека враћено}} $1",
-       "cannotundelete": "Враћање није успело:\n$1",
+       "cannotundelete": "Враћање једне или свих ставник није успјело:\n$1",
        "undeletedpage": "<strong>Страница $1 је враћена</strong>\n\nПогледајте [[Special:Log/delete|дневник брисања]] за записе о скорашњим брисањима и враћањима.",
        "undelete-header": "Погледајте [[Special:Log/delete|историјат брисања]] за недавно обрисане странице.",
        "undelete-search-title": "Претрага обрисаних страница",
        "sp-contributions-newbies-sub": "За нове кориснике",
        "sp-contributions-newbies-title": "Доприноси нових корисника",
        "sp-contributions-blocklog": "дневник блокирања",
-       "sp-contributions-deleted": "обрисани доприноси",
+       "sp-contributions-deleted": "обрисани {{GENDER:$1|доприноси}}",
        "sp-contributions-uploads": "отпремања",
        "sp-contributions-logs": "дневници",
        "sp-contributions-talk": "разговор",
        "ipbreason-dropdown": "*Најчешћи разлози за блокирање\n** Уношење лажних информација\n** Уклањање садржаја са страница\n** Постављање веза до спољашњих сајтова\n** Уношење бесмислица у странице\n** Непристојно понашање\n** Употреба више налога\n** Неприхватљиво корисничко име",
        "ipb-hardblock": "Онемогући пријављеним корисницима да уређују с ове ИП адресе",
        "ipbcreateaccount": "Онемогући отварање налога",
-       "ipbemailban": "Ð\9eнемогÑ\83Ñ\9bи ÐºÐ¾Ñ\80иÑ\81никÑ\83 да шаље имејлове",
+       "ipbemailban": "СпÑ\80еÑ\87и ÐºÐ¾Ñ\80иÑ\81ника да шаље имејлове",
        "ipbenableautoblock": "Аутоматски блокирај последњу ИП адресу овог корисника и све даљње адресе с којих покуша да уређује",
        "ipbsubmit": "Блокирај овог корисника",
        "ipbother": "Друго време:",
        "anononlyblock": "само анонимни",
        "noautoblockblock": "аутоматско блокирање је онемогућено",
        "createaccountblock": "отварање налога је онемогућено",
-       "emailblock": "е-поÑ\88Ñ\82а Ñ\98е Ð±Ð»Ð¾ÐºÐ¸Ñ\80ана",
+       "emailblock": "имеÑ\98л Ñ\98е Ð¾Ð½ÐµÐ¼Ð¾Ð³Ñ\83Ñ\9bен",
        "blocklist-nousertalk": "забрањено уређивање сопствене странице за разговор",
        "ipblocklist-empty": "Списак блокирања је празан.",
        "ipblocklist-no-results": "Тражена ИП адреса или корисничко име није блокирано.",
        "block-log-flags-anononly": "само анонимни корисници",
        "block-log-flags-nocreate": "онемогућено отварање налога",
        "block-log-flags-noautoblock": "аутоматско блокирање је онемогућено",
-       "block-log-flags-noemail": "е-поÑ\88Ñ\82а Ñ\98е Ð±Ð»Ð¾ÐºÐ¸Ñ\80ана",
+       "block-log-flags-noemail": "имеÑ\98л Ñ\98е Ð¾Ð½ÐµÐ¼Ð¾Ð³Ñ\83Ñ\9bен",
        "block-log-flags-nousertalk": "забрањено уређивање сопствене странице за разговор",
        "block-log-flags-angry-autoblock": "проширено аутоматско блокирање је омогућено",
        "block-log-flags-hiddenname": "корисничко име је сакривено",
        "lockdbsuccesstext": "База података је закључана.<br />\nСетите се да је [[Special:UnlockDB|откључате]] када завршите с одржавањем.",
        "unlockdbsuccesstext": "База је откључана.",
        "lockfilenotwritable": "Датотека за закључавање базе није отворена за писање.\nДа бисте закључали и откључали базу, датотека мора бити доступна за писање од стране мрежног сервера.",
+       "databaselocked": "База података је већ закључана.",
        "databasenotlocked": "База није закључана.",
        "lockedbyandtime": "(од $1 дана $2 у $3)",
        "move-page": "Премештање „$1“",
        "tooltip-search": "Претрага",
        "tooltip-search-go": "Идите на страницу с овим именом, ако постоји",
        "tooltip-search-fulltext": "Претражите странице с овим текстом",
-       "tooltip-p-logo": "Ð\9fоÑ\81еÑ\82иÑ\82е Ð½Ð°Ñ\81ловну страну",
-       "tooltip-n-mainpage": "Ð\9fоÑ\81еÑ\82иÑ\82е Ð½Ð°Ñ\81ловну страну",
-       "tooltip-n-mainpage-description": "Ð\9fоÑ\81еÑ\82иÑ\82е Ð½Ð°Ñ\81ловну страну",
+       "tooltip-p-logo": "Ð\9fоÑ\81еÑ\82иÑ\82е Ð³Ð»Ð°вну страну",
+       "tooltip-n-mainpage": "Ð\9fоÑ\81еÑ\82иÑ\82е Ð³Ð»Ð°вну страну",
+       "tooltip-n-mainpage-description": "Ð\9fоÑ\81еÑ\82иÑ\82е Ð³Ð»Ð°вну страну",
        "tooltip-n-portal": "О пројекту, шта можете да радите и где да пронађете ствари",
        "tooltip-n-currentevents": "Сазнајте више о текућим догађајима",
        "tooltip-n-recentchanges": "Списак скорашњих измена на викију",
        "tooltip-t-contributions": "Списак доприноса {{GENDER:$1|овог корисника|ове кориснице}}",
        "tooltip-t-emailuser": "Пошаљите имејл {{GENDER:$1|овом кориснику|овој корисници}}",
        "tooltip-t-info": "Више информација о овој страници",
-       "tooltip-t-upload": "Ð\9fоÑ\88аÑ\99иÑ\82е датотеке",
+       "tooltip-t-upload": "Ð\9eÑ\82пÑ\80еми датотеке",
        "tooltip-t-specialpages": "Списак свих посебних страница",
        "tooltip-t-print": "Верзија ове странице за штампање",
        "tooltip-t-permalink": "Стална веза ка овој измени странице",
        "lastmodifiedatby": "Ову страницу је последњи пут {{GENDER:$4|изменио|изменила|изменио}} $3, $1 у $2.",
        "othercontribs": "Засновано на раду корисника $1.",
        "others": "други",
-       "siteusers": "{{PLURAL:$2|корисник|корисници}} на пројекту {{SITENAME}} $1",
+       "siteusers": "{{PLURAL:$2|1={{GENDER:$1|корисник|корисница}}|корисници}} на пројекту {{SITENAME}} $1",
        "anonusers": "{{PLURAL:$2|анониман корисник|анонимни корисници}} на пројекту {{SITENAME}} $1",
        "creditspage": "Аутори странице",
        "nocredits": "Не постоје подаци о аутору ове странице.",
        "pageinfo-article-id": "ИД странице",
        "pageinfo-language": "Језик садржаја странице",
        "pageinfo-content-model": "Модел садржаја странице",
+       "pageinfo-content-model-change": "промени",
        "pageinfo-robot-policy": "Индексирање од стране робота",
        "pageinfo-robot-index": "Дозвољено",
        "pageinfo-robot-noindex": "Није дозвољено",
        "pageinfo-watchers": "Број надгледача странице",
+       "pageinfo-visiting-watchers": "Број надгледача странице који су посјетили скорашње измјене",
        "pageinfo-few-watchers": "Мање од $1 {{PLURAL:$1|пратиоца|пратилаца}}",
        "pageinfo-redirects-name": "Број преусмерења на ову страницу",
        "pageinfo-subpages-name": "Подстранице ове странице",
        "pageinfo-protect-cascading-yes": "Да",
        "pageinfo-protect-cascading-from": "Странице са преносивом заштитом од",
        "pageinfo-category-info": "Информације о категорији",
+       "pageinfo-category-total": "Укупно",
        "pageinfo-category-pages": "Број страница",
        "pageinfo-category-subcats": "Број поткатегорија",
        "pageinfo-category-files": "Број датотека",
        "confirmemail_sendfailed": "{{SITENAME}} не може да пошаље имејл потврду.\nПроверите да ли је имејл адреса правилно написана.\n\nГрешка: $1",
        "confirmemail_invalid": "Потврдни код је неисправан. Вероватно је истекао.",
        "confirmemail_needlogin": "Морате бити $1 да бисте потврдили имејл адресу.",
-       "confirmemail_success": "Ваша имејл адреса је потврђена.\nСада можете да се [[Special:UserLogin|пријавите]]. Желимо вам пријатан боравак на викију.",
+       "confirmemail_success": "Ваша имејл адреса је потврђена.\nСада можете да се [[Special:UserLogin|пријавите]] и уживате у викију.",
        "confirmemail_loggedin": "Ваша имејл адреса је сада потврђена.",
        "confirmemail_subject": "{{SITENAME}} – потврда имејл адресе",
-       "confirmemail_body": "Неко, вероватно ви, са ИП адресе $1 \nје променио имејл адресу налога „$2“ у ову адресу на {{SITENAME}}.\n\nДа бисмо потврдили да овај налог стварно припада вама и поново активирали могућности имејла на {{SITENAME}}, отворите следећу везу у прегледачу:\n\n$3\n\nАко налог *не* припада вама, пратите следећу везу да откажете потврду имејл адресе:\n\n$5\n\nОвај потврдни код истиче $4.",
-       "confirmemail_body_changed": "Неко, вероватно ви, са ИП адресе $1 је променио имејл адресу налога „$2“ у ову адресу на викију {{SITENAME}}.\n\nДа бисте потврдили да овај налог стварно припада вама и поново активирали могућности имејла, отворите следећу везу у прегледачу:\n\n$3\n\nАко налог *не* припада вама, пратите следећу везу да откажете потврду имејл адресе:\n\n$5\n\nОвај потврдни код истиче $6 у $7",
-       "confirmemail_body_set": "Неко, вероватно ви, са ИП адресе $1 \nје променио имејл адресу налога „$2“ у ову адресу на {{SITENAME}}.\n\nДа бисмо потврдили да овај налог стварно припада вама и поново активирали могућности имејла на {{SITENAME}}, отворите следећу везу у прегледачу:\n\n$3\n\nАко налог *не* припада вама, пратите следећу везу да откажете потврду имејл адресе:\n\n$5\n\nОвај потврдни код истиче $4.",
+       "confirmemail_body": "Неко, вероватно ви, са ИП адресе $1,\nотворио је налог „$2“ са овом имејл адресом на викију {{SITENAME}}.\n\nДа потврдите да овај налог стварно припада вама и да активирате\nмогућности имејла на викију {{SITENAME}}, отворите ову везу у прегледачу:\n\n$3\n\nУколико налог *не* припада вама, пратите везу\nда откажете потврду имејл адресе:\n\n$5\n\nОвај потврдни код истиче у $4.",
+       "confirmemail_body_changed": "Неко, вероватно ви, са ИП адресе $1,\nпроменио је имејл адресу налога „$2“ у ову адресу на викију {{SITENAME}}.\n\nДа бисте потврдили да овај налог стварно припада вама и поново активирали могућности имејла, отворите следећу везу у прегледачу:\n\n$3\n\nАко налог *не* припада вама, пратите следећу везу да откажете потврду имејл адресе:\n\n$5\n\nОвај потврдни код истиче $6 у $7",
+       "confirmemail_body_set": "Неко, вероватно ви, са ИП адресе $1,\nпроменио је имејл адресу налога „$2“ у ову адресу на {{SITENAME}}.\n\nДа бисмо потврдили да овај налог стварно припада вама и поново активирали\nмогућности имејла на {{SITENAME}}, отворите следећу везу у прегледачу:\n\n$3\n\nАко налог *не* припада вама, пратите следећу везу да откажете потврду имејл адресе:\n\n$5\n\nОвај потврдни код истиче $4.",
        "confirmemail_invalidated": "Потврда имејл адресе је отказана",
        "invalidateemail": "Отказивање потврде имејла",
        "notificationemail_body_changed": "Неко, вероватно Ви је променио имејл адресу налога из $2“ у „$3“ са IP адресе $1 на сајту {{SITENAME}}.\n\nАко ово нисте били Ви, одмах обавестите администраторе сајта.",
        "tag-filter": "Филтер за [[Special:Tags|ознаке]]:",
        "tag-filter-submit": "Филтрирај",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Ознака|Ознаке}}]]: $2)",
+       "tag-mw-contentmodelchange": "промена модела садржаја",
        "tags-title": "Ознаке",
        "tags-intro": "На овој страници је наведен списак ознака с којима програм може да означи измене и његово значење.",
        "tags-tag": "Назив ознаке",
        "tags-actions-header": "Радње",
        "tags-active-yes": "Да",
        "tags-active-no": "Не",
-       "tags-source-extension": "Ð\94ео ÐµÐºÑ\81Ñ\82ензиÑ\98е",
+       "tags-source-extension": "Ð\94ео Ð\9cедиÑ\98авикиÑ\98а",
        "tags-source-manual": "Ручно је додају корисници и ботови",
        "tags-source-none": "Ван употребе",
        "tags-edit": "уреди",
        "htmlform-title-not-exists": "$1 не постоји.",
        "htmlform-user-not-exists": "<strong>$1</strong> не постоји.",
        "htmlform-user-not-valid": "<strong>$1</strong> није исправно корисничко име.",
-       "sqlite-has-fts": "$1 с подршком претраге целог текста",
-       "sqlite-no-fts": "$1 без подршке претраге целог текста",
        "logentry-delete-delete": "$1 је {{GENDER:$2|обрисао|обрисала}} страницу $3",
        "logentry-delete-restore": "$1 је {{GENDER:$2|вратио|вратила}} страницу $3",
        "logentry-delete-event": "$1 је {{GENDER:$2|променио|променила}} видљивост {{PLURAL:$5|1=догађаја|$5 догађаја}} у дневнику $3: $4",
        "feedback-cancel": "Откажи",
        "feedback-close": "Урађено",
        "feedback-external-bug-report-button": "Пријави баг",
-       "feedback-error-title": "Грешка",
        "feedback-error1": "Грешка: непрепознат резултат од АПИ-ја",
        "feedback-error2": "Грешка: уређивање није успело",
        "feedback-error3": "Грешка: нема одговора од АПИ-ја",
        "mediastatistics-header-total": "Све датотеке",
        "json-error-syntax": "Грешка у синтакси",
        "headline-anchor-title": "Веза до овог одељка",
-       "special-characters-group-latin": "латиница",
+       "special-characters-group-latin": "Ð\9bатиница",
        "special-characters-group-latinextended": "проширена латиница",
        "special-characters-group-ipa": "ИПА",
        "special-characters-group-symbols": "симболи",
        "log-action-filter-protect-move_prot": "премештање заштите",
        "log-action-filter-rights-rights": "ручно",
        "log-action-filter-rights-autopromote": "аутоматски",
-       "log-action-filter-upload-upload": "ново",
-       "log-action-filter-upload-overwrite": "промена постојећег"
+       "log-action-filter-upload-upload": "Ново отпремање",
+       "log-action-filter-upload-overwrite": "промена постојећег",
+       "authmanager-email-label": "Имејл",
+       "authmanager-email-help": "Имејл адреса",
+       "changecredentials": "Промјена акредитива"
 }
index 155e8c6..b656100 100644 (file)
@@ -45,9 +45,9 @@
        "tog-previewontop": "Prikaži pregled pre okvira za uređivanje",
        "tog-previewonfirst": "Prikaži pregled na prvoj izmeni",
        "tog-enotifwatchlistpages": "Pošalji mi imejl kada se promeni stranica/datoteka koju nadgledam",
-       "tog-enotifusertalkpages": "Pošalji mi e-poruku kada se promeni moja stranica za razgovor",
-       "tog-enotifminoredits": "Pošalji mi e-poruku i za manje izmene u stranicama i datotekama",
-       "tog-enotifrevealaddr": "Prikaži moju e-adresu u porukama obaveštenja",
+       "tog-enotifusertalkpages": "Pošalji mi imejl kada se promeni moja stranica za razgovor",
+       "tog-enotifminoredits": "Pošalji mi imejl i za manje izmene u stranicama i datotekama",
+       "tog-enotifrevealaddr": "Prikaži moju imejl adresu u porukama obaveštenja",
        "tog-shownumberswatching": "Prikaži broj korisnika koji nadgledaju",
        "tog-oldsig": "Tekući potpis:",
        "tog-fancysig": "Smatraj potpis kao vikitekst (bez samopovezivanja)",
@@ -61,7 +61,7 @@
        "tog-watchlisthideanons": "Sakrij izmene anonimnih korisnika sa spiska nadgledanja",
        "tog-watchlisthidepatrolled": "Sakrij patrolirane izmene sa spiska nadgledanja",
        "tog-watchlisthidecategorization": "Sakrij kategorizaciju stranica",
-       "tog-ccmeonemails": "Pošalji mi primerke e-poruka koje pošaljem drugim korisnicima",
+       "tog-ccmeonemails": "Pošalji mi kopije imejlova koje pošaljem drugim korisnicima",
        "tog-diffonly": "Ne prikazuj sadržaj stranice ispod razlika",
        "tog-showhiddencats": "Prikaži skrivene kategorije",
        "tog-norollbackdiff": "Izostavi razliku nakon izvršenog vraćanja",
        "qbfind": "Pronađi",
        "qbbrowse": "Potraži",
        "qbedit": "Uredi",
-       "qbpageoptions": "Postavke stranice",
+       "qbpageoptions": "Ova stranica",
        "qbmyoptions": "Moje stranice",
        "faq": "NPP",
        "faqpage": "Project:NPP",
        "history": "Istorija stranice",
        "history_short": "Istorija",
        "updatedmarker": "ažurirano od moje poslednje posete",
-       "printableversion": "Za štampanje",
+       "printableversion": "Verzija za štampanje",
        "permalink": "Trajna veza",
        "print": "Štampaj",
        "view": "Pogledaj",
        "translateinterface": "Da dodate ili promenite prevode za sve vikije, posetite [https://translatewiki.net/ Translejtviki], projekat za lokalizaciju Medijavikija.",
        "cascadeprotected": "Ova stranica je zaključana jer sadrži {{PLURAL:$1|sledeću stranicu koja je zaštićena|sledeće stranice koje su zaštićene}} „prenosivom“ zaštitom:\n$2",
        "namespaceprotected": "Nemate dozvolu da uređujete stranice u imenskom prostoru <strong>$1</strong>.",
-       "customcssprotected": "Nemate dozvolu da menjate ovu CSS stranicu jer sadrži lične postavke drugog korisnika.",
+       "customcssprotected": "Nemate dozvolu da menjate ovu CSS stranicu jer sadrži lična podešavanja drugog korisnika.",
        "customjsprotected": "Nemate dozvolu da menjate ovu stranicu javaskripta jer sadrži lične postavke drugog korisnika.",
        "mycustomcssprotected": "Nemate dozvolu za menjanje ove CSS stranice.",
        "mycustomjsprotected": "Nemate dozvolu za menjanje ove JavaScript stranice.",
        "yourpasswordagain": "Potvrda lozinke:",
        "createacct-yourpasswordagain": "Potvrdite lozinku",
        "createacct-yourpasswordagain-ph": "Unesite lozinku još jednom",
-       "remembermypassword": "Zapamti me na ovom pregledaču (najduže $1 {{PLURAL:$1|dan|dana}})",
        "userlogin-remembermypassword": "Ostavi me prijavljenog/u",
        "userlogin-signwithsecure": "Koristite sigurnu konekciju",
        "yourdomainname": "Domen:",
        "userlogin": "Prijava/registracija",
        "userloginnocreate": "Prijava",
        "logout": "Odjava",
-       "userlogout": "Odjavi me",
+       "userlogout": "Odjava",
        "notloggedin": "Niste prijavljeni",
        "userlogin-noaccount": "Nemate nalog?",
        "userlogin-joinproject": "Otvorite ga",
        "userlogin-helplink2": "Pomoć pri prijavljivanju",
        "userlogin-loggedin": "Već ste prijavljeni kao {{GENDER:$1|$1}}.\nKoristite donji obrazac da biste se prijavili kao drugi korisnik.",
        "userlogin-createanother": "Otvori još jedan nalog",
-       "createacct-emailrequired": "Adresa e-pošte",
-       "createacct-emailoptional": "Adresa e-pošte (opciono)",
-       "createacct-email-ph": "Unesite vašu adresu e-pоšte",
-       "createacct-another-email-ph": "Unesite adresu e-pošte",
+       "createacct-emailrequired": "Imejl adresa",
+       "createacct-emailoptional": "Imejl adresa (opciono)",
+       "createacct-email-ph": "Unesite Vašu imejl adresu",
+       "createacct-another-email-ph": "Unesite imejl adresu",
        "createaccountmail": "Koristite privremenu, slučajno stvorenu lozinku i pošaljite na navedenu adresu elektronske pošte",
        "createacct-realname": "Pravo ime (opciono)",
        "createaccountreason": "Razlog:",
        "mailmypassword": "Resetuj lozinku",
        "passwordremindertitle": "{{SITENAME}} — privremena lozinka",
        "passwordremindertext": "Neko, verovatno vi, sa IP adrese $1 je zatražio novu lozinku na vikiju {{SITENAME}} ($4).\nStvorena je privremena lozinka za {{GENDER:$2|korisnika|korisnicu|korisnika}} $2 koja glasi $3.\nUkoliko je ovo vaš zahtev, sada se prijavite i postavite novu lozinku.\nPrivremena lozinka ističe za {{PLURAL:$5|jedan dan|$5 dana|$5 dana}}.\n\nAko je neko drugi zatražio promenu lozinke, ili ste se setili vaše lozinke i ne želite da je menjate, zanemarite ovu poruku.",
-       "noemail": "Ne postoji e-adresa za {{GENDER:$1|korisnika|korisnicu}} $1.",
-       "noemailcreate": "Morate navesti ispravnu e-adresu",
-       "passwordsent": "Nova lozinka je poslata na e-adresu {{GENDER:$1|korisnika|korisnice|korisnika}} $1.\nPrijavite se pošto je primite.",
+       "noemail": "Ne postoji imejl adresa za {{GENDER:$1|korisnika|korisnicu}} $1.",
+       "noemailcreate": "Morate navesti ispravnu imejl adresu.",
+       "passwordsent": "Nova lozinka je poslata na imejl adresu {{GENDER:$1|korisnika|korisnice|korisnika}} $1.\nPrijavite se pošto je primite.",
        "blocked-mailpassword": "Vašoj IP adresi je onemogućeno uređivanje stranica, kao i mogućnost zahtevanja nove lozinke.",
-       "eauthentsent": "Na navedenu e-adresu je poslat potvrdni kod.\nPre nego što pošaljemo daljnje poruke, pratite uputstva s e-pošte da biste potvrdili da ste vi otvorili nalog.",
+       "eauthentsent": "Na navedenu imejl adresu je poslat potvrdni kod.\nPre nego što pošaljemo daljnje poruke, pratite uputstva s imejla da biste potvrdili da ste Vi otvorili nalog.",
        "throttled-mailpassword": "Poruka za promenu lozinke je poslata u {{PLURAL:$1|1=poslednjih sat vremena|poslednja $1 sata|poslednjih $1 sati}}.\nDa bismo sprečili zloupotrebu, podsetnik šaljemo samo jednom u roku od {{PLURAL:$1|1=sat vremena|$1 sata|$1 sati}}.",
        "mailerror": "Greška pri slanju poruke: $1",
-       "acct_creation_throttle_hit": "Posetioci ovog vikija koji koriste vašu IP adresu su već otvorili {{PLURAL:$1|1=jedan nalog|$1 naloga|$1 naloga}} prethodni dan, što je najveći dozvoljeni broj u tom vremenskom periodu.\nZbog toga posetioci s ove IP adrese trenutno ne mogu otvoriti više naloga.",
-       "emailauthenticated": "Vaša e-adresa je potvrđena $2 u $3.",
-       "emailnotauthenticated": "Vaša e-adresa još nije potvrđena.\nPoruke neće biti poslate ni u jednom od sledećih slučajeva.",
-       "noemailprefs": "Unesite e-adresu kako bi ove mogućnosti radile.",
-       "emailconfirmlink": "Potvrdite svoju e-adresu",
-       "invalidemailaddress": "E-adresa ne može biti prihvaćena jer je neispravnog oblika.\nUnesite ispravnu adresu ili ostavite prazno polje.",
-       "cannotchangeemail": "Na ovom vikiju ne možete promeniti e-adresu naloga.",
-       "emaildisabled": "Ovaj sajt ne može da šalje e-poruke.",
+       "acct_creation_throttle_hit": "Posetioci ovog vikija koji koriste vašu IP adresu su već otvorili {{PLURAL:$1|1=jedan nalog|$1 naloga}} prethodni $2, što je najveći dozvoljeni broj u tom vremenskom periodu.\nZbog toga posetioci s ove IP adrese trenutno ne mogu otvoriti više naloga.",
+       "emailauthenticated": "Vaša imejl adresa je potvrđena $2 u $3.",
+       "emailnotauthenticated": "Vaša imejl adresa još nije potvrđena.\nImejl neće biti poslat ni u jednom od sledećih slučajeva.",
+       "noemailprefs": "Unesite imejl adresu kako bi ove mogućnosti radile.",
+       "emailconfirmlink": "Potvrdite svoju imejl adresu",
+       "invalidemailaddress": "Imejl adresa ne može biti prihvaćena jer je neispravnog oblika.\nUnesite ispravnu adresu ili ostavite prazno polje.",
+       "cannotchangeemail": "Na ovom vikiju ne možete promeniti imejl adresu naloga.",
+       "emaildisabled": "Ovaj sajt ne može da šalje imejlove.",
        "accountcreated": "Nalog je otvoren",
        "accountcreatedtext": "Korisnički nalog [[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|talk]]) je otvoren.",
        "createaccount-title": "Otvaranje korisničkog naloga za {{SITENAME}}",
-       "createaccount-text": "Neko je otvorio nalog s vašom e-adresom na {{SITENAME}} ($4) pod imenom $2 i lozinkom $3.\nPrijavite se i promenite svoju lozinku.\n\nAko je ovo greška, zanemarite ovu poruku.",
+       "createaccount-text": "Neko je otvorio nalog s vašom imejl adresom na {{SITENAME}} ($4) pod imenom $2 i lozinkom $3.\nPrijavite se i promenite svoju lozinku.\n\nAko je ovo greška, zanemarite ovu poruku.",
        "login-throttled": "Previše puta ste pokušali da se prijavite. \nMolimo vas da sačekate $1 pre nego što pokušate ponovo.",
        "login-abort-generic": "Neuspešna prijava – prekinuto",
        "login-migrated-generic": "Vaš nalog je migriran i vaše korisničko više ne postoji na ovom vikiju.",
        "pt-createaccount": "Otvori nalog",
        "pt-userlogout": "Odjavi me",
        "php-mail-error-unknown": "Nepoznata greška u funkciji PHP mail().",
-       "user-mail-no-addy": "Pokušali ste da pošaljete poruku bez e-adrese.",
+       "user-mail-no-addy": "Pokušali ste da pošaljete imejl bez imejl adrese.",
        "user-mail-no-body": "Pokušano slanje elektronske poruke s praznim ili nerazumno kratkim sadržajem.",
        "changepassword": "Promeni lozinku",
        "resetpass_announce": "Da biste završili prijavu, podesite novu lozinku ovde.",
        "resetpass_submit": "Postavi lozinku i prijavi me",
        "changepassword-success": "Vaša lozinka je uspešno promenjena.",
        "changepassword-throttled": "Previše puta ste pokušali da se prijavite.\nMolimo vas da sačekate $1 pre nego što pokušate ponovo.",
+       "botpasswords": "Lozinke botova",
        "botpasswords-label-cancel": "Otkaži",
        "botpasswords-label-delete": "Obriši",
        "resetpass_forbidden": "Lozinka ne može biti promenjena",
        "resetpass-submit-cancel": "Otkaži",
        "resetpass-wrong-oldpass": "Neispravna privremena ili tekuća lozinka.\nMožda ste već promenili lozinku ili ste zatražili novu privremenu lozinku.",
        "resetpass-recycled": "Uneli ste sadašnju lozinku, da biste resetovali lozinku morate uneti novu.",
-       "resetpass-temp-emailed": "Prijavili ste se sa privremenim kodom iz e-pošte.\nDa biste završili prijavljivanje morate postaviti novu lozinku ovde:",
+       "resetpass-temp-emailed": "Prijavili ste se sa privremenim kodom iz imejla.\nDa biste završili prijavljivanje morate postaviti novu lozinku ovde:",
        "resetpass-temp-password": "Privremena lozinka:",
        "resetpass-abort-generic": "Promenu lozinke je sprečio dodatak.",
        "resetpass-expired": "Vaša lozinka je istekla. Postavite novu lozinku da biste se prijavili.",
        "resetpass-expired-soft": "Vaša lozinka je istekla i morate postaviti novu. Postavite novu lozinku ili kliknite „{{int:authprovider-resetpass-skip-label}}“ da je postavite kasnije.",
        "resetpass-validity-soft": "Vaša lozinka nije valjana: $1\n\nMolimo izaberite novu ili kliknite „{{int:authprovider-resetpass-skip-label}}“ da resetujete kasnije.",
        "passwordreset": "Obnavljanje lozinke",
-       "passwordreset-text-one": "Popunite ovaj obrazac da biste dobili privremenu lozinku na e-poštu.",
-       "passwordreset-text-many": "{{PLURAL:$1|Ispunite jedno od polja kako biste dobili privremenu lozinku na e-poštu.}}",
+       "passwordreset-text-one": "Popunite ovaj obrazac da biste dobili privremenu lozinku na imejl.",
+       "passwordreset-text-many": "{{PLURAL:$1|Ispunite jedno od polja kako biste dobili privremenu lozinku na imejl.}}",
        "passwordreset-disabled": "Obnavljanje lozinke je onemogućeno na ovom vikiju.",
-       "passwordreset-emaildisabled": "E-pošta je onemogućena na ovom vikiju.",
+       "passwordreset-emaildisabled": "Imejl je onemogućen na ovom vikiju.",
        "passwordreset-username": "Korisničko ime:",
        "passwordreset-domain": "Domen:",
-       "passwordreset-capture": "Pogledati krajnju poruku?",
-       "passwordreset-capture-help": "Ako označite ovu kućicu, e-poruka s privremenom lozinkom će biti prikazana i poslata korisniku.",
-       "passwordreset-email": "E-adresa:",
+       "passwordreset-capture": "Pogledati krajnji imejl?",
+       "passwordreset-capture-help": "Ako označite ovo polje, imejl (s privremenom lozinkom) će biti prikazana i poslata korisniku.",
+       "passwordreset-email": "Imejl adresa:",
        "passwordreset-emailtitle": "Detalji naloga na vikiju {{SITENAME}}",
-       "passwordreset-emailtext-ip": "Neko, verovatno Vi, sa IP adrese $1 je zatražio novu lozinku na vikiju {{SITENAME}} ($4).\nSledeći {{PLURAL:$3|korisnički nalog je povezan|korisnički nalozi su povezani}} s ovom e-adresom:\n\n$2\n\n{{PLURAL:$3|Privremena lozinka ističe|Privremene lozinke ističu}} za {{PLURAL:$5|jedan dan|$5 dana}}.\nPrijavite se i izaberite novu lozinku. Ako je neko drugi zahtevao ovu radnju ili ste se setili lozinke i ne želite da je menjate, zanemarite ovu poruku i nastavite koristiti staru lozinku.",
-       "passwordreset-emailtext-user": "{{GENDER:$1|Korisnik je zatražio|Korisnica je zatražila}} podsetnik o podacima za prijavu na vikiju {{SITENAME}} ($4).\nSledeći {{PLURAL:$3|korisnički nalog je povezan|korisnički nalozi su povezani}} s ovom e-adresom:\n\n$2\n\n{{PLURAL:$3|Privremena lozinka ističe|Privremene lozinke ističu}} za {{PLURAL:$5|jedan dan|$5 dana}}.\nPrijavite se i izaberite novu lozinku. Ako je neko drugi zahtevao ovu radnju ili ste se setili lozinke i ne želite da je menjate, zanemarite ovu poruku.",
+       "passwordreset-emailtext-ip": "Neko (verovatno Vi, sa IP adrese $1) je zatražio novu lozinku na vikiju {{SITENAME}} ($4).\nSledeći {{PLURAL:$3|korisnički nalog je povezan|korisnički nalozi su povezani}} s ovom imejl adresom:\n\n$2\n\n{{PLURAL:$3|Privremena lozinka ističe|Privremene lozinke ističu}} za {{PLURAL:$5|jedan dan|$5 dana}}.\nPrijavite se i izaberite novu lozinku. Ako je neko drugi zahtevao ovu radnju ili ste se setili lozinke i ne želite da je menjate, zanemarite ovu poruku i nastavite koristiti staru lozinku.",
+       "passwordreset-emailtext-user": "{{GENDER:$1|Korisnik je zatražio|Korisnica je zatražila}} podsetnik o podacima za prijavu na vikiju {{SITENAME}} ($4).\nSledeći {{PLURAL:$3|korisnički nalog je povezan|korisnički nalozi su povezani}} s ovom imejl adresom:\n\n$2\n\n{{PLURAL:$3|Privremena lozinka ističe|Privremene lozinke ističu}} za {{PLURAL:$5|jedan dan|$5 dana}}.\nPrijavite se i izaberite novu lozinku. Ako je neko drugi zahtevao ovu radnju ili ste se setili lozinke i ne želite da je menjate, zanemarite ovu poruku.",
        "passwordreset-emailelement": "Korisničko ime: \n$1\n\nPrivremena lozinka: \n$2",
        "passwordreset-emailsentemail": "Podsetnik o lozinci je poslat na vašu adresu.",
        "passwordreset-emailsentusername": "Ako ste naveli imejl adresu prilikom registracije, biće poslat imejl za resetovanje lozinke.",
-       "changeemail": "Promeni ili ukloni e-adresu",
+       "changeemail": "Promeni ili ukloni imejl adresu",
        "changeemail-header": "Promenite e-adresu naloga",
        "changeemail-no-info": "Morate biti prijavljeni da biste pristupili ovoj stranici.",
-       "changeemail-oldemail": "Trenutna e-adresa:",
-       "changeemail-newemail": "Nova e-adresa:",
+       "changeemail-oldemail": "Trenutna imejl adresa:",
+       "changeemail-newemail": "Nova imejl adresa:",
        "changeemail-none": "(ništa)",
        "changeemail-password": "Vaša lozinka:",
-       "changeemail-submit": "Promeni",
+       "changeemail-submit": "Promeni imejl",
        "changeemail-throttled": "Previše puta ste pokušali da se prijavite.\nMolimo vas da sačekate $1 pre nego što pokušate ponovo.",
        "changeemail-nochange": "Unesite drugu imejl adresu.",
        "resettokens": "Resetovanje žetona",
        "summary-preview": "Pregled opisa:",
        "subject-preview": "Pregled tema:",
        "blockedtitle": "Korisnik je blokiran",
-       "blockedtext": "<strong>Vaše korisničko ime ili IP adresa je blokirana.</strong>\n\nBlokiranje je {{GENDER:$4|izvršio|izvršila}} $1.\nRazlog: <em>$2</em>.\n\n* Datum blokiranja: $8\n* Blokiranje ističe: $6\n* Ime korisnika: $7\n\nObratite se {{GENDER:$4|korisniku|korisnici}} $1 ili [[{{MediaWiki:Grouppage-sysop}}|administratoru]] da razjasnite stvar.\nNe možete koristiti mogućnost „Pošalji poruku ovom korisniku“ ako niste uneli ispravnu e-adresu u [[Special:Preferences|podešavanjima]].\nVaša blokirana IP adresa je $3, a ID blokiranja $5.\nNavedite sve podatke iznad pri stvaranju bilo kakvih upita.",
-       "autoblockedtext": "Vaša IP adresa je blokirana jer ju je upotrebljavao drugi korisnik, koga je {{GENDER:$4|blokirao|blokirala}} $1.\nRazlog:\n\n:<em>$2</em>\n\n* Datum blokiranja: $8\n* Blokiranje ističe: $6\n* Ime korisnika: $7\n\nObratite se {{GENDER:$4|korisniku|korisnici}} $1 ili [[{{MediaWiki:Grouppage-sysop}}|administratoru]] da razjasnite stvar.\n\nNe možete koristiti mogućnost „Pošalji poruku ovom korisniku“ ako niste uneli ispravnu e-adresu u [[Special:Preferences|podešavanjima]].\n\nVaša blokirana IP adresa je $3, a ID $5.\nNavedite sve podatke iznad pri stvaranju bilo kakvih upita.",
+       "blockedtext": "<strong>Vaše korisničko ime ili IP adresa je blokirana.</strong>\n\nBlokiranje je {{GENDER:$4|izvršio|izvršila}} $1.\nRazlog je <em>$2</em>.\n\n* Datum blokiranja: $8\n* Blokiranje ističe: $6\n* Ime korisnika: $7\n\nObratite se {{GENDER:$4|korisniku|korisnici}} $1 ili [[{{MediaWiki:Grouppage-sysop}}|administratoru]] da razjasnite stvar.\nNe možete koristiti mogućnost „Pošalji imejl ovom korisniku“ ako niste uneli ispravnu imejl adresu u [[Special:Preferences|podešavanjima]].\nVaša blokirana IP adresa je $3, a ID blokiranja $5.\nNavedite sve podatke iznad pri stvaranju bilo kakvih upita.",
+       "autoblockedtext": "Vaša IP adresa je blokirana jer ju je upotrebljavao drugi korisnik, koga je {{GENDER:$4|blokirao|blokirala}} $1.\nRazlog:\n\n:<em>$2</em>\n\n* Datum blokiranja: $8\n* Blokiranje ističe: $6\n* Ime korisnika: $7\n\nObratite se {{GENDER:$4|korisniku|korisnici}} $1 ili [[{{MediaWiki:Grouppage-sysop}}|administratoru]] da razjasnite stvar.\n\nNe možete koristiti mogućnost „Pošalji imejl ovom korisniku“ ako niste uneli ispravnu imejl adresu u [[Special:Preferences|podešavanjima]].\n\nVaša blokirana IP adresa je $3, a ID $5.\nNavedite sve podatke iznad pri stvaranju bilo kakvih upita.",
        "blockednoreason": "razlog nije naveden",
        "whitelistedittext": "Za uređivanje stranice je potrebno da budete $1.",
-       "confirmedittext": "Morate da potvrdite svoju e-adresu pre uređivanja stranica.\nPostavite i potvrdite adresu preko [[Special:Preferences|podešavanja]].",
+       "confirmedittext": "Morate da potvrdite svoju imejl adresu pre uređivanja stranica.\nPostavite i potvrdite imejl adresu preko [[Special:Preferences|podešavanja]].",
        "nosuchsectiontitle": "Ne mogu da pronađem odeljak",
        "nosuchsectiontext": "Pokušali ste da uredite odeljak koji ne postoji.\nMožda je premešten ili obrisan dok ste pregledali stranicu.",
        "loginreqtitle": "Potrebna je prijava",
        "revdelete-show-no-access": "Greška pri prikazivanju stavke od $1, $2: označena je kao „ograničena“.\nNemate pristup do nje.",
        "revdelete-modify-no-access": "Greška pri menjanju stavke od $1, $2: označena je kao „ograničena“.\nNemate pristup do nje.",
        "revdelete-modify-missing": "Greška pri menjanju IB stavke $1: ona ne postoji u bazi podataka.",
-       "revdelete-no-change": "'''Upozorenje:''' stavka od $1, $2 već poseduje zatražene postavke vidljivosti.",
+       "revdelete-no-change": "<strong>Upozorenje:</strong> stavka od $1, $2 već poseduje zatražena podešavanja vidljivosti.",
        "revdelete-concurrent-change": "Greška pri menjanju stavke od $1, $2: njeno stanje je u međuvremenu promenjeno od strane drugog korisnika.\nPogledajte istoriju.",
        "revdelete-only-restricted": "Greška pri sakrivanju stavke od $1, $2: ne možete sakriti stavke od administratora bez izbora drugih mogućnosti vidljivosti.",
        "revdelete-reason-dropdown": "*Uobičajeni razlozi za brisanje\n** Kršenje autorskog prava\n** Neprikladan komentar ili lični podaci\n** Neprikladno korisničko ime\n** Uvredljivi podaci",
        "searchprofile-advanced-tooltip": "Pretražite prilagođene imenske prostore",
        "search-result-size": "$1 ({{PLURAL:$2|1 reč|$2 reči|$2 reči}})",
        "search-result-category-size": "{{PLURAL:$1|1 član|$1 člana|$1 članova}}, ({{PLURAL:$2|1 potkategorija|$2 potkategorije|$2 potkategorija}}, {{PLURAL:$3|1 datoteka|$3 datoteke|$3 datoteka}})",
-       "search-redirect": "(preusmerenje $1)",
+       "search-redirect": "(preusmereno sa $1)",
        "search-section": "(odeljak $1)",
        "search-category": "(kategorija $1)",
        "search-file-match": "(podudara se sadržaj datoteke)",
        "prefs-watchlist-token": "Žeton spiska nadgledanja:",
        "prefs-misc": "Druga podešavanja",
        "prefs-resetpass": "Promeni lozinku",
-       "prefs-changeemail": "Promeni ili ukloni e-adresu",
-       "prefs-setemail": "Postavi e-adresu",
-       "prefs-email": "Postavke e-pošte",
+       "prefs-changeemail": "Promeni ili ukloni imejl adresu",
+       "prefs-setemail": "Postavi imejl adresu",
+       "prefs-email": "Postavke imejla",
        "prefs-rendering": "Izgled",
        "saveprefs": "Sačuvaj",
        "restoreprefs": "Vrati sve na podrazumevano (u svim odeljcima)",
        "timezoneregion-europe": "Evropa",
        "timezoneregion-indian": "Indijski okean",
        "timezoneregion-pacific": "Tihi okean",
-       "allowemail": "Omogući primanje e-poruka od drugih korisnika",
+       "allowemail": "Omogući primanje imejla od drugih korisnika",
        "prefs-searchoptions": "Pretraga",
        "prefs-namespaces": "Imenski prostori",
        "default": "podrazumevano",
        "prefs-custom-js": "Prilagođeni javaskript",
        "prefs-common-css-js": "Deljeni CSS/javaskript za sve teme:",
        "prefs-reset-intro": "Možete koristiti ovu stranicu da poništite svoje postavke na podrazumevane vrednosti.\nOva radnja se ne može vratiti.",
-       "prefs-emailconfirm-label": "Potvrda e-adrese:",
-       "youremail": "E-adresa:",
+       "prefs-emailconfirm-label": "Potvrda imejla:",
+       "youremail": "Imejl:",
        "username": "{{GENDER:$1|Korisničko ime}}:",
        "prefs-memberingroups": "{{PLURAL:$1|Grupa|Grupe}}:",
        "prefs-memberingroups-type": "$1",
        "gender-male": "On uređuje viki stranice",
        "gender-female": "Ona uređuje viki stranice",
        "prefs-help-gender": "Neobavezno: koristi se za ispravno obraćanje softvera korisnicima, zavisno od njihovog pola.\nOvaj podatak će biti javan.",
-       "email": "E-adresa",
+       "email": "Imejl",
        "prefs-help-realname": "Pravo ime nije obavezno.\nAko izaberete da ga unesete, ono će biti korišćeno za pripisivanje vašeg rada.",
-       "prefs-help-email": "E-adresa nije obavezna, ali je potrebna u slučaju da zaboravite lozinku.",
+       "prefs-help-email": "Imejl adresa nije obavezna, ali je potrebna u slučaju da zaboravite lozinku.",
        "prefs-help-email-others": "Možete je koristiti i da omogućite drugima da vas kontaktiraju preko korisničke stranice ili stranice za razgovor, bez otkrivanja svog identiteta.",
-       "prefs-help-email-required": "Potrebna je e-adresa.",
+       "prefs-help-email-required": "Potrebna je imejl adresa.",
        "prefs-info": "Osnovni podaci",
        "prefs-i18n": "Internacionalizacija",
        "prefs-signature": "Potpis",
        "right-move-categorypages": "premeštanje kategorija",
        "right-movefile": "premeštanje datoteka",
        "right-suppressredirect": "premeštanje stranica bez ostavljanja preusmerenja",
-       "right-upload": "otpremanje datoteka",
+       "right-upload": "Otpremanje datoteka",
        "right-reupload": "zamenjivanje postojećih datoteka",
        "right-reupload-own": "zamenjivanje sopstvenih datoteka",
        "right-reupload-shared": "menjanje datoteka na deljenom skladištu multimedije",
-       "right-upload_by_url": "otpremanje datoteka sa veb adrese",
+       "right-upload_by_url": "Otpremanje datoteka sa veb-adrese",
        "right-purge": "čišćenje keš memorije stranice bez potvrde",
        "right-autoconfirmed": "bez ograničavanja stavki za IP adrese",
        "right-bot": "smatranje izmena kao automatski proces",
        "right-viewsuppressed": "pregledanje izmena skrivenih od svih korisnika",
        "right-suppressionlog": "pregledanje privatnih dnevnika",
        "right-block": "blokiranje daljih izmena drugih korisnika",
-       "right-blockemail": "onemogućavanje korisnicima da šalju e-poruke",
+       "right-blockemail": "Blokiraj korisniku slanje imejla",
        "right-hideuser": "blokiranje korisničkog imena i njegovo sakrivanje od javnosti",
        "right-ipblock-exempt": "zaobilaženje blokiranja IP adrese, automatska blokiranja i blokiranja opsega",
        "right-unblockself": "deblokiranje samog sebe",
        "right-editmyuserjs": "uređivanje sopstvenih JavaScript datoteka",
        "right-viewmywatchlist": "vidi sopstveni spisak nadgledanja",
        "right-editmywatchlist": "uređivanje sopstvenog spiska nadgledanja; neke preduzete radnje će svejedno dodati stranice na spisak i bez ovog prava",
-       "right-viewmyprivateinfo": "vidite svoje lične podatke (npr. adresu e-pošte, pravo ime)",
-       "right-editmyprivateinfo": "uređivanje sopstvenih ličnih podataka (npr. adresu e-pošte, pravo ime)",
+       "right-viewmyprivateinfo": "Vidite svoje lične podatke (npr. imejl adresu, pravo ime)",
+       "right-editmyprivateinfo": "Уređivanje sopstvenih ličnih podataka (npr. imejl adresa, pravo ime)",
        "right-editmyoptions": "uređivanje sopstvenih podešavanja",
        "right-rollback": "brzo vraćanje izmena poslednjeg korisnika koji je menjao određenu stranicu",
        "right-markbotedits": "označavanje vraćenih izmena kao izmene bota",
        "right-userrights-interwiki": "uređivanje korisničkih prava na drugim vikijima",
        "right-siteadmin": "zaključavanje i otključavanje baze podataka",
        "right-override-export-depth": "izvoz stranica uključujući i povazene stranice do dubine od pet veza",
-       "right-sendemail": "slanje e-poruka drugim korisnicima",
+       "right-sendemail": "Pošalji imejl drugim korisnicima",
        "right-passwordreset": "pregledanje poruka za obnavljanje lozinke",
        "right-managechangetags": "pravljenje i (de)aktiviranje [[Special:Tags|oznaka]]",
        "grant-group-page-interaction": "Uređivanje stranica",
        "grant-editpage": "Uređivanje postojećih stranica",
        "grant-editprotected": "Uređivanje zaštićenih stranica",
        "grant-uploadeditmovefile": "Otpremanje, zamena i premeštanje datoteka",
-       "grant-uploadfile": "Slanje novih datoteka",
+       "grant-uploadfile": "Otpremanje novih datoteka",
        "newuserlogpage": "Dnevnik novih korisnika",
        "newuserlogpagetext": "Ovo je dnevnik novih korisnika.",
        "rightslog": "Dnevnik korisničkih prava",
        "action-move-rootuserpages": "premeštanje osnovnih korisničkih stranica",
        "action-move-categorypages": "premeštanje kategorija",
        "action-movefile": "premeštanje ove datoteke",
-       "action-upload": "slanje ove datoteke",
+       "action-upload": "otpremi ovu datoteku",
        "action-reupload": "zamenjivanje postojeće datoteke",
        "action-reupload-shared": "postavljanje ove datoteke na zajedničko skladište",
-       "action-upload_by_url": "slanje ove datoteke preko URL adrese",
+       "action-upload_by_url": "otpremanje ove datoteke preko veb-adrese",
        "action-writeapi": "pisanje API-ja",
        "action-delete": "brisanje ove stranice",
        "action-deleterevision": "brisanje ove izmene",
        "action-userrights": "uređivanje svih korisničkih prava",
        "action-userrights-interwiki": "uređivanje korisničkih prava na drugim vikijima",
        "action-siteadmin": "zaključavanje ili otključavanje baze podataka",
-       "action-sendemail": "slanje e-poruka",
+       "action-sendemail": "slanje imejlova",
        "action-editmywatchlist": "izmenu sopstvenog spisak nadgledanja",
        "action-viewmywatchlist": "pregled vašeg spisak nadgledanja",
        "action-viewmyprivateinfo": "pregledanje vaših ličnih podataka",
        "recentchanges-page-removed-from-category": "[[:$1]] je uklonjena iz kategorije",
        "recentchanges-page-removed-from-category-bundled": "[[:$1]] i još [[Special:WhatLinksHere/$1|{{PLURAL:$2|jedna stranica|$2 stranice}}]] su uklonjene iz kategorije",
        "autochange-username": "Medijaviki automatska izmena",
-       "upload": "Pošalji datoteku",
-       "uploadbtn": "Pošalji datoteku",
+       "upload": "Otpremi datoteku",
+       "uploadbtn": "Otpremi datoteku",
        "reuploaddesc": "Nazad na obrazac za otpremanje",
        "upload-tryagain": "Pošalji izmenjeni opis datoteke",
        "uploadnologin": "Niste prijavljeni",
-       "uploadnologintext": "Morate biti $1 da biste otpremali datoteke.",
+       "uploadnologintext": "$1 da biste otpremali datoteke.",
        "upload_directory_missing": "Fascikla za slanje ($1) nedostaje i server je ne može napraviti.",
        "upload_directory_read_only": "Server ne može da piše po fascikli za slanje ($1).",
        "uploaderror": "Greška pri otpremanju",
        "uploadwarning-text": "Izmenite opis datoteke i pokušajte ponovo.",
        "savefile": "Sačuvaj datoteku",
        "uploaddisabled": "Otpremanje je onemogućeno.",
-       "copyuploaddisabled": "Slanje putem URL adrese je onemogućeno.",
+       "copyuploaddisabled": "Otpremanje putem veb-adrese je onemogućeno.",
        "uploaddisabledtext": "Otpremanje datoteka je onemogućeno.",
-       "php-uploaddisabledtext": "Slanje datoteka je onemogućeno u PHP-u.\nProverite postavke file_uploads.",
+       "php-uploaddisabledtext": "Otpremanje datoteka je onemogućeno u PHP-u.\nProverite podešavanja file_uploads.",
        "uploadscripted": "Datoteka sadrži HTML ili skriptni kod koji može biti pogrešno protumačen od strane pregledača.",
        "uploadscriptednamespace": "Ova SVG datoteka sadrži pogrešan imenski prostor „$1“",
        "uploadvirus": "Datoteka sadrži virus!\nDetalji: $1",
        "destfilename": "Naziv:",
        "upload-maxfilesize": "Maksimalna veličina datoteke: $1",
        "upload-description": "Opis datoteke",
-       "upload-options": "Postavke slanja",
+       "upload-options": "Postavke otpremanja",
        "watchthisupload": "Nadgledaj ovu datoteku",
        "filewasdeleted": "Datoteka s ovim nazivom je ranije poslata, ali je obrisana.\nProverite $1 pre nego što nastavite s ponovnim slanjem.",
        "filename-bad-prefix": "Naziv datoteke koju šaljete počinje sa <strong>„$1“</strong>, a njega obično dodeljuju digitalni fotoaparati.\nIzaberite naziv datoteke koji opisuje njen sadržaj.",
        "upload-dialog-button-cancel": "Otkaži",
        "upload-dialog-button-done": "Gotovo",
        "upload-dialog-button-save": "Sačuvaj",
-       "upload-dialog-button-upload": "Pošalji",
+       "upload-dialog-button-upload": "Otpremi",
        "upload-form-label-infoform-title": "Detalji",
        "upload-form-label-infoform-name": "Ime",
        "upload-form-label-infoform-description": "Opis",
        "invalid-chunk-offset": "Neispravna polazna tačka",
        "img-auth-accessdenied": "Pristup je odbijen",
        "img-auth-nopathinfo": "Nedostaje PATH_INFO.\nVaš server nije podešen da prosleđuje ovakve podatke.\nMožda je zasnovan na CGI-ju koji ne podržava img_auth.\nPogledajte https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization?uselang=sr-ec.",
-       "img-auth-notindir": "Zahtevana putanja nije u podešenoj fascikli za slanje.",
+       "img-auth-notindir": "Zahtevana putanja nije u podešenoj fascikli za otpremanje.",
        "img-auth-badtitle": "Ne mogu da stvorim ispravan naslov za „$1“.",
        "img-auth-nologinnWL": "Niste prijavljeni i „$1“ nije na spisku dozvoljenih.",
        "img-auth-nofile": "Datoteka „$1“ ne postoji.",
        "http-bad-status": "Došlo je do problema tokom zahteva HTTP: $1 $2",
        "upload-curl-error6": "Ne mogu da pristupim adresi",
        "upload-curl-error6-text": "Ne mogu da pristupim navedenoj adresi.\nProverite da li je adresa ispravna i dostupna.",
-       "upload-curl-error28": "Slanje je isteklo",
+       "upload-curl-error28": "Otpremanje je isteklo",
        "upload-curl-error28-text": "Server ne odgovara na upit.\nProverite da li sajt radi, malo osačekajte i pokušajte ponovo.\nProbajte kasnije kada bude manje opterećenje.",
        "license": "Licenca:",
        "license-header": "Licenca:",
        "sharedupload-desc-create": "Ova datoteka se nalazi na $1 i može da se koristi na drugim projektima.\nNjen opis možete da izmenite na [$2 odgovarajućoj stranici].",
        "filepage-nofile": "Ne postoji datoteka s ovim nazivom.",
        "filepage-nofile-link": "Ne postoji datoteka s ovim nazivom, ali je možete [$1 poslati].",
-       "uploadnewversion-linktext": "Pošalji novu verziju ove datoteke",
+       "uploadnewversion-linktext": "Otpremi novu verziju ove datoteke",
        "shared-repo-from": "iz $1",
        "shared-repo": "zajedničko skladište",
        "shared-repo-name-wikimediacommons": "Vikimedijina ostava",
        "nopagetext": "Tražena stranica ne postoji.",
        "pager-newer-n": "{{PLURAL:$1|noviji 1|novija $1|novijih $1}}",
        "pager-older-n": "{{PLURAL:$1|stariji 1|starijih $1}}",
-       "suppress": "Nadzor",
+       "suppress": "Revizija",
        "querypage-disabled": "Ova posebna stranica je onemogućena radi poboljšanja performansi.",
        "apihelp": "API pomoć",
        "apihelp-no-such-module": "Modul „$1“ nije pronađen.",
        "trackingcategories-nodesc": "Opis nije dostupan.",
        "trackingcategories-disabled": "Kategorija je onemogućena",
        "mailnologin": "Nema adrese za slanje",
-       "mailnologintext": "Morate biti [[Special:UserLogin|prijavljeni]] i imati ispravnu e-adresu u [[Special:Preferences|podešavanjima]] da biste slali e-poruke drugim korisnicima.",
-       "emailuser": "Pošalji e-poruku",
-       "emailuser-title-target": "Slanje e-poruke {{GENDER:$1|korisniku|korisnici|korisniku}}",
-       "emailuser-title-notarget": "Slanje e-poruke korisniku",
-       "emailpagetext": "Možete da koristite donji obrazac da pošaljete e-poruku {{GENDER:$1|ovom korisniku|ovoj korisnici}}.\nE-adresa koju ste uneli u vašim [[Special:Preferences|podešavanjima]] će se prikazati u polju „Od“, tako da će primalac moći da vam odgovori direktno.",
-       "defemailsubject": "{{SITENAME}} — E-pošta od {{GENDER:$1|korisnika|korisnice}} $1",
-       "usermaildisabled": "Korisnička e-pošta je onemogućena",
-       "usermaildisabledtext": "Ne možete da šaljete e-poruke drugim korisnicima na ovom vikiju",
-       "noemailtitle": "Nema e-adrese",
-       "noemailtext": "Ovaj korisnik nije naveo ispravnu e-adresu.",
-       "nowikiemailtext": "Ovaj korisnik je odlučio da ne prima e-poruke od drugih korisnika.",
+       "mailnologintext": "Morate biti [[Special:UserLogin|prijavljeni]] i imati ispravnu imejl adresu u [[Special:Preferences|podešavanjima]] da biste slali imejlove drugim korisnicima.",
+       "emailuser": "Pošalji imejl",
+       "emailuser-title-target": "Slanje imejla {{GENDER:$1|korisniku|korisnici}}",
+       "emailuser-title-notarget": "Slanje imejla korisniku",
+       "emailpagetext": "Možete da koristite donji obrazac da pošaljete imejl {{GENDER:$1|ovom korisniku|ovoj korisnici}}.\nImejl koji ste uneli u vašim [[Special:Preferences|podešavanjima]] će se prikazati u polju „Od“, tako da će primalac moći da vam odgovori direktno.",
+       "defemailsubject": "{{SITENAME}} — Imejl od {{GENDER:$1|korisnika|korisnice}} „$1”",
+       "usermaildisabled": "Korisnički imejl je onemogućen",
+       "usermaildisabledtext": "Ne možete da šaljete imejlove drugim korisnicima na ovom vikiju",
+       "noemailtitle": "Nema imejl adrese",
+       "noemailtext": "Ovaj korisnik nije naveo ispravnu imejl adresu.",
+       "nowikiemailtext": "Ovaj korisnik je odlučio da ne prima imejlove od drugih korisnika.",
        "emailnotarget": "Nepostojeće ili neispravno korisničko ime primaoca.",
        "emailtarget": "Unos korisničkog imena primaoca",
        "emailusername": "Korisničko ime:",
        "emailusernamesubmit": "Pošalji",
-       "email-legend": "Slanje e-poruka drugom korisniku",
+       "email-legend": "Pošalji imejl drugom korisniku",
        "emailfrom": "Od:",
        "emailto": "Za:",
        "emailsubject": "Naslov:",
        "emailmessage": "Poruka:",
        "emailsend": "Pošalji",
-       "emailccme": "Pošalji mi kopiju poruke na moju e-poštu.",
+       "emailccme": "Pošalji mi kopiju poruke na moj imejl.",
        "emailccsubject": "Kopija vaše poruke korisniku $1: $2",
-       "emailsent": "Poruka je poslata",
-       "emailsenttext": "Vaša e-poruka je poslata.",
-       "emailuserfooter": "Ovu e-poruku je {{GENDER:$1|poslao|poslala}} $1 {{GENDER:$2|korisniku|korisnici}} $2 pomoću „{{int:emailuser}}“ s vikija {{SITENAME}}.",
+       "emailsent": "Imejl je poslat",
+       "emailsenttext": "Vaša imejl poruka je poslata.",
+       "emailuserfooter": "Ovaj imejl je {{GENDER:$1|poslao|poslala}} $1 {{GENDER:$2|korisniku|korisnici}} $2 pomoću „{{int:emailuser}}“ s vikija {{SITENAME}}.",
        "usermessage-summary": "Slanje sistemske poruke.",
        "usermessage-editor": "Uređivač sistemskih poruka",
        "usermessage-template": "MediaWiki:UserMessage",
        "notanarticle": "Nije stranica sa sadržajem",
        "notvisiblerev": "Izmena je obrisana",
        "watchlist-details": "Imate {{PLURAL:$1|$1 stranica|$1 stranice|$1 stranica}} na vašem spisku nadgledanja, ne računajući stranice za razgovor.",
-       "wlheader-enotif": "Obaveštenje e-porukom je omogućeno.",
+       "wlheader-enotif": "Obaveštenje imejlom je omogućeno.",
        "wlheader-showupdated": "Stranice koje su izmenjene otkad ste ih poslednji put posetili su '''podebljane'''.",
        "wlnote": "Ispod {{PLURAL:$1|je poslednja izmena|su poslednje <strong>$1</strong> izmene|je poslednjih <strong>$1</strong> izmena}} u {{PLURAL:$2|prethodnom satu|prethodna <strong>$2</strong> sata|prethodnih <strong>$2</strong> sati}}, zaključno sa $3, $4.",
        "wlshowlast": "Prikaži poslednjih $1 sati, $2 dana",
        "enotif_subject_created": "Stranicu $1 na {{SITENAME}} {{GENDER:$2|napravio je|napravila je}} $2",
        "enotif_subject_moved": "Stranicu $1 na {{SITENAME}} {{GENDER:$2|premestio je|premestila je}} $2",
        "enotif_subject_restored": "Stranicu $1 na {{SITENAME}} {{GENDER:$2|vratio je|vratila je}} $2",
-       "enotif_subject_changed": "Stranicu $1 na {{SITENAME}} {{GENDER:$2|promenio je|promenila je}} $2",
+       "enotif_subject_changed": "Stranicu $1 na {{SITENAME}} {{GENDER:$2|promenio|promenila}} je $2",
        "enotif_body_intro_deleted": "Stranicu $1 na {{SITENAME}} {{GENDER:$2|obrisao|obrisala}} je $2 dana $PAGEEDITDATE Pogledajte $3.",
        "enotif_body_intro_created": "Stranicu $1 na {{SITENAME}} {{GENDER:$2|napravio|napravila}} je $2 dana $PAGEEDITDATE Trenutna izmena nalazi se na $3.",
        "enotif_body_intro_moved": "Stranicu $1 na {{SITENAME}} {{GENDER:$2|premestio|premestila}} je $2 dana $PAGEEDITDATE Trenutna izmena nalazi se na  $3.",
        "enotif_lastvisited": "Pogledajte $1 za sve izmene od vaše poslednje posete.",
        "enotif_lastdiff": "Pogledajte $1 da vidite ovu izmenu.",
        "enotif_anon_editor": "anoniman korisnik $1",
-       "enotif_body": "Poštovani $WATCHINGUSERNAME,\n \t\n$PAGEINTRO $NEWPAGE\n\nOpis: $PAGESUMMARY $PAGEMINOREDIT\n\nKontakt:\ne-pošta: $PAGEEDITOR_EMAIL\nviki: $PAGEEDITOR_WIKI\n\nNeće biti drugih obaveštenja u slučaju daljih izmena ukoliko ne posetite ovu stranicu kada ste prijavljeni.\nMožete i da poništite postavke obaveštenja za sve stranice u vašem spisku nadgledanja.\n\nSrdačan pozdrav, {{SITENAME}}\n\n--\nDa biste promenili postavke u vezi sa e-obaveštenjima, posetite\n{{canonicalurl:{{#special:Preferences}}}}\n\nDa biste promenili postavke u vezi sa spiskom nadgledanja, posetite\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nDa biste uklonili ovu stranicu sa spiska nadgledanja, posetite\n$UNWATCHURL\n\nPodrška i dalja pomoć:\n$HELPPAGE",
+       "enotif_body": "Poštovani $WATCHINGUSERNAME,\n \t\n$PAGEINTRO $NEWPAGE\n\nOpis: $PAGESUMMARY $PAGEMINOREDIT\n\nKontakt:\nmejl: $PAGEEDITOR_EMAIL\nviki: $PAGEEDITOR_WIKI\n\nNeće biti drugih obaveštenja u slučaju daljih izmena ukoliko ne posetite ovu stranicu kada ste prijavljeni.\nMožete i da poništite postavke obaveštenja za sve stranice u vašem spisku nadgledanja.\n\nSrdačan pozdrav, {{SITENAME}}\n\n--\nDa biste promenili postavke imejl obaveštenja, posetite\n{{canonicalurl:{{#special:Preferences}}}}\n\nDa biste promenili postavke spiska nadgledanja, posetite\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nDa biste uklonili ovu stranicu sa spiska nadgledanja, posetite\n$UNWATCHURL\n\nPodrška i dalja pomoć:\n$HELPPAGE",
        "created": "napravljena",
        "changed": "izmenjena",
        "deletepage": "Obriši stranicu",
        "protectedarticle": "je zaštitio „[[$1]]“",
        "modifiedarticleprotection": "promenjen stepen zaštite za „[[$1]]“",
        "unprotectedarticle": "je skinuo zaštitu sa stranice „[[$1]]“",
-       "movedarticleprotection": "je premestio postavke zaštite sa „[[$2]]“ na „[[$1]]“",
+       "movedarticleprotection": "je premestio podešavanja zaštite sa „[[$2]]“ na „[[$1]]“",
        "protect-title": "Stepen zaštite za „$1“",
        "protect-title-notallowed": "Pregled stepena zaštite za „$1“",
        "prot_1movedto2": "je premestio [[$1]] na [[$2]]",
        "restriction-edit": "uređivanje",
        "restriction-move": "premeštanje",
        "restriction-create": "pravljenje",
-       "restriction-upload": "slanje",
+       "restriction-upload": "otpremanje",
        "restriction-level-sysop": "potpuno zaštićeno",
        "restriction-level-autoconfirmed": "poluzaštićeno",
        "restriction-level-all": "svi nivoi",
        "sp-contributions-newbies-sub": "Za nove korisnike",
        "sp-contributions-newbies-title": "Doprinosi novih korisnika",
        "sp-contributions-blocklog": "dnevnik blokiranja",
-       "sp-contributions-deleted": "obrisani doprinosi",
+       "sp-contributions-deleted": "obrisani {{GENDER:$1|doprinosi}}",
        "sp-contributions-uploads": "otpremanja",
        "sp-contributions-logs": "dnevnici",
        "sp-contributions-talk": "razgovor",
        "ipbreason-dropdown": "*Najčešći razlozi za blokiranje\n** Unošenje lažnih informacija\n** Uklanjanje sadržaja sa stranica\n** Postavljanje veza do spoljašnjih sajtova\n** Unošenje besmislica u stranice\n** Nepristojno ponašanje\n** Upotreba više naloga\n** Neprihvatljivo korisničko ime",
        "ipb-hardblock": "Onemogući prijavljenim korisnicima da uređuju s ove IP adrese",
        "ipbcreateaccount": "Onemogući otvaranje naloga",
-       "ipbemailban": "Onemogući korisniku da šalje e-poruke",
+       "ipbemailban": "Spreči korisnika da šalje imejlove",
        "ipbenableautoblock": "Automatski blokiraj poslednju IP adresu ovog korisnika i sve daljnje adrese s kojih pokuša da uređuje",
        "ipbsubmit": "Blokiraj ovog korisnika",
        "ipbother": "Drugo vreme:",
        "anononlyblock": "samo anonimni",
        "noautoblockblock": "automatsko blokiranje je onemogućeno",
        "createaccountblock": "otvaranje naloga je onemogućeno",
-       "emailblock": "e-pošta je blokirana",
+       "emailblock": "imejl je onemogućen",
        "blocklist-nousertalk": "zabranjeno uređivanje sopstvene stranice za razgovor",
        "ipblocklist-empty": "Spisak blokiranja je prazan.",
        "ipblocklist-no-results": "Tražena IP adresa ili korisničko ime nije blokirano.",
        "unblocklink": "deblokiraj",
        "change-blocklink": "promeni blokiranje",
        "contribslink": "doprinosi",
-       "emaillink": "pošalji e-poruku",
+       "emaillink": "pošalji imejl",
        "autoblocker": "Automatski ste blokirani jer delite IP adresu s korisnikom/com [[User:$1|$1]].\nRazlog blokiranja: „$2“",
        "blocklogpage": "Dnevnik blokiranja",
        "blocklog-showlog": "{{GENDER:$1|Ovaj korisnik je ranije blokiran|Ova korisnica je ranije blokirana|Ovaj korisnik je ranije blokiran}}.\nIstorija blokiranja se nalazi ispod:",
        "block-log-flags-anononly": "samo anonimni korisnici",
        "block-log-flags-nocreate": "onemogućeno otvaranje naloga",
        "block-log-flags-noautoblock": "automatsko blokiranje je onemogućeno",
-       "block-log-flags-noemail": "e-pošta je blokirana",
+       "block-log-flags-noemail": "imejl je onemogućen",
        "block-log-flags-nousertalk": "zabranjeno uređivanje sopstvene stranice za razgovor",
        "block-log-flags-angry-autoblock": "prošireno automatsko blokiranje je omogućeno",
        "block-log-flags-hiddenname": "korisničko ime je sakriveno",
        "tooltip-search": "Pretraga",
        "tooltip-search-go": "Idite na stranicu s ovim imenom, ako postoji",
        "tooltip-search-fulltext": "Pretražite stranice s ovim tekstom",
-       "tooltip-p-logo": "Posetite naslovnu stranu",
-       "tooltip-n-mainpage": "Posetite naslovnu stranu",
-       "tooltip-n-mainpage-description": "Posetite naslovnu stranu",
+       "tooltip-p-logo": "Posetite glavnu stranu",
+       "tooltip-n-mainpage": "Posetite glavnu stranu",
+       "tooltip-n-mainpage-description": "Posetite glavnu stranu",
        "tooltip-n-portal": "O projektu, šta možete da radite i gde da pronađete stvari",
        "tooltip-n-currentevents": "Saznajte više o tekućim događajima",
        "tooltip-n-recentchanges": "Spisak skorašnjih izmena na vikiju",
        "tooltip-t-contributions": "Spisak doprinosa {{GENDER:$1|ovog korisnika|ove korisnice}}",
        "tooltip-t-emailuser": "Pošaljite imejl {{GENDER:$1|ovom korisniku|ovoj korisnici}}",
        "tooltip-t-info": "Više informacija o ovoj stranici",
-       "tooltip-t-upload": "Pošaljite datoteke",
+       "tooltip-t-upload": "Otpremi datoteke",
        "tooltip-t-specialpages": "Spisak svih posebnih stranica",
        "tooltip-t-print": "Verzija ove stranice za štampanje",
        "tooltip-t-permalink": "Stalna veza ka ovoj izmeni stranice",
        "lastmodifiedatby": "Ovu stranicu je poslednji put {{GENDER:$4|izmenio|izmenila|izmenio}} $3, $1 u $2.",
        "othercontribs": "Zasnovano na radu korisnika $1.",
        "others": "drugi",
-       "siteusers": "{{PLURAL:$2|korisnik|korisnici}} na projektu {{SITENAME}} $1",
+       "siteusers": "{{PLURAL:$2|1={{GENDER:$1|korisnik|korisnica}}|korisnici}} na projektu {{SITENAME}} $1",
        "anonusers": "{{PLURAL:$2|anoniman korisnik|anonimni korisnici}} na projektu {{SITENAME}} $1",
        "creditspage": "Autori stranice",
        "nocredits": "Ne postoje podaci o autoru ove stranice.",
        "pageinfo-robot-index": "Dozvoljeno",
        "pageinfo-robot-noindex": "Nije dozvoljeno",
        "pageinfo-watchers": "Broj nadgledača stranicе",
+       "pageinfo-visiting-watchers": "Broj nadgledača stranice koji su posjetili skorašnje izmjene",
        "pageinfo-few-watchers": "Manje od $1 {{PLURAL:$1|pratioca|pratilaca}}",
        "pageinfo-redirects-name": "Broj preusmerenja na ovu stranicu",
        "pageinfo-subpages-name": "Podstranice ove stranice",
        "exif-urgency-other": "Prilagođeni prioritet ($1)",
        "namespacesall": "svi",
        "monthsall": "sve",
-       "confirmemail": "Potvrda e-adrese",
-       "confirmemail_noemail": "Niste uneli ispravnu e-adresu u [[Special:Preferences|podešavanjima]].",
-       "confirmemail_text": "{{SITENAME}} zahteva da potvrdite e-adresu pre nego što počnete da koristite mogućnosti e-pošte.\nKliknite na dugme ispod za slanje poruke na vašu e-adresu.\nU poruci će se nalaziti veza s potvrdnim kodom;\nunesite je u pregledač da biste potvrdili da je vaša e-adresa ispravna.",
+       "confirmemail": "Potvrda imejl adrese",
+       "confirmemail_noemail": "Niste uneli ispravnu imejl adresu u [[Special:Preferences|podešavanjima]].",
+       "confirmemail_text": "{{SITENAME}} zahteva da potvrdite imejl adresu pre nego što počnete da koristite mogućnosti imejla.\nKliknite na dugme ispod za slanje poruke na vašu adresu.\nU poruci će se nalaziti veza s potvrdnim kodom;\nunesite je u pregledač da biste potvrdili da je vaša imejl adresa ispravna.",
        "confirmemail_pending": "Potvrdni kod vam je već poslat. Ako ste upravo otvorili nalog, onda verovatno treba da sačekate nekoliko minuta da pristigne, pre nego što ponovo zatražite novi kod.",
        "confirmemail_send": "Pošalji potvrdni kod",
        "confirmemail_sent": "Potvrdna poruka je poslata.",
-       "confirmemail_oncreate": "Poslat je potvrdni kod na vašu e-adresu.\nOvaj kod nije potreban za prijavljivanje, ali vam treba da biste uključili mogućnosti e-pošte na vikiju.",
-       "confirmemail_sendfailed": "{{SITENAME}} ne može da pošalje poruku.\nProverite da li je e-adresa pravilno napisana.\n\nGreška: $1",
+       "confirmemail_oncreate": "Poslat je potvrdni kod na vašu imejl adresu.\nOvaj kod nije potreban za prijavljivanje, ali vam treba da biste uključili mogućnosti imejla na vikiju.",
+       "confirmemail_sendfailed": "{{SITENAME}} ne može da pošalje imejl potvrdu.\nProverite da li je imejl adresa pravilno napisana.\n\nGreška: $1",
        "confirmemail_invalid": "Potvrdni kod je neispravan. Verovatno je istekao.",
-       "confirmemail_needlogin": "Morate biti $1 da biste potvrdili e-adresu.",
-       "confirmemail_success": "Vaša e-adresa je potvrđena.\nSada možete da se [[Special:UserLogin|prijavite]]. Želimo vam prijatan boravak na vikiju.",
-       "confirmemail_loggedin": "Vaša e-adresa je sada potvrđena.",
-       "confirmemail_subject": "{{SITENAME}} – potvrda e-adrese",
-       "confirmemail_body": "Neko, verovatno vi, sa IP adrese $1 je otvorio nalog „$2“ na vikiju {{SITENAME}}, navodeći ovu e-adresu.\n\nDa potvrdite da ovaj nalog stvarno pripada vama, kao i da\nomogućite mogućnosti e-pošte, otvorite ovu vezu u pregledaču:\n\n$3\n\nUkoliko niste otvorili nalog, pratite vezu\nispod kako biste prekinuli postupak upisa:\n\n$5\n\nOvaj potvrdni kod ističe $6 u $5.",
-       "confirmemail_body_changed": "Neko, verovatno vi, sa IP adrese $1 je promenio e-adresu naloga „$2“ u ovu adresu na vikiju {{SITENAME}}.\n\nDa biste potvrdili da ovaj nalog stvarno pripada vama i ponovo aktivirali mogućnosti e-pošte, otvorite sledeću vezu u pregledaču:\n\n$3\n\nAko nalog *ne* pripada vama, pratite sledeću vezu da otkažete potvrdu e-adrese:\n\n$5\n\nOvaj potvrdni kod ističe $6 u $7",
-       "confirmemail_body_set": "Neko, verovatno vi, sa IP adrese $1 je promenio e-adresu naloga „$2“ u ovu adresu na {{SITENAME}}.\n\nDa bismo potvrdili da ovaj nalog stvarno pripada vama i ponovo aktivirali mogućnosti e-pošte na {{SITENAME}}, otvorite sledeću vezu u pregledaču:\n\n$3\n\nAko nalog *ne* pripada vama, pratite sledeću vezu da otkažete potvrdu e-adrese:\n\n$5\n\nOvaj potvrdni kod ističe $4.",
-       "confirmemail_invalidated": "Potvrda e-pošte je otkazana",
-       "invalidateemail": "Otkazivanje potvrde e-pošte",
+       "confirmemail_needlogin": "Morate biti $1 da biste potvrdili imejl adresu.",
+       "confirmemail_success": "Vaša imejl adresa je potvrđena.\nSada možete da se [[Special:UserLogin|prijavite]] i uživate u vikiju.",
+       "confirmemail_loggedin": "Vaša imejl adresa je sada potvrđena.",
+       "confirmemail_subject": "{{SITENAME}} – potvrda imejl adrese",
+       "confirmemail_body": "Neko, verovatno vi, sa IP adrese $1,\notvorio je nalog „$2“ sa ovom imejl adresom na vikiju {{SITENAME}}.\n\nDa potvrdite da ovaj nalog stvarno pripada vama i da aktivirate\nmogućnosti imejla na vikiju {{SITENAME}}, otvorite ovu vezu u pregledaču:\n\n$3\n\nUkoliko nalog *ne* pripada vama, pratite vezu\nda otkažete potvrdu imejl adrese:\n\n$5\n\nOvaj potvrdni kod ističe u $4.",
+       "confirmemail_body_changed": "Neko, verovatno vi, sa IP adrese $1,\npromenio je imejl adresu naloga „$2“ u ovu adresu na vikiju {{SITENAME}}.\n\nDa biste potvrdili da ovaj nalog stvarno pripada vama i ponovo aktivirali mogućnosti imejla, otvorite sledeću vezu u pregledaču:\n\n$3\n\nAko nalog *ne* pripada vama, pratite sledeću vezu da otkažete potvrdu imejl adrese:\n\n$5\n\nOvaj potvrdni kod ističe $6 u $7",
+       "confirmemail_body_set": "Neko, verovatno vi, sa IP adrese $1,\npromenio je imejl adresu naloga „$2“ u ovu adresu na {{SITENAME}}.\n\nDa bismo potvrdili da ovaj nalog stvarno pripada vama i ponovo aktivirali\nmogućnosti imejla na {{SITENAME}}, otvorite sledeću vezu u pregledaču:\n\n$3\n\nAko nalog *ne* pripada vama, pratite sledeću vezu da otkažete potvrdu imejl adrese:\n\n$5\n\nOvaj potvrdni kod ističe $4.",
+       "confirmemail_invalidated": "Potvrda imejl adrese je otkazana",
+       "invalidateemail": "Otkazivanje potvrde imejla",
        "scarytranscludedisabled": "[Međuviki uključivanje šablona je onemogućeno]",
        "scarytranscludefailed": "[Dobavljanje šablona za $1 nije uspelo]",
        "scarytranscludefailed-httpstatus": "[Ne mogu da preuzmem šablon $1: HTTP $2]",
        "tags-actions-header": "Radnje",
        "tags-active-yes": "Da",
        "tags-active-no": "Ne",
-       "tags-source-extension": "Deo ekstenzije",
+       "tags-source-extension": "Deo Medijavikija",
        "tags-source-manual": "Ručno je dodaju korisnici i botovi",
        "tags-source-none": "Van upotrebe",
        "tags-edit": "uredi",
        "htmlform-title-not-exists": "$1 ne postoji.",
        "htmlform-user-not-exists": "<strong>$1</strong> ne postoji.",
        "htmlform-user-not-valid": "<strong>$1</strong> nije ispravno korisničko ime.",
-       "sqlite-has-fts": "$1 s podrškom pretrage celog teksta",
-       "sqlite-no-fts": "$1 bez podrške pretrage celog teksta",
        "logentry-delete-delete": "$1 je {{GENDER:$2|obrisao|obrisala}} stranicu $3",
        "logentry-delete-restore": "$1 je {{GENDER:$2|vratio|vratila}} stranicu $3",
        "logentry-delete-event": "$1 je {{GENDER:$2|promenio|promenila}} vidljivost {{PLURAL:$5|1=događaja|$5 događaja}} u dnevniku $3: $4",
        "logentry-newusers-newusers": "$1 je {{GENDER:$2|otvorio|otvorila}} korisnički nalog",
        "logentry-newusers-create": "$1 je {{GENDER:$2|otvorio|otvorila}} korisnički nalog",
        "logentry-newusers-create2": "$1 je {{GENDER:$2|otvorio|otvorila}} korisnički nalog $3",
-       "logentry-newusers-byemail": "$1 je {{GENDER:$2|otvorio|otvorila}} korisnički nalog $3 i lozinka je poslata na e-poštu",
+       "logentry-newusers-byemail": "$1 je {{GENDER:$2|otvorio|otvorila}} korisnički nalog $3 i lozinka je poslata na imejl",
        "logentry-newusers-autocreate": "Korisnički nalog $1 je automatski {{GENDER:$2|otvoren}}",
        "logentry-protect-move_prot": "$1 je {{GENDER:$2|premestio|premestila}} postavke zaštite sa $4 na $3",
        "logentry-protect-unprotect": "$1 je {{GENDER:$2|skinuo|skinula}} zaštitu sa stranice $3",
        "feedback-cancel": "Otkaži",
        "feedback-close": "Urađeno",
        "feedback-external-bug-report-button": "Prijavi bag",
-       "feedback-error-title": "Greška",
        "feedback-error1": "Greška: neprepoznat rezultat od API-ja",
        "feedback-error2": "Greška: uređivanje nije uspelo",
        "feedback-error3": "Greška: nema odgovora od API-ja",
        "mediastatistics-header-total": "Sve datoteke",
        "json-error-syntax": "Greška u sintaksi",
        "headline-anchor-title": "Veza do ovog odeljka",
-       "special-characters-group-latin": "latinica",
+       "special-characters-group-latin": "Latinica",
        "special-characters-group-latinextended": "proširena latinica",
        "special-characters-group-ipa": "IPA",
        "special-characters-group-symbols": "Simboli",
        "mw-widgets-dateinput-placeholder-month": "GGGG-MM",
        "mw-widgets-titleinput-description-new-page": "stranica još uvek ne postoji",
        "mw-widgets-titleinput-description-redirect": "preusmerava na $1",
-       "randomrootpage": "Slučajna korenska stranica"
+       "randomrootpage": "Slučajna korenska stranica",
+       "log-action-filter-upload-upload": "Novo otpremanje",
+       "authmanager-email-label": "Imejl",
+       "authmanager-email-help": "Imejl adresa",
+       "changecredentials": "Promjena akreditiva"
 }
index 3ea3fc4..f54faad 100644 (file)
        "tog-enotifminoredits": "Skicka mig e-post även för mindre ändringar av sidor och filer",
        "tog-enotifrevealaddr": "Visa min e-postadress i e-postmeddelanden om ändringar som skickas till andra",
        "tog-shownumberswatching": "Visa antalet användare som bevakar",
-       "tog-oldsig": "Nuvarande signatur:",
+       "tog-oldsig": "Din nuvarande signatur:",
        "tog-fancysig": "Behandla signatur som wikitext (utan en automatisk länk)",
        "tog-uselivepreview": "Använd direktuppdaterad förhandsgranskning",
        "tog-forceeditsummary": "Påminn mig om jag inte fyller i en redigeringskommentar",
        "tog-showhiddencats": "Visa dolda kategorier",
        "tog-norollbackdiff": "Visa inte diff efter tillbakarullning",
        "tog-useeditwarning": "Varna mig om jag lämnar en redigeringssida där jag gjort ändringar men inte sparat.",
-       "tog-prefershttps": "Använd alltid en säker anslutning när jag är inloggad",
+       "tog-prefershttps": "Använd alltid en säker anslutning medan jag är inloggad",
        "underline-always": "Alltid",
        "underline-never": "Aldrig",
        "underline-default": "Webbläsarens eller utseendets standardinställning",
        "newwindow": "(öppnas i ett nytt fönster)",
        "cancel": "Avbryt",
        "moredotdotdot": "Mer...",
-       "morenotlisted": "Denna lista är inte fullständig.",
+       "morenotlisted": "Denna lista är kanske inte fullständig.",
        "mypage": "Sida",
        "mytalk": "Diskussion",
        "anontalk": "Diskussion",
        "talk": "Diskussion",
        "views": "Visningar",
        "toolbox": "Verktyg",
+       "tool-link-userrights": "Ändra {{GENDER:$1|användargrupper}}",
+       "tool-link-emailuser": "Skicka e-post till denna {{GENDER:$1|användare}}",
        "userpage": "Visa användarsida",
        "projectpage": "Visa projektsida",
        "imagepage": "Visa filsida",
        "eauthentsent": "Ett e-postmeddelande för bekräftelse har skickats till den angivna e-postadressen.\nInnan någon annan e-post kan skickas till kontot, måste du följa instruktionerna i e-postmeddelandet för att bekräfta att kontot verkligen är ditt.",
        "throttled-mailpassword": "En lösenordsåterställning har redan skickats för mindre än {{PLURAL:$1|en timme|$1 timmar}} sedan.\nFör att förhindra missbruk skickas bara en lösenordsåterställning per {{PLURAL:$1|timme|$1-timmarsperiod}}.",
        "mailerror": "Fel vid skickande av e-post: $1",
-       "acct_creation_throttle_hit": "Besökare till den här wikin som har använt din IP-adress har skapat {{PLURAL:$1|ett användarkonto|$1 användarkonton}} under det senaste dygnet, vilket är det maximalt tillåtna inom den tidsperioden.\nSom ett resultat kan besökare som använder den här IP-adressen inte skapa några fler användarkonton just nu.",
+       "acct_creation_throttle_hit": "Besökare till den här wikin som har använt din IP-adress har skapat {{PLURAL:$1|ett användarkonto|$1 användarkonton}} under det senaste $2, vilket är det maximalt tillåtna inom den tidsperioden.\nSom ett resultat kan besökare som använder den här IP-adressen inte skapa några fler användarkonton just nu.",
        "emailauthenticated": "Din e-postadress bekräftades den $2 kl. $3.",
        "emailnotauthenticated": "Din e-postadress är ännu inte bekräftad. Ingen e-post kommer att skickas vad gäller det följande funktionerna.",
        "noemailprefs": "Uppge en e-postadress i dina inställningar för att få dessa funktioner att fungera.",
        "botpasswords-label-resetpassword": "Återställ lösenordet",
        "botpasswords-label-grants": "Tillgängliga beviljanden:",
        "botpasswords-help-grants": "Varje beviljande ger åtkomst till listade användarrättigheter som ett användarkonto redan har. Se [[Special:ListGrants|tabellen över beviljanden]] för mer information.",
-       "botpasswords-label-restrictions": "Användningsbegränsningar:",
        "botpasswords-label-grants-column": "Beviljas",
        "botpasswords-bad-appid": "Botnamnet \"$1\" är inte giltigt.",
        "botpasswords-insert-failed": "Kunde inte lägga till botnamnet \"$1\". Har det redan lagts till?",
        "botpasswords-updated-body": "Botlösenordet för botnamnet \"$1\" till användaren \"$2\" uppdaterades.",
        "botpasswords-deleted-title": "Botlösenord raderades",
        "botpasswords-deleted-body": "Botlösenordet för botnamnet \"$1\" till användaren \"$2\" raderades.",
-       "botpasswords-newpassword": "Det nya lösenordet att logga in för <strong>$1</strong> är <strong>$2</strong>. <em>Spara detta som framtida referens.</em>",
+       "botpasswords-newpassword": "Det nya lösenordet att logga in för <strong>$1</strong> är <strong>$2</strong>. <em>Spara detta som framtida referens.</em> <br> (För äldre botar som kräver att inloggningsnamnet är detsamma som det eventuella användarnamnet kan du även använda <strong>$3</strong> som användarnamn och <strong>$4</strong> som lösenord.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider är inte tillgänglig.",
        "botpasswords-restriction-failed": "Begränsningar av botlösenord tillåter inte denna inloggning.",
        "botpasswords-invalid-name": "Det angivna användarnamnet innehåller inte separatorn för botlösenord (\"$1\").",
        "passwordreset-emailelement": "Användarnamn: \n$1\n\nTillfälligt lösenord: \n$2",
        "passwordreset-emailsentemail": "Om denna e-postadress är associerad med ditt konto kommer en lösenordsåterställning skickas via e-post.",
        "passwordreset-emailsentusername": "Om det finns en e-postadress som associeras med detta användarnamn kommer en lösenordsåterställning skickas via e-post.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|E-postmeddelande|E-postmeddelanden}} för återställning av lösenord har skickats. {{PLURAL:$1|Användarnamnet och lösenordet|Listan över användarnamn och lösenord}} visas nedan.",
-       "passwordreset-emailerror-capture2": "Kunde inte skicka e-post till {{GENDER:$2|användaren}}: $1 {{PLURAL:$3|Användarnamnet och lösenordet|Listan över användarnamn och lösenord}} listas nedan.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|E-postmeddelande|E-postmeddelanden}} för återställning av lösenord har skickats. {{PLURAL:$1|Användarnamnet och lösenordet|Listan över användarnamn och lösenord}} visas här.",
+       "passwordreset-emailerror-capture2": "Kunde inte skicka e-post till {{GENDER:$2|användaren}}: $1 {{PLURAL:$3|Användarnamnet och lösenordet|Listan över användarnamn och lösenord}} listas här.",
        "passwordreset-nocaller": "En användare måste anges",
        "passwordreset-nosuchcaller": "Användare finns inte: $1",
        "passwordreset-ignored": "Lösenordsåterställningen hanterades inte. Kanske ingen leverantör har konfigurerats?",
        "invalid-content-data": "Ogiltig innehållsdata",
        "content-not-allowed-here": "innehåll av \"$1\" är inte tillåtet på sidan [[$2]]",
        "editwarning-warning": "Om du lämnar den här sidan kommer du att förlora alla ändringar du har gjort.\nOm du är inloggad kan du slå av den här varningen under \"{{int:prefs-editing}}\" i dina inställningar.",
+       "editpage-invalidcontentmodel-title": "Innehållsmodellen stöds inte",
+       "editpage-invalidcontentmodel-text": "Innehållsmodellen \"$1\" stöds inte.",
        "editpage-notsupportedcontentformat-title": "Innehållsformat stöds inte",
        "editpage-notsupportedcontentformat-text": "Innehållsformatet $1 stöds inte av innehållsmodellen $2.",
        "content-model-wikitext": "wikitext",
        "searchprofile-advanced-tooltip": "Sök i vissa namnrymder",
        "search-result-size": "$1 ({{PLURAL:$2|1 ord|$2 ord}})",
        "search-result-category-size": "{{PLURAL:$1|1 medlem|$1 medlemmar}} ({{PLURAL:$2|1 underkategori|$2 underkategorier}}, {{PLURAL:$3|1 fil|$3 filer}})",
-       "search-redirect": "(omdirigering $1)",
+       "search-redirect": "(omdirigering från $1)",
        "search-section": "(avsnitt $1)",
        "search-category": "(kategorin $1)",
        "search-file-match": "(överensstämmer filens innehåll)",
        "upload-dialog-disabled": "Filuppladdningar med denna dialogruta har inaktiverats på denna wiki.",
        "upload-dialog-title": "Ladda upp fil",
        "upload-dialog-button-cancel": "Avbryt",
+       "upload-dialog-button-back": "Tillbaka",
        "upload-dialog-button-done": "Klar",
        "upload-dialog-button-save": "Spara",
        "upload-dialog-button-upload": "Ladda upp",
        "apisandbox-results-fixtoken-fail": "Misslyckades att hämta nyckeln \"$1\".",
        "apisandbox-alert-page": "Fälten på denna sida är inte giltiga.",
        "apisandbox-alert-field": "Värdet i detta fält är inte giltigt.",
+       "apisandbox-continue": "Fortsätt",
+       "apisandbox-continue-clear": "Rensa",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} kommer att [https://www.mediawiki.org/wiki/API:Query#Continuing_queries fortsätta] den sista begäran; {{int:apisandbox-continue-clear}} kommer att rensa fortsättningsrelaterade parametrar.",
        "booksources": "Bokkällor",
        "booksources-search-legend": "Sök efter bokkällor",
        "booksources-search": "Sök",
        "movelogpagetext": "Listan nedan visar sidor som flyttats.",
        "movesubpage": "{{PLURAL:$1|Undersida|Undersidor}}",
        "movesubpagetext": "Denna sida har $1 {{PLURAL:$1|undersida|undersidor}} som visas nedan.",
+       "movesubpagetalktext": "Den motsvarande diskussionssidan har $1 {{PLURAL:$1|undersida|undersidor}} som visas nedan.",
        "movenosubpage": "Denna sida har inga undersidor.",
        "movereason": "Anledning:",
        "revertmove": "återställ",
        "pageinfo-category-pages": "Antal sidor",
        "pageinfo-category-subcats": "Antal underkategorier",
        "pageinfo-category-files": "Antal filer",
+       "pageinfo-user-id": "Användar-ID",
        "markaspatrolleddiff": "Märk som patrullerad",
        "markaspatrolledtext": "Märk den här sidan som patrullerad",
        "markaspatrolledtext-file": "Märk denna filversion som patrullerad",
        "newimages-showbots": "Visa uppladdningar av botar",
        "newimages-hidepatrolled": "Dölj patrullerade uppladdningar",
        "noimages": "Ingenting att se.",
+       "gallery-slideshow-toggle": "Växla miniatyrer",
        "ilsubmit": "Sök",
        "bydate": "efter datum",
        "sp-newimages-showfrom": "Visa nya filer från och med kl. $2 den $1",
        "tag-filter": "Filter för [[Special:Tags|märken]]:",
        "tag-filter-submit": "Filter",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Märke|Märken}}]]: $2)",
+       "tag-mw-contentmodelchange": "ändring av innehållsmodell",
+       "tag-mw-contentmodelchange-description": "Redigeringar som [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel ändrar innehållsmodellen] för en sida",
        "tags-title": "Märken",
        "tags-intro": "Denna sida listar de taggar som mjukvaran kan markera en redigering med, och deras betydelse.",
        "tags-tag": "Märkesnamn",
        "tags-actions-header": "Handlingar",
        "tags-active-yes": "Ja",
        "tags-active-no": "Nej",
-       "tags-source-extension": "Definieras av ett tillägg",
+       "tags-source-extension": "Definieras av programvaran",
        "tags-source-manual": "Används manuellt av användare och robotar",
        "tags-source-none": "Används inte längre",
        "tags-edit": "redigera",
        "htmlform-cloner-create": "Lägg till mer",
        "htmlform-cloner-delete": "Ta bort",
        "htmlform-cloner-required": "Det krävs minst ett värde.",
+       "htmlform-date-placeholder": "ÅÅÅÅ-MM-DD",
+       "htmlform-time-placeholder": "TT:MM:SS",
+       "htmlform-datetime-placeholder": "ÅÅÅÅ-MM-DD TT:MM:SS",
+       "htmlform-date-invalid": "Värdet du angav är inte ett igenkänt datum. Prova att använda formatet ÅÅÅÅ-MM-DD.",
+       "htmlform-time-invalid": "Värdet du angav är inte en igenkänd tid. Prova att använda formatet HH:MM:SS.",
+       "htmlform-datetime-invalid": "Värdet du angav är inte ett igenkänt datum och tid. Prova att använda formatet ÅÅÅÅ-MM-DD HH:MM:SS.",
+       "htmlform-date-toolow": "Värdet du angav är innan det tidigaste tillåtna datumet för $1.",
+       "htmlform-date-toohigh": "Värdet du angav är efter det senaste tillåtna datumet $1.",
+       "htmlform-time-toolow": "Värdet du angav är innan den tidigaste tillåtna tiden för $1.",
+       "htmlform-time-toohigh": "Värdet du angav är efter den senaste tillåtna tiden $1.",
+       "htmlform-datetime-toolow": "Värdet du angav är innan det tidigaste tillåtna datumet och tiden för $1.",
+       "htmlform-datetime-toohigh": "Värdet du angav är efter det senaste tillåtna datumet och tiden $1.",
        "htmlform-title-badnamespace": "[[:$1]] är inte i \"{{ns:$2}}\"-namnrymden.",
        "htmlform-title-not-creatable": "\"$1\" är inte en sidtitel som kan skapas",
        "htmlform-title-not-exists": "$1 finns inte.",
        "htmlform-user-not-exists": "<strong>$1</strong> finns inte.",
        "htmlform-user-not-valid": "<strong>$1</strong> är inte ett giltigt användarnamn.",
-       "sqlite-has-fts": "$1 med stöd för fulltextsökning",
-       "sqlite-no-fts": "$1 utan stöd för fulltextsökning",
        "logentry-delete-delete": "$1 {{GENDER:$2|raderade}} sidan $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|återställde}} sidan $3",
        "logentry-delete-event": "$1 {{GENDER:$2|ändrade}} synligheten för {{PLURAL:$5|en logghändelse|$5 logghändelser}} på $3: $4",
        "feedback-external-bug-report-button": "Registrera en teknisk uppgift",
        "feedback-dialog-title": "Skicka återkoppling",
        "feedback-dialog-intro": "Du kan använda det enkla formuläret nedan för att skicka in din återkoppling. Din kommentar kommer att läggas till på sidan \"$1\" tillsammans med ditt användarnamn.",
-       "feedback-error-title": "Fel",
        "feedback-error1": "Fel: Okänt resultat från API",
        "feedback-error2": "Fel: Redigeringen misslyckades",
        "feedback-error3": "Fel: Inget svar från API",
        "feedback-thanks": "Tack! Din feedback har skickats till sidan \"[$2 $1]\".",
        "feedback-thanks-title": "Tack!",
        "feedback-useragent": "Användaragent:",
-       "searchsuggest-search": "Sök",
+       "searchsuggest-search": "Sök på {{SITENAME}}",
        "searchsuggest-containing": "innehåller...",
        "api-error-autoblocked": "Din IP-adress har blockerats automatiskt eftersom den har använts av en blockerad användare.",
        "api-error-badaccess-groups": "Du får inte ladda upp filer till denna wiki.",
        "unlinkaccounts-success": "Kontot avlänkades.",
        "authenticationdatachange-ignored": "Ändringen av autentiseringsdata hanterades inte. Kanske ingen tillhandahållare har konfigurerats?",
        "userjsispublic": "Observera: JavaScript-undersidor bör inte innehålla konfidentiella uppgifter eftersom de kan ses av andra användare.",
-       "usercssispublic": "Observera: CSS-undersidor bör inte innehålla konfidentiella uppgifter eftersom de kan ses av andra användare."
+       "usercssispublic": "Observera: CSS-undersidor bör inte innehålla konfidentiella uppgifter eftersom de kan ses av andra användare.",
+       "restrictionsfield-badip": "Ogiltig IP-adress eller intervall: $1",
+       "restrictionsfield-label": "Tillåtna IP-intervall:",
+       "restrictionsfield-help": "En IP-adress eller CIDR-intervall per rad. För att aktivera allting, använd<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Fel: $1",
+       "edit-error-long": "Fel:\n\n$1"
 }
index 46df1bb..c065fce 100644 (file)
@@ -49,7 +49,8 @@
                        "தமிழ்க்குரிசில்",
                        "Nemo bis",
                        "JAaron95",
-                       "Info-farmer"
+                       "Info-farmer",
+                       "Rakeshonwiki"
                ]
        },
        "tog-underline": "அடிக்கோடிட்டத்தை இணை:",
        "createacct-yourpasswordagain-ph": "கடவுச்சொல்லை மீளவும் இடுக",
        "userlogin-remembermypassword": "இடுபதிந்தே இருக்கவிடவும்",
        "userlogin-signwithsecure": "பாதுகாப்பான தொடர்பை உபயோகிக்கவும்",
+       "cannotlogin-title": "புகுபதிகை இயலாது",
+       "cannotlogin-text": "புகுபதிகை இயலாது.",
        "cannotloginnow-title": "இப்பொழுது விடுபதிகை செய்ய இயலாது.",
        "cannotloginnow-text": "$1-ஐ பயன்படுத்தும் பொழுது விடுபதிகை சாத்தியம் அல்ல.",
+       "cannotcreateaccount-title": "கணக்கைத் தொடங்க முடியாது",
        "yourdomainname": "உங்கள் உரிமைப்பரப்பு:",
        "password-change-forbidden": "நீங்கள் விக்கிகளில் கடவுச் சொற்களை மாற்ற முடியாது",
        "externaldberror": "வெளி உறுதிப்படுத்தலில் ஏற்பட்ட தவறு காரணமாக உங்கள் வெளி கணக்கை இற்றைப்படுத்த முடியாது.",
        "botpasswords-updated-body": "\"$1\" தானியங்கி கடவுச்சொல் முழுமையாக புதிப்பிக்கப்பட்டது.",
        "botpasswords-deleted-title": "தானியங்கி கடவுச்சொல் நீக்கப்பட்டது",
        "botpasswords-deleted-body": "\"$1\"-க்கான தானியங்கி கடவுச்சொல் நீக்கப்பட்டது.",
-       "botpasswords-newpassword": "<strong>$1</strong>-இற்கு புகுபதிகை செய்வதற்கான புதிய கடவுச்சொல் <strong>$2</strong> ஆகும். <em>தயவு செய்து வருங்கால மேற்கோளுக்கு இதனை பதிக.</em>",
+       "botpasswords-newpassword": "<strong>$1</strong>-இற்கு புகுபதிகை செய்வதற்கான புதிய கடவுச்சொல் <strong>$2</strong> ஆகும். <em>தயவு செய்து வருங்கால மேற்கோளுக்கு இதனை பதிக.</em><br>(பழைய முகவர்கள்  பயனாளர் பெயரை உள்ளீட்டிற்கு பயன்படுத்தலாம், மேலும் நீங்கள் <strong>$3</strong> ஐ பயனாளர் பெயராகவும் <strong>$4</strong>  ஐ கடவுச்சொல்லாகவும் பயன்படுத்தலாம்.)",
        "botpasswords-no-provider": "தானியங்கிகடவுச்சொல்அமர்வுவழங்குநர் பயன்பாட்டில் இல்லை.",
        "botpasswords-restriction-failed": "தானியங்கி கடவுச்சொல் புகுபதிகை செய்ய தடுக்கிறது.",
        "botpasswords-invalid-name": "தானியங்கி கடவுச்சொல் பிரிப்பானை (\"$1\") குறிக்கப்பட்ட பயனர் பெயர் கொண்டிருக்கவில்லை.",
        "invalid-content-data": "செல்லாத உள்ளடக்கத் தரவு",
        "content-not-allowed-here": "\"$1\" உள்ளடக்கம் [[$2]] பக்கத்தில் அனுமதிக்கப்படவில்லை.",
        "editwarning-warning": "இந்த பக்கத்தை விட்டு செல்வது நீங்கள் ஏற்படுத்திய மாற்றங்களை இழக்க வழிவகுக்கும்.\nநீங்கள் புகுபதிந்திருந்தால், இந்த எச்சரிக்கையை உங்கள் விருப்பத்தேர்வில் உள்ள \"{{int:prefs-editing}}\" பகுதி மூலம் நீக்கலாம்.",
+       "editpage-invalidcontentmodel-title": "உள்ளடக்க அமைப்பை ஆதரிக்க இயலாது",
+       "editpage-invalidcontentmodel-text": "\"$1\" வகை உள்ளுறை ஏற்பதில்லை.",
        "editpage-notsupportedcontentformat-title": "உள்ளடக்க அமைப்பு ஆதரவில்லாதது",
        "editpage-notsupportedcontentformat-text": "உள்ளடக்க அமைப்பு $1 ஆனது உள்ளடக்க வகை $2 ஆல் ஆதரிக்கப்படாதது.",
        "content-model-wikitext": "விக்கிஉரை",
        "pageinfo-article-id": "பக்க அடையாள இலக்கம்",
        "pageinfo-language": "பக்க உள்ளடக்க மொழி",
        "pageinfo-content-model": "பக்கள உள்ளடக்க மாதிரி",
+       "pageinfo-content-model-change": "மாற்று",
        "pageinfo-robot-policy": "தானியங்கி மூலம் அட்டவணைப்படுத்தல்",
        "pageinfo-robot-index": "அனுமதிக்கப்படுகிறது",
        "pageinfo-robot-noindex": "அனுமதிக்கப்படாதது",
        "tag-filter": "[[Special:Tags|குறிச்சொல்]] வடிப்பான்:",
        "tag-filter-submit": "வடிகட்டி",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|அடையாளம்|அடையாளங்கள்}}]]: $2)",
+       "tag-mw-contentmodelchange": "உள்ளடக்க மாதிரி மாற்றம்",
+       "tag-mw-contentmodelchange-description": "திருத்து\n[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel change the content model]",
        "tags-title": "குறிச்சொற்கள்",
        "tags-intro": "இப்பக்கத்தின் மென்பொருள் ஒரு திருத்ததுடனான குறியீடு என்று குறிச்சொற்கள், மற்றும் அவற்றின் பொருளை பட்டியலிடுகிறது.",
        "tags-tag": "குறிச்சொல்",
        "tags-actions-header": "செயல்கள்",
        "tags-active-yes": "ஆம்",
        "tags-active-no": "இல்லை",
-       "tags-source-extension": "வà¯\86ளியிணà¯\88பà¯\8dபà¯\81 à®®à¯\82லமà¯\8d à®µà®°à¯\88யறà¯\81à®\95à¯\8dà®\95பà¯\8dபà®\9fà¯\8dà®\9fதà¯\81",
+       "tags-source-extension": "à®®à¯\86னà¯\8dபà¯\8aà®°à¯\81ளà¯\8d à®®à¯\82லமà¯\8d à®µà®°à¯\88யறà¯\81à®\95à¯\8dà®\95பà¯\8dபà®\9fà¯\8dà®\9fதà¯\81.",
        "tags-source-manual": "பயனர் மற்றும் தானியங்கியால் செயல்படுத்தப்படுவது",
        "tags-source-none": "பயன்பாட்டில் இல்லை",
        "tags-edit": "தொகு",
        "htmlform-title-not-exists": "$1 இ்டம்பெறவில்லை.",
        "htmlform-user-not-exists": "<strong>$1</strong> இ்டம்பெறவில்லை.",
        "htmlform-user-not-valid": "<strong>$1</strong> என்பது செல்லுபடியான பயனர் பெயர் அல்ல.",
-       "sqlite-has-fts": "$1முழு-உரை தேடல் ஆதரவுடன்",
-       "sqlite-no-fts": "$1 முழு-உரை தேடல் ஆதரவு இல்லாமல்",
        "logentry-delete-delete": "$3 பக்கத்தை $1 {{GENDER:$2|நீக்கினார்}}",
        "logentry-delete-restore": "$3 பக்கத்தை $1 {{GENDER:$2|மீட்டமைத்தார்}}",
        "logentry-delete-event": "$3 :$4 இல் {{PLURAL:$5| ஒரு நிகழ்வு குறிப்பேட்டின்| $5  நிகழ்வுகள் குறிப்பேடுகளின்}} காட்சித்தன்மை $1 மாற்றினார்",
index 3fa93b8..315a732 100644 (file)
@@ -38,7 +38,7 @@
        "tog-enotifminoredits": "ಎಲ್ಯೆಲ್ಯ ಬದಲಾವನೆ ಆಂಡಲ ಎಂಕ್ ಇ-ಅಂಚೆ ಕಡಪುಡ್ಲೆ",
        "tog-enotifrevealaddr": "ಪ್ರಕಟಣೆ ಇ-ಮೇಲ್‍ಡ್ ಎನ್ನ ಇ-ಮೇಲ್ ವಿಳಾಸನ್ ತೊಜ್ಪಾಲೆ",
        "tog-shownumberswatching": "ಪುಟೊನು ತೂವೊಂದುಪ್ಪುನಂಚಿನ ಸದಸ್ಯೆರ್‍ನ ಸಂಖ್ಯೆನ್ ತೊಜ್ಪಾಲೆ",
-       "tog-oldsig": "à²\87ತà³\8dತà³\86ದ à²¸à²¹à²¿",
+       "tog-oldsig": "à²\87ತà³\8dತà³\86ದ à²¸à³\88ನà³\8d.",
        "tog-fancysig": "ವಿಕಿಟೆಕ್ಸ್‌ಟ್‍ಗ್ ದಸ್ಕತ್ತ್‌ದ ಉಪಚಾರೊ(ಸ್ವಂತೊ ಚಾಲನೆದ ಕೊಂಡಿ ಇದ್ಯಂದಿಲೆಕ)",
        "tog-uselivepreview": "ನೇರೊ ಮುನ್ನೋಟೊನು ಉಪಯೋಗ ಮಲ್ಪುಲೆ",
        "tog-forceeditsummary": "ಸಂಪಾದನೆ ಸಾರಾಂಸೊನು ಕಾಲಿ ಬುಡ್‍ಂದ್ ಎಂಕ್ ನೆನಪು ಮಲ್ಪುಲೆ",
        "createacct-yourpasswordagain-ph": "ಪ್ರವೇಸೊ ಪದೊನು ನನ ಒರ ನಮೂದಿಸಲೆ",
        "userlogin-remembermypassword": "ಎನನ್ ಲಾಗಿನ್ ಆತೇ ದೀಡ್ಲೆ",
        "userlogin-signwithsecure": "ರಕ್ಷಣೆದ ಕನೆಕ್ಷನ್ ಉಪಯೋಗಿಸಲೆ.",
+       "cannotlogin-title": "ಇತ್ತೆ ಉಲಾಯಿ ಪೋಯರ್ ಸಾದ್ಯೊ ಅವೊಂತಿಜ್ಜಿ",
        "cannotloginnow-title": "ಇತ್ತೆ ಉಲಾಯಿ ಪೋಯರ್ ಸಾದ್ಯೊ ಇದ್ದಿ",
+       "cannotcreateaccount-title": "ಕಾತೆ ನಿರ್ಮಾಣೊ ಮಲ್ಪೆರೆ ಆವೊಂತಿಜ್ಜಿ",
        "yourdomainname": "ಈರೆನ ಕಾರ್ಯಕ್ಷೇತ್ರ",
        "password-change-forbidden": "ಈರ್ ಈ ವಿಕಿಡ್ ಪ್ರರವೇಸ ಪದೊನು ಬದಲ್ಪೆರೆ ಸಾದ್ಯೊ ಇದ್ದಿ.",
        "login": "ಲಾಗಿನ್ ಆಲೆ",
        "recentchangeslinked-summary": "ಒಂಜಿ ನಿರ್ದಿಸ್ಟೊ ಪುಟೊರ್ದು (ಅತ್ತ್’ನ್ಡ ನಿರ್ದಿಸ್ಟೊ ವರ್ಗೊಗು ಸೇರ್ದಿನ ಪುಟೊಲೆರ್ದ್) ಸಂಪರ್ಕೊ ಉಪ್ಪುನ ಪುಟೊಲೆಡ್ ಇಂಚಿಪ ಮಲ್ತಿನಂಚಿನ ಬದಲಾವಣೆಲೆನ್ ತಿರ್ತ್ ಪಟ್ಟಿ ಮಲ್ಪೆರಾತ್ಂಡ್.\n[[Special:Watchlist|ಇರೆನ ವೀಕ್ಷಣೆ ಪಟ್ಟಿಡ್]] ಉಪ್ಪುನ ಪುಟೊಲು '''ದಪ್ಪ ಅಕ್ಷರೊಡು''' ಉಂಡು.",
        "recentchangeslinked-page": "ಪುಟೊತ ಪುದರ್:",
        "recentchangeslinked-to": "ಇಂದೆತ ಬದಲ್‍ಗ್ ಕೊರ್ತ್‍ನ ಪುಟೊಗು ಕೊಂಡಿ ಉಪ್ಪುನಂಚಿನ ಪುಟೊಲೆದ ಬದಲಾವಣೆಲೆನ್ ತೋಜಾವು",
-       "upload": "ಫೈಲ್ ಅಪ್ಲೋಡ್",
+       "upload": "ಫೈಲ್’ನ್ ಅಪ್ಲೋಡ್ ಮಲ್ಪುಲೆ",
        "uploadbtn": "ಫೈಲ್’ನ್ ಅಪ್ಲೋಡ್ ಮಲ್ಪುಲೆ",
        "uploadnologin": "ಲಾಗಿನ್ ಆತ್‘ಜ್ಜರ್",
        "uploadlogpage": "ಅಪ್ಲೋಡ್ ದಾಖಲೆ",
index b49742e..b75ade0 100644 (file)
@@ -52,7 +52,7 @@
        "tog-enotifminoredits": "పేజీలు మరియు దస్త్రాలలో జరిగే చిన్న మార్పులకు కూడా నాకు ఈ-మెయిలును పంపు",
        "tog-enotifrevealaddr": "గమనింపు మెయిళ్ళలో నా ఈ-మెయిలు చిరునామాను చూపించు",
        "tog-shownumberswatching": "వీక్షకుల సంఖ్యను చూపు",
-       "tog-oldsig": "ప్రస్తుత సంతకం:",
+       "tog-oldsig": "à°®à±\80 à°ªà±\8dà°°à°¸à±\8dà°¤à±\81à°¤ à°¸à°\82à°¤à°\95à°\82:",
        "tog-fancysig": "సంతకాన్ని వికీపాఠ్యంగా తీసుకో (ఆటోమెటిక్‌ లింకు లేకుండా)",
        "tog-uselivepreview": "తాజా మునుజూపును వాడు",
        "tog-forceeditsummary": "దిద్దుబాటు సారాంశం ఖాళీగా ఉంటే ఆ విషయాన్ని నాకు సూచించు",
@@ -60,6 +60,7 @@
        "tog-watchlisthidebots": "బాట్లు చేసిన మార్పులను నా వీక్షణా జాబితాలో చూపించొద్దు",
        "tog-watchlisthideminor": "చిన్న మార్పులను నా వీక్షణా జాబితాలో చూపించొద్దు",
        "tog-watchlisthideliu": "లాగిన్ ఐన వాడుకరులు చేసే మార్పులను వీక్షణా జాబితాలో చూపించకు",
+       "tog-watchlistreloadautomatically": "ఫిల్టరు మారినప్పుడెల్లా వీక్షణ జాబితాను తిరిగి లోడు చెయ్యి (JavaScript అవసరం)",
        "tog-watchlisthideanons": "అజ్ఞాత వాడుకరుల మార్పులను వీక్షణా జాబితాలో చూపించకు",
        "tog-watchlisthidepatrolled": "నిఘా ఉన్న మార్పులను వీక్షణజాబితా నుంచి దాచిపెట్టు",
        "tog-watchlisthidecategorization": "పేజీ వర్గీకరణను దాచు",
        "newwindow": "(కొత్త కిటికీలో వస్తుంది)",
        "cancel": "రద్దుచేయి",
        "moredotdotdot": "ఇంకా...",
-       "morenotlisted": "à°\88 à°\9cాబితా à°¸à°\82à°ªà±\82à°°à±\8dà°£à°\82 à°\95ాదà±\81.",
+       "morenotlisted": "బహà±\81శా à°\88 à°\9cాబితా à°\85à°¸à°\82à°ªà±\82à°°à±\8dà°£à°\82.",
        "mypage": "పుట",
        "mytalk": "చర్చ",
        "anontalk": "చర్చ",
        "talk": "చర్చ",
        "views": "చూపులు",
        "toolbox": "పనిముట్లు",
+       "tool-link-userrights": "{{GENDER:$1|వాడుకరి}} గుంపులను మార్చు",
+       "tool-link-emailuser": "ఈ {{GENDER:$1|వాడుకరికి}} ఈమెయిలు పంపు",
        "userpage": "వాడుకరి పేజీని చూడండి",
        "projectpage": "ప్రాజెక్టు పేజీని చూడు",
        "imagepage": "ఫైలు పేజీని చూడండి",
        "mypreferencesprotected": "మీ అభీష్టాలను సవరించేందుకు మీకు అనుమతి లేదు.",
        "ns-specialprotected": "ప్రత్యేక పేజీలపై దిద్దుబాట్లు చేయలేరు.",
        "titleprotected": "[[User:$1|$1]] ఈ శీర్షికని సృష్టించకుండా ఇది సంరక్షించబడింది.\nఅందుకు ఇచ్చిన కారణం: <em>$2</em>.",
-       "filereadonlyerror": "à°«à±\88à°²à±\81 à°\96à°\9cానా \"$2\" à°°à±\80à°¡à±\8d-à°\93à°¨à±\8dà°²à±\80 à°¸à±\8dథితిలà±\8b à°\89à°\82à°¡à°\9fà°\82 à°\9aà±\87à°¤ \"$1\" à°«à±\88à°²à±\81à°²à±\8b à°®à°¾à°°à±\8dà°ªà±\81à°²à±\81 à°\9aà±\86à°¯à±\8dయలà±\87à°\95à°ªà±\8bయాà°\82.\n\nదానిà°\95à°¿ à°¤à°¾à°³à°\82 à°µà±\87సిన à°\85ధిà°\95ారి ఇచ్చిన వివరణ ఇది: \"$3\".",
+       "filereadonlyerror": "à°«à±\88à°²à±\81 à°\96à°\9cానా \"$2\" à°°à±\80à°¡à±\8d-à°\93à°¨à±\8dà°²à±\80 à°¸à±\8dథితిలà±\8b à°\89à°\82à°¡à°\9fà°\82 à°\9aà±\87à°¤ \"$1\" à°«à±\88à°²à±\81à°²à±\8b à°®à°¾à°°à±\8dà°ªà±\81à°²à±\81 à°\9aà±\86à°¯à±\8dయలà±\87à°\95à°ªà±\8bయాà°\82.\n\nదానిà°\95à°¿ à°¤à°¾à°³à°\82 à°µà±\87సిన à°¸à°¿à°¸à±\8dà°\9fà°®à±\81 à°¨à°¿à°°à±\8dవాహà°\95à±\81à°¡à±\81 ఇచ్చిన వివరణ ఇది: \"$3\".",
        "invalidtitle-knownnamespace": "పేరుబరి \"$2\", పాఠ్యము \"$3\" తో కూడిన ఈ శీర్షిక చెల్లనిది",
        "invalidtitle-unknownnamespace": "అపరిచితమైన పేరుబరి సంఖ్య \"$1\", పాఠ్యము \"$2\" తో కూడిన ఈ శీర్షిక చెల్లనిది",
        "exception-nologin": "లాగినై లేరు",
        "createacct-yourpasswordagain-ph": "సంకేతపదాన్ని మళ్ళీ ఇవ్వండి",
        "userlogin-remembermypassword": "నన్ను లాగిన్ చేసే ఉంచు",
        "userlogin-signwithsecure": "సురక్షిత కనెక్షను వాడు",
+       "cannotlogin-title": "లాగిన్ చెయ్యలేకున్నాం",
        "cannotloginnow-title": "ఇప్పుడు లాగిన్ అవలేరు",
        "cannotloginnow-text": "$1 ను వాడుతూండగా లాగౌట్ అవలేరు.",
+       "cannotcreateaccount-title": "ఖాతాలను సృష్టించలేము",
+       "cannotcreateaccount-text": "ఈ వికీలో నేరుగా ఖాతాలను సృష్టించడం సశక్తం చెయ్యలేదు.",
        "yourdomainname": "మీ డోమైను",
        "password-change-forbidden": "ఈ వికీలో మీరు సంకేతపదాలను మార్చలేరు.",
        "externaldberror": "డేటాబేసు అధీకరణలో లోపం జరిగింది లేదా మీ బయటి ఖాతాను తాజాకరించడానికి మీకు అనుమతి లేదు.",
        "eauthentsent": "ఇచ్చిన ఈ-మెయిలు అడ్రసుకు ధృవీకరణ మెయిలు పంపించాం.\nఇకపై మేము ఆ ఖాతాకు మెయిలు పంపాలంటే, ముందుగా మీరు ఆ మెయిల్లో సూచించినట్లుగా చేసి, ఈ చిరునామా మీదేనని ధృవీకరించాలి.",
        "throttled-mailpassword": "గడచిన {{PLURAL:$1|ఒక గంటలో|$1 గంటల్లో}} సంకేతపదం మార్చినట్లుగా ఒక మెయిలు పంపించివున్నాం.\nదుశ్చర్యలను నివారించేందుకు గాను, {{PLURAL:$1|ఒక గంటకు|$1 గంటలకు}} ఒక్కసారి మాత్రమే సంకేతపదం మార్పు మెయిలు పంపిస్తాము.",
        "mailerror": "మెయిలు పంపించడంలో లోపం: $1",
-       "acct_creation_throttle_hit": "మీ ఐపీ చిరునామా వాడుతున్న ఈ వికీ సందర్శకులు గత ఒక్క రోజులో {{PLURAL:$1|1 ఖాతాని|$1 ఖాతాలను}} సృష్టించారు, ఈ కాల వ్యవధిలో అది గరిష్ఠ పరిమితి.\nఅందువల్ల, ఈ ఐపీని వాడుతున్న సందర్శకులు ప్రస్తుతానికి ఇంక ఖాతాలని సృష్టించలేరు.",
+       "acct_creation_throttle_hit": "మీ ఐపీ చిరునామా వాడుతున్న ఈ వికీ సందర్శకులు గత $2 లో {{PLURAL:$1|1 ఖాతాను|$1 ఖాతాలను}} సృష్టించారు. ఈ కాల వ్యవధిలో అది గరిష్ఠ పరిమితి.\nఫలితంగా, ఈ ఐపీని వాడుతున్న సందర్శకులు ప్రస్తుతానికి ఇక ఖాతాలని సృష్టించలేరు.",
        "emailauthenticated": "మీ ఈ-మెయిలు చిరునామా $2న $3కి ధృవీకరింపబడింది.",
        "emailnotauthenticated": "మీ ఈ-మెయిలు చిరునామాను ఇంకా ధృవీకరించలేదు. \nకింద పేర్కొన్న అంశాలకు సంబంధించి ఎటువంటి ఈ-మెయిలునూ పంపించము.",
        "noemailprefs": "ఈ అంశాలు పని చెయ్యడానికి మీ అభిరుచుల్లో ఈమెయిలు చిరునామా ఇవ్వండి.",
        "botpasswords-label-delete": "తొలగించు",
        "botpasswords-label-resetpassword": "సంకేతపదాన్ని మార్చు",
        "botpasswords-label-grants": "వర్తించే గ్రాంట్లు:",
-       "botpasswords-label-restrictions": "వాడుక పరిమితులు:",
        "botpasswords-label-grants-column": "గ్రాంటు చేసాం",
        "botpasswords-bad-appid": "బాట్ పేరు \"$1\" సరైనది కాదు.",
        "botpasswords-insert-failed": "బాట్ పేరు \"$1\"ను చేర్చలేకపోయాం. దీన్ని ఇంతకు ముందే చేర్చారా ఏంటి?",
        "passwordreset-emailelement": "వాడుకరిపేరు: \n$1\n\nతాత్కాలిక సంకేతపదం: \n$2",
        "passwordreset-emailsentemail": "ఈ ఈమెయిలు చిరునామా మీ ఖాతాకు అనుసంధించి ఉంటే, సంకేతపదం మార్పు ఈమెయిలు పంపించబడుతుంది.",
        "passwordreset-emailsentusername": "ఈ వాడుకరిపేరుకు ఏదైనా ఈమెయిలు చిరునామా అనుసంధించి ఉంటే, సంకేతపదం మార్పు ఈమెయిలు పంపించబడుతుంది.",
-       "passwordreset-emailsent-capture2": "à°¸à°\82à°\95à±\87తపదà°\82 à°®à°¾à°°à±\8dà°ªà±\81 {{PLURAL:$1|à°\88à°®à±\86యిలà±\81à°¨à±\81|à°\88à°®à±\86యిళà±\8dళనà±\81}} à°ªà°\82పిà°\82à°\9aà°¾à°\82. {{PLURAL:$1|వాడà±\81à°\95à°°à°¿à°ªà±\87à°°à±\81, à°¸à°\82à°\95à±\87తపదానà±\8dని|వాడà±\81à°\95à°°à°¿à°ªà±\87à°°à±\8dà°²à±\81, à°¸à°\82à°\95à±\87తపదాల à°\9cాబితానà±\81}} à°\95à°¿à°\82à°¦ చూపించాం.",
-       "passwordreset-emailerror-capture2": "{{GENDER:$2|వాడà±\81à°\95à°°à°¿à°\95à°¿}} à°\88à°®à±\86యిలà±\81 à°ªà°\82పడà°\82 à°µà°¿à°«à°²à°®à±\88à°\82ది: $1 {{PLURAL:$3|వాడà±\81à°\95à°°à°¿à°ªà±\87à°°à±\81, à°¸à°\82à°\95à±\87తపదానà±\8dని|వాడà±\81à°\95à°°à°¿à°ªà±\87à°°à±\8dà°²à±\81, à°¸à°\82à°\95à±\87తపదాల à°\9cాబితానà±\81}} à°\95à°¿à°\82à°¦ చూపించాం.",
+       "passwordreset-emailsent-capture2": "à°¸à°\82à°\95à±\87తపదà°\82 à°®à°¾à°°à±\8dà°ªà±\81 {{PLURAL:$1|à°\88à°®à±\86యిలà±\81à°¨à±\81|à°\88à°®à±\86యిళà±\8dళనà±\81}} à°ªà°\82పిà°\82à°\9aà°¾à°\82. {{PLURAL:$1|వాడà±\81à°\95à°°à°¿à°ªà±\87à°°à±\81, à°¸à°\82à°\95à±\87తపదానà±\8dని|వాడà±\81à°\95à°°à°¿à°ªà±\87à°°à±\8dà°²à±\81, à°¸à°\82à°\95à±\87తపదాల à°\9cాబితానà±\81}} à°\87à°\95à±\8dà°\95à°¡ చూపించాం.",
+       "passwordreset-emailerror-capture2": "{{GENDER:$2|వాడà±\81à°\95à°°à°¿à°\95à°¿}} à°\88à°®à±\86యిలà±\81 à°ªà°\82పడà°\82 à°µà°¿à°«à°²à°®à±\88à°\82ది: $1 {{PLURAL:$3|వాడà±\81à°\95à°°à°¿à°ªà±\87à°°à±\81, à°¸à°\82à°\95à±\87తపదానà±\8dని|వాడà±\81à°\95à°°à°¿à°ªà±\87à°°à±\8dà°²à±\81, à°¸à°\82à°\95à±\87తపదాల à°\9cాబితానà±\81}} à°\87à°\95à±\8dà°\95à°¡ చూపించాం.",
        "passwordreset-invalideamil": "తప్పు ఈ-మెయిలు చిరునామా",
        "passwordreset-nodata": "వాడుకరిపేరుగానీ, ఈ-మెయిలు చిరునామా గానీ ఇవ్వలేదు",
        "changeemail": "ఈ-మెయిలు చిరునామా మార్పు లేదా తొలగింపు",
        "searchprofile-advanced-tooltip": "కస్టం నేంస్పేసులలో వెదుకు",
        "search-result-size": "$1 ({{PLURAL:$2|1 పదం|$2 పదాలు}})",
        "search-result-category-size": "{{PLURAL:$1|1 సభ్యుడు|$1 సభ్యులు}} ({{PLURAL:$2|1 ఉవవర్గం|$2 ఉపవర్గాలు}}, {{PLURAL:$3|1 దస్త్రం|$3 దస్త్రాలు}})",
-       "search-redirect": "(దారిమార్పు $1)",
+       "search-redirect": "($1 నుండి దారిమార్పు)",
        "search-section": "(విభాగం $1)",
        "search-category": "(వర్గం $1)",
        "search-file-match": "(ఫైలు విషయంతో సరిపోలుతోంది)",
        "search-suggest": "మీరు అంటున్నది ఇదా: $1",
+       "search-rewritten": "$1 కు ఫలితాలు చూపిస్తున్నాం. లేదంటే $2 కోసం వెతకండి.",
        "search-interwiki-caption": "సోదర ప్రాజెక్టులు",
        "search-interwiki-default": "$1 నుండి ఫలితాలు:",
        "search-interwiki-more": "(మరిన్ని)",
        "badsig": "సంతకం చెల్లనిది.\nHTML ట్యాగులను ఒకసారి సరిచూసుకోండి.",
        "badsiglength": "మీ సంతకం చాలా పెద్దగా ఉంది.\nఇది తప్పనిసరిగా $1 {{PLURAL:$1|అక్షరం|అక్షరాల}} లోపులోనే ఉండాలి.",
        "yourgender": "మిమ్మల్ని మీరు ఎలా వర్ణించుకుంటారు?",
-       "gender-unknown": "సాఫà±\8dà°\9fà±\81à°µà±\87à°°à±\81 à°®à°¿à°®à±\8dమలà±\8dని à°\89à°²à±\8dà°²à±\87à°\96à°¿à°\82à°\9aà±\87 à°¸à°\82దరà±\8dà°­à°\82à°²à±\8b, వీలైనంతవరకు లింగ తటస్థతను అవలంబిస్తుంది",
+       "gender-unknown": "సాఫà±\8dà°\9fà±\81à°µà±\87à°°à±\81 à°®à°¿à°®à±\8dమలà±\8dని à°¸à°\82à°¬à±\8bధిà°\82à°\9aà±\87à°ªà±\8dà°ªà±\81à°¡à±\81, వీలైనంతవరకు లింగ తటస్థతను అవలంబిస్తుంది",
        "gender-male": "అతను వికీ పేజీలను సరిదిద్దుతాడు",
        "gender-female": "ఆమె వికీ పేజీలను సరిదిద్దుతుంది",
        "prefs-help-gender": "ఈ అభిరుచిని అమర్చుకోవడం ఐచ్చికం.\nమిమ్మల్ని సంబోధించేప్పుడూ మిమ్మల్ని పేర్కొనేప్పుడూ వ్యాకరణపరంగా సరైన లింగాన్ని  వాడటానికి ఈ విలువ ఉపయోగపడుతుంది.\nఈ సమాచారం బహిరంగం.",
        "listusers": "వాడుకరుల జాబితా",
        "listusers-editsonly": "మార్పులు చేసిన వాడుకరులను మాత్రమే చూపించు",
        "listusers-creationsort": "చేరిన తేదీ క్రమంలో చూపించు",
-       "listusers-desc": "అవోహణ క్రమంలో పేర్చు",
+       "listusers-desc": "à°\85వరà±\8bహణ à°\95à±\8dà°°à°®à°\82à°²à±\8b à°ªà±\87à°°à±\8dà°\9aà±\81",
        "usereditcount": "$1 {{PLURAL:$1|మార్పు|మార్పులు}}",
        "usercreated": "$1 న $2కి {{GENDER:$3|చేరారు}}",
        "newpages": "కొత్త పేజీలు",
        "confirmemail_oncreate": "మీ ఈ-మెయిలు చిరునామాకి ఒక ధృవీకరణ సంకేతాన్ని పంపించాం.\nలోనికి ప్రవేశించేందుకు ఆ సంకేతం అవసరంలేదు, కానీ ఈ వికీలో ఈ-మెయిలు ఆధారిత సౌలభ్యాలను చేతనం చేసేముందు దాన్ని ఇవ్వవలసి ఉంటుంది.",
        "confirmemail_sendfailed": "{{SITENAME}} మీ  నిర్ధారణ మెయిలుని పంపలేకపోయింది.\nమీ ఈమెయిల్ చిరునామాలో తప్పులున్నాయేమో సరిచూసుకోండి.\n\nమెయిలరు ఇలా చెప్పింది: $1",
        "confirmemail_invalid": "ధృవీకరణ సంకేతం సరైనది కాదు. దానికి కాలం చెల్లి ఉండవచ్చు.",
-       "confirmemail_needlogin": "à°®à±\80 à°\88à°®à±\86యిలà±\81 à°\9aà°¿à°°à±\81నామాని à°¦à±\83వపరà°\9aà°\9fానిà°\95à°¿ à°®à±\80à°°à±\81 $1 à°\89à°\82డాలి.",
+       "confirmemail_needlogin": "à°®à±\80 à°\88à°®à±\86యిలà±\81 à°\9aà°¿à°°à±\81నామానà±\81 à°§à±\8dà°°à±\81à°µà±\80à°\95à°°à°¿à°\82à°\9aà±\87à°\82à°¦à±\81à°\95à±\81, $1.",
        "confirmemail_success": "మీ ఈ-మెయిలు చిరునామా ధృవీకరించబడింది.\nఇక [[Special:UserLogin|లోనికి ప్రవేశించి]] వికీని అస్వాదించండి.",
        "confirmemail_loggedin": "మీ ఈ-మెయిలు చిరునామా ఇప్పుడు రూఢి అయింది.",
        "confirmemail_subject": "{{SITENAME}} ఈ-మెయిలు చిరునామా ధృవీకరణ",
        "table_pager_empty": "ఫలితాలు లేవు",
        "autosumm-blank": "పేజీలోని విషయాన్నంతటినీ తీసేసారు.",
        "autosumm-replace": "పేజీని '$1' తో మారుస్తున్నాం",
-       "autoredircomment": "[[$1]]కు దారిమళ్ళించారు",
+       "autoredircomment": "పేజీని [[$1]] కు దారి మళ్ళించారు",
        "autosumm-new": "'$1' తో కొత్త పేజీని సృష్టించారు",
        "autosumm-newblank": "ఖాళీ పేజీని సృష్టించారు",
        "lag-warn-normal": "$1 {{PLURAL:$1|క్షణం|క్షణాల}} లోపు జరిగిన మార్పులు ఈ జాబితాలో కనిపించకపోవచ్చు.",
        "htmlform-cloner-create": "ఇంకా చేర్చు",
        "htmlform-cloner-delete": "తొలగించు",
        "htmlform-cloner-required": "కనీసం ఒక విలువు అయినా ఇవ్వాలి.",
-       "sqlite-has-fts": "$1 పూర్తి-పాఠ్య అన్వేషణ తోడ్పాటుతో",
-       "sqlite-no-fts": "$1 పూర్తి-పాఠ్య అన్వేషణ తోడ్పాటు లేకుండా",
        "logentry-delete-delete": "$1 $3 పేజీని {{GENDER:$2|తొలగించారు}}",
        "logentry-delete-restore": "పేజీ $3 ని $1 {{GENDER:$2|పునస్థాపించారు}}",
        "logentry-delete-event": "$3 లో {{PLURAL:$5|ఒక లాగ్ ఘటన|$5 లాగ్ ఘటనల}} యొక్క కన్పట్టటాన్ని (విజిబిలిటీ) $1 {{GENDER:$2|మార్చారు}}: $4",
        "feedback-close": "పూర్తయ్యింది",
        "feedback-dialog-title": "ప్రతిస్పందనను తెలియజేయండి",
        "feedback-dialog-intro": "మీ ప్రతిస్పందనను తెలియజేయడానికి ఈ తేలిక ఫారాన్ని వాడుకోవచ్చు. మీ వాడుకరి పేరుతో పాటు మీ వ్యాఖ్య \"$1\" పేజీకి చేర్చబడుతుంది.",
-       "feedback-error-title": "లోపం",
        "feedback-error1": "లోపం: API నుండి గుర్తుపట్టలేని ఫలితం",
        "feedback-error2": "దోషము: సవరణ విఫలమైంది",
        "feedback-error3": "లోపం: API నుండి ప్రతిస్పందన లేదు",
        "feedback-thanks": "కృతజ్ఞతలు! మీ ప్రతిస్పందనను “[$2 $1]” పేజీలో చేర్చాం.",
        "feedback-thanks-title": "కృతజ్ఞతలు!",
        "feedback-useragent": "వాడుకరి ఏజెంటు:",
-       "searchsuggest-search": "వెతుకు",
+       "searchsuggest-search": "{{SITENAME}}‌లో వెతకండి",
        "searchsuggest-containing": "కలిగియున్న...",
        "api-error-badaccess-groups": "ఈ వికీ లోనికి దస్త్రాలను ఎక్కించే అనుమతి మీకు లేదు.",
        "api-error-badtoken": "అంతర్గత లోపం: చెడు టోకెన్.",
index 115d81d..b3fc2ca 100644 (file)
@@ -17,7 +17,8 @@
                        "Leeheonjin",
                        "Macofe",
                        "Matma Rex",
-                       "Stranger195"
+                       "Stranger195",
+                       "Emem.calist"
                ]
        },
        "tog-underline": "Pagsasalungguhit ng link:",
        "yourpasswordagain": "Password mo uli:",
        "createacct-yourpasswordagain": "Tiyakin ang password",
        "createacct-yourpasswordagain-ph": "Muling ilagay ang password",
-       "remembermypassword": "Tandaan ang paglagda ko sa kompyuter na ito (pinakamarami na ang $1 {{PLURAL:$1|araw|mga araw}})",
        "userlogin-remembermypassword": "Panatilihin akong naka-login",
        "userlogin-signwithsecure": "Gumamit ng ligtas na koneksyon",
        "yourdomainname": "Dominyo mo:",
        "passwordreset-emailtext-user": "Ang tagagamit na si $1 sa {{SITENAME}} ay humiling ng isang paalala ng iyong mga akawnt ng detalye para sa {{SITENAME}}\n($4). Ang sumusunod na pangtagagamit na {{PLURAL:$3|akawnt ay|mga akawnt ay}} may kaugnayan sa tirahang ito ng e-liham:\n\n$2\n\n{{PLURAL:$3|Ang pansamantalang hudyat na ito|Ang pansamantalang mga hudyat na ito}} mawawalan ng bias sa loob ng {{PLURAL:$5|isang araw|$5 mga araw}}.\nDapat kang lumagda at pumili ng isang hudyat ngayon. Kung ibang tao ang gumawa ng kahilingang ito, o kung naalala mo na ang iyong orihinal na hudyat, at hindi mo na nais palitan pa ito, maaari mong huwag nang pansinin ang mensaheng ito at magpatuloy sa paggamit ng iyong lumang hudyat.",
        "passwordreset-emailelement": "Pangalan ng tagagamit: \n$1\n\nPansamantalang password: \n$2",
        "passwordreset-emailsentemail": "Naipadala na ang isang e-liham na pampaalala.",
-       "passwordreset-emailsent-capture": "Naipadala na ang isang e-liham na paalala, na ipinapakita sa ibaba.",
-       "passwordreset-emailerror-capture": "Nalikha na ang isang e-liham na paalala, na ipinapakita sa ibaba, subalit nabigo ang pagpapadala sa tagagamit: $1",
        "changeemail": "Baguhin ang direksiyong e-liham",
        "changeemail-header": "Baguhin ang email address ng account",
        "changeemail-no-info": "Kailangan mong lumagda upang tuwirang mapuntahan ang pahinang ito.",
        "undo-failure": "Hindi matanggal ang pagbabago dahil sa magkakasalungat na panggitnang mga pagbabago.",
        "undo-norev": "Hindi matanggal ang pagbabago dahil hindi ito umiiral o nabura na.",
        "undo-summary": "Tanggalin ang pagbabagong $1 ni [[Special:Contributions/$2|$2]] ([[User talk:$2|Usapan]])",
-       "cantcreateaccounttitle": "Hindi malikha ang account",
        "cantcreateaccount-text": "Hinarang ni [[User:$3|$3]] ang paglikha ng acciybt mula sa IP address ('''$1''') na ito.\n\nAng dahilang ibinigay ni $3 ay ''$2''",
        "viewpagelogs": "Tingnan ang mga pagtatala para sa pahinang ito",
        "nohistory": "Walang kasaysayan ng pagbabago para sa pahinang ito.",
        "apisandbox-results": "Kinalabasan",
        "apisandbox-request-url-label": "Hilingin ang URL:",
        "apisandbox-request-time": "Oras ng paghiling: $1",
+       "apisandbox-continue": "Ipagpatuloy",
+       "apisandbox-continue-clear": "Burado",
        "booksources": "Mga mapagkukunang aklat",
        "booksources-search-legend": "Maghanap ng mapagkukunang aklat",
        "booksources-isbn": "ISBN:",
        "htmlform-reset": "Bawiin ang mga pagbabago",
        "htmlform-selectorother-other": "Iba pa",
        "htmlform-title-not-exists": "Hindi nairal ang $1.",
-       "sqlite-has-fts": "$1 na may suportang paghahanap ng buong teksto",
-       "sqlite-no-fts": "$1 na walang suporta ng paghahanap ng buong teksto",
        "logentry-delete-delete": "Binura ni $1 ang pahinang $3",
        "logentry-delete-restore": "Ibinalik ni $1 ang pahinang $3",
        "logentry-delete-event": "Binago ni $1 ang antas ng pagkanatatanaw ng {{PLURAL:$5|isang pangyayari sa talaan|$5 mga pangyayari sa talaan}} sa $3: $4",
        "feedback-external-bug-report-button": "Mag-habla ng teknikal na gawain",
        "feedback-dialog-title": "I-sumite ang katugunan",
        "feedback-dialog-intro": "Maaari mo nang gamitin ang madaling pormularyo na nasa ibaba upang i-sumite ang iyong katugunan. Madadagdag ang iyong komento sa pahinang $1, kasama ang iyong ngalan-tagagamit.",
-       "feedback-error-title": "Kamalian",
        "feedback-error1": "Kamalian: Hindi nakikilalang kinalabasan mula sa API",
        "feedback-error2": "Kamalian: Nabigo ang pagpatnugot",
        "feedback-error3": "Kamalian: Walang tugon mula sa API",
        "special-characters-group-khmer": "Khmer",
        "mw-widgets-dateinput-placeholder-day": "TTTT-BB-AA",
        "mw-widgets-dateinput-placeholder-month": "TTTT-BB",
-       "api-error-blacklisted": "Paki pumili ng isang naiibang mapaglarawang pamagat.",
-       "randomrootpage": "Alin mang pinag-ugatang/pinagmulang pahina"
+       "randomrootpage": "Alin mang pinag-ugatang/pinagmulang pahina",
+       "edit-error-long": "Mga kamalian:"
 }
index a63aac3..f8cb2b3 100644 (file)
                        "Hbseren",
                        "Kumkumuk",
                        "Basak",
-                       "Ece Alpdeniz"
+                       "Ece Alpdeniz",
+                       "Superyetkin"
                ]
        },
        "tog-underline": "Bağlantıların altını çiz:",
        "tog-hideminor": "Son değişiklikler sayfasında küçük değişiklikleri gizle",
        "tog-hidepatrolled": "Son değişikliklerde devriye görmüş değişiklikleri gizle",
        "tog-newpageshidepatrolled": "Yeni sayfalar listesinde, devriye görmüş sayfaları gizle",
-       "tog-hidecategorization": "Sayfa kategorilendirmesni gizle",
+       "tog-hidecategorization": "Sayfa kategorilendirmesini gizle",
        "tog-extendwatchlist": "İzleme listesini sadece en son değil, tüm değişiklikleri göstermek üzere genişlet",
        "tog-usenewrc": "Son değişiklikler sayfasındaki ve izleme listesindeki değişiklikleri sayfalara gruplandır",
        "tog-numberheadings": "Başlıkları otomatik numaralandır",
        "tog-enotifminoredits": "Sayfalardaki ve dosyalardaki küçük değişikliklerde de bana e-posta gönder",
        "tog-enotifrevealaddr": "Bildirim postalarında benim eposta adresimi açıkça göster",
        "tog-shownumberswatching": "İzleyen kullanıcı sayısını göster",
-       "tog-oldsig": "Mevcut imza:",
+       "tog-oldsig": "Mevcut imzanız:",
        "tog-fancysig": "İmzaya vikimetin muamelesi yap (otomatik bir bağlantı olmadan)",
        "tog-uselivepreview": "Canlı ön izlemeyi kullan",
        "tog-forceeditsummary": "Özeti boş bıraktığımda beni uyar",
        "tog-watchlistreloadautomatically": "Filtre değiştiğinde izleme listesini otomatik yenile (JavaScript gerekir)",
        "tog-watchlisthideanons": "İzleme listemde, anonim kullanıcılar tarafından yapılan değişiklikleri gizle",
        "tog-watchlisthidepatrolled": "İzleme listesinde, devriye görmüş değişiklikleri gizle",
-       "tog-watchlisthidecategorization": "Sayfa kategorilendirmesni gizle",
+       "tog-watchlisthidecategorization": "Sayfa kategorilendirmesini gizle",
        "tog-ccmeonemails": "Diğer kullanıcılara gönderdiğim e-postaların bir kopyasını bana da gönder",
        "tog-diffonly": "Sayfa içeriğini, sürüm farklarının altında gösterme",
        "tog-showhiddencats": "Gizli kategorileri göster",
        "tog-norollbackdiff": "Geri döndürme uygulandıktan sonra farkları gösterme",
        "tog-useeditwarning": "Yaptığım değişiklikleri kaydetmeden sayfayı kapatırken beni uyar",
-       "tog-prefershttps": "Oturum açarken her zaman güvenli bağlantı kullan",
+       "tog-prefershttps": "Oturum açarken her zaman güvenli bağlantı kullanın",
        "underline-always": "Daima",
        "underline-never": "Asla",
        "underline-default": "Tema ya da tarayıcı varsayılanı",
        "newwindow": "(yeni bir pencerede açılır)",
        "cancel": "İptal",
        "moredotdotdot": "Dahası...",
-       "morenotlisted": "Bu liste tam değildir.",
+       "morenotlisted": "Bu liste eksik olabilir.",
        "mypage": "Sayfa",
        "mytalk": "Mesaj",
        "anontalk": "Mesaj",
        "talk": "Tartışma",
        "views": "Görünümler",
        "toolbox": "Araçlar",
+       "tool-link-userrights": "{{GENDER:$1|Kullanıcı}} gruplarını değiştir",
+       "tool-link-emailuser": "Bu {{GENDER:$1|kullanıcıya}} e-posta gönder",
        "userpage": "Kullanıcı sayfasını görüntüle",
        "projectpage": "Proje sayfasını görüntüle",
        "imagepage": "Dosya sayfasını görüntüle",
        "databaseerror-query": "Sorgu: $1",
        "databaseerror-function": "Fonksiyon: $1",
        "databaseerror-error": "Hata: $1",
+       "transaction-duration-limit-exceeded": "Yüksek miktarda gecikme oluşacağından ve işlem süresi izin verilen $2 saniye sınırını aştığından ($1) bu işlem iptal edildi.\nEğer aynı anda birden fazla öge değiştiriyorsanız, bunun yerine küçük işlemler yapmayı deneyin.",
        "laggedslavemode": "<strong>Uyarı:</strong> Sayfa son güncellemeleri içermeyebilir.",
        "readonly": "Veritabanı koruma altına alındı",
        "enterlockreason": "Koruma için bir neden belirtin. Korumanın ne zaman kaldırılacağına dair tahmini bir tarih eklemeyi unutmayın.",
-       "readonlytext": "Veritabanı, muhtemelen olağan bakım/onarım çalışmaları sebebiyle, geçici olarak giriş ve değişiklik yapmaya kapatılmıştır. Çalışmaların ardından normale dönecektir.\n\nVeritabanını kilitleyen yöneticinin açıklaması şu şekilde: $1",
+       "readonlytext": "Veritabanı, muhtemelen olağan bakım/onarım çalışmaları sebebiyle, geçici olarak giriş ve değişiklik yapmaya kapatılmıştır. Çalışmaların ardından normale dönecektir.\n\nVeritabanını kilitleyen sistem yöneticisinin açıklaması şu şekilde: $1",
        "missing-article": "Veritabanında bulunması istenen \"$1\" $2 adlı sayfaya ait metin bulunamadı.\n\nBu durum, genellikle silinmiş bir sayfanın geçmiş bir sürümüne yönlendirilmekten kaynaklanır.\n\nEğer neden bu değilse yazılımda bir hata ile karşılaşmış olabilirsiniz.\nLütfen URL'yi not ederek bunu bir [[Special:ListUsers/sysop|hizmetliye]] iletin.",
        "missingarticle-rev": "(revizyon#: $1)",
        "missingarticle-diff": "(Fark: $1, $2)",
        "protectedinterface": "Bu sayfa yazılım için arayüz metni sağlamaktadır ve kötüye kullanımı önlemek için korumaya alınmıştır.\nBütün vikilere dair çeviri eklemek veya bunları değiştirmek için lütfen MediaWiki yerelleştirme projesi [https://translatewiki.net/ translatewiki.net]'i kullanın.",
        "editinginterface": "<strong>Uyarı:</strong> Yazılım için arayüz metni sağlayan bir sayfayı değiştiriyorsunuz.\nBu sayfada yapılacak değişiklikler diğer kullanıcıların vikilerindeki kullanıcı arayüzlerinin görünümünü de etkileyecektir.",
        "translateinterface": "Tüm vikilerde çeviri eklemek veya çevirileri değiştirmek için lütfen MediaWiki yerelleştirme projesini [https://translatewiki.net/] kullanın.",
-       "cascadeprotected": "Bu sayfa değişiklik yapılması engellenmiştir, çünkü  \"kademeli\" seçeneği aktif hale getirilerek koruma altına alınan {{PLURAL:$1|sayfada|sayfada}} kullanılmaktadır:\n$2",
+       "cascadeprotected": "Bu sayfa değişiklik yapılması engellenmiştir, çünkü  \"kademeli\" seçeneği aktif hale getirilerek koruma altına alınan {{PLURAL:$1|sayfada|sayfalarda}} kullanılmaktadır:\n$2",
        "namespaceprotected": "'''$1''' alandındaki sayfaları düzenlemeye izniniz bulunmamaktadır.",
        "customcssprotected": "Bu sayfayı değiştirmeye yetkiniz bulunmamaktadır, çünkü bu sayfa başka bir kullanıcının kişisel ayarlarını içermektedir.",
        "customjsprotected": "Bu Java Script sayfasını değiştirmeye yetkiniz bulunmamaktadır, çünkü bu sayfa başka bir kullanıcının kişisel ayarlarını içermektedir.",
        "mypreferencesprotected": "Tercihlerinizi düzenlemek için yetkiniz yok.",
        "ns-specialprotected": "{{ns:special}} alanadı içindeki sayfalar değiştirilemez.",
        "titleprotected": "[[User:$1|$1]] tarafından oluşturulması engellenmesi için bu sayfa koruma altına alınmıştır.\nVerilen sebep: <em>$2</em>.",
-       "filereadonlyerror": "\"$2\" dosya deposundaki \"$1\" dosyası salt okunur modda olduğundan dolayı değiştirmek için açılamıyor.\n\nKilitleyen hizmetlinin bu konudaki nedeni: \"$3\".",
+       "filereadonlyerror": "\"$2\" dosya deposundaki \"$1\" dosyası salt okunur modda olduğundan dolayı değiştirmek için açılamıyor.\n\nKilitleyen sistem yöneticisinin bu konudaki nedeni: \"$3\".",
        "invalidtitle-knownnamespace": "\"$2\" alan adı için \"$3\" metni geçersiz bir başlık",
        "invalidtitle-unknownnamespace": "Bilinmeyen $1 ad alanı sayısı ve geçersiz \"$2\" başlık",
        "exception-nologin": "Giriş yapılmamış",
        "createacct-yourpasswordagain-ph": "Parolayı yeniden girin",
        "userlogin-remembermypassword": "Oturumumu sürekli açık tut",
        "userlogin-signwithsecure": "Güvenli bağlantı kullanın",
+       "cannotlogin-title": "Şu an oturum açılamıyor",
+       "cannotlogin-text": "Oturum açmak mümkün değildir.",
        "cannotloginnow-title": "Şu an oturum açılamıyor",
        "cannotloginnow-text": "$1 kullanırken giriş yapmak mümkün değil.",
+       "cannotcreateaccount-title": "Hesap oluşturulamadı",
+       "cannotcreateaccount-text": "Doğrudan hesap oluşturma, bu wiki üzerinde etkin değil.",
        "yourdomainname": "Alan adınız:",
        "password-change-forbidden": "Bu vikide parolanızı değiştiremezsiniz.",
        "externaldberror": "Ya doğrulama veritabanı hatası var ya da kullanıcı hesabınızı güncellemeye yetkiniz yok.",
        "botpasswords-label-delete": "Sil",
        "botpasswords-label-resetpassword": "Şifreyi sıfırla",
        "botpasswords-label-grants": "Geçerli ayrıcalıklar:",
-       "botpasswords-label-restrictions": "Kullanım kısıtlamaları:",
        "botpasswords-label-grants-column": "Verilen",
        "botpasswords-bad-appid": "Bot ismi \"$1\" geçerli değil.",
        "botpasswords-insert-failed": "Bot adı \"$1\" eklenemedi. Zaten eklenmiş olmalı?",
        "upload-copy-upload-invalid-domain": "Kopya yüklemeler bu etki alanında mevcut değil.",
        "upload-dialog-title": "Dosya Yükle",
        "upload-dialog-button-cancel": "İptal",
+       "upload-dialog-button-back": "Geri",
        "upload-dialog-button-done": "Yapıldı",
        "upload-dialog-button-save": "Kaydet",
        "upload-dialog-button-upload": "Yükle",
        "apisandbox-retry": "Tekrar dene",
        "apisandbox-helpurls": "Yardım bağlantıları",
        "apisandbox-examples": "Örnekler",
+       "apisandbox-dynamic-parameters-add-label": "Parametre ekle:",
+       "apisandbox-dynamic-parameters-add-placeholder": "Parametre adı",
        "apisandbox-results": "Sonuçlar",
        "apisandbox-request-url-label": "İstek URL:",
        "apisandbox-request-time": "İstek zamanı: $1",
+       "apisandbox-continue": "Devam et",
+       "apisandbox-continue-clear": "Temizle",
        "booksources": "Kaynak kitaplar",
        "booksources-search-legend": "Kitap kaynaklarını ara",
        "booksources-isbn": "ISBN:",
        "wlnote": "$3 saat $4 itibariyle son {{PLURAL:$2|bir saatte|'''$2''' saatte}} yapılan {{PLURAL:$1|son değişiklik|son '''$1''' değişiklik}} aşağıdadır.",
        "wlshowlast": "Son $1 saati $2 günü göster",
        "watchlist-hide": "Gizle",
+       "watchlist-submit": "Göster",
        "wlshowtime": "Gösterilecek zaman aralığı:",
        "wlshowhideminor": "küçük değişiklikler",
        "wlshowhidebots": "botlar",
        "changecontentmodel-title-label": "Sayfa başlığı",
        "changecontentmodel-model-label": "Yeni içerik modeli",
        "changecontentmodel-reason-label": "Gerekçe:",
+       "changecontentmodel-submit": "Değiştir",
        "changecontentmodel-success-title": "İçerik modeli değiştirildi",
        "changecontentmodel-success-text": "İçerik türü [[:$1]] olarak değiştirildi.",
        "logentry-contentmodel-change-revertlink": "Eski haline döndür",
        "whatlinkshere-hidelinks": "Bağlantıları $1",
        "whatlinkshere-hideimages": "Dosya bağlantılarını $1",
        "whatlinkshere-filters": "Süzgeçler",
+       "whatlinkshere-submit": "Getir",
        "autoblockid": "Otomatik engelleme #$1",
        "block": "Kullanıcıyı engelle",
        "unblock": "Kullanıcının engelini kaldır",
        "spam_blanking": "Tüm revizyonlar $1 sayfasına bağlantı içeriyor, boşaltılıyor",
        "spam_deleting": "Tüm revizyonlar $1 sayfasına bağlantı içeriyor, siliniyor",
        "simpleantispam-label": "Anti-spam denetimi.\nBunu <strong>doldurmayın</strong>!",
-       "pageinfo-title": "Bilgi için \"$1\"",
+       "pageinfo-title": "\"$1\" sayfa bilgisi",
        "pageinfo-not-current": "Üzgünüz, eski sürümler için bu bilgileri sağlamamız mümkün değildir.",
        "pageinfo-header-basic": "Temel bilgiler",
        "pageinfo-header-edits": "Düzenleme geçmişi",
        "pageinfo-article-id": "Sayfa ID",
        "pageinfo-language": "Sayfa içeriğinin dili",
        "pageinfo-content-model": "Sayfa içerik modeli",
+       "pageinfo-content-model-change": "değiştir",
        "pageinfo-robot-policy": "Robotlar tarafından endeksleniyor",
        "pageinfo-robot-index": "İzin verilmiş",
        "pageinfo-robot-noindex": "İzin verilmedi",
        "confirm-watch-top": "Bu sayfayı izleme listenize ekleyin",
        "confirm-unwatch-button": "TAMAM",
        "confirm-unwatch-top": "Bu sayfayı izleme listenizden çıkarın",
+       "confirm-rollback-button": "Tamam",
        "percent": "%$1",
        "quotation-marks": "\"$1\"",
        "imgmultipageprev": "← önceki sayfa",
        "htmlform-cloner-create": "Daha fazla ekle",
        "htmlform-cloner-delete": "Sil",
        "htmlform-cloner-required": "En az bir değer gereklidir.",
+       "htmlform-date-placeholder": "YYYY-AA-GG",
+       "htmlform-time-placeholder": "SS:DD:SS",
+       "htmlform-datetime-placeholder": "YYYY-AA-GG SS:DD:SS",
        "htmlform-title-not-creatable": "\"$1\"oluşturulabilir bir sayfa ismi değil.",
        "htmlform-title-not-exists": "$1 mevcut değil.",
        "htmlform-user-not-exists": "<strong>$1</strong> mevcut değil.",
        "htmlform-user-not-valid": "<strong>$1</strong> geçerli bir kullanıcı ismi değildir.",
-       "sqlite-has-fts": "$1 tam-metin arama desteği ile",
-       "sqlite-no-fts": "$1 tam-metin arama desteği olmaksızın",
        "logentry-delete-delete": "$1 $3 sayfasını {{GENDER:$2|sildi}}",
        "logentry-delete-restore": "$1 $3 sayfasını {{GENDER:$2|geri getirdi}}",
        "logentry-delete-event": "$1, $3 sayfasında {{PLURAL:$5|bir günlük girdisinin |$5 günlük girdisinin}} görünürlüğünü {{GENDER:$2|değiştirdi}}: $4",
        "feedback-external-bug-report-button": "Teknik hata raporu ilet",
        "feedback-dialog-title": "Geribildirim gönder",
        "feedback-dialog-intro": "Geribildirimde bulunmak için aşağıdaki basit formu kullanabilirsiniz. Yorumunuz kullanıcı adınızla beraber \"$1\" sayfasına eklenecektir.",
-       "feedback-error-title": "Hata",
        "feedback-error1": "Hata: Bilinmeyen API sonucu",
        "feedback-error2": "Hata: Düzenleme başarısız oldu",
        "feedback-error3": "Hata: API'den yanıt yok",
index 0af6224..b7cadee 100644 (file)
@@ -52,7 +52,7 @@
        "tog-enotifminoredits": "Кече үзгәртүләр турында да электрон почтага хәбәр җибәрелсен",
        "tog-enotifrevealaddr": "Хәбәрләрдә e-mail адресым күрсәтелсен",
        "tog-shownumberswatching": "Битне күзәтү исемлекләренә өстәгән кулланучылар санын күрсәтелсен",
-       "tog-oldsig": "Хәзерге имза:",
+       "tog-oldsig": "Хәзерге имзагыз:",
        "tog-fancysig": "Имзаның шәхси вики-билгеләмәсе (автоматик сылтамасыз)",
        "tog-uselivepreview": "Тиз карап алуны куллану",
        "tog-forceeditsummary": "Үзгәртүләрне тасвирлау юлы тутырылмаган булса, кисәтү",
        "category-file-count-limited": "Бу төркемдә {{PLURAL:$1|$1 файл|1=бары тик бер файл}}.",
        "listingcontinuesabbrev": "дәвамы",
        "index-category": "Индексланган битләр",
-       "noindex-category": "Ð\98ндекÑ\81ланмаган битләр",
+       "noindex-category": "Ð\91илгелÓ\99нмÓ\99Ò¯Ñ\87е битләр",
        "broken-file-category": "Файлларга эшләми торган сылтамалар булган битләр",
        "about": "Тасвирлама",
        "article": "Мәкалә",
        "newwindow": "(яңа тәрәзәдә ачыла)",
        "cancel": "Баш тарту",
        "moredotdotdot": "Дәвамы…",
-       "morenotlisted": "Исемлек тулы түгел.",
+       "morenotlisted": "Исемлек тулы булмаска мөмкин.",
        "mypage": "Бит",
        "mytalk": "Бәхәс бите",
        "anontalk": "Бәхәс",
        "yourpasswordagain": "Серсүзне кабат кертү:",
        "createacct-yourpasswordagain": "Серсүзне раслагыз",
        "createacct-yourpasswordagain-ph": "Серсүзне кабаттан кертегез",
-       "remembermypassword": "Хисап язмам бу браузерда саклансын (иң күбе $1 {{PLURAL:$1|көн}})",
        "userlogin-remembermypassword": "Системада калырга",
        "userlogin-signwithsecure": "Якланган кушылу",
        "yourdomainname": "Сезнең доменыгыз:",
        "password-change-forbidden": "Сез бу викидә серсүзне үзгәртә алмыйсыз.",
        "externaldberror": "Тышкы мәгълүмат базасы ярдәмендә аутентификация үткәндә хата чыкты, яисә тышкы хисап язмагызга үзгәрешләр кертү хокукыгыз юк.",
        "login": "Керү",
+       "login-security": "Шәхесегезне раслагыз",
        "nav-login-createaccount": "Керү / теркәлү",
        "userlogin": "Керү / теркәлү",
        "userloginnocreate": "Керү",
        "botpasswords-label-delete": "Бетерү",
        "botpasswords-label-resetpassword": "Серсүзне ташлау",
        "botpasswords-label-grants": "Кулланылган рөхсәтләр:",
-       "botpasswords-label-restrictions": "Куллану чикләүләре:",
        "botpasswords-label-grants-column": "Рөхсәт",
        "botpasswords-bad-appid": "Атамасы «$1» булган бот исеме ярамый.",
        "botpasswords-created-title": "Бот серсүзе булдырылды",
        "minoredit": "Бу кече үзгәртү",
        "watchthis": "Бу битне күзәтү",
        "savearticle": "Битне саклау",
+       "savechanges": "Үзгәртүләрне саклау",
+       "publishpage": "Бит ясау",
+       "publishchanges": "Битне бастыру",
        "preview": "Алдан карау",
        "showpreview": "Алдан карау",
        "showdiff": "Кертелгән үзгәртүләр",
        "suppress": "Яшерү",
        "apihelp": "API ярдәм",
        "apihelp-no-such-module": "«$1» модуле табылмады.",
+       "apisandbox-reset": "Чистарту",
+       "apisandbox-retry": "Кабатлау",
+       "apisandbox-examples": "Мисаллар",
+       "apisandbox-dynamic-parameters": "Өстәмә параметрлар",
+       "apisandbox-results": "Нәтиҗәләр",
        "booksources": "Китап чыганаклары",
        "booksources-search-legend": "Китап чыганакларыны эзләү",
        "booksources-search": "Эзләү",
        "revertpage": "[[Special:Contributions/$2|$2]] үзгәртүләре ([[User talk:$2|бәхәс]])  [[User:$1|$1]] юрамасына кадәр кире кайтарылды",
        "changecontentmodel-title-label": "Битнең исеме",
        "changecontentmodel-reason-label": "Сәбәп:",
+       "changecontentmodel-submit": "Үзгәртү",
        "logentry-contentmodel-change-revertlink": "кайтару",
        "logentry-contentmodel-change-revert": "кайтару",
        "protectlogpage": "Яклану көндәлеге",
        "blockipsuccesssub": "Тыю башкарылган",
        "ipb-unblock-addr": "$1 кулланучысын тыюдан азат итү",
        "ipb-unblock": "Кулланучы яки IP адресы тыюдан азат итү",
+       "ipb-blocklist-duration-left": "$1 калды",
        "unblockip": "Кулланучыны тыюдан азат итү",
        "ipusubmit": "Бу тыюны туктату",
+       "blocklist": "Тыелган кулланучылар",
        "ipblocklist": "Тыелган кулланучылар",
        "blocklist-timestamp": "Дата/вакыт",
        "blocklist-target": "Максат",
        "articleexists": "Мондый исемле бит бар инде, яисә мондый исем рөхсәт ителми.\nЗинһар башка исем сайлагыз.",
        "movetalk": "Бәйләнешле бәхәс битен күчерү",
        "movelogpage": "Күчерү көндәлеге",
+       "movesubpage": "{{PLURAL:$1|1=Асбит|Асбитләр}}",
        "movereason": "Сәбәп:",
        "revertmove": "кире кайту",
        "delete_and_move_confirm": "Әйе, битне бетерү",
        "importstart": "Битләрне импортлау...",
        "import-revision-count": "$1 {{PLURAL:$1|юрама}}",
        "importnopages": "Импортлау өчен битләр юк.",
+       "xml-error-string": "$2 юлда, $3 урында ($4 байт) $1: $5",
        "importlogpage": "Кертү көндәлеге",
        "javascripttest": "JavaScript тикшерү",
        "tooltip-pt-userpage": "{{GENDER:|Кулланучы}} битегез",
        "pageinfo-length": "Бит озынлыгы (байтларда)",
        "pageinfo-article-id": "Бит идентификаторы",
        "pageinfo-language": "Битнең теле",
+       "pageinfo-content-model-change": "үзгәртү",
        "pageinfo-robot-index": "Рөхсәт",
        "pageinfo-robot-noindex": "Рөхсәтсез",
        "pageinfo-firstuser": "Битне төзүче",
        "exif-copyrighted": "Автор хокуклары халәте:",
        "exif-copyrightowner": "Автор хокуклары иясе",
        "exif-usageterms": "Куллану шартлары",
-       "exif-orientation-1": "Ð\9dоÑ\80малÑ\8c",
+       "exif-orientation-1": "Ð\93адÓ\99Ñ\82и",
        "exif-orientation-3": "180° ка борылган",
+       "exif-componentsconfiguration-0": "юк",
+       "exif-exposureprogram-0": "Билгесез",
+       "exif-exposureprogram-1": "Кулдан җайлау режимы",
+       "exif-exposureprogram-2": "Программалы режим (гади)",
+       "exif-subjectdistance-value": "$1 {{PLURAL:$1|метр}}",
        "exif-meteringmode-0": "Билгесез",
+       "exif-meteringmode-1": "Уртача",
        "exif-meteringmode-3": "Нокталы",
        "exif-meteringmode-4": "Мультинокталы",
        "exif-meteringmode-255": "Башка",
        "exif-lightsource-4": "Яктылык",
        "exif-lightsource-9": "Яхшы һава торышы",
        "exif-lightsource-11": "Күләгә",
+       "exif-flash-mode-3": "автоматик режим",
+       "exif-focalplaneresolutionunit-2": "дюйм",
        "exif-sensingmethod-1": "Билгесез",
        "exif-scenecapturetype-0": "Стандарт",
        "exif-scenecapturetype-1": "Ландшафт",
        "exif-gpsstatus-v": "Мәгълүматларны җибәрүгә әзер",
        "exif-gpsspeed-k": "км/сәг",
        "exif-gpsspeed-m": "миля/сәг",
+       "exif-gpsspeed-n": "Төен",
+       "exif-gpsdestdistance-k": "Километр",
+       "exif-gpsdestdistance-m": "Миль",
+       "exif-gpsdestdistance-n": "Диңгез миле",
+       "exif-gpsdop-excellent": "Шәп ($1)",
+       "exif-gpsdop-good": "Яхшы ($1)",
+       "exif-gpsdop-moderate": "Уртача ($1)",
+       "exif-gpsdop-fair": "Ярыйсы ($1)",
+       "exif-gpsdop-poor": "Начар ($1)",
+       "exif-dc-date": "Дата(лар)",
+       "exif-dc-publisher": "Нәшрият",
+       "exif-dc-relation": "Бәйле медиа",
+       "exif-dc-rights": "Хокуклар",
+       "exif-dc-source": "Чыганак медиа",
+       "exif-dc-type": "Медиа төре",
+       "exif-rating-rejected": "Кире кагылды",
+       "exif-isospeedratings-overflow": "65535-тән күп",
        "namespacesall": "барлык",
        "monthsall": "барлык",
        "recreate": "Яңадан ясау",
        "confirm_purge_button": "OK",
        "confirm-purge-top": "Бу битнең кэшы чистартылсынмы?",
        "confirm-purge-bottom": "Кэшны чистартудан соң аның соңгы юрамасы күрсәтеләчәк.",
+       "confirm-watch-button": "OK",
+       "confirm-unwatch-button": "ОК",
+       "confirm-rollback-button": "ОК",
        "pipe-separator": "&#32;|&#32;",
+       "quotation-marks": "«$1»",
        "imgmultipageprev": "← алдагы бит",
        "imgmultipagenext": "алдагы бит →",
        "imgmultigo": "Күчү!",
        "imgmultigoto": "$1 битенә күчү",
+       "img-lang-go": "Башкару",
        "ascending_abbrev": "үсү",
        "descending_abbrev": "кимү",
        "table_pager_next": "Киләсе бит",
        "version-specialpages": "Махсус битләр",
        "version-other": "Башка",
        "version-hook-subscribedby": "Түбәндәгеләргә язылган:",
+       "version-no-ext-name": "[исемсез]",
        "version-license": "MediaWiki лицензиясе",
+       "version-ext-license": "Лицензия",
+       "version-ext-colheader-name": "Киңәйтүләр",
+       "version-skin-colheader-name": "Күренеш",
+       "version-ext-colheader-version": "Юрама",
+       "version-ext-colheader-license": "Лицензия",
+       "version-ext-colheader-description": "Тасвирлама",
+       "version-ext-colheader-credits": "Авторлар",
+       "version-poweredby-others": "башкалар",
+       "version-poweredby-translators": "translatewiki.net тәрҗемәчеләре",
        "version-software": "Урнаштырылган программа белән тәэмин ителешне",
        "version-software-product": "Продукт",
        "version-software-version": "Версия",
+       "version-entrypoints-header-url": "URL",
+       "version-libraries-library": "Китапханә",
+       "version-libraries-version": "Юрама",
+       "version-libraries-license": "Лицензия",
+       "version-libraries-description": "Тасвирлама",
+       "version-libraries-authors": "Авторлар",
        "fileduplicatesearch": "Бер үк файлларны эзләү",
        "fileduplicatesearch-submit": "Эзләү",
        "specialpages": "Махсус битләр",
        "tags-title": "Теглар",
        "tags-intro": "Әлеге сәхифәдә төзәтүләрне билгеләгән, программа тәэмин итә торган теглар исемлеге һәм шул тегларның аңламнары китерелгән.",
        "tags-tag": "Тег исеме",
+       "tags-source-header": "Чыганак",
+       "tags-active-yes": "Әйе",
+       "tags-active-no": "Юк",
        "tags-edit": "үзгәртү",
        "comparepages": "Битләрне чагыштыру",
        "compare-page1": "Беренче сәхифә",
        "htmlform-submit": "Җибәрү",
        "htmlform-reset": "Үзгәртүләрне кире кайтару",
        "htmlform-selectorother-other": "Башка",
+       "htmlform-no": "Юк",
+       "htmlform-yes": "Әйе",
        "htmlform-cloner-delete": "Бетерү",
        "logentry-delete-delete": "$1 $3 битен {{GENDER:$2|бетерә}}",
        "revdelete-content-hid": "эчтәлек яшерелгән",
        "rightsnone": "(юк)",
        "revdelete-summary": "үзгәртүләр тасвирламасы",
        "feedback-adding": "Фикерне сәхифәгә өстәү ...",
+       "feedback-back": "Артка",
        "feedback-bugnew": "Мин тикшердем. Яңа хата турында хәбәр итү",
        "feedback-bugornote": "Әгәр дә сез техник проблеманы җентекләп тасвирларга әзер икәнсез, зинһар өчен, [$1 хата турында хәбәр итегез].\nБашка очракта сез түбәндәге гади форманы куллана аласыз. Сезнең шәрехләмә \"[$3 $2]\" сәхифәсенә сезнең кулланучы исеме һәм сез кулланган браузер исеме белән бергә өстәләчәк.",
        "feedback-cancel": "Баш тарту",
        "feedback-subject": "Тема:",
        "feedback-submit": "Җибәрү",
        "feedback-thanks": "Рәхмәт! Сезнең фикер \"[$2 $1]\" сәхифәсенә куелды.",
+       "feedback-thanks-title": "Рәхмәт!",
        "searchsuggest-search": "Эзләү",
        "searchsuggest-containing": "эчтәлек...",
        "api-error-badaccess-groups": "Сезгә бу викигә файллар өстәү рөхсәт ителмәгән",
        "api-error-unknownerror": "Билгесез хата: \"$1\".",
        "api-error-uploaddisabled": "Бу викидә файллар йөкләү мөмкинлеге сүндерелгән.",
        "api-error-verification-error": "Бәлки, бу файл бозылгандыр яки дөрес түгел киңәйтелмәгә ия.",
+       "duration-seconds": "$1 {{PLURAL:$1|секунд}}",
        "duration-minutes": "$1 {{PLURAL:$1|минут}}",
        "duration-hours": "$1 {{PLURAL:$1|сәгать}}",
        "duration-days": "$1 {{PLURAL:$1|көн}}",
+       "duration-weeks": "$1 {{PLURAL:$1|атна}}",
+       "duration-years": "$1 {{PLURAL:$1|ел}}",
+       "duration-decades": "$1 {{PLURAL:$1|дистә ел}}",
+       "duration-centuries": "$1 {{PLURAL:$1|гасыр}}",
+       "duration-millennia": "$1 {{PLURAL:$1|меңьеллык}}",
+       "limitreport-cputime-value": "$1 {{PLURAL:$1|секунд}}",
+       "limitreport-walltime-value": "$1 {{PLURAL:$1|секунд}}",
+       "limitreport-postexpandincludesize-value": "$1/$2 {{PLURAL:$2|байт}}",
+       "limitreport-templateargumentsize-value": "$1/$2 {{PLURAL:$2|байт}}",
        "expandtemplates": "Үрнәкләрне ачу",
+       "expand_templates_output": "Нәтиҗә",
        "expand_templates_ok": "OK",
+       "expand_templates_preview": "Алдан карау",
+       "pagelang-name": "Бит",
+       "pagelang-language": "Тел",
+       "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (ачык)",
+       "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 (<strong>ябык</strong>)",
        "mediastatistics": "Медиа хисабы",
        "special-characters-group-latin": "Латин",
        "special-characters-group-latinextended": "Латин (киңәйтелгән)",
        "special-characters-group-persian": "Фарсы",
        "special-characters-group-hebrew": "Яхүд",
        "special-characters-group-bangla": "Бенгаль",
+       "special-characters-group-tamil": "Тамиль",
        "special-characters-group-telugu": "Телугу",
        "special-characters-group-sinhala": "Сингаль",
        "special-characters-group-gujarati": "Гуҗарати",
+       "special-characters-group-devanagari": "Деванагари",
        "special-characters-group-thai": "Таиланд",
        "special-characters-group-lao": "Лаос",
        "special-characters-group-khmer": "Кһмер"
index d2a098f..5fff7f1 100644 (file)
        "about": "Дугайында",
        "article": "Допчу арын",
        "newwindow": "(чаа көзенекке)",
-       "cancel": "ЫнÑ\87анмаÑ\81",
+       "cancel": "Ð\9eйÑ\82алал",
        "moredotdotdot": "Артык...",
        "mypage": "Арын",
        "mytalk": "Чугаа",
        "yourpassword": "Чажыт сөс",
        "userlogin-yourpassword": "Пароль",
        "yourpasswordagain": "Чажыт сөзүңерни катап бижиңер:",
-       "remembermypassword": "Мени бо компьютерде сактып алыры ($1 {{PLURAL:$1|1=хүн|хүн}}ге чедир)",
        "login": "Кирери",
        "nav-login-createaccount": "Кирери / бүрүткел бижикти чогаадыры",
        "userlogin": "Кирери / бүрүткел бижикти чогаадыры",
        "minoredit": "Бо эдилге бичии-дир",
        "watchthis": "Бо арынны хайгаараар",
        "savearticle": "Арынны шыгжаар",
+       "savechanges": "Өскертилгени шыгжаар",
        "preview": "Чижеглей көөрү",
        "showpreview": "Хынап көр",
-       "showdiff": "Кииртинген эдилгелер",
+       "showdiff": "Өскертилгени көргүзер",
        "anoneditwarning": "<strong> Кичээңгейлиг! </strong> Сайтта бүрүткеттинмээн-дир силер. Кандыг-даа бол эдилгелер киирер болзуңарза, IP-адрезиңер хөйге көскү болур. Сайтче <strong>[$1 кире бээр азы]</strong> азы <strong>[$2 бүрүткеттинип алыр] болзуңарза, эдилгелер силерниң адыңар-биле холбаалыг апаар, силерге өске-даа эптиг аргаларлыг тыптып кээр.",
        "missingcommenttext": "Тайылбырни адаанда чогаадыңар.",
        "summary-preview": "Түңнелдү чижеглей көөрү:",
        "editusergroup": "Ажыглакчының бөлгүмнерни өскертири",
        "editinguser": "Changing user rights of user '''[[User:$1|$1]]''' ([[User talk:$1|{{int:talkpagelinktext}}]]{{int:pipe-separator}}[[Special:Contributions/$1|{{int:contribslink}}]])",
        "userrights-editusergroup": "Ажыглакчының бөлгүмнерни өскертири",
-       "saveusergroups": "Ажыглакчының бөлгүмнерни шыгжаары",
+       "saveusergroups": "{{GENDER:$1|Ажыглакчының|Ажыглакчының}} бөлгүмнерин шыгжаар",
        "userrights-reason": "Чылдагаан:",
        "group": "Бөлгүм:",
        "group-user": "Ажыглакчылар",
        "rcshowhideminor-hide": "чажырар",
        "rcshowhidebots": "Роботтарны $1",
        "rcshowhidebots-show": "Көргүзер",
+       "rcshowhidebots-hide": "Чажырар",
        "rcshowhideliu": "бүрүткеттинген киржикчилер $1",
        "rcshowhideliu-show": "көргүзер",
        "rcshowhideliu-hide": "Чажырар",
        "feedback-cancel": "Соксаары",
        "feedback-message": "Чагаа:",
        "feedback-subject": "Кол сөс:",
-       "searchsuggest-search": "Дилээр",
+       "searchsuggest-search": "{{SITENAME}} иштинден дилээр",
        "duration-seconds": "$1 {{PLURAL:$1|секунда|секунда}}",
        "duration-minutes": "$1 {{PLURAL:$1|минут|минут}}",
        "duration-hours": "$1 {{PLURAL:$1|шак|шак}}",
index 7bff7f2..4b39079 100644 (file)
@@ -6,26 +6,46 @@
                        "Udmwiki",
                        "ОйЛ",
                        "לערי ריינהארט",
-                       "TMg"
+                       "TMg",
+                       "AlnashPiyash2",
+                       "Irus",
+                       "Shklyaev",
+                       "Wadorgurt"
                ]
        },
-       "tog-underline": "Линкъёс ултӥз гожен сызоно",
-       "tog-hideminor": "Берпуметӥ тупатонъёслэн списоксэс ичи воштонъёстэк возьматыны",
-       "tog-hidepatrolled": "Берпуметӥ тупатонъёслэн списоксэс партрулировать каремын воштонъёстэк возьматыны",
-       "tog-newpageshidepatrolled": "Выль бамъёслэн списоксэс партрулировать каремын бамъёстэк возьматыны",
+       "tog-underline": "Чӧлсконъёсыз ултӥз гожен сызоно",
+       "tog-hideminor": "Выль тупатонъёслэн списоксэс ичи воштонъёстэк возьматыны",
+       "tog-hidepatrolled": "Выль тупатонъёслэн списоксэс эскерем воштонъёстэк возьматыны",
+       "tog-newpageshidepatrolled": "Выль бамъёслэн списоксэс эскерем бамъёстэк возьматыны",
+       "tog-hidecategorization": "Бамъёслэсь категоризацизэс ватыны",
        "tog-extendwatchlist": "Чаклан списокын вань тупатонъёсты возьматыны (озьытэк берпуметӥоссэс гинэ)",
        "tog-usenewrc": "Выль тупатонъёслэсь списоксэс умояллям сямен возьматыны (JavsScript кулэ)",
        "tog-numberheadings": "Заголовокъёсты автоматически нумеровать карыны",
-       "tog-showtoolbar": "Тупатон тӥрлыкъёслэн панельзэс возьматыны (JavaScript кулэ)",
+       "tog-showtoolbar": "Тупатон тӥрлыкъёслэн панельзэс возьматыны",
        "tog-editondblclick": "Бамъёсты шырлэсь зӥбонзэ кык пол зӥбыса тупатыны (JavaScript кулэ)",
        "tog-editsectiononrightclick": "Cекциолэсь заголовок вылазы шырлэн бур кнопкаеныз зӥбыса тупатонзэс лэзьыны (JavaScript кулэ)",
        "tog-watchcreations": "Мынэсьтым кылдытэм бамъёсме но ӝуткам файлъёсме чаклан списокам пыртыны",
        "tog-watchdefault": "Мынэсьтым тупатэм бамъёсме но файлъёсме чаклан списокам пыртыны",
        "tog-watchmoves": "Мынэсьтым мукет интые выжтэм бамъёсме но файлъёсме чаклан списокам пыртыны",
        "tog-watchdeletion": "Мынэсьтым ӵушыса быдтэм бамъёсме но файлъёсме чаклан списоке пыртыны",
+       "tog-watchuploads": "Мынам загрузить карем файлъёсме чаклан списоке пыртыны",
+       "tog-watchrollback": "Чаклан списоке пыртыны бамъёсыз, кудъёсаз мон откат лэсьтӥ",
        "tog-minordefault": "Вань воштонъёсты «ичи воштон» пусэн пусйыны",
        "tog-previewontop": "Утён азьвыл учконлэсь укнозэ тупатон укнолэсь азьвылгес возьматыны",
-       "tog-previewonfirst": "Бам нырысьсэ утиськыкуз уётн азьвыл учконэз возьматыны",
+       "tog-previewonfirst": "Тупатыны кутскыку возьматыны предпросмотрез",
+       "tog-enotifwatchlistpages": "Чаклан списокысь бамъёсыз но файлъёсыз тупатэм сярысь ивортыны электронной почта пыр",
+       "tog-enotifusertalkpages": "Вераськон бамез тупатон сярысь ивортыны электронной почта пыр",
+       "tog-enotifminoredits": "Ивортыны соку но, куке бамын яке файлын ичи воштон лэсьтэмын",
+       "tog-enotifrevealaddr": "Мынэсьтым почта адресме возьматыны ивортӥсь сообщениосын",
+       "tog-shownumberswatching": "Возьматыны викиавторъёслэсь лыдзэс, кудъёсыз бамез чаклан списоке пыртӥзы",
+       "tog-fancysig": "Подписьлэн аслам вики-разметкае (автоматической ӵӧлсконтэк)",
+       "tog-watchlisthideown": "Мынэсьтым тупатонъёсме чаклан списокысь ватыны",
+       "tog-watchlisthidebots": "Чаклан списокысь ватоно ботъёслэсь тупатэмзэс",
+       "tog-watchlisthideminor": "Чаклан списокысь ватоно ичи воштонъёсыз",
+       "tog-watchlisthideliu": "Авторизированной викиавторъёслэсь тупатэмъёссэс чаклан списокысь ватыны",
+       "tog-watchlisthidepatrolled": "Эскерем тупатонъёсыз чаклан списокысь ватыны",
+       "tog-watchlisthidecategorization": "Бамъёслэсь категоризацизэс ватыны",
+       "tog-showhiddencats": "Возьматоно ватэм категориосыз",
        "underline-always": "Котьку",
        "underline-never": "Ноку",
        "underline-default": "Браузерлэсь настройкаоссэ уже кутоно",
@@ -71,7 +91,7 @@
        "september-gen": "куарусёнэ",
        "october-gen": "коньывуонэ",
        "november-gen": "шуркынмонэ",
-       "december-gen": "толсурэ",
+       "december-gen": "толсуре",
        "jan": "тшт",
        "feb": "тпт",
        "mar": "южт",
        "oct": "квт",
        "nov": "шкт",
        "dec": "тст",
+       "january-date": "Толшор $1",
+       "february-date": "Тулыспал $1",
+       "march-date": "Южтолэзь $1",
+       "april-date": "Ожтолэзь $1",
+       "may-date": "Куартолэзь $1",
+       "june-date": "Инвожо $1",
+       "july-date": "Пӧсьтолэзь $1",
+       "august-date": "Гудырикошкон $1",
+       "september-date": "Куарусён $1",
+       "october-date": "Коньывуон $1",
+       "november-date": "Шуркынмон $1",
+       "december-date": "Толсур $1",
        "pagecategories": "{{PLURAL:$1|1=Категория|Категориос}}",
        "category_header": "«$1» категориысь бамъёс",
        "subcategories": "Подкатегориос",
        "category-empty": "''Та категориын али бамъёс но, файлъёс но ӧвӧл.''",
        "hidden-categories": "{{PLURAL:$1|1=Ватэм категория|Ватэм категориос}}",
        "hidden-category-category": "Ватэм категориос",
-       "category-subcat-count": "{{PLURAL:$2|1=Со категориын одӥг подкатегория гинэ.|Возьматэмын $1 подкатегория $2 пӧлысь.}}",
-       "category-subcat-count-limited": "Со категориын $1 подкатегория.",
-       "category-article-count": "{{PLURAL:$2|1=Со категориын одӥг бам гинэ.|Возьматэмын $1 бам $2 пӧлысь.}}",
-       "category-article-count-limited": "Со категориын $1 бам.",
-       "category-file-count": "{{PLURAL:$2|1=Со категориын одӥг файл гинэ.|Возьматэмын $1 файл $2 пӧлысь.}}",
-       "category-file-count-limited": "Со категориын $1 файл.",
+       "category-subcat-count": "{{PLURAL:$2|1=Со категориын одӥг подкатегория гинэ.|Возьматэмын $1 {{PLURAL:$1|подкатегория|подкатегориос}} $2 пӧлысь.}}",
+       "category-subcat-count-limited": "Со категориын {{PLURAL:$1|$1 подкатегория}}.",
+       "category-article-count": "{{PLURAL:$2|1=Со категориын одӥг бам гинэ.|Возьматэмын {{PLURAL:$1|$1 бам}} $2 пӧлысь.}}",
+       "category-article-count-limited": "Со категориын {{PLURAL:$1|$1 бам}}.",
+       "category-file-count": "{{PLURAL:$2|1=Со категориын одӥг файл гинэ.|Возьматэмын {{PLURAL:$1|$1 файл}} $2 пӧлысь.}}",
+       "category-file-count-limited": "Со категориын {{PLURAL:$1|$1 файл}}.",
        "listingcontinuesabbrev": "азьлань",
        "index-category": "Индексировать кароно бамъёс",
        "noindex-category": "Индексировать каронтэм бамъёс",
        "about": "Та сярысь",
        "article": "Статья",
-       "mypage": "Ас бам",
+       "cancel": "Берытсконо",
+       "mypage": "Бам",
        "mytalk": "Викиавтор сярысь вераськон",
-       "anontalk": "Со IP-адрес сярысь вераськон",
+       "anontalk": "Сярысь вераськон",
        "navigation": "Навигация",
+       "and": "&#32;но",
+       "qbfind": "Утчан",
+       "qbbrowse": "Учкыны",
+       "qbedit": "Тупатыны",
        "qbpageoptions": "Бамлэн настройкаосыз",
        "faq": "Юан-веран",
        "faqpage": "Project:Юан-веран",
+       "variants": "Вариантъёс",
+       "navigation-heading": "Навигация",
        "errorpagetitle": "Янгыш",
        "tagline": "{{SITENAME}}-ысь материал",
        "help": "Валэктонъёс",
        "search": "Утчан",
        "searchbutton": "Утчано",
+       "go": "Мыноно",
        "searcharticle": "Мыноно",
        "history": "Бамлэн историез",
        "history_short": "история",
+       "updatedmarker": "воштӥськемын мынам берпуметӥ пыраме бере",
        "printableversion": "Печатламон версия",
        "permalink": "Ӵапак та версиезлы линк",
        "print": "Печатлано",
+       "view": "Учкон",
+       "view-foreign": "$1 сайтын учконы",
        "edit": "тупатыны",
+       "create": "Кылдытоно",
+       "editthispage": "Та бамез тупатыны",
+       "create-this-page": "Та бамез кылдытыны",
        "delete": "Быдтыны",
+       "deletethispage": "Та бамез быдтыны",
+       "undeletethispage": "Та бамез быдтыны",
        "protect": "Утьыны",
+       "protect_change": "воштыны",
+       "protectthispage": "Та бамез утьыны",
+       "unprotect": "Утемез воштыны",
+       "unprotectthispage": "Та бамлэсь утемзэ воштыны",
+       "newpage": "Выль бам",
+       "talkpage": "Та бам сярысь вераськыны",
        "talkpagelinktext": "Вераськон",
+       "specialpage": "Ваньмыз панель",
+       "personaltools": "Нимаз тӥрлыке",
+       "articlepage": "Статьяез учкыны",
        "talk": "Вераськон",
+       "views": "Учконъёс",
        "toolbox": "Тӥрлык",
+       "userpage": "Викиавторлэсь бамзэ учкыны",
+       "templatepage": "Шаблонлэсь бамзэ учкыны",
+       "categorypage": "Категорилэсь бамзэ учкыны",
+       "viewtalkpage": "Вераськонэз учкыны",
+       "otherlanguages": "Мукет кылъёсын",
+       "redirectedfrom": "(Перенаправлять $1)",
+       "redirectpagesub": "Выжытон бам",
+       "redirectto": "Выжытон:",
+       "lastmodifiedat": "Та бамлэн берпуметӥ воштонэз: $2, $1.",
+       "protectedpage": "Утем бам",
+       "jumpto": "Выжон:",
        "jumptonavigation": "навигация",
        "jumptosearch": "утчан",
+       "pool-errorunknown": "Тодмотэм янгыш",
+       "aboutsite": "«{{SITENAME}}»-лэн описаниез",
+       "aboutpage": "Project:Описание",
+       "copyright": "Пуштрос $1 лицензияя луэ ярамон (мукетыз валэктэмын ӧвӧл дыръя).",
+       "copyrightpage": "{{ns:project}}:Автор праваос",
        "currentevents": "Выль иворъёс",
        "currentevents-url": "Project:Выль иворъёс",
+       "disclaimers": "Кыл кутыны пумит луон",
+       "disclaimerpage": "Project:Кыл кутыны пумит луон",
+       "helppage-top-gethelp": "Юрттэт",
        "mainpage": "Кутскон бам",
        "mainpage-description": "Кутскон бам",
        "portal": "Сообщество",
        "portal-url": "Project:Портал сообщества",
+       "privacy": "Конфиденциальностья политика",
+       "privacypage": "Project:Конфиденциальностья политика",
+       "badaccess": "Янгышъёс юаське",
+       "badaccess-group0": "Быдэстэм ужез тонэ уг лэзьы, кин тонэ курозы.",
+       "badaccess-groups": "Ужъёсын но, кудаз тӥледыз курисько поциент {{PLURAL:$2|туркым|группа одӥг}}: $1.",
+       "versionrequired": "MediaWiki доллар кулэ версия $1",
+       "ok": "OK",
        "retrievedfrom": "«$1»-лэсь басьтэмын",
        "editsection": "тупатыны",
+       "editold": "тупатыны",
+       "viewsourceold": "кодзэ учкыны",
+       "editlink": "тупатыны",
+       "viewsourcelink": "кодзэ учкыны",
        "editsectionhint": "$1 секциез тупатоно",
+       "toc": "Пуштрос",
        "showtoc": "возьматоно",
        "hidetoc": "ватоно",
+       "collapsible-collapse": "ватоно",
+       "collapsible-expand": "возьматоно",
+       "confirmable-yes": "Мед",
+       "confirmable-no": "Ӧвӧл",
+       "viewdeleted": "Учкыны $1",
        "site-rss-feed": "$1 — RSS-лента",
        "site-atom-feed": "$1 — Atom-лента",
+       "page-atom-feed": "«$1» Атом-лента",
        "red-link-title": "$1 (со бам ӧвӧл на)",
+       "nstab-main": "Бам",
        "nstab-user": "Викиавтор",
+       "nstab-media": "Мультимедиа",
+       "nstab-special": "Ваньмыз панель",
+       "nstab-project": "Проект сярысь",
+       "nstab-image": "Файл",
        "nstab-mediawiki": "Ивортон",
+       "nstab-template": "Шаблон",
+       "nstab-help": "Валэктон",
+       "nstab-category": "Категория",
+       "mainpage-nstab": "Кутскон бам",
+       "error": "Янгыш",
+       "databaseerror-query": "Курон: $1",
+       "databaseerror-function": "Функция: $1",
+       "databaseerror-error": "Янгыш: $1",
        "viewsource": "Кодзэ учкыны",
-       "login": "Пырон",
+       "viewsource-title": "Текст потон бам $1",
+       "actionthrottled": "Кекатыны ужъёс",
+       "actionthrottledtext": "Ужрадлэн ӟечлыкез злоупотребление-нюръяськон, та ужрад тӥ понна укыр трос поллы сюбегамын быдэстон вакчи дыр кусыпъёс, лимитъёс, та тӥляд но тубе.\nПожалуйста, кӧня ке минут ортчыса, нош ик утчасько.",
+       "protectedpagetext": "Та бамез утьыны луэ шуыса, яке мукет уже предотвращать редактировать карон.",
+       "viewsourcetext": "Та бамез учкыны быгатӥськоды тӥ но потон кӧчыро.",
+       "viewyourtext": "Ошмес но, тонэ учкыны быгатӥськоды кӧчырыны <strong>тон шонертон</strong> та бамам.",
+       "protectedinterface": "Та текст бам вайытиськом, та программаын вики интерфейсъёс, но дурбасьтэ, мед злоупотребление предотвращать.\nВика ватсаса, ваньзэ воштыны яке берыктон понна, пожалуйста, [https://translatewiki.net/ translatewiki.net] MediaWiki локализация проект.",
+       "editinginterface": "<strong>Юа:</strong> редактировать карыны бамзэ тон, программное обеспечение понна со интерфейс текстовые кылдытон понна кутыны.\nТа викилэн мукет бамаз луись туссэ воштон понна та интерфейсэз пользователь пользовательский педпал быгатонлыкъёссэс.",
+       "namespaceprotected": "Тон дорын редактировать карыны бам ӧвӧл юаське <кужмо>$1</strong> инты нимъёс.",
+       "logouttext": "<strong>Тон али потэ.</strong>\n\nУчком, мар быгатозы бам куд-ог сямъёсты тӥледыз кадь возьматӥсько ке луысал, азьвыл сямен азьвыл системая пыртэмын, тон ӧд сузя, дыр кеш браузер.",
+       "welcomeuser": "Гажаса-а, $1!",
+       "welcomecreation-msg": "Тӥляд гожъямъёсты учётной кылдытэмын вал.\nТӥ быгатӥськоды воштэ {{SITENAME}} [[Special:Preferences|параметръёсты]] ке потэ тӥледлы.",
+       "yourname": "Пырон ним:",
+       "userlogin-yourname": "Пырон ним:",
+       "yourpassword": "Лушкемкыл:",
+       "userlogin-yourpassword": "Лушкемкыл",
+       "cannotcreateaccount-title": "Уг быгатиськы гожъян кылдӥз учётной",
+       "yourdomainname": "Тӥ доменэн:",
+       "login": "Пырыны",
        "nav-login-createaccount": "Нимдэс вераны / Регистрациез ортчытыны",
        "userlogin": "Регистрациез ортчытыны яке Википедие пырыны",
-       "userloginnocreate": "Пырон",
+       "userloginnocreate": "Пырыны",
        "logout": "Кошкыны",
-       "userlogout": "Кошкыны",
+       "userlogout": "Потыны",
+       "nologin": "Учётной книга ӧвӧл-а? $1.",
+       "nologinlink": "Выль вики-авторлэн регистрациез",
        "createaccount": "выль вики-авторлэн регистрациез",
+       "gotaccountlink": "Пырыны",
+       "userlogin-resetpassword-link": "Тӥлесьтыд парольдэс куштыны?",
+       "userlogin-helplink2": "Пыронъя юрттэт",
+       "createacct-emailrequired": "Электронной почталэн адресэз",
+       "createacct-submit": "Выль вики-авторлэн регистрациез",
+       "createacct-another-submit": "Выль вики-авторлэн регистрациез",
+       "loginerror": "Янгышъёс пырон",
+       "createacct-error": "Янгышъёс бордын учётной книга кылдытыны",
+       "createaccounterror": "Уг быгатиськы гожъян учётной кылдоз: $1",
+       "nocookiesnew": "Книга кылдытыны учётной пользователь вал, нош система тон уд пыры.\n{{SITENAME}} пользователь cookies пырон понна кутыны.\nDisconnect cookies тонэ дорам.\nПожалуйста, со гожтӥське, нош собере выльысь пырыны логин но пароль.",
+       "nocookieslogin": "{{SITENAME}} пользователь cookies пырон понна кутыны.\nDisconnect cookies тонэ дорам.\nПожалуйста, соосты утчано, выльысь гожтыны.",
+       "blocked-mailpassword": "Тон IP-адрес заблокировать-ысь редактировать карон. Злоупотребление предотвращение понна, та понна кутыны ӧз лэзиське пароль-ысь восстановление IP-адрес.",
+       "loginlanguagelabel": " Кыл: $1",
+       "pt-login": "Пырыны",
+       "pt-login-button": "Пырыны",
+       "pt-createaccount": "Выль вики-авторлэн регистрациез",
+       "pt-userlogout": "Потыны",
+       "oldpassword": "Вуж лушкемкыл:",
+       "newpassword": "Выль лушкемкыл:",
+       "passwordreset-username": "Пырон ним:",
        "summary": "Мар но малы тупатэмын? (вакчияк):",
        "minoredit": "Ичи воштон",
-       "noarticletext": "В настоящий момент текст на данной странице отсутствует.\nВы можете [[Special:Search/{{PAGENAME}}|найти упоминание данного названия]] на других страницах,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} найти соответствующие записи журналов],\nили '''[{{fullurl:{{FULLPAGENAME}}|action=edit}} создать страницу с таким названием]'''</span>.",
+       "watchthis": "Та бамез чаклан списоке пыртыны",
+       "savearticle": "Бамез гожтоно",
+       "preview": "Бамез эскерон",
+       "showpreview": "Бамез эскерон",
+       "showdiff": "Пыртэм воштонъёс",
+       "blockedtitle": "Заблокировать пыриськисьёс",
+       "blockedtext": "<strong>Книгае яке учётной IP-адрес заблокирован.</strong>\n\nБлокировка администратор потӥз $1.\nВозьмалэ вуоно мугез: \"\"$2\"\".\n\n* Кутскон блокировка: $8\n* Блокировка ортчиз: $6\n* Блокировка меретъёсыз: $7\n\nБыгатӥськод-а тон герӟаськемын $1 яке мукет котькудӥныз [[{{MediaWiki:Grouppage-sysop}}|администраторъёс]], блокировка мед эскерозы.\nУчком, мар кутыны уг быгато функцизэс \"гожтэт\", ас ке [[Special:Preferences|настройка персональной]] зуркатӥсь яке электронной почтаезлэн адресэз эн чуртна уг корректный, яке гожтӥськод ке, гожтэт ыстон укшась блокировка алон.\nТон IP-адрес — $3, блокировка идентификаторлэн — $5.\nПожалуйста, аслэсьтым тодон-та вазиськонэз котьку возьмано.",
+       "autoblockedtext": "Тон IP-адрес, герӟет автоматически заблокирован а со, мар солэн кутыны луоно азьвыл кин ке но пырисьёс пӧлысь, заблокирован {{GENDER:$4|участник|куакеч}} $1. \nБлокировка возьмано луоз вуоно мугез:\n\n: \"$2\" - лы.\n\n* Кутскон блокировка: $8\n* Блокировка ортчиз: $6\n* Блокировка меретъёсыз: $7\n\nБыгатӥськод-а тон герӟаськемын $1 яке мукет котькудӥныз [[{{MediaWiki:Grouppage-sysop}}|администраторъёс]], блокировка мед эскерозы.\n\nУчком, мар кутыны уг быгато функцизэс \"гожтэт\", ас ке [[Special:Preferences|настройка персональной]] зуркатӥсь яке электронной почтаезлэн адресэз эн чуртна уг корректный, яке гожтӥськод ке, гожтэт ыстон укшась блокировка алон.\n\nТон IP-адрес — $3, блокировка идентификаторлэн — #$5.\nПожалуйста, аслэсьтым тодон-та вазиськонэз котьку возьмано.",
+       "blockednoreason": "мугезлы эн возьмалэ",
+       "loginreqlink": "пырыны",
+       "noarticletext": "Али дыре та бамын текст ӧвӧл. \nТӥ быгатоды [[Special:Search/{{PAGENAME}}|шедьтыны со сярысь кыӵе ке ивор]] мукет бамъёсысь,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} шедьтыны журналъёсысь гожъямъёсыз], \nяке [{{fullurl:{{FULLPAGENAME}}|action=edit}} сыӵе нимын бам кылдытыны]</span>.",
+       "blocked-notice-logextract": "Пользователь заблокирован сётӥз та учырлы.\nСправка понна радъяськылӥсь журнал блокировка лапег берпуметӥ гожтэт:",
+       "continue-editing": "Тупатъянэз азьланьтоно",
+       "editing": "Тупатон: $1",
+       "editingsection": "Тупатон: $1 (люкет)",
+       "template-protected": "(утемын)",
+       "template-semiprotected": "(полузащищенный)",
+       "nocreate-loggedin": "Тон доразы юаськыны кылдӥз выль бам ӧвӧл.",
+       "permissionserrors": "Янгышъёс юаське",
+       "content-model-wikitext": "викитекст",
+       "cantcreateaccount-text": "Та книгаез кылдытонлы учётной IP-адрес (<кужмо>$1</кужмо>) заблокировать луизы [[User:$3|$3]].\n\nМугез, вайиз $3 возьматэ <em>$2</сиоз>",
+       "cantcreateaccount-range-text": "Учётной кылдытон - гожъян IP-адрес диапазонын <кужмо>$1</strong>, Тон пыриське со IP-адрес (<кужмо>$4</кужмо>), заблокировать луизы [[User:$3|$3]].\n\nМугез, вайиз $3 возьматэ <em>$2</сиоз>",
+       "viewpagelogs": "Та бамлы журналъёсыз возьматыны",
+       "revisionasof": "Версия $1",
+       "previousrevision": "← Вужгем",
+       "history-show-deleted": "Ӵушылэмъёссэ гинэ",
+       "rev-showdeleted": "возьматоно",
        "revdelete-radio-set": "Ватэм",
        "revdelete-radio-unset": "Адӟымон",
+       "revdelete-reason-dropdown": "*Вӧлскем палэнскон мугъёсты\n** Авторской правоосты тӥян\n** Яке кулэтэм информациез личной комментарий\n** Логин несоответствовать\n** Курла информациез Потенциально",
+       "history-title": "$1 — воштонъёслэн историзы",
+       "lineno": "$1-тӥ чур:",
+       "compareselectedversions": "Быръем версиосыз ӵошатыны",
+       "showhideselectedversions": "Возьматыны/ватыны быръем версиосыз",
+       "editundo": "берытсконо",
        "searchresults": "Шедьтэмын",
-       "search-result-size": "$1 кыл({{PLURAL:$2|1=1 word|$2 words}})",
+       "searchresults-title": "утчан \"$1\"",
+       "shown-title": "Адӟытылоно $1 {{PLURAL:$1|шедьтэмез}} бамлы быдэ",
+       "searchprofile-articles": "Валтӥсь бамъёс",
+       "searchprofile-images": "Мультимедиа",
+       "searchprofile-everything": "Котькытын",
+       "searchprofile-advanced": "Паськытатэм",
+       "searchprofile-images-tooltip": "Файлъёсты утчан",
+       "searchprofile-everything-tooltip": "Вань бамъёсэтӥ утчан (вераськон бамъёсты пыртыса)",
+       "search-result-size": "$1 ({{PLURAL:$2|$2 кыл}})",
+       "search-interwiki-more": "(эшшо)",
+       "searchall": "Ваньзэ",
+       "powersearch-toggleall": "Ваньзэ",
+       "powersearch-togglenone": "Номыре",
        "preferences": "настройкаос",
        "mypreferences": "Настройкаос",
        "prefs-watchlist": "Чаклан список",
+       "prefs-editing": "Тупатон",
+       "yourlanguage": "Интерфейслэн кылыз:",
+       "prefs-preview": "Бамез эскерон",
+       "group-sysop": "Администраторъёс",
+       "group-all": "(ваньзэ)",
+       "newuserlogpage": "Викиавторъёсыз регистрациосын журнал",
+       "enhancedrc-history": "история",
        "recentchanges": "Выль тупатонъёс",
+       "recentchanges-label-newpage": "Та тупатонэн выль бам кылдӥз",
+       "recentchanges-label-minor": "Пичи воштон",
+       "recentchanges-label-bot": "Та тупатонэз кариз бот",
+       "recentchanges-submit": "Возьматыны",
+       "rcshowhideminor-show": "Возьматыны",
+       "rcshowhidebots-show": "Возьматыны",
+       "rcshowhideliu-show": "Возьматыны",
+       "rcshowhideanons-show": "Возьматыны",
+       "rcshowhideanons-hide": "Ватыны",
+       "rcshowhidepatr-show": "Возьматыны",
+       "rcshowhidemine": "$1 аслэсьтым тупатонъёсме",
+       "rcshowhidemine-show": "Возьматыны",
+       "rcshowhidemine-hide": "Ватыны",
+       "rcshowhidecategorization-show": "Возьматыны",
+       "rcshowhidecategorization-hide": "Ватыны",
+       "diff": "пӧрт.",
        "hist": "история",
+       "hide": "Ватыны",
+       "show": "Возьматыны",
+       "minoreditletter": "и",
+       "newpageletter": "В",
+       "boteditletter": "б",
+       "rc-change-size-new": "Воштон бере быдӟала: $1 {{PLURAL:$1|байт}}",
+       "newsectionsummary": "/* $1 */ выль тема",
        "recentchangeslinked": "Герӟаськем тупатонъёс",
        "recentchangeslinked-feed": "Герӟаськем тупатонъёс",
        "recentchangeslinked-toolbox": "Герӟаськем тупатонъёс",
        "upload": "Файл поныны",
+       "upload-dialog-button-cancel": "Берытсконо",
+       "nolicense": "Ӧвӧл",
+       "file-anchor-link": "Файл",
+       "filehist": "Файллэн историез",
+       "filehist-datetime": "Дата/дыр",
+       "filehist-thumb": "Миниатюра",
+       "filehist-user": "Викиавтор",
+       "filehist-dimensions": "Быдӟала",
+       "filehist-comment": "Валэктон",
+       "imagelinks": "Файлэз уже кутон",
        "sharedupload": "Та файл — $1-ысь, сое мукет проектъёсын но уже кутыны луэ.",
+       "sharedupload-desc-here": "Та файл — $1-ысь, сое мукет проектъёсын но уже кутыны луэ.\n[$2 Файл гожъясь бамысьтыз] информация адӟытэмын улын.",
        "randompage": "Олокыӵе статья",
-       "nbytes": "$1 байт",
-       "move": "Мукет интые выжтыны",
+       "withoutinterwiki-submit": "Возьматыны",
+       "nbytes": "{{PLURAL:$1|$1 байт}}",
+       "prefixindex-submit": "Возьматыны",
+       "newpages": "Выль бамъёс",
+       "newpages-submit": "Возьматыны",
+       "move": "Нимзэ воштыны",
+       "log": "Журналъёс",
+       "logeventslist-submit": "Возьматыны",
+       "showhideselectedlogentries": "Возьматыны/ватыны быръем журналъёсысь гожъямъёсыз",
+       "checkbox-select": "Бырйыны: $1",
+       "checkbox-all": "Ваньзэ",
+       "checkbox-none": "Номыре",
+       "checkbox-invert": "Воштыны интыен",
+       "categories-submit": "Возьматыны",
+       "sp-deletedcontributions-contribs": "тупатонъёсыз",
+       "listusers-submit": "Возьматыны",
+       "listusers-blocked": "(заблокировать{{GENDER:$1||а}})",
+       "emailuser": "Викиавторлы гожтэт",
        "emailmessage": "Ивортон:",
-       "watchlist": "Чаклано статьяос",
+       "watchlist": "Чаклан список",
        "mywatchlist": "Чаклан список",
        "watch": "Чаклано",
        "unwatch": "Чакламысь дугдыны",
-       "mycontris": "Мынам гожтэмъёсы",
-       "whatlinkshere": "Татчы линкъёс",
-       "movearticle": "Статьяез мукет интые выжтыны",
-       "move-watch": "Та бамез чаклан списоке пыртыны",
-       "delete_and_move": "Быдтыны но мукет интые выжтыны",
+       "watchlist-details": "Тӥляд чаклан списокады {{PLURAL:$1|$1 бам}}, вераськон бамъёсыз лыдӟытэк.",
+       "watchlist-submit": "Возьматыны",
+       "watchlist-options": "Чаклан списокез тупатыны",
+       "enotif_reset": "Вань бамъёсыз лыдӟем пусйыны",
+       "historyaction-submit": "Возьматыны",
+       "rollbacklink": "ӝог берыктыны",
+       "restriction-edit": "Тупатон",
+       "blanknamespace": "(Валтӥсез)",
+       "contributions": "{{GENDER:$1|Викиавтор}} гожтэмъёсы",
+       "contributions-title": "$1 викиавтор гожтэмъёсы",
+       "mycontris": "Гожтэмъёс",
+       "whatlinkshere": "Татчы чӧлсконъёс",
+       "block": "Блокировка пыриськисьёс",
+       "blockip": "Заблокировать пыриськисьёс",
+       "unblocked": "$1 разблокировать",
+       "unblocked-id": "Блокировка $1 басьтоно луиз",
+       "blocklist-target": "Ужпумъёс",
+       "blocklist-reason": "Мугез",
+       "blocklink": "блокировать карыны",
+       "contribslink": "тупатонъёсыз",
+       "blocklogentry": "заблокировать [[$1]] дыр $2 $3",
+       "reblock-logentry": "блокировка воштӥз [[$1]] дыр $2 $3",
+       "blocklogtext": "Блокировка но та журналлэн ужезлы разблокирование пользователь.\nЗаблокировать Автоматически IP-адрес уг возьма.\nПроизведениосыз печатласько эстониын [[нимысьтыз:сьӧд списокын|сьӧд списокын]], бан список блокъёс лэсьтыны.",
+       "unblocklogentry": "разблокировать $1",
+       "range_block_disabled": "Администратор диапазонэз блокировать али.",
+       "move-watch": "Чаклан списоке пыртоно инъет но валтӥсь бамъёсыз",
        "allmessagesname": "Ивортон",
+       "allmessages-filter-all": "Ваньзэ",
+       "thumbnail-more": "Будэтоно",
+       "tooltip-pt-login": "Татын системае пырыны луоно, нош одно ик ӧвӧл",
+       "tooltip-pt-createaccount": "Татын учётной записез лэсьтыны но системае пырыны луоно, нош одно ик ӧвӧл",
        "tooltip-ca-talk": "Бамлэн контентэз сярысь вераськон",
+       "tooltip-ca-edit": "Та бамез тупатъяно",
+       "tooltip-ca-addsection": "Выль люкет кылдытоно",
+       "tooltip-ca-history": "Бамлэн воштонъёсыныз журнал",
+       "tooltip-ca-watch": "Та бамез чаклан списокады пыртоно",
        "tooltip-search": "Утчано {{SITENAME}}",
+       "tooltip-search-go": "Выжоно сыӵе ик нимын баме",
+       "tooltip-search-fulltext": "Шедьтоно бамъёсыз, кудъёсаз пумиське пусъем текст",
+       "tooltip-p-logo": "Кутскон баме мыноно",
        "tooltip-n-mainpage": "Кутскон баме мыноно",
        "tooltip-n-mainpage-description": "Кутскон баме мыноно",
        "tooltip-n-portal": "Проект сярысь, мар карыны быгатоды, ужлы кулэ луэмзэ кытысь шедьтоно",
+       "tooltip-n-currentevents": "Выль иворъёс сярысь веранъёс",
        "tooltip-n-recentchanges": "Берпуметӥ тупатонъёслэн списоксы",
        "tooltip-n-randompage": "Олокыӵе бамез учконо",
+       "tooltip-n-help": "Юрттэт басьтымон инты",
        "tooltip-t-whatlinkshere": "Ваньмыз бамъёс, кудъёсаз та бамлы линксы вань",
+       "tooltip-t-recentchangeslinked": "Выль тупатонъёс бамъёсын, кудъёссэ та бам чӧлске",
+       "tooltip-t-upload": "Файл поныны",
        "tooltip-t-specialpages": "Специальной бамъёслэн списоксы",
+       "tooltip-t-print": "Та бамысь печатламон версия",
+       "tooltip-t-permalink": "Бамлэн та версияз ялан чӧлскон",
+       "tooltip-ca-nstab-main": "Валтӥсь бамез учконо",
+       "tooltip-ca-nstab-user": "Викиавторлэн бамез",
+       "tooltip-ca-nstab-special": "Та бам нимысьтыз, сое тупатон луонтэм",
+       "tooltip-ca-nstab-image": "Файллэн бамез",
+       "tooltip-ca-nstab-category": "Категорилэн бамез",
+       "tooltip-rollback": "Берло викиавторен лэсьтэм воштонъёсыз одӥг зӥбонэн палэнтыны",
+       "pageinfo-header-edits": "Воштонъёслэн историзы",
        "pageinfo-toolboxlink": "Бам сярысь тодэтъёс",
-       "specialpages": "Ваньмыз панельёс"
+       "file-info-size": "$1 × $2 пиксель, файллэн быдӟалаез: $3, MIME-тип: $4",
+       "show-big-image-size": "$1 × $2 пиксель",
+       "metadata": "Метаданнойёс",
+       "metadata-fields": "Суредысь метаданнойёслэн та списоке пыртэм полеоссы адӟытӥськозы суред бам вылын, метаданнойёслэн таблицазы бинемын дыръя.\nМукет полеоссы ватскозы.\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
+       "exif-disclaimer": "Кыл кутыны пумит луон",
+       "namespacesall": "ваньзэ",
+       "monthsall": "ваньзэ",
+       "confirm-watch-top": "Та бамез чаклан списокады пыртоно?",
+       "autosumm-new": "Выль бам: «$1»",
+       "specialpages": "Ваньмыз панельёс",
+       "tag-filter": "[[Special:Tags|Тэгъёсыз]] фильтр:",
+       "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|1=Метка|Меткаос}}]]: $2)",
+       "tags-title": "Меткаос",
+       "logentry-newusers-create": "$1 нимо учётной запись {{GENDER:$2|кылдытэмын}} вал",
+       "searchsuggest-search": "Утчано {{SITENAME}}",
+       "searchsuggest-containing": "кудъёсаз вань...",
+       "api-error-autoblocked": "Тон IP-адрес заблокировать эрказ луи, малы ке шуоно со заблокировать пользователь кутыны луоз.",
+       "api-error-blocked": "Редактирование заблокировать вал тӥлесьтыд.",
+       "expand_templates_preview": "Эскерон",
+       "log-action-filter-all": "Ваньзэ"
 }
index 402a034..cccd0bf 100644 (file)
@@ -65,7 +65,9 @@
                        "Dars",
                        "Mix Gerder",
                        "E.belykh",
-                       "Visem"
+                       "Visem",
+                       "MMH",
+                       "Олександр"
                ]
        },
        "tog-underline": "Підкреслювання посилань:",
@@ -93,7 +95,7 @@
        "tog-enotifminoredits": "Надсилати мені електронного листа навіть при незначних редагуваннях сторінок та файлів",
        "tog-enotifrevealaddr": "Показувати мою поштову адресу в повідомленнях",
        "tog-shownumberswatching": "Показувати число користувачів, які додали сторінку до свого списку спостереження",
-       "tog-oldsig": "Ð\9fоточний підпис:",
+       "tog-oldsig": "Ð\92аÑ\88 Ð¿оточний підпис:",
        "tog-fancysig": "Сприймати підпис як вікітекст (без автоматичного посилання)",
        "tog-uselivepreview": "Використовувати швидкий попередній перегляд",
        "tog-forceeditsummary": "Попереджати, коли не зазначений короткий опис редагування",
        "tog-showhiddencats": "Показувати приховані категорії",
        "tog-norollbackdiff": "Не показувати різницю версій після виконання відкоту",
        "tog-useeditwarning": "Попереджати мене, якщо я залишаю сторінку редагування з незбереженими змінами",
-       "tog-prefershttps": "Завжди використовувати безпечне з'єднання при вході у систему",
+       "tog-prefershttps": "Завжди використовувати безпечне з'єднання при вході в систему",
        "underline-always": "Завжди",
        "underline-never": "Ніколи",
        "underline-default": "Використовувати налаштування браузера",
        "newwindow": "(відкривається в новому вікні)",
        "cancel": "Скасувати",
        "moredotdotdot": "Більше…",
-       "morenotlisted": "Цей Ñ\81пиÑ\81ок Ð½ÐµÐ¿Ð¾Ð²Ð½Ð¸Ð¹.",
+       "morenotlisted": "Цей Ñ\81пиÑ\81ок Ð¼Ð¾Ð¶Ðµ Ð±Ñ\83Ñ\82и Ð½ÐµÐ¿Ð¾Ð²Ð½Ð¸Ð¼.",
        "mypage": "Сторінка",
        "mytalk": "Обговорення",
        "anontalk": "Обговорення",
        "talk": "Обговорення",
        "views": "Перегляди",
        "toolbox": "Інструменти",
+       "tool-link-userrights": "Змінити групи {{GENDER:$1|користувачів}}",
+       "tool-link-emailuser": "Надіслати електронного листа {{GENDER:$1|цьому користувачеві|цій користувачці}}",
        "userpage": "Переглянути сторінку користувача",
        "projectpage": "Переглянути сторінку проекту",
        "imagepage": "Переглянути сторінку файлу",
        "createacct-yourpasswordagain-ph": "Введіть пароль знову",
        "userlogin-remembermypassword": "Запам'ятати мене",
        "userlogin-signwithsecure": "Захищене з'єднання",
+       "cannotlogin-title": "Не вдалося увійти",
+       "cannotlogin-text": "Вхід у систему неможливий.",
        "cannotloginnow-title": "Неможливо увійти прямо зараз",
        "cannotloginnow-text": "Неможливо увійти під-час використання $1.",
+       "cannotcreateaccount-title": "Створення облікових записів неможливе",
+       "cannotcreateaccount-text": "Пряме створення облікових записів не увімкнене у цій вікі.",
        "yourdomainname": "Ваш домен:",
        "password-change-forbidden": "Ви не можна змінити пароль на цій вікі.",
        "externaldberror": "Сталася помилка при автентифікації за допомогою зовнішньої бази даних, або у вас недостатньо прав для внесення змін до свого зовнішнього облікового запису.",
        "eauthentsent": "На вказану адресу електронної пошти відправлено лист підтвердження.\nЩоб отримувати надалі будь-які повідомлення, необхідно підтвердити, що обліковий запис належить справді Вам, за процедурою, описаною в листі.",
        "throttled-mailpassword": "Листа для оновлення пароля вже було надіслано електронною поштою протягом {{PLURAL:$1|1=останньої години|останніх $1 годин}}.\nДля попередження зловживань дозволено надсилати тільки одного листа оновлення пароля за {{PLURAL:$1|годину|$1 години|$1 годин}}.",
        "mailerror": "Помилка надсилання пошти: $1",
-       "acct_creation_throttle_hit": "Відвідувачі з вашої IP-адреси вже створили $1 {{PLURAL:$1|обліковий запис|облікових записи|облікових записів}} за останню добу, що є максимумом для цього відрізка часу.\nТаким чином, користувачі з цієї IP-адреси не можуть на цей момент створювати нових облікових записів.",
+       "acct_creation_throttle_hit": "Відвідувачі з вашої IP-адреси вже створили $1 {{PLURAL:$1|обліковий запис|облікові записи|облікових записів}} за останню $2, що є максимумом для цього відрізка часу.\nТаким чином, користувачі з цієї IP-адреси не можуть на цей момент створювати нових облікових записів.",
        "emailauthenticated": "Вашу адресу електронної пошти було підтверджено $2  о  $3.",
        "emailnotauthenticated": "Адресу вашої електронної пошти ще не підтверджено. Надсилання листів неможливе у жодній з наступних опцій.",
        "noemailprefs": "Вкажіть адресу електронної пошти, щоб уможливити наступні поштові функції вікі.",
        "botpasswords-label-resetpassword": "Скинути пароль",
        "botpasswords-label-grants": "Придатні дозволи:",
        "botpasswords-help-grants": "Кожен дозвіл дає доступ до перелічених прав користувача, які вже є у облікового запису користувача. Див. [[Special:ListGrants|таблицю дозволів]] для отримання додаткової інформації.",
-       "botpasswords-label-restrictions": "Обмеження на використання:",
        "botpasswords-label-grants-column": "Дозволено",
        "botpasswords-bad-appid": "Ім'я бота «$1» є недопустимим.",
        "botpasswords-insert-failed": "Не вдалось додати бота з іменем «$1». Можливо, він вже був доданий?",
        "botpasswords-updated-body": "Пароль бота з ім'ям «$1» користувача «$2» було оновлено.",
        "botpasswords-deleted-title": "Пароль бота видалено",
        "botpasswords-deleted-body": "Пароль бота з ім'ям «$1» користувача «$2» було видалено",
-       "botpasswords-newpassword": "Новий пароль для входу під <strong>$1</strong> — <strong>$2</strong>. <em>Запишіть його для подальшого використання.</em>",
+       "botpasswords-newpassword": "Новий пароль для входу під <strong>$1</strong> — <strong>$2</strong>. <em>Запишіть його для подальшого використання.</em> <br> (Для старих ботів, які вимагають, щоб логін був такий же, як і ім'я користувача, Ви також можете використовувати <strong>$3</strong> як ім'я користувача і <strong>$4</strong> як пароль.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider не доступний.",
        "botpasswords-restriction-failed": "Вхід не було здійснено через обмеження для паролю бота.",
        "botpasswords-invalid-name": "Вказане ім'я користувача не містить роздільник для пароля бота («$1»).",
        "passwordreset-emailelement": "Ім'я користувача: \n$1\n\nТимчасовий пароль: \n$2",
        "passwordreset-emailsentemail": "Якщо ця електронна адреса асоційована з вашим обліковим записом, то лист для відновлення пароля буде відправлено на неї.",
        "passwordreset-emailsentusername": "Якщо існує електронна адреса, яка асоційована з цим обліковим записом, на неї буде надіслано лист для відновлення пароля.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Електронний лист|Електронні листи}} скидання паролю було надіслано. {{PLURAL:$1|Ім'я користувача і пароль|Список імен користувачів і паролів}} показано нижче.",
-       "passwordreset-emailerror-capture2": "Не вдалося надіслати листа {{GENDER:$2|користувачу|користувачці}}: $1 {{PLURAL:$3|Ім'я користувача і пароль|список імен користувачів і паролів}} показано нижче.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Електронний лист|Електронні листи}} скидання паролю було надіслано. {{PLURAL:$1|Ім'я користувача і пароль|Список імен користувачів і паролів}} показано тут.",
+       "passwordreset-emailerror-capture2": "Не вдалося надіслати листа {{GENDER:$2|користувачу|користувачці}}: $1 {{PLURAL:$3|Ім'я користувача і пароль|список імен користувачів і паролів}} показано тут.",
        "passwordreset-nocaller": "Має бути надане джерело виклику",
        "passwordreset-nosuchcaller": "Джерело виклику не існує: $1",
        "passwordreset-ignored": "Скидання пароля не відбулося. Можливо, не було налашатовано надавача?",
        "italic_tip": "Курсив",
        "link_sample": "Назва посилання",
        "link_tip": "Внутрішнє посилання",
-       "extlink_sample": "назва посилання http://www.example.com",
+       "extlink_sample": "http://www.example.com назва посилання",
        "extlink_tip": "Зовнішнє посилання (не забудьте про префікс http://)",
        "headline_sample": "Текст заголовка",
        "headline_tip": "Заголовок 2-го рівня",
        "invalid-content-data": "Неприпустимі дані",
        "content-not-allowed-here": "Вміст «$1» недопустимий на сторінці [[$2]]",
        "editwarning-warning": "Перехід на іншу сторінку призведе до втрати ваших змін.\nЯкщо ви ввійшли до системи, то ви можете відключити це попередження в розділі \"{{int:prefs-editing}}\" ваших налаштувань.",
+       "editpage-invalidcontentmodel-title": "Контентна модель не підтримується",
+       "editpage-invalidcontentmodel-text": "Контентна модель «$1» не підтримується.",
        "editpage-notsupportedcontentformat-title": "Формат вмісту не підтримується",
        "editpage-notsupportedcontentformat-text": "Формат вмісту $1 не підтримується моделлю вмісту $2.",
        "content-model-wikitext": "вікітекст",
        "searchprofile-advanced-tooltip": "Шукати в заданих просторах назв",
        "search-result-size": "$1 ($2 {{PLURAL:$2|слово|слова|слів}})",
        "search-result-category-size": "{{PLURAL:$1|$1 елемент|$1 елементи|$1 елементів}} ({{PLURAL:$2|$2 підкатегорія|$2 підкатегорії|$2 підкатегорій}}, {{PLURAL:$3|$3 файл|$3 файли|$3 файлів}})",
-       "search-redirect": "(перенаправлення $1)",
+       "search-redirect": "(перенаправлення з $1)",
        "search-section": "(розділ $1)",
        "search-category": "(категорія $1)",
        "search-file-match": "(збігається із вмістом файлу)",
        "file-thumbnail-no": "Назва файлу починається на <strong>$1</strong>.\nМожливо, це зменшена копія зображення ''(мініатюра)''.\nЯкщо у вас є це зображення в повному розмірі, завантажте його, інакше змініть назву файлу.",
        "fileexists-forbidden": "Файл з такою назвою вже існує і не може бути перезаписаний.\nЯкщо ви все одно хочете завантажити цей файл, будь ласка, поверніться назад і оберіть іншу назву.\n[[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Файл із такою назвою вже існує у спільному сховищі файлів.\nЯкщо ви все ж хочете завантажити цей файл, будь ласка, поверніться назад і змініть назву файлу. [[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "Це завантаження є точною копією поточної версії <strong>[[:$1]]</strong>.",
+       "fileexists-duplicate-version": "Це завантаження є точною копією {{PLURAL:$2|старішої версії|старіших версій}} <strong>[[:$1]]</strong>.",
        "file-exists-duplicate": "Цей файл є дублікатом {{PLURAL:$1|1=файлу|таких файлів}}:",
        "file-deleted-duplicate": "Такий самий файл ([[:$1]]) уже вилучався раніше. Будь ласка, ознайомтеся з історією вилучень файлу перед тим, як завантажити його знову.",
        "file-deleted-duplicate-notitle": "Файл, ідентичний до цього файлу, був раніше видалений, і назву було усунено.\nВам слід попросити кого-небудь з можливістю перегляду усуненого файлу даних, щоб проаналізувати ситуацію, перш ніж приступити до повторного завантаження.",
        "upload-dialog-disabled": "Завантаження файлів з допомогою цього діалогового вікна відключені у цій вікі.",
        "upload-dialog-title": "Завантажити файл",
        "upload-dialog-button-cancel": "Скасувати",
+       "upload-dialog-button-back": "Назад",
        "upload-dialog-button-done": "Готово",
        "upload-dialog-button-save": "Зберегти",
        "upload-dialog-button-upload": "Завантажити",
        "apisandbox-results-fixtoken-fail": "Не вдалося викликати токен «$1».",
        "apisandbox-alert-page": "Поля на цій сторінці не є дійсними.",
        "apisandbox-alert-field": "Значення цього поля не є допустимим.",
+       "apisandbox-continue": "Продовжити",
+       "apisandbox-continue-clear": "Очистити",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries продовжить] останній запит; {{int:apisandbox-continue-clear}} очистить параметри, пов'язані з продовженням.",
        "booksources": "Джерела книг",
        "booksources-search-legend": "Пошук інформації про книгу",
        "booksources-isbn": "ISBN:",
        "movelogpagetext": "Далі подано список перейменованих сторінок.",
        "movesubpage": "{{PLURAL:$1|1=Підсторінка|Підсторінки}}",
        "movesubpagetext": "Ця сторінка має $1 {{PLURAL:$1|підсторінку|підсторінки|підсторінок}}.",
+       "movesubpagetalktext": "Відповідна сторінка обговорення має $1 {{PLURAL:$1|підсторінку, показану нижче|підсторінки, показані нижче|підсторінок, показаних нижче}}.",
        "movenosubpage": "Ця сторінка не має підсторінок.",
        "movereason": "Причина:",
        "revertmove": "скасувати перейменування",
        "pageinfo-article-id": "ID сторінки",
        "pageinfo-language": "Мова вмісту сторінки",
        "pageinfo-content-model": "Модель вмісту сторінки",
+       "pageinfo-content-model-change": "змінити",
        "pageinfo-robot-policy": "Індексація пошуковими системами",
        "pageinfo-robot-index": "Індексується",
        "pageinfo-robot-noindex": "Не індексується",
        "pageinfo-category-pages": "Кількість сторінок",
        "pageinfo-category-subcats": "Кількість підкатегорій",
        "pageinfo-category-files": "Кількість файлів",
+       "pageinfo-user-id": "ID користувача",
        "markaspatrolleddiff": "Позначити як перевірену",
        "markaspatrolledtext": "Позначити цю сторінку як перевірену",
        "markaspatrolledtext-file": "Позначити цю версію файлу як відпатрульовану",
        "newimages-showbots": "Показати завантаження ботами",
        "newimages-hidepatrolled": "Приховати відпатрульовані завантаження",
        "noimages": "Файли відсутні.",
+       "gallery-slideshow-toggle": "Перемикання мініатюр",
        "ilsubmit": "Шукати",
        "bydate": "за датою",
        "sp-newimages-showfrom": "Показати нові зображення, починаючи з $2, $1",
        "tag-filter": "Фільтр&nbsp;[[Special:Tags|міток]]:",
        "tag-filter-submit": "Відфільтрувати",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Мітка|Мітки|Міток}}]]: $2)",
+       "tag-mw-contentmodelchange": "зміна контентної моделі",
+       "tag-mw-contentmodelchange-description": "Редагування, якими була здійснена [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel зміна контентної моделі] сторінки",
        "tags-title": "Мітки",
        "tags-intro": "На цій сторінці наведений список міток, якими програмне забезпечення помічає редагування, а також значення цих міток.",
        "tags-tag": "Назва мітки",
        "tags-actions-header": "Дії",
        "tags-active-yes": "Так",
        "tags-active-no": "Ні",
-       "tags-source-extension": "Визначається розширенням",
+       "tags-source-extension": "Визначається програмним забезпеченням",
        "tags-source-manual": "Застосовується вручну користувачами і ботами",
        "tags-source-none": "Більше не використовується",
        "tags-edit": "редагувати",
        "htmlform-cloner-create": "Додати більше",
        "htmlform-cloner-delete": "Вилучити",
        "htmlform-cloner-required": "Необхідно принаймні одне значення.",
+       "htmlform-date-placeholder": "РРРР-ММ-ДД",
+       "htmlform-time-placeholder": "ГГ:ХХ:СС",
+       "htmlform-datetime-placeholder": "РРРР-ММ-ДД ГГ:ХХ:СС",
+       "htmlform-date-invalid": "Введене Вами значення не розпізнається як дата. Спробуйте використати формат РРРР-ММ-ДД.",
+       "htmlform-time-invalid": "Введене Вами значення не розпізнається як час. Спробуйте використати формат ГГ:ХХ:СС.",
+       "htmlform-datetime-invalid": "Введене Вами значення не розпізнається як дата й час. Спробуйте використати формат РРРР-ММ-ДД ГГ:ХХ:СС.",
+       "htmlform-date-toolow": "Задане Вами значення — менше, ніж найраніша дозволена дата $1.",
+       "htmlform-date-toohigh": "Ви вказали значення після найпізнішої дозволеної дати: $1.",
+       "htmlform-time-toolow": "Ви вказали значення до найранішого дозволеного часу: $1",
+       "htmlform-time-toohigh": "Ви вказали значення після найпізнішого дозволеного часу: $1.",
+       "htmlform-datetime-toolow": "Ви вказали значення до найранішої дозволеної дати й часу: $1",
+       "htmlform-datetime-toohigh": "Ви вказали значення після найпізнішої дозволеної дати й часу: $1.",
        "htmlform-title-badnamespace": "[[:$1]] не в просторі назв «{{ns:$2}}».",
        "htmlform-title-not-creatable": "«$1» — назва сторінки, яку не можна створити",
        "htmlform-title-not-exists": "$1 не існує.",
        "htmlform-user-not-exists": "<strong>$1</strong> не існує.",
        "htmlform-user-not-valid": "<strong>$1</strong> не є дійсним іменем користувача.",
-       "sqlite-has-fts": "$1 з підтримкою повнотекстового пошуку",
-       "sqlite-no-fts": "$1 без підтримки повнотекстового пошуку",
        "logentry-delete-delete": "$1 {{GENDER:$2|вилучив|вилучила}} сторінку $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|відновив|відновила}} сторінку $3",
        "logentry-delete-event": "$1 {{GENDER:$2|змінив|змінила}} видимість {{PLURAL:$5 запису журналу|$5 записів журналу}} на $3: $4",
        "feedback-external-bug-report-button": "Повідомити про технічну проблему",
        "feedback-dialog-title": "Надіслати відгук",
        "feedback-dialog-intro": "Для надсилання відгуку Ви можете скористатись простою формою внизу. Ваш коментар буде залишений на сторінці «$1», разом із Вашим іменем користувача (або IP-адресою).",
-       "feedback-error-title": "Помилка",
        "feedback-error1": "Помилка: Невідомий результаті API",
        "feedback-error2": "Помилка: Збій редагувань",
        "feedback-error3": "Помилка: Немає відповіді від API",
        "feedback-thanks": "Дякуємо! Ваші відгук розміщено на сторінці \"[$2 $1]\".",
        "feedback-thanks-title": "Дякуємо!",
        "feedback-useragent": "User Agent:",
-       "searchsuggest-search": "Пошук",
+       "searchsuggest-search": "Пошук у {{grammar:prepositional|{{SITENAME}}}}",
        "searchsuggest-containing": "що містять...",
        "api-error-autoblocked": "Вашу IP-адресу було заблоковано автоматично, тому що її використовував заблокований користувач.",
        "api-error-badaccess-groups": "Вам не дозволено завантажувати файли до цього вікіпроекту.",
        "unlinkaccounts-success": "Обліковий запис було відв'язано.",
        "authenticationdatachange-ignored": "Неопрацьована зміна облікових даних. Можливо, жоден з провайдерів не був налаштований?",
        "userjsispublic": "Будь ласка, зверніть увагу: підсторінки JavaScript не повинні містити конфіденційних даних, бо їх можуть бачити інші користувачі.",
-       "usercssispublic": "Будь ласка, зверніть увагу: підсторінки CSS не повинні містити конфіденційних даних, бо їх можуть бачити інші користувачі."
+       "usercssispublic": "Будь ласка, зверніть увагу: підсторінки CSS не повинні містити конфіденційних даних, бо їх можуть бачити інші користувачі.",
+       "restrictionsfield-badip": "Недійсна IP-адреса або діапазон: $1",
+       "restrictionsfield-label": "Дозволені діапазони IP-адрес:",
+       "restrictionsfield-help": "Одна IP-адреса або CIDR-діапазон на рядок. Щоб увімкнути все, використайте<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "Помилка: $1",
+       "edit-error-long": "Помилки:\n\n$1"
 }
index 10d820b..64accfa 100644 (file)
                        "Macofe",
                        "Hindustanilanguage",
                        "امین اکبر",
-                       "Jdforrester"
+                       "Jdforrester",
+                       "قیصرانی"
                ]
        },
        "tog-underline": "ربط کی خط کشیدگی:",
        "tog-hideminor": "حالیہ تبدیلیوں میں معمولی ترامیم چھپائیں",
-       "tog-hidepatrolled": "حالیہ تبدیلیوں میں گشتی ترامیم چھپائیں",
+       "tog-hidepatrolled": "حالیہ تبدیلیوں میں مراجعت شدہ ترامیم چھپائیں",
        "tog-newpageshidepatrolled": "جدید صفحات کی فہرست میں مراجعت شدہ صفحات چھپائیں",
        "tog-hidecategorization": "صفحات کی زمرہ بندی چھپائیں",
        "tog-extendwatchlist": "حالیہ ترین تبدیلیوں کی بجائے تمام تبدیلیاں دیکھنے کے لیے زیر نظر فہرست کو وسیع کریں",
        "tog-usenewrc": "حالیہ تبدیلیاں اور زیر نظر فہرست میں تبدیلیوں کو بلحاظ صفحہ گروہ بند کریں",
        "tog-numberheadings": "سرخیوں کو خودکار نمبر دیں",
        "tog-showtoolbar": "آلات ترمیم دکھائیں",
-       "tog-editondblclick": "دو کلک پر صفحات کی ترمیم کریں",
+       "tog-editondblclick": "دہرے کلک پر صفحات کی ترمیم کریں",
        "tog-editsectiononrightclick": "قطعہ کے عنوانات پر رائیٹ کلک کے ذریعے قطعہ کی ترمیم کاری فعال کریں",
        "tog-watchcreations": "میرے تخلیق کردہ صفحات اور اپلوڈ کردہ فائلوں کو میری زیر نظر فہرست میں شامل کریں",
        "tog-watchdefault": "میرے ترمیم شدہ صفحات اور فائلوں کو میری زیر نظر فہرست میں شامل کریں",
@@ -56,7 +57,7 @@
        "tog-enotifminoredits": "مجھے صفحات اور فائلوں میں کی جانے والی معمولی ترامیم کی خبر بھی بذریعہ برقی ڈاک بھیجیں",
        "tog-enotifrevealaddr": "اطلاعاتی برقی خطوط میں میرا برقی ڈاک پتہ ظاہر کریں",
        "tog-shownumberswatching": "دیکھنے والے صارفین کی تعداد دکھائیں",
-       "tog-oldsig": "موجودہ دستخط:",
+       "tog-oldsig": "آپ کے موجودہ دستخط:",
        "tog-fancysig": "سادہ دستخط (بلا خودکار ربط)",
        "tog-uselivepreview": "راست نمائش استعمال کریں",
        "tog-forceeditsummary": "خلاصہ ترمیم خالی چھوڑنے پر مجھے آگاہ کریں",
@@ -73,7 +74,7 @@
        "tog-showhiddencats": "پوشیدہ زمرہ جات دکھائیں",
        "tog-norollbackdiff": "استرجع کے بعد فرق نہ دکھائیں",
        "tog-useeditwarning": "غیر محفوظ تبدیلیاں چھوڑنے پر مجھے آگاہ کریں",
-       "tog-prefershttps": "لاگ ان رہنے کے دوران ہمیشہ محفوظ کنیکشن استعمال کریں",
+       "tog-prefershttps": "داخل رہنے کے دوران میں ہمیشہ محفوظ کنیکشن استعمال کریں",
        "underline-always": "ہمیشہ",
        "underline-never": "کبھی نہیں",
        "underline-default": "پوشاک یا براؤزر کا طے شدہ",
        "october-date": "$1 اکتوبر",
        "november-date": "$1 نومبر",
        "december-date": "$1 دسمبر",
+       "period-am": "صبح",
+       "period-pm": "شام",
        "pagecategories": "{{PLURAL:$1|زمرہ|زمرہ جات}}",
        "category_header": "زمرہ \"$1\" میں صفحات",
        "subcategories": "ذیلی زمرہ جات",
        "hidden-categories": "{{PLURAL:$1|پوشیدہ زمرہ|پوشیدہ زمرہ جات}}",
        "hidden-category-category": "پوشیدہ زمرہ جات",
        "category-subcat-count": "{{PLURAL:$2|اِس زمرہ میں محض درج ذیل ذیلی زمرہ موجود ہے.|اِس زمرہ میں کل $2 میں سے درج ذیل {{PLURAL:$1|ذیلی زمرہ|$1 ذیلی زمرہ جات}} موجود ہیں۔}}",
-       "category-subcat-count-limited": "اِس زمرہ میں درج ذیل {{PLURAL:$1|ذیلی زمرہ ہے|$1 ذیلی زمرہ جات ہیں}}.",
+       "category-subcat-count-limited": "اِس زمرہ میں درج ذیل {{PLURAL:$1|ذیلی زمرہ ہے|$1 ذیلی زمرہ جات ہیں}}۔",
        "category-article-count": "{{PLURAL:$2|اس زمرہ میں محض درج ذیل صفحہ موجود ہے۔|اس زمرہ کے کل $2 صفحات میں سے $1 {{PLURAL:$1|صفحہ|صفحات}} درج ذیل {{PLURAL:$1|ہے|ہیں}}}}۔",
        "category-article-count-limited": "درج ذیل {{PLURAL:$1|صفحہ|$1 صفحات}} اس زمرہ میں شامل {{PLURAL:$1|ہے|ہیں}}۔",
-       "category-file-count": "{{PLURAL:$2|اس Ø²Ù\85رÛ\81 Ù\85Û\8cÚº ØµØ±Ù\81 Ø¯Ø±Ø¬ Ø°Û\8cÙ\84 Ù\81ائÙ\84 Ù\85Ù\88جÙ\88د Û\81Û\92Û\94|اس Ø²Ù\85رÛ\81 Ú©Û\8c Ú©Ù\84 $2 Ù\81ائÙ\84Ù\88Úº Ù\85Û\8cÚº Ø³Û\92 $1 {{PLURAL:$1|Ù\81ائÙ\84\81ائÙ\84Û\8cÚº}} Ø¯Ø±Ø¬ ذیل {{PLURAL:$1|ہے|ہیں}}}}۔",
+       "category-file-count": "{{PLURAL:$2|اس Ø²Ù\85رÛ\81 Ù\85Û\8cÚº ØµØ±Ù\81 Ø¯Ø±Ø¬ Ø°Û\8cÙ\84 Ù\81ائÙ\84 Ù\85Ù\88جÙ\88د Û\81Û\92Û\94|اس Ø²Ù\85رÛ\81 Ú©Û\8c Ú©Ù\84 $2 Ù\81ائÙ\84Ù\88Úº Ù\85Û\8cÚº Ø³Û\92 $1 {{PLURAL:$1|Ù\81ائÙ\84\81ائÙ\84Û\8cÚº}} Ø­Ø³Ø¨ ذیل {{PLURAL:$1|ہے|ہیں}}}}۔",
        "category-file-count-limited": "درج ذیل {{PLURAL:$1|فائل|$1 فائلیں}} اس زمرہ میں شامل {{PLURAL:$1|ہے|ہیں}}۔",
        "listingcontinuesabbrev": "جاری۔",
        "index-category": "فہرست شدہ صفحات",
        "noindex-category": "غیر فہرست شدہ صفحات",
-       "broken-file-category": "صفحات مع شکستہ فائل روابط",
+       "broken-file-category": "فائل کے شکستہ روابط کے حامل صفحات",
        "categoryviewer-pagedlinks": "($1) ($2)",
        "about": "تعارف",
        "article": "صفحہ مواد",
        "newwindow": "(نـئی ونـڈو میـں کھولیں)",
        "cancel": "منسوخ",
        "moredotdotdot": "مزید...",
-       "morenotlisted": "یہ فہرست مکمل نہیں ہے۔",
+       "morenotlisted": "شاید یہ فہرست مکمل نہیں۔",
        "mypage": "صفحہ",
        "mytalk": "تبادلۂ خیال",
        "anontalk": "اس آئی پی پتہ کا تبادلۂ خیال",
        "qbpageoptions": "یہ صفحہ",
        "qbmyoptions": "میرے صفحات",
        "faq": "عام طور پر پوچھے جانے والے سوالات",
-       "faqpage": "Project:معلوماتِ عامہ",
-       "actions": "ایکشنز",
-       "namespaces": "جائے نام",
+       "faqpage": "Project:عمومی سوالات",
+       "actions": "اقدامات",
+       "namespaces": "نام فضا",
        "variants": "متغیرات",
-       "navigation-heading": "Ù\82ائÙ\85Û\81 رہنمائی",
-       "errorpagetitle": "خطاء",
-       "returnto": "واپس $1۔",
+       "navigation-heading": "Ù\81Û\81رست رہنمائی",
+       "errorpagetitle": "نقص",
+       "returnto": "واپس $1 پر جائیں",
        "tagline": "{{SITENAME}} سے",
        "help": "معاونت",
        "search": "تلاش",
+       "search-ignored-headings": " #<!-- اس سطر کو ہو بہو اپنی حالت پر چھوڑ دیں --> <pre>\n# سرخیاں جو تلاش کے دوران میں نظر انداز کر دی جائیں گی۔\n# سرخی پر مشتمل صفحہ کی فہرست سازی مکمل ہوتے ہی تبدیلیاں نافذ ہو جائیں گی۔\n# ایک خالی ترمیم کر کے آپ صفحہ کی دوبارہ فہرست سازی کر سکتے ہیں۔\n# صیغہ حسب ذیل ہے:\n# * ہر چیز جو \"#\" علامت کے بعد آخری سطر تک ہو اسے تبصرہ سمجھا جائے گا۔\n#* ہر وہ سطر جو خالی نہ ہو عنوان ہوگا اور اسے نظر انداز کر دیا جائے گا (نیز جس طرح درج ہے اسی طرح استعمال کیا جائے گا)۔\nحوالہ جات\nبیرونی روابط\nمزید دیکھیے\n #<!-- اس سطر کو ہو بہو اپنی حالت پر چھوڑ دیں --> <pre>",
        "searchbutton": "تلاش",
-       "go": "چلو",
-       "searcharticle": "چلو",
-       "history": "تارÛ\8cØ®Ú\86Û\81 Ø¡ صفحہ",
+       "go": "چلیں",
+       "searcharticle": "چلیں",
+       "history": "تارÛ\8cØ®Ú\86Û\82 صفحہ",
        "history_short": "تاریخچہ",
-       "updatedmarker": "میری آخری آمد تک جدید",
+       "updatedmarker": "میری آخری آمد کے بعد تجدید شدہ",
        "printableversion": "قابل طبع نسخہ",
        "permalink": "مستقل ربط",
        "print": "طباعت",
-       "view": "منظر",
+       "view": "مطالعہ",
        "view-foreign": "$1 پر دیکھیں",
        "edit": "ترمیم",
-       "edit-local": "ترمیم مقامی وضاحت",
+       "edit-local": "مقامی وضاحت کی ترمیم",
        "create": "تخلیق",
-       "create-local": "ادخال مقامی وضاحت",
+       "create-local": "مقامی وضاحت کا اندراج",
        "editthispage": "اس صفحہ میں ترمیم کریں",
-       "create-this-page": "صÙ\81Ø­Û\81 Û\81ٰذا ØªØ®Ù\84Û\8cÙ\82 Ú©Û\8cجئÛ\92",
+       "create-this-page": "اس ØµÙ\81Ø­Û\81 Ú©Ù\88 ØªØ®Ù\84Û\8cÙ\82 Ú©Ø±Û\8cÚº",
        "delete": "حذف",
        "deletethispage": "یہ صفحہ حذف کریں",
        "undeletethispage": "یہ صفحہ بحال کریں",
        "undelete_short": "بحال {{PLURAL:$1|ایک ترمیم|$1 ترامیم}}",
-       "viewdeleted_short": "{{PLURAL:$1|ایک ترمیم حذف ہوچکی|$1 ترامیم حذف ہوچکیں}}",
+       "viewdeleted_short": "{{PLURAL:$1|ایک ترمیم حذف ہو چکی|$1 ترامیم حذف ہو چکیں}} دیکھیں",
        "protect": "محفوظ",
-       "protect_change": "تبدیل کرو",
-       "protectthispage": "اس صفحےکومحفوظ کریں",
-       "unprotect": "تحÙ\81ظ میں تبدیلی",
-       "unprotectthispage": "اÙ\90سÛ\92 ØµÙ\81Ø­Û\92 Ú©Û\8c ØªØ­Ù\81ظ ØªØ¨Ø¯Û\8cÙ\84 Ú©Ø±یں",
+       "protect_change": "تبدیل کریں",
+       "protectthispage": "اس صفحے کو محفوظ کریں",
+       "unprotect": "Ø­Ù\81اظت میں تبدیلی",
+       "unprotectthispage": "اÙ\90سÛ\92 ØµÙ\81Ø­Û\92 Ú©Û\8c Ø­Ù\81اظت Ø¨Ø¯Ù\84یں",
        "newpage": "نیا صفحہ",
        "talkpage": "اس صفحہ پر تبادلۂ خیال کریں",
        "talkpagelinktext": "تبادلۂ خیال",
        "specialpage": "خصوصی صفحہ",
-       "personaltools": "ذاتÛ\8c Ø§Ù\88زار",
-       "articlepage": "Ù\85Ù\86درجاتÛ\8c ØµÙ\81Ø­Û\81 Ø¯Û\8cÚ©Ú¾Û\8cÛ\93",
+       "personaltools": "ذاتÛ\8c Ø¢Ù\84ات",
+       "articlepage": "Ù\85Ù\86درجاتÛ\8c ØµÙ\81Ø­Û\81 Ø¯Û\8cÚ©Ú¾Û\8cÛ\92",
        "talk": "تبادلہٴ خیال",
-       "views": "خیالات",
+       "views": "مشاہدات",
        "toolbox": "آلات",
-       "userpage": "صفحۂ صارف دیکھئے",
-       "projectpage": "صفحۂ منصوبہ دیکھئے",
-       "imagepage": "صفحۂ مسل دیکھئے",
-       "mediawikipage": "صفحۂ پیغام دیکھئے",
-       "templatepage": "صفحۂ سانچہ دیکھئے",
-       "viewhelppage": "صفحۂ معاونت دیکھیے",
-       "categorypage": "زمرہ‌جاتی صفحہ دیکھئے",
-       "viewtalkpage": "تبادلۂ خیال دیکھئے",
+       "tool-link-userrights": "{{GENDER:$1|صارف}} کے گروہوں میں تبدیلی کریں",
+       "tool-link-emailuser": "اس {{GENDER:$1|صارف}} کو برقی خط لکھیں",
+       "userpage": "صارف کا صفحہ دیکھیے",
+       "projectpage": "منصوبہ کا صفحہ دیکھیے",
+       "imagepage": "فائل کا صفحہ دیکھیے",
+       "mediawikipage": "پیغام کا صفحہ دیکھیے",
+       "templatepage": "سانچہ کا صفحہ دیکھیے",
+       "viewhelppage": "معاونت کا صفحہ دیکھیے",
+       "categorypage": "زمرہ‌ جاتی صفحہ دیکھیے",
+       "viewtalkpage": "تبادلۂ خیال دیکھیں",
        "otherlanguages": "دیگر زبانوں میں",
-       "redirectedfrom": "($1 سے پلٹایا گیا)",
-       "redirectpagesub": "لوٹایا گیا صفحہ",
-       "redirectto": "لوٹایا گیا صفحہ:",
-       "lastmodifiedat": "آخرÛ\8c Ø¨Ø§Ø± ØªØ¯Ù\88Û\8cÙ\86 $2, $1 Ú©Ù\88 کی گئی۔",
+       "redirectedfrom": "($1 سے رجوع مکرر)",
+       "redirectpagesub": "رجوع مکرر",
+       "redirectto": "رجوعِ مکرر از:",
+       "lastmodifiedat": "اس ØµÙ\81Ø­Û\81 Ù\85Û\8cÚº Ø¢Ø®Ø±Û\8c Ø¨Ø§Ø± Ù\85Ù\88رخÛ\81 $1Ø¡ Ú©Ù\88 $2 Ø¨Ø¬Û\92 ØªØ±Ù\85Û\8cÙ\85 کی گئی۔",
        "viewcount": "اِس صفحہ تک {{PLURAL:$1|ایک‌بار|$1 مرتبہ}} رسائی کی گئی",
        "protectedpage": "محفوظ شدہ صفحہ",
-       "jumpto": ":چھلانگ بطرف",
+       "jumpto": "یہاں جائیں:",
        "jumptonavigation": "رہنمائی",
-       "jumptosearch": "تلاش",
+       "jumptosearch": "تلاش کریں",
        "view-pool-error": "معذرت کے ساتھ، تمام معیلات پر اِس وقت اِضافی بوجھ ہے.\nبہت زیادہ صارفین اِس وقت یہ صفحہ ملاحظہ کرنے کی کوشش کررہے ہیں.\nبرائے مہربانی! صفحہ دیکھنے کیلئے دوبارہ کوشش کرنے سے پہلے ذرا انتظار فرمالیجئے.\n\n$1",
        "generic-pool-error": "ہم معذرت خواہ ہیں! معیلات (سرورز) پر اِس وقت اِضافی بوجھ ہے.\nصارفین کی کثیر تعداد اِس وقت یہی صفحہ ملاحظہ کرنے کی کوشش کررہی ہے.\nبرائے مہربانی!دوبارہ کوشش کرنے سے پہلے ذرا انتظار فرمائیے.",
+       "pool-timeout": "مقفل کرنے کے لیے انتظار کی مہلت ختم",
+       "pool-queuefull": "قطار لگی ہوئی ہے",
        "pool-errorunknown": "نامعلوم خطا",
+       "pool-servererror": "پول شمار خدمت دستیاب نہیں ($1)۔",
        "poolcounter-usage-error": "استعمال میں خامی: $1",
        "aboutsite": "{{SITENAME}} کا تعارف",
        "aboutpage": "Project:تعارف",
        "copyrightpage": "{{ns:project}}:حقوق تصانیف",
        "currentevents": "حالیہ واقعات",
        "currentevents-url": "Project:حالیہ واقعات",
-       "disclaimers": "اعÙ\84اÙ\86ات",
-       "disclaimerpage": "Project:عام اعلان",
+       "disclaimers": "اظÛ\81ار Ù\84ا ØªØ¹Ù\84Ù\82Û\8c",
+       "disclaimerpage": "Project:عمومی اظہار لا تعلقی",
        "edithelp": "معاونت براۓ ترمیم",
        "helppage-top-gethelp": "مدد",
        "mainpage": "صفحۂ اول",
        "portal-url": "Project:دیوان عام",
        "privacy": "اخفائے راز کے اصول",
        "privacypage": "Project:اصولِ اخفائے راز",
-       "badaccess": "خطائے اجازت",
+       "badaccess": "نقص اجازت",
        "badaccess-group0": "آپ متمنی عمل کا اجراء کرنے کے مُجاز نہیں۔",
        "badaccess-groups": "آپ کا درخواست‌کردہ عمل {{PLURAL:$2|گروہ|گروہوں میں سے ایک}}: $1 کے صارفین تک محدود ہے.",
        "versionrequired": "میڈیا ویکی کا $1 نسخہ لازمی چاہئیے.",
        "versionrequiredtext": "اِس صفحہ کو استعمال کرنے کیلئے میڈیاویکی کا $1 نسخہ چاہئیے.\n\n\nدیکھئے [[خاص:نسخہ|صفحۂ نسخہ]]",
        "ok": "ٹھیک ہے",
        "pagetitle-view-mainpage": "{{SITENAME}}",
-       "retrievedfrom": "‘‘$1’’ مستعادہ منجانب",
+       "backlinksubtitle": "→ $1",
+       "retrievedfrom": "اخذ کردہ از «$1»",
        "youhavenewmessages": "آپکے لیۓ ایک $1 ہے۔ ($2)",
-       "newmessageslinkplural": "{{PLURAL:$1|نیا پیغام|999=نئے پیغاماتs}}",
+       "youhavenewmessagesfromusers": "{{PLURAL:$4|آپ کے لیے}} {{PLURAL:$3|کسی دوسرے صارف|$3 صارفین}} کی جانب سے $1 ($2)۔",
+       "youhavenewmessagesmanyusers": "آپ کے لیے متعدد صارفین کی جانب سے $1 ($2)۔",
+       "newmessageslinkplural": "{{PLURAL:$1|نیا پیغام|999=نئے پیغامات}}",
        "newmessagesdifflinkplural": "آخری {{PLURAL:$1|تبدیلی|تبدیلیاں}}",
-       "youhavenewmessagesmulti": "ء$1 پر آپ کیلئے نئے پیغامات ہیں",
+       "youhavenewmessagesmulti": "$1 پر آپ کے لیے نئے پیغامات ہیں",
        "editsection": "ترمیم",
        "editold": "ترمیم",
        "viewsourceold": "مآخذ دیکھئے",
-       "editlink": "تدÙ\88Û\8cÙ\86 Ú©Ø±Û\8cÚº",
-       "viewsourcelink": "Ù\85آخذ Ø¯Û\8cکھئÛ\92",
-       "editsectionhint": "تدÙ\88Û\8cÙ\86Ù\90 Ø­ØµÙ\91ہ: $1",
+       "editlink": "ترÙ\85Û\8cÙ\85",
+       "viewsourcelink": "Ù\85اخذ Ø¯Û\8cÚ©Ú¾Û\8cÚº",
+       "editsectionhint": "ترÙ\85Û\8cÙ\85 Ù\82طعہ: $1",
        "toc": "فہرست",
        "showtoc": "دکھائیں",
        "hidetoc": "چھپائیں",
        "sort-ascending": "ترتیب صعودی",
        "nstab-main": "صفحہ",
        "nstab-user": "صفحۂ صارف",
-       "nstab-media": "صÙ\81Ø­Û\82 Ù\88سÛ\8cØ·",
-       "nstab-special": "خاص صفحہ",
+       "nstab-media": "صÙ\81Ø­Û\82 Ù\85Û\8cÚ\88Û\8cا",
+       "nstab-special": "خصÙ\88صÛ\8c صفحہ",
        "nstab-project": "صفحۂ منصوبہ",
-       "nstab-image": "Ù\85سل",
+       "nstab-image": "Ù\81ائل",
        "nstab-mediawiki": "پیغام",
        "nstab-template": "سانچہ",
        "nstab-help": "معاونت",
        "nstab-category": "زمرہ",
        "mainpage-nstab": "صفحۂ اول",
-       "nosuchaction": "کوئی سا عمل نہیں",
+       "nosuchaction": "مطلوبہ اقدام موجود نہیں",
        "nosuchactiontext": "URL کی جانب سے مختص کیا گیا عمل درست نہیں.\nآپ نے شاید URL غلط لکھا، یا کسی غیر صحیح ربط کی پیروی کی ہے.\n{{اِس سے SITENAME کے زیرِ استعمال مصنع لطیف میں کھٹمل کی نشاندہی کا بھی اندیشہ ہے}}.",
        "nosuchspecialpage": "کوئی ایسا خاص صفحہ نہیں",
        "nospecialpagetext": "<strong>آپ نے ایک غیر موجود خصوصی صفحہ کی درخواست کی ہے۔</strong>\n\nدرست خاص صفحات کی ایک فہرست [[Special:SpecialPages|{{int:specialpages}}]] پر دیکھی جاسکتی ہے۔",
-       "error": "خطاء",
-       "databaseerror": "خطائے ڈیٹابیس",
+       "error": "نقص",
+       "databaseerror": "ڈیٹابیس کا نقص",
        "databaseerror-text": "ڈیٹا بیس کیوری میں خامی پیدا ہوگئی ہے.\nیہ سافٹ ویئر میں ایک مسئلے (بگ) کی نشاندہی کر سکتے ہیں.",
        "databaseerror-textcl": "ڈیٹا بیس کیوری میں خامی پیدا ہوگئی ہے.",
        "databaseerror-query": "کیوری: $1",
        "databaseerror-function": "فنکشن: $ 1",
-       "databaseerror-error": "خرابی: $ 1",
-       "laggedslavemode": "انتباہ: ممکن ہے کہ صفحہ میں حالیہ بتاریخہ جات شامل نہ ہوں.\n\nWarning: Page may not contain recent updates.",
+       "databaseerror-error": "نقص: $1",
+       "transaction-duration-limit-exceeded": "زیادہ تاخیر سے بچنے کے لیے اس اقدام کو منسوخ کر دیا گیا ہے کیونکہ مدت تحریر ($1) اپنی حد $2 سیکنڈ سے تجاوز کر چکی ہے۔\nاگر آپ ایک ہی وقت میں کئی چیزیں تبدیل کر رہے ہیں تو بہتر ہوگا کہ اس تبدیلی کو متعدد قسطوں میں انجام دیں۔",
+       "laggedslavemode": "<strong>انتباہ:</strong> شاید اس صفحہ میں تازہ ترین معلومات موجود نہیں۔",
        "readonly": "ڈیٹابیس مقفل ہے",
        "enterlockreason": "قفل کیلئے کوئی وجہ درج کیجئے، بشمولِ تخمینہ کہ قفل کب کھولا جائے گا.",
        "readonlytext": "ڈیٹابیس  شاید معمول کی اصلاح کے لیے نئے اندراجات اور دوسری ترمیمات کیلئے مقفل ہے، جس کے بعد یہ عام حالت پر آجائے گا۔\nمنتظم، جس نے قفل لگایا، یہ تفصیل فراہم کی ہے: $1",
        "missing-article": "ڈیٹابیس نے کسی صفحے کا متن بنام \"$1\" $2  نہیں پایا جو اِسے پانا چاہئے تھا.\n\nیہ عموماً کسی صفحے کے تاریخی یا پرانے حذف شدہ ربط کی وجہ سے ہوسکتا ہے.\n\nاگر یہ وجہ نہیں، تو آپ نے مصنع‌لطیف میں کھٹمل پایا ہے.\nبرائے مہربانی، URL کی نشاندہی کرتے ہوئے کسی [[Special:ListUsers/sysop|منتظم]] کو اِس کا سندیس کیجئے.",
-       "missingarticle-rev": "(Ù\86ظرثاÙ\86Û\8c#: $1)",
+       "missingarticle-rev": "(Ù\86سخÛ\81#: $1)",
        "missingarticle-diff": "(فرق: $1، $2)",
        "readonly_lag": "ڈیٹابیس خودکار طور پر مقفل ہوچکا ہے تاکہ ماتحت ڈیٹابیسی معیلات کا درجہ آقا کا ہوجائے.",
+       "nonwrite-api-promise-error": "ایچ ٹی ٹی پی سرنامہ 'Promise-Non-Write-API-Action' بھیجا گیا لیکن یہ ایک اے پی آئی نویس ماڈیول کو بھیجی گئی درخواست تھی۔",
        "internalerror": "خطائے اندرونی",
        "internalerror_info": "خطائے اندرونی: $1",
+       "internalerror-fatal-exception": "\"$1\" قسم کا تباہ کن استثنا",
        "filecopyerror": "\"$1\" مسل کو \"$2\" کی طرف نقل نہیں کیا جاسکا.",
        "filerenameerror": "مسل \"$1\" کو \"$2\" میں بازنام نہیں کیا جاسکا.",
        "filedeleteerror": "مسل \"$1\" کو حذف نہیں کیا جاسکا.",
        "unexpected": "غیرمتوقع قدر: \"$1\"=\"$2\"",
        "formerror": "خطا: ورقہ بھیجا نہ جاسکا.",
        "badarticleerror": "اس صفحہ پر یہ عمل انجام نہیں دیا جاسکتا۔",
-       "cannotdelete": "صÙ\81Ø­Û\81 Û\8cا Ù\85Ù\84Ù\81 $1 Ú©Ù\88 Ø­Ø°Ù\81 Ù\86Û\81Û\8cÚº Ú©Û\8cا Ø¬Ø§Ø³Ú©ØªØ§.\nÛ\81Ù\88سکتا Û\81Û\92 Ú©Û\81 Ø§Ø³Û\92 Ù¾Û\81Ù\84Û\92 Û\81Û\8c Ú©Ø³Û\8c Ù\86Û\92 Ø­Ø°Ù\81 Ú©Ø±Ø¯Û\8cا Û\81Ù\88.",
-       "cannotdelete-title": "صفحہ ھذف نہیں کیا جا سکتا \"$1\"",
+       "cannotdelete": "صÙ\81Ø­Û\81 Û\8cا Ù\81ائÙ\84 Â«$1» Ú©Ù\88 Ø­Ø°Ù\81 Ù\86Û\81Û\8cÚº Ú©Û\8cا Ø¬Ø§ Ø³Ú©Ø§Û\94\nÙ\85Ù\85Ú©Ù\86 Û\81Û\92 Ú©Ø³Û\8c Ù\86Û\92 Ø§Ø³Û\92 Ù¾Û\81Ù\84Û\92 Û\81Û\8c Ø­Ø°Ù\81 Ú©Ø± Ø¯Û\8cا Û\81Ù\88Û\94",
+       "cannotdelete-title": "صفحہ «$1» حذف نہیں کیا جا سکا",
        "delete-hook-aborted": "حذف شدگی روک دی گئی\nوضاحت نہیں کی گئی",
+       "no-null-revision": "صفحہ \"$1\" کے لیے نیا خالی نسخہ نہیں بنایا جا سکتا",
        "badtitle": "خراب عنوان",
-       "badtitletext": "درخواست شدہ صفحہ کا عنوان ناقص، خالی، یا کوئی غلط ربط شدہ بین لسانی یا بین ویکی عنوان ہے.\nشاید اِس میں ایک یا زیادہ ایسے حروف موجود ہوں جو عنوانات میں استعمال نہیں ہوسکتے.",
+       "badtitletext": "درخواست شدہ صفحہ کا عنوان ناقص، خالی، یا کوئی غلط ربط شدہ بین اللسانی یا بین الویکی عنوان ہے۔\nشاید اِس میں ایک یا زیادہ ایسے حروف موجود ہوں جو عنوانات میں استعمال نہیں ہو سکتے۔",
+       "title-invalid-empty": "درخواست شدہ عنوان خالی ہے یا اس میں محض نام فضا کا نام ہے۔",
+       "title-invalid-utf8": "درخواست شدہ عنوان میں نادرست یونیکوڈ حروف موجود ہیں۔",
+       "title-invalid-interwiki": "درخواست شدہ عنوان میں ایسا بین الویکی ربط موجود ہے جسے عنوانات میں استعمال نہیں کیا جا سکتا۔",
+       "title-invalid-talk-namespace": "درخواست شدہ عنوان اس تبادلۂ خیال صفحہ کا ہے جو موجود نہیں۔",
+       "title-invalid-characters": "درخواست شدہ عنوان میں نادرست حروف «$1» موجود ہیں۔",
+       "title-invalid-relative": "عنوان میں علامت موجود ہے۔ علامتوں (./, ../) پر مشتمل عنوانات نادرست ہیں، اس لیے کہ یہ علامتیں صارف کے براؤزر کے لیے ناقابل رسائی ہوتی ہیں۔",
+       "title-invalid-magic-tilde": "درخواست شدہ عنوان میں نادرست جادوئی علامتیں مسلسل استعمال کی گئی ہیں (<nowiki>~~~</nowiki>)۔",
+       "title-invalid-too-long": "درخواست شدہ عنوان بے حد طویل ہے۔ عنوان کی طوالت یونیکوڈ کے $1 {{PLURAL:$1|بائٹ}} سے کم ہونی چاہیے۔",
+       "title-invalid-leading-colon": "درخواست شدہ عنوان کے شروع میں ایک نادرست رابطہ موجود ہے۔",
        "perfcached": "ذیلی ڈیٹا ابطن شدہ (cached) ہے اور اِس کے پُرانے ہونے کا امکان ہے. A maximum of {{PLURAL:$1|one result is|$1 results are}} available in the cache.",
-       "perfcachedts": "ذیلی ڈیٹا ابطن شدہ ہے (cached) اور آخری بار اِس کی بتاریخیت $1 کو ہوئی. A maximum of {{PLURAL:$4|one result is|$4 results are}} available in the cache.",
+       "perfcachedts": "ذیل میں درج معلومات کیشے شدہ ہے اور آخری بار اس کی تجدید $1 کو کی گئی تھی۔ کیشے میں زیادہ سے زیادہ {{PLURAL:$4|ایک نتیجہ دستیاب ہے|$4 دستیاب ہیں}}۔",
        "querypage-no-updates": "اِس صفحہ کیلئے بتاریخات فی الحال ناقابل بنائی گئی ہیں.\nیہاں کا ڈیٹا ابھی تازہ نہیں کیا جائے گا.",
-       "viewsource": "Ù\85سÙ\88دÛ\81",
+       "viewsource": "Ù\85اخذ Ø¯Û\8cÚ©Ú¾Û\8cÚº",
        "viewsource-title": "$1 کا مسودہ دیکھیں",
        "actionthrottled": "Action throttled",
        "actionthrottledtext": "ایک ضد سپم معیار کے طور پر آپ کے لیے مختصر وقت میں متعدد دفعہ یہ اقدام کرنے کے لیے حد متعین کی گئی ہے، اور آپ یہ حد پار کرچکے ہیں.\nبراہِ کرم، کچھ منٹس بعد دوبارہ کوشش کریں۔",
        "protectedpagetext": "اس صفحہ کو تدوین سے محفوظ رکھنے کیلیے مقفل کر دیا گیا ہے۔",
        "viewsourcetext": "آپ صرف مسودہ دیکھ سکتے ہیں اور اسکی نقل اتار سکتے ہیں۔",
        "viewyourtext": "آپ اس مواد کو دیکھ سکتے ہیں اور اٹھا (کاپی) سکتے ہیں <strong>آپ کی ترامیم</strong> اس صفحہ پر۔",
-       "protectedinterface": "{{fmbox \n| type = editnotice\n| image = [[File:Namespace MediaWiki.svg|45px]]\n| text = '''اس [[mw:Manual:System message|انٹرفیس پیغام]] یا [[ویکیپیڈیا:جلد|جلد]] کی دستاویز [[mw:Manual:Interface/{{PAGENAME}}|میڈیاویکی ڈاٹ آرگ]] یا [[translatewiki:MediaWiki:{{PAGENAME}}/qqq|ٹرانسلیٹ ویکی ڈاٹ نیٹ]] پر بنائی جا سکتی ہے۔''' <br /> چونکہ یہ صفحہ میڈیاویکی سوفٹویئر کے لیے انٹرفیس متن فراہم کرتا ہے، اس لیے اس میں محض [[ویکیپیڈیا:منتظمین|منتظمین]] ہی ترمیم کر سکتے ہیں۔ البتہ اگر آپ کو اس میں کسی قسم کی ترمیم مطلوب ہو تو ذیل میں موجود بٹن پر کلک کرکے اس پیغام میں ترمیم کی درخواست کر سکتے ہیں۔\n<div class=\"center\" style=\"margin-top: 4px;\">{{درخواست ترمیم روانہ کریں|type=full}}</div>\n}}{{editnotice load\n| notice action = view \n}}",
-       "editinginterface": "<strong>انتباہ: </strong> آپ ایک ایسے صفحے میں ترمیم کر رہے ہیں جو سوفٹ ویئر کے لیے انٹرفیس متن فراہم کرتا ہے۔ اس صفحہ میں کی جانے والی تبدیلی سے اس ویکی پر دیگر صارفین کے لیے انٹرفیس متاثر ہوگی۔",
-       "translateinterface": "تمام ویکیوں میں تبدیلی یا شامل کرنے کے لیے، [https://translatewiki.net/ translatewiki.net]کو استعمال کریں ، میڈیا ویکی دارالترجمہ.",
+       "protectedinterface": "یہ صفحہ سافٹ ویئر کا انٹرفیس متن فراہم کرتا ہے اور غلط استعمال سے بچنے کے لیے اسے محفوظ رکھا گیا ہے۔\nتمام ویکیوں میں ترجمہ شامل کرنے یا اس میں تبدیلی کرنے کے لیے میڈیاویکی دار الترجمہ [https://translatewiki.net/ translatewiki.net]کو استعمال کریں۔",
+       "editinginterface": "<strong>انتباہ:</strong> آپ ایک ایسے صفحے میں ترمیم کر رہے ہیں جو سافٹ ویئر کا انٹرفیس متن فراہم کرتا ہے۔ اس صفحہ میں کی جانے والی ترمیم، دیگر صارفین کے انٹرفیس کو تبدیل کردے گی۔",
+       "translateinterface": "تمام ویکیوں میں تراجم کو تبدیل یا شامل کرنے کے لیے  میڈیاویکی کے دار الترجمہ [https://translatewiki.net/ translatewiki.net] کو استعمال کریں۔",
+       "cascadeprotected": "درج ذیل محفوظ کردہ {{PLURAL:$1|صفحہ|صفحات}} کی «آبشاری» حفاظت میں شامل ہونے کی وجہ سے یہ صفحہ بھی محفوظ ہے:\n$2",
        "namespaceprotected": "آپ کو '''$1''' فضائے نام میں صفحات تدوین کرنے کی اِجازت نہیں ہے.",
+       "customcssprotected": "آپ کو اس سی ایس ایس میں ترمیم کرنے کی اجازت نہیں کیونکہ اس میں کسی دوسرے صارف کی ذاتی ترتیبات موجود ہیں۔",
+       "customjsprotected": "آپ کو اس جاوا اسکرپٹ میں ترمیم کرنے کی اجازت نہیں کیونکہ اس میں کسی دوسرے صارف کی ذاتی ترتیبات موجود ہیں۔",
        "mycustomcssprotected": "آپ اس سی ایس ایس (CSS) صفحہ میں ترمیم کرنے کا اختیار نہیں رکھتے۔",
        "mycustomjsprotected": "آپ اس جاوا اسکپرٹ (JavaScript) صفحہ میں ترمیم کرنے کا اختیار نہیں رکھتے۔",
        "myprivateinfoprotected": "آپ ان ذاتی معلوات (private information) میں ترمیم کرنے کا اختیار نہیں رکھتے۔",
        "mypreferencesprotected": "آپ اپنی ان ترجیحات (preferences) میں ترمیم کرنے کا اختیار نہیں رکھتے۔",
        "ns-specialprotected": "خاص صفحات کی تدوین نہیں کی جاسکتی.",
        "titleprotected": "اس عنوان کو [[User:$1|$1]] نے تخلیق سے محفوظ کیا ہے.\nوجہ یہ بتائی گئی ہے: <em>$2</em>.",
+       "filereadonlyerror": "فائل «$1» میں تبدیلی ممکن نہیں کیونکہ خزانہ فائل «$2» فقط خواندگی حالت میں ہے۔\n\nانتظامیہ کی جانب سے مقفل کرنے کی حسب ذیل توجیہ پیش کی گئی ہے:\n\n«$3»",
+       "invalidtitle-knownnamespace": "«$2» نام فضا میں «$3» متن پر مشتمل عنوان نادرست ہے",
+       "invalidtitle-unknownnamespace": "نامعلوم نام فضا عدد «$1» اور «$2» متن پر مشتمل عنوان نادرست ہے",
        "exception-nologin": "غیر داخل نوشتہ",
        "exception-nologin-text": "براہ مہربانی! اس صفحہ تک رسائی یا ترمیم کے لیے لاگ ان ہوں۔",
        "exception-nologin-text-manual": "$1 براہ مہربانی! اس صفحہ تک رسائی یا ترمیم کے لیے لاگ ان ہوں۔",
        "virus-scanfailed": "تفریس ناکام (رمز $1)",
        "virus-unknownscanner": "انجان ضدوائرس:",
        "logouttext": "<strong>اب آپ خارج ہوچکے ہیں۔</strong>\n\nیاد رکھیں! کچھ صفحات ایسے نظر آتے رہیں گے کہ جیسے ابھی آپ خارج نہیں ہوئے، جب تک آپ اپنے کیشے صاف نہیں کرتے۔",
+       "cannotlogoutnow-title": "ابھی خارج نہیں ہو سکتے",
+       "cannotlogoutnow-text": "$1 کے استعمال کے دوران میں خارج ہونا ممکن نہیں۔",
        "welcomeuser": "خوش آمدید، $1!",
+       "welcomecreation-msg": "آپ کا کھاتہ بن گیا۔\nاگر آپ چاہیں تو [[Special:Preferences|اپنی ترجیحات]] میں حسب منشا تبدیلی کر سکتے ہیں۔",
        "yourname": "اسمِ رکنیت",
        "userlogin-yourname": "صارف نام",
        "userlogin-yourname-ph": "اپنا صارف نام درج کریں",
        "createacct-another-username-ph": "صارف نام درج کریں",
        "yourpassword": "پاس ورڈ:",
-       "userlogin-yourpassword": "کلمۂ شناخت",
+       "userlogin-yourpassword": "پاس ورڈ",
        "userlogin-yourpassword-ph": "اپنا کلمہ شناخت دیں",
-       "createacct-yourpassword-ph": "ایک پاس ورڈ داخل کریں",
+       "createacct-yourpassword-ph": "پاس ورڈ درج کریں",
        "yourpasswordagain": "کلمۂ شناخت دوبارہ لکھیں",
-       "createacct-yourpasswordagain": "کلمۂ اجازت تصدیق کریں",
-       "createacct-yourpasswordagain-ph": "پاس ورڈ پھر داخل کریں",
-       "userlogin-remembermypassword": "Ù\85جھÛ\92 Ø¯Ø§Ø®Ù\84 Ø±Ú©Ú¾Û\92",
+       "createacct-yourpasswordagain": "پاس ورڈ کی تصدیق کریں",
+       "createacct-yourpasswordagain-ph": "پاس ورڈ دوبارہ درج کریں",
+       "userlogin-remembermypassword": "Ù\84اگ Ø§Ù\86 Ø¨Ø±Ù\82رار Ø±Ú©Ú¾Û\8cÚº",
        "userlogin-signwithsecure": "محفوظ رابطہ (کنکشن) استعمال کریں",
+       "cannotlogin-title": "داخل نہیں ہو سکتے",
+       "cannotlogin-text": "داخل ہونا ممکن نہیں۔",
+       "cannotloginnow-title": "ابھی داخل نہیں ہو سکتے",
+       "cannotloginnow-text": "$1 کے استعمال کے دوران میں داخل ہونا ممکن نہیں۔",
+       "cannotcreateaccount-title": "کھاتے نہیں بنائے جا سکتے",
+       "cannotcreateaccount-text": "اس ویکی پر براہ راست کھاتہ سازی فعال نہیں ہے۔",
        "yourdomainname": "آپکا ڈومین",
        "password-change-forbidden": "آپ اس ویکی پر پارلفظ (پاس روڈ) تبدیل نہیں کر سکتے",
        "externaldberror": "یا تو توثیقی ڈیٹابیس میں خطا واقع ہوئی اور یا آپ کو بیرونی کھاتہ بتاریخ کرنے کی اِجازت نہیں ہے.",
        "login": "داخل ہوں",
+       "login-security": "اپنی شناخت کی تصدیق کریں",
        "nav-login-createaccount": "کھاتہ کھولیں یا اندراج کریں",
        "userlogin": "کھاتہ کھولیں یا اندراج کریں",
        "userloginnocreate": "داخلِ نوشتہ ہوجائیے",
        "userlogin-resetpassword-link": "کلمہ شناخت بھول گئے؟",
        "userlogin-helplink2": "داخل نوشتگی میں معاونت درکار ہے؟",
        "userlogin-loggedin": "آپ ویکیپیڈیا میں بطور صارف {{GENDER:$1|$1}}  پہلے سے داخل نوشتہ (logged in) ہیں۔\nدوسرے کھاتہ سے داخل ہونے کے لیے درج ذیل خانے پر کریں۔",
+       "userlogin-reauth": "آپ {{GENDER:$1|$1}} ہیں، اس کی تصدیق کے لیے آپ کا داخل ہونا ناگزیر ہے۔",
        "userlogin-createanother": "دوسرا کھاتہ تخلیق کریں",
        "createacct-emailrequired": "ای میل پتہ",
-       "createacct-emailoptional": "اÛ\8c Ù\85Û\8cÙ\84 Ø§Û\8cÚ\88رÛ\8cس (اختیاری)",
+       "createacct-emailoptional": "برÙ\82Û\8c Ú\88اک Ù¾ØªØ§ (اختیاری)",
        "createacct-email-ph": "اپنا برقی پتہ لکھیں",
-       "createacct-another-email-ph": "برقی پتہ لکھیں",
+       "createacct-another-email-ph": "برقی ڈاک پتا لکھیں",
        "createaccountmail": "عارضی پاسورڈ استعمال کریں اور اسے متعینہ برقی ڈاک پتہ پر ارسال کریں",
+       "createaccountmail-help": "پاس ورڈ معلوم کیے بغیر کسی دوسرے شخص کا کھاتہ بنانے کے لیے اسے استعمال کیا جا سکتا ہے۔",
        "createacct-realname": "اصلی نام (اختیاری)",
        "createaccountreason": "وجہ:",
        "createacct-reason": "وجہ",
        "createacct-reason-ph": "آپ دوسرا کھاتہ کیوں تخلیق کررہے ہیں",
-       "createacct-submit": "آپ کا کھاتا بنائیں",
+       "createacct-reason-help": "نوشتہ کھاتہ سازی میں نظر آنے والا پیغام",
+       "createacct-submit": "اپنا کھاتا بنائیں",
        "createacct-another-submit": "کھاتہ بنائیں",
-       "createacct-benefit-heading": "{{SITENAME}} آپ جیسے لوگوں کی طرف سے بنایا گیا ہے ۔",
+       "createacct-continue-submit": "کھاتہ سازی جاری رکھیں",
+       "createacct-another-continue-submit": "کھاتہ سازی جاری رکھیں",
+       "createacct-benefit-heading": "{{SITENAME}} آپ جیسے علم دوست افراد کا مرہون منت ہے۔",
        "createacct-benefit-body1": "{{PLURAL:$1|ترمیم|ترامیم}}",
-       "createacct-benefit-body2": "$1 {{PLURAL:$1|صفحہ|صفحات}}",
-       "createacct-benefit-body3": "حالیہ {{PLURAL:$1|شرکت کرنے والا|شرکت کرنے والے}}",
+       "createacct-benefit-body2": "$1 {{PLURAL:$1|مضمون|مضامین}}",
+       "createacct-benefit-body3": "حالیہ {{PLURAL:$1|مشارکت کنندہ|مشارکت کنندگان}}",
        "badretype": "درج شدہ کلمۂ شناخت اصل سے مطابقت نہیں رکھتا۔",
        "usernameinprogress": "انتظار فرمائیے!<br />\nاس صارف نام سے کھاتہ بننے کا عمل ابھی جاری ہے۔",
        "userexists": "داخل کردہ اسم صارف پہلے سے مستعمل ہے۔\nبراہِ کرم! کوئی دوسرا اسم منتخب کیجئے۔",
        "nocookiesnew": "کھاتۂ صارف بنادیا گیا ہے، لیکن آپ کا داخلہ نہیں ہوا.\nصارفین کے داخلہ کیلئے {{SITENAME}} کوکیز استعمال کرتا ہے.\nآپ کے ہاں کوکیز غیر فعال ہیں.\nبراہِ کرم، انہیں فعال کیجئے، اور پھر اپنے نئے اسمِ صارف اور کلمۂ شناخت کے ساتھ داخل ہوجائیے.",
        "nocookieslogin": "صارفین کے داخل ہونے کیلئے {{SITENAME}} کوکیز استعمال کرتا ہے.\nآپ کے ہاں کوکیز غیر فعال ہیں.\nانہیں فعال کرنے کے بعد پھر کوشش کیجئے.",
        "nocookiesfornew": "اس صارف نام کا کھاتہ نہیں بن سکا۔ہم اس بات کی وضاحت نہیں کر سکتے (کہ ایسا کیوں ہوا)، براہ مہربانی! آپ\nیقین کر لیں کہ آپ کی کوکیز فعال ہیں، صفحہ تازہ کریں اور پھر کوشش کریں۔",
+       "createacct-loginerror": "کھاتہ بن چکا ہے لیکن آپ اس میں خودکار طور پر داخل نہیں ہو سکے۔ براہ کرم [[Special:UserLogin|دستی طور پر داخل ہونے کی کوشش کریں]]۔",
        "noname": "آپ نے صحیح اسم صارف نہیں چنا.",
        "loginsuccesstitle": "داخلہ کامیاب",
        "loginsuccess": "'''اب آپ {{SITENAME}} میں بنام \"$1\" داخل ہوچکے ہیں۔'''",
-       "nosuchuser": "\"$1\" کے نام سے کوئی صارف موجود نہیں ہے.\nبرائے مہربانی! ہجوں کے درست اندراج کی تصدیق کرلیجئے.\nاگر آپ چاہیں تو [[Special:CreateAccount|نیا کھاتہ بھی بناسکتے ہیں]].",
+       "nosuchuser": "\"$1\" کے نام سے کوئی صارف موجود نہیں ہے۔\nبراہ کرم ہجوں کو جانچ لیں۔\nنیز اگر آپ چاہیں تو [[Special:CreateAccount|نیا کھاتہ بھی بنا سکتے ہیں]]۔",
        "nosuchusershort": "\"$1\" کے نام سے کوئی صارف موجود نہیں.\nاپنا ہجہ جانچئے.",
        "nouserspecified": "آپ کو ایک اسمِ صارف مخصوص کرنا ہے.",
        "login-userblocked": "اِس صارف پر پابندی ہے. داخلِ نوشتہ ہونے کی اجازت نہیں.",
        "noemail": "صارف \"$1\" کیلئے کوئی برقی پتہ درج نہیں کیا گیا.",
        "noemailcreate": "صحیح برقی پتہ مہیّا کریں",
        "passwordsent": "ایک نیا کلمۂ شناخت \"$1\" کے نام سے بننے والی برقی ڈاک کے پتے کیلیے بھیج دیا گیا ہے۔\nجب وہ موصول ہو جاۓ تو براہ کرم اسکے ذریعے دوبارہ داخل ہوں۔",
-       "blocked-mailpassword": "آپ کا آئی.پی پتہ تدوین سے روک لیا گیا ہے، سو، ناجائز استعمال کو روکنے کیلئے، آپ کے آئی.پی پتہ کو کلمۂ شناخت کی بحالی کا فعل استعمال کرنے کی اِجازت نہیں ہے.",
+       "blocked-mailpassword": "آپ کے آئی پی پتے کی ترمیم کاری پر پابندی لگا دی گئی ہے۔ غلط استعمال سے بچنے کے لیے اس آئی پی پتے سے پاس ورڈ کی بازیابی کی اجازت منسوخ کر دی گئی ہے۔",
        "eauthentsent": "ایک تصدیقی برقی خط نامزد کیے گئے برقی پتہ پر ارسال کردیا گیا ہے۔\nآپ کو موصول ہوئے برقی خط میں ہدایات پر عمل کرکے اس بات کی توثیق کرلیں کہ مذکورہ برقی پتہ آپ کا ہی ہے۔",
        "throttled-mailpassword": "گزشتہ {{PLURAL:$1|گھنٹے|$1 گھنٹوں}} کے دوران پہلے سے ہی پارلفظ (پاسورڈ) کی تبدیلی کے لیے برقی خط بھیجا گيا ہے۔\nناجائز استعمال کے سدّباب کیلئے، {{PLURAL:$1|گھنٹہ|$1 گھنٹوں}} کے دوران صرف ایک برقی خط بھیجا جاسکتا ہے۔",
        "mailerror": "مسلہ دوران ترسیل خط:$1",
-       "acct_creation_throttle_hit": "آپکی آئی.پی کے ذریعے اِس ویکی پر آنے والے صارفین نے پچھلے ایک دِن میں {{PLURAL:$1|1 کھاتہ بنایا ہے|$1 کھاتے بنائے ہیں}}، جو کہ مذکورہ وقت میں کافی ہیں.\nلہٰذا، آپکی آئی.پی استعمال کرنے والے صارفین اِس وقت مزید کھاتے نہیں بناسکتے.",
+       "acct_creation_throttle_hit": "آپکی آئی پی کے ذریعے اِس ویکی پر آنے والے صارفین نے پچھلے $2 میں {{PLURAL:$1|1 کھاتہ بنایا ہے|$1 کھاتے بنائے ہیں}} جو اس مدت کے لیے کافی ہیں۔\nلہٰذا آپ کی آئی پی استعمال کرنے والے صارفین اِس وقت مزید کھاتے نہیں بنا سکتے۔",
        "emailauthenticated": "آپ کے برقی ڈاک پتہ کی تصدیق مورخہ $2 بوقت $3 بجے ہوئی۔",
        "emailnotauthenticated": "آپ کے برقی پتہ کی ابھی تصدیق نہیں ہوئی ہے۔\nدرج ذیل میں سے کسی بھی چیز کیلئے آپ کے برقی پتہ پر برقی ڈاک ارسال نہیں کی جائے گی۔",
        "noemailprefs": "اِن خصائص کو کام میں لانے کیلئے اپنے ترجیحات میں برقی ڈاک کا پتہ متعین کیجئے.",
        "cannotchangeemail": "کھاتے کا برقی پتہ اس ویکی سے پر رہتے ہوئے نہیں تبدیل کیا جا سکتا۔",
        "emaildisabled": "اس سائٹ سے برقی خط نہیں بھیجے جاسکتے",
        "accountcreated": "تخلیقِ کھاتہ",
-       "accountcreatedtext": "[[{{ns:صارف}}:$1|$1]] ([[{{ns:تبادلۂ خیال صارف}}:$1|تبادلۂ خیال]]) کا صارف کھاتہ بن چکا ہے۔",
+       "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-abort-generic": "آپ داخل (لاگ ان) نہیں ہو پائے - ساقط",
+       "login-abort-generic": "لاگ ان ناکام - منسوخ شد",
+       "login-migrated-generic": "آپ کا کھاتہ منتقل کر دیا گیا، اب اس ویکی پر آپ کا صارف نام موجود نہیں۔",
        "loginlanguagelabel": "زبان: $1",
-       "pt-login": "داخل ہوجائیے",
+       "suspicious-userlogout": "کھاتے سے خارج ہونے کی درخواست رد کر دی گئی ہے کیونکہ ایسا معلوم ہوتا ہے یہ درخواست کسی شکستہ براؤزر یا کیشے کی حامل پراکسی سے بھیجی گئی تھی۔",
+       "createacct-another-realname-tip": "حقیقی نام اختیاری ہے۔\nاگر آپ اسے فراہم کریں تو آپ کے کاموں کو اس نام سے منسوب کرنے کے لیے استعمال کیا جائے گا۔",
+       "pt-login": "داخل ہوں",
        "pt-login-button": "داخل ہو",
+       "pt-login-continue-button": "داخل ہوں",
        "pt-createaccount": "کھاتا بنائیں",
        "pt-userlogout": "خارج ہوجائیں",
+       "php-mail-error-unknown": "پی ایچ پی کے mail() فنکشن میں نامعلوم نقص۔",
        "user-mail-no-addy": "برقی ڈاک بھیجنے کی کوشش بغیر برقی ڈاک پتہ",
        "user-mail-no-body": "خالی یا بہت ہی مختصر برقی خط بھیجنے کی کوشش",
        "changepassword": "کلمۂ شناخت تبدیل کریں",
        "newpassword": "نیا کلمۂ شناخت",
        "retypenew": "نیا کلمۂ شناخت دوبارہ درج کریں:",
        "resetpass_submit": "پارلفظ بناؤ اور داخل ہوجاؤ",
-       "changepassword-success": "آپ کا پارلفظ کامیابی سے تبدیل ہوگیا!",
+       "changepassword-success": "آپ کا پاس ورڈ تبدیل کر دیا گیا!",
+       "changepassword-throttled": "آپ نے حال ہی میں متعدد مرتبہ داخل ہونے کی کوشش کی ہے۔\nدوبارہ کوشش کرنے سے پہلے $1 انتظار کریں۔",
+       "botpasswords": "روبہ پاس ورڈ",
+       "botpasswords-summary": "<em>روبہ کے پاس ورڈ</em> کے ذریعہ اصل کھاتے کی لاگ ان معلومات کے بغیر اے پی آئی کی مدد سے صارف کھاتے میں رسائی حاصل ہوتی ہے۔\n\nاگر آپ اس سے واقف نہیں ہیں تو بہتر ہوگا کہ آپ اسے نہ چھیڑیں۔ کوئی دوسرا صارف کبھی اس پاس ورڈ کے بنانے اور اسے سپرد کرنے کا آپ سے مطالبہ نہیں کرے گا۔",
+       "botpasswords-disabled": "روبہ کے پاس ورڈ غیر فعال ہیں۔",
+       "botpasswords-no-central-id": "روبہ کے پاس ورڈ کو استعمال کرنے کے لیے آپ کا مرکزی کھاتے میں داخل رہنا ضروری ہے۔",
+       "botpasswords-existing": "روبہ کے موجودہ پاس ورڈ",
+       "botpasswords-createnew": "روبہ کا نیا پاس ورڈ بنائیں",
+       "botpasswords-editexisting": "روبہ کے موجودہ پاس ورڈ میں ترمیم کریں",
+       "botpasswords-label-appid": "روبہ کا نام:",
+       "botpasswords-label-create": "تخلیق کریں",
+       "botpasswords-label-update": "تجدید کریں",
+       "botpasswords-label-cancel": "منسوخ کریں",
+       "botpasswords-label-delete": "حذف کریں",
+       "botpasswords-label-resetpassword": "پاس ورڈ تبدیل کریں",
+       "botpasswords-label-grants": "قابل تطبیق عطیے:",
+       "botpasswords-label-grants-column": "دے دیا گیا",
+       "botpasswords-bad-appid": "روبہ نام \"$1\" درست نہیں۔",
+       "botpasswords-insert-failed": "روبہ نام \"$1\" کو شامل کرنے میں ناکامی۔ کیا اسے پہلے شامل کیا جا چکا ہے؟",
+       "botpasswords-update-failed": "روبہ نام \"$1\" کی تجدید میں ناکامی۔ کیا اسے حذف کر دیا گیا ہے؟",
+       "botpasswords-created-title": "روبہ کا پاس ورڈ تخلیق ہو چکا ہے",
+       "botpasswords-created-body": "صارف \"$2\" کے روبہ نام \"$1\" کا پاس ورڈ تخلیق ہو چکا ہے۔",
+       "botpasswords-updated-title": "روبہ کا پاس ورڈ تازہ کر دیا گیا",
+       "botpasswords-updated-body": "صارف \"$2\" کے روبہ نام \"$1\" کا پاس ورڈ تازہ کر دیا گیا۔",
+       "botpasswords-deleted-title": "روبہ کا پاس ورڈ حذف ہو چکا ہے",
+       "botpasswords-deleted-body": "صارف \"$2\" کے روبہ نام \"$1\" کا پاس ورڈ حذف کیا جا چکا ہے۔",
+       "botpasswords-newpassword": "<strong>$1</strong> کے کھاتے میں داخل ہونے کے لیے نیا پاس ورڈ <strong>$2</strong> ہے۔ <em>براہ کرم اسے آئندہ کے لیے محفوظ کر لیں۔</em> <br> (وہ قدیم روبہ جات جنہیں یکساں لاگ ان نام اور آخری نام درکار ہوتا ہے، ان کے لیے آپ <strong>$3</strong> کو صارف نام اور <strong>$4</strong> کو پاس ورڈ کے طور پر استعمال کر سکتے ہیں۔)",
+       "botpasswords-no-provider": "BotPasswordsSessionProvider دستیاب نہیں۔",
+       "botpasswords-restriction-failed": "روبہ کے پاس ورڈ کی پابندیاں اس لاگ ان سے مانع ہیں۔",
+       "botpasswords-invalid-name": "درج کردہ صارف نام میں روبہ کے پاس ورڈ کا فاصل لفظ موجود نہیں ہے (\"$1\")۔",
+       "botpasswords-not-exist": "صارف \"$1\" کے پاس \"$2\" کے نام سے روبہ کا پاس ورڈ نہیں ہے۔",
        "resetpass_forbidden": "پارلفظ تبدیل نہیں ہوسکتا",
+       "resetpass_forbidden-reason": "پاس ورڈ تبدیل نہیں کیا جا سکتا: $1",
        "resetpass-no-info": "اِس صفحہ تک براہِ راست رسائی کیلئے آپ کو داخلِ نوشتہ ہونا پڑے گا.",
        "resetpass-submit-loggedin": "پارلفظ کی تبدیلی",
        "resetpass-submit-cancel": "منسوخ",
-       "resetpass-wrong-oldpass": "عارضÛ\8c Û\8cا Ù\85Ù\88جÙ\88دÛ\81 Ù¾Ø§Ø±Ù\84Ù\81ظ Ù\86اÙ\82ص Û\81Û\92.\nآپ Û\8cا ØªÙ\88 Ù¾Û\81Ù\84Û\92 Û\81Û\8c Ø³Û\92 Ø¢Ù¾Ù\86ا Ù¾Ø§Ø±Ù\84Ù\81ظ Ú©Ø§Ù\85Û\8cابÛ\8c Ø³Û\92 ØªØ¨Ø¯Û\8cÙ\84 Ú©Ø±Ú\86Ú©Û\92 Û\81Û\8cÚº Ø§Ù\88ر Û\8cا Ø¢Ù¾ Ù\86Û\92 Ù\86ئÛ\92 Ø¹Ø§Ø±Ø¶Û\8c Ù¾Ø§Ø±Ù\84Ù\81ظ Ú©Û\8c Ø¯Ø±Ø®Ù\88است Ú©Û\8c Û\81Û\92.",
+       "resetpass-wrong-oldpass": "عارضÛ\8c Û\8cا Ù\85Ù\88جÙ\88دÛ\81 Ù¾Ø§Ø³ Ù\88رÚ\88 Ù\86ادرست Û\81Û\92Û\94\nشاÛ\8cد Ø¢Ù¾ Ù\86Û\92 Ù¾Û\81Ù\84Û\92 Û\81Û\8c Ø§Ù¾Ù\86ا Ù¾Ø§Ø³ Ù\88رÚ\88 ØªØ¨Ø¯Û\8cÙ\84 Ú©Ø± Ù\84Û\8cا Û\81Û\92 Û\8cا Ù\86ئÛ\92 Ø¹Ø§Ø±Ø¶Û\8c Ù¾Ø§Ø³ Ù\88رÚ\88 Ú©Û\8c Ø¯Ø±Ø®Ù\88است Ú©Ø± Ú\86Ú©Û\92 Û\81Û\8cÚºÛ\94",
        "resetpass-recycled": "براہ کرم اپنے موجودہ کلمۂ شناخت (پاسورڈ) سے مختلف کلمۂ شناخت سے بازترتیب (ری‌سیٹ) کریں",
        "resetpass-temp-emailed": "آپ عارضی برقی خط سے بھیجے گئے کوڈ سے لاگ ان ہیں\nمکمل طور پر لاگ ان ہونے کے لیے آپ کو نیا پاسورڈ سیٹ کرنا پڑے گا",
        "resetpass-temp-password": "عارضی پارلفظ:",
-       "passwordreset": "پارلفظ کی بازتعینی",
+       "resetpass-abort-generic": "کسی توسیع نے پاس ورڈ کی تبدیلی کو منسوخ کر دیا ہے۔",
+       "resetpass-expired": "آپ کے پاس ورد کی مدت ختم ہو چکی ہے۔ داخل ہونے کے لیے براہ کرم نیا پاس ورڈ بنائیں۔",
+       "resetpass-expired-soft": "آپ کے پاس ورڈ کی مدت ختم ہو چکی ہے، لہذا اسے دوبارہ بنانے کی ضرورت ہے۔\nبراہ کرم نیا پاس ورڈ بنائیں، تاہم اگر مستقبل میں اس کی ترتیب نو مقصود ہو تو «{{int:authprovider-resetpass-skip-label}}» پر کلک کریں۔",
+       "resetpass-validity-soft": "آپ کا پاس ورڈ درست نہیں: $1\n\nبراہ کرم نیا پاس ورڈ بنائیں، تاہم اگر مستقبل میں اس کی ترتیب نو مقصود ہو تو «{{int:authprovider-resetpass-skip-label}}» پر کلک کریں۔",
+       "passwordreset": "پاس ورڈ کی ترتیب نو",
+       "passwordreset-text-one": "برقی خط کے ذریعہ عارضی پاس ورڈ حاصل کرنے کے لیے اس فارم کو پُر کریں۔",
+       "passwordreset-text-many": "{{PLURAL:$1|برقی خط کے ذریعہ عارضی پاس ورڈ حاصل کرنے کے لیے کسی ایک خانے کو پُر کریں۔}}",
+       "passwordreset-disabled": "اس ویکی پر پاس ورڈ کی ترتیب نو کی سہولت فعال نہیں ہے۔",
+       "passwordreset-emaildisabled": "اس ویکی پر برقی خط کی سہولت غیر فعال ہیں۔",
        "passwordreset-username": "اسمِ صارف:",
        "passwordreset-domain": "ساحہ:",
+       "passwordreset-capture": "برقی خط کی حتمی شکل دیکھیں؟",
+       "passwordreset-capture-help": "اس خانے کو نشان زد کرنے کی صورت میں (عارضی پاس ورڈ کا حامل) برقی خط آپ کو بھی نظر آئے گا اور صارف کو بھی روانہ کیا جائے گا۔",
        "passwordreset-email": "برقی ڈاک پتہ:",
+       "passwordreset-emailtitle": "{{SITENAME}} کھاتہ کی تفصیلات",
+       "passwordreset-emailelement": "صارف نام:\n$1\n\nعارضی پاس ورڈ: \n$2",
+       "passwordreset-emailsentemail": "اگر یہ برقی ڈاک پتا آپ کے کھاتے سے منسلک ہے تو پاس ورڈ کی ترتیب نو کا برقی خط بھیج دیا جائے گا۔",
+       "passwordreset-emailsentusername": "اگر کوئی برقی ڈاک پتا آپ کے کھاتے سے منسلک ہے تو پاس ورڈ کی ترتیب نو کا برقی خط بھیج دیا جائے گا۔",
+       "passwordreset-emailsent-capture2": "پاس ورڈ کی ترتیب نو {{PLURAL:$1|کا برقی خط بھیج دیا گیا ہے|کے برقی خطوط بھیج دیے گئے ہیں}}۔ {{PLURAL:$1|صارف نام اور پاس ورڈ|صارف ناموں اور ان کے پاس ورڈ کی فہرست}} یہاں ملاحظہ فرمائیں۔",
+       "passwordreset-emailerror-capture2": "{{GENDER:$2|صارف}} کو برقی خط بھیجنے میں ناکامی: $1\n{{PLURAL:$3|صارف نام اور پاس ورڈ|صارف ناموں کی فہرست اور ان کے پاس ورڈ}} یہاں ملاحظہ فرمائیں۔",
+       "passwordreset-nocaller": "کالر کا فراہم کیا جانا لازمی ہے",
+       "passwordreset-nosuchcaller": "کالر موجود نہیں: $1",
+       "passwordreset-ignored": "پاس ورڈ کی ترتیب نو مکمل نہیں ہو سکی۔ شاید کوئی پرووائڈر فراہم نہیں کیا گیا؟",
+       "passwordreset-invalideamil": "نادرست برقی ڈاک پتا",
+       "passwordreset-nodata": "کوئی صارف نام اور نہ کوئی برقی ڈاک پتا فراہم کیا گیا",
+       "changeemail": "برقی ڈاک پتے میں تبدیلی یا حذف شدگی",
+       "changeemail-header": "اپنے برقی ڈاک پتے کو تبدیل کرنے کے لیے اس فارم کو پُر کریں۔ اگر آپ اپنے کھاتے سے منسلک کسی برقی ڈاک پتے کو ختم کرنا چاہتے ہیں تو فارم پُر کرنے کے دوران میں نئے برقی ڈاک پتے کا خانہ خالی چھوڑ دیں۔",
+       "changeemail-no-info": "اِس صفحہ تک براہِ راست رسائی کیلئے آپ کو داخل ہونا پڑے گا۔",
        "changeemail-oldemail": "حالیہ برقی ڈاک پتہ:",
        "changeemail-newemail": "نیا برقی ڈاک پتہ:",
+       "changeemail-newemail-help": "اگر آپ اپنا برقی ڈاک پتہ حذف کرنا چاہتے ہیں تو اس خانے کو خالی چھوڑ دیں۔ تاہم اس صورت میں آپ کو ویکی کے برقی خطوط موصول نہیں ہونگے نیز فراموش شدہ پاس ورڈ کی ترتیب نو کا اختیار بھی ختم کر دیا جائے گا۔",
        "changeemail-none": "(کوئی نہیں)",
+       "changeemail-password": "آپ کا {{SITENAME}} پاس ورڈ:",
        "changeemail-submit": "برقی ڈاک تبدیل کریں",
+       "changeemail-throttled": "آپ نے متعدد مرتبہ داخل ہونے کی کوشش کی ہے۔\nدوبارہ کوشش کرنے سے پہلے $1 انتظار فرمائیں۔",
+       "changeemail-nochange": "براہ کرم کوئی دوسرا برقی ڈاک پتہ درج کریں۔",
+       "resettokens": "ٹوکنوں کی ترتیب نو",
+       "resettokens-no-tokens": "ترتیب نو کے لیے کوئی ٹوکن موجود نہیں۔",
        "resettokens-tokens": "ٹوکن:",
        "resettokens-token-label": "$1 (موجودہ قدر: $2)",
+       "resettokens-watchlist-token": "[[Special:Watchlist|آپ کی زیرنظر فہرست میں موجود صفحات کی تبدیلیوں]] کی ویب فیڈ (آٹوم/آر ایس ایس) کا ٹوکن",
+       "resettokens-done": "ٹوکنوں کی ترتیب نو مکمل۔",
+       "resettokens-resetbutton": "منتخب ٹوکنوں کو دوبارہ مرتب کریں",
        "bold_sample": "دبیز متن",
        "bold_tip": "دبیز متن",
        "italic_sample": "ترچھا متن",
        "link_sample": "ربط کا عنوان",
        "link_tip": "اندرونی ربط",
        "extlink_sample": "http://www.example.com ربط کا عنوان",
-       "extlink_tip": "بیرونی ربط (یاد رکھئے http:// prefix)",
+       "extlink_tip": "بیرونی ربط (http:// کا سابقہ نہ بھولیں)",
        "headline_sample": "شہ سرخی",
        "headline_tip": "شہ سرخی درجہ دوم",
        "nowiki_sample": "غیرشکلبندشدہ متن یہاں درج کریں",
-       "nowiki_tip": "ویکی شکلبندی نظرانداز کریں",
-       "image_tip": "Ù¾Û\8cÙ\88ستÛ\81 Ù\85Ù\84Ù\81",
-       "media_tip": "ربطِ ملف",
+       "nowiki_tip": "ویکی فارمیٹ کو نظرانداز کریں",
+       "image_tip": "Ù¾Û\8cÙ\88ستÛ\81 Ù\81ائÙ\84",
+       "media_tip": "فائل کا ربط",
        "sig_tip": "آپکا دستخط بمع مہرِوقت",
        "hr_tip": "اُفقی لکیر (زیادہ استعمال نہ کریں)",
        "summary": "خلاصہ:",
        "subject": "عنوان:",
        "minoredit": "معمولی ترمیم",
-       "watchthis": "یہ صفحہ زیر نظر کیجیۓ",
+       "watchthis": "اس صفحہ کو زیر نظر کریں",
        "savearticle": "محفوظ",
        "savechanges": "تبدیلیاں محفوظ کریں",
        "publishpage": "شائع کریں",
        "preview": "نمائش",
        "showpreview": "نمائش",
        "showdiff": "تبدیلیاں دکھائیں",
+       "blankarticle": "<strong>انتباہ:</strong> آپ خالی صفحہ تخلیق کر رہے ہیں۔\nاگر آپ «{{int:savearticle}}» پر دوبارہ کلک کریں تو یہ صفحہ بغیر کسی مواد کے محفوظ ہو جائے گا۔",
        "anoneditwarning": "<strong>انتباہ:</strong> آپ ویکیپیڈیا میں داخل نہیں ہوئے ہیں۔ لہذا اگر آپ اس صفحہ میں کوئی ترمیم کرتے ہیں تو آپکا آئی پی ایڈریس (IP) اس صفحہ کے تاریخچہ ترمیم میں محفوظ ہوجائے گا۔ اگر آپ  <strong>[$1 لاگ ان]</strong> ہوتے ہیں یا کھاتہ نہ ہونے کی صورت میں <strong>[$2 کھاتہ بنا لیتے ہیں]</strong> تو تو آپ کی ترامیم آپ کے صارف نام سے محفوظ ہوگی، جنھیں آپ کسی بھی وقت ملاحظہ کر سکتے ہیں۔",
+       "anonpreviewwarning": "<em>آپ داخل نہیں ہیں، چنانچہ تبدیلیاں محفوظ کرنے کی صورت میں اس صفحہ کا تاریخچہ آپ کا آئی پی پتا محفوظ کر لے گا۔</em>",
        "missingsummary": "'''انتباہ:''' آپ نے ترمیمی خلاصہ مہیّا نہیں کیا.\nاگر آپ نے محفوظ کا بٹن دوبارہ دبایا تو آپ کی ترمیم بغیر کسی خلاصہ کے محفوظ ہوجائے گی.",
+       "selfredirect": "<strong>انتباہ:</strong> آپ پیش نظر صفحہ کو خود اسی کی جانب رجوع مکرر کر رہے ہیں۔\nشاید آپ نے رجوع مکرر کا غلط ہدف درج کیا ہے یا غلط صفحہ میں ترمیم کر رہے ہیں۔\nتاہم اگر آپ «{{int:savearticle}}» پر دوبارہ کلک کریں تو بہرصورت اس رجوع مکرر کو بنا دیا جائے گا۔",
        "missingcommenttext": "براہِ کرم! تبصرہ نیچے درج کیجئے.",
        "missingcommentheader": "<strong>یاددہانی:</strong>  آپ نے اِس تبصرہ کیلئے عنوان یا شہ سرخی مہیّا نہیں کی ہے۔\nاگر آپ نے \"{{int:savearticle}}\" کا بٹن دوبارہ دبایا تو آپ کا تبصرہ بغیر کسی عنوان کے محفوظ ہوجائے گا۔",
        "summary-preview": "نمائش خلاصہ:",
        "subject-preview": "عنوان/شہ سرخی کی نمائش:",
+       "previewerrortext": "آپ کی تبدیلیوں کی نمائش دکھانے کے دوران میں کوئی نقص واقع ہو گیا ہے۔",
        "blockedtitle": "صارف مسدود ہے",
        "blockedtext": "'''آپکا اسمِ صارف یا آئی پی پتہ پر پابندی ہے.'''\n\n$1 نے پابندی لگائی تھی.\nوجہ یہ بتائی گئی کہ ''$2''.\n\n* پابندی کی ابتداء : $8\n* پابندی کا اختتام : $6\n* Intended blockee: $7\n\nآپ $1 یا کسی دوسرے [[{{MediaWiki:Grouppage-sysop}}|منتظم]] سے رابطہ کرکے پابندی پر بات چیت کرسکتے ہیں.\nآپ ‘صارف کو برقی خط ارسال کریں’ کی خاصیت اُس وقت تک استعمال نہیں کرسکتے جب تک آپ اپنے [[Special:Preferences|کھاتہ کے ترجیحات]] میں صحیح برقی پتہ معیّن نہ کریں، اور آپ کو اِسے استعمال کرنے سے پابند نہیں کیا گیا ہے.\nآپکا موجودہ آئی پی پتہ $3 ہے، اور پابندی کی شناخت #$5 ہے.\nبراہِ مہربانی کسی بھی قسم کے استفسار میں درج بالا تمام تفاصیل شامل کریں.",
        "blockednoreason": "کوئی وجہ نہیں دی گئی",
        "nosuchsectiontitle": "قطعہ نہیں ملا",
        "nosuchsectiontext": "آپ نے ایسے قطعہ میں ترمیم کی کوشش کی ہے جو کہ موجود نہیں.\nہوسکتا ہے کہ جب آپ صفحہ ملاحظہ فرمارہے تھے اُسی اثناء مذکورہ قطعہ کو منتقل یا حذف کردیا گیا ہو.",
        "loginreqtitle": "داخلہ / اندراج لازم",
-       "loginreqlink": "داخلہ",
+       "loginreqlink": "لاگ ان",
        "loginreqpagetext": "دوسرے صفحات ملاحظہ کرنے کیلئے آپکا $1 ضروری ہے.",
        "accmailtitle": "کلمہ شناخت بھیج دیا گیا۔",
        "accmailtext": "[[User talk:$1|$1]] کے لیے خودکار طریقے سے تخلیق کیا گیا پاسورڈ $2 کو بھیج دیا گیا ہے.\n\nلاگ ان ہونے کے بعد <em>[[Special:ChangePassword|اسے تبدیل]]</em> کیا جا سکتا ہے۔",
        "newarticle": "(نیا)",
        "newarticletext": "آپ نے ایک ایسے صفحے کے ربط کی پیروی کی ہے جو کہ ابھی موجود نہیں ہے.\nیہ صفحہ تخلیق کرنے کیلئے درج ذیل خانہ میں متن درج کیجئے (مزید معلومات کیلئے [$1 صفحۂ معاونت] ملاحظہ فرمائیے).\nاگر آپ یہاں غلطی سے پہنچے ہیں تو پچھلے صفحے پر واپس جانے کیلئے اپنے متصفح پر '''back''' کا بٹن ٹک کیجئے.",
-       "anontalkpagetext": "----''یہ صفحہ ایک ایسے صارف کا ہے جنہوں نے یا تو اب تک اپنا کھاتا نہیں بنایا یا پھر وہ اسے استعمال نہیں کر رہے/ رہی ہیں۔ لہٰذا ہمیں انکی شناخت کے لئے ایک عددی آئی پی پتہ استعمال کرنا پڑرہا ہے۔ اس قسم کا آئی پی پتہ ایک سے زائد صارفین کے لئے مشترک بھی ہوسکتا ہے۔ اگر آپکی موجودہ حیثیت ایک گمنام صارف کی ہے اور آپ محسوس کریں کہ اس صفحہ پر آپکی جانب منسوب یہ بیان غیرضروری ہے تو براہ کرم [[Special:CreateAccount|کھاتہ بنائیں]] یا [[Special:UserLogin|داخلِ نوشتہ]] ہوجائیے تاکہ مستقبل میں آپکو گمنام صارفین میں شمار کرنے سے پرہیز کیا جاسکے۔\"",
+       "anontalkpagetext": "----\n<em>یہ تبادلۂ خیال صفحہ ایک ایسے صارف کا ہے جس نے اب تک اپنا کھاتہ نہیں بنایا یا یہ صفحہ اس کے زیر استعمال نہیں۔</em> \nلہٰذا ہمیں اس کی شناخت کے لئے ایک آئی پی پتہ استعمال کرنا پڑ رہا ہے۔ \nاس قسم کا آئی پی پتہ ایک سے زائد صارفین کے درمیان میں مشترک بھی ہوسکتا ہے۔ \nاگر آپ کی موجودہ حیثیت ایک گمنام صارف کی ہے اور آپ محسوس کریں کہ اس صفحہ پر آپ کے متعلق یہ تبصرے غیر متعلق ہیں تو براہ کرم [[Special:CreateAccount|ایک کھاتہ بنا لیں]] یا [[Special:UserLogin|داخل ہو جائیں]] تاکہ مستقبل میں آپ کو گمنام صارفین میں شمار کرنے سے گریز کیا جائے۔",
        "noarticletext": "اِس صفحہ میں فی الحال کوئی متن موجود نہیں ہے۔\nآپ دیگر صفحات میں [[Special:Search/{{PAGENAME}}|اِس صفحہ کے عنوان کو تلاش کر سکتے ہیں]]، <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} متعلقہ نوشتہ جات میں تلاش کر سکتے ہیں]،\nیا [{{fullurl:{{FULLPAGENAME}}|action=edit}} اِس صفحہ کو تخلیق کر سکتے ہیں]</span>۔",
        "noarticletext-nopermission": "اس صفحہ میں فی الحال کوئی متن موجود نہیں ہے۔\nآپ دیگر صفحات میں [[Special:Search/{{PAGENAME}}|اِس صفحہ کے عنوان کے لیے]] یا <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} متعلقہ نوشتہ جات تلاش کرسکتے ہیں]</span>",
+       "userpage-userdoesnotexist": "«$1» کے نام سے صارف کھاتہ موجود نہیں ہے۔\nاگر آپ اس صفحہ کو تخلیق یا اس میں ترمیم کرنا چاہتے ہیں تو براہ کرم پہلے جانچ لیں۔",
        "userpage-userdoesnotexist-view": "صارف کھاتہ \"$1\" مندرج نہیں ہے۔",
+       "blocked-notice-logextract": "یہ صارف معطل ہے۔\nحوالہ کے لیے نوشتہ پابندی کا تازہ ترین اندراج ذیل میں دستیاب ہے:",
+       "clearyourcache": "<strong>یاددہانی:</strong> محفوظ کرنے کے بعد ان تبدیلیوں کو دیکھنے کے لیے آپ کو اپنے براؤزر کا کیشے صاف کرنا ہوگا۔\n* '''فائرفاکس/ سفاری:''' جب ''Reload'' پر کلک کریں تو ''Shift'' دباکر رکھیں، یا ''Ctrl-F5'' یا ''Ctrl-R'' دبائیں (Mac پر ''R-⌘'')\n* '''گوگل کروم:''' ''Ctrl-Shift-R'' دبائیں (Mac پر ''Shift-R-⌘'')\n* '''انٹرنیٹ ایکسپلورر:''' جب ''Refresh'' پر کلک کریں تو ''Ctrl'' یا ''Ctrl-F5'' دبائیں\n* '''اوپیرا:'''  ''Tools → Preferences'' میں جائیں اور کیشے (cache) صاف کریں",
+       "usercssyoucanpreview": "<strong>نکتہ:</strong> اپنی نئی سی ایس ایس کو جانچنے کے لیے اسے محفوظ کرنے سے قبل «{{int:showpreview}}» کی بٹن استعمال کریں۔",
+       "userjsyoucanpreview": "<strong>نکتہ:</strong>اپنی نئی جاوا اسکرپٹ کو  محفوظ کرنے سے قبل «{{int:showpreview}}» کی بٹن پر کلک کرکے جانچ لیں۔",
+       "usercsspreview": "<strong>یاد رہے کہ اس وقت آپ اپنی سی ایس کی محض نمائش دیکھ رہے ہیں، یہ اب تک محفوظ نہیں ہوئی ہے!</strong>",
+       "userjspreview": "<strong>یاد رہے کہ اس وقت آپ اپنی جاوا اسکرپٹ کی محض نمائش دیکھ/جانچ رہے ہیں، یہ اب تک محفوظ نہیں ہوئی ہے!</strong>",
+       "sitecsspreview": "<strong>یاد رہے کہ اس وقت آپ اس سی ایس کی محض نمائش دیکھ رہے ہیں، یہ اب تک محفوظ نہیں ہوئی ہے!</strong>",
+       "sitejspreview": "<strong>یاد رہے کہ اس وقت آپ اس جاوا اسکرپٹ کوڈ کی محض نمائش دیکھ رہے ہیں، یہ اب تک محفوظ نہیں ہوئی ہے!</strong>",
+       "userinvalidcssjstitle": "<strong>انتباہ:</strong> یہاں «$1» نام سے کوئی پوشاک موجود نہیں۔ شخصی .css اور .js کے صفحات اپنے عنوان میں چھوٹے حروف استعمال کرتے ہیں، مثلاً {{ns:user}}:Foo/Vector.css کی بجائے {{ns:user}}:Foo/vector.css",
        "updated": "(اپ ڈیٹڈ)",
        "note": "'''نوٹ:'''",
        "previewnote": "'''یاد رکھیں، یہ صرف نمائش ہے ۔آپ کی ترامیم ابھی محفوظ نہیں کی گئیں۔'''",
-       "session_fail_preview": "معاف کیجئے! نشست کے مواد میں خامی کی وجہ سے آپکی  ترمیم پر عمل نہیں کیا جاسکا.\nبرائے مہربانی دوبارہ کوشش کیجئے.\nاگر آپکو پھر بھی مشکل پیش آرہی ہے تو [[Special:UserLogout|خارجِ نوشتہ]] ہوکر واپس داخلِ نوشتہ ہوجایئے.",
+       "continue-editing": "خانہ ترمیم میں جائیں",
+       "previewconflict": "اس نمائش میں خانہ ترمیم کے اوپر موجود متن جس انداز میں ظاہر ہو رہا ہے، محفوظ کرنے کے بعد اسی طرح نظر آئے گا۔",
+       "session_fail_preview": "معذرت! نشست کے مواد میں خامی کی وجہ سے آپ کی  ترمیم مکمل نہیں ہو سکی۔\n\nشاید آپ اپنے کھاتے سے خارج ہو گئے ہیں۔ <strong>براہ کرم اس بات کی تصدیق کر لیں کہ آپ داخل ہیں اور دوبارہ کوشش کریں۔</strong> اگر آپ کو پھر بھی مشکل پیش آرہی ہو تو ایک بار [[Special:UserLogout|خارج ہو کر]] واپس داخل ہو جائیں اور اپنے براؤزر کو جانچ لیں کہ آیا وہ اس سائٹ کی کوکیز اخذ کر رہا ہے یا نہیں۔",
+       "edit_form_incomplete": "<strong>خانہ ترمیم سے کچھ حصے سرور تک نہیں پہنچ سکے ہیں؛ براہ کرم اپنی ترامیم کو دوبارہ جانچ لیں کہ آیا وہ برقرار ہیں یا نہیں اور دوبارہ کوشش کریں۔</strong>",
        "editing": "آپ \"$1\" میں ترمیم کر رہے ہیں۔",
        "creating": "زیر تخلیق $1",
-       "editingsection": "$1 کے قطعہ کی تدوین",
+       "editingsection": "«$1» کے قطعہ کی ترمیم",
        "editingcomment": "زیرترمیم $1 (نیا قطعہ)",
        "editconflict": "تنازعہ ترمیم:$1",
        "explainconflict": "آپکی تدوین شروع ہونے کے بعد شاید کسی نے یہ صفحہ تبدیل کردیا ہے.\nبالائی خانۂ متن میں صفحہ کا موجودہ مواد ہے.\nآپ کی تبدیلیاں نچلے متن خانہ میں دکھائی گئی ہیں.\nآپ کو اپنی تبدیلیاں موجودہ متن میں ضم کرنا ہوں گی.\n\"محفوظ\" کا بٹن ٹک کرنے سے '''صرف''' بالائی متن محفوظ ہوگا.",
        "editingold": "'''انتباہ: آپ اس صفحے کا ایک پرانا مسودہ مرتب کررہے ہیں۔ اگر آپ اسے محفوظ کرتے ہیں تو اس صفحے کے اس پرانے مسودے سے اب تک کی جانے والی تمام تدوین ضائع ہو جاۓ گی۔'''",
        "yourdiff": "تضادات",
        "copyrightwarning": "یہ یادآوری کرلیجیۓ کہ {{SITENAME}} میں تمام تحریری شراکت جی این یو آزاد مسوداتی اجازہ ($2)کے تحت تصور کی جاتی ہے (مزید تفصیل کیلیۓ $1 دیکھیۓ)۔ اگر آپ اس بات سے متفق نہیں کہ آپکی تحریر میں ترمیمات کری جائیں اور اسے آزادانہ (جیسے ضرورت ہو) استعمال کیا جاۓ تو براۓ کرم اپنی تصانیف یہاں داخل نہ کیجیۓ۔ اگر آپ یہاں اپنی تحریر جمع کراتے ہیں تو آپ اس بات کا بھی اقرار کر رہے ہیں کہ، اسے آپ نے خود تصنیف کیا ہے یا دائرہ ءعام (پبلک ڈومین) سے حاصل کیا ہے یا اس جیسے کسی اور آذاد وسیلہ سے۔'''بلااجازت ایسا کام داخل نہ کیجیۓ جسکا حق ِطبع و نشر محفوظ ہو!'''",
+       "copyrightwarning2": "براہ کرم اس بات کا خیال رکھیں کہ {{SITENAME}} میں آپ کی جانب سے کی جانے والی تمام ترمیموں میں دیگر صارفین بھی حذف و اضافہ کر سکتے ہیں۔\nاگر آپ اپنی تحریر کے ساتھ اس قسم کے سلوک کے روادار نہیں تو براہ کرم اسے یہاں شائع نہ کریں۔<br />\nنیز اس تحریر کو شائع کرتے وقت آپ ہم سے یہ وعدہ بھی کر رہے ہیں کہ اسے آپ نے خود لکھا ہے یا اسے دائرہ عام یا کسی آزاد ماخذ سے یہاں نقل کر رہے ہیں (تفصیلات کے لیے $1 ملاحظہ فرمائیں)۔\n<strong>براہ کرم اجازت کے بغیر کسی کاپی رائٹ شدہ مواد کو یہاں شائع نہ کریں۔</strong>",
+       "editpage-cannot-use-custom-model": "اس صفحہ کے مواد کے ماڈل کو تبدیل نہیں کیا جا سکتا۔",
+       "readonlywarning": "<strong>انتباہ: انتظامی نگہداشت کی خاطر ڈیٹابیس کو مقفل کر دیا گیا ہے، لہذا اس وقت آپ اپنی ترامیم کو محفوظ نہیں کر سکتے۔</strong>\nآپ اپنی تحریر کو کسی ٹیکسٹ فائل میں محفوظ کر سکتے ہیں تاکہ وہ ضائع نہ ہو اور آئندہ اسے استعمال کیا جا سکے۔\n\nانتظامیہ کی جانب سے مقفل کرنے کی حسب ذیل وجہ بیان کی گئی ہے:\n\n$1",
        "protectedpagewarning": "<strong>انتباہ: اس صفحہ میں ترمیم کاری کو مقفل کر دیا گیا ہے اور محض انتظامی اختیارات کے حامل صارفین ہی اس میں ترمیم کر سکتے ہیں۔</strong>\nحوالہ کے لیے ذیل میں نوشتہ جاتی اندراج فراہم کیا گیا ہے:",
-       "semiprotectedpagewarning": "<strong>اطلاع:</strong> اس صفحہ کو یوں مقفل کیا جاچکا ہے کہ اس میں صرف اندراج شدہ صارفین ہی ترمیم کرسکتے ہیں۔\nحوالہ کے لیے ذیل میں تازہ ترین نوشتہ جاتی اندراج دیا گیا ہے:",
+       "semiprotectedpagewarning": "<strong>اطلاع:</strong> اس صفحہ کو محفوظ کر دیا گیا ہے، لہذا اب اس میں محض اندراج شدہ صارفین ہی ترمیم کر سکتے ہیں۔\nحوالہ کے لیے ذیل میں نوشتہ کا تازہ ترین اندراج درج ہے:",
        "cascadeprotectedwarning": "<strong>انتباہ:</strong> اس صفحہ میں ترمیم کاری کو مقفل کر دیا گیا ہے اور محض انتظامی اختیارات کے حامل صارفین ہی اس میں ترمیم کر سکتے ہیں۔ اسے مقفل کرنے کی وجہ یہ ہے کہ پیش نظر صفحہ درج ذیل محفوظ {{PLURAL:$1|صفحہ|صفحات}} کی آبشاری حفاظت میں شامل ہے:",
+       "titleprotectedwarning": "<strong>انتباہ: اس صفحہ کو محفوظ کر دیا گیا ہے، چنانچہ اسے تخلیق کرنے کے لیے [[Special:ListGroupRights|خصوصی اختیارات]] درکار ہونگے۔</strong>\nحوالہ کے لیے ذیل میں نوشتہ کا تازہ ترین اندراج موجود ہے:",
        "templatesused": "اِس صفحہ پر مستعمل {{PLURAL:$1|سانچہ|سانچے}}:",
        "templatesusedpreview": "اِس پیش منظر میں مستعمل {{PLURAL:$1|سانچہ|سانچے}}:",
        "templatesusedsection": "اِس قطعہ میں مستعمل {{PLURAL:$1|سانچہ|سانچے}}:",
        "template-protected": "(محفوظ شدہ)",
        "template-semiprotected": "(نیم محفوظ)",
        "hiddencategories": "یہ صفحہ {{PLURAL:$1|1 چُھپے زمرے|$1 چُھپے زمرہ جات}} میں شامل ہے:",
+       "nocreatetext": "{{SITENAME}} نے نئے صفحات تخلیق کرنے پر پابندی لگا رکھی ہے۔\nتاہم آپ پہلے سے موجود صفحات میں ترمیم کر سکتے ہیں یا [[Special:UserLogin|اپنے کھاتے ميں داخل ہوں یا کھاتہ بنائیں]]۔",
        "nocreate-loggedin": "آپ کو نئے صفحات تخلیق کرنے کی اجازت نہیں ہے.",
        "sectioneditnotsupported-title": "قطعہ کی تدوین حمایت شدہ نہیں ہے",
        "sectioneditnotsupported-text": "اِس صفحہ میں قطعہ کی تدوین حمایت شدہ نہیں ہے.",
        "permissionserrors": "خطائے اجازت",
        "permissionserrorstext": "درج ذیل {{PLURAL:$1|وجہ|وجوہات}} کی بناء پر آپ کو ایسا کرنے کی اجازت نہیں ہے:",
-       "permissionserrorstext-withaction": "درج ذیل {{PLURAL:$1|وجہ|وجوہات}} کی بناء پر آپ کو $2 کرنے کی اجازت نہیں ہے:",
+       "permissionserrorstext-withaction": "درج ذیل {{PLURAL:$1|وجہ|وجوہات}} کی بناء پر آپ کو $2  کی اجازت نہیں ہے:",
+       "contentmodelediterror": "آپ اس نسخے میں ترمیم نہیں کر سکتے کیونکہ اس کے مواد کا ماڈل ‌‌<code>$1</code> ہے جو اس صفحہ کے مواد کے موجودہ ماڈل <code>$2</code> سے مختلف ہے۔",
        "recreate-moveddeleted-warn": "''' انتباہ: آپ ایک گزشتہ حذف شدہ صفحہ دوبارہ تخلیق کررہے ہیں. '''\n\nآپ کو اِس بات پر غور کرنا چاہئے کہ آیا اِس صفحہ کی تدوین جاری رکھنا موزوں ہے یا نہیں.\nصفحہ کا نوشتۂ حذف شدگی و منتقلی یہاں سہولت کی خاطر مہیّا کیا جارہا ہے:",
-       "moveddeleted-notice": "یہ ایک حذف شدہ صفحہ ہے.\nصفحہ کا نوشتۂ حذف شدگی و منتقلی ذیل میں بطورِ حوالہ دیا جارہا ہے.",
+       "moveddeleted-notice": "اس صفحہ کو حذف کر دیا گیا ہے۔\nحوالہ کے لیے ذیل میں اس صفحہ کا نوشتہ حذف شدگی اور نوشتہ منتقلی درج ہے۔",
+       "moveddeleted-notice-recent": "معذرت، اس صفحہ کو حال ہی میں حذف کیا گیا ہے (گزشتہ چوبیس گھنٹوں میں)۔\nحوالہ کے لیے ذیل میں اس صفحہ کا نوشتہ حذف اور نوشتہ منتقلی موجود ہے۔",
        "log-fulllog": "پورا نوشتہ دیکھئے",
+       "edit-hook-aborted": "کسی رکاوٹ کی وجہ سے ترمیم کاری منسوخ کر دی گئی ہے۔\nاور کوئی وضاحت نہیں دی گئی۔",
        "edit-gone-missing": "صفحہ تجدید نہیں کیا جاسکتا.\nلگتا ہے یہ حذف ہوچکا ہے.",
        "edit-conflict": "تنازعۂ تدوین.",
        "edit-no-change": "آپ کی تدوین کو نظرانداز کردیا گیا، کیونکہ متن میں کوئی تبدیلی نہیں ہوئی تھی.",
        "postedit-confirmation-saved": "آپ کی ترمیم محفوظ ہوگئی۔",
        "edit-already-exists": "نیا صفحہ تخلیق نہیں کیا جاسکتا.\nیہ پہلے سے موجود ہے.",
        "defaultmessagetext": "طے شدہ پیغام کا متن",
+       "content-failed-to-parse": "ماڈل $1 کے $2 مواد کے تجزیہ میں ناکامی: $3",
+       "invalid-content-data": "نادرست ڈیٹا مندرجات",
+       "content-not-allowed-here": "صفحہ [[$2]] پر \"$1\" مواد کی اجازت نہیں",
+       "editwarning-warning": "اس صفحہ کو چھوڑنے پر ممکن ہے جو تبدیلیاں آپ نے کی ہیں وہ سب ضائع ہو جائیں۔\nاگر آپ داخل ہیں تو اپنی ترجیحات کے خانہ «{{int:prefs-editing}}» سے اس انتباہ کو غیر فعال کر سکتے ہیں۔",
+       "editpage-invalidcontentmodel-title": "مواد کا ماڈل معاونت یافتہ نہیں",
+       "editpage-invalidcontentmodel-text": "مواد کا ماڈل \"$1\" معاونت یافتہ نہیں ہے۔",
+       "editpage-notsupportedcontentformat-title": "مواد کا فارمیٹ معاونت یافتہ نہیں",
+       "editpage-notsupportedcontentformat-text": "مواد کے ماڈل $2 کی جانب سے مواد کا فارمیٹ $1 معاونت یافتہ نہیں۔",
+       "content-model-wikitext": "ویکی متن",
        "content-model-text": "سادہ متن",
        "content-model-javascript": "جاوا اسکرپٹ",
+       "content-model-css": "سی ایس ایس",
+       "content-json-empty-object": "خالی آبجیکٹ",
+       "content-json-empty-array": "خالی ایرے",
+       "deprecated-self-close-category": "صفحات مع نادرست ایچ ٹی ایم ایل ٹیگ",
+       "deprecated-self-close-category-desc": "اس صفحہ میں ایچ ٹی ایم ایل کے نادرست ٹیگ مثلاً <code>&lt;b/></code> or <code>&lt;span/></code> استعمال کیے گئے ہیں۔ چونکہ ایچ ٹی ایم ایل 5 میں ان ٹیگوں کا رویہ تبدیل ہو جائے گا، لہذا ویکی متن میں ان کا استعمال متروک ہو چکا ہے۔",
+       "duplicate-args-category": "سانچے میں دوہرے آرگومنٹ کے حامل صفحات",
+       "duplicate-args-category-desc": "وہ صفحات جن میں مکرر یا دوہرے آرگومنٹ مستعمل ہیں، مثلاً <code><nowiki>{{foo|bar=1|bar=2}}</nowiki></code> یا <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>۔",
+       "expensive-parserfunction-category": "سنگین پارسر فنکشنوں کے بے پناہ استعمال والے صفحات",
+       "post-expand-template-inclusion-warning": "<strong>انتباہ:</strong> سانچہ کا حجم بہت زیادہ ہے۔ کچھ سانچے شامل نہیں ہو سکیں گے۔",
+       "post-expand-template-inclusion-category": "حجم سے متجاوز سانچوں والے صفحات",
+       "post-expand-template-argument-warning": "<strong>انتباہ:</strong> اس صفحہ میں موجود سانچہ کے کم از کم کسی ایک پیرامیٹر کا حجم بہت زیادہ ہے۔\nان پیرامیٹروں کو ترک کر دیا گیا ہے۔",
+       "post-expand-template-argument-category": "سانچہ کے ترک کردہ پیرامیٹروں کے حامل صفحات",
+       "parser-template-loop-warning": "سانچہ میں تکرار پایا گیا: [[$1]]",
+       "parser-template-recursion-depth-warning": "سانچہ میں تکرار کی گہرائی اپنی حد سے تجاوز کر گئی ($1)",
+       "language-converter-depth-warning": "لسانی مبدل کی گہرائی اپنی حد سے تجاوز کر گئی ($1)",
+       "node-count-exceeded-category": "گرہوں کی تعداد سے تجاوز کرنے والے صفحات",
+       "node-count-exceeded-category-desc": "اس صفحہ میں گرہیں اپنی مقررہ تعداد سے تجاوز کر گئیں۔",
+       "node-count-exceeded-warning": "صفحہ کی گرہ اپنی تعداد سے تجاوز کر گئی",
+       "expansion-depth-exceeded-category": "توسیع کی گہرائی سے تجاوز کرنے والے صفحات",
+       "expansion-depth-exceeded-category-desc": "اس صفحہ میں توسیع کی گہرائی اپنی حد سے تجاوز کر گئی۔",
+       "expansion-depth-exceeded-warning": "صفحہ میں توسیع کی گہرائی اپنی حد سے تجاوز کر گئی",
+       "parser-unstrip-loop-warning": "unstrip فنکشن میں تکرار پایا گیا",
+       "parser-unstrip-recursion-limit": "unstrip فنکشن میں تکرار اپنی حد سے تجاوز کر گیا ($1)",
+       "converter-manual-rule-error": "زبان کی دستی تبدیلی کے ضوابط میں نقص دریافت ہوا",
+       "undo-success": "اس ترمیم کو واپس پھیرا جا سکتا ہے۔\nبراہ کرم ذیل میں موجود موازنہ ملاحظہ فرمائیں اور یقین کر لیں کہ اس موازنے میں موجود فرق ہی آپ کا مقصود ہے۔ اس کے بعد تبدیلیوں کو محفوظ کر دیں، ترمیم واپس پھیر دی جائے گی۔",
+       "undo-failure": "درمیان میں متنازع ترامیم کی موجودگی کی بنا پر اس ترمیم کو واپس نہیں پھیرا جا سکا۔",
+       "undo-norev": "اس ترمیم کو واپس نہیں پھیرا جا سکا کیونکہ یہ موجود ہی نہیں یا حذف کر دی گئی ہے۔",
+       "undo-nochange": "معلوم ہوتا ہے کہ اس ترمیم کو پہلے ہی واپس پھیر دیا گیا ہے۔",
        "undo-summary": "[[Special:Contributions/$2|$2]] ([[User talk:$2|تبادلہ خیال]]) کی جانب سے کی گئی ترمیم $1 رد کردی گئی ہے۔",
+       "undo-summary-username-hidden": "پوشیدہ صارف کے نسخہ $1 کو واپس پھیریں",
+       "cantcreateaccount-text": "[[User:$3|$3]] نے اس آئی پی پتہ (<strong>$1</strong>) کی کھاتہ سازی پر پابندی لگا رکھی ہے۔\n\n$3 نے «<em>$2</em>» وجہ بیان کی ہے",
+       "cantcreateaccount-range-text": "[[User:$3|$3]] نے <strong>$1</strong> رینج کے آئی پی پتوں پر جس میں آپ کا آئی پی پتہ (<strong>$4</strong>) بھی موجود ہے پر پابندی لگا دی ہے۔\n\n$3 نے «<em>$2</em>» وجہ بیان کی ہے",
        "viewpagelogs": "اس صفحہ کیلیے نوشتہ جات دیکھیے",
        "nohistory": "اِس صفحہ کیلئے کوئی تدوینی تاریخچہ موجود نہیں ہے.",
        "currentrev": "حـالیـہ تـجدید",
        "currentrev-asof": "حالیہ نسخہ بمطابق $1",
        "revisionasof": "نسخہ بمطابق $1",
        "revision-info": "نظرثانی بتاریخ $1 از {{GENDER:$6|$2}}$7",
-       "previousrevision": "â\86\90پراÙ\86Û\8c ØªØ¯Ù\88Û\8cÙ\86",
+       "previousrevision": "â\86\92 Ù¾Ø±Ø§Ù\86ا Ù\86سخÛ\81",
        "nextrevision": "→اگلا اعادہ",
        "currentrevisionlink": "حالیہ نظرثانی",
        "cur": " رائج",
        "history-edit-tags": "منتخب نظرثانیوں کے ٹیگوں میں ترمیم کریں",
        "rev-deleted-comment": "(تبصرہ حذف کی گيا ہے)",
        "rev-deleted-user": "(صارف نام حذف کیا گيا ہے)",
-       "rev-delundel": "دکھاؤ/چھپاؤ",
+       "rev-deleted-event": "(نوشتہ کی تفصیلات ہٹا دی گئیں)",
+       "rev-deleted-user-contribs": "[صارف نام یا آئی پی پتہ ہٹا دیا گیا - شراکتوں سے ترمیم پوشیدہ ہو گئی]",
+       "rev-deleted-text-permission": "پیش نظر صفحہ کی یہ ترمیم <strong>حذف کر دی گئی ہے</strong>۔\nمزید تفصیلات [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} نوشتہ حذف شدگی] میں دیکھی جا سکتی ہیں۔",
+       "rev-suppressed-text-permission": "پیش نظر صفحہ کی یہ ترمیم <strong>پوشیدہ کر دی گئی ہے</strong>۔\nمزید تفصیلات [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} نوشتہ پوشیدگی] میں دیکھی جا سکتی ہیں۔",
+       "rev-deleted-text-unhide": "پیش نظر صفحہ کی یہ ترمیم <strong>حذف کر دی گئی ہے</strong>۔\nمزید تفصیلات [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} نوشتہ حذف شدگی] میں دیکھی جا سکتی ہیں۔\nتاہم اگر آپ چاہیں تو [$1 اس نسخے کو ابھی بھی دیکھ سکتے ہیں]۔",
+       "rev-suppressed-text-unhide": "پیش نظر صفحہ کی یہ ترمیم <strong>پوشیدہ کر دی گئی ہے</strong>۔\nمزید تفصیلات [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} نوشتہ حذف شدگی] میں دیکھی جا سکتی ہیں۔\nتاہم اگر آپ چاہیں تو [$1 اس نسخے کو ابھی بھی دیکھ سکتے ہیں]۔",
+       "rev-deleted-text-view": "پیش نظر صفحہ کی یہ ترمیم <strong>حذف کر دی گئی ہے</strong>۔\nتاہم اسے آپ دیکھ سکتے ہیں، مزید تفصیلات [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} نوشتہ حذف شدگی] میں دیکھی جا سکتی ہیں۔",
+       "rev-suppressed-text-view": "پیش نظر صفحہ کی یہ ترمیم <strong>پوشیدہ کر دی گئی ہے</strong>۔\nتاہم اسے آپ دیکھ سکتے ہیں، مزید تفصیلات [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} نوشتہ حذف شدگی] میں دیکھی جا سکتی ہیں۔",
+       "rev-deleted-no-diff": "آپ اس فرق کو نہیں دیکھ سکتے کیونکہ دونوں میں سے کسی ایک ترمیم کو <strong>حذف کر دیا گیا ہے</strong>۔\nمزید تفصیلات [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} نوشتہ حذف شدگی] میں دیکھی جا سکتی ہیں۔",
+       "rev-suppressed-no-diff": "آپ اس فرق کو نہیں دیکھ سکتے کیونکہ دونوں میں سے کسی ایک ترمیم کو <strong>حذف کر دیا گیا ہے</strong>۔",
+       "rev-deleted-unhide-diff": "اس فرق کی کسی ایک ترمیم کو <strong>حذف کر دیا گیا ہے</strong>۔\nمزید تفصیلات [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} نوشتہ حذف شدگی] میں دیکھی جا سکتی ہیں۔\nتاہم اگر آپ چاہیں تو [$1 اس فرق کو ابھی بھی دیکھ سکتے ہیں]۔",
+       "rev-suppressed-unhide-diff": "اس فرق کی کسی ایک ترمیم کو <strong>پوشیدہ کر دیا گیا ہے</strong>۔\nمزید تفصیلات [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} نوشتہ حذف شدگی] میں دیکھی جا سکتی ہیں۔\nتاہم اگر آپ چاہیں تو [$1 اس فرق کو ابھی بھی دیکھ سکتے ہیں]۔",
+       "rev-deleted-diff-view": "اس فرق کی کسی ایک ترمیم کو <strong>حذف کر دیا گیا ہے</strong>۔\nآپ اس فرق کو دیکھ سکتے ہیں؛ مزید تفصیلات [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} نوشتہ حذف شدگی] میں دیکھی جا سکتی ہیں۔",
+       "rev-suppressed-diff-view": "اس فرق کی کسی ایک ترمیم کو <strong>پوشیدہ کر دیا گیا ہے</strong>۔\nآپ اس فرق کو دیکھ سکتے ہیں؛ مزید تفصیلات [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} نوشتہ پوشیدگی] میں دیکھی جا سکتی ہیں۔",
+       "rev-delundel": "مرئیت تبدیل کریں",
        "rev-showdeleted": "دکھاؤ",
        "revisiondelete": "نظرثانی حذف کریں/واپس لائیں",
        "revdelete-nooldid-title": "ناقص مقصود نظرثانی",
+       "revdelete-nooldid-text": "اس فنکشن کو جس نسخے پر انجام دینا ہے اسے آپ نے منتخب نہیں کیا، یا منتخب کردہ نسخہ موجود نہیں، یا آپ موجودہ نسخہ کو پوشیدہ کرنے کی کوشش کر رہے ہیں۔",
+       "revdelete-no-file": "درج کردہ فائل موجود نہیں ہے۔",
+       "revdelete-show-file-confirm": "کیا آپ واقعی فائل «<nowiki>$1</nowiki>» کے مورخہ $2 بوقت $3 بجے حذف ہونے والے نسخے کو دیکھنا چاہتے ہیں؟",
        "revdelete-show-file-submit": "ہاں",
+       "revdelete-selected-text": "[[:$2]] {{PLURAL:$1|کا منتخب نسخہ|کے منتخب نسخے}}:",
+       "revdelete-selected-file": "[[:$2]] {{PLURAL:$1|کا منتخب فائل نسخہ|کے منتخب فائل نسخے}}:",
        "logdelete-selected": "{{PLURAL:$1|منتخب واقعۂ نوشتہ|منتخب واقعاتِ نوشتہ}}:",
+       "revdelete-text-text": "صفحہ کے تاریخچے میں حذف شدہ نسخے نظر آئی گے لیکن ان کا مواد عام صارفین کے لیے ناقابل رسائی ہوگا۔",
+       "revdelete-text-file": "فائل کے تاریخچے میں حذف شدہ نسخے نظر آئی گے لیکن ان کا مواد عام صارفین کے لیے ناقابل رسائی ہوگا۔",
+       "logdelete-text": "نوشتہ کے حذف شدہ اندراجات نوشتوں میں ظاہر ہوتے رہیں گے لیکن ان کا مواد عام صارفین کے لیے ناقابل رسائی ہوگا۔",
+       "revdelete-text-others": "جب تک اضافی پابندیاں نہیں لگائی جاتیں دیگر منتظمین کو اس پوشیدہ مواد تک رسائی اور اسے بحال کرنے کا اختیار حاصل ہوگا۔",
        "revdelete-confirm": "برائے مہربانی! یقین دِہانی کرلیجئے کہ آپ واقعی ایسا کرنا چاہتے ہیں، آپ اِس کے نتائج سے باخبر ہیں، اور آپ یہ [[{{MediaWiki:Policy-url}}|پالیسی]] کے مطابق کررہے ہیں.",
        "revdelete-legend": "رویتی پابندیاں لگائیں",
        "revdelete-hide-text": "نظرثانی متن چھپاؤ",
-       "revdelete-hide-image": "Ù\85Ø´Ù\85Ù\88Ù\84اتÙ\90 Ù\85Ù\84Ù\81 Ú\86ھپاؤ",
+       "revdelete-hide-image": "Ù\81ائÙ\84 Ú©Û\92 Ù\85Ø´Ù\85Ù\88Ù\84ات Ú\86ھپائÛ\8cÚº",
        "revdelete-hide-name": "ہدف اور پیرامیٹرز کو چھپائیں",
        "revdelete-hide-comment": "ترمیمی تبصرہ چھپاؤ",
        "revdelete-hide-user": "ترمیم کار کا اسمِ صارف / آئی.پی پتہ چُھپاؤ",
+       "revdelete-hide-restricted": "منتظمین اور دیگر صارفین سے معلومات کو پوشیدہ کریں",
        "revdelete-radio-same": "(تبدیل مت کرو)",
        "revdelete-radio-set": "پوشیدہ",
        "revdelete-radio-unset": "ظاہر",
+       "revdelete-suppress": "منتظمین اور دیگر صارفین سے معلومات کو پوشیدہ کریں",
        "revdelete-unsuppress": "بحال شدہ نظرثانیوں پر پابندیاں ہٹاؤ",
        "revdelete-log": "وجہ",
-       "revdelete-success": "'''رؤیتِ نظرثانی کی تجدید کامیابی سے ہوئی.'''",
-       "logdelete-success": "'''نوشتۂ رویت کامیابی سے مرتب.'''",
+       "revdelete-submit": "منتخب {{PLURAL:$1|نسخے|نسخوں}} پر منطبق کریں",
+       "revdelete-success": "نسخہ کی مرئیت کی تجدید مکمل۔",
+       "revdelete-failure": "نسخہ کی مرئیت کی تجدید نہیں ہو سکی:\n$1",
+       "logdelete-success": "نوشتہ مرئیت میں تبدیلی مکمل۔",
        "logdelete-failure": "'''نوشتۂ رویت مرتب نہیں کیا جاسکتا:'''\n\n$1",
        "revdel-restore": "ظاہریت تبدیل کرو",
        "pagehist": "تاریخچۂ صفحہ",
        "deletedhist": "حذف شدہ تاریخچہ",
+       "revdelete-hide-current": "مورخہ $2، بوقت $1 بجے والے آئٹم کو پوشیدہ کرنے کے دوران میں نقص: یہ موجودہ نسخہ ہے۔ اسے پوشیدہ نہیں کیا جا سکتا۔",
+       "revdelete-show-no-access": "مورخہ $2، بوقت $1 بجے والا آئٹم دکھانے کے دوران میں نقص: اس نسخہ کو  بطور «محدود» نشان زد کر دیا گیا ہے۔ چنانچہ اب یہ آپ کی دسترس سے باہر ہے۔",
+       "revdelete-modify-no-access": "مورخہ $2، بوقت $1 بجے والے آئٹم میں تبدیلی کے دوران میں نقص: اس نسخہ کو  بطور «محدود» نشان زد کر دیا گیا ہے۔ چنانچہ اب یہ آپ کی دسترس سے باہر ہے۔",
+       "revdelete-modify-missing": "آئٹم آئی ڈی $1 میں تبدیلی کے دوران میں نقص: یہ نسخہ ڈیٹابیس میں موجود نہیں ہے!",
+       "revdelete-no-change": "<strong>انتباہ:</strong> مورخہ $2، بوقت $1 بجے والے آئٹم میں پہلے ہی سے مرئیت کی مطلوبہ ترتیبات موجود ہیں۔",
+       "revdelete-concurrent-change": "مورخہ $2، بوقت $1 بجے والے آئٹم میں تبدیلی کے دوران میں نقص: ایسا معلوم ہوتا ہے کہ آپ کی جانب سے تبدیلی کی کوشش کے دوران میں کسی اور نے اس میں تبدیلی کر دی ہے۔\nبراہ کرم نوشتے دیکھ لیں۔",
+       "revdelete-only-restricted": "مورخہ $2، بوقت $1 بجے والے آئٹم کو پوشیدہ کرنے کے دوران میں نقص: مرئیت کے دیگر اختیارات میں سے مزید کسی ایک اختیار کو منتخب کیے بغیر آپ ان آئٹموں کو منتظمین کی نگاہوں سے مخفی نہیں کر سکتے۔",
+       "revdelete-reason-dropdown": "* عمومی وجوہات حذف شدگی\n** کاپی رائٹ کی خلاف ورزی\n** نامناسب تبصرہ یا ذاتی معلومات\n** نامناسب صارف نام\n** ممکنہ طور پر افترا آمیر معلومات",
        "revdelete-otherreason": "دوسری/اضافی وجہ:",
        "revdelete-reasonotherlist": "کوئی اَور وجہ",
        "revdelete-edit-reasonlist": "تحذیفی وجوہات کی تدوین",
        "revdelete-offender": "نظرثانی مصنف:",
+       "suppressionlog": "نوشتہ پوشیدگی",
+       "suppressionlogtext": "ذیل میں ان حذف شدگیوں اور پابندیوں کی فہرست ہے جن میں منتظمین سے پوشیدہ رکھا گیا مواد موجود ہے۔\nموجودہ جاری پابندیوں اور معطل صارفین کی فہرست دیکھنے کے لیے [[Special:BlockList|فہرست پابندی]] ملاحظہ فرمائیں۔",
        "mergehistory": "تواریخِ صفحہ کا انضمام",
+       "mergehistory-header": "اس صفحہ کے ذریعہ آپ ماخذ صفحہ کے تاریخچہ کے نسخوں کو نئے صفحہ میں ضم کر سکتے ہیں۔\nالبتہ اس بات کا یقین کر لیں کہ اس تبدیلی کے بعد بھی تاریخچہ کا تسلسل حسب سابق برقرار رہے گا۔",
        "mergehistory-box": "دو صفحات کی نظرثانیوں کا انضمام:",
        "mergehistory-from": "مآخذ صفحہ:",
        "mergehistory-into": "صفحۂ مقصود:",
+       "mergehistory-list": "قابل ضم تاریخچہ",
        "mergehistory-go": "ضم پذیر ترامیم دِکھاؤ",
        "mergehistory-submit": "نظرثانیاں ضم کرو",
        "mergehistory-empty": "نظرثانیاں ضم نہیں کی جاسکتیں.",
+       "mergehistory-done": "$1 کے $3 {{PLURAL:$3|نسخے|نسخوں}} کو [[:$2]] ضم کر دیا گیا۔",
+       "mergehistory-fail": "ضم تاریخچہ ممکن نہیں، براہ کرم صفحہ اور وقت کے پیرامیٹر کو دوبارہ جانچ لیں۔",
+       "mergehistory-fail-bad-timestamp": "وقت کی مہر نادرست ہے۔",
+       "mergehistory-fail-invalid-source": "ماخذ درست نہیں۔",
+       "mergehistory-fail-invalid-dest": "مقصود صفحہ درست نہیں۔",
+       "mergehistory-fail-no-change": "ضم تاریخچہ نے کسی بھی نسخے کو ضم نہیں کیا۔ براہ کرم صفحہ اور وقت کے پیرامیٹر کو دوبارہ جانچ لیں۔",
+       "mergehistory-fail-permission": "ناکافی اختیارات برائے ضم تاریخچہ۔",
+       "mergehistory-fail-self-merge": "ماخذ و مقصود صفحات یکساں ہیں۔",
+       "mergehistory-fail-toobig": "تاریخچے کو ضم نہیں کیا جا سکتا، کیونکہ {{PLURAL:$1|نسخے|نسخوں}} کی مقررہ حد  $1 سے تجاوز کرنا ہوگا۔",
        "mergehistory-no-source": "مآخذ صفحہ $1 موجود نہیں.",
        "mergehistory-no-destination": "مقصود صفحہ $1 موجود نہیں.",
        "mergehistory-invalid-source": "مآخذ صفحہ کا عنوان صحیح ہونا چاہئے.",
        "mergehistory-reason": "وجہ:",
        "mergelog": "نوشتہ کا انضمام",
        "revertmerge": "غیر ضم",
+       "mergelogpagetext": "ذیل میں ان صفحات کی فہرست ہے جن کے تاریخچے حال ہی میں دوسرے صفحوں میں ضم کیے گئے ہیں۔",
        "history-title": "\"$1\" کا نظرثانی تاریخچہ",
-       "difference-title": "\"$1\" کے اعادوں کے درمیان فرق",
+       "difference-title": "\"$1\" کے نسخوں کے درمیان فرق",
+       "difference-title-multipage": "«$1» اور «$2» صفحوں کے درمیان فرق",
        "difference-multipage": "(فرق مابین صفحات)",
-       "lineno": "لکیر $1:",
+       "lineno": "سطر $1:",
        "compareselectedversions": "منتخب متـن کا موازنہ",
+       "showhideselectedversions": "منتخب نسخوں کی مرئیت تبدیل کریں",
        "editundo": "رد ترمیم",
        "diff-empty": "(کوئی فرق نہیں)",
-       "diff-multi-sameuser": "({{PLURAL: $1 | ایک متوسط نظرثانی | $1 کئی متوسط نظرثانیاں}}ایک ہی صارف کی جانب سے نہیں دکھائی گئی)",
-       "searchresults": "تلاش کا نتیجہ",
-       "searchresults-title": "نتائجِ تلاش برائے \"$1\"",
+       "diff-multi-sameuser": "(ایک ہی صارف کا {{PLURAL: $1 |ایک درمیانی نسخہ نہیں دکھایا گیا| $1 درمیانی نسخے نہیں دکھائے گئے}})",
+       "diff-multi-otherusers": "({{PLURAL:$2|ایک دوسرے صارف|$2 صارفین}} {{PLURAL:$1|کا ایک درمیانی نسخہ نہیں دکھایا گیا|$1 کے درمیانی نسخے نہیں دکھائے گئے}})",
+       "diff-multi-manyusers": "($2 سے زیادہ {{PLURAL:$2|صارف|صارفین}} {{PLURAL:$1|کا ایک درمیانی نسخہ نہیں دکھایا گیا|$1 کے درمیانی نسخے نہیں دکھائے گئے}})",
+       "difference-missing-revision": "اس فرق ($1) {{PLURAL:$2|کا ایک نسخہ نہیں ملا|$2 کے نسخے نہیں ملے}}۔\n\nعموماً ایسا اس وقت ہوتا ہے جب کسی حذف شدہ صفحہ کے نسخوں کے درمیان میں فرق تلاش کرنے کی کوشش کی جائے۔\nمزید تفصیلات [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} نوشتہ حذف شدگی] میں دیکھی جا سکتی ہیں۔",
+       "searchresults": "تلاش کے نتائج",
+       "searchresults-title": "«$1» کے نتائج تلاش",
+       "titlematches": "عنوان صفحہ سے ملتا ہے",
+       "textmatches": "متن صفحہ سے ملتا ہے",
        "notextmatches": "کوئی بھی مماثل متن موجود نہیں",
        "prevn": "پچھلے {{PLURAL:$1|$1}}",
        "nextn": "اگلے {{PLURAL:$1|$1}}",
        "prev-page": "پچھلا صفحہ",
        "next-page": "اگلا صفحہ",
        "prevn-title": "پچھلے $1 {{PLURAL:$1|نتیجہ|نتائج}}",
-       "nextn-title": "آگے $1 {{PLURAL:$1|نتیجہ|نتائج}}",
-       "shown-title": "فی صفحہ $1 {{PLURAL:$1|نتیجہ|نتائج}} دِکھاؤ",
-       "viewprevnext": "دیکھیں($1 {{int:pipe-separator}} $2) ($3)۔",
-       "searchmenu-exists": "'''اِس ویکی پر \"[[:$1]]\" نامی ایک صفحہ موجود ہے'''",
+       "nextn-title": "{{PLURAL:$1|اگلا|اگلے}} $1 {{PLURAL:$1|نتیجہ|نتائج}}",
+       "shown-title": "فی صفحہ $1 {{PLURAL:$1|نتیجہ|نتائج}} دکھائیں",
+       "viewprevnext": "($1 {{int:pipe-separator}} $2) دیکھیں ($3)",
+       "searchmenu-exists": "<strong>اِس ویکی پر «[[:$1]]» نامی ایک صفحہ موجود ہے۔</strong> {{PLURAL:$2|0=|تلاش کے دیگر نتائج بھی ملاحظہ فرمائیں۔}}",
        "searchmenu-new": "<strong>صفحہ \"[[:$1]]\" کو اس ویکی پر تخلیق کریں</strong> {{PLURAL:$2|0=|وہ صفحہ بھی دیکھے جو ٓپ کے تلاش میں پایا گیا|ان نتائج کو بھی دیکھے جو پائے گئے}}",
-       "searchprofile-articles": "مشمولاتی صفحات",
-       "searchprofile-images": "کثیرالوسیط",
+       "searchprofile-articles": "مواد کے حامل صفحات",
+       "searchprofile-images": "ملٹی میڈیا",
        "searchprofile-everything": "سب کچھ",
        "searchprofile-advanced": "پیشرفتہ",
-       "searchprofile-articles-tooltip": "$1 میں تلاش",
-       "searchprofile-images-tooltip": "تلاش برائے ملفات",
-       "searchprofile-everything-tooltip": " تلاش تمام مشمولات (بشمول تبادلۂ خیال صفحات) میں",
-       "searchprofile-advanced-tooltip": "اپÙ\86Û\8c Ù¾Ø³Ù\86د Ú©Û\92 Ø¬Ø§Ø¦Û\92 Ù\86اÙ\85 Ù\85Û\8cÚº ØªÙ\84اش",
+       "searchprofile-articles-tooltip": "$1 میں تلاش کریں",
+       "searchprofile-images-tooltip": "فائلیں تلاش کریں",
+       "searchprofile-everything-tooltip": "تمام مندرجات (بشمول تبادلۂ خیال صفحات) میں تلاش کریں",
+       "searchprofile-advanced-tooltip": "حسب Ù\85رضÛ\8c Ù\86اÙ\85 Ù\81ضا Ù\85Û\8cÚº ØªÙ\84اش Ú©Ø±Û\8cÚº",
        "search-result-size": "$1 ({{PLURAL:$2|1 لفظ|$2 الفاظ}})",
-       "search-result-category-size": "{{PLURAL:$1|1 رُکن|$1 اراکین}} ({{PLURAL:$2|1 ذیلی زمرہ|$2 ذیلی زمرہ جات}}, {{PLURAL:$3|1 ملف|$3 ملفات}})",
+       "search-result-category-size": "{{PLURAL:$1|1 رُکن|$1 اراکین}} ({{PLURAL:$2|1 ذیلی زمرہ|$2 ذیلی زمرہ جات}}، {{PLURAL:$3|1 فائل|$3 فائلیں}})",
        "search-redirect": "(رجوع مکرر $1)",
-       "search-section": "(حصہ $1)",
+       "search-section": "(قطعہ $1)",
        "search-category": "(زمرہ $1)",
+       "search-file-match": "فائل مواد سے ملتا ہے",
        "search-suggest": "کیا آپ کا مطلب تھا: $1",
+       "search-rewritten": "$1 کے نتائج کی نمائش، اس کی بجائے آپ $2 کو تلاش کر سکتے ہیں۔",
        "search-interwiki-caption": "ساتھی منصوبے",
        "search-interwiki-default": "$1 نتائج:",
        "search-interwiki-more": "(مزید)",
        "search-relatedarticle": "متعلقہ",
        "searchrelated": "متعلقہ",
        "searchall": "تمام",
-       "search-nonefound": "استفسار کے مطابق نتائج نہیں ملے.",
+       "showingresults": "ذیل میں #<strong>$2</strong> سے {{PLURAL:$1|<strong>1</strong> تک نتیجہ دکھایا گیا ہے|<strong>$1</strong> تک نتائج دکھائے گئے ہیں}}۔",
+       "showingresultsinrange": "ذیل میں #<strong>$2</strong> سے #<strong>$3</strong> تک {{PLURAL:$1|<strong>1</strong> نتیجہ|<strong>$1</strong> نتائج}} ایک قطار میں درج {{PLURAL:$1|ہے|ہیں}}۔",
+       "search-showingresults": "{{PLURAL:$4|<strong>$3</strong> میں سے <strong>$1</strong> نتیجہ|<strong>$3</strong> میں سے <strong>$1 تا $2</strong> نتائج}}",
+       "search-nonefound": "استفسار کے مطابق کوئی نتیجہ برآمد نہیں ہوا۔",
+       "search-nonefound-thiswiki": "اس سائٹ پر استفسار کے مطابق کوئی نتیجہ برآمد نہیں ہوا۔",
        "powersearch-legend": "پیشرفتہ تلاش",
        "powersearch-ns": "جائے نام میں تلاش:",
        "powersearch-togglelabel": "جانچ",
        "powersearch-toggleall": "تمام",
        "powersearch-togglenone": "کوئی نہیں",
+       "powersearch-remember": "اس انتخاب کو مستقبل کی تلاشوں کے لیے یاد رکھیں",
        "search-external": "بیرونی تلاش",
        "searchdisabled": "{{SITENAME}} تلاش غیرفعال.\nآپ فی الحال گوگل کے ذریعے تلاش کرسکتے ہیں.\nیاد رکھئے کہ اُن کے {{SITENAME}} اشاریے ممکناً پرانے ہوسکتے ہیں.",
+       "search-error": "تلاش کے دوران میں کوئی نقص واقع ہوا: $1",
        "preferences": "ترجیحات",
        "mypreferences": "ترجیحات",
        "prefs-edits": "تعداد ترامیم:",
+       "prefsnologintext2": "اپنی ترجیحات میں تبدیلی کے لیے براہ کرم لاگ ان کریں",
        "prefs-skin": "جِلد",
        "skin-preview": "پیش منظر",
        "datedefault": "کوئی ترجیح نہیں",
+       "prefs-labs": "تجرباتی خصوصیتیں",
        "prefs-user-pages": "صارف صفحات",
        "prefs-personal": "پروفائل",
        "prefs-rc": "حالیہ تبدیلیاں",
        "prefs-watchlist": "زیرِنظر فہرست",
        "prefs-editwatchlist": "زیر نظر فہرست میں ترمیم کریں",
        "prefs-editwatchlist-label": "اپنی زیر نظر فہرست کے مندرجات میں ترمیم کریں:",
+       "prefs-editwatchlist-edit": "اپنی زیر نظر فہرست میں عناویں دیکھیں اور حذف کریں",
        "prefs-editwatchlist-raw": "زیر نظر خام فہرست میں ترمیم کریں",
        "prefs-editwatchlist-clear": "اپنی زیر نظر فہرست صاف کریں",
        "prefs-watchlist-days": "زیر نظر فہرست میں نظر آنے والے ایام:",
-       "prefs-watchlist-days-max": "زیادہ سے زیادہ $1 دن",
+       "prefs-watchlist-days-max": "زیادہ سے زیادہ $1 {{PLURAL:$1|دن}}",
        "prefs-watchlist-edits": "توسیع شدہ زیر نظر فہرست میں نظر آنے والی تبدیلیوں کی زیادہ سے زیادہ تعداد:",
        "prefs-watchlist-edits-max": "زیادہ سے زیادہ تعداد: 1000",
        "prefs-watchlist-token": "زیر نظر فہرست کی کلید:",
        "prefs-misc": "دیگر",
        "prefs-resetpass": "پاس ورڈ تبدیل کریں",
-       "prefs-changeemail": "برقی ڈاک پتہ (e-mail address) تبدیل کریں",
+       "prefs-changeemail": "برقی ڈاک پتا تبدیل یا حذف کریں",
        "prefs-setemail": "برقی پتہ دیں",
        "prefs-email": "برقی خط کے اختیارات",
        "prefs-rendering": "ظاہریت",
        "stub-threshold-sample-link": "نمونہ",
        "stub-threshold-disabled": "غیر فعال",
        "recentchangesdays": "حالیہ تبدیلیوں میں دکھائے جانے والے ایّام:",
-       "recentchangesdays-max": "زیادہ سے زیادہ $1 دن",
+       "recentchangesdays-max": "زیادہ سے زیادہ $1 {{PLURAL:$1|دن}}",
        "recentchangescount": "دکھائی جانے والی ترامیم کی تعداد:",
        "prefs-help-recentchangescount": "اِس میں حالیہ تبدیلیاں، تاریخچے اور نوشتہ جات شامل ہیں۔",
        "prefs-help-watchlist-token2": "یہ آپ کی زیر نظر فہرست کے ویب فیڈ کی خفیہ کلید ہے۔\nاسے خفیہ رکھیں، تاکہ کوئی دوسرا شخص آپ کی زیر نظر فہرست نہ دیکھ سکے۔\nاگر آپ کو کلید تبدیل کرنی ہو تو [[Special:ResetTokens|یہاں کلک کریں]]۔",
        "savedprefs": "آپ کی ترجیحات محفوظ ہوگئیں۔",
+       "savedrights": "{{GENDER:$1|$1}} کے اختیارات محفوظ ہو گئے۔",
        "timezonelegend": "منطقۂ وقت:",
        "localtime": "مقامی وقت:",
        "timezoneuseserverdefault": "ویکی کا طے شدہ استعمال کریں ($1)",
        "prefs-custom-css": "شخصی سی ایس ایس",
        "prefs-custom-js": "شخصی جاوا اسکرپٹ",
        "prefs-common-css-js": "جملہ پوشاکوں کے لیے مشترکہ سی ایس ایس/جاوا اسکرپٹ:",
+       "prefs-reset-intro": "آپ اس صفحہ کے ذریعہ اپنی موجودہ ترجیحات کو سائٹ کی ابتدائی ترتیبات کے مطابق ڈھال سکتے ہیں۔\nلیکن اسے واپس نہیں پھیرا جا سکتا۔",
        "prefs-emailconfirm-label": "برقی خط کی تصدیق:",
        "youremail": "برقی خط:",
        "username": "صارف:",
        "yourrealname": "* اصلی نام",
        "yourlanguage": "زبان:",
        "yourvariant": "متغیّر:",
+       "prefs-help-variant": "اس ویکی کے صفحات دکھانے کے لیے آپ کا پسندیدہ لہجہ یا املا۔",
        "yournick": "شخصی دستخط:",
        "prefs-help-signature": "تبادلۂ خیال صفحات پر تبصرہ تحریر کرنے کے بعد یہ \"<nowiki>~~~~</nowiki>\" علامتیں درج کرنی چاہئیں، یہ علامتیں از خود آپ کے دستخط اور وقت میں تبدیل ہو جائیں گی۔",
        "badsig": "ناقص خام دستخط.\nHTML tags جانچئے.",
        "gender-female": "عورت",
        "prefs-help-gender": "اس ترجیح کی ترتیب اختیاری ہے۔\nآپ اور دیگر صارفین کے لیے از روئے قواعد مناسب جنسی الفاظ کے انتخاب کے لیے سافٹ ویئر اس قدر کو استعمال کرتا ہے۔\nیہ معلومات عام ہوگی۔",
        "email": "برقی خط",
-       "prefs-help-realname": "Ø­Ù\82Û\8cÙ\82Û\8c Ù\86اÙ\85 Ø§Ø®ØªÛ\8cارÛ\8c Û\81Û\92Û\94\nاگر Ø¢Ù¾ Ø§Ø³Û\92 Ù\85Û\81Û\8cÙ\91ا Ú©Ø±ØªÛ\92 Û\81Û\8cÚºØ\8c ØªÙ\88 Ø§Ø³Û\92 Ø¢Ù¾ Ú©Û\92 Ú©Ø§Ù\85 Ú©Û\8cÙ\84ئÛ\92 Ø¢Ù¾ Ú©Ù\88 Ø§Ù\86تساب Ø¯Û\8cÙ\86Û\92 Ú©Û\8cÙ\84ئے استعمال کیا جائے گا۔",
+       "prefs-help-realname": "Ø­Ù\82Û\8cÙ\82Û\8c Ù\86اÙ\85 Ø§Ø®ØªÛ\8cارÛ\8c Û\81Û\92Û\94\nاگر Ø¢Ù¾ Ø¯Ø±Ø¬ Ú©Ø±Û\8cÚº ØªÙ\88 Ø§Ø³Û\92 Ø¢Ù¾ Ú©Û\92 Ú©Ø§Ù\85Ù\88Úº Ú©Ù\88 Ø¢Ù¾ Ø³Û\92 Ù\85Ù\86سÙ\88ب Ú©Ø±Ù\86Û\92 Ú©Û\92 Ù\84Û\8cے استعمال کیا جائے گا۔",
        "prefs-help-email": "برقی ڈاک پتے کا اندراج اختیاری ہے، عموماً اس کی ضرورت اس وقت پڑتی ہے جب آپ اپنا پاس ورڈ بھول چکے ہوں اور نیا پاس ورڈ رکھنا چاہتے ہوں۔",
        "prefs-help-email-others": "یہ ممکن ہے کہ آپ دیگر صارفین کو اس بات کی اجازت دیں کہ وہ آپ کے صارف یا تبادلۂ خیال صفحہ پر موجود ربط کے ذریعہ آپ کو برقی خط بھیج سکیں۔\nجب صارفین اس طرح آپ سے رابطہ کریں گے تو انہیں آپ کا برقی ڈاک پتہ نظر نہیں آئے گا۔",
-       "prefs-help-email-required": "برقی ڈاک پتہ چاہئے.",
+       "prefs-help-email-required": "برقی ڈاک پتا درکار ہے۔",
        "prefs-info": "بنیادی معلومات",
        "prefs-i18n": "بین الاقوامیت",
        "prefs-signature": "دستخط",
        "prefs-displaywatchlist": "نمائش کے اختیارات",
        "prefs-tokenwatchlist": "ٹوکن",
        "prefs-diffs": "فرق",
+       "prefs-help-prefershttps": "یہ ترجیح آپ کے اگلے لاگ ان پر اثر انداز ہوگی۔",
+       "prefswarning-warning": "ترجیحات میں آپ کی جانب سے کی جانے والی تبدیلیاں ابھی محفوظ نہیں ہوئی ہیں۔\nاگر آپ «$1» پر کلک کیے بغیر اس صفحہ کو چھوڑ دیں تو آپ کی تبدیلیاں محفوظ نہیں ہوگی۔",
+       "prefs-tabs-navigation-hint": "نکتہ: مختلف خانوں میں جانے کے لیے آپ دائیں اور بائیں کی جہت نما کلیدیں استعمال کر سکتے ہیں۔",
        "userrights": "حقوقِ صارف کی نظامت",
        "userrights-lookup-user": "گروہائے صارف کا انتظام",
        "userrights-user-editname": "کوئی اسم‌صارف داخل کیجئے:",
-       "editusergroup": "ترمیم گروہائے صارف",
-       "editinguser": "تبدیلی اختیارات صارف برائے {{GENDER:$1|صارف}} <strong>[[صارف:$1|$1]]</strong> $2",
+       "editusergroup": "{{GENDER:$1|صارف}} کے گروہوں میں ترمیم کریں",
+       "editinguser": "{{GENDER:$1|صارف}} <strong>[[User:$1|$1]]</strong> $2 کے اختیارات میں تبدیلی",
        "userrights-editusergroup": "ترمیم گروہائے صارف",
-       "saveusergroups": "گروہائے صارف محفوظ",
+       "saveusergroups": "{{GENDER:$1|صارف}} کے گروہوں کو محفوظ کریں",
        "userrights-groupsmember": "رکنِ:",
        "userrights-groupsmember-auto": "اعتباری صارف در",
        "userrights-groups-help": "آپ ان گروہان میں تبدیلی کرسکتے ہیں جن سے صارف متعلق ہے: \n* نشان زد خانہ کا مطلب یہ ہے کہ صارف کا تعلق اس گروہ سے ہے۔ \n* غیر نشان زد خانہ کا مطلب یہ ہے کہ صارف کا تعلق اس گروہ سے نہیں ہے۔ \n* یہ * علامت اس بات کا اشارہ ہے کہ آپ اس گروہ کو نہیں ہٹا سکتے جسے ایک مرتبہ آپ نے شامل کردیا ہو، یا اس کے بر عکس۔",
        "userrights-reason": "وجہ:",
        "userrights-no-interwiki": "دوسرے ویکیوں پر حقوقِ صارف میں ترمیم کی آپ کو اجازت نہیں ہے.",
+       "userrights-nodatabase": "ڈیٹابیس $1 موجود نہیں یا مقامی نہیں۔",
+       "userrights-nologin": "اختیارات تفویض کرنے کے لیے آپ کا کسی منتظم کھاتے سے [[Special:UserLogin|داخل ہونا]] ضروری ہے۔",
+       "userrights-notallowed": "آپ کو  اختیارات تفویض کرنے یا انہیں واپس لینے کی اجازت نہیں ہے۔",
        "userrights-changeable-col": "مجموعات جو آپ تبدیل کرسکتے ہیں",
        "userrights-unchangeable-col": "مجموعات جو آپ تبدیل نہیں کرسکتے",
+       "userrights-conflict": "اختیارات کی تبدیلی میں تنازعہ! براہ کرم نظر ثانی کریں اور اپنی تبدیلیوں کی تصدیق کریں۔",
+       "userrights-removed-self": "آپ نے اپنے اختیارات ختم کر لیے ہیں، چنانچہ اب یہ صفحہ آپ کی دسترس سے باہر ہو گیا ہے۔",
        "group": "گروہ:",
        "group-user": "صارفین",
        "group-autoconfirmed": "خود توثیق شدہ صارفین",
        "grouppage-bot": "{{ns:project}}:روبہ جات",
        "grouppage-sysop": "{{ns:project}}:منتظمین",
        "grouppage-bureaucrat": "{{ns:project}}:مامورین اداری",
-       "right-upload": "ملفات زبراثقال (اپ لوڈ) کریں",
-       "right-writeapi": "اے پی آئی لکھائی کا استعمال",
+       "grouppage-suppress": "{{ns:project}}:پوشیدگی",
+       "right-read": "مطالعہ صفحات",
+       "right-edit": "ترمیم صفحات",
+       "right-createpage": "تخلیق صفحات (تبادلہ خیال صفحات نہیں)",
+       "right-createtalk": "تخلیق تبادلہ خیال صفحات",
+       "right-createaccount": "کھاتہ سازی",
+       "right-autocreateaccount": "بیرونی صارف کھاتے کے ذریعہ خودکار لاگ ان",
+       "right-minoredit": "ترامیم کی بطور معمولی ترمیم نشان زدگی",
+       "right-move": "منتقلی صفحات",
+       "right-move-subpages": "منتقلی صفحات مع ذیلی صفحات",
+       "right-move-rootuserpages": "منتقلی صارف صفحات",
+       "right-move-categorypages": "منتقلی زمرہ صفحات",
+       "right-movefile": "منتقلی فائل",
+       "right-suppressredirect": "پرانے عنوان سے رجوع مکرر کے بغیر منتقلی صفحہ",
+       "right-upload": "فائلوں کو اپلوڈ کرنا",
+       "right-reupload": "موجود فائلوں کا دوبارہ اپلوڈ",
+       "right-reupload-own": "ذاتی اپلوڈ کردہ فائلوں کا دوبارہ اپلوڈ",
+       "right-reupload-shared": "مقامی طور پر مشترکہ میڈیا کے ذخیرے میں فائلوں کی منسوخی",
+       "right-upload_by_url": "بذریعہ یوآرایل فائل اپلوڈ",
+       "right-purge": "بدون تصدیق صفحہ کے کیشے کی صفائی",
+       "right-autoconfirmed": "آئی پی پر مبنی پابندیوں سے غیر متاثر",
+       "right-bot": "خودکار عمل کے طور پر تعامل",
+       "right-nominornewtalk": "تبادلۂ خیال صفحات میں معمولی ترامیم کرنے پر نئے پیغام کے اعلان کی عدم نمائش",
+       "right-apihighlimits": "API کا بڑے پیمانے پر استعمال",
+       "right-writeapi": "اے پی آئی تحریر کا استعمال",
        "right-delete": "صفحات حذف کریں",
+       "right-bigdelete": "بڑے تاریخچوں پر مشتمل صفحات کی حذف شدگی",
+       "right-deletelogentry": "نوشتہ کے مخصوص اندراجات کی حذف شدگی و بحالی",
+       "right-deleterevision": "صفحات کے مخصوص نسخوں کی حذف شدگی و بحالی",
+       "right-deletedhistory": "ملحقہ متن کے بغیر تاریخچہ کے حذف شدہ اندراجات کا معائنہ",
+       "right-deletedtext": "حذف شدہ متن اور حذف شدہ نسخوں کے درمیان میں تبدیلیوں کا معائنہ",
+       "right-browsearchive": "حذف شدہ صفحات میں تلاش",
+       "right-undelete": "بحالی صفحہ",
+       "right-suppressrevision": "صفحات کے مخصوص نسخوں کا معائنہ و پوشیدگی",
+       "right-viewsuppressed": "پوشیدہ نسخوں کا معائنہ",
+       "right-suppressionlog": "نجی نوشتوں کا معائنہ",
+       "right-block": "صارفین کی ترمیم کاری پر پابندی کا نفاذ",
+       "right-blockemail": "برقی خط بھیجنے پر پابندی کا نفاذ",
+       "right-hideuser": "عمومی نگاہ سے مخفی رکھتے ہوئے صارف نام پر پابندی کا نفاذ",
+       "right-ipblock-exempt": "آئی پی، خودکار اور رینج پر پابندیوں سے خلاصی",
+       "right-unblockself": "رفع پابندی",
+       "right-protect": "آبشاری حفاظت کے حامل صفحات میں ترمیم اور درجات حفاظت میں تبدیلی",
+       "right-editprotected": "\"{{int:protect-level-sysop}}\" کے طور پر محفوظ صفحات میں ترمیم",
+       "right-editsemiprotected": "\"{{int:protect-level-autoconfirmed}}\" کے طور پر محفوظ صفحات میں ترمیم",
+       "right-editcontentmodel": "صفحہ کے مواد کے ماڈل میں ترمیم",
+       "right-editinterface": "صارف انٹرفیس میں ترمیم",
+       "right-editusercssjs": "دیگر صارفین کی سی ایس ایس اور جاوا اسکرپٹ فائلوں میں ترمیم",
+       "right-editusercss": "دیگر صارفین کی سی ایس ایس فائلوں میں ترمیم",
+       "right-edituserjs": "دیگر صارفین کی جاوا اسکرپٹ فائلوں میں ترمیم",
+       "right-editmyusercss": "اپنی ذاتی سی ایس ایس فائلوں میں ترمیم",
+       "right-editmyuserjs": "اپنی ذاتی جاوا اسکرپٹ فائلوں میں ترمیم",
+       "right-viewmywatchlist": "اپنی ذاتی زیرنظر فہرست کا معائنہ",
+       "right-editmywatchlist": "اپنی ذاتی زیرنظر فہرست میں ترمیم۔ خیال رکھیں کہ اس اختیار کے بغیر بھی بعض اقدامات کے ذریعہ صفحات شامل کیے جا سکتے ہیں۔",
+       "right-viewmyprivateinfo": "اپنی ذاتی نجی معلومات کا معائنہ (مثلاً برقی ڈاک پتہ، حقیقی نام وغیرہ)",
+       "right-editmyprivateinfo": "اپنی ذاتی نجی معلومات میں ترمیم (مثلاً برقی ڈاک پتہ، حقیقی نام وغیرہ)",
+       "right-editmyoptions": "اپنی ذاتی ترجیحات میں ترمیم",
+       "right-rollback": "کسی مخصوص صفحہ پر ترمیم کرنے والے آخری صارف کی ترامیم کا فوری استرجع",
+       "right-markbotedits": "استرجع شدہ ترامیم کی روبہ ترامیم کے طور پر نشان زدگی",
+       "right-noratelimit": "وقت کی پابندیوں سے آزادی",
+       "right-import": "دوسری ویکیوں سے صفحات کی درآمد",
+       "right-importupload": "بذریعہ اپلوڈ صفحات کی درآمد",
+       "right-patrol": "دیگر صارفین کی ترامیم کی مراجعت",
+       "right-autopatrol": "ذاتی ترامیم کی خودکار مراجعت",
+       "right-patrolmarks": "حالیہ تبدیلیوں میں علامات مراجعت کا معائنہ",
+       "right-unwatchedpages": "نادیدہ صفحات کی فہرست کا معائنہ",
+       "right-mergehistory": "صفحات کے تاریخچے کا انضمام",
+       "right-userrights": "تمام اختیارات میں ترمیم",
+       "right-userrights-interwiki": "دوسری ویکیوں پر صارف کے اختیارات میں ترمیم",
+       "right-siteadmin": "ڈیٹابیس کو مقفل یا غیر مقفل کرنا",
+       "right-override-export-depth": "پانچویں سطح کی گہرائی تک مربوط صفحات پر مشتمل صفحات کی برآمد",
        "right-sendemail": "دیگر صارفین کو برقی ڈاک بھیجیں",
+       "right-passwordreset": "پاس ورڈ کی ترتیب نو کے حامل برقی خطوط کا معائنہ",
+       "right-managechangetags": "[[Special:Tags|ٹیگوں]] کی تخلیق اور (غیر)فعالی",
+       "right-applychangetags": "کسی کی تبدیلیوں کے ساتھ [[Special:Tags|ٹیگوں]] کا اطلاق",
+       "right-changetags": "انفرادی نسخوں اور نوشتہ کے اندراج پر [[Special:Tags|ٹیگوں]] کا حذف و اضافہ",
+       "right-deletechangetags": "ڈیٹابیس سے [[Special:Tags|ٹیگوں]] کی حذف شدگی",
+       "grant-generic": "\"$1\" مجموعہ اختیارات",
+       "grant-group-page-interaction": "صفحات سے تعامل",
+       "grant-group-file-interaction": "میڈیا سے تعامل",
+       "grant-group-watchlist-interaction": "اپنی زیرنظر فہرست سے تعامل",
+       "grant-group-email": "برقی خط کی ترسیل",
+       "grant-group-high-volume": "بڑے پیمانے کی سرگرمی کی انجام دہی",
+       "grant-group-customization": "شخصی سازی اور ترجیحات",
+       "grant-group-administration": "انتظامی امور کی انجام دہی",
+       "grant-group-private-information": "اپنے متعلق نجی معلومات تک رسائی",
+       "grant-group-other": "متفرق سرگرمیاں",
+       "grant-blockusers": "پابندی و رفع پابندی",
+       "grant-createaccount": "کھاتہ سازی",
+       "grant-createeditmovepage": "تخلیق، ترمیم و منتقلی صفحات",
+       "grant-delete": "صفحات، اندراجات نوشتہ اور نسخوں کی حذف شدگی",
+       "grant-editinterface": "صارف کی سی ایس ایس/جاوا اسکرپٹ اور میڈیاویکی نام فضا میں ترمیم",
+       "grant-editmycssjs": "اپنی سی ایس ایس/جاوا اسکرپٹ میں ترمیم",
+       "grant-editmyoptions": "اپنی ترجیحات میں ترمیم",
+       "grant-editmywatchlist": "اپنی زیرنظر فہرست میں ترمیم",
+       "grant-editpage": "موجودہ صفحات میں ترمیم",
+       "grant-editprotected": "محفوظ صفحات میں ترمیم",
+       "grant-highvolume": "اعلی حجم کی تدوین",
+       "grant-oversight": "صارفین چھپائیے اور نظرثانی دبائیے",
+       "grant-patrol": "صفحات کی مراجعتی تبدیلیاں",
+       "grant-privateinfo": "ذاتی معلومات تک رسائی",
+       "grant-protect": "صفحات کو محفوظ اور غیر محفوظ کریں",
+       "grant-rollback": "صفحات کی تبدیلیوں کا استرجع",
+       "grant-sendemail": "دیگر صارفین کو برقی خط کی ترسیل",
+       "grant-uploadeditmovefile": "فائلوں کی تبدیلی، اپلوڈ اور منتقلی",
+       "grant-uploadfile": "نئی فائلوں کی اپلوڈ کاری",
+       "grant-basic": "بنیادی اختیارات",
+       "grant-viewdeleted": "حذف شدہ فائلوں اور صفحات کا معائنہ",
+       "grant-viewmywatchlist": "اپنی زیرنظر فہرست کا معائنہ",
        "newuserlogpage": "نوشتۂ آمد صارف",
        "newuserlogpagetext": "یہ نۓ صارفوں کی آمد کا نوشتہ ہے",
        "rightslog": "نوشتہ صارفی اختیارات",
        "rightslogtext": "یہ صارفی اختیارات میں تبدیلیوں کا نوشتہ ہے۔",
+       "action-read": "اس صفحہ کو پڑھنے",
        "action-edit": "اس صفحہ میں ترمیم کریں",
+       "action-createpage": "اس صفحہ کو تخلیق کرنے",
+       "action-createtalk": "اس تبادلۂ خیال صفحہ کو تخلیق کرنے",
+       "action-createaccount": "اس کھاتے کو بنانے",
+       "action-autocreateaccount": "اس بیرونی کھاتے کو خودکار طور پر بنانے",
+       "action-history": "اس صفحہ کا تاریخچہ دیکھنے",
+       "action-minoredit": "اس ترمیم کو معمولی نشان زد کرنے",
+       "action-move": "اس صفحہ کو منتقل کرنے",
+       "action-move-subpages": "اس صفحہ اور اس کے ذیلی صفحات کو منتقل کرنے",
+       "action-move-rootuserpages": "اصل صارف صفحات کو منتقل کرنے",
+       "action-move-categorypages": "زمرے کے صفحات کو منتقل کرنے",
+       "action-movefile": "اس فائل کو منتقل کرنے",
+       "action-upload": "اس فائل کو اپلوڈ کرنے",
+       "action-reupload": "اس موجودہ فائل کو دوبارہ اپلوڈ کرنے",
+       "action-reupload-shared": "مشترکہ ذخیرے میں فائل کو منسوخ کرنے",
+       "action-upload_by_url": "بذریعہ یوآرایل اس فائل کو اپلوڈ کرنے",
+       "action-writeapi": "اے پی آئی تحریر کے استعمال کرنے",
+       "action-delete": "یہ صفحہ حذف کرنے",
+       "action-deleterevision": "یہ نسخہ حذف کرنے",
+       "action-deletedhistory": "اس صفحہ کا حذف شدہ تاریخچہ دیکھنے",
+       "action-browsearchive": "حذف شدہ صفحات میں تلاش کرنے",
+       "action-undelete": "اس صفحہ کو بحال کرنے",
+       "action-suppressrevision": "اس پوشیدہ ترمیم کی نظرثانی اور بحال کرنے",
+       "action-suppressionlog": "نجی نوشتہ کے دیکھنے",
+       "action-block": "اس صارف پر پابندی لگانے",
+       "action-protect": "اس صفحہ کے درجات حفاظت میں تبدیلی کرنے",
+       "action-rollback": "آخری صارف جس نے ایک متعین صفحہ میں ترمیم کی ہے، اس کی ترامیم کا فوری استرجع کرنے",
+       "action-import": "دوسری ویکی سے صفحات درآمد کرنے",
+       "action-importupload": "بذریعہ اپلوڈ صفحات درآمد کرنے",
+       "action-patrol": "دیگر صارفین کی ترامیم کو بطور مراجعت شدہ نشان زد کرنے",
+       "action-autopatrol": "اپنی ترمیم کو بطور مراجعت شدہ نشان زد کرنے",
+       "action-unwatchedpages": "نادیدہ صفحات کی فہرست دیکھنے",
+       "action-mergehistory": "اس صفحہ کے تاریخچہ کو ضم کرنے",
+       "action-userrights": "تمام اختیارات میں تبدیلی کرنے",
+       "action-userrights-interwiki": "دوسری ویکیوں پر صارف کے اختیارات میں ترمیم کرنے",
+       "action-siteadmin": "ڈیٹابیس کو مقفل کرنے یا کھولنے",
+       "action-sendemail": "برقی خطوط روانہ کرنے",
+       "action-editmywatchlist": "اپنی زیرنظر فہرست میں ترمیم کرنے",
+       "action-viewmywatchlist": "اپنی زیر نظر فہرست دیکھنے",
+       "action-viewmyprivateinfo": "اپنی نجی معلومات دیکھنے",
+       "action-editmyprivateinfo": "اپنی نجی معلومات میں ترمیم کرنے",
+       "action-editcontentmodel": "صفحہ کے مواد کے ماڈل میں ترمیم کرنے",
+       "action-managechangetags": "ٹیگوں کو بنانے اور انہیں غیر فعال کرنے",
+       "action-applychangetags": "اپنی تبدیلیوں پر ٹیگ گاری کرنے",
+       "action-changetags": "انفرادی نسخوں اور نوشتہ کے اندراج پر ٹیگوں کو لگانے اور ہٹانے",
+       "action-deletechangetags": "ڈیٹابیس سے ٹیگوں کو حذف کرنے",
+       "action-purge": "اس صفحہ کا کیشے خالی کرنے",
        "nchanges": "$1 {{PLURAL:$1|تبدیلی|تبدیلیاں}}",
+       "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|آخری آمد کے بعد سے}}",
        "enhancedrc-history": "تاریخچہ",
        "recentchanges": "حالیہ تبدیلیاں",
        "recentchanges-legend": "اِختیاراتِ حالیہ تبدیلیاں",
-       "recentchanges-summary": "اس صفحے پر ویکی میں ہونے والی تازہ تریں تبدیلیوں کا مشاہدہ کیجیۓ۔",
-       "recentchanges-feed-description": "اس خورد میں ویکی پر ہونے والی تازہ تریں تبدیلیوں کا مشاہدہ کیجیۓ۔",
+       "recentchanges-summary": "اس صفحے پر ویکی میں ہونے والی تازہ تریں تبدیلیوں کا مشاہدہ کریں۔",
+       "recentchanges-noresult": "مقررہ مدت کے دوران میں اس معیار سے مشابہت رکھنے والی کوئی تبدیلی نہیں ہوئی۔",
+       "recentchanges-feed-description": "اس فیڈ میں ویکی پر ہونے والی تازہ تریں تبدیلیوں کا مشاہدہ کریں۔",
        "recentchanges-label-newpage": "یہ ترمیم ایک نئے صفحے کی تخلیق ہے",
        "recentchanges-label-minor": "یہ ایک معمولی ترمیم ہے",
        "recentchanges-label-bot": "اس ترمیم کو ایک روبہ نے انجام دیا ہے",
        "recentchanges-label-unpatrolled": "اس ترمیم کی اب تک مراجعت نہیں کی گئی",
-       "recentchanges-label-plusminus": "صÙ\81Ø­Û\81 Ú©Ø§ Ø­Ø¬Ù\85 ØªØ¨Ø¯Û\8cÙ\84 Ø´Ø¯Û\81 Ø¨Ù\84حاظ Ø¨Ø§Ø¦Ù¹ Ù\85Ù\82دار",
-       "recentchanges-legend-heading": "<strong>اختیارات</strong>",
+       "recentchanges-label-plusminus": "صÙ\81Ø­Û\81 Ú©Ø§ ØªØ¨Ø¯Û\8cÙ\84 Ø´Ø¯Û\81 Ø­Ø¬Ù\85 Ø¨Ù\84حاظ ØªØ¹Ø¯Ø§Ø¯ Ø¨Ø§Ø¦Ù¹",
+       "recentchanges-legend-heading": "<strong>اختصارات:</strong>",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (نیز [[Special:NewPages|جدید صفحات کی فہرست]]) ملاحظہ فرمائیں",
        "recentchanges-submit": "دکھائیں",
        "rcnotefrom": "ذیل میں <strong>$2</strong> سے کی گئی {{PLURAL:$5|تبدیلی|تبدیلیاں}} <strong>$1</strong> تک دکھائی جا رہی ہیں۔",
        "rcshowhideminor": "معمولی ترامیم $1",
        "rcshowhideminor-show": "دکھائیں",
        "rcshowhideminor-hide": "چھپائیں",
-       "rcshowhidebots": "خودکار صارف $1",
+       "rcshowhidebots": "خودکار صارفین $1",
        "rcshowhidebots-show": "دکھائیں",
        "rcshowhidebots-hide": "چھپائیں",
-       "rcshowhideliu": "داخل شدہ صارف $1",
-       "rcshowhideliu-show": "دکھاؤ",
+       "rcshowhideliu": "مندرج صارفین $1",
+       "rcshowhideliu-show": "دکھائÛ\8cÚº",
        "rcshowhideliu-hide": "چھپائیں",
        "rcshowhideanons": "گمنام صارف $1",
-       "rcshowhideanons-show": "دکھاؤ",
+       "rcshowhideanons-show": "دکھائÛ\8cÚº",
        "rcshowhideanons-hide": "چھپائیں",
        "rcshowhidepatr": "$1 مراجعت شدہ ترامیم",
        "rcshowhidepatr-show": "دکھاؤ",
        "rcshowhidepatr-hide": "چھپائيں",
        "rcshowhidemine": "ذاتی ترامیم $1",
-       "rcshowhidemine-show": "دکھاؤ",
+       "rcshowhidemine-show": "دکھائÛ\8cÚº",
        "rcshowhidemine-hide": "چھپائیں",
        "rcshowhidecategorization": "صفحاتی زمرہ بندی $1",
        "rcshowhidecategorization-show": "دکھائیں",
        "diff": "فرق",
        "hist": "تاریخچہ",
        "hide": "چھـپائیں",
-       "show": "دکھاؤ",
+       "show": "دکھائÛ\8cÚº",
        "minoreditletter": "م",
        "newpageletter": "نیا ..",
        "boteditletter": " خودکار",
+       "number_of_watching_users_pageview": "[$1 مشاہد {{PLURAL:$1|صارف|صارفین}}]",
+       "rc_categories": "ان زمروں تک محدود رکھیں («|» سے علاحدہ کریں):",
        "rc_categories_any": "کوئی بھی منتخب",
-       "rc-change-size-new": "$1 {{PLURAL:$1|بائٹ|بائٹ}} تبدیلی کے بعد",
+       "rc-change-size-new": "تبدیلی کے بعد $1 {{PLURAL:$1|بائٹ}}",
+       "newsectionsummary": "/* $1 */ نیا قطعہ",
        "rc-enhanced-expand": "تفصیلات دکھائیں",
        "rc-enhanced-hide": "تفصیلات چھپائیے",
+       "rc-old-title": "اصلاً «$1» کے عنوان سے تخلیق شدہ",
        "recentchangeslinked": "متعلقہ تبدیلیاں",
        "recentchangeslinked-feed": "متعلقہ تبدیلیاں",
        "recentchangeslinked-toolbox": "متعلقہ تبدیلیاں",
        "recentchangeslinked-title": "\"$1\" سے متعلقہ تبدیلیاں",
-       "recentchangeslinked-summary": "یہ ان تبدیلیوں کی فہرست ہے جو حال ہی میں کسی مخصوص صفحہ سے مربوط صفحات (یا مخصوص زمرہ کے اراکین) میں کی گئی ہیں\n\n[[Special:Watchlist|آپ کی زیر نظر فہرست]] میں یہ صفحات متجل (bold) نظر آئیں گےـ",
-       "recentchangeslinked-page": "صفحۂ منصوبہ دیکھئے",
+       "recentchangeslinked-summary": "یہ ان تبدیلیوں کی فہرست ہے جو حال ہی میں کسی مخصوص صفحہ سے مربوط صفحات (یا مخصوص زمرہ کے اراکین) میں کی گئی ہیں۔\n\n[[Special:Watchlist|آپ کی زیر نظر فہرست]] میں یہ صفحات <strong>جلی</strong نظر آئیں گےـ",
+       "recentchangeslinked-page": "صفحہ کا نام:",
+       "recentchangeslinked-to": "اس کی بجائے درج کردہ صفحہ سے مربوط صفحات کی تبدیلیاں دکھائیں",
        "recentchanges-page-added-to-category": "[[:$1]] کو زمرہ میں شامل کیا گیا",
-       "recentchanges-page-added-to-category-bundled": "[[:$1]] اور {{PLURAL:$2|ایک صفحہ|$2 صفحات}} زمرہ میں شامل {{PLURAL:$2|کیا گیا|$2 کیے گئے}}",
+       "recentchanges-page-added-to-category-bundled": "[[:$1]] کو زمرہ میں شامل کر دیا گیا، [[Special:WhatLinksHere/$1|یہ صفحہ دیگر صفحات میں بھی موجود ہے]]",
        "recentchanges-page-removed-from-category": "[[:$1]] کو زمرہ سے ہٹایا",
+       "recentchanges-page-removed-from-category-bundled": "[[:$1]] زمرے سے ہٹا دیا گیا ہے، [[Special:WhatLinksHere/$1|یہ صفحہ دیگر صفحات میں بھی موجود ہے]]",
        "autochange-username": "میڈیاویکی خودکار تبدیلیاں",
-       "upload": "فائل اثقال/اپلوڈ فائل",
-       "uploadbtn": "زبراثقال ملف (اپ لوڈ فائل)",
-       "reuploaddesc": "زبراثقال ورقہ (فارم) کیجانب واپس۔",
+       "upload": "فائل اپلوڈ کریں",
+       "uploadbtn": "فائل اپلوڈ کریں",
+       "reuploaddesc": "اپلوڈ منسوخ کرکے اپلوڈ فارم کی جانب واپس جائیں",
+       "upload-tryagain": "فائل کی تبدیل شدہ وضاحت روانہ کریں",
        "uploadnologin": "آپ داخل شدہ حالت میں نہیں",
        "uploadnologintext": "فائلیں اپلوڈ کرنے کے لیے براہ کرم $1 ہوں",
-       "uploadtext": "\n'''اطلاع''': اگر آپ اپنی فائل اپلوڈ کرتے وقت خلاصہ کے خانے میں درج ذیل دو باتوں کی وضاحت نہیں کریں گے تو اس فائل کو حذف کیا جاسکتا ہے:\n# فائل کا '''مـاخـذ''' ، یعنی:\n#*اگر یہ آپ نے خود تخلیق کی ہے تو اسے بیان کریں۔\n#*اگر یہ آن لائن دستیاب ہے تو اس سائٹ کا  '''ربط''' درج کریں۔\n#*اگر آپ نے اسے کسی دوسری زبان کے {{SITENAME}} سے لیا ہے تو اسکا نام تحریر کریں۔\n#صاحب حق طبع و نشر اور فائل کے اجازت نامہ کے بارے میں:\n#* فائل کے اجازت نامہ کے متعلق یہ درج کریں کہ اس کی موجودہ حیثیت کیا ہے۔\n#*اگر آپ خود اسکا حق طبع و نشر رکھتے ہیں تو آپ پر لازم ہے کہ آپ اسے [[دائرۂ عام]] (پبلک ڈومین) میں بھی شائع کریں۔\n\nجب کوئی صارف مستقل ایسی فائل اپلوڈ کرتا رہے جس کے اجازت نامہ کے بارے میں غلط بیانی کی گئی ہو یا وہ مستقل ایسی تصاویر اپلوڈ کرے جن کے بارے میں کوئی وضاحت موجود نہ ہو تو ایسی صورت میں اس صارف پر پابندی لگائے جانے کا قوی امکان موجود ہے۔\n\nفائل اپلوڈ کرنے کے لیے ذیل میں موجود فارم استعمال کریں، اگر آپ جملہ اپلوڈ کردہ تصاویر کو دیکھنا یا تلاش کرنا چاہتے ہیں تو [[Special:FileList|اس فہرست]] کو ملاحظہ فرمائیں۔ <br /> تمام اپلوڈ کردہ و حذف شدہ تصاویر کو [[Special:Log/upload|نوشتۂ منتقلی]] میں درج کر لیا جاتا ہے۔\n\nتصویر کی منتقلی کے بعد، اسکو کسی صفحہ پر رکھنے کیلیے مندرجہ ذیل طریقہ سے استعمال کریں۔\n\n'''<nowiki>[[تصویر:فائل کا نام|متبادل متن]]</nowiki>'''\n\n* مندرجہ بالا رموز آپ انگریزی میں بھی درج کرسکتے ہیں، یعنی\n<nowiki>[[Image:File name|Alt.text]]</nowiki>\n* فائل کا ربط درج کرنے کے لیے۔ '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:File.ogg]]</nowiki></code>'''\n* ملف کا نام؛ حرف ابجد کے لیے حساس ہے لہذا اگر اپلوڈ کرتے وقت فائل کا نام -- name:JPG  ہے اور آپ name:jpg یــا Name:jpg کا ربط درج کرتے ہیں تو ربط کام نہیں کرے گا۔",
-       "uploadlogpage": "نوشتۂ زبراثقال (اپ لوڈ لاگ)",
-       "uploadlogpagetext": "درج ذیل میں حالیہ زبراثقال (اپ لوڈ) کی گئی املاف (فائلوں) کی فہرست دی گئی ہے۔",
+       "upload_directory_missing": "اپلوڈ فولڈر ($1) موجود نہیں اور ویب سرور کے ذریعہ اسے تخلیق نہیں کیا جا سکا۔",
+       "upload_directory_read_only": "اپلوڈ فولڈر ($1) میں ویب سرور لکھ نہیں پا رہا ہے۔",
+       "uploaderror": "اپلوڈ کے دوران میں نقص",
+       "upload-recreate-warning": "<strong>انتباہ: اس نام کی فائل حذف یا منتقل کر دی گئی ہے۔</strong>\n\nآسانی کے لیے ذیل میں اس صفحہ کا نوشتہ منتقلی و حذف شدگی درج ہے:",
+       "uploadtext": "فائلیں اپلوڈ کرنے کے لیے درج ذیل فارم پُر کریں۔\n\n'''اطلاع''': اگر آپ اپنی فائل اپلوڈ کرتے وقت خلاصہ کے خانے میں درج ذیل دو باتوں کی وضاحت نہیں کریں گے تو اس فائل کو حذف کیا جاسکتا ہے:\n# فائل کا '''مـاخـذ''' ، یعنی:\n#*اگر یہ آپ نے خود تخلیق کی ہے تو اسے بیان کریں۔\n#*اگر یہ آن لائن دستیاب ہے تو اس سائٹ کا  '''ربط''' درج کریں۔\n#*اگر آپ نے اسے کسی دوسری زبان کے {{SITENAME}} سے لیا ہے تو اس کا نام تحریر کریں۔\n#صاحب حق طبع و نشر اور فائل کے اجازت نامہ کے بارے میں:\n#* فائل کے اجازت نامہ کے متعلق یہ درج کریں کہ اس کی موجودہ حیثیت کیا ہے۔\n#*اگر آپ خود اسکا حق طبع و نشر رکھتے ہیں تو آپ پر لازم ہے کہ آپ اسے [[دائرۂ عام]] (پبلک ڈومین) میں بھی شائع کریں۔\n\nجب کوئی صارف مستقل ایسی فائل اپلوڈ کرتا رہے جس کے اجازت نامہ کے بارے میں غلط بیانی کی گئی ہو یا وہ مستقل ایسی تصاویر اپلوڈ کرے جن کے بارے میں کوئی وضاحت موجود نہ ہو تو ایسی صورت میں اس صارف پر پابندی لگائے جانے کا قوی امکان موجود ہے۔\n\nفائل اپلوڈ کرنے کے لیے ذیل میں موجود فارم استعمال کریں، اگر آپ جملہ اپلوڈ کردہ تصاویر کو دیکھنا یا تلاش کرنا چاہتے ہیں تو [[Special:FileList|اس فہرست]] کو ملاحظہ فرمائیں۔ <br /> تمام اپلوڈ کردہ و حذف شدہ تصاویر کو [[Special:Log/upload|نوشتۂ منتقلی]] اور [[Special:Log/delete|نوشتہ حذف شدگی]] میں درج کر لیا جاتا ہے۔\n\nتصویر کی منتقلی کے بعد، اس کو کسی صفحہ پر رکھنے کیلیے مندرجہ ذیل طریقہ سے استعمال کریں۔\n\n'''<nowiki>[[تصویر:فائل کا نام|متبادل متن]]</nowiki>'''\n\n* فائل کا ربط درج کرنے کے لیے۔ '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:File.ogg]]</nowiki></code>'''\n* فائل کا نام چھوٹے بڑے حروف کے معاملہ میں حساس ہے لہذا اگر اپلوڈ کرتے وقت فائل کا نام -- name:JPG  ہے اور آپ name:jpg یــا Name:jpg کا ربط درج کرتے ہیں تو ربط کام نہیں کرے گا۔",
+       "upload-permitted": "فائلوں کی اجازت یافتہ {{PLURAL:$2|قسم|قسمیں}}: $1",
+       "upload-preferred": "ترجیحی فائلوں کی {{PLURAL:$2|قسم|قسمیں}}: $1",
+       "upload-prohibited": "ممنوع فائلوں کی {{PLURAL:$2|قسم|قسمیں}}: $1",
+       "uploadlogpage": "نوشتہ اپلوڈ",
+       "uploadlogpagetext": "ذیل میں حالیہ اپلوڈ کردہ فائلوں کی فہرست موجود ہے۔\nمزید بصری جائزے کے لیے [[Special:NewFiles|نئی فائلوں کا نگارخانہ]] ملاحظہ فرمائیں۔",
+       "filename": "فائل کا نام",
        "filedesc": "خلاصہ",
        "fileuploadsummary": "خلاصہ :",
+       "filereuploadsummary": "فائل کی تبدیلیاں:",
+       "filestatus": "کاپی رائٹ کی صورت حال:",
        "filesource": "ذرائع",
-       "ignorewarning": "انتباہ نظرانداز کرتے ہوۓ بہرصورت ملف (فائل) کو محفوظ کرلیا جاۓ۔",
-       "ignorewarnings": "ہر انتباہ نظرانداز کردیا جاۓ۔",
-       "badfilename": "ملف (فائل) کا نام \"$1\" ، تبدیل کردیا گیا۔",
+       "ignorewarning": "انتباہ نظر انداز کرتے ہوئے فائل کو بہرصورت محفوظ کر لیا جائے",
+       "ignorewarnings": "تمام انتباہات کو نظر انداز کریں",
+       "minlength1": "فائل کے ناموں میں کم از کم ایک حرف ہونا ضروری ہے۔",
+       "illegalfilename": "اس فائل کے نام \"$1\" میں ایسے حروف موجود ہیں جو صفحہ کے عنوانات میں ممنوع ہیں۔\nبراہ کرم فائل کا نام تبدیل کرکے دوبارہ اپلوڈ کرنے کی کوشش کریں۔",
+       "filename-toolong": "فائل کے نام 240 بائٹ سے زیادہ طویل نہ ہوں۔",
+       "badfilename": "فائل کا نام «$1» کر دیا گیا ہے۔",
+       "filetype-mime-mismatch": "فائل کی توسیع «$1.‎» فائل کی MIME قسم ($2) کے مطابق نہیں۔",
+       "filetype-badmime": "MIME قسم \"$1\" کی فائلوں کو اپلوڈ کرنے کی اجازت نہیں ہے۔",
+       "filetype-bad-ie-mime": "اس فائل کو اپلوڈ نہیں کیا جا سکتا کیونکہ انٹرنیٹ ایکسپلورر اسے «$1» سمجھے گا جس کی اجازت نہیں اور اس نوع کی فائل کے خطرناک ہونے کا احتمال ہے۔",
+       "filetype-unwanted-type": "<strong>\".$1\"</strong> ناپسندیدہ نوعیت کی فائل ہے۔\nراجح نوعیت کی {{PLURAL:$3|فائل|فائلیں}} $2 {{PLURAL:$3|ہے|ہیں}}۔",
+       "filetype-banned-type": "<strong>\".$1\"</strong> نوعیت کی {{PLURAL:$4|فائل|فائلوں}} کی اجازت نہیں۔\nاجازت یافتہ نوعیت کی {{PLURAL:$3|فائل|فائلیں}} $2 {{PLURAL:$3|ہے|ہیں}}۔",
+       "filetype-missing": "اس فائل کی کوئی توسیع نہیں ہے (مثلاً  \".jpg\")۔",
+       "empty-file": "آپ کی ارسال کردہ فائل خالی تھی۔",
+       "file-too-large": "آپ کی ارسال کردہ فائل بہت بڑی تھی",
+       "filename-tooshort": "فائل کا نام انتہائی مختصر ہے۔",
+       "filetype-banned": "فائل کی اس قسم پر پابندی عائد ہے۔",
+       "verification-error": "یہ فائل، فائل کی تصدیق میں کامیاب نہیں ہو سکی۔",
+       "hookaborted": "آپ نے جو تبدیلی کرنے کی کوشش کی اسے کسی توسیع نے منسوخ کر دیا۔",
+       "illegal-filename": "اس نام کی فائل ممنوع ہے۔",
+       "overwrite": "موجودہ فائل کو دوبارہ اپلوڈ کرنے کی اجازت نہیں۔",
+       "unknown-error": "نامعلوم نقص واقع ہوا۔",
+       "tmp-create-error": "عارضی فائل نہیں بن سکی۔",
+       "tmp-write-error": "عارضی فائل کی تحریر کے دوران میں نقص۔",
+       "large-file": "اس بات کی سفارش کی جاتی ہے کہ فائلوں کا حجم $1 سے زیادہ نہ ہو؛\nاس فائل کا حجم $2 ہے۔",
+       "largefileserver": "یہ فائل سرور پر تعین کردہ تشکیل سے بڑی ہے۔",
+       "emptyfile": "لگتا ہے آپ کی اپلوڈ کردہ فائل خالی ہے۔\nایسا ٹائپنگ میں کوئی غلطی کی وجہ سے ہو سکتا ہے۔\nبرائے مہربانی جانچ کر لیں کہ آیا آپ واقعی اس فائل کو اپلوڈ کرنا چاہتے ہیں۔",
+       "windows-nonascii-filename": "یہ ویکی خاص حروف کے ساتھ فائل کا نام تسلیم نہیں کرتا۔",
        "fileexists": "اس نام سے ایک فائل پہلے سے موجود ہے، اگر آپ کو یقین نہ ہو کہ اسے حذف کردیا جانا چاہیے تو براہ کرم  <strong>[[:$1]]</strong> کو ایک نظر دیکھ لیجیے۔ [[$1|thumb]]",
-       "uploadwarning": "انتباہ بہ سلسلۂ زبراثقال",
+       "filepageexists": "اس فائل کا صفحۂ وضاحت پہلے ہی <strong>[[:$1]]</strong> پر بنا دیا گیا ہے، تاہم فی الحال اس نام سے کوئی فائل موجود نہیں۔\nجو خلاصہ آپ درج کر رہے ہیں یہ صفحۂ وضاحت میں نظر نہیں آئے گا۔\nاگر آپ اپنے خلاصے کو صفحہ وضاحت میں دیکھنا چاہیں تو وہاں دستی طور پر شامل کریں۔\n[[$1|thumb]]",
+       "fileexists-extension": "اسی نام سے ایک فائل موجود ہے: [[$2|thumb]]\n* اپلوڈ کی جانے والی فائل کا نام: <strong>[[:$1]]</strong>\n* پہلے سے موجود فائل کا نام: <strong>[[:$2]]</strong>\nبراہ کرم فائل کا منفرد نام رکھیں۔",
+       "fileexists-thumbnail-yes": "ایسا معلوم ہوتا ہے کہ یہ فائل کم حجم <em>(تھمب نیل)</em> کی تصویر ہے۔\n[[$1|thumb]]\nبراہ کرم فائل <strong>[[:$1]]</strong> کو جانچ لیں۔\nاگر وہ اپنے اصل حجم کے ساتھ یہی فائل ہے تو کسی اضافی تھمب نیل کے اپلوڈ کرنے کی ضرورت نہیں۔",
+       "file-thumbnail-no": "اس فائل کا نام <strong>$1</strong> سے شروع ہوتا ہے۔\nایسا معلوم ہوتا ہے کہ یہ فائل کم حجم <em>(تھمب نیل)</em> کی تصویر ہے۔\nاگر آپ کے پاس یہ تصویر مکمل ریزولیوشن میں موجود ہو تو اسے اپلوڈ کریں، ورنہ اس فائل کا نام تبدیل کر دیں۔",
+       "fileexists-forbidden": "اس نام سے پہلے ہی ایک فائل موجود ہے اور اب اسے برتحریر نہیں کیا جا سکتا۔\nاگر آپ بہرصورت اپنی فائل کو اپلوڈ کرنا چاہتے ہیں تو براہ کرم واپس جائیں اور فائل کا نام تبدیل کریں۔\n[[File:$1|thumb|center|$1]]",
+       "fileexists-shared-forbidden": "فائلوں کے مشترکہ ذخیرے میں اس نام سے پہلے ہی ایک فائل موجود ہے۔\nاگر آپ بہرصورت اپنی فائل کو اپلوڈ کرنا چاہتے ہیں تو براہ کرم واپس جائیں اور فائل کا نام تبدیل کریں۔\n[[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "اپلوڈ کردہ فائل <strong>[[:$1]]</strong> کے موجودہ نسخے کی واضح نقل ہے۔",
+       "fileexists-duplicate-version": "اپلوڈ کردہ فائل <strong>[[:$1]]</strong> کے {{PLURAL:$2|پرانے نسخے|پرانے نسخوں}} کی واضح نقل ہے۔",
+       "file-exists-duplicate": "پیش نظر فائل درج ذیل {{PLURAL:$1|فائل|فائلوں}} کی نقل ہے:",
+       "file-deleted-duplicate": "اس فائل ([[:$1]]) سے ملتی جلتی دوسری فائل کو پہلے حذف کیا جا چکا ہے۔\nچنانچہ اسے دوبارہ اپلوڈ کرنے سے قبل اُس پرانی فائل کے حذف کا تاریخچہ جانچ لیں۔",
+       "file-deleted-duplicate-notitle": "اس فائل سے ملتی جلتی دوسری فائل کو پہلے حذف کیا اور اس عنوان کو ممنوع قرار دیا جا چکا ہے۔\nاسے دوبارہ اپلوڈ کرنے سے قبل کسی ایسے شخص سے اس صورت حال کا جائزہ لینے کی درخواست کریں جسے ممنوع فائلوں کی معلومات تک رسائی حاصل ہو۔",
+       "uploadwarning": "اپلوڈ انتباہ",
+       "uploadwarning-text": "ذیل میں موجود فائل کی وضاحت میں تبدیلی کریں اور دوبارہ کوشش کریں۔",
        "savefile": "فائل محفوظ کریں",
-       "sourcefilename": "اسم ملف (فائل) کا منبع:",
-       "destfilename": "تعین شدہ اسم ملف:",
-       "watchthisupload": "یہ صفحہ زیر نظر کریں",
+       "uploaddisabled": "اپلوڈ غیر فعال ہے۔",
+       "copyuploaddisabled": "بذریعہ یوآرایل اپلوڈ غیر فعال ہے۔",
+       "uploaddisabledtext": "فائل اپلوڈ غیر فعال ہے۔",
+       "php-uploaddisabledtext": "پی ایچ پی کی فائلیں اپلوڈ نہیں کی جا سکتیں۔\nبراہ کرم  file_uploads کی ترتیبات جانچ لیں۔",
+       "uploadscripted": "اس فائل میں ایچ ٹی ایم ایل یا اسکرپٹ کوڈ کا استعمال کیا گیا ہے لہذا عین ممکن ہے کہ کوئی ویب براؤزر اس کی غلط تشریح کرے۔",
+       "upload-scripted-pi-callback": "ایسی کسی فائل کو اپلوڈ نہیں کیا جا سکتا جس میں ایکس ایم ایل اسٹائل شیٹ پر عمل کرنے کی ہدایت ہو۔",
+       "uploaded-hostile-svg": "اپلوڈ کردہ ایس وی جی فائل کے اسٹائل عنصر میں غیر محفوظ سی ایس ایس دریافت ہوئی ہے۔",
+       "uploadscriptednamespace": "اس ایس وی جی فائل میں غیر قانونی نام فضا \"$1\" موجود ہے۔",
+       "uploadinvalidxml": "اپلوڈ کردہ فائل میں موجود ایکس ایم ایل کا تجزیہ نہیں کیا جا سکا۔",
+       "uploadvirus": "اس فائل میں وائرس موجود ہے!\nتفصیلات: $1",
+       "upload-source": "اصل فائل",
+       "sourcefilename": "اصل فائل کا نام:",
+       "sourceurl": "اصل یوآرایل",
+       "destfilename": "ہدف فائل کا نام:",
+       "upload-maxfilesize": "فائل کا زیادہ سے زیادہ حجم: $1",
+       "upload-description": "فائل کی وضاحت",
+       "upload-options": "اپلوڈ کے اختیارات",
+       "watchthisupload": "اس فائل کو زیر نظر کریں",
+       "upload-proto-error": "غلط پروٹوکول",
+       "upload-file-error": "داخلی نقص",
+       "upload-misc-error": "اپلوڈ کے دوران میں نامعلوم نقص",
+       "upload-too-many-redirects": "اس یوآرایل میں بہت سارے رجوع مکررات ہیں",
+       "upload-http-error": "ایچ ٹی ٹی پی نقص واقع ہوا: $1",
+       "upload-copy-upload-invalid-domain": "اس ڈومین سے کاپی اپلوڈ دستیاب نہیں ہیں۔",
        "upload-dialog-disabled": "اس ویکی پر اس ڈائیلاگ سے فائل اپ لوڈز غیر فعال ہیںَ",
+       "upload-dialog-title": "فائل اپلوڈ کریں",
        "upload-dialog-button-cancel": "منسوخ",
+       "upload-dialog-button-back": "پیچھے جائیں",
        "upload-dialog-button-done": "مکمل",
        "upload-dialog-button-save": "محفوظ",
        "upload-dialog-button-upload": "اپلوڈ",
        "upload-form-label-infoform-name": "نام",
        "upload-form-label-infoform-description": "تفصیل",
        "upload-form-label-usage-title": "استعمال",
-       "upload-form-label-usage-filename": "Ù\85Ù\84Ù\81 نام",
+       "upload-form-label-usage-filename": "Ù\81ائÙ\84 Ú©Ø§ نام",
        "upload-form-label-own-work": "یہ میرا ذاتی کام ہے",
        "upload-form-label-infoform-categories": "زمرہ جات",
        "upload-form-label-infoform-date": "تاریخ",
-       "license": "اجازہ:",
+       "upload-form-label-own-work-message-generic-local": "میں اس بات کی تصدیق کرتا ہوں کہ {{SITENAME}} میں موجود اجازت ناموں کی حکمت عملیوں اور استعمال کے جملہ شرائط کی پیروی کرتے ہوئے اس فائل کو اپلوڈ کر رہا ہوں۔",
+       "upload-form-label-not-own-work-message-generic-local": "اگر آپ {{SITENAME}} کی حکمت عملیوں کے تحت اس فائل کو اپلوڈ نہیں کر سکتے تو براہ کرم اسے بند کرکے دوسرا طریقہ استعمال کرنے کی کوشش کریں۔",
+       "upload-form-label-not-own-work-local-generic-local": "نیز آپ [[Special:Upload|ڈیفالٹ اپلوڈ صفحہ]] بھی استعمال کر سکتے ہیں۔",
+       "upload-form-label-own-work-message-generic-foreign": "میں یہ سمجھتا ہوں کہ اس فائل کو ایک مشترکہ ذخیرے میں اپلوڈ کیا جا رہا ہے اور اس امر کی تصدیق کرتا ہوں کہ اس کام کی انجام دہی کے دوران میں یہاں موجود استعمال کے جملہ شرائط اور اجازت ناموں کی تمام حکمت عملیوں کی پیروی کر رہا ہوں۔",
+       "upload-form-label-not-own-work-message-generic-foreign": "اگر آپ مشترکہ ذخیرے کی حکمت عملیوں کے تحت اس فائل کو اپلوڈ نہیں کر سکتے تو براہ کرم اسے بند کرکے دوسرا طریقہ استعمال کرنے کی کوشش کریں۔",
+       "upload-form-label-not-own-work-local-generic-foreign": "اگر اس فائل کو {{SITENAME}} کی مقررہ پالیسیوں کے تحت اپلوڈ کرنا ممکن ہو تو آپ [[Special:Upload|{{SITENAME}} کا اپلوڈ صفحہ]] استعمال کر سکتے ہیں۔",
+       "backend-fail-stream": "فائل $1 کی نمائش ممکن نہیں۔",
+       "backend-fail-backup": "فائل $1 کا احتیاطی نسخہ بنانا ممکن نہیں۔",
+       "backend-fail-notexists": "فائل $1 موجود نہیں ہے۔",
+       "backend-fail-hashes": "موازنہ کے لیے فائل کے ہیش کو حاصل نہیں کیا جا سکا۔",
+       "backend-fail-notsame": "$1 میں ایک غیر یکساں فائل پہلے سے موجود ہے۔",
+       "backend-fail-invalidpath": "$1 ذخیرہ اندوزی کا درست راستہ نہیں ہے۔",
+       "backend-fail-delete": "فائل $1 کو حذف نہیں کیا جا سکا۔",
+       "backend-fail-describe": "فائل $1 کا میٹاڈیٹا تبدیل نہیں کیا جا سکا۔",
+       "backend-fail-alreadyexists": "فائل \"$1\" پہلے سے موجود ہے۔",
+       "backend-fail-store": "فائل $1 کو $2 میں محفوظ نہیں کیا جا سکا۔",
+       "backend-fail-copy": "فائل $1 کو $2 میں نقل نہیں کیا جا سکا۔",
+       "backend-fail-move": "فائل $1 کو $2 میں منتقل نہیں کیا جا سکا۔",
+       "backend-fail-opentemp": "عارضی فائل کھل نہیں سکی۔",
+       "backend-fail-writetemp": "عارضی فائل میں لکھا نہیں جا سکا۔",
+       "backend-fail-closetemp": "عارضی فائل بند نہیں ہو سکی۔",
+       "backend-fail-read": "فائل \"$1\" کو پڑھا نہ جا سکا۔",
+       "backend-fail-create": "فائل \"$1\" کو لکھا نہ جا سکا۔",
+       "backend-fail-maxsize": "فائل $1 کی معلومات نہیں لکھی جا سکی کیونکہ اس کا حجم {{PLURAL:$2|ایک بائٹ|$2 بائٹ}} سے زیادہ ہے۔",
+       "backend-fail-readonly": "فی الحال ذخیرہ کا پس منظر $1 فقط خواندگی حالت میں ہے۔ اس کی وجہ حسب ذیل ہے:\n\n\n<em>«$2»</em>",
+       "backend-fail-synced": "اس وقت فائل $1 داخلی ذخیرہ کے پس منظر کے اندر ناپائیدار حالت میں ہے۔",
+       "lockmanager-notlocked": "«$1» کو کھولا نہیں جا سکا؛ کیونکہ یہ مقفل نہیں ہے۔",
+       "lockmanager-fail-closelock": "«$1» کا فائل لاک بند نہیں کیا جا سکا۔",
+       "lockmanager-fail-deletelock": "«$1» کا فائل لاک حذف نہیں کیا جا سکا۔",
+       "lockmanager-fail-acquirelock": "«$1» کا قفل حاصل نہیں کیا جا سکا۔",
+       "lockmanager-fail-openlock": "«$1» کا فائل لاک کھولا نہیں جا سکا۔",
+       "lockmanager-fail-releaselock": "«$1» کا قفل کھولا نہ جا سکا۔",
+       "lockmanager-fail-db-release": "$1 ڈیٹابیس سے قفل نہیں ہٹائے جا سکے۔",
+       "lockmanager-fail-svr-acquire": "$1 سرور کے قفل حاصل نہیں کیے جا سکے۔",
+       "lockmanager-fail-svr-release": "$1 سرور کے قفل ہٹائے نہیں جا سکے۔",
+       "zip-file-open-error": "مواد کی جانچ کے لیے زپ فائل کھولنے کے دوران میں کوئی نقص واقع ہوا۔",
+       "zip-wrong-format": "یہ زپ فائل نہیں تھی۔",
+       "uploadstash": "پوشیدہ اپلوڈ کریں",
+       "uploadstash-summary": "اس صفحہ کے ذریعہ ان فائلوں تک رسائی حاصل ہوگی جو اپلوڈ ہو چکی ہیں یا ہو رہی ہیں لیکن اب تک ویکی پر شائع نہیں ہوئیں۔ یہ فائلیں محض اپلوڈ کنندہ صارفین ہی کو نظر آتی ہیں۔",
+       "uploadstash-clear": "پوشیدہ فائلوں کو صاف کریں",
+       "uploadstash-nofiles": "آپ کے پاس پوشیدہ فائلیں نہیں ہیں۔",
+       "uploadstash-badtoken": "اس کارروائی کی انجام دہی ناکام رہی، شاید آپ کے ترمیمی وثیقوں کی مدت ختم ہو چکی ہے۔ براہ کرم دوبارہ کوشش کریں۔",
+       "uploadstash-errclear": "فائل کی صفائی ناکام۔",
+       "uploadstash-refresh": "فائلوں کی فہرست کو تازہ کریں",
+       "uploadstash-thumbnail": "تھمب نیل دیکھیں",
+       "uploadstash-exception": "اپلوڈ کردہ کو نہاں خانہ ($1) میں رکھا نہ جا سکا: ''$2''۔",
+       "invalid-chunk-offset": "آفسیٹ کا قطعہ نادرست ہے",
+       "img-auth-accessdenied": "رسائی معطل",
+       "img-auth-nopathinfo": "PATH_INFO مفقود ہے۔\nآپ کے سرور کو اس معلومات کی ترسیل کے لیے مرتب نہیں کیا گیا ہے۔\nممکن ہے یہ سی جی آئی پر مبنی ہو اور img_auth کو قبول نہ کرتا ہو۔\nبراہ کرم https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization کو ملاحظہ کریں۔",
+       "img-auth-notindir": "اپلوڈ کے لیے ترتیب شدہ ڈائرکٹری میں درخواست کردہ راستہ موجود نہیں ہے۔",
+       "img-auth-badtitle": "«$1» سے کسی درست عنوان کی تشکیل نہیں کی جا سکتی۔",
+       "img-auth-nologinnWL": "آپ داخل نہیں ہیں اور فہرست سفید میں «$1» نہیں ہے۔",
+       "img-auth-nofile": "فائل «$1» موجود نہیں ہے۔",
+       "img-auth-isdir": "آپ «$1» ڈائرکٹری کو کھولنے کی کوشش کر رہے ہیں۔\nمحض فائل تک رسائی کی اجازت ہے۔",
+       "img-auth-streaming": "«$1» کی نمائش جاری ہے۔",
+       "img-auth-public": "img_auth.php کا فنکشن کسی نجی ویکی سے فائلیں اخذ کرنے کا کام کرتا ہے۔\nلیکن اس ویکی کو عوامی ویکی کے طور پر ترتیب دیا گیا ہے۔\nلہذا اضافی تحفظ کی خاطر img_auth.php کو غیر فعال رکھا گیا ہے۔",
+       "img-auth-noread": "صارف کو «$1» کے پڑھنے کی اجازت نہیں۔",
+       "http-invalid-url": "نادرست یوآرایل: $1",
+       "http-invalid-scheme": "«$1» سے شروع ہونے والے یوآرایل معاونت یافتہ نہیں ہیں۔",
+       "http-request-error": "ایچ ٹی ٹی پی کی درخواست کسی نامعلوم نقص کی بنا پر ناکام ہوگئی۔",
+       "http-read-error": "HTTP خواندگی میں نقص۔",
+       "http-timed-out": "HTTP درخواست کی مہلت ختم ہو گئی۔",
+       "http-curl-error": "یوآرایل $1 کو اخذ کرنے کے دوران میں نقص",
+       "http-bad-status": "HTTP درخواست کے دوران میں ایک مشکل پیش آگئی: $1 $2",
+       "upload-curl-error6": "یوآرایل تک پہنچنا ممکن نہیں",
+       "upload-curl-error6-text": "فراہم کردہ یوآرایل قابل رسائی نہیں ہے۔\nبراہ کرم اس یوآرایل کو دوبارہ جانچ لیں کہ آیا وہ درست ہے اور متعلقہ سائٹ فعال ہے یا نہیں۔",
+       "upload-curl-error28": "اپلوڈ کی مہلت ختم",
+       "upload-curl-error28-text": "یہ سائٹ جواب دینے میں بہت زیادہ وقت لے رہی ہے۔\nبراہ کرم اس سائٹ کو جانچ لیں کہ آیا وہ فعال ہے یا نہیں، اور کچھ دیر انتظار کرنے کے بعد دوبارہ کوشش کریں۔\nشاید آپ اسے کم مصروف وقت میں آزمانا چاہیں۔",
+       "license": "اجازت نامہ:",
        "license-header": "اجازہ کاری",
+       "nolicense": "غیر منتخب",
+       "licenses-edit": "اجازت نامہ کے اختیارات میں ترمیم کریں",
+       "license-nopreview": "(نمائش دستیاب نہیں)",
+       "upload_source_url": "(آپ نے ایک درست اور عوامی طور پر قابل رسائی یوآرایل سے اس فائل کا انتخاب کیا ہے)",
+       "upload_source_file": "(آپ نے اپنے کمپیوٹر سے اس فائل کو منتخب کیا ہے)",
        "listfiles-delete": "حذف",
-       "imgfile": "ملف",
-       "listfiles": "فہرست فائل",
+       "listfiles-summary": "اس خصوصی صفحہ میں تمام اپلوڈ کردہ فائلیں نظر آئیں گی۔",
+       "listfiles_search_for": "میڈیا کے نام کو تلاش کریں:",
+       "listfiles-userdoesnotexist": "«$1» کے نام سے کھاتہ موجود نہیں۔",
+       "imgfile": "فائل",
+       "listfiles": "فائلوں کی فہرست",
+       "listfiles_thumb": "تھمب نیل",
        "listfiles_date": "تاریخ",
        "listfiles_name": "نام",
        "listfiles_user": "صارف",
        "listfiles_size": "حجم",
-       "listfiles_description": "تفصیل",
-       "listfiles_count": "ورژن",
+       "listfiles_description": "وضاحت",
+       "listfiles_count": "نسخے",
+       "listfiles-show-all": "تصویروں کے پرانے نسخے شامل کریں",
        "listfiles-latestversion": "موجودہ ورژن",
        "listfiles-latestversion-yes": "ہاں",
        "listfiles-latestversion-no": "نہیں",
-       "file-anchor-link": "Ù\85Ù\84Ù\81",
-       "filehist": "Ù\85Ù\84Ù\81 Ú©Û\8c ØªØ§Ø±Û\8cØ®",
-       "filehist-help": "یہ دیکھنے کیلئے کہ کسی خاص وقت پر ملف کس طرح ظاہر ہوتا تھا اُس تاریخ یا وقت پر طق کیجئے۔",
+       "file-anchor-link": "Ù\81ائÙ\84",
+       "filehist": "Ù\81ائÙ\84 Ú©Ø§ ØªØ§Ø±Û\8cØ®Ú\86Û\81",
+       "filehist-help": "کسی خاص وقت یا تاریخ میں یہ فائل کیسی نظر آتی تھی، اسے دیکھنے کے لیے اس وقت/تاریخ پر کلک کریں۔",
        "filehist-deleteall": "سب حذف",
        "filehist-deleteone": "حذف",
        "filehist-revert": "رجوع",
        "filehist-current": "حالیہ",
        "filehist-datetime": "تاریخ/وقت",
-       "filehist-thumb": "اظفورہ",
-       "filehist-thumbtext": "$1 کا تھمب نیل (thumbnail) ورژن",
+       "filehist-thumb": "تھمب نیل",
+       "filehist-thumbtext": "مورخہ $1 کا تھمب نیل",
+       "filehist-nothumb": "تھمب نیل نہیں ہے",
        "filehist-user": "صارف",
        "filehist-dimensions": "ابعاد",
        "filehist-filesize": "تصویر کا حجم",
        "filehist-comment": "تبصرہ",
-       "imagelinks": "ملف کا استعمال",
-       "linkstoimage": "اِس ملف کے ساتھ درج ذیل {{PLURAL:$1|صفحہ مربوط ہے|$1 صفحات مربوط ہیں}}",
-       "nolinkstoimage": "ایسے کوئی صفحات نہیں جو اس ملف (فائل) سے رابطہ رکھتے ہوں۔",
-       "sharedupload-desc-here": "یہ ملف $1 سے ہے اور دوسرے منصوبوں میں استعمال ہوسکتا ہے۔\nاِس کے [$2 ملفاتی صفحۂ وضاحت] سے تفصیل درج ذیل ہے۔",
-       "upload-disallowed-here": "آپ اوپر چھڑا کر اس ملف کو نہیں لکھ سکتے۔",
+       "imagelinks": "فائل کا استعمال",
+       "linkstoimage": "اِس فائل سے درج ذیل {{PLURAL:$1|صفحہ مربوط ہے|$1 صفحات مربوط ہیں}}:",
+       "linkstoimage-more": "اس فائل سے  $1 سے زیادہ {{PLURAL:$1|صفحے|صفحات}} مربوط ہیں۔\nذیل میں محض اس فائل سے {{PLURAL:$1|اولین مربوط صفحہ|اولین $1 مربوط صفحات}} کی فہرست درج ہے۔\nتاہم [[Special:WhatLinksHere/$2|مکمل فہرست]] بھی دیکھی جا سکتی ہے۔",
+       "nolinkstoimage": "اس فائل سے مربوط کوئی صفحہ موجود نہیں ہے۔",
+       "morelinkstoimage": "اس فائل کے [[Special:WhatLinksHere/$1|مزید روابط]] ملاحظہ فرمائیں۔",
+       "linkstoimage-redirect": "$1 (فائل رجوع مکرر) $2",
+       "duplicatesoffile": "ذیل میں موجود {{PLURAL:$1|فائل|فائلیں}} اس فائل کی نقل {{PLURAL:$1|ہے|ہیں}}\n([[Special:FileDuplicateSearch/$2|مزید تفصیلات]]):",
+       "sharedupload": "یہ فائل $1 میں موجود ہے، نیز ممکن ہے دیگر منصوبوں میں بھی مستعمل ہو۔",
+       "sharedupload-desc-there": "یہ فائل $1 میں موجود ہے، نیز ممکن ہے دیگر منصوبوں میں بھی مستعمل ہو۔\nمزید معلومات کے لیے براہ کرم [$2 فائل کا صفحۂ وضاحت] ملاحظہ فرمائیں۔",
+       "sharedupload-desc-here": "یہ فائل $1 کی ہے نیز ممکن ہے دوسرے منصوبوں میں بھی زیر استعمال ہو۔\nاِس کے [$2 صفحۂ وضاحت] میں درج وضاحت ذیل میں موجود ہے۔",
+       "sharedupload-desc-edit": "یہ فائل $1 میں موجود ہے، نیز ممکن ہے دیگر منصوبوں میں بھی مستعمل ہو۔\nاگر آپ [$2 فائل کے صفحۂ وضاحت] میں موجود معلومات میں ترمیم کرنا چاہیں تو وہاں کر سکتے ہیں۔",
+       "sharedupload-desc-create": "یہ فائل $1 میں موجود ہے، نیز ممکن ہے دیگر منصوبوں میں بھی مستعمل ہو۔\nاگر آپ [$2 فائل کے صفحۂ وضاحت] میں موجود معلومات میں ترمیم کرنا چاہیں تو وہاں کر سکتے ہیں۔",
+       "filepage-nofile": "اس نام سے کوئی فائل موجود نہیں ہے۔",
+       "filepage-nofile-link": "اس نام سے کوئی فائل موجود نہیں ہے، لیکن آپ [$1 اسے اپلوڈ کر سکتے ہیں]۔",
+       "uploadnewversion-linktext": "اس فائل کا نیا نسخہ اپلوڈ کریں",
+       "shared-repo-from": "از $1",
+       "shared-repo": "مشترکہ ذخیرہ",
+       "upload-disallowed-here": "آپ اس فائل کو برتحریر نہیں کر سکتے۔",
+       "filerevert": "$1 کا استرجع کریں",
+       "filerevert-legend": "فائل کا استرجع کریں",
+       "filerevert-intro": "آپ <strong>[[Media:$1|$1]]</strong> فائل کو [$4 مورخہ $2 بوقت $3 بجے کے نسخے] کی جانب واپس پھیر رہے ہیں۔",
+       "filerevert-comment": "وجہ:",
+       "filerevert-defaultcomment": "مورخہ $1 $2 بجے ($3) کے نسخے کی جانب واپس پھیر دیا گیا",
+       "filerevert-submit": "استرجع کریں",
+       "filerevert-success": "<strong>[[Media:$1|$1]]</strong> فائل کو [$4 مورخہ $2 بوقت $3 بجے کے نسخے] کی جانب واپس پھیر دیا گیا۔",
+       "filerevert-badversion": "فراہم کردہ وقت کے مطابق اس فائل کا قدیم اور مقامی نسخہ موجود نہیں ہے۔",
+       "filerevert-identical": "اس فائل کا موجودہ نسخہ منتخب نسخے کی نقل ہے۔",
+       "filedelete": "$1 کو حذف کریں",
+       "filedelete-legend": "فائل حذف کریں",
+       "filedelete-intro": "آپ <strong>[[Media:$1|$1]]</strong> فائل کو اس کے مکمل تاریخچہ سمیت حذف کرنے جا رہے ہیں۔",
+       "filedelete-intro-old": "آپ <strong>[[Media:$1|$1]]</strong> فائل کے [$4 مورخہ $2 بوقت $3 بجے کے نسخے] کو حذف کر رہے ہیں۔",
        "filedelete-comment": "وجہ:",
        "filedelete-submit": "حذف کریں",
        "filedelete-success": " (\"اقدام مکمل ہوا\")۔",
        "filedelete-success-old": " (\"اقدام مکمل ہوا\")",
+       "filedelete-nofile": "<strong>$1</strong> موجود نہیں ہے۔",
+       "filedelete-nofile-old": "درج کردہ خصوصیات کا حامل <strong>$1</strong> کا وثق شدہ نسخہ موجود نہیں ہے۔",
+       "filedelete-otherreason": "دوسری/اضافی وجہ:",
+       "filedelete-reason-otherlist": "دوسری وجہ",
+       "filedelete-reason-dropdown": "* عمومی وجوہات حذف\n** کاپی رائٹ کی خلاف ورزی\n** دوہری فائل",
+       "filedelete-edit-reasonlist": "حذف کی وجوہات میں ترمیم کریں",
+       "filedelete-maintenance": "نگہداشت کے دوران میں فائلوں کی حذف شدگی اور بحالی کو عارضی طور پر غیر فعال کیا گیا ہے۔",
+       "filedelete-maintenance-title": "فائل حذف نہیں کی جا سکتی",
+       "mimesearch": "MIME تلاش",
+       "mimesearch-summary": "اس صفحہ کے ذریعہ MIME طرز کے مطابق فائلوں کی تلاش کی جا سکتی ہے۔\nاندراج: contenttype/subtype یا contenttype/* کی شکل میں درج کریں، مثلاً <code>image/jpeg</code>",
+       "mimetype": "MIME قسم:",
        "download": "زیراثقال (ڈاؤن لوڈ)",
+       "unwatchedpages": "نادیدہ صفحات",
        "listredirects": "فہرست متبادل ربط",
-       "unusedtemplates": "غیر استعمال شدہ سانچے",
+       "listduplicatedfiles": "مکررات کے ساتھ فائلوں کی فہرست",
+       "listduplicatedfiles-summary": "اس صفحہ میں ان فائلوں کی فہرست موجود ہے جن کا حالیہ نسخہ کسی دوسری فائل کے تازہ ترین نسخہ کی نقل ہے۔ اس فہرست میں محض مقامی فائلیں درج کی گئی ہیں۔",
+       "listduplicatedfiles-entry": "[[:File:$1|$1]] [[$3|{{PLURAL:$2|کی ایک نقل ہے|$2 نقلیں ہیں}}]]۔",
+       "unusedtemplates": "غیر مستعمل سانچے",
+       "unusedtemplatestext": "اس صفحہ میں {{ns:template}} نام فضا کے ان تمام صفحات کی فہرست درج ہے جو کسی دوسرے صفحہ میں شامل نہیں ہیں۔\nانہیں حذف کرنے سے قبل سانچوں سے مربوط دیگر صفحات کو جانچنا نہ بھولیں۔",
        "unusedtemplateswlh": "دیگر روابط",
-       "randompage": "بےترتیب صفحہ",
+       "randompage": "جستہ جستہ مطالعہ",
+       "randompage-nopages": "{{PLURAL:$2|اس نام فضا|ان نام فضا}} میں کوئی صفحہ موجود نہیں ہے: $1",
+       "randomincategory": "زمرہ میں بے ترتیب صفحہ",
+       "randomincategory-invalidcategory": "عنوان «$1» زمرے کا درست نام نہیں ہے۔",
+       "randomincategory-nopages": "[[:Category:$1|$1]] زمرہ میں کوئی صفحہ نہیں ہے۔",
        "randomincategory-category": "زمرہ:",
+       "randomincategory-legend": "زمرہ میں بے ترتیب صفحہ",
        "randomincategory-submit": "جانا",
+       "randomredirect": "بے ترتيب رجوع مکرر",
+       "randomredirect-nopages": "«$1» نام فضا میں کوئی رجوع مکرر نہیں ہے۔",
        "statistics": "اعداد و شمار",
        "statistics-header-pages": "صفحات کے اعداد و شمار",
        "statistics-header-edits": "ترمیمی اعداد و شمار",
        "statistics-edits-average": "فی صفحہ اوسط ترامیم",
        "statistics-users": "مندرج [[خاص:فہرست صارفین، صارف فہرست|صارفین]]",
        "statistics-users-active": "متحرک صارفین",
+       "statistics-users-active-desc": "گزشتہ {{PLURAL:$1|day|$1 دنوں}} میں متحرک رہنے والے صارفین",
+       "pageswithprop": "صفحات مع خاصیت صفحہ",
+       "pageswithprop-legend": "صفحات مع خاصیت صفحہ",
+       "pageswithprop-text": "اس صفحہ میں ان تمام صفحات کی فہرست موجود ہے جس کسی مخصوص خاصیت صفحہ کو استعمال کر رہے ہیں۔",
+       "pageswithprop-prop": "نام خاصیت:",
        "pageswithprop-submit": "ٹھیک",
+       "pageswithprop-prophidden-long": "طویل متن کی خاصیت کی پوشیدہ قدر ($1)",
+       "pageswithprop-prophidden-binary": "ثنائی خاصیت کی پوشیدہ قدر ($1)",
        "doubleredirects": "دوہرے متبادل ربط",
+       "doubleredirectstext": "اس صفحہ میں رجوع مکررات ہی کی جانب رجوع مکرر صفحات کی فہرست درج ہے۔\nہر قطار میں پہلے اور دوسرے رجوع مکرر کے روابط، نیز دوسرے رجوع مکرر کا ہدف صفحہ بھی درج ہے، جو عموماً \"حقیقی\" ہدف صفحہ ہوتا ہے اور پہلا رجوع مکرر درحقیقت اسی کی جانب اشارہ کرتا ہے۔\n<del>کشیدہ</del> اندراج درست کر دیے گئے ہیں۔",
+       "double-redirect-fixed-move": "[[$1]] کو منتقل کر دیا گیا۔\nیہ از خود تازہ ہو گیا اور اب [[$2]] سے رجوع مکرر ہے۔",
+       "double-redirect-fixed-maintenance": "نگہداشت کے دوران میں [[$1]] سے [[$2]] کی جانب دوہرے رجوع مکرر کی خودکار درستی۔",
+       "double-redirect-fixer": "مصلح رجوع مکرر",
        "brokenredirects": "نامکمل متبادل ربط",
+       "brokenredirectstext": "ذیل کے رجوع مکررات غیر موجود صفحات سے مربوط ہیں:",
        "brokenredirects-edit": "ترمیم کریں",
        "brokenredirects-delete": "حذف",
+       "withoutinterwiki": "صفحات بدون بین الویکی روابط",
+       "withoutinterwiki-summary": "درج ذیل صفحات دوسری زبان کے صفحات سے مربوط نہیں ہیں۔",
        "withoutinterwiki-legend": "سابقہ",
        "withoutinterwiki-submit": "دکھائیں",
-       "fewestrevisions": "کم نظرِ ثانی شدہ مضامین",
-       "nbytes": "$1 {{PLURAL:$1|لکمہ|لکمہ جات}}",
+       "fewestrevisions": "کم ترامیم کے حامل صفحات",
+       "nbytes": "$1 {{PLURAL:$1|بائٹ}}",
        "ncategories": "{{PLURAL:$1|زمرہ|زمرہ جات}} $1",
-       "ninterwikis": "$1 {{PLURAL:$1|بین الویکی|بین الویکی}}",
-       "nlinks": "$1 {{PLURAL:$1|بÛ\8cÙ\86 Ø§Ù\84Ù\88Û\8cÚ©Û\8c|بÛ\8cÙ\86 Ø§Ù\84Ù\88Û\8cÚ©Û\8c}}",
+       "ninterwikis": "$1 {{PLURAL:$1|بین الویکی ربط|بین الویکی روابط}}",
+       "nlinks": "$1 {{PLURAL:$1|ربط|رÙ\88ابط}}",
        "nmembers": "{{PLURAL:$1|رکن|اراکین}}",
+       "nmemberschanged": "$1 ← $2 {{PLURAL:$2|رکن|اراکین}}",
        "nrevisions": "$1 {{PLURAL:$1|نظر ثانی|نظر ثانیاں}}",
        "nimagelinks": "$1 پر مستعمل {{PLURAL:$1|صفحہ|صفحات}}",
        "ntransclusions": "$1 پر مستعمل {{PLURAL:$1|صفحہ|صفحات}}",
        "uncategorizedcategories": "بے زمرہ زمرہ جات",
        "uncategorizedimages": "بے زمرہ تصاویر",
        "uncategorizedtemplates": "غیر زمرہ بند سانچہ جات",
-       "unusedcategories": "غیر استعمال شدہ زمرہ جات",
-       "unusedimages": "غیر استعمال شدہ فائلیں",
-       "wantedcategories": "طلب شدہ زمرہ جات",
-       "wantedpages": "درخواست شدہ مضامین",
+       "unusedcategories": "غیر مستعمل زمرہ جات",
+       "unusedimages": "غیر مستعمل فائلیں",
+       "wantedcategories": "مطلوبہ زمرہ جات",
+       "wantedpages": "مطلوبہ مضامین",
+       "wantedpages-summary": "ذیل میں ان غیر موجود صفحات کی فہرست ہے جن سے بہت سارے روابط مربوط ہیں، البتہ ان میں وہ صفحات شامل نہیں جن میں محض ان سے مربوط رجوع مکررات موجود ہیں۔ ان صفحوں کو دیکھنے کے لیے [[{{#special:BrokenRedirects}}|شکستہ روابط کی فہرست]] ملاحظہ فرمائیں۔",
+       "wantedpages-badtitle": "نتائج میں نادرست عنوان: $1",
        "wantedfiles": "مطلوب تصاویر",
+       "wantedfiletext-cat": "ذیل میں موجود فائلیں مستعمل ہیں لیکن موجود نہیں۔ البتہ اس بات کا امکان ہے کہ بیرونی ذخیروں کی موجود فائلیں یہاں اس فہرست میں درج ہو گئی ہوں۔ ایسے غلط امکانات کو <del>مٹا دیا جائے گا</del>۔ علاوہ ازیں، غیر موجود فائلوں پر مشتمل صفحات کی فہرست [[:$1]] میں ملاحظہ فرمائیں۔",
+       "wantedfiletext-cat-noforeign": "ذیل میں موجود فائلیں زیر استعمال ہیں لیکن موجود نہیں۔ علاوہ ازیں، جن صفحات میں یہ غیر موجود فائلیں زیر استعمال ہیں ان کی فہرست [[:$1]] میں ملاحظہ فرمائیں۔",
+       "wantedfiletext-nocat": "ذیل میں موجود فائلیں مستعمل ہیں لیکن موجود نہیں۔ البتہ اس بات کا امکان ہے کہ بیرونی ذخیروں کی موجود فائلیں یہاں اس فہرست میں درج ہو گئی ہوں۔ ایسے غلط امکانات کو <del>مٹا دیا جائے گا</del>۔",
+       "wantedfiletext-nocat-noforeign": "ذیل میں موجود فائلیں زیر استعمال ہیں لیکن موجود نہیں۔",
        "wantedtemplates": "مطلوب سانچے",
        "mostlinked": "سب سے زیادہ ربط والے مضامین",
        "mostlinkedcategories": "سب سے زیادہ ربط والے زمرہ جات",
+       "mostlinkedtemplates": "کثیر مستعمل صفحات",
        "mostcategories": "سب سے زیادہ زمرہ جات والے مضامین",
        "mostimages": "سب سے زیادہ استعمال کردہ تصاویر",
        "mostinterwikis": "کثیر اندرونی ربط والے صفحات",
        "shortpages": "چھوٹے صفحات",
        "longpages": "طویل ترین صفحات",
        "deadendpages": "مردہ صفحات",
-       "protectedpages": "محفوظ کردہ صفحات",
+       "deadendpagestext": "درج ذیل صفحات {{SITENAME}} کے دیگر صفحوں سے مربوط نہیں ہیں۔",
+       "protectedpages": "محفوظ صفحات",
+       "protectedpages-indef": "فقط غیر متعین محفوظ شدگیاں",
+       "protectedpages-summary": "ذیل میں ان صفحات کی فہرست موجود ہے جو ابھی محفوظ ہیں۔ محفوظ شدہ عنوانات جنہیں تخلیق نہیں کیا جا سکتا، ان کی فہرست کے لیے [[{{#special:ProtectedTitles}}|{{int:protectedtitles}}]] ملاحظہ فرمائیں۔",
+       "protectedpages-cascade": "فقط آبشاری محفوظ شدگیاں",
        "protectedpages-noredirect": "رجوع مکررات چھپائیں",
+       "protectedpagesempty": "ان پیرامیٹروں کے ساتھ فی الحال کوئی صفحہ محفوظ نہیں ہے۔",
        "protectedpages-timestamp": "وقت کی مہر",
        "protectedpages-page": "صفحہ",
        "protectedpages-expiry": "مدت محفوظ شدگی",
        "protectedpages-performer": "محفوظ کنندہ",
-       "protectedpages-params": "معیار حفاظت",
+       "protectedpages-params": "درجہ حفاظت",
        "protectedpages-reason": "وجہ",
        "protectedpages-submit": "صفحات دکھائیں",
        "protectedpages-unknown-timestamp": "نامعلوم",
        "protectedpages-unknown-performer": "نامعلوم صارف",
-       "protectedtitles": "مسدود عنوانات",
-       "protectedtitles-summary": "یہ ان صفحات کی فہرست ہے جن کو تخلیق نہیں کیا جا سکتا۔ یہ عنوانات محفوظ شدہ ہیں، جن کو تخلیق نہیں کیا جا سکتا۔ دیکھیے [[{{#خاص:محفوظ صفحات}}|{{int:protectedpages}}]].",
+       "protectedtitles": "محفوظ عنوانات",
+       "protectedtitles-summary": "ذیل میں ان عنوانات کی فہرست ہے جنہیں تخلیق نہیں کیا جا سکتا، یہ عنوانات محفوظ شدہ ہیں۔ ان صفحات کی فہرست کے لیے جو ابھی محفوظ ہیں [[{{#special:ProtectedPages}}|{{int:protectedpages}}]] ملاحظہ فرمائیں۔",
+       "protectedtitlesempty": "ان پیرامیٹروں کے ساتھ فی الحال کوئی عنوان محفوظ نہیں ہے۔",
        "protectedtitles-submit": "دکھائیں",
        "listusers": "فہرست ارکان",
+       "listusers-editsonly": "محض ترمیم کرنے والے صارفین دکھائیں",
+       "listusers-creationsort": "تاریخ تخلیق کے مطابق مرتب کریں",
+       "listusers-desc": "نزولی ترتیب",
        "usereditcount": "$1 {{PLURAL:$1|ترمیم|ترامیم}}",
        "usercreated": "{{GENDER:$3|تخلیق شدہ}}  بتاریخ $1 بوقت $2",
        "newpages": "جدید صفحات",
        "ancientpages": "قدیم ترین صفحات",
        "move": "منتقـل",
        "movethispage": "یہ صفحہ منتقل کیجئے",
-       "pager-newer-n": "{{PLURAL:$1|جدید 1|جدید $1}}",
-       "pager-older-n": "{{PLURAL:$1|پُرانا 1|پُرانے $1}}",
+       "unusedimagestext": "درج ذیل فائلیں موجود ہیں لیکن کسی صفحہ میں زیر استعمال نہیں۔\nممکن ہے کہ دیگر ویب سائٹیں براہ راست ربط کے ذریعہ کسی فائل سے مربوط ہوں، اور اس کے باوجود وہ فائل یہاں درج ہو گئی ہوں۔",
+       "unusedcategoriestext": "درج ذیل زمرہ جات موجود ہیں لیکن کسی مضمون یا دوسرے کسی زمرے میں مستعمل نہیں۔",
+       "notargettitle": "کوئی ہدف نہیں",
+       "notargettext": "اس اقدام کی تکمیل کے لیے آپ نے کسی صفحہ یا صارف کا تعین نہیں کیا ہے۔",
+       "nopagetitle": "ایسا کوئی صفحہ موجود نہیں",
+       "nopagetext": "آپ کا درج کردہ ہدف صفحہ موجود نہیں ہے۔",
+       "pager-newer-n": "{{PLURAL:$1|جدید $1}}",
+       "pager-older-n": "{{PLURAL:$1|قدیم}} $1",
+       "suppress": "دبائیں",
+       "querypage-disabled": "اس خصوصی صفحہ کو بوجوہ غیر فعال کر دیا گیا ہے۔",
        "apihelp": "معاونت اے پی آئی",
        "apihelp-no-such-module": "ماڈیول \"$1\" نہیں ملا",
+       "apisandbox": "اے پی آئی کا تختۂ مشق",
+       "apisandbox-jsonly": "اے پی آئی کے تختۂ مشق کو استعمال کرنے کے لیے جاوا اسکرپٹ درکار ہے۔",
+       "apisandbox-api-disabled": "اس سائٹ پر اے پی آئی غیر فعال ہے۔",
+       "apisandbox-fullscreen": "پینل کو وسیع کریں",
+       "apisandbox-fullscreen-tooltip": "براؤزر کے دریچے کا مکمل احاطہ کرنے کے لیے تختۂ مشق کے پینل کو وسیع کریں۔",
+       "apisandbox-unfullscreen": "صفحہ دکھائیں",
+       "apisandbox-unfullscreen-tooltip": "تختہ مشق کا پینل چھوٹا کریں تاکہ میڈیاویکی کے روابطِ رہنمائی دسترس میں ہوں۔",
        "apisandbox-submit": "بنانے کی درخواست",
        "apisandbox-reset": "واضح",
-       "apisandbox-examples": "مثال کے طور پر",
-       "apisandbox-results": "نتیجہ",
+       "apisandbox-retry": "دوبارہ کوشش کریں",
+       "apisandbox-loading": "اے پی آئی ماڈیول \"$1\" کی معلومات لوڈ ہو رہی ہے۔۔۔",
+       "apisandbox-load-error": "اے پی آئی ماڈیول \"$1\" کی معلومات لوڈ ہونے کے دوران میں نقص واقع ہوا: $2",
+       "apisandbox-no-parameters": "اس اے پی آئی ماڈیول میں کوئی پیرامیٹر نہیں ہے۔",
+       "apisandbox-helpurls": "روابط رہنمائی",
+       "apisandbox-examples": "مثالیں",
+       "apisandbox-dynamic-parameters": "اضافی پیرامیٹر",
+       "apisandbox-dynamic-parameters-add-label": "پیرامیٹر شامل کریں:",
+       "apisandbox-dynamic-parameters-add-placeholder": "پیرامیٹر کا نام",
+       "apisandbox-dynamic-error-exists": "\"$1\" کے نام سے ایک پیرامیٹر پہلے سے موجود ہے۔",
+       "apisandbox-deprecated-parameters": "متروک پیرامیٹر",
+       "apisandbox-fetch-token": "ٹوکن کو خودکار طور پر پُر کریں",
+       "apisandbox-submit-invalid-fields-title": "بعض خانے نادرست ہیں",
+       "apisandbox-submit-invalid-fields-message": "براہ کرم نشان زد خانوں کو درست کرکے دوبارہ کوشش کریں۔",
+       "apisandbox-results": "نتائج",
+       "apisandbox-sending-request": "اے پی آئی درخواست بھیجی جا رہی ہے۔۔۔",
+       "apisandbox-loading-results": "اے پی آئی کے نتائج موصول ہو رہے ہیں۔۔۔",
+       "apisandbox-results-error": "اے پی آئی کوئری کا جواب لوڈ ہونے کے دوران میں نقص واقع ہوا: $1",
+       "apisandbox-request-url-label": "درخواست کا ربط:",
+       "apisandbox-request-time": "درخواست کا وقت: {{PLURAL:$1|$1 ملی سیکنڈ}}",
+       "apisandbox-results-fixtoken": "ٹوکن کو درست کرکے دوبارہ بھیجیں",
+       "apisandbox-results-fixtoken-fail": "\"$1\" ٹوکن اخذ کرنے میں ناکامی۔",
+       "apisandbox-alert-page": "اس صفحہ میں موجود خانے نادرست ہیں۔",
+       "apisandbox-alert-field": "اس خانے کی قدر نادرست ہے۔",
        "booksources": "کتابی وسائل",
        "booksources-search-legend": "تلاش برائے مآخذاتِ کتاب",
        "booksources-search": "تلاش",
+       "booksources-invalid-isbn": "درج کردہ آئی ایس بی این درست نہیں معلوم ہوتا؛ اصل ماخذ سے نقل کے دوران میں ہوئی غلطیوں کو جانچ لیں۔",
        "specialloguserlabel": "صارف:",
        "speciallogtitlelabel": "ہدف (عنوان یا {{ns:user}}:صارف نام برائے صارف):",
        "log": "نوشتہ جات",
        "logeventslist-submit": "دکھائیں",
+       "all-logs-page": "تمام عوامی نوشتہ جات",
+       "logempty": "نوشتہ میں اس سے مشابہ کوئی اندراج موجود نہیں ہے۔",
+       "log-title-wildcard": "اس عبارت سے شروع ہونے والے عناوین میں تلاش کریں",
+       "showhideselectedlogentries": "نوشتہ کے منتخب اندراج کی مرئیت تبدیل کریں",
+       "log-edit-tags": "نوشتہ کے منتخب اندراج کے ٹیگوں میں ترمیم کریں",
        "checkbox-select": "$1 کو منتخب کریں",
        "checkbox-all": "سب",
        "checkbox-none": "کچھ نہیں",
        "allpages": "تمام صفحات",
        "nextpage": "اگلا صفحہ ($1)",
        "prevpage": "پچھلا صفحہ ($1)",
-       "allpagesfrom": "مطلوبہ حرف شروع ہونے والے صفحات کی نمائش:",
+       "allpagesfrom": "اس حرف سے شروع ہونے والے صفحات دکھائیں:",
+       "allpagesto": "اس حرف پر ختم ہونے والے صفحات دکھائیں:",
        "allarticles": "تمام مقالات",
-       "allpagessubmit": "چلو",
+       "allinnamespace": "تمام صفحات ($1 نام فضا)",
+       "allpagessubmit": "چلیں",
        "allpagesprefix": "مطلوبہ سابقہ سے شروع ہونے والے صفحات کی نمائش:",
+       "allpages-bad-ns": "{{SITENAME}} میں «$1» نام فضا موجود نہیں۔",
+       "allpages-hide-redirects": "رجوع مکررات چھپائیں",
+       "cachedspecial-viewing-cached-ttl": "آپ اس وقت اس صفحہ کا کیشے شدہ نسخہ دیکھ رہے ہیں جو ممکن ہے $1 پرانا ہو۔",
+       "cachedspecial-viewing-cached-ts": "آپ اس وقت اس صفحہ کا کیشے شدہ نسخہ دیکھ رہے ہیں جو شاید مکمل طور پر اصلی نہ ہو۔",
+       "cachedspecial-refresh-now": "تازہ ترین دیکھیں۔",
        "categories": "زمرہ",
        "categories-submit": "دکھائیں",
        "categoriespagetext": "ذیل میں موجود {{PLURAL:$1|زمرہ|زمرہ جات}} میں صفحات یا میڈیا موجود ہے۔\n[[Special:UnusedCategories|غیر مستعمل زمرہ جات]] یہاں نہیں دکھائے گئے ہیں۔\nنیز [[Special:WantedCategories|مطلوبہ زمرہ جات کی فہرست]] بھی ملاحظہ فرمائیں۔",
+       "categoriesfrom": "اس حرف سے شروع ہونے والے زمرے دکھائیں:",
+       "deletedcontributions": "حذف شدہ صارف کی شراکتیں",
+       "deletedcontributions-title": "صارف کی حذف شدہ شراکتیں",
        "sp-deletedcontributions-contribs": "شراکتیں",
        "linksearch": "بیرونی روابط کی تلاش",
        "linksearch-pat": "تلاش کا انداز",
        "linksearch-ns": "فضائے نام:",
        "linksearch-ok": "تلاش",
        "linksearch-line": "$1 مربوط ہے $2 سے",
+       "listusersfrom": "اس حرف سے شروع ہونے والے صارفین کے نام دکھائیں:",
        "listusers-submit": "دکھاؤ",
        "listusers-noresult": "یہ صارف نہیں ملا",
        "listusers-blocked": "(مسدود)",
        "activeusers": "متحرک صارفین کی فہرست",
-       "activeusers-hidebots": "پوشیدہ خود کار صارف",
-       "activeusers-hidesysops": "پوشیدہ منتظمین",
+       "activeusers-intro": "ذیل میں ان صارفین کی فہرست ہے جو گزشتہ $1 {{PLURAL:$1|دن|دنوں}} میں کسی بھی قسم کی سرگرمی میں شریک رہے ہوں۔",
+       "activeusers-count": "گزشتہ {{PLURAL:$3|دن|$3 دنوں}} میں $1 {{PLURAL:$1|اقدام|اقدامات}}",
+       "activeusers-from": "اس حرف سے شروع ہونے والے صارفین کے نام دکھائیں:",
+       "activeusers-hidebots": "خودکار صارفین کو چھپائیں",
+       "activeusers-hidesysops": "منتظمین کو چھپائیں",
        "activeusers-noresult": "یہ صارف نہیں مل سکا",
+       "activeusers-submit": "فعال صارفین دکھائیں",
+       "listgrouprights": "صارف گروہوں کے اختیارات",
+       "listgrouprights-summary": "ذیل میں اس ویکی پر موجود صارف گروہوں کی فہرست درج ہے۔ اس میں دائیں جانب گروہ کا نام اور بائیں جانب متعلقہ گروہ کو حاصل شدہ اختیارات کی تفصیل بیان کی گئی ہے۔\nانفرادی اختیارات کے متعلق [[{{MediaWiki:Listgrouprights-helppage}}|اضافی معلومات یہاں]] دیکھی جا سکتی ہیں۔",
+       "listgrouprights-key": "عنوان:\n* <span class=\"listgrouprights-granted\">تفویض کردہ اختیارات</span>\n* <span class=\"listgrouprights-revoked\">منسوخ کردہ اختیارات</span>",
        "listgrouprights-group": "گروہ",
        "listgrouprights-rights": "اختیارات",
+       "listgrouprights-helppage": "Help:اختیاراتِ گروہ",
        "listgrouprights-members": "(اراکین کی فہرست)",
+       "listgrouprights-addgroup": "{{PLURAL:$2|اس گروہ|ان گروہوں}} میں شامل کرنے کا اختیار ہے: \n\n$1",
+       "listgrouprights-removegroup": "{{PLURAL:$2|اس گروہ|ان گروہوں}} سے ہٹانے کا اختیار ہے: \n\n$1",
+       "listgrouprights-addgroup-all": "تمام گروہوں کا ا ضافہ کریں",
+       "listgrouprights-removegroup-all": "تمام گروہوں کو ہٹانے کا اختیار ہے",
+       "listgrouprights-addgroup-self": "{{PLURAL:$2|اس گروہ|ان گروہوں}} میں از خود شامل ہونے کا اختیار ہے: \n\n$1",
+       "listgrouprights-removegroup-self": "{{PLURAL:$2|اس گروہ|ان گروہوں}} سے از خود نکلنے کا اختیار ہے: \n\n$1",
+       "listgrouprights-addgroup-self-all": "تمام گروہوں میں از خود شامل ہونے کا اختیار ہے",
+       "listgrouprights-removegroup-self-all": "تمام گروہوں سے از خود نکلنے کا اختیار ہے",
+       "listgrouprights-namespaceprotection-header": "نام فضا پابندیاں",
        "listgrouprights-namespaceprotection-namespace": "فضائے نام",
+       "listgrouprights-namespaceprotection-restrictedto": "ترمیم کی اجازت دینے والے اختیار(ات)",
+       "listgrants": "عطا",
+       "listgrants-grant": "عطیہ",
+       "listgrants-rights": "حقوق",
+       "trackingcategories": "متلاشی زمرہ جات",
+       "trackingcategories-summary": "اس صفحہ میں ان متلاشی زمروں کی فہرست موجود جنہیں خودکار طور پر میڈیاویکی سافٹ ویئر تخلیق کرتا ہے۔ نیز {{ns:8}} نام فضا میں موجود متعلقہ نظامی پیغامات کے ذریعہ ان کے ناموں میں تبدیلی کی جا سکتی ہے۔",
        "trackingcategories-msg": "کھوجی زمرہ",
        "trackingcategories-name": "پیغام کا عنوان",
        "trackingcategories-desc": "زمرہ کی شمولیت کا معیار",
        "restricted-displaytitle-ignored": "صفحات مع نظرانداز کردہ عناوین",
+       "broken-file-category-desc": "اس صفحہ میں کسی فائل کا شکستہ ربط موجود ہے (یعنی ایسی فائل کا ربط دیا گیا ہے جو موجود نہیں)۔",
+       "hidden-category-category-desc": "اس زمرہ میں ابتدائی طور پر <code><nowiki>__HIDDENCAT__</nowiki></code> کا کوڈ شامل ہے جو اس زمرہ کو صفحات میں ظاہر ہونے سے روکتا ہے۔",
+       "trackingcategories-nodesc": "کوئی وضاحت دستیاب نہیں۔",
        "trackingcategories-disabled": "زمرہ غیر فعال ہے",
+       "mailnologin": "بھیجنے کے لیے کوئی پتہ نہیں",
        "mailnologintext": "دیگر ارکان کو برقی خط ارسال کرنے کیلیۓ لازم ہے کہ آپ [[Special:UserLogin|داخل شدہ]] حالت میں ہوں اور آپ کی [[Special:Preferences|ترجیحات]] ایک درست برقی خط کا پتا درج ہو۔",
        "emailuser": "صارف کو برقی خط لکھیں",
+       "emailuser-title-target": "اس {{GENDER:$1|صارف}} کو برقی خط لکھیں",
        "emailuser-title-notarget": "ای میل صارف",
+       "emailpagetext": "درج ذیل فارم کے ذریعہ آپ اس {{GENDER:$1|صارف}} کو برقی پیغام بھیج سکتے ہیں۔ جو برقی ڈاک پتا آپ نے [[Special:Preferences|اپنی ترجیحات]] میں دیا ہے وہ یہاں \"از\" کے طور پر نظر آئے گا، تاکہ وصول کنندہ براہ راست آپ کو جواب دے سکے۔",
        "defemailsubject": "{{SITENAME}} سے برقی خط",
        "usermaildisabled": "صارف برقی پتہ غیر فعال ہے",
        "usermaildisabledtext": "آپ اس ویکی پر رہتے ہوئے دوسرے صارف کو برقی خط ارسال نہيں کر سکتے",
        "noemailtitle": "کوئی برقی پتہ نہیں ہے",
-       "noemailtext": "اس صارف نے برقی خط کے لیے پتہ فراہم نہیں کیا، یا یہ چاہتا ہے کا اس سے کوئی صارف رابطہ نہ کرے۔",
+       "noemailtext": "اس صارف نے کوئی درست برقی ڈاک پتا نہیں دیا ہے۔",
+       "nowikiemailtext": "اس صارف نے دیگر صارفین سے برقی خط وصول نہ کرنے کا فیصلہ کیا ہے۔",
+       "emailnotarget": "وصول کنندہ موجود نہیں یا صارف نام نادرست ہے۔",
+       "emailtarget": "وصول کنندہ کا صارف نام داخل کریں",
        "emailusername": "صارف نام:",
+       "emailusernamesubmit": "روانہ کریں",
+       "email-legend": "{{SITENAME}} کے دوسرے صارف کو برقی خط بھیجیں",
        "emailfrom": "از:",
        "emailto": "بہ:",
        "emailsubject": "موضوع:",
        "emailmessage": "پیغام:",
        "emailsend": "بھیجیں",
        "emailccme": "میرے پیغام کی ایک نقل مجھے بھی میل کی جائے۔",
+       "emailccsubject": "$1 کو بھیجے جانے والے پیغام کا نسخہ: $2",
+       "emailsent": "ای میل بھیج دی گئی",
        "emailsenttext": "آپ کا پیغام بھیج دیا گیا۔",
+       "emailuserfooter": "اس برقی خط کو $1 نے {{SITENAME}} پر موجود «{{int:emailuser}}» کی سہولت کو استعمال کرتے ہوئے {{GENDER:$2|$2}} کو {{GENDER:$1|بھیجا}} ہے۔",
+       "usermessage-summary": "نظامی پیغام کی ترسیل۔",
+       "usermessage-editor": "نظامی پیغام رساں",
        "watchlist": "میری زیرنظرفہرست",
-       "mywatchlist": "زیرنظرفہرست",
+       "mywatchlist": "زیرنظر فہرست",
        "watchlistfor2": "براۓ $1 ($2)",
-       "addedwatchtext": "یہ صفحہ \"<nowiki>$1</nowiki>\" آپکی [[Special:Watchlist|زیرنظر]] فہرست میں شامل کردیا گیا ہے۔ اب مستقل میں اس صفحے اور اس سے ملحقہ تبادلہ خیال کا صفحے میں کی جانے والی تبدیلوں کا اندراج کیا جاتا رہے گا، اور ان صفحات کی شناخت کو سہل بنانے کے لیۓ [[Special:حالیہ تبدیلیاں|حالیہ تبدیلیوں کی فہرست]] میں انکو '''مُتَجَل''' (bold) تحریر کیا جاۓ گا۔ <p> اگر آپ کسی وقت اس صفحہ کو زیرنظرفہرست سے خارج کرنا چاہیں تو اوپر دیۓ گۓ \"زیرنظرمنسوخ\" پر ٹک کیجیۓ۔",
-       "removedwatchtext": "صفحہ \"[[:$1]]\" آپ کی زیر نظر فہرست سے خارج کر دیا گیا۔",
-       "watch": "زیرنظر",
-       "watchthispage": "یہ صفحہ زیر نظر کیجیۓ",
+       "nowatchlist": "آپ کی زیرنظر فہرست میں کوئی مواد موجود نہیں ہے۔",
+       "watchlistanontext": "اپنی زیرنظر فہرست میں موجود مواد کو دیکھنے اور ان میں ترمیم کرنے کے لیے براہ کرم لاگ ان کریں۔",
+       "watchnologin": "داخل نوشتہ نہیں",
+       "addwatch": "زیر نظر فہرست میں شامل کریں",
+       "addedwatchtext": "صفحہ «[[:$1]]» اور اس کا تبادلۂ خیال صفحہ آپ کی [[Special:Watchlist|زیرنظر فہرست]] میں شامل کردیا گیا ہے۔",
+       "addedwatchtext-talk": "صفحہ «[[:$1]]» اور اس سے ملحقہ صفحہ آپ کی [[Special:Watchlist|زیرنظر فہرست]] میں شامل کردیا گیا ہے۔",
+       "addedwatchtext-short": "صفحہ «$1» کو آپ کی زیرنظر فہرست میں شامل کر دیا گیا ہے۔",
+       "removewatch": "زیرنظر فہرست سے ہٹائیں",
+       "removedwatchtext": "صفحہ «[[:$1]]» اور اس کا تبادلۂ خیال صفحہ آپ کی [[Special:Watchlist|زیرنظر فہرست]] سے خارج کر دیا گیا ہے۔",
+       "removedwatchtext-talk": "صفحہ «[[:$1]]» اور اس سے ملحقہ صفحہ آپ کی [[Special:Watchlist|زیرنظر فہرست]] سے خارج کر دیا گیا ہے۔",
+       "removedwatchtext-short": "صفحہ «$1» کو آپ کی زیرنظر فہرست سے خارج کر دیا گیا ہے۔",
+       "watch": "زیر نظر کریں",
+       "watchthispage": "اس صفحہ کو زیر نظر کریں",
        "unwatch": "زیرنظرمنسوخ",
-       "watchlist-details": "آپ کی زیرِنظرفہرست پر {{PLURAL:$1|$1 صفحہ ہے|$1 صفحات ہیں}}، اِس میں تبادلۂ خیال صفحات کی تعداد شامل نہیں.",
-       "wlnote": "نیچےآخری $1 تبدیلیاں ہیں جو کے پیچھلے <b>$2</b> گھنٹوں میں کی گئیں۔",
+       "unwatchthispage": "زیرنظر فہرست سے خارج کریں",
+       "notanarticle": "ویکی کے موضوع سے متعلق صفحہ نہیں ہے",
+       "notvisiblerev": "دوسرے صارف کی آخری ترمیم حذف کر دی گئی",
+       "watchlist-details": "آپ کی زیرنظر فہرست میں {{PLURAL:$1|$1 صفحہ ہے|$1 صفحات ہیں}}، اس میں تبادلۂ خیال صفحات کی تعداد شامل نہیں ہے۔",
+       "wlheader-enotif": "ای میل کی اطلاع فعال ہے ۔",
+       "wlheader-showupdated": "آپ کی آخری آمد کے بعد جن صفحات میں تبدیلی ہوئی ہے وہ <strong>جلی حروف</strong> میں نظر آئیں گے۔",
+       "wlnote": "ذیل میں گزشتہ {{PLURAL:$2|گھنٹے|<strong>$2</strong> گھنٹوں}} میں ہونے والی {{PLURAL:$1|تبدیلی|<strong>$1</strong> تبدیلیوں}} کی فہرست درج ہے، تاریخ تجدید $3، $4",
        "wlshowlast": "دکھائیں آخری $1 گھنٹے $2 دن",
        "watchlist-hide": "چھپائیں",
        "watchlist-submit": "دکھائیں",
        "wlshowhidemine": "میری ترامیم",
        "wlshowhidecategorization": "صفحاتی زمرہ بندی",
        "watchlist-options": "اختیارات برائے زیرِنظرفہرست",
+       "watching": "زیرنظر فہرست میں شامل کیا جا رہا ہے۔۔۔",
+       "unwatching": "زیرنظر فہرست سے خارج کیا جا رہا ہے۔۔۔",
+       "watcherrortext": "«$1» کے لیے آپ کی زیرنظر فہرست کی ترتیبات میں تبدیلی کے دوران میں کوئی نقص ہوا۔",
        "enotif_reset": "جملہ صفحات کو بطور زیارت شدہ نشان زد کریں",
+       "enotif_impersonal_salutation": "{{SITENAME}} کا صارف",
        "enotif_subject_deleted": "{{SITENAME}} میں صفحہ $1 صارف $2 نے {{GENDER:$2|حذف کیا}}",
        "enotif_subject_created": "{{SITENAME}} میں صفحہ $1 کو $2 نے {{GENDER:$2|تخلیق کیا}}",
        "enotif_subject_moved": "{{SITENAME}} میں صفحہ $1 کو $2 نے {{GENDER:$2|منتقل کیا}}",
        "enotif_body_intro_changed": "{{SITENAME}} میں صفحہ $1 میں بتاریخ $PAGEEDITDATEء صارف $2 نے {{GENDER:$2|تبدیلی کی}}، موجودہ نسخہ دیکھنے کے لیے $3 ملاحظہ فرمائیں۔",
        "enotif_lastvisited": "آپ کی آخری آمد کے بعد سے ہونے والی تمام تبدیلیوں کو دیکھنے کے لیے $1 کو ملاحظہ فرمائیں۔",
        "enotif_lastdiff": "اس تبدیلی کو دیکھنے کے لیے $1 کو ملاحظہ فرمائیں۔",
+       "enotif_anon_editor": "گمنام صارف $1",
        "enotif_body": "جناب $WATCHINGUSERNAME!\n\n$PAGEINTRO $NEWPAGE\n\nخلاصہ ترمیم: $PAGESUMMARY $PAGEMINOREDIT\n\nصارف سے رابطہ کریں:\nبذریعہ برقی خط: $PAGEEDITOR_EMAIL\nبذریعہ ویکی: $PAGEEDITOR_WIKI\n\nاس صفحہ میں آئندہ ہونے والی تبدیلیوں کی اطلاعات آپ کو موصول نہیں ہوگی جب تک آپ لاگ ان ہو کر اس صفحہ کو ملاحظہ نہ کر لیں۔ نیز آپ اپنی زیر نظر فہرست میں موجود تمام صفحات سے اطلاعی علامتیں بھی ختم کر سکتے ہیں۔\n\nفقط\nآپ کا خادم، {{SITENAME}} نظام اطلاعات\n\n--\nاطلاعات بذریعہ برقی خط کی ترتیبات تبدیل کرنے کے لیے\n{{canonicalurl:{{#special:Preferences}}}} ملاحظہ فرمائیں\n\nاپنی زیر نظر فہرست کی ترتیبات میں تبدیلی کے لیے\n{{canonicalurl:{{#special:EditWatchlist}}}} ملاحظہ فرمائیں\n\nاس صفحہ کو اپنی زیر نظر فہرست سے حذف کرنے کے لیے\n$UNWATCHURL ملاحظہ فرمائیں\n\nتجاویز اور مزید معاونت کے لیے ملاحظہ فرمائیں:\n$HELPPAGE",
        "created": "بنا دیا گیا",
        "changed": "تبدیل کردیاگیا",
-       "deletepage": "صÙ\81Ø­Û\81 Ø¶Ø§Ø¦Ø¹ کریں",
+       "deletepage": "حذÙ\81 کریں",
        "confirm": "یقین",
        "excontent": "'$1':مواد تھا",
-       "excontentauthor": "حذف شدہ مواد: '$1' (اور صرف '[[Special:Contributions/$2|$2]]' نے حصہ ڈالا)",
+       "excontentauthor": "حذف شدہ مواد: «$1» اور صرف «[[Special:Contributions/$2|$2]]» ([[User talk:$2|تبادلۂ خیال]]) نے اس میں ترمیم کی",
+       "exbeforeblank": "خالی کرنے سے قبل موجود مواد: «$1»",
        "delete-confirm": "حذف ''$1''",
        "delete-legend": "حذف",
-       "historywarning": "<strong>اÙ\86تباÛ\81</strong>: Ø¢Ù¾ Ø§Ø³ ØµÙ\81Ø­Û\81 Ú©Ù\88 $1 {{PLURAL:$1|Ù\86ظر Ø«Ø§Ù\86Û\8c\86ظر Ø«Ø§Ù\86Û\8cوں}} کے تاریخچہ کے ساتھ حذف کر رہے ہیں:",
+       "historywarning": "<strong>اÙ\86تباÛ\81</strong>: Ø¢Ù¾ Ø§Ø³ ØµÙ\81Ø­Û\81 Ú©Ù\88 $1 {{PLURAL:$1|Ù\86سخÛ\81\86سخوں}} کے تاریخچہ کے ساتھ حذف کر رہے ہیں:",
        "historyaction-submit": "دکھائیں",
-       "confirmdeletetext": "آپ نے اس صفحے کو اس سے ملحقہ تاریخچہ سمیت حذف کرنے کا ارادہ کیا ہے۔ براۓ مہربانی تصدیق کرلیجیۓ کہ آپ اس عمل کے نتائج سے بخوبی آگاہ ہیں، اور یہ بھی یقین کرلیجیۓ کہ آپ ایسا [[{{MediaWiki:Policy-url}}|ویکیپیڈیا کی حکمت عملی]] کے دائرے میں رہ کر کر رہے ہیں۔",
+       "confirmdeletetext": "آپ اس صفحے کو اس سے ملحقہ تاریخچہ سمیت حذف کر رہے ہیں۔ براہ مہربانی اس بات کی تصدیق کر لیں کہ آپ اس عمل کے نتائج سے بخوبی آگاہ ہیں، اور یہ بھی جانچ لیں کہ آیا آپ کا یہ اقدام [[{{MediaWiki:Policy-url}}|حکمت عملی]] کے دائرے میں ہے یا نہیں۔",
        "actioncomplete": "اقدام تکمیل کو پہنچا",
        "actionfailed": "عمل ناکام",
-       "deletedtext": "\"$1\" کو حذف کر دیا گیا ہے ۔\nحالیہ حذف شدگی کے تاریخ نامہ کیلیۓ  $2  دیکھیۓ",
+       "deletedtext": "\"$1\" کو حذف کر دیا گیا ہے۔\nحالیہ حذف شدگیوں کی فہرست دیکھنے کے لیے $2 ملاحظہ فرمائیں۔",
        "dellogpage": "نوشتۂ حذف شدگی",
        "dellogpagetext": "حالیہ حذف شدگی کی فہرست درج ذیل ہے۔",
        "deletionlog": "نوشتۂ حذف شدگی",
+       "reverted": "ابتدائی نسخہ کی جانب واپس پھیر دیا گیا",
        "deletecomment": "وجہ:",
        "deleteotherreason": "دوسری/اِضافی وجہ:",
        "deletereasonotherlist": "دوسری وجہ",
+       "deletereason-dropdown": "* عمومی وجوہات حذف\n** فاضل کاری\n** تخریب کاری\n** کاپی رائٹ کی خلاف ورزی\n** مصنف کی درخواست\n** شکستہ روابط",
+       "delete-edit-reasonlist": "وجوہات حذف میں ترمیم کریں",
+       "delete-toobig": "$1 {{PLURAL:$1|نسخے|نسخوں}} پر مشتمل اس صفحہ کا تاریخچہ بہت طویل ہے۔\n{{SITENAME}} پر کسی حادثاتی انتشار سے بچنے کے لیے اس طرح کے صفحات کو حذف کرنے کی اجازت نہیں ہے۔",
+       "delete-warning-toobig": "$1 {{PLURAL:$1|نسخے|نسخوں}} پر مشتمل اس صفحہ کا تاریخچہ بہت طویل ہے۔\nعین ممکن ہے کہ اسے حذف کرنے سے {{SITENAME}} کے ڈیٹابیس کی کارروائیاں انتشار کا شکار ہو جائیں؛ لہذا احتیاط سے آگے بڑھیں۔",
+       "deleteprotected": "آپ اس صفحہ کو حذف نہیں کر سکتے کیونکہ اسے محفوظ کر دیا گیا ہے۔",
+       "deleting-backlinks-warning": "<strong>انتباہ:</strong> جس صفحہ کو آپ حذف کر رہے ہیں اس سے مربوط یا اس میں شامل [[Special:WhatLinksHere/{{FULLPAGENAME}}|دیگر صفحات]]۔",
        "rollback": "ترمیمات سابقہ حالت پرواپس",
        "rollbacklink": "استرجع کریں",
        "rollbacklinkcount": "استرجع $1 {{PLURAL:$1|ترمیم|ترامیم}}",
        "rollbacklinkcount-morethan": "$1 {{PLURAL:$1|ترمیم|ترامیم}} سے زیادہ کا استرجع",
        "rollbackfailed": "سابقہ حالت پر واپسی ناکام",
+       "rollback-missingparam": "درخواست میں ضروری پیرامیٹر موجود نہیں۔",
+       "rollback-missingrevision": "نسخہ کی معلومات لوڈ نہیں ہو سکتی۔",
        "cantrollback": "تدوین ثانی کا اعادہ نہیں کیا جاسکتا؛ کیونکہ اس میں آخری بار حصہ لینے والا ہی اس صفحہ کا واحد کاتب ہے۔",
+       "editcomment": "خلاصہ ترمیم یہ تھا: <em>«$1»</em>.",
+       "revertpage": "[[Special:Contributions/$2|$2]] ([[User talk:$2|تبادلۂ خیال]]) کی ترامیم [[User:$1|$1]] کی گذشتہ ترمیم کی جانب واپس پھیر دی گئیں۔",
+       "revertpage-nouser": "(حذف شدہ صارف نام) کی ترامیم {{GENDER:$1|[[User:$1|$1]]}} کی گذشتہ ترمیم کی جانب واپس پھیر دی گئیں",
+       "rollback-success": "$1 کی ترامیم واپس پھیر دی گئیں؛\nصفحہ واپس $2 کی آخری ترمیم کی جانب منتقل کر دیا گیا۔",
+       "rollback-success-notify": "$1 کی ترامیم واپس پھیر دی گئیں؛\nصفحہ واپس $2 کی آخری ترمیم کی جانب منتقل کر دیا گیا۔ [$3 تبدیلیاں دکھائیں]",
+       "sessionfailure-title": "نشست میں خامی",
+       "changecontentmodel": "صفحہ کے مواد کے ماڈل میں تبدیلی کریں",
+       "changecontentmodel-legend": "مواد کے ماڈل کو تبدیل کریں",
        "changecontentmodel-title-label": "صفحہ کا عنوان",
+       "changecontentmodel-model-label": "نیا مواد ماڈل",
        "changecontentmodel-reason-label": "وجہ:",
+       "changecontentmodel-submit": "تبدیلی",
+       "changecontentmodel-success-title": "مواد کا ماڈل تبدیل کر دیا گیا ہے",
+       "changecontentmodel-success-text": "[[:$1]] کے مواد کی نوعیت تبدیل کر دی گئی۔",
+       "changecontentmodel-cannot-convert": "[[:$1]] میں موجود مواد کی نوعیت کو $2 میں تبدیل نہیں کیا جا سکتا۔",
+       "changecontentmodel-nodirectediting": "$1 کے مواد کا ماڈل راست ترمیم کاری کو معاونت فراہم نہیں کرتا",
+       "changecontentmodel-emptymodels-title": "مواد کا کوئی ماڈل دستیاب نہیں",
+       "changecontentmodel-emptymodels-text": "[[:$1]] میں موجود مواد کی نوعیت کو تبدیل نہیں کیا جا سکتا۔",
        "log-name-contentmodel": "نوشتہ تبدیلی نمونہ مواد",
+       "log-description-contentmodel": "صفحہ کے مواد کے ماڈل سے متعلق واقعات",
+       "logentry-contentmodel-new": "$1 نے مواد کے غیر ڈیفالٹ ماڈل «$5» کے ذریعہ  صفحہ $3 کو {{GENDER:$2|تخلیق کیا}}",
        "logentry-contentmodel-change": "$1 نے صفحہ $3 کے مواد کی ساخت کو \"$4\" سے \"$5\" میں {{GENDER:$2|تبدیل کیا}}",
+       "logentry-contentmodel-change-revertlink": "استرجع",
+       "logentry-contentmodel-change-revert": "استرجع",
        "protectlogpage": "نوشتۂ محفوظ شدگی",
+       "protectlogtext": "ذیل میں صفحات کے درجہ حفاظت کی تبدیلیوں کی فہرست درج ہے۔\nموجودہ محفوظ صفحات کی فہرست دیکھنے کے لیے [[Special:ProtectedPages|محفوظ صفحات کی فہرست]] ملاحظہ فرمائیں۔",
        "protectedarticle": "\"[[$1]]\" کومحفوظ کردیا",
-       "unprotectedarticle": "\"[[$1]]\" کوغیر محفوظ کیا",
+       "modifiedarticleprotection": "«[[$1]]» کا درجہ حفاظت تبدیل کیا",
+       "unprotectedarticle": "«[[$1]]» کو غیر محفوظ کیا",
        "movedarticleprotection": "نے \"[[$2]]\" کا درجہ حفاظت \"[[$1]]\" کی جانب منتقل کیا",
+       "protect-title": "«$1» کا درجہ حفاظت تبدیل کریں",
+       "protect-title-notallowed": "«$1» کا درجہ حفاظت دیکھیں",
        "prot_1movedto2": "[[$1]] بجانب [[$2]] منتقل",
+       "protect-badnamespace-title": "ناقابل حفاظت نام فضا",
+       "protect-badnamespace-text": "اس نام فضا میں موجود صفحات کو محفوظ نہیں کیا جا سکتا۔",
+       "protect-norestrictiontypes-text": "اس صفحہ کو محفوظ نہیں کیا جا سکتا کیونکہ حفاظت کے مطلوبہ پیرامیٹر دستیاب نہیں ہیں۔",
+       "protect-norestrictiontypes-title": "ناقابل حفاظت صفحہ",
+       "protect-legend": "تحفظ کی تصدیق کریں",
        "protectcomment": "وجہ:",
-       "protect-default": "تمام صارفین کو اہل بناؤ",
+       "protectexpiry": "زاید میعاد:",
+       "protect_expiry_invalid": "وقت اختتام نادرست ہے۔",
+       "protect_expiry_old": "وقت اختتام گزر چکا ہے۔",
+       "protect-unchain-permissions": "مزید اختیارات حفاظت کو غیر مقفل کریں",
+       "protect-text": "یہاں آپ <strong>$1</strong> کا درجۂ حفاظت دیکھ اور تبدیل کر سکتے ہیں۔",
+       "protect-locked-blocked": "پابندی کے دوران میں آپ درجہ حفاظت میں تبدیلی نہیں کر سکتے۔\nصفحہ <strong>$1</strong> کی حالیہ ترتیبات یہاں دیکھی جا سکتی ہیں:",
+       "protect-locked-dblock": "ڈیٹابیس مقفل ہونے کی وجہ سے درجہ حفاظت کو تبدیل نہیں کیا جا سکتا۔\nصفحہ <strong>$1</strong> کی حالیہ ترتیبات یہاں دیکھی جا سکتی ہیں:",
+       "protect-locked-access": "آپ کو درجہ حفاظت تبدیل کرنے کا اختیار حاصل نہیں ہے۔\nصفحہ <strong>$1</strong> کی حالیہ ترتیبات یہاں دیکھی جا سکتی ہیں:",
+       "protect-cascadeon": "یہ صفحہ محفوظ ہے کیونکہ یہ درج ذیل {{PLURAL:$1|صفحہ|صفحات}} میں شامل ہے جہاں آبشاری حفاظت فعال ہے۔\nآپ اس صفحہ کے درجۂ حفاظت میں تبدیلی کرسکتے ہیں، لیکن یہ آبشاری حفاظت پر اثر انداز نہیں ہوگی۔",
+       "protect-default": "تمام صارفین کو اجازت ہے",
+       "protect-fallback": "محض «$1» کا اختیار رکھنے والے صارفین کو اجازت ہے",
+       "protect-level-autoconfirmed": "محض خود توثیق شدہ صارفین کو اجازت ہے",
        "protect-level-sysop": "صرف منتظمین کو اجازت ہے",
        "protect-summary-cascade": "آبشاری",
-       "protect-expiring": "Ù\85دت Ø®Ø§ØªÙ\85Û\81  $1 (یو ٹی سی)",
-       "protect-expiring-local": "Ù\85دت Ø®Ø§ØªÙ\85Û\81  $1",
+       "protect-expiring": "Ù\88Ù\82ت Ø§Ø®ØªØªØ§Ù\85  $1 (یو ٹی سی)",
+       "protect-expiring-local": "Ù\88Ù\82ت Ø§Ø®ØªØªØ§Ù\85 $1",
        "protect-expiry-indefinite": "لا محدود",
+       "protect-cascade": "اس صفحہ میں شامل صفحات کو محفوظ کریں (آبشاری حفاظت)",
+       "protect-cantedit": "آپ اس صفحہ کے درجہ حفاظت میں تبدیلی نہیں کر سکتے کیونکہ آپ کو اس میں ترمیم کرنے کی اجازت نہیں ہے۔",
        "protect-othertime": "دیگر وقت:",
        "protect-othertime-op": "دیگر وقت",
+       "protect-existing-expiry": "موجودہ وقت اختتام: $3، $2",
+       "protect-existing-expiry-infinity": "موجودہ وقت اختتام: لامحدود",
+       "protect-otherreason": "دوسری/اضافی وجہ:",
        "protect-otherreason-op": "دیگر وجہ",
+       "protect-dropdown": "* عمومی وجوہات حفاظت\n** مسلسل تخریب کاری\n** مسلسل فاضل کاری\n** غیر مفید ترمیمی جنگ\n** زیادہ آمد و رفت صفحہ",
+       "protect-edit-reasonlist": "وجوہات حفاظت میں ترمیم کریں",
        "protect-expiry-options": "1 hour:1 hour,1 day:1 day,1 week:1 week,2 weeks:2 weeks,1 month:1 month,3 months:3 months,6 months:6 months,1 year:1 year,infinite:infinite",
        "restriction-type": "اجازت:",
+       "restriction-level": "درجہ پابندی:",
+       "minimum-size": "کم از کم سائز",
+       "maximum-size": "زیادہ سے زیادہ سائز:",
        "pagesize": "(بائیٹ)",
-       "restriction-edit": "تحرÛ\8cر Ù\88 ØªØ±Ù\85Û\8cÙ\85",
+       "restriction-edit": "ترمیم",
        "restriction-move": "منتقل",
        "restriction-create": "تخلیق",
-       "restriction-upload": "زبراثÙ\82اÙ\84",
+       "restriction-upload": "اپÙ\84Ù\88Ú\88",
        "restriction-level-sysop": "مکمل محفوظ",
        "restriction-level-autoconfirmed": "نیم محفوظ",
        "restriction-level-all": "کوئی بھی سطح",
-       "undelete": "ضائع Ú©Ø±دہ صفحات دیکھیں",
+       "undelete": "حذÙ\81 Ø´دہ صفحات دیکھیں",
        "undeletepage": "معائنہ خذف شدہ صفحات",
        "undeletepagetitle": "'''ذیل میں [[:$1|$1]] کے حذف شدہ ترامیم درج ہیں۔'''",
        "viewdeletedpage": "حذف شدہ صفحات دیکھیے",
+       "undeletepagetext": "درج ذیل {{PLURAL:$1|صفحہ حذف کیا جا چکا ہے|$1 صفحات حذف کیے جا چکے ہیں}} لیکن وثق میں موجود {{PLURAL:$1|ہے|ہیں}} اور {{PLURAL:$1|اسے|انہیں}} بحال کیا جا سکتا ہے۔\nممکن ہے اس وثق کو وقتاً فوقتاً صاف کیا جاتا ہو۔",
        "undelete-fieldset-title": "ترامیم بحال کریں",
-       "undeletehistory": "اگر آپ اس صفحہ کو بحال کرتے ہیں، تو اس صفحہ کے تاریخچہ میں تمام ترامیم بھی بحال ہوجائیگی۔\nاگر حذف شدگی کے بعد کوئی نیا صفحہ اسی نام سے تخلیق کیا گیا ہو، تو تمام بحال شدہ ترامیم گذشتہ تاریخچہ میں ظاہر ہوگی۔",
-       "undeleterevdel": "بحالیٔ صفحہ کا اقدام مکمل نہیں ہوگا اگر اس کا تنیجہ صفحہ کے اوپر کے حصہ کی ترمیم یا ملف کا اعادہ جزوی طور پر حذف کیا جارہا ہو۔\nایسی صورت میں لازمی طور آپ حالیہ حذف شدہ اعادے کو ظاہر کریں۔",
+       "undeleteextrahelp": "اس صفحہ کے مکمل تاریخچے کو بحال کرنے کے لیے تمام خانوں کو غیر منتخب چھوڑ دیں اور <strong><em>{{int:undeletebtn}}</em></strong> پر کلک کریں۔\nمنتخب نسخوں کی بحالی کے لیے مطلوبہ نسخوں کے بغل میں موجود خانوں کو نشان زد کریں اور <strong><em>{{int:undeletebtn}}</em></strong> پر کلک کریں۔",
+       "undeleterevisions": "$1 {{PLURAL:$1|نسخہ حذف کیا گیا|نسخے حذف کیے گئے}}",
+       "undeletehistory": "اگر آپ اس صفحہ کو بحال کرتے ہیں، تو اس صفحہ کے تاریخچہ میں موجود تمام ترامیم بھی بحال ہو جائیں گی۔\nاگر حذف شدگی کے بعد کوئی نیا صفحہ اسی نام سے بنایا گیا ہو، تو تمام بحال شدہ ترامیم گذشتہ تاریخچہ میں ظاہر ہوگی۔",
+       "undeleterevdel": "اگر صفحہ یا فائل کے آخری نسخے کو جزوی طور پر حذف کیا جا رہا ہو تو بحالیٔ صفحہ کا اقدام مکمل نہیں ہوگا۔\nایسی صورت میں لازمی طور آپ حالیہ حذف شدہ نسخے کو بھی بحال کریں۔",
+       "undeletehistorynoadmin": "اس صفحہ کو حذف کر دیا گیا ہے۔\nذیل میں صفحہ حذف کرنے کی وجہ درج ہے، اور ساتھ ہی ان صارفین کی تفصیلات بھی موجود ہیں جنہوں نے صفحہ حذف ہونے سے قبل اس میں ترمیم کی تھی۔\nحذف شدہ نسخوں کا اصل متن محض منتظمین کے لیے دستیاب ہے۔",
+       "undelete-revision": "$3 کی جانب سے (مورخہ $4 بوقت $5 بجے) تحریر کردہ $1 کا حذف شدہ نسخہ:",
+       "undeleterevision-missing": "نسخہ نادرست یا غیر موجود ہے۔\nشاید آپ غلط ربط کو استعمال کر رہے ہیں یا متعلقہ نسخہ پہلے ہی بحال یا وثق سے حذف کر دیا گیا ہے۔",
+       "undeleterevision-duplicate-revid": "{{PLURAL:$1|ایک نسخہ بحال نہیں کیا جا سکا|$1 نسخے بحال نہیں کیے جا سکے}}، کیونکہ {{PLURAL:$1|اس کا|ان کے}} <code>rev_id</code> زیر استعمال ہے۔",
+       "undelete-nodiff": "کوئی پرانا نسخہ نہیں ملا۔",
        "undeletebtn": "بحال",
        "undeletelink": "دیکھو/بحال کرو",
        "undeleteviewlink": "دکھاؤ",
        "undeleteinvert": "انتخاب بالعکس",
        "undeletecomment": "وجہ:",
        "undeletedrevisions": "{{PLURAL:$1|1 نظر ثانی|$1 نظر ثانیاں}} بحال",
-       "undeletedrevisions-files": "{{PLURAL:$1|1 نظر ثانی|$1 نظر ثانیاں}} اور {{PLURAL:$2|1 ملف|$2 املاف}} بحال",
-       "undeletedfiles": "{{PLURAL:$1|1 ملف|$1 املاف}} بحال",
+       "undeletedrevisions-files": "{{PLURAL:$1|1 نسخہ|$1 نسخے}} اور {{PLURAL:$2|1 فائل|$2 فائلیں}} بحال",
+       "undeletedfiles": "{{PLURAL:$1|1 فائل|$1 فائل}} بحال کی {{PLURAL:$1|گئی|گئیں}}",
+       "cannotundelete": "کلی یا جزوی طور پر بحالی کا اقدام ناکام رہا:\n$1",
+       "undeletedpage": "<strong>$1 کو بحال کر دیا گیا</strong>\n\nحالیہ حذف شدگیوں اور بحالیوں کا نوشتہ دیکھنے کے لیے [[Special:Log/delete|نوشتہ حذف شدگی]] ملاحظہ فرمائیں۔",
        "undelete-header": "حالیہ حذف شدہ صفحات کے لیے [[Special:Log/delete|نوشتۂ حذف شدگی]] دیکھیں۔",
        "undelete-search-title": "حذف شدہ صفحات میں تلاش کریں",
        "undelete-search-box": "حذف شدہ صفحات میں تلاش کریں",
        "undelete-search-prefix": "اظہار صفحات بآغاز از:",
        "undelete-search-submit": "تلاش",
        "undelete-no-results": "حذف شدہ صفحات میں ایسا کوئی صفحہ نہیں ملا",
+       "undelete-filename-mismatch": " $1 کے نسخے کو بحال نہیں کیا جا سکتا: فائل کا نام مطابقت نہیں رکھتا۔",
+       "undelete-bad-store-key": " $1 کے نسخے کو بحال نہیں کیا جا سکتا: حذف شدگی سے قبل فائل موجود نہیں تھی۔",
+       "undelete-cleanup-error": "غیر مستعمل تاریخچہ «$1» کو حذف کرنے کے دوران میں نقص۔",
+       "undelete-missing-filearchive": "$1 شناختی نمبر کی فائل بحال نہیں کی جا سکی کیونکہ وہ ڈیٹابیس میں موجود نہیں ہے۔\nشاید اسے پہلے ہی بحال کر دیا گیا ہو۔",
+       "undelete-error": "صفحہ کی بحالی کے دوران میں نقص",
+       "undelete-error-short": "فائل کی بحالی کے دوران میں نقص: $1",
+       "undelete-error-long": "فائل کی بحالی کے دوران میں نقص واقع ہوا:\n\n$1",
+       "undelete-show-file-confirm": "کیا آپ واقعی فائل <nowiki>$1</nowiki> کا مورخہ $2 بوقت $3 بجے کا حذف شدہ نسخہ دیکھنا چاہتے ہیں؟",
        "undelete-show-file-submit": "ہاں",
        "namespace": "نام فضا:",
-       "invert": "انتخاب بالعکس",
-       "tooltip-invert": "منتخب شدہ فضائے نام (اور مُلحقہ فضائے نام) میں شامل صفحات کی تبدیلیوں کو چُھپانے کیلئے اِس خانہ کو ٹِک کریں۔",
-       "namespace_association": "متعلقہ نام فضا",
-       "blanknamespace": "(مرکز)",
-       "contributions": "{{GENDER:$1|صارف}} شراکتیں",
-       "contributions-title": "مساہماتِ صارف برائے $1",
-       "mycontris": "شراکت",
+       "invert": "انتخاب معکوس",
+       "tooltip-invert": "منتخب نام فضا (اور مُلحقہ نام فضا) میں شامل صفحات کی تبدیلیوں کو چھپانے کے لیے اس خانہ کو نشان زد کریں۔",
+       "tooltip-whatlinkshere-invert": "منتخب نام فضا میں موجود صفحات کے روابط چھپانے کے لیے اس خانہ کو نشان زد کریں۔",
+       "namespace_association": "ملحقہ نام فضا",
+       "tooltip-namespace_association": "منتخب نام فضا سے منسلک تبادلۂ خیال یا ذیلی نام فضا کو شامل کرنے کے لیے اس خانہ کو نشان زد کریں",
+       "blanknamespace": "(مرکزی)",
+       "contributions": "{{GENDER:$1|صارف}} کی شراکتیں",
+       "contributions-title": "صارف $1 کی شراکتیں",
+       "mycontris": "شراکتیں",
        "anoncontribs": "شراکتیں",
-       "contribsub2": "برائے {{GENDER:$3|$1}} ($2)",
-       "uctop": "(موجودہ)",
+       "contribsub2": "{{GENDER:$3|$1}} ($2)",
+       "contributions-userdoesnotexist": "«$1» کے نام سے صارف کھاتہ مندرج نہیں ہے۔",
+       "nocontribs": "اس معیار کے مطابق کوئی ترمیم دستیاب نہیں ہوئی۔",
+       "uctop": "(موجودہ نسخہ)",
        "month": "مہینہ (اور اُس سے قبل):",
        "year": "سال (اور اُس سے قبل):",
-       "sp-contributions-newbies": "صرف نئے کھاتوں کے مساہمات دکھاؤ",
+       "sp-contributions-newbies": "محض جدید صارفین کی شراکتیں دکھائیں",
+       "sp-contributions-newbies-sub": "جدید صارفین کے",
+       "sp-contributions-newbies-title": "جدید صارفین کی شراکتیں",
        "sp-contributions-blocklog": "نوشتۂ پابندی",
-       "sp-contributions-uploads": "اثقالات",
+       "sp-contributions-suppresslog": "{{GENDER:$1|صارف}} کی پوشیدہ شراکتیں",
+       "sp-contributions-deleted": "{{GENDER:$1|صارف}} کی حذف شدہ شراکتیں",
+       "sp-contributions-uploads": "اپلوڈ کردہ",
        "sp-contributions-logs": "نوشتہ جات",
-       "sp-contributions-talk": "گفتگو",
+       "sp-contributions-talk": "تبادلۂ خیال",
        "sp-contributions-userrights": "انتظام اختیارات صارف",
-       "sp-contributions-search": "تلاش برائے مساہمات",
-       "sp-contributions-username": "آئی.پی پتہ یا اسمِ صارف:",
-       "sp-contributions-toponly": "صرف حالیہ ترین نظرثانی ترمیمات دِکھاؤ",
+       "sp-contributions-blocked-notice": "اس صارف پر پابندی لگائی گئی ہے۔\nحوالہ کے لیے نوشتہ پابندی کا تازہ ترین اندراج ذیل میں دستیاب ہے:",
+       "sp-contributions-blocked-notice-anon": "اس آئی پی پتے پر پابندی لگا دی گئی ہے۔\nحوالہ کے لیے نوشتہ پابندی کا تازہ ترین اندراج ذیل میں دستیاب ہے:",
+       "sp-contributions-search": "شراکتوں میں تلاش کریں",
+       "sp-contributions-username": "آئی پی پتا یا صارف نام:",
+       "sp-contributions-toponly": "محض نئے نسخوں پر مشتمل ترامیم دکھائیں",
+       "sp-contributions-newonly": "محض نئے صفحات دکھائیں",
        "sp-contributions-hideminor": "معمولی ترامیم چھپائیں",
        "sp-contributions-submit": "تلاش",
-       "whatlinkshere": "ادھر کونسا ربط ہے",
-       "whatlinkshere-title": "\"$1\" سے مربوط صفحات",
+       "whatlinkshere": "مربوط صفحات",
+       "whatlinkshere-title": "«$1» سے مربوط صفحات",
        "whatlinkshere-page": "صفحہ:",
-       "linkshere": "'''[[:$1]]''' سے درج ذیل صفحات مربوط ہیں:",
-       "nolinkshere": "'''[[:$1]]''' سے کوئی روابط نہیں۔",
-       "isredirect": "لوٹایا گیا صفحہ",
+       "linkshere": "<strong>[[:$1]]</strong> سے درج ذیل صفحات مربوط ہیں:",
+       "nolinkshere": "<strong>[[:$1]]</strong> سے کوئی صفحہ مربوط نہیں ہے۔",
+       "nolinkshere-ns": "منتخب نام فضا میں <strong>[[:$1]]</strong> سے مربوط کوئی صفحہ نہیں ہے۔",
+       "isredirect": "رجوع مکرر صفحہ",
        "istemplate": "شامل شدہ",
-       "isimage": "ربطِ ملف",
+       "isimage": "فائل کا ربط",
        "whatlinkshere-prev": "{{PLURAL:$1|پچھلا|پچھلے $1}}",
        "whatlinkshere-next": "{{PLURAL:$1|اگلا|اگلے $1}}",
-       "whatlinkshere-links": "روابط ←",
+       "whatlinkshere-links": "→ روابط",
        "whatlinkshere-hideredirs": "رجوع مکررات $1",
-       "whatlinkshere-hidetrans": "$1 استعمالات",
+       "whatlinkshere-hidetrans": "استعمالات $1",
        "whatlinkshere-hidelinks": "روابط $1",
-       "whatlinkshere-hideimages": "رÙ\88ابطÙ\90 ØªØµØ§Ù\88Û\8cر $1",
-       "whatlinkshere-filters": "Ù\81Ù\84ٹرذ",
+       "whatlinkshere-hideimages": "تصÙ\88Û\8cر Ú©Û\92 Ø±Ù\88ابط $1",
+       "whatlinkshere-filters": "Ù\85Ù\82طارات",
        "whatlinkshere-submit": "ٹھیک",
+       "autoblockid": "خودکار پابندی #$1",
+       "block": "صارف مسدود کریں",
+       "unblock": "صارف سے پابندی ہٹائیں",
        "blockip": "داخلہ ممنوع برائے صارف",
        "blockip-legend": "ممنوع کردہ صارفین",
+       "ipaddressorusername": "آئی پی پتہ یا صارف نام:",
+       "ipbexpiry": "وقت اختتام:",
        "ipbreason": "وجہ:",
+       "ipbreason-dropdown": "* عمومی وجوہات پابندی\n** غلط معلومات کا اندراج\n** صفحات سے متن کا مٹانا\n** بیرونی روابط میں بے کار روابط کی فاضل کاری\n** صفحات میں لغو چیزوں کا اندراج\n** بدتمیزی/بداخلاقی\n** متعدد کھاتوں کا استعمال\n** ناقابلِ قبول اسمِ صارف",
+       "ipb-hardblock": "اس آئی پی پتے سے داخل شدہ صارفین کو ترمیم کاری سے باز رکھیں",
+       "ipbcreateaccount": "کھاتہ سازی سے باز رکھیں",
+       "ipbemailban": "برقی خط بھیجنے سے باز رکھیں",
        "ipbsubmit": "اس صارف کا داخلہ ممنوع کریں",
+       "ipbother": "دیگر وقت:",
        "ipboptions": "2 گھنٹے:2 hours,1 یوم:1 day,3 ایام:3 days,1 ہفتہ:1 week,2 ہفتے:2 weeks,1 مہینہ:1 month,3 مہینے:3 months,6 مہینے:6 months,1 سال:1 year,لامحدود:infinite",
+       "ipbhidename": "ترامیم اور فہرستوں سے صارف نام کو چھپائیں",
+       "ipbwatchuser": "اس صارف کے صارف اور تبادلۂ خیال صفحات کو زیر نظر کریں",
+       "ipb-disableusertalk": "بحالت پابندی اس صارف کو اپنے ذاتی تبادلۂ خیال صفحہ میں ترمیم کرنے سے باز رکھیں",
+       "ipb-change-block": "ان ترتیبات کے ساتھ اس صارف پر دوبارہ پابندی لگائیں",
+       "ipb-confirm": "پابندی کی تصدیق کریں",
+       "badipaddress": "نادرست آئی پی پتا",
+       "blockipsuccesssub": "پابندی لگا دی گئی",
+       "blockipsuccesstext": "[[Special:Contributions/$1|$1]] پر پابندی لگادی گئی۔<br />\nپابندیوں پر نظر ثانی کے لیے [[Special:BlockList|فہرست پابندی]] دیکھیں۔",
+       "ipb-blockingself": "آپ اپنے آپ پر پابندی لگانے جا رہے ہیں! کیا آپ واقعی ایسا کرنا چاہتے ہیں؟",
+       "ipb-edit-dropdown": "وجوہات پابندی میں ترمیم کریں",
+       "ipb-unblock-addr": "$1 سے پابندی ہٹائیں",
+       "ipb-unblock": "صارف نام یا آئی پی پتے سے پابندی ہٹائیں",
+       "ipb-blocklist": "موجودہ پابندیاں دیکھیں",
+       "ipb-blocklist-contribs": "{{GENDER:$1|$1}} کی شراکتیں",
+       "ipb-blocklist-duration-left": "$1 باقی ہے",
+       "unblockip": "صارف سے پابندی ہٹائیں",
+       "unblockiptext": "گزشتہ ممنوع صارف یا آئی پی پتے کی تحریری دسترس بحال کرنے کے لیے درج ذیل فارم استعمال کریں۔",
+       "ipusubmit": "اس پابندی کو ہٹائیں",
+       "unblocked": "[[User:$1|$1]] سے پابندی ہٹا دی گئی۔",
+       "unblocked-range": "$1 سے پابندی ہٹا دی گئی۔",
+       "unblocked-id": "پابندی نمبر $1 سے پابندی ہٹا دی گئی۔",
+       "unblocked-ip": "[[Special:Contributions/$1|$1]] سے پابندی ہٹا دی گئی۔",
+       "blocklist": "ممنوع صارفین",
        "ipblocklist": "ممنوع صارفین",
+       "ipblocklist-legend": "ممنوع صارف کو تلاش کریں",
+       "blocklist-userblocks": "کھاتے کی پابندیاں چھپائیں",
+       "blocklist-tempblocks": "عارضی پابندیاں چھپائیں",
+       "blocklist-addressblocks": "تنہا آئی پی پابندیوں کو چھپائیں",
+       "blocklist-rangeblocks": "رینج پابندیاں چھپائیں",
+       "blocklist-timestamp": "وقت کی مہر",
+       "blocklist-target": "ہدف",
+       "blocklist-expiry": "وقت اختتام",
+       "blocklist-by": "منتظم",
+       "blocklist-params": "پابندی کے پیرامیٹر",
        "blocklist-reason": "وجہ",
        "ipblocklist-submit": "تلاش",
-       "infiniteblock": "مستقل",
+       "ipblocklist-localblock": "مقامی پابندی",
+       "ipblocklist-otherblocks": "دیگر {{PLURAL:$1|پابندی|پابندیاں}}",
+       "infiniteblock": "لا محدود",
+       "expiringblock": "مورخہ $1 بوقت $2 بجے اختتام پزیر ہوگی",
+       "anononlyblock": "محض گمنام صارف",
+       "noautoblockblock": "خودکار پابندی غیر فعال",
+       "createaccountblock": "کھاتہ سازی غیر فعال",
+       "emailblock": "برقی خط غیر فعال",
+       "blocklist-nousertalk": "اپنے ذاتی تبادلۂ خیال میں ترمیم نہیں کر سکتا",
+       "ipblocklist-empty": "پابندیوں کی فہرست خالی ہے۔",
+       "ipblocklist-no-results": "درخواست شدہ آئی پی پتے یا صارف نام پر پابندی عائد نہیں ہے",
        "blocklink": "پابندی لگائیں",
        "unblocklink": "پابندی ختم",
        "change-blocklink": "پابندی میں تبدیلی",
        "contribslink": "شراکتیں",
+       "emaillink": "ای میل بھیجیں",
+       "autoblocker": "خودکار طور پر پابندی لگائی گئی ہے کیونکہ حال ہی میں آپ کا آئی پی پتا «[[User:$1|$1]]» نے استعمال کیا ہے۔\n$1 پر پابندی عائد کرنے کی وجہ یہ بتائی گئی: \"$2\"",
        "blocklogpage": "نوشتۂ پابندی",
+       "blocklog-showlog": "اس صارف پر پہلے پابندی عائد کی گئی تھی۔\nحوالہ کے لیے ذیل میں نوشتہ پابندی موجود ہے:",
+       "blocklog-showsuppresslog": "اس صارف پر پہلے پابندی عائد یا اسے پوشیدہ کیا گیا تھا۔\nحوالہ کے لیے ذیل میں نوشتہ ُپوشیدگی درج ہے:",
+       "blocklogentry": "«[[$1]]» پر $2 کے لیے پابندی عائد کی گئی ہے $3",
+       "reblock-logentry": "[[$1]] کی ترتیبات پابندی کو تبدیل کیا، اب میعاد $2 $3 پر ختم ہوگی",
+       "blocklogtext": "ذیل میں صارف پر پابندی عائد کرنے اور ہٹانے کا نوشتہ ہے۔\nخودکار طور پر ممنوع آئی پی پتے یہاں درج نہیں ہیں۔\nموجودہ جاری پابندیوں اور معطلیوں کی فہرست دیکھنے کے لیے [[Special:BlockList|فہرست پابندی]] ملاحظہ فرمائیں۔",
+       "unblocklogentry": "$1 سے پابندی ہٹائی گئی",
+       "block-log-flags-anononly": "محض نامعلوم صارفین",
        "block-log-flags-nocreate": "کھاتے کی تخلیق غیرفعال",
+       "block-log-flags-noautoblock": "خودکار پابندی غیر فعال",
+       "block-log-flags-noemail": "برقی خط غیر فعال",
+       "block-log-flags-nousertalk": "اپنے ذاتی تبادلۂ خیال میں ترمیم نہیں کر سکتا",
+       "block-log-flags-angry-autoblock": "پیشرفتہ خودکار پابندی فعال",
+       "block-log-flags-hiddenname": "صارف نام پوشیدہ ہے",
+       "range_block_disabled": "منتظمین سے رینج پر پابندی لگانے کا اختیار واپس لے لیا گیا ہے۔",
+       "ipb_expiry_invalid": "وقت اختتام نادرست ہے۔",
+       "ipb_expiry_old": "وقت اختتام گزر چکا ہے۔",
+       "ipb_expiry_temp": "پوشیدہ صارف نام پر عائد کی جانے والی پابندیاں مستقل ہونا لازمی ہے۔",
+       "ipb_hide_invalid": "اس کھاتے کو دبایا نہیں جا سکا؛ اس کھاتے سے {{PLURAL:$1|ایک ترمیم کی گئی ہے|$1 ترامیم کی گئی ہیں}}۔",
+       "ipb_already_blocked": "«$1» پر پہلے ہی پابندی لگا دی گئی ہے۔",
+       "ipb-needreblock": "«$1» پر پہلے ہی پابندی لگا دی گئی ہے۔ کیا آپ ان ترتیبات کو تبدیل کرنا چاہتے ہیں؟",
+       "ipb-otherblocks-header": "دیگر {{PLURAL:$1|پابندی|پابندیاں}}",
+       "unblock-hideuser": "چونکہ اس صارف کا نام پوشیدہ ہے لہذا آپ اس صارف سے پابندی نہیں ہٹا سکتے۔",
+       "ipb_cant_unblock": "نقص: پابندی کا شناختی نمبر $1 نہیں ملا۔ شاید پہلے ہی یہ پابندی ہٹا دی گئی ہو۔",
+       "ipb_blocked_as_range": "نقص: آئی پتا $1 پر براہ راست پابندی نہیں ہے اور اس کی پابندی ختم نہیں کی جا سکتی۔\nتاہم اس آئی پی پر $2 رینج کے ایک حصے کے طور پر پابندی لگائی گئی ہے، چنانچہ اس رینج کی پابندی ختم کی جا سکتی ہے۔",
+       "ip_range_invalid": "آئی پی پتے کی رینج نادرست ہے۔",
+       "ip_range_toolarge": "/$1 سے زیادہ بڑی رینج پابندیوں کی اجازت نہیں ہے۔",
+       "proxyblocker": "پراکسی مسدود کنندہ",
+       "proxyblockreason": "آپ کے آئی پی پتے پر پابندی لگا دی گئی ہے کیونکہ یہ اوپن پراکسی ہے۔\nبراہ کرم انٹرنیٹ خدمات فراہم کرنے والے یا اپنی تنظیم کے تکنیکی معاون سے رابطہ کریں اور انہیں اس سنجیدہ مسئلہ سے آگاہ کریں۔",
+       "sorbsreason": "{{SITENAME}} کے زیر استعمال DNSBL میں آپ کا آئی پی پتا اوپن پراکسی کے طور پر درج فہرست ہے۔",
+       "sorbs_create_account_reason": "{{SITENAME}} کے زیر استعمال DNSBL میں آپ کا آئی پی پتا اوپن پراکسی کے طور پر درج فہرست ہے۔\nآپ کھاتہ نہیں بنا سکتے۔",
+       "ipbblocked": "آپ دیگر صارفین پر پابندی لگا یا ہٹا نہیں سکتے کیونکہ خود آپ پر پابندی عائد کی گئی ہے۔",
+       "ipbnounblockself": "آپ کو اپنی ذات سے پابندی ہٹانے کی اجازت نہیں ہے۔",
+       "lockdb": "ڈیٹابیس مقفل کریں",
+       "unlockdb": "ڈیٹابیس غیر مقفل کریں",
+       "lockconfirm": "ہاں، میں واقعی ڈیٹابیس کو مقفل کرنا چاہتا ہوں۔",
+       "unlockconfirm": "ہاں، میں واقعی ڈیٹابیس کو غیر مقفل کرنا چاہتا ہوں۔",
+       "lockbtn": "ڈیٹابیس مقفل کریں",
+       "unlockbtn": "ڈیٹابیس غیر مقفل کریں",
+       "locknoconfirm": "آپ نے تصدیقی خانے پر نشان زد نہیں کیا ہے۔",
+       "lockdbsuccesssub": "ڈیٹابیس کو مقفل کر دیا گیا",
+       "unlockdbsuccesssub": "ڈیٹابیس کو غیر مقفل کر دیا گیا",
+       "lockdbsuccesstext": "ڈیٹابیس مقفل کر دیا گیا۔<br />\nنگہداشت مکمل ہو جانے کے بعد ڈیٹابیس کو [[Special:UnlockDB|غیر مقفل کرنا]] نہ بھولیں۔",
+       "unlockdbsuccesstext": "ڈیٹابیس کو غیر مقفل کر دیا گیا۔",
+       "databaselocked": "ڈیٹابیس پہلے سے مقفل ہے۔",
+       "databasenotlocked": "ڈیٹابیس مقفل نہیں ہے۔",
+       "lockedbyandtime": "(بذریعہ {{GENDER:$1|$1}} مورخہ $2 بوقت $3 بجے)",
        "move-page": "منتقلی $1",
        "move-page-legend": "منتقلئ صفحہ",
-       "movepagetext": "درج ذیل فارم کے ذریعہ صفحہ کو نیا نام دیا جاسکتا ہے، اس کے ساتھ صفحہ کا تاریخچہ بھی منتقل ہو جائے گا اور\nنئے عنوان کے جانب قدیم عنوان کو رجوع مکرر کردیا جائے گا۔\n\nاس بات کا یقین کر لیں کہ [[Special:DoubleRedirects|دوہرے]] یا [[Special:BrokenRedirects|شکستہ رجوع مکررات]] موجود نہ ہوں۔\n\nنیز آپ اس بات کو بھی یقینی بنانے کے ذمہ دار ہیں کہ روابط انہیں جگہوں سے مربوط رہیں جہاں ہونا چاہیے۔\n\nخیال رہے کہ یہ صفحہ منتقل '''نہیں''' ہوگا اگر نئے عنوان کے ساتھ صفحہ پہلے سے موجود ہو، ہاں اگر صفحہ خالی ہو اور اس کا گذشتہ ترمیمی تاریخچہ موجود نہ ہو تو منتقل کیا جا سکتا ہے۔\nاس کا مطلب ہے آپ سے اگر غلطی ہوجائے تو آپ صفحہ کو اسی جگہ لوٹا سکتے ہیں، تاہم موجود صفحہ پر برتحریر (overwrite) نہیں کرسکتے۔\n\n'''انتباہ!'''\nکسی اہم اور مقبول صفحہ کی منتقلی، غیرمتوقع اور پریشان کن بھی ہی ہوسکتی ہے اس لیے \nمنتقلی سے قبل براہ کرم یقین کرلیں کہ آپ اس کے منطقی نتائج سے باخبر ہیں۔",
-       "movepagetext-noredirectfixer": "درج ذیل ورقہ کے ذریعہ صفحہ کو نیا نام دیا جاسکتا ہے، اس کے ساتھ صفحہ کا تاریخچہ بھی منتقل ہوجائیگا۔\nنئے عنوان کے جانب قدیم عنوان کو رجوع مکرر کردیا جائیگا۔\n\nیقین کرلیں کہ [[Special:DoubleRedirects|مکرر]] یا [[Special:BrokenRedirects|شکستہ رجوع مکررات]] موجود نہیں ہیں۔\nآپ اس بات کو یقینی بنانے کے ذمہ دار ہیں کہ روابط انہیں جگہوں سے مربوط ہیں جن کو فرض کیا گیا ہے۔\n\nخیال رہے کہ یہ صفحہ منتقل '''نہیں''' ہوگا اگر نئے عنوان کے ساتھ صفحہ پہلے سے موجود ہو، سوائے اس کے کہ صفحہ خالی ہو اور اس کا گذشتہ ترمیمی تاریخچہ موجود نہ ہو۔\nاس کا مطلب ہے آپ سے اگر غلطی ہوجائے تو آپ صفحہ کو اسی جگہ لوٹا سکتے ہیں، تاہم موجود صفحہ پر برتحریر (overwrite) نہیں کرسکتے۔\n\n'''انتباہ!'''\nکسی اہم اور مقبول صفحہ کی منتقلی، غیرمتوقع اور پریشان کن بھی ہی ہوسکتی ہے اس لیۓ؛ \nمنتقلی سے قبل براہ کرم یقین کرلیجۓ کہ آپ اسکے منطقی نتائج سے باخبر ہیں۔",
+       "movepagetext": "درج ذیل فارم کے ذریعہ صفحہ کو نیا نام دیا جاسکتا ہے، اس کے ساتھ صفحہ کا تاریخچہ بھی منتقل ہو جائے گا اور نئے عنوان کے جانب قدیم عنوان کو رجوع مکرر کردیا جائے گا۔\n\nاس بات کا یقین کر لیں کہ [[Special:DoubleRedirects|دوہرے]] یا [[Special:BrokenRedirects|شکستہ رجوع مکررات]] موجود نہ ہوں۔\n\nنیز آپ اس بات کے بھی ذمہ دار ہیں کہ روابط انہیں جگہوں سے مربوط رہیں جہاں سے ابھی ہیں۔\n\nخیال رہے کہ اگر نئے عنوان سے کوئی صفحہ پہلے سے موجود ہو تو یہ صفحہ منتقل '''نہیں''' ہوگا، ہاں اگر صفحہ خالی ہو اور اس کا گذشتہ ترمیمی تاریخچہ موجود نہ ہو تو منتقل کیا جا سکتا ہے۔\nاس کا مطلب یہ ہے کہ آپ سے اگر غلطی ہوجائے تو آپ صفحہ کو اسی جگہ لوٹا سکتے ہیں، تاہم موجود صفحہ پر برتحریر (overwrite) نہیں کرسکتے۔\n\n<strong>اطلاع:</strong>\nکسی اہم اور مقبول صفحہ کی منتقلی، غیرمتوقع اور پریشان کن بھی ہی ہوسکتی ہے اس لیے منتقلی سے قبل یقین کرلیں کہ آپ اس کے منطقی نتائج سے باخبر ہیں۔",
+       "movepagetext-noredirectfixer": "درج ذیل فارم کے ذریعہ صفحہ کو نیا نام دیا جاسکتا ہے، اس کے ساتھ صفحہ کا تاریخچہ بھی منتقل ہو جائے گا اور نئے عنوان کے جانب قدیم عنوان کو رجوع مکرر کردیا جائے گا۔\n\nاس بات کا یقین کر لیں کہ [[Special:DoubleRedirects|دوہرے]] یا [[Special:BrokenRedirects|شکستہ رجوع مکررات]] موجود نہ ہوں۔\n\nنیز آپ اس بات کے بھی ذمہ دار ہیں کہ روابط انہیں جگہوں سے مربوط رہیں جہاں سے ابھی ہیں۔\n\nخیال رہے کہ اگر نئے عنوان سے کوئی صفحہ پہلے سے موجود ہو تو یہ صفحہ منتقل '''نہیں''' ہوگا، ہاں اگر صفحہ خالی ہو اور اس کا گذشتہ ترمیمی تاریخچہ موجود نہ ہو تو منتقل کیا جا سکتا ہے۔\nاس کا مطلب یہ ہے کہ آپ سے اگر غلطی ہوجائے تو آپ صفحہ کو اسی جگہ لوٹا سکتے ہیں، تاہم موجود صفحہ پر برتحریر (overwrite) نہیں کرسکتے۔\n\n<strong>اطلاع:</strong>\nکسی اہم اور مقبول صفحہ کی منتقلی، غیرمتوقع اور پریشان کن بھی ہی ہوسکتی ہے اس لیے منتقلی سے قبل یقین کرلیں کہ آپ اس کے منطقی نتائج سے باخبر ہیں۔",
+       "movepagetalktext": "اگر آپ اس خانے کو نشان زد کریں تو ملحقہ تبادلہ خیال صفحہ بھی نئے عنوان کی جانب خودکار طور پر منتقل ہو جائے گا اگر اس عنوان کے تحت پہلے سے کوئی تبادلۂ خیال صفحہ موجود نہ ہو۔\n\nاس صورت میں آپ کو دستی طور پر اس صفحہ کو منتقل ضم کرنا ہوگا۔",
+       "moveuserpage-warning": "<strong>انتباہ:</strong> آپ صارف صفحہ کو منتقل کر رہے ہیں۔ واضح رہے کہ اس منتقلی کے بعد صارف کا محض صفحہ منتقل ہوگا، اس کا صارف نام تبدیل <em>نہیں</em> ہوگا۔",
+       "movecategorypage-warning": "<strong>انتباہ:</strong> آپ زمرہ منتقل کر رہے ہیں۔ واضح رہے کہ منتقلی کے بعد اس زمرے میں موجود صفحات نئے زمرے میں منتقل <em>نہیں</em> ہونگے۔",
+       "movenologintext": "صفحہ کو منتقل کرنے کے لیے آپ کو اپنے کھاتے میں [[Special:UserLogin|داخل ہونا]] ضروری ہے۔",
+       "movenotallowed": "آپ کو صفحات منتقل کرنے کی اجازت نہیں ہے۔",
+       "movenotallowedfile": "آپ کو فائلیں منتقل کرنے کی اجازت نہیں ہے۔",
+       "cant-move-user-page": "آپ کو صارف صفحات منتقل کرنے کی اجازت نہیں ہے (ذیلی صفحات اس سے مستثنی ہیں)۔",
+       "cant-move-to-user-page": "کسی صفحہ کو کسی صارف صفحہ میں منتقل کرنے کی اجازت نہیں ہے (صارف کا ذیلی صفحہ اس سے مستثنی ہے)۔",
+       "cant-move-category-page": "آپ کو زمرہ جات منتقل کرنے کی اجازت نہیں ہے۔",
+       "cant-move-to-category-page": "کسی صفحہ کو زمرے میں منتقل کرنے کی اجازت نہیں ہے۔",
        "newtitle": "نـیــا عـنــوان:",
-       "move-watch": "صÙ\81Ø­Û\81 Ø²Û\8cر Ù\86ظر",
+       "move-watch": "اصÙ\84 Ø§Ù\88ر Û\81دÙ\81 ØµÙ\81Ø­Û\81 Ú©Ù\88 Ø²Û\8cر Ù\86ظر Ú©Ø±Û\8cÚº",
        "movepagebtn": "مـنـتـقـل",
        "pagemovedsub": "انتقال کامیاب",
        "movepage-moved": "<strong>\"$1\" کو \"$2\" کی جانب منتقل کر دیا گیا</strong>",
        "movepage-moved-redirect": "رجوع مکرر تخلیق کر دیا گیا۔",
        "movepage-moved-noredirect": "رجوع مکرر کو بننے سے روک دیا گیا ہے۔",
        "articleexists": "اس عنوان سے کوئی صفحہ پہلے ہی موجود ہے، یا آپکا منتخب کردہ نام مستعمل نہیں۔ براۓ مہربانی دوسرا نام منتخب کیجیۓ۔",
+       "cantmove-titleprotected": "آپ اس جگہ کسی صفحہ کو منتقل نہیں کر سکتے کیونکہ اس نئے عنوان کی تخلیق کو محفوظ کر دیا گیا ہے۔",
+       "movetalk": "ملحقہ تبادلۂ خیال صفحہ بھی منتقل کریں",
+       "move-subpages": "ذیلی صفحات منتقل کریں ($1 سے زیادہ)",
+       "move-talk-subpages": "تبادلۂ خیال صفحہ کے ذیلی صفحات منتقل کریں ($1 سے زیادہ)",
+       "movepage-page-exists": "صفحہ $1 پہلے سے موجود ہے اور خودکار طور پر برتحریر نہیں کیا جا سکتا۔",
+       "movepage-page-moved": "صفحہ $1 کو $2 کی جانب منتقل کر دیا گیا۔",
+       "movepage-page-unmoved": "صفحہ $1 کو $2 کی جانب منتقل نہیں کیا جا سکا۔",
+       "movepage-max-pages": "$1 کی زیادہ سے زیادہ تعداد تک {{PLURAL:$1|صفحہ منتقل کر دیا گیا ہے|صفحات منتقل کر دیے گئے ہیں}}، اب خودکار طور پر مزید صفحے منتقل نہیں کیے جا سکتے۔",
        "movelogpage": "نوشتۂ منتقلی",
+       "movelogpagetext": "ذیل میں ان تمام صفحات کی فہرست درج ہے جو منتقل کیے گئے ہیں۔",
+       "movesubpage": "{{PLURAL:$1|ذیلی صفحہ|ذیلی صفحات}}",
+       "movesubpagetext": "ذیل میں اس صفحہ {{PLURAL:$1|کا|کے}} $1 {{PLURAL:$1|ذیلی صفحہ موجود ہے|ذیلی صفحات موجود ہیں}}۔",
+       "movenosubpage": "اس صفحہ کے ذیلی صفحات موجود نہیں ہیں۔",
        "movereason": "وجہ:",
        "revertmove": "رجوع",
-       "delete_and_move_text": "==حذف شدگی لازم==\n\nمنتقلی کے سلسلے میں انتخاب کردہ مضمون \"[[:$1]]\" پہلے ہی موجود ہے۔ کیا آپ اسے حذف کرکے منتقلی کیلیۓ راستہ بنانا چاہتے ہیں؟",
+       "delete_and_move_text": "منتقلی کے سلسلے میں منتخب شدہ مضمون «[[:$1]]» پہلے سے موجود ہے۔ کیا آپ اسے حذف کرکے منتقلی کے لیے راستہ بنانا چاہتے ہیں؟",
        "delete_and_move_confirm": "ہاں، صفحہ حذف کر دیا جائے",
        "delete_and_move_reason": "[[$1]] سے منتقلی کے سلسلے میں حذف",
+       "selfmove": "اصل اور ہدف صفحے کے عناوین یکساں ہیں؛\nصفحہ کو اسی جگہ پر منتقل نہیں کیا جا سکتا۔",
+       "immobile-source-namespace": "«$1» نام فضا میں صفحات منتقل نہیں کیے جا سکتے۔",
+       "immobile-target-namespace": "«$1» نام فضا میں صفحات منتقل نہیں کیے جا سکتے۔",
+       "immobile-target-namespace-iw": "صفحہ منتقل کرنے کے لیے بین الویکی ربط درست ہدف نہیں ہے۔",
+       "immobile-source-page": "اس صفحہ کو منتقل نہیں کیا جا سکتا۔",
+       "immobile-target-page": "اس ہدف عنوان کی جانب منتقل نہیں کیا جا سکتا۔",
+       "bad-target-model": "مطلوبہ منزل میں مواد کا مختلف ماڈل زیر استعمال ہے۔ لہذا $1 سے $2 میں تبدیلی نہیں ہو سکی۔",
+       "imagenocrossnamespace": "فائل کو غیر فائل نام فضا میں منتقل نہیں کیا جا سکتا۔",
+       "nonfile-cannot-move-to-file": "غیر فائل کو فائل نام فضا میں منتقل نہیں کیا جا سکتا۔",
+       "imagetypemismatch": "نئی فائل کی توسیع اس کی نوعیت کے مطابق نہیں ہے۔",
+       "imageinvalidfilename": "ہدف فائل کا نام نادرست ہے۔",
+       "fix-double-redirects": "اصل عنوان کی جانب موجود تمام رجوع مکررات کو بھی تازہ کریں",
+       "move-leave-redirect": "پیچھے رجوع مکرر بنائیں",
+       "protectedpagemovewarning": "<strong>انتباہ:</strong> اس صفحہ کو محفوظ کر دیا گیا ہے اور اب محض منتظمین ہی اسے منتقل کر سکتے ہیں۔\nحوالہ کے لیے نوشتہ کا جدید اندراج ذیل میں درج ہے:",
+       "semiprotectedpagemovewarning": "<strong>اطلاع:</strong> یہ صفحہ نیم محفوظ ہے اور اسے محض مندرج صارفین ہی منتقل کر سکتے ہیں۔\nذیل میں حوالہ کے لیے نوشتہ کا تازہ ترین اندراج موجود ہے:",
+       "move-over-sharedrepo": "[[:$1]] ایک مشترکہ ذخیرے میں موجود ہے۔ چنانچہ اس عنوان کی جانب کسی فائل کو منتقل کرنے پر مشترکہ فائل منسوخ ہو جائے گی۔",
+       "file-exists-sharedrepo": "فائل کا منتخب کردہ نام ایک مشترکہ ذخیرے میں پہلے ہی سے زیر استعمال ہے۔\nبراہ کرم کوئی دوسرا نام درج کریں۔",
        "export": "برآمد صفحات",
+       "exportall": "تمام صفحات برآمد کریں",
+       "exportcuronly": "مکمل تاریخچہ کی بجائے محض موجودہ نسخہ کو شامل کریں",
+       "exportnohistory": "----\n<strong>اطلاع:</strong> اس فارم کے ذریعہ صفحات کے مکمل تاریخچہ کی برآمد کو بوجوہ غیر فعال کر دیا گیا ہے۔",
+       "exportlistauthors": "ہر صفحہ کے مشارکت کنندگان کی مکمل فہرست شامل کریں",
+       "export-submit": "برآمد کریں",
+       "export-addcattext": "اس زمرہ سے صفحات شامل کریں:",
+       "export-addcat": "شامل کریں",
+       "export-addnstext": "اس نام فضا سے صفحات شامل کریں:",
+       "export-addns": "شامل کریں",
+       "export-download": "فائل کے طور پر محفوظ کریں",
+       "export-templates": "سانچے شامل کریں",
+       "export-pagelinks": "مربوط صفحات کو اس گہرائی تک شامل کریں:",
+       "export-manual": "صفحات کو دستی طور پر شامل کریں:",
        "allmessages": "نظامی پیغامات",
        "allmessagesname": "نام",
        "allmessagesdefault": "طے شدہ متن",
        "allmessagescurrent": "موجودہ متن",
-       "allmessagestext": "یہ میڈیاویکی: جاۓ نام میں دستیاب نظامی پیغامات کی فہرست ہے۔",
+       "allmessagestext": "ذیل میں میڈیاویکی نام فضا میں دستیاب نظامی پیغامات کی فہرست موجود ہے۔\nاگر آپ میڈیاویکی کا ترجمہ کرنا چاہتے ہیں تو [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation میڈیاویکی مقامیت کاری] اور [https://translatewiki.net translatewiki.net] ملاحظہ فرمائیں۔",
+       "allmessagesnotsupportedDB": "اس صفحہ کو استعمال نہیں کیا جا سکتا کیونکہ <strong>$wgUseDatabaseMessages</strong> کو غیر فعال کر دیا گیا ہے۔",
+       "allmessages-filter-legend": "مقطار",
        "allmessages-filter": "تلاش بلحاظ:",
+       "allmessages-filter-unmodified": "غیر تبدیل شدہ",
        "allmessages-filter-all": "تمام",
        "allmessages-filter-modified": "تبدیل شدہ",
        "allmessages-prefix": "تلاش بلحاظ سابقہ:",
        "allmessages-filter-submit": "ٹھیک",
        "allmessages-filter-translate": "ترجمہ",
        "thumbnail-more": "چوڑا کریں",
+       "filemissing": "فائل غیر موجود ہے",
+       "thumbnail_error": "تھمب نیل بنانے کے دوران میں نقص: $1",
+       "thumbnail_error_remote": "$1 کی جانب سے پیغام نقص:\n$2",
+       "djvu_page_error": "DjVu صفحہ رینج سے باہر ہے",
+       "djvu_no_xml": "DjVu فائل کے لیے XML حاصل نہیں کیا جا سکتا",
+       "thumbnail-temp-create": "تھمب نیل کی عارضی فائل نہیں بنائی جا سکتی",
+       "thumbnail-dest-create": "تھمب نیل کو ہدف جگہ پر محفوظ نہیں کیا جا سکتا۔",
+       "thumbnail_invalid_params": "تھمب نیل کے پیرامیٹر نادرست ہیں",
+       "thumbnail_toobigimagearea": "فائل کے ابعاد $1 سے زیادہ ہیں۔",
+       "thumbnail_dest_directory": "مقصود ڈائرکٹری کو بنایا نہیں جا سکا",
+       "thumbnail_image-type": "تصویر کی نوعیت معاونت یافتہ نہیں ہے",
+       "thumbnail_image-missing": "معلوم ہوتا ہے کہ یہ فائل موجود نہیں: $1",
+       "thumbnail_image-failure-limit": "حال میں اس تھمب نیل کو بنانے کی ($1 یا زائد) متعدد ناکام کوششیں کی گئی ہیں۔ براہ کرم کچھ دیر بعد دوبارہ کوشش کریں۔",
        "import": "درآمد صفحات",
+       "importinterwiki": "دوسرے ویکی سے درآمد کریں",
+       "import-interwiki-text": "درآمد کرنے کے لیے ویکی اور صفحہ کا عنوان منتخب کریں۔\nنسخوں کی تاریخ اور نسخہ نویسوں کے نام محفوظ رکھے جائیں گے۔\nدوسری ویکیوں سے درآمد کردہ ہر چیز کو [[Special:Log/import|نوشتہ درآمد]] میں درج کیا جاتا ہے۔",
+       "import-interwiki-sourcewiki": "اصل ویکی:",
+       "import-interwiki-sourcepage": "اصل صفحہ:",
+       "import-interwiki-history": "اس صفحہ کے تاریخچے کے تمام نسخوں کو نقل کریں",
+       "import-interwiki-templates": "تمام سانچے شامل کریں",
+       "import-interwiki-submit": "درآمد کریں",
+       "import-mapping-default": "طے شدہ جگہوں پر درآمد کریں",
+       "import-mapping-namespace": "کسی نام فضا میں درآمد کریں:",
+       "import-mapping-subpage": "درج ذیل صفحہ کے ذیلی صفحات کے طور پر درآمد کریں:",
+       "import-upload-filename": "فائل کا نام:",
+       "import-comment": "تبصرہ:",
+       "importtext": "براہ کرم [[Special:Export|برآمد کی سہولت]] کے ذریعہ اصل ویکی سے فائل برآمد کریں۔\nاور اسے اپنے کمپیوٹر میں محفوظ کرکے یہاں اپلوڈ کریں۔",
+       "importstart": "صفحات درآمد کیے جا رہے ہیں۔۔۔",
+       "import-revision-count": "$1 {{PLURAL:$1|نسخہ|نسخے}}",
+       "importnopages": "درآمد کرنے کے لیے کوئی صفحہ نہیں ہے۔",
+       "imported-log-entries": "درآمد کردہ $1 {{PLURAL:$1|اندراج نوشتہ|اندراجات نوشتہ}}۔",
+       "importfailed": "درآمد ناکام: <nowiki>$1</nowiki>",
+       "importunknownsource": "درآمد کے ماخذ کی نوعیت نامعلوم ہے",
+       "importcantopen": "درآمد فائل کھل نہیں سکی",
+       "importbadinterwiki": "غلط بین الویکی ربط",
+       "importsuccess": "درآمد مکمل!",
+       "importnosources": "کسی ایسی ویکی کا اندراج نہیں کیا گیا جہاں سے درآمد کرنا ہے اور تاریخچے کے براہ راست اپلوڈ غیر فعال ہیں۔",
+       "importnofile": "کسی درآمد فائل کو اپلوڈ نہیں کیا گیا۔",
+       "importuploaderrorsize": "درآمد فائل کی اپلوڈ ناکام ہوئی۔\nفائل اپلوڈ کے اجازت یافتہ حجم سے بڑی ہے۔",
+       "importuploaderrorpartial": "درآمد فائل کی اپلوڈ ناکام ہوئی۔\nاس فائل کا محض ایک حصہ اپلوڈ ہوا۔",
+       "importuploaderrortemp": "درآمد فائل کی اپلوڈ ناکام ہوئی۔\nعارضی فولڈر موجود نہیں۔",
+       "import-parse-failure": "درآمد شدہ ایکس ایم ایل کا تجزیہ ناکام",
+       "import-noarticle": "درآمد کرنے کے لیے کوئی صفحہ موجود نہیں!",
+       "import-nonewrevisions": "کسی نسخے کو درآمد نہیں کیا گیا (شاید وہ سب پہلے سے موجود ہیں یا کسی نقص کی بنا پر چھوڑ دیے گئے ہیں)۔",
+       "xml-error-string": "سطر نمبر $2، ستون نمبر $3 میں $1 ($4 بائٹ): $5",
+       "import-upload": "ایکس ایم ایل ڈیٹا اپلوڈ کریں",
+       "import-token-mismatch": "معذرت! نشست کے مواد میں خامی کی وجہ سے آپ کی  ترمیم مکمل نہیں ہو سکی۔\n\nشاید آپ اپنے کھاتے سے خارج ہو گئے ہیں۔ <strong>براہ کرم اس بات کی تصدیق کر لیں کہ آپ داخل ہیں اور دوبارہ کوشش کریں۔</strong> اگر آپ کو پھر بھی مشکل پیش آرہی ہو تو ایک بار [[Special:UserLogout|خارج ہو کر]] واپس داخل ہو جائیں اور اپنے براؤزر کو جانچ لیں کہ آیا وہ اس سائٹ کی کوکیز اخذ کر رہا ہے یا نہیں۔",
+       "import-invalid-interwiki": "اس ویکی سے درآمد نہیں کیا جا سکتا۔",
+       "import-error-edit": "صفحہ «$1» درآمد نہیں کیا جا سکا کیونکہ آپ کو اس میں ترمیم کرنے کی اجازت نہیں ہے۔",
+       "import-error-create": "صفحہ «$1» درآمد نہیں کیا جا سکا کیونکہ آپ کو اسے تخلیق کرنے کی اجازت نہیں ہے۔",
+       "import-error-interwiki": "صفحہ «$1» درآمد نہیں کیا جا سکا کیونکہ اس کا نام بیرونی ربط (بین الویکی) کے لیے محفوظ ہے۔",
+       "import-error-special": "صفحہ «$1» درآمد نہیں کیا جا سکا کیونکہ یہ اس خصوصی نام فضا سے متعلق ہے جس میں صفحات بنانے کی اجازت نہیں۔",
+       "import-error-invalid": "صفحہ «$1» درآمد نہیں کیا جا سکا کیونکہ درآمد کے بعد اس صفحہ کا جو نام ہوگا وہ اس ویکی پر نادرست ہے۔",
+       "import-error-unserialize": "صفحہ «$1» کے نسخہ $2 کے تسلسل کو ختم نہیں کیا جا سکا۔ اس نسخے کے متعلق اطلاع دی گئی ہے کہ اس میں مواد کے ماڈل $3 کو $4 کے تسلسل کے طور پر استعمال کیا گیا تھا۔",
+       "import-error-bad-location": "نسخہ $2 کو جس میں مواد کا ماڈل $3 زیر استعمال ہے اس ویکی کے \"$1\" میں نہیں رکھا جا سکا، کیونکہ اس صفحہ کا ماڈل اس ماڈل سے مختلف ہے۔",
+       "import-options-wrong": "غلط {{PLURAL:$2|اختیار|اختیارات}}: <nowiki>$1</nowiki>",
+       "import-rootpage-invalid": "درج کردہ ماخذی صفحہ کا عنوان نادرست ہے۔",
+       "import-rootpage-nosubpage": "اصل صفحہ کی نام فضا \"$1\" میں ذیلی صفحات کی اجازت نہیں۔",
+       "importlogpage": "نوشتہ درآمد",
+       "importlogpagetext": "دوسری ویکیوں سے تاریخچہ سمیت صفحوں کی انتظامی درآمد کے اقدامات۔",
+       "import-logentry-upload-detail": "$1 {{PLURAL:$1|نسخہ|نسخے}} درآمد {{PLURAL:$1|کیا گیا|کیے گئے}}",
+       "import-logentry-interwiki-detail": "$2 سے $1 {{PLURAL:$1|نسخہ|نسخے}} درآمد {{PLURAL:$1|کیا گیا|کیے گئے}}",
+       "javascripttest": "جاوا اسکرپٹ کی آزمائش",
+       "javascripttest-pagetext-unknownaction": "نامعلوم اقدام \"$1\"",
+       "javascripttest-qunit-intro": "mediawiki.org پر [$1 آزمائشی دستاویز] ملاحظہ فرمائیں",
        "tooltip-pt-userpage": "آپ کا صارف صفحہ",
+       "tooltip-pt-anonuserpage": "آپ جس آئی پی سے ترمیم کاری کر رہے ہیں اس کا صارف صفحہ",
        "tooltip-pt-mytalk": "آپ کا تبادلہ خیال صفحہ",
+       "tooltip-pt-anontalk": "اس آئی پی پتے کی ترامیم سے متعلق گفتگو",
        "tooltip-pt-preferences": "آپ کی ترجیحات",
        "tooltip-pt-watchlist": "اُن صفحات کی فہرست جن کی تبدیلیاں آپ کی زیرِنظر ہیں",
        "tooltip-pt-mycontris": "آپ کی شراکتوں کی فہرست",
-       "tooltip-pt-login": "آپ کیلئے داخلِ نوشتہ ہونا اچھا ہے؛ تاہم، یہ ضروری نہیں",
-       "tooltip-pt-logout": "خارجِ نوشتہ ہوجائیں",
-       "tooltip-pt-createaccount": "آپ کو مدعو کیا جاتا ہے کہ کھاتہ بنائیں۔تاہم کھاتہ بنانا لازم نہیں۔",
-       "tooltip-ca-talk": "مضمون بارے تبادلۂ خیال",
-       "tooltip-ca-edit": "اس صفحے پر ترمیم کریں",
-       "tooltip-ca-addsection": "نیا قطعہ شروع کیجئے",
+       "tooltip-pt-anoncontribs": "اس آئی پی پتے سے انجام دی جانے والی تمام ترامیم کی فہرست",
+       "tooltip-pt-login": "کھاتے میں داخل ہونے کی سفارش کی جاتی ہے؛ تاہم یہ ضروری نہیں",
+       "tooltip-pt-logout": "خارج ہوجائیں",
+       "tooltip-pt-createaccount": "کھاتہ بنانے یا اس میں داخل ہونے کی سفارش کی جاتی ہے؛ تاہم یہ ضروری نہیں",
+       "tooltip-ca-talk": "مضمون کے متعلق گفتگو کریں",
+       "tooltip-ca-edit": "اس صفحہ میں ترمیم کریں",
+       "tooltip-ca-addsection": "نیا قطعہ شروع کریں",
        "tooltip-ca-viewsource": "یہ ایک محفوظ شدہ صفحہ ہے.\nآپ اِس کا مآخذ دیکھ سکتے ہیں",
-       "tooltip-ca-history": "صÙ\81Ø­Û\82 Û\81ٰذا Ú©Û\8c Ø³Ø§Ø¨Ù\82Û\81 Ù\86ظرثاÙ\86Û\8c",
+       "tooltip-ca-history": "اس ØµÙ\81Ø­Û\81 Ú©Û\92 Ø³Ø§Ø¨Ù\82Û\81 Ù\86سخÛ\92",
        "tooltip-ca-protect": "یہ صفحہ محفوظ کیجئے",
+       "tooltip-ca-unprotect": "اس صفحہ کی حفاظت میں تبدیلی کریں",
        "tooltip-ca-delete": "یہ صفحہ حذف کریں",
-       "tooltip-ca-move": "یہ صفحہ منتقل کریں",
+       "tooltip-ca-undelete": "حذف شدہ صفحہ کے نسخے بحال کریں",
+       "tooltip-ca-move": "اس صفحہ کو منتقل کریں",
        "tooltip-ca-watch": "اِس صفحہ کو اپنی زیرِنظرفہرست میں شامل کریں",
        "tooltip-ca-unwatch": "اِس صفحہ کو اپنی زیرِنظرفہرست سے ہٹائیں",
-       "tooltip-search": "تلاش {{SITENAME}}",
-       "tooltip-search-go": "اگر Ø¨Ø§Ù\84Ú©Ù\84 Ø§Ù\90سÛ\8c Ù\86اÙ\85 Ú©Ø§ ØµÙ\81Ø­Û\81 Ù\85Ù\88جÙ\88د Û\81Ù\88 ØªÙ\88 Ø§Ù\8fس ØµÙ\81Ø­Û\81 Ù¾Ø± Ø¬Ø§Ø¤",
-       "tooltip-search-fulltext": "اس متن کیلئے صفحات تلاش کریں",
-       "tooltip-p-logo": "سرÙ\88رÙ\82 Ù¾Ø± Ø¬Ø§Ø¦Û\8cÛ\92",
-       "tooltip-n-mainpage": "اصÙ\84 ØµÙ\81Ø­Û\81 Ù¾Ø± Ø¬Ø§Ø¦Û\8cÛ\92",
-       "tooltip-n-mainpage-description": "صفحہ اول پر جائیے",
-       "tooltip-n-portal": "منصوبہ کے متعلق، آپ کیا کرسکتے ہیں، چیزیں کہاں ڈھونڈنی ہیں",
-       "tooltip-n-currentevents": "حالیہ واقعات پر پس منظری معلومات دیکھیئے",
+       "tooltip-search": "{{SITENAME}} میں تلاش کریں",
+       "tooltip-search-go": "اگر Ø§Ø³Û\8c Ø¹Ù\86Ù\88اÙ\86 Ú©Ø§ ØµÙ\81Ø­Û\81 Ù\85Ù\88جÙ\88د Û\81Û\92 ØªÙ\88 Ø§Ø³ Ù\85Û\8cÚº Ø¬Ø§Ø¦Û\8cÚº",
+       "tooltip-search-fulltext": "اس عبارت کو صفحات میں تلاش کریں",
+       "tooltip-p-logo": "صÙ\81Ø­Û\82 Ø§Ù\88Ù\84 Ù¾Ø± Ø¬Ø§Ø¦Û\8cÚº",
+       "tooltip-n-mainpage": "صÙ\81Ø­Û\82 Ø§Ù\88Ù\84 Ù¾Ø± Ø¬Ø§Ø¦Û\8cÚº",
+       "tooltip-n-mainpage-description": "صفحہ اول پر جائیں",
+       "tooltip-n-portal": "اس منصوبہ کے متعلق، آپ کیا کرسکتے ہیں، چیزیں کہاں ڈھونڈی جائیں",
+       "tooltip-n-currentevents": "حالیہ واقعات سے متعلق پس منظری معلومات ایک نظر میں",
        "tooltip-n-recentchanges": "ویکی میں حالیہ تبدیلیوں کی فہرست",
-       "tooltip-n-randompage": "ایک تصادفی صفحہ لائیے",
-       "tooltip-n-help": "ڈھونڈ نکالنے کی جگہ",
-       "tooltip-t-whatlinkshere": "اÙ\8fÙ\86 ØªÙ\85اÙ\85 Ù\88Û\8cÚ©Û\8c ØµÙ\81حات Ú©Û\8c Ù\81Û\81رست Ø¬Ù\86 Ú©Ø§ Û\8cÛ\81اں Ø±Ø¨Ø· Û\81Û\92",
+       "tooltip-n-randompage": "مضامین کا جستہ جستہ مطالعہ کریں",
+       "tooltip-n-help": "مقام معاونت",
+       "tooltip-t-whatlinkshere": "اÙ\8fÙ\86 ØªÙ\85اÙ\85 Ù\88Û\8cÚ©Û\8c ØµÙ\81حات Ú©Û\8c Ù\81Û\81رست Ø¬Ù\88 Ø§Ø³ ØµÙ\81Ø­Û\81 Ø³Û\92 Ù\85ربÙ\88Ø· Û\81Û\8cÚº",
        "tooltip-t-recentchangeslinked": "اِس صفحہ سے مربوط صفحات میں حالیہ تبدیلیاں",
        "tooltip-feed-rss": "اِس صفحہ کیلئے اسس خورد",
-       "tooltip-feed-atom": "اِس صفحہ کیلئے اٹوم خورد",
-       "tooltip-t-contributions": "نئی تدوین →",
-       "tooltip-t-emailuser": "اِس صارف کو برقی خط ارسال کریں",
-       "tooltip-t-upload": "زبراثقالِ ملفات",
-       "tooltip-t-specialpages": "تمام خاص صفحات کی فہرست",
-       "tooltip-t-print": "اِس صفحہ کا قابلِ طبعہ نسخہ",
-       "tooltip-t-permalink": "صفحہ کے موجودہ نظرثانی کا مستقل ربط",
-       "tooltip-ca-nstab-main": "صفحۂ مضمون دیکھئے",
-       "tooltip-ca-nstab-user": "اِس صارف کے مساہمات کی فہرست دیکھئے",
-       "tooltip-ca-nstab-special": "ہم معذرت خواہ ہیں! آپ اس [[ویکیپیڈیا:نام فضا|نام فضا]] میں ترمیم کا اختیار نہیں رکھتے۔",
+       "tooltip-feed-atom": "اِس صفحہ کا اٹوم فیڈ",
+       "tooltip-t-contributions": "{{GENDER:$1|اس صارف}} کی شراکتوں کی فہرست",
+       "tooltip-t-emailuser": "{{GENDER:$1|اس صارف}} کو برقی خط بھیجیں",
+       "tooltip-t-info": "اس صفحہ کے بارے میں مزید معلومات",
+       "tooltip-t-upload": "فائلیں اپلوڈ کریں",
+       "tooltip-t-specialpages": "جملہ خصوصی صفحات کی فہرست",
+       "tooltip-t-print": "اِس صفحہ کا قابلِ طبع نسخہ",
+       "tooltip-t-permalink": "صفحہ کے اس نسخہ کا مستقل ربط",
+       "tooltip-ca-nstab-main": "مواد پر مشتمل صفحہ دیکھیں",
+       "tooltip-ca-nstab-user": "صارف صفحہ دیکھیں",
+       "tooltip-ca-nstab-media": "میڈیا کا صفحہ دیکھیں",
+       "tooltip-ca-nstab-special": "یہ ایک خصوصی صفحہ ہے، اس میں ترمیم نہیں کی جا سکتی",
        "tooltip-ca-nstab-project": "صفحۂ صارف دیکھئے",
-       "tooltip-ca-nstab-image": "صفحۂ ملف دیکھئے",
-       "tooltip-ca-nstab-template": "سانچہ دیکھئے",
-       "tooltip-ca-nstab-category": "زمرہ‌جاتی صفحہ دیکھئے",
+       "tooltip-ca-nstab-image": "فائل کا صفحہ دیکھیں",
+       "tooltip-ca-nstab-mediawiki": "نظامی پیغام دیکھیں",
+       "tooltip-ca-nstab-template": "سانچہ دیکھیں",
+       "tooltip-ca-nstab-help": "صفحۂ معاونت دیکھیں",
+       "tooltip-ca-nstab-category": "زمرہ‌ دیکھیں",
        "tooltip-minoredit": "اِس تدوین کو بطورِ معمولی ترمیم نشانزد کیجئے",
-       "tooltip-save": "تبدیلیاں محفوظ کیجئے",
-       "tooltip-preview": "برائے مہربانی! محفوظ کرنے سے پہلے تبدیلیوں کا پیش منظر دیکھيے",
+       "tooltip-save": "تبدیلیاں محفوظ کریں",
+       "tooltip-publish": "اپنی تبدیلیاں شائع کریں",
+       "tooltip-preview": "براہ مہربانی! محفوظ کرنے سے پہلے تبدیلیوں کی نمائش دیکھ لیں",
        "tooltip-diff": "دیکھئے کہ اپنے متن میں کیا تبدیلیاں کیں",
        "tooltip-compareselectedversions": "اِس صفحہ کی دو منتخب نظرثانیوں میں فرق دیکھئے",
        "tooltip-watch": "اِس صفحہ کو اپنی زیرِنظرفہرست میں شامل کریں",
+       "tooltip-watchlistedit-normal-submit": "عناوین حذف کریں",
+       "tooltip-watchlistedit-raw-submit": "زیرنظر فہرست کی تجدید کریں",
+       "tooltip-recreate": "حذف شدہ صفحہ ہونے کے باوجود اسے دوبارہ تخلیق کریں",
+       "tooltip-upload": "اپلوڈ کریں",
        "tooltip-rollback": "پچھلے صارف کی کی گئی اِس صفحے پر استرجع شدہ ترامیم کو ایک کلِک میں واپس کریں",
        "tooltip-undo": "''استرجع'' اس ترمیم کو پچھلی ترمیم کے جانب واپس کردیگا اور نمائشی انداز میں خانہ ترمیم کھول دے گا۔ آپ مختصراً سبب بیان کرنے کے بھی مجاز ہونگے۔",
+       "tooltip-preferences-save": "ترجیحات محفوظ کریں",
        "tooltip-summary": "مختصر خلاصہ درج کریں",
        "common.css": "body,\ntextarea {\n    font-family: Amiri;\n}",
-       "anonymous": "{{SITENAME}} گمنام صارف",
+       "anonymous": "{{SITENAME}} {{PLURAL:$1|کا|کے}} گمنام {{PLURAL:$1|صارف|صارفین}}",
+       "siteuser": "{{SITENAME}} $1 صارف",
+       "anonuser": "{{SITENAME}} کا گمنام صارف $1",
+       "lastmodifiedatby": "مورخہ $1 کو $2 بجے $3 نے اس صفحہ میں آخری بار تبدیلی کی۔",
+       "othercontribs": "$1 کے کام کے مطابق۔",
        "others": "دیگر",
-       "pageinfo-visiting-watchers": "تعداد ناظرین جنہوں نے حالیہ ترامیم کا مشاہدہ کیا",
+       "siteusers": "{{SITENAME}} {{PLURAL:$2|کا|کے}} {{PLURAL:$2|{{GENDER:$1|صارف}}|صارفین}} $1",
+       "anonusers": "{{SITENAME}} {{PLURAL:$2|کا|کے}} گمنام {{PLURAL:$2|{{GENDER:$1|صارف}}|صارفین}} $1",
+       "creditspage": "صفحہ کے انتسابات",
+       "nocredits": "اس صفحہ کے انتسابات سے متعلق معلومات دستیاب نہیں ہیں۔",
+       "spamprotectiontitle": "مقطار فاضل کاری",
+       "spamprotectiontext": "آپ جس عبارت کو محفوظ کرنا چاہتے ہیں اسے مقطار فاضل کاری نے ممنوع کر رکھا ہے۔\nعین ممکن ہے یہ فہرست سیاہ میں درج کسی بیرونی سائٹ کے ربط کی وجہ سے ہو رہا ہو۔",
+       "spamprotectionmatch": "ذیل میں موجود متن کو مقطار فاضل کاری نے روک دیا ہے: $1",
+       "spambot_username": "میڈیاویکی محافظ فاضل کاری",
+       "spam_reverting": "اس آخری نسخہ کی جانب واپس پھیرا جا رہا ہے جس میں $1 کے روابط شامل نہیں",
+       "spam_blanking": "$1 کے روابط پر مشتمل تمام نسخے، صفائی جاری ہے",
+       "spam_deleting": "$1 کے روابط پر مشتمل تمام نسخے، حذف کیا جا رہا ہے",
+       "simpleantispam-label": "فاضل کاری مخالف پڑتال۔\nاسے <strong>نہ</strong> بھریں!",
+       "pageinfo-title": "«$1» کی معلومات",
+       "pageinfo-not-current": "معذرت، پرانی ترامیم کی ان معلومات کو فراہم کرنا ناممکن ہے۔",
+       "pageinfo-header-basic": "بنیادی معلومات",
+       "pageinfo-header-edits": "تاریخچۂ ترمیم",
+       "pageinfo-header-restrictions": "صفحہ کی حفاظت",
+       "pageinfo-header-properties": "صفحہ کی خاصیتیں",
+       "pageinfo-display-title": "عنوان",
+       "pageinfo-default-sort": "کلید برائے ابتدائی ترتیب",
+       "pageinfo-length": "صفحہ کا حجم (بائٹ میں)",
+       "pageinfo-article-id": "صفحہ کی شناخت",
+       "pageinfo-language": "زبان",
+       "pageinfo-content-model": "انداز متن",
+       "pageinfo-content-model-change": "تبدیل کریں",
+       "pageinfo-robot-policy": "روبوں کی فہرست سازی",
+       "pageinfo-robot-index": "مجاز",
+       "pageinfo-robot-noindex": "ممنوع",
+       "pageinfo-watchers": "تعداد ناظرین",
+       "pageinfo-visiting-watchers": "حالیہ تبدیلیاں دیکھنے والے ناظرین کی تعداد",
+       "pageinfo-few-watchers": "$1 سے کم {{PLURAL:$1|ناظر|ناظرین}}",
+       "pageinfo-few-visiting-watchers": "شاید کوئی صارف حالیہ ترامیم دیکھنے آیا ہو یا نہ آیا ہو",
+       "pageinfo-redirects-name": "رجوع مکررات کی تعداد",
+       "pageinfo-subpages-name": "اس صفحہ کے ذیلی صفحات کی تعداد",
+       "pageinfo-subpages-value": "$1 ($2 {{PLURAL:$2|رجوع مکرر|رجوع مکررات}}؛ $3 {{PLURAL:$3|غیر رجوع مکرر|غیر رجوع مکررات}})",
+       "pageinfo-firstuser": "صفحہ ساز",
+       "pageinfo-firsttime": "صفحہ سازی کی تاریخ",
+       "pageinfo-lastuser": "آخری ترمیم کنندہ",
+       "pageinfo-lasttime": "آخری ترمیم کی تاریخ",
+       "pageinfo-edits": "ترامیم کی مجموعی تعداد",
+       "pageinfo-authors": "مختلف مصنفین کی مجموعی تعداد",
+       "pageinfo-recent-edits": "حالیہ ترامیم کی تعداد (گزشتہ $1 میں)",
+       "pageinfo-recent-authors": "مختلف مصنفین کی حالیہ تعداد",
+       "pageinfo-magic-words": "جادوئی {{PLURAL:$1|لفظ|الفاظ}} ($1)",
        "pageinfo-hidden-categories": "پوشیدہ {{PLURAL:$1|زمرہ|زمرہ جات}} ($1)",
+       "pageinfo-templates": "زیر استعمال {{PLURAL:$1|سانچہ|سانچے}} ($1)",
+       "pageinfo-transclusions": "($1) میں زیر استعمال {{PLURAL:$1|صفحہ|صفحات}}",
        "pageinfo-toolboxlink": "معلومات صفحہ",
+       "pageinfo-redirectsto": "رجوع مکررات برائے",
+       "pageinfo-redirectsto-info": "معلومات",
+       "pageinfo-contentpage": "شمار بطور صفحہ",
+       "pageinfo-contentpage-yes": "ہاں",
+       "pageinfo-protect-cascading": "آبشاری حفاظت کا ماخذ",
+       "pageinfo-protect-cascading-yes": "ہاں",
+       "pageinfo-protect-cascading-from": "آبشاری حفاظت از",
        "pageinfo-category-info": "زمرے کی معلومات",
+       "pageinfo-category-total": "اراکین کی مجموعی تعداد",
        "pageinfo-category-pages": "تعداد صفحات",
        "pageinfo-category-subcats": "تعداد ذیلی زمرہ جات",
-       "pageinfo-category-files": "تعداد املاف",
+       "pageinfo-category-files": "فائلوں کی تعداد",
+       "markaspatrolleddiff": "بطور مراجعت شدہ نشان زد کریں",
        "markaspatrolledtext": "اس صفحہ کو بطور مراجعت شدہ نشان زد کریں",
+       "markaspatrolledtext-file": "فائل کے اس نسخے کو مراجعت شدہ نشان زد کریں",
+       "markedaspatrolled": "مراجعت شدہ نشان زد کر دیا گیا",
+       "markedaspatrolledtext": "[[:$1]] کی منتخب ترمیم کو مراجعت شدہ نشان زد کر دیا گیا۔",
+       "rcpatroldisabled": "حالیہ تبدیلیوں کی مراجعت غیر فعال ہے",
+       "rcpatroldisabledtext": "فی الحال حالیہ تبدیلیوں کی مراجعت کی سہولت غیر فعال ہے۔",
+       "markedaspatrollederror": "مراجعت شدہ نشان زد نہیں کیا جا سکا",
+       "markedaspatrollederrortext": "مراجعت شدہ نشان زد کرنے کے لیے کسی ترمیم کو منتخب کرنا ضروری ہے۔",
+       "markedaspatrollederror-noautopatrol": "آپ کو اپنی ذاتی تبدیلیاں مراجعت شدہ نشان زد کرنے کی اجازت نہیں ہے۔",
+       "markedaspatrollednotify": "$1 کی اس تبدیلی کو نشان زد کر دیا گیا۔",
        "markedaspatrollederrornotify": "بطور مراجعت نشان زد نہیں کیا جا سکا۔",
+       "patrol-log-page": "نوشتہ مراجعت",
+       "patrol-log-header": "ذیل میں مراجعت شدہ ترامیم کا نوشتہ ہے۔",
+       "log-show-hide-patrol": "$1 نوشتہ مراجعت",
+       "log-show-hide-tag": "$1 نوشتہ ٹیگ",
        "deletedrevision": "حذف شدہ پرانی ترمیم $1۔",
-       "previousdiff": "← پُرانی تدوین",
+       "filedeleteerror-short": "فائل حذف کاری میں نقص: $1",
+       "filedeleteerror-long": "فائل حذف کرنے کے دوران میں نقص واقع ہوا:\n\n$1",
+       "filedelete-missing": "فائل «$1» کو حذف نہیں کیا جا سکتا کیونکہ یہ موجود نہیں ہے۔",
+       "filedelete-old-unregistered": "فائل «$1» کا منتخب نسخہ ڈیٹابیس میں موجود نہیں ہے۔",
+       "filedelete-current-unregistered": "«$1» کے عنوان سے کوئی فائل ڈیٹابیس میں موجود نہیں ہے۔",
+       "filedelete-archive-read-only": "$1 کی وثق ڈائرکٹری میں ویب سرور نہیں لکھ پا رہا ہے۔",
+       "previousdiff": "→ پرانی ترمیم",
        "nextdiff": "صفحہ کا نام:",
+       "mediawarning": "<strong>انتباہ:</strong> شاید اس نوع کی فائل میں نقصان دہ کوڈ موجود ہے۔\nممکن ہے اسے چلانے پر آپ کا سسٹم مشکوک ہاتھوں میں چلا جائے۔",
        "imagemaxsize": "تصویر کی جسامت کی حد:<br /><em>(فائل کے توضیحی صفحات کے لیے)</em>",
        "thumbsize": "تھمب نیل کی جسامت:",
-       "file-info-size": "\n$1 × $2 عکصر (پکسلز)، حجم ملف: $3، MIME قسم: $4",
-       "file-nohires": "اس سے بڑی تصمیم دستیاب نہیں۔",
-       "show-big-image": "اصل ملف",
+       "widthheightpage": "$1×$2، $3 {{PLURAL:$3|صفحہ|صفحات}}",
+       "file-info": "فائل کا حجم: $1، MIME قسم: $2",
+       "file-info-size": "\n$1 × $2 پکسل، فائل کا حجم: $3، MIME قسم: $4",
+       "file-info-size-pages": "$1 × $2 پکسل، فائل کا حجم: $3، MIME قسم: $4، $5 {{PLURAL:$5|صفحہ|صفحات}}",
+       "file-nohires": "اس سے زیادہ ریزولیوشن دستیاب نہیں۔",
+       "svg-long-desc": "ایس وی جی فائل، ابعاد $1 × $2 پکسل، فائل کا حجم: $3",
+       "svg-long-desc-animated": "متحرک ایس وی جی فائل، ابعاد $1 × $2 پکسل، فائل کا حجم: $3",
+       "svg-long-error": "نادرست ایس وی جی فائل: $1",
+       "show-big-image": "اصل فائل",
        "show-big-image-preview": "اس نمائش کا حجم:$1",
-       "show-big-image-other": "دیگر {{PLURAL:$2|تجویز|تجویزیں}}: $1۔",
-       "show-big-image-size": "$1 × $2 pixels",
+       "show-big-image-preview-differ": "اس $2 فائل کی $3 نمائش کا حجم: $1",
+       "show-big-image-other": "دیگر {{PLURAL:$2|قرارداد|قراردادیں}}: $1۔",
+       "show-big-image-size": "$1 × $2 پکسل",
+       "file-info-gif-looped": "چکردار",
+       "file-info-gif-frames": "$1 {{PLURAL:$1|چوکھٹا|چوکھٹے}}",
+       "file-info-png-looped": "چکردار",
+       "file-info-png-repeat": "$1 {{PLURAL:$1|مرتبہ}} دکھائی گئی",
+       "file-info-png-frames": "$1 {{PLURAL:$1|چوکھٹا|چوکھٹے}}",
+       "file-no-thumb-animation": "<strong>اطلاع: تکنیکی پابندیوں کی وجہ سے اس فائل کے تھمب نیل غیر متحرک ہونگے۔</strong>",
+       "file-no-thumb-animation-gif": "<strong>اطلاع: تکنیکی پابندیوں کی وجہ سے اس طرح کی زیادہ ریزولیوشن والی جی آئی ایف تصویروں کے تھمب نیل غیر متحرک ہونگے۔</strong>",
        "newimages": "نئی فائلوں کی گیلری",
+       "imagelisttext": "ذیل میں $2 <strong>$1</strong> {{PLURAL:$1|فائل|فائلوں}} کی فہرست موجود ہے۔",
+       "newimages-summary": "اس خصوصی صفحہ میں تازہ ترین اپلوڈ شدہ فائلوں کی فہرست موجود ہے۔",
+       "newimages-legend": "مقطار",
+       "newimages-label": "فائل کا نام (یا اس کا جزو):",
+       "newimages-showbots": "روبہ جات کے ذریعہ اپلوڈ کردہ فائلیں دکھائیں",
+       "newimages-hidepatrolled": "مراجعت شدہ اپلوڈ چھپائیں",
+       "noimages": "دیکھنے کیلئے کچھ نہیں ہے۔",
        "ilsubmit": "تلاش",
-       "bydate": "بالحاظ تاریخ",
+       "bydate": "بلحاظ تاریخ",
+       "sp-newimages-showfrom": "$2، $1 کے بعد اپلوڈ کی جانے والی فائلیں دکھائیں",
+       "seconds": "{{PLURAL:$1|$1 سیکنڈ}}",
+       "minutes": "{{PLURAL:$1|$1 منٹ}}",
+       "hours": "{{PLURAL:$1|گھنٹہ|گھنٹے}}",
+       "days": "{{PLURAL:$1|دن}}",
        "weeks": "{{PLURAL:$1|$1ہفتہ| $1  ہفتے}}",
+       "months": "{{PLURAL:$1|مہینہ|مہینے}}",
+       "years": "{{PLURAL:$1|$1 سال|$1 برس}}",
        "ago": "$1 قبل",
-       "minutes-ago": "$1 {{PLURAL:$1|منٹ|منٹ}} قبل",
-       "seconds-ago": "$1 {{PLURAL:$1|سیکنڈ|سیکنڈ}} قبل",
-       "bad_image_list": "شکلبند درج ذیل ہے:\n\nصرف فہرستی عناصر (* سے شروع ہونے والی لکیری) شامل کی جاتی ہیں۔\nکسی لکیر میں پہلا ربط کوئی خراب ملف کا ہونا چاہئے۔\nاُسی لکیر میں باقی آنے والے ربط کو مستثنیٰ قرار دیا جاتا ہے، مثلاً صفحات جہاں ملف لکیر کے وسط میں آسکتا ہے۔",
+       "just-now": "بس ابھی",
+       "hours-ago": "$1 {{PLURAL:$1|گھنٹہ|گھنٹے}} قبل",
+       "minutes-ago": "$1 {{PLURAL:$1|منٹ}} قبل",
+       "seconds-ago": "$1 {{PLURAL:$1|سیکنڈ}} قبل",
+       "monday-at": "پیر بوقت $1",
+       "tuesday-at": "منگل بوقت $1",
+       "wednesday-at": "بدھ بوقت $1",
+       "thursday-at": "جمعرات بوقت $1",
+       "friday-at": "جمعہ بوقت $1",
+       "saturday-at": "سنیچر بوقت $1",
+       "sunday-at": "اتوار بوقت $1",
+       "yesterday-at": "گزشتہ کل بوقت $1",
+       "bad_image_list": "فارمیٹ درج ذیل ہے:\n\nمحض فہرست میں موجود مندرجات (* سے شروع ہونے والی سطریں) شامل سمجھے جائیں گے۔\nسطر میں پہلا ربط کسی خراب فائل کا ہونا لازمی ہے۔\nاُسی سطر کے بقیہ روابط کو مستثنیٰ سمجھا جائے گا، مثلاً وہ صفحات جن میں فائل سطر میں موجود ہوں۔",
        "metadata": "میٹا ڈیٹا",
-       "metadata-help": "اِس ملف میں اِضافی معلومات شامل ہیں، جو کہ شاید اُس رقمی کیمرے یا سکینر سے آئے ہیں جس کے ذریعے یہ ملف بنائی گئی تھی۔\nاگر ملف اپنی اصل حالت میں نہیں رہی ہے تو کچھ تفاصیل ترمیم شدہ ملف کی مکمل طور پر عکاسی نہیں کرپائیں گے۔",
-       "metadata-collapse": "طویل تفاصیل چھپاؤ",
+       "metadata-help": "اِس فائل میں اِضافی معلومات شامل ہیں، جو شاید اُس ڈیجیٹل کیمرے یا سکینر سے آئی ہیں جس کے ذریعے یہ فائل بنائی گئی تھی۔\nاگر فائل اپنی اصل حالت میں نہ ہو تو کچھ معلومات ترمیم شدہ فائل کی مکمل طور پر عکاسی نہیں کر پائیں گی۔",
+       "metadata-expand": "اضافی تفصیلات دکھائیں",
+       "metadata-collapse": "اضافی تفصیلات چھپائیں",
        "metadata-fields": "تصویر کے میٹاڈیٹا کے وہ خانے جو اس پیغام میں درج ہیں وہ تصویر کے صفحے پر شامل ہوتے ہیں نیز یہ اس وقت ظاہر ہوتے ہیں جب میٹاڈیٹا کو وسیع کیا جائے۔\nالبتہ دیگر خانے ابتدائی طور پر پوشیدہ ہوتے ہیں۔\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
-       "exif-orientation": "پیشکش",
-       "exif-xresolution": "چھوڑاوی دکھاوت",
-       "exif-yresolution": "لمباوی دکھاوت",
-       "exif-datetime": "ملف کے تبدیلی کا تاریخ او وقت",
-       "exif-make": "کیمرے کا صانع",
+       "exif-imagewidth": "چوڑائی",
+       "exif-imagelength": "لمبائی",
+       "exif-bitspersample": "بٹ فی جزو",
+       "exif-compression": "نظام کمپریشن",
+       "exif-photometricinterpretation": "پکسل کی ترکیب",
+       "exif-orientation": "جہت",
+       "exif-samplesperpixel": "اجزا کی تعداد",
+       "exif-planarconfiguration": "ڈیٹا کی ترتیب",
+       "exif-ycbcrsubsampling": "Y کا C سے ذیلی نمونہ ساز تناسب",
+       "exif-ycbcrpositioning": "Y اور C کی جگہ",
+       "exif-xresolution": "افقی ریزولوشن",
+       "exif-yresolution": "عمودی ریزولیشن",
+       "exif-stripoffsets": "تصویر کے دیٹا کا محل وقوع",
+       "exif-rowsperstrip": "فی پٹی تعداد قطار",
+       "exif-stripbytecounts": "بائٹ فی کمپریس شدہ پٹی",
+       "exif-jpeginterchangeformat": "JPEG SOI کا آفسیٹ",
+       "exif-jpeginterchangeformatlength": "JPEG ڈیٹا کے بائٹ",
+       "exif-whitepoint": "سفید نقطہ کے رنگ",
+       "exif-primarychromaticities": "اساسیات کے رنگ",
+       "exif-ycbcrcoefficients": "فضائے رنگ کی میٹرکس تبدیلی کی مقداریں",
+       "exif-referenceblackwhite": "سیاہ و سفید جوالے کی قدروں کی جوڑی",
+       "exif-datetime": "فائل کی تبدیلی کی تاریخ اور وقت",
+       "exif-imagedescription": "تصویر کا عنوان",
+       "exif-make": "کیمرہ ساز کمپنی",
        "exif-model": "کیمرے کا ماڈل",
-       "exif-software": "سافٹویئر استعمال",
+       "exif-software": "مستعمل سافٹ ویئر",
+       "exif-artist": "مصنف",
+       "exif-copyright": "کاپی رائٹ کا حامل",
        "exif-exifversion": "اکزیف ورژن",
+       "exif-flashpixversion": "Flashpix کا معاونت یافتہ نسخہ",
        "exif-colorspace": "رنگ فضا",
+       "exif-componentsconfiguration": "ہر عنصر کا مفہوم",
+       "exif-compressedbitsperpixel": "تصویر کے کمپریشن کی حالت",
+       "exif-pixelxdimension": "تصویر کی چوڑائی",
+       "exif-pixelydimension": "تصویر کی لمبائی",
+       "exif-usercomment": "صارف کے تبصرے",
+       "exif-relatedsoundfile": "متعلقہ آڈیو فائل",
        "exif-datetimeoriginal": "ڈیٹا بنانے کا تاریخ اور وقت",
        "exif-datetimedigitized": "معددی کا تاریخ اور وقت",
+       "exif-subsectime": "تاریخ و وقت کے ذیلی سیکنڈ",
+       "exif-subsectimeoriginal": "اصل تاریخ و وقت کے ذیلی سیکنڈ",
+       "exif-subsectimedigitized": "ڈیجیٹل وقت و تاریخ کے ذیلی سیکنڈ",
+       "exif-exposuretime": "نمائش کا وقت",
+       "exif-exposuretime-format": "$1 سیکنڈ ($2)",
+       "exif-fnumber": "ایف نمبر",
+       "exif-exposureprogram": "نمائش کا پروگرام",
+       "exif-spectralsensitivity": "طیفی حساسیت",
+       "exif-isospeedratings": "آئیسو کی رفتار کی درجہ بندی",
+       "exif-shutterspeedvalue": "APEX شٹر کی رفتار",
+       "exif-aperturevalue": "APEX اپرچر",
+       "exif-brightnessvalue": "APEX کی چمک",
+       "exif-exposurebiasvalue": "APEX نمائش کا نقص",
+       "exif-maxaperturevalue": "زیادہ سے زیادہ لینڈ اپرچر",
+       "exif-subjectdistance": "شئی کا فاصلہ",
+       "exif-meteringmode": "پیمائش کاری کی حالت",
+       "exif-lightsource": "روشنی کا ماخذ",
+       "exif-flash": "فلیش",
+       "exif-focallength": "عدسہ کی ماسکی لمبائی",
+       "exif-subjectarea": "شئی کی مساحت",
+       "exif-flashenergy": "فلیش توانائی",
+       "exif-focalplanexresolution": "X کی تحلیل کا درجہ ماسکہ",
+       "exif-focalplaneyresolution": "Y کی تحلیل کا درجہ ماسکہ",
+       "exif-focalplaneresolutionunit": "درجہ ماسکہ کی تحلیل کی اکائی",
+       "exif-subjectlocation": "شئی کا محل وقوع",
+       "exif-exposureindex": "نمائش کا اشاریہ",
+       "exif-sensingmethod": "سینسنگ کا طریقہ",
+       "exif-filesource": "فائل کا ماخذ",
+       "exif-scenetype": "منظر کی نوعیت",
+       "exif-customrendered": "تصویر کی شخصی پروسیسینگ",
+       "exif-exposuremode": "نمائش کی حالت",
+       "exif-whitebalance": "وائٹ بیلنس",
+       "exif-digitalzoomratio": "ڈیجیٹل زوم کا تناسب",
+       "exif-focallengthin35mmfilm": "35 ایم ایم کی فلم میں ماسکی لمبائی",
+       "exif-scenecapturetype": "منظر کے گرفت کی نوعیت",
+       "exif-gaincontrol": "منظر کنٹرول",
+       "exif-contrast": "امتیاز",
+       "exif-saturation": "پُری",
+       "exif-sharpness": "تیزی",
+       "exif-devicesettingdescription": "آلے کی ترتیبات کی وضاحت",
+       "exif-subjectdistancerange": "شئی کے فاصلے کی حد",
+       "exif-imageuniqueid": "تصویر کا منفرد شناختی نمبر",
+       "exif-gpsversionid": "جی پی ایس ٹیگ کا نسخہ",
+       "exif-gpslatituderef": "شمالی یا جنوبی عرض البلد",
+       "exif-gpslatitude": "عرض البلد",
+       "exif-gpslongituderef": "مشرقی یا مغربی طول البلد",
+       "exif-gpslongitude": "طول البلد",
+       "exif-gpsaltituderef": "ارتفاع کا حوالہ",
+       "exif-gpsaltitude": "ارتفاع",
+       "exif-gpstimestamp": "جی پی ایس وقت (جوہری گھڑی)",
+       "exif-gpssatellites": "پیمائش کے لیے مستعمل مصنوعی سیارے",
+       "exif-gpsstatus": "ریسیور کی صورت حال",
+       "exif-gpsmeasuremode": "حالت پیمائش",
+       "exif-gpsdop": "پیمائش کی درستی",
+       "exif-gpsspeedref": "رفتار کی اکائی",
+       "exif-gpsspeed": "جی پی ایس ریسیور کی رفتار",
+       "exif-gpstrackref": "حرکت کی سمت کا حوالہ",
+       "exif-gpstrack": "حرکت کی سمت",
+       "exif-gpsimgdirectionref": "تصویر کی سمت کا حوالہ",
+       "exif-gpsimgdirection": "تصویر کی سمت",
+       "exif-gpsmapdatum": "زیر استعمال جیو ڈیٹک سروے",
+       "exif-gpsdestlatituderef": "منزل کے عرض البلد کا حوالہ",
+       "exif-gpsdestlatitude": "منزل کا عرض البلد",
+       "exif-gpsdestlongituderef": "منزل کے طول البلد کا حوالہ",
+       "exif-gpsdestlongitude": "منزل کا طول البلد",
+       "exif-gpsdestbearingref": "منزل کی سمت کا حوالہ",
+       "exif-gpsdestbearing": "منزل کی سمت",
+       "exif-gpsdestdistanceref": "منزل کی مسافت کا حوالہ",
+       "exif-gpsdestdistance": "منزل کی مسافت",
+       "exif-gpsprocessingmethod": "جی پی ایس پراسیسنگ کے طریقہ کا نام",
+       "exif-gpsareainformation": "جی پی ایس کے علاقے کا نام",
+       "exif-gpsdatestamp": "جی پی ایس کی تاریخ",
+       "exif-gpsdifferential": "جی پی ایس کی تفریقی درستی",
+       "exif-jpegfilecomment": "JPEG فائل کا تبصرہ",
+       "exif-keywords": "کلیدی الفاظ",
+       "exif-worldregioncreated": "دنیا کا وہ خطہ جہاں یہ تصویر کھینچی گئی",
+       "exif-countrycreated": "وہ ملک جہاں یہ تصویر کھینچی گئی",
+       "exif-countrycodecreated": "اس ملک کا کوڈ جہاں یہ تصویر کھینچی گئی",
+       "exif-provinceorstatecreated": "وہ ریاست یا صوبہ جہاں یہ تصویر کھینچی گئی",
+       "exif-citycreated": "وہ شہر جہاں یہ تصویر کھینچی گئی",
+       "exif-sublocationcreated": "شہر کا وہ مقام جہاں یہ تصویر کھینچی گئی",
+       "exif-worldregiondest": "دنیا کا دکھایا گیا خطہ",
+       "exif-countrydest": "دکھایا گیا ملک",
+       "exif-countrycodedest": "دکھائے گئے ملک کا کوڈ",
+       "exif-provinceorstatedest": "دکھایا گیا صوبہ یا ریاست",
+       "exif-citydest": "دکھایا گیا شہر",
+       "exif-sublocationdest": "شہر کا دکھایا گیا مقام",
+       "exif-objectname": "مختصر عنوان",
+       "exif-specialinstructions": "خصوصی ہدایات",
+       "exif-headline": "سرخی",
+       "exif-credit": "کریڈٹ/مہیا کار",
+       "exif-source": "ماخذ",
+       "exif-editstatus": "تصویر کی ادارتی کیفیت",
+       "exif-urgency": "فوری طور پر",
+       "exif-fixtureidentifier": "مستقل شئی کا نام",
+       "exif-locationdest": "دکھایا گیا مقام",
+       "exif-locationdestcode": "دکھائے گئے مقام کا کوڈ",
+       "exif-objectcycle": "اس میڈیا کا مقصود دن کا وقت",
+       "exif-contact": "رابطہ کی معلومات",
        "exif-writer": "مصنف",
        "exif-languagecode": "زبان",
+       "exif-iimversion": "IIM نسخہ",
        "exif-iimcategory": "زمرہ",
+       "exif-iimsupplementalcategory": "تکمیلی زمرہ جات",
+       "exif-datetimeexpires": "اس تاریخ کے بعد استعمال نہ کریں",
+       "exif-datetimereleased": "جاری کردہ بتاریخ",
+       "exif-originaltransmissionref": "منتقلی کے اصل محل وقوع کا کوڈ",
+       "exif-identifier": "شناخت کنندہ",
+       "exif-lens": "زیر استعمال عدسے",
+       "exif-serialnumber": "کیمرے کا نمبر شمار",
+       "exif-cameraownername": "کیمرے کا مالک",
+       "exif-label": "لیبل",
+       "exif-datetimemetadata": "میٹاڈیٹا میں تبدیلی کی آخری تاریخ",
+       "exif-nickname": "تصویر کا غیر رسمی نام",
+       "exif-rating": "درجہ بندی (5 میں سے)",
+       "exif-rightscertificate": "حقوق کے انتظام کا تصدیق نامہ",
+       "exif-copyrighted": "کاپی رائٹ کی صورت حال",
+       "exif-copyrightowner": "کاپی رائٹ کا حامل",
+       "exif-usageterms": "استعمال کے شرائط",
+       "exif-webstatement": "آن لائن موجود کاپی رائٹ کا اعلامیہ",
+       "exif-originaldocumentid": "اصل دستاویز کی منفرد شناخت",
+       "exif-licenseurl": "کاپی رائٹ کے اجازت نامے کا یوآرایل",
+       "exif-morepermissionsurl": "متبادل اجازت ناموں کی معلومات",
+       "exif-attributionurl": "اس کام کو دوربارہ استعمال کرنے کے وقت اس کا ربط دیں",
+       "exif-preferredattributionname": "اس کام کو دوربارہ استعمال کرنے کے وقت اس سے منسوب کریں",
+       "exif-pngfilecomment": "پی این جی فائل کا تبصرہ",
+       "exif-disclaimer": "اظہار لا تعلقی",
+       "exif-contentwarning": "مواد سے متعلق انتباہ",
+       "exif-giffilecomment": "جی آئی ایف فائل کا تبصرہ",
+       "exif-intellectualgenre": "شئی کی قسم",
+       "exif-subjectnewscode": "موضوع کا کوڈ",
+       "exif-scenecode": "منظر کا IPTC کوڈ",
+       "exif-event": "دکھایا گیا واقعہ",
+       "exif-organisationinimage": "دکھائی گئی تنظیم",
+       "exif-personinimage": "دکھایا گیا شخص",
+       "exif-originalimageheight": "تراشنے سے قبل تصویر کی لمبائی",
+       "exif-originalimagewidth": "تراشنے سے قبل تصویر کی چوڑائی",
+       "exif-compression-1": "غیر کمپریس شدہ",
+       "exif-compression-2": "CCITT گروپ 3 1 - ہف مین رن کی تبدیل شدہ لمبائی کی ابعادی اینکوڈنگ",
+       "exif-compression-3": "CCITT گروپ 3 کے فیکس کی اینکوڈنگ",
+       "exif-compression-4": "CCITT گروپ 4 کے فیکس کی اینکوڈنگ",
+       "exif-copyrighted-true": "کاپی رائٹ شدہ",
+       "exif-copyrighted-false": "کاپی رائٹ کی صورت حال متعین نہیں کی گئی",
+       "exif-photometricinterpretation-1": "سیاہ اور سفید (سیاہ 0 ہے)",
+       "exif-unknowndate": "نامعلوم تاریخ",
        "exif-orientation-1": "عام",
+       "exif-orientation-2": "افقی طور پر جھکایا ہوا",
+       "exif-orientation-3": "180° درجہ پر گھمایا ہوا",
+       "exif-orientation-4": "عمودی طور پر جھکایا ہوا",
+       "exif-orientation-5": "90° CCW گھمایا ہوا اور عمودی جھکایا ہوا",
+       "exif-orientation-6": "90° CCW گھمایا ہوا",
+       "exif-orientation-7": "90° CW گھمایا ہوا اور عمودی جھکایا ہوا",
+       "exif-orientation-8": "90° CW گھمایا ہوا",
+       "exif-planarconfiguration-1": "دبیز فامیٹ",
+       "exif-planarconfiguration-2": "مسطح فارمیٹ",
+       "exif-colorspace-65535": "نامعلوم قطر کا حامل",
+       "exif-componentsconfiguration-0": "موجود نہیں",
+       "exif-exposureprogram-0": "غیر متعین",
+       "exif-exposureprogram-1": "دستی",
+       "exif-exposureprogram-2": "عام پروگرام",
+       "exif-exposureprogram-3": "اپرچر کی ترجیح",
+       "exif-exposureprogram-4": "شٹر کی ترجیح",
+       "exif-exposureprogram-5": "تخلیقی پروگرام (میدان کی گہرائی کی جانب جھکا ہوا)",
+       "exif-exposureprogram-6": "اقدامی پروگرام (شٹر کی تیز رفتار کی جانب جھکا ہوا)",
+       "exif-exposureprogram-7": "شبیہ کی حالت (نقطہ ارتکاز سے باہر کا پس منظر رکھنے والی قریبی تصویروں کے لیے)",
+       "exif-exposureprogram-8": "قدرتی منظر کی حالت (نقطہ ارتکاز میں موجود پس منظر رکھنے والی قدرتی مناظر کی تصویروں کے لیے)",
+       "exif-subjectdistance-value": "$1 میٹر",
        "exif-meteringmode-0": "نامعلوم",
+       "exif-meteringmode-1": "اوسط",
+       "exif-meteringmode-2": "مرکز کی حجم شدہ اوسط",
+       "exif-meteringmode-3": "داغ",
+       "exif-meteringmode-4": "کثیر داغ",
+       "exif-meteringmode-5": "طرز",
+       "exif-meteringmode-6": "جزوی",
+       "exif-meteringmode-255": "دیگر",
+       "exif-lightsource-0": "نامعلوم",
+       "exif-lightsource-1": "روشنی روز",
+       "exif-lightsource-2": "فلورسینٹ",
+       "exif-lightsource-3": "ٹنگسٹن (گرم تاباں روشنی)",
+       "exif-lightsource-4": "فلیش",
+       "exif-lightsource-9": "اچھا موسم",
+       "exif-lightsource-10": "ابرآلود موسم",
+       "exif-lightsource-11": "سایہ",
+       "exif-lightsource-12": "صبح کا فلورسینٹ (D 5700 – 7100K)",
+       "exif-lightsource-13": "دن کا سفید فلورسینٹ (N 4600 – 5400K)",
+       "exif-lightsource-14": "خنک سفید فلورسینٹ (W 3900 – 4500K)",
+       "exif-lightsource-15": "سفید فلورسینٹ (WW 3200 – 3700K)",
+       "exif-lightsource-17": "معیاری روشنی A",
+       "exif-lightsource-18": "معیاری روشنی B",
+       "exif-lightsource-19": "معیاری روشنی C",
+       "exif-lightsource-24": "ٹنگسٹن کا آئیسو اسٹوڈیو",
+       "exif-lightsource-255": "روشنی کا دوسرا ماخذ",
+       "exif-flash-fired-0": "فلیش نہیں چلا",
+       "exif-flash-fired-1": "فلیش چالو ہوا",
+       "exif-flash-return-0": "منعکس روشنی کی دریافت کی کوئی سہولت نہیں ہے",
+       "exif-flash-return-2": "منعکس روشنی دریافت نہیں ہوئی",
+       "exif-flash-return-3": "منعکس روشنی دریافت ہوئی",
+       "exif-flash-mode-1": "فلیش چلنا لازمی",
+       "exif-flash-mode-2": "فلیش نہ چلنا لازمی",
+       "exif-flash-mode-3": "خودکار حالت",
+       "exif-flash-function-1": "فلیش کی سہولت نہیں",
+       "exif-flash-redeye-1": "سرخی چشم کی درستی کی حالت",
+       "exif-focalplaneresolutionunit-2": "انچ",
+       "exif-sensingmethod-1": "غیر وضاحتی",
+       "exif-sensingmethod-2": "علاقہ کی یک تراشہ رنگی کا سینسر",
+       "exif-sensingmethod-3": "علاقہ کی دو تراشہ رنگی کا سینسر",
+       "exif-sensingmethod-4": "علاقہ کی سہ تراشہ رنگی کا سینسر",
+       "exif-sensingmethod-5": "علاقہ میں رنگوں کی ترتیب کا سینسر",
+       "exif-sensingmethod-7": "سہ خطی سینسر",
+       "exif-sensingmethod-8": "رنگوں کی ترتیب کا خطی سینسر",
+       "exif-filesource-3": "ڈیجیٹل اسٹل کیمرا",
+       "exif-scenetype-1": "براہ راست کھینچی گئی تصویر",
+       "exif-customrendered-0": "عام عمل",
+       "exif-customrendered-1": "اپنی مرضی کے مطابق عمل",
+       "exif-exposuremode-0": "خودکار نمائش",
+       "exif-exposuremode-1": "دستی نمائش",
+       "exif-exposuremode-2": "آٹو بریکٹ",
+       "exif-whitebalance-0": "سفید رنگ کا خودکار توازن",
+       "exif-whitebalance-1": "سفید رنگ کا دستی توازن",
+       "exif-scenecapturetype-0": "معیاری",
+       "exif-scenecapturetype-1": "افقی انداز",
+       "exif-scenecapturetype-2": "عمودی انداز",
+       "exif-scenecapturetype-3": "رات کا منظر",
+       "exif-gaincontrol-0": "کچھ نہیں",
+       "exif-gaincontrol-1": "لو گین اپ",
+       "exif-gaincontrol-2": "ہائی گین اپ",
+       "exif-gaincontrol-3": "لو گین ڈاؤن",
+       "exif-gaincontrol-4": "ہائی گین ڈاؤن",
+       "exif-contrast-0": "عام",
+       "exif-contrast-1": "نرم",
+       "exif-contrast-2": "سخت",
+       "exif-saturation-0": "عام",
+       "exif-saturation-1": "سیال رنگ",
+       "exif-saturation-2": "ٹھوس رنگ",
+       "exif-sharpness-0": "عام",
+       "exif-sharpness-1": "نرم",
+       "exif-sharpness-2": "سخت",
+       "exif-subjectdistancerange-0": "نامعلوم",
+       "exif-subjectdistancerange-1": "میکرو",
+       "exif-subjectdistancerange-2": "قریبی منظر",
+       "exif-subjectdistancerange-3": "دور سے دیکھیں",
+       "exif-gpslatitude-n": "شمالی عرض البلد",
+       "exif-gpslatitude-s": "جنوبی عرض البلد",
+       "exif-gpslongitude-e": "مشرقی طول البلد",
+       "exif-gpslongitude-w": "مغربی طول البلد",
+       "exif-gpsaltitude-above-sealevel": "سطح سمندر سے $1 {{PLURAL:$1|میٹر}} بلند",
+       "exif-gpsaltitude-below-sealevel": "سطح سمندر سے $1 {{PLURAL:$1|میٹر}} نیچے",
+       "exif-gpsstatus-a": "پیمائش جاری ہے",
+       "exif-gpsstatus-v": "پیمائش پذیری",
+       "exif-gpsmeasuremode-2": "دو ابعادی پیمائش",
+       "exif-gpsmeasuremode-3": "سہ ابعادی پیمائش",
+       "exif-gpsspeed-k": "کلو میٹر فی گھنٹہ",
+       "exif-gpsspeed-m": "میل فی گھنٹہ",
+       "exif-gpsspeed-n": "گرہیں",
+       "exif-gpsdestdistance-k": "کلومیٹر",
+       "exif-gpsdestdistance-m": "میل",
+       "exif-gpsdestdistance-n": "سمندری میل",
+       "exif-gpsdop-excellent": "بہترین ($1)",
+       "exif-gpsdop-good": "بہترین ($1)",
+       "exif-gpsdop-moderate": "معتدل ($1)",
+       "exif-gpsdop-fair": "کمتر ($1)",
+       "exif-gpsdop-poor": "کمزور ($1)",
+       "exif-objectcycle-a": "صرف صبح",
+       "exif-objectcycle-p": "صرف شام",
+       "exif-objectcycle-b": "صبح و شام",
+       "exif-gpsdirection-t": "اصلی سمت",
+       "exif-gpsdirection-m": "مقناطیسی سمت",
+       "exif-ycbcrpositioning-1": "وسط",
+       "exif-ycbcrpositioning-2": "مشترکہ منظر کشی",
        "exif-dc-contributor": "ترمیم کنندگان",
+       "exif-dc-coverage": "میڈیا کی مکانی یا زمانی وسعت",
+       "exif-dc-date": "تاریخ",
+       "exif-dc-publisher": "ناشر",
+       "exif-dc-relation": "متعلقہ میڈیا",
+       "exif-dc-rights": "حقوق",
+       "exif-dc-source": "ماخذ میڈیا",
+       "exif-dc-type": "میڈیا کی قسم",
+       "exif-rating-rejected": "مسترد شدہ",
+       "exif-isospeedratings-overflow": "65535 سے بڑا",
+       "exif-iimcategory-ace": "فنون لطیفہ، ثقافت اور تفریح",
+       "exif-iimcategory-clj": "جرم اور قانون",
+       "exif-iimcategory-dis": "آفات اور حادثات",
+       "exif-iimcategory-fin": "معیشت اور کاروبار",
+       "exif-iimcategory-edu": "تعلیم",
+       "exif-iimcategory-evn": "ماحول",
+       "exif-iimcategory-hth": "صحت",
+       "exif-iimcategory-hum": "انسانی دلچسپی",
+       "exif-iimcategory-lab": "مزدوری",
+       "exif-iimcategory-lif": "طرز زندگی اور تفریح",
+       "exif-iimcategory-pol": "سیاست",
+       "exif-iimcategory-rel": "مذہب اور عقیدہ",
+       "exif-iimcategory-sci": "سائنس اور ٹیکنالوجی",
+       "exif-iimcategory-soi": "سماجی مسائل",
+       "exif-iimcategory-spo": "کھیل",
+       "exif-iimcategory-war": "جنگ، تصادم اور بدامنی",
+       "exif-iimcategory-wea": "موسم",
+       "exif-urgency-normal": "عام ($1)",
+       "exif-urgency-low": "کم ($1)",
+       "exif-urgency-high": "اعلیٰ ($1)",
+       "exif-urgency-other": "صارف کی وضاحت کردہ ترجیح ($1)",
        "namespacesall": "تمام",
        "monthsall": "تمام",
-       "deletedwhileediting": "انتباہ: آپ کے ترمیم شروع کرنے کے بعد یہ صفحہ حذف کیا جا چکا ہے!",
+       "confirmemail": "اپنے برقی پتہ کی تصدیق کریں",
+       "confirmemail_noemail": "آپ نے [[Special:Preferences|اپنی ترجیحات]] میں درست برقی ڈاک پتا نہیں دیا ہے۔",
+       "confirmemail_text": "{{SITENAME}} میں موجود برقی خط کی سہولتوں کو استعمال کرنے کے لیے آپ کے برقی ڈاک پتے کی تصدیق ضروری ہے۔\nاپنے پتے پر تصدیقی ڈاک روانہ کرنے کے لیے ذیل میں موجود بٹن پر کلک کریں۔\nموصولہ برقی خط میں آپ کو کوڈ پر مشتمل ایک ربط نظر آئے گا۔\nچنانچہ اپنے بڑقی ڈاک پتے کی تصدیق کے لیے اس ربط کو اپنے براؤزر میں کھولیں۔",
+       "confirmemail_pending": "آپ کو تصدیقی کوڈ پہلے ہی روانہ کیا جا چکا ہے۔\nاگر آپ نے ابھی اپنا کھاتہ بنایا ہے تو نئے کوڈ کی درخواست دینے سے قبل اس کے موصول ہونے کا کچھ دیر انتظار کر لیں۔",
+       "confirmemail_send": "تصدیقی کوڈ بھیجیں",
+       "confirmemail_sent": "تصدیقی برقی خط بھیجا گیا ہے۔",
+       "confirmemail_oncreate": "آپ کے برقی ڈاک پتے پر تصدیقی کوڈ بھیجا گیا ہے۔\nیہ کوڈ داخل ہونے کے لیے ضروری نہیں، تاہم اس ویکی میں برقی ڈاک پر مبنی کسی سہولت کو فعال کرنے سے قبل آپ کو اس کوڈ کی ضرورت پڑے گی۔",
+       "confirmemail_sendfailed": "{{SITENAME}} آپ کو تصدیقی کوڈ نہیں بھیج سکا۔\nبراہ کرم اپنا برقی ڈاک پتا جانچ لیں کہ کہیں اس میں نادرست حروف تو موجود نہیں۔\n\nڈاک رساں کا جواب: $1",
+       "confirmemail_invalid": "نادرست تصدیقی کوڈ۔\nممکن ہے اس کوڈ کی مدت ختم ہو چکی ہو۔",
+       "confirmemail_needlogin": "اپنے برقی ڈاک پتے کی تصدیق کے لیے براہ کرم $1 ہوں۔",
+       "confirmemail_success": "آپ کے برقی ڈاک پتے کی تصدیق ہو چکی ہے۔\nاب آپ اپنے کھاتے میں [[Special:UserLogin|داخل ہو سکتے ہیں]]۔",
+       "confirmemail_loggedin": "اب آپ کے برقی ڈاک پتے کی تصدیق ہو چکی ہے۔",
+       "confirmemail_subject": "{{SITENAME}} کی جانب سے برقی ڈاک پتے کا تصدیقی پیغام",
+       "confirmemail_body": "کسی نے، غالباً آپ نے، اس آئی پی پتے $1 سے {{SITENAME}} میں «$2» کے نام سے کھاتہ بنایا اور اسی برقی ڈاک پتے کو استعمال کیا ہے۔\n\nاس بات کی تصدیق کے لیے کہ یہ کھاتہ آپ ہی کا ہے نیز {{SITENAME}} میں برقی خط کی سہولتوں کو فعال کرنے کے لیے ذیل میں موجود ربط کو اپنے براؤزر میں کھولیں:\n\n$3\n\nاگر آپ نے یہ کھاتہ *نہیں* کھولا ہے تو اس برقی ڈاک پتے کی تصدیق کو منسوخ کرنے کے لیے اس ربط پر جائیں:\n\n$5\n\nاس تصدیقی کوڈ کی مدت $4 تک ختم ہو جائے گی۔",
+       "confirmemail_body_changed": "کسی نے، غالباً آپ نے، اس آئی پی پتے $1 سے {{SITENAME}} میں «$2» کے نام سے موجود کھاتے کا برقی ڈاک پتہ تبدیل کیا ہے۔\n\nاس بات کی تصدیق کے لیے کہ یہ کھاتہ آپ ہی کا ہے نیز {{SITENAME}} میں برقی خط کی سہولتوں کو دوبارہ فعال کرنے کے لیے ذیل میں موجود ربط کو اپنے براؤزر میں کھولیں:\n\n$3\n\nاگر یہ کھاتہ آپ کا *نہیں* ہے تو اس برقی ڈاک پتے کی تصدیق کو منسوخ کرنے کے لیے اس ربط پر جائیں:\n\n$5\n\nاس تصدیقی کوڈ کی مدت $4 تک ختم ہو جائے گی۔",
+       "confirmemail_body_set": "کسی نے، غالباً آپ نے، اس آئی پی پتے $1 سے {{SITENAME}} میں «$2» کے نام سے موجود کھاتے میں یہ برقی ڈاک پتا دیا ہے۔\n\nاس بات کی تصدیق کے لیے کہ یہ کھاتہ آپ ہی کا ہے نیز {{SITENAME}} میں برقی خط کی سہولتوں کو فعال کرنے کے لیے ذیل میں موجود ربط کو اپنے براؤزر میں کھولیں:\n\n$3\n\nاگر یہ کھاتہ آپ کا *نہیں* ہے تو اس برقی ڈاک پتے کی تصدیق کو منسوخ کرنے کے لیے اس ربط پر جائیں:\n\n$5\n\nاس تصدیقی کوڈ کی مدت $4 تک ختم ہو جائے گی۔",
+       "confirmemail_invalidated": "برقی ڈاک پتے کی تصدیق منسوخ ہو گئی",
+       "invalidateemail": "برقی ڈاک کی تصدیق منسوخ کریں",
+       "notificationemail_subject_changed": "{{SITENAME}} میں درج کردہ برقی ڈاک پتا تبدیل ہو چکا ہے",
+       "notificationemail_subject_removed": "{{SITENAME}} میں درج کردہ برقی ڈاک پتا حذف ہو چکا ہے",
+       "notificationemail_body_changed": "کسی نے، غالباً آپ نے، اس آئی پی پتے $1 سے {{SITENAME}} میں «$2» کے نام سے موجود کھاتے کے برقی ڈاک پتے کو $3 میں تبدیل کیا ہے۔\n\nاگر وہ شخص آپ نہیں ہے تو سائٹ کے کسی منتظم سے فوراً رابطہ کریں۔",
+       "notificationemail_body_removed": "کسی نے، غالباً آپ نے، اس آئی پی پتے $1 سے {{SITENAME}} میں «$2» کے نام سے موجود کھاتے کے برقی ڈاک پتے کو حذف کیا ہے۔\n\nاگر وہ شخص آپ نہیں ہے تو سائٹ کے کسی منتظم سے فوراً رابطہ کریں۔",
+       "scarytranscludedisabled": "[بین الویکی شمولیت غیر فعال ہے]",
+       "scarytranscludefailed": "[$1 کے لیے سانچہ اخذ نہیں کیا جا سکا]",
+       "scarytranscludefailed-httpstatus": "[$1 کے لیے سانچہ اخذ نہیں کیا جا سکا: HTTP $2]",
+       "scarytranscludetoolong": "[یوآرایل بہت طویل ہے]",
+       "deletedwhileediting": "<strong>انتباہ:</strong>: آپ کے ترمیم شروع کرنے کے بعد یہ صفحہ حذف کیا جا چکا ہے!",
+       "confirmrecreate": "آپ کی ترمیم شروع ہونے کے بعد صارف [[User:$1|$1]] ([[User talk:$1|talk]]) نے اس صفحہ کو {{GENDER:$1|حذف کر دیا}}، اس کی وجہ حسب ذیل ہے:\n: <em>$2</em>\nبراہ کرم اس بات کی تصدیق کر لیں کہ آیا آپ واقعی اس صفحہ کو دوبارہ تخلیق کرنا چاہتے ہیں یا نہیں۔",
+       "confirmrecreate-noreason": "آپ کی ترمیم شروع ہونے کے بعد صارف [[User:$1|$1]] ([[User talk:$1|talk]]) نے اس صفحہ کو {{GENDER:$1|حذف کر دیا}}۔\nبراہ کرم اس بات کی تصدیق کر لیں کہ آیا آپ واقعی اس صفحہ کو دوبارہ تخلیق کرنا چاہتے ہیں یا نہیں۔",
+       "recreate": "دوبارہ تخلیق کریں",
        "confirm_purge_button": "جی!",
+       "confirm-purge-top": "اس صفحہ کا کیشے صاف کریں؟",
+       "confirm-purge-bottom": "صفحہ کا کیشے صارف کرنے پر تازہ ترین نسخہ نظر آئے گا۔",
+       "confirm-watch-button": "ٹھیک",
+       "confirm-watch-top": "اس صفحہ کو آپ کی زیر نظر فہرست میں شامل کریں؟",
+       "confirm-unwatch-button": "ٹھیک ہے",
+       "confirm-unwatch-top": "اس صفحہ کو آپ کی زیرِنظرفہرست سے حذف کر دیا جائے؟",
        "confirm-rollback-button": "ٹھیک ہے",
+       "confirm-rollback-top": "اس صفحے پر ترمیم کو استرجع کیا جائے؟",
        "semicolon-separator": "؛&#32;",
+       "comma-separator": "،&#32;",
+       "quotation-marks": "\"$1\"",
        "imgmultipageprev": "← پچھلا",
        "imgmultipagenext": "اگلا →",
        "imgmultigo": "جائیں!",
        "imgmultigoto": "$1 صفحہ پر جائیں",
+       "img-lang-default": "(طے شدہ زبان)",
+       "img-lang-info": "تصویر کا اس زبان میں ترجمہ کریں $1۔ $2",
+       "img-lang-go": "چلیں",
+       "ascending_abbrev": "صعودی",
+       "descending_abbrev": "نزولی",
        "table_pager_next": "اگلا صفحہ",
        "table_pager_prev": "پچھلا صفحہ",
        "table_pager_first": "پہلا صفحہ",
        "table_pager_last": "آخری صفحہ",
+       "table_pager_limit": "فی صفحہ $1 آئٹم دکھائیں",
+       "table_pager_limit_label": "فی صفحہ اندراج:",
+       "table_pager_limit_submit": "چلیں",
+       "table_pager_empty": "کوئی نتیجہ برآمد نہیں ہوا",
        "autosumm-blank": "تمام مندرجات حذف",
+       "autosumm-replace": "\"$1\" سے مواد کی تبدیلی",
        "autoredircomment": "[[$1]] سے رجوع مکرر",
-       "autosumm-new": "نیا صفحہ: $1",
+       "autosumm-new": "«$1» مواد پر مشتمل نیا صفحہ بنایا",
+       "autosumm-newblank": "خالی صفحہ بنایا",
        "size-bytes": "$1 بائٹ",
+       "size-kilobytes": "$1 کلوبائٹ",
+       "lag-warn-normal": "گزشتہ $1 {{PLURAL:$1|سیکنڈ|سیکنڈوں}} میں ہونے والی تبدیلیاں شاید اس فہرست میں نظر نہ آئیں۔",
+       "lag-warn-high": "ڈیٹابیس سرور کی جانب سے بے حد تاخیر کی بنا پر گزشتہ $1 {{PLURAL:$1|سیکنڈ|سیکنڈوں}} میں ہونے والی تبدیلیاں شاید اس فہرست میں نظر نہ آئیں۔",
+       "watchlistedit-normal-title": "زیر نظر فہرست میں ترمیم کریں",
+       "watchlistedit-normal-legend": "زیرنظر فہرست سے عناوین نکالیں",
+       "watchlistedit-normal-explain": "آپ کی زیرنظر فہرست میں موجود عناوین ذیل میں موجود ہیں۔\nکسی عنوان کو حذف کرنے کے لیے اس کے سامنے موجود خانہ کو نشان زد کریں اور «{{int:Watchlistedit-normal-submit}}» پر کلک کریں۔\nنیز آپ [[Special:EditWatchlist/raw|خام فہرست]] میں بھی ترمیم کر سکتے ہیں۔",
+       "watchlistedit-normal-submit": "عناوین حذف کریں",
+       "watchlistedit-normal-done": "آپ کی زیرنظر فہرست سے {{PLURAL:$1|ایک عنوان حذف کیا گیا|$1 عناوین حذف کیے گئے}}:",
+       "watchlistedit-raw-title": "خام زیرِنظرفہرست میں ترمیم کریں",
+       "watchlistedit-raw-legend": "خام زیرِنظرفہرست میں ترمیم کریں",
+       "watchlistedit-raw-explain": "آپ کی زیرنظر فہرست میں موجود عناوین ذیل میں موجود ہیں، ان عناوین کو اس فہرست سے حذف کسی مزید عناوین شامل کیے جا سکتے ہیں؛\nفی سطر ایک عنوان درج کریں۔\nترمیم مکمل ہو جانے پر «{{int:Watchlistedit-raw-submit}}» پر کلک کریں۔\nنیز آپ اس میں ترمیم و تبدیلی کے لیے [[Special:EditWatchlist|معیاری خانہ ترمیم]] بھی استعمال کر سکتے ہیں۔",
+       "watchlistedit-raw-titles": "عناوین:",
+       "watchlistedit-raw-submit": "زیرنظر فہرست کی تجدید کریں",
+       "watchlistedit-raw-done": "آپ کی زیرنظر فہرست کی تجدید ہو چکی ہے۔",
+       "watchlistedit-raw-added": "{{PLURAL:$1|1 عنوان |$1 عناوین}} شامل {{PLURAL:$1|کیا گیا|کیے گئے}}:",
+       "watchlistedit-raw-removed": "{{PLURAL:$1|1 عنوان حذف کیا گیا|$1 عناوین حذف کیے گئے}}:",
+       "watchlistedit-clear-title": "اپنی زیر نظر فہرست صاف کریں",
+       "watchlistedit-clear-legend": "اپنی زیر نظر فہرست صاف کریں",
+       "watchlistedit-clear-explain": "آپ کی زیرنظر فہرست سے تمام عناوین حذف کر دیے جائیں گے",
+       "watchlistedit-clear-titles": "عناوین:",
+       "watchlistedit-clear-submit": "زیرنظر فہرست صاف کریں (یہ دائمی ہے!)",
+       "watchlistedit-clear-done": "آپ کی زیرنظر فہرست صاف ہو چکی ہے۔",
+       "watchlistedit-clear-removed": "{{PLURAL:$1|1 عنوان حذف کیا گیا|$1 عناوین حذف کیے گئے}}:",
+       "watchlistedit-too-many": "نمائش کے لیے صفحات کی تعداد بہت زیادہ ہے۔",
+       "watchlisttools-clear": "زیرنظر فہرست کی صفائی",
        "watchlisttools-view": "متعلقہ تبدیلیاں دیکھیں",
        "watchlisttools-edit": "زیرِنظرفہرست دیکھیں اور تدوین کریں",
        "watchlisttools-raw": "خام زیرِنظرفہرست تدوین کریں",
        "hijri-calendar-m10": "شوال",
        "hijri-calendar-m11": "ذوالقعدہ",
        "hijri-calendar-m12": "ذوالحجہ",
+       "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|تبادلۂ خیال]])",
+       "timezone-local": "مقامی",
+       "duplicate-defaultsort": "<strong>انتباہ:</strong> سابقہ ابتدائی کلید ترتیب «$1» کی بجائے اب «$2» ہی ابتدائی کلید ترتیب ہوگی۔",
+       "duplicate-displaytitle": "<strong>انتباہ:</strong> سابقہ عنوان «$1» کی بجائے اب «$2» عنوان ہوگا۔",
        "restricted-displaytitle": "<strong>انتباہ!:</strong> عنوان \"$1\" کو نظر انداز کر دیا گیا ہے کیونکہ یہ متعلقہ صفحہ کے عنوان کا حقیقی متبادل نہیں ہے۔",
-       "version": "ورژن",
+       "invalid-indicator-name": "<strong>نقص:</strong> صفحہ کی صورت حال کے اشارہ نما کی <code>name</code> خاصیت خالی نہیں ہونی چاہیے۔",
+       "version": "نسخہ",
+       "version-extensions": "نصب شدہ توسیعات",
+       "version-skins": "نصب شدہ پوشاکیں",
        "version-specialpages": "خاص صفحات",
+       "version-parserhooks": "تجزیہ کار ہک",
+       "version-variables": "متغیرات",
+       "version-antispam": "فاضل کاری کی روک تھام",
        "version-other": "دیگر",
+       "version-mediahandlers": "میڈیا ناظمین",
+       "version-hooks": "ہک",
+       "version-parser-extensiontags": "پارسر توسیع کے ٹیگ",
+       "version-parser-function-hooks": "پارسر فنکشن کے ہک",
+       "version-hook-name": "ہک کا نام",
+       "version-hook-subscribedby": "مستعمل بذریعہ",
+       "version-no-ext-name": "[کوئی نام نہیں]",
+       "version-license": "میڈیاویکی کا اجازت نامہ",
+       "version-ext-license": "اجازت نامہ",
+       "version-ext-colheader-name": "توسیع",
+       "version-skin-colheader-name": "پوشاک",
+       "version-ext-colheader-version": "نسخہ",
+       "version-ext-colheader-license": "اجازت نامہ",
+       "version-ext-colheader-description": "وضاحت",
        "version-ext-colheader-credits": "مصنف",
+       "version-license-title": "$1 کا اجازت نامہ",
+       "version-license-not-found": "اس توسیع کے اجازت نامے سے متعلق تفصیلی معلومات دستیاب نہین ہوئی۔",
+       "version-credits-title": "$1 کے انتسابات",
+       "version-credits-not-found": "اس توسیع کے انتسابات سے متعلق تفصیلی معلومات دستیاب نہین ہوئی۔",
+       "version-poweredby-credits": "پیش نظر ویکی <strong>[https://www.mediawiki.org/ میڈیاویکی]</strong> کی تقویت یافتہ ہے، جملہ حقوق محفوظ © 2001-$1 $2 بنام",
        "version-poweredby-others": "دیگر",
+       "version-poweredby-translators": "translatewiki.net کے مترجمین",
+       "version-credits-summary": "ہم درج ذیل اشخاص کی [[Special:Version|میڈیاویکی]] کی تعمیر میں شرکت کرنے کا اعتراف کرتے ہیں۔",
+       "version-license-info": "میڈیاویکی ایک آزاد سافٹ ویئر ہے؛ آپ اسے آزاد سافٹ ویئر فاؤنڈیشن کے شایع کردہ گنو عام عوامی اجازت نامے کی شرائط کے مطابق دوبارہ شایع یا اس میں تبدیلی کر سکتے ہیں، خواہ اس اجازت نامے کے نسخہ دوم کے مطابق شایع کریں یا حسب منشا کسی نئے نسخے کے مطابق۔\n\nیقیناً میڈیاویکی کی اشاعت سے امید ہے کہ یہ مفید ثابت ہوگا، لیکن اس کی  کوئی قطعی ضمانت نہیں ہے، نہ قابل تجارت ہونے کی اطلاقی ضمانت ہے اور نہ کسی خاص مقصد کے لیے موزوں ہونے کی۔ مزید تفصیل کے لیے گنو کا عام عوامی اجازت نامہ ملاحظہ فرمائیں۔\n\nآپ کو اس پروگرام کے ساتھ  [{{SERVER}}{{SCRIPTPATH}}/COPYING گنو عام عوامی اجازت نامہ کا ایک نسخہ] بھی موصول ہوگا؛ اگر یہ نسخہ نہ ملے تو Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA پتے پر خط و کتابت کریں یا [//www.gnu.org/licenses/old-licenses/gpl-2.0.html اسے آن لائن پڑھیں]۔",
+       "version-software": "نصب شدہ سافٹ ویئر",
+       "version-software-product": "مصنوعات",
+       "version-software-version": "نسخہ",
+       "version-entrypoints": "یوآرایل کا نقطہ آمد",
+       "version-entrypoints-header-entrypoint": "نقطہ آمد",
+       "version-entrypoints-header-url": "یوآرایل",
+       "version-libraries": "نصب شدہ کتب خانے",
+       "version-libraries-library": "کتب خانہ",
+       "version-libraries-version": "نسخہ",
+       "version-libraries-license": "اجازت نامہ",
+       "version-libraries-description": "وضاحت",
        "version-libraries-authors": "مصنف",
+       "redirect": "فائل، صارف، صفحہ، نسخہ، یا نوشتہ کی شناخت سے رجوع مکرر",
+       "redirect-summary": "اس خصوصی صفحہ کے ذریعہ فائل (درج کردہ فائل نام)، صفحہ (صفحہ یا نسخہ کا درج کردہ شناختی نمبر)، صفحہ صارف (صارف کا درج کردہ شناختی نمبر) یا اندراج نوشتہ (نوشتہ کا درج کردہ شناختی نمبر) کا رجوع مکرر حاصل کیا جا سکتا ہے۔ طریقہ استعمال: [[{{#Special:Redirect}}/file/Example.jpg]]، \n[[{{#Special:Redirect}}/page/64308]]، [[{{#Special:Redirect}}/revision/328429]] یا [[{{#Special:Redirect}}/user/101]] یا \n[[{{#Special:Redirect}}/logid/186]]۔",
+       "redirect-submit": "چلیں",
+       "redirect-lookup": "تلاش:",
+       "redirect-value": "قدر:",
+       "redirect-user": "صارف کی شناخت",
+       "redirect-page": "صفحہ کی شناخت",
+       "redirect-revision": "صفحہ کا نسخہ",
+       "redirect-file": "فائل کا نام",
+       "redirect-logid": "نوشتہ کی شناخت",
+       "redirect-not-exists": "یہ قدر نہیں ملی",
+       "fileduplicatesearch": "مکرر فائلوں کی تلاش",
+       "fileduplicatesearch-summary": "ہیش قدروں کے مطابق مکرر فائلوں کو تلاش کریں۔",
+       "fileduplicatesearch-filename": "فائل کا نام:",
        "fileduplicatesearch-submit": "تلاش",
+       "fileduplicatesearch-info": "$1 × $2 پکسل <br />فائل کا حجم: $3<br />MIME قسم: $4",
+       "fileduplicatesearch-result-1": "فائل «$1» کی کوئی نقل نہیں ہے۔",
+       "fileduplicatesearch-result-n": "فائل «$1» کی {{PLURAL:$2|1 نقل ہے|$2 نقلیں ہیں}}۔",
+       "fileduplicatesearch-noresults": "«$1» کے نام سے کوئی فائل نہیں مل سکی۔",
        "specialpages": "خصوصی صفحات",
+       "specialpages-note-top": "وضاحت",
+       "specialpages-note": "* عام خصوصی صفحات۔\n* <span class=\"mw-specialpagerestricted\">ممنوع خصوصی صفحات</span>",
+       "specialpages-group-maintenance": "نگہداشت کی رپورٹیں",
+       "specialpages-group-other": "دیگر خصوصی صفحات",
+       "specialpages-group-login": "کھاتہ کھولیں یا اندراج کریں",
+       "specialpages-group-changes": "حالیہ تبدیلیاں اور نوشتہ جات",
+       "specialpages-group-media": "میڈیا رپورٹیں اور اپلوڈ کردہ",
+       "specialpages-group-users": "صارفین اور اختیارات",
+       "specialpages-group-highuse": "کثیر مستعمل صفحات",
        "specialpages-group-pages": "فہارست صفحات",
-       "tag-filter": "[[Special:Tags|لوحہ]] فلٹر:",
-       "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|ٹیگ|ٹیگ}}]]: $2)",
+       "specialpages-group-pagetools": "آلات صفحہ",
+       "specialpages-group-wiki": "ڈیٹا اور آلات",
+       "specialpages-group-redirects": "رجوع مکرر کے حامل خصوصی صفحات",
+       "specialpages-group-spam": "آلات فاضل کاری",
+       "specialpages-group-developer": "آلات ترقی دہندہ",
+       "blankpage": "خالی صفحہ",
+       "intentionallyblankpage": "اس صفحہ کو دانستہ خالی چھوڑا گیا ہے۔",
+       "external_image_whitelist": "#اس سطر کو ہو بہو ایسا ہی رہنے دیں<pre>\n#ذیل میں ریجیکس کی عبارتیں درج کریں (محض // کے درمیان)\n#ان عبارتوں کی بیرونی تصویروں کے روابط سے مطابقت کی جائے گی\n#جو مطابق ہو جائیں وہ تصویر کے طور پر نظر آئیں گے ورنہ محض تصویر کا ربط ظاہر ہوگا\n# علامت # سے شرع ہونے والی سطروں کو تبصرہ سمجھا جائے گا\n#چھوٹے بڑے حروف کو نظر انداز کیا جائے گا\n\nریجیکس کی تمام عبارتوں کو اس سطر کے اوپر رکھیں۔ اس سطر کو ہو بہو ایسا ہی رہنے دیں</pre>",
+       "tags": "درست تبدیلی کے ٹیگ",
+       "tag-filter": "مقطار [[Special:Tags|ٹیگ]]:",
+       "tag-filter-submit": "مقطار",
+       "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|ٹیگ}}]]: $2)",
+       "tag-mw-contentmodelchange": "مواد کے ماڈل میں تبدیلی",
+       "tag-mw-contentmodelchange-description": "ترامیم جو صفحہ کے [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel مواد کے ماڈل کو تبدیل کرتی ہیں]",
+       "tags-title": "ٹیگ",
+       "tags-intro": "اس صفحہ میں ان تمام ٹیگوں کی فہرست درج ہے، جنہیں سافٹ ویئر کسی ترمیم پر مفہوم کے ساتھ نشان زد کرتا ہے۔",
+       "tags-tag": "ٹیگ کا نام",
+       "tags-display-header": "تبدیلی کی فہرستوں میں نمائش",
+       "tags-description-header": "مکمل وضاحت",
        "tags-source-header": "ماخذ",
        "tags-active-header": "فعال؟",
+       "tags-hitcount-header": "ٹیگ شدہ تبدیلیاں",
+       "tags-actions-header": "اقدامات",
        "tags-active-yes": "ہاں",
        "tags-active-no": "نہیں",
+       "tags-source-extension": "سافٹ ویئر کے وضاحت کردہ",
+       "tags-source-manual": "صارفین اور روبہ جات کی جانب سے دستی طور پر لگائے گئے",
+       "tags-source-none": "اب مستعمل نہیں",
+       "tags-edit": "ترمیم",
        "tags-delete": "حذف",
        "tags-activate": "فعال کریں",
        "tags-deactivate": "غیر فعال  کریں",
        "tags-hitcount": "$1 {{PLURAL:$1|تبدیلی|تبدیلیاں}}",
-       "tags-create-submit": "تخلیق",
+       "tags-manage-no-permission": "آپ کو تبدیلی کے ٹیگوں کے انتظام کی اجازت نہیں ہے۔",
+       "tags-manage-blocked": "آپ بحالت پابندی تبدیلی کے ٹیگوں کا انتظام نہیں کر سکتے۔",
+       "tags-create-heading": "نیا ٹیگ بنائیں",
+       "tags-create-explanation": "ابتدائی طور پر نو تخلیق شدہ ٹیگ صارفین اور روبہ جات کے استعمال کے لیے دستیاب ہونگے۔",
+       "tags-create-tag-name": "ٹیگ کا نام:",
+       "tags-create-reason": "وجہ:",
+       "tags-create-submit": "بنائیں",
+       "tags-create-no-name": "آپ نے ایک ٹیگ کا نام دینا ہو گا۔",
+       "tags-create-invalid-chars": "ٹیگوں کے نام میں فاصلے (<code>,</code>) یا فارورڈ سلیش (<code>/</code>) نہیں ہونے چاہئیں۔",
+       "tags-create-invalid-title-chars": "ٹیگوں کے نام میں ایسے حروف کے استعمال کی اجازت نہیں جنہیں صفحات کے عناوین میں استعمال نہیں کیا جا سکتا۔",
+       "tags-create-already-exists": "ٹیگ \"$1\" پہلے سے موجود ہے۔",
+       "tags-create-warnings-above": " \"$1\" نامی ٹیگ بنانے کے دوران میں درج ذیل {{PLURAL:$2|انتباہ دیا گیا|انتباہات دیے گئے}}:",
+       "tags-create-warnings-below": "کیا آپ واقعی ٹیگ سازی جاری رکھنا چاہتے ہیں؟",
        "tags-delete-title": "حذف ٹیگ",
+       "tags-delete-explanation-initial": "آپ «$1» ٹیگ کو ڈیٹابیس سے حذف کرنے جا رہے ہیں۔",
+       "tags-delete-explanation-in-use": "اس ٹیگ کو {{PLURAL:$2|$2 نسخے یا اندراج نوشتہ|تمام $2 نسخوں اور/یا اندراجات نوشتہ}} سے ہٹا دیا جائے گا جہاں یہ زیر استعمال ہے۔",
+       "tags-delete-explanation-warning": "یہ اقدام <strong>ناقابل تغیر</strong> ہے اور اسے <strong>واپس نہیں پھیرا جا سکتا</strong>، حتی کہ ڈیٹابیس کے منتظمین بھی اس معاملے میں معذور ہیں۔ لہذا اس بات کا یقین کر لیں کہ آیا یہ وہی ٹیگ ہے جسے آپ حذف کرنا چاہتے ہیں۔",
+       "tags-delete-explanation-active": "<strong> ٹیگ \"$1\" فعال ہے اور آئندہ بھی فعال رہے گا۔</strong> اسے روکنے کے لیے اس جگہ/ان جگہوں پر جائیں جہاں یہ ٹیگ زیر استعمال ہے اور وہاں اسے غیر فعال کر دیں۔",
        "tags-delete-reason": "وجہ:",
+       "tags-delete-submit": "اس ٹیگ کو اٹل طور پر حذف کریں",
+       "tags-delete-not-allowed": "کسی توسیع کے ذریعہ تخلیق کردہ ٹیگوں کو اس وقت تک حذف نہیں کیا جا سکتا جب تک متعلقہ توسیع خود اس کی سہولت فراہم نہ کرے۔",
+       "tags-delete-not-found": "«$1» ٹیگ موجود نہیں ہے۔",
+       "tags-delete-too-many-uses": "ٹیگ \"$1\" کو $2 سے زائد {{PLURAL:$2|نسخے|نسخوں}} میں مستعمل ہے، چنانچہ اسے حذف نہیں کیا جا سکتا۔",
+       "tags-delete-warnings-after-delete": "ٹیگ \"$1\" حذف ہو چکا ہے، لیکن درج ذیل {{PLURAL:$2|انتباہ دیا گیا|انتباہات سامنے آئے}}:",
+       "tags-delete-no-permission": "آپ کو تبدیلی کے ٹیگ حذف کرنے کی اجازت نہیں۔",
        "tags-activate-title": "ٹیگ فعال",
+       "tags-activate-question": "آپ «$1» ٹیگ کو فعال کرنے جا رہے ہیں۔",
        "tags-activate-reason": "وجہ:",
+       "tags-activate-not-allowed": "«$1» ٹیگ کو فعال کرنا ممکن نہیں۔",
+       "tags-activate-not-found": "«$1» ٹیگ موجود نہیں ہے۔",
        "tags-activate-submit": "فعال",
        "tags-deactivate-title": "ٹیگ غیر فعال",
+       "tags-deactivate-question": "آپ «$1» ٹیگ کو غیر فعال کرنے جا رہے ہیں۔",
        "tags-deactivate-reason": "وجہ:",
+       "tags-deactivate-not-allowed": "«$1» ٹیگ کو غیر فعال کرنا ممکن نہیں۔",
        "tags-deactivate-submit": "غیر فعال",
+       "tags-apply-no-permission": "آپ کو اپنی تبدیلیوں پر تبدیلی کے ٹیگوں کو نافذ کرنے کی اجازت نہیں ہے۔",
+       "tags-apply-blocked": "بحالت پابندی آپ اپنی تبدیلیوں پر تبدیلی کے ٹیگ نافذ نہیں کر سکتے۔",
+       "tags-apply-not-allowed-one": "«$1» ٹیگ کو دستی طور پر نافذ کرنے کی اجازت نہیں ہے۔",
+       "tags-apply-not-allowed-multi": "درج ذیل {{PLURAL:$2|ٹیگ|ٹیگوں}} کو دستی طور پر نافذ کرنے کی اجازت نہیں ہے: $1",
+       "tags-update-no-permission": "آپ کو انفرادی نسخوں یا نوشتہ کے اندراجات سے تبدیلی کے ٹیگوں کو ہٹانے یا ان میں لگانے کی اجازت نہیں ہے۔",
+       "tags-update-blocked": "بحالت پابندی آپ تبدیلی کے ٹیگوں کو لگا یا ہٹا نہیں سکتے۔",
+       "tags-update-add-not-allowed-one": "«$1» ٹیگ کو دستی طور پر لگانے کی اجازت نہیں ہے۔",
+       "tags-update-add-not-allowed-multi": "درج ذیل {{PLURAL:$2|ٹیگ|ٹیگوں}} کو دستی طور پر لگانے کی اجازت نہیں ہے: $1",
+       "tags-update-remove-not-allowed-one": "«$1» کو ہٹانے کی اجازت نہیں ہے۔",
+       "tags-update-remove-not-allowed-multi": "درج ذیل {{PLURAL:$2|ٹیگ|ٹیگوں}} کو دستی طور پر ہٹانے کی اجازت نہیں ہے: $1",
        "tags-edit-title": "ٹیگ میں ترمیم",
+       "tags-edit-manage-link": "ٹیگ کا انتظام",
+       "tags-edit-revision-selected": "[[:$2]] {{PLURAL:$1|کا منتخب نسخہ|کے منتخب نسخے}}:",
+       "tags-edit-logentry-selected": "{{PLURAL:$1|منتخب واقعۂ نوشتہ|منتخب واقعاتِ نوشتہ}}:",
+       "tags-edit-revision-legend": "{{PLURAL:$1|اس نسخے|ان تمام $1 نسخوں}} میں ٹیگ لگائیں یا ان سے ہٹائیں",
+       "tags-edit-logentry-legend": "{{PLURAL:$1|اس اندراج نوشتہ|ان تمام $1 اندراجات نوشتہ}} میں ٹیگ لگائیں یا ان سے ہٹائیں",
+       "tags-edit-existing-tags": "موجودہ ٹیگ:",
+       "tags-edit-existing-tags-none": "<em>کوئی نہیں</em>",
+       "tags-edit-new-tags": "نئے ٹیگ:",
+       "tags-edit-add": "ان ٹیگ کا اضافہ کریں:",
+       "tags-edit-remove": "یہ ٹیگ نکالیں:",
+       "tags-edit-remove-all-tags": "(تمام ٹیگ نکال دیں)",
+       "tags-edit-chosen-placeholder": "کچھ ٹیگ منتخب کریں",
+       "tags-edit-chosen-no-results": "اس کے مشابہ کوئی ٹیگ نہیں ملا",
        "tags-edit-reason": "وجہ:",
+       "tags-edit-revision-submit": "{{PLURAL:$1|اس نسخے|$1 نسخوں}} میں تبدیلیاں نافذ کریں",
+       "tags-edit-logentry-submit": "{{PLURAL:$1|اس اندراج نوشتہ|$1 اندراجات نوشتہ}} میں تبدیلیاں نافذ کریں",
+       "tags-edit-success": "تبدیلیاں نافذ کر دی گئیں۔",
+       "tags-edit-failure": "تبدیلیاں نافذ نہیں کی جا سکیں:\n$1",
+       "tags-edit-nooldid-title": "نادرست ہدف نسخہ",
+       "tags-edit-nooldid-text": "اس کارروائی کو انجام دینے کے لیے یا تو آپ نے کسی ہدف نسخے کا تعین نہیں کیا ہے، یا متعینہ نسخہ موجود نہیں ہے۔",
+       "tags-edit-none-selected": "اضافہ کرنے یا ہٹانے کے لیے کم از کم ایک ٹیگ منتخب کریں۔",
+       "comparepages": "صفحات کا موازنہ کریں",
+       "compare-page1": "صفحہ 1",
+       "compare-page2": "صفحہ 2",
+       "compare-rev1": "نظرثانی 1",
+       "compare-rev2": "نظرثانی 2",
+       "compare-submit": "موازنہ",
+       "compare-invalid-title": "آپ کا اختصاصی عنوان غلط ہے۔",
+       "compare-title-not-exists": "آپ کا اختصاصی عنوان موجود نہیں۔",
+       "compare-revision-not-exists": "آپ کی اختصاصی نظرثانی موجود نہیں۔",
+       "dberr-problems": "افسوس! اس ویب سائٹ کو تکنیکی مشکلات کا سامنا ہے۔",
+       "dberr-again": "چند منٹ انتظار کے بعد دوبارہ کوشش کریں۔",
+       "dberr-info": "(ڈیٹا بیس تک رسائی نہیں مل سکی: $1)",
+       "dberr-info-hidden": "(ڈیٹا بیس تک رسائی نہیں مل سکی)",
+       "dberr-usegoogle": "اسی درمیان میں آپ گوگل کے ذریعہ تلاش کرنے کی کوشش کر سکتے ہیں۔",
+       "dberr-outofdate": "واضح رہے کہ ہمارے مواد کے متعلق ان کے اشاریے ممکن ہے پرانے ہو چکے ہوں۔",
+       "dberr-cachederror": "یہ درخواست شدہ صفحہ کا کیشے شدہ نسخہ ہے اور ممکن ہے تازہ نہ ہو۔",
+       "htmlform-invalid-input": "آپ کے اندراج میں کچھ مسائل ہیں۔",
+       "htmlform-select-badoption": "آپ کی درج کردہ قدر درست اختیار نہیں ہے۔",
+       "htmlform-int-invalid": "آپ کی درج کردہ قدر عدد صحیح نہیں ہے۔",
+       "htmlform-float-invalid": "آپ کی درج کردہ قدر عدد نہیں ہے۔",
+       "htmlform-int-toolow": "آپ کی درج کردہ قدر کمترین حد یعنی $1 سے کم ہے۔",
+       "htmlform-int-toohigh": "آپ کی درج کردہ قدر $1 سے زیادہ ہے۔",
+       "htmlform-required": "یہ قدر درکار ہے۔",
+       "htmlform-submit": "ٹھیک ہے",
+       "htmlform-reset": "رد ترامیم",
        "htmlform-selectorother-other": "دیگر",
        "htmlform-no": "نہیں",
        "htmlform-yes": "ہاں",
+       "htmlform-chosen-placeholder": "ایک اختیار منتخب کریں",
+       "htmlform-cloner-create": "مزید اضافہ کریں",
+       "htmlform-cloner-delete": "حذف",
+       "htmlform-cloner-required": "کم ازکم ایک قدر درکار ہے۔",
+       "htmlform-date-placeholder": "YYYY-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "YYYY-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "آپ کی درج کردہ قدر تسلیم شدہ تاریخ نہیں ہے۔ براہ کرم YYYY-MM-DD فارمیٹ استعمال کرنے کی کوشش کریں۔",
+       "htmlform-time-invalid": "آپ کی درج کردہ قدر تسلیم شدہ وقت نہیں ہے۔ براہ کرم HH:MM:SS فارمیٹ استعمال کرنے کی کوشش کریں۔",
+       "htmlform-datetime-invalid": "آپ کی درج کردہ قدر تسلیم شدہ تاریخ اور وقت نہیں ہے۔ براہ کرم YYYY-MM-DD HH:MM:SS فارمیٹ استعمال کرنے کی کوشش کریں۔",
+       "htmlform-title-badnamespace": "[[:$1]] صفحہ \"{{ns:$2}}\" نام فضا میں موجود نہیں۔",
+       "htmlform-title-not-creatable": "«$1» عنوان قابل تخلیق نہیں",
+       "htmlform-title-not-exists": "$1 موجود نہیں ہے۔",
+       "htmlform-user-not-exists": "<strong>$1</strong> موجود نہیں ہے۔",
+       "htmlform-user-not-valid": "<strong>$1</strong> درست صارف نام نہیں ہے۔",
        "logentry-delete-delete": "$1 {{GENDER:$2|حذف کیا گیا}} صفحہ $3",
+       "logentry-delete-restore": "$1 نے صفحہ $3 کو {{GENDER:$2|بحال کیا}}",
+       "logentry-delete-event": "$1 نے $3 میں موجود {{PLURAL:$5|ایک واقعۂ نوشتہ|$5 واقعات نوشتہ}} کی مرئیت کو {{GENDER:$2|تبدیل کیا}}: $4",
+       "logentry-delete-revision": "$1 نے $3 میں موجود {{PLURAL:$5|ایک نسخے|$5 نسخوں}} کی مرئیت کو {{GENDER:$2|تبدیل کیا}}: $4",
+       "logentry-delete-event-legacy": "$1 نے $3 میں موجود واقعات نوشتہ کی مرئیت کو {{GENDER:$2|تبدیل کیا}}",
+       "logentry-delete-revision-legacy": "$1 نے $3 میں موجود نسخوں کی مرئیت کو {{GENDER:$2|تبدیل کیا}}",
+       "logentry-suppress-delete": "$1 نے صفحہ $3 کو {{GENDER:$2|پوشیدہ کیا}}",
+       "logentry-suppress-event": "$1 نے $3 میں موجود {{PLURAL:$5|ایک واقعۂ نوشتہ|$5 واقعات نوشتہ}} کی مرئیت کو خفیہ طور پر {{GENDER:$2|تبدیل کیا}}: $4",
+       "logentry-suppress-revision": "$1 نے $3 میں موجود {{PLURAL:$5|ایک نسخے|$5 نسخوں}} کی مرئیت کو خفیہ طور پر {{GENDER:$2|تبدیل کیا}}: $4",
+       "logentry-suppress-event-legacy": "$1 نے $3 میں موجود واقعات نوشتہ کی مرئیت کو خفیہ طور پر {{GENDER:$2|تبدیل کیا}}",
+       "logentry-suppress-revision-legacy": "$1 نے $3 میں موجود نسخوں کی مرئیت کو خفیہ طور پر {{GENDER:$2|تبدیل کیا}}",
+       "revdelete-content-hid": "مواد کو پوشیدہ کرد یا گیا",
+       "revdelete-summary-hid": "خلاصہ ترمیم کو پوشیدہ کر دیا گیا",
+       "revdelete-uname-hid": "صارف نام کو پوشیدہ کر دیا گیا",
+       "revdelete-content-unhid": "مواد کی پوشیدگی ختم کی گئی",
+       "revdelete-summary-unhid": "خلاصہ ترمیم کی پوشیدگی ختم کی گئی",
+       "revdelete-uname-unhid": "صارف نام کی پوشیدگی ختم کی گئی",
+       "revdelete-restricted": "منتظمین کو محدود کر دیا گیا",
+       "revdelete-unrestricted": "منتظمین کے لیے کھول دیا گیا",
+       "logentry-block-block": "$1 نے {{GENDER:$4|$3}} پر $5 کے وقت اختتام تک {{GENDER:$2|پابندی لگائی}} $6",
+       "logentry-block-unblock": "$1 نے {{GENDER:$4|$3}} سے {{GENDER:$2|پابندی اٹھائی}}",
+       "logentry-block-reblock": "$1 نے {{GENDER:$4|$3}} کی ترتیبات پابندی کو {{GENDER:$2|تبدیل کیا}}، اب مدت اختتام $5 $6 ہے۔",
+       "logentry-suppress-block": "$1 نے {{GENDER:$4|$3}} پر $5 کے وقت اختتام تک {{GENDER:$2|پابندی لگائی}} $6",
+       "logentry-suppress-reblock": "$1 نے {{GENDER:$4|$3}} کی ترتیبات پابندی کو {{GENDER:$2|تبدیل کیا}}، اب مدت اختتام $5 $6 ہے۔",
+       "logentry-import-upload": "$1 نے $3 کو فائل اپلوڈ کی مدد سے {{GENDER:$2|درآمد کیا}}",
+       "logentry-import-upload-details": "$1 نے $3 کو فائل اپلوڈ کی مدد سے {{GENDER:$2|درآمد کیا}} ($4 {{PLURAL:$4|نسخہ|نسخے}})",
+       "logentry-import-interwiki": "$1 نے $3 کو دوسری ویکی سے {{GENDER:$2|درآمد کیا}}",
+       "logentry-import-interwiki-details": "$1 نے $3 کو $5 سے {{GENDER:$2|درآمد کیا}} ($4 {{PLURAL:$4|نسخہ|نسخے}})",
+       "logentry-merge-merge": "$1 نے $3 کو $4 میں {{GENDER:$2|ضم کیا}} ($5 تک نسخے)",
        "logentry-move-move": "$1 نے صفحہ $3 کو $4 کی جانب منتقل کیا",
+       "logentry-move-move-noredirect": "$1 نے صفحہ $3 کو $4 کی جانب بدون رجوع مکرر {{GENDER:$2|منتقل کیا}}",
+       "logentry-move-move_redir": "$1 نے رجوع مکرر ہٹا کر صفحہ $3 کو $4 کی جانب {{GENDER:$2|منتقل کیا}}",
+       "logentry-move-move_redir-noredirect": "$1 نے صفحہ $3 کو رجوع مکرر چھوڑے بغیر $4 کی جانب جو رجوع مکر تھا {{GENDER:$2|منتقل کیا}}",
+       "logentry-patrol-patrol": "$1 نے صفحہ $3 کے نسخہ $4 کو مراجعت شدہ {{GENDER:$2|نشان زد کیا}}",
+       "logentry-patrol-patrol-auto": "$1 نے صفحہ $3 کے نسخہ $4 کو خودکار طور پر مراجعت شدہ {{GENDER:$2|نشان زد کیا}}",
+       "logentry-newusers-newusers": "صارف کھاتہ $1 {{GENDER:$2|تخلیق ہو چکا ہے}}",
        "logentry-newusers-create": "صارف کھاتہ $1 {{GENDER:$2|بنایا گیا}}",
+       "logentry-newusers-create2": "$1 نے صارف کھاتہ $3 {{GENDER:$2|تخلیق کیا}}",
+       "logentry-newusers-byemail": "$1 نے صارف کھاتہ $3 {{GENDER:$2|تخلیق کیا}} اور پاس ورڈ بذریعہ برقی خط روانہ کیا گیا ہے",
+       "logentry-newusers-autocreate": "صارف کھاتہ $1 خودکار طور پر {{GENDER:$2|تخلیق ہوا}}",
        "logentry-protect-move_prot": "$1 نے ترتیب درجہ حفاظت $4 سے $3 کی طرف {{GENDER:$2|منتقل کی}}",
+       "logentry-protect-unprotect": "$1 نے $3 سے حفاظت {{GENDER:$2|ختم کی}}",
        "logentry-protect-protect": "$1 نے $3 کو {{GENDER:$2|محفوظ کیا}}  $4",
+       "logentry-protect-protect-cascade": "$1 نے $3 کو {{GENDER:$2|محفوظ کیا}} $4 [آبشاری]",
        "logentry-protect-modify": "$1 نے $3 کا درجۂ حفاظت {{GENDER:$2|تبدیل کیا}} $4",
+       "logentry-protect-modify-cascade": "$1 نے $3 کا درجہ حفاظت {{GENDER:$2|تبدیل کیا}} $4 [آبشاری]",
        "logentry-rights-rights": "$1 نے {{GENDER:$6|$3}} کی گروہی رکنیت از $4 تا $5 {{GENDER:$2|تبدیل کی}}",
+       "logentry-rights-rights-legacy": "$1 نے $3 کی گروہی روکنیت کو {{GENDER:$2|تبدیل کیا}}",
+       "logentry-rights-autopromote": "$1 کو خودکار طور پر $4 سے $5 پر {{GENDER:$2|ترقی مل گئی}}",
        "logentry-upload-upload": "$1 {{GENDER:$2|اپلوڈ}} $3",
+       "logentry-upload-overwrite": "$1 نے $3 کا نیا نسخہ {{GENDER:$2|اپلوڈ کیا}}",
+       "logentry-upload-revert": "$1 نے $3 کو {{GENDER:$2|اپلوڈ کیا}}",
+       "log-name-managetags": "نوشتہ انتظام ٹیگ",
+       "log-description-managetags": "اس صفحہ میں [[Special:Tags|ٹیگوں]] سے متعلق انتظامی کاموں کی فہرست درج ہے۔ اس نوشتہ میں محض ان اقدامات کی فہرست ہے جنہیں کسی منتظم نے از خود انجام دیا ہو؛ تاہم ویکی سافٹویئر کی مدد سے ٹیگوں کو تخلیق یا حذف کیا جا سکتا ہے، جس کا اندراج اس نوشتہ میں ہونا ضروری نہیں۔",
+       "logentry-managetags-create": "$1 نے «$4» ٹیگ کو {{GENDER:$2|بنایا}}",
+       "logentry-managetags-delete": "$1 نے ٹیگ \"$4\" کو {{GENDER:$2|حذف کیا}} ($5 {{PLURAL:$5|نسخے یا اندراج نوشتہ|نسخوں یا اندراجات نوشتہ}} سے حذف کیا گیا)",
+       "logentry-managetags-activate": "$1 نے ٹیگ «$4» کو صارفین اور روبہ جات کے استعمال کے لیے {{GENDER:$2|فعال کیا}}",
+       "logentry-managetags-deactivate": "$1 نے ٹیگ «$4» کو صارفین اور روبہ جات کے استعمال کے لیے {{GENDER:$2|غیر فعال کیا}}",
+       "log-name-tag": "نوشتہ ٹیگ",
+       "log-description-tag": "ذیل میں صارفین کی جانب سے انفرادی نسخوں یا اندراجات نوشتہ سے [[Special:Tags|ٹیگوں]] کے حذف و اضافہ کا نوشتہ دیکھا جا سکتا ہے۔ تاہم اس نوشتہ میں ٹیگ کاری کے اقدامات -مثلاً کب وہ کسی ترمیم یا حذف شدگی وغیرہ کا جزو بنے- کی فہرست نہیں ہے۔",
+       "logentry-tag-update-add-revision": "$1 نے صفحہ $3 کے نسخہ $4 پر $6 {{PLURAL:$7|ٹیگ|ٹیگوں}} کو {{GENDER:$2|شامل کیا}}",
+       "logentry-tag-update-add-logentry": "$1 نے صفحہ $3 کے اندراج نوشتہ $5 میں $6 {{PLURAL:$7|ٹیگ|ٹیگوں}} کو {{GENDER:$2|شامل کیا}}",
+       "logentry-tag-update-remove-revision": "$1 نے صفحہ $3 کے نسخہ $4 سے $8 {{PLURAL:$9|ٹیگ|ٹیگوں}} کو {{GENDER:$2|حذف کیا}}",
+       "logentry-tag-update-remove-logentry": "$1 نے صفحہ $3 کے اندراج نوشتہ $5 سے $8 {{PLURAL:$9|ٹیگ|ٹیگوں}} کو {{GENDER:$2|حذف کیا}}",
+       "logentry-tag-update-revision": "$1 نے صفحہ $3 کے نسخہ $4 پر موجود ٹیگوں کو {{GENDER:$2|تازہ کیا}} ({{PLURAL:$7|شامل کیا گیا|شامل کیے گئے}} $6؛ {{PLURAL:$9|حذف کیا گیا|حذف کیے گئے}} $8)",
+       "logentry-tag-update-logentry": "$1 نے صفحہ $3 کے اندراج نوشتہ $5 پر موجود ٹیگوں کو {{GENDER:$2|تازہ کیا}} ({{PLURAL:$7|شامل کیا گیا|شامل کیے گئے}} $6؛ {{PLURAL:$9|حذف کیا گیا|حذف کیے گئے}} $8)",
        "rightsnone": "(کچھ نہیں)",
        "revdelete-summary": "خلاصۂ تدوین",
+       "feedback-adding": "صفحہ میں تبصرہ درج کیا جا رہا ہے۔۔۔",
+       "feedback-back": "واپس",
+       "feedback-bugcheck": "زبردست! جانچ لیں کہ کہیں پہلے ہی [$1 اس کی اطلاع نہ دے دی گئی ہو]۔",
+       "feedback-bugnew": "میں نے جانچ لیا ہے۔ نئی خامی کی شکایت کریں",
+       "feedback-bugornote": "اگر آپ کسی تکنیکی مسئلہ کو تفصیل سے بیان کر سکتے ہیں تو براہ کرم [$1 یہاں خامی کی اطلاع دیں]۔\nورنہ ذیل میں موجود فارم کا استعمال کریں۔ آپ کا تبصرہ آپ کے صارف نام کے ساتھ صفحہ «[$3 $2]» میں شائع کر دیا جائے گا۔",
+       "feedback-cancel": "منسوخ",
+       "feedback-close": "مکمل",
+       "feedback-external-bug-report-button": "تکنیکی خامی کی اطلاع دیں",
+       "feedback-dialog-title": "تبصرہ روانہ کریں",
+       "feedback-dialog-intro": "اپنا تبصرہ شائع کرنے کے لیے ذیل میں موجود فارم کو استعمال کر سکتے ہیں۔ آپ کا تبصرہ آپ کے صارف نام کے ساتھ صفحہ «$1» میں شامل کر دیا جائے گا۔",
+       "feedback-error1": "نقص: اے پی آئی کی جانب سے غیر معروف نتیجہ",
+       "feedback-error2": "نقص: ترمیم ناکام ہو گئی",
+       "feedback-error3": "نقص: اے پی آئی سے کوئی جواب نہیں",
+       "feedback-error4": "نقص: درج کردہ عنوان تبصرہ کے تحت شائع نہیں کیا جا سکا۔",
+       "feedback-message": "پیغام:",
+       "feedback-subject": "موضوع:",
+       "feedback-submit": "روانہ کریں",
+       "feedback-terms": "میں اس امر سے بخوبی واقف ہوں کہ میری یوزر ایجنٹ معلومات کے تحت میرے زیر استعمال براؤزر اور آپریٹنگ سسٹم کے نسخے کی معلومات بھی شامل ہیں اور انہیں میرے تبصرے کے ساتھ عوامی طور پر شائع کیا جائے گا۔",
+       "feedback-termsofuse": "میں شرائط استعمال کے مطابق تبصرہ درج کرنے پر متفق ہوں۔",
+       "feedback-thanks": "شکریہ! آپ کا تبصرہ صفحہ «[$1 $2]» میں درج کر دیا گیا ہے۔",
        "feedback-thanks-title": "شکریہ!",
+       "feedback-useragent": "یوزر ایجنٹ:",
        "searchsuggest-search": "تلاش",
-       "expandtemplates": "سانچے کو وسیع کریں",
+       "searchsuggest-containing": "نتائج...",
+       "api-error-autoblocked": "آپ کے آئی پی پتے پر خودکار طور پر پابندی لگا دی گئی ہے، کیونکہ اسے کسی ممنوع صارف نے استعمال کیا ہے۔",
+       "api-error-badaccess-groups": "آپ کو اس ویکی میں فائلیں اپلوڈ کرنے کی اجازت نہیں ہے۔",
+       "api-error-badtoken": "داخلی نقص: غلط ٹوکن۔",
+       "api-error-blocked": "آپ کی ترمیم کاری پر پابندی لگا دی گئی ہے۔",
+       "api-error-copyuploaddisabled": "یوآرایل کے ذریعہ اس سرور پر اپلوڈ کو غیر فعال کر دیا گیا ہے۔",
+       "api-error-duplicate": "یکساں مواد کی حامل {{PLURAL:$1|ایک اور فائل|مزید فائلیں}} ویکی پر موجود {{PLURAL:$1|ہے|ہیں}}۔",
+       "api-error-duplicate-archive": "یکساں مواد کی حامل {{PLURAL:$1|ایک اور فائل|مزید فائلیں}} ویکی پر موجود {{PLURAL:$1|تھی|تھیں}}، لیکن {{PLURAL:$1|اسے|انہیں}} حذف کر دیا گیا۔",
+       "api-error-empty-file": "آپ کی ارسال کردہ فائل خالی تھی۔",
+       "api-error-emptypage": "نئے خالی صفحات بنانے کی اجازت نہیں ہے۔",
+       "api-error-fetchfileerror": "داخلی نقص: فائل کو اخذ کرنے کے دوران میں کچھ غلط ہوا ہے۔",
+       "api-error-fileexists-forbidden": "«$1» کے نام سے ایک فائل پہلے سے موجود ہے، اسے تبدیل نہیں کیا جا سکتا۔",
+       "api-error-fileexists-shared-forbidden": "«$1» کے نام سے مشترکہ ذخیرے میں ایک فائل پہلے سے موجود ہے، اسے تبدیل نہیں کیا جا سکتا۔",
+       "api-error-file-too-large": "آپ کی ارسال کردہ فائل بہت بڑی تھی۔",
+       "api-error-filename-tooshort": "فائل کا نام انتہائی مختصر ہے۔",
+       "api-error-filetype-banned": "فائل کی اس قسم پر پابندی عائد ہے۔",
+       "api-error-filetype-banned-type": "$1 نوعیت کی {{PLURAL:$4|فائل|فائلوں}} کی اجازت نہیں۔\nاجازت یافتہ نوعیت کی {{PLURAL:$3|فائل|فائلیں}} $2 {{PLURAL:$3|ہے|ہیں}}۔",
+       "api-error-filetype-missing": "فائل کی توسیع موجود نہیں",
+       "api-error-hookaborted": "آپ نے جو تبدیلی کرنے کی کوشش کی اسے کسی توسیع نے منسوخ کر دیا۔",
+       "api-error-http": "داخلی نقص: سرور سے رابطہ نہیں ہو سکا",
+       "api-error-illegal-filename": "اس نام کی فائل ممنوع ہے۔",
+       "api-error-internal-error": "داخلی نقص: ویکی پر آپ کے اپلوڈ کی انجام دہی کے دوران میں کچھ غلط واقع ہوا۔",
+       "api-error-invalid-file-key": "داخلی نقص: عارضی ذخیرے میں فائل نہیں مل سکی۔",
+       "api-error-missingparam": "داخلی نقص: درخواست میں مفقود متغیرات",
+       "api-error-missingresult": "داخلی نقص: نہیں بتایا جا سکتا کہ نقل و چسپاں کا عمل کامیاب ہوا یا نہیں۔",
+       "api-error-mustbeloggedin": "فائلیں اپلوڈ کرنے کے لیے آپ کا داخل ہونا ضروری ہے۔",
+       "api-error-mustbeposted": "داخلی نقص: یہ درخواست HTTP POST کی متقاضی ہے۔",
+       "api-error-noimageinfo": "اپلوڈ کامیاب رہا لیکن فائل کے متعلق سرور نے ہمیں کسی قسم کی معلومات بہم نہیں پہنچائیں۔",
+       "api-error-nomodule": "داخلی نقص: کسی ماڈیول کو مرتب نہیں کیا گیا۔",
+       "api-error-ok-but-empty": "داخلی نقص: سرور سے کوئی جواب نہیں ملا۔",
+       "api-error-overwrite": "موجودہ فائل کو دوبارہ اپلوڈ کرنے کی اجازت نہیں۔",
+       "api-error-ratelimited": "مختصر وقت میں آپ اس ویکی میں اجازت یافتہ تعداد سے زیادہ فائلوں کو اپلوڈ کرنے کی کوشش کر رہے ہیں۔\nبراہ کرم کچھ منٹ بعد دوبارہ کوشش کریں۔",
+       "api-error-stashfailed": "داخلی نقص: عارضی فائل رکھنے میں سرور کو ناکامی ہوئی۔",
+       "api-error-publishfailed": "داخل نقص: عارضی فائل شائع کرنے میں سرور کو ناکامی ہوئی۔",
+       "api-error-stasherror": "نہاں خانے میں فائل کو اپلوڈ کرتے وقت کوئی نقص واقع ہوا۔",
+       "api-error-stashedfilenotfound": "نہاں خانے میں رکھی گئی فائل وہاں سے اپلوڈ کرنے کے دوران نہیں ملی۔",
+       "api-error-stashpathinvalid": "وہ جگہ غلط ہے جہاں پوشیدہ فائل ملنی چاہیے تھی۔",
+       "api-error-stashfilestorage": "نہاں خانے میں فائل کو رکھتے وقت کوئی نقص واقع ہوا۔",
+       "api-error-stashzerolength": "سرور اس فائل کو پوشیدہ نہ کر سکا کیونکہ اس کی لمبائی صفر ہے۔",
+       "api-error-stashnotloggedin": "اپلوڈ کے نہاں خانے میں فائلوں کو محفوظ کرنے کے لیے آپ کا داخل ہونا ضروری ہے۔",
+       "api-error-stashwrongowner": "فائل کی جس کلید کے ذریعہ آپ نہاں خانے میں رسائی کی کوشش کر رہے ہیں وہ آپ کی نہیں ہے۔",
+       "api-error-stashnosuchfilekey": "فائل کی جس کلید کے ذریعہ آپ نہاں خانے میں رسائی کی کوشش کر رہے ہیں وہ موجود نہیں۔",
+       "api-error-timeout": "متوقع مدت کے دوران میں سرور نے کوئی جواب نہیں دیا۔",
+       "api-error-unclassified": "نامعلوم نقص واقع ہوا۔",
+       "api-error-unknown-code": "نامعلوم نقص: \"$1\" ۔",
+       "api-error-unknown-error": "داخلی نقص: آپ کی فائل کو اپلوڈ کرنے کے دوران میں کچھ غلط ہو گیا ہے۔",
+       "api-error-unknown-warning": "نامعلوم انتباہ: \"$1\"",
+       "api-error-unknownerror": "نامعلوم نقص: \"$1\"",
+       "api-error-uploaddisabled": "اس ویکی پر اپلوڈ کی سہولت غیر فعال ہے۔",
+       "api-error-verification-error": "شاید فائل خراب ہے یا غلط توسیع کی حامل ہے۔",
+       "api-error-was-deleted": "اس نام کی فائل پہلے اپلوڈ کی گئی تھی اور معاً بعد حذف کر دی گئی۔",
+       "duration-seconds": "$1 {{PLURAL:$1|سیکنڈ}}",
+       "duration-minutes": "$1 {{PLURAL:$1|منٹ}}",
+       "duration-hours": "$1 {{PLURAL:$1|گھنٹہ|گھنٹے}}",
+       "duration-days": "$1 {{PLURAL:$1|دن}}",
+       "duration-weeks": "$1 {{PLURAL:$1|ہفتہ|ہفتے}}",
+       "duration-years": "$1 {{PLURAL:$1|سال}}",
+       "duration-decades": "$1 {{PLURAL:$1|دہائی|دہائیاں}}",
+       "duration-centuries": "$1 {{PLURAL:$1|صدی|صدیاں}}",
+       "duration-millennia": "$1 {{PLURAL:$1|ہزاریے|ہزاریہ}}",
+       "rotate-comment": "تصویر $1 {{PLURAL:$1|درجہ|درجے}} بائیں سے دائیں گھمائی گئی",
+       "limitreport-title": "تجزیاتی ڈیٹا:",
+       "limitreport-cputime": "سی پی یو استعمال کا وقت",
+       "limitreport-cputime-value": "$1 {{PLURAL:$1|سیکنڈ}}",
+       "limitreport-walltime": "حقیقی استعمال کا وقت",
+       "limitreport-walltime-value": "$1 {{PLURAL:$1|سیکنڈ}}",
+       "limitreport-ppvisitednodes": "پراسیسر کی مشاہدہ کردہ گرہوں کی تعداد",
+       "limitreport-ppgeneratednodes": "پراسیسر کی مدد  سے جاری کردہ گرہوں کی تعداد",
+       "limitreport-postexpandincludesize": "بعد از توسیع شمولیت کا حجم",
+       "limitreport-postexpandincludesize-value": "$1/$2 {{PLURAL:$2|بائٹ}}",
+       "limitreport-templateargumentsize": "سانچہ آرگومنٹ کا حجم",
+       "limitreport-templateargumentsize-value": "$1/$2 {{PLURAL:$2|بائٹ}}",
+       "limitreport-expansiondepth": "توسیع کی بلند ترین گہرائی",
+       "limitreport-expensivefunctioncount": "کثیر الاستعمال پارسر فنکشنوں کی تعداد",
+       "expandtemplates": "سانچوں کی توسیع",
+       "expand_templates_intro": "اس خصوصی صفحہ میں ویکی کی عبارتوں کو اخذ کرکے ان میں موجود تمام مستعمل سانچوں کو کھولا جاتا ہے۔\nنیز اس صفحہ میں <code><nowiki>{{</nowiki>#language:…}}</code> جیسے پارسر فنکشنوں اور <code><nowiki>{{</nowiki>CURRENTDAY}}</code> جیسے متغیرات کی معاونت بھی رکھی گئی ہے۔\nدرحقیقت یہاں ہر چیز کو دوہرے محرابی قوسین میں کھول دیا جاتا ہے۔",
+       "expand_templates_title": "اس عبارت کا عنوان، مثلاً {{FULLPAGENAME}} وغیرہ کے لیے:",
        "expand_templates_input": "ان پٹ متن:",
        "expand_templates_output": "نتیجہ",
+       "expand_templates_xml_output": "XML آؤٹ پٹ",
+       "expand_templates_html_output": "ایچ ٹی ایم ایل کا خام نتیجہ",
        "expand_templates_ok": "ٹھیک ہے",
        "expand_templates_remove_comments": "تبصرے حذف کریں",
+       "expand_templates_remove_nowiki": "نتیجہ میں <nowiki> کے ٹیگوں کو چھپائیں",
+       "expand_templates_generate_xml": "ایکس ایم ایل تجزیہ کے درخت کو دکھائیں",
+       "expand_templates_generate_rawhtml": "خام اہچ ٹی ایم ایل دکھائیں",
        "expand_templates_preview": "پیش نظارہ",
+       "expand_templates_preview_fail_html": "<em>چونکہ {{SITENAME}} نے خام ایچ ٹی ایم ایل فعال کر رکھا ہے اور نشست کا ڈیٹا گم ہو گیا ہے لہذا جاوا اسکرپٹ کے طوفان بدتمیزی سے تحفظ کے لیے نمائش کو پوشیدہ رکھا گیا ہے۔</em>\n\n<strong>اگر نمائش کی یہ کوشش درست ہے تو براہ کرم دوبارہ کوشش کریں۔</strong>\nاگر اب بھی کامیابی نہ ملے تو [[Special:UserLogout|خارج ہو کر]] دوبارہ داخل ہوں، نیز اپنے براؤز کی ترتیبات کو بھی جانچ لیں کہ آیا اس میں کوکیز کو ذخیرہ کرنے کی اجازت ہے یا نہیں۔",
+       "expand_templates_preview_fail_html_anon": "<em>چونکہ {{SITENAME}} نے خام ایچ ٹی ایم ایل فعال کر رکھا ہے اور آپ داخل نہیں ہیں لہذا جاوا اسکرپٹ کے طوفان بدتمیزی سے تحفظ کے لیے نمائش کو پوشیدہ رکھا گیا ہے۔</em>\n\n<strong>اگر نمائش کی یہ کوشش درست ہے تو براہ کرم [[Special:UserLogin|داخل ہوں]] اور دوبارہ کوشش کریں۔</strong>",
+       "expand_templates_input_missing": "آپ کو کم از کم کچھ متن درج کرنا ہوگا۔",
+       "pagelanguage": "صفحے کی زبان تبدیل کریں",
        "pagelang-name": "صفحہ",
        "pagelang-language": "زبان",
+       "pagelang-use-default": "طے شدہ زبان استعمال کرتا ہے",
+       "pagelang-select-lang": "زبان کا انتخاب کریں",
+       "pagelang-submit": "ٹھیک ہے",
+       "right-pagelang": "صفحے کی زبان تبدیل کریں",
+       "action-pagelang": "صفحے کی زبان تبدیل کریں",
+       "log-name-pagelang": "نوشتہ تبدیلی زبان",
+       "log-description-pagelang": "ذیل میں زبانوں کے صفحہ میں ہونے والی تبدیلیوں کا نوشتہ ہے۔",
+       "logentry-pagelang-pagelang": "$1 نے $3 کی زبان کو $4 سے $5 میں {{GENDER:$2|تبدیل کیا}}",
+       "default-skin-not-found": "اوہ! <code>$wgDefaultSkin</code> میں <code>$1</code> کے نام سے درج شدہ آپ کی ویکی کی ابتدائی پوشاک دستیاب نہیں ہے۔\n\nایسا معلوم ہوتا ہے کہ آپ کی تنصیب میں حسب ذیل {{PLURAL:$4|پوشاک|پوشاکیں}} موجود {{PLURAL:$4|ہے|ہیں}}۔ {{PLURAL:$4|پوشاک|پوشاکوں}} کو فعال کرنے اور ابتدائی پوشاک کو منتخب کرنے کے بارے میں مزید تفصیل کے لیے [https://www.mediawiki.org/wiki/Manual:Skin_configuration رہنما: ترتیبات پوشاک] ملاحظہ فرمائیں۔\n\n$2\n\n;اگر آپ نے میڈیاویکی کو ابھی نصب کیا ہے تو:\n:شاید آپ نے اسے گٹ سے یا کوئی دوسرا طریقہ استعمال کرکے براہ راست سورس کوڈ سے نصب کیا ہے۔ میڈیاویکی 1.24 اور اس کے بعد کی اشاعتوں میں پوشاکیں شامل نہیں ہیں۔ چنانچہ [https://www.mediawiki.org/wiki/Category:All_skins میڈیاویکی ڈاٹ آرگ میں موجود پوشاکوں کی ڈائرکٹری] سے کچھ پوشاکیں نصب کرنے کی کوشش کریں، جس کے لئے آپ:\n:* [https://www.mediawiki.org/wiki/Download ٹاربال انسٹالر] ڈاؤنلوڈ کریں، اس میں متعدد پوشاکیں اور کچھ توسیعیں موجود ہیں۔ آپ اس کی <code>skins/</code> ڈائرکٹری کو نقل و چسپاں کر سکتے ہیں۔\n:* انفرادی پوشاکوں کے ٹاربال [https://www.mediawiki.org/wiki/Special:SkinDistributor میڈیاویکی ڈاٹ آرگ] سے ڈاؤنلوڈ کریں۔\n:* [https://www.mediawiki.org/wiki/Download_from_Git#Using_Git_to_download_MediaWiki_skins گٹ کے ذریعہ پوشاکیں ڈاؤنلوڈ کریں]۔\n:اگر آپ میڈیاویکی کے ترقی دہندہ ہیں تو اس عمل کے دوران میں اپنے گٹ ذخیرے سے تعارض نہ کریں۔\n\n; اگر آپ نے ابھی میڈیاویکی کی تجدید کی ہو تو:\n: میڈیاویکی 1.24 اور اس کے بعد کی اشاعتوں میں خودکار طور پر نصب شدہ پوشاکیں فعال نہیں ہوتیں (مزید تفصیل کے لیے [https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery رہنما: پوشاک کی خودکار دریافت] ملاحظہ فرمائیں)۔ نیز آپ {{PLURAL:$5|پوشاک|تمام پوشاکوں}} کو فعال کرنے کے لیے درج ذیل {{PLURAL:$5|سطر|سطروں}} کو <code>LocalSettings.php</code> میں چسپاں کر سکتے ہیں:\n\n<pre dir=\"ltr\">$3</pre>\n\n; اگر آپ نے ابھی <code>LocalSettings.php</code> میں تبدیلی کی ہو اور پوشاک فعال نہ ہو رہی ہو تو:\n: اپنی تبدیلی کو دوبارہ جانچ لیں، کہیں لکھنے کے دوران میں ہجے غلط نہ ہو گئے ہو۔",
+       "default-skin-not-found-no-skins": "اوہ! <code>$wgDefaultSkin</code> میں <code>$1</code> کے نام سے درج شدہ آپ کی ویکی کی ابتدائی پوشاک دستیاب نہیں ہے۔\n\nاور آپ نے کسی پوشاک کو نصب نہیں کیا ہے۔\n\n;اگر آپ نے میڈیاویکی کو ابھی نصب کیا ہے یا اس کی تجدید کی ہے تو:\n:شاید آپ نے اسے گٹ سے یا کوئی دوسرا طریقہ استعمال کرکے براہ راست سورس کوڈ سے نصب کیا ہے۔ میڈیاویکی 1.24 اور اس کے بعد کی اشاعتوں میں پوشاکیں شامل نہیں ہیں۔ چنانچہ [https://www.mediawiki.org/wiki/Category:All_skins میڈیاویکی ڈاٹ آرگ میں موجود پوشاکوں کی ڈائرکٹری] سے کچھ پوشاکیں نصب کرنے کی کوشش کریں، جس کے لئے آپ:\n:* [https://www.mediawiki.org/wiki/Download ٹاربال انسٹالر] ڈاؤنلوڈ کریں، اس میں متعدد پوشاکیں اور کچھ توسیعیں موجود ہیں۔ آپ اس کی <code>skins/</code> ڈائرکٹری کو نقل و چسپاں کر سکتے ہیں۔\n:* انفرادی پوشاکوں کے ٹاربال [https://www.mediawiki.org/wiki/Special:SkinDistributor میڈیاویکی ڈاٹ آرگ] سے ڈاؤنلوڈ کریں۔\n:* [https://www.mediawiki.org/wiki/Download_from_Git#Using_Git_to_download_MediaWiki_skins گٹ کے ذریعہ پوشاکیں ڈاؤنلوڈ کریں]۔\n:اگر آپ میڈیاویکی کے ترقی دہندہ ہیں تو اس عمل کے دوران میں اپنے گٹ ذخیرے سے تعارض نہ کریں۔ نیز پوشاکوں کو فعال کرنے اور ابتدائی پوشاک کو منتخب کرنے کے بارے میں مزید تفصیل کے لیے [https://www.mediawiki.org/wiki/Manual:Skin_configuration رہنما: ترتیبات پوشاک] ملاحظہ فرمائیں۔",
+       "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (فعال)",
+       "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 (<strong>غیر فعال</strong>)",
+       "mediastatistics": "میڈیا کے اعداد و شمار",
+       "mediastatistics-summary": "اپلوڈ کردہ فائلوں کی اقسام کے اعداد و شمار۔ ان میں محض فائل کے تازہ ترین نسخے ہی شامل اور قدیم یا حذف شدہ نسخے خارج کر دیے گئے ہیں۔",
+       "mediastatistics-nbytes": "{{PLURAL:$1|$1 بائٹ}} ($2؛ $3%)",
+       "mediastatistics-bytespertype": "اس قطعہ کی تمام فائلوں کا کل حجم: {{PLURAL:$1|$1 بائٹ}} ($2؛ $3%)",
+       "mediastatistics-allbytes": "تمام فائلوں کا کل حجم: {{PLURAL:$1|$1 بائٹ}} ($2)",
+       "mediastatistics-table-mimetype": "MIME قسم",
+       "mediastatistics-table-extensions": "ممکنہ توسیعات",
+       "mediastatistics-table-count": "فائلوں کی تعداد",
+       "mediastatistics-table-totalbytes": "مشترکہ حجم",
+       "mediastatistics-header-unknown": "نامعلوم",
+       "mediastatistics-header-bitmap": "بٹ میپ تصویریں",
+       "mediastatistics-header-drawing": "خاکے (ویکٹر تصویریں)",
+       "mediastatistics-header-audio": "آڈیو",
+       "mediastatistics-header-video": "ویڈیو",
+       "mediastatistics-header-multimedia": "رچ میڈیا",
+       "mediastatistics-header-office": "دفتر",
+       "mediastatistics-header-text": "متنی",
+       "mediastatistics-header-executable": "قابل تنفیذ",
+       "mediastatistics-header-archive": "کمپریس شدہ فارمیٹ",
+       "mediastatistics-header-total": "تمام فائلیں",
+       "json-warn-trailing-comma": "آخر میں رہ جانے والے $1 {{PLURAL:$1|وقفہ|وقفوں}} کو جے سن سے حذف کر دیا گیا ہے",
+       "json-error-unknown": "جے سن میں کوئی مسئلہ تھا۔ نقص: $1",
+       "json-error-depth": "اسٹیک کی گہرائی کی آخری حد تجاوز کر چکی ہے۔",
+       "json-error-state-mismatch": "نادرست یا بدشکل جے سن",
+       "json-error-ctrl-char": "کنٹرول حروف میں نقص، ممکنہ طور پر انہیں غلط کوڈ کیا گیا ہے",
+       "json-error-syntax": "نحوی غلطی",
+       "json-error-utf8": "نادرست یو ٹی ایف 8 حروف، ممکنہ طور پر انہیں غلط کوڈ کیا گیا ہے",
+       "json-error-recursion": "اینکوڈ کی جانے والی قدر میں ایک یا زائد متواتر حوالے موجود ہیں",
+       "json-error-inf-or-nan": "NAN یا INF کی ایک یا زائد قدریں اینکوڈ کی جانے والی قدر میں موجود ہیں",
+       "json-error-unsupported-type": "ایسی قدر دی گئی ہے جسے اینکوڈ نہیں کیا جا سکتا",
+       "headline-anchor-title": "اس قطعہ کا ربط",
        "special-characters-group-latin": "لاطینی محارف",
        "special-characters-group-latinextended": "وسیع لاطینی",
+       "special-characters-group-ipa": "آئی پی اے",
        "special-characters-group-symbols": "علامات",
        "special-characters-group-greek": "یونانی",
+       "special-characters-group-greekextended": "وسیع یونانی",
+       "special-characters-group-cyrillic": "سیریلیائی",
        "special-characters-group-arabic": "عربی",
        "special-characters-group-arabicextended": "عربی توسیع شدہ",
        "special-characters-group-persian": "فارسی",
        "special-characters-group-telugu": "تلگو",
        "special-characters-group-sinhala": "سنگھالی",
        "special-characters-group-gujarati": "گجراتی",
+       "special-characters-group-devanagari": "دیوناگری",
        "special-characters-group-thai": "سیامی",
        "special-characters-group-lao": "لاوسی",
-       "special-characters-group-khmer": "کھمیری"
+       "special-characters-group-khmer": "کھمیری",
+       "special-characters-title-endash": "علامت خط",
+       "special-characters-title-emdash": "خط فاصل کشیدہ",
+       "special-characters-title-minus": "علامت وضع",
+       "mw-widgets-dateinput-no-date": "کسی تاریخ کو منتخب نہیں کیا گیا",
+       "mw-widgets-titleinput-description-new-page": "صفحہ ابھی تک موجود نہیں",
+       "mw-widgets-titleinput-description-redirect": "$1 کا رجوع مکرر",
+       "sessionmanager-tie": "تصدیقی درخواست کی متعدد قسموں کو یکجا نہیں کیا جا سکتا: $1",
+       "sessionprovider-generic": "$1 کی نشستیں",
+       "sessionprovider-mediawiki-session-cookiesessionprovider": "کوکی پر مبنی نشستیں",
+       "sessionprovider-nocookies": "شاید کوکی غیر فعال ہے۔ براہ کرم کوکی فعال کرنے کے بعد دوبارہ کوشش کریں۔",
+       "randomrootpage": "بے ترتيب بنیادی صفحہ",
+       "log-action-filter-block": "پابندی کی نوعیت:",
+       "log-action-filter-contentmodel": "مواد کے ماڈل کی تبدیلی کی نوعیت:",
+       "log-action-filter-delete": "حذف کی نوعیت:",
+       "log-action-filter-import": "درآمد کی نوعیت:",
+       "log-action-filter-managetags": "انتظام ٹیگ کے اقدام کی نوعیت:",
+       "log-action-filter-move": "منتقلی کی نوعیت:",
+       "log-action-filter-newusers": "کھاتہ سازی کی نوعیت:",
+       "log-action-filter-patrol": "مراجعت کی نوعیت:",
+       "log-action-filter-protect": "حفاظت کی نوعیت:",
+       "log-action-filter-rights": "تبدیلیٔ اختیار کی نوعیت:",
+       "log-action-filter-suppress": "پوشیدگی کی نوعیت:",
+       "log-action-filter-upload": "اپلوڈ کی نوعیت:",
+       "log-action-filter-all": "تمام",
+       "log-action-filter-block-block": "پابندی",
+       "log-action-filter-block-reblock": "تبدیلیٔ پابندی",
+       "log-action-filter-block-unblock": "پابندی ختم",
+       "log-action-filter-contentmodel-change": "مواد کے ماڈل کی تبدیلی",
+       "log-action-filter-contentmodel-new": "غیر معیاری contentmodel پر مشتمل صفحہ سازی",
+       "log-action-filter-delete-delete": "صفحہ کی حذف شدگی",
+       "log-action-filter-delete-restore": "صفحہ کی بحالی",
+       "log-action-filter-delete-event": "نوشتہ کی حذف شدگی",
+       "log-action-filter-delete-revision": "ترمیم کی حذف شدگی",
+       "log-action-filter-import-interwiki": "ماورائے ویکی درآمد",
+       "log-action-filter-import-upload": "ایکس ایم ایل اپلوڈ کی مدد سے درآمد",
+       "log-action-filter-managetags-create": "ٹیگ سازی",
+       "log-action-filter-managetags-delete": "ٹیگ کی حذف شدگی",
+       "log-action-filter-managetags-activate": "ٹیگ کی فعالی",
+       "log-action-filter-managetags-deactivate": "ٹیگ کی غیر فعالی",
+       "log-action-filter-move-move": "رجوع مکررات کو برتحریر کیے بغیر منتقلی",
+       "log-action-filter-move-move_redir": "رجوع مکررات کی برتحریری کے ساتھ منتقلی",
+       "log-action-filter-newusers-create": "گمنام صارف کی تخلیق",
+       "log-action-filter-newusers-create2": "مندرج صارف کی تخلیق",
+       "log-action-filter-newusers-autocreate": "خودکار تخلیق",
+       "log-action-filter-newusers-byemail": "برقی خط کے ذریعہ بھیجے گئے پاس ورڈ کی مدد سے تخلیق",
+       "log-action-filter-patrol-patrol": "دستی مراجعت",
+       "log-action-filter-patrol-autopatrol": "خودکار مراجعت",
+       "log-action-filter-protect-protect": "حفاظت",
+       "log-action-filter-protect-modify": "تبدیلیٔ حفاظت",
+       "log-action-filter-protect-unprotect": "اختتام حفاظت",
+       "log-action-filter-protect-move_prot": "منتقلیٔ حفاظت",
+       "log-action-filter-rights-rights": "دستی تبدیلی",
+       "log-action-filter-rights-autopromote": "خود کار تبدیلی",
+       "log-action-filter-suppress-event": "نوشتہ کی پوشیدگی",
+       "log-action-filter-suppress-revision": "نسخے کی پوشیدگی",
+       "log-action-filter-suppress-delete": "صفحہ کی پوشیدگی",
+       "log-action-filter-suppress-block": "بذریعہ پابندی صارف کی پوشیدگی",
+       "log-action-filter-suppress-reblock": "بذریعہ باز پابندی صارف کی پوشیدگی",
+       "log-action-filter-upload-upload": "نیا اپلوڈ",
+       "log-action-filter-upload-overwrite": "دوبارہ لوڈ",
+       "authmanager-authn-not-in-progress": "تصدیق کا عمل جاری نہیں ہے یا نشست کا ڈیٹا گم ہو چکا ہے۔ براہ کرم آغاز سے دوبارہ کوشش کریں۔",
+       "authmanager-authn-no-primary": "فراہم کردہ وثیقوں کی تصدیق نہیں ہو سکی۔",
+       "authmanager-authn-no-local-user": "فراہم کردہ وثیقے اس ویکی کے کسی صارف سے منسلک نہیں ہیں۔",
+       "authmanager-authn-no-local-user-link": "فراہم کردہ وثیقے اس ویکی کے کسی صارف سے منسلک نہیں ہیں۔ کسی دوسرے طریقے سے لاگ ہوں یا نیا کھاتا بنائیں۔ اس صورت میں آپ کو یہ اختیار حاصل ہوگا کہ سابقہ وثیقوں کو اس کھاتے سے مربوط کر سکیں۔",
+       "authmanager-authn-autocreate-failed": "خودکار مقامی کھاتہ سازی ناکام: $1",
+       "authmanager-change-not-supported": "فراہم کردہ وثیقے غیر مستعمل ہونے کی وجہ سے انہیں تبدیل نہیں کیا جا سکتا۔",
+       "authmanager-create-disabled": "کھاتہ سازی غیر فعال ہے۔",
+       "authmanager-create-from-login": "اپنا کھاتہ بنانے کے لیے براہ کرم ذیل میں موجود خانوں کو پُر کریں۔",
+       "authmanager-create-not-in-progress": "کھاتہ سازی کا عمل جاری نہیں ہے یا نشست کا ڈیٹا گم ہو چکا ہے۔ براہ کرم آغاز سے دوبارہ کوشش کریں۔",
+       "authmanager-create-no-primary": "فراہم کردہ وثیقوں کو کھاتہ سازی کے لیے استعمال نہیں کیا جا سکا۔",
+       "authmanager-link-no-primary": "فراہم کردہ وثیقوں کو کھاتوں سے مربوط کرنے کے لیے استعمال نہیں کیا جا سکا۔",
+       "authmanager-link-not-in-progress": "کھاتوں کو مربوط کرنے کا عمل جاری نہ رہ سکا یا نشست کا ڈیٹا گم ہو چکا ہے۔ براہ کرم آغاز سے دوبارہ کوشش کریں۔",
+       "authmanager-authplugin-setpass-failed-title": "پاس ورڈ کی تبدیلی ناکام رہی",
+       "authmanager-authplugin-setpass-failed-message": "تصدیقی ہلگ ان نے پاس ورڈ کی تبدیلی کو رد کر دیا۔",
+       "authmanager-authplugin-create-fail": "تصدیقی ہلگ ان نے کھاتہ سازی کو رد کر دیا۔",
+       "authmanager-authplugin-setpass-denied": "تصدیقی ہلگ ان میں پاس ورڈ کی تبدیلی کی اجازت نہیں ہے۔",
+       "authmanager-authplugin-setpass-bad-domain": "نادرست ڈومین۔",
+       "authmanager-autocreate-noperm": "خودکار کھاتہ سازی کی اجازت نہیں ہے۔",
+       "authmanager-autocreate-exception": "سابقہ نقص کی وجہ سے عارضی طور پر خودکار کھاتہ سازی غیر فعال ہے۔",
+       "authmanager-userdoesnotexist": "«$1» کے نام سے صارف کھاتہ مندرج نہیں ہے۔",
+       "authmanager-userlogin-remembermypassword-help": "نشست کی مدت سے زیادہ عرصہ کے لیے پاس ورڈ کو یاد رکھیں۔",
+       "authmanager-username-help": "صارف نام برائے تصدیق",
+       "authmanager-password-help": "پاس ورڈ برائے تصدیق",
+       "authmanager-domain-help": "ڈومین برائے خارجی تصدیق",
+       "authmanager-retype-help": "تصدیق کے لیے دوبارہ پاس ورڈ درج کریں",
+       "authmanager-email-label": "برقی خط",
+       "authmanager-email-help": "برقی ڈاک پتا",
+       "authmanager-realname-label": "حقیقی نام",
+       "authmanager-realname-help": "صارف کا حقیقی نام",
+       "authmanager-provider-password": "پاس ورڈ پر مبنی تصدیق",
+       "authmanager-provider-password-domain": "پاس ورڈ اور ڈومین پر مبنی تصدیق",
+       "authmanager-provider-temporarypassword": "عارضی پاس ورڈ",
+       "authprovider-confirmlink-message": "آپ کی جانب سے لاگ ان کی حالیہ کوششوں کے پیش نظر، آپ ذیل میں موجود کھاتوں کو اپنے ویکی کھاتے سے منسلک کر سکتے ہیں۔ چنانچہ انہیں مربوط کرنے کے بعد آپ ان کھاتوں کی مدد سے بھی داخل ہو سکیں گے۔ لہذا جنہیں منسلک کرنا ہو انہیں منتخب کریں۔",
+       "authprovider-confirmlink-request-label": "جن کھاتوں کو مربوط کرنا ہو",
+       "authprovider-confirmlink-success-line": "$1: کامیابی سے مربوط کر دیے گئے۔",
+       "authprovider-confirmlink-failed": "کھاتوں کو مربوط کرنے کا عمل مکمل نہیں ہو سکا: $1",
+       "authprovider-confirmlink-ok-help": "ناکامی کے پیغام کی نمائش کے بعد جاری رکھیں",
+       "authprovider-resetpass-skip-label": "آگے بڑھیں",
+       "authprovider-resetpass-skip-help": "پاس ورڈ کی ترتیب نو کو رہنے دیں",
+       "authform-nosession-login": "تصدیق کامیاب رہی لیکن آپ کا براؤزر لاگ ان کو \"برقرار\" نہیں رکھ سکا۔\n\n$1",
+       "authform-nosession-signup": "کھاتہ بن چکا ہے لیکن آپ کا براؤزر لاگ ان کو \"برقرار\" نہیں رکھ سکا۔\n\n$1",
+       "authform-newtoken": "ٹوکن مفقود۔ $1",
+       "authform-notoken": "ٹوکن مفقود",
+       "authform-wrongtoken": "غلط ٹوکن",
+       "specialpage-securitylevel-not-allowed-title": "اجازت نہیں",
+       "specialpage-securitylevel-not-allowed": "معذرت، آپ کو اس صفحہ کے استعمال کی اجازت نہیں ہے کیونکہ آپ کی شناخت کی تصدیق نہیں ہو سکی۔",
+       "authpage-cannot-login": "لاگ ان شروع نہیں ہو سکا۔",
+       "authpage-cannot-login-continue": "لاگ ان جاری نہیں رہ سکتی۔ غالباً آپ کی نشست کی مدت ختم ہو چکی ہے۔",
+       "authpage-cannot-create": "کھاتہ سازی کا آغاز نہیں ہو سکا۔",
+       "authpage-cannot-create-continue": "کھاتہ سازی جاری نہیں رہ سکتی۔ غالباً آپ کی نشست کی مدت ختم ہو چکی ہے۔",
+       "authpage-cannot-link": "کھاتے کو مربوط کرنے کا عمل شروع نہیں ہو سکا۔",
+       "authpage-cannot-link-continue": "کھاتے کو مربوط کرنے کا عمل جاری نہیں رہ سکتا۔ غالباً آپ کی نشست کی مدت ختم ہو چکی ہے۔",
+       "cannotauth-not-allowed-title": "اجازت رد کر دی گئی",
+       "cannotauth-not-allowed": "آپ کو اس صفحہ کے استعمال کی اجازت نہیں",
+       "changecredentials": "وثیقوں کو تبدیل کریں",
+       "changecredentials-submit": "وثیقوں کو تبدیل کریں",
+       "changecredentials-invalidsubpage": "$1 وثیقے کی درست قسم نہیں ہے۔",
+       "changecredentials-success": "آپ کے وثیقے تبدیل کر دیے گئے۔",
+       "removecredentials": "وثیقے حذف کریں",
+       "removecredentials-submit": "وثیقے حذف کریں",
+       "removecredentials-invalidsubpage": "$1 وثیقے کی درست قسم نہیں ہے۔",
+       "removecredentials-success": "آپ کے وثیقے حذف کر دیے گئے۔",
+       "credentialsform-provider": "وثیقوں کی نوعیت:",
+       "credentialsform-account": "کھاتے کا نام:",
+       "cannotlink-no-provider-title": "قابل ربط کھاتے موجود نہیں ہیں",
+       "cannotlink-no-provider": "قابل ربط کھاتے موجود نہیں ہیں۔",
+       "linkaccounts": "کھاتوں کو مربوط کریں",
+       "linkaccounts-success-text": "کھاتے کو مربوط کر دیا گیا۔",
+       "linkaccounts-submit": "کھاتوں کو مربوط کریں",
+       "unlinkaccounts": "مربوط کھاتوں کو علاحدہ کریں",
+       "unlinkaccounts-success": "مربوط کھاتہ علاحدہ کر دیا گیا۔",
+       "authenticationdatachange-ignored": "تصدیقی معلومات کی تبدیلی نہیں ہو سکی۔ شاید کوئی پرووائڈر فراہم نہیں کیا گیا؟",
+       "userjsispublic": "براہ کرم اس بات کا خیال رکھیں کہ جاوا اسکرپٹ کے ذیلی صفحات میں خفیہ معلومات نہیں رکھی جانی چاہئیں کیونکہ ان صفحات کو دیگر صارفین بھی دیکھ سکتے ہیں۔",
+       "usercssispublic": "براہ کرم اس بات کا خیال رکھیں کہ سی ایس ایس کے ذیلی صفحات میں خفیہ معلومات نہیں رکھی جانی چاہئیں کیونکہ ان صفحات کو دیگر صارفین بھی دیکھ سکتے ہیں۔",
+       "restrictionsfield-badip": "آئی پی پتا یا رینج نادرست ہے: $1",
+       "restrictionsfield-label": "آئی پی کی اجازت یافتہ رینج:",
+       "restrictionsfield-help": "فی سطر ایک آئی پی پتا یا سی آئی ڈی آر رینج۔ تمام کو فعال کرنے کے لیے <br><code>0.0.0.0/0</code><br><code>::/0</code> استعمال کریں"
 }
index 71b389f..25b3d3d 100644 (file)
                        "Arystanbek",
                        "6ahodir",
                        "Таржимон",
-                       "Ximik1991"
+                       "Ximik1991",
+                       "Bmansurov"
                ]
        },
-       "tog-underline": "Havolalarning tagiga chizish:",
+       "tog-underline": "Havolaning tagiga chizish:",
        "tog-hideminor": "Yangi oʻzgarishlar roʻyxatida kichik tahrirlarni yashirish",
        "tog-hidepatrolled": "Yangi oʻzgarishlar roʻyxatida tekshirilgan tahrirlarni yashirish",
        "tog-newpageshidepatrolled": "Yangi sahifalar roʻyxatidan tekshirilgan sahifalarni yashirish",
        "tog-diffonly": "Versiyalar taqqoslanayotganda, pastda sahifa matni koʻrsatilmasin",
        "tog-showhiddencats": "Yashirin turkumlarni koʻrsatish",
        "tog-norollbackdiff": "Tahrir qaytarilganda, versiyalar taqqosi koʻrsatilmasin",
-       "tog-useeditwarning": "Oʻzgarishlarni saqlamay sahifadan chiqib ketayotganim haqida ogohlantirish",
+       "tog-useeditwarning": "Oʻzgarishlarni saqlamay sahifadan chiqib ketayotganim haqida ogohlantir",
        "tog-prefershttps": "Doim himoyalangan holda kirish",
        "underline-always": "Har doim",
        "underline-never": "Hech qachon",
-       "underline-default": "Brauzer moslamari boʻyicha",
+       "underline-default": "Bezak mavzusi yoki brauzer andozasi boʻyicha",
        "editfont-style": "Tahrirlash maydonidagi shrift turi:",
-       "editfont-default": "Brauzer moslamari boʻyicha",
+       "editfont-default": "Brauzer andozasi boʻyicha",
        "editfont-monospace": "Teng enli shrift (Monospaced)",
        "editfont-sansserif": "Kertiksiz shrift (Sans-serif)",
        "editfont-serif": "Kertikli shrift (Serif)",
        "oct": "Okt",
        "nov": "Noy",
        "dec": "Dek",
-       "january-date": "Yanvar $1",
-       "february-date": "Fevral $1",
-       "march-date": "Mart $1",
-       "april-date": "Aprel $1",
-       "may-date": "$1-may",
-       "june-date": "Iyun $1",
-       "july-date": "Iyul $1",
+       "january-date": "$1 yanvar",
+       "february-date": "$1 fevral",
+       "march-date": "$1 mart",
+       "april-date": "$1 aprel",
+       "may-date": "$1 may",
+       "june-date": "$1 iyun",
+       "july-date": "$1 iyul",
        "august-date": "Avgust $1",
        "september-date": "Sentabr $1",
        "october-date": "Oktabr $1",
        "yourpasswordagain": "Maxfiy so‘zni qayta kiriting:",
        "createacct-yourpasswordagain": "Maxfiy soʻzni tasdiqlang",
        "createacct-yourpasswordagain-ph": "Maxfiy soʻzni yana bir bor kiriting",
-       "remembermypassword": "Hisob ma’lumotlarim ushbu brauzerda eslab qolinsin (ko‘pi bilan $1 {{PLURAL:$1|kunga|kunga}})",
        "userlogin-remembermypassword": "Kirgan deb esda saqla",
        "userlogin-signwithsecure": "Himoyalangan holda kirish",
        "yourdomainname": "Sizning domeningiz:",
index 42c3a28..429f979 100644 (file)
@@ -88,7 +88,7 @@
        "march": "marso",
        "april": "avril",
        "may_long": "majo",
-       "june": "giugno",
+       "june": "zugno",
        "july": "lujo",
        "august": "agosto",
        "september": "setenbre",
        "march-gen": "marso",
        "april-gen": "avril",
        "may-gen": "majo",
-       "june-gen": "giugno",
+       "june-gen": "zugno",
        "july-gen": "lujo",
        "august-gen": "agosto",
        "september-gen": "setenbre",
        "yourpasswordagain": "De novo la password:",
        "createacct-yourpasswordagain": "Conferma la password",
        "createacct-yourpasswordagain-ph": "Inserissi da novo la password",
-       "remembermypassword": "Tiente in mente la password su sto conputer (par un massimo de $1 {{PLURAL:$1|zorno|zorni}})",
        "userlogin-remembermypassword": "Tienme colegà",
        "userlogin-signwithsecure": "Entra con na conesion segura",
        "yourdomainname": "Spesifegare el dominio",
        "htmlform-no": "No",
        "htmlform-yes": "Sì",
        "htmlform-chosen-placeholder": "Selessiona na opzione",
-       "sqlite-has-fts": "$1 con la possibilità de riserca completa nel testo",
-       "sqlite-no-fts": "$1 sensa la possibilità de riserca completa nel testo",
        "logentry-delete-delete": "$1 {{GENDER:$2|el|la}} ga scansełà ła pajina $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|el|la}} ga ripristinà \"$3\"",
        "logentry-delete-event": "$1 {{GENDER:$2|el|la}} ga canbià ła vixibiłità de {{PLURAL:$5|n'asion del registro|$5 asion del registro}} de \"$3\": $4",
        "feedback-bugornote": "Se se xe in grado de descrivare el problema tenico riscontrà in maniera precixa, [$1 segnałare el bug]. In alternadiva, se pol doparar el moduło senplifegà cuà soto. El comento inserio el sarà xontà a ła pàjina \"[$3 $2]\", insieme al propio nome utente.",
        "feedback-cancel": "Anuła",
        "feedback-close": "Fato",
-       "feedback-error-title": "Eròr",
        "feedback-error1": "Eror: Da ła API xe rivà un rexultà nó riconosùo",
        "feedback-error2": "Eror: Nó xe sta posibiłe exeguir ła modifega",
        "feedback-error3": "Errore: Nisuna risposta da ła API",
index 31b213f..ccc7825 100644 (file)
@@ -62,7 +62,7 @@
        "tog-enotifminoredits": "Gửi thư cho tôi cả những thay đổi nhỏ trong trang và tập tin",
        "tog-enotifrevealaddr": "Hiện địa chỉ thư điện tử của tôi trong thư thông báo",
        "tog-shownumberswatching": "Hiển thị số người đang xem",
-       "tog-oldsig": "Chữ ký hiện tại:",
+       "tog-oldsig": "Chữ ký hiện tại của bạn:",
        "tog-fancysig": "Xem chữ ký là mã wiki (không có liên kết tự động)",
        "tog-uselivepreview": "Xem trước trực tiếp",
        "tog-forceeditsummary": "Nhắc tôi khi tôi quên tóm lược sửa đổi",
@@ -79,7 +79,7 @@
        "tog-showhiddencats": "Hiển thị thể loại ẩn",
        "tog-norollbackdiff": "Bỏ qua bản so sánh sau khi lùi sửa",
        "tog-useeditwarning": "Cảnh báo khi tôi thoát trang sửa đổi mà chưa lưu trang",
-       "tog-prefershttps": "Luôn kết nối an toàn khi đăng nhập",
+       "tog-prefershttps": "Luôn kết nối an toàn khi đã đăng nhập",
        "underline-always": "Luôn luôn",
        "underline-never": "Không bao giờ",
        "underline-default": "Mặc định của giao diện hoặc trình duyệt",
        "newwindow": "(mở cửa sổ mới)",
        "cancel": "Hủy bỏ",
        "moredotdotdot": "Thêm nữa…",
-       "morenotlisted": "Danh sách này không có đầy đủ.",
+       "morenotlisted": "Danh sách này có thể không đầy đủ.",
        "mypage": "Trang cá nhân",
        "mytalk": "Tin nhắn",
        "anontalk": "Thảo luận",
        "talk": "Thảo luận",
        "views": "Các hiển thị",
        "toolbox": "Công cụ",
+       "tool-link-userrights": "Thay đổi nhóm {{GENDER:$1}}người dùng",
+       "tool-link-emailuser": "Gửi thư cho {{GENDER:$1}}người dùng này",
        "userpage": "Xem trang thành viên",
        "projectpage": "Xem trang dự án",
        "imagepage": "Xem trang tập tin",
        "createacct-yourpasswordagain-ph": "Nhập mật khẩu lần nữa",
        "userlogin-remembermypassword": "Giữ trạng thái đăng nhập",
        "userlogin-signwithsecure": "Sử dụng kết nối an toàn",
+       "cannotlogin-title": "Không thể đăng nhập",
+       "cannotlogin-text": "Không thể nào đăng nhập.",
        "cannotloginnow-title": "Không thể đăng nhập lúc này",
        "cannotloginnow-text": "Không thể đăng nhập khi đang dùng $1.",
+       "cannotcreateaccount-title": "Không thể mở tài khoản",
+       "cannotcreateaccount-text": "Chức năng mở tài khoản trực tiếp không được kích hoạt tại wiki này.",
        "yourdomainname": "Tên miền của bạn:",
        "password-change-forbidden": "Bạn không thể đổi mật khẩu trên wiki này.",
        "externaldberror": "Có lỗi khi xác nhận cơ sở dữ liệu bên ngoài hoặc bạn không được phép cập nhật tài khoản bên ngoài.",
        "eauthentsent": "Thư xác nhận đã được gửi cho địa chỉ thư điện tử được chỉ định. Trước khi bạn có thể nhận thư, bạn cần thực hiện hướng dẫn trong thư để xác nhận tài khoản thuộc về bạn.",
        "throttled-mailpassword": "Mật khẩu đã được gửi đến cho bạn trong vòng {{PLURAL:$1|$1 giờ|$1 giờ}} đồng hồ trở lại. Để tránh lạm dụng, chỉ có thể gửi mật khẩu $1 giờ đồng hồ một lần.",
        "mailerror": "Lỗi gửi thư : $1",
-       "acct_creation_throttle_hit": "Ai đó cùng [[địa chỉ IP]] với bạn đã mở {{PLURAL:$1|một tài khoản|$1 tài khoản}} ở đây trong vòng 24 giờ. Vì quy định hạn chế số tài khoản mở trên một địa chỉ IP nên bạn hiện không thể mở thêm được nữa dùng địa chỉ IP này.",
+       "acct_creation_throttle_hit": "Ai đó cùng địa chỉ IP với bạn đã mở {{PLURAL:$1|một tài khoản|$1 tài khoản}} ở đây vào $2 qua. Vì quy định hạn chế số tài khoản mở trên một địa chỉ IP nên bạn hiện không thể mở thêm được nữa dùng địa chỉ IP này.",
        "emailauthenticated": "Địa chỉ thư điện tử của bạn được xác nhận vào lúc $3 $2.",
        "emailnotauthenticated": "Địa chỉ thư điện tử của bạn chưa được xác nhận. Các chức năng sau sẽ không gửi thư điện tử.",
        "noemailprefs": "Hãy ghi một địa chỉ thư điện tử trong tùy chọn cá nhân để có thể sử dụng tính năng này.",
        "botpasswords-label-resetpassword": "Đặt lại mật khẩu",
        "botpasswords-label-grants": "Các quyền có liên quan:",
        "botpasswords-help-grants": "Các lượt cấp phép cho phép truy cập các quyền người dùng mà một tài khoản đã có sẵn. Xem thêm thông tin trong [[Special:ListGrants|bảng cấp phép]].",
-       "botpasswords-label-restrictions": "Hạn chế sử dụng:",
        "botpasswords-label-grants-column": "Cấp quyền",
        "botpasswords-bad-appid": "Bot có tên \"$1\" không hợp lệ.",
        "botpasswords-insert-failed": "Không thể thêm tên bot \"$1\". Nó đã được thêm vào chưa?",
        "botpasswords-updated-body": "Đã cập nhật mật khẩu cho bot “$1” của người dùng “$2”.",
        "botpasswords-deleted-title": "Bot mật khẩu đã bị xóa",
        "botpasswords-deleted-body": "Đã xóa mật khẩu cho bot “$1” của người dùng “$2”.",
-       "botpasswords-newpassword": "Mật khẩu mới để đăng nhập như <strong>$1</strong> là <strong>$2</strong>. <em>Xin hãy ghi lại mật khẩu này để mai mốt tham khảo.</em>",
+       "botpasswords-newpassword": "Mật khẩu mới để đăng nhập như <strong>$1</strong> là <strong>$2</strong>. <em>Xin hãy ghi lại mật khẩu này để mai mốt tham khảo.</em> <br> (Các bot cũ cần tên đăng nhập khớp với tên người dùng cuối cùng có thể sử  dụng tên người dùng <strong>$3</strong> và mật khẩu <strong>$4</strong>.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider không có sẵn.",
        "botpasswords-restriction-failed": "Mật khẩu bot giới hạn ngăn chặn đăng nhập này.",
        "botpasswords-invalid-name": "Tên người dùng đã chỉ định không chứa dấu tách mật khẩu bot (\"$1\").",
        "invalid-content-data": "Dữ liệu nội dung không hợp lệ",
        "content-not-allowed-here": "Không cho phép đưa nội dung “$1” vào trang [[$2]]",
        "editwarning-warning": "Rời khỏi trang này sẽ khiến bạn mất các sửa đổi đã thực hiện.\nNếu đã đăng nhập, bạn có thể tắt cảnh báo này tại mục “{{int:prefs-editing}}” trong tùy chọn cá nhân.",
+       "editpage-invalidcontentmodel-title": "Không hỗ trợ mô hình nội dung",
+       "editpage-invalidcontentmodel-text": "Mô hình nội dung “$1” không được hỗ trợ.",
        "editpage-notsupportedcontentformat-title": "Không hỗ trợ định dạng nội dung",
        "editpage-notsupportedcontentformat-text": "Kiểu nội dung $2 không hỗ trợ định dạng nội dung $1.",
        "content-model-wikitext": "mã wiki",
        "searchprofile-advanced-tooltip": "Tìm trong không gian tên tùy chọn",
        "search-result-size": "$1 ({{PLURAL:$2|1 từ|$2 từ}})",
        "search-result-category-size": "$1 trang thành viên ($2 thể loại con, $3 tập tin)",
-       "search-redirect": "(đổi hướng $1)",
+       "search-redirect": "(đổi hướng từ $1)",
        "search-section": "(đề mục $1)",
        "search-category": "(thể loại $1)",
        "search-file-match": "(khớp nội dung tập tin)",
        "group-bot": "Bot",
        "group-sysop": "Bảo quản viên",
        "group-bureaucrat": "Hành chính viên",
-       "group-suppress": "Giám sát viên",
+       "group-suppress": "Người xóa hẳn Flow",
        "group-all": "(tất cả)",
        "group-user-member": "{{GENDER:$1}}thành viên",
        "group-autoconfirmed-member": "{{GENDER:$1}}thành viên tự động xác nhận",
        "group-bot-member": "{{GENDER:$1}}bot",
        "group-sysop-member": "{{GENDER:$1}}bảo quản viên",
        "group-bureaucrat-member": "{{GENDER:$1}}hành chính viên",
-       "group-suppress-member": "{{GENDER:$1}}giám sát viên",
+       "group-suppress-member": "{{GENDER:$1}}người xóa hẳn Flow",
        "grouppage-user": "{{ns:project}}:Thành viên",
        "grouppage-autoconfirmed": "{{ns:project}}:Thành viên tự xác nhận",
        "grouppage-bot": "{{ns:project}}:Bot",
        "grouppage-sysop": "{{ns:project}}:Bảo quản viên",
        "grouppage-bureaucrat": "{{ns:project}}:Hành chính viên",
-       "grouppage-suppress": "{{ns:project}}:Đàn áp viên",
+       "grouppage-suppress": "{{ns:project}}:Người xóa hẳn Flow",
        "right-read": "Đọc trang",
        "right-edit": "Sửa trang",
        "right-createpage": "Tạo trang (không phải trang thảo luận)",
        "upload-dialog-disabled": "Chức năng tải lên tập tin qua hộp thoại này bị tắt trong wiki này.",
        "upload-dialog-title": "Tải tập tin lên",
        "upload-dialog-button-cancel": "Hủy bỏ",
+       "upload-dialog-button-back": "Quay lại",
        "upload-dialog-button-done": "Xong",
        "upload-dialog-button-save": "Lưu",
        "upload-dialog-button-upload": "Tải lên",
        "apisandbox-results-fixtoken-fail": "Thất bại khi lấy dấu hiệu “$1”.",
        "apisandbox-alert-page": "Các miền trên Trang này là không hợp lệ.",
        "apisandbox-alert-field": "Giá trị của miền này là không hợp lệ.",
+       "apisandbox-continue": "Tiếp tục",
+       "apisandbox-continue-clear": "Đặt lại",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} sẽ [https://www.mediawiki.org/wiki/API:Query#Continuing_queries tiếp tục] lời yêu cầu cuối cùng; {{int:apisandbox-continue-clear}} sẽ đặt lại các tham số có liên quan đến chức năng tiếp tục yêu cầu.",
        "booksources": "Nguồn sách",
        "booksources-search-legend": "Tìm kiếm nguồn sách",
        "booksources-search": "Tìm kiếm",
        "pageinfo-article-id": "Mã số trang",
        "pageinfo-language": "Ngôn ngữ nội dung trang",
        "pageinfo-content-model": "Kiểu nội dung trang",
+       "pageinfo-content-model-change": "thay đổi",
        "pageinfo-robot-policy": "Ghi chỉ mục bởi robot",
        "pageinfo-robot-index": "Cho phép",
        "pageinfo-robot-noindex": "Không cho phép",
        "tag-filter": "Bộ lọc [[Special:Tags|thẻ]]:",
        "tag-filter-submit": "Bộ lọc",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1}}Thẻ]]: $2)",
+       "tag-mw-contentmodelchange": "thay đổi mô hình nội dung",
+       "tag-mw-contentmodelchange-description": "Sửa đổi [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel thay đổi mô hình nội dung] của trang",
        "tags-title": "Thẻ đánh dấu",
        "tags-intro": "Trang này liệt kê các thẻ đánh dấu mà phần mềm dùng nó để đánh dấu một sửa đổi, và ý nghĩa của nó.",
        "tags-tag": "Tên thẻ",
        "tags-actions-header": "Tác vụ",
        "tags-active-yes": "Kích hoạt",
        "tags-active-no": "Vô hiệu",
-       "tags-source-extension": "Xác định bởi một mở rộng",
+       "tags-source-extension": "Xác định bởi phần mềm",
        "tags-source-manual": "Áp dụng thủ công bởi người dùng và bot",
        "tags-source-none": "Không còn sử dụng",
        "tags-edit": "sửa",
        "htmlform-cloner-create": "Tiếp tục thêm",
        "htmlform-cloner-delete": "Loại bỏ",
        "htmlform-cloner-required": "Cần ít nhất một giá trị.",
+       "htmlform-date-placeholder": "YYYY-MM-DD (năm-tháng-ngày)",
+       "htmlform-time-placeholder": "HH:MM:SS (giờ:phút:giây)",
+       "htmlform-datetime-placeholder": "YYYY-MM-DD HH:MM:SS (năm-tháng-ngày giờ:phút:giây)",
+       "htmlform-date-invalid": "Giá trị bạn chỉ định không phải là một ngày được công nhận. Hãy thử sử dụng định dạng YYYY-MM-DD (năm-tháng-ngày).",
+       "htmlform-time-invalid": "Giá trị bạn chỉ định không phải là một giờ được công nhận. Hãy thử sử dụng định dạng HH:MM:SS (giờ:phút:giây).",
+       "htmlform-datetime-invalid": "Giá trị bạn chỉ định không phải là một ngày giờ được công nhận. Hãy thử sử dụng định dạng YYYY-MM-DD HH:MM:SS (năm-tháng-ngày giờ:phút:giây).",
+       "htmlform-date-toolow": "Giá trị bạn chỉ định là trước ngày được phép là $1.",
+       "htmlform-date-toohigh": "Giá trị bạn chỉ định là sau ngày được phép là $1.",
+       "htmlform-time-toolow": "Giá trị bạn chỉ định là trước giờ được phép là $1.",
+       "htmlform-time-toohigh": "Giá trị bạn chỉ định là sau giờ được phép là $1.",
+       "htmlform-datetime-toolow": "Giá trị bạn chỉ định là trước ngày giờ được phép là $1.",
+       "htmlform-datetime-toohigh": "Giá trị bạn chỉ định là sau ngày giờ được phép là $1.",
        "htmlform-title-badnamespace": "[[:$1]] không phải trong không gian tên “{{ns:$2}}”.",
        "htmlform-title-not-creatable": "Không cho phép tạo ra trang với tên “$1”",
        "htmlform-title-not-exists": "$1 không tồn tại.",
        "htmlform-user-not-exists": "<strong>$1</strong> không tồn tại.",
        "htmlform-user-not-valid": "<strong>$1</strong> không phải là tên người dùng.",
-       "sqlite-has-fts": "$1 với sự hỗ trợ tìm kiếm toàn văn",
-       "sqlite-no-fts": "$1 không có hỗ trợ tìm kiếm toàn văn",
        "logentry-delete-delete": "$1 {{GENDER:$2}}đã xóa trang “$3”",
        "logentry-delete-restore": "$1 {{GENDER:$2}}đã phục hồi trang “$3”",
        "logentry-delete-event": "$1 {{GENDER:$2}}đã thay đổi mức hiển thị của {{PLURAL:$5|một mục nhật trình|$5 mục nhật trình}} về $3: $4",
        "feedback-external-bug-report-button": "Tạo một công việc kỹ thuật",
        "feedback-dialog-title": "Gửi phản hồi",
        "feedback-dialog-intro": "Bạn có thể gửi phản hồi dễ dàng qua biểu mẫu bên dưới. Thông tin phản hồi của bạn sẽ được bổ sung vào trang “$1” cùng với tên người dùng của bạn.",
-       "feedback-error-title": "Lỗi",
        "feedback-error1": "Hủy bỏ",
        "feedback-error2": "Lỗi: Sửa đổi thất bại",
        "feedback-error3": "Lỗi: API không có phản ứng",
        "unlinkaccounts-success": "Đã gỡ liên kết tài khoản.",
        "authenticationdatachange-ignored": "Tác vụ thay đổi dữ liệu xác thực không được xử lý. Có lẽ nhà cung cấp chưa được cấu hình?",
        "userjsispublic": "Xin lưu ý: Các trang con JavaScript không nên chứa dữ liệu bí mật, vì những người dùng khác có thể xem các trang này.",
-       "usercssispublic": "Xin lưu ý: Các trang con CSS không nên chứa dữ liệu bí mật, vì những người dùng khác có thể xem các trang này."
+       "usercssispublic": "Xin lưu ý: Các trang con CSS không nên chứa dữ liệu bí mật, vì những người dùng khác có thể xem các trang này.",
+       "restrictionsfield-badip": "Địa chỉ hoặc dải IP không hợp lệ: $1.",
+       "restrictionsfield-label": "Các dải IP được cho phép:",
+       "restrictionsfield-help": "Mỗi dòng một địa chỉ IP hoặc dải CIDR. Để kích hoạt tất cả mọi địa chỉ IP, sử dụng<br><code>0.0.0.0/0</code><br><code>::/0</code>"
 }
index d11a639..84edb29 100644 (file)
        "nstab-template": "Näüdüs",
        "nstab-help": "Oppus",
        "nstab-category": "Katõgooria",
+       "mainpage-nstab": "Pääleht",
        "nosuchaction": "Säänest tallitust olõ-i.",
        "nosuchactiontext": "Seo aadrõsi manoq käüvä tallitus om viganõ.\nVõimalik, et sa kirotit aadrõsi võlssi vai pruugõt vigast linki.\nNiisama või taa ollaq {{SITENAME}} tarkvara viga.",
        "nosuchspecialpage": "Säänest tallituslehekülge olõ-i.",
        "yourpasswordagain": "Kirodaq viilkõrd salasõna",
        "createacct-yourpasswordagain": "Kinnüdäq uma salasõna",
        "createacct-yourpasswordagain-ph": "Kirodaq salasõna vahtsõst",
-       "remembermypassword": "Jätäq salasõna miilde (kooniq $1 {{PLURAL:$1|pääväs|pääväs}})",
        "userlogin-remembermypassword": "Jääq uma nimega sisse",
        "userlogin-signwithsecure": "Pruugiq kaidsõtut võrgoütistüst",
        "yourdomainname": "Võrgonimi",
        "undo-success": "Tagasivõtminõ läts' kõrda. Kaeq üle, kas taa om tuu, midä sa tetäq tahtsõt ja pästäq muutusõq.",
        "undo-failure": "Tagasivõtminõ lää-s kõrda samal aol tettüide muutmiisi vastaolo peräst. Võit muutusõq käsilde tagasi võttaq.",
        "undo-summary": "Tagasi võet muutminõ #$1, mink tekk' [[Special:Contributions/$2|$2]] ([[User talk:$2|Arotus]])",
-       "cantcreateaccounttitle": "Pruukjanime luuminõ lää-s kõrda",
        "cantcreateaccount-text": "Pruukjanime luuminõ taa puutri võrgoaadrõsi päält ('''$1''') om ärq keelet. Kiildjä: [[User:$3|$3]].\n\n$3 kirjäpant põhjus: ''$2''",
        "viewpagelogs": "Kaeq seo lehe muutmisnimekirjä.",
        "nohistory": "Seo leheküle pääl ei olõq vanõmbit kujjõ.",
        "searchprofile-advanced-tooltip": "Otsiq etteannõtuist nimeruumõst",
        "search-result-size": "$1 ({{PLURAL:$2|1 sõna|$2 sõnna}})",
        "search-result-category-size": "{{PLURAL:$1|1 lehekülg|$1 lehekülge}} ({{PLURAL:$2|1 alambkatõgooria|$2 alambkatõgooriat}}, {{PLURAL:$3|1 fail|$3 faili}})",
-       "search-redirect": "(ümbresaatminõ $1)",
+       "search-redirect": "(ümbresaatminõ lehelt $1)",
        "search-section": "(alljago $1)",
        "search-suggest": "Kas mõtlit: $1",
        "search-interwiki-caption": "Sõsarprojektiq",
        "contributions": "{{GENDER:$1|Pruukja}} toimõndusõq",
        "contributions-title": "Pruukja $1 toimõndusõq",
        "mycontris": "Hindä kirotusõq",
+       "anoncontribs": "Hindä kirotusõq",
        "contribsub2": "Pruukja {{GENDER:$3|$1}} ($2) toimõndusõq",
        "nocontribs": "Sääntsit muutmiisi es lövväq.",
        "uctop": "(parhillanõ)",
        "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|kujo|kujjo}} lehest $2",
        "tooltip-pt-userpage": "Suq pruukjaleht",
        "tooltip-pt-anonuserpage": "Su puutri võrgoaadrõsi pruukjaleht",
-       "tooltip-pt-mytalk": "Mu arotusleht",
+       "tooltip-pt-mytalk": "{{GENDER:|Muq arotusleht}}",
        "tooltip-pt-anontalk": "Arotus taa puutri võrgoaadrõsi päält tettüisi toimõnduisi üle",
-       "tooltip-pt-preferences": "Mu säädmiseq",
+       "tooltip-pt-preferences": "{{GENDER:|Mu säädmiseq}}",
        "tooltip-pt-watchlist": "Nimekiri lehist, mil tahtnuq silmä pääl hoitaq",
        "tooltip-pt-mycontris": "Suq toimõnduisi nimekiri",
        "tooltip-pt-login": "Mineq nimega sisse vai tiiq hindäle pruukjanimi (soovitav).",
        "tooltip-pt-logout": "Mineq nime alt vällä",
        "tooltip-pt-createaccount": "Tuu olõ-õi joht kohustuslik, a sul tasos luvvaq konto ja nimega sisse minnäq.",
        "tooltip-ca-talk": "Arotus lehe sisu üle",
-       "tooltip-ca-edit": "Saa võit taad lehte toimõndaq.",
+       "tooltip-ca-edit": "Toimõndaq seod lehte",
        "tooltip-ca-addsection": "Tiiq vahtsõnõ alljago",
        "tooltip-ca-viewsource": "Taa om kaidsõt leht. Saat kaiaq õnnõ taa lättekuudi.",
        "tooltip-ca-history": "Taa lehe vanõmbaq kujoq.",
        "tooltip-t-recentchangeslinked": "Viimädseq muutmisõq lehile, mink pääle näüdätäs linkega seo lehe päält",
        "tooltip-feed-rss": "Taa lehe RSS-kujo",
        "tooltip-feed-atom": "Taa lehe Atom-kujo",
-       "tooltip-t-contributions": "Näütäq taa pruukja toimõnduisi nimekirjä",
+       "tooltip-t-contributions": "Näütäq {{GENDER:$1|seo pruukja}} toimõnduisi nimekirjä",
        "tooltip-t-emailuser": "Saadaq taalõ pruukjalõ e-kiri",
        "tooltip-t-upload": "Laadiq üles teedüstüid",
        "tooltip-t-specialpages": "Näütäq tallituslehekülgi",
        "tooltip-ca-nstab-main": "Näütäq sisulehekülge",
        "tooltip-ca-nstab-user": "Näütäq pruukjalehekülge",
        "tooltip-ca-nstab-media": "Näütäq meediälehekülge",
-       "tooltip-ca-nstab-special": "Taa om tallituslehekülg",
+       "tooltip-ca-nstab-special": "Seo om tallituslehekülg, seod saa-ai toimõndaq",
        "tooltip-ca-nstab-project": "Näütäq projektilehekülge",
        "tooltip-ca-nstab-image": "Näütäq teedüstü lehekülge",
        "tooltip-ca-nstab-mediawiki": "Näütäq tallitusteedüst",
        "spambot_username": "MediaWiki prahihäötäjä",
        "spam_reverting": "Tagasi pööret viimädse kujo pääle, koh olõ-i linke lehele $1",
        "spam_blanking": "Kõigin kujõn oll' linke lehele $1. Leht tühäs tett.",
-       "simpleantispam-label": "Rämpspostikontroll.\n'''ÄRQ''' täütkuq seod väljä!",
+       "simpleantispam-label": "Rämpspostikontroll.\n<strong>Ärq täütkuq</strong> seod väljä!",
        "pageinfo-toolboxlink": "Leheküle andmõq",
        "markaspatrolleddiff": "Märgiq ülekaetus",
        "markaspatrolledtext": "Märgiq toimõndus ülekaetus",
index 803c6a2..d2f0247 100644 (file)
        "botpasswords-label-cancel": "אַנולירן",
        "botpasswords-label-delete": "אויסמעקן",
        "botpasswords-label-resetpassword": "ווידערשטעלן פאַסווארט",
-       "botpasswords-label-restrictions": "באניץ באגרענעצונגען:",
        "botpasswords-label-grants-column": "נאכגעגעבן",
        "botpasswords-bad-appid": "דער באט נאמען \"$1\" איז אומגילטיק.",
        "botpasswords-created-title": "באט פאסווארט געשאפן",
        "randompage-nopages": "נישטא קיין בלעטער אין {{PLURAL:$2|דעם פאלגנדן נאמענטייל |די פאלגנדע נאמענטיילן}} \"$1\".",
        "randomincategory": "צופעליקער בלאט אין קאטעגאריע",
        "randomincategory-invalidcategory": "\"$1\" איז נישט קיין גילטיקער קאטעגאריע נאמען.",
-       "randomincategory-nopages": "נישט פאראן קיין בלעטער אין [[:Category:$1]].",
+       "randomincategory-nopages": "נישט פאראן קיין בלעטער אין דער [[:Category:$1]] קאטעגאריע.",
        "randomincategory-category": "קאַטעגאריע:",
        "randomincategory-legend": "צופעליקער בלאט אין קאטעגאריע",
        "randomincategory-submit": "גיין",
        "htmlform-cloner-create": "צולייגן נאך",
        "htmlform-cloner-delete": "אַראָפּנעמען",
        "htmlform-title-not-exists": "$1 עקזיסטירט נישט",
-       "sqlite-has-fts": "$1 מיט פולן-טעקסט זוכן שטיץ",
-       "sqlite-no-fts": "$1 אָן פֿולן-טעקסט זוכן שטיץ",
        "logentry-delete-delete": "$1 {{GENDER:$2|האט אויסגעמעקט}} בלאט $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|האט צוריקגעשטעלט }} בלאט $3",
        "logentry-delete-event": "$1 {{GENDER:$2|האט געענדערט}} די זעבארקייט פון {{PLURAL:$5|א לאגבוך אקטיוויטעט|$5 לאגבוך אקטיוויטעטן}} אויף $3: $4",
index 73f4629..1c41e4a 100644 (file)
        "yourpasswordagain": "Kọ ọ̀rọ̀ìpamọ́ lẹ́ẹ̀kansí:",
        "createacct-yourpasswordagain": "Ẹ ṣe ìfidájú ọ̀rọ̀ìpamọ́",
        "createacct-yourpasswordagain-ph": "Ẹ kọ ọ̀rọ̀ìpamọ́ lẹ́ẹ̀kan síi",
-       "remembermypassword": "Ṣè'rántí ìwọlé mi lórí kọ̀mpútà yìí (fún ó pẹ́ jù {{PLURAL:$1|ọjọ́|ọjọ́}} $1)",
        "userlogin-remembermypassword": "Fi mí sí ìwọlé",
        "userlogin-signwithsecure": "Lo ìsopọ̀ ẹ̀rọ tó ní àbò",
        "yourdomainname": "Domain yín:",
        "movelogpagetext": "Nísàlẹ̀ ni àtòjọ gbogbo àwọn ìyípòdà ojúewé.",
        "movesubpage": "{{PLURAL:$1|Ojúewé abẹ́|Àwọn ojúewé abẹ́}}",
        "movesubpagetext": "Ojúewé yìí ní {{PLURAL:$1|ojúewé abẹ́|àwọn ojúewé abẹ́}} $1 tó hàn nísàlẹ̀.",
+       "movesubpagetalktext": "Ojúewé ọ̀rọ̀ rẹ̀ ní {{PLURAL:$1|ojúewé abẹ́|àwọn ojúewé abẹ́}} $1 tó hàn nísàlẹ̀.",
        "movenosubpage": "Ojúewé yìí kò ní àwọn abẹ́ojúewé.",
        "movereason": "Ìdíẹ̀:",
        "revertmove": "dápadà",
        "htmlform-submit": "Fúnsílẹ̀",
        "htmlform-reset": "Ìdápadà àwọn àtúnṣe",
        "htmlform-selectorother-other": "Òmíràn",
-       "sqlite-has-fts": "$1 pẹ̀lú àtìlẹ́yìn àwárí ìkọ̀rọ̀ kíkún",
-       "sqlite-no-fts": "$1 láìní àtìlẹ́yìn àwárí ìkọ̀rọ̀ kíkún",
        "logentry-delete-delete": "$1 pa ojúewé $3 rẹ́",
        "logentry-delete-restore": "$1 dá ojúewé $3 padà",
        "logentry-delete-event": "$1 ṣe àyípadà ìhànsí {{PLURAL:$5|ìṣẹ̀lẹ̀ àkọọ́lẹ̀ kan|àwọn ìṣẹ̀lẹ̀ àkọọ́lẹ̀ $5}} lórí $3: $4",
        "special-characters-group-gujarati": "Gujarati",
        "special-characters-group-thai": "Thai",
        "special-characters-group-lao": "Lao",
-       "special-characters-group-khmer": "Khmer"
+       "special-characters-group-khmer": "Khmer",
+       "edit-error-short": "Àṣìṣe: $1",
+       "edit-error-long": "Àwọn àsìṣe:\n\n\n$1"
 }
index 84ec923..30534c5 100644 (file)
@@ -27,7 +27,8 @@
                        "CRCHF",
                        "Shinjiman",
                        "Macofe",
-                       "Jdforrester"
+                       "Jdforrester",
+                       "Tungakl"
                ]
        },
        "tog-underline": "連結加底線:",
        "htmlform-chosen-placeholder": "揀個選項",
        "htmlform-cloner-create": "加多啲",
        "htmlform-cloner-delete": "拎走",
-       "sqlite-has-fts": "$1 有全文搜尋支援",
-       "sqlite-no-fts": "$1 冇全文搜尋支援",
        "logentry-delete-delete": "$1 刪咗頁 $3",
        "revdelete-restricted": "已經應用限制到操作員",
        "revdelete-unrestricted": "已經拎走對於操作員嘅限制",
        "feedback-back": "返轉頭",
        "feedback-cancel": "取消",
        "feedback-close": "搞掂",
-       "feedback-error-title": "出錯",
        "feedback-message": "信息:",
        "feedback-subject": "主旨:",
        "feedback-submit": "遞交",
        "feedback-thanks-title": "多謝!",
-       "searchsuggest-search": "搵",
+       "searchsuggest-search": "搵{{SITENAME}}",
        "searchsuggest-containing": "名單傳送緊...",
        "api-error-unclassified": "發生未知嘅錯誤。",
        "api-error-unknown-code": "未知嘅出錯:$1。",
index 291a7ea..3696030 100644 (file)
@@ -92,7 +92,8 @@
                        "Cosine02",
                        "Arthur2e5",
                        "Myy730",
-                       "SolidBlock"
+                       "SolidBlock",
+                       "D41D8CD98F"
                ]
        },
        "tog-underline": "链接下划线:",
        "tog-enotifminoredits": "当我的监视列表中的页面和文件有小编辑时也发送电子邮件通知我",
        "tog-enotifrevealaddr": "在通知电子邮件中显示我的电子邮件地址",
        "tog-shownumberswatching": "显示监视用户数",
-       "tog-oldsig": "当前签名:",
+       "tog-oldsig": "您现有的签名:",
        "tog-fancysig": "将签名视为维基文本(不自动生成链接)",
        "tog-uselivepreview": "使用实时预览",
        "tog-forceeditsummary": "未输入编辑摘要时提醒我",
        "tog-showhiddencats": "显示隐藏分类",
        "tog-norollbackdiff": "执行回退后不显示差异",
        "tog-useeditwarning": "当我离开编辑页面时,如果有尚未保存的更改,请提醒我",
-       "tog-prefershttps": "登录时始终使用安全连接",
+       "tog-prefershttps": "在登录时总是使用安全连接",
        "underline-always": "始终",
        "underline-never": "从不",
        "underline-default": "皮肤或浏览器默认设置",
        "newwindow": "(在新窗口中打开)",
        "cancel": "取消",
        "moredotdotdot": "更多...",
-       "morenotlisted": "æ\9c¬å\88\97表不完整。",
+       "morenotlisted": "æ­¤å\88\97表å\8f¯è\83½不完整。",
        "mypage": "页面",
        "mytalk": "讨论",
        "anontalk": "讨论",
        "namespaces": "命名空间",
        "variants": "变种",
        "navigation-heading": "导航菜单",
-       "errorpagetitle": "出错",
+       "errorpagetitle": "错误",
        "returnto": "返回至$1。",
        "tagline": "来自{{SITENAME}}",
        "help": "帮助",
        "talk": "讨论",
        "views": "视图",
        "toolbox": "工具",
+       "tool-link-userrights": "更改{{GENDER:$1|用户}}组",
+       "tool-link-emailuser": "电邮联系该{{GENDER:$1|用户}}",
        "userpage": "查看用户页面",
        "projectpage": "查看项目页面",
        "imagepage": "查看文件页面",
        "nosuchactiontext": "URL指定的操作无效。您可能输入了错误的URL地址,或是点击了错误的链接。这也可能表明{{SITENAME}}使用的软件存在漏洞。",
        "nosuchspecialpage": "此特殊页面不存在",
        "nospecialpagetext": "<strong>您请求了一个无效的特殊页面。</strong>\n\n有效的特殊页面的列表可以在[[Special:SpecialPages|{{int:specialpages}}]]找到。",
-       "error": "出错",
+       "error": "错误",
        "databaseerror": "数据库错误",
        "databaseerror-text": "出现数据库查询错误。这可能表示软件中存在漏洞。",
        "databaseerror-textcl": "出现数据库查询错误。",
        "unexpected": "非正常值:“$1”=“$2”。",
        "formerror": "错误:无法提交表单",
        "badarticleerror": "无法在此页进行该操作。",
-       "cannotdelete": "无法删除页面或文件“$1”。\n它可能已被其他人删除了。",
+       "cannotdelete": "无法删除页面或文件“$1”。它可能已被其他人删除了。",
        "cannotdelete-title": "无法删除页面“$1”",
        "delete-hook-aborted": "删除被扩展钩子取消。钩子并没有给出解释。",
-       "no-null-revision": "无法创建对\"$1\"页面新的空白版本",
+       "no-null-revision": "无法创建对“$1”页面新的空白版本",
        "badtitle": "错误标题",
        "badtitletext": "您请求了个无效、不存在或者跨语言或跨wiki链接标题错误的页面。它可能包含一个或多个不能用于标题的字符。",
        "title-invalid-empty": "请求的页面标题为空,或只包含名字空间名称。",
        "welcomecreation-msg": "您的账户已创建。\n如果需要,您可以更改您在{{SITENAME}}的[[Special:Preferences|参数设置]]。",
        "yourname": "用户名:",
        "userlogin-yourname": "用户名",
-       "userlogin-yourname-ph": "请输入的用户名",
+       "userlogin-yourname-ph": "请输入的用户名",
        "createacct-another-username-ph": "请输入用户名",
        "yourpassword": "密码:",
        "userlogin-yourpassword": "密码",
        "createaccount": "创建账户",
        "gotaccount": "已经拥有账户?请$1。",
        "gotaccountlink": "登录",
-       "userlogin-resetlink": "忘记的登录信息?",
+       "userlogin-resetlink": "忘记的登录信息?",
        "userlogin-resetpassword-link": "忘记密码?",
        "userlogin-helplink2": "登录帮助",
        "userlogin-loggedin": "您已经以{{GENDER:$1|$1}}的身份登录。使用下面的表格以其他用户的身份登录。",
        "userlogin-createanother": "创建另一个账户",
        "createacct-emailrequired": "电子邮件地址",
        "createacct-emailoptional": "电子邮件地址(可选)",
-       "createacct-email-ph": "请输入的电子邮件地址",
+       "createacct-email-ph": "请输入的电子邮件地址",
        "createacct-another-email-ph": "输入电子邮件地址",
        "createaccountmail": "使用一个临时的随机密码并将其发送到指定的电子邮件地址中",
        "createaccountmail-help": "可被用于为另一个人创建账户而不需要得知密码。",
        "eauthentsent": "一封确认信已经发送至您设定的邮件地址。\n在任何其他邮件发送至您的账户前,您将不得不根据邮件中的指示,确认那个账户确实是您的。",
        "throttled-mailpassword": "密码提醒已在最近$1小时内发送。为了安全起见,在每$1小时内只能发送一个密码提醒。",
        "mailerror": "发送邮件错误:$1",
-       "acct_creation_throttle_hit": "使用你的IP地址访问本wiki的访客在过去24小时中创建了{{PLURAL:$1|$1个账户}},达到了这段时间所允许的最大值。因此,使用该IP地址的访客现在不能再创建账户。",
+       "acct_creation_throttle_hit": "使用您的IP地址访问本wiki的访客在过去$2中创建了{{PLURAL:$1|$1个账户}},达到了这段时间所允许的最大值。因此,使用该IP地址的访客现在不能再创建账户。",
        "emailauthenticated": "您的电子邮件地址已于$2 $3确认。",
        "emailnotauthenticated": "您的邮件地址尚未确认。\n您将不会收到以下任何功能的邮件。",
        "noemailprefs": "指定一个电子邮箱地址以使用此功能。",
        "botpasswords-label-resetpassword": "重置密码",
        "botpasswords-label-grants": "应用授权:",
        "botpasswords-help-grants": "每个授权将会赋予被列出、且用户账户已拥有权限的访问权。参见[[Special:ListGrants|授权表]]以获取更多信息。",
-       "botpasswords-label-restrictions": "使用限制:",
        "botpasswords-label-grants-column": "已授权",
        "botpasswords-bad-appid": "机器人名“$1”无效。",
        "botpasswords-insert-failed": "无法添加机器人名“$1”。它是否已添加?",
        "botpasswords-updated-body": "用于用户“$2”的机器人名称“$1”的机器人密码已更新。",
        "botpasswords-deleted-title": "机器人密码已删除",
        "botpasswords-deleted-body": "用于用户“$2”的机器人名称“$1”的机器人密码已删除。",
-       "botpasswords-newpassword": "用于登录<strong>$1</strong>的新密码是<strong>$2</strong>。<em>请记住它以备今后参考。</em>",
+       "botpasswords-newpassword": "用于登录<strong>$1</strong>的新密码是<strong>$2</strong>。<em>请记住它以备今后参考。</em><br>(对于需要登录名与最终用户名相同的旧机器人,您也可以使用<strong>$3</strong>作为用户名,<strong>$4</strong>作为密码。)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider不可用。",
        "botpasswords-restriction-failed": "机器人密码限制阻止此次登录。",
        "botpasswords-invalid-name": "指定的用户名不包含机器人密码分隔符(“$1”)。",
        "resetpass-temp-emailed": "您通过一个暂时电子邮件发送的代码登录。要完成登录,您必须在此设置一个新密码:",
        "resetpass-temp-password": "临时密码:",
        "resetpass-abort-generic": "密码更改已经被扩展程序中止。",
-       "resetpass-expired": "的密码已经到期。请设置新登录密码。",
+       "resetpass-expired": "的密码已经到期。请设置新登录密码。",
        "resetpass-expired-soft": "您的密码已经到期,需要重置。请现在更换新密码,或单击“{{int:authprovider-resetpass-skip-label}}”以稍后重置。",
        "resetpass-validity-soft": "您的密码无效:$1\n\n请选择一个新密码,或单击“{{int:authprovider-resetpass-skip-label}}”以稍后重置。",
        "passwordreset": "重置密码",
-       "passwordreset-text-one": "请输入你要重置的用户名。",
+       "passwordreset-text-one": "请完成此表单来通过电子邮件接收临时密码。",
        "passwordreset-text-many": "{{PLURAL:$1|在此键入您希望接收临时密码的邮件地址。}}",
        "passwordreset-disabled": "此Wiki已经禁用密码重置。",
        "passwordreset-emaildisabled": "此Wiki上无法使用邮件功能。",
        "passwordreset-emailelement": "用户名:\n$1\n\n临时密码:\n$2",
        "passwordreset-emailsentemail": "如果此邮件地址与您的账户相关联的话,将发送一封密码重置邮件。",
        "passwordreset-emailsentusername": "如果有邮件地址与此用户名相关联的话,将发送一封密码重置邮件。",
-       "passwordreset-emailsent-capture2": "密码重置{{PLURAL:$1|邮件}}已发送。{{PLURAL:$1|用户名和密码|用户名和密码列表}}在下方显示。",
-       "passwordreset-emailerror-capture2": "向{{GENDER:$2|用户}}发送电子邮件失败:$1 {{PLURAL:$3|用户名和密码|用户名和密码列表}}在下方显示。",
+       "passwordreset-emailsent-capture2": "密码重置{{PLURAL:$1|邮件}}已发送。{{PLURAL:$1|用户名和密码|用户名和密码列表}}在显示。",
+       "passwordreset-emailerror-capture2": "向{{GENDER:$2|用户}}发送电子邮件失败:$1 {{PLURAL:$3|用户名和密码|用户名和密码列表}}在显示。",
        "passwordreset-nocaller": "必须提供一个调用方",
        "passwordreset-nosuchcaller": "调用方不存在:$1",
        "passwordreset-ignored": "密码重置没有处理。也许没有配置提供者?",
        "anoneditwarning": "<strong>警告:</strong>您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您<strong>[$1 登录]</strong>或<strong>[$2 创建]</strong>一个账户,您的编辑将归属于您的用户名,且将享受其他好处。",
        "anonpreviewwarning": "<em>您没有登录。保存将您的IP地址记录至此页面的编辑历史中。</em>",
        "missingsummary": "<strong>提示:</strong>您没有提供编辑摘要。如果您再次点击“{{int:savearticle}}”,您的编辑将不带摘要保存。",
-       "selfredirect": "<strong>警告:</strong>您正在将此页面重定向至它自己。您可能指定了错误的重定向目标,或者您正在编辑错误的页面。如果您再次点击“{{int:savearticle}}”,重定向将无论如何被创建。",
+       "selfredirect": "<strong>警告:</strong>您正在将此页面重定向至它自己。您可能指定了错误的重定向目标,或者您正在编辑错误的页面。如果您再次点击“{{int:savearticle}}”,重定向仍将被创建。",
        "missingcommenttext": "请在下面输入评论。",
        "missingcommentheader": "<strong>提示:</strong>您还没有为此评论提供一个标题。如果您再次点击“{{int:savearticle}}”,您的编辑将不带标题保存。",
        "summary-preview": "摘要预览:",
        "invalid-content-data": "无效的内容数据",
        "content-not-allowed-here": "[[$2]]页面上不允许“$1”内容",
        "editwarning-warning": "离开本页面可能导致您失去任何你已经作出的更改。如果您处于登录状态,您可以在您的设置的“{{int:prefs-editing}}”部分停用该警告。",
+       "editpage-invalidcontentmodel-title": "内容模型不支持",
+       "editpage-invalidcontentmodel-text": "内容模型“$1”不被支持。",
        "editpage-notsupportedcontentformat-title": "内容格式尚不支持",
        "editpage-notsupportedcontentformat-text": "内容模型$2尚不支持内容格式$1。",
        "content-model-wikitext": "维基文字",
        "shown-title": "每页显示$1项结果",
        "viewprevnext": "查看($1{{int:pipe-separator}}$2)($3)",
        "searchmenu-exists": "<strong>本wiki上有名为“[[:$1]]”的页面。</strong>{{PLURAL:$2|0=|另请查看找到的其他搜索结果。}}",
-       "searchmenu-new": "<strong>在本Wiki上新建名为“[[:$1]]”的页面!</strong>{{PLURAL:$2|0=|另请查看您的搜索找的结果。|另请查看搜索结果。}}",
+       "searchmenu-new": "<strong>在本Wiki上新建名为“[[:$1]]”的页面!</strong>{{PLURAL:$2|0=|另请查看您的搜索找的结果。|另请查看搜索结果。}}",
        "searchprofile-articles": "内容页面",
        "searchprofile-images": "多媒体",
        "searchprofile-everything": "全部",
        "searchprofile-advanced-tooltip": "在自定义名字空间中搜索",
        "search-result-size": "$1($2个字)",
        "search-result-category-size": "$1个成员($2个子分类,$3个文件)",
-       "search-redirect": "(重定向自“$1”)",
+       "search-redirect": "(重定向自$1)",
        "search-section": "(“$1”章节)",
        "search-category": "(分类$1)",
        "search-file-match": "(匹配文件内容)",
        "action-userrights-interwiki": "编辑其他wiki用户的用户权限",
        "action-siteadmin": "锁定或解锁数据库",
        "action-sendemail": "发送电子邮件",
-       "action-editmywatchlist": "编辑的监视列表",
-       "action-viewmywatchlist": "查看的监视列表",
+       "action-editmywatchlist": "编辑的监视列表",
+       "action-viewmywatchlist": "查看的监视列表",
        "action-viewmyprivateinfo": "查看您的私人信息",
-       "action-editmyprivateinfo": "编辑的私人信息",
+       "action-editmyprivateinfo": "编辑的私人信息",
        "action-editcontentmodel": "编辑页面的内容模型",
        "action-managechangetags": "创建和(取消)激活标签",
        "action-applychangetags": "连同您的更改应用标签",
        "upload-dialog-disabled": "使用此对话框的文件上传在此wiki已禁用。",
        "upload-dialog-title": "上传文件",
        "upload-dialog-button-cancel": "取消",
+       "upload-dialog-button-back": "返回",
        "upload-dialog-button-done": "完成",
        "upload-dialog-button-save": "保存",
        "upload-dialog-button-upload": "上传",
        "uploadstash-summary": "这个页面提供已经上传(或者上传中)但未发布到wiki之文件存取。这些文件除了上传的用户之外不会被其他人可见。",
        "uploadstash-clear": "清除贮藏文件",
        "uploadstash-nofiles": "您没有被隐藏的文件。",
-       "uploadstash-badtoken": "执行对应操作失败。可能是因为您的编辑凭证已过期。请重试。",
+       "uploadstash-badtoken": "执行对应操作失败,可能是因为您的编辑凭据已过期。请重试。",
        "uploadstash-errclear": "清除文件失败。",
        "uploadstash-refresh": "更新文件列表",
        "uploadstash-thumbnail": "显示缩略图",
        "img-auth-public": "img_auth.php的功能是从非公开wiki输出文件。本wiki已被设置为公开。为了最佳安全状况,img_auth.php已停用。",
        "img-auth-noread": "用户无权读取“$1”。",
        "http-invalid-url": "无效URL:$1",
-       "http-invalid-scheme": "不支持带有“$1”的URL",
+       "http-invalid-scheme": "带“$1”方案的URL不受支持。",
        "http-request-error": "未知的错误令到HTTP请求失败。",
        "http-read-error": "HTTP读取错误。",
        "http-timed-out": "HTTP请求已过时。",
        "apisandbox-results-fixtoken-fail": "检索“$1”令牌失败。",
        "apisandbox-alert-page": "此页面上的字段无效。",
        "apisandbox-alert-field": "此字段的值无效。",
+       "apisandbox-continue": "继续",
+       "apisandbox-continue-clear": "清除",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}}将[https://www.mediawiki.org/wiki/API:Query#Continuing_queries 继续]上次请求;{{int:apisandbox-continue-clear}}将清除继续相关的参数。",
        "booksources": "网络书源",
        "booksources-search-legend": "搜索图书来源",
        "booksources-isbn": "ISBN:",
        "lockedbyandtime": "(由 {{GENDER:$1|$1}} 于$2 $3执行)",
        "move-page": "移动$1",
        "move-page-legend": "移动页面",
-       "movepagetext": "您可以使用下面的表单来重命名一个页面,同时将其版本历史移动到新页面。同时老的条目将会被重定向到新条目。您可以自动地将重定向更新到原条目。如果您不选择这样做的话,请检查[[Special:DoubleRedirects|双重]]或[[Special:BrokenRedirects|损坏重定向]]链接。您有责任确保链接会被正确指向他们应该被指向的地方。\n\n注意:即使新条目已经有对应页面,此页面也<strong>不会</strong>被移动,除非新页面无任何编辑历史或是重定向页。这意味着您可在误操作后将页面移回原处,同时,您也无法覆盖现有页面。\n\n<strong>注意:</strong>对这样一个经常被访问的页面而言这可能是一个重大且唐突的更改;请在行动前先了解您的修改可能带来的一切后果。",
+       "movepagetext": "您可以使用下面的表单来重命名一个页面,同时将其版本历史移动到新页面。同时老的条目将会被重定向到新条目。您可以自动地将指向老的条目的重定向更新为指向新条目。如果您不选择这样做的话,请检查[[Special:DoubleRedirects|双重]]或[[Special:BrokenRedirects|损坏重定向]]链接。您有责任确保链接会被正确指向他们应该被指向的地方。\n\n注意:如果新条目已经有对应页面,此页面将<strong>不会</strong>被移动,除非新页面是重定向页并且无任何修订历史。这意味着您可在误操作后将页面移回原处,同时,您无法覆盖现有页面。\n\n<strong>注意:</strong>对这样一个经常被访问的页面而言这可能是一个重大且唐突的更改;请在行动前先了解您的修改可能带来的一切后果。",
        "movepagetext-noredirectfixer": "用下面的表单来重命名一个页面,并将其版本历史同时移动到新页面。老的页面将成为新页面的重定向页。请检查[[Special:DoubleRedirects|双重重定向]]或[[Special:BrokenRedirects|损坏重定向]]链接。您应当负责确定所有链接依然会链到指定的页面。\n\n注意如果新页面已经有内容的话,页面将<strong>不会</strong>被移动,除非新页面无内容或是重定向页,而且没有版本历史。这意味着您再必要时可以在移动到新页面后再移回老的页面,同时您也无法覆盖现有页面。\n\n<strong>注意:</strong>对一个经常被访问的页面而言这可能是一个重大与唐突的更改;请在行动前先确定您了解其所可能带来的后果。",
        "movepagetalktext": "如果您勾选此框,相关联的讨论页将被自动移动到新的标题,除非这里已经有了一个非空讨论页。\n\n在这种情况下,如有需要,您将不得不手动移动或合并页面。",
        "moveuserpage-warning": "'''警告:'''你将移动一个用户页面。请注意,只有该页面会被移动,该用户''不''会被更名。",
        "movelogpagetext": "下面是所有页面移动的列表。",
        "movesubpage": "{{PLURAL:$1|子页面}}",
        "movesubpagetext": "该页面有$1个子页面在下面展示。",
+       "movesubpagetalktext": "相应讨论页有$1个{{PLURAL:$1|子页面}}在下面展示。",
        "movenosubpage": "这个页面没有子页面。",
        "movereason": "原因:",
        "revertmove": "恢复",
        "pageinfo-category-pages": "页面数",
        "pageinfo-category-subcats": "子分类数",
        "pageinfo-category-files": "文件数",
+       "pageinfo-user-id": "用户ID",
        "markaspatrolleddiff": "标记为已巡查",
        "markaspatrolledtext": "标记此页面为已巡查",
        "markaspatrolledtext-file": "将此文件版本标记为已巡查",
        "newimages-showbots": "显示机器人上传",
        "newimages-hidepatrolled": "隐藏已巡查的上传",
        "noimages": "无可查看文件。",
+       "gallery-slideshow-toggle": "开启/关闭缩略图",
        "ilsubmit": "搜索",
        "bydate": "按日期",
        "sp-newimages-showfrom": "从$1 $2开始显示新文件",
        "exif-imagewidth": "宽度",
        "exif-imagelength": "高度",
        "exif-bitspersample": "每像素字节数",
-       "exif-compression": "压缩方",
+       "exif-compression": "压缩方",
        "exif-photometricinterpretation": "像素构成",
        "exif-orientation": "方位",
        "exif-samplesperpixel": "像素数",
        "confirmemail_success": "您的邮箱已经被确认。您现在可以[[Special:UserLogin|登录]]并使用此网站了。",
        "confirmemail_loggedin": "你的电子邮件地址现在已经确认。",
        "confirmemail_subject": "{{SITENAME}}电子邮件地址确认",
-       "confirmemail_body": "来自IP地址$1的用户(可能是您)在{{SITENAME}}上创建了账户“$2”,并提交了您\n的电子邮箱地址。\n\n请确认这个账户是属于您的,并同时激活在{{SITENAME}}上的电子邮件功能。请在浏\n览器中打开下面的链接:\n\n$3\n\n如果您*未曾*注册账户,请打开下面的链接去取消电子邮件确认:\n\n$5\n\n确认码会在$4过期。",
+       "confirmemail_body": "来自IP地址$1的用户(可能是您)在{{SITENAME}}上创建了账户“$2”,并提交了您的电子邮箱地址。\n\n请确认这个账户是属于您的,并同时激活在{{SITENAME}}上的电子邮件功能。请在浏览器中打开下面的链接:\n\n$3\n\n如果您*未曾*注册账户,请打开下面的链接去取消电子邮件确认:\n\n$5\n\n确认码会在$4过期。",
        "confirmemail_body_changed": "拥有IP地址$1的用户(可能是您)在{{SITENAME}}更改了账户“$2”的电子邮箱地址。\n\n要确认此账户确实属于您并同时激活在{{SITENAME}}的电子邮件功能,请在浏览器中打开下面的链接:\n\n$3\n\n如果这个账户*不是*属于您的,请打开下面的链接去取消电子邮件确认:\n\n$5\n\n确认码会在$4过期。",
-       "confirmemail_body_set": "拥有IP地址$1的用户(可能是您)在{{SITENAME}}将账户“$2”的电子邮箱地址设置为这个电子邮件地址。\n\n请确认这个账户是属于您的,并同时激活在{{SITENAME}}上的电子邮件功能。请\n在浏览器中打开下面的链接:\n\n$3\n\n如果这个账户*不是*属于您的,请打开下面的链接去取消电子邮件确认:\n\n$5\n\n确认码会在$4过期。",
+       "confirmemail_body_set": "拥有IP地址$1的用户(可能是您)在{{SITENAME}}将账户“$2”的电子邮箱地址设置为这个电子邮件地址。\n\n请确认这个账户是属于您的,并同时激活在{{SITENAME}}上的电子邮件功能。请在浏览器中打开下面的链接:\n\n$3\n\n如果这个账户*不是*属于您的,请打开下面的链接去取消电子邮件确认:\n\n$5\n\n确认码会在$4过期。",
        "confirmemail_invalidated": "电子邮件地址确认已取消",
        "invalidateemail": "取消电子邮件确认",
        "notificationemail_subject_changed": "{{SITENAME}}注册的电子邮件地址已被更改",
        "notificationemail_subject_removed": "{{SITENAME}}注册的电子邮件地址已被移除",
        "notificationemail_body_changed": "来自IP地址$1的人(可能是您)在{{SITENAME}}上更改了账户“$2”的电子邮件地址至“$3”。\n\n如果这不是您,请立即联系一位网站管理员。",
        "notificationemail_body_removed": "来自IP地址$1的人(可能是您)在{{SITENAME}}上移除了账户“$2”的电子邮件地址。\n\n如果这不是您,请立即联系一位网站管理员。",
-       "scarytranscludedisabled": "[跨网站的编码转换不可用]",
+       "scarytranscludedisabled": "[跨wiki的页面嵌入已被禁用]",
        "scarytranscludefailed": "[提取$1失败]",
        "scarytranscludefailed-httpstatus": "[模板$1读取失败:HTTP $2]",
        "scarytranscludetoolong": "[URL过长]",
        "confirm-rollback-button": "确定",
        "confirm-rollback-top": "回退此页面的编辑么?",
        "semicolon-separator": ";",
-       "comma-separator": "",
+       "comma-separator": "",
        "colon-separator": ":",
        "pipe-separator": "&#32;|&#32;",
        "word-separator": "",
        "tag-filter": "[[Special:Tags|标签]]过滤器:",
        "tag-filter-submit": "过滤器",
        "tag-list-wrapper": "([[Special:Tags|$1个标签]]:$2)",
+       "tag-mw-contentmodelchange": "内容模型更改",
+       "tag-mw-contentmodelchange-description": "更改页面[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel 内容模型]的编辑",
        "tags-title": "标签",
        "tags-intro": "本页面列出了软件可能用于标记编辑的标签和它们的含义。",
        "tags-tag": "标签名称",
        "tags-actions-header": "操作",
        "tags-active-yes": "是",
        "tags-active-no": "否",
-       "tags-source-extension": "由一个扩展定义",
+       "tags-source-extension": "由软件定义",
        "tags-source-manual": "可被用户和机器人手动应用",
        "tags-source-none": "不再被使用",
        "tags-edit": "编辑",
        "htmlform-cloner-create": "添加更多",
        "htmlform-cloner-delete": "移除",
        "htmlform-cloner-required": "至少一个值是必需的。",
+       "htmlform-date-placeholder": "YYYY-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "YYYY-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "您指定的值不是可识别的日期。尝试使用YYYY-MM-DD格式。",
+       "htmlform-time-invalid": "您指定的值不是可识别的时间。尝试使用HH:MM:SS格式。",
+       "htmlform-datetime-invalid": "您指定的值不是可识别的日期和时间。尝试使用YYYY-MM-DD HH:MM:SS格式。",
+       "htmlform-date-toolow": "您指定的值在$1的最早允许日期之前。",
+       "htmlform-date-toohigh": "您指定的值在$1的最晚允许日期之后。",
+       "htmlform-time-toolow": "您指定的值在$1的最早允许时间之前。",
+       "htmlform-time-toohigh": "您指定的值在$1的最晚允许时间之后。",
+       "htmlform-datetime-toolow": "您指定的值在$1的最早允许日期和时间之前。",
+       "htmlform-datetime-toohigh": "您指定的值在$1的最晚允许日期和时间之后。",
        "htmlform-title-badnamespace": "[[:$1]]不在“{{ns:$2}}”名字空间中。",
        "htmlform-title-not-creatable": "“$1”不是一个可创建的页面标题",
        "htmlform-title-not-exists": "$1不存在",
        "htmlform-user-not-exists": "<strong>$1</strong>不存在。",
        "htmlform-user-not-valid": "<strong>$1</strong>不是一个有效的用户名。",
-       "sqlite-has-fts": "带全文搜索的版本$1",
-       "sqlite-no-fts": "不带全文搜索的版本$1",
        "logentry-delete-delete": "$1{{GENDER:$2|删除}}页面$3",
        "logentry-delete-restore": "$1{{GENDER:$2|还原}}页面$3",
        "logentry-delete-event": "$1{{GENDER:$2|更改}}$3的{{PLURAL:$5|$5个日志事件}}的可见性:$4",
        "feedback-external-bug-report-button": "提交技术报告",
        "feedback-dialog-title": "发送反馈",
        "feedback-dialog-intro": "您可以使用下面的简便表格提交您的反馈。您的评论将连同您的用户名一起加入至页面“$1”。",
-       "feedback-error-title": "错误",
        "feedback-error1": "错误:从API返回无法识别的结果",
        "feedback-error2": "错误:编辑失败",
        "feedback-error3": "错误:API没有响应",
        "feedback-thanks": "谢谢!您的反馈已发布至页面“[$2 $1]”。",
        "feedback-thanks-title": "谢谢您!",
        "feedback-useragent": "用户代理:",
-       "searchsuggest-search": "搜索",
+       "searchsuggest-search": "搜索{{SITENAME}}",
        "searchsuggest-containing": "含有...",
        "api-error-autoblocked": "您的IP地址已被自动封禁,因为它曾被一位已封禁用户使用。",
        "api-error-badaccess-groups": "您没有将文件上传到此 wiki 的权限。",
        "authmanager-authn-not-in-progress": "身份验证尚未进行,或会话数据丢失。请从头重新开始。",
        "authmanager-authn-no-primary": "提供的凭据不能被认证。",
        "authmanager-authn-no-local-user": "提供的证书没有与该wiki上的任何用户相关联。",
-       "authmanager-authn-no-local-user-link": "提供的证书有效,但没有与该wiki上的任何用户相关联。请通过不同方式登录,或创建一个新用户,然后您将拥有一个把您之前的证书链接到对应账户的选项。",
+       "authmanager-authn-no-local-user-link": "提供的凭据有效,但没有与该wiki上的任何用户相关联。请通过不同方式登录,或创建一个新用户,然后您将拥有一个把您之前的凭据链接到对应账户的选项。",
        "authmanager-authn-autocreate-failed": "所有账户的自动创建失败:$1",
-       "authmanager-change-not-supported": "提供的证书不能被更改,因为没有东西会使用它们。",
+       "authmanager-change-not-supported": "提供的凭据不能被更改,因为没有东西会使用它们。",
        "authmanager-create-disabled": "账户创建已停用。",
        "authmanager-create-from-login": "要创建您的账户,请填写下方的字段。",
        "authmanager-create-not-in-progress": "账户创建尚未进行,或会话数据丢失。请从头重新开始。",
-       "authmanager-create-no-primary": "提供的证书不能用于账户创建。",
+       "authmanager-create-no-primary": "提供的凭据不能用于账户创建。",
        "authmanager-link-no-primary": "提供的证书不能用于账户链接。",
        "authmanager-link-not-in-progress": "账户链接尚未进行,或会话数据丢失。请从头重新开始。",
        "authmanager-authplugin-setpass-failed-title": "密码更改失败",
        "authpage-cannot-link-continue": "无法继续账户链接。您的会话大概已超时。",
        "cannotauth-not-allowed-title": "权限被拒绝",
        "cannotauth-not-allowed": "您不被允许使用此页面",
-       "changecredentials": "更改证书",
-       "changecredentials-submit": "更改证书",
-       "changecredentials-invalidsubpage": "$1不是有效的证书类型。",
+       "changecredentials": "更改凭据",
+       "changecredentials-submit": "更改凭据",
+       "changecredentials-invalidsubpage": "$1不是有效的凭据类型。",
        "changecredentials-success": "您的证书已被更改。",
-       "removecredentials": "移除证书",
+       "removecredentials": "移除凭据",
        "removecredentials-submit": "移除证书",
-       "removecredentials-invalidsubpage": "$1不是有效的证书类型。",
+       "removecredentials-invalidsubpage": "$1不是有效的凭据类型。",
        "removecredentials-success": "您的证书已被移除。",
-       "credentialsform-provider": "证书类型:",
+       "credentialsform-provider": "凭据类型:",
        "credentialsform-account": "帐户名称:",
        "cannotlink-no-provider-title": "没有可链接账户",
        "cannotlink-no-provider": "没有可链接账户。",
        "unlinkaccounts-success": "账户已取消链接。",
        "authenticationdatachange-ignored": "身份验证数据更改未处理。也许没有配置的提供者?",
        "userjsispublic": "请注意:JavaScript子页面不应包含机密数据,因为它们可以被其他用户查看。",
-       "usercssispublic": "请注意:CSS子页面不应包含机密数据,因为它们可以被其他用户查看。"
+       "usercssispublic": "请注意:CSS子页面不应包含机密数据,因为它们可以被其他用户查看。",
+       "restrictionsfield-badip": "无效的IP地址或段:$1",
+       "restrictionsfield-label": "允许的IP段:",
+       "restrictionsfield-help": "每行一个IP地址或CIDR段。要启用所有,可使用<br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "错误:$1",
+       "edit-error-long": "错误:\n\n$1"
 }
index 37d164b..694c23d 100644 (file)
@@ -75,7 +75,8 @@
                        "Kly",
                        "Cosine02",
                        "一個正常人",
-                       "Wehwei"
+                       "Wehwei",
+                       "1233thehongkonger"
                ]
        },
        "tog-underline": "底線標示連結:",
        "tog-enotifminoredits": "當頁面與檔案有小修訂時,傳送電子郵件通知我",
        "tog-enotifrevealaddr": "在通知郵件中顯示我的電子郵件地址",
        "tog-shownumberswatching": "顯示監視使用者數量",
-       "tog-oldsig": "現有簽名:",
+       "tog-oldsig": "您現有的簽名:",
        "tog-fancysig": "將簽名視為 Wikitext 語言 (不自動產生連結)",
        "tog-uselivepreview": "使用即時預覽",
        "tog-forceeditsummary": "未填寫編輯摘要時提示我",
        "tog-showhiddencats": "顯示隱藏分類",
        "tog-norollbackdiff": "執行還原後略過差異比對",
        "tog-useeditwarning": "未儲存離開編輯頁面時警告我",
-       "tog-prefershttps": "登入時始終使用安全連線",
+       "tog-prefershttps": "永遠使用安全連線來登入",
        "underline-always": "永遠使用",
        "underline-never": "永不使用",
        "underline-default": "依外觀或瀏覽器預設值",
        "newwindow": "(以新視窗開啟)",
        "cancel": "取消",
        "moredotdotdot": "更多...",
-       "morenotlisted": "此清單尚未讀取完畢。",
+       "morenotlisted": "這可能只是部份清單。",
        "mypage": "頁面",
        "mytalk": "對話",
        "anontalk": "對話",
        "talk": "討論",
        "views": "檢視",
        "toolbox": "工具",
+       "tool-link-userrights": "更改{{GENDER:$1|使用者}}群組",
+       "tool-link-emailuser": "寄信給這位{{GENDER:$1|使用者}}",
        "userpage": "檢視使用者頁面",
        "projectpage": "檢視專案頁面",
        "imagepage": "檢視檔案頁面",
        "cannotloginnow-title": "現在無法登入",
        "cannotloginnow-text": "使用 $1 時無法登入。",
        "cannotcreateaccount-title": "無法建立帳號",
+       "cannotcreateaccount-text": "此 wiki 未開啟直接建立帳號的功能。",
        "yourdomainname": "您的網域:",
        "password-change-forbidden": "您不可變更此 Wiki 上的密碼。",
        "externaldberror": "這可能是由於資料庫驗證錯誤,或是不允許您更新外部帳號。",
        "eauthentsent": "已寄出一封確認信到您所設定的電子郵件地址。\n在未收到其它電子郵件前,您必須先依照郵件中的指示,確認這個帳號確實是您本人。",
        "throttled-mailpassword": "密碼重設的電子郵件已經在最近 $1 小時內寄出。\n為防止濫用,$1 小時內只能寄出一次密碼重設信件。",
        "mailerror": "傳送電子郵件錯誤:$1",
-       "acct_creation_throttle_hit": "使用您目前的 IP 位址的訪客在最近一天建立了 {{PLURAL:$1|1 個帳號|$1 個帳號}},已超出系統允許的上限。\n因此,目前無法讓使用此 IP 位址的訪客建立帳號。",
+       "acct_creation_throttle_hit": "使用您目前 IP 位址到 wiki 的訪客在最近 $2 建立了 {{PLURAL:$1|1 個帳號|$1 個帳號}},已超出了期間允許的上限。\n因此,目前無法讓使用此 IP 位址的訪客建立任何帳號。",
        "emailauthenticated": "您的電子郵件地址已於 $2 $3 確認。",
        "emailnotauthenticated": "您的電子郵件地址尚未確認,\n尚不會寄出以下功能的電子郵件給您。",
        "noemailprefs": "在您的偏好設定中設定電子郵件地址,讓您可以使用這些功能。",
        "botpasswords-label-resetpassword": "重設密碼",
        "botpasswords-label-grants": "適用的權限:",
        "botpasswords-help-grants": "每個授權會給予擁有該授權的使用者帳號列於該授權清單的使用者權限。 請參考 [[Special:ListGrants|授權表]] 取得更多資訊。",
-       "botpasswords-label-restrictions": "使用限制:",
        "botpasswords-label-grants-column": "已授權",
        "botpasswords-bad-appid": "機器人名稱 \"$1\" 無效。",
        "botpasswords-insert-failed": "新增機器人名稱 \"$1\" 失敗,是否已新增過?",
        "botpasswords-updated-body": "使用者''$2\"所擁有的機器人\"$1\"之密碼已更新。",
        "botpasswords-deleted-title": "已刪除機器人密碼",
        "botpasswords-deleted-body": "使用者''$2\"所擁有的機器人\"$1\"之密碼已刪除。",
-       "botpasswords-newpassword": "用來登入 <strong>$1</strong> 的新密碼為 <strong>$2</strong>。 <em>請記錄此密碼以供未來參考使用。</em>",
+       "botpasswords-newpassword": "用來登入 <strong>$1</strong> 的新密碼為 <strong>$2</strong>。 <em>請記錄此密碼以供未來參考使用。</em> <br> (較舊的機器人的登入名稱需與最終使用者名稱相同,您也可使用 <strong>$3</strong> 做為使用者名稱 <strong>$4</strong> 做為密碼。)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider 無法使用。",
        "botpasswords-restriction-failed": "機器人密碼限制已拒絕此次登入。",
        "botpasswords-invalid-name": "指定的使用者名稱未包含機器人密碼分隔字元 (\"$1\")。",
        "passwordreset-emailelement": "使用者名稱:\n$1\n\n臨時密碼:\n$2",
        "passwordreset-emailsentemail": "若此確實為您帳號所登記的電子郵件地址,將會寄出重設密碼的信件給您。",
        "passwordreset-emailsentusername": "若此確實為您使用者名稱所登記的電子郵件地址,將會寄出重設密碼的信件給您。",
-       "passwordreset-emailsent-capture2": "密碼重設{{PLURAL:$1|郵件|郵件}}已寄出,{{PLURAL:$1|使用者名稱與密碼|使用者名稱與密碼}}如下顯示。",
-       "passwordreset-emailerror-capture2": "寄發電子郵件給{{GENDER:$2|使用者}}失敗:$1,{{PLURAL:$3|使用者名稱與密碼|使用者名稱與密碼}}如下顯示。",
+       "passwordreset-emailsent-capture2": "密碼重設{{PLURAL:$1|郵件|郵件}}已寄出,{{PLURAL:$1|使用者名稱與密碼|使用者名稱與密碼清單}}如下顯示。",
+       "passwordreset-emailerror-capture2": "寄發電子郵件給{{GENDER:$2|使用者}}失敗:$1,{{PLURAL:$3|使用者名稱與密碼|使用者名稱與密碼清單}}如下顯示。",
        "passwordreset-nocaller": "必須提供 caller",
        "passwordreset-nosuchcaller": "Caller 不存在:$1",
        "passwordreset-ignored": "未處理密碼重設動作,可能尚未設定提供者?",
        "invalid-content-data": "內容資料無效",
        "content-not-allowed-here": "頁面 [[$2]] 不允許使用 \"$1\" 語法內容",
        "editwarning-warning": "離開此頁面可能會令您遺失之前所作的所有更改。\n若您已經登入,您可在偏好設定的 \"{{int:prefs-editing}}\" 項目關閉此警告。",
+       "editpage-invalidcontentmodel-title": "不支援的內容模型",
+       "editpage-invalidcontentmodel-text": "不支援內容模型 \"$1\"。",
        "editpage-notsupportedcontentformat-title": "不支援此內容格式",
        "editpage-notsupportedcontentformat-text": "內容語法 $2 不支援使用 $1 格式的內容。",
        "content-model-wikitext": "Wikitext",
        "upload-dialog-disabled": "此 wiki 已關閉使用此對話框上傳檔案的功能。",
        "upload-dialog-title": "上傳檔案",
        "upload-dialog-button-cancel": "取消",
+       "upload-dialog-button-back": "返回",
        "upload-dialog-button-done": "完成",
        "upload-dialog-button-save": "儲存",
        "upload-dialog-button-upload": "上傳",
        "uploadstash-errclear": "清除檔案失敗。",
        "uploadstash-refresh": "更新檔案清單",
        "uploadstash-thumbnail": "檢視縮圖",
+       "uploadstash-exception": "無法儲存上傳到儲藏庫 ($1): \"$2\"。",
        "invalid-chunk-offset": "無效區塊位置",
        "img-auth-accessdenied": "拒絕存取",
        "img-auth-nopathinfo": "缺少 PATH_INFO 參數。\n您安裝的伺服器未傳遞此資訊,\n您可能使用 CGI 為基礎的伺服器,且不支援 img_auth 功能。\n請參考 https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization。",
        "apisandbox-results-fixtoken-fail": "取得 \"$1\" 密鑰失敗。",
        "apisandbox-alert-page": "此頁面上的欄位無效。",
        "apisandbox-alert-field": "此欄位的值無效。",
+       "apisandbox-continue": "繼續",
+       "apisandbox-continue-clear": "清除",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} 會 [https://www.mediawiki.org/wiki/API:Query#Continuing_queries 繼續] 最後的請求,{{int:apisandbox-continue-clear}} 則會清除繼續相關的參數。",
        "booksources": "圖書資源",
        "booksources-search-legend": "尋找圖書資源",
        "booksources-isbn": "國際標準書號:",
        "movelogpagetext": "以下是所有移動頁面的動作記錄清單。",
        "movesubpage": "{{PLURAL:$1|子頁面}}",
        "movesubpagetext": "此頁面有 $1 個子頁面如下所示。",
+       "movesubpagetalktext": "對應的對話頁有以下 $1 頁{{PLURAL:$1|子頁面|子頁面}}。",
        "movenosubpage": "此頁面沒有任何子頁面。",
        "movereason": "原因",
        "revertmove": "還原",
        "pageinfo-category-pages": "頁面數量",
        "pageinfo-category-subcats": "子分類數量",
        "pageinfo-category-files": "檔案數量",
+       "pageinfo-user-id": "使用者 ID",
        "markaspatrolleddiff": "標記為已巡查",
        "markaspatrolledtext": "標記此頁面為已巡查",
        "markaspatrolledtext-file": "標記此檔案版本為己巡查",
        "newimages-showbots": "顯示由機器人上傳的檔案",
        "newimages-hidepatrolled": "隱藏己巡查上傳",
        "noimages": "無任何圖片。",
+       "gallery-slideshow-toggle": "切換縮圖",
        "ilsubmit": "搜尋",
        "bydate": "依日期",
        "sp-newimages-showfrom": "顯示自 $1 $2 以來的新檔案",
        "confirm-rollback-button": "確定",
        "confirm-rollback-top": "還原編輯到此頁面?",
        "semicolon-separator": ";",
-       "comma-separator": "",
+       "comma-separator": "",
        "colon-separator": ":",
        "word-separator": "",
        "parentheses": " ($1)",
        "tag-filter": "[[Special:Tags|標籤]]搜尋:",
        "tag-filter-submit": "搜尋",
        "tag-list-wrapper": "([[Special:Tags|$1 個標籤]]:$2)",
+       "tag-mw-contentmodelchange": "內容模型變更",
+       "tag-mw-contentmodelchange-description": "編輯 [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel 更改頁面的內容模型]。",
        "tags-title": "標籤",
        "tags-intro": "此頁面列出所有可用來標示編輯內容的標籤以及這些標籤所代表的意思。",
        "tags-tag": "標籤名稱",
        "htmlform-cloner-create": "新增更多",
        "htmlform-cloner-delete": "移除",
        "htmlform-cloner-required": "至少必須填寫一筆資料。",
+       "htmlform-date-placeholder": "YYYY-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "YYYY-MM-DD HH:MM:SS",
+       "htmlform-date-invalid": "您指定的值不是一個可以辨識的日期,請嘗試使用 YYYY-MM-DD 格式。",
+       "htmlform-time-invalid": "您指定的值不是一個可以辨識的時間,請嘗試使用 HH:MM:SS 格式。",
+       "htmlform-datetime-invalid": "您指定的值不是一個可以辨識的日期及時間,請嘗試使用 YYYY-MM-DD HH:MM:SS 格式。",
+       "htmlform-date-toolow": "您指定的值在允許的日期 $1 之前。",
+       "htmlform-date-toohigh": "您指定的值在允許的日期 $1 之後。",
+       "htmlform-time-toolow": "您指定的值在最早允許的時間 $1 之前。",
+       "htmlform-time-toohigh": "您指定的值在最後允許的時間 $1 之後。",
+       "htmlform-datetime-toolow": "您指定的值在最早允許的日期及時間 $1 之前。",
+       "htmlform-datetime-toohigh": "您指定的值在最後允許的日期及時間 $1 之後。",
        "htmlform-title-badnamespace": "[[:$1]] 不在 \"{{ns:$2}}\" 命名空間中。",
        "htmlform-title-not-creatable": "\"$1\" 並非可用來建立頁面的標題",
        "htmlform-title-not-exists": "$1 並不存在。",
        "htmlform-user-not-exists": "<strong>$1</strong> 並不存在。",
        "htmlform-user-not-valid": "<strong>$1</strong> 不是有效的使用者名稱。",
-       "sqlite-has-fts": "$1 且支援全文搜索",
-       "sqlite-no-fts": "$1 且不支援全文搜索",
        "logentry-delete-delete": "$1 刪除頁面 $3",
        "logentry-delete-restore": "$1 還原頁面 $3",
        "logentry-delete-event": "$1 {{GENDER:$2|已更改}} $3 中 {{PLURAL:$5|1 筆日誌|$5 筆日誌}}的可見性:$4",
        "feedback-external-bug-report-button": "回報技術問題",
        "feedback-dialog-title": "送出意見回饋",
        "feedback-dialog-intro": "您可以使用以下簡易表單傳送您的意見回饋。您的意見將會使用您的使用者名稱新增至頁面 \"$1\"。",
-       "feedback-error-title": "錯誤",
        "feedback-error1": "錯誤:無法識別 API 回傳的結果",
        "feedback-error2": "錯誤:編輯失敗",
        "feedback-error3": "錯誤:API 沒有回應",
        "feedback-thanks": "感謝!您的意見回饋已發佈到頁面 \"[$2 $1]\"。",
        "feedback-thanks-title": "感謝您!",
        "feedback-useragent": "使用者代理:",
-       "searchsuggest-search": "搜尋",
+       "searchsuggest-search": "搜尋 {{SITENAME}}",
        "searchsuggest-containing": "包含...",
        "api-error-autoblocked": "您的IP位址已經被自動封禁,因為它曾經被一名已封禁的使用者使用過。",
        "api-error-badaccess-groups": "您沒有權限在此 Wiki 上傳檔案。",
        "unlinkaccounts-success": "已取消連結帳號。",
        "authenticationdatachange-ignored": "認証資料變更未被處理,可能未設定提供者?",
        "userjsispublic": "請注意:JavaScript 子頁面可被其他使用者檢視,不應包含憑証資料。",
-       "usercssispublic": "請注意:CSS 子頁面可被其他使用者檢視,不應包含憑証資料。"
+       "usercssispublic": "請注意:CSS 子頁面可被其他使用者檢視,不應包含憑証資料。",
+       "restrictionsfield-badip": "無效的 IP 位址或範圍:$1",
+       "restrictionsfield-label": "允許的 IP 範圍:",
+       "restrictionsfield-help": "一個 IP 位址或 CIDR 範圍一行,要開啟所有範圍可使用 <br><code>0.0.0.0/0</code><br><code>::/0</code>",
+       "edit-error-short": "錯誤:$1",
+       "edit-error-long": "錯誤:\n\n$1"
 }
index 589144c..67369e2 100644 (file)
@@ -104,9 +104,9 @@ $namespaceAliases = [];
  * Mapping NS_xxx to array of GENDERKEY to alias.
  * Example:
  * @code
- * $namespaceGenderAliases = array(
- *     NS_USER => array( 'male' => 'Male_user', 'female' => 'Female_user' ),
- * );
+ * $namespaceGenderAliases = [
+ *     NS_USER => [ 'male' => 'Male_user', 'female' => 'Female_user' ],
+ * ];
  * @endcode
  */
 $namespaceGenderAliases = [];
index 108f777..5d846ea 100644 (file)
@@ -7,11 +7,11 @@
  * @file
  *
  * @author Akoppad
- * @author Ashwath Mattur <ashwatham@gmail.com> http://en.wikipedia.org/wiki/User:Ashwatham
+ * @author Ashwath Mattur <ashwatham@gmail.com> https://en.wikipedia.org/wiki/User:Ashwatham
  * @author Dimension10
  * @author Dipin
  * @author HPN
- * @author Hari Prasad Nadig <hpnadig@gmail.com> http://en.wikipedia.org/wiki/User:Hpnadig
+ * @author Hari Prasad Nadig <hpnadig@gmail.com> https://en.wikipedia.org/wiki/User:Hpnadig
  * @author Kaganer
  * @author Ktkaushik
  * @author M G Harish
index 6f91f1e..d9ef8bc 100644 (file)
@@ -18,6 +18,8 @@
  * @author Yanteng3
  */
 
+$fallback = 'zh-hant'; // T125373
+
 $specialPageAliases = [
        'Activeusers'               => [ '躍簿' ],
        'Allmessages'               => [ '官話' ],
index b8ae8d7..5ceafd1 100644 (file)
@@ -38,8 +38,8 @@
  * @license http://www.gnu.org/copyleft/fdl.html GNU Free Documentation License
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
  *
- * @see http://meta.wikimedia.org/w/index.php?title=LanguageNn.php&action=history
- * @see http://nn.wikipedia.org/w/index.php?title=Brukar:Dittaeva/LanguageNn.php&action=history
+ * @see https://meta.wikimedia.org/w/index.php?title=LanguageNn.php&action=history
+ * @see https://nn.wikipedia.org/w/index.php?title=Brukar:Dittaeva/LanguageNn.php&action=history
  */
 
 $datePreferences = [
index ba3d364..14f5b6f 100644 (file)
 
 $fallback = 'ru';
 
+$namespaceNames = [
+       NS_MEDIA            => 'Medii',
+       NS_SPECIAL          => 'Erikoine',
+       NS_TALK             => 'Pagin',
+       NS_USER             => 'Käyttäi',
+       NS_USER_TALK        => 'Käyttäi_pagin',
+       NS_PROJECT_TALK     => '$1_pagin',
+       NS_FILE             => 'Failu',
+       NS_FILE_TALK        => 'Failu_pagin',
+       NS_MEDIAWIKI        => 'MediiWiki',
+       NS_MEDIAWIKI_TALK   => 'MediiWiki_pagin',
+       NS_TEMPLATE         => 'Šablonu',
+       NS_TEMPLATE_TALK    => 'Šablonu_pagin',
+       NS_HELP             => 'Abu',
+       NS_HELP_TALK        => 'Abu_pagin',
+       NS_CATEGORY         => 'Kategourii',
+       NS_CATEGORY_TALK    => 'Kategourii_pagin',
+];
+
 $linkTrail = '/^([a-zčČšŠžŽäÄöÖ]+)(.*)$/sDu';
 
index c832237..974771f 100644 (file)
--- a/load.php
+++ b/load.php
@@ -23,6 +23,7 @@
  */
 
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 
 // This endpoint is supposed to be independent of request cookies and other
 // details of the session. Enforce this constraint with respect to session use.
@@ -35,6 +36,12 @@ if ( !$wgRequest->checkUrlExtension() ) {
        return;
 }
 
+// Don't initialise ChronologyProtector from object cache, and
+// don't wait for unrelated MediaWiki writes when querying ResourceLoader.
+MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->setRequestInfo( [
+       'ChronologyProtection' => 'false',
+] );
+
 // Set up ResourceLoader
 $resourceLoader = new ResourceLoader(
        ConfigFactory::getDefaultInstance()->makeConfig( 'main' ),
index 0c89c05..7e9220c 100644 (file)
@@ -4,10 +4,10 @@
 # doxygen (www.doxygen.org) for MediaWiki.
 #
 # Some placeholders have been added for MediaWiki usage:
-# {{OUTPUT_DIRECTORY}}
-# {{CURRENT_VERSION}}
-# {{STRIP_FROM_PATH}}
-# {{INPUT}}
+# OUTPUT_DIRECTORY = {{OUTPUT_DIRECTORY}}
+# CURRENT_VERSION  = {{CURRENT_VERSION}}
+# STRIP_FROM_PATH  = {{STRIP_FROM_PATH}}
+# INPUT            = {{INPUT}}
 #
 # To generate documentation run: php mwdocgen.php --no-extensions
 
index 2216de1..208cf17 100644 (file)
@@ -104,7 +104,7 @@ abstract class Maintenance {
 
        /**
         * Used by getDB() / setDB()
-        * @var IDatabase
+        * @var Database
         */
        private $mDb = null;
 
@@ -553,8 +553,19 @@ abstract class Maintenance {
         * Set triggers like when to try to run deferred updates
         * @since 1.28
         */
-       public function setTriggers() {
+       public function setAgentAndTriggers() {
+               if ( function_exists( 'posix_getpwuid' ) ) {
+                       $agent = posix_getpwuid( posix_geteuid() )['name'];
+               } else {
+                       $agent = 'sysadmin';
+               }
+               $agent .= '@' . wfHostname();
+
                $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+               // Add a comment for easy SHOW PROCESSLIST interpretation
+               $lbFactory->setAgentName(
+                       mb_strlen( $agent ) > 15 ? mb_substr( $agent, 0, 15 ) . '...' : $agent
+               );
                self::setLBFactoryTriggers( $lbFactory );
        }
 
@@ -715,6 +726,7 @@ abstract class Maintenance {
 
                if ( is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) {
                        $class = $wgProfiler['class'];
+                       /** @var Profiler $profiler */
                        $profiler = new $class(
                                [ 'sampling' => 1, 'output' => [ $output ] ]
                                        + $wgProfiler
@@ -1091,7 +1103,7 @@ abstract class Maintenance {
                                $wgLBFactoryConf['serverTemplate']['user'] = $wgDBuser;
                                $wgLBFactoryConf['serverTemplate']['password'] = $wgDBpassword;
                        }
-                       LBFactory::destroyInstance();
+                       MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->destroy();
                }
 
                // Per-script profiling; useful for debugging
@@ -1171,6 +1183,7 @@ abstract class Maintenance {
                $this->beginTransaction( $dbw, __METHOD__ );
 
                # Get "active" text records from the revisions table
+               $cur = [];
                $this->output( 'Searching for active text records in revisions table...' );
                $res = $dbw->select( 'revision', 'rev_text_id', [], __METHOD__, [ 'DISTINCT' ] );
                foreach ( $res as $row ) {
@@ -1230,7 +1243,7 @@ abstract class Maintenance {
         * @param integer $db DB index (DB_REPLICA/DB_MASTER)
         * @param array $groups; default: empty array
         * @param string|bool $wiki; default: current wiki
-        * @return IDatabase
+        * @return Database
         */
        protected function getDB( $db, $groups = [], $wiki = false ) {
                if ( is_null( $this->mDb ) ) {
@@ -1305,7 +1318,7 @@ abstract class Maintenance {
 
        /**
         * Lock the search index
-        * @param DatabaseBase &$db
+        * @param Database &$db
         */
        private function lockSearchindex( $db ) {
                $write = [ 'searchindex' ];
@@ -1323,7 +1336,7 @@ abstract class Maintenance {
 
        /**
         * Unlock the tables
-        * @param DatabaseBase &$db
+        * @param Database &$db
         */
        private function unlockSearchindex( $db ) {
                $db->unlockTables( __CLASS__ . '::' . __METHOD__ );
@@ -1332,7 +1345,7 @@ abstract class Maintenance {
        /**
         * Unlock and lock again
         * Since the lock is low-priority, queued reads will be able to complete
-        * @param DatabaseBase &$db
+        * @param Database &$db
         */
        private function relockSearchindex( $db ) {
                $this->unlockSearchindex( $db );
@@ -1343,7 +1356,7 @@ abstract class Maintenance {
         * Perform a search index update with locking
         * @param int $maxLockTime The maximum time to keep the search index locked.
         * @param string $callback The function that will update the function.
-        * @param DatabaseBase $dbw
+        * @param Database $dbw
         * @param array $results
         */
        public function updateSearchIndex( $maxLockTime, $callback, $dbw, $results ) {
@@ -1379,7 +1392,7 @@ abstract class Maintenance {
 
        /**
         * Update the searchindex table for a given pageid
-        * @param DatabaseBase $dbw A database write handle
+        * @param Database $dbw A database write handle
         * @param int $pageId The page ID to update.
         * @return null|string
         */
diff --git a/maintenance/addRFCandPMIDInterwiki.php b/maintenance/addRFCandPMIDInterwiki.php
new file mode 100644 (file)
index 0000000..2262338
--- /dev/null
@@ -0,0 +1,95 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+require_once __DIR__ . '/Maintenance.php';
+
+/**
+ * Run automatically with update.php
+ *
+ * - Changes "rfc" URL to use tools.ietf.org domain
+ * - Adds "pmid" interwiki
+ *
+ * @since 1.28
+ */
+class AddRFCAndPMIDInterwiki extends LoggedUpdateMaintenance {
+       public function __construct() {
+               parent::__construct();
+               $this->addDescription( 'Add RFC and PMID to the interwiki database table' );
+       }
+
+       protected function getUpdateKey() {
+               return __CLASS__;
+       }
+
+       protected function updateSkippedMessage() {
+               return 'RFC and PMID already added to interwiki database table';
+       }
+
+       protected function doDBUpdates() {
+               $interwikiCache = $this->getConfig()->get( 'InterwikiCache' );
+               // Using something other than the database,
+               if ( $interwikiCache !== false ) {
+                       return true;
+               }
+               $dbw = $this->getDB( DB_MASTER );
+               $rfc = $dbw->selectField(
+                       'interwiki',
+                       'iw_url',
+                       [ 'iw_prefix' => 'rfc' ],
+                       __METHOD__
+               );
+
+               // Old pre-1.28 default value, or not set at all
+               if ( $rfc === false || $rfc === 'http://www.rfc-editor.org/rfc/rfc$1.txt' ) {
+                       $dbw->replace(
+                               'interwiki',
+                               [ 'iw_prefix' ],
+                               [
+                                       'iw_prefix' => 'rfc',
+                                       'iw_url' => 'https://tools.ietf.org/html/rfc$1',
+                                       'iw_api' => '',
+                                       'iw_wikiid' => '',
+                                       'iw_local' => 0,
+                               ],
+                               __METHOD__
+                       );
+               }
+
+               $dbw->insert(
+                       'interwiki',
+                       [
+                               'iw_prefix' => 'pmid',
+                               'iw_url' => 'https://www.ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract',
+                               'iw_api' => '',
+                               'iw_wikiid' => '',
+                               'iw_local' => 0,
+                       ],
+                       __METHOD__,
+                       // If there's already a pmid interwiki link, don't
+                       // overwrite it
+                       [ 'IGNORE' ]
+               );
+
+               return true;
+       }
+}
+
+$maintClass = 'AddRFCAndPMIDInterwiki';
+require_once RUN_MAINTENANCE_IF_MAIN;
diff --git a/maintenance/archives/patch-change_tag-ct_id.sql b/maintenance/archives/patch-change_tag-ct_id.sql
new file mode 100644 (file)
index 0000000..7b986d6
--- /dev/null
@@ -0,0 +1,5 @@
+-- Primary key in change_tag table
+
+ALTER TABLE /*$wgDBprefix*/change_tag
+       ADD COLUMN ct_id INT UNSIGNED NOT NULL AUTO_INCREMENT FIRST,
+       ADD PRIMARY KEY (ct_id);
diff --git a/maintenance/archives/patch-rc_ip_modify.sql b/maintenance/archives/patch-rc_ip_modify.sql
new file mode 100644 (file)
index 0000000..e889b5c
--- /dev/null
@@ -0,0 +1 @@
+ALTER TABLE /*_*/recentchanges MODIFY COLUMN rc_ip varbinary(40) NOT NULL default '';
diff --git a/maintenance/archives/patch-tag_summary-ts_id.sql b/maintenance/archives/patch-tag_summary-ts_id.sql
new file mode 100644 (file)
index 0000000..66fa72e
--- /dev/null
@@ -0,0 +1,5 @@
+-- Primary key in tag_summary table
+
+ALTER TABLE /*$wgDBprefix*/tag_summary
+       ADD COLUMN ts_id INT UNSIGNED NOT NULL AUTO_INCREMENT FIRST,
+       ADD PRIMARY KEY (ts_id);
index cf5a19c..0beff7c 100644 (file)
@@ -32,7 +32,7 @@ require __DIR__ . '/../commandLine.inc';
 class UpdateLogging {
 
        /**
-        * @var DatabaseBase
+        * @var Database
         */
        public $dbw;
        public $batchSize = 1000;
index e9cdb58..2a8d79a 100644 (file)
@@ -69,7 +69,7 @@ class BenchmarkDeleteTruncate extends Benchmarker {
        }
 
        /**
-        * @param DatabaseBase $dbw
+        * @param Database $dbw
         * @return void
         */
        private function insertData( $dbw ) {
@@ -82,7 +82,7 @@ class BenchmarkDeleteTruncate extends Benchmarker {
        }
 
        /**
-        * @param DatabaseBase $dbw
+        * @param Database $dbw
         * @return void
         */
        private function delete( $dbw ) {
@@ -90,7 +90,7 @@ class BenchmarkDeleteTruncate extends Benchmarker {
        }
 
        /**
-        * @param DatabaseBase $dbw
+        * @param Database $dbw
         * @return void
         */
        private function truncate( $dbw ) {
index 884e307..1753250 100644 (file)
@@ -24,6 +24,8 @@
 
 require __DIR__ . '/../Maintenance.php';
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Maintenance script to benchmark how long it takes to parse a given title at an optionally
  * specified timestamp
@@ -34,6 +36,13 @@ class BenchmarkParse extends Maintenance {
        /** @var string MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS) */
        private $templateTimestamp = null;
 
+       private $clearLinkCache = false;
+
+       /**
+        * @var LinkCache
+        */
+       private $linkCache;
+
        /** @var array Cache that maps a Title DB key to revision ID for the requested timestamp */
        private $idCache = [];
 
@@ -52,6 +61,8 @@ class BenchmarkParse extends Maintenance {
                        'Use templates which were current at the given time (except that moves and ' .
                        'deletes are not handled properly)',
                        false, true );
+               $this->addOption( 'reset-linkcache', 'Reset the LinkCache after every parse.',
+                       false, false );
        }
 
        function execute() {
@@ -60,6 +71,10 @@ class BenchmarkParse extends Maintenance {
                        Hooks::register( 'BeforeParserFetchTemplateAndtitle', [ $this, 'onFetchTemplate' ] );
                }
 
+               $this->clearLinkCache = $this->hasOption( 'reset-linkcache' );
+               // Set as a member variable to avoid function calls when we're timing the parse
+               $this->linkCache = MediaWikiServices::getInstance()->getLinkCache();
+
                $title = Title::newFromText( $this->getArg() );
                if ( !$title ) {
                        $this->error( "Invalid title" );
@@ -144,6 +159,9 @@ class BenchmarkParse extends Maintenance {
        function runParser( Revision $revision ) {
                $content = $revision->getContent();
                $content->getParserOutput( $revision->getTitle(), $revision->getId() );
+               if ( $this->clearLinkCache ) {
+                       $this->linkCache->clear();
+               }
        }
 
        /**
index 9ec61dc..3f0a83d 100644 (file)
@@ -34,11 +34,7 @@ class CheckComposerLockUpToDate extends Maintenance {
                $lock = new ComposerLock( $lockLocation );
                $json = new ComposerJson( $jsonLocation );
 
-               if ( $lock->getHash() === $json->getHash() ) {
-                       $this->output( "Your composer.lock file is up to date with current dependencies!\n" );
-                       return;
-               }
-               // Out of date, lets figure out which dependencies are old
+               // Check all the dependencies to see if any are old
                $found = false;
                $installed = $lock->getInstalledDependencies();
                foreach ( $json->getRequiredDependencies() as $name => $version ) {
@@ -61,8 +57,6 @@ class CheckComposerLockUpToDate extends Maintenance {
                                1
                        );
                } else {
-                       // The hash is the entire composer.json file,
-                       // so it can be updated without any of the dependencies changing
                        // We couldn't find any out-of-date dependencies, so assume everything is ok!
                        $this->output( "Your composer.lock file is up to date with current dependencies!\n" );
                }
index b8a246e..8672223 100644 (file)
@@ -147,7 +147,6 @@ TEXT
                        } else {
                                $where = [];
                        }
-                       $i = 0;
 
                        $this->output( "Removing empty categories without description pages...\n" );
                        while ( true ) {
index 14557f4..b8001a4 100644 (file)
@@ -74,7 +74,7 @@ class ConvertUserOptions extends Maintenance {
 
        /**
         * @param ResultWrapper $res
-        * @param DatabaseBase $dbw
+        * @param Database $dbw
         * @return null|int
         */
        function convertOptionBatch( $res, $dbw ) {
index 507a494..df496d4 100644 (file)
@@ -83,7 +83,7 @@ class DeleteOrphanedRevisions extends Maintenance {
         * Do this inside a transaction
         *
         * @param array $id Array of revision id values
-        * @param DatabaseBase $dbw DatabaseBase class (needs to be a master)
+        * @param Database $dbw Database class (needs to be a master)
         */
        private function deleteRevs( $id, &$dbw ) {
                if ( !is_array( $id ) ) {
index 97c8954..cdef7e0 100644 (file)
@@ -63,7 +63,8 @@ if ( $ext == 'php' || $ext == 'php5' ) {
        return true;
 }
 $mime = false;
-$lines = explode( "\n", file_get_contents( "includes/mime.types" ) );
+// Borrow mime type file from MimeAnalyzer
+$lines = explode( "\n", file_get_contents( "includes/libs/mime/mime.types" ) );
 foreach ( $lines as $line ) {
        $exts = explode( " ", $line );
        $mime = array_shift( $exts );
index 890fe45..f3561b5 100644 (file)
@@ -25,6 +25,7 @@
  * @file
  * @ingroup Maintenance
  */
+use MediaWiki\MediaWikiServices;
 
 if ( !defined( 'RUN_MAINTENANCE_IF_MAIN' ) ) {
        echo "This file must be included after Maintenance.php\n";
@@ -104,7 +105,7 @@ $maintenance->checkRequiredExtensions();
 
 // A good time when no DBs have writes pending is around lag checks.
 // This avoids having long running scripts just OOM and lose all the updates.
-$maintenance->setTriggers();
+$maintenance->setAgentAndTriggers();
 
 // Do the work
 $maintenance->execute();
@@ -113,12 +114,13 @@ $maintenance->execute();
 $maintenance->globals();
 
 // Perform deferred updates.
+$lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+$lbFactory->commitMasterChanges( $maintClass );
 DeferredUpdates::doUpdates();
 
 // log profiling info
 wfLogProfilingData();
 
 // Commit and close up!
-$factory = wfGetLBFactory();
-$factory->commitMasterChanges( 'doMaintenance' );
-$factory->shutdown( $factory::SHUTDOWN_NO_CHRONPROT );
+$lbFactory->commitMasterChanges( 'doMaintenance' );
+$lbFactory->shutdown( $lbFactory::SHUTDOWN_NO_CHRONPROT );
index 31272bc..9f983c1 100644 (file)
@@ -117,7 +117,7 @@ abstract class DumpIterator extends Maintenance {
        /**
         * Callback function for each revision, child classes should override
         * processRevision instead.
-        * @param DatabaseBase $rev
+        * @param Database $rev
         */
        public function handleRevision( $rev ) {
                $title = $rev->getTitle();
index d0bda4e..d8661c1 100644 (file)
@@ -86,7 +86,7 @@ class TextPassDumper extends BackupDumper {
        protected $checkpointFiles = [];
 
        /**
-        * @var DatabaseBase
+        * @var Database
         */
        protected $db;
 
index 2ed1efa..9dee6e5 100644 (file)
@@ -71,7 +71,7 @@ class FetchText extends Maintenance {
 
        /**
         * May throw a database error if, say, the server dies during query.
-        * @param DatabaseBase $db
+        * @param Database $db
         * @param int $id The old_id
         * @return string
         */
index ac700ef..5a4ab39 100644 (file)
@@ -245,7 +245,8 @@ if ( $count > 0 ) {
                if ( isset( $options['dry'] ) ) {
                        echo " publishing {$file} by '" . $wgUser->getName() . "', comment '$commentText'... ";
                } else {
-                       $props = FSFile::getPropsFromPath( $file );
+                       $mwProps = new MWFileProps( MimeMagic::singleton() );
+                       $props = $mwProps->getPropsFromPath( $file, true );
                        $flags = 0;
                        $publishOptions = [];
                        $handler = MediaHandler::getHandler( $props['mime'] );
index 5531ffc..2894653 100644 (file)
@@ -103,16 +103,16 @@ class ImportTextFiles extends Maintenance {
                        $timestamp = $useTimestamp ? wfTimestamp( TS_UNIX, filemtime( $file ) ) : wfTimestampNow();
 
                        $title = Title::newFromText( $pageName );
-                       $exists = $title->exists();
-                       $oldRevID = $title->getLatestRevID();
-                       $oldRev = $oldRevID ? Revision::newFromId( $oldRevID ) : null;
-
-                       if ( !$title ) {
+                       // Have to check for # manually, since it gets interpreted as a fragment
+                       if ( !$title || $title->hasFragment() ) {
                                $this->error( "Invalid title $pageName. Skipping.\n" );
                                $skipCount++;
                                continue;
                        }
 
+                       $exists = $title->exists();
+                       $oldRevID = $title->getLatestRevID();
+                       $oldRev = $oldRevID ? Revision::newFromId( $oldRevID ) : null;
                        $actualTitle = $title->getPrefixedText();
 
                        if ( $exists ) {
index 6b06da7..96aea03 100644 (file)
@@ -42,8 +42,6 @@ in the load balancer, usually indicating a replication environment.' );
                $user = $dbw->tableName( 'user' );
                $revision = $dbw->tableName( 'revision' );
 
-               $dbver = $dbw->getServerVersion();
-
                // Autodetect mode...
                if ( $this->hasOption( 'background' ) ) {
                        $backgroundMode = true;
index b1e0fa4..fa8bf3b 100644 (file)
@@ -7,7 +7,6 @@ c2find|http://c2.com/cgi/wiki?FindPage&value=$1|0|
 cache|http://www.google.com/search?q=cache:$1|0|
 commons|https://commons.wikimedia.org/wiki/$1|0|https://commons.wikimedia.org/w/api.php
 dictionary|http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1|0|
-docbook|http://wiki.docbook.org/$1|0|
 doi|http://dx.doi.org/$1|0|
 drumcorpswiki|http://www.drumcorpswiki.com/$1|0|http://drumcorpswiki.com/api.php
 dwjwiki|http://www.suberic.net/cgi-bin/dwj/wiki.cgi?$1|0|
@@ -16,22 +15,18 @@ emacswiki|http://www.emacswiki.org/cgi-bin/wiki.pl?$1|0|
 foldoc|http://foldoc.org/?$1|0|
 foxwiki|http://fox.wikis.com/wc.dll?Wiki~$1|0|
 freebsdman|http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query=$1|0|
-gej|http://www.esperanto.de/dej.malnova/aktivikio.pl?$1|0|
 gentoo-wiki|http://gentoo-wiki.com/$1|0|
 google|http://www.google.com/search?q=$1|0|
 googlegroups|http://groups.google.com/groups?q=$1|0|
 hammondwiki|http://www.dairiki.org/HammondWiki/$1|0|
 hrwiki|http://www.hrwiki.org/wiki/$1|0|http://www.hrwiki.org/w/api.php
 imdb|http://www.imdb.com/find?q=$1&tt=on|0|
-jargonfile|http://sunir.org/apps/meta.pl?wiki=JargonFile&redirect=$1|0|
 kmwiki|http://kmwiki.wikispaces.com/$1|0|
 linuxwiki|http://linuxwiki.de/$1|0|
 lojban|http://mw.lojban.org/papri/$1|0|
 lqwiki|http://wiki.linuxquestions.org/wiki/$1|0|
-lugkr|http://www.lug-kr.de/wiki/$1|0|
 meatball|http://www.usemod.com/cgi-bin/mb.pl?$1|0|
 mediawikiwiki|https://www.mediawiki.org/wiki/$1|0|https://www.mediawiki.org/w/api.php
-mediazilla|https://bugzilla.wikimedia.org/$1|0|
 memoryalpha|http://en.memory-alpha.org/wiki/$1|0|http://en.memory-alpha.org/api.php
 metawiki|http://sunir.org/apps/meta.pl?$1|0|
 metawikimedia|https://meta.wikimedia.org/wiki/$1|0|https://meta.wikimedia.org/w/api.php
@@ -39,25 +34,21 @@ mozillawiki|http://wiki.mozilla.org/$1|0|https://wiki.mozilla.org/api.php
 mw|https://www.mediawiki.org/wiki/$1|0|https://www.mediawiki.org/w/api.php
 oeis|http://oeis.org/$1|0|
 openwiki|http://openwiki.com/ow.asp?$1|0|
-ppr|http://c2.com/cgi/wiki?$1|0|
+pmid|https://www.ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract|0|
 pythoninfo|http://wiki.python.org/moin/$1|0|
-rfc|http://www.rfc-editor.org/rfc/rfc$1.txt|0|
+rfc|https://tools.ietf.org/html/rfc$1|0|
 s23wiki|http://s23.org/wiki/$1|0|http://s23.org/w/api.php
 seattlewireless|http://seattlewireless.net/$1|0|
 senseislibrary|http://senseis.xmp.net/?$1|0|
 shoutwiki|http://www.shoutwiki.com/wiki/$1|0|http://www.shoutwiki.com/w/api.php
-sourcewatch|http://www.sourcewatch.org/index.php?title=$1|0|http://www.sourcewatch.org/api.php
 squeak|http://wiki.squeak.org/squeak/$1|0|
-tejo|http://www.tejo.org/vikio/$1|0|
 tmbw|http://www.tmbw.net/wiki/$1|0|http://tmbw.net/wiki/api.php
 tmnet|http://www.technomanifestos.net/?$1|0|
 theopedia|http://www.theopedia.com/$1|0|
 twiki|http://twiki.org/cgi-bin/view/$1|0|
-uea|http://uea.org/vikio/index.php/$1|0|http://uea.org/vikio/api.php
 uncyclopedia|http://en.uncyclopedia.co/wiki/$1|0|http://en.uncyclopedia.co/w/api.php
 unreal|http://wiki.beyondunreal.com/$1|0|http://wiki.beyondunreal.com/w/api.php
 usemod|http://www.usemod.com/cgi-bin/wiki.pl?$1|0|
-webseitzwiki|http://webseitz.fluxent.com/wiki/$1|0|
 wiki|http://c2.com/cgi/wiki?$1|0|
 wikia|http://www.wikia.com/wiki/$1|0|
 wikibooks|https://en.wikibooks.org/wiki/$1|0|https://en.wikibooks.org/w/api.php
index b7d1a84..adb6cd1 100644 (file)
@@ -9,7 +9,6 @@ REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local,iw_api) VALUES
 ('cache','http://www.google.com/search?q=cache:$1',0,''),
 ('commons','https://commons.wikimedia.org/wiki/$1',0,'https://commons.wikimedia.org/w/api.php'),
 ('dictionary','http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1',0,''),
-('docbook','http://wiki.docbook.org/$1',0,''),
 ('doi','http://dx.doi.org/$1',0,''),
 ('drumcorpswiki','http://www.drumcorpswiki.com/$1',0,'http://drumcorpswiki.com/api.php'),
 ('dwjwiki','http://www.suberic.net/cgi-bin/dwj/wiki.cgi?$1',0,''),
@@ -18,22 +17,18 @@ REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local,iw_api) VALUES
 ('foldoc','http://foldoc.org/?$1',0,''),
 ('foxwiki','http://fox.wikis.com/wc.dll?Wiki~$1',0,''),
 ('freebsdman','http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query=$1',0,''),
-('gej','http://www.esperanto.de/dej.malnova/aktivikio.pl?$1',0,''),
 ('gentoo-wiki','http://gentoo-wiki.com/$1',0,''),
 ('google','http://www.google.com/search?q=$1',0,''),
 ('googlegroups','http://groups.google.com/groups?q=$1',0,''),
 ('hammondwiki','http://www.dairiki.org/HammondWiki/$1',0,''),
 ('hrwiki','http://www.hrwiki.org/wiki/$1',0,'http://www.hrwiki.org/w/api.php'),
 ('imdb','http://www.imdb.com/find?q=$1&tt=on',0,''),
-('jargonfile','http://sunir.org/apps/meta.pl?wiki=JargonFile&redirect=$1',0,''),
 ('kmwiki','http://kmwiki.wikispaces.com/$1',0,''),
 ('linuxwiki','http://linuxwiki.de/$1',0,''),
 ('lojban','http://www.lojban.org/tiki/tiki-index.php?page=$1',0,''),
 ('lqwiki','http://wiki.linuxquestions.org/wiki/$1',0,''),
-('lugkr','http://www.lug-kr.de/wiki/$1',0,''),
 ('meatball','http://www.usemod.com/cgi-bin/mb.pl?$1',0,''),
 ('mediawikiwiki','https://www.mediawiki.org/wiki/$1',0,'https://www.mediawiki.org/w/api.php'),
-('mediazilla','https://bugzilla.wikimedia.org/$1',0,''),
 ('memoryalpha','http://en.memory-alpha.org/wiki/$1',0,'http://en.memory-alpha.org/api.php'),
 ('metawiki','http://sunir.org/apps/meta.pl?$1',0,''),
 ('metawikimedia','https://meta.wikimedia.org/wiki/$1',0,'https://meta.wikimedia.org/w/api.php'),
@@ -41,25 +36,21 @@ REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local,iw_api) VALUES
 ('mw','https://www.mediawiki.org/wiki/$1',0,'https://www.mediawiki.org/w/api.php'),
 ('oeis','http://oeis.org/$1',0,''),
 ('openwiki','http://openwiki.com/ow.asp?$1',0,''),
-('ppr','http://c2.com/cgi/wiki?$1',0,''),
+('pmid', 'https://www.ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract',0,''),
 ('pythoninfo','http://wiki.python.org/moin/$1',0,''),
-('rfc','http://www.rfc-editor.org/rfc/rfc$1.txt',0,''),
+('rfc','https://tools.ietf.org/html/rfc$1',0,''),
 ('s23wiki','http://s23.org/wiki/$1',0,'http://s23.org/w/api.php'),
 ('seattlewireless','http://seattlewireless.net/$1',0,''),
 ('senseislibrary','http://senseis.xmp.net/?$1',0,''),
 ('shoutwiki','http://www.shoutwiki.com/wiki/$1',0,'http://www.shoutwiki.com/w/api.php'),
-('sourcewatch','http://www.sourcewatch.org/index.php?title=$1',0,'http://www.sourcewatch.org/api.php'),
 ('squeak','http://wiki.squeak.org/squeak/$1',0,''),
-('tejo','http://www.tejo.org/vikio/$1',0,''),
 ('tmbw','http://www.tmbw.net/wiki/$1',0,'http://tmbw.net/wiki/api.php'),
 ('tmnet','http://www.technomanifestos.net/?$1',0,''),
 ('theopedia','http://www.theopedia.com/$1',0,''),
 ('twiki','http://twiki.org/cgi-bin/view/$1',0,''),
-('uea','http://uea.org/vikio/index.php/$1',0,'http://uea.org/vikio/api.php'),
 ('uncyclopedia','http://en.uncyclopedia.co/wiki/$1',0,'http://en.uncyclopedia.co/w/api.php'),
 ('unreal','http://wiki.beyondunreal.com/$1',0,'http://wiki.beyondunreal.com/w/api.php'),
 ('usemod','http://www.usemod.com/cgi-bin/wiki.pl?$1',0,''),
-('webseitzwiki','http://webseitz.fluxent.com/wiki/$1',0,''),
 ('wiki','http://c2.com/cgi/wiki?$1',0,''),
 ('wikia','http://www.wikia.com/wiki/$1',0,''),
 ('wikibooks','https://en.wikibooks.org/wiki/$1',0,'https://en.wikibooks.org/w/api.php'),
index 068ee8c..aad85da 100644 (file)
@@ -6,7 +6,6 @@
                                "name": "Base",
                                "classes": [
                                        "mw",
-                                       "mw.Map",
                                        "mw.Message",
                                        "mw.loader",
                                        "mw.loader.store",
index 33008d1..21cb658 100644 (file)
@@ -30,23 +30,6 @@ class CommonTag < JsDuck::Tag::Tag
   end
 end
 
-class SourceTag < CommonTag
-  def initialize
-    @tagname = :source
-    @pattern = 'source'
-    super
-  end
-
-  def to_html(context)
-    context[@tagname].map do |source|
-      <<-EOHTML
-        <h3 class='pa'>Source</h3>
-        #{source[:doc]}
-      EOHTML
-    end.join
-  end
-end
-
 class SeeTag < CommonTag
   def initialize
     @tagname = :see
index c901240..1613111 100644 (file)
@@ -1,43 +1,43 @@
 /**
+ * Source: <https://api.jquery.com/>
  * @class jQuery
- * @source <http://api.jquery.com/>
  */
 
 /**
+ * Source: <https://api.jquery.com/jQuery.ajax/>
  * @method ajax
  * @static
- * @source <http://api.jquery.com/jQuery.ajax/>
  * @return {jqXHR}
  */
 
 /**
+ * Source: <https://api.jquery.com/Types/#Event>
  * @class jQuery.Event
- * @source <http://api.jquery.com/Types/#Event>
  */
 
 /**
+ * Source: <https://api.jquery.com/jQuery.Callbacks/>
  * @class jQuery.Callbacks
- * @source <http://api.jquery.com/jQuery.Callbacks/>
  */
 
 /**
+ * Source: <https://api.jquery.com/Types/#Promise>
  * @class jQuery.Promise
- * @source <http://api.jquery.com/Types/#Promise>
  */
 
 /**
+ * Source: <https://api.jquery.com/jQuery.Deferred/>
  * @class jQuery.Deferred
  * @mixins jQuery.Promise
- * @source <http://api.jquery.com/jQuery.Deferred/>
  */
 
 /**
+ * Source: <https://api.jquery.com/Types/#jqXHR>
  * @class jQuery.jqXHR
- * @source <http://api.jquery.com/Types/#jqXHR>
  * @alternateClassName jqXHR
  */
 
 /**
+ * Source: <http://api.qunitjs.com/>
  * @class QUnit
- * @source <http://api.qunitjs.com/>
  */
index 9d92794..fa2bd54 100644 (file)
@@ -48,7 +48,6 @@ class DatabaseLag extends Maintenance {
                        echo "\n";
 
                        while ( 1 ) {
-                               $lb->clearLagTimeCache();
                                $lags = $lb->getLagTimes();
                                unset( $lags[0] );
                                echo gmdate( 'H:i:s' ) . ' ';
index baa9c71..baf917c 100644 (file)
@@ -96,7 +96,7 @@ if ( $run ) {
 
                if ( !strcmp( $runMode, 'php' ) ) {
                        print "<?php\n";
-                       print '$dupeMessages = array(' . "\n";
+                       print '$dupeMessages = [' . "\n";
                }
                foreach ( $wgMessages[$langCodeC] as $key => $value ) {
                        foreach ( $wgMessages[$langCode] as $ckey => $cvalue ) {
@@ -118,7 +118,7 @@ if ( $run ) {
                        }
                }
                if ( !strcmp( $runMode, 'php' ) ) {
-                       print ");\n";
+                       print "];\n";
                }
                if ( !strcmp( $runMode, 'text' ) ) {
                        if ( $count == 1 ) {
index 46616db..5bdc8a7 100644 (file)
@@ -55,12 +55,12 @@ class Digit2Html extends Maintenance {
                                continue;
                        }
 
-                       $this->output( "OK\n\$digitTransformTable = array(\n" );
+                       $this->output( "OK\n\$digitTransformTable = [\n" );
                        foreach ( $digitTransformTable as $latin => $translation ) {
                                $htmlent = utf8ToHexSequence( $translation );
                                $this->output( "'$latin' => '$translation', # &#x$htmlent;\n" );
                        }
-                       $this->output( ");\n" );
+                       $this->output( "];\n" );
                }
        }
 }
index bd73f8b..f771fff 100644 (file)
@@ -104,7 +104,7 @@ class MigrateFileRepoLayout extends Maintenance {
                                        $status = $be->prepare( [
                                                'dir' => dirname( $dpath ), 'bypassReadOnly' => 1 ] );
                                        if ( !$status->isOK() ) {
-                                               $this->error( print_r( $status->getErrorsArray(), true ) );
+                                               $this->error( print_r( $status->getErrors(), true ) );
                                        }
 
                                        $batch[] = [ 'op' => 'copy', 'overwrite' => true,
@@ -137,7 +137,7 @@ class MigrateFileRepoLayout extends Maintenance {
                                        $status = $be->prepare( [
                                                'dir' => dirname( $dpath ), 'bypassReadOnly' => 1 ] );
                                        if ( !$status->isOK() ) {
-                                               $this->error( print_r( $status->getErrorsArray(), true ) );
+                                               $this->error( print_r( $status->getErrors(), true ) );
                                        }
                                        $batch[] = [ 'op' => 'copy', 'overwrite' => true,
                                                'src' => $spath, 'dst' => $dpath, 'img' => $ofile->getArchiveName() ];
@@ -195,7 +195,7 @@ class MigrateFileRepoLayout extends Maintenance {
                                $status = $be->prepare( [
                                        'dir' => dirname( $dpath ), 'bypassReadOnly' => 1 ] );
                                if ( !$status->isOK() ) {
-                                       $this->error( print_r( $status->getErrorsArray(), true ) );
+                                       $this->error( print_r( $status->getErrors(), true ) );
                                }
 
                                $batch[] = [ 'op' => 'copy', 'src' => $spath, 'dst' => $dpath,
@@ -227,7 +227,7 @@ class MigrateFileRepoLayout extends Maintenance {
 
                $status = $be->doOperations( $ops, [ 'bypassReadOnly' => 1 ] );
                if ( !$status->isOK() ) {
-                       $this->output( print_r( $status->getErrorsArray(), true ) );
+                       $this->output( print_r( $status->getErrors(), true ) );
                }
 
                $this->output( "Batch done\n\n" );
diff --git a/maintenance/mssql/archives/patch-change_tag-ct_id.sql b/maintenance/mssql/archives/patch-change_tag-ct_id.sql
new file mode 100644 (file)
index 0000000..94cb9d1
--- /dev/null
@@ -0,0 +1,4 @@
+-- Primary key in change_tag table
+
+ALTER TABLE /*_*/change_tag ADD ct_id INT IDENTITY;
+ALTER TABLE /*_*/change_tag ADD CONSTRAINT pk_change_tag PRIMARY KEY(ct_id)
diff --git a/maintenance/mssql/archives/patch-tag_summary-ts_id.sql b/maintenance/mssql/archives/patch-tag_summary-ts_id.sql
new file mode 100644 (file)
index 0000000..d62bd35
--- /dev/null
@@ -0,0 +1,4 @@
+-- Primary key in tag_summary table
+
+ALTER TABLE /*_*/tag_summary ADD ts_id INT IDENTITY;
+ALTER TABLE /*_*/tag_summary ADD CONSTRAINT pk_tag_summary PRIMARY KEY(ts_id)
index ea087a6..beb9727 100644 (file)
@@ -1193,6 +1193,7 @@ CREATE TABLE /*_*/updatelog (
 
 -- A table to track tags for revisions, logs and recent changes.
 CREATE TABLE /*_*/change_tag (
+  ct_id int NOT NULL PRIMARY KEY IDENTITY,
   -- RCID for the change
   ct_rc_id int NULL REFERENCES /*_*/recentchanges(rc_id),
   -- LOGID for the change
@@ -1215,6 +1216,7 @@ CREATE INDEX /*i*/change_tag_tag_id ON /*_*/change_tag (ct_tag,ct_rc_id,ct_rev_i
 -- Rollup table to pull a LIST of tags simply without ugly GROUP_CONCAT
 -- that only works on MySQL 4.1+
 CREATE TABLE /*_*/tag_summary (
+  ts_id int NOT NULL PRIMARY KEY IDENTITY,
   -- RCID for the change
   ts_rc_id int NULL REFERENCES /*_*/recentchanges(rc_id),
   -- LOGID for the change
index 506bc9c..b705500 100644 (file)
@@ -37,7 +37,7 @@ require_once __DIR__ . '/Maintenance.php';
 class NamespaceConflictChecker extends Maintenance {
 
        /**
-        * @var DatabaseBase
+        * @var Database
         */
        protected $db;
 
diff --git a/maintenance/oracle/archives/patch-change_tag-ct_id.sql b/maintenance/oracle/archives/patch-change_tag-ct_id.sql
new file mode 100644 (file)
index 0000000..6672872
--- /dev/null
@@ -0,0 +1,6 @@
+define mw_prefix='{$wgDBprefix}';
+
+ALTER TABLE &mw_prefix.change_tag ADD (
+ct_id NUMBER NOT NULL,
+);
+ALTER TABLE &mw_prefix.change_tag ADD CONSTRAINT &mw_prefix.change_tag_pk PRIMARY KEY (ct_id);
diff --git a/maintenance/oracle/archives/patch-tag_summary-ts_id.sql b/maintenance/oracle/archives/patch-tag_summary-ts_id.sql
new file mode 100644 (file)
index 0000000..91c3338
--- /dev/null
@@ -0,0 +1,6 @@
+define mw_prefix='{$wgDBprefix}';
+
+ALTER TABLE &mw_prefix.tag_summary ADD (
+ts_id NUMBER NOT NULL,
+);
+ALTER TABLE &mw_prefix.tag_summary ADD CONSTRAINT &mw_prefix.tag_summary_pk PRIMARY KEY (ts_id);
index d9369c9..616b401 100644 (file)
@@ -616,23 +616,27 @@ CREATE TABLE &mw_prefix.updatelog (
 ALTER TABLE &mw_prefix.updatelog ADD CONSTRAINT &mw_prefix.updatelog_pk PRIMARY KEY (ul_key);
 
 CREATE TABLE &mw_prefix.change_tag (
+  ct_id NUMBER NOT NULL,
   ct_rc_id NUMBER NULL,
   ct_log_id NUMBER NULL,
   ct_rev_id NUMBER NULL,
   ct_tag VARCHAR2(255) NOT NULL,
   ct_params BLOB NULL
 );
+ALTER TABLE &mw_prefix.change_tag ADD CONSTRAINT &mw_prefix.change_tag_pk PRIMARY KEY (ct_id);
 CREATE UNIQUE INDEX &mw_prefix.change_tag_u01 ON &mw_prefix.change_tag (ct_rc_id,ct_tag);
 CREATE UNIQUE INDEX &mw_prefix.change_tag_u02 ON &mw_prefix.change_tag (ct_log_id,ct_tag);
 CREATE UNIQUE INDEX &mw_prefix.change_tag_u03 ON &mw_prefix.change_tag (ct_rev_id,ct_tag);
 CREATE INDEX &mw_prefix.change_tag_i01 ON &mw_prefix.change_tag (ct_tag,ct_rc_id,ct_rev_id,ct_log_id);
 
 CREATE TABLE &mw_prefix.tag_summary (
+  ts_id NUMBER NOT NULL,
   ts_rc_id NUMBER NULL,
   ts_log_id NUMBER NULL,
   ts_rev_id NUMBER NULL,
   ts_tags BLOB NOT NULL
 );
+ALTER TABLE &mw_prefix.tag_summary ADD CONSTRAINT &mw_prefix.tag_summary_pk PRIMARY KEY (ts_id);
 CREATE UNIQUE INDEX &mw_prefix.tag_summary_u01 ON &mw_prefix.tag_summary (ts_rc_id);
 CREATE UNIQUE INDEX &mw_prefix.tag_summary_u02 ON &mw_prefix.tag_summary (ts_log_id);
 CREATE UNIQUE INDEX &mw_prefix.tag_summary_u03 ON &mw_prefix.tag_summary (ts_rev_id);
index 7b8f2cd..e4f3e91 100644 (file)
@@ -56,7 +56,7 @@ class Orphans extends Maintenance {
 
        /**
         * Lock the appropriate tables for the script
-        * @param DatabaseBase $db
+        * @param Database $db
         * @param string $extraTable The name of any extra tables to lock (eg: text)
         */
        private function lockTables( $db, $extraTable = [] ) {
index 43fbd38..bc21140 100644 (file)
@@ -45,11 +45,13 @@ class PatchSql extends Maintenance {
 
        public function execute() {
                $dbw = $this->getDB( DB_MASTER );
+               $updater = DatabaseUpdater::newForDB( $dbw, true, $this );
+
                foreach ( $this->mArgs as $arg ) {
                        $files = [
                                $arg,
-                               $dbw->patchPath( $arg ),
-                               $dbw->patchPath( "patch-$arg.sql" ),
+                               $updater->patchPath( $dbw, $arg ),
+                               $updater->patchPath( $dbw, "patch-$arg.sql" ),
                        ];
                        foreach ( $files as $file ) {
                                if ( file_exists( $file ) ) {
index 401ef12..c6bd794 100644 (file)
@@ -57,7 +57,7 @@ class PopulateContentModel extends Maintenance {
                }
        }
 
-       private function updatePageRows( DatabaseBase $dbw, $pageIds, $model ) {
+       private function updatePageRows( Database $dbw, $pageIds, $model ) {
                $count = count( $pageIds );
                $this->output( "Setting $count rows to $model..." );
                $dbw->update(
@@ -70,7 +70,7 @@ class PopulateContentModel extends Maintenance {
                $this->output( "done.\n" );
        }
 
-       protected function populatePage( DatabaseBase $dbw, $ns ) {
+       protected function populatePage( Database $dbw, $ns ) {
                $toSave = [];
                $lastId = 0;
                $nsCondition = $ns === 'all' ? [] : [ 'page_namespace' => $ns ];
@@ -102,7 +102,7 @@ class PopulateContentModel extends Maintenance {
                }
        }
 
-       private function updateRevisionOrArchiveRows( DatabaseBase $dbw, $ids, $model, $table ) {
+       private function updateRevisionOrArchiveRows( Database $dbw, $ids, $model, $table ) {
                $prefix = $table === 'archive' ? 'ar' : 'rev';
                $model_column = "{$prefix}_content_model";
                $format_column = "{$prefix}_content_format";
@@ -120,7 +120,7 @@ class PopulateContentModel extends Maintenance {
                $this->output( "done.\n" );
        }
 
-       protected function populateRevisionOrArchive( DatabaseBase $dbw, $table, $ns ) {
+       protected function populateRevisionOrArchive( Database $dbw, $table, $ns ) {
                $prefix = $table === 'archive' ? 'ar' : 'rev';
                $model_column = "{$prefix}_content_model";
                $format_column = "{$prefix}_content_format";
index 05098ac..ac87cf3 100644 (file)
@@ -83,7 +83,7 @@ class PopulateRecentChangesSource extends LoggedUpdateMaintenance {
                return __CLASS__;
        }
 
-       protected function buildUpdateCondition( DatabaseBase $dbw ) {
+       protected function buildUpdateCondition( Database $dbw ) {
                $rcNew = $dbw->addQuotes( RC_NEW );
                $rcSrcNew = $dbw->addQuotes( RecentChange::SRC_NEW );
                $rcEdit = $dbw->addQuotes( RC_EDIT );
index 95c87c0..2273761 100644 (file)
@@ -25,6 +25,8 @@ DROP SEQUENCE IF EXISTS category_cat_id_seq CASCADE;
 DROP SEQUENCE IF EXISTS archive_ar_id_seq CASCADE;
 DROP SEQUENCE IF EXISTS externallinks_el_id_seq CASCADE;
 DROP SEQUENCE IF EXISTS sites_site_id_seq CASCADE;
+DROP SEQUENCE IF EXISTS change_tag_ct_id_seq CASCADE;
+DROP SEQUENCE IF EXISTS tag_summary_ts_id_seq CASCADE;
 DROP FUNCTION IF EXISTS page_deleted() CASCADE;
 DROP FUNCTION IF EXISTS ts2_page_title() CASCADE;
 DROP FUNCTION IF EXISTS ts2_page_text() CASCADE;
@@ -653,7 +655,9 @@ CREATE TABLE category (
 CREATE UNIQUE INDEX category_title ON category(cat_title);
 CREATE INDEX category_pages ON category(cat_pages);
 
+CREATE SEQUENCE change_tag_ct_id_seq;
 CREATE TABLE change_tag (
+  ct_id      INTEGER  NOT NULL  PRIMARY KEY DEFAULT nextval('change_tag_ct_id_seq'),
   ct_rc_id   INTEGER      NULL,
   ct_log_id  INTEGER      NULL,
   ct_rev_id  INTEGER      NULL,
@@ -665,11 +669,13 @@ CREATE UNIQUE INDEX change_tag_log_tag ON change_tag(ct_log_id,ct_tag);
 CREATE UNIQUE INDEX change_tag_rev_tag ON change_tag(ct_rev_id,ct_tag);
 CREATE INDEX change_tag_tag_id ON change_tag(ct_tag,ct_rc_id,ct_rev_id,ct_log_id);
 
+CREATE SEQUENCE tag_summary_ts_id_seq;
 CREATE TABLE tag_summary (
-  ts_rc_id   INTEGER     NULL,
-  ts_log_id  INTEGER     NULL,
-  ts_rev_id  INTEGER     NULL,
-  ts_tags    TEXT    NOT NULL
+  ts_id      INTEGER  NOT NULL  PRIMARY KEY DEFAULT nextval('tag_summary_ts_id_seq'),
+  ts_rc_id   INTEGER      NULL,
+  ts_log_id  INTEGER      NULL,
+  ts_rev_id  INTEGER      NULL,
+  ts_tags    TEXT     NOT NULL
 );
 CREATE UNIQUE INDEX tag_summary_rc_id ON tag_summary(ts_rc_id);
 CREATE UNIQUE INDEX tag_summary_log_id ON tag_summary(ts_log_id);
index d102e08..2503ed2 100644 (file)
@@ -43,7 +43,7 @@ class PPFuzzTester {
        public $minLength = 0;
        public $maxLength = 20;
        public $maxTemplates = 5;
-       // public $outputTypes = array( 'OT_HTML', 'OT_WIKI', 'OT_PREPROCESS' );
+       // public $outputTypes = [ 'OT_HTML', 'OT_WIKI', 'OT_PREPROCESS' ];
        public $entryPoints = [ 'testSrvus', 'testPst', 'testPreprocess' ];
        public $verbose = false;
 
index 649557e..da8a6bc 100644 (file)
@@ -29,6 +29,8 @@ require_once __DIR__ . '/Maintenance.php';
  * @ingroup Maintenance
  */
 class RebuildFileCache extends Maintenance {
+       private $enabled = true;
+
        public function __construct() {
                parent::__construct();
                $this->addDescription( 'Build file cache for content pages' );
@@ -39,23 +41,27 @@ class RebuildFileCache extends Maintenance {
        }
 
        public function finalSetup() {
-               global $wgDebugToolbar;
+               global $wgDebugToolbar, $wgUseFileCache, $wgReadOnly;
 
+               $this->enabled = $wgUseFileCache;
+               // Script will handle capturing output and saving it itself
+               $wgUseFileCache = false;
                // Debug toolbar makes content uncacheable so we disable it.
                // Has to be done before Setup.php initialize MWDebug
                $wgDebugToolbar = false;
+               //  Avoid DB writes (like enotif/counters)
+               $wgReadOnly = 'Building cache'; // avoid DB writes (like enotif/counters)
+
                parent::finalSetup();
        }
 
        public function execute() {
-               global $wgUseFileCache, $wgReadOnly, $wgRequestTime;
-               global $wgOut;
-               if ( !$wgUseFileCache ) {
+               global $wgRequestTime;
+
+               if ( !$this->enabled ) {
                        $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true );
                }
 
-               $wgReadOnly = 'Building cache'; // avoid DB writes (like enotif/counters)
-
                $start = $this->getOption( 'start', "0" );
                if ( !ctype_digit( $start ) ) {
                        $this->error( "Invalid value for start parameter.", true );
@@ -74,10 +80,10 @@ class RebuildFileCache extends Maintenance {
                $overwrite = $this->getOption( 'overwrite', false );
                $start = ( $start > 0 )
                        ? $start
-                       : $dbr->selectField( 'page', 'MIN(page_id)', false, __FUNCTION__ );
+                       : $dbr->selectField( 'page', 'MIN(page_id)', false, __METHOD__ );
                $end = ( $end > 0 )
                        ? $end
-                       : $dbr->selectField( 'page', 'MAX(page_id)', false, __FUNCTION__ );
+                       : $dbr->selectField( 'page', 'MAX(page_id)', false, __METHOD__ );
                if ( !$start ) {
                        $this->error( "Nothing to do.", true );
                }
@@ -93,16 +99,17 @@ class RebuildFileCache extends Maintenance {
                // Go through each page and save the output
                while ( $blockEnd <= $end ) {
                        // Get the pages
-                       $res = $dbr->select( 'page', [ 'page_namespace', 'page_title', 'page_id' ],
+                       $res = $dbr->select( 'page',
+                               [ 'page_namespace', 'page_title', 'page_id' ],
                                [ 'page_namespace' => MWNamespace::getContentNamespaces(),
                                        "page_id BETWEEN $blockStart AND $blockEnd" ],
+                               __METHOD__,
                                [ 'ORDER BY' => 'page_id ASC', 'USE INDEX' => 'PRIMARY' ]
                        );
 
                        $this->beginTransaction( $dbw, __METHOD__ ); // for any changes
                        foreach ( $res as $row ) {
                                $rebuilt = false;
-                               $wgRequestTime = microtime( true ); # bug 22852
 
                                $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
                                if ( null == $title ) {
@@ -110,39 +117,52 @@ class RebuildFileCache extends Maintenance {
                                        continue; // broken title?
                                }
 
-                               $context = new RequestContext;
+                               $context = new RequestContext();
                                $context->setTitle( $title );
                                $article = Article::newFromTitle( $title, $context );
                                $context->setWikiPage( $article->getPage() );
 
-                               $wgOut = $context->getOutput(); // set display title
-
                                // If the article is cacheable, then load it
-                               if ( $article->isFileCacheable() ) {
-                                       $cache = HTMLFileCache::newFromTitle( $title, 'view' );
-                                       if ( $cache->isCacheGood() ) {
+                               if ( $article->isFileCacheable( HTMLFileCache::MODE_REBUILD ) ) {
+                                       $viewCache = new HTMLFileCache( $title, 'view' );
+                                       $historyCache = new HTMLFileCache( $title, 'history' );
+                                       if ( $viewCache->isCacheGood() && $historyCache->isCacheGood() ) {
                                                if ( $overwrite ) {
                                                        $rebuilt = true;
                                                } else {
-                                                       $this->output( "Page {$row->page_id} already cached\n" );
+                                                       $this->output( "Page '$title' (id {$row->page_id}) already cached\n" );
                                                        continue; // done already!
                                                }
                                        }
-                                       ob_start( [ &$cache, 'saveToFileCache' ] ); // save on ob_end_clean()
-                                       $wgUseFileCache = false; // hack, we don't want $article fiddling with filecache
-                                       $article->view();
+
                                        MediaWiki\suppressWarnings(); // header notices
-                                       $wgOut->output();
+                                       // Cache ?action=view
+                                       $wgRequestTime = microtime( true ); # bug 22852
+                                       ob_start();
+                                       $article->view();
+                                       $context->getOutput()->output();
+                                       $context->getOutput()->clearHTML();
+                                       $viewHtml = ob_get_clean();
+                                       $viewCache->saveToFileCache( $viewHtml );
+                                       // Cache ?action=history
+                                       $wgRequestTime = microtime( true ); # bug 22852
+                                       ob_start();
+                                       Action::factory( 'history', $article, $context )->show();
+                                       $context->getOutput()->output();
+                                       $context->getOutput()->clearHTML();
+                                       $historyHtml = ob_get_clean();
+                                       $historyCache->saveToFileCache( $historyHtml );
                                        MediaWiki\restoreWarnings();
-                                       $wgUseFileCache = true;
-                                       ob_end_clean(); // clear buffer
+
                                        if ( $rebuilt ) {
-                                               $this->output( "Re-cached page {$row->page_id}\n" );
+                                               $this->output( "Re-cached page '$title' (id {$row->page_id})..." );
                                        } else {
-                                               $this->output( "Cached page {$row->page_id}\n" );
+                                               $this->output( "Cached page '$title' (id {$row->page_id})..." );
                                        }
+                                       $this->output( "[view: " . strlen( $viewHtml ) . " bytes; " .
+                                               "history: " . strlen( $historyHtml ) . " bytes]\n" );
                                } else {
-                                       $this->output( "Page {$row->page_id} not cacheable\n" );
+                                       $this->output( "Page '$title' (id {$row->page_id}) not cacheable\n" );
                                }
                        }
                        $this->commitTransaction( $dbw, __METHOD__ ); // commit any changes (just for sanity)
index 3157186..6aa1f37 100644 (file)
@@ -40,7 +40,7 @@ require_once __DIR__ . '/Maintenance.php';
 class ImageBuilder extends Maintenance {
 
        /**
-        * @var DatabaseBase
+        * @var Database
         */
        protected $dbw;
 
index 6465bb3..458dacf 100644 (file)
@@ -304,6 +304,8 @@ class RebuildRecentchanges extends Maintenance {
                        ]
                );
 
+               $field = $dbw->fieldInfo( 'recentchanges', 'rc_cur_id' );
+
                $inserted = 0;
                foreach ( $res as $row ) {
                        $dbw->insert(
@@ -323,7 +325,7 @@ class RebuildRecentchanges extends Maintenance {
                                        'rc_last_oldid' => 0,
                                        'rc_type' => RC_LOG,
                                        'rc_source' => $dbw->addQuotes( RecentChange::SRC_LOG ),
-                                       'rc_cur_id' => $dbw->cascadingDeletes()
+                                       'rc_cur_id' => $field->isNullable()
                                                ? $row->page_id
                                                : (int)$row->page_id, // NULL => 0,
                                        'rc_log_type' => $row->log_type,
index ec99d84..37636c8 100644 (file)
@@ -36,7 +36,7 @@ class RebuildTextIndex extends Maintenance {
        const RTI_CHUNK_SIZE = 500;
 
        /**
-        * @var DatabaseBase
+        * @var Database
         */
        private $db;
 
index aea966f..df4ce56 100644 (file)
@@ -37,7 +37,7 @@ require_once __DIR__ . '/Maintenance.php';
 class RefreshImageMetadata extends Maintenance {
 
        /**
-        * @var DatabaseBase
+        * @var Database
         */
        protected $dbw;
 
@@ -197,7 +197,7 @@ class RefreshImageMetadata extends Maintenance {
        }
 
        /**
-        * @param DatabaseBase $dbw
+        * @param Database $dbw
         * @return array
         */
        function getConditions( $dbw ) {
index 106be1f..e7a4d06 100644 (file)
@@ -90,7 +90,7 @@ class RefreshLinks extends Maintenance {
                $end = null, $redirectsOnly = false, $oldRedirectsOnly = false
        ) {
                $reportingInterval = 100;
-               $dbr = $this->getDB( DB_REPLICA );
+               $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] );
 
                if ( $start === null ) {
                        $start = 1;
@@ -282,7 +282,7 @@ class RefreshLinks extends Maintenance {
        ) {
                wfWaitForSlaves();
                $this->output( "Deleting illegal entries from the links tables...\n" );
-               $dbr = $this->getDB( DB_REPLICA );
+               $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] );
                do {
                        // Find the start of the next chunk. This is based only
                        // on existent page_ids.
@@ -324,7 +324,7 @@ class RefreshLinks extends Maintenance {
         */
        private function dfnCheckInterval( $start = null, $end = null, $batchSize = 100 ) {
                $dbw = $this->getDB( DB_MASTER );
-               $dbr = $this->getDB( DB_REPLICA );
+               $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] );
 
                $linksTables = [ // table name => page_id field
                        'pagelinks' => 'pl_from',
index e6a30a3..cc976ed 100644 (file)
@@ -44,6 +44,8 @@ class MwSql extends Maintenance {
        }
 
        public function execute() {
+               global $IP;
+
                // We wan't to allow "" for the wikidb, meaning don't call select_db()
                $wiki = $this->hasOption( 'wikidb' ) ? $this->getOption( 'wikidb' ) : false;
                // Get the appropriate load balancer (for this wiki)
@@ -66,24 +68,30 @@ class MwSql extends Maintenance {
                                }
                        }
                        if ( $index === null ) {
-                               $this->error( "No replica DB server configured with the name '$server'.", 1 );
+                               $this->error( "No replica DB server configured with the name '$replicaDB'.", 1 );
                        }
                } else {
                        $index = DB_MASTER;
                }
-               // Get a DB handle (with this wiki's DB selected) from the appropriate load balancer
+
+               /** @var Database $db DB handle for the appropriate cluster/wiki */
                $db = $lb->getConnection( $index, [], $wiki );
                if ( $replicaDB != '' && $db->getLBInfo( 'master' ) !== null ) {
                        $this->error( "The server selected ({$db->getServer()}) is not a replica DB.", 1 );
                }
 
+               if ( $index === DB_MASTER ) {
+                       $updater = DatabaseUpdater::newForDB( $db, true, $this );
+                       $db->setSchemaVars( $updater->getSchemaVars() );
+               }
+
                if ( $this->hasArg( 0 ) ) {
                        $file = fopen( $this->getArg( 0 ), 'r' );
                        if ( !$file ) {
                                $this->error( "Unable to open input file", true );
                        }
 
-                       $error = $db->sourceStream( $file, false, [ $this, 'sqlPrintResult' ] );
+                       $error = $db->sourceStream( $file, null, [ $this, 'sqlPrintResult' ] );
                        if ( $error !== true ) {
                                $this->error( $error, true );
                        } else {
@@ -98,14 +106,15 @@ class MwSql extends Maintenance {
                        return;
                }
 
-               $useReadline = function_exists( 'readline_add_history' )
-                       && Maintenance::posix_isatty( 0 /*STDIN*/ );
-
-               if ( $useReadline ) {
-                       global $IP;
+               if (
+                       function_exists( 'readline_add_history' ) &&
+                       Maintenance::posix_isatty( 0 /*STDIN*/ )
+               ) {
                        $historyFile = isset( $_ENV['HOME'] ) ?
                                "{$_ENV['HOME']}/.mwsql_history" : "$IP/maintenance/.mwsql_history";
                        readline_read_history( $historyFile );
+               } else {
+                       $historyFile = null;
                }
 
                $wholeLine = '';
@@ -126,10 +135,10 @@ class MwSql extends Maintenance {
                                $prompt = '    -> ';
                                continue;
                        }
-                       if ( $useReadline ) {
+                       if ( $historyFile ) {
                                # Delimiter is eated by streamStatementEnd, we add it
                                # up in the history (bug 37020)
-                               readline_add_history( $wholeLine . $db->getDelimiter() );
+                               readline_add_history( $wholeLine . ';' );
                                readline_write_history( $historyFile );
                        }
                        $this->sqlDoQuery( $db, $wholeLine, $doDie );
@@ -139,7 +148,7 @@ class MwSql extends Maintenance {
                wfWaitForSlaves();
        }
 
-       protected function sqlDoQuery( $db, $line, $dieOnError ) {
+       protected function sqlDoQuery( IDatabase $db, $line, $dieOnError ) {
                try {
                        $res = $db->query( $line );
                        $this->sqlPrintResult( $res, $db );
@@ -151,7 +160,7 @@ class MwSql extends Maintenance {
        /**
         * Print the results, callback for $db->sourceStream()
         * @param ResultWrapper $res The results object
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         */
        public function sqlPrintResult( $res, $db ) {
                if ( !$res ) {
diff --git a/maintenance/sqlite/archives/patch-change_tag-ct_id.sql b/maintenance/sqlite/archives/patch-change_tag-ct_id.sql
new file mode 100644 (file)
index 0000000..1c01094
--- /dev/null
@@ -0,0 +1,25 @@
+DROP TABLE IF EXISTS /*_*/change_tag_tmp;
+
+CREATE TABLE /*$wgDBprefix*/change_tag_tmp (
+  ct_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
+  ct_rc_id int NULL,
+  ct_log_id int NULL,
+  ct_rev_id int NULL,
+  ct_tag varchar(255) NOT NULL,
+  ct_params blob NULL
+);
+
+INSERT OR IGNORE INTO /*_*/change_tag_tmp (
+    ct_rc_id, ct_log_id, ct_rev_id, ct_tag, ct_params )
+    SELECT
+    ct_rc_id, ct_log_id, ct_rev_id, ct_tag, ct_params
+    FROM /*_*/change_tag;
+
+DROP TABLE /*_*/change_tag;
+
+ALTER TABLE /*_*/change_tag_tmp RENAME TO /*_*/change_tag;
+
+CREATE UNIQUE INDEX /*i*/change_tag_rc_tag ON /*_*/change_tag (ct_rc_id,ct_tag);
+CREATE UNIQUE INDEX /*i*/change_tag_log_tag ON /*_*/change_tag (ct_log_id,ct_tag);
+CREATE UNIQUE INDEX /*i*/change_tag_rev_tag ON /*_*/change_tag (ct_rev_id,ct_tag);
+CREATE INDEX /*i*/change_tag_tag_id ON /*_*/change_tag (ct_tag,ct_rc_id,ct_rev_id,ct_log_id);
diff --git a/maintenance/sqlite/archives/patch-tag_summary-ts_id.sql b/maintenance/sqlite/archives/patch-tag_summary-ts_id.sql
new file mode 100644 (file)
index 0000000..b6a1202
--- /dev/null
@@ -0,0 +1,23 @@
+DROP TABLE IF EXISTS /*_*/tag_summary_tmp;
+
+CREATE TABLE /*$wgDBprefix*/tag_summary_tmp (
+  ts_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
+  ts_rc_id int NULL,
+  ts_log_id int NULL,
+  ts_rev_id int NULL,
+  ts_tags blob NOT NULL
+);
+
+INSERT OR IGNORE INTO /*_*/tag_summary_tmp (
+    ts_rc_id, ts_log_id, ts_rev_id, ts_tags )
+    SELECT
+    ts_rc_id, ts_log_id, ts_rev_id, ts_tags
+    FROM /*_*/tag_summary;
+
+DROP TABLE /*_*/tag_summary;
+
+ALTER TABLE /*_*/tag_summary_tmp RENAME TO /*_*/tag_summary;
+
+CREATE UNIQUE INDEX /*i*/tag_summary_rc_id ON /*_*/tag_summary (ts_rc_id);
+CREATE UNIQUE INDEX /*i*/tag_summary_log_id ON /*_*/tag_summary (ts_log_id);
+CREATE UNIQUE INDEX /*i*/tag_summary_rev_id ON /*_*/tag_summary (ts_rev_id);
index 289d22d..28be6a3 100644 (file)
@@ -384,7 +384,7 @@ class CompressOld extends Maintenance {
 
                                        if ( $text === false ) {
                                                $this->error( "\nError, unable to get text in old_id $oldid" );
-                                               # $dbw->delete( 'old', array( 'old_id' => $oldid ) );
+                                               # $dbw->delete( 'old', [ 'old_id' => $oldid ] );
                                        }
 
                                        if ( $extdb == "" && $j == 0 ) {
index a0efcb8..c5dd53b 100644 (file)
@@ -640,7 +640,7 @@ class RecompressTracked {
        /**
         * Gets a DB master connection for the given external cluster name
         * @param string $cluster
-        * @return DatabaseBase
+        * @return Database
         */
        function getExtDB( $cluster ) {
                $lb = wfGetLBFactory()->getExternalLB( $cluster );
index b5c14e3..03ce508 100644 (file)
@@ -1472,6 +1472,7 @@ CREATE TABLE /*_*/updatelog (
 
 -- A table to track tags for revisions, logs and recent changes.
 CREATE TABLE /*_*/change_tag (
+  ct_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
   -- RCID for the change
   ct_rc_id int NULL,
   -- LOGID for the change
@@ -1494,6 +1495,7 @@ CREATE INDEX /*i*/change_tag_tag_id ON /*_*/change_tag (ct_tag,ct_rc_id,ct_rev_i
 -- Rollup table to pull a LIST of tags simply without ugly GROUP_CONCAT
 -- that only works on MySQL 4.1+
 CREATE TABLE /*_*/tag_summary (
+  ts_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
   -- RCID for the change
   ts_rc_id int NULL,
   -- LOGID for the change
index b96e7eb..a672e29 100755 (executable)
@@ -145,6 +145,7 @@ class UpdateMediaWiki extends Maintenance {
 
                $this->output( "Going to run database updates for " . wfWikiID() . "\n" );
                if ( $db->getType() === 'sqlite' ) {
+                       /** @var Database|DatabaseSqlite $db */
                        $this->output( "Using SQLite file: '{$db->getDbFilePath()}'\n" );
                }
                $this->output( "Depending on the size of your database this may take a while!\n" );
index e754e3c..e70a176 100644 (file)
@@ -242,7 +242,7 @@ TEXT
         * Return an SQL expression selecting rows which sort above the given row,
         * assuming an ordering of cl_collation, cl_to, cl_type, cl_from
         * @param stdClass $row
-        * @param DatabaseBase $dbw
+        * @param Database $dbw
         * @return string
         */
        function getBatchCondition( $row, $dbw ) {
index bd34a50..7dd0907 100644 (file)
@@ -2,14 +2,21 @@
 
 require_once __DIR__ . '/Maintenance.php';
 
+use Composer\Spdx\SpdxLicenses;
+use JsonSchema\Validator;
+
 class ValidateRegistrationFile extends Maintenance {
        public function __construct() {
                parent::__construct();
                $this->addArg( 'path', 'Path to extension.json/skin.json file.', true );
        }
        public function execute() {
-               if ( !class_exists( 'JsonSchema\Validato' ) ) {
+               if ( !class_exists( Validator::class ) ) {
                        $this->error( 'The JsonSchema library cannot be found, please install it through composer.', 1 );
+               } elseif ( !class_exists( SpdxLicenses::class ) ) {
+                       $this->error(
+                               'The spdx-licenses library cannot be found, please install it through composer.', 1
+                       );
                }
 
                $path = $this->getArg( 0 );
@@ -38,14 +45,29 @@ class ValidateRegistrationFile extends Maintenance {
                        $this->output( "Warning: $path is using a deprecated schema, and should be updated to "
                                . ExtensionRegistry::MANIFEST_VERSION . "\n" );
                }
-               $validator = new JsonSchema\Validator;
+
+               $licenseError = false;
+               // Check if it's a string, if not, schema validation will display an error
+               if ( isset( $data->{'license-name'} ) && is_string( $data->{'license-name'} ) ) {
+                       $licenses = new SpdxLicenses();
+                       $valid = $licenses->validate( $data->{'license-name'} );
+                       if ( !$valid ) {
+                               $licenseError = '[license-name] Invalid SPDX license identifier, '
+                                       . 'see <https://spdx.org/licenses/>';
+                       }
+               }
+
+               $validator = new Validator;
                $validator->check( $data, (object) [ '$ref' => 'file://' . $schemaPath ] );
-               if ( $validator->isValid() ) {
+               if ( $validator->isValid() && !$licenseError ) {
                        $this->output( "$path validates against the version $version schema!\n" );
                } else {
                        foreach ( $validator->getErrors() as $error ) {
                                $this->output( "[{$error['property']}] {$error['message']}\n" );
                        }
+                       if ( $licenseError ) {
+                               $this->output( "$licenseError\n" );
+                       }
                        $this->error( "$path does not validate.", 1 );
                }
        }
index ff39537..2e4a15d 100644 (file)
@@ -165,6 +165,12 @@ return [
                ],
                'scripts' => 'resources/lib/jquery/jquery.appear.js',
        ],
+       'jquery.arrowSteps' => [
+               'deprecated' => true,
+               'scripts' => 'resources/src/jquery/jquery.arrowSteps.js',
+               'styles' => 'resources/src/jquery/jquery.arrowSteps.css',
+               'targets' => [ 'desktop', 'mobile' ],
+       ],
        'jquery.async' => [
                'scripts' => 'resources/lib/jquery/jquery.async.js',
        ],
@@ -1014,7 +1020,6 @@ return [
                        'feedback-cancel',
                        'feedback-close',
                        'feedback-dialog-title',
-                       'feedback-error-title',
                        'feedback-error1',
                        'feedback-error2',
                        'feedback-error3',
@@ -1077,6 +1082,7 @@ return [
                        'resources/src/mediawiki/htmlform/autocomplete.js',
                        'resources/src/mediawiki/htmlform/autoinfuse.js',
                        'resources/src/mediawiki/htmlform/checkmatrix.js',
+                       'resources/src/mediawiki/htmlform/datetime.js',
                        'resources/src/mediawiki/htmlform/cloner.js',
                        'resources/src/mediawiki/htmlform/hide-if.js',
                        'resources/src/mediawiki/htmlform/multiselect.js',
@@ -1263,6 +1269,7 @@ return [
                'messages' => [
                        'upload-dialog-title',
                        'upload-dialog-button-cancel',
+                       'upload-dialog-button-back',
                        'upload-dialog-button-done',
                        'upload-dialog-button-save',
                        'upload-dialog-button-upload',
@@ -1718,6 +1725,9 @@ return [
                        'oojs-ui-core',
                        'oojs-ui-widgets',
                        'oojs-ui.styles.icons-media'
+               ],
+               'messages' => [
+                       'gallery-slideshow-toggle'
                ]
        ],
        'mediawiki.page.ready' => [
@@ -1802,11 +1812,13 @@ return [
                'targets' => [ 'desktop', 'mobile' ],
        ],
        'mediawiki.special.apisandbox.styles' => [
+               'targets' => [ 'desktop', 'mobile' ],
                'styles' => 'resources/src/mediawiki.special/mediawiki.special.apisandbox.top.css',
        ],
        'mediawiki.special.apisandbox' => [
                'styles' => 'resources/src/mediawiki.special/mediawiki.special.apisandbox.css',
                'scripts' => 'resources/src/mediawiki.special/mediawiki.special.apisandbox.js',
+               'targets' => [ 'desktop', 'mobile' ],
                'dependencies' => [
                        'mediawiki.api',
                        'mediawiki.jqueryMsg',
@@ -1852,6 +1864,9 @@ return [
                        'apisandbox-results-fixtoken-fail',
                        'apisandbox-alert-page',
                        'apisandbox-alert-field',
+                       'apisandbox-continue',
+                       'apisandbox-continue-clear',
+                       'apisandbox-continue-help',
                        'blanknamespace',
                ],
        ],
index 594cea2..d72957d 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:02Z
+ * Date: 2016-10-03T18:59:01Z
  */
 ( function ( OO ) {
 
index a4479f7..2f811da 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:06Z
+ * Date: 2016-10-03T18:59:06Z
  */
 .oo-ui-element-hidden {
        display: none !important;
@@ -401,11 +401,15 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
 }
 .oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-labelElement-label {
        color: inherit;
-       display: table;
+       display: inline-table;
        box-sizing: border-box;
        max-width: 100%;
        padding: 0;
        white-space: normal;
+       float: left;
+}
+.oo-ui-fieldsetLayout-group {
+       clear: both;
 }
 .oo-ui-fieldsetLayout > .oo-ui-fieldsetLayout-help {
        float: right;
@@ -421,7 +425,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
 .oo-ui-fieldsetLayout + .oo-ui-formLayout {
        margin-top: 2em;
 }
-.oo-ui-fieldsetLayout > .oo-ui-labelElement-label {
+.oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-labelElement-label {
        font-size: 1.1em;
        margin-bottom: 0.5em;
        padding: 0.25em 0;
index 09e6cfc..9a3d7eb 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:06Z
+ * Date: 2016-10-03T18:59:06Z
  */
 .oo-ui-element-hidden {
        display: none !important;
@@ -524,11 +524,15 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
 }
 .oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-labelElement-label {
        color: inherit;
-       display: table;
+       display: inline-table;
        box-sizing: border-box;
        max-width: 100%;
        padding: 0;
        white-space: normal;
+       float: left;
+}
+.oo-ui-fieldsetLayout-group {
+       clear: both;
 }
 .oo-ui-fieldsetLayout > .oo-ui-fieldsetLayout-help {
        float: right;
@@ -544,7 +548,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
 .oo-ui-fieldsetLayout + .oo-ui-formLayout {
        margin-top: 2em;
 }
-.oo-ui-fieldsetLayout > .oo-ui-labelElement-label {
+.oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-labelElement-label {
        margin-bottom: 0.5em;
        font-size: 1.1em;
        font-weight: bold;
index c982010..109645b 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:02Z
+ * Date: 2016-10-03T18:59:01Z
  */
 ( function ( OO ) {
 
@@ -10121,6 +10121,7 @@ OO.ui.FieldsetLayout = function OoUiFieldsetLayout( config ) {
        }
 
        // Initialization
+       this.$group.addClass( 'oo-ui-fieldsetLayout-group' );
        this.$element
                .addClass( 'oo-ui-fieldsetLayout' )
                .prepend( this.$label, this.$help, this.$icon, this.$group );
index 343508c..616f78e 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:02Z
+ * Date: 2016-10-03T18:59:01Z
  */
 ( function ( OO ) {
 
index 9c9954e..d6ed767 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:06Z
+ * Date: 2016-10-03T18:59:06Z
  */
 .oo-ui-popupTool .oo-ui-popupWidget-popup,
 .oo-ui-popupTool .oo-ui-popupWidget-anchor {
index a413005..411c6bb 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:06Z
+ * Date: 2016-10-03T18:59:06Z
  */
 .oo-ui-tool.oo-ui-widget-enabled {
        -webkit-transition: background-color 100ms;
index ba959cf..822b2d9 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:02Z
+ * Date: 2016-10-03T18:59:01Z
  */
 ( function ( OO ) {
 
index bd8034d..2d2b200 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:06Z
+ * Date: 2016-10-03T18:59:06Z
  */
 .oo-ui-draggableElement-handle,
 .oo-ui-draggableElement-handle.oo-ui-widget {
index 126b591..d1b4225 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:06Z
+ * Date: 2016-10-03T18:59:06Z
  */
 .oo-ui-draggableElement-handle,
 .oo-ui-draggableElement-handle.oo-ui-widget {
index 62195df..636e3f5 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:02Z
+ * Date: 2016-10-03T18:59:01Z
  */
 ( function ( OO ) {
 
index 3cff8f7..1cceac5 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:06Z
+ * Date: 2016-10-03T18:59:06Z
  */
 .oo-ui-actionWidget.oo-ui-pendingElement-pending {
        background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
index 2c115f9..38e40b9 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:06Z
+ * Date: 2016-10-03T18:59:06Z
  */
 .oo-ui-window {
        background: transparent;
index 8ef5ea5..0a29b8b 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.9
+ * OOjs UI v0.17.10
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-09-13T18:30:02Z
+ * Date: 2016-10-03T18:59:01Z
  */
 ( function ( OO ) {
 
diff --git a/resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png b/resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png
new file mode 100644 (file)
index 0000000..84ed2a2
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png differ
diff --git a/resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png b/resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png
new file mode 100644 (file)
index 0000000..c212aeb
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png differ
diff --git a/resources/src/jquery/images/jquery.arrowSteps.head-ltr.png b/resources/src/jquery/images/jquery.arrowSteps.head-ltr.png
new file mode 100644 (file)
index 0000000..e6546bf
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.head-ltr.png differ
diff --git a/resources/src/jquery/images/jquery.arrowSteps.head-rtl.png b/resources/src/jquery/images/jquery.arrowSteps.head-rtl.png
new file mode 100644 (file)
index 0000000..2af30b9
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.head-rtl.png differ
diff --git a/resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png b/resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png
new file mode 100644 (file)
index 0000000..3ad990b
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png differ
diff --git a/resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png b/resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png
new file mode 100644 (file)
index 0000000..1d3048e
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png differ
diff --git a/resources/src/jquery/jquery.arrowSteps.css b/resources/src/jquery/jquery.arrowSteps.css
new file mode 100644 (file)
index 0000000..d24fcc9
--- /dev/null
@@ -0,0 +1,45 @@
+.arrowSteps {
+       list-style-type: none;
+       list-style-image: none;
+       border: 1px solid #666;
+       position: relative;
+}
+
+.arrowSteps li {
+       float: left;
+       padding: 0px;
+       margin: 0px;
+       border: 0 none;
+}
+
+.arrowSteps li div {
+       padding: 0.5em;
+       text-align: center;
+       white-space: nowrap;
+       overflow: hidden;
+}
+
+.arrowSteps li.arrow div {
+       /* @embed */
+       background: url( images/jquery.arrowSteps.divider-ltr.png ) no-repeat right center;
+}
+
+/* applied to the element preceding the highlighted step */
+.arrowSteps li.arrow.tail div {
+       /* @embed */
+       background: url( images/jquery.arrowSteps.tail-ltr.png ) no-repeat right center;
+}
+
+/* this applies to all highlighted, including the last */
+.arrowSteps li.head div {
+       /* @embed */
+       background: url( images/jquery.arrowSteps.head-ltr.png ) no-repeat left center;
+       font-weight: bold;
+}
+
+/* this applies to all highlighted arrows except the last */
+.arrowSteps li.arrow.head div {
+       /* TODO: eliminate duplication of jquery.arrowSteps.head.png embedding */
+       /* @embed */
+       background: url( images/jquery.arrowSteps.head-ltr.png ) no-repeat right center;
+}
diff --git a/resources/src/jquery/jquery.arrowSteps.js b/resources/src/jquery/jquery.arrowSteps.js
new file mode 100644 (file)
index 0000000..b0c36c6
--- /dev/null
@@ -0,0 +1,98 @@
+/*!
+ * jQuery arrowSteps plugin
+ * Copyright Neil Kandalgaonkar, 2010
+ *
+ * This work is licensed under the terms of the GNU General Public License,
+ * version 2 or later.
+ * (see http://www.fsf.org/licensing/licenses/gpl.html).
+ * Derivative works and later versions of the code must be free software
+ * licensed under the same or a compatible license.
+ */
+
+/**
+ * @class jQuery.plugin.arrowSteps
+ */
+( function ( $ ) {
+       /**
+        * Show users their progress through a series of steps, via a row of items that fit
+        * together like arrows. One item can be highlighted at a time.
+        *
+        *     <ul id="robin-hood-daffy">
+        *       <li id="guard"><div>Guard!</div></li>
+        *       <li id="turn"><div>Turn!</div></li>
+        *       <li id="parry"><div>Parry!</div></li>
+        *       <li id="dodge"><div>Dodge!</div></li>
+        *       <li id="spin"><div>Spin!</div></li>
+        *       <li id="ha"><div>Ha!</div></li>
+        *       <li id="thrust"><div>Thrust!</div></li>
+        *     </ul>
+        *
+        *     <script>
+        *       $( '#robin-hood-daffy' ).arrowSteps();
+        *     </script>
+        *
+        * @return {jQuery}
+        * @chainable
+        */
+       $.fn.arrowSteps = function () {
+               var $steps, width, arrowWidth, $stepDiv,
+                       $el = this,
+                       paddingSide = $( 'body' ).hasClass( 'rtl' ) ? 'padding-left' : 'padding-right';
+
+               $el.addClass( 'arrowSteps' );
+               $steps = $el.find( 'li' );
+
+               width = parseInt( 100 / $steps.length, 10 );
+               $steps.css( 'width', width + '%' );
+
+               // Every step except the last one has an arrow pointing forward:
+               // at the right hand side in LTR languages, and at the left hand side in RTL.
+               // Also add in the padding for the calculated arrow width.
+               $stepDiv = $steps.filter( ':not(:last-child)' ).addClass( 'arrow' ).find( 'div' );
+
+               // Execute when complete page is fully loaded, including all frames, objects and images
+               $( window ).on( 'load', function () {
+                       arrowWidth = parseInt( $el.outerHeight(), 10 );
+                       $stepDiv.css( paddingSide, arrowWidth.toString() + 'px' );
+               } );
+
+               $el.data( 'arrowSteps', $steps );
+
+               return this;
+       };
+
+       /**
+        * Highlights the element selected by the selector.
+        *
+        *       $( '#robin-hood-daffy' ).arrowStepsHighlight( '#guard' );
+        *       // 'Guard!' is highlighted.
+        *
+        *       // ... user completes the 'guard' step ...
+        *
+        *       $( '#robin-hood-daffy' ).arrowStepsHighlight( '#turn' );
+        *       // 'Turn!' is highlighted.
+        *
+        * @param {string} selector
+        */
+       $.fn.arrowStepsHighlight = function ( selector ) {
+               var $previous,
+                       $steps = this.data( 'arrowSteps' );
+               $.each( $steps, function ( i, step ) {
+                       var $step = $( step );
+                       if ( $step.is( selector ) ) {
+                               if ( $previous ) {
+                                       $previous.addClass( 'tail' );
+                               }
+                               $step.addClass( 'head' );
+                       } else {
+                               $step.removeClass( 'head tail lasthead' );
+                       }
+                       $previous = $step;
+               } );
+       };
+
+       /**
+        * @class jQuery
+        * @mixins jQuery.plugin.arrowSteps
+        */
+}( jQuery ) );
index ac60e8f..eef3846 100644 (file)
                        };
                        // Default toggle link. Only build it when needed to avoid jQuery memory leaks (event data).
                        buildDefaultToggleLink = function () {
-                               return $( '<a href="#"></a>' )
+                               return $( '<a>' )
+                                       .attr( {
+                                               role: 'button',
+                                               tabindex: 0
+                                       } )
                                        .text( collapseText )
                                        .wrap( '<span class="mw-collapsible-toggle"></span>' )
                                                .parent()
index 4c75e33..a3a82d5 100644 (file)
 
                $link = $( '<a>' )
                .text( showText )
-               .attr( 'href', '#' )
-               .click( function () {
-                       if ( $table.hasClass( 'collapsed' ) ) {
-                               $( this ).text( hideText );
-                       } else {
-                               $( this ).text( showText );
+               .attr( {
+                       role: 'button',
+                       tabindex: 0
+               } )
+               .on( 'click keypress', function ( e ) {
+                       if (
+                               e.type === 'click' ||
+                               e.type === 'keypress' && e.which === 13
+                       ) {
+                               if ( $table.hasClass( 'collapsed' ) ) {
+                                       $( this ).text( hideText );
+                               } else {
+                                       $( this ).text( showText );
+                               }
+                               $table.toggleClass( 'expanded collapsed' );
                        }
-                       $table.toggleClass( 'expanded collapsed' );
-                       return false;
                } );
 
                $col.append( $link );
index ccc68f1..09d7c0b 100644 (file)
@@ -2,82 +2,37 @@
  * Russian (Русский) language functions
  */
 
-// These tests were originally made for names of Wikimedia
-// websites, so they don't currently cover all the possible
-// cases.
-
 mediaWiki.language.convertGrammar = function ( word, form ) {
-       /*global $ */
        'use strict';
 
-       var grammarForms = mediaWiki.language.getData( 'ru', 'grammarForms' );
-       if ( grammarForms && grammarForms[ form ] ) {
-               return grammarForms[ form ][ word ];
+       var forms, transformations, i, rule, sourcePattern, regexp, replacement;
+
+       forms = mediaWiki.language.getData( 'ru', 'grammarForms' );
+       if ( forms && forms[ form ] ) {
+               return forms[ form ][ word ];
+       }
+
+       transformations = mediaWiki.language.getData( 'ru', 'grammarTransformations' );
+
+       if ( !transformations[ form ] ) {
+               return word;
        }
-       switch ( form ) {
-               case 'genitive': // родительный падеж
-                       if ( word.slice( -1 ) === 'ь' ) {
-                               word = word.slice( 0, -1 ) + 'я';
-                       } else if ( word.slice( -2 ) === 'ия' ) {
-                               word = word.slice( 0, -2 ) + 'ии';
-                       } else if ( word.slice( -2 ) === 'ка' ) {
-                               word = word.slice( 0, -2 ) + 'ки';
-                       } else if ( word.slice( -2 ) === 'ти' ) {
-                               word = word.slice( 0, -2 ) + 'тей';
-                       } else if ( word.slice( -2 ) === 'ды' ) {
-                               word = word.slice( 0, -2 ) + 'дов';
-                       } else if ( word.slice( -1 ) === 'д' ) {
-                               word = word.slice( 0, -1 ) + 'да';
-                       } else if ( word.slice( -3 ) === 'ные' ) {
-                               word = word.slice( 0, -3 ) + 'ных';
-                       } else if ( word.slice( -3 ) === 'ник' ) {
-                               word = word.slice( 0, -3 ) + 'ника';
-                       }
-                       break;
-               case 'prepositional': // предложный падеж
-                       if ( word.slice( -1 ) === 'ь' ) {
-                               word = word.slice( 0, -1 ) + 'е';
-                       } else if ( word.slice( -2 ) === 'ия' ) {
-                               word = word.slice( 0, -2 ) + 'ии';
-                       } else if ( word.slice( -2 ) === 'ка' ) {
-                               word = word.slice( 0, -2 ) + 'ке';
-                       } else if ( word.slice( -2 ) === 'ти' ) {
-                               word = word.slice( 0, -2 ) + 'тях';
-                       } else if ( word.slice( -2 ) === 'ды' ) {
-                               word = word.slice( 0, -2 ) + 'дах';
-                       } else if ( word.slice( -1 ) === 'д' ) {
-                               word = word.slice( 0, -1 ) + 'де';
-                       } else if ( word.slice( -3 ) === 'ные' ) {
-                               word = word.slice( 0, -3 ) + 'ных';
-                       } else if ( word.slice( -3 ) === 'ник' ) {
-                               word = word.slice( 0, -3 ) + 'нике';
-                       }
-                       break;
-               case 'languagegen': // язык в родительном падеже ("(с) русского")
-                       if ( word.slice( -3 ) === 'кий' ) {
-                               word = word.slice( 0, -2 ) + 'ого';
-                       } else if ( $.inArray( word, [ 'иврит', 'идиш' ] ) > -1 ) {
-                               word = word + 'а';
-                       }
-                       break;
-               case 'languageprep': // язык в предложном падеже ("(на) русском")
-                       if ( word.slice( -3 ) === 'кий' ) {
-                               word = word.slice( 0, -2 ) + 'ом';
-                       } else if ( $.inArray( word, [ 'иврит', 'идиш' ] ) > -1 ) {
-                               word = word + 'е';
-                       }
-                       break;
-               case 'languageadverb': // наречие с названием языка ("по-русски")
-                       if ( word.slice( -3 ) === 'кий' ) {
-                               word = 'по-' + word.slice( 0, -1 );
-                       } else if ( $.inArray( word, [ 'иврит', 'идиш' ] ) > -1 ) {
-                               word = 'на ' + word + 'е';
-                       } else if ( $.inArray( word, [ 'идо', 'урду', 'хинди', 'эсперанто' ] ) > -1 ) {
-                               word = 'на ' + word;
-                       } else {
-                               word = 'на языке ' + word;
-                       }
-                       break;
+
+       for ( i = 0; i < transformations[ form ].length; i++ ) {
+               rule = transformations[ form ][ i ];
+               sourcePattern = rule[ 0 ];
+
+               if ( sourcePattern === '@metadata' ) {
+                       continue;
+               }
+
+               regexp = new RegExp( sourcePattern );
+               replacement = rule[ 1 ];
+
+               if ( word.match( regexp ) ) {
+                       return word.replace( regexp, replacement );
+               }
        }
+
        return word;
 };
index d387a2d..ec94df3 100644 (file)
  * Hide all the elements irrelevant for printing
  */
 .noprint,
-div#jump-to-nav,
+#jump-to-nav,
 .mw-jump,
-div.top,
-div#column-one,
+#column-one,
 .mw-editsection,
 .mw-editsection-like,
 #footer-places,
@@ -21,12 +20,12 @@ div#column-one,
 .usermessage,
 .patrollink,
 .ns-0 .mw-redirectedfrom,
-div.magnify,
+.magnify,
 #mw-navigation,
 #siteNotice,
 /* Deprecated, changed in core */
-div#f-poweredbyico,
-div#f-copyrightico,
+#f-poweredbyico,
+#f-copyrightico,
 li#about,
 li#disclaimer,
 li#mobileview,
@@ -228,7 +227,7 @@ div.floatleft p {
        font-style: italic;
 }
 
-div.center {
+.center {
        text-align: center;
 }
 
@@ -246,7 +245,7 @@ div.thumb {
 div.thumbinner {
        background-color: #fff;
        border: 1pt solid #ccc;
-       padding: 3px !important;
+       padding: 3px;
        font-size: 94%;
        text-align: center;
        /* new block formatting context,
@@ -262,7 +261,7 @@ html .thumbcaption {
        border: none;
        text-align: left;
        line-height: 1.4em;
-       padding: 3px !important;
+       padding: 3px;
        font-size: 94%;
 }
 
@@ -325,10 +324,6 @@ table.listing td {
        border-collapse: collapse;
 }
 
-a.sortheader {
-       margin: 0 0.3em;
-}
-
 /**
  * Categories
  */
diff --git a/resources/src/mediawiki.legacy/images/help-question-hover.gif b/resources/src/mediawiki.legacy/images/help-question-hover.gif
deleted file mode 100644 (file)
index 515138d..0000000
Binary files a/resources/src/mediawiki.legacy/images/help-question-hover.gif and /dev/null differ
diff --git a/resources/src/mediawiki.legacy/images/help-question.gif b/resources/src/mediawiki.legacy/images/help-question.gif
deleted file mode 100644 (file)
index b4fc9c5..0000000
Binary files a/resources/src/mediawiki.legacy/images/help-question.gif and /dev/null differ
index de442e9..1522de1 100644 (file)
@@ -105,6 +105,25 @@ span.comment {
        clear: both;
 }
 
+/* Edit font preference */
+/* TODO: for 'default' on non-textareas we could compute the default font of textarea in the client */
+.mw-editfont-default:not( textarea ) {
+       font-family: monospace;
+}
+
+/* Keep this rule separate from the :not rule above so it still works in older browsers */
+.mw-editfont-monospace {
+       font-family: monospace;
+}
+
+.mw-editfont-sans-serif {
+       font-family: sans-serif;
+}
+
+.mw-editfont-serif {
+       font-family: serif;
+}
+
 /**
  * rev_deleted stuff
  */
@@ -162,6 +181,7 @@ input#wpSummary {
 
 .mw-input-with-label {
        white-space: nowrap;
+       display: inline-block;
 }
 
 /**
@@ -656,33 +676,6 @@ ol:lang(or) li {
        direction: ltr;
 }
 
-/* tooltip styles */
-.mw-help-field-hint {
-       display: none;
-       margin-left: 2px;
-       margin-bottom: -8px;
-       padding: 0 0 0 15px;
-       background-image: url( images/help-question.gif );
-       background-position: left center;
-       background-repeat: no-repeat;
-       cursor: pointer;
-       font-size: .8em;
-       text-decoration: underline;
-       color: #0645ad;
-}
-
-.mw-help-field-hint:hover {
-       background-image: url( images/help-question-hover.gif );
-}
-
-.mw-help-field-data {
-       display: block;
-       background-color: #d6f3ff;
-       padding: 5px 8px 4px 8px;
-       border: 1px solid #5dc9f4;
-       margin-left: 20px;
-}
-
 #mw-clearyourcache,
 #mw-sitecsspreview,
 #mw-sitejspreview,
index f29897c..1bfa3a3 100644 (file)
@@ -23,7 +23,7 @@
                height: auto;
                margin: 0 0.1em 0 0;
                padding: 0;
-               border: 1px solid @colorFieldBorder;
+               border: 1px solid @colorGray7;
                cursor: pointer;
        }
 }
 // ----------------------------------------------------------------------------
 
 .button-colors( @bgColor, @highlightColor, @activeColor ) {
-       background: @bgColor;
+       background-color: @bgColor;
+       color: @colorButtonText;
+       border: 1px solid @colorFieldBorder;
+
+       // Make sure that `color` isn't inheriting from user-agent styles
+       &:visited {
+               color: @colorButtonText;
+       }
 
        &:hover {
                background-color: @highlightColor;
+               color: @colorGray4;
+               border-color: @colorGray10;
        }
 
        &:focus {
-               border-color: @colorWhite;
-               box-shadow: inset 0 0 0 1px @bgColor, inset 0 0 0 2px @colorWhite;
-               outline-width: 0;
-
-               // Remove the inner border and padding in Firefox.
-               &::-moz-focus-inner {
-                       border-color: transparent;
-                       padding: 0;
-               }
+               background-color: @highlightColor;
+               // Make sure that `color` isn't inheriting from user-agent styles
+               color: @colorButtonText;
+               border-color: @colorProgressive;
+               box-shadow: inset 0 0 0 1px @colorProgressive, inset 0 0 0 2px #fff;
        }
 
        &:active,
        &.is-on,
        &.mw-ui-checked {
                background-color: @activeColor;
+               color: @colorGray1;
+               border-color: @colorGray7;
                box-shadow: none;
        }
-}
-
-.button-colors( @bgColor, @highlightColor, @activeColor ) when ( lightness( @bgColor ) >= 70% ) {
-       color: @colorButtonText;
-       border: 1px solid @colorGray12;
-
-       &:hover,
-       &:active,
-       &:visited {
-               // make sure that is isn't inheriting from a general rule
-               color: @colorButtonText;
-       }
-
-       &:focus {
-               background-color: @highlightColor;
-       }
 
        &:disabled {
-               color: @colorDisabledText;
+               background-color: @colorGray12;
+               color: #fff;
+               border-color: @colorGray12;
 
-               // make sure disabled buttons don't have hover and active states
+               // Make sure disabled buttons don't have hover and active states
                &:hover,
                &:active {
-                       background: @bgColor;
+                       background-color: @colorGray12;
+                       color: #fff;
                        box-shadow: none;
+                       border-color: @colorGray12;
                }
        }
 }
 
-.button-colors( @bgColor, @highlightColor, @activeColor ) when ( lightness( @bgColor ) < 70% ) {
+.button-colors-primary( @bgColor, @highlightColor, @activeColor ) {
+       background-color: @bgColor;
        color: #fff;
        // border of the same color as background so that light background and
        // dark background buttons are the same height and width
        border: 1px solid @bgColor;
-       text-shadow: 0 1px rgba(0, 0, 0, .1);
+       text-shadow: 0 1px rgba( 0, 0, 0, 0.1 );
+
+       &:hover {
+               background-color: @highlightColor;
+               border-color: @highlightColor;
+       }
+
+       &:focus {
+               box-shadow: inset 0 0 0 1px @bgColor, inset 0 0 0 2px #fff;
+       }
+
+       &:active,
+       &.is-on,
+       &.mw-ui-checked {
+               background-color: @activeColor;
+               border-color: @activeColor;
+               box-shadow: none;
+       }
 
        &:disabled {
-               background-color: @colorGray13;
-               border-color: @colorGray13;
+               background-color: @colorGray12;
+               color: #fff;
+               border-color: @colorGray12;
 
-               // make sure disabled buttons don't have hover and active states
+               // Make sure disabled buttons don't have hover and active states
                &:hover,
                &:active,
                &.mw-ui-checked {
+                       background-color: @colorGray12;
+                       color: #fff;
+                       border-color: @colorGray12;
                        box-shadow: none;
                }
        }
 
 .button-colors-quiet( @textColor, @highlightColor, @activeColor ) {
        // Quiet buttons all start gray, and reveal
-       // constructive/progressive/destructive color on hover and active.
+       // progressive/destructive color on hover and active.
        color: @colorButtonText;
 
-       &:hover,
-       &:focus {
+       &:hover {
                background-color: transparent;
-               color: @textColor;
+               color: @highlightColor;
        }
 
        &:active,
                color: @activeColor;
        }
 
+       &:focus {
+               background-color: transparent;
+               color: @textColor;
+       }
+
        &:disabled {
                color: @colorDisabledText;
        }
index 507109a..28ad10a 100644 (file)
@@ -2,41 +2,37 @@
 
 // Although this defines many shades, be parsimonious in your own use of grays. Prefer
 // colors already in use in MediaWiki. Prefer semantic color names such as "@colorText".
-@colorGray1: #111; // darkest
+@colorGray1: #000; // darkest
 @colorGray2: #222;
 @colorGray3: #333;
 @colorGray4: #444;
-@colorGray5: #555;
+@colorGray5: #54595d;
 @colorGray6: #666;
-@colorGray7: #777;
+@colorGray7: #72777d;
 @colorGray8: #888;
 @colorGray9: #999;
-@colorGray10: #aaa;
+@colorGray10: #a2a9b1;
 @colorGray11: #bbb;
-@colorGray12: #ccc;
+@colorGray12: #c8ccd1;
 @colorGray13: #ddd;
-@colorGray14: #eee;
-@colorGray15: #f9f9f9; // lightest
+@colorGray14: #eaecf0;
+@colorGray15: #f8f9fa; // lightest
 
 // Semantic background colors
 // Blue; for contextual use of a continuing action
-@colorProgressive: #347bff;
-@colorProgressiveHighlight: #2962cc;
-@colorProgressiveActive: #2962cc;
-// Green; for contextual use of a positive finalizing action
-@colorConstructive: #00af89;
-@colorConstructiveHighlight: #008c6d;
-@colorConstructiveActive: #008c6d;
+@colorProgressive: #36c;
+@colorProgressiveHighlight: #447ff5;
+@colorProgressiveActive: #2a4b8d;
 // Orange; for contextual use of returning to a past action
 @colorRegressive: #ff5d00;
 // Red; for contextual use of a negative action of high severity
-@colorDestructive: #d11d13;
-@colorDestructiveHighlight: #a7170f;
-@colorDestructiveActive: #a7170f;
+@colorDestructive: #c33;
+@colorDestructiveHighlight: #e53939;
+@colorDestructiveActive: #873636;
 // Orange; for contextual use of a potentially negative action of medium severity
 @colorMediumSevere: #ff5d00;
 // Yellow; for contextual use of a potentially negative action of low severity
-@colorLowSevere: #ffb50d;
+@colorLowSevere: #fc3;
 
 // Used in mixins to darken contextual colors by the same amount (eg. focus)
 @colorDarkenPercentage: 13.5%;
 // Text colors
 @colorText: @colorGray2;
 @colorTextLight: @colorGray6;
-@colorButtonText: @colorGray5;
-@colorButtonTextHighlight: @colorGray7;
-@colorButtonTextActive: @colorGray7;
+@colorButtonText: @colorGray2;
+@colorButtonTextHighlight: @colorGray4;
+@colorButtonTextActive: @colorGray1;
 @colorDisabledText: @colorGray12;
 @colorErrorText: #c00;
+@colorWarningText: #705000;
 
 // UI colors
-@colorFieldBorder: @colorGray12;
+@colorFieldBorder: #9aa0a7;
 @colorShadow: @colorGray14;
 @colorPlaceholder: @colorGray10;
 @colorNeutral: @colorGray7;
 
-// The following rules are deprecated
-@colorWhite: #fff;
-@colorOffWhite: #fafafa;
-@colorGrayDark: #898989;
-@colorGrayLight: #ccc;
-@colorGrayLighter: #ddd;
-@colorGrayLightest: #eee;
-
 // Global border radius to be used to buttons and inputs
 @borderRadius: 2px;
 
 // Form input sizes
 @checkboxSize: 2em;
 @radioSize: 2em;
+
+// The following rules are deprecated
+@colorWhite: #fff;
+@colorOffWhite: #fafafa;
+@colorGrayDark: #898989;
+@colorGrayLight: #ccc;
+@colorGrayLighter: #ddd;
+@colorGrayLightest: #eee;
+// Green; for contextual use of a positive finalizing action
+@colorConstructive: #00af89;
+@colorConstructiveHighlight: #1c6665;
+@colorConstructiveActive: #134645;
+
index d9cdf5a..022fa28 100644 (file)
@@ -99,8 +99,8 @@ table.toc td {
 .tocnumber {
        padding-left: 0;
        padding-right: 0.5em;
+       color: #222;
 }
-
 /* @noflip */
 .mw-content-ltr .tocnumber {
        padding-left: 0;
index 7b0b071..9c52b2a 100644 (file)
@@ -13,6 +13,10 @@ a {
        background: none;
 }
 
+a:not( [href] ) {
+       cursor: pointer; /* Always cursor:pointer even without href */
+}
+
 a:visited {
        color: #0b0080;
 }
index 2517605..99f6c13 100644 (file)
        z-index: 100;
 }
 
+.mw-apisandbox-fullscreen .mw-apisandbox-container {
+       border-width: 1px 0 0 0;
+       border-radius: 0;
+}
+
 .mw-apisandbox-spacer {
        display: inline-block;
        height: 1px;
index 5c3715d..98ed3ee 100644 (file)
@@ -10,7 +10,8 @@
                suppressErrors = true,
                updatingBooklet = false,
                pages = {},
-               moduleInfoCache = {};
+               moduleInfoCache = {},
+               baseRequestParams;
 
        WidgetMethods = {
                textInputWidget: {
                init: function () {
                        var $toolbar;
 
+                       ApiSandbox.isFullscreen = false;
+
                        $content = $( '#mw-apisandbox' );
 
                        windowManager = new OO.ui.WindowManager();
                                        fullscreenButton.$element,
                                        new OO.ui.ButtonWidget( {
                                                label: mw.message( 'apisandbox-submit' ).text(),
-                                               flags: [ 'primary', 'constructive' ]
+                                               flags: [ 'primary', 'progressive' ]
                                        } ).on( 'click', ApiSandbox.sendRequest ).$element,
                                        new OO.ui.ButtonWidget( {
                                                label: mw.message( 'apisandbox-reset' ).text(),
                 * Toggle "fullscreen" mode
                 */
                toggleFullscreen: function () {
-                       var $body = $( document.body );
+                       var $body = $( document.body ),
+                               $ui = $( '#mw-apisandbox-ui' );
+
+                       ApiSandbox.isFullscreen = !ApiSandbox.isFullscreen;
 
-                       $body.toggleClass( 'mw-apisandbox-fullscreen' );
-                       if ( $body.hasClass( 'mw-apisandbox-fullscreen' ) ) {
+                       $body.toggleClass( 'mw-apisandbox-fullscreen', ApiSandbox.isFullscreen );
+                       $ui.toggleClass( 'mw-body-content', ApiSandbox.isFullscreen );
+                       if ( ApiSandbox.isFullscreen ) {
                                fullscreenButton.setLabel( mw.message( 'apisandbox-unfullscreen' ).text() );
                                fullscreenButton.setTitle( mw.message( 'apisandbox-unfullscreen-tooltip' ).text() );
-                               $body.append( $( '#mw-apisandbox-ui' ) );
+                               $body.append( $ui );
                        } else {
                                fullscreenButton.setLabel( mw.message( 'apisandbox-fullscreen' ).text() );
                                fullscreenButton.setTitle( mw.message( 'apisandbox-fullscreen-tooltip' ).text() );
-                               $content.append( $( '#mw-apisandbox-ui' ) );
+                               $content.append( $ui );
                        }
                        ApiSandbox.resizePanel();
                },
                        var height = $( window ).height(),
                                contentTop = $content.offset().top;
 
-                       if ( $( document.body ).hasClass( 'mw-apisandbox-fullscreen' ) ) {
+                       if ( ApiSandbox.isFullscreen ) {
                                height -= panel.$element.offset().top - $( '#mw-apisandbox-ui' ).offset().top;
                                panel.$element.height( height - 1 );
                        } else {
 
                /**
                 * Submit button handler
+                *
+                * @param {Object} [params] Use this set of params instead of those in the form fields.
+                *   The form fields will be updated to match.
                 */
-               sendRequest: function () {
+               sendRequest: function ( params ) {
                        var page, subpages, i, query, $result, $focus,
                                progress, $progressText, progressLoading,
                                deferreds = [],
-                               params = {},
+                               paramsAreForced = !!params,
                                displayParams = {},
                                checkPages = [ pages.main ];
 
 
                        suppressErrors = false;
 
+                       // save widget state in params (or load from it if we are forced)
+                       if ( paramsAreForced ) {
+                               ApiSandbox.updateUI( params );
+                       }
+                       params = {};
                        while ( checkPages.length ) {
                                page = checkPages.shift();
                                deferreds.push( page.apiCheckValid() );
                                }
                        }
 
+                       if ( !paramsAreForced ) {
+                               // forced params means we are continuing a query; the base query should be preserved
+                               baseRequestParams = $.extend( {}, params );
+                       }
+
                        $.when.apply( $, deferreds ).done( function () {
                                if ( $.inArray( false, arguments ) !== -1 ) {
                                        windowManager.openWindow( 'errorAlert', {
                                                        );
                                        } )
                                        .done( function ( data, jqXHR ) {
-                                               var m, loadTime, button,
+                                               var m, loadTime, button, clear,
                                                        ct = jqXHR.getResponseHeader( 'Content-Type' );
 
                                                $result.empty();
                                                                .text( data )
                                                                .appendTo( $result );
                                                }
+                                               if ( paramsAreForced || data[ 'continue' ] ) {
+                                                       $result.append(
+                                                               $( '<div>' ).append(
+                                                                       new OO.ui.ButtonWidget( {
+                                                                               label: mw.message( 'apisandbox-continue' ).text()
+                                                                       } ).on( 'click', function () {
+                                                                               ApiSandbox.sendRequest( $.extend( {}, baseRequestParams, data[ 'continue' ] ) );
+                                                                       } ).setDisabled( !data[ 'continue' ] ).$element,
+                                                                       ( clear = new OO.ui.ButtonWidget( {
+                                                                               label: mw.message( 'apisandbox-continue-clear' ).text()
+                                                                       } ).on( 'click', function () {
+                                                                               ApiSandbox.updateUI( baseRequestParams );
+                                                                               clear.setDisabled( true );
+                                                                               booklet.setPage( '|results|' );
+                                                                       } ).setDisabled( !paramsAreForced ) ).$element,
+                                                                       new OO.ui.PopupButtonWidget( {
+                                                                               framed: false,
+                                                                               icon: 'info',
+                                                                               popup: {
+                                                                                       $content: $( '<div>' ).append( mw.message( 'apisandbox-continue-help' ).parse() ),
+                                                                                       padded: true
+                                                                               }
+                                                                       } ).$element
+                                                               )
+                                                       );
+                                               }
                                                if ( typeof loadTime === 'number' ) {
                                                        $result.append(
                                                                $( '<div>' ).append(
                                                // Don't grey out the label when the field is disabled,
                                                // it makes it too hard to read and our "disabled"
                                                // isn't really disabled.
+                                               widgetField.onFieldDisable( false );
                                                widgetField.onFieldDisable = doNothing;
 
                                                if ( Util.apiBool( pi.parameters[ i ].deprecated ) ) {
                                                        dynamicParamNameWidget,
                                                        new OO.ui.ButtonWidget( {
                                                                icon: 'add',
-                                                               flags: 'constructive'
+                                                               flags: 'progressive'
                                                        } ).on( 'click', addDynamicParamWidget ),
                                                        {
                                                                label: mw.message( 'apisandbox-dynamic-parameters-add-label' ).text(),
index a523d5b..5191f92 100644 (file)
@@ -31,7 +31,7 @@
 }
 .searchresult {
        font-size: 95%;
-       width: 38em;
+       max-width: 38em;
 }
 .mw-search-results {
        margin-left: 0;
index 753f774..cf77a96 100644 (file)
 
 /* Login Button, following `ButtonWidget (progressive)‎` from OOjs UI */
 #mw-createaccount-join {
-       color: #347bff;
+       background-color: #f8f9fa;
+       color: #36c;
 }
 #mw-createaccount-join:hover {
-       background-color: #ebf2ff; /* rgba( 52, 123, 255, 0.1 ); */
+       background-color: #fff;
        border-color: #859ecc;
        box-shadow: none;
 }
 #mw-createaccount-join:active {
-       background-color: #ebf2ff;
-       color: #1f4999;
-       border-color: #1f4999;
+       background-color: #eff3fa;
+       color: #2a4b8d;
+       border-color: #2a4b8d;
 }
 #mw-createaccount-join:focus {
-       background-color: #fff;
-       color: #1f4999;
-       border-color: #1f4999;
-       box-shadow: inset 0 0 0 1px #1f4999;
-}
-#mw-createaccount-join:active:focus {
-       background-color: #ebf2ff;
+       border-color: #36c;
+       box-shadow: inset 0 0 0 1px #36c;
 }
index 5bb69b8..4c4e129 100644 (file)
@@ -6,15 +6,14 @@
 .mixin-mw-ui-anchor-styles( @mainColor ) {
        color: @mainColor;
 
-       // Hover state
        &:hover {
                color: lighten( @mainColor, @colorLightenPercentage );
        }
-       // Focus and active states
+
        &:focus,
        &:active {
                color: darken( @mainColor, @colorDarkenPercentage );
-               outline: none; // outline fix
+               outline: 0;
        }
 
        // Quiet mode is gray at first
 /*
 Anchors
 
-The anchor base type can be applied to A elements when a basic context styling needs to be given to a link, without
-having to assign it as a button type. mw-ui-anchor only changes the text color, and should not be used in combination
-with other base classes, such as mw-ui-button.
+The anchor base type can be applied to `a` elements when a basic context styling needs to be given to a link, without
+having to assign it as a button type. `.mw-ui-anchor` only changes the text color, and should not be used in combination
+with other base classes, such as `.mw-ui-button`.
+
 
 Markup:
 <a href="#" class="mw-ui-anchor mw-ui-progressive">Progressive</a>
-<a href="#" class="mw-ui-anchor mw-ui-constructive">Constructive</a>
 <a href="#" class="mw-ui-anchor mw-ui-destructive">Destructive</a>
 
 .mw-ui-quiet - Quiet until interaction.
@@ -46,13 +45,14 @@ Styleguide 6.2.
                .mixin-mw-ui-anchor-styles( @colorProgressive );
        }
 
-       &.mw-ui-constructive {
-               .mixin-mw-ui-anchor-styles( @colorConstructive );
-       }
-
        &.mw-ui-destructive {
                .mixin-mw-ui-anchor-styles( @colorDestructive );
        }
+
+       //`.mw-ui-constructive` is deprecated; consolidated with `progressive`, see T110555
+       &.mw-ui-constructive {
+               .mixin-mw-ui-anchor-styles( @colorConstructive );
+       }
 }
 
 /*
index 5931efb..85795f4 100644 (file)
@@ -14,7 +14,7 @@
 
 // Neutral button styling
 //
-// These are the main actions on the page/workflow. The page should have only one of progressive, constructive and desctructive buttons, the rest being quiet.
+// These are the main actions on the page/workflow. The page should have only one of progressive and destructive buttons, the rest being quiet.
 //
 // Markup:
 // <div>
        vertical-align: middle;
 
        // Content styling
-       .button-colors( #fff, @colorGray12, @colorGray7 );
+       .button-colors( @colorGray15, #fff, #d9d9d9 );
        text-align: center;
        font-weight: bold;
 
        // Interaction styling
        cursor: pointer;
 
+       &:focus {
+               outline-width: 0;
+
+               // Remove the inner border and padding in Firefox.
+               &::-moz-focus-inner {
+                       border-color: transparent;
+                       padding: 0;
+               }
+       }
+
+       // `:not()` is used exclusively for `transition`s as both are not supported by IE < 9
+       &:not( :disabled ) {
+               .transition( ~'background-color 100ms, color 100ms, border-color 100ms, box-shadow 100ms' );
+       }
+
        &:disabled {
                text-shadow: none;
                cursor: default;
@@ -78,9 +93,6 @@
        //   <button class="mw-ui-button mw-ui-progressive mw-ui-big">.mw-ui-progressive</button>
        // </div>
        // <div>
-       //   <button class="mw-ui-button mw-ui-constructive mw-ui-big">.mw-ui-constructive</button>
-       // </div>
-       // <div>
        //   <button class="mw-ui-button mw-ui-destructive mw-ui-big">.mw-ui-destructive</button>
        // </div>
        //
        //   <button class="mw-ui-button mw-ui-progressive mw-ui-block">.mw-ui-progressive</button>
        // </div>
        // <div>
-       //   <button class="mw-ui-button mw-ui-constructive mw-ui-block">.mw-ui-constructive</button>
-       // </div>
-       // <div>
        //   <button class="mw-ui-button mw-ui-destructive mw-ui-block">.mw-ui-destructive</button>
        // </div>
        //
        // Progressive buttons
        //
        // Use progressive buttons for actions which lead to a next step in the process.
-       // .mw-ui-primary is deprecated, kept for compatibility.
+       // .mw-ui-constructive is deprecated; consolidated with `progressive`, see T110555
        //
        // Markup:
        // <div>
        //
        // Styleguide 2.1.1.
        &.mw-ui-progressive,
-       &.mw-ui-primary {
-               .button-colors( @colorProgressive, @colorProgressiveHighlight, @colorProgressiveActive );
-
-               &.mw-ui-quiet {
-                       .button-colors-quiet( @colorProgressive, @colorProgressiveHighlight, @colorProgressiveActive );
-               }
-       }
-
-       // Constructive buttons (deprecated, consolidated with `progressive` – see T110555)
-       //
-       // Use constructive buttons for actions which result in a final action in the process that results
-       // in a change of state.
-       // e.g. save changes button
-       //
-       // Markup:
-       // <div>
-       //   <button class="mw-ui-button mw-ui-constructive">.mw-ui-constructive</button>
-       // </div>
-       // <div>
-       //   <button class="mw-ui-button mw-ui-constructive" disabled>.mw-ui-constructive</button>
-       // </div>
-       //
-       // Styleguide 2.1.2.
        &.mw-ui-constructive {
-               .button-colors( @colorProgressive, @colorProgressiveHighlight, @colorProgressiveActive );
+               .button-colors-primary( @colorProgressive, @colorProgressiveHighlight, @colorProgressiveActive );
 
                &.mw-ui-quiet {
                        .button-colors-quiet( @colorProgressive, @colorProgressiveHighlight, @colorProgressiveActive );
        //   <button class="mw-ui-button mw-ui-destructive" disabled>.mw-ui-destructive</button>
        // </div>
        //
-       // Styleguide 2.1.3.
+       // Styleguide 2.1.2.
        &.mw-ui-destructive {
-               .button-colors( @colorDestructive, @colorDestructiveHighlight, @colorDestructiveActive );
+               .button-colors-primary( @colorDestructive, @colorDestructiveHighlight, @colorDestructiveActive );
 
                &.mw-ui-quiet {
                        .button-colors-quiet( @colorDestructive, @colorDestructiveHighlight, @colorDestructiveActive );
 
        // Quiet buttons
        //
-       // Use quiet buttons when they are less important and alongside other constructive, progressive or destructive buttons. It should be used for an action that exits the user from the current view/workflow.
+       // Use quiet buttons when they are less important and alongside other progressive or destructive buttons. It should be used for an action that exits the user from the current view/workflow.
        // Its use is  not recommended on mobile/tablet due to lack of hover state.
        //
        // Markup:
        //   <button class="mw-ui-button mw-ui-quiet">.mw-ui-button</button>
        // </div>
        // <div>
-       //   <button class="mw-ui-button mw-ui-constructive mw-ui-quiet">.mw-ui-constructive</button>
-       // </div>
-       // <div>
-       //   <button class="mw-ui-button mw-ui-constructive mw-ui-quiet" disabled>.mw-ui-constructive</button>
-       // </div>
-       // <div>
        //   <button class="mw-ui-button mw-ui-destructive mw-ui-quiet">.mw-ui-destructive</button>
        // </div>
        // <div>
        //   <button class="mw-ui-button mw-ui-progressive mw-ui-quiet" disabled>.mw-ui-progressive</button>
        // </div>
        //
-       // Styleguide 2.1.4.
+       // Styleguide 2.1.3.
        &.mw-ui-quiet {
                background: transparent;
                border: 0;
index cc96a5c..2327efc 100644 (file)
@@ -30,7 +30,7 @@
 //     <input class="mw-ui-input" value="input">
 //   </div>
 //   <div class="mw-ui-vform-field">
-//     <button class="mw-ui-button mw-ui-constructive">Button in vform</button>
+//     <button class="mw-ui-button mw-ui-progressive">Button in vform</button>
 //   </div>
 // </form>
 //
        //
        // Styleguide 5.2.
        .error,
+       .warning,
        .errorbox,
        .warningbox,
        .successbox {
                color: @colorErrorText;
                border: 1px solid #fac5c5;
                background-color: #fae3e3;
-               text-shadow: 0 1px #fae3e3;
+       }
+
+       // Colours taken from those for .warningbox in shared.css
+       .warning {
+               color: @colorWarningText;
+               border: 1px solid #fde29b;
+               background-color: #fdf1d1;
        }
 
        // This specifies styling for individual field validation error messages.
index 76fee23..8bddb3a 100644 (file)
@@ -4,11 +4,6 @@
 @import "mediawiki.ui/variables";
 @import "mediawiki.ui/mixins";
 
-// Placeholder text styling helper
-.field-placeholder-styling() {
-       font-style: italic;
-       font-weight: normal;
-}
 // Text inputs
 //
 // Apply the mw-ui-input class to input and textarea fields.
 //
 // Styleguide 1.1.
 .mw-ui-input {
+       background-color: #fff;
        .box-sizing( border-box );
        display: block;
        width: 100%;
        border: 1px solid @colorFieldBorder;
        border-radius: @borderRadius;
        padding: 0.3em 0.3em 0.3em 0.6em;
+       // necessary for smooth transition
+       box-shadow: inset 0 0 0 0.1em #fff;
        font-family: inherit;
        font-size: inherit;
        line-height: inherit;
        vertical-align: middle;
 
-       // Placeholder text styling must be set individually for each browser @winter
-       &::-webkit-input-placeholder { // webkit
-               .field-placeholder-styling;
+       // Normalize & style placeholder text, see T139034
+       // Placeholder styles can't be grouped, otherwise they're ignored as invalid.
+
+       // Placeholder mixin
+       .mixin-placeholder() {
+               color: @colorGray7;
+               font-style: italic;
+       }
+       // Firefox 4-18
+       &:-moz-placeholder { // stylelint-disable-line selector-no-vendor-prefix
+               .mixin-placeholder;
+               opacity: 1;
+       }
+       // Firefox 19-
+       &::-moz-placeholder { // stylelint-disable-line selector-no-vendor-prefix
+               .mixin-placeholder;
+               opacity: 1;
        }
-       &::-moz-placeholder { // FF 4-18
-               .field-placeholder-styling;
+       // Internet Explorer 10-11
+       &:-ms-input-placeholder { // stylelint-disable-line selector-no-vendor-prefix
+               .mixin-placeholder;
        }
-       &:-moz-placeholder { // FF >= 19
-               .field-placeholder-styling;
+       // WebKit, Blink, Edge
+       // Don't set `opacity < 1`, see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3901363/
+       &::-webkit-input-placeholder { // stylelint-disable-line selector-no-vendor-prefix
+               .mixin-placeholder;
        }
-       &:-ms-input-placeholder { // IE >= 10
-               .field-placeholder-styling;
+       // W3C Standard Selectors Level 4
+       &:placeholder-shown {
+               .mixin-placeholder;
        }
 
-       // Remove red outline from inputs which have required field and invalid content.
-       // This is a Firefox only issue
+       // Firefox: Remove red outline when `required` attribute set and invalid content.
        // See https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid
-       // This should be above :focus so focus behaviour takes preference
+       // This should come before `:focus` so latter rules take preference.
        &:invalid {
                box-shadow: none;
        }
 
+       &:hover {
+               border-color: @colorGray7;
+       }
+
        &:focus {
                border-color: @colorProgressive;
                box-shadow: inset 0 0 0 1px @colorProgressive;
                outline: 0;
        }
 
+       // `:not()` is used exclusively for `transition`s as both are not supported by IE < 9.
+       &:not( :disabled ) {
+               .transition( ~'color 100ms, border-color 100ms, box-shadow 100ms' );
+       }
+
        &:disabled {
                border-color: @colorGray14;
                color: @colorGray12;
                // Correct the odd appearance in Chrome and Safari 5
                -webkit-appearance: textfield;
 
-               // Remove proprietary clear button in IE 10-11
+               // Remove proprietary clear button in IE 10-11, Edge 12+
                &::-ms-clear {
                        display: none;
                }
@@ -99,7 +123,7 @@ textarea.mw-ui-input {
 //
 // Markup:
 // <input class="mw-ui-input mw-ui-input-inline">
-// <button class="mw-ui-button mw-ui-constructive">Submit</button>
+// <button class="mw-ui-button mw-ui-progressive">Submit</button>
 //
 // Styleguide 1.2.
 input[type="number"],
index cc27e9e..5551745 100644 (file)
@@ -16,10 +16,10 @@ Text
 Context classes may be used on elements with only plain-text content with the mw-ui-text base. When the context classes
 are used on interactive and block-level elements, the appropriate alternative base type classes should also be used. For
 example, mw-ui-anchor with A, or mw-ui-button with buttons.
+'Constructive' is deprecated and merged with 'Progressive'.
 
 Markup:
 <span class="mw-ui-text mw-ui-progressive">Progressive</span>
-<span class="mw-ui-text mw-ui-constructive">Constructive</span>
 <span class="mw-ui-text mw-ui-destructive">Destructive</span>
 
 Styleguide 6.1.
@@ -28,11 +28,9 @@ Styleguide 6.1.
 .mw-ui-text {
        // The selector order is like this on purpose; IE 6 ignores the second selector,
        // so we don't want to accidentally apply this color on all mw-ui-CONTEXT classes
-       .mw-ui-progressive& {
-               color: @colorProgressive;
-       }
+       .mw-ui-progressive&,
        .mw-ui-constructive& {
-               color: @colorConstructive;
+               color: @colorProgressive;
        }
        .mw-ui-destructive& {
                color: @colorDestructive;
index 01d3442..a3088ec 100644 (file)
                        calendar: {}
                }, config );
 
+               // See InputWidget#reusePreInfuseDOM about config.$input
+               if ( config.$input ) {
+                       config.$input.addClass( 'oo-ui-element-hidden' );
+               }
+
                if ( $.isPlainObject( config.formatter ) && config.formatter.format === undefined ) {
                        config.formatter.format = '@' + config.type;
                }
index 9d30eb8..4d90496 100644 (file)
 
 .mw-widget-calendarWidget:focus {
        outline: none;
-       box-shadow: inset 0 0 0 2px #347bff;
+       box-shadow: inset 0 0 0 2px #36c;
 }
 
 .mw-widget-calendarWidget-day {
index ffb7736..267eebb 100644 (file)
         * Category selector widget. Displays an OO.ui.CapsuleMultiselectWidget
         * and autocompletes with available categories.
         *
-        *     var selector = new mw.widgets.CategorySelector( {
-        *       searchTypes: [
-        *         mw.widgets.CategorySelector.SearchType.OpenSearch,
-        *         mw.widgets.CategorySelector.SearchType.InternalSearch
-        *       ]
-        *     } );
+        *     mw.loader.using( 'mediawiki.widgets.CategorySelector', function () {
+        *       var selector = new mw.widgets.CategorySelector( {
+        *         searchTypes: [
+        *           mw.widgets.CategorySelector.SearchType.OpenSearch,
+        *           mw.widgets.CategorySelector.SearchType.InternalSearch
+        *         ]
+        *       } );
         *
-        *     $( '#content' ).append( selector.$element );
+        *       $( 'body' ).append( selector.$element );
         *
-        *     selector.setSearchTypes( [ mw.widgets.CategorySelector.SearchType.SubCategories ] );
+        *       selector.setSearchTypes( [ mw.widgets.CategorySelector.SearchType.SubCategories ] );
+        *     } );
         *
         * @class mw.widgets.CategorySelector
         * @uses mw.Api
@@ -63,6 +65,7 @@
 
                // Initialize
                this.api = config.api || new mw.Api();
+               this.searchCache = {};
        }
 
        /* Setup */
         * @return {jQuery.Promise} Resolves with an array of categories
         */
        CSP.searchCategories = function ( input, searchType ) {
-               var deferred = $.Deferred();
+               var deferred = $.Deferred(),
+                       cacheKey = input + searchType.toString();
+
+               // Check cache
+               if ( this.searchCache[ cacheKey ] !== undefined ) {
+                       return this.searchCache[ cacheKey ];
+               }
 
                switch ( searchType ) {
                        case CategorySelector.SearchType.OpenSearch:
                                        var categories = [];
 
                                        $.each( res.query.pages, function ( index, page ) {
-                                               if ( !page.missing ) {
-                                                       if ( $.isArray( page.categories ) ) {
-                                                               categories.push.apply( categories, page.categories.map( function ( category ) {
-                                                                       return category.title;
-                                                               } ) );
-                                                       }
+                                               if ( !page.missing && $.isArray( page.categories ) ) {
+                                                       categories.push.apply( categories, page.categories.map( function ( category ) {
+                                                               return category.title;
+                                                       } ) );
                                                }
                                        } );
 
                                throw new Error( 'Unknown searchType' );
                }
 
+               // Cache the result
+               this.searchCache[ cacheKey ] = deferred.promise();
+
                return deferred.promise();
        };
 
index 86018a4..46e6b62 100644 (file)
 
        &.oo-ui-widget-enabled {
                .mw-widget-dateInputWidget-handle:hover {
-                       border-color: #347bff;
+                       border-color: #36c;
                }
        }
 
index 1732407..222586f 100644 (file)
@@ -33,6 +33,7 @@
         * @cfg {boolean} [showRedlink] Show red link to exact match if it doesn't exist
         * @cfg {boolean} [showImages] Show page images
         * @cfg {boolean} [showDescriptions] Show page descriptions
+        * @cfg {boolean} [excludeCurrentPage] Exclude the current page from suggestions
         * @cfg {boolean} [validateTitle=true] Whether the input must be a valid title (if set to true,
         *  the widget will marks itself red for invalid inputs, including an empty query).
         * @cfg {Object} [cache] Result cache which implements a 'set' method, taking keyed values as an argument
@@ -54,6 +55,7 @@
                this.showRedlink = !!config.showRedlink;
                this.showImages = !!config.showImages;
                this.showDescriptions = !!config.showDescriptions;
+               this.excludeCurrentPage = !!config.excludeCurrentPage;
                this.validateTitle = config.validateTitle !== undefined ? config.validateTitle : true;
                this.cache = config.cache;
 
                                        }
                                        req = new mw.Api().get( params );
                                        promiseAbortObject.abort = req.abort.bind( req ); // TODO ew
-                                       return req;
+                                       return req.then( function ( ret ) {
+                                               if ( ret.query === undefined ) {
+                                                       ret = new mw.Api().get( { action: 'query', titles: query } );
+                                                       promiseAbortObject.abort = ret.abort.bind( ret );
+                                               }
+                                               return ret;
+                                       } );
                                }
                        } ).promise( promiseAbortObject );
                } else {
         */
        mw.widgets.TitleWidget.prototype.getOptionsFromData = function ( data ) {
                var i, len, index, pageExists, pageExistsExact, suggestionPage, page, redirect, redirects,
+                       currentPageName = new mw.Title( mw.config.get( 'wgRelevantPageName' ) ).getPrefixedText(),
                        items = [],
                        titles = [],
                        titleObj = mw.Title.newFromText( this.getQueryValue() ),
 
                for ( index in data.pages ) {
                        suggestionPage = data.pages[ index ];
+                       // When excludeCurrentPage is set, don't list the current page unless the user has type the full title
+                       if ( this.excludeCurrentPage && suggestionPage.title === currentPageName && suggestionPage.title !== titleObj.getPrefixedText() ) {
+                               continue;
+                       }
                        pageData[ suggestionPage.title ] = {
+                               known: suggestionPage.known !== undefined,
                                missing: suggestionPage.missing !== undefined,
                                redirect: suggestionPage.redirect !== undefined,
                                disambiguation: OO.getProp( suggestionPage, 'pageprops', 'disambiguation' ) !== undefined,
                        for ( i = 0, len = redirects.length; i < len; i++ ) {
                                pageData[ redirects[ i ] ] = {
                                        missing: false,
+                                       known: true,
                                        redirect: true,
                                        disambiguation: false,
                                        description: mw.msg( 'mw-widgets-titleinput-description-redirect', suggestionPage.title ),
                // If not found, run value through mw.Title to avoid treating a match as a
                // mismatch where normalisation would make them matching (bug 48476)
 
-               pageExistsExact = titles.indexOf( this.getQueryValue() ) !== -1;
+               pageExistsExact = (
+                       Object.prototype.hasOwnProperty.call( pageData, this.getQueryValue() ) &&
+                       (
+                               !pageData[ this.getQueryValue() ].missing ||
+                               pageData[ this.getQueryValue() ].known
+                       )
+               );
                pageExists = pageExistsExact || (
-                       titleObj && titles.indexOf( titleObj.getPrefixedText() ) !== -1
+                       titleObj &&
+                       Object.prototype.hasOwnProperty.call( pageData, titleObj.getPrefixedText() ) &&
+                       (
+                               !pageData[ titleObj.getPrefixedText() ].missing ||
+                               pageData[ titleObj.getPrefixedText() ].known
+                       )
                );
 
                if ( !pageExists ) {
                        pageData[ this.getQueryValue() ] = {
-                               missing: true, redirect: false, disambiguation: false,
+                               missing: true, known: false, redirect: false, disambiguation: false,
                                description: mw.msg( 'mw-widgets-titleinput-description-new-page' )
                        };
                }
index c2da10e..8169449 100644 (file)
                        this[ this.needToken() ? 'postWithEditToken' : 'post' ]( data, {
                                // Use FormData (if we got here, we know that it's available)
                                contentType: 'multipart/form-data',
+                               // No timeout (default from mw.Api is 30 seconds)
+                               timeout: 0,
                                // Provide upload progress notifications
                                xhr: function () {
                                        var xhr = $.ajaxSettings.xhr();
diff --git a/resources/src/mediawiki/htmlform/datetime.js b/resources/src/mediawiki/htmlform/datetime.js
new file mode 100644 (file)
index 0000000..2fd2396
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * HTMLForm enhancements:
+ * Add minimal help for date and time fields
+ */
+( function ( mw ) {
+
+       mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
+               var supported = {};
+
+               $root
+                       .find( 'input.mw-htmlform-datetime-field' )
+                       .each( function () {
+                               var input,
+                                       type = this.getAttribute( 'type' );
+
+                               if ( type !== 'date' && type !== 'time' && type !== 'datetime' ) {
+                                       // WTF?
+                                       return;
+                               }
+
+                               if ( supported[ type ] === undefined ) {
+                                       // Assume that if the browser implements validation (so it
+                                       // rejects "bogus" as a value) then it supports a proper UI too.
+                                       input = document.createElement( 'input' );
+                                       input.setAttribute( 'type', type );
+                                       input.value = 'bogus';
+                                       supported[ type ] = ( input.value !== 'bogus' );
+                               }
+
+                               if ( supported[ type ] ) {
+                                       if ( !this.getAttribute( 'min' ) ) {
+                                               this.setAttribute( 'min', this.getAttribute( 'data-min' ) );
+                                       }
+                                       if ( !this.getAttribute( 'max' ) ) {
+                                               this.setAttribute( 'max', this.getAttribute( 'data-max' ) );
+                                       }
+                                       if ( !this.getAttribute( 'step' ) ) {
+                                               this.setAttribute( 'step', this.getAttribute( 'data-step' ) );
+                                       }
+                               }
+                       } );
+       } );
+
+}( mediaWiki ) );
index a8786ef..9ab2532 100644 (file)
@@ -32,9 +32,9 @@
 
        function convertCheckboxesToMulti( $oldContainer, type ) {
                var $fieldLabel = $( '<td>' ),
-               $td = $( '<td>' ),
-               $fieldLabelText = $( '<label>' ),
-               $container;
+                       $td = $( '<td>' ),
+                       $fieldLabelText = $( '<label>' ),
+                       $container;
                if ( type === 'tr' ) {
                        addMulti( $oldContainer, $td );
                        $container = $( '<tr>' );
                return $container;
        }
 
+       function convertCheckboxesWidgetToCapsules( fieldLayout ) {
+               var checkboxesWidget, checkboxesOptions, capsulesOptions, capsulesWidget;
+
+               checkboxesWidget = fieldLayout.fieldWidget;
+               checkboxesOptions = checkboxesWidget.checkboxMultiselectWidget.getItems();
+               capsulesOptions = checkboxesOptions.map( function ( option ) {
+                       return new OO.ui.MenuOptionWidget( {
+                               data: option.getData(),
+                               label: option.getLabel()
+                       } );
+               } );
+               capsulesWidget = new OO.ui.CapsuleMultiselectWidget( {
+                       menu: {
+                               items: capsulesOptions
+                       }
+               } );
+               capsulesWidget.setItemsFromData( checkboxesWidget.getValue() );
+
+               // Data from CapsuleMultiselectWidget will not be submitted with the form, so keep the original
+               // CheckboxMultiselectInputWidget up-to-date.
+               capsulesWidget.on( 'change', function () {
+                       checkboxesWidget.setValue( capsulesWidget.getItemsData() );
+               } );
+
+               // Hide original widget and add new one in its place. This is a bit hacky, since the FieldLayout
+               // still thinks it's connected to the old widget.
+               checkboxesWidget.toggle( false );
+               checkboxesWidget.$element.after( capsulesWidget.$element );
+       }
+
        mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
-               if ( $root.find( '.mw-htmlform-dropdown' ).length ) {
-                       mw.loader.using( 'jquery.chosen', function () {
-                               $root.find( '.mw-htmlform-dropdown' ).each( function () {
-                                       var type = this.nodeName.toLowerCase(),
-                                               $converted = convertCheckboxesToMulti( $( this ), type );
-                                       $converted.find( '.htmlform-chzn-select' ).chosen( { width: 'auto' } );
-                               } );
+               var $dropdowns = $root.find( '.mw-htmlform-field-HTMLMultiSelectField.mw-htmlform-dropdown' );
+               if ( $dropdowns.length ) {
+                       $dropdowns.each( function () {
+                               var $el = $( this ),
+                                       data, modules, extraModules;
+                               if ( $el.is( '[data-ooui]' ) ) {
+                                       // Load 'oojs-ui-widgets' for CapsuleMultiselectWidget
+                                       modules = [ 'mediawiki.htmlform.ooui', 'oojs-ui-widgets' ];
+                                       data = $el.data( 'mw-modules' );
+                                       if ( data ) {
+                                               // We can trust this value, 'data-mw-*' attributes are banned from user content in Sanitizer
+                                               extraModules = data.split( ',' );
+                                               modules.push.apply( modules, extraModules );
+                                       }
+                                       mw.loader.using( modules, function () {
+                                               /*jshint -W024*/
+                                               convertCheckboxesWidgetToCapsules( OO.ui.FieldLayout.static.infuse( $el ) );
+                                       } );
+                               } else {
+                                       mw.loader.using( 'jquery.chosen', function () {
+                                               var type = $el.is( 'tr' ) ? 'tr' : 'div',
+                                                       $converted = convertCheckboxesToMulti( $el, type );
+                                               $converted.find( '.htmlform-chzn-select' ).chosen( { width: 'auto' } );
+                                       } );
+                               }
                        } );
                }
        } );
index 0f61d97..844d74c 100644 (file)
                } );
        };
 
+       /**
+        * @param {mw.Title} filename
+        * @return {jQuery.Promise} Resolves (on success) or rejects with OO.ui.Error
+        */
+       mw.ForeignStructuredUpload.BookletLayout.prototype.validateFilename = function ( filename ) {
+               return ( new mw.Api() ).get( {
+                       action: 'query',
+                       prop: 'info',
+                       titles: filename.getPrefixedDb(),
+                       formatversion: 2
+               } ).then(
+                       function ( result ) {
+                               // if the file already exists, reject right away, before
+                               // ever firing finishStashUpload()
+                               if ( !result.query.pages[ 0 ].missing ) {
+                                       return $.Deferred().reject( new OO.ui.Error(
+                                               $( '<p>' ).msg( 'fileexists', filename.getPrefixedDb() ),
+                                               { recoverable: false }
+                                       ) );
+                               }
+                       },
+                       function () {
+                               // API call failed - this could be a connection hiccup...
+                               // Let's just ignore this validation step and turn this
+                               // failure into a successful resolve ;)
+                               return $.Deferred().resolve();
+                       }
+               );
+       };
+
+       /**
+        * @inheritdoc
+        */
+       mw.ForeignStructuredUpload.BookletLayout.prototype.saveFile = function () {
+               var title = mw.Title.newFromText(
+                               this.getFilename(),
+                               mw.config.get( 'wgNamespaceIds' ).file
+                       );
+
+               return this.uploadPromise
+                       .then( this.validateFilename.bind( this, title ) )
+                       .then( mw.ForeignStructuredUpload.BookletLayout.parent.prototype.saveFile.bind( this ) );
+       };
+
        /* Getters */
 
        /**
index 68062d0..03df086 100644 (file)
@@ -30,6 +30,6 @@
 }
 
 .mw-upload-bookletLayout-filePreview .oo-ui-progressBarWidget-bar {
-       background-color: #347bff;
+       background-color: #36c;
        height: 0.5em;
 }
\ No newline at end of file
index 920835f..7c4855f 100644 (file)
                                return this.upload.getApi()
                                        .then( function ( api ) {
                                                // 'amenableparser' will expand templates and parser functions server-side.
-                                               // We still do the rest of wikitext parsing here (throught jqueryMsg).
+                                               // We still do the rest of wikitext parsing here (through jqueryMsg).
                                                return api.loadMessagesIfMissing( [ error.message.key ], { amenableparser: true } )
                                                        .then( function () {
                                                                if ( !mw.message( error.message.key ).exists() ) {
index e8a85f1..a719ffe 100644 (file)
                        flags: 'safe',
                        action: 'cancel',
                        label: mw.msg( 'upload-dialog-button-cancel' ),
-                       modes: [ 'upload', 'insert', 'info' ]
+                       modes: [ 'upload', 'insert' ]
+               },
+               {
+                       flags: 'safe',
+                       action: 'cancelupload',
+                       label: mw.msg( 'upload-dialog-button-back' ),
+                       modes: [ 'info' ]
                },
                {
                        flags: [ 'primary', 'progressive' ],
@@ -78,7 +84,7 @@
                        modes: 'insert'
                },
                {
-                       flags: [ 'primary', 'constructive' ],
+                       flags: [ 'primary', 'progressive' ],
                        label: mw.msg( 'upload-dialog-button-save' ),
                        action: 'save',
                        modes: 'info'
                if ( action === 'cancel' ) {
                        return new OO.ui.Process( this.close() );
                }
+               if ( action === 'cancelupload' ) {
+                       return new OO.ui.Process( this.uploadBooklet.initialize() );
+               }
 
                return mw.Upload.Dialog.parent.prototype.getActionProcess.call( this, action );
        };
index ad1069f..49ff411 100644 (file)
@@ -7,14 +7,14 @@
        /**
         * An implementation of Jenkins' one-at-a-time hash.
         *
-        * @see http://en.wikipedia.org/wiki/Jenkins_hash_function
+        * @see https://en.wikipedia.org/wiki/Jenkins_hash_function
         *
         * @param {string} string String to hash
         * @return {number} The hash as a 32-bit unsigned integer
         * @ignore
         *
         * @author Ori Livneh <ori@wikimedia.org>
-        * @see http://jsbin.com/kejewi/4/watch?js,console
+        * @see https://jsbin.com/kejewi/4/watch?js,console
         */
        function hashString( string ) {
                var hash = 0,
index 170e124..0b3ea04 100644 (file)
                                        ]
                                };
                                break;
-                       case 'error1':
-                       case 'error2':
-                       case 'error3':
-                       case 'error4':
-                               dialogConfig = {
-                                       title: mw.msg( 'feedback-error-title' ),
-                                       message: mw.msg( 'feedback-' + status ),
-                                       actions: [
-                                               {
-                                                       action: 'accept',
-                                                       label: mw.msg( 'feedback-close' ),
-                                                       flags: 'primary'
-                                               }
-                                       ]
-                               };
-                               break;
                }
 
                // Show the message dialog
                {
                        action: 'submit',
                        label: mw.msg( 'feedback-submit' ),
-                       flags: [ 'primary', 'constructive' ]
+                       flags: [ 'primary', 'progressive' ]
                },
                {
                        action: 'external',
                        label: mw.msg( 'feedback-external-bug-report-button' ),
-                       flags: 'constructive'
+                       flags: 'progressive'
                },
                {
                        action: 'cancel',
                                }, function () {
                                        fb.status = 'error4';
                                        mw.log.warn( 'Feedback report failed because MessagePoster could not be fetched' );
-                               } ).always( function () {
+                               } ).then( function () {
                                        fb.close();
+                               }, function () {
+                                       return fb.getErrorMessage();
                                } );
                        }, this );
                }
                return mw.Feedback.Dialog.parent.prototype.getActionProcess.call( this, action );
        };
 
+       /**
+        * Returns an error message for the current status.
+        *
+        * @private
+        *
+        * @return {OO.ui.Error}
+        */
+       mw.Feedback.Dialog.prototype.getErrorMessage = function () {
+               switch ( this.status ) {
+                       case 'error1':
+                       case 'error2':
+                       case 'error3':
+                       case 'error4':
+                               // Messages: feedback-error1, feedback-error2, feedback-error3, feedback-error4
+                               return new OO.ui.Error( mw.msg( 'feedback-' + this.status ) );
+               }
+       };
+
        /**
         * Posts the message
         *
index 44b9117..2646cff 100644 (file)
                        } else {
                                $el = $( '<a>' );
                                if ( typeof arg === 'function' ) {
-                                       $el.attr( 'href', '#' )
-                                       .click( function ( e ) {
-                                               e.preventDefault();
+                                       $el.attr( {
+                                               role: 'button',
+                                               tabindex: 0
                                        } )
-                                       .click( arg );
+                                       .on( 'click keypress', function ( e ) {
+                                               if (
+                                                       e.type === 'click' ||
+                                                       e.type === 'keypress' && e.which === 13
+                                               ) {
+                                                       arg.call( this, e );
+                                               }
+                                       } );
                                } else {
                                        $el.attr( 'href', textify( arg ) );
                                }
index db5a4fb..6280c95 100644 (file)
@@ -11,7 +11,7 @@
 ( function ( $ ) {
        'use strict';
 
-       var mw,
+       var mw, StringSet, log,
                hasOwn = Object.prototype.hasOwnProperty,
                slice = Array.prototype.slice,
                trackCallbacks = $.Callbacks( 'memory' ),
                return hash;
        }
 
+       StringSet = window.Set || ( function () {
+               /**
+                * @private
+                * @class
+                */
+               function StringSet() {
+                       this.set = {};
+               }
+               StringSet.prototype.add = function ( value ) {
+                       this.set[ value ] = true;
+               };
+               StringSet.prototype.has = function ( value ) {
+                       return this.set.hasOwnProperty( value );
+               };
+               return StringSet;
+       }() );
+
        /**
-        * Create an object that can be read from or written to from methods that allow
+        * Create an object that can be read from or written to via methods that allow
         * interaction both with single and multiple properties at once.
         *
-        *     @example
-        *
-        *     var collection, query, results;
-        *
-        *     // Create your address book
-        *     collection = new mw.Map();
-        *
-        *     // This data could be coming from an external source (eg. API/AJAX)
-        *     collection.set( {
-        *         'John Doe': 'john@example.org',
-        *         'Jane Doe': 'jane@example.org',
-        *         'George van Halen': 'gvanhalen@example.org'
-        *     } );
-        *
-        *     wanted = ['John Doe', 'Jane Doe', 'Daniel Jackson'];
-        *
-        *     // You can detect missing keys first
-        *     if ( !collection.exists( wanted ) ) {
-        *         // One or more are missing (in this case: "Daniel Jackson")
-        *         mw.log( 'One or more names were not found in your address book' );
-        *     }
-        *
-        *     // Or just let it give you what it can. Optionally fill in from a default.
-        *     results = collection.get( wanted, 'nobody@example.com' );
-        *     mw.log( results['Jane Doe'] ); // "jane@example.org"
-        *     mw.log( results['Daniel Jackson'] ); // "nobody@example.com"
-        *
+        * @private
         * @class mw.Map
         *
         * @constructor
-        * @param {Object|boolean} [values] The value-baring object to be mapped. Defaults to an
-        *  empty object.
-        *  For backwards-compatibility with mw.config, this can also be `true` in which case values
-        *  are copied to the Window object as global variables (T72470). Values are copied in
-        *  one direction only. Changes to globals are not reflected in the map.
+        * @param {boolean} [global=false] Whether to synchronise =values to the global
+        *  window object (for backwards-compatibility with mw.config; T72470). Values are
+        *  copied in one direction only. Changes to globals do not reflect in the map.
         */
-       function Map( values ) {
-               if ( values === true ) {
-                       this.values = {};
+       function Map( global ) {
+               this.internalValues = {};
+               if ( global === true ) {
 
                        // Override #set to also set the global variable
                        this.set = function ( selection, value ) {
                                }
                                return false;
                        };
-
-                       return;
                }
 
-               this.values = values || {};
+               // Deprecated since MediaWiki 1.28
+               log.deprecate(
+                       this,
+                       'values',
+                       this.internalValues,
+                       'mw.Map#values is deprecated. Use mw.Map#get() instead.',
+                       'Map-values'
+               );
        }
 
        /**
         * @param {Mixed} value
         */
        function setGlobalMapValue( map, key, value ) {
-               map.values[ key ] = value;
-               mw.log.deprecate(
+               map.internalValues[ key ] = value;
+               log.deprecate(
                                window,
                                key,
                                value,
        }
 
        Map.prototype = {
+               constructor: Map,
+
                /**
                 * Get the value of one or more keys.
                 *
                 * @param {Mixed} [fallback=null] Value for keys that don't exist.
                 * @return {Mixed|Object| null} If selection was a string, returns the value,
                 *  If selection was an array, returns an object of key/values.
-                *  If no selection is passed, the 'values' container is returned. (Beware that,
+                *  If no selection is passed, the internal container is returned. (Beware that,
                 *  as is the default in JavaScript, the object is returned by reference.)
                 */
                get: function ( selection, fallback ) {
                        }
 
                        if ( typeof selection === 'string' ) {
-                               if ( !hasOwn.call( this.values, selection ) ) {
+                               if ( !hasOwn.call( this.internalValues, selection ) ) {
                                        return fallback;
                                }
-                               return this.values[ selection ];
+                               return this.internalValues[ selection ];
                        }
 
                        if ( selection === undefined ) {
-                               return this.values;
+                               return this.internalValues;
                        }
 
                        // Invalid selection key
 
                        if ( $.isPlainObject( selection ) ) {
                                for ( s in selection ) {
-                                       this.values[ s ] = selection[ s ];
+                                       this.internalValues[ s ] = selection[ s ];
                                }
                                return true;
                        }
                        if ( typeof selection === 'string' && arguments.length > 1 ) {
-                               this.values[ selection ] = value;
+                               this.internalValues[ selection ] = value;
                                return true;
                        }
                        return false;
 
                        if ( $.isArray( selection ) ) {
                                for ( s = 0; s < selection.length; s++ ) {
-                                       if ( typeof selection[ s ] !== 'string' || !hasOwn.call( this.values, selection[ s ] ) ) {
+                                       if ( typeof selection[ s ] !== 'string' || !hasOwn.call( this.internalValues, selection[ s ] ) ) {
                                                return false;
                                        }
                                }
                                return true;
                        }
-                       return typeof selection === 'string' && hasOwn.call( this.values, selection );
+                       return typeof selection === 'string' && hasOwn.call( this.internalValues, selection );
                }
        };
 
                }
        };
 
+       log = ( function () {
+               // Also update the restoration of methods in mediawiki.log.js
+               // when adding or removing methods here.
+               var log = function () {},
+                       console = window.console;
+
+               /**
+                * @class mw.log
+                * @singleton
+                */
+
+               /**
+                * Write a message to the console's warning channel.
+                * Actions not supported by the browser console are silently ignored.
+                *
+                * @param {...string} msg Messages to output to console
+                */
+               log.warn = console && console.warn && Function.prototype.bind ?
+                       Function.prototype.bind.call( console.warn, console ) :
+                       $.noop;
+
+               /**
+                * Write a message to the console's error channel.
+                *
+                * Most browsers provide a stacktrace by default if the argument
+                * is a caught Error object.
+                *
+                * @since 1.26
+                * @param {Error|...string} msg Messages to output to console
+                */
+               log.error = console && console.error && Function.prototype.bind ?
+                       Function.prototype.bind.call( console.error, console ) :
+                       $.noop;
+
+               /**
+                * Create a property in a host object that, when accessed, will produce
+                * a deprecation warning in the console.
+                *
+                * @param {Object} obj Host object of deprecated property
+                * @param {string} key Name of property to create in `obj`
+                * @param {Mixed} val The value this property should return when accessed
+                * @param {string} [msg] Optional text to include in the deprecation message
+                * @param {string} [logName=key] Optional custom name for the feature.
+                *  This is used instead of `key` in the message and `mw.deprecate` tracking.
+                */
+               log.deprecate = !Object.defineProperty ? function ( obj, key, val ) {
+                       obj[ key ] = val;
+               } : function ( obj, key, val, msg, logName ) {
+                       logName = logName || key;
+                       msg = 'Use of "' + logName + '" is deprecated.' + ( msg ? ( ' ' + msg ) : '' );
+                       var logged = new StringSet();
+                       function uniqueTrace() {
+                               var trace = new Error().stack;
+                               if ( logged.has( trace ) ) {
+                                       return false;
+                               }
+                               logged.add( trace );
+                               return true;
+                       }
+                       // Support: Safari 5.0
+                       // Throws "not supported on DOM Objects" for Node or Element objects (incl. document)
+                       // Safari 4.0 doesn't have this method, and it was fixed in Safari 5.1.
+                       try {
+                               Object.defineProperty( obj, key, {
+                                       configurable: true,
+                                       enumerable: true,
+                                       get: function () {
+                                               if ( uniqueTrace() ) {
+                                                       mw.track( 'mw.deprecate', logName );
+                                                       mw.log.warn( msg );
+                                               }
+                                               return val;
+                                       },
+                                       set: function ( newVal ) {
+                                               if ( uniqueTrace() ) {
+                                                       mw.track( 'mw.deprecate', logName );
+                                                       mw.log.warn( msg );
+                                               }
+                                               val = newVal;
+                                       }
+                               } );
+                       } catch ( err ) {
+                               obj[ key ] = val;
+                       }
+               };
+
+               return log;
+       }() );
+
        /**
         * @class mw
         */
                },
 
                /**
-                * Dummy placeholder for {@link mw.log}
+                * No-op dummy placeholder for {@link mw.log} in debug mode.
                 *
                 * @method
                 */
-               log: ( function () {
-                       // Also update the restoration of methods in mediawiki.log.js
-                       // when adding or removing methods here.
-                       var log = function () {},
-                               console = window.console;
-
-                       /**
-                        * @class mw.log
-                        * @singleton
-                        */
-
-                       /**
-                        * Write a message to the console's warning channel.
-                        * Actions not supported by the browser console are silently ignored.
-                        *
-                        * @param {...string} msg Messages to output to console
-                        */
-                       log.warn = console && console.warn && Function.prototype.bind ?
-                               Function.prototype.bind.call( console.warn, console ) :
-                               $.noop;
-
-                       /**
-                        * Write a message to the console's error channel.
-                        *
-                        * Most browsers provide a stacktrace by default if the argument
-                        * is a caught Error object.
-                        *
-                        * @since 1.26
-                        * @param {Error|...string} msg Messages to output to console
-                        */
-                       log.error = console && console.error && Function.prototype.bind ?
-                               Function.prototype.bind.call( console.error, console ) :
-                               $.noop;
-
-                       /**
-                        * Create a property in a host object that, when accessed, will produce
-                        * a deprecation warning in the console with backtrace.
-                        *
-                        * @param {Object} obj Host object of deprecated property
-                        * @param {string} key Name of property to create in `obj`
-                        * @param {Mixed} val The value this property should return when accessed
-                        * @param {string} [msg] Optional text to include in the deprecation message
-                        */
-                       log.deprecate = !Object.defineProperty ? function ( obj, key, val ) {
-                               obj[ key ] = val;
-                       } : function ( obj, key, val, msg ) {
-                               /*globals Set */
-                               msg = 'Use of "' + key + '" is deprecated.' + ( msg ? ( ' ' + msg ) : '' );
-                               var logged, loggedIsSet, uniqueTrace;
-                               if ( window.Set ) {
-                                       logged = new Set();
-                                       loggedIsSet = true;
-                               } else {
-                                       logged = {};
-                                       loggedIsSet = false;
-                               }
-                               uniqueTrace = function () {
-                                       var trace = new Error().stack;
-                                       if ( loggedIsSet ) {
-                                               if ( logged.has( trace ) ) {
-                                                       return false;
-                                               }
-                                               logged.add( trace );
-                                               return true;
-                                       } else {
-                                               if ( logged.hasOwnProperty( trace ) ) {
-                                                       return false;
-                                               }
-                                               logged[ trace ] = 1;
-                                               return true;
-                                       }
-                               };
-                               Object.defineProperty( obj, key, {
-                                       configurable: true,
-                                       enumerable: true,
-                                       get: function () {
-                                               if ( uniqueTrace() ) {
-                                                       mw.track( 'mw.deprecate', key );
-                                                       mw.log.warn( msg );
-                                               }
-                                               return val;
-                                       },
-                                       set: function ( newVal ) {
-                                               if ( uniqueTrace() ) {
-                                                       mw.track( 'mw.deprecate', key );
-                                                       mw.log.warn( msg );
-                                               }
-                                               val = newVal;
-                                       }
-                               } );
-
-                       };
-
-                       return log;
-               }() ),
+               log: log,
 
                /**
                 * Client for ResourceLoader server end point.
                         *  dependencies, such that later modules depend on earlier modules. The array
                         *  contains the module names. If the array contains already some module names,
                         *  this function appends its result to the pre-existing array.
-                        * @param {Object} [unresolved] Hash used to track the current dependency
-                        *  chain; used to report loops in the dependency graph.
+                        * @param {StringSet} [unresolved] Used to track the current dependency
+                        *  chain, and to report loops in the dependency graph.
                         * @throws {Error} If any unregistered module or a dependency loop is encountered
                         */
                        function sortDependencies( module, resolved, unresolved ) {
                                }
                                // Create unresolved if not passed in
                                if ( !unresolved ) {
-                                       unresolved = {};
+                                       unresolved = new StringSet();
                                }
                                // Tracks down dependencies
                                deps = registry[ module ].dependencies;
                                for ( i = 0; i < deps.length; i++ ) {
                                        if ( $.inArray( deps[ i ], resolved ) === -1 ) {
-                                               if ( unresolved[ deps[ i ] ] ) {
+                                               if ( unresolved.has( deps[ i ] ) ) {
                                                        throw new Error( mw.format(
                                                                'Circular reference detected: $1 -> $2',
                                                                module,
                                                        ) );
                                                }
 
-                                               // Add to unresolved
-                                               unresolved[ module ] = true;
+                                               unresolved.add(  module );
                                                sortDependencies( deps[ i ], resolved, unresolved );
                                        }
                                }
 
                                pendingRequests.push( function () {
                                        if ( moduleName && hasOwn.call( registry, moduleName ) ) {
+                                               // Emulate runScript() part of execute()
                                                window.require = mw.loader.require;
                                                window.module = registry[ moduleName ].module;
                                        }
                                        addScript( src ).always( function () {
-                                               // Clear environment
-                                               delete window.require;
+                                               // 'module.exports' should not persist after the file is executed to
+                                               // avoid leakage to unrelated code. 'require' should be kept, however,
+                                               // as asynchronous access to 'require' is allowed and expected. (T144879)
                                                delete window.module;
                                                r.resolve();
 
                                registry[ module ].state = 'executing';
 
                                runScript = function () {
-                                       var script, markModuleReady, nestedAddScript, legacyWait,
+                                       var script, markModuleReady, nestedAddScript, legacyWait, implicitDependencies,
                                                // Expand to include dependencies since we have to exclude both legacy modules
                                                // and their dependencies from the legacyWait (to prevent a circular dependency).
                                                legacyModules = resolve( mw.config.get( 'wgResourceLoaderLegacyModules', [] ) );
-                                       try {
-                                               script = registry[ module ].script;
-                                               markModuleReady = function () {
-                                                       registry[ module ].state = 'ready';
-                                                       handlePending( module );
-                                               };
-                                               nestedAddScript = function ( arr, callback, i ) {
-                                                       // Recursively call queueModuleScript() in its own callback
-                                                       // for each element of arr.
-                                                       if ( i >= arr.length ) {
-                                                               // We're at the end of the array
-                                                               callback();
-                                                               return;
-                                                       }
 
-                                                       queueModuleScript( arr[ i ], module ).always( function () {
-                                                               nestedAddScript( arr, callback, i + 1 );
-                                                       } );
-                                               };
+                                       script = registry[ module ].script;
+                                       markModuleReady = function () {
+                                               registry[ module ].state = 'ready';
+                                               handlePending( module );
+                                       };
+                                       nestedAddScript = function ( arr, callback, i ) {
+                                               // Recursively call queueModuleScript() in its own callback
+                                               // for each element of arr.
+                                               if ( i >= arr.length ) {
+                                                       // We're at the end of the array
+                                                       callback();
+                                                       return;
+                                               }
+
+                                               queueModuleScript( arr[ i ], module ).always( function () {
+                                                       nestedAddScript( arr, callback, i + 1 );
+                                               } );
+                                       };
+
+                                       implicitDependencies = ( $.inArray( module, legacyModules ) !== -1 )
+                                               ? []
+                                               : legacyModules;
 
-                                               legacyWait = ( $.inArray( module, legacyModules ) !== -1 )
-                                                       ? $.Deferred().resolve()
-                                                       : mw.loader.using( legacyModules );
+                                       if ( module === 'user' ) {
+                                               // Implicit dependency on the site module. Not real dependency because
+                                               // it should run after 'site' regardless of whether it succeeds or fails.
+                                               implicitDependencies.push( 'site' );
+                                       }
+
+                                       legacyWait = implicitDependencies.length
+                                               ? mw.loader.using( implicitDependencies )
+                                               : $.Deferred().resolve();
 
-                                               legacyWait.always( function () {
+                                       legacyWait.always( function () {
+                                               try {
                                                        if ( $.isArray( script ) ) {
                                                                nestedAddScript( script, markModuleReady, 0 );
                                                        } else if ( typeof script === 'function' ) {
                                                                // Site and user modules are legacy scripts that run in the global scope.
                                                                // This is transported as a string instead of a function to avoid needing
                                                                // to use string manipulation to undo the function wrapper.
-                                                               if ( module === 'user' ) {
-                                                                       // Implicit dependency on the site module. Not real dependency because
-                                                                       // it should run after 'site' regardless of whether it succeeds or fails.
-                                                                       mw.loader.using( 'site' ).always( function () {
-                                                                               $.globalEval( script );
-                                                                               markModuleReady();
-                                                                       } );
-                                                               } else {
-                                                                       $.globalEval( script );
-                                                                       markModuleReady();
-                                                               }
+                                                               $.globalEval( script );
+                                                               markModuleReady();
+
                                                        } else {
                                                                // Module without script
                                                                markModuleReady();
                                                        }
-                                               } );
-                                       } catch ( e ) {
-                                               // This needs to NOT use mw.log because these errors are common in production mode
-                                               // and not in debug mode, such as when a symbol that should be global isn't exported
-                                               registry[ module ].state = 'error';
-                                               mw.track( 'resourceloader.exception', { exception: e, module: module, source: 'module-execute' } );
-                                               handlePending( module );
-                                       }
+                                               } catch ( e ) {
+                                                       // Use mw.track instead of mw.log because these errors are common in production mode
+                                                       // (e.g. undefined variable), and mw.log is only enabled in debug mode.
+                                                       registry[ module ].state = 'error';
+                                                       mw.track( 'resourceloader.exception', { exception: e, module: module, source: 'module-execute' } );
+                                                       handlePending( module );
+                                               }
+                                       } );
                                };
 
                                // Add localizations to message system
                        }
 
                        /**
-                        * Evaluate a batch of load.php responses retrieved from mw.loader.store.
-                        *
                         * @private
                         * @param {string[]} implementations Array containing pieces of JavaScript code in the
                         *  form of calls to mw.loader#implement().
                         * @param {Function} cb Callback in case of failure
                         * @param {Error} cb.err
                         */
-                       function batchEval( implementations, cb ) {
+                       function asyncEval( implementations, cb ) {
                                if ( !implementations.length ) {
                                        return;
                                }
-                               mw.requestIdleCallback( function iterate( deadline ) {
-                                       while ( implementations[ 0 ] && deadline.timeRemaining() > 5 ) {
-                                               try {
-                                                       $.globalEval( implementations.shift() );
-                                               } catch ( err ) {
-                                                       cb( err );
-                                                       return;
-                                               }
-                                       }
-                                       if ( implementations[ 0 ] ) {
-                                               mw.requestIdleCallback( iterate );
+                               mw.requestIdleCallback( function () {
+                                       try {
+                                               $.globalEval( implementations.join( ';' ) );
+                                       } catch ( err ) {
+                                               cb( err );
                                        }
                                } );
                        }
 
+                       /**
+                        * Make a versioned key for a specific module.
+                        *
+                        * @private
+                        * @param {string} module Module name
+                        * @return {string|null} Module key in format '`[name]@[version]`',
+                        *  or null if the module does not exist
+                        */
+                       function getModuleKey( module ) {
+                               return hasOwn.call( registry, module ) ?
+                                       ( module + '@' + registry[ module ].version ) : null;
+                       }
+
+                       /**
+                        * @private
+                        * @param {string} key Module name or '`[name]@[version]`'
+                        * @return {Object}
+                        */
+                       function splitModuleKey( key ) {
+                               var index = key.indexOf( '@' );
+                               if ( index === -1 ) {
+                                       return { name: key };
+                               }
+                               return {
+                                       name: key.slice( 0, index ),
+                                       version: key.slice( index + 1 )
+                               };
+                       }
+
                        /* Public Members */
                        return {
                                /**
                                                        }
                                                        return true;
                                                } );
-                                               batchEval( implementations, function ( err ) {
+                                               asyncEval( implementations, function ( err ) {
                                                        // Not good, the cached mw.loader.implement calls failed! This should
                                                        // never happen, barring ResourceLoader bugs, browser bugs and PEBKACs.
                                                        // Depending on how corrupt the string is, it is likely that some
                                                        // modules' implement() succeeded while the ones after the error will
                                                        // never run and leave their modules in the 'loading' state forever.
+
                                                        // Since this is an error not caused by an individual module but by
                                                        // something that infected the implement call itself, don't take any
                                                        // risks and clear everything in this cache.
                                                        mw.loader.store.clear();
-                                                       mw.track( 'resourceloader.exception', { exception: err, source: 'store-eval' } );
 
+                                                       mw.track( 'resourceloader.exception', { exception: err, source: 'store-eval' } );
                                                        // Re-add the failed ones that are still pending back to the batch
                                                        var failed = $.grep( sourceModules, function ( module ) {
                                                                return registry[ module ].state === 'loading';
                                 * When #load() or #using() requests one or more modules, the server
                                 * response contain calls to this function.
                                 *
-                                * @param {string} module Name of module
-                                * @param {Function|Array} [script] Function with module code or Array of URLs to
-                                *  be used as the src attribute of a new `<script>` tag.
+                                * @param {string} module Name of module and current module version. Formatted
+                                *  as '`[name]@[version]`". This version should match the requested version
+                                *  (from #batchRequest and #registry). This avoids race conditions (T117587).
+                                *  For back-compat with MediaWiki 1.27 and earlier, the version may be omitted.
+                                * @param {Function|Array|string} [script] Function with module code, list of URLs
+                                *  to load via `<script src>`, or string of module code for `$.globalEval()`.
                                 * @param {Object} [style] Should follow one of the following patterns:
                                 *
                                 *     { "css": [css, ..] }
                                 * @param {Object} [templates] List of key/value pairs to be added to mw#templates.
                                 */
                                implement: function ( module, script, style, messages, templates ) {
+                                       var split = splitModuleKey( module ),
+                                               name = split.name,
+                                               version = split.version;
                                        // Automatically register module
-                                       if ( !hasOwn.call( registry, module ) ) {
-                                               mw.loader.register( module );
+                                       if ( !hasOwn.call( registry, name ) ) {
+                                               mw.loader.register( name );
                                        }
                                        // Check for duplicate implementation
-                                       if ( hasOwn.call( registry, module ) && registry[ module ].script !== undefined ) {
-                                               throw new Error( 'module already implemented: ' + module );
+                                       if ( hasOwn.call( registry, name ) && registry[ name ].script !== undefined ) {
+                                               throw new Error( 'module already implemented: ' + name );
+                                       }
+                                       if ( version ) {
+                                               // Without this reset, if there is a version mismatch between the
+                                               // requested and received module version, then mw.loader.store would
+                                               // cache the response under the requested key. Thus poisoning the cache
+                                               // indefinitely with a stale value. (T117587)
+                                               registry[ name ].version = version;
                                        }
                                        // Attach components
-                                       registry[ module ].script = script || null;
-                                       registry[ module ].style = style || null;
-                                       registry[ module ].messages = messages || null;
-                                       registry[ module ].templates = templates || null;
+                                       registry[ name ].script = script || null;
+                                       registry[ name ].style = style || null;
+                                       registry[ name ].messages = messages || null;
+                                       registry[ name ].templates = templates || null;
                                        // The module may already have been marked as erroneous
-                                       if ( $.inArray( registry[ module ].state, [ 'error', 'missing' ] ) === -1 ) {
-                                               registry[ module ].state = 'loaded';
-                                               if ( allReady( registry[ module ].dependencies ) ) {
-                                                       execute( module );
+                                       if ( $.inArray( registry[ name ].state, [ 'error', 'missing' ] ) === -1 ) {
+                                               registry[ name ].state = 'loaded';
+                                               if ( allReady( registry[ name ].dependencies ) ) {
+                                                       execute( name );
                                                }
                                        }
                                },
 
                                        MODULE_SIZE_MAX: 100 * 1000,
 
-                                       // The contents of the store, mapping '[module name]@[version]' keys
+                                       // The contents of the store, mapping '[name]@[version]' keys
                                        // to module implementations.
                                        items: {},
 
                                                ].join( ':' );
                                        },
 
-                                       /**
-                                        * Get a key for a specific module. The key format is '[name]@[version]'.
-                                        *
-                                        * @param {string} module Module name
-                                        * @return {string|null} Module key or null if module does not exist
-                                        */
-                                       getModuleKey: function ( module ) {
-                                               return hasOwn.call( registry, module ) ?
-                                                       ( module + '@' + registry[ module ].version ) : null;
-                                       },
-
                                        /**
                                         * Initialize the store.
                                         *
                                                        return false;
                                                }
 
-                                               key = mw.loader.store.getModuleKey( module );
+                                               key = getModuleKey( module );
                                                if ( key in mw.loader.store.items ) {
                                                        mw.loader.store.stats.hits++;
                                                        return mw.loader.store.items[ key ];
                                                        return false;
                                                }
 
-                                               key = mw.loader.store.getModuleKey( module );
+                                               key = getModuleKey( module );
 
                                                if (
                                                        // Already stored a copy of this exact version
 
                                                try {
                                                        args = [
-                                                               JSON.stringify( module ),
+                                                               JSON.stringify( key ),
                                                                typeof descriptor.script === 'function' ?
                                                                        String( descriptor.script ) :
                                                                        JSON.stringify( descriptor.script ),
 
                                                for ( key in mw.loader.store.items ) {
                                                        module = key.slice( 0, key.indexOf( '@' ) );
-                                                       if ( mw.loader.store.getModuleKey( module ) !== key ) {
+                                                       if ( getModuleKey( module ) !== key ) {
                                                                mw.loader.store.stats.expired++;
                                                                delete mw.loader.store.items[ key ];
                                                        } else if ( mw.loader.store.items[ key ].length > mw.loader.store.MODULE_SIZE_MAX ) {
         * reference, so that debugging tools loaded later are supported (e.g. Firebug Lite in IE).
         *
         * @private
-        * @method log_
         * @param {string} topic Stream name passed by mw.track
         * @param {Object} data Data passed by mw.track
         * @param {Error} [data.exception]
         * @param {string} data.source Error source
         * @param {string} [data.module] Name of module which caused the error
         */
-       function log( topic, data ) {
+       function logError( topic, data ) {
                var msg,
                        e = data.exception,
                        source = data.source,
        }
 
        // Subscribe to error streams
-       mw.trackSubscribe( 'resourceloader.exception', log );
-       mw.trackSubscribe( 'resourceloader.assert', log );
+       mw.trackSubscribe( 'resourceloader.exception', logError );
+       mw.trackSubscribe( 'resourceloader.assert', logError );
 
        /**
         * Fired when all modules associated with the page have finished loading.
index 93fb470..c886817 100644 (file)
@@ -8,9 +8,8 @@
 
 ( function ( mw, $ ) {
 
-       // Reference to dummy
-       // We don't need the dummy, but it has other methods on it
-       // that we need to restore afterwards.
+       // Keep reference to the dummy placeholder from mediawiki.js
+       // The root is replaced below, but it has other methods that we need to restore.
        var original = mw.log,
                slice = Array.prototype.slice;
 
index dfc98ad..b58cb69 100644 (file)
         * @member mw
         * @param {Function} callback
         */
+       mw.requestIdleCallback = mw.requestIdleCallbackInternal;
+       /*
+       // XXX: Polyfill disabled due to https://bugs.chromium.org/p/chromium/issues/detail?id=647870
        mw.requestIdleCallback = window.requestIdleCallback
                // Bind because it throws TypeError if context is not window
                ? window.requestIdleCallback.bind( window )
                : mw.requestIdleCallbackInternal;
+       */
 }( mediaWiki ) );
index cb62fbf..a9d17ff 100644 (file)
         */
        mw.storage = {
 
-               localStorage: window.localStorage,
+               localStorage: ( function () {
+                       // Catch exceptions to avoid fatal in Chrome's "Block data storage" mode
+                       // which throws when accessing the localStorage property itself, as opposed
+                       // to the standard behaviour of throwing on getItem/setItem. (T148998)
+                       try {
+                               return window.localStorage;
+                       } catch ( e ) {}
+               }() ),
 
                /**
                 * Retrieve value from device storage.
index 7bf73b6..0955c23 100644 (file)
@@ -10,8 +10,7 @@
                $tocList = $toc.find( 'ul' ).eq( 0 );
 
                // Hide/show the table of contents element
-               function toggleToc( e ) {
-                       e.preventDefault();
+               function toggleToc() {
                        if ( $tocList.is( ':hidden' ) ) {
                                $tocList.slideDown( 'fast' );
                                $tocToggleLink.text( mw.msg( 'hidetoc' ) );
                if ( $toc.length && $tocTitle.length && $tocList.length && !$tocToggleLink.length ) {
                        hideToc = mw.cookie.get( 'hidetoc' ) === '1';
 
-                       $tocToggleLink = $( '<a href="#" id="togglelink"></a>' )
+                       $tocToggleLink = $( '<a role="button" tabindex="0" id="togglelink"></a>' )
                                .text( mw.msg( hideToc ? 'showtoc' : 'hidetoc' ) )
-                               .click( toggleToc );
+                               .on( 'click keypress', function ( e ) {
+                                       if (
+                                               e.type === 'click' ||
+                                               e.type === 'keypress' && e.which === 13
+                                       ) {
+                                               toggleToc();
+                                       }
+                               } );
 
                        $tocTitle.append(
                                $tocToggleLink
index 7df778f..63e7de8 100644 (file)
@@ -89,7 +89,7 @@
                 * @return {number} Current user's id, or 0 if user is anonymous
                 */
                getId: function () {
-                       return mw.config.get( 'wgUserId', 0 );
+                       return mw.config.get( 'wgUserId' ) || 0;
                },
 
                /**
                /**
                 * Get date user registered, if available
                 *
-                * @return {Date|boolean|null} Date user registered, or false for anonymous users, or
-                *  null when data is not available
+                * @return {boolean|null|Date} False for anonymous users, null if data is
+                *  unavailable, or Date for when the user registered.
                 */
                getRegistration: function () {
-                       var registration = mw.config.get( 'wgUserRegistration' );
                        if ( mw.user.isAnon() ) {
                                return false;
                        }
-                       if ( registration === null ) {
-                               // Information may not be available if they signed up before
-                               // MW began storing this.
-                               return null;
-                       }
-                       return new Date( registration );
+                       var registration = mw.config.get( 'wgUserRegistration' );
+                       // Registration may be unavailable if the user signed up before MediaWiki
+                       // began tracking this.
+                       return !registration ? null : new Date( registration );
                },
 
                /**
index 294b5de..866f213 100644 (file)
                        // - atext   : defined in RFC 5322 section 3.2.3
                        // - ldh-str : defined in RFC 1034 section 3.5
                        //
-                       // (see STD 68 / RFC 5234 http://tools.ietf.org/html/std68)
+                       // (see STD 68 / RFC 5234 https://tools.ietf.org/html/std68)
                        // First, define the RFC 5322 'atext' which is pretty easy:
                        // atext = ALPHA / DIGIT / ; Printable US-ASCII
                        //     "!" / "#" /    ; characters not including
index 3b2c86e..cf448b0 100644 (file)
 
                toggle = new OO.ui.ButtonWidget( {
                        framed: false,
-                       icon: 'imageGallery'
+                       icon: 'imageGallery',
+                       title: mw.msg( 'gallery-slideshow-toggle' )
                } ).on( 'click', this.toggleThumbnails.bind( this ) );
 
                interfaceElements = new OO.ui.PanelLayout( {
                // Show thumbnail stretched to the right size while the image loads
                this.$thumbnail = imageLi.find( 'img' );
                this.$img.attr( 'src', this.$thumbnail.attr( 'src' ) );
+               this.$img.attr( 'alt', this.$thumbnail.attr( 'alt' ) );
                this.$imgLink.attr( 'href', imageLi.find( 'a' ).eq( 0 ).attr( 'href' ) );
                this.setImageSize();
 
index 474d541..2ff75d2 100644 (file)
@@ -17,6 +17,9 @@ ul.gallery {
        margin: 2px;
        padding: 2px;
        display: block;
+       width: -moz-fit-content;
+       width: -webkit-fit-content;
+       width: fit-content;
 }
 
 li.gallerycaption {
index 2a985fe..a19fea1 100644 (file)
@@ -147,6 +147,7 @@ $wgAutoloadClasses += [
        # tests/phpunit/mocks
        'MockFSFile' => "$testDir/phpunit/mocks/filebackend/MockFSFile.php",
        'MockFileBackend' => "$testDir/phpunit/mocks/filebackend/MockFileBackend.php",
+       'MockLocalRepo' => "$testDir/phpunit/mocks/filerepo/MockLocalRepo.php",
        'MockBitmapHandler' => "$testDir/phpunit/mocks/media/MockBitmapHandler.php",
        'MockImageHandler' => "$testDir/phpunit/mocks/media/MockImageHandler.php",
        'MockSvgHandler' => "$testDir/phpunit/mocks/media/MockSvgHandler.php",
index 4ef778d..e433c2e 100644 (file)
@@ -26,6 +26,7 @@
  * @ingroup Testing
  */
 use MediaWiki\MediaWikiServices;
+use Wikimedia\ScopedCallback;
 
 /**
  * @ingroup Testing
@@ -49,7 +50,7 @@ class ParserTestRunner {
 
        /**
         * Our connection to the database
-        * @var DatabaseBase
+        * @var Database
         */
        private $db;
 
@@ -59,11 +60,6 @@ class ParserTestRunner {
         */
        private $dbClone;
 
-       /**
-        * @var DjVuSupport
-        */
-       private $djVuSupport;
-
        /**
         * @var TidySupport
         */
@@ -138,7 +134,6 @@ class ParserTestRunner {
                $this->runDisabled = !empty( $options['run-disabled'] );
                $this->runParsoid = !empty( $options['run-parsoid'] );
 
-               $this->djVuSupport = new DjVuSupport();
                $this->tidySupport = new TidySupport( !empty( $options['use-tidy-config'] ) );
                if ( !$this->tidySupport->isEnabled() ) {
                        $this->recorder->warning(
@@ -181,7 +176,7 @@ class ParserTestRunner {
                // arrays: $setup and $teardown. The code snippets in the $setup array
                // are executed at the end of the method, before it returns, and the
                // code snippets in the $teardown array are executed in reverse order
-               // when the ScopedCallback object is consumed.
+               // when the Wikimedia\ScopedCallback object is consumed.
 
                // Because it is a common operation to save, set and restore global
                // variables, we have an additional convention: when the array key of
@@ -348,7 +343,8 @@ class ParserTestRunner {
                        $backend = new FSFileBackend( [
                                'name' => 'local-backend',
                                'wikiId' => wfWikiID(),
-                               'basePath' => $this->uploadDir
+                               'basePath' => $this->uploadDir,
+                               'tmpDirectory' => wfTempDir()
                        ] );
                } elseif ( $this->fileBackendName ) {
                        global $wgFileBackends;
@@ -379,7 +375,7 @@ class ParserTestRunner {
 
                return new RepoGroup(
                        [
-                               'class' => 'LocalRepo',
+                               'class' => 'MockLocalRepo',
                                'name' => 'local',
                                'url' => 'http://example.com/images',
                                'hashLevels' => 2,
@@ -455,7 +451,6 @@ class ParserTestRunner {
                }
                $this->setupDone[$funcName] = true;
                return function () use ( $funcName ) {
-                       wfDebug( "markSetupDone unmarked $funcName" );
                        $this->setupDone[$funcName] = false;
                };
        }
@@ -751,14 +746,6 @@ class ParserTestRunner {
                $user = $context->getUser();
                $options = ParserOptions::newFromContext( $context );
 
-               if ( isset( $opts['djvu'] ) ) {
-                       if ( !$this->djVuSupport->isEnabled() ) {
-                               $this->recorder->skipped( $test,
-                                       'djvu binaries do not exist or are not executable' );
-                               return false;
-                       }
-               }
-
                if ( isset( $opts['tidy'] ) ) {
                        if ( !$this->tidySupport->isEnabled() ) {
                                $this->recorder->skipped( $test, 'tidy extension is not installed' );
@@ -1027,7 +1014,6 @@ class ParserTestRunner {
                };
 
                // Set content language. This invalidates the magic word cache and title services
-               wfDebug( "Setting up language $langCode" );
                $lang = Language::factory( $langCode );
                $setup['wgContLang'] = $lang;
                $reset = function () {
@@ -1523,7 +1509,7 @@ class ParserTestRunner {
                }
 
                // The RepoGroup cache is invalidated by the creation of file redirects
-               if ( $title->getNamespace() === NS_IMAGE ) {
+               if ( $title->inNamespace( NS_FILE ) ) {
                        RepoGroup::singleton()->clearCache( $title );
                }
        }
index a1a8d19..6279d68 100644 (file)
@@ -25,6 +25,7 @@ class TestFileReader {
        private $section = null;
        /** String|null: current test section being analyzed */
        private $sectionData = [];
+       private $sectionLineNum = [];
        private $lineNum = 0;
        private $runDisabled;
        private $runParsoid;
@@ -77,44 +78,83 @@ class TestFileReader {
                // "input" and "result" are old section names allowed
                // for backwards-compatibility.
                $input = $this->checkSection( [ 'wikitext', 'input' ], false );
-               $result = $this->checkSection( [ 'html/php', 'html/*', 'html', 'result' ], false );
+               $nonTidySection = $this->checkSection(
+                       [ 'html/php', 'html/*', 'html', 'result' ], false );
                // Some tests have "with tidy" and "without tidy" variants
-               $tidy = $this->checkSection( [ 'html/php+tidy', 'html+tidy' ], false );
+               $tidySection = $this->checkSection( [ 'html/php+tidy', 'html+tidy' ], false );
 
-               if ( !isset( $this->sectionData['options'] ) ) {
-                       $this->sectionData['options'] = '';
+               // Remove trailing newline
+               $data = array_map( 'ParserTestRunner::chomp', $this->sectionData );
+
+               // Apply defaults
+               $data += [
+                       'options' => '',
+                       'config' => ''
+               ];
+
+               if ( $input === false ) {
+                       throw new MWException( "Test at {$this->file}:{$this->sectionLineNum['test']} " .
+                               "lacks input section" );
+               }
+
+               if ( preg_match( '/\\bdisabled\\b/i', $data['options'] ) &&     !$this->runDisabled ) {
+                       // Disabled
+                       return;
                }
 
-               if ( !isset( $this->sectionData['config'] ) ) {
-                       $this->sectionData['config'] = '';
+               if ( $tidySection === false && $nonTidySection === false ) {
+                       if ( isset( $data['html/parsoid'] ) || isset( $data['wikitext/edited'] ) ) {
+                               // Parsoid only
+                               return;
+                       } else {
+                               throw new MWException( "Test at {$this->file}:{$this->sectionLineNum['test']} " .
+                                       "lacks result section" );
+                       }
+               }
+
+               if ( preg_match( '/\\bparsoid\\b/i', $data['options'] ) && $nonTidySection === 'html'
+                       && !$this->runParsoid
+               ) {
+                       // A test which normally runs on Parsoid but can optionally be run with MW
+                       return;
                }
 
-               $isDisabled = preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] ) &&
-                       !$this->runDisabled;
-               $isParsoidOnly = preg_match( '/\\bparsoid\\b/i', $this->sectionData['options'] ) &&
-                       $result == 'html' &&
-                       !$this->runParsoid;
-               $isFiltered = !preg_match( $this->regex, $this->sectionData['test'] );
-               if ( $input == false || $result == false || $isDisabled || $isParsoidOnly || $isFiltered ) {
-                       // Disabled test
+               if ( !preg_match( $this->regex, $data['test'] ) ) {
+                       // Filtered test
                        return;
                }
 
-               $test = [
-                       'test' => ParserTestRunner::chomp( $this->sectionData['test'] ),
-                       'input' => ParserTestRunner::chomp( $this->sectionData[$input] ),
-                       'result' => ParserTestRunner::chomp( $this->sectionData[$result] ),
-                       'options' => ParserTestRunner::chomp( $this->sectionData['options'] ),
-                       'config' => ParserTestRunner::chomp( $this->sectionData['config'] ),
+               $commonInfo = [
+                       'test' => $data['test'],
+                       'desc' => $data['test'],
+                       'input' => $data[$input],
+                       'options' => $data['options'],
+                       'config' => $data['config'],
                ];
-               $test['desc'] = $test['test'];
-               $this->tests[] = $test;
-
-               if ( $tidy !== false ) {
-                       $test['options'] .= " tidy";
-                       $test['desc'] .= ' (with tidy)';
-                       $test['result'] = ParserTestRunner::chomp( $this->sectionData[$tidy] );
-                       $this->tests[] = $test;
+
+               if ( $nonTidySection !== false ) {
+                       // Add non-tidy test
+                       $this->tests[] = [
+                               'result' => $data[$nonTidySection],
+                       ] + $commonInfo;
+
+                       if ( $tidySection !== false ) {
+                               // Add tidy subtest
+                               $this->tests[] = [
+                                       'desc' => $data['test'] . ' (with tidy)',
+                                       'result' => $data[$tidySection],
+                                       'options' => $data['options'] . ' tidy',
+                               ] + $commonInfo;
+                       }
+               } elseif ( $tidySection !== false ) {
+                       // No need to override desc when there is no subtest
+                       $this->tests[] = [
+                               'result' => $data[$tidySection],
+                               'options' => $data['options'] . ' tidy'
+                       ] + $commonInfo;
+               } else {
+                       throw new MWException( "Test at {$this->file}:{$this->sectionLineNum['test']} " .
+                               "lacks result section" );
                }
        }
 
@@ -199,6 +239,7 @@ class TestFileReader {
                                                . "at line {$this->lineNum} of $this->file\n" );
                                }
 
+                               $this->sectionLineNum[$this->section] = $this->lineNum;
                                $this->sectionData[$this->section] = '';
 
                                continue;
@@ -214,6 +255,7 @@ class TestFileReader {
         * Clear section name and its data
         */
        private function clearSection() {
+               $this->sectionLineNum = [];
                $this->sectionData = [];
                $this->section = null;
 
index 7437053..9a2a9c9 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Wikimedia\ScopedCallback;
+
 require __DIR__ . '/../../maintenance/Maintenance.php';
 
 // Make RequestContext::resetMain() happy
index 2c8b163..ba7b0d4 100644 (file)
@@ -3681,6 +3681,10 @@ Nested definition lists using html syntax
 <dl><dt>x</dt>
 <dd>a</dd>
 <dd>b</dd></dl>
+!! html
+<dl><dt>x</dt>
+<dd>a</dd>
+<dd>b</dd></dl>
 
 !! end
 
@@ -14726,8 +14730,10 @@ Simple category
 cat
 !! wikitext
 [[Category:MediaWiki User's Guide]]
-!! html
+!! html/php
 cat=MediaWiki_User's_Guide sort=
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide" data-parsoid='{"stx":"simple","a":{"href":"./Category:MediaWiki_User&#39;s_Guide"},"sa":{"href":"Category:MediaWiki User&#39;s Guide"}}'/>
 !! end
 
 !! test
@@ -14745,8 +14751,10 @@ Category with different sort key
 cat
 !! wikitext
 [[Category:MediaWiki User's Guide|Foo]]
-!! html
+!! html/php
 cat=MediaWiki_User's_Guide sort=Foo
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#Foo" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User&#39;s_Guide"},"sa":{"href":"Category:MediaWiki User&#39;s Guide"}}'/>
 !! end
 
 !! test
@@ -14755,8 +14763,10 @@ Category with identical sort key
 cat
 !! wikitext
 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
-!! html
+!! html/php
 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#MediaWiki%20User's%20Guide" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User&#39;s_Guide"},"sa":{"href":"Category:MediaWiki User&#39;s Guide"}}'/>
 !! end
 
 !! test
@@ -14781,22 +14791,15 @@ pst
 [[Category:Foo (bar)|Foo]]
 !! end
 
-## We used to, but no longer wt2wt this test since the default serializer
-## will normalize all categories to serialize on their own line.
-## This wikitext usage is going to be fairly uncommon in production and
-## selser will take care of preserving formatting in those scenarios.
 !! test
 Category with link tail
 !! options
 cat
 pst
-parsoid=wt2html
 !! wikitext
 123[[Category:Foo]]456
 !! html/php
 123[[Category:Foo]]456
-!! html/parsoid
-<p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
 !! end
 
 !! test
@@ -16707,11 +16710,11 @@ Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
 !! end
 
 !! test
-evil <math>-wiki-tags without Extension:Math enabled
+Tags which are hidden from Tidy cannot pass through the Sanitizer
 !! wikitext
-<math><img src="some evil external link"><script>some_evil_javascript();</script></math>
+<mw:toc><script>alert();</script></mw:toc>
 !! html+tidy
-<p>&lt;math&gt;&lt;img src="some evil external link"&gt;&lt;script&gt;some_evil_javascript();&lt;/script&gt;&lt;/math&gt;</p>
+<p>&lt;mw:toc&gt;&lt;script&gt;alert();&lt;/script&gt;&lt;/mw:toc&gt;</p>
 !! end
 
 ###
@@ -19860,18 +19863,18 @@ language=sr
 </p>
 !! end
 
-
 !! test
 Simple category in language variants
 !! options
 language=sr cat
 !! wikitext
 [[Category:МедиаWики Усер'с Гуиде]]
-!! html
+!! html/php
 cat=МедиаWики_Усер'с_Гуиде sort=
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер&#39;с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер&#39;с Гуиде"}}'/>
 !! end
 
-
 !! article
 Category:分类
 !! text
@@ -20905,6 +20908,26 @@ Id starting with underscore
 
 !! end
 
+!! test
+Edit comment with link with more than one pipe (T99346)
+!! options
+comment
+!! wikitext
+[[Main Page|Many|pipes]]
+!! html
+<a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
+!! end
+
+!! test
+Complex edit comment with link with more than one pipe (T99346)
+!! options
+comment
+!! wikitext
+Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
+!! html
+Created page with &quot;&lt;noinclude&gt;<a href="/index.php?title=Category:Requests_for_permissions/Bot&amp;action=edit&amp;redlink=1" class="new" title="Category:Requests for permissions/Bot (page does not exist)">{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}</a>&lt;/noinclude&gt; === <a href="/index.php?title=User:MineoBot&amp;action=edit&amp;redlink=1" class="new" title="User:MineoBot (page does not exist)">User:MineoBot</a> 8=== {{Request for permissions/links|Mineo...&quot;
+!! end
+
 !! test
 Space normalisation on autocomment (bug 22784)
 !! options
@@ -21631,6 +21654,22 @@ __TOC__
 
 !! end
 
+!! test
+T35715: s/strike element in ToC
+!! wikitext
+__TOC__
+== <s>test</s> test <strike>test</strike> ==
+!! html
+<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#test_test_test"><span class="tocnumber">1</span> <span class="toctext"><s>test</s> test <strike>test</strike></span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="test_test_test"><s>test</s> test <strike>test</strike></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: test test test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
 # Note that the html output does not have the <p></p>, but the
 # html+tidy output *does*.  This is because the empty <p></p> is
 # removed by the sanitizer, but only when tidy is *not* enabled (!).
@@ -24784,9 +24823,16 @@ Improperly nested inline or quotes tags with whitespace in between
 Encapsulate protected attributes from wt
 !! wikitext
 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
+
+{| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
+| ok
+|}
 !! html/parsoid
-<body><div data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
-</body>
+<div data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
+
+<table data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">
+<tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
+</tbody></table>
 !!end
 
 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
index 920dbb3..9599016 100644 (file)
@@ -42,7 +42,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
        /**
         * Primary database
         *
-        * @var DatabaseBase
+        * @var Database
         * @since 1.18
         */
        protected $db;
@@ -56,7 +56,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
        private static $useTemporaryTables = true;
        private static $reuseDB = false;
        private static $dbSetup = false;
-       private static $oldTablePrefix = false;
+       private static $oldTablePrefix = '';
 
        /**
         * Original value of PHP's error_reporting setting.
@@ -242,7 +242,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                 * which we can't allow, as that would open a new connection for mysql.
                 * Replace with a HashBag. They would not be going to persist anyway.
                 */
-               $hashCache = [ 'class' => 'HashBagOStuff' ];
+               $hashCache = [ 'class' => 'HashBagOStuff', 'reportDupes' => false ];
                $objectCaches = [
                                CACHE_DB => $hashCache,
                                CACHE_ACCEL => $hashCache,
@@ -336,6 +336,10 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
 
                JobQueueGroup::destroySingletons();
                ObjectCache::clear();
+               $services = MediaWikiServices::getInstance();
+               $services->resetServiceForTesting( 'MainObjectStash' );
+               $services->resetServiceForTesting( 'LocalServerObjectCache' );
+               $services->getMainWANObjectCache()->clearProcessCache();
                FileBackendGroup::destroySingleton();
 
                // TODO: move global state into MediaWikiServices
@@ -920,13 +924,22 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         *
         * Should be called from addDBData().
         *
-        * @since 1.25
-        * @param string $pageName Page name
+        * @since 1.25 ($namespace in 1.28)
+        * @param string|title $pageName Page name or title
         * @param string $text Page's content
+        * @param int $namespace Namespace id (name cannot already contain namespace)
         * @return array Title object and page id
         */
-       protected function insertPage( $pageName, $text = 'Sample page for unit test.' ) {
-               $title = Title::newFromText( $pageName, 0 );
+       protected function insertPage(
+               $pageName,
+               $text = 'Sample page for unit test.',
+               $namespace = null
+       ) {
+               if ( is_string( $pageName ) ) {
+                       $title = Title::newFromText( $pageName, $namespace );
+               } else {
+                       $title = $pageName;
+               }
 
                $user = static::getTestSysop()->getUser();
                $comment = __METHOD__ . ': Sample page for unit test.';
@@ -1061,11 +1074,11 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         * Clones all tables in the given database (whatever database that connection has
         * open), to versions with the test prefix.
         *
-        * @param DatabaseBase $db Database to use
+        * @param Database $db Database to use
         * @param string $prefix Prefix to use for test tables
         * @return bool True if tables were cloned, false if only the prefix was changed
         */
-       protected static function setupDatabaseWithTestPrefix( DatabaseBase $db, $prefix ) {
+       protected static function setupDatabaseWithTestPrefix( Database $db, $prefix ) {
                $tablesCloned = self::listTables( $db );
                $dbClone = new CloneDatabase( $db, $tablesCloned, $prefix );
                $dbClone->useTemporaryTables( self::$useTemporaryTables );
@@ -1114,12 +1127,12 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         * @note this method only works when first called. Subsequent calls have no effect,
         * even if using different parameters.
         *
-        * @param DatabaseBase $db The database connection
+        * @param Database $db The database connection
         * @param string $prefix The prefix to use for the new table set (aka schema).
         *
         * @throws MWException If the database table prefix is already $prefix
         */
-       public static function setupTestDB( DatabaseBase $db, $prefix ) {
+       public static function setupTestDB( Database $db, $prefix ) {
                if ( self::$dbSetup ) {
                        return;
                }
@@ -1130,7 +1143,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                }
 
                // TODO: the below should be re-written as soon as LBFactory, LoadBalancer,
-               // and DatabaseBase no longer use global state.
+               // and Database no longer use global state.
 
                self::$dbSetup = true;
 
@@ -1169,19 +1182,23 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         * Gets master database connections for all of the ExternalStoreDB
         * stores configured in $wgDefaultExternalStore.
         *
-        * @return array Array of DatabaseBase master connections
+        * @return Database[] Array of Database master connections
         */
 
        protected static function getExternalStoreDatabaseConnections() {
                global $wgDefaultExternalStore;
 
+               /** @var ExternalStoreDB $externalStoreDB */
                $externalStoreDB = ExternalStore::getStoreObject( 'DB' );
                $defaultArray = (array) $wgDefaultExternalStore;
                $dbws = [];
                foreach ( $defaultArray as $url ) {
                        if ( strpos( $url, 'DB://' ) === 0 ) {
                                list( $proto, $cluster ) = explode( '://', $url, 2 );
-                               $dbw = $externalStoreDB->getMaster( $cluster );
+                               // Avoid getMaster() because setupDatabaseWithTestPrefix()
+                               // requires Database instead of plain DBConnRef/IDatabase
+                               $lb = $externalStoreDB->getLoadBalancer( $cluster );
+                               $dbw = $lb->getConnection( DB_MASTER );
                                $dbws[] = $dbw;
                        }
                }
@@ -1213,7 +1230,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
        /**
         * Empty all tables so they can be repopulated for tests
         *
-        * @param DatabaseBase $db|null Database to reset
+        * @param Database $db|null Database to reset
         * @param array $tablesUsed Tables to reset
         */
        private function resetDB( $db, $tablesUsed ) {
@@ -1296,18 +1313,21 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
        /**
         * @since 1.18
         *
-        * @param DatabaseBase $db
+        * @param Database $db
         *
         * @return array
         */
-       public static function listTables( $db ) {
+       public static function listTables( Database $db ) {
                $prefix = $db->tablePrefix();
                $tables = $db->listTables( $prefix, __METHOD__ );
 
                if ( $db->getType() === 'mysql' ) {
-                       # bug 43571: cannot clone VIEWs under MySQL
-                       $views = $db->listViews( $prefix, __METHOD__ );
-                       $tables = array_diff( $tables, $views );
+                       static $viewListCache = null;
+                       if ( $viewListCache === null ) {
+                               $viewListCache = $db->listViews( null, __METHOD__ );
+                       }
+                       // T45571: cannot clone VIEWs under MySQL
+                       $tables = array_diff( $tables, $viewListCache );
                }
                array_walk( $tables, [ __CLASS__, 'unprefixTable' ], $prefix );
 
index 18a49f6..8eb1fd5 100644 (file)
@@ -4,6 +4,11 @@ use Psr\Log\LoggerInterface;
 use Psr\Log\NullLogger;
 
 abstract class ResourceLoaderTestCase extends MediaWikiTestCase {
+       // Version hash for a blank file module.
+       // Result of ResourceLoader::makeHash(), ResourceLoaderTestModule
+       // and ResourceLoaderFileModule::getDefinitionSummary().
+       const BLANK_VERSION = '09p30q0';
+
        /**
         * @param string $lang
         * @param string $dir
@@ -22,9 +27,7 @@ abstract class ResourceLoaderTestCase extends MediaWikiTestCase {
                        ->setConstructorArgs( [ $resourceLoader, $request ] )
                        ->setMethods( [ 'getDirection' ] )
                        ->getMock();
-               $ctx->expects( $this->any() )->method( 'getDirection' )->will(
-                       $this->returnValue( $dir )
-               );
+               $ctx->method( 'getDirection' )->willReturn( $dir );
                return $ctx;
        }
 
diff --git a/tests/phpunit/data/upload/buggynamespace-bad.svg b/tests/phpunit/data/upload/buggynamespace-bad.svg
new file mode 100644 (file)
index 0000000..974fac0
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1"
+        id="svg2" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:svg="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:cc="http://creativecommons.org/ns#" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:version="0.32" sodipodi:docname="India_location_map.svg" inkscape:version="0.46"
+        xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1500px"
+        height="1614.844px" viewBox="0 0 1500 1614.844" enable-background="new 0 0 1500 1614.844" xml:space="preserve">
+<switch>
+       <foreignObject requiredExtensions="&ns_ai;" x="0" y="0" width="1" height="1">
+               <i:pgfRef  xlink:href="#adobe_illustrator_pgf">
+               </i:pgfRef>
+       </foreignObject>
+       <g i:extraneous="self">
+               <circle cx="750" cy="750" r="500" />
+       </g>
+</switch>
+<i:pgf  id="adobe_illustrator_pgf">
+       <![CDATA[
+       eJzsvWl3XjXyL3pf91r9HZ50MyQkfrw1awcIZCBAYyAQaEIzBMd+krjx1LYDzf/F+exXNUml/Qwx
+d1/++qv/+P2XX3/z1fc//9mvf/jyH796+/Lbc2Z9+eNXvzn/9Pbr77/64cfvvv/q7Ye//+53hNBH
++sFf/MXf/Nv/5ec/+38A7g2BFw==
+       ]]>
+</i:pgf>
+</svg>
diff --git a/tests/phpunit/data/upload/buggynamespace-evilhtml.svg b/tests/phpunit/data/upload/buggynamespace-evilhtml.svg
new file mode 100644 (file)
index 0000000..f4be479
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+       <!ENTITY ns_html "http://www.w3.org/1999/xhtml">
+]>
+<svg:svg version="1.1"
+        id="svg2"
+        xmlns="&ns_html;"
+        xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1500px"
+        height="1614.844px" viewBox="0 0 1500 1614.844" enable-background="new 0 0 1500 1614.844" xml:space="preserve">
+       <svg:g><div>foo</div></svg:g>
+</svg:svg>
diff --git a/tests/phpunit/data/upload/buggynamespace-okay.svg b/tests/phpunit/data/upload/buggynamespace-okay.svg
new file mode 100644 (file)
index 0000000..4a5c6aa
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:i="&amp;ns_ai;"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   version="1.1"
+   width="1500"
+   height="1614.844"
+   viewBox="0 0 1500 1614.844"
+   id="svg2"
+   xml:space="preserve"><metadata
+   id="metadata15"><rdf:RDF><cc:Work
+       rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+         rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+   id="defs13" />
+<switch
+   id="switch3">
+       <foreignObject
+   id="foreignObject5"
+   height="1"
+   width="1"
+   y="0"
+   x="0"
+   requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/">
+               <i:pgfRef
+   xlink:href="#adobe_illustrator_pgf">
+               </i:pgfRef>
+       </foreignObject>
+       <g
+   id="g7">
+               <circle
+   cx="750"
+   cy="750"
+   r="500"
+   id="circle9" />
+       </g>
+</switch>
+<i:pgf
+   id="adobe_illustrator_pgf">
+       
+       eJzsvWl3XjXyL3pf91r9HZ50MyQkfrw1awcIZCBAYyAQaEIzBMd+krjx1LYDzf/F+exXNUml/Qwx
+d1/++qv/+P2XX3/z1fc//9mvf/jyH796+/Lbc2Z9+eNXvzn/9Pbr77/64cfvvv/q7Ye//+53hNBH
++sFf/MXf/Nv/5ec/+38A7g2BFw==
+       
+</i:pgf>
+</svg>
\ No newline at end of file
diff --git a/tests/phpunit/data/upload/buggynamespace-okay2.svg b/tests/phpunit/data/upload/buggynamespace-okay2.svg
new file mode 100644 (file)
index 0000000..fe42310
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:i="&amp;#38;ns_ai;"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   version="1.1"
+   width="1500"
+   height="1614.844"
+   viewBox="0 0 1500 1614.844"
+   id="svg2"
+   xml:space="preserve"><metadata
+   id="metadata15"><rdf:RDF><cc:Work
+       rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+         rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+   id="defs13" />
+<switch
+   id="switch3">
+       <foreignObject
+   requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/"
+   x="0"
+   y="0"
+   width="1"
+   height="1"
+   id="foreignObject5">
+               <i:pgfRef
+   xlink:href="#adobe_illustrator_pgf">
+               </i:pgfRef>
+       </foreignObject>
+       <g
+   id="g7">
+               <circle
+   cx="750"
+   cy="750"
+   r="500"
+   id="circle9" />
+       </g>
+</switch>
+<i:pgf
+   id="adobe_illustrator_pgf">
+       
+       eJzsvWl3XjXyL3pf91r9HZ50MyQkfrw1awcIZCBAYyAQaEIzBMd+krjx1LYDzf/F+exXNUml/Qwx
+d1/++qv/+P2XX3/z1fc//9mvf/jyH796+/Lbc2Z9+eNXvzn/9Pbr77/64cfvvv/q7Ye//+53hNBH
++sFf/MXf/Nv/5ec/+38A7g2BFw==
+       
+</i:pgf>
+</svg>
\ No newline at end of file
diff --git a/tests/phpunit/data/upload/buggynamespace-original.svg b/tests/phpunit/data/upload/buggynamespace-original.svg
new file mode 100644 (file)
index 0000000..c61c91c
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+       <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
+       <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
+       <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
+       <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
+       <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
+       <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
+       <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
+       <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
+]>
+<svg version="1.1"
+        id="svg2" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:svg="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:cc="http://creativecommons.org/ns#" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:version="0.32" sodipodi:docname="India_location_map.svg" inkscape:version="0.46"
+        xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1500px"
+        height="1614.844px" viewBox="0 0 1500 1614.844" enable-background="new 0 0 1500 1614.844" xml:space="preserve">
+<switch>
+       <foreignObject requiredExtensions="&ns_ai;" x="0" y="0" width="1" height="1">
+               <i:pgfRef  xlink:href="#adobe_illustrator_pgf">
+               </i:pgfRef>
+       </foreignObject>
+       <g i:extraneous="self">
+               <circle cx="750" cy="750" r="500" />
+       </g>
+</switch>
+<i:pgf  id="adobe_illustrator_pgf">
+       <![CDATA[
+       eJzsvWl3XjXyL3pf91r9HZ50MyQkfrw1awcIZCBAYyAQaEIzBMd+krjx1LYDzf/F+exXNUml/Qwx
+d1/++qv/+P2XX3/z1fc//9mvf/jyH796+/Lbc2Z9+eNXvzn/9Pbr77/64cfvvv/q7Ye//+53hNBH
++sFf/MXf/Nv/5ec/+38A7g2BFw==
+       ]]>
+</i:pgf>
+</svg>
index c76666d..8fbca6c 100644 (file)
@@ -11,7 +11,7 @@ class WfBCP47Test extends MediaWikiTestCase {
         * This test is used to verify our formatting against all lower and
         * all upper cases language code.
         *
-        * @see http://tools.ietf.org/html/bcp47
+        * @see https://tools.ietf.org/html/bcp47
         * @dataProvider provideLanguageCodes()
         */
        public function testBCP47( $code, $expected ) {
index 85c95e4..bc50966 100644 (file)
@@ -514,10 +514,6 @@ class HtmlTest extends MediaWikiTestCase {
                        'canvas', [ 'width' => 300 ]
                ];
 
-               $cases[] = [ '<command/>',
-                       'command', [ 'type' => 'command' ]
-               ];
-
                $cases[] = [ '<form></form>',
                        'form', [ 'action' => 'GET' ]
                ];
index 70e4aea..4bca478 100644 (file)
@@ -4,7 +4,6 @@
  * Tests timestamp parsing and output.
  */
 class MWTimestampTest extends MediaWikiLangTestCase {
-
        protected function setUp() {
                parent::setUp();
 
@@ -12,128 +11,6 @@ class MWTimestampTest extends MediaWikiLangTestCase {
                $this->setMwGlobals( 'wgHooks', [] );
        }
 
-       /**
-        * @covers MWTimestamp::__construct
-        */
-       public function testConstructWithNoTimestamp() {
-               $timestamp = new MWTimestamp();
-               $this->assertInternalType( 'string', $timestamp->getTimestamp() );
-               $this->assertNotEmpty( $timestamp->getTimestamp() );
-               $this->assertNotEquals( false, strtotime( $timestamp->getTimestamp( TS_MW ) ) );
-       }
-
-       /**
-        * @covers MWTimestamp::__toString
-        */
-       public function testToString() {
-               $timestamp = new MWTimestamp( '1406833268' ); // Equivalent to 20140731190108
-               $this->assertEquals( '1406833268', $timestamp->__toString() );
-       }
-
-       public static function provideValidTimestampDifferences() {
-               return [
-                       [ '1406833268', '1406833269', '00 00 00 01' ],
-                       [ '1406833268', '1406833329', '00 00 01 01' ],
-                       [ '1406833268', '1406836929', '00 01 01 01' ],
-                       [ '1406833268', '1406923329', '01 01 01 01' ],
-               ];
-       }
-
-       /**
-        * @dataProvider provideValidTimestampDifferences
-        * @covers MWTimestamp::diff
-        */
-       public function testDiff( $timestamp1, $timestamp2, $expected ) {
-               $timestamp1 = new MWTimestamp( $timestamp1 );
-               $timestamp2 = new MWTimestamp( $timestamp2 );
-               $diff = $timestamp1->diff( $timestamp2 );
-               $this->assertEquals( $expected, $diff->format( '%D %H %I %S' ) );
-       }
-
-       /**
-        * Test parsing of valid timestamps and outputing to MW format.
-        * @dataProvider provideValidTimestamps
-        * @covers MWTimestamp::getTimestamp
-        */
-       public function testValidParse( $format, $original, $expected ) {
-               $timestamp = new MWTimestamp( $original );
-               $this->assertEquals( $expected, $timestamp->getTimestamp( TS_MW ) );
-       }
-
-       /**
-        * Test outputting valid timestamps to different formats.
-        * @dataProvider provideValidTimestamps
-        * @covers MWTimestamp::getTimestamp
-        */
-       public function testValidOutput( $format, $expected, $original ) {
-               $timestamp = new MWTimestamp( $original );
-               $this->assertEquals( $expected, (string)$timestamp->getTimestamp( $format ) );
-       }
-
-       /**
-        * Test an invalid timestamp.
-        * @expectedException TimestampException
-        * @covers MWTimestamp
-        */
-       public function testInvalidParse() {
-               new MWTimestamp( "This is not a timestamp." );
-       }
-
-       /**
-        * Test an out of range timestamp
-        * @dataProvider provideOutOfRangeTimestamps
-        * @expectedException TimestampException
-        * @covers MWTimestamp
-        */
-       public function testOutOfRangeTimestamps( $format, $input ) {
-               $timestamp = new MWTimestamp( $input );
-               $timestamp->getTimestamp( $format );
-       }
-
-       /**
-        * Test requesting an invalid output format.
-        * @expectedException TimestampException
-        * @covers MWTimestamp::getTimestamp
-        */
-       public function testInvalidOutput() {
-               $timestamp = new MWTimestamp( '1343761268' );
-               $timestamp->getTimestamp( 98 );
-       }
-
-       /**
-        * Returns a list of valid timestamps in the format:
-        * [ type, timestamp_of_type, timestamp_in_MW ]
-        */
-       public static function provideValidTimestamps() {
-               return [
-                       // Various formats
-                       [ TS_UNIX, '1343761268', '20120731190108' ],
-                       [ TS_MW, '20120731190108', '20120731190108' ],
-                       [ TS_DB, '2012-07-31 19:01:08', '20120731190108' ],
-                       [ TS_ISO_8601, '2012-07-31T19:01:08Z', '20120731190108' ],
-                       [ TS_ISO_8601_BASIC, '20120731T190108Z', '20120731190108' ],
-                       [ TS_EXIF, '2012:07:31 19:01:08', '20120731190108' ],
-                       [ TS_RFC2822, 'Tue, 31 Jul 2012 19:01:08 GMT', '20120731190108' ],
-                       [ TS_ORACLE, '31-07-2012 19:01:08.000000', '20120731190108' ],
-                       [ TS_POSTGRES, '2012-07-31 19:01:08 GMT', '20120731190108' ],
-                       // Some extremes and weird values
-                       [ TS_ISO_8601, '9999-12-31T23:59:59Z', '99991231235959' ],
-                       [ TS_UNIX, '-62135596801', '00001231235959' ]
-               ];
-       }
-
-       /**
-        * Returns a list of out of range timestamps in the format:
-        * [ type, timestamp_of_type ]
-        */
-       public static function provideOutOfRangeTimestamps() {
-               return [
-                       // Various formats
-                       [ TS_MW, '-62167219201' ], // -0001-12-31T23:59:59Z
-                       [ TS_MW, '253402300800' ], // 10000-01-01T00:00:00Z
-               ];
-       }
-
        /**
         * @dataProvider provideHumanTimestampTests
         * @covers MWTimestamp::getHumanTimestamp
index 8c2b143..a5e2ac0 100644 (file)
@@ -147,9 +147,6 @@ class MediaWikiServicesTest extends MediaWikiTestCase {
                        ->disableOriginalConstructor()
                        ->getMock();
 
-               $lbFactory->expects( $this->once() )
-                       ->method( 'destroy' );
-
                $newServices->redefineService(
                        'DBLoadBalancerFactory',
                        function() use ( $lbFactory ) {
@@ -164,12 +161,11 @@ class MediaWikiServicesTest extends MediaWikiTestCase {
 
                try {
                        MediaWikiServices::getInstance()->getService( 'DBLoadBalancerFactory' );
-                       $this->fail( 'DBLoadBalancerFactory shoudl have been disabled' );
+                       $this->fail( 'DBLoadBalancerFactory should have been disabled' );
                }
                catch ( ServiceDisabledException $ex ) {
                        // ok, as expected
-               }
-               catch ( Throwable $ex ) {
+               } catch ( Throwable $ex ) {
                        $this->fail( 'ServiceDisabledException expected, caught ' . get_class( $ex ) );
                }
 
@@ -316,14 +312,21 @@ class MediaWikiServicesTest extends MediaWikiTestCase {
                        'DBLoadBalancer' => [ 'DBLoadBalancer', 'LoadBalancer' ],
                        'WatchedItemStore' => [ 'WatchedItemStore', WatchedItemStore::class ],
                        'WatchedItemQueryService' => [ 'WatchedItemQueryService', WatchedItemQueryService::class ],
+                       'CryptRand' => [ 'CryptRand', CryptRand::class ],
+                       'CryptHKDF' => [ 'CryptHKDF', CryptHKDF::class ],
                        'MediaHandlerFactory' => [ 'MediaHandlerFactory', MediaHandlerFactory::class ],
                        'GenderCache' => [ 'GenderCache', GenderCache::class ],
                        'LinkCache' => [ 'LinkCache', LinkCache::class ],
                        'LinkRenderer' => [ 'LinkRenderer', LinkRenderer::class ],
                        'LinkRendererFactory' => [ 'LinkRendererFactory', LinkRendererFactory::class ],
                        '_MediaWikiTitleCodec' => [ '_MediaWikiTitleCodec', MediaWikiTitleCodec::class ],
+                       'MimeAnalyzer' => [ 'MimeAnalyzer', MimeAnalyzer::class ],
                        'TitleFormatter' => [ 'TitleFormatter', TitleFormatter::class ],
                        'TitleParser' => [ 'TitleParser', TitleParser::class ],
+                       'ProxyLookup' => [ 'ProxyLookup', ProxyLookup::class ],
+                       'MainObjectStash' => [ 'MainObjectStash', BagOStuff::class ],
+                       'MainWANObjectCache' => [ 'MainWANObjectCache', WANObjectCache::class ],
+                       'LocalServerObjectCache' => [ 'LocalServerObjectCache', BagOStuff::class ],
                        'VirtualRESTServiceClient' => [ 'VirtualRESTServiceClient', VirtualRESTServiceClient::class ]
                ];
        }
diff --git a/tests/phpunit/includes/MimeMagicTest.php b/tests/phpunit/includes/MimeMagicTest.php
deleted file mode 100644 (file)
index e00cf0c..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-class MimeMagicTest extends PHPUnit_Framework_TestCase {
-
-       /** @var MimeMagic */
-       private $mimeMagic;
-
-       function setUp() {
-               $this->mimeMagic = MimeMagic::singleton();
-               parent::setUp();
-       }
-
-       /**
-        * @dataProvider providerImproveTypeFromExtension
-        * @param string $ext File extension (no leading dot)
-        * @param string $oldMime Initially detected MIME
-        * @param string $expectedMime MIME type after taking extension into account
-        */
-       function testImproveTypeFromExtension( $ext, $oldMime, $expectedMime ) {
-               $actualMime = $this->mimeMagic->improveTypeFromExtension( $oldMime, $ext );
-               $this->assertEquals( $expectedMime, $actualMime );
-       }
-
-       function providerImproveTypeFromExtension() {
-               return [
-                       [ 'gif', 'image/gif', 'image/gif' ],
-                       [ 'gif', 'unknown/unknown', 'unknown/unknown' ],
-                       [ 'wrl', 'unknown/unknown', 'model/vrml' ],
-                       [ 'txt', 'text/plain', 'text/plain' ],
-                       [ 'csv', 'text/plain', 'text/csv' ],
-                       [ 'tsv', 'text/plain', 'text/tab-separated-values' ],
-                       [ 'js', 'text/javascript', 'application/javascript' ],
-                       [ 'js', 'application/x-javascript', 'application/javascript' ],
-                       [ 'json', 'text/plain', 'application/json' ],
-                       [ 'foo', 'application/x-opc+zip', 'application/zip' ],
-                       [ 'docx', 'application/x-opc+zip',
-                               'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ],
-                       [ 'djvu', 'image/x-djvu', 'image/vnd.djvu' ],
-                       [ 'wav', 'audio/wav', 'audio/wav' ],
-               ];
-       }
-
-       /**
-        * Test to make sure that encoder=ffmpeg2theora doesn't trigger
-        * MEDIATYPE_VIDEO (bug 63584)
-        */
-       function testOggRecognize() {
-               $oggFile = __DIR__ . '/../data/media/say-test.ogg';
-               $actualType = $this->mimeMagic->getMediaType( $oggFile, 'application/ogg' );
-               $this->assertEquals( $actualType, MEDIATYPE_AUDIO );
-       }
-}
index 0ec200c..bc43709 100644 (file)
@@ -2,8 +2,11 @@
 /**
  * @group Search
  * @group Database
+ * @covers PrefixSearch
  */
 class PrefixSearchTest extends MediaWikiLangTestCase {
+       const NS_NONCAP = 12346;
+
        private $originalHandlers;
 
        public function addDBDataOnce() {
@@ -31,6 +34,10 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
                $this->insertPage( 'Talk:Example' );
 
                $this->insertPage( 'User:Example' );
+
+               $this->insertPage( Title::makeTitle( self::NS_NONCAP, 'Bar' ) );
+               $this->insertPage( Title::makeTitle( self::NS_NONCAP, 'Upper' ) );
+               $this->insertPage( Title::makeTitle( self::NS_NONCAP, 'sandbox' ) );
        }
 
        protected function setUp() {
@@ -44,11 +51,17 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
                $this->setMwGlobals( [
                        'wgSpecialPages' => [],
                        'wgHooks' => [],
+                       'wgExtraNamespaces' => [ self::NS_NONCAP => 'NonCap' ],
+                       'wgCapitalLinkOverrides' => [ self::NS_NONCAP => false ],
                ] );
 
                $this->originalHandlers = TestingAccessWrapper::newFromClass( 'Hooks' )->handlers;
                TestingAccessWrapper::newFromClass( 'Hooks' )->handlers = [];
 
+               // Clear caches so that our new namespace appears
+               MWNamespace::getCanonicalNamespaces( true );
+               Language::factory( 'en' )->resetNamespaces();
+
                SpecialPageFactory::resetList();
        }
 
@@ -158,6 +171,29 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
                                        'Special:EditWatchlist/clear',
                                ],
                        ] ],
+                       [ [
+                               'Namespace with case sensitive first letter',
+                               'query' => 'NonCap:upper',
+                               'results' => []
+                       ] ],
+                       [ [
+                               'Multinamespace search',
+                               'query' => 'B',
+                               'results' => [
+                                       'Bar',
+                                       'NonCap:Bar',
+                               ],
+                               'namespaces' => [ NS_MAIN, self::NS_NONCAP ],
+                       ] ],
+                       [ [
+                               'Multinamespace search with lowercase first letter',
+                               'query' => 'sand',
+                               'results' => [
+                                       'Sandbox',
+                                       'NonCap:sandbox',
+                               ],
+                               'namespaces' => [ NS_MAIN, self::NS_NONCAP ],
+                       ] ],
                ];
        }
 
@@ -168,8 +204,11 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
         */
        public function testSearch( array $case ) {
                $this->searchProvision( null );
+
+               $namespaces = isset( $case['namespaces'] ) ? $case['namespaces'] : [];
+
                $searcher = new StringPrefixSearch;
-               $results = $searcher->search( $case['query'], 3 );
+               $results = $searcher->search( $case['query'], 3, $namespaces );
                $this->assertEquals(
                        $case['results'],
                        $results,
@@ -184,8 +223,11 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
         */
        public function testSearchWithOffset( array $case ) {
                $this->searchProvision( null );
+
+               $namespaces = isset( $case['namespaces'] ) ? $case['namespaces'] : [];
+
                $searcher = new StringPrefixSearch;
-               $results = $searcher->search( $case['query'], 3, [], 1 );
+               $results = $searcher->search( $case['query'], 3, $namespaces, 1 );
 
                // We don't expect the first result when offsetting
                array_shift( $case['results'] );
index 26529e8..c915b70 100644 (file)
@@ -314,6 +314,8 @@ class SanitizerTest extends MediaWikiTestCase {
                                '/* insecure input */',
                                'background-image: -moz-image-set("asdf.png" 1x, "asdf.png" 2x);'
                        ],
+                       [ '/* insecure input */', 'foo: attr( title, url );' ],
+                       [ '/* insecure input */', 'foo: attr( title url );' ],
                ];
        }
 
index 474a481..7e56ebf 100644 (file)
@@ -57,9 +57,11 @@ class StatusTest extends MediaWikiLangTestCase {
        }
 
        /**
+        * Test 'ok' and 'errors' getters.
         *
+        * @covers Status::__get
         */
-       public function testOkAndErrors() {
+       public function testOkAndErrorsGetters() {
                $status = Status::newGood( 'foo' );
                $this->assertTrue( $status->ok );
                $status = Status::newFatal( 'foo', 1, 2 );
@@ -76,6 +78,19 @@ class StatusTest extends MediaWikiLangTestCase {
                );
        }
 
+       /**
+        * Test 'ok' setter.
+        *
+        * @covers Status::__set
+        */
+       public function testOkSetter() {
+               $status = new Status();
+               $status->ok = false;
+               $this->assertFalse( $status->isOK() );
+               $status->ok = true;
+               $this->assertTrue( $status->isOK() );
+       }
+
        /**
         * @dataProvider provideSetResult
         * @covers Status::setResult
@@ -98,11 +113,12 @@ class StatusTest extends MediaWikiLangTestCase {
 
        /**
         * @dataProvider provideIsOk
-        * @covers Status::isOk
+        * @covers Status::setOK
+        * @covers Status::isOK
         */
        public function testIsOk( $ok ) {
                $status = new Status();
-               $status->ok = $ok;
+               $status->setOK( $ok );
                $this->assertEquals( $ok, $status->isOK() );
        }
 
@@ -128,7 +144,7 @@ class StatusTest extends MediaWikiLangTestCase {
         */
        public function testIsGood( $ok, $errors, $expected ) {
                $status = new Status();
-               $status->ok = $ok;
+               $status->setOK( $ok );
                foreach ( $errors as $error ) {
                        $status->warning( $error );
                }
@@ -171,6 +187,7 @@ class StatusTest extends MediaWikiLangTestCase {
         * @covers Status::error
         * @covers Status::getErrorsArray
         * @covers Status::getStatusArray
+        * @covers Status::getErrors
         */
        public function testErrorWithMessage( $mockDetails ) {
                $status = new Status();
@@ -361,7 +378,7 @@ class StatusTest extends MediaWikiLangTestCase {
                ];
 
                $status = new Status();
-               $status->ok = false;
+               $status->setOK( false );
                $testCases['GoodButNoError'] = [
                        $status,
                        "Internal error: Status::getWikiText: Invalid result object: no error text but not OK\n",
@@ -475,7 +492,7 @@ class StatusTest extends MediaWikiLangTestCase {
                ];
 
                $status = new Status();
-               $status->ok = false;
+               $status->setOK( false );
                $testCases['GoodButNoError'] = [
                        $status,
                        [ "Status::getMessage: Invalid result object: no error text but not OK\n" ],
@@ -645,4 +662,66 @@ class StatusTest extends MediaWikiLangTestCase {
                ];
        }
 
+       /**
+        * @dataProvider provideErrorsWarningsOnly
+        * @covers Status::splitByErrorType
+        * @covers StatusValue::splitByErrorType
+        */
+       public function testGetErrorsWarningsOnlyStatus( $errorText, $warningText, $type, $errorResult,
+               $warningResult
+       ) {
+               $status = Status::newGood();
+               if ( $errorText ) {
+                       $status->fatal( $errorText );
+               }
+               if ( $warningText ) {
+                       $status->warning( $warningText );
+               }
+               $testStatus = $status->splitByErrorType()[$type];
+               $this->assertEquals( $errorResult, $testStatus->getErrorsByType( 'error' ) );
+               $this->assertEquals( $warningResult, $testStatus->getErrorsByType( 'warning' ) );
+       }
+
+       public static function provideErrorsWarningsOnly() {
+               return [
+                       [
+                               'Just an error',
+                               'Just a warning',
+                               0,
+                               [
+                                       0 => [
+                                               'type' => 'error',
+                                               'message' => 'Just an error',
+                                               'params' => []
+                                       ],
+                               ],
+                               [],
+                       ], [
+                               'Just an error',
+                               'Just a warning',
+                               1,
+                               [],
+                               [
+                                       0 => [
+                                               'type' => 'warning',
+                                               'message' => 'Just a warning',
+                                               'params' => []
+                                       ],
+                               ],
+                       ], [
+                               null,
+                               null,
+                               1,
+                               [],
+                               [],
+                       ], [
+                               null,
+                               null,
+                               0,
+                               [],
+                               [],
+                       ]
+               ];
+       }
+
 }
index 1d232fe..92446ed 100644 (file)
@@ -6,10 +6,10 @@
 class WatchedItemQueryServiceUnitTest extends PHPUnit_Framework_TestCase {
 
        /**
-        * @return PHPUnit_Framework_MockObject_MockObject|DatabaseBase
+        * @return PHPUnit_Framework_MockObject_MockObject|Database
         */
        private function getMockDb() {
-               $mock = $this->getMockBuilder( DatabaseBase::class )
+               $mock = $this->getMockBuilder( Database::class )
                        ->disableOriginalConstructor()
                        ->getMock();
 
@@ -55,7 +55,7 @@ class WatchedItemQueryServiceUnitTest extends PHPUnit_Framework_TestCase {
                        ->disableOriginalConstructor()
                        ->getMock();
                $mock->expects( $this->any() )
-                       ->method( 'getConnection' )
+                       ->method( 'getConnectionRef' )
                        ->with( DB_SLAVE )
                        ->will( $this->returnValue( $mockDb ) );
                return $mock;
index 030d9d5..ba47059 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 use MediaWiki\Linker\LinkTarget;
+use Wikimedia\ScopedCallback;
 
 /**
  * @author Addshore
@@ -28,12 +29,12 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->getMock();
                if ( $expectedConnectionType !== null ) {
                        $mock->expects( $this->any() )
-                               ->method( 'getConnection' )
+                               ->method( 'getConnectionRef' )
                                ->with( $expectedConnectionType )
                                ->will( $this->returnValue( $mockDb ) );
                } else {
                        $mock->expects( $this->any() )
-                               ->method( 'getConnection' )
+                               ->method( 'getConnectionRef' )
                                ->will( $this->returnValue( $mockDb ) );
                }
                $mock->expects( $this->any() )
index aade490..041e7e3 100644 (file)
@@ -10,12 +10,10 @@ class WebRequestTest extends MediaWikiTestCase {
                parent::setUp();
 
                $this->oldServer = $_SERVER;
-               IP::clearCaches();
        }
 
        protected function tearDown() {
                $_SERVER = $this->oldServer;
-               IP::clearCaches();
 
                parent::tearDown();
        }
@@ -367,7 +365,6 @@ class WebRequestTest extends MediaWikiTestCase {
        public function testGetIP( $expected, $input, $squid, $xffList, $private, $description ) {
                $_SERVER = $input;
                $this->setMwGlobals( [
-                       'wgSquidServersNoPurge' => $squid,
                        'wgUsePrivateIPs' => $private,
                        'wgHooks' => [
                                'IsTrustedProxy' => [
@@ -379,6 +376,8 @@ class WebRequestTest extends MediaWikiTestCase {
                        ]
                ] );
 
+               $this->setService( 'ProxyLookup', new ProxyLookup( [], $squid ) );
+
                $request = new WebRequest();
                $result = $request->getIP();
                $this->assertEquals( $expected, $result, $description );
@@ -564,6 +563,7 @@ class WebRequestTest extends MediaWikiTestCase {
                        'wgUsePrivateIPs' => false,
                        'wgHooks' => [],
                ] );
+               $this->setService( 'ProxyLookup', new ProxyLookup( [], [] ) );
 
                $request = new WebRequest();
                # Next call throw an exception about lacking an IP
index f80f512..52e20bd 100644 (file)
@@ -50,7 +50,7 @@ class XmlSelectTest extends MediaWikiTestCase {
                        /**
                         * Values are set following a 3-bit Gray code where two successive
                         * values differ by only one value.
-                        * See http://en.wikipedia.org/wiki/Gray_code
+                        * See https://en.wikipedia.org/wiki/Gray_code
                         */
                        #      $name   $id    $default
                        [ false, false, false, '<select></select>' ],
index 487ab84..ea8c9ca 100644 (file)
@@ -188,7 +188,6 @@ class ApiLoginTest extends ApiTestCase {
                $this->assertArrayHasKey( "login", $data[0] );
                $this->assertArrayHasKey( "result", $data[0]['login'] );
                $this->assertEquals( "Success", $data[0]['login']['result'] );
-               $this->assertArrayHasKey( 'lgtoken', $data[0]['login'] );
        }
 
        public function testBotPassword() {
@@ -231,10 +230,11 @@ class ApiLoginTest extends ApiTestCase {
                $centralId = CentralIdLookup::factory()->centralIdFromLocalUser( $user->getUser() );
                $this->assertNotEquals( 0, $centralId, 'sanity check' );
 
+               $password = 'ngfhmjm64hv0854493hsj5nncjud2clk';
                $passwordFactory = new PasswordFactory();
                $passwordFactory->init( RequestContext::getMain()->getConfig() );
                // A is unsalted MD5 (thus fast) ... we don't care about security here, this is test only
-               $passwordHash = $passwordFactory->newFromPlaintext( 'foobaz' );
+               $passwordHash = $passwordFactory->newFromPlaintext( $password );
 
                $dbw = wfGetDB( DB_MASTER );
                $dbw->insert(
@@ -255,7 +255,7 @@ class ApiLoginTest extends ApiTestCase {
                $ret = $this->doApiRequest( [
                        'action' => 'login',
                        'lgname' => $lgName,
-                       'lgpassword' => 'foobaz',
+                       'lgpassword' => $password,
                ] );
 
                $result = $ret[0];
@@ -270,7 +270,7 @@ class ApiLoginTest extends ApiTestCase {
                        'action' => 'login',
                        'lgtoken' => $token,
                        'lgname' => $lgName,
-                       'lgpassword' => 'foobaz',
+                       'lgpassword' => $password,
                ], $ret[2] );
 
                $result = $ret[0];
index 334e3b8..c111949 100644 (file)
@@ -58,6 +58,29 @@ class ApiMainTest extends ApiTestCase {
                }
        }
 
+       /**
+        * Tests the assertuser= functionality
+        *
+        * @covers ApiMain::checkAsserts
+        */
+       public function testAssertUser() {
+               $user = $this->getTestUser()->getUser();
+               $this->doApiRequest( [
+                       'action' => 'query',
+                       'assertuser' => $user->getName(),
+               ], null, null, $user );
+
+               try {
+                       $this->doApiRequest( [
+                               'action' => 'query',
+                               'assertuser' => $user->getName() . 'X',
+                       ], null, null, $user );
+                       $this->fail( 'Expected exception not thrown' );
+               } catch ( UsageException $e ) {
+                       $this->assertEquals( $e->getCodeString(), 'assertnameduserfailed' );
+               }
+       }
+
        /**
         * Test if all classes in the main module manager exists
         */
index 39e90c2..5358f29 100644 (file)
@@ -9,11 +9,12 @@ class ApiOpenSearchTest extends MediaWikiTestCase {
                        ->method( 'getSearchTypes' )
                        ->will( $this->returnValue( [ 'the one ring' ] ) );
 
+               $api = $this->createApi();
                $engine = $this->replaceSearchEngine();
                $engine->expects( $this->any() )
                        ->method( 'getProfiles' )
                        ->will( $this->returnValueMap( [
-                               [ SearchEngine::COMPLETION_PROFILE_TYPE, [
+                               [ SearchEngine::COMPLETION_PROFILE_TYPE, $api->getUser(), [
                                        [
                                                'name' => 'normal',
                                                'desc-message' => 'normal-message',
@@ -26,7 +27,6 @@ class ApiOpenSearchTest extends MediaWikiTestCase {
                                ] ],
                        ] ) );
 
-               $api = $this->createApi();
                $params = $api->getAllowedParams();
 
                $this->assertArrayNotHasKey( 'offset', $params );
index 3b21ff8..7687236 100644 (file)
@@ -20,7 +20,11 @@ class ApiQueryAllPagesTest extends ApiTestCase {
        public function testPrefixNormalizationSearchBug() {
                $title = Title::newFromText( 'Category:Template:xyz' );
                $page = WikiPage::factory( $title );
-               $page->doEdit( 'Some text', 'inserting content' );
+
+               $page->doEditContent(
+                       ContentHandler::makeContent( 'Some text', $page->getTitle() ),
+                       'inserting content'
+               );
 
                $result = $this->doApiRequest( [
                        'action' => 'query',
index 582c076..d6f315d 100644 (file)
@@ -477,6 +477,7 @@ class ApiQueryWatchlistRawIntegrationTest extends ApiTestCase {
                        new TitleValue( 1, 'ApiQueryWatchlistRawIntegrationTestPage1' ),
                ] );
 
+               ObjectCache::getMainWANInstance()->clearProcessCache();
                $result = $this->doListWatchlistRawRequest( [
                        'wrowner' => $otherUser->getName(),
                        'wrtoken' => '1234567890',
index 7c0063d..48472cf 100644 (file)
@@ -1323,350 +1323,6 @@ class ApiResultTest extends MediaWikiTestCase {
                ], ApiResult::addMetadataToResultVars( $arr ) );
        }
 
-       /**
-        * @covers ApiResult
-        */
-       public function testDeprecatedFunctions() {
-               // Ignore ApiResult deprecation warnings during this test
-               set_error_handler( function ( $errno, $errstr ) use ( &$warnings ) {
-                       if ( preg_match( '/Use of ApiResult::\S+ was deprecated in MediaWiki \d+.\d+\./', $errstr ) ) {
-                               return true;
-                       }
-                       if ( preg_match( '/Use of ApiMain to ApiResult::__construct ' .
-                               'was deprecated in MediaWiki \d+.\d+\./', $errstr ) ) {
-                               return true;
-                       }
-                       return false;
-               } );
-               $reset = new ScopedCallback( 'restore_error_handler' );
-
-               $context = new DerivativeContext( RequestContext::getMain() );
-               $context->setConfig( new HashConfig( [
-                       'APIModules' => [],
-                       'APIFormatModules' => [],
-                       'APIMaxResultSize' => 42,
-               ] ) );
-               $main = new ApiMain( $context );
-               $result = TestingAccessWrapper::newFromObject( new ApiResult( $main ) );
-               $this->assertSame( 42, $result->maxSize );
-               $this->assertSame( $main->getErrorFormatter(), $result->errorFormatter );
-               $this->assertSame( $main, $result->mainForContinuation );
-
-               $result = new ApiResult( 8388608 );
-
-               $result->addContentValue( null, 'test', 'content' );
-               $result->addContentValue( [ 'foo', 'bar' ], 'test', 'content' );
-               $result->addIndexedTagName( null, 'itn' );
-               $result->addSubelementsList( null, [ 'sub' ] );
-               $this->assertSame( [
-                       'foo' => [
-                               'bar' => [
-                                       '*' => 'content',
-                               ],
-                       ],
-                       '*' => 'content',
-               ], $result->getData() );
-
-               $arr = [];
-               ApiResult::setContent( $arr, 'value' );
-               ApiResult::setContent( $arr, 'value2', 'foobar' );
-               $this->assertSame( [
-                       ApiResult::META_CONTENT => 'content',
-                       'content' => 'value',
-                       'foobar' => [
-                               ApiResult::META_CONTENT => 'content',
-                               'content' => 'value2',
-                       ],
-               ], $arr );
-
-               $result = new ApiResult( 3 );
-               $formatter = new ApiErrorFormatter_BackCompat( $result );
-               $result->setErrorFormatter( $formatter );
-               $result->disableSizeCheck();
-               $this->assertTrue( $result->addValue( null, 'foo', '1234567890' ) );
-               $result->enableSizeCheck();
-               $this->assertSame( 0, $result->getSize() );
-               $this->assertFalse( $result->addValue( null, 'foo', '1234567890' ) );
-
-               $arr = [ 'foo' => [ 'bar' => 1 ] ];
-               $result->setIndexedTagName_recursive( $arr, 'itn' );
-               $this->assertSame( [
-                       'foo' => [
-                               'bar' => 1,
-                               ApiResult::META_INDEXED_TAG_NAME => 'itn'
-                       ],
-               ], $arr );
-
-               $status = Status::newGood();
-               $status->fatal( 'parentheses', '1' );
-               $status->fatal( 'parentheses', '2' );
-               $status->warning( 'parentheses', '3' );
-               $status->warning( 'parentheses', '4' );
-               $this->assertSame( [
-                       [
-                               'type' => 'error',
-                               'message' => 'parentheses',
-                               'params' => [
-                                       0 => '1',
-                                       ApiResult::META_INDEXED_TAG_NAME => 'param',
-                               ],
-                       ],
-                       [
-                               'type' => 'error',
-                               'message' => 'parentheses',
-                               'params' => [
-                                       0 => '2',
-                                       ApiResult::META_INDEXED_TAG_NAME => 'param',
-                               ],
-                       ],
-                       ApiResult::META_INDEXED_TAG_NAME => 'error',
-               ], $result->convertStatusToArray( $status, 'error' ) );
-               $this->assertSame( [
-                       [
-                               'type' => 'warning',
-                               'message' => 'parentheses',
-                               'params' => [
-                                       0 => '3',
-                                       ApiResult::META_INDEXED_TAG_NAME => 'param',
-                               ],
-                       ],
-                       [
-                               'type' => 'warning',
-                               'message' => 'parentheses',
-                               'params' => [
-                                       0 => '4',
-                                       ApiResult::META_INDEXED_TAG_NAME => 'param',
-                               ],
-                       ],
-                       ApiResult::META_INDEXED_TAG_NAME => 'warning',
-               ], $result->convertStatusToArray( $status, 'warning' ) );
-       }
-
-       /**
-        * @covers ApiResult
-        */
-       public function testDeprecatedContinuation() {
-               // Ignore ApiResult deprecation warnings during this test
-               set_error_handler( function ( $errno, $errstr ) use ( &$warnings ) {
-                       if ( preg_match( '/Use of ApiResult::\S+ was deprecated in MediaWiki \d+.\d+\./', $errstr ) ) {
-                               return true;
-                       }
-                       return false;
-               } );
-
-               $reset = new ScopedCallback( 'restore_error_handler' );
-               $allModules = [
-                       new MockApiQueryBase( 'mock1' ),
-                       new MockApiQueryBase( 'mock2' ),
-                       new MockApiQueryBase( 'mocklist' ),
-               ];
-               $generator = new MockApiQueryBase( 'generator' );
-
-               $main = new ApiMain( RequestContext::getMain() );
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $ret = $result->beginContinuation( null, $allModules, [ 'mock1', 'mock2' ] );
-               $this->assertSame( [ false, $allModules ], $ret );
-               $result->setContinueParam( $allModules[0], 'm1continue', [ 1, 2 ] );
-               $result->setContinueParam( $allModules[2], 'mlcontinue', 2 );
-               $result->setGeneratorContinueParam( $generator, 'gcontinue', 3 );
-               $result->endContinuation( 'raw' );
-               $result->endContinuation( 'standard' );
-               $this->assertSame( [
-                       'mlcontinue' => 2,
-                       'm1continue' => '1|2',
-                       'continue' => '||mock2',
-               ], $result->getResultData( 'continue' ) );
-               $this->assertSame( null, $result->getResultData( 'batchcomplete' ) );
-               $this->assertSame( [
-                       'mock1' => [ 'm1continue' => '1|2' ],
-                       'mocklist' => [ 'mlcontinue' => 2 ],
-                       'generator' => [ 'gcontinue' => 3 ],
-               ], $result->getResultData( 'query-continue' ) );
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $ret = $result->beginContinuation( null, $allModules, [ 'mock1', 'mock2' ] );
-               $this->assertSame( [ false, $allModules ], $ret );
-               $result->setContinueParam( $allModules[0], 'm1continue', [ 1, 2 ] );
-               $result->setGeneratorContinueParam( $generator, 'gcontinue', [ 3, 4 ] );
-               $result->endContinuation( 'raw' );
-               $result->endContinuation( 'standard' );
-               $this->assertSame( [
-                       'm1continue' => '1|2',
-                       'continue' => '||mock2|mocklist',
-               ], $result->getResultData( 'continue' ) );
-               $this->assertSame( null, $result->getResultData( 'batchcomplete' ) );
-               $this->assertSame( [
-                       'mock1' => [ 'm1continue' => '1|2' ],
-                       'generator' => [ 'gcontinue' => '3|4' ],
-               ], $result->getResultData( 'query-continue' ) );
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $ret = $result->beginContinuation( null, $allModules, [ 'mock1', 'mock2' ] );
-               $this->assertSame( [ false, $allModules ], $ret );
-               $result->setContinueParam( $allModules[2], 'mlcontinue', 2 );
-               $result->setGeneratorContinueParam( $generator, 'gcontinue', 3 );
-               $result->endContinuation( 'raw' );
-               $result->endContinuation( 'standard' );
-               $this->assertSame( [
-                       'mlcontinue' => 2,
-                       'gcontinue' => 3,
-                       'continue' => 'gcontinue||',
-               ], $result->getResultData( 'continue' ) );
-               $this->assertSame( true, $result->getResultData( 'batchcomplete' ) );
-               $this->assertSame( [
-                       'mocklist' => [ 'mlcontinue' => 2 ],
-                       'generator' => [ 'gcontinue' => 3 ],
-               ], $result->getResultData( 'query-continue' ) );
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $ret = $result->beginContinuation( null, $allModules, [ 'mock1', 'mock2' ] );
-               $this->assertSame( [ false, $allModules ], $ret );
-               $result->setGeneratorContinueParam( $generator, 'gcontinue', 3 );
-               $result->endContinuation( 'raw' );
-               $result->endContinuation( 'standard' );
-               $this->assertSame( [
-                       'gcontinue' => 3,
-                       'continue' => 'gcontinue||mocklist',
-               ], $result->getResultData( 'continue' ) );
-               $this->assertSame( true, $result->getResultData( 'batchcomplete' ) );
-               $this->assertSame( [
-                       'generator' => [ 'gcontinue' => 3 ],
-               ], $result->getResultData( 'query-continue' ) );
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $ret = $result->beginContinuation( null, $allModules, [ 'mock1', 'mock2' ] );
-               $this->assertSame( [ false, $allModules ], $ret );
-               $result->setContinueParam( $allModules[0], 'm1continue', [ 1, 2 ] );
-               $result->setContinueParam( $allModules[2], 'mlcontinue', 2 );
-               $result->endContinuation( 'raw' );
-               $result->endContinuation( 'standard' );
-               $this->assertSame( [
-                       'mlcontinue' => 2,
-                       'm1continue' => '1|2',
-                       'continue' => '||mock2',
-               ], $result->getResultData( 'continue' ) );
-               $this->assertSame( null, $result->getResultData( 'batchcomplete' ) );
-               $this->assertSame( [
-                       'mock1' => [ 'm1continue' => '1|2' ],
-                       'mocklist' => [ 'mlcontinue' => 2 ],
-               ], $result->getResultData( 'query-continue' ) );
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $ret = $result->beginContinuation( null, $allModules, [ 'mock1', 'mock2' ] );
-               $this->assertSame( [ false, $allModules ], $ret );
-               $result->setContinueParam( $allModules[0], 'm1continue', [ 1, 2 ] );
-               $result->endContinuation( 'raw' );
-               $result->endContinuation( 'standard' );
-               $this->assertSame( [
-                       'm1continue' => '1|2',
-                       'continue' => '||mock2|mocklist',
-               ], $result->getResultData( 'continue' ) );
-               $this->assertSame( null, $result->getResultData( 'batchcomplete' ) );
-               $this->assertSame( [
-                       'mock1' => [ 'm1continue' => '1|2' ],
-               ], $result->getResultData( 'query-continue' ) );
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $ret = $result->beginContinuation( null, $allModules, [ 'mock1', 'mock2' ] );
-               $this->assertSame( [ false, $allModules ], $ret );
-               $result->setContinueParam( $allModules[2], 'mlcontinue', 2 );
-               $result->endContinuation( 'raw' );
-               $result->endContinuation( 'standard' );
-               $this->assertSame( [
-                       'mlcontinue' => 2,
-                       'continue' => '-||mock1|mock2',
-               ], $result->getResultData( 'continue' ) );
-               $this->assertSame( true, $result->getResultData( 'batchcomplete' ) );
-               $this->assertSame( [
-                       'mocklist' => [ 'mlcontinue' => 2 ],
-               ], $result->getResultData( 'query-continue' ) );
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $ret = $result->beginContinuation( null, $allModules, [ 'mock1', 'mock2' ] );
-               $this->assertSame( [ false, $allModules ], $ret );
-               $result->endContinuation( 'raw' );
-               $result->endContinuation( 'standard' );
-               $this->assertSame( null, $result->getResultData( 'continue' ) );
-               $this->assertSame( true, $result->getResultData( 'batchcomplete' ) );
-               $this->assertSame( null, $result->getResultData( 'query-continue' ) );
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $ret = $result->beginContinuation( '||mock2', $allModules, [ 'mock1', 'mock2' ] );
-               $this->assertSame(
-                       [ false, array_values( array_diff_key( $allModules, [ 1 => 1 ] ) ) ],
-                       $ret
-               );
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $ret = $result->beginContinuation( '-||', $allModules, [ 'mock1', 'mock2' ] );
-               $this->assertSame(
-                       [ true, array_values( array_diff_key( $allModules, [ 0 => 0, 1 => 1 ] ) ) ],
-                       $ret
-               );
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               try {
-                       $result->beginContinuation( 'foo', $allModules, [ 'mock1', 'mock2' ] );
-                       $this->fail( 'Expected exception not thrown' );
-               } catch ( UsageException $ex ) {
-                       $this->assertSame(
-                               'Invalid continue param. You should pass the original value returned by the previous query',
-                               $ex->getMessage(),
-                               'Expected exception'
-                       );
-               }
-               $main->setContinuationManager( null );
-
-               $result = new ApiResult( 8388608 );
-               $result->setMainForContinuation( $main );
-               $result->beginContinuation( '||mock2', array_slice( $allModules, 0, 2 ),
-                       [ 'mock1', 'mock2' ] );
-               try {
-                       $result->setContinueParam( $allModules[1], 'm2continue', 1 );
-                       $this->fail( 'Expected exception not thrown' );
-               } catch ( UnexpectedValueException $ex ) {
-                       $this->assertSame(
-                               'Module \'mock2\' was not supposed to have been executed, but it was executed anyway',
-                               $ex->getMessage(),
-                               'Expected exception'
-                       );
-               }
-               try {
-                       $result->setContinueParam( $allModules[2], 'mlcontinue', 1 );
-                       $this->fail( 'Expected exception not thrown' );
-               } catch ( UnexpectedValueException $ex ) {
-                       $this->assertSame(
-                               'Module \'mocklist\' called ApiContinuationManager::addContinueParam ' .
-                                       'but was not passed to ApiContinuationManager::__construct',
-                               $ex->getMessage(),
-                               'Expected exception'
-                       );
-               }
-               $main->setContinuationManager( null );
-
-       }
-
        public function testObjectSerialization() {
                $arr = [];
                ApiResult::setValue( $arr, 'foo', (object)[ 'a' => 1, 'b' => 2 ] );
index 78cb7fb..d5c17ee 100644 (file)
@@ -218,7 +218,7 @@ class RandomImageGenerator {
        }
 
        /**
-        * Given array( array('x' => 10, 'y' => 20), array( 'x' => 30, y=> 5 ) )
+        * Given [ [ 'x' => 10, 'y' => 20 ], [ 'x' => 30, y=> 5 ] ]
         * returns "10,20 30,5"
         * Useful for SVG and imagemagick command line arguments
         * @param array $shape Array of arrays, each array containing x & y keys mapped to numeric values
@@ -430,7 +430,7 @@ class RandomImageGenerator {
 
        /**
         * Get an array of random pairs of random words, like
-        * array( array( 'foo', 'bar' ), array( 'quux', 'baz' ) );
+        * [ [ 'foo', 'bar' ], [ 'quux', 'baz' ] ];
         *
         * @param int $number Number of pairs
         * @return array Two-element arrays
index a6f22b1..38a1d68 100644 (file)
@@ -15,7 +15,11 @@ class ApiQueryRevisionsTest extends ApiTestCase {
                $pageName = 'Help:' . __METHOD__;
                $title = Title::newFromText( $pageName );
                $page = WikiPage::factory( $title );
-               $page->doEdit( 'Some text', 'inserting content' );
+
+               $page->doEditContent(
+                       ContentHandler::makeContent( 'Some text', $page->getTitle() ),
+                       'inserting content'
+               );
 
                $apiResult = $this->doApiRequest( [
                        'action' => 'query',
index f679f63..13486e2 100644 (file)
@@ -6,6 +6,7 @@ use MediaWiki\Session\SessionInfo;
 use MediaWiki\Session\UserInfo;
 use Psr\Log\LogLevel;
 use StatusValue;
+use Wikimedia\ScopedCallback;
 
 /**
  * @group AuthManager
@@ -184,7 +185,7 @@ class AuthManagerTest extends \MediaWikiTestCase {
                $rProp = new \ReflectionProperty( AuthManager::class, 'instance' );
                $rProp->setAccessible( true );
                $old = $rProp->getValue();
-               $cb = new \ScopedCallback( [ $rProp, 'setValue' ], [ $old ] );
+               $cb = new ScopedCallback( [ $rProp, 'setValue' ], [ $old ] );
                $rProp->setValue( null );
 
                $singleton = AuthManager::singleton();
@@ -202,11 +203,11 @@ class AuthManagerTest extends \MediaWikiTestCase {
 
                list( $provider, $reset ) = $this->getMockSessionProvider( false );
                $this->assertFalse( $this->manager->canAuthenticateNow() );
-               \ScopedCallback::consume( $reset );
+               ScopedCallback::consume( $reset );
 
                list( $provider, $reset ) = $this->getMockSessionProvider( true );
                $this->assertTrue( $this->manager->canAuthenticateNow() );
-               \ScopedCallback::consume( $reset );
+               ScopedCallback::consume( $reset );
        }
 
        public function testNormalizeUsername() {
@@ -385,7 +386,7 @@ class AuthManagerTest extends \MediaWikiTestCase {
                        $this->unhook( 'SecuritySensitiveOperationStatus' );
                }
 
-               \ScopedCallback::consume( $reset );
+               ScopedCallback::consume( $reset );
        }
 
        public function onSecuritySensitiveOperationStatus( &$status, $operation, $session, $time ) {
@@ -585,7 +586,7 @@ class AuthManagerTest extends \MediaWikiTestCase {
                $this->initializeManager();
 
                $context = \RequestContext::getMain();
-               $reset = new \ScopedCallback( [ $context, 'setLanguage' ], [ $context->getLanguage() ] );
+               $reset = new ScopedCallback( [ $context, 'setLanguage' ], [ $context->getLanguage() ] );
                $context->setLanguage( 'de' );
                $this->setMwGlobals( 'wgContLang', \Language::factory( 'zh' ) );
 
@@ -712,7 +713,7 @@ class AuthManagerTest extends \MediaWikiTestCase {
                }
                $this->unhook( 'UserLoggedIn' );
                $this->assertNull( $this->request->getSession()->getSecret( 'AuthManager::authnState' ) );
-               \ScopedCallback::consume( $reset );
+               ScopedCallback::consume( $reset );
                $this->initializeManager( true );
 
                // CreatedAccountAuthenticationRequest
@@ -1449,11 +1450,11 @@ class AuthManagerTest extends \MediaWikiTestCase {
                ];
                $block = new \Block( $blockOptions );
                $block->insert();
-               $scopeVariable = new \ScopedCallback( [ $block, 'delete' ] );
+               $scopeVariable = new ScopedCallback( [ $block, 'delete' ] );
                $status = $this->manager->checkAccountCreatePermissions( new \User );
                $this->assertFalse( $status->isOK() );
                $this->assertTrue( $status->hasMessage( 'cantcreateaccount-range-text' ) );
-               \ScopedCallback::consume( $scopeVariable );
+               ScopedCallback::consume( $scopeVariable );
 
                $this->setMwGlobals( [
                        'wgEnableDnsBlacklist' => true,
@@ -2674,7 +2675,7 @@ class AuthManagerTest extends \MediaWikiTestCase {
                $this->assertEquals( 0, $session->getUser()->getId() );
                $this->assertSame( [
                        [ LogLevel::INFO, 'creating new user ({username}) - from: {from}' ],
-                       [ LogLevel::ERROR, '{username} failed with message {message}' ],
+                       [ LogLevel::ERROR, '{username} failed with message {msg}' ],
                ], $logger->getBuffer() );
                $logger->clearBuffer();
                $this->assertSame( null, $session->get( 'AuthManager::AutoCreateBlacklist' ) );
index 477b161..194b49e 100644 (file)
@@ -16,6 +16,7 @@ class AuthenticationResponseTest extends \MediaWikiTestCase {
        public function testConstructors( $constructor, $args, $expect ) {
                if ( is_array( $expect ) ) {
                        $res = new AuthenticationResponse();
+                       $res->messageType = 'warning';
                        foreach ( $expect as $field => $value ) {
                                $res->$field = $value;
                        }
@@ -51,6 +52,7 @@ class AuthenticationResponseTest extends \MediaWikiTestCase {
                        [ 'newFail', [ $msg ], [
                                'status' => AuthenticationResponse::FAIL,
                                'message' => $msg,
+                               'messageType' => 'error',
                        ] ],
 
                        [ 'newRestart', [ $msg ], [
@@ -66,6 +68,21 @@ class AuthenticationResponseTest extends \MediaWikiTestCase {
                                'status' => AuthenticationResponse::UI,
                                'neededRequests' => [ $req ],
                                'message' => $msg,
+                               'messageType' => 'warning',
+                       ] ],
+
+                       [ 'newUI', [ [ $req ], $msg, 'warning' ], [
+                               'status' => AuthenticationResponse::UI,
+                               'neededRequests' => [ $req ],
+                               'message' => $msg,
+                               'messageType' => 'warning',
+                       ] ],
+
+                       [ 'newUI', [ [ $req ], $msg, 'error' ], [
+                               'status' => AuthenticationResponse::UI,
+                               'neededRequests' => [ $req ],
+                               'message' => $msg,
+                               'messageType' => 'error',
                        ] ],
                        [ 'newUI', [ [], $msg ],
                                new \InvalidArgumentException( '$reqs may not be empty' )
index e6d3ecf..68f574b 100644 (file)
@@ -152,7 +152,7 @@ class CheckBlocksSecondaryAuthenticationProviderTest extends \MediaWikiTestCase
                ];
                $block = new \Block( $blockOptions );
                $block->insert();
-               $scopeVariable = new \ScopedCallback( [ $block, 'delete' ] );
+               $scopeVariable = new \Wikimedia\ScopedCallback( [ $block, 'delete' ] );
 
                $user = \User::newFromName( 'UTNormalUser' );
                if ( $user->getID() == 0 ) {
index 515a5b3..bc78c08 100644 (file)
@@ -2,6 +2,8 @@
 
 namespace MediaWiki\Auth;
 
+use Wikimedia\ScopedCallback;
+
 /**
  * @group AuthManager
  * @group Database
@@ -70,7 +72,7 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                        } );
                }
 
-               return new \ScopedCallback( function () {
+               return new ScopedCallback( function () {
                        \Hooks::clear( 'AlternateUserMailer' );
                        \Hooks::register( 'AlternateUserMailer', function () {
                                return false;
@@ -122,6 +124,8 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
        }
 
        public function testTestUserCanAuthenticate() {
+               $user = self::getMutableTestUser()->getUser();
+
                $dbw = wfGetDB( DB_MASTER );
 
                $passwordFactory = new \PasswordFactory();
@@ -142,9 +146,9 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                                'user_newpassword' => \PasswordFactory::newInvalidPassword()->toString(),
                                'user_newpass_time' => null,
                        ],
-                       [ 'user_name' => 'UTSysop' ]
+                       [ 'user_id' => $user->getId() ]
                );
-               $this->assertFalse( $provider->testUserCanAuthenticate( 'UTSysop' ) );
+               $this->assertFalse( $provider->testUserCanAuthenticate( $user->getName() ) );
 
                $dbw->update(
                        'user',
@@ -152,10 +156,10 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                                'user_newpassword' => $pwhash,
                                'user_newpass_time' => null,
                        ],
-                       [ 'user_name' => 'UTSysop' ]
+                       [ 'user_id' => $user->getId() ]
                );
-               $this->assertTrue( $provider->testUserCanAuthenticate( 'UTSysop' ) );
-               $this->assertTrue( $provider->testUserCanAuthenticate( 'uTSysop' ) );
+               $this->assertTrue( $provider->testUserCanAuthenticate( $user->getName() ) );
+               $this->assertTrue( $provider->testUserCanAuthenticate( lcfirst( $user->getName() ) ) );
 
                $dbw->update(
                        'user',
@@ -163,12 +167,12 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                                'user_newpassword' => $pwhash,
                                'user_newpass_time' => $dbw->timestamp( time() - 10 ),
                        ],
-                       [ 'user_name' => 'UTSysop' ]
+                       [ 'user_id' => $user->getId() ]
                );
                $providerPriv->newPasswordExpiry = 100;
-               $this->assertTrue( $provider->testUserCanAuthenticate( 'UTSysop' ) );
+               $this->assertTrue( $provider->testUserCanAuthenticate( $user->getName() ) );
                $providerPriv->newPasswordExpiry = 1;
-               $this->assertFalse( $provider->testUserCanAuthenticate( 'UTSysop' ) );
+               $this->assertFalse( $provider->testUserCanAuthenticate( $user->getName() ) );
 
                $dbw->update(
                        'user',
@@ -176,7 +180,7 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                                'user_newpassword' => \PasswordFactory::newInvalidPassword()->toString(),
                                'user_newpass_time' => null,
                        ],
-                       [ 'user_name' => 'UTSysop' ]
+                       [ 'user_id' => $user->getId() ]
                );
        }
 
@@ -229,13 +233,15 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
        }
 
        public function testAuthentication() {
+               $user = self::getMutableTestUser()->getUser();
+
                $password = 'TemporaryPassword';
                $hash = ':A:' . md5( $password );
                $dbw = wfGetDB( DB_MASTER );
                $dbw->update(
                        'user',
                        [ 'user_newpassword' => $hash, 'user_newpass_time' => $dbw->timestamp( time() - 10 ) ],
-                       [ 'user_name' => 'UTSysop' ]
+                       [ 'user_id' => $user->getId() ]
                );
 
                $req = new PasswordAuthenticationRequest();
@@ -284,7 +290,7 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                );
 
                // Validation failure
-               $req->username = 'UTSysop';
+               $req->username = $user->getName();
                $req->password = $password;
                $this->validity = \Status::newFatal( 'arbitrary-failure' );
                $ret = $provider->beginPrimaryAuthentication( $reqs );
@@ -301,20 +307,20 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                $this->manager->removeAuthenticationSessionData( null );
                $this->validity = \Status::newGood();
                $this->assertEquals(
-                       AuthenticationResponse::newPass( 'UTSysop' ),
+                       AuthenticationResponse::newPass( $user->getName() ),
                        $provider->beginPrimaryAuthentication( $reqs )
                );
                $this->assertNotNull( $this->manager->getAuthenticationSessionData( 'reset-pass' ) );
 
                $this->manager->removeAuthenticationSessionData( null );
                $this->validity = \Status::newGood();
-               $req->username = 'uTSysop';
+               $req->username = lcfirst( $user->getName() );
                $this->assertEquals(
-                       AuthenticationResponse::newPass( 'UTSysop' ),
+                       AuthenticationResponse::newPass( $user->getName() ),
                        $provider->beginPrimaryAuthentication( $reqs )
                );
                $this->assertNotNull( $this->manager->getAuthenticationSessionData( 'reset-pass' ) );
-               $req->username = 'UTSysop';
+               $req->username = $user->getName();
 
                // Expired password
                $providerPriv->newPasswordExpiry = 1;
@@ -408,20 +414,19 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                $oldpass = 'OldTempPassword';
                $newpass = 'NewTempPassword';
 
-               $hash = ':A:' . md5( $oldpass );
                $dbw = wfGetDB( DB_MASTER );
+               $oldHash = $dbw->selectField( 'user', 'user_newpassword', [ 'user_name' => $cuser ] );
+               $cb = new ScopedCallback( function () use ( $dbw, $cuser, $oldHash ) {
+                       $dbw->update( 'user', [ 'user_newpassword' => $oldHash ], [ 'user_name' => $cuser ] );
+               } );
+
+               $hash = ':A:' . md5( $oldpass );
                $dbw->update(
                        'user',
                        [ 'user_newpassword' => $hash, 'user_newpass_time' => $dbw->timestamp( time() + 10 ) ],
-                       [ 'user_name' => 'UTSysop' ]
+                       [ 'user_name' => $cuser ]
                );
 
-               $dbw = wfGetDB( DB_MASTER );
-               $oldHash = $dbw->selectField( 'user', 'user_newpassword', [ 'user_name' => $cuser ] );
-               $cb = new \ScopedCallback( function () use ( $dbw, $cuser, $oldHash ) {
-                       $dbw->update( 'user', [ 'user_newpassword' => $oldHash ], [ 'user_name' => $cuser ] );
-               } );
-
                $provider = $this->getProvider();
 
                // Sanity check
@@ -448,7 +453,7 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                $changeReq->password = $newpass;
                $resetMailer = $this->hookMailer();
                $provider->providerChangeAuthenticationData( $changeReq );
-               \ScopedCallback::consume( $resetMailer );
+               ScopedCallback::consume( $resetMailer );
 
                $loginReq->password = $oldpass;
                $ret = $provider->beginPrimaryAuthentication( $loginReqs );
@@ -500,22 +505,15 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
        }
 
        public function testProviderChangeAuthenticationDataEmail() {
+               $user = self::getMutableTestUser()->getUser();
+
                $dbw = wfGetDB( DB_MASTER );
                $dbw->update(
                        'user',
                        [ 'user_newpass_time' => $dbw->timestamp( time() - 5 * 3600 ) ],
-                       [ 'user_name' => 'UTSysop' ]
+                       [ 'user_id' => $user->getId() ]
                );
 
-               $user = \User::newFromName( 'UTSysop' );
-               $reset = new \ScopedCallback( function ( $email ) use ( $user ) {
-                       $user->setEmail( $email );
-                       $user->saveSettings();
-               }, [ $user->getEmail() ] );
-
-               $user->setEmail( 'test@localhost.localdomain' );
-               $user->saveSettings();
-
                $req = TemporaryPasswordAuthenticationRequest::newRandom();
                $req->username = $user->getName();
                $req->mailpassword = true;
@@ -539,7 +537,7 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                $dbw->update(
                        'user',
                        [ 'user_newpass_time' => $dbw->timestamp( time() + 5 * 3600 ) ],
-                       [ 'user_name' => 'UTSysop' ]
+                       [ 'user_id' => $user->getId() ]
                );
                $provider = $this->getProvider( [ 'passwordReminderResendTime' => 0 ] );
                $status = $provider->providerAllowsAuthenticationDataChange( $req, true );
@@ -563,21 +561,21 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                $status = $provider->providerAllowsAuthenticationDataChange( $req, true );
                $this->assertEquals( \StatusValue::newGood(), $status );
 
-               $req->caller = 'UTSysop';
+               $req->caller = $user->getName();
                $status = $provider->providerAllowsAuthenticationDataChange( $req, true );
                $this->assertEquals( \StatusValue::newGood(), $status );
 
                $mailed = false;
                $resetMailer = $this->hookMailer( function ( $headers, $to, $from, $subject, $body )
-                       use ( &$mailed, $req )
+                       use ( &$mailed, $req, $user )
                {
                        $mailed = true;
-                       $this->assertSame( 'test@localhost.localdomain', $to[0]->address );
+                       $this->assertSame( $user->getEmail(), $to[0]->address );
                        $this->assertContains( $req->password, $body );
                        return false;
                } );
                $provider->providerChangeAuthenticationData( $req );
-               \ScopedCallback::consume( $resetMailer );
+               ScopedCallback::consume( $resetMailer );
                $this->assertTrue( $mailed );
 
                $priv = \TestingAccessWrapper::newFromObject( $provider );
@@ -658,12 +656,10 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                $this->assertEquals( $expect, $provider->beginPrimaryAccountCreation( $user, $user, $reqs ) );
                $this->assertNull( $this->manager->getAuthenticationSessionData( 'no-email' ) );
 
-               // We have to cheat a bit to avoid having to add a new user to
-               // the database to test the actual setting of the password works right
-               $user = \User::newFromName( 'UTSysop' );
+               $user = self::getMutableTestUser()->getUser();
                $req->username = $authreq->username = $user->getName();
                $req->password = $authreq->password = 'NewPassword';
-               $expect = AuthenticationResponse::newPass( 'UTSysop' );
+               $expect = AuthenticationResponse::newPass( $user->getName() );
                $expect->createRequest = $req;
 
                $res2 = $provider->beginPrimaryAccountCreation( $user, $user, $reqs );
@@ -680,12 +676,8 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
 
        public function testAccountCreationEmail() {
                $creator = \User::newFromName( 'Foo' );
-               $user = \User::newFromName( 'UTSysop' );
-               $reset = new \ScopedCallback( function ( $email ) use ( $user ) {
-                       $user->setEmail( $email );
-                       $user->saveSettings();
-               }, [ $user->getEmail() ] );
 
+               $user = self::getMutableTestUser()->getUser();
                $user->setEmail( null );
 
                $req = TemporaryPasswordAuthenticationRequest::newRandom();
@@ -722,9 +714,9 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                        return false;
                } );
 
-               $expect = AuthenticationResponse::newPass( 'UTSysop' );
+               $expect = AuthenticationResponse::newPass( $user->getName() );
                $expect->createRequest = clone( $req );
-               $expect->createRequest->username = 'UTSysop';
+               $expect->createRequest->username = $user->getName();
                $res = $provider->beginPrimaryAccountCreation( $user, $creator, [ $req ] );
                $this->assertEquals( $expect, $res );
                $this->assertTrue( $this->manager->getAuthenticationSessionData( 'no-email' ) );
@@ -733,7 +725,7 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                $this->assertSame( 'byemail', $provider->finishAccountCreation( $user, $creator, $res ) );
                $this->assertTrue( $mailed );
 
-               \ScopedCallback::consume( $resetMailer );
+               ScopedCallback::consume( $resetMailer );
                $this->assertTrue( $mailed );
        }
 
index aa6f0e8..20f4cbc 100644 (file)
@@ -12,7 +12,10 @@ class ThrottlePreAuthenticationProviderTest extends \MediaWikiTestCase {
                $provider = new ThrottlePreAuthenticationProvider();
                $providerPriv = \TestingAccessWrapper::newFromObject( $provider );
                $config = new \HashConfig( [
-                       'AccountCreationThrottle' => 123,
+                       'AccountCreationThrottle' => [ [
+                               'count' => 123,
+                               'seconds' => 86400,
+                       ] ],
                        'PasswordAttemptThrottle' => [ [
                                'count' => 5,
                                'seconds' => 300,
@@ -38,7 +41,10 @@ class ThrottlePreAuthenticationProviderTest extends \MediaWikiTestCase {
                ] );
                $providerPriv = \TestingAccessWrapper::newFromObject( $provider );
                $config = new \HashConfig( [
-                       'AccountCreationThrottle' => 123,
+                       'AccountCreationThrottle' => [ [
+                               'count' => 123,
+                               'seconds' => 86400,
+                       ] ],
                        'PasswordAttemptThrottle' => [ [
                                'count' => 5,
                                'seconds' => 300,
@@ -122,18 +128,18 @@ class ThrottlePreAuthenticationProviderTest extends \MediaWikiTestCase {
                }
 
                $this->assertEquals(
-                       \StatusValue::newGood(),
-                       $provider->testForAccountCreation( $user, $creator, [] ),
+                       true,
+                       $provider->testForAccountCreation( $user, $creator, [] )->isOK(),
                        'attempt #1'
                );
                $this->assertEquals(
-                       \StatusValue::newGood(),
-                       $provider->testForAccountCreation( $user, $creator, [] ),
+                       true,
+                       $provider->testForAccountCreation( $user, $creator, [] )->isOK(),
                        'attempt #2'
                );
                $this->assertEquals(
-                       $succeed ? \StatusValue::newGood() : \StatusValue::newFatal( 'acct_creation_throttle_hit', 2 ),
-                       $provider->testForAccountCreation( $user, $creator, [] ),
+                       $succeed ? true : false,
+                       $provider->testForAccountCreation( $user, $creator, [] )->isOK(),
                        'attempt #3'
                );
        }
diff --git a/tests/phpunit/includes/content/FileContentHandlerTest.php b/tests/phpunit/includes/content/FileContentHandlerTest.php
new file mode 100644 (file)
index 0000000..276a86e
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @group ContentHandler
+ */
+class FileContentHandlerTest extends MediaWikiLangTestCase {
+       /**
+        * @var FileContentHandler
+        */
+       private $handler;
+
+       protected function setUp() {
+               parent::setUp();
+
+               $this->handler = new FileContentHandler();
+       }
+
+       public function testIndexMapping() {
+               $mockEngine = $this->getMock( 'SearchEngine' );
+
+               $mockEngine->expects( $this->atLeastOnce() )
+                       ->method( 'makeSearchFieldMapping' )
+                       ->willReturnCallback( function ( $name, $type ) {
+                               $mockField =
+                                       $this->getMockBuilder( 'SearchIndexFieldDefinition' )
+                                               ->setMethods( [ 'getMapping' ] )
+                                               ->setConstructorArgs( [ $name, $type ] )
+                                               ->getMock();
+                               return $mockField;
+                       } );
+
+               $map = $this->handler->getFieldsForSearchIndex( $mockEngine );
+               $expect = [
+                       'file_media_type' => 1,
+                       'file_mime' => 1,
+                       'file_size' => 1,
+                       'file_width' => 1,
+                       'file_height' => 1,
+                       'file_bits' => 1,
+                       'file_resolution' => 1,
+                       'file_text' => 1,
+               ];
+               foreach ( $map as $name => $field ) {
+                       $this->assertInstanceOf( 'SearchIndexField', $field );
+                       $this->assertEquals( $name, $field->getName() );
+                       unset( $expect[$name] );
+               }
+               $this->assertEmpty( $expect );
+       }
+}
index 9d4abe8..ec97d76 100644 (file)
@@ -249,11 +249,20 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase {
                $title = Title::newFromText( 'Somefile.jpg', NS_FILE );
                $page = new WikiPage( $title );
 
+               $fileHandler = $this->getMockBuilder( FileContentHandler::class )
+                       ->disableOriginalConstructor()
+                       ->setMethods( [ 'getDataForSearchIndex' ] )
+                       ->getMock();
+
                $handler = $this->getMockBuilder( WikitextContentHandler::class )
                        ->disableOriginalConstructor()
-                       ->setMethods( [ 'getFileText' ] )
+                       ->setMethods( [ 'getFileHandler' ] )
                        ->getMock();
-               $handler->method( 'getFileText' )->will( $this->returnValue( 'This is file content' ) );
+
+               $handler->method( 'getFileHandler' )->will( $this->returnValue( $fileHandler ) );
+               $fileHandler->expects( $this->once() )
+                       ->method( 'getDataForSearchIndex' )
+                       ->will( $this->returnValue( [ 'file_text' => 'This is file content' ] ) );
 
                $data = $handler->getDataForSearchIndex( $page, new ParserOutput(), $mockEngine );
                $this->assertArrayHasKey( 'file_text', $data );
index 607f25c..dbb126f 100644 (file)
  * Fake class around abstract class so we can call concrete methods.
  */
 class FakeDatabaseMysqlBase extends DatabaseMysqlBase {
-       // From DatabaseBase
+       // From Database
        function __construct() {
                $this->profiler = new ProfilerStub( [] );
                $this->trxProfiler = new TransactionProfiler();
+               $this->cliMode = true;
+               $this->connLogger = new \Psr\Log\NullLogger();
+               $this->queryLogger = new \Psr\Log\NullLogger();
+               $this->errorLogger = function ( Exception $e ) {
+                       wfWarn( get_class( $e ) . ": {$e->getMessage()}" );
+               };
+               $this->currentDomain = DatabaseDomain::newUnspecified();
        }
 
        protected function closeConnection() {
@@ -82,7 +89,6 @@ class FakeDatabaseMysqlBase extends DatabaseMysqlBase {
 
        }
 
-       // From interface DatabaseType
        function insertId() {
        }
 
@@ -169,22 +175,14 @@ class DatabaseMysqlBaseTest extends MediaWikiTestCase {
                        ->setMethods( [ 'fetchRow', 'query' ] )
                        ->getMock();
 
-               $db->expects( $this->any() )
-                       ->method( 'query' )
+               $db->method( 'query' )
                        ->with( $this->anything() )
-                       ->will(
-                               $this->returnValue( null )
-                       );
+                       ->willReturn( new FakeResultWrapper( [
+                               (object)[ 'Tables_in_' => 'view1' ],
+                               (object)[ 'Tables_in_' => 'view2' ],
+                               (object)[ 'Tables_in_' => 'myview' ]
+                       ] ) );
 
-               $db->expects( $this->any() )
-                       ->method( 'fetchRow' )
-                       ->with( $this->anything() )
-                       ->will( $this->onConsecutiveCalls(
-                               [ 'Tables_in_' => 'view1' ],
-                               [ 'Tables_in_' => 'view2' ],
-                               [ 'Tables_in_' => 'myview' ],
-                               false  # no more rows
-                       ) );
                return $db;
        }
        /**
@@ -193,9 +191,6 @@ class DatabaseMysqlBaseTest extends MediaWikiTestCase {
        function testListviews() {
                $db = $this->getMockForViews();
 
-               // The first call populate an internal cache of views
-               $this->assertEquals( [ 'view1', 'view2', 'myview' ],
-                       $db->listViews() );
                $this->assertEquals( [ 'view1', 'view2', 'myview' ],
                        $db->listViews() );
 
@@ -210,42 +205,6 @@ class DatabaseMysqlBaseTest extends MediaWikiTestCase {
                        $db->listViews( '' ) );
        }
 
-       /**
-        * @covers DatabaseMysqlBase::isView
-        * @dataProvider provideViewExistanceChecks
-        */
-       function testIsView( $isView, $viewName ) {
-               $db = $this->getMockForViews();
-
-               switch ( $isView ) {
-                       case true:
-                               $this->assertTrue( $db->isView( $viewName ),
-                                       "$viewName should be considered a view" );
-                       break;
-
-                       case false:
-                               $this->assertFalse( $db->isView( $viewName ),
-                                       "$viewName has not been defined as a view" );
-                       break;
-               }
-
-       }
-
-       function provideViewExistanceChecks() {
-               return [
-                       // format: whether it is a view, view name
-                       [ true, 'view1' ],
-                       [ true, 'view2' ],
-                       [ true, 'myview' ],
-
-                       [ false, 'user' ],
-
-                       [ false, 'view10' ],
-                       [ false, 'my' ],
-                       [ false, 'OH_MY_GOD' ],  # they killed kenny!
-               ];
-       }
-
        /**
         * @dataProvider provideComparePositions
         */
@@ -361,13 +320,11 @@ class DatabaseMysqlBaseTest extends MediaWikiTestCase {
                                'getLagDetectionMethod', 'getHeartbeatData', 'getMasterServerInfo' ] )
                        ->getMock();
 
-               $db->expects( $this->any() )
-                       ->method( 'getLagDetectionMethod' )
-                       ->will( $this->returnValue( 'pt-heartbeat' ) );
+               $db->method( 'getLagDetectionMethod' )
+                       ->willReturn( 'pt-heartbeat' );
 
-               $db->expects( $this->any() )
-                       ->method( 'getMasterServerInfo' )
-                       ->will( $this->returnValue( [ 'serverId' => 172, 'asOf' => time() ] ) );
+               $db->method( 'getMasterServerInfo' )
+                       ->willReturn( [ 'serverId' => 172, 'asOf' => time() ] );
 
                // Fake the current time.
                list( $nowSecFrac, $nowSec ) = explode( ' ', microtime() );
@@ -381,10 +338,9 @@ class DatabaseMysqlBaseTest extends MediaWikiTestCase {
                $ptTimeISO = $ptDateTime->format( 'Y-m-d\TH:i:s' );
                $ptTimeISO .= ltrim( number_format( $ptSecFrac, 6 ), '0' );
 
-               $db->expects( $this->any() )
-                       ->method( 'getHeartbeatData' )
+               $db->method( 'getHeartbeatData' )
                        ->with( [ 'server_id' => 172 ] )
-                       ->will( $this->returnValue( [ $ptTimeISO, $now ] ) );
+                       ->willReturn( [ $ptTimeISO, $now ] );
 
                $db->setLBInfo( 'clusterMasterHost', 'db1052' );
                $lagEst = $db->getLag();
index e7eeff9..656e661 100644 (file)
@@ -26,7 +26,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideSelect
-        * @covers DatabaseBase::select
+        * @covers Database::select
         */
        public function testSelect( $sql, $sqlText ) {
                $this->database->select(
@@ -132,7 +132,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideUpdate
-        * @covers DatabaseBase::update
+        * @covers Database::update
         */
        public function testUpdate( $sql, $sqlText ) {
                $this->database->update(
@@ -184,7 +184,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideDelete
-        * @covers DatabaseBase::delete
+        * @covers Database::delete
         */
        public function testDelete( $sql, $sqlText ) {
                $this->database->delete(
@@ -217,7 +217,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideUpsert
-        * @covers DatabaseBase::upsert
+        * @covers Database::upsert
         */
        public function testUpsert( $sql, $sqlText ) {
                $this->database->upsert(
@@ -253,7 +253,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideDeleteJoin
-        * @covers DatabaseBase::deleteJoin
+        * @covers Database::deleteJoin
         */
        public function testDeleteJoin( $sql, $sqlText ) {
                $this->database->deleteJoin(
@@ -300,7 +300,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideInsert
-        * @covers DatabaseBase::insert
+        * @covers Database::insert
         */
        public function testInsert( $sql, $sqlText ) {
                $this->database->insert(
@@ -353,7 +353,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideInsertSelect
-        * @covers DatabaseBase::insertSelect
+        * @covers Database::insertSelect
         */
        public function testInsertSelect( $sql, $sqlTextNative, $sqlSelect, $sqlInsert ) {
                $this->database->insertSelect(
@@ -440,7 +440,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideReplace
-        * @covers DatabaseBase::replace
+        * @covers Database::replace
         */
        public function testReplace( $sql, $sqlText ) {
                $this->database->replace(
@@ -555,7 +555,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideNativeReplace
-        * @covers DatabaseBase::nativeReplace
+        * @covers Database::nativeReplace
         */
        public function testNativeReplace( $sql, $sqlText ) {
                $this->database->nativeReplace(
@@ -582,7 +582,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideConditional
-        * @covers DatabaseBase::conditional
+        * @covers Database::conditional
         */
        public function testConditional( $sql, $sqlText ) {
                $this->assertEquals( trim( $this->database->conditional(
@@ -623,7 +623,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideBuildConcat
-        * @covers DatabaseBase::buildConcat
+        * @covers Database::buildConcat
         */
        public function testBuildConcat( $stringList, $sqlText ) {
                $this->assertEquals( trim( $this->database->buildConcat(
@@ -646,7 +646,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideBuildLike
-        * @covers DatabaseBase::buildLike
+        * @covers Database::buildLike
         */
        public function testBuildLike( $array, $sqlText ) {
                $this->assertEquals( trim( $this->database->buildLike(
@@ -677,7 +677,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideUnionQueries
-        * @covers DatabaseBase::unionQueries
+        * @covers Database::unionQueries
         */
        public function testUnionQueries( $sql, $sqlText ) {
                $this->assertEquals( trim( $this->database->unionQueries(
@@ -713,7 +713,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers DatabaseBase::commit
+        * @covers Database::commit
         */
        public function testTransactionCommit() {
                $this->database->begin( __METHOD__ );
@@ -722,7 +722,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers DatabaseBase::rollback
+        * @covers Database::rollback
         */
        public function testTransactionRollback() {
                $this->database->begin( __METHOD__ );
@@ -731,16 +731,16 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers DatabaseBase::dropTable
+        * @covers Database::dropTable
         */
        public function testDropTable() {
                $this->database->setExistingTables( [ 'table' ] );
                $this->database->dropTable( 'table', __METHOD__ );
-               $this->assertLastSql( 'DROP TABLE table' );
+               $this->assertLastSql( 'DROP TABLE table CASCADE' );
        }
 
        /**
-        * @covers DatabaseBase::dropTable
+        * @covers Database::dropTable
         */
        public function testDropNonExistingTable() {
                $this->assertFalse(
@@ -750,7 +750,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideMakeList
-        * @covers DatabaseBase::makeList
+        * @covers Database::makeList
         */
        public function testMakeList( $list, $mode, $sqlText ) {
                $this->assertEquals( trim( $this->database->makeList(
@@ -827,4 +827,42 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                        ],
                ];
        }
+
+       public function testSessionTempTables() {
+               $temp1 = $this->database->tableName( 'tmp_table_1' );
+               $temp2 = $this->database->tableName( 'tmp_table_2' );
+               $temp3 = $this->database->tableName( 'tmp_table_3' );
+
+               $this->database->query( "CREATE TEMPORARY TABLE $temp1 LIKE orig_tbl", __METHOD__ );
+               $this->database->query( "CREATE TEMPORARY TABLE $temp2 LIKE orig_tbl", __METHOD__ );
+               $this->database->query( "CREATE TEMPORARY TABLE $temp3 LIKE orig_tbl", __METHOD__ );
+
+               $this->assertTrue( $this->database->tableExists( "tmp_table_1", __METHOD__ ) );
+               $this->assertTrue( $this->database->tableExists( "tmp_table_2", __METHOD__ ) );
+               $this->assertTrue( $this->database->tableExists( "tmp_table_3", __METHOD__ ) );
+
+               $this->database->dropTable( 'tmp_table_1', __METHOD__ );
+               $this->database->dropTable( 'tmp_table_2', __METHOD__ );
+               $this->database->dropTable( 'tmp_table_3', __METHOD__ );
+
+               $this->assertFalse( $this->database->tableExists( "tmp_table_1", __METHOD__ ) );
+               $this->assertFalse( $this->database->tableExists( "tmp_table_2", __METHOD__ ) );
+               $this->assertFalse( $this->database->tableExists( "tmp_table_3", __METHOD__ ) );
+
+               $this->database->query( "CREATE TEMPORARY TABLE tmp_table_1 LIKE orig_tbl", __METHOD__ );
+               $this->database->query( "CREATE TEMPORARY TABLE 'tmp_table_2' LIKE orig_tbl", __METHOD__ );
+               $this->database->query( "CREATE TEMPORARY TABLE `tmp_table_3` LIKE orig_tbl", __METHOD__ );
+
+               $this->assertTrue( $this->database->tableExists( "tmp_table_1", __METHOD__ ) );
+               $this->assertTrue( $this->database->tableExists( "tmp_table_2", __METHOD__ ) );
+               $this->assertTrue( $this->database->tableExists( "tmp_table_3", __METHOD__ ) );
+
+               $this->database->query( "DROP TEMPORARY TABLE tmp_table_1 LIKE orig_tbl", __METHOD__ );
+               $this->database->query( "DROP TEMPORARY TABLE 'tmp_table_2' LIKE orig_tbl", __METHOD__ );
+               $this->database->query( "DROP TABLE `tmp_table_3` LIKE orig_tbl", __METHOD__ );
+
+               $this->assertFalse( $this->database->tableExists( "tmp_table_1", __METHOD__ ) );
+               $this->assertFalse( $this->database->tableExists( "tmp_table_2", __METHOD__ ) );
+               $this->assertFalse( $this->database->tableExists( "tmp_table_3", __METHOD__ ) );
+       }
 }
index 80fb826..172d686 100644 (file)
@@ -7,7 +7,7 @@ class DatabaseSqliteMock extends DatabaseSqlite {
                $p['dbFilePath'] = ':memory:';
                $p['schema'] = false;
 
-               return DatabaseBase::factory( 'SqliteMock', $p );
+               return Database::factory( 'SqliteMock', $p );
        }
 
        function query( $sql, $fname = '', $tempIgnore = false ) {
index 0f9a401..606a209 100644 (file)
@@ -2,11 +2,11 @@
 
 /**
  * @group Database
- * @group DatabaseBase
+ * @group Database
  */
 class DatabaseTest extends MediaWikiTestCase {
        /**
-        * @var DatabaseBase
+        * @var Database
         */
        protected $db;
 
@@ -25,8 +25,9 @@ class DatabaseTest extends MediaWikiTestCase {
                }
                $this->db->restoreFlags( IDatabase::RESTORE_INITIAL );
        }
+
        /**
-        * @covers DatabaseBase::dropTable
+        * @covers Database::dropTable
         */
        public function testAddQuotesNull() {
                $check = "NULL";
@@ -68,21 +69,26 @@ class DatabaseTest extends MediaWikiTestCase {
        }
 
        private function getSharedTableName( $table, $database, $prefix, $format = 'quoted' ) {
-               global $wgSharedDB, $wgSharedTables, $wgSharedPrefix;
-
-               $oldName = $wgSharedDB;
-               $oldTables = $wgSharedTables;
-               $oldPrefix = $wgSharedPrefix;
+               global $wgSharedDB, $wgSharedTables, $wgSharedPrefix, $wgSharedSchema;
 
-               $wgSharedDB = $database;
-               $wgSharedTables = [ $table ];
-               $wgSharedPrefix = $prefix;
+               $this->db->setTableAliases( [
+                       $table => [
+                               'dbname' => $database,
+                               'schema' => null,
+                               'prefix' => $prefix
+                       ]
+               ] );
 
                $ret = $this->db->tableName( $table, $format );
 
-               $wgSharedDB = $oldName;
-               $wgSharedTables = $oldTables;
-               $wgSharedPrefix = $oldPrefix;
+               $this->db->setTableAliases( array_fill_keys(
+                       $wgSharedDB ? $wgSharedTables : [],
+                       [
+                               'dbname' => $wgSharedDB,
+                               'schema' => $wgSharedSchema,
+                               'prefix' => $wgSharedPrefix
+                       ]
+               ) );
 
                return $ret;
        }
@@ -169,47 +175,6 @@ class DatabaseTest extends MediaWikiTestCase {
                );
        }
 
-       public function testFillPreparedEmpty() {
-               $sql = $this->db->fillPrepared(
-                       'SELECT * FROM interwiki', [] );
-               $this->assertEquals(
-                       "SELECT * FROM interwiki",
-                       $sql );
-       }
-
-       public function testFillPreparedQuestion() {
-               $sql = $this->db->fillPrepared(
-                       'SELECT * FROM cur WHERE cur_namespace=? AND cur_title=?',
-                       [ 4, "Snicker's_paradox" ] );
-
-               $check = "SELECT * FROM cur WHERE cur_namespace='4' AND cur_title='Snicker''s_paradox'";
-               if ( $this->db->getType() === 'mysql' ) {
-                       $check = "SELECT * FROM cur WHERE cur_namespace='4' AND cur_title='Snicker\'s_paradox'";
-               }
-               $this->assertEquals( $check, $sql );
-       }
-
-       public function testFillPreparedBang() {
-               $sql = $this->db->fillPrepared(
-                       'SELECT user_id FROM ! WHERE user_name=?',
-                       [ '"user"', "Slash's Dot" ] );
-
-               $check = "SELECT user_id FROM \"user\" WHERE user_name='Slash''s Dot'";
-               if ( $this->db->getType() === 'mysql' ) {
-                       $check = "SELECT user_id FROM \"user\" WHERE user_name='Slash\'s Dot'";
-               }
-               $this->assertEquals( $check, $sql );
-       }
-
-       public function testFillPreparedRaw() {
-               $sql = $this->db->fillPrepared(
-                       "SELECT * FROM cur WHERE cur_title='This_\\&_that,_WTF\\?\\!'",
-                       [ '"user"', "Slash's Dot" ] );
-               $this->assertEquals(
-                       "SELECT * FROM cur WHERE cur_title='This_&_that,_WTF?!'",
-                       $sql );
-       }
-
        public function testStoredFunctions() {
                if ( !in_array( wfGetDB( DB_MASTER )->getType(), [ 'mysql', 'postgres' ] ) ) {
                        $this->markTestSkipped( 'MySQL or Postgres required' );
@@ -226,7 +191,7 @@ class DatabaseTest extends MediaWikiTestCase {
 
        private function dropFunctions() {
                $this->db->query( 'DROP FUNCTION IF EXISTS mw_test_function'
-                               . ( $this->db->getType() == 'postgres' ? '()' : '' )
+                       . ( $this->db->getType() == 'postgres' ? '()' : '' )
                );
        }
 
@@ -242,26 +207,35 @@ class DatabaseTest extends MediaWikiTestCase {
                $db->setFlag( DBO_TRX );
                $called = false;
                $flagSet = null;
-               $db->onTransactionIdle( function() use ( $db, &$flagSet, &$called ) {
-                       $called = true;
-                       $flagSet = $db->getFlag( DBO_TRX );
-               } );
+               $db->onTransactionIdle(
+                       function () use ( $db, &$flagSet, &$called ) {
+                               $called = true;
+                               $flagSet = $db->getFlag( DBO_TRX );
+                       },
+                       __METHOD__
+               );
                $this->assertFalse( $flagSet, 'DBO_TRX off in callback' );
                $this->assertTrue( $db->getFlag( DBO_TRX ), 'DBO_TRX restored to default' );
                $this->assertTrue( $called, 'Callback reached' );
 
                $db->clearFlag( DBO_TRX );
                $flagSet = null;
-               $db->onTransactionIdle( function() use ( $db, &$flagSet ) {
-                       $flagSet = $db->getFlag( DBO_TRX );
-               } );
+               $db->onTransactionIdle(
+                       function () use ( $db, &$flagSet ) {
+                               $flagSet = $db->getFlag( DBO_TRX );
+                       },
+                       __METHOD__
+               );
                $this->assertFalse( $flagSet, 'DBO_TRX off in callback' );
                $this->assertFalse( $db->getFlag( DBO_TRX ), 'DBO_TRX restored to default' );
 
                $db->clearFlag( DBO_TRX );
-               $db->onTransactionIdle( function() use ( $db ) {
-                       $db->setFlag( DBO_TRX );
-               } );
+               $db->onTransactionIdle(
+                       function () use ( $db ) {
+                               $db->setFlag( DBO_TRX );
+                       },
+                       __METHOD__
+               );
                $this->assertFalse( $db->getFlag( DBO_TRX ), 'DBO_TRX restored to default' );
        }
 
@@ -271,7 +245,7 @@ class DatabaseTest extends MediaWikiTestCase {
                $db->clearFlag( DBO_TRX );
                $db->begin( __METHOD__ );
                $called = false;
-               $db->onTransactionResolution( function() use ( $db, &$called ) {
+               $db->onTransactionResolution( function () use ( $db, &$called ) {
                        $called = true;
                        $db->setFlag( DBO_TRX );
                } );
@@ -282,7 +256,7 @@ class DatabaseTest extends MediaWikiTestCase {
                $db->clearFlag( DBO_TRX );
                $db->begin( __METHOD__ );
                $called = false;
-               $db->onTransactionResolution( function() use ( $db, &$called ) {
+               $db->onTransactionResolution( function () use ( $db, &$called ) {
                        $called = true;
                        $db->setFlag( DBO_TRX );
                } );
@@ -292,12 +266,12 @@ class DatabaseTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers DatabaseBase::setTransactionListener()
+        * @covers Database::setTransactionListener()
         */
        public function testTransactionListener() {
                $db = $this->db;
 
-               $db->setTransactionListener( 'ping', function() use ( $db, &$called ) {
+               $db->setTransactionListener( 'ping', function () use ( $db, &$called ) {
                        $called = true;
                } );
 
@@ -324,7 +298,7 @@ class DatabaseTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers DatabaseBase::flushSnapshot()
+        * @covers Database::flushSnapshot()
         */
        public function testFlushSnapshot() {
                $db = $this->db;
@@ -376,33 +350,35 @@ class DatabaseTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers DatabaseBase::getFlag(
-        * @covers DatabaseBase::setFlag()
-        * @covers DatabaseBase::restoreFlags()
+        * @covers Database::getFlag(
+        * @covers Database::setFlag()
+        * @covers Database::restoreFlags()
         */
        public function testFlagSetting() {
                $db = $this->db;
                $origTrx = $db->getFlag( DBO_TRX );
                $origSsl = $db->getFlag( DBO_SSL );
 
-               if ( $origTrx ) {
-                       $db->clearFlag( DBO_TRX, $db::REMEMBER_PRIOR );
-               } else {
-                       $db->setFlag( DBO_TRX, $db::REMEMBER_PRIOR );
-               }
+               $origTrx
+                       ? $db->clearFlag( DBO_TRX, $db::REMEMBER_PRIOR )
+                       : $db->setFlag( DBO_TRX, $db::REMEMBER_PRIOR );
                $this->assertEquals( !$origTrx, $db->getFlag( DBO_TRX ) );
 
-               if ( $origSsl ) {
-                       $db->clearFlag( DBO_SSL, $db::REMEMBER_PRIOR );
-               } else {
-                       $db->setFlag( DBO_SSL, $db::REMEMBER_PRIOR );
-               }
+               $origSsl
+                       ? $db->clearFlag( DBO_SSL, $db::REMEMBER_PRIOR )
+                       : $db->setFlag( DBO_SSL, $db::REMEMBER_PRIOR );
                $this->assertEquals( !$origSsl, $db->getFlag( DBO_SSL ) );
 
-               $db2 = clone $db;
-               $db2->restoreFlags( $db::RESTORE_INITIAL );
-               $this->assertEquals( $origTrx, $db2->getFlag( DBO_TRX ) );
-               $this->assertEquals( $origSsl, $db2->getFlag( DBO_SSL ) );
+               $db->restoreFlags( $db::RESTORE_INITIAL );
+               $this->assertEquals( $origTrx, $db->getFlag( DBO_TRX ) );
+               $this->assertEquals( $origSsl, $db->getFlag( DBO_SSL ) );
+
+               $origTrx
+                       ? $db->clearFlag( DBO_TRX, $db::REMEMBER_PRIOR )
+                       : $db->setFlag( DBO_TRX, $db::REMEMBER_PRIOR );
+               $origSsl
+                       ? $db->clearFlag( DBO_SSL, $db::REMEMBER_PRIOR )
+                       : $db->setFlag( DBO_SSL, $db::REMEMBER_PRIOR );
 
                $db->restoreFlags();
                $this->assertEquals( $origSsl, $db->getFlag( DBO_SSL ) );
@@ -412,4 +388,26 @@ class DatabaseTest extends MediaWikiTestCase {
                $this->assertEquals( $origSsl, $db->getFlag( DBO_SSL ) );
                $this->assertEquals( $origTrx, $db->getFlag( DBO_TRX ) );
        }
+
+       /**
+        * @covers Database::tablePrefix()
+        * @covers Database::dbSchema()
+        */
+       public function testMutators() {
+               $old = $this->db->tablePrefix();
+               $this->assertType( 'string', $old, 'Prefix is string' );
+               $this->assertEquals( $old, $this->db->tablePrefix(), "Prefix unchanged" );
+               $this->assertEquals( $old, $this->db->tablePrefix( 'xxx' ) );
+               $this->assertEquals( 'xxx', $this->db->tablePrefix(), "Prefix set" );
+               $this->db->tablePrefix( $old );
+               $this->assertNotEquals( 'xxx', $this->db->tablePrefix() );
+
+               $old = $this->db->dbSchema();
+               $this->assertType( 'string', $old, 'Schema is string' );
+               $this->assertEquals( $old, $this->db->dbSchema(), "Schema unchanged" );
+               $this->assertEquals( $old, $this->db->dbSchema( 'xxx' ) );
+               $this->assertEquals( 'xxx', $this->db->dbSchema(), "Schema set" );
+               $this->db->dbSchema( $old );
+               $this->assertNotEquals( 'xxx', $this->db->dbSchema() );
+       }
 }
index 63322cc..c5603c4 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 
 /**
- * Helper for testing the methods from the DatabaseBase class
+ * Helper for testing the methods from the Database class
  * @since 1.22
  */
-class DatabaseTestHelper extends DatabaseBase {
+class DatabaseTestHelper extends Database {
 
        /**
         * __CLASS__ of the test suite,
@@ -14,7 +14,7 @@ class DatabaseTestHelper extends DatabaseBase {
 
        /**
         * Array of lastSqls passed to query(),
-        * This is an array since some methods in DatabaseBase can do more than one
+        * This is an array since some methods in Database can do more than one
         * query. Cleared when calling getLastSqls().
         */
        protected $lastSqls = [];
@@ -34,6 +34,12 @@ class DatabaseTestHelper extends DatabaseBase {
                $this->profiler = new ProfilerStub( [] );
                $this->trxProfiler = new TransactionProfiler();
                $this->cliMode = isset( $opts['cliMode'] ) ? $opts['cliMode'] : true;
+               $this->connLogger = new \Psr\Log\NullLogger();
+               $this->queryLogger = new \Psr\Log\NullLogger();
+               $this->errorLogger = function ( Exception $e ) {
+                       wfWarn( get_class( $e ) . ": {$e->getMessage()}" );
+               };
+               $this->currentDomain = DatabaseDomain::newUnspecified();
        }
 
        /**
@@ -92,6 +98,11 @@ class DatabaseTestHelper extends DatabaseBase {
        }
 
        public function tableExists( $table, $fname = __METHOD__ ) {
+               $tableRaw = $this->tableName( $table, 'raw' );
+               if ( isset( $this->mSessionTempTables[$tableRaw] ) ) {
+                       return true; // already known to exist
+               }
+
                $this->checkFunctionName( $fname );
 
                return in_array( $table, (array)$this->tablesExists );
@@ -150,7 +161,7 @@ class DatabaseTestHelper extends DatabaseBase {
                return false;
        }
 
-       function indexInfo( $table, $index, $fname = 'DatabaseBase::indexInfo' ) {
+       function indexInfo( $table, $index, $fname = 'Database::indexInfo' ) {
                return false;
        }
 
index bf78d13..aed2d83 100644 (file)
@@ -43,7 +43,7 @@ class LBFactoryTest extends MediaWikiTestCase {
                ];
 
                $this->hideDeprecated( '$wgLBFactoryConf must be updated. See RELEASE-NOTES for details' );
-               $result = LBFactory::getLBFactoryClass( $config );
+               $result = MWLBFactory::getLBFactoryClass( $config );
 
                $this->assertEquals( $expected, $result );
        }
@@ -54,14 +54,25 @@ class LBFactoryTest extends MediaWikiTestCase {
                        [ 'LBFactorySimple', 'LBFactory_Simple' ],
                        [ 'LBFactorySingle', 'LBFactory_Single' ],
                        [ 'LBFactoryMulti', 'LBFactory_Multi' ],
-                       [ 'LBFactoryFake', 'LBFactory_Fake' ],
                ];
        }
 
        public function testLBFactorySimpleServer() {
-               $this->setMwGlobals( 'wgDBservers', false );
+               global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBtype;
 
-               $factory = new LBFactorySimple( [] );
+               $servers = [
+                       [
+                               'host'      => $wgDBserver,
+                               'dbname'    => $wgDBname,
+                               'user'      => $wgDBuser,
+                               'password'  => $wgDBpassword,
+                               'type'      => $wgDBtype,
+                               'load'      => 0,
+                               'flags'     => DBO_TRX // REPEATABLE-READ for consistency
+                       ],
+               ];
+
+               $factory = new LBFactorySimple( [ 'servers' => $servers ] );
                $lb = $factory->getMainLB();
 
                $dbw = $lb->getConnection( DB_MASTER );
@@ -77,28 +88,31 @@ class LBFactoryTest extends MediaWikiTestCase {
        public function testLBFactorySimpleServers() {
                global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBtype;
 
-               $this->setMwGlobals( 'wgDBservers', [
+               $servers = [
                        [ // master
-                               'host'          => $wgDBserver,
-                               'dbname'    => $wgDBname,
-                               'user'          => $wgDBuser,
-                               'password'      => $wgDBpassword,
-                               'type'          => $wgDBtype,
-                               'load'      => 0,
-                               'flags'     => DBO_TRX // REPEATABLE-READ for consistency
+                               'host'     => $wgDBserver,
+                               'dbname'   => $wgDBname,
+                               'user'     => $wgDBuser,
+                               'password' => $wgDBpassword,
+                               'type'     => $wgDBtype,
+                               'load'     => 0,
+                               'flags'    => DBO_TRX // REPEATABLE-READ for consistency
                        ],
                        [ // emulated slave
-                               'host'          => $wgDBserver,
-                               'dbname'    => $wgDBname,
-                               'user'          => $wgDBuser,
-                               'password'      => $wgDBpassword,
-                               'type'          => $wgDBtype,
-                               'load'      => 100,
-                               'flags'     => DBO_TRX // REPEATABLE-READ for consistency
+                               'host'     => $wgDBserver,
+                               'dbname'   => $wgDBname,
+                               'user'     => $wgDBuser,
+                               'password' => $wgDBpassword,
+                               'type'     => $wgDBtype,
+                               'load'     => 100,
+                               'flags'    => DBO_TRX // REPEATABLE-READ for consistency
                        ]
-               ] );
+               ];
 
-               $factory = new LBFactorySimple( [ 'loadMonitorClass' => 'LoadMonitorNull' ] );
+               $factory = new LBFactorySimple( [
+                       'servers' => $servers,
+                       'loadMonitorClass' => 'LoadMonitorNull'
+               ] );
                $lb = $factory->getMainLB();
 
                $dbw = $lb->getConnection( DB_MASTER );
@@ -159,26 +173,18 @@ class LBFactoryTest extends MediaWikiTestCase {
                $mockDB = $this->getMockBuilder( 'DatabaseMysql' )
                        ->disableOriginalConstructor()
                        ->getMock();
-               $mockDB->expects( $this->any() )
-                       ->method( 'writesOrCallbacksPending' )->will( $this->returnValue( true ) );
-               $mockDB->expects( $this->any() )
-                       ->method( 'lastDoneWrites' )->will( $this->returnValue( $now ) );
-               $mockDB->expects( $this->any() )
-                       ->method( 'getMasterPos' )->will( $this->returnValue( $mPos ) );
+               $mockDB->method( 'writesOrCallbacksPending' )->willReturn( true );
+               $mockDB->method( 'lastDoneWrites' )->willReturn( $now );
+               $mockDB->method( 'getMasterPos' )->willReturn( $mPos );
 
                $lb = $this->getMockBuilder( 'LoadBalancer' )
                        ->disableOriginalConstructor()
                        ->getMock();
-               $lb->expects( $this->any() )
-                       ->method( 'getConnection' )->will( $this->returnValue( $mockDB ) );
-               $lb->expects( $this->any() )
-                       ->method( 'getServerCount' )->will( $this->returnValue( 2 ) );
-               $lb->expects( $this->any() )
-                       ->method( 'parentInfo' )->will( $this->returnValue( [ 'id' => "main-DEFAULT" ] ) );
-               $lb->expects( $this->any() )
-                       ->method( 'getAnyOpenConnection' )->will( $this->returnValue( $mockDB ) );
-               $lb->expects( $this->any() )
-                       ->method( 'hasOrMadeRecentMasterChanges' )->will( $this->returnCallback(
+               $lb->method( 'getConnection' )->willReturn( $mockDB );
+               $lb->method( 'getServerCount' )->willReturn( 2 );
+               $lb->method( 'parentInfo' )->willReturn( [ 'id' => "main-DEFAULT" ] );
+               $lb->method( 'getAnyOpenConnection' )->willReturn( $mockDB );
+               $lb->method( 'hasOrMadeRecentMasterChanges' )->will( $this->returnCallback(
                                function () use ( $mockDB ) {
                                        $p = 0;
                                        $p |= call_user_func( [ $mockDB, 'writesOrCallbacksPending' ] );
@@ -187,8 +193,7 @@ class LBFactoryTest extends MediaWikiTestCase {
                                        return (bool)$p;
                                }
                        ) );
-               $lb->expects( $this->any() )
-                       ->method( 'getMasterPos' )->will( $this->returnValue( $mPos ) );
+               $lb->method( 'getMasterPos' )->willReturn( $mPos );
 
                $bag = new HashBagOStuff();
                $cp = new ChronologyProtector(
@@ -226,4 +231,148 @@ class LBFactoryTest extends MediaWikiTestCase {
                $cp->shutdownLB( $lb );
                $cp->shutdown();
        }
+
+       private function newLBFactoryMulti( array $baseOverride = [], array $serverOverride = [] ) {
+               global $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, $wgDBtype;
+
+               return new LBFactoryMulti( $baseOverride + [
+                       'sectionsByDB' => [],
+                       'sectionLoads' => [
+                               'DEFAULT' => [
+                                       'test-db1' => 1,
+                               ],
+                       ],
+                       'serverTemplate' => $serverOverride + [
+                               'dbname' => $wgDBname,
+                               'user' => $wgDBuser,
+                               'password' => $wgDBpassword,
+                               'type' => $wgDBtype,
+                               'flags' => DBO_DEFAULT
+                       ],
+                       'hostsByName' => [
+                               'test-db1' => $wgDBserver,
+                       ],
+                       'loadMonitorClass' => 'LoadMonitorNull',
+                       'localDomain' => wfWikiID()
+               ] );
+       }
+
+       public function testNiceDomains() {
+               global $wgDBname;
+
+               $factory = $this->newLBFactoryMulti();
+               $lb = $factory->getMainLB();
+
+               $db = $lb->getConnectionRef( DB_MASTER );
+               $this->assertEquals(
+                       $wgDBname,
+                       $db->getDomainID()
+               );
+               unset( $db );
+
+               /** @var Database $db */
+               $db = $lb->getConnection( DB_MASTER, [], '' );
+               $lb->reuseConnection( $db ); // don't care
+
+               $this->assertEquals(
+                       '',
+                       $db->getDomainID()
+               );
+
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( 'page' ),
+                       $db->tableName( 'page' ),
+                       "Correct full table name"
+               );
+
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( $wgDBname ) . '.' . $db->addIdentifierQuotes( 'page' ),
+                       $db->tableName( "$wgDBname.page" ),
+                       "Correct full table name"
+               );
+
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( 'nice_db' ) . '.' . $db->addIdentifierQuotes( 'page' ),
+                       $db->tableName( 'nice_db.page' ),
+                       "Correct full table name"
+               );
+
+               $factory->setDomainPrefix( 'my_' );
+               $this->assertEquals(
+                       '',
+                       $db->getDomainID()
+               );
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( 'my_page' ),
+                       $db->tableName( 'page' ),
+                       "Correct full table name"
+               );
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( 'other_nice_db' ) . '.' . $db->addIdentifierQuotes( 'page' ),
+                       $db->tableName( 'other_nice_db.page' ),
+                       "Correct full table name"
+               );
+
+               $factory->closeAll();
+               $factory->destroy();
+       }
+
+       public function testTrickyDomain() {
+               $dbname = 'unittest-domain';
+               $factory = $this->newLBFactoryMulti(
+                       [ 'localDomain' => $dbname ], [ 'dbname' => $dbname ] );
+               $lb = $factory->getMainLB();
+               /** @var Database $db */
+               $db = $lb->getConnection( DB_MASTER, [], '' );
+               $lb->reuseConnection( $db ); // don't care
+
+               $this->assertEquals(
+                       '',
+                       $db->getDomainID()
+               );
+
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( 'page' ),
+                       $db->tableName( 'page' ),
+                       "Correct full table name"
+               );
+
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( $dbname ) . '.' . $db->addIdentifierQuotes( 'page' ),
+                       $db->tableName( "$dbname.page" ),
+                       "Correct full table name"
+               );
+
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( 'nice_db' ) . '.' . $db->addIdentifierQuotes( 'page' ),
+                       $db->tableName( 'nice_db.page' ),
+                       "Correct full table name"
+               );
+
+               $factory->setDomainPrefix( 'my_' );
+
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( 'my_page' ),
+                       $db->tableName( 'page' ),
+                       "Correct full table name"
+               );
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( 'other_nice_db' ) . '.' . $db->addIdentifierQuotes( 'page' ),
+                       $db->tableName( 'other_nice_db.page' ),
+                       "Correct full table name"
+               );
+
+               \MediaWiki\suppressWarnings();
+               $this->assertFalse( $db->selectDB( 'garbage-db' ) );
+               \MediaWiki\restoreWarnings();
+
+               $this->assertEquals(
+                       $db->addIdentifierQuotes( 'garbage-db' ) . '.' . $db->addIdentifierQuotes( 'page' ),
+                       $db->tableName( 'garbage-db.page' ),
+                       "Correct full table name"
+               );
+
+               $factory->closeAll();
+               $factory->destroy();
+       }
 }
index 254cfbd..c3d31d1 100644 (file)
@@ -268,7 +268,7 @@ class FileBackendTest extends MediaWikiTestCase {
        public static function provider_testStore() {
                $cases = [];
 
-               $tmpName = TempFSFile::factory( "unittests_", 'txt' )->getPath();
+               $tmpName = TempFSFile::factory( "unittests_", 'txt', wfTempDir() )->getPath();
                $toPath = self::baseStorePath() . '/unittest-cont1/e/fun/obj1.txt';
                $op = [ 'op' => 'store', 'src' => $tmpName, 'dst' => $toPath ];
                $cases[] = [ $op ];
@@ -1786,9 +1786,9 @@ class FileBackendTest extends MediaWikiTestCase {
                $fileBContents = 'g-jmq3gpqgt3qtg q3GT ';
                $fileCContents = 'eigna[ogmewt 3qt g3qg flew[ag';
 
-               $tmpNameA = TempFSFile::factory( "unittests_", 'txt' )->getPath();
-               $tmpNameB = TempFSFile::factory( "unittests_", 'txt' )->getPath();
-               $tmpNameC = TempFSFile::factory( "unittests_", 'txt' )->getPath();
+               $tmpNameA = TempFSFile::factory( "unittests_", 'txt', wfTempDir() )->getPath();
+               $tmpNameB = TempFSFile::factory( "unittests_", 'txt', wfTempDir() )->getPath();
+               $tmpNameC = TempFSFile::factory( "unittests_", 'txt', wfTempDir() )->getPath();
                $this->addTmpFiles( [ $tmpNameA, $tmpNameB, $tmpNameC ] );
                file_put_contents( $tmpNameA, $fileAContents );
                file_put_contents( $tmpNameB, $fileBContents );
@@ -1914,7 +1914,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        // Does nothing
                ], [ 'force' => 1 ] );
 
-               $this->assertNotEquals( [], $status->errors, "Operation had warnings" );
+               $this->assertNotEquals( [], $status->getErrors(), "Operation had warnings" );
                $this->assertEquals( true, $status->isOK(), "Operation batch succeeded" );
                $this->assertEquals( 8, count( $status->success ),
                        "Operation batch has correct success array" );
@@ -2371,25 +2371,25 @@ class FileBackendTest extends MediaWikiTestCase {
 
                for ( $i = 0; $i < 25; $i++ ) {
                        $status = $this->backend->lockFiles( $paths, LockManager::LOCK_EX );
-                       $this->assertEquals( print_r( [], true ), print_r( $status->errors, true ),
+                       $this->assertEquals( print_r( [], true ), print_r( $status->getErrors(), true ),
                                "Locking of files succeeded ($backendName) ($i)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Locking of files succeeded with OK status ($backendName) ($i)." );
 
                        $status = $this->backend->lockFiles( $paths, LockManager::LOCK_SH );
-                       $this->assertEquals( print_r( [], true ), print_r( $status->errors, true ),
+                       $this->assertEquals( print_r( [], true ), print_r( $status->getErrors(), true ),
                                "Locking of files succeeded ($backendName) ($i)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Locking of files succeeded with OK status ($backendName) ($i)." );
 
                        $status = $this->backend->unlockFiles( $paths, LockManager::LOCK_SH );
-                       $this->assertEquals( print_r( [], true ), print_r( $status->errors, true ),
+                       $this->assertEquals( print_r( [], true ), print_r( $status->getErrors(), true ),
                                "Locking of files succeeded ($backendName) ($i)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Locking of files succeeded with OK status ($backendName) ($i)." );
 
                        $status = $this->backend->unlockFiles( $paths, LockManager::LOCK_EX );
-                       $this->assertEquals( print_r( [], true ), print_r( $status->errors, true ),
+                       $this->assertEquals( print_r( [], true ), print_r( $status->getErrors(), true ),
                                "Locking of files succeeded ($backendName). ($i)" );
                        $this->assertEquals( true, $status->isOK(),
                                "Locking of files succeeded with OK status ($backendName) ($i)." );
@@ -2397,25 +2397,25 @@ class FileBackendTest extends MediaWikiTestCase {
                        # # Flip the acquire/release ordering around ##
 
                        $status = $this->backend->lockFiles( $paths, LockManager::LOCK_SH );
-                       $this->assertEquals( print_r( [], true ), print_r( $status->errors, true ),
+                       $this->assertEquals( print_r( [], true ), print_r( $status->getErrors(), true ),
                                "Locking of files succeeded ($backendName) ($i)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Locking of files succeeded with OK status ($backendName) ($i)." );
 
                        $status = $this->backend->lockFiles( $paths, LockManager::LOCK_EX );
-                       $this->assertEquals( print_r( [], true ), print_r( $status->errors, true ),
+                       $this->assertEquals( print_r( [], true ), print_r( $status->getErrors(), true ),
                                "Locking of files succeeded ($backendName) ($i)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Locking of files succeeded with OK status ($backendName) ($i)." );
 
                        $status = $this->backend->unlockFiles( $paths, LockManager::LOCK_EX );
-                       $this->assertEquals( print_r( [], true ), print_r( $status->errors, true ),
+                       $this->assertEquals( print_r( [], true ), print_r( $status->getErrors(), true ),
                                "Locking of files succeeded ($backendName). ($i)" );
                        $this->assertEquals( true, $status->isOK(),
                                "Locking of files succeeded with OK status ($backendName) ($i)." );
 
                        $status = $this->backend->unlockFiles( $paths, LockManager::LOCK_SH );
-                       $this->assertEquals( print_r( [], true ), print_r( $status->errors, true ),
+                       $this->assertEquals( print_r( [], true ), print_r( $status->getErrors(), true ),
                                "Locking of files succeeded ($backendName) ($i)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Locking of files succeeded with OK status ($backendName) ($i)." );
@@ -2425,7 +2425,7 @@ class FileBackendTest extends MediaWikiTestCase {
                $sl = $this->backend->getScopedFileLocks( $paths, LockManager::LOCK_EX, $status );
                $this->assertInstanceOf( 'ScopedLock', $sl,
                        "Scoped locking of files succeeded ($backendName)." );
-               $this->assertEquals( [], $status->errors,
+               $this->assertEquals( [], $status->getErrors(),
                        "Scoped locking of files succeeded ($backendName)." );
                $this->assertEquals( true, $status->isOK(),
                        "Scoped locking of files succeeded with OK status ($backendName)." );
@@ -2433,7 +2433,7 @@ class FileBackendTest extends MediaWikiTestCase {
                ScopedLock::release( $sl );
                $this->assertEquals( null, $sl,
                        "Scoped unlocking of files succeeded ($backendName)." );
-               $this->assertEquals( [], $status->errors,
+               $this->assertEquals( [], $status->getErrors(),
                        "Scoped unlocking of files succeeded ($backendName)." );
                $this->assertEquals( true, $status->isOK(),
                        "Scoped unlocking of files succeeded with OK status ($backendName)." );
@@ -2647,7 +2647,7 @@ class FileBackendTest extends MediaWikiTestCase {
                }
        }
 
-       function assertGoodStatus( $status, $msg ) {
-               $this->assertEquals( print_r( [], 1 ), print_r( $status->errors, 1 ), $msg );
+       function assertGoodStatus( StatusValue $status, $msg ) {
+               $this->assertEquals( print_r( [], 1 ), print_r( $status->getErrors(), 1 ), $msg );
        }
 }
index ed80c57..92a54fa 100644 (file)
@@ -59,7 +59,8 @@ class MigrateFileRepoLayoutTest extends MediaWikiTestCase {
                        ->method( 'getRepo' )
                        ->will( $this->returnValue( $repoMock ) );
 
-               $this->tmpFilepath = TempFSFile::factory( 'migratefilelayout-test-', 'png' )->getPath();
+               $this->tmpFilepath = TempFSFile::factory(
+                       'migratefilelayout-test-', 'png', wfTempDir() )->getPath();
 
                file_put_contents( $this->tmpFilepath, $this->text );
 
diff --git a/tests/phpunit/includes/htmlform/HTMLRestrictionsFieldTest.php b/tests/phpunit/includes/htmlform/HTMLRestrictionsFieldTest.php
new file mode 100644 (file)
index 0000000..9ec4f97
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+
+class HTMLRestrictionsFieldTest extends PHPUnit_Framework_TestCase {
+       public function testConstruct() {
+               $field = new HTMLRestrictionsField( [ 'fieldname' => 'restrictions' ] );
+               $this->assertNotEmpty( $field->getLabel(), 'has a default label' );
+               $this->assertNotEmpty( $field->getHelpText(), 'has a default help text' );
+               $this->assertEquals( MWRestrictions::newDefault(), $field->getDefault(),
+                       'defaults to the default MWRestrictions object' );
+
+               $field = new HTMLRestrictionsField( [
+                       'fieldname' => 'restrictions',
+                       'label' => 'foo',
+                       'help' => 'bar',
+                       'default' => 'baz',
+               ] );
+               $this->assertEquals( 'foo', $field->getLabel(), 'label can be customized' );
+               $this->assertEquals( 'bar', $field->getHelpText(), 'help text can be customized' );
+               $this->assertEquals( 'baz', $field->getDefault(), 'default can be customized' );
+       }
+
+       /**
+        * @dataProvider provideValidate
+        */
+       public function testForm( $text, $value ) {
+               $form = HTMLForm::factory( 'ooui', [
+                       'restrictions' => [ 'class' => HTMLRestrictionsField::class ],
+               ] );
+               $request = new FauxRequest( [ 'wprestrictions' => $text ], true );
+               $context = new DerivativeContext( RequestContext::getMain() );
+               $context->setRequest( $request );
+               $form->setContext( $context );
+               $form->setTitle( Title::newFromText( 'Main Page' ) )->setSubmitCallback( function () {
+                       return true;
+               } )->prepareForm();
+               $status = $form->trySubmit();
+
+               if ( $status instanceof StatusValue ) {
+                       $this->assertEquals( $value !== false, $status->isGood() );
+               } elseif ( $value === false ) {
+                       $this->assertNotSame( true, $status );
+               } else {
+                       $this->assertSame( true, $status );
+               }
+
+               if ( $value !== false ) {
+                       $restrictions = $form->mFieldData['restrictions'];
+                       $this->assertInstanceOf( MWRestrictions::class, $restrictions );
+                       $this->assertEquals( $value, $restrictions->toArray()['IPAddresses'] );
+               }
+
+               // sanity
+               $form->getHTML( $status );
+       }
+
+       public function provideValidate() {
+               return [
+                       // submitted text, value of 'IPAddresses' key or false for validation error
+                       [ null, [ '0.0.0.0/0', '::/0' ] ],
+                       [ '', [] ],
+                       [ "1.2.3.4\n::/0", [ '1.2.3.4', '::/0' ] ],
+                       [ "1.2.3.4\n::/x", false ],
+               ];
+       }
+}
index 81c9faf..22d52f0 100644 (file)
@@ -16,11 +16,18 @@ class DatabaseUpdaterTest extends MediaWikiTestCase {
        }
 }
 
-class FakeDatabase extends DatabaseBase {
+class FakeDatabase extends Database {
        public $lastInsertTable;
        public $lastInsertData;
 
        function __construct() {
+               $this->cliMode = true;
+               $this->connLogger = new \Psr\Log\NullLogger();
+               $this->queryLogger = new \Psr\Log\NullLogger();
+               $this->errorLogger = function ( Exception $e ) {
+                       wfWarn( get_class( $e ) . ": {$e->getMessage()}" );
+               };
+               $this->currentDomain = DatabaseDomain::newUnspecified();
        }
 
        function clearFlag( $arg, $remember = self::REMEMBER_NOTHING ) {
@@ -63,7 +70,7 @@ class FakeDatabase extends DatabaseBase {
         * member variables.
         * If no more rows are available, false is returned.
         *
-        * @param ResultWrapper|stdClass $res Object as returned from DatabaseBase::query(), etc.
+        * @param ResultWrapper|stdClass $res Object as returned from Database::query(), etc.
         * @return stdClass|bool
         * @throws DBUnexpectedError Thrown if the database returns an error
         */
@@ -76,7 +83,7 @@ class FakeDatabase extends DatabaseBase {
         * form. Fields are retrieved with $row['fieldname'].
         * If no more rows are available, false is returned.
         *
-        * @param ResultWrapper $res Result object as returned from DatabaseBase::query(), etc.
+        * @param ResultWrapper $res Result object as returned from Database::query(), etc.
         * @return array|bool
         * @throws DBUnexpectedError Thrown if the database returns an error
         */
diff --git a/tests/phpunit/includes/libs/IPTest.php b/tests/phpunit/includes/libs/IPTest.php
new file mode 100644 (file)
index 0000000..307652d
--- /dev/null
@@ -0,0 +1,670 @@
+<?php
+/**
+ * Tests for IP validity functions.
+ *
+ * Ported from /t/inc/IP.t by avar.
+ *
+ * @group IP
+ * @todo Test methods in this call should be split into a method and a
+ * dataprovider.
+ */
+
+class IPTest extends PHPUnit_Framework_TestCase {
+       /**
+        * @covers IP::isIPAddress
+        * @dataProvider provideInvalidIPs
+        */
+       public function isNotIPAddress( $val, $desc ) {
+               $this->assertFalse( IP::isIPAddress( $val ), $desc );
+       }
+
+       /**
+        * Provide a list of things that aren't IP addresses
+        */
+       public function provideInvalidIPs() {
+               return [
+                       [ false, 'Boolean false is not an IP' ],
+                       [ true, 'Boolean true is not an IP' ],
+                       [ '', 'Empty string is not an IP' ],
+                       [ 'abc', 'Garbage IP string' ],
+                       [ ':', 'Single ":" is not an IP' ],
+                       [ '2001:0DB8::A:1::1', 'IPv6 with a double :: occurrence' ],
+                       [ '2001:0DB8::A:1::', 'IPv6 with a double :: occurrence, last at end' ],
+                       [ '::2001:0DB8::5:1', 'IPv6 with a double :: occurrence, firt at beginning' ],
+                       [ '124.24.52', 'IPv4 not enough quads' ],
+                       [ '24.324.52.13', 'IPv4 out of range' ],
+                       [ '.24.52.13', 'IPv4 starts with period' ],
+                       [ 'fc:100:300', 'IPv6 with only 3 words' ],
+               ];
+       }
+
+       /**
+        * @covers IP::isIPAddress
+        */
+       public function testisIPAddress() {
+               $this->assertTrue( IP::isIPAddress( '::' ), 'RFC 4291 IPv6 Unspecified Address' );
+               $this->assertTrue( IP::isIPAddress( '::1' ), 'RFC 4291 IPv6 Loopback Address' );
+               $this->assertTrue( IP::isIPAddress( '74.24.52.13/20' ), 'IPv4 range' );
+               $this->assertTrue( IP::isIPAddress( 'fc:100:a:d:1:e:ac:0/24' ), 'IPv6 range' );
+               $this->assertTrue( IP::isIPAddress( 'fc::100:a:d:1:e:ac/96' ), 'IPv6 range with "::"' );
+
+               $validIPs = [ 'fc:100::', 'fc:100:a:d:1:e:ac::', 'fc::100', '::fc:100:a:d:1:e:ac',
+                       '::fc', 'fc::100:a:d:1:e:ac', 'fc:100:a:d:1:e:ac:0', '124.24.52.13', '1.24.52.13' ];
+               foreach ( $validIPs as $ip ) {
+                       $this->assertTrue( IP::isIPAddress( $ip ), "$ip is a valid IP address" );
+               }
+       }
+
+       /**
+        * @covers IP::isIPv6
+        */
+       public function testisIPv6() {
+               $this->assertFalse( IP::isIPv6( ':fc:100::' ), 'IPv6 starting with lone ":"' );
+               $this->assertFalse( IP::isIPv6( 'fc:100:::' ), 'IPv6 ending with a ":::"' );
+               $this->assertFalse( IP::isIPv6( 'fc:300' ), 'IPv6 with only 2 words' );
+               $this->assertFalse( IP::isIPv6( 'fc:100:300' ), 'IPv6 with only 3 words' );
+
+               $this->assertTrue( IP::isIPv6( 'fc:100::' ) );
+               $this->assertTrue( IP::isIPv6( 'fc:100:a::' ) );
+               $this->assertTrue( IP::isIPv6( 'fc:100:a:d::' ) );
+               $this->assertTrue( IP::isIPv6( 'fc:100:a:d:1::' ) );
+               $this->assertTrue( IP::isIPv6( 'fc:100:a:d:1:e::' ) );
+               $this->assertTrue( IP::isIPv6( 'fc:100:a:d:1:e:ac::' ) );
+
+               $this->assertFalse( IP::isIPv6( 'fc:100:a:d:1:e:ac:0::' ), 'IPv6 with 8 words ending with "::"' );
+               $this->assertFalse(
+                       IP::isIPv6( 'fc:100:a:d:1:e:ac:0:1::' ),
+                       'IPv6 with 9 words ending with "::"'
+               );
+
+               $this->assertFalse( IP::isIPv6( ':::' ) );
+               $this->assertFalse( IP::isIPv6( '::0:' ), 'IPv6 ending in a lone ":"' );
+
+               $this->assertTrue( IP::isIPv6( '::' ), 'IPv6 zero address' );
+               $this->assertTrue( IP::isIPv6( '::0' ) );
+               $this->assertTrue( IP::isIPv6( '::fc' ) );
+               $this->assertTrue( IP::isIPv6( '::fc:100' ) );
+               $this->assertTrue( IP::isIPv6( '::fc:100:a' ) );
+               $this->assertTrue( IP::isIPv6( '::fc:100:a:d' ) );
+               $this->assertTrue( IP::isIPv6( '::fc:100:a:d:1' ) );
+               $this->assertTrue( IP::isIPv6( '::fc:100:a:d:1:e' ) );
+               $this->assertTrue( IP::isIPv6( '::fc:100:a:d:1:e:ac' ) );
+
+               $this->assertFalse( IP::isIPv6( '::fc:100:a:d:1:e:ac:0' ), 'IPv6 with "::" and 8 words' );
+               $this->assertFalse( IP::isIPv6( '::fc:100:a:d:1:e:ac:0:1' ), 'IPv6 with 9 words' );
+
+               $this->assertFalse( IP::isIPv6( ':fc::100' ), 'IPv6 starting with lone ":"' );
+               $this->assertFalse( IP::isIPv6( 'fc::100:' ), 'IPv6 ending with lone ":"' );
+               $this->assertFalse( IP::isIPv6( 'fc:::100' ), 'IPv6 with ":::" in the middle' );
+
+               $this->assertTrue( IP::isIPv6( 'fc::100' ), 'IPv6 with "::" and 2 words' );
+               $this->assertTrue( IP::isIPv6( 'fc::100:a' ), 'IPv6 with "::" and 3 words' );
+               $this->assertTrue( IP::isIPv6( 'fc::100:a:d' ), 'IPv6 with "::" and 4 words' );
+               $this->assertTrue( IP::isIPv6( 'fc::100:a:d:1' ), 'IPv6 with "::" and 5 words' );
+               $this->assertTrue( IP::isIPv6( 'fc::100:a:d:1:e' ), 'IPv6 with "::" and 6 words' );
+               $this->assertTrue( IP::isIPv6( 'fc::100:a:d:1:e:ac' ), 'IPv6 with "::" and 7 words' );
+               $this->assertTrue( IP::isIPv6( '2001::df' ), 'IPv6 with "::" and 2 words' );
+               $this->assertTrue( IP::isIPv6( '2001:5c0:1400:a::df' ), 'IPv6 with "::" and 5 words' );
+               $this->assertTrue( IP::isIPv6( '2001:5c0:1400:a::df:2' ), 'IPv6 with "::" and 6 words' );
+
+               $this->assertFalse( IP::isIPv6( 'fc::100:a:d:1:e:ac:0' ), 'IPv6 with "::" and 8 words' );
+               $this->assertFalse( IP::isIPv6( 'fc::100:a:d:1:e:ac:0:1' ), 'IPv6 with 9 words' );
+
+               $this->assertTrue( IP::isIPv6( 'fc:100:a:d:1:e:ac:0' ) );
+       }
+
+       /**
+        * @covers IP::isIPv4
+        * @dataProvider provideInvalidIPv4Addresses
+        */
+       public function testisNotIPv4( $bogusIP, $desc ) {
+               $this->assertFalse( IP::isIPv4( $bogusIP ), $desc );
+       }
+
+       public function provideInvalidIPv4Addresses() {
+               return [
+                       [ false, 'Boolean false is not an IP' ],
+                       [ true, 'Boolean true is not an IP' ],
+                       [ '', 'Empty string is not an IP' ],
+                       [ 'abc', 'Letters are not an IP' ],
+                       [ ':', 'A colon is not an IP' ],
+                       [ '124.24.52', 'IPv4 not enough quads' ],
+                       [ '24.324.52.13', 'IPv4 out of range' ],
+                       [ '.24.52.13', 'IPv4 starts with period' ],
+               ];
+       }
+
+       /**
+        * @covers IP::isIPv4
+        * @dataProvider provideValidIPv4Address
+        */
+       public function testIsIPv4( $ip, $desc ) {
+               $this->assertTrue( IP::isIPv4( $ip ), $desc );
+       }
+
+       /**
+        * Provide some IPv4 addresses and ranges
+        */
+       public function provideValidIPv4Address() {
+               return [
+                       [ '124.24.52.13', 'Valid IPv4 address' ],
+                       [ '1.24.52.13', 'Another valid IPv4 address' ],
+                       [ '74.24.52.13/20', 'An IPv4 range' ],
+               ];
+       }
+
+       /**
+        * @covers IP::isValid
+        */
+       public function testValidIPs() {
+               foreach ( range( 0, 255 ) as $i ) {
+                       $a = sprintf( "%03d", $i );
+                       $b = sprintf( "%02d", $i );
+                       $c = sprintf( "%01d", $i );
+                       foreach ( array_unique( [ $a, $b, $c ] ) as $f ) {
+                               $ip = "$f.$f.$f.$f";
+                               $this->assertTrue( IP::isValid( $ip ), "$ip is a valid IPv4 address" );
+                       }
+               }
+               foreach ( range( 0x0, 0xFFFF, 0xF ) as $i ) {
+                       $a = sprintf( "%04x", $i );
+                       $b = sprintf( "%03x", $i );
+                       $c = sprintf( "%02x", $i );
+                       foreach ( array_unique( [ $a, $b, $c ] ) as $f ) {
+                               $ip = "$f:$f:$f:$f:$f:$f:$f:$f";
+                               $this->assertTrue( IP::isValid( $ip ), "$ip is a valid IPv6 address" );
+                       }
+               }
+               // test with some abbreviations
+               $this->assertFalse( IP::isValid( ':fc:100::' ), 'IPv6 starting with lone ":"' );
+               $this->assertFalse( IP::isValid( 'fc:100:::' ), 'IPv6 ending with a ":::"' );
+               $this->assertFalse( IP::isValid( 'fc:300' ), 'IPv6 with only 2 words' );
+               $this->assertFalse( IP::isValid( 'fc:100:300' ), 'IPv6 with only 3 words' );
+
+               $this->assertTrue( IP::isValid( 'fc:100::' ) );
+               $this->assertTrue( IP::isValid( 'fc:100:a:d:1:e::' ) );
+               $this->assertTrue( IP::isValid( 'fc:100:a:d:1:e:ac::' ) );
+
+               $this->assertTrue( IP::isValid( 'fc::100' ), 'IPv6 with "::" and 2 words' );
+               $this->assertTrue( IP::isValid( 'fc::100:a' ), 'IPv6 with "::" and 3 words' );
+               $this->assertTrue( IP::isValid( '2001::df' ), 'IPv6 with "::" and 2 words' );
+               $this->assertTrue( IP::isValid( '2001:5c0:1400:a::df' ), 'IPv6 with "::" and 5 words' );
+               $this->assertTrue( IP::isValid( '2001:5c0:1400:a::df:2' ), 'IPv6 with "::" and 6 words' );
+               $this->assertTrue( IP::isValid( 'fc::100:a:d:1' ), 'IPv6 with "::" and 5 words' );
+               $this->assertTrue( IP::isValid( 'fc::100:a:d:1:e:ac' ), 'IPv6 with "::" and 7 words' );
+
+               $this->assertFalse(
+                       IP::isValid( 'fc:100:a:d:1:e:ac:0::' ),
+                       'IPv6 with 8 words ending with "::"'
+               );
+               $this->assertFalse(
+                       IP::isValid( 'fc:100:a:d:1:e:ac:0:1::' ),
+                       'IPv6 with 9 words ending with "::"'
+               );
+       }
+
+       /**
+        * @covers IP::isValid
+        */
+       public function testInvalidIPs() {
+               // Out of range...
+               foreach ( range( 256, 999 ) as $i ) {
+                       $a = sprintf( "%03d", $i );
+                       $b = sprintf( "%02d", $i );
+                       $c = sprintf( "%01d", $i );
+                       foreach ( array_unique( [ $a, $b, $c ] ) as $f ) {
+                               $ip = "$f.$f.$f.$f";
+                               $this->assertFalse( IP::isValid( $ip ), "$ip is not a valid IPv4 address" );
+                       }
+               }
+               foreach ( range( 'g', 'z' ) as $i ) {
+                       $a = sprintf( "%04s", $i );
+                       $b = sprintf( "%03s", $i );
+                       $c = sprintf( "%02s", $i );
+                       foreach ( array_unique( [ $a, $b, $c ] ) as $f ) {
+                               $ip = "$f:$f:$f:$f:$f:$f:$f:$f";
+                               $this->assertFalse( IP::isValid( $ip ), "$ip is not a valid IPv6 address" );
+                       }
+               }
+               // Have CIDR
+               $ipCIDRs = [
+                       '212.35.31.121/32',
+                       '212.35.31.121/18',
+                       '212.35.31.121/24',
+                       '::ff:d:321:5/96',
+                       'ff::d3:321:5/116',
+                       'c:ff:12:1:ea:d:321:5/120',
+               ];
+               foreach ( $ipCIDRs as $i ) {
+                       $this->assertFalse( IP::isValid( $i ),
+                               "$i is an invalid IP address because it is a block" );
+               }
+               // Incomplete/garbage
+               $invalid = [
+                       'www.xn--var-xla.net',
+                       '216.17.184.G',
+                       '216.17.184.1.',
+                       '216.17.184',
+                       '216.17.184.',
+                       '256.17.184.1'
+               ];
+               foreach ( $invalid as $i ) {
+                       $this->assertFalse( IP::isValid( $i ), "$i is an invalid IP address" );
+               }
+       }
+
+       /**
+        * Provide some valid IP blocks
+        */
+       public function provideValidBlocks() {
+               return [
+                       [ '116.17.184.5/32' ],
+                       [ '0.17.184.5/30' ],
+                       [ '16.17.184.1/24' ],
+                       [ '30.242.52.14/1' ],
+                       [ '10.232.52.13/8' ],
+                       [ '30.242.52.14/0' ],
+                       [ '::e:f:2001/96' ],
+                       [ '::c:f:2001/128' ],
+                       [ '::10:f:2001/70' ],
+                       [ '::fe:f:2001/1' ],
+                       [ '::6d:f:2001/8' ],
+                       [ '::fe:f:2001/0' ],
+               ];
+       }
+
+       /**
+        * @covers IP::isValidBlock
+        * @dataProvider provideValidBlocks
+        */
+       public function testValidBlocks( $block ) {
+               $this->assertTrue( IP::isValidBlock( $block ), "$block is a valid IP block" );
+       }
+
+       /**
+        * @covers IP::isValidBlock
+        * @dataProvider provideInvalidBlocks
+        */
+       public function testInvalidBlocks( $invalid ) {
+               $this->assertFalse( IP::isValidBlock( $invalid ), "$invalid is not a valid IP block" );
+       }
+
+       public function provideInvalidBlocks() {
+               return [
+                       [ '116.17.184.5/33' ],
+                       [ '0.17.184.5/130' ],
+                       [ '16.17.184.1/-1' ],
+                       [ '10.232.52.13/*' ],
+                       [ '7.232.52.13/ab' ],
+                       [ '11.232.52.13/' ],
+                       [ '::e:f:2001/129' ],
+                       [ '::c:f:2001/228' ],
+                       [ '::10:f:2001/-1' ],
+                       [ '::6d:f:2001/*' ],
+                       [ '::86:f:2001/ab' ],
+                       [ '::23:f:2001/' ],
+               ];
+       }
+
+       /**
+        * @covers IP::sanitizeIP
+        * @dataProvider provideSanitizeIP
+        */
+       public function testSanitizeIP( $expected, $input ) {
+               $result = IP::sanitizeIP( $input );
+               $this->assertEquals( $expected, $result );
+       }
+
+       /**
+        * Provider for IP::testSanitizeIP()
+        */
+       public static function provideSanitizeIP() {
+               return [
+                       [ '0.0.0.0', '0.0.0.0' ],
+                       [ '0.0.0.0', '00.00.00.00' ],
+                       [ '0.0.0.0', '000.000.000.000' ],
+                       [ '141.0.11.253', '141.000.011.253' ],
+                       [ '1.2.4.5', '1.2.4.5' ],
+                       [ '1.2.4.5', '01.02.04.05' ],
+                       [ '1.2.4.5', '001.002.004.005' ],
+                       [ '10.0.0.1', '010.0.000.1' ],
+                       [ '80.72.250.4', '080.072.250.04' ],
+                       [ 'Foo.1000.00', 'Foo.1000.00' ],
+                       [ 'Bar.01', 'Bar.01' ],
+                       [ 'Bar.010', 'Bar.010' ],
+                       [ null, '' ],
+                       [ null, ' ' ]
+               ];
+       }
+
+       /**
+        * @covers IP::toHex
+        * @dataProvider provideToHex
+        */
+       public function testToHex( $expected, $input ) {
+               $result = IP::toHex( $input );
+               $this->assertTrue( $result === false || is_string( $result ) );
+               $this->assertEquals( $expected, $result );
+       }
+
+       /**
+        * Provider for IP::testToHex()
+        */
+       public static function provideToHex() {
+               return [
+                       [ '00000001', '0.0.0.1' ],
+                       [ '01020304', '1.2.3.4' ],
+                       [ '7F000001', '127.0.0.1' ],
+                       [ '80000000', '128.0.0.0' ],
+                       [ 'DEADCAFE', '222.173.202.254' ],
+                       [ 'FFFFFFFF', '255.255.255.255' ],
+                       [ '8D000BFD', '141.000.11.253' ],
+                       [ false, 'IN.VA.LI.D' ],
+                       [ 'v6-00000000000000000000000000000001', '::1' ],
+                       [ 'v6-20010DB885A3000000008A2E03707334', '2001:0db8:85a3:0000:0000:8a2e:0370:7334' ],
+                       [ 'v6-20010DB885A3000000008A2E03707334', '2001:db8:85a3::8a2e:0370:7334' ],
+                       [ false, 'IN:VA::LI:D' ],
+                       [ false, ':::1' ]
+               ];
+       }
+
+       /**
+        * @covers IP::isPublic
+        * @dataProvider provideIsPublic
+        */
+       public function testIsPublic( $expected, $input ) {
+               $result = IP::isPublic( $input );
+               $this->assertEquals( $expected, $result );
+       }
+
+       /**
+        * Provider for IP::testIsPublic()
+        */
+       public static function provideIsPublic() {
+               return [
+                       [ false, 'fc00::3' ], # RFC 4193 (local)
+                       [ false, 'fc00::ff' ], # RFC 4193 (local)
+                       [ false, '127.1.2.3' ], # loopback
+                       [ false, '::1' ], # loopback
+                       [ false, 'fe80::1' ], # link-local
+                       [ false, '169.254.1.1' ], # link-local
+                       [ false, '10.0.0.1' ], # RFC 1918 (private)
+                       [ false, '172.16.0.1' ], # RFC 1918 (private)
+                       [ false, '192.168.0.1' ], # RFC 1918 (private)
+                       [ true, '2001:5c0:1000:a::133' ], # public
+                       [ true, 'fc::3' ], # public
+                       [ true, '00FC::' ] # public
+               ];
+       }
+
+       // Private wrapper used to test CIDR Parsing.
+       private function assertFalseCIDR( $CIDR, $msg = '' ) {
+               $ff = [ false, false ];
+               $this->assertEquals( $ff, IP::parseCIDR( $CIDR ), $msg );
+       }
+
+       // Private wrapper to test network shifting using only dot notation
+       private function assertNet( $expected, $CIDR ) {
+               $parse = IP::parseCIDR( $CIDR );
+               $this->assertEquals( $expected, long2ip( $parse[0] ), "network shifting $CIDR" );
+       }
+
+       /**
+        * @covers IP::hexToQuad
+        * @dataProvider provideIPsAndHexes
+        */
+       public function testHexToQuad( $ip, $hex ) {
+               $this->assertEquals( $ip, IP::hexToQuad( $hex ) );
+       }
+
+       /**
+        * Provide some IP addresses and their equivalent hex representations
+        */
+       public function provideIPsandHexes() {
+               return [
+                       [ '0.0.0.1', '00000001' ],
+                       [ '255.0.0.0', 'FF000000' ],
+                       [ '255.255.255.255', 'FFFFFFFF' ],
+                       [ '10.188.222.255', '0ABCDEFF' ],
+                       // hex not left-padded...
+                       [ '0.0.0.0', '0' ],
+                       [ '0.0.0.1', '1' ],
+                       [ '0.0.0.255', 'FF' ],
+                       [ '0.0.255.0', 'FF00' ],
+               ];
+       }
+
+       /**
+        * @covers IP::hexToOctet
+        * @dataProvider provideOctetsAndHexes
+        */
+       public function testHexToOctet( $octet, $hex ) {
+               $this->assertEquals( $octet, IP::hexToOctet( $hex ) );
+       }
+
+       /**
+        * Provide some hex and octet representations of the same IPs
+        */
+       public function provideOctetsAndHexes() {
+               return [
+                       [ '0:0:0:0:0:0:0:1', '00000000000000000000000000000001' ],
+                       [ '0:0:0:0:0:0:FF:3', '00000000000000000000000000FF0003' ],
+                       [ '0:0:0:0:0:0:FF00:6', '000000000000000000000000FF000006' ],
+                       [ '0:0:0:0:0:0:FCCF:FAFF', '000000000000000000000000FCCFFAFF' ],
+                       [ 'FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF', 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' ],
+                       // hex not left-padded...
+                       [ '0:0:0:0:0:0:0:0', '0' ],
+                       [ '0:0:0:0:0:0:0:1', '1' ],
+                       [ '0:0:0:0:0:0:0:FF', 'FF' ],
+                       [ '0:0:0:0:0:0:0:FFD0', 'FFD0' ],
+                       [ '0:0:0:0:0:0:FA00:0', 'FA000000' ],
+                       [ '0:0:0:0:0:0:FCCF:FAFF', 'FCCFFAFF' ],
+               ];
+       }
+
+       /**
+        * IP::parseCIDR() returns an array containing a signed IP address
+        * representing the network mask and the bit mask.
+        * @covers IP::parseCIDR
+        */
+       public function testCIDRParsing() {
+               $this->assertFalseCIDR( '192.0.2.0', "missing mask" );
+               $this->assertFalseCIDR( '192.0.2.0/', "missing bitmask" );
+
+               // Verify if statement
+               $this->assertFalseCIDR( '256.0.0.0/32', "invalid net" );
+               $this->assertFalseCIDR( '192.0.2.0/AA', "mask not numeric" );
+               $this->assertFalseCIDR( '192.0.2.0/-1', "mask < 0" );
+               $this->assertFalseCIDR( '192.0.2.0/33', "mask > 32" );
+
+               // Check internal logic
+               # 0 mask always result in array(0,0)
+               $this->assertEquals( [ 0, 0 ], IP::parseCIDR( '192.0.0.2/0' ) );
+               $this->assertEquals( [ 0, 0 ], IP::parseCIDR( '0.0.0.0/0' ) );
+               $this->assertEquals( [ 0, 0 ], IP::parseCIDR( '255.255.255.255/0' ) );
+
+               // @todo FIXME: Add more tests.
+
+               # This part test network shifting
+               $this->assertNet( '192.0.0.0', '192.0.0.2/24' );
+               $this->assertNet( '192.168.5.0', '192.168.5.13/24' );
+               $this->assertNet( '10.0.0.160', '10.0.0.161/28' );
+               $this->assertNet( '10.0.0.0', '10.0.0.3/28' );
+               $this->assertNet( '10.0.0.0', '10.0.0.3/30' );
+               $this->assertNet( '10.0.0.4', '10.0.0.4/30' );
+               $this->assertNet( '172.17.32.0', '172.17.35.48/21' );
+               $this->assertNet( '10.128.0.0', '10.135.0.0/9' );
+               $this->assertNet( '134.0.0.0', '134.0.5.1/8' );
+       }
+
+       /**
+        * @covers IP::canonicalize
+        */
+       public function testIPCanonicalizeOnValidIp() {
+               $this->assertEquals( '192.0.2.152', IP::canonicalize( '192.0.2.152' ),
+                       'Canonicalization of a valid IP returns it unchanged' );
+       }
+
+       /**
+        * @covers IP::canonicalize
+        */
+       public function testIPCanonicalizeMappedAddress() {
+               $this->assertEquals(
+                       '192.0.2.152',
+                       IP::canonicalize( '::ffff:192.0.2.152' )
+               );
+               $this->assertEquals(
+                       '192.0.2.152',
+                       IP::canonicalize( '::192.0.2.152' )
+               );
+       }
+
+       /**
+        * Issues there are most probably from IP::toHex() or IP::parseRange()
+        * @covers IP::isInRange
+        * @dataProvider provideIPsAndRanges
+        */
+       public function testIPIsInRange( $expected, $addr, $range, $message = '' ) {
+               $this->assertEquals(
+                       $expected,
+                       IP::isInRange( $addr, $range ),
+                       $message
+               );
+       }
+
+       /** Provider for testIPIsInRange() */
+       public static function provideIPsAndRanges() {
+               # Format: (expected boolean, address, range, optional message)
+               return [
+                       # IPv4
+                       [ true, '192.0.2.0', '192.0.2.0/24', 'Network address' ],
+                       [ true, '192.0.2.77', '192.0.2.0/24', 'Simple address' ],
+                       [ true, '192.0.2.255', '192.0.2.0/24', 'Broadcast address' ],
+
+                       [ false, '0.0.0.0', '192.0.2.0/24' ],
+                       [ false, '255.255.255', '192.0.2.0/24' ],
+
+                       # IPv6
+                       [ false, '::1', '2001:DB8::/32' ],
+                       [ false, '::', '2001:DB8::/32' ],
+                       [ false, 'FE80::1', '2001:DB8::/32' ],
+
+                       [ true, '2001:DB8::', '2001:DB8::/32' ],
+                       [ true, '2001:0DB8::', '2001:DB8::/32' ],
+                       [ true, '2001:DB8::1', '2001:DB8::/32' ],
+                       [ true, '2001:0DB8::1', '2001:DB8::/32' ],
+                       [ true, '2001:0DB8:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF',
+                               '2001:DB8::/32' ],
+
+                       [ false, '2001:0DB8:F::', '2001:DB8::/96' ],
+               ];
+       }
+
+       /**
+        * Test for IP::splitHostAndPort().
+        * @dataProvider provideSplitHostAndPort
+        */
+       public function testSplitHostAndPort( $expected, $input, $description ) {
+               $this->assertEquals( $expected, IP::splitHostAndPort( $input ), $description );
+       }
+
+       /**
+        * Provider for IP::splitHostAndPort()
+        */
+       public static function provideSplitHostAndPort() {
+               return [
+                       [ false, '[', 'Unclosed square bracket' ],
+                       [ false, '[::', 'Unclosed square bracket 2' ],
+                       [ [ '::', false ], '::', 'Bare IPv6 0' ],
+                       [ [ '::1', false ], '::1', 'Bare IPv6 1' ],
+                       [ [ '::', false ], '[::]', 'Bracketed IPv6 0' ],
+                       [ [ '::1', false ], '[::1]', 'Bracketed IPv6 1' ],
+                       [ [ '::1', 80 ], '[::1]:80', 'Bracketed IPv6 with port' ],
+                       [ false, '::x', 'Double colon but no IPv6' ],
+                       [ [ 'x', 80 ], 'x:80', 'Hostname and port' ],
+                       [ false, 'x:x', 'Hostname and invalid port' ],
+                       [ [ 'x', false ], 'x', 'Plain hostname' ]
+               ];
+       }
+
+       /**
+        * Test for IP::combineHostAndPort()
+        * @dataProvider provideCombineHostAndPort
+        */
+       public function testCombineHostAndPort( $expected, $input, $description ) {
+               list( $host, $port, $defaultPort ) = $input;
+               $this->assertEquals(
+                       $expected,
+                       IP::combineHostAndPort( $host, $port, $defaultPort ),
+                       $description );
+       }
+
+       /**
+        * Provider for IP::combineHostAndPort()
+        */
+       public static function provideCombineHostAndPort() {
+               return [
+                       [ '[::1]', [ '::1', 2, 2 ], 'IPv6 default port' ],
+                       [ '[::1]:2', [ '::1', 2, 3 ], 'IPv6 non-default port' ],
+                       [ 'x', [ 'x', 2, 2 ], 'Normal default port' ],
+                       [ 'x:2', [ 'x', 2, 3 ], 'Normal non-default port' ],
+               ];
+       }
+
+       /**
+        * Test for IP::sanitizeRange()
+        * @dataProvider provideIPCIDRs
+        */
+       public function testSanitizeRange( $input, $expected, $description ) {
+               $this->assertEquals( $expected, IP::sanitizeRange( $input ), $description );
+       }
+
+       /**
+        * Provider for IP::testSanitizeRange()
+        */
+       public static function provideIPCIDRs() {
+               return [
+                       [ '35.56.31.252/16', '35.56.0.0/16', 'IPv4 range' ],
+                       [ '135.16.21.252/24', '135.16.21.0/24', 'IPv4 range' ],
+                       [ '5.36.71.252/32', '5.36.71.252/32', 'IPv4 silly range' ],
+                       [ '5.36.71.252', '5.36.71.252', 'IPv4 non-range' ],
+                       [ '0:1:2:3:4:c5:f6:7/96', '0:1:2:3:4:C5:0:0/96', 'IPv6 range' ],
+                       [ '0:1:2:3:4:5:6:7/120', '0:1:2:3:4:5:6:0/120', 'IPv6 range' ],
+                       [ '0:e1:2:3:4:5:e6:7/128', '0:E1:2:3:4:5:E6:7/128', 'IPv6 silly range' ],
+                       [ '0:c1:A2:3:4:5:c6:7', '0:C1:A2:3:4:5:C6:7', 'IPv6 non range' ],
+               ];
+       }
+
+       /**
+        * Test for IP::prettifyIP()
+        * @dataProvider provideIPsToPrettify
+        */
+       public function testPrettifyIP( $ip, $prettified ) {
+               $this->assertEquals( $prettified, IP::prettifyIP( $ip ), "Prettify of $ip" );
+       }
+
+       /**
+        * Provider for IP::testPrettifyIP()
+        */
+       public static function provideIPsToPrettify() {
+               return [
+                       [ '0:0:0:0:0:0:0:0', '::' ],
+                       [ '0:0:0::0:0:0', '::' ],
+                       [ '0:0:0:1:0:0:0:0', '0:0:0:1::' ],
+                       [ '0:0::f', '::f' ],
+                       [ '0::0:0:0:33:fef:b', '::33:fef:b' ],
+                       [ '3f:535:0:0:0:0:e:fbb', '3f:535::e:fbb' ],
+                       [ '0:0:fef:0:0:0:e:fbb', '0:0:fef::e:fbb' ],
+                       [ 'abbc:2004::0:0:0:0', 'abbc:2004::' ],
+                       [ 'cebc:2004:f:0:0:0:0:0', 'cebc:2004:f::' ],
+                       [ '0:0:0:0:0:0:0:0/16', '::/16' ],
+                       [ '0:0:0::0:0:0/64', '::/64' ],
+                       [ '0:0::f/52', '::f/52' ],
+                       [ '::0:0:33:fef:b/52', '::33:fef:b/52' ],
+                       [ '3f:535:0:0:0:0:e:fbb/48', '3f:535::e:fbb/48' ],
+                       [ '0:0:fef:0:0:0:e:fbb/96', '0:0:fef::e:fbb/96' ],
+                       [ 'abbc:2004:0:0::0:0/40', 'abbc:2004::/40' ],
+                       [ 'aebc:2004:f:0:0:0:0:0/80', 'aebc:2004:f::/80' ],
+               ];
+       }
+}
index 6eb96b1..881f5e1 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * A MemoizedCallable subclass that stores function return values
- * in an instance property rather than APC.
+ * in an instance property rather than APC or APCu.
  */
 class ArrayBackedMemoizedCallable extends MemoizedCallable {
        private $cache = [];
@@ -44,7 +44,7 @@ class MemoizedCallableTest extends PHPUnit_Framework_TestCase {
         * Consecutive calls to the memoized callable with the same arguments
         * should result in just one invocation of the underlying callable.
         *
-        * @requires function apc_store
+        * @requires function apc_store/apcu_store
         */
        public function testCallableMemoized() {
                $observer = $this->getMock( 'stdClass', [ 'computeSomething' ] );
diff --git a/tests/phpunit/includes/libs/WaitConditionLoopTest.php b/tests/phpunit/includes/libs/WaitConditionLoopTest.php
deleted file mode 100644 (file)
index 9ce93d6..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-<?php
-
-class WaitConditionLoopFakeTime extends WaitConditionLoop {
-       protected $wallClock = 1;
-
-       function __construct( callable $condition, $timeout, array $busyCallbacks ) {
-               parent::__construct( $condition, $timeout, $busyCallbacks );
-       }
-
-       function usleep( $microseconds ) {
-               $this->wallClock += $microseconds / 1e6;
-       }
-
-       function getCpuTime() {
-               return 0.0;
-       }
-
-       function getWallTime() {
-               return $this->wallClock;
-       }
-
-       public function setWallClock( &$timestamp ) {
-               $this->wallClock =& $timestamp;
-       }
-}
-
-class WaitConditionLoopTest extends PHPUnit_Framework_TestCase {
-       public function testCallbackReached() {
-               $wallClock = microtime( true );
-
-               $count = 0;
-               $status = new StatusValue();
-               $loop = new WaitConditionLoopFakeTime(
-                       function () use ( &$count, $status ) {
-                               ++$count;
-                               $status->value = 'cookie';
-
-                               return WaitConditionLoop::CONDITION_REACHED;
-                       },
-                       10.0,
-                       $this->newBusyWork( $x, $y, $z )
-               );
-               $this->assertEquals( $loop::CONDITION_REACHED, $loop->invoke() );
-               $this->assertEquals( 1, $count );
-               $this->assertEquals( 'cookie', $status->value );
-               $this->assertEquals( [ 0, 0, 0 ], [ $x, $y, $z ], "No busy work done" );
-
-               $count = 0;
-               $loop = new WaitConditionLoopFakeTime(
-                       function () use ( &$count, &$wallClock ) {
-                               $wallClock += 1;
-                               ++$count;
-
-                               return $count >= 2 ? WaitConditionLoop::CONDITION_REACHED : false;
-                       },
-                       7.0,
-                       $this->newBusyWork( $x, $y, $z, $wallClock )
-               );
-               $this->assertEquals( $loop::CONDITION_REACHED, $loop->invoke(),
-                       "Busy work did not cause timeout" );
-               $this->assertEquals( [ 1, 0, 0 ], [ $x, $y, $z ] );
-
-               $count = 0;
-               $loop = new WaitConditionLoopFakeTime(
-                       function () use ( &$count, &$wallClock ) {
-                               $wallClock += .1;
-                               ++$count;
-
-                               return $count > 80 ? true : false;
-                       },
-                       50.0,
-                       $this->newBusyWork( $x, $y, $z, $wallClock, $dontCallMe, $badCalls )
-               );
-               $this->assertEquals( 0, $badCalls, "Callback exception not yet called" );
-               $this->assertEquals( $loop::CONDITION_REACHED, $loop->invoke() );
-               $this->assertEquals( [ 1, 1, 1 ], [ $x, $y, $z ], "Busy work done" );
-               $this->assertEquals( 1, $badCalls, "Bad callback ran and was exception caught" );
-
-               try {
-                       $e = null;
-                       $dontCallMe();
-               } catch ( Exception $e ) {
-               }
-
-               $this->assertInstanceOf( 'RunTimeException', $e );
-               $this->assertEquals( 1, $badCalls, "Callback exception cached" );
-       }
-
-       public function testCallbackTimeout() {
-               $count = 0;
-               $wallClock = microtime( true );
-               $loop = new WaitConditionLoopFakeTime(
-                       function () use ( &$count, &$wallClock ) {
-                               $wallClock += 3;
-                               ++$count;
-
-                               return $count > 300 ? true : false;
-                       },
-                       50.0,
-                       $this->newBusyWork( $x, $y, $z, $wallClock )
-               );
-               $loop->setWallClock( $wallClock );
-               $this->assertEquals( $loop::CONDITION_TIMED_OUT, $loop->invoke() );
-               $this->assertEquals( [ 1, 1, 1 ], [ $x, $y, $z ], "Busy work done" );
-
-               $loop = new WaitConditionLoopFakeTime(
-                       function () use ( &$count, &$wallClock ) {
-                               $wallClock += 3;
-                               ++$count;
-
-                               return true;
-                       },
-                       0.0,
-                       $this->newBusyWork( $x, $y, $z, $wallClock )
-               );
-               $this->assertEquals( $loop::CONDITION_REACHED, $loop->invoke() );
-
-               $count = 0;
-               $loop = new WaitConditionLoopFakeTime(
-                       function () use ( &$count, &$wallClock ) {
-                               $wallClock += 3;
-                               ++$count;
-
-                               return $count > 10 ? true : false;
-                       },
-                       0,
-                       $this->newBusyWork( $x, $y, $z, $wallClock )
-               );
-               $this->assertEquals( $loop::CONDITION_FAILED, $loop->invoke() );
-       }
-
-       public function testCallbackAborted() {
-               $x = 0;
-               $wallClock = microtime( true );
-               $loop = new WaitConditionLoopFakeTime(
-                       function () use ( &$x, &$wallClock ) {
-                               $wallClock += 2;
-                               ++$x;
-
-                               return $x > 2 ? WaitConditionLoop::CONDITION_ABORTED : false;
-                       },
-                       10.0,
-                       $this->newBusyWork( $x, $y, $z, $wallClock )
-               );
-               $loop->setWallClock( $wallClock );
-               $this->assertEquals( $loop::CONDITION_ABORTED, $loop->invoke() );
-       }
-
-       private function newBusyWork(
-               &$x, &$y, &$z, &$wallClock = 1, &$dontCallMe = null, &$badCalls = 0
-       ) {
-               $x = $y = $z = 0;
-               $badCalls = 0;
-
-               $list = [];
-               $list[] = function () use ( &$x, &$wallClock ) {
-                       $wallClock += 1;
-
-                       return ++$x;
-               };
-               $dontCallMe = function () use ( &$badCalls ) {
-                       ++$badCalls;
-                       throw new RuntimeException( "TrollyMcTrollFace" );
-               };
-               $list[] =& $dontCallMe;
-               $list[] = function () use ( &$y, &$wallClock ) {
-                       $wallClock += 15;
-
-                       return ++$y;
-               };
-               $list[] = function () use ( &$z, &$wallClock ) {
-                       $wallClock += 0.1;
-
-                       return ++$z;
-               };
-
-               return $list;
-       }
-}
index 2072752..ded5f8f 100644 (file)
@@ -11,23 +11,8 @@ class ComposerJsonTest extends MediaWikiTestCase {
                $this->json2 = "$IP/tests/phpunit/data/composer/new-composer.json";
        }
 
-       public static function provideGetHash() {
-               return [
-                       [ 'json', 'cc6e7fc565b246cb30b0cac103a2b31e' ],
-                       [ 'json2', '19921dd1fc457f1b00561da932432001' ],
-               ];
-       }
-
-       /**
-        * @dataProvider provideGetHash
-        * @covers ComposerJson::getHash
-        */
-       public function testIsHashUpToDate( $file, $expected ) {
-               $json = new ComposerJson( $this->$file );
-               $this->assertEquals( $expected, $json->getHash() );
-       }
-
        /**
+        * @covers ComposerJson::__construct
         * @covers ComposerJson::getRequiredDependencies
         */
        public function testGetRequiredDependencies() {
index 75eb62c..eef7e27 100644 (file)
@@ -11,14 +11,7 @@ class ComposerLockTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers ComposerLock::getHash
-        */
-       public function testGetHash() {
-               $lock = new ComposerLock( $this->lock );
-               $this->assertEquals( 'a3bb80b0ac4c4a31e52574d48c032923', $lock->getHash() );
-       }
-
-       /**
+        * @covers ComposerLock::__construct
         * @covers ComposerLock::getInstalledDependencies
         */
        public function testGetInstalledDependencies() {
diff --git a/tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php b/tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php
new file mode 100644 (file)
index 0000000..85927a3
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+class MimeMagicTest extends PHPUnit_Framework_TestCase {
+       /** @var MimeAnalyzer */
+       private $mimeAnalyzer;
+
+       function setUp() {
+               global $IP;
+
+               $this->mimeAnalyzer = new MimeAnalyzer( [
+                       'infoFile' => $IP . "/includes/libs/mime/mime.info",
+                       'typeFile' => $IP . "/includes/libs/mime/mime.types",
+                       'xmlTypes' => [
+                               'http://www.w3.org/2000/svg:svg' => 'image/svg+xml',
+                               'svg' => 'image/svg+xml',
+                               'http://www.lysator.liu.se/~alla/dia/:diagram' => 'application/x-dia-diagram',
+                               'http://www.w3.org/1999/xhtml:html' => 'text/html', // application/xhtml+xml?
+                               'html' => 'text/html', // application/xhtml+xml?
+                       ]
+               ] );
+               parent::setUp();
+       }
+
+       /**
+        * @dataProvider providerImproveTypeFromExtension
+        * @param string $ext File extension (no leading dot)
+        * @param string $oldMime Initially detected MIME
+        * @param string $expectedMime MIME type after taking extension into account
+        */
+       function testImproveTypeFromExtension( $ext, $oldMime, $expectedMime ) {
+               $actualMime = $this->mimeAnalyzer->improveTypeFromExtension( $oldMime, $ext );
+               $this->assertEquals( $expectedMime, $actualMime );
+       }
+
+       function providerImproveTypeFromExtension() {
+               return [
+                       [ 'gif', 'image/gif', 'image/gif' ],
+                       [ 'gif', 'unknown/unknown', 'unknown/unknown' ],
+                       [ 'wrl', 'unknown/unknown', 'model/vrml' ],
+                       [ 'txt', 'text/plain', 'text/plain' ],
+                       [ 'csv', 'text/plain', 'text/csv' ],
+                       [ 'tsv', 'text/plain', 'text/tab-separated-values' ],
+                       [ 'js', 'text/javascript', 'application/javascript' ],
+                       [ 'js', 'application/x-javascript', 'application/javascript' ],
+                       [ 'json', 'text/plain', 'application/json' ],
+                       [ 'foo', 'application/x-opc+zip', 'application/zip' ],
+                       [ 'docx', 'application/x-opc+zip',
+                               'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ],
+                       [ 'djvu', 'image/x-djvu', 'image/vnd.djvu' ],
+                       [ 'wav', 'audio/wav', 'audio/wav' ],
+               ];
+       }
+
+       /**
+        * Test to make sure that encoder=ffmpeg2theora doesn't trigger
+        * MEDIATYPE_VIDEO (bug 63584)
+        */
+       function testOggRecognize() {
+               $oggFile = __DIR__ . '/../../../data/media/say-test.ogg';
+               $actualType = $this->mimeAnalyzer->getMediaType( $oggFile, 'application/ogg' );
+               $this->assertEquals( $actualType, MEDIATYPE_AUDIO );
+       }
+}
index 92fb954..a1afa77 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use Wikimedia\ScopedCallback;
+
 /**
  * @author Matthias Mullie <mmullie@wikimedia.org>
  * @group BagOStuff
@@ -251,20 +254,20 @@ class BagOStuffTest extends MediaWikiTestCase {
                $value1 = $this->cache->getScopedLock( $key, 0 );
                $value2 = $this->cache->getScopedLock( $key, 0 );
 
-               $this->assertType( 'ScopedCallback', $value1, 'First call returned lock' );
+               $this->assertType( ScopedCallback::class, $value1, 'First call returned lock' );
                $this->assertNull( $value2, 'Duplicate call returned no lock' );
 
                unset( $value1 );
 
                $value3 = $this->cache->getScopedLock( $key, 0 );
-               $this->assertType( 'ScopedCallback', $value3, 'Lock returned callback after release' );
+               $this->assertType( ScopedCallback::class, $value3, 'Lock returned callback after release' );
                unset( $value3 );
 
                $value1 = $this->cache->getScopedLock( $key, 0, 5, 'reentry' );
                $value2 = $this->cache->getScopedLock( $key, 0, 5, 'reentry' );
 
-               $this->assertType( 'ScopedCallback', $value1, 'First reentrant call returned lock' );
-               $this->assertType( 'ScopedCallback', $value1, 'Second reentrant call returned lock' );
+               $this->assertType( ScopedCallback::class, $value1, 'First reentrant call returned lock' );
+               $this->assertType( ScopedCallback::class, $value1, 'Second reentrant call returned lock' );
        }
 
        /**
index 99b959b..aa46c96 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-class WANObjectCacheTest extends MediaWikiTestCase {
+class WANObjectCacheTest extends PHPUnit_Framework_TestCase  {
        /** @var WANObjectCache */
        private $cache;
        /**@var BagOStuff */
@@ -9,19 +9,14 @@ class WANObjectCacheTest extends MediaWikiTestCase {
        protected function setUp() {
                parent::setUp();
 
-               if ( $this->getCliArg( 'use-wanobjectcache' ) ) {
-                       $name = $this->getCliArg( 'use-wanobjectcache' );
-
-                       $this->cache = ObjectCache::getWANInstance( $name );
-               } else {
-                       $this->cache = new WANObjectCache( [
-                               'cache' => new HashBagOStuff(),
-                               'pool' => 'testcache-hash',
-                               'relayer' => new EventRelayerNull( [] )
-                       ] );
-               }
+               $this->cache = new WANObjectCache( [
+                       'cache' => new HashBagOStuff(),
+                       'pool' => 'testcache-hash',
+                       'relayer' => new EventRelayerNull( [] )
+               ] );
 
                $wanCache = TestingAccessWrapper::newFromObject( $this->cache );
+               /** @noinspection PhpUndefinedFieldInspection */
                $this->internalCache = $wanCache->cache;
        }
 
@@ -29,13 +24,14 @@ class WANObjectCacheTest extends MediaWikiTestCase {
         * @dataProvider provideSetAndGet
         * @covers WANObjectCache::set()
         * @covers WANObjectCache::get()
+        * @covers WANObjectCache::makeKey()
         * @param mixed $value
         * @param integer $ttl
         */
        public function testSetAndGet( $value, $ttl ) {
                $curTTL = null;
                $asOf = null;
-               $key = wfRandomString();
+               $key = $this->cache->makeKey( 'x', wfRandomString() );
 
                $this->cache->get( $key, $curTTL, [], $asOf );
                $this->assertNull( $curTTL, "Current TTL is null" );
@@ -71,9 +67,10 @@ class WANObjectCacheTest extends MediaWikiTestCase {
 
        /**
         * @covers WANObjectCache::get()
+        * @covers WANObjectCache::makeGlobalKey()
         */
        public function testGetNotExists() {
-               $key = wfRandomString();
+               $key = $this->cache->makeGlobalKey( 'y', wfRandomString(), 'p' );
                $curTTL = null;
                $value = $this->cache->get( $key, $curTTL );
 
@@ -144,6 +141,19 @@ class WANObjectCacheTest extends MediaWikiTestCase {
                                $key, 100, $callback, [ 'pcTTL' => 5, 'pcGroup' => $groups[$i] ] );
                }
                $this->assertEquals( 9, $hit, "Values evicted" );
+
+               $key = reset( $keys );
+               // Get into cache
+               $this->cache->getWithSetCallback( $key, 100, $callback, [ 'pcTTL' => 5 ] );
+               $this->cache->getWithSetCallback( $key, 100, $callback, [ 'pcTTL' => 5 ] );
+               $this->assertEquals( 10, $hit, "Value cached" );
+               $outerCallback = function () use ( &$callback, $key ) {
+                       $v = $this->cache->getWithSetCallback( $key, 100, $callback, [ 'pcTTL' => 5 ] );
+
+                       return 43 + $v;
+               };
+               $this->cache->getWithSetCallback( $key, 100, $outerCallback );
+               $this->assertEquals( 11, $hit, "Nested callback value process cache skipped" );
        }
 
        /**
@@ -165,7 +175,7 @@ class WANObjectCacheTest extends MediaWikiTestCase {
                $priorAsOf = null;
                $wasSet = 0;
                $func = function( $old, &$ttl, &$opts, $asOf )
-                       use ( &$wasSet, &$priorValue, &$priorAsOf, $value )
+               use ( &$wasSet, &$priorValue, &$priorAsOf, $value )
                {
                        ++$wasSet;
                        $priorValue = $old;
@@ -188,9 +198,9 @@ class WANObjectCacheTest extends MediaWikiTestCase {
 
                $wasSet = 0;
                $v = $cache->getWithSetCallback( $key, 30, $func, [
-                       'lowTTL' => 0,
-                       'lockTSE' => 5,
-               ] + $extOpts );
+                               'lowTTL' => 0,
+                               'lockTSE' => 5,
+                       ] + $extOpts );
                $this->assertEquals( $value, $v, "Value returned" );
                $this->assertEquals( 0, $wasSet, "Value not regenerated" );
 
@@ -203,7 +213,7 @@ class WANObjectCacheTest extends MediaWikiTestCase {
                $this->assertEquals( $value, $v, "Value returned" );
                $this->assertEquals( 1, $wasSet, "Value regenerated due to check keys" );
                $this->assertEquals( $value, $priorValue, "Has prior value" );
-               $this->assertType( 'float', $priorAsOf, "Has prior value" );
+               $this->assertInternalType( 'float', $priorAsOf, "Has prior value" );
                $t1 = $cache->getCheckKeyTime( $cKey1 );
                $this->assertGreaterThanOrEqual( $priorTime, $t1, 'Check keys generated on miss' );
                $t2 = $cache->getCheckKeyTime( $cKey2 );
@@ -247,6 +257,150 @@ class WANObjectCacheTest extends MediaWikiTestCase {
                ];
        }
 
+       /**
+        * @dataProvider getMultiWithSetCallback_provider
+        * @covers WANObjectCache::getMultiWithSetCallback()
+        * @covers WANObjectCache::makeMultiKeys()
+        * @param array $extOpts
+        * @param bool $versioned
+        */
+       public function testGetMultiWithSetCallback( array $extOpts, $versioned ) {
+               $cache = $this->cache;
+
+               $keyA = wfRandomString();
+               $keyB = wfRandomString();
+               $keyC = wfRandomString();
+               $cKey1 = wfRandomString();
+               $cKey2 = wfRandomString();
+
+               $priorValue = null;
+               $priorAsOf = null;
+               $wasSet = 0;
+               $genFunc = function ( $id, $old, &$ttl, &$opts, $asOf ) use (
+                       &$wasSet, &$priorValue, &$priorAsOf
+               ) {
+                       ++$wasSet;
+                       $priorValue = $old;
+                       $priorAsOf = $asOf;
+                       $ttl = 20; // override with another value
+                       return "@$id$";
+               };
+
+               $wasSet = 0;
+               $keyedIds = new ArrayIterator( [ $keyA => 3353 ] );
+               $value = "@3353$";
+               $v = $cache->getMultiWithSetCallback(
+                       $keyedIds, 30, $genFunc, [ 'lockTSE' => 5 ] + $extOpts );
+               $this->assertEquals( $value, $v[$keyA], "Value returned" );
+               $this->assertEquals( 1, $wasSet, "Value regenerated" );
+               $this->assertFalse( $priorValue, "No prior value" );
+               $this->assertNull( $priorAsOf, "No prior value" );
+
+               $curTTL = null;
+               $cache->get( $keyA, $curTTL );
+               $this->assertLessThanOrEqual( 20, $curTTL, 'Current TTL between 19-20 (overriden)' );
+               $this->assertGreaterThanOrEqual( 19, $curTTL, 'Current TTL between 19-20 (overriden)' );
+
+               $wasSet = 0;
+               $value = "@efef$";
+               $keyedIds = new ArrayIterator( [ $keyB => 'efef' ] );
+               $v = $cache->getMultiWithSetCallback(
+                       $keyedIds, 30, $genFunc, [ 'lowTTL' => 0, 'lockTSE' => 5, ] + $extOpts );
+               $this->assertEquals( $value, $v[$keyB], "Value returned" );
+               $this->assertEquals( 1, $wasSet, "Value regenerated" );
+               $v = $cache->getMultiWithSetCallback(
+                       $keyedIds, 30, $genFunc, [ 'lowTTL' => 0, 'lockTSE' => 5, ] + $extOpts );
+               $this->assertEquals( $value, $v[$keyB], "Value returned" );
+               $this->assertEquals( 1, $wasSet, "Value not regenerated" );
+
+               $priorTime = microtime( true );
+               usleep( 1 );
+               $wasSet = 0;
+               $keyedIds = new ArrayIterator( [ $keyB => 'efef' ] );
+               $v = $cache->getMultiWithSetCallback(
+                       $keyedIds, 30, $genFunc, [ 'checkKeys' => [ $cKey1, $cKey2 ] ] + $extOpts
+               );
+               $this->assertEquals( $value, $v[$keyB], "Value returned" );
+               $this->assertEquals( 1, $wasSet, "Value regenerated due to check keys" );
+               $this->assertEquals( $value, $priorValue, "Has prior value" );
+               $this->assertInternalType( 'float', $priorAsOf, "Has prior value" );
+               $t1 = $cache->getCheckKeyTime( $cKey1 );
+               $this->assertGreaterThanOrEqual( $priorTime, $t1, 'Check keys generated on miss' );
+               $t2 = $cache->getCheckKeyTime( $cKey2 );
+               $this->assertGreaterThanOrEqual( $priorTime, $t2, 'Check keys generated on miss' );
+
+               $priorTime = microtime( true );
+               $value = "@43636$";
+               $wasSet = 0;
+               $keyedIds = new ArrayIterator( [ $keyC => 43636 ] );
+               $v = $cache->getMultiWithSetCallback(
+                       $keyedIds, 30, $genFunc, [ 'checkKeys' => [ $cKey1, $cKey2 ] ] + $extOpts
+               );
+               $this->assertEquals( $value, $v[$keyC], "Value returned" );
+               $this->assertEquals( 1, $wasSet, "Value regenerated due to still-recent check keys" );
+               $t1 = $cache->getCheckKeyTime( $cKey1 );
+               $this->assertLessThanOrEqual( $priorTime, $t1, 'Check keys did not change again' );
+               $t2 = $cache->getCheckKeyTime( $cKey2 );
+               $this->assertLessThanOrEqual( $priorTime, $t2, 'Check keys did not change again' );
+
+               $curTTL = null;
+               $v = $cache->get( $keyC, $curTTL, [ $cKey1, $cKey2 ] );
+               if ( $versioned ) {
+                       $this->assertEquals( $value, $v[$cache::VFLD_DATA], "Value returned" );
+               } else {
+                       $this->assertEquals( $value, $v, "Value returned" );
+               }
+               $this->assertLessThanOrEqual( 0, $curTTL, "Value has current TTL < 0 due to check keys" );
+
+               $wasSet = 0;
+               $key = wfRandomString();
+               $keyedIds = new ArrayIterator( [ $key => 242424 ] );
+               $v = $cache->getMultiWithSetCallback(
+                       $keyedIds, 30, $genFunc, [ 'pcTTL' => 5 ] + $extOpts );
+               $this->assertEquals( "@{$keyedIds[$key]}$", $v[$key], "Value returned" );
+               $cache->delete( $key );
+               $keyedIds = new ArrayIterator( [ $key => 242424 ] );
+               $v = $cache->getMultiWithSetCallback(
+                       $keyedIds, 30, $genFunc, [ 'pcTTL' => 5 ] + $extOpts );
+               $this->assertEquals( "@{$keyedIds[$key]}$", $v[$key], "Value still returned after deleted" );
+               $this->assertEquals( 1, $wasSet, "Value process cached while deleted" );
+
+               $calls = 0;
+               $ids = [ 1, 2, 3, 4, 5, 6 ];
+               $keyFunc = function ( $id, WANObjectCache $wanCache ) {
+                       return $wanCache->makeKey( 'test', $id );
+               };
+               $keyedIds = $cache->makeMultiKeys( $ids, $keyFunc );
+               $genFunc = function ( $id, $oldValue, &$ttl, array &$setops ) use ( &$calls ) {
+                       ++$calls;
+
+                       return "val-{$id}";
+               };
+               $values = $cache->getMultiWithSetCallback( $keyedIds, 10, $genFunc );
+
+               $this->assertEquals(
+                       [ "val-1", "val-2", "val-3", "val-4", "val-5", "val-6" ],
+                       array_values( $values ),
+                       "Correct values in correct order"
+               );
+               $this->assertEquals(
+                       array_map( $keyFunc, $ids, array_fill( 0, count( $ids ), $this->cache ) ),
+                       array_keys( $values ),
+                       "Correct keys in correct order"
+               );
+               $this->assertEquals( count( $ids ), $calls );
+
+               $cache->getMultiWithSetCallback( $keyedIds, 10, $genFunc );
+               $this->assertEquals( count( $ids ), $calls, "Values cached" );
+       }
+
+       public static function getMultiWithSetCallback_provider() {
+               return [
+                       [ [], false ],
+                       [ [ 'version' => 1 ], true ]
+               ];
+       }
+
        /**
         * @covers WANObjectCache::getWithSetCallback()
         * @covers WANObjectCache::doGetWithSetCallback()
@@ -777,9 +931,14 @@ class WANObjectCacheTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideAdaptiveTTL
         * @covers WANObjectCache::adaptiveTTL()
+        * @param float|int $ago
+        * @param int $maxTTL
+        * @param int $minTTL
+        * @param float $factor
+        * @param int $adaptiveTTL
         */
        public function testAdaptiveTTL( $ago, $maxTTL, $minTTL, $factor, $adaptiveTTL ) {
-               $mtime = is_int( $ago ) ? time() - $ago : $ago;
+               $mtime = $ago ? time() - $ago : $ago;
                $margin = 5;
                $ttl = $this->cache->adaptiveTTL( $mtime, $maxTTL, $minTTL, $factor );
 
diff --git a/tests/phpunit/includes/libs/rdbms/database/DatabaseDomainTest.php b/tests/phpunit/includes/libs/rdbms/database/DatabaseDomainTest.php
new file mode 100644 (file)
index 0000000..d13fbf9
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+
+/**
+ * @covers DatabaseDomain
+ */
+class DatabaseDomainTest extends PHPUnit_Framework_TestCase {
+       public static function provideConstruct() {
+               return [
+                       // All strings
+                       [ 'foo', 'bar', 'baz', 'foo-bar-baz' ],
+                       // Nothing
+                       [ null, null, '', '' ],
+                       // Invalid $database
+                       [ 0, 'bar', '', '', true ],
+                       // - in one of the fields
+                       [ 'foo-bar', 'baz', 'baa', 'foo?hbar-baz-baa' ],
+                       // ? in one of the fields
+                       [ 'foo?bar', 'baz', 'baa', 'foo??bar-baz-baa' ],
+               ];
+       }
+
+       /**
+        * @dataProvider provideConstruct
+        */
+       public function testConstruct( $db, $schema, $prefix, $id, $exception = false ) {
+               if ( $exception ) {
+                       $this->setExpectedException( InvalidArgumentException::class );
+               }
+
+               $domain = new DatabaseDomain( $db, $schema, $prefix );
+               $this->assertInstanceOf( DatabaseDomain::class, $domain );
+               $this->assertEquals( $db, $domain->getDatabase() );
+               $this->assertEquals( $schema, $domain->getSchema() );
+               $this->assertEquals( $prefix, $domain->getTablePrefix() );
+               $this->assertEquals( $id, $domain->getId() );
+       }
+
+       public static function provideNewFromId() {
+               return [
+                       // basic
+                       [ 'foo', 'foo', null, '' ],
+                       // <database>-<prefix>
+                       [ 'foo-bar', 'foo', null, 'bar' ],
+                       [ 'foo-bar-baz', 'foo', 'bar', 'baz' ],
+                       // ?h -> -
+                       [ 'foo?hbar-baz-baa', 'foo-bar', 'baz', 'baa' ],
+                       // ?? -> ?
+                       [ 'foo??bar-baz-baa', 'foo?bar', 'baz', 'baa' ],
+                       // ? is left alone
+                       [ 'foo?bar-baz-baa', 'foo?bar', 'baz', 'baa' ],
+                       // too many parts
+                       [ 'foo-bar-baz-baa', '', '', '', true ],
+               ];
+       }
+
+       /**
+        * @dataProvider provideNewFromId
+        */
+       public function testNewFromId( $id, $db, $schema, $prefix, $exception = false ) {
+               if ( $exception ) {
+                       $this->setExpectedException( InvalidArgumentException::class );
+               }
+               $domain = DatabaseDomain::newFromId( $id );
+               $this->assertInstanceOf( DatabaseDomain::class, $domain );
+               $this->assertEquals( $db, $domain->getDatabase() );
+               $this->assertEquals( $schema, $domain->getSchema() );
+               $this->assertEquals( $prefix, $domain->getTablePrefix() );
+       }
+}
diff --git a/tests/phpunit/includes/libs/time/ConvertibleTimestampTest.php b/tests/phpunit/includes/libs/time/ConvertibleTimestampTest.php
new file mode 100644 (file)
index 0000000..d48caf3
--- /dev/null
@@ -0,0 +1,144 @@
+<?php
+
+/**
+ * Tests timestamp parsing and output.
+ */
+class ConvertibleTimestampTest extends PHPUnit_Framework_TestCase {
+       /**
+        * @covers ConvertibleTimestamp::__construct
+        */
+       public function testConstructWithNoTimestamp() {
+               $timestamp = new ConvertibleTimestamp();
+               $this->assertInternalType( 'string', $timestamp->getTimestamp() );
+               $this->assertNotEmpty( $timestamp->getTimestamp() );
+               $this->assertNotEquals( false, strtotime( $timestamp->getTimestamp( TS_MW ) ) );
+       }
+
+       /**
+        * @covers ConvertibleTimestamp::__toString
+        */
+       public function testToString() {
+               $timestamp = new ConvertibleTimestamp( '1406833268' ); // Equivalent to 20140731190108
+               $this->assertEquals( '1406833268', $timestamp->__toString() );
+       }
+
+       public static function provideValidTimestampDifferences() {
+               return [
+                       [ '1406833268', '1406833269', '00 00 00 01' ],
+                       [ '1406833268', '1406833329', '00 00 01 01' ],
+                       [ '1406833268', '1406836929', '00 01 01 01' ],
+                       [ '1406833268', '1406923329', '01 01 01 01' ],
+               ];
+       }
+
+       /**
+        * @dataProvider provideValidTimestampDifferences
+        * @covers ConvertibleTimestamp::diff
+        */
+       public function testDiff( $timestamp1, $timestamp2, $expected ) {
+               $timestamp1 = new ConvertibleTimestamp( $timestamp1 );
+               $timestamp2 = new ConvertibleTimestamp( $timestamp2 );
+               $diff = $timestamp1->diff( $timestamp2 );
+               $this->assertEquals( $expected, $diff->format( '%D %H %I %S' ) );
+       }
+
+       /**
+        * Test parsing of valid timestamps and outputing to MW format.
+        * @dataProvider provideValidTimestamps
+        * @covers ConvertibleTimestamp::getTimestamp
+        */
+       public function testValidParse( $format, $original, $expected ) {
+               $timestamp = new ConvertibleTimestamp( $original );
+               $this->assertEquals( $expected, $timestamp->getTimestamp( TS_MW ) );
+       }
+
+       /**
+        * Test outputting valid timestamps to different formats.
+        * @dataProvider provideValidTimestamps
+        * @covers ConvertibleTimestamp::getTimestamp
+        */
+       public function testValidOutput( $format, $expected, $original ) {
+               $timestamp = new ConvertibleTimestamp( $original );
+               $this->assertEquals( $expected, (string)$timestamp->getTimestamp( $format ) );
+       }
+
+       /**
+        * Test an invalid timestamp.
+        * @expectedException TimestampException
+        * @covers ConvertibleTimestamp
+        */
+       public function testInvalidParse() {
+               new ConvertibleTimestamp( "This is not a timestamp." );
+       }
+
+       /**
+        * @dataProvider provideValidTimestamps
+        * @covers ConvertibleTimestamp::convert
+        */
+       public function testConvert( $format, $expected, $original ) {
+               $this->assertSame( $expected, ConvertibleTimestamp::convert( $format, $original ) );
+       }
+
+       /**
+        * Format an invalid timestamp.
+        * @covers ConvertibleTimestamp::convert
+        */
+       public function testConvertInvalid() {
+               $this->assertSame( false, ConvertibleTimestamp::convert( 'Not a timestamp', 0 ) );
+       }
+
+       /**
+        * Test an out of range timestamp
+        * @dataProvider provideOutOfRangeTimestamps
+        * @expectedException TimestampException
+        * @covers       ConvertibleTimestamp
+        */
+       public function testOutOfRangeTimestamps( $format, $input ) {
+               $timestamp = new ConvertibleTimestamp( $input );
+               $timestamp->getTimestamp( $format );
+       }
+
+       /**
+        * Test requesting an invalid output format.
+        * @expectedException TimestampException
+        * @covers ConvertibleTimestamp::getTimestamp
+        */
+       public function testInvalidOutput() {
+               $timestamp = new ConvertibleTimestamp( '1343761268' );
+               $timestamp->getTimestamp( 98 );
+       }
+
+       /**
+        * Returns a list of valid timestamps in the format:
+        * [ type, timestamp_of_type, timestamp_in_MW ]
+        */
+       public static function provideValidTimestamps() {
+               return [
+                       // Various formats
+                       [ TS_UNIX, '1343761268', '20120731190108' ],
+                       [ TS_MW, '20120731190108', '20120731190108' ],
+                       [ TS_DB, '2012-07-31 19:01:08', '20120731190108' ],
+                       [ TS_ISO_8601, '2012-07-31T19:01:08Z', '20120731190108' ],
+                       [ TS_ISO_8601_BASIC, '20120731T190108Z', '20120731190108' ],
+                       [ TS_EXIF, '2012:07:31 19:01:08', '20120731190108' ],
+                       [ TS_RFC2822, 'Tue, 31 Jul 2012 19:01:08 GMT', '20120731190108' ],
+                       [ TS_ORACLE, '31-07-2012 19:01:08.000000', '20120731190108' ],
+                       [ TS_POSTGRES, '2012-07-31 19:01:08 GMT', '20120731190108' ],
+                       // Some extremes and weird values
+                       [ TS_ISO_8601, '9999-12-31T23:59:59Z', '99991231235959' ],
+                       [ TS_UNIX, '-62135596801', '00001231235959' ]
+               ];
+       }
+
+       /**
+        * Returns a list of out of range timestamps in the format:
+        * [ type, timestamp_of_type ]
+        */
+       public static function provideOutOfRangeTimestamps() {
+               return [
+                       // Various formats
+                       [ TS_MW, '-62167219201' ], // -0001-12-31T23:59:59Z
+                       [ TS_MW, '253402300800' ], // 10000-01-01T00:00:00Z
+               ];
+       }
+}
diff --git a/tests/phpunit/includes/libs/xmp/XMPTest.php b/tests/phpunit/includes/libs/xmp/XMPTest.php
new file mode 100644 (file)
index 0000000..ac52a39
--- /dev/null
@@ -0,0 +1,226 @@
+<?php
+
+/**
+ * @group Media
+ * @covers XMPReader
+ */
+class XMPTest extends PHPUnit_Framework_TestCase  {
+
+       protected function setUp() {
+               parent::setUp();
+               # Requires libxml to do XMP parsing
+               if ( !extension_loaded( 'exif' ) ) {
+                       $this->markTestSkipped( "PHP extension 'exif' is not loaded, skipping." );
+               }
+       }
+
+       /**
+        * Put XMP in, compare what comes out...
+        *
+        * @param string $xmp The actual xml data.
+        * @param array $expected Expected result of parsing the xmp.
+        * @param string $info Short sentence on what's being tested.
+        *
+        * @throws Exception
+        * @dataProvider provideXMPParse
+        *
+        * @covers XMPReader::parse
+        */
+       public function testXMPParse( $xmp, $expected, $info ) {
+               if ( !is_string( $xmp ) || !is_array( $expected ) ) {
+                       throw new Exception( "Invalid data provided to " . __METHOD__ );
+               }
+               $reader = new XMPReader;
+               $reader->parse( $xmp );
+               $this->assertEquals( $expected, $reader->getResults(), $info, 0.0000000001 );
+       }
+
+       public static function provideXMPParse() {
+               $xmpPath = __DIR__ . '/../../../data/xmp/';
+               $data = [];
+
+               // $xmpFiles format: array of arrays with first arg file base name,
+               // with the actual file having .xmp on the end for the xmp
+               // and .result.php on the end for a php file containing the result
+               // array. Second argument is some info on what's being tested.
+               $xmpFiles = [
+                       [ '1', 'parseType=Resource test' ],
+                       [ '2', 'Structure with mixed attribute and element props' ],
+                       [ '3', 'Extra qualifiers (that should be ignored)' ],
+                       [ '3-invalid', 'Test ignoring qualifiers that look like normal props' ],
+                       [ '4', 'Flash as qualifier' ],
+                       [ '5', 'Flash as qualifier 2' ],
+                       [ '6', 'Multiple rdf:Description' ],
+                       [ '7', 'Generic test of several property types' ],
+                       [ 'flash', 'Test of Flash property' ],
+                       [ 'invalid-child-not-struct', 'Test child props not in struct or ignored' ],
+                       [ 'no-recognized-props', 'Test namespace and no recognized props' ],
+                       [ 'no-namespace', 'Test non-namespaced attributes are ignored' ],
+                       [ 'bag-for-seq', "Allow bag's instead of seq's. (bug 27105)" ],
+                       [ 'utf16BE', 'UTF-16BE encoding' ],
+                       [ 'utf16LE', 'UTF-16LE encoding' ],
+                       [ 'utf32BE', 'UTF-32BE encoding' ],
+                       [ 'utf32LE', 'UTF-32LE encoding' ],
+                       [ 'xmpExt', 'Extended XMP missing second part' ],
+                       [ 'gps', 'Handling of exif GPS parameters in XMP' ],
+               ];
+
+               $xmpFiles[] = [ 'doctype-included', 'XMP includes doctype' ];
+
+               foreach ( $xmpFiles as $file ) {
+                       $xmp = file_get_contents( $xmpPath . $file[0] . '.xmp' );
+                       // I'm not sure if this is the best way to handle getting the
+                       // result array, but it seems kind of big to put directly in the test
+                       // file.
+                       $result = null;
+                       include $xmpPath . $file[0] . '.result.php';
+                       $data[] = [ $xmp, $result, '[' . $file[0] . '.xmp] ' . $file[1] ];
+               }
+
+               return $data;
+       }
+
+       /** Test ExtendedXMP block support. (Used when the XMP has to be split
+        * over multiple jpeg segments, due to 64k size limit on jpeg segments.
+        *
+        * @todo This is based on what the standard says. Need to find a real
+        * world example file to double check the support for this is right.
+        *
+        * @covers XMPReader::parseExtended
+        */
+       public function testExtendedXMP() {
+               $xmpPath = __DIR__ . '/../../../data/xmp/';
+               $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
+               $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
+
+               $md5sum = '28C74E0AC2D796886759006FBE2E57B7'; // of xmpExt2.xmp
+               $length = pack( 'N', strlen( $extendedXMP ) );
+               $offset = pack( 'N', 0 );
+               $extendedPacket = $md5sum . $length . $offset . $extendedXMP;
+
+               $reader = new XMPReader();
+               $reader->parse( $standardXMP );
+               $reader->parseExtended( $extendedPacket );
+               $actual = $reader->getResults();
+
+               $expected = [
+                       'xmp-exif' => [
+                               'DigitalZoomRatio' => '0/10',
+                               'Flash' => 9,
+                               'FNumber' => '2/10',
+                       ]
+               ];
+
+               $this->assertEquals( $expected, $actual );
+       }
+
+       /**
+        * This test has an extended XMP block with a wrong guid (md5sum)
+        * and thus should only return the StandardXMP, not the ExtendedXMP.
+        *
+        * @covers XMPReader::parseExtended
+        */
+       public function testExtendedXMPWithWrongGUID() {
+               $xmpPath = __DIR__ . '/../../../data/xmp/';
+               $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
+               $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
+
+               $md5sum = '28C74E0AC2D796886759006FBE2E57B9'; // Note last digit.
+               $length = pack( 'N', strlen( $extendedXMP ) );
+               $offset = pack( 'N', 0 );
+               $extendedPacket = $md5sum . $length . $offset . $extendedXMP;
+
+               $reader = new XMPReader();
+               $reader->parse( $standardXMP );
+               $reader->parseExtended( $extendedPacket );
+               $actual = $reader->getResults();
+
+               $expected = [
+                       'xmp-exif' => [
+                               'DigitalZoomRatio' => '0/10',
+                               'Flash' => 9,
+                       ]
+               ];
+
+               $this->assertEquals( $expected, $actual );
+       }
+
+       /**
+        * Have a high offset to simulate a missing packet,
+        * which should cause it to ignore the ExtendedXMP packet.
+        *
+        * @covers XMPReader::parseExtended
+        */
+       public function testExtendedXMPMissingPacket() {
+               $xmpPath = __DIR__ . '/../../../data/xmp/';
+               $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
+               $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
+
+               $md5sum = '28C74E0AC2D796886759006FBE2E57B7'; // of xmpExt2.xmp
+               $length = pack( 'N', strlen( $extendedXMP ) );
+               $offset = pack( 'N', 2048 );
+               $extendedPacket = $md5sum . $length . $offset . $extendedXMP;
+
+               $reader = new XMPReader();
+               $reader->parse( $standardXMP );
+               $reader->parseExtended( $extendedPacket );
+               $actual = $reader->getResults();
+
+               $expected = [
+                       'xmp-exif' => [
+                               'DigitalZoomRatio' => '0/10',
+                               'Flash' => 9,
+                       ]
+               ];
+
+               $this->assertEquals( $expected, $actual );
+       }
+
+       /**
+        * Test for multi-section, hostile XML
+        * @covers XMPReader::checkParseSafety
+        */
+       public function testCheckParseSafety() {
+
+               // Test for detection
+               $xmpPath = __DIR__ . '/../../../data/xmp/';
+               $file = fopen( $xmpPath . 'doctype-included.xmp', 'rb' );
+               $valid = false;
+               $reader = new XMPReader();
+               do {
+                       $chunk = fread( $file, 10 );
+                       $valid = $reader->parse( $chunk, feof( $file ) );
+               } while ( !feof( $file ) );
+               $this->assertFalse( $valid, 'Check that doctype is detected in fragmented XML' );
+               $this->assertEquals(
+                       [],
+                       $reader->getResults(),
+                       'Check that doctype is detected in fragmented XML'
+               );
+               fclose( $file );
+               unset( $reader );
+
+               // Test for false positives
+               $file = fopen( $xmpPath . 'doctype-not-included.xmp', 'rb' );
+               $valid = false;
+               $reader = new XMPReader();
+               do {
+                       $chunk = fread( $file, 10 );
+                       $valid = $reader->parse( $chunk, feof( $file ) );
+               } while ( !feof( $file ) );
+               $this->assertTrue(
+                       $valid,
+                       'Check for false-positive detecting doctype in fragmented XML'
+               );
+               $this->assertEquals(
+                       [
+                               'xmp-exif' => [
+                                       'DigitalZoomRatio' => '0/10',
+                                       'Flash' => '9'
+                               ]
+                       ],
+                       $reader->getResults(),
+                       'Check that doctype is detected in fragmented XML'
+               );
+       }
+}
diff --git a/tests/phpunit/includes/libs/xmp/XMPValidateTest.php b/tests/phpunit/includes/libs/xmp/XMPValidateTest.php
new file mode 100644 (file)
index 0000000..7f7ea93
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+
+use Psr\Log\NullLogger;
+
+/**
+ * @group Media
+ */
+class XMPValidateTest extends PHPUnit_Framework_TestCase {
+
+       /**
+        * @dataProvider provideDates
+        * @covers XMPValidate::validateDate
+        */
+       public function testValidateDate( $value, $expected ) {
+               // The method should modify $value.
+               $validate = new XMPValidate( new NullLogger() );
+               $validate->validateDate( [], $value, true );
+               $this->assertEquals( $expected, $value );
+       }
+
+       public static function provideDates() {
+               /* For reference valid date formats are:
+                * YYYY
+                * YYYY-MM
+                * YYYY-MM-DD
+                * YYYY-MM-DDThh:mmTZD
+                * YYYY-MM-DDThh:mm:ssTZD
+                * YYYY-MM-DDThh:mm:ss.sTZD
+                * (Time zone is optional)
+                */
+               return [
+                       [ '1992', '1992' ],
+                       [ '1992-04', '1992:04' ],
+                       [ '1992-02-01', '1992:02:01' ],
+                       [ '2011-09-29', '2011:09:29' ],
+                       [ '1982-12-15T20:12', '1982:12:15 20:12' ],
+                       [ '1982-12-15T20:12Z', '1982:12:15 20:12' ],
+                       [ '1982-12-15T20:12+02:30', '1982:12:15 22:42' ],
+                       [ '1982-12-15T01:12-02:30', '1982:12:14 22:42' ],
+                       [ '1982-12-15T20:12:11', '1982:12:15 20:12:11' ],
+                       [ '1982-12-15T20:12:11Z', '1982:12:15 20:12:11' ],
+                       [ '1982-12-15T20:12:11+01:10', '1982:12:15 21:22:11' ],
+                       [ '2045-12-15T20:12:11', '2045:12:15 20:12:11' ],
+                       [ '1867-06-01T15:00:00', '1867:06:01 15:00:00' ],
+                       /* some invalid ones */
+                       [ '2001--12', null ],
+                       [ '2001-5-12', null ],
+                       [ '2001-5-12TZ', null ],
+                       [ '2001-05-12T15', null ],
+                       [ '2001-12T15:13', null ],
+               ];
+       }
+}
index 5042121..e854ab5 100644 (file)
@@ -26,7 +26,8 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
                $this->backend = new FSFileBackend( [
                        'name' => 'localtesting',
                        'wikiId' => wfWikiID(),
-                       'containerPaths' => $containers
+                       'containerPaths' => $containers,
+                       'tmpDirectory' => $this->getNewTempDirectory()
                ] );
                $this->repo = new FSRepo( $this->getRepoOptions() );
        }
diff --git a/tests/phpunit/includes/media/XMPTest.php b/tests/phpunit/includes/media/XMPTest.php
deleted file mode 100644 (file)
index bffe415..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-<?php
-
-/**
- * @group Media
- * @covers XMPReader
- */
-class XMPTest extends MediaWikiTestCase {
-
-       protected function setUp() {
-               parent::setUp();
-               $this->checkPHPExtension( 'exif' ); # Requires libxml to do XMP parsing
-       }
-
-       /**
-        * Put XMP in, compare what comes out...
-        *
-        * @param string $xmp The actual xml data.
-        * @param array $expected Expected result of parsing the xmp.
-        * @param string $info Short sentence on what's being tested.
-        *
-        * @throws Exception
-        * @dataProvider provideXMPParse
-        *
-        * @covers XMPReader::parse
-        */
-       public function testXMPParse( $xmp, $expected, $info ) {
-               if ( !is_string( $xmp ) || !is_array( $expected ) ) {
-                       throw new Exception( "Invalid data provided to " . __METHOD__ );
-               }
-               $reader = new XMPReader;
-               $reader->parse( $xmp );
-               $this->assertEquals( $expected, $reader->getResults(), $info, 0.0000000001 );
-       }
-
-       public static function provideXMPParse() {
-               $xmpPath = __DIR__ . '/../../data/xmp/';
-               $data = [];
-
-               // $xmpFiles format: array of arrays with first arg file base name,
-               // with the actual file having .xmp on the end for the xmp
-               // and .result.php on the end for a php file containing the result
-               // array. Second argument is some info on what's being tested.
-               $xmpFiles = [
-                       [ '1', 'parseType=Resource test' ],
-                       [ '2', 'Structure with mixed attribute and element props' ],
-                       [ '3', 'Extra qualifiers (that should be ignored)' ],
-                       [ '3-invalid', 'Test ignoring qualifiers that look like normal props' ],
-                       [ '4', 'Flash as qualifier' ],
-                       [ '5', 'Flash as qualifier 2' ],
-                       [ '6', 'Multiple rdf:Description' ],
-                       [ '7', 'Generic test of several property types' ],
-                       [ 'flash', 'Test of Flash property' ],
-                       [ 'invalid-child-not-struct', 'Test child props not in struct or ignored' ],
-                       [ 'no-recognized-props', 'Test namespace and no recognized props' ],
-                       [ 'no-namespace', 'Test non-namespaced attributes are ignored' ],
-                       [ 'bag-for-seq', "Allow bag's instead of seq's. (bug 27105)" ],
-                       [ 'utf16BE', 'UTF-16BE encoding' ],
-                       [ 'utf16LE', 'UTF-16LE encoding' ],
-                       [ 'utf32BE', 'UTF-32BE encoding' ],
-                       [ 'utf32LE', 'UTF-32LE encoding' ],
-                       [ 'xmpExt', 'Extended XMP missing second part' ],
-                       [ 'gps', 'Handling of exif GPS parameters in XMP' ],
-               ];
-
-               $xmpFiles[] = [ 'doctype-included', 'XMP includes doctype' ];
-
-               foreach ( $xmpFiles as $file ) {
-                       $xmp = file_get_contents( $xmpPath . $file[0] . '.xmp' );
-                       // I'm not sure if this is the best way to handle getting the
-                       // result array, but it seems kind of big to put directly in the test
-                       // file.
-                       $result = null;
-                       include $xmpPath . $file[0] . '.result.php';
-                       $data[] = [ $xmp, $result, '[' . $file[0] . '.xmp] ' . $file[1] ];
-               }
-
-               return $data;
-       }
-
-       /** Test ExtendedXMP block support. (Used when the XMP has to be split
-        * over multiple jpeg segments, due to 64k size limit on jpeg segments.
-        *
-        * @todo This is based on what the standard says. Need to find a real
-        * world example file to double check the support for this is right.
-        *
-        * @covers XMPReader::parseExtended
-        */
-       public function testExtendedXMP() {
-               $xmpPath = __DIR__ . '/../../data/xmp/';
-               $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
-               $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
-
-               $md5sum = '28C74E0AC2D796886759006FBE2E57B7'; // of xmpExt2.xmp
-               $length = pack( 'N', strlen( $extendedXMP ) );
-               $offset = pack( 'N', 0 );
-               $extendedPacket = $md5sum . $length . $offset . $extendedXMP;
-
-               $reader = new XMPReader();
-               $reader->parse( $standardXMP );
-               $reader->parseExtended( $extendedPacket );
-               $actual = $reader->getResults();
-
-               $expected = [
-                       'xmp-exif' => [
-                               'DigitalZoomRatio' => '0/10',
-                               'Flash' => 9,
-                               'FNumber' => '2/10',
-                       ]
-               ];
-
-               $this->assertEquals( $expected, $actual );
-       }
-
-       /**
-        * This test has an extended XMP block with a wrong guid (md5sum)
-        * and thus should only return the StandardXMP, not the ExtendedXMP.
-        *
-        * @covers XMPReader::parseExtended
-        */
-       public function testExtendedXMPWithWrongGUID() {
-               $xmpPath = __DIR__ . '/../../data/xmp/';
-               $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
-               $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
-
-               $md5sum = '28C74E0AC2D796886759006FBE2E57B9'; // Note last digit.
-               $length = pack( 'N', strlen( $extendedXMP ) );
-               $offset = pack( 'N', 0 );
-               $extendedPacket = $md5sum . $length . $offset . $extendedXMP;
-
-               $reader = new XMPReader();
-               $reader->parse( $standardXMP );
-               $reader->parseExtended( $extendedPacket );
-               $actual = $reader->getResults();
-
-               $expected = [
-                       'xmp-exif' => [
-                               'DigitalZoomRatio' => '0/10',
-                               'Flash' => 9,
-                       ]
-               ];
-
-               $this->assertEquals( $expected, $actual );
-       }
-
-       /**
-        * Have a high offset to simulate a missing packet,
-        * which should cause it to ignore the ExtendedXMP packet.
-        *
-        * @covers XMPReader::parseExtended
-        */
-       public function testExtendedXMPMissingPacket() {
-               $xmpPath = __DIR__ . '/../../data/xmp/';
-               $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
-               $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
-
-               $md5sum = '28C74E0AC2D796886759006FBE2E57B7'; // of xmpExt2.xmp
-               $length = pack( 'N', strlen( $extendedXMP ) );
-               $offset = pack( 'N', 2048 );
-               $extendedPacket = $md5sum . $length . $offset . $extendedXMP;
-
-               $reader = new XMPReader();
-               $reader->parse( $standardXMP );
-               $reader->parseExtended( $extendedPacket );
-               $actual = $reader->getResults();
-
-               $expected = [
-                       'xmp-exif' => [
-                               'DigitalZoomRatio' => '0/10',
-                               'Flash' => 9,
-                       ]
-               ];
-
-               $this->assertEquals( $expected, $actual );
-       }
-
-       /**
-        * Test for multi-section, hostile XML
-        * @covers XMPReader::checkParseSafety
-        */
-       public function testCheckParseSafety() {
-
-               // Test for detection
-               $xmpPath = __DIR__ . '/../../data/xmp/';
-               $file = fopen( $xmpPath . 'doctype-included.xmp', 'rb' );
-               $valid = false;
-               $reader = new XMPReader();
-               do {
-                       $chunk = fread( $file, 10 );
-                       $valid = $reader->parse( $chunk, feof( $file ) );
-               } while ( !feof( $file ) );
-               $this->assertFalse( $valid, 'Check that doctype is detected in fragmented XML' );
-               $this->assertEquals(
-                       [],
-                       $reader->getResults(),
-                       'Check that doctype is detected in fragmented XML'
-               );
-               fclose( $file );
-               unset( $reader );
-
-               // Test for false positives
-               $file = fopen( $xmpPath . 'doctype-not-included.xmp', 'rb' );
-               $valid = false;
-               $reader = new XMPReader();
-               do {
-                       $chunk = fread( $file, 10 );
-                       $valid = $reader->parse( $chunk, feof( $file ) );
-               } while ( !feof( $file ) );
-               $this->assertTrue(
-                       $valid,
-                       'Check for false-positive detecting doctype in fragmented XML'
-               );
-               $this->assertEquals(
-                       [
-                               'xmp-exif' => [
-                                       'DigitalZoomRatio' => '0/10',
-                                       'Flash' => '9'
-                               ]
-                       ],
-                       $reader->getResults(),
-                       'Check that doctype is detected in fragmented XML'
-               );
-       }
-}
diff --git a/tests/phpunit/includes/media/XMPValidateTest.php b/tests/phpunit/includes/media/XMPValidateTest.php
deleted file mode 100644 (file)
index 6a00629..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-use Psr\Log\NullLogger;
-
-/**
- * @group Media
- */
-class XMPValidateTest extends MediaWikiTestCase {
-
-       /**
-        * @dataProvider provideDates
-        * @covers XMPValidate::validateDate
-        */
-       public function testValidateDate( $value, $expected ) {
-               // The method should modify $value.
-               $validate = new XMPValidate( new NullLogger() );
-               $validate->validateDate( [], $value, true );
-               $this->assertEquals( $expected, $value );
-       }
-
-       public static function provideDates() {
-               /* For reference valid date formats are:
-                * YYYY
-                * YYYY-MM
-                * YYYY-MM-DD
-                * YYYY-MM-DDThh:mmTZD
-                * YYYY-MM-DDThh:mm:ssTZD
-                * YYYY-MM-DDThh:mm:ss.sTZD
-                * (Time zone is optional)
-                */
-               return [
-                       [ '1992', '1992' ],
-                       [ '1992-04', '1992:04' ],
-                       [ '1992-02-01', '1992:02:01' ],
-                       [ '2011-09-29', '2011:09:29' ],
-                       [ '1982-12-15T20:12', '1982:12:15 20:12' ],
-                       [ '1982-12-15T20:12Z', '1982:12:15 20:12' ],
-                       [ '1982-12-15T20:12+02:30', '1982:12:15 22:42' ],
-                       [ '1982-12-15T01:12-02:30', '1982:12:14 22:42' ],
-                       [ '1982-12-15T20:12:11', '1982:12:15 20:12:11' ],
-                       [ '1982-12-15T20:12:11Z', '1982:12:15 20:12:11' ],
-                       [ '1982-12-15T20:12:11+01:10', '1982:12:15 21:22:11' ],
-                       [ '2045-12-15T20:12:11', '2045:12:15 20:12:11' ],
-                       [ '1867-06-01T15:00:00', '1867:06:01 15:00:00' ],
-                       /* some invalid ones */
-                       [ '2001--12', null ],
-                       [ '2001-5-12', null ],
-                       [ '2001-5-12TZ', null ],
-                       [ '2001-05-12T15', null ],
-                       [ '2001-12T15:13', null ],
-               ];
-       }
-}
index 9f4e1fa..5f1bf0c 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Wikimedia\ScopedCallback;
+
 class WikiCategoryPageTest extends MediaWikiLangTestCase {
 
        /**
index 10e0f59..4b7ebd3 100644 (file)
@@ -92,6 +92,9 @@ class WikiPageTest extends MediaWikiLangTestCase {
 
        /**
         * @covers WikiPage::doEditContent
+        * @covers WikiPage::doModify
+        * @covers WikiPage::doCreate
+        * @covers WikiPage::doEditUpdates
         */
        public function testDoEditContent() {
                $page = $this->newPage( "WikiPageTest_testDoEditContent" );
@@ -154,6 +157,7 @@ class WikiPageTest extends MediaWikiLangTestCase {
 
        /**
         * @covers WikiPage::doEdit
+        * @deprecated since 1.21. Should be removed when WikiPage::doEdit() gets removed
         */
        public function testDoEdit() {
                $this->hideDeprecated( "WikiPage::doEdit" );
@@ -212,30 +216,6 @@ class WikiPageTest extends MediaWikiLangTestCase {
                $this->assertEquals( 2, $n, 'pagelinks should contain two links from the page' );
        }
 
-       /**
-        * @covers WikiPage::doQuickEditContent
-        */
-       public function testDoQuickEditContent() {
-               global $wgUser;
-
-               $page = $this->createPage(
-                       "WikiPageTest_testDoQuickEditContent",
-                       "original text",
-                       CONTENT_MODEL_WIKITEXT
-               );
-
-               $content = ContentHandler::makeContent(
-                       "quick text",
-                       $page->getTitle(),
-                       CONTENT_MODEL_WIKITEXT
-               );
-               $page->doQuickEditContent( $content, $wgUser, "testing q" );
-
-               # ---------------------
-               $page = new WikiPage( $page->getTitle() );
-               $this->assertTrue( $content->equals( $page->getContent() ) );
-       }
-
        /**
         * @covers WikiPage::doDeleteArticle
         */
index 698bd0b..c920982 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+use Wikimedia\ScopedCallback;
 
 /**
  * This is the TestCase subclass for running a single parser test via the
@@ -9,6 +10,7 @@
  *
  * @group Database
  * @group Parser
+ * @group ParserTests
  *
  * @todo covers tags
  */
index 6710b19..c491e6b 100644 (file)
@@ -210,10 +210,10 @@ class PreprocessorTest extends MediaWikiTestCase {
        public static function provideFiles() {
                // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
                return self::addClassArg( [
-                       [ "QuoteQuran" ], # http://en.wikipedia.org/w/index.php?title=Template:QuoteQuran/sandbox&oldid=237348988 GFDL + CC BY-SA by Striver
-                       [ "Factorial" ], # http://en.wikipedia.org/w/index.php?title=Template:Factorial&oldid=98548758 GFDL + CC BY-SA by Polonium
-                       [ "All_system_messages" ], # http://tl.wiktionary.org/w/index.php?title=Suleras:All_system_messages&oldid=2765 GPL text generated by MediaWiki
-                       [ "Fundraising" ], # http://tl.wiktionary.org/w/index.php?title=MediaWiki:Sitenotice&oldid=5716 GFDL + CC BY-SA, copied there by Sky Harbor.
+                       [ "QuoteQuran" ], # https://en.wikipedia.org/w/index.php?title=Template:QuoteQuran/sandbox&oldid=237348988 GFDL + CC BY-SA by Striver
+                       [ "Factorial" ], # https://en.wikipedia.org/w/index.php?title=Template:Factorial&oldid=98548758 GFDL + CC BY-SA by Polonium
+                       [ "All_system_messages" ], # https://tl.wiktionary.org/w/index.php?title=Suleras:All_system_messages&oldid=2765 GPL text generated by MediaWiki
+                       [ "Fundraising" ], # https://tl.wiktionary.org/w/index.php?title=MediaWiki:Sitenotice&oldid=5716 GFDL + CC BY-SA, copied there by Sky Harbor.
                        [ "NestedTemplates" ], # bug 27936
                ] );
                // @codingStandardsIgnoreEnd
index 167f52a..1de4265 100644 (file)
@@ -252,6 +252,41 @@ class ExtensionRegistryTest extends MediaWikiTestCase {
                                        'mwtestT100767' => false,
                                ],
                        ],
+                       [
+                               'test array_replace_recursive',
+                               [
+                                       'mwtestJsonConfigs' => [
+                                               'JsonZeroConfig' => [
+                                                       'namespace' => 480,
+                                                       'nsName' => 'Zero',
+                                                       'isLocal' => false,
+                                               ],
+                                       ],
+                               ],
+                               [
+                                       'mwtestJsonConfigs' => [
+                                               'JsonZeroConfig' => [
+                                                       'isLocal' => false,
+                                                       'remote' => [
+                                                               'username' => 'foo',
+                                                       ],
+                                               ],
+                                               ExtensionRegistry::MERGE_STRATEGY => 'array_replace_recursive',
+                                       ],
+                               ],
+                               [
+                                       'mwtestJsonConfigs' => [
+                                               'JsonZeroConfig' => [
+                                                       'namespace' => 480,
+                                                       'nsName' => 'Zero',
+                                                       'isLocal' => false,
+                                                       'remote' => [
+                                                               'username' => 'foo',
+                                                       ],
+                                               ],
+                                       ],
+                               ],
+                       ],
                ];
        }
 }
index 0965b9f..d2a0724 100644 (file)
@@ -5,6 +5,12 @@
  */
 class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
 
+       protected static function expandVariables( $text ) {
+               return strtr( $text, [
+                       '{blankVer}' => ResourceLoaderTestCase::BLANK_VERSION
+               ] );
+       }
+
        protected static function makeContext( $extraQuery = [] ) {
                $conf = new HashConfig( [
                        'ResourceLoaderSources' => [],
@@ -165,7 +171,7 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
                        . '<script>(window.RLQ=window.RLQ||[]).push(function(){'
                        . 'mw.config.set({"key":"value"});'
                        . 'mw.loader.state({"test.exempt":"ready","test.private.top":"loading","test.styles.pure":"ready","test.styles.private":"ready","test.scripts.top":"loading"});'
-                       . 'mw.loader.implement("test.private.top",function($,jQuery,require,module){},{"css":[]});'
+                       . 'mw.loader.implement("test.private.top@{blankVer}",function($,jQuery,require,module){},{"css":[]});'
                        . 'mw.loader.load(["test.top"]);'
                        . 'mw.loader.load("/w/load.php?debug=false\u0026lang=nl\u0026modules=test.scripts.top\u0026only=scripts\u0026skin=fallback");'
                        . '});</script>' . "\n"
@@ -173,6 +179,7 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
                        . '<style>.private{}</style>' . "\n"
                        . '<script async="" src="/w/load.php?debug=false&amp;lang=nl&amp;modules=startup&amp;only=scripts&amp;skin=fallback"></script>';
                // @codingStandardsIgnoreEnd
+               $expected = self::expandVariables( $expected );
 
                $this->assertEquals( $expected, $client->getHeadHtml() );
        }
@@ -197,11 +204,12 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
 
                // @codingStandardsIgnoreStart Generic.Files.LineLength
                $expected = '<script>(window.RLQ=window.RLQ||[]).push(function(){'
-                       . 'mw.loader.implement("test.private.bottom",function($,jQuery,require,module){},{"css":[]});'
+                       . 'mw.loader.implement("test.private.bottom@{blankVer}",function($,jQuery,require,module){},{"css":[]});'
                        . 'mw.loader.load("/w/load.php?debug=false\u0026lang=nl\u0026modules=test.scripts\u0026only=scripts\u0026skin=fallback");'
                        . 'mw.loader.load(["test"]);'
                        . '});</script>';
                // @codingStandardsIgnoreEnd
+               $expected = self::expandVariables( $expected );
 
                $this->assertEquals( $expected, $client->getBodyHtml() );
        }
@@ -225,7 +233,7 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
                                'context' => [],
                                'modules' => [ 'test.private.top' ],
                                'only' => ResourceLoaderModule::TYPE_COMBINED,
-                               'output' => '<script>(window.RLQ=window.RLQ||[]).push(function(){mw.loader.implement("test.private.top",function($,jQuery,require,module){},{"css":[]});});</script>',
+                               'output' => '<script>(window.RLQ=window.RLQ||[]).push(function(){mw.loader.implement("test.private.top@{blankVer}",function($,jQuery,require,module){},{"css":[]});});</script>',
                        ],
                        [
                                'context' => [],
@@ -273,6 +281,7 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
                $context = self::makeContext( $extraQuery );
                $context->getResourceLoader()->register( self::makeSampleModules() );
                $actual = ResourceLoaderClientHtml::makeLoad( $context, $modules, $type );
+               $expected = self::expandVariables( $expected );
                $this->assertEquals( $expected, (string)$actual );
        }
 }
index ab1323e..1b756be 100644 (file)
@@ -2,14 +2,9 @@
 
 class ResourceLoaderStartUpModuleTest extends ResourceLoaderTestCase {
 
-       // Version hash for a blank file module.
-       // Result of ResourceLoader::makeHash(), ResourceLoaderTestModule
-       // and ResourceLoaderFileModule::getDefinitionSummary().
-       protected static $blankVersion = '09p30q0';
-
        protected static function expandPlaceholders( $text ) {
                return strtr( $text, [
-                       '{blankVer}' => self::$blankVersion
+                       '{blankVer}' => self::BLANK_VERSION
                ] );
        }
 
index 9a3e222..c24a321 100644 (file)
@@ -281,7 +281,6 @@ mw.example();
                                'name' => 'test.example',
                                'scripts' => [],
                                'styles' => [ 'css' => [ '.mw-example {}' ] ],
-                               'messages' => new XmlJsCode( '{}' ),
 
                                'expected' => 'mw.loader.implement( "test.example", [], {
     "css": [
@@ -320,18 +319,10 @@ mw.example();
 
                                'name' => 'user',
                                'scripts' => 'mw.example( 1 );',
+                               'wrap' => false,
 
                                'expected' => 'mw.loader.implement( "user", "mw.example( 1 );" );',
                        ] ],
-                       [ [
-                               'title' => 'Implement unwrapped user script',
-                               'debug' => false,
-
-                               'name' => 'user',
-                               'scripts' => 'mw.example( 1 );',
-
-                               'expected' => 'mw.loader.implement("user","mw.example(1);");',
-                       ] ],
                ];
        }
 
@@ -342,17 +333,20 @@ mw.example();
         */
        public function testMakeLoaderImplementScript( $case ) {
                $case += [
-                       'styles' => [], 'templates' => [], 'messages' => new XmlJsCode( '{}' ),
-                       'debug' => true
+                       'wrap' => true,
+                       'styles' => [], 'templates' => [], 'messages' => new XmlJsCode( '{}' )
                ];
                ResourceLoader::clearCache();
-               $this->setMwGlobals( 'wgResourceLoaderDebug', $case['debug'] );
+               $this->setMwGlobals( 'wgResourceLoaderDebug', true );
 
+               $rl = TestingAccessWrapper::newFromClass( 'ResourceLoader' );
                $this->assertEquals(
                        $case['expected'],
-                       ResourceLoader::makeLoaderImplementScript(
+                       $rl->makeLoaderImplementScript(
                                $case['name'],
-                               $case['scripts'],
+                               ( $case['wrap'] && is_string( $case['scripts'] ) )
+                                       ? new XmlJsCode( $case['scripts'] )
+                                       : $case['scripts'],
                                $case['styles'],
                                $case['messages'],
                                $case['templates']
@@ -365,7 +359,8 @@ mw.example();
         */
        public function testMakeLoaderImplementScriptInvalid() {
                $this->setExpectedException( 'MWException', 'Invalid scripts error' );
-               ResourceLoader::makeLoaderImplementScript(
+               $rl = TestingAccessWrapper::newFromClass( 'ResourceLoader' );
+               $rl->makeLoaderImplementScript(
                        'test', // name
                        123, // scripts
                        null, // styles
index 404fd97..a332528 100644 (file)
@@ -138,4 +138,89 @@ class ResourceLoaderWikiModuleTest extends ResourceLoaderTestCase {
                        ],
                ];
        }
+
+       /**
+        * @covers ResourceLoaderWikiModule::getTitleInfo
+        */
+       public function testGetTitleInfo() {
+               $pages = [
+                       'MediaWiki:Common.css' => [ 'type' => 'styles' ],
+                       'mediawiki: fallback.css' => [ 'type' => 'styles' ],
+               ];
+               $titleInfo = [
+                       'MediaWiki:Common.css' => [ 'page_len' => 1234 ],
+                       'MediaWiki:Fallback.css' => [ 'page_len' => 0 ],
+               ];
+               $expected = $titleInfo;
+
+               $module = $this->getMockBuilder( 'TestResourceLoaderWikiModule' )
+                       ->setMethods( [ 'getPages' ] )
+                       ->getMock();
+               $module->method( 'getPages' )->willReturn( $pages );
+               // Can't mock static methods
+               $module::$returnFetchTitleInfo = $titleInfo;
+
+               $context = $this->getMockBuilder( 'ResourceLoaderContext' )
+                       ->disableOriginalConstructor()
+                       ->getMock();
+
+               $module = TestingAccessWrapper::newFromObject( $module );
+               $this->assertEquals( $expected, $module->getTitleInfo( $context ), 'Title info' );
+       }
+
+       /**
+        * @covers ResourceLoaderWikiModule::getTitleInfo
+        * @covers ResourceLoaderWikiModule::setTitleInfo
+        * @covers ResourceLoaderWikiModule::preloadTitleInfo
+        */
+       public function testGetPreloadedTitleInfo() {
+               $pages = [
+                       'MediaWiki:Common.css' => [ 'type' => 'styles' ],
+                       // Regression against T145673. It's impossible to statically declare page names in
+                       // a canonical way since the canonical prefix is localised. As such, the preload
+                       // cache computed the right cache key, but failed to find the results when
+                       // doing an intersect on the canonical result, producing an empty array.
+                       'mediawiki: fallback.css' => [ 'type' => 'styles' ],
+               ];
+               $titleInfo = [
+                       'MediaWiki:Common.css' => [ 'page_len' => 1234 ],
+                       'MediaWiki:Fallback.css' => [ 'page_len' => 0 ],
+               ];
+               $expected = $titleInfo;
+
+               $module = $this->getMockBuilder( 'TestResourceLoaderWikiModule' )
+                       ->setMethods( [ 'getPages' ] )
+                       ->getMock();
+               $module->method( 'getPages' )->willReturn( $pages );
+               // Can't mock static methods
+               $module::$returnFetchTitleInfo = $titleInfo;
+
+               $rl = new EmptyResourceLoader();
+               $rl->register( 'testmodule', $module );
+               $context = new ResourceLoaderContext( $rl, new FauxRequest() );
+
+               TestResourceLoaderWikiModule::invalidateModuleCache(
+                       Title::newFromText( 'MediaWiki:Common.css' ),
+                       null,
+                       null,
+                       wfWikiID()
+               );
+               TestResourceLoaderWikiModule::preloadTitleInfo(
+                       $context,
+                       wfGetDB( DB_REPLICA ),
+                       [ 'testmodule' ]
+               );
+
+               $module = TestingAccessWrapper::newFromObject( $module );
+               $this->assertEquals( $expected, $module->getTitleInfo( $context ), 'Title info' );
+       }
+}
+
+class TestResourceLoaderWikiModule extends ResourceLoaderWikiModule {
+       public static $returnFetchTitleInfo = null;
+       protected static function fetchTitleInfo( IDatabase $db, array $pages, $fname = null ) {
+               $ret = self::$returnFetchTitleInfo;
+               self::$returnFetchTitleInfo = null;
+               return $ret;
+       }
 }
index 0b34b6f..3fb4bbb 100644 (file)
@@ -30,7 +30,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        $this->markTestSkipped( "MySQL or SQLite with FTS3 only" );
                }
 
-               $searchType = $this->db->getSearchEngine();
+               $searchType = SearchEngineFactory::getSearchEngineClass( $this->db );
                $this->setMwGlobals( [
                        'wgSearchType' => $searchType
                ] );
@@ -207,4 +207,50 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                $this->assertArrayHasKey( 'testData', $mapping );
                $this->assertEquals( 'test', $mapping['testData'] );
        }
+
+       public function hookSearchIndexFields( $mockFieldBuilder, &$fields, SearchEngine $engine ) {
+               $fields['testField'] = $mockFieldBuilder( "testField", SearchIndexField::INDEX_TYPE_TEXT );
+               return true;
+       }
+
+       public function testAugmentorSearch() {
+               $this->search->setNamespaces( [ 0, 1, 4 ] );
+               $resultSet = $this->search->searchText( 'smithee' );
+               // Not using mock since PHPUnit mocks do not work properly with references in params
+               $this->mergeMwGlobalArrayValue( 'wgHooks',
+                       [ 'SearchResultsAugment' => [ [ $this, 'addAugmentors' ] ] ] );
+               $this->search->augmentSearchResults( $resultSet );
+               for ( $result = $resultSet->next(); $result; $result = $resultSet->next() ) {
+                       $id = $result->getTitle()->getArticleID();
+                       $augmentData = "Result:$id:" . $result->getTitle()->getText();
+                       $augmentData2 = "Result2:$id:" . $result->getTitle()->getText();
+                       $this->assertEquals( [ 'testSet' => $augmentData, 'testRow' => $augmentData2 ],
+                               $result->getExtensionData() );
+               }
+       }
+
+       public function addAugmentors( &$setAugmentors, &$rowAugmentors ) {
+               $setAugmentor = $this->getMock( 'ResultSetAugmentor' );
+               $setAugmentor->expects( $this->once() )
+                       ->method( 'augmentAll' )
+                       ->willReturnCallback( function ( SearchResultSet $resultSet ) {
+                               $data = [];
+                               for ( $result = $resultSet->next(); $result; $result = $resultSet->next() ) {
+                                       $id = $result->getTitle()->getArticleID();
+                                       $data[$id] = "Result:$id:" . $result->getTitle()->getText();
+                               }
+                               $resultSet->rewind();
+                               return $data;
+                       } );
+               $setAugmentors['testSet'] = $setAugmentor;
+
+               $rowAugmentor = $this->getMock( 'ResultAugmentor' );
+               $rowAugmentor->expects( $this->exactly( 2 ) )
+                       ->method( 'augment' )
+                       ->willReturnCallback( function ( SearchResult $result ) {
+                               $id = $result->getTitle()->getArticleID();
+                               return "Result2:$id:" . $result->getTitle()->getText();
+                       } );
+               $rowAugmentors['testRow'] = $rowAugmentor;
+       }
 }
index 799a97b..34e5e44 100644 (file)
@@ -21,7 +21,7 @@ class PHPSessionHandlerTest extends MediaWikiTestCase {
                        }
                        return false;
                } );
-               $reset[] = new \ScopedCallback( 'restore_error_handler' );
+               $reset[] = new \Wikimedia\ScopedCallback( 'restore_error_handler' );
 
                $rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
                $rProp->setAccessible( true );
@@ -30,7 +30,7 @@ class PHPSessionHandlerTest extends MediaWikiTestCase {
                        $oldManager = $old->manager;
                        $oldStore = $old->store;
                        $oldLogger = $old->logger;
-                       $reset[] = new \ScopedCallback(
+                       $reset[] = new \Wikimedia\ScopedCallback(
                                [ PHPSessionHandler::class, 'install' ],
                                [ $oldManager, $oldStore, $oldLogger ]
                        );
@@ -49,7 +49,7 @@ class PHPSessionHandlerTest extends MediaWikiTestCase {
 
                $rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
                $rProp->setAccessible( true );
-               $reset = new \ScopedCallback( [ $rProp, 'setValue' ], [ $rProp->getValue() ] );
+               $reset = new \Wikimedia\ScopedCallback( [ $rProp, 'setValue' ], [ $rProp->getValue() ] );
                $rProp->setValue( $handler );
 
                $handler->setEnableFlags( 'enable' );
@@ -123,7 +123,7 @@ class PHPSessionHandlerTest extends MediaWikiTestCase {
                ] );
                PHPSessionHandler::install( $manager );
                $wrap = \TestingAccessWrapper::newFromObject( $rProp->getValue() );
-               $reset[] = new \ScopedCallback(
+               $reset[] = new \Wikimedia\ScopedCallback(
                        [ $wrap, 'setEnableFlags' ],
                        [ $wrap->enable ? $wrap->warn ? 'warn' : 'enable' : 'disable' ]
                );
@@ -326,7 +326,7 @@ class PHPSessionHandlerTest extends MediaWikiTestCase {
                \TestingAccessWrapper::newFromObject( $handler )->setEnableFlags( 'disable' );
                $oldValue = $rProp->getValue();
                $rProp->setValue( $handler );
-               $reset = new \ScopedCallback( [ $rProp, 'setValue' ], [ $oldValue ] );
+               $reset = new \Wikimedia\ScopedCallback( [ $rProp, 'setValue' ], [ $oldValue ] );
 
                call_user_func_array( [ $handler, $method ], $args );
        }
index a3d5de7..8a0adba 100644 (file)
@@ -464,7 +464,7 @@ class SessionBackendTest extends MediaWikiTestCase {
                // Save happens when delay is consumed
                $this->onSessionMetadataCalled = false;
                $priv->metaDirty = true;
-               \ScopedCallback::consume( $delay );
+               \Wikimedia\ScopedCallback::consume( $delay );
                $this->assertTrue( $this->onSessionMetadataCalled );
 
                // Test multiple delays
@@ -475,11 +475,11 @@ class SessionBackendTest extends MediaWikiTestCase {
                $priv->metaDirty = true;
                $priv->autosave();
                $this->assertFalse( $this->onSessionMetadataCalled );
-               \ScopedCallback::consume( $delay3 );
+               \Wikimedia\ScopedCallback::consume( $delay3 );
                $this->assertFalse( $this->onSessionMetadataCalled );
-               \ScopedCallback::consume( $delay1 );
+               \Wikimedia\ScopedCallback::consume( $delay1 );
                $this->assertFalse( $this->onSessionMetadataCalled );
-               \ScopedCallback::consume( $delay2 );
+               \Wikimedia\ScopedCallback::consume( $delay2 );
                $this->assertTrue( $this->onSessionMetadataCalled );
        }
 
@@ -822,7 +822,7 @@ class SessionBackendTest extends MediaWikiTestCase {
                        $rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
                        $rProp->setAccessible( true );
                        $handler = \TestingAccessWrapper::newFromObject( $rProp->getValue() );
-                       $resetHandler = new \ScopedCallback( function () use ( $handler ) {
+                       $resetHandler = new \Wikimedia\ScopedCallback( function () use ( $handler ) {
                                session_write_close();
                                $handler->enable = false;
                        } );
@@ -862,7 +862,7 @@ class SessionBackendTest extends MediaWikiTestCase {
                        $rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
                        $rProp->setAccessible( true );
                        $handler = \TestingAccessWrapper::newFromObject( $rProp->getValue() );
-                       $resetHandler = new \ScopedCallback( function () use ( $handler ) {
+                       $resetHandler = new \Wikimedia\ScopedCallback( function () use ( $handler ) {
                                session_write_close();
                                $handler->enable = false;
                        } );
@@ -898,7 +898,7 @@ class SessionBackendTest extends MediaWikiTestCase {
                        $rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
                        $rProp->setAccessible( true );
                        $handler = \TestingAccessWrapper::newFromObject( $rProp->getValue() );
-                       $resetHandler = new \ScopedCallback( function () use ( $handler ) {
+                       $resetHandler = new \Wikimedia\ScopedCallback( function () use ( $handler ) {
                                session_write_close();
                                $handler->enable = false;
                        } );
index 1ebb07c..6273f47 100644 (file)
@@ -62,7 +62,7 @@ class SessionManagerTest extends MediaWikiTestCase {
                $rProp->setAccessible( true );
                $handler = \TestingAccessWrapper::newFromObject( $rProp->getValue() );
                $oldEnable = $handler->enable;
-               $reset[] = new \ScopedCallback( function () use ( $handler, $oldEnable ) {
+               $reset[] = new \Wikimedia\ScopedCallback( function () use ( $handler, $oldEnable ) {
                        if ( $handler->enable ) {
                                session_write_close();
                        }
index f1dc9e9..f00de55 100644 (file)
@@ -12,7 +12,7 @@ class TestUtils {
        /**
         * Override the singleton for unit testing
         * @param SessionManager|null $manager
-        * @return \\ScopedCallback|null
+        * @return \\Wikimedia\ScopedCallback|null
         */
        public static function setSessionManagerSingleton( SessionManager $manager = null ) {
                session_write_close();
@@ -45,7 +45,7 @@ class TestUtils {
                        PHPSessionHandler::install( $manager );
                }
 
-               return new \ScopedCallback( function () use ( &$reset, $oldInstance ) {
+               return new \Wikimedia\ScopedCallback( function () use ( &$reset, $oldInstance ) {
                        foreach ( $reset as &$arr ) {
                                $arr[0]->setValue( $arr[1] );
                        }
index 3d407fb..145ffb3 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+use Wikimedia\ScopedCallback;
+
 /**
  * Factory for handling the special page list and generating SpecialPage objects.
  *
index 3310d02..074045d 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-class SpecialBooksourcesTest extends MediaWikiTestCase {
+class SpecialBooksourcesTest extends SpecialPageTestBase {
        public static function provideISBNs() {
                return [
                        [ '978-0-300-14424-6', true ],
@@ -33,4 +33,19 @@ class SpecialBooksourcesTest extends MediaWikiTestCase {
        public function testIsValidISBN( $isbn, $isValid ) {
                $this->assertSame( $isValid, SpecialBookSources::isValidISBN( $isbn ) );
        }
+
+       protected function newSpecialPage() {
+               return new SpecialBookSources();
+       }
+
+       /**
+        * @covers SpecialBookSources::execute
+        */
+       public function testExecute() {
+               list( $html, ) = $this->executeSpecialPage( 'Invalid', null, 'qqx' );
+               $this->assertContains( '(booksources-invalid-isbn)', $html );
+               list( $html, ) = $this->executeSpecialPage( '0-7475-3269-9', null, 'qqx' );
+               $this->assertNotContains( '(booksources-invalid-isbn)', $html );
+               $this->assertContains( '(booksources-text)', $html );
+       }
 }
index 3debe6e..a44926b 100644 (file)
@@ -397,6 +397,46 @@ class UploadBaseTest extends MediaWikiTestCase {
                // @codingStandardsIgnoreEnd
        }
 
+       /**
+        * @dataProvider provideDetectScriptInSvg
+        */
+       public function testDetectScriptInSvg( $svg, $expected, $message ) {
+               // This only checks some weird cases, most tests are in testCheckSvgScriptCallback() above
+               $result = $this->upload->detectScriptInSvg( $svg, false );
+               $this->assertSame( $expected, $result, $message );
+       }
+
+       public static function provideDetectScriptInSvg() {
+               global $IP;
+               return [
+                       [
+                               "$IP/tests/phpunit/data/upload/buggynamespace-original.svg",
+                               false,
+                               'SVG with a weird but valid namespace definition created by Adobe Illustrator'
+                       ],
+                       [
+                               "$IP/tests/phpunit/data/upload/buggynamespace-okay.svg",
+                               false,
+                               'SVG with a namespace definition created by Adobe Illustrator and mangled by Inkscape'
+                       ],
+                       [
+                               "$IP/tests/phpunit/data/upload/buggynamespace-okay2.svg",
+                               false,
+                               'SVG with a namespace definition created by Adobe Illustrator and mangled by Inkscape (twice)'
+                       ],
+                       [
+                               "$IP/tests/phpunit/data/upload/buggynamespace-bad.svg",
+                               [ 'uploadscriptednamespace', 'i' ],
+                               'SVG with a namespace definition using an undefined entity'
+                       ],
+                       [
+                               "$IP/tests/phpunit/data/upload/buggynamespace-evilhtml.svg",
+                               [ 'uploadscriptednamespace', 'http://www.w3.org/1999/xhtml' ],
+                               'SVG with an html namespace encoded as an entity'
+                       ],
+               ];
+       }
+
        /**
         * @dataProvider provideCheckXMLEncodingMissmatch
         */
@@ -442,4 +482,11 @@ class UploadTestHandler extends UploadBase {
                );
                return [ $check->wellFormed, $check->filterMatch ];
        }
+
+       /**
+        * Same as parent function, but override visibility to 'public'.
+        */
+       public function detectScriptInSvg( $filename, $partial ) {
+               return parent::detectScriptInSvg( $filename, $partial );
+       }
 }
index d637704..81c84e8 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 use MediaWiki\Session\SessionManager;
+use Wikimedia\ScopedCallback;
 
 /**
  * @covers BotPassword
@@ -244,8 +245,9 @@ class BotPasswordTest extends MediaWikiTestCase {
                return [
                        [ 'user', 'pass', false ],
                        [ 'user', 'abc@def', false ],
+                       [ 'legacy@user', 'pass', false ],
                        [ 'user@bot', '12345678901234567890123456789012',
-                               [ 'user@bot', '12345678901234567890123456789012', false ] ],
+                               [ 'user@bot', '12345678901234567890123456789012', true ] ],
                        [ 'user', 'bot@12345678901234567890123456789012',
                                [ 'user@bot', '12345678901234567890123456789012', true ] ],
                        [ 'user', 'bot@12345678901234567890123456789012345',
index 985554b..34548c0 100644 (file)
@@ -269,7 +269,14 @@ class UserTest extends MediaWikiTestCase {
                // let the user have a few (3) edits
                $page = WikiPage::factory( Title::newFromText( 'Help:UserTest_EditCount' ) );
                for ( $i = 0; $i < 3; $i++ ) {
-                       $page->doEdit( (string)$i, 'test', 0, false, $user );
+
+                       $page->doEditContent(
+                               ContentHandler::makeContent( (string)$i, $page->getTitle() ),
+                               'test',
+                               0,
+                               false,
+                               $user
+                       );
                }
 
                $this->assertEquals(
index 560b6d2..ce6894e 100644 (file)
@@ -129,7 +129,7 @@ class BatchRowUpdateTest extends MediaWikiTestCase {
                $db = $this->mockDb();
                $db->expects( $this->once() )
                        ->method( 'select' )
-                       // only testing second parameter of DatabaseBase::select
+                       // only testing second parameter of Database::select
                        ->with( 'some_table', $columns )
                        ->will( $this->returnValue( new ArrayIterator( [] ) ) );
 
@@ -164,7 +164,7 @@ class BatchRowUpdateTest extends MediaWikiTestCase {
 
        /**
         * Slightly hackish to use reflection, but asserting different parameters
-        * to consecutive calls of DatabaseBase::select in phpunit is error prone
+        * to consecutive calls of Database::select in phpunit is error prone
         *
         * @dataProvider provider_readerSelectConditions
         */
@@ -214,7 +214,7 @@ class BatchRowUpdateTest extends MediaWikiTestCase {
        protected function consecutivelyReturnFromSelect( array $results ) {
                $retvals = [];
                foreach ( $results as $rows ) {
-                       // The DatabaseBase::select method returns iterators, so we do too.
+                       // The Database::select method returns iterators, so we do too.
                        $retvals[] = $this->returnValue( new ArrayIterator( $rows ) );
                }
 
@@ -235,8 +235,7 @@ class BatchRowUpdateTest extends MediaWikiTestCase {
        }
 
        protected function mockDb() {
-               // Cant mock from DatabaseType or DatabaseBase, they dont
-               // have the full gamut of methods
+               // @TODO: mock from Database
                // FIXME: the constructor normally sets mAtomicLevels and mSrvCache
                $databaseMysql = $this->getMockBuilder( 'DatabaseMysql' )
                        ->disableOriginalConstructor()
diff --git a/tests/phpunit/includes/utils/IPTest.php b/tests/phpunit/includes/utils/IPTest.php
deleted file mode 100644 (file)
index 5e0626b..0000000
+++ /dev/null
@@ -1,670 +0,0 @@
-<?php
-/**
- * Tests for IP validity functions.
- *
- * Ported from /t/inc/IP.t by avar.
- *
- * @group IP
- * @todo Test methods in this call should be split into a method and a
- * dataprovider.
- */
-
-class IPTest extends PHPUnit_Framework_TestCase {
-       /**
-        * @covers IP::isIPAddress
-        * @dataProvider provideInvalidIPs
-        */
-       public function isNotIPAddress( $val, $desc ) {
-               $this->assertFalse( IP::isIPAddress( $val ), $desc );
-       }
-
-       /**
-        * Provide a list of things that aren't IP addresses
-        */
-       public function provideInvalidIPs() {
-               return [
-                       [ false, 'Boolean false is not an IP' ],
-                       [ true, 'Boolean true is not an IP' ],
-                       [ '', 'Empty string is not an IP' ],
-                       [ 'abc', 'Garbage IP string' ],
-                       [ ':', 'Single ":" is not an IP' ],
-                       [ '2001:0DB8::A:1::1', 'IPv6 with a double :: occurrence' ],
-                       [ '2001:0DB8::A:1::', 'IPv6 with a double :: occurrence, last at end' ],
-                       [ '::2001:0DB8::5:1', 'IPv6 with a double :: occurrence, firt at beginning' ],
-                       [ '124.24.52', 'IPv4 not enough quads' ],
-                       [ '24.324.52.13', 'IPv4 out of range' ],
-                       [ '.24.52.13', 'IPv4 starts with period' ],
-                       [ 'fc:100:300', 'IPv6 with only 3 words' ],
-               ];
-       }
-
-       /**
-        * @covers IP::isIPAddress
-        */
-       public function testisIPAddress() {
-               $this->assertTrue( IP::isIPAddress( '::' ), 'RFC 4291 IPv6 Unspecified Address' );
-               $this->assertTrue( IP::isIPAddress( '::1' ), 'RFC 4291 IPv6 Loopback Address' );
-               $this->assertTrue( IP::isIPAddress( '74.24.52.13/20', 'IPv4 range' ) );
-               $this->assertTrue( IP::isIPAddress( 'fc:100:a:d:1:e:ac:0/24' ), 'IPv6 range' );
-               $this->assertTrue( IP::isIPAddress( 'fc::100:a:d:1:e:ac/96' ), 'IPv6 range with "::"' );
-
-               $validIPs = [ 'fc:100::', 'fc:100:a:d:1:e:ac::', 'fc::100', '::fc:100:a:d:1:e:ac',
-                       '::fc', 'fc::100:a:d:1:e:ac', 'fc:100:a:d:1:e:ac:0', '124.24.52.13', '1.24.52.13' ];
-               foreach ( $validIPs as $ip ) {
-                       $this->assertTrue( IP::isIPAddress( $ip ), "$ip is a valid IP address" );
-               }
-       }
-
-       /**
-        * @covers IP::isIPv6
-        */
-       public function testisIPv6() {
-               $this->assertFalse( IP::isIPv6( ':fc:100::' ), 'IPv6 starting with lone ":"' );
-               $this->assertFalse( IP::isIPv6( 'fc:100:::' ), 'IPv6 ending with a ":::"' );
-               $this->assertFalse( IP::isIPv6( 'fc:300' ), 'IPv6 with only 2 words' );
-               $this->assertFalse( IP::isIPv6( 'fc:100:300' ), 'IPv6 with only 3 words' );
-
-               $this->assertTrue( IP::isIPv6( 'fc:100::' ) );
-               $this->assertTrue( IP::isIPv6( 'fc:100:a::' ) );
-               $this->assertTrue( IP::isIPv6( 'fc:100:a:d::' ) );
-               $this->assertTrue( IP::isIPv6( 'fc:100:a:d:1::' ) );
-               $this->assertTrue( IP::isIPv6( 'fc:100:a:d:1:e::' ) );
-               $this->assertTrue( IP::isIPv6( 'fc:100:a:d:1:e:ac::' ) );
-
-               $this->assertFalse( IP::isIPv6( 'fc:100:a:d:1:e:ac:0::' ), 'IPv6 with 8 words ending with "::"' );
-               $this->assertFalse(
-                       IP::isIPv6( 'fc:100:a:d:1:e:ac:0:1::' ),
-                       'IPv6 with 9 words ending with "::"'
-               );
-
-               $this->assertFalse( IP::isIPv6( ':::' ) );
-               $this->assertFalse( IP::isIPv6( '::0:' ), 'IPv6 ending in a lone ":"' );
-
-               $this->assertTrue( IP::isIPv6( '::' ), 'IPv6 zero address' );
-               $this->assertTrue( IP::isIPv6( '::0' ) );
-               $this->assertTrue( IP::isIPv6( '::fc' ) );
-               $this->assertTrue( IP::isIPv6( '::fc:100' ) );
-               $this->assertTrue( IP::isIPv6( '::fc:100:a' ) );
-               $this->assertTrue( IP::isIPv6( '::fc:100:a:d' ) );
-               $this->assertTrue( IP::isIPv6( '::fc:100:a:d:1' ) );
-               $this->assertTrue( IP::isIPv6( '::fc:100:a:d:1:e' ) );
-               $this->assertTrue( IP::isIPv6( '::fc:100:a:d:1:e:ac' ) );
-
-               $this->assertFalse( IP::isIPv6( '::fc:100:a:d:1:e:ac:0' ), 'IPv6 with "::" and 8 words' );
-               $this->assertFalse( IP::isIPv6( '::fc:100:a:d:1:e:ac:0:1' ), 'IPv6 with 9 words' );
-
-               $this->assertFalse( IP::isIPv6( ':fc::100' ), 'IPv6 starting with lone ":"' );
-               $this->assertFalse( IP::isIPv6( 'fc::100:' ), 'IPv6 ending with lone ":"' );
-               $this->assertFalse( IP::isIPv6( 'fc:::100' ), 'IPv6 with ":::" in the middle' );
-
-               $this->assertTrue( IP::isIPv6( 'fc::100' ), 'IPv6 with "::" and 2 words' );
-               $this->assertTrue( IP::isIPv6( 'fc::100:a' ), 'IPv6 with "::" and 3 words' );
-               $this->assertTrue( IP::isIPv6( 'fc::100:a:d', 'IPv6 with "::" and 4 words' ) );
-               $this->assertTrue( IP::isIPv6( 'fc::100:a:d:1' ), 'IPv6 with "::" and 5 words' );
-               $this->assertTrue( IP::isIPv6( 'fc::100:a:d:1:e' ), 'IPv6 with "::" and 6 words' );
-               $this->assertTrue( IP::isIPv6( 'fc::100:a:d:1:e:ac' ), 'IPv6 with "::" and 7 words' );
-               $this->assertTrue( IP::isIPv6( '2001::df' ), 'IPv6 with "::" and 2 words' );
-               $this->assertTrue( IP::isIPv6( '2001:5c0:1400:a::df' ), 'IPv6 with "::" and 5 words' );
-               $this->assertTrue( IP::isIPv6( '2001:5c0:1400:a::df:2' ), 'IPv6 with "::" and 6 words' );
-
-               $this->assertFalse( IP::isIPv6( 'fc::100:a:d:1:e:ac:0' ), 'IPv6 with "::" and 8 words' );
-               $this->assertFalse( IP::isIPv6( 'fc::100:a:d:1:e:ac:0:1' ), 'IPv6 with 9 words' );
-
-               $this->assertTrue( IP::isIPv6( 'fc:100:a:d:1:e:ac:0' ) );
-       }
-
-       /**
-        * @covers IP::isIPv4
-        * @dataProvider provideInvalidIPv4Addresses
-        */
-       public function testisNotIPv4( $bogusIP, $desc ) {
-               $this->assertFalse( IP::isIPv4( $bogusIP ), $desc );
-       }
-
-       public function provideInvalidIPv4Addresses() {
-               return [
-                       [ false, 'Boolean false is not an IP' ],
-                       [ true, 'Boolean true is not an IP' ],
-                       [ '', 'Empty string is not an IP' ],
-                       [ 'abc', 'Letters are not an IP' ],
-                       [ ':', 'A colon is not an IP' ],
-                       [ '124.24.52', 'IPv4 not enough quads' ],
-                       [ '24.324.52.13', 'IPv4 out of range' ],
-                       [ '.24.52.13', 'IPv4 starts with period' ],
-               ];
-       }
-
-       /**
-        * @covers IP::isIPv4
-        * @dataProvider provideValidIPv4Address
-        */
-       public function testIsIPv4( $ip, $desc ) {
-               $this->assertTrue( IP::isIPv4( $ip ), $desc );
-       }
-
-       /**
-        * Provide some IPv4 addresses and ranges
-        */
-       public function provideValidIPv4Address() {
-               return [
-                       [ '124.24.52.13', 'Valid IPv4 address' ],
-                       [ '1.24.52.13', 'Another valid IPv4 address' ],
-                       [ '74.24.52.13/20', 'An IPv4 range' ],
-               ];
-       }
-
-       /**
-        * @covers IP::isValid
-        */
-       public function testValidIPs() {
-               foreach ( range( 0, 255 ) as $i ) {
-                       $a = sprintf( "%03d", $i );
-                       $b = sprintf( "%02d", $i );
-                       $c = sprintf( "%01d", $i );
-                       foreach ( array_unique( [ $a, $b, $c ] ) as $f ) {
-                               $ip = "$f.$f.$f.$f";
-                               $this->assertTrue( IP::isValid( $ip ), "$ip is a valid IPv4 address" );
-                       }
-               }
-               foreach ( range( 0x0, 0xFFFF, 0xF ) as $i ) {
-                       $a = sprintf( "%04x", $i );
-                       $b = sprintf( "%03x", $i );
-                       $c = sprintf( "%02x", $i );
-                       foreach ( array_unique( [ $a, $b, $c ] ) as $f ) {
-                               $ip = "$f:$f:$f:$f:$f:$f:$f:$f";
-                               $this->assertTrue( IP::isValid( $ip ), "$ip is a valid IPv6 address" );
-                       }
-               }
-               // test with some abbreviations
-               $this->assertFalse( IP::isValid( ':fc:100::' ), 'IPv6 starting with lone ":"' );
-               $this->assertFalse( IP::isValid( 'fc:100:::' ), 'IPv6 ending with a ":::"' );
-               $this->assertFalse( IP::isValid( 'fc:300' ), 'IPv6 with only 2 words' );
-               $this->assertFalse( IP::isValid( 'fc:100:300' ), 'IPv6 with only 3 words' );
-
-               $this->assertTrue( IP::isValid( 'fc:100::' ) );
-               $this->assertTrue( IP::isValid( 'fc:100:a:d:1:e::' ) );
-               $this->assertTrue( IP::isValid( 'fc:100:a:d:1:e:ac::' ) );
-
-               $this->assertTrue( IP::isValid( 'fc::100' ), 'IPv6 with "::" and 2 words' );
-               $this->assertTrue( IP::isValid( 'fc::100:a' ), 'IPv6 with "::" and 3 words' );
-               $this->assertTrue( IP::isValid( '2001::df' ), 'IPv6 with "::" and 2 words' );
-               $this->assertTrue( IP::isValid( '2001:5c0:1400:a::df' ), 'IPv6 with "::" and 5 words' );
-               $this->assertTrue( IP::isValid( '2001:5c0:1400:a::df:2' ), 'IPv6 with "::" and 6 words' );
-               $this->assertTrue( IP::isValid( 'fc::100:a:d:1' ), 'IPv6 with "::" and 5 words' );
-               $this->assertTrue( IP::isValid( 'fc::100:a:d:1:e:ac' ), 'IPv6 with "::" and 7 words' );
-
-               $this->assertFalse(
-                       IP::isValid( 'fc:100:a:d:1:e:ac:0::' ),
-                       'IPv6 with 8 words ending with "::"'
-               );
-               $this->assertFalse(
-                       IP::isValid( 'fc:100:a:d:1:e:ac:0:1::' ),
-                       'IPv6 with 9 words ending with "::"'
-               );
-       }
-
-       /**
-        * @covers IP::isValid
-        */
-       public function testInvalidIPs() {
-               // Out of range...
-               foreach ( range( 256, 999 ) as $i ) {
-                       $a = sprintf( "%03d", $i );
-                       $b = sprintf( "%02d", $i );
-                       $c = sprintf( "%01d", $i );
-                       foreach ( array_unique( [ $a, $b, $c ] ) as $f ) {
-                               $ip = "$f.$f.$f.$f";
-                               $this->assertFalse( IP::isValid( $ip ), "$ip is not a valid IPv4 address" );
-                       }
-               }
-               foreach ( range( 'g', 'z' ) as $i ) {
-                       $a = sprintf( "%04s", $i );
-                       $b = sprintf( "%03s", $i );
-                       $c = sprintf( "%02s", $i );
-                       foreach ( array_unique( [ $a, $b, $c ] ) as $f ) {
-                               $ip = "$f:$f:$f:$f:$f:$f:$f:$f";
-                               $this->assertFalse( IP::isValid( $ip ), "$ip is not a valid IPv6 address" );
-                       }
-               }
-               // Have CIDR
-               $ipCIDRs = [
-                       '212.35.31.121/32',
-                       '212.35.31.121/18',
-                       '212.35.31.121/24',
-                       '::ff:d:321:5/96',
-                       'ff::d3:321:5/116',
-                       'c:ff:12:1:ea:d:321:5/120',
-               ];
-               foreach ( $ipCIDRs as $i ) {
-                       $this->assertFalse( IP::isValid( $i ),
-                               "$i is an invalid IP address because it is a block" );
-               }
-               // Incomplete/garbage
-               $invalid = [
-                       'www.xn--var-xla.net',
-                       '216.17.184.G',
-                       '216.17.184.1.',
-                       '216.17.184',
-                       '216.17.184.',
-                       '256.17.184.1'
-               ];
-               foreach ( $invalid as $i ) {
-                       $this->assertFalse( IP::isValid( $i ), "$i is an invalid IP address" );
-               }
-       }
-
-       /**
-        * Provide some valid IP blocks
-        */
-       public function provideValidBlocks() {
-               return [
-                       [ '116.17.184.5/32' ],
-                       [ '0.17.184.5/30' ],
-                       [ '16.17.184.1/24' ],
-                       [ '30.242.52.14/1' ],
-                       [ '10.232.52.13/8' ],
-                       [ '30.242.52.14/0' ],
-                       [ '::e:f:2001/96' ],
-                       [ '::c:f:2001/128' ],
-                       [ '::10:f:2001/70' ],
-                       [ '::fe:f:2001/1' ],
-                       [ '::6d:f:2001/8' ],
-                       [ '::fe:f:2001/0' ],
-               ];
-       }
-
-       /**
-        * @covers IP::isValidBlock
-        * @dataProvider provideValidBlocks
-        */
-       public function testValidBlocks( $block ) {
-               $this->assertTrue( IP::isValidBlock( $block ), "$block is a valid IP block" );
-       }
-
-       /**
-        * @covers IP::isValidBlock
-        * @dataProvider provideInvalidBlocks
-        */
-       public function testInvalidBlocks( $invalid ) {
-               $this->assertFalse( IP::isValidBlock( $invalid ), "$invalid is not a valid IP block" );
-       }
-
-       public function provideInvalidBlocks() {
-               return [
-                       [ '116.17.184.5/33' ],
-                       [ '0.17.184.5/130' ],
-                       [ '16.17.184.1/-1' ],
-                       [ '10.232.52.13/*' ],
-                       [ '7.232.52.13/ab' ],
-                       [ '11.232.52.13/' ],
-                       [ '::e:f:2001/129' ],
-                       [ '::c:f:2001/228' ],
-                       [ '::10:f:2001/-1' ],
-                       [ '::6d:f:2001/*' ],
-                       [ '::86:f:2001/ab' ],
-                       [ '::23:f:2001/' ],
-               ];
-       }
-
-       /**
-        * @covers IP::sanitizeIP
-        * @dataProvider provideSanitizeIP
-        */
-       public function testSanitizeIP( $expected, $input ) {
-               $result = IP::sanitizeIP( $input );
-               $this->assertEquals( $expected, $result );
-       }
-
-       /**
-        * Provider for IP::testSanitizeIP()
-        */
-       public static function provideSanitizeIP() {
-               return [
-                       [ '0.0.0.0', '0.0.0.0' ],
-                       [ '0.0.0.0', '00.00.00.00' ],
-                       [ '0.0.0.0', '000.000.000.000' ],
-                       [ '141.0.11.253', '141.000.011.253' ],
-                       [ '1.2.4.5', '1.2.4.5' ],
-                       [ '1.2.4.5', '01.02.04.05' ],
-                       [ '1.2.4.5', '001.002.004.005' ],
-                       [ '10.0.0.1', '010.0.000.1' ],
-                       [ '80.72.250.4', '080.072.250.04' ],
-                       [ 'Foo.1000.00', 'Foo.1000.00' ],
-                       [ 'Bar.01', 'Bar.01' ],
-                       [ 'Bar.010', 'Bar.010' ],
-                       [ null, '' ],
-                       [ null, ' ' ]
-               ];
-       }
-
-       /**
-        * @covers IP::toHex
-        * @dataProvider provideToHex
-        */
-       public function testToHex( $expected, $input ) {
-               $result = IP::toHex( $input );
-               $this->assertTrue( $result === false || is_string( $result ) );
-               $this->assertEquals( $expected, $result );
-       }
-
-       /**
-        * Provider for IP::testToHex()
-        */
-       public static function provideToHex() {
-               return [
-                       [ '00000001', '0.0.0.1' ],
-                       [ '01020304', '1.2.3.4' ],
-                       [ '7F000001', '127.0.0.1' ],
-                       [ '80000000', '128.0.0.0' ],
-                       [ 'DEADCAFE', '222.173.202.254' ],
-                       [ 'FFFFFFFF', '255.255.255.255' ],
-                       [ '8D000BFD', '141.000.11.253' ],
-                       [ false, 'IN.VA.LI.D' ],
-                       [ 'v6-00000000000000000000000000000001', '::1' ],
-                       [ 'v6-20010DB885A3000000008A2E03707334', '2001:0db8:85a3:0000:0000:8a2e:0370:7334' ],
-                       [ 'v6-20010DB885A3000000008A2E03707334', '2001:db8:85a3::8a2e:0370:7334' ],
-                       [ false, 'IN:VA::LI:D' ],
-                       [ false, ':::1' ]
-               ];
-       }
-
-       /**
-        * @covers IP::isPublic
-        * @dataProvider provideIsPublic
-        */
-       public function testIsPublic( $expected, $input ) {
-               $result = IP::isPublic( $input );
-               $this->assertEquals( $expected, $result );
-       }
-
-       /**
-        * Provider for IP::testIsPublic()
-        */
-       public static function provideIsPublic() {
-               return [
-                       [ false, 'fc00::3' ], # RFC 4193 (local)
-                       [ false, 'fc00::ff' ], # RFC 4193 (local)
-                       [ false, '127.1.2.3' ], # loopback
-                       [ false, '::1' ], # loopback
-                       [ false, 'fe80::1' ], # link-local
-                       [ false, '169.254.1.1' ], # link-local
-                       [ false, '10.0.0.1' ], # RFC 1918 (private)
-                       [ false, '172.16.0.1' ], # RFC 1918 (private)
-                       [ false, '192.168.0.1' ], # RFC 1918 (private)
-                       [ true, '2001:5c0:1000:a::133' ], # public
-                       [ true, 'fc::3' ], # public
-                       [ true, '00FC::' ] # public
-               ];
-       }
-
-       // Private wrapper used to test CIDR Parsing.
-       private function assertFalseCIDR( $CIDR, $msg = '' ) {
-               $ff = [ false, false ];
-               $this->assertEquals( $ff, IP::parseCIDR( $CIDR ), $msg );
-       }
-
-       // Private wrapper to test network shifting using only dot notation
-       private function assertNet( $expected, $CIDR ) {
-               $parse = IP::parseCIDR( $CIDR );
-               $this->assertEquals( $expected, long2ip( $parse[0] ), "network shifting $CIDR" );
-       }
-
-       /**
-        * @covers IP::hexToQuad
-        * @dataProvider provideIPsAndHexes
-        */
-       public function testHexToQuad( $ip, $hex ) {
-               $this->assertEquals( $ip, IP::hexToQuad( $hex ) );
-       }
-
-       /**
-        * Provide some IP addresses and their equivalent hex representations
-        */
-       public function provideIPsandHexes() {
-               return [
-                       [ '0.0.0.1', '00000001' ],
-                       [ '255.0.0.0', 'FF000000' ],
-                       [ '255.255.255.255', 'FFFFFFFF' ],
-                       [ '10.188.222.255', '0ABCDEFF' ],
-                       // hex not left-padded...
-                       [ '0.0.0.0', '0' ],
-                       [ '0.0.0.1', '1' ],
-                       [ '0.0.0.255', 'FF' ],
-                       [ '0.0.255.0', 'FF00' ],
-               ];
-       }
-
-       /**
-        * @covers IP::hexToOctet
-        * @dataProvider provideOctetsAndHexes
-        */
-       public function testHexToOctet( $octet, $hex ) {
-               $this->assertEquals( $octet, IP::hexToOctet( $hex ) );
-       }
-
-       /**
-        * Provide some hex and octet representations of the same IPs
-        */
-       public function provideOctetsAndHexes() {
-               return [
-                       [ '0:0:0:0:0:0:0:1', '00000000000000000000000000000001' ],
-                       [ '0:0:0:0:0:0:FF:3', '00000000000000000000000000FF0003' ],
-                       [ '0:0:0:0:0:0:FF00:6', '000000000000000000000000FF000006' ],
-                       [ '0:0:0:0:0:0:FCCF:FAFF', '000000000000000000000000FCCFFAFF' ],
-                       [ 'FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF', 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' ],
-                       // hex not left-padded...
-                       [ '0:0:0:0:0:0:0:0', '0' ],
-                       [ '0:0:0:0:0:0:0:1', '1' ],
-                       [ '0:0:0:0:0:0:0:FF', 'FF' ],
-                       [ '0:0:0:0:0:0:0:FFD0', 'FFD0' ],
-                       [ '0:0:0:0:0:0:FA00:0', 'FA000000' ],
-                       [ '0:0:0:0:0:0:FCCF:FAFF', 'FCCFFAFF' ],
-               ];
-       }
-
-       /**
-        * IP::parseCIDR() returns an array containing a signed IP address
-        * representing the network mask and the bit mask.
-        * @covers IP::parseCIDR
-        */
-       public function testCIDRParsing() {
-               $this->assertFalseCIDR( '192.0.2.0', "missing mask" );
-               $this->assertFalseCIDR( '192.0.2.0/', "missing bitmask" );
-
-               // Verify if statement
-               $this->assertFalseCIDR( '256.0.0.0/32', "invalid net" );
-               $this->assertFalseCIDR( '192.0.2.0/AA', "mask not numeric" );
-               $this->assertFalseCIDR( '192.0.2.0/-1', "mask < 0" );
-               $this->assertFalseCIDR( '192.0.2.0/33', "mask > 32" );
-
-               // Check internal logic
-               # 0 mask always result in array(0,0)
-               $this->assertEquals( [ 0, 0 ], IP::parseCIDR( '192.0.0.2/0' ) );
-               $this->assertEquals( [ 0, 0 ], IP::parseCIDR( '0.0.0.0/0' ) );
-               $this->assertEquals( [ 0, 0 ], IP::parseCIDR( '255.255.255.255/0' ) );
-
-               // @todo FIXME: Add more tests.
-
-               # This part test network shifting
-               $this->assertNet( '192.0.0.0', '192.0.0.2/24' );
-               $this->assertNet( '192.168.5.0', '192.168.5.13/24' );
-               $this->assertNet( '10.0.0.160', '10.0.0.161/28' );
-               $this->assertNet( '10.0.0.0', '10.0.0.3/28' );
-               $this->assertNet( '10.0.0.0', '10.0.0.3/30' );
-               $this->assertNet( '10.0.0.4', '10.0.0.4/30' );
-               $this->assertNet( '172.17.32.0', '172.17.35.48/21' );
-               $this->assertNet( '10.128.0.0', '10.135.0.0/9' );
-               $this->assertNet( '134.0.0.0', '134.0.5.1/8' );
-       }
-
-       /**
-        * @covers IP::canonicalize
-        */
-       public function testIPCanonicalizeOnValidIp() {
-               $this->assertEquals( '192.0.2.152', IP::canonicalize( '192.0.2.152' ),
-                       'Canonicalization of a valid IP returns it unchanged' );
-       }
-
-       /**
-        * @covers IP::canonicalize
-        */
-       public function testIPCanonicalizeMappedAddress() {
-               $this->assertEquals(
-                       '192.0.2.152',
-                       IP::canonicalize( '::ffff:192.0.2.152' )
-               );
-               $this->assertEquals(
-                       '192.0.2.152',
-                       IP::canonicalize( '::192.0.2.152' )
-               );
-       }
-
-       /**
-        * Issues there are most probably from IP::toHex() or IP::parseRange()
-        * @covers IP::isInRange
-        * @dataProvider provideIPsAndRanges
-        */
-       public function testIPIsInRange( $expected, $addr, $range, $message = '' ) {
-               $this->assertEquals(
-                       $expected,
-                       IP::isInRange( $addr, $range ),
-                       $message
-               );
-       }
-
-       /** Provider for testIPIsInRange() */
-       public static function provideIPsAndRanges() {
-               # Format: (expected boolean, address, range, optional message)
-               return [
-                       # IPv4
-                       [ true, '192.0.2.0', '192.0.2.0/24', 'Network address' ],
-                       [ true, '192.0.2.77', '192.0.2.0/24', 'Simple address' ],
-                       [ true, '192.0.2.255', '192.0.2.0/24', 'Broadcast address' ],
-
-                       [ false, '0.0.0.0', '192.0.2.0/24' ],
-                       [ false, '255.255.255', '192.0.2.0/24' ],
-
-                       # IPv6
-                       [ false, '::1', '2001:DB8::/32' ],
-                       [ false, '::', '2001:DB8::/32' ],
-                       [ false, 'FE80::1', '2001:DB8::/32' ],
-
-                       [ true, '2001:DB8::', '2001:DB8::/32' ],
-                       [ true, '2001:0DB8::', '2001:DB8::/32' ],
-                       [ true, '2001:DB8::1', '2001:DB8::/32' ],
-                       [ true, '2001:0DB8::1', '2001:DB8::/32' ],
-                       [ true, '2001:0DB8:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF',
-                               '2001:DB8::/32' ],
-
-                       [ false, '2001:0DB8:F::', '2001:DB8::/96' ],
-               ];
-       }
-
-       /**
-        * Test for IP::splitHostAndPort().
-        * @dataProvider provideSplitHostAndPort
-        */
-       public function testSplitHostAndPort( $expected, $input, $description ) {
-               $this->assertEquals( $expected, IP::splitHostAndPort( $input ), $description );
-       }
-
-       /**
-        * Provider for IP::splitHostAndPort()
-        */
-       public static function provideSplitHostAndPort() {
-               return [
-                       [ false, '[', 'Unclosed square bracket' ],
-                       [ false, '[::', 'Unclosed square bracket 2' ],
-                       [ [ '::', false ], '::', 'Bare IPv6 0' ],
-                       [ [ '::1', false ], '::1', 'Bare IPv6 1' ],
-                       [ [ '::', false ], '[::]', 'Bracketed IPv6 0' ],
-                       [ [ '::1', false ], '[::1]', 'Bracketed IPv6 1' ],
-                       [ [ '::1', 80 ], '[::1]:80', 'Bracketed IPv6 with port' ],
-                       [ false, '::x', 'Double colon but no IPv6' ],
-                       [ [ 'x', 80 ], 'x:80', 'Hostname and port' ],
-                       [ false, 'x:x', 'Hostname and invalid port' ],
-                       [ [ 'x', false ], 'x', 'Plain hostname' ]
-               ];
-       }
-
-       /**
-        * Test for IP::combineHostAndPort()
-        * @dataProvider provideCombineHostAndPort
-        */
-       public function testCombineHostAndPort( $expected, $input, $description ) {
-               list( $host, $port, $defaultPort ) = $input;
-               $this->assertEquals(
-                       $expected,
-                       IP::combineHostAndPort( $host, $port, $defaultPort ),
-                       $description );
-       }
-
-       /**
-        * Provider for IP::combineHostAndPort()
-        */
-       public static function provideCombineHostAndPort() {
-               return [
-                       [ '[::1]', [ '::1', 2, 2 ], 'IPv6 default port' ],
-                       [ '[::1]:2', [ '::1', 2, 3 ], 'IPv6 non-default port' ],
-                       [ 'x', [ 'x', 2, 2 ], 'Normal default port' ],
-                       [ 'x:2', [ 'x', 2, 3 ], 'Normal non-default port' ],
-               ];
-       }
-
-       /**
-        * Test for IP::sanitizeRange()
-        * @dataProvider provideIPCIDRs
-        */
-       public function testSanitizeRange( $input, $expected, $description ) {
-               $this->assertEquals( $expected, IP::sanitizeRange( $input ), $description );
-       }
-
-       /**
-        * Provider for IP::testSanitizeRange()
-        */
-       public static function provideIPCIDRs() {
-               return [
-                       [ '35.56.31.252/16', '35.56.0.0/16', 'IPv4 range' ],
-                       [ '135.16.21.252/24', '135.16.21.0/24', 'IPv4 range' ],
-                       [ '5.36.71.252/32', '5.36.71.252/32', 'IPv4 silly range' ],
-                       [ '5.36.71.252', '5.36.71.252', 'IPv4 non-range' ],
-                       [ '0:1:2:3:4:c5:f6:7/96', '0:1:2:3:4:C5:0:0/96', 'IPv6 range' ],
-                       [ '0:1:2:3:4:5:6:7/120', '0:1:2:3:4:5:6:0/120', 'IPv6 range' ],
-                       [ '0:e1:2:3:4:5:e6:7/128', '0:E1:2:3:4:5:E6:7/128', 'IPv6 silly range' ],
-                       [ '0:c1:A2:3:4:5:c6:7', '0:C1:A2:3:4:5:C6:7', 'IPv6 non range' ],
-               ];
-       }
-
-       /**
-        * Test for IP::prettifyIP()
-        * @dataProvider provideIPsToPrettify
-        */
-       public function testPrettifyIP( $ip, $prettified ) {
-               $this->assertEquals( $prettified, IP::prettifyIP( $ip ), "Prettify of $ip" );
-       }
-
-       /**
-        * Provider for IP::testPrettifyIP()
-        */
-       public static function provideIPsToPrettify() {
-               return [
-                       [ '0:0:0:0:0:0:0:0', '::' ],
-                       [ '0:0:0::0:0:0', '::' ],
-                       [ '0:0:0:1:0:0:0:0', '0:0:0:1::' ],
-                       [ '0:0::f', '::f' ],
-                       [ '0::0:0:0:33:fef:b', '::33:fef:b' ],
-                       [ '3f:535:0:0:0:0:e:fbb', '3f:535::e:fbb' ],
-                       [ '0:0:fef:0:0:0:e:fbb', '0:0:fef::e:fbb' ],
-                       [ 'abbc:2004::0:0:0:0', 'abbc:2004::' ],
-                       [ 'cebc:2004:f:0:0:0:0:0', 'cebc:2004:f::' ],
-                       [ '0:0:0:0:0:0:0:0/16', '::/16' ],
-                       [ '0:0:0::0:0:0/64', '::/64' ],
-                       [ '0:0::f/52', '::f/52' ],
-                       [ '::0:0:33:fef:b/52', '::33:fef:b/52' ],
-                       [ '3f:535:0:0:0:0:e:fbb/48', '3f:535::e:fbb/48' ],
-                       [ '0:0:fef:0:0:0:e:fbb/96', '0:0:fef::e:fbb/96' ],
-                       [ 'abbc:2004:0:0::0:0/40', 'abbc:2004::/40' ],
-                       [ 'aebc:2004:f:0:0:0:0:0/80', 'aebc:2004:f::/80' ],
-               ];
-       }
-}
index fafd4fa..760d41e 100644 (file)
@@ -37,7 +37,7 @@ class MWCryptHKDFTest extends MediaWikiTestCase {
        }
 
        /**
-        * Test vectors from Appendix A on http://tools.ietf.org/html/rfc5869
+        * Test vectors from Appendix A on https://tools.ietf.org/html/rfc5869
         */
        public static function providerRfc5869() {
 
index 206e608..9a1823b 100644 (file)
@@ -14,7 +14,7 @@ class LanguageTrTest extends LanguageClassesTestCase {
         *  - berm
         *  - []LuCkY[]
         *  - Emperyan
-        * @see http://en.wikipedia.org/wiki/Dotted_and_dotless_I
+        * @see https://en.wikipedia.org/wiki/Dotted_and_dotless_I
         * @dataProvider provideDottedAndDotlessI
         * @covers Language::ucfirst
         * @covers Language::lcfirst
@@ -49,7 +49,7 @@ class LanguageTrTest extends LanguageClassesTestCase {
                        [ 'lcfirst', 'i', 'lower', 'i' ],
 
                        # A real example taken from bug 28040 using
-                       # http://tr.wikipedia.org/wiki/%C4%B0Phone
+                       # https://tr.wikipedia.org/wiki/%C4%B0Phone
                        [ 'lcfirst', 'iPhone', 'lower', 'iPhone' ],
 
                        # next case is valid in Turkish but are different words if we
index bdeed58..6797f59 100644 (file)
@@ -50,15 +50,11 @@ class MockFSFile extends FSFile {
                return wfTimestamp( TS_MW );
        }
 
-       public function getMimeType() {
-               return 'text/mock';
-       }
-
        public function getProps( $ext = true ) {
                return [
                        'fileExists' => $this->exists(),
                        'size' => $this->getSize(),
-                       'file-mime' => $this->getMimeType(),
+                       'file-mime' => 'text/mock',
                        'sha1' => $this->getSha1Base36(),
                ];
        }
diff --git a/tests/phpunit/mocks/filerepo/MockLocalRepo.php b/tests/phpunit/mocks/filerepo/MockLocalRepo.php
new file mode 100644 (file)
index 0000000..eeaf05a
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * Class simulating a local file repo.
+ *
+ * @ingroup FileRepo
+ * @since 1.28
+ */
+class MockLocalRepo extends LocalRepo {
+       function getLocalCopy( $virtualUrl ) {
+               return new MockFSFile( wfTempDir() . '/' . wfRandomString( 32 ) );
+       }
+
+       function getLocalReference( $virtualUrl ) {
+               return new MockFSFile( wfTempDir() . '/' . wfRandomString( 32 ) );
+       }
+
+       function getFileProps( $virtualUrl ) {
+               $fsFile = $this->getLocalReference( $virtualUrl );
+
+               return $fsFile->getProps();
+       }
+}
index 018d978..0e0b943 100644 (file)
  */
 
 class MockDjVuHandler extends DjVuHandler {
+       function isEnabled() {
+               return true;
+       }
+
        function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
                if ( !$this->normaliseParams( $image, $params ) ) {
                        return new TransformParameterError( $params );
index 711eab6..ad61284 100644 (file)
@@ -16,6 +16,9 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+use Composer\Spdx\SpdxLicenses;
+use JsonSchema\Validator;
+
 /**
  * Validates all loaded extensions and skins using the ExtensionRegistry
  * against the extension.json schema in the docs/ folder.
@@ -24,7 +27,7 @@ class ExtensionJsonValidationTest extends PHPUnit_Framework_TestCase {
 
        public function setUp() {
                parent::setUp();
-               if ( !class_exists( 'JsonSchema\Uri\UriRetriever' ) ) {
+               if ( !class_exists( Validator::class ) ) {
                        $this->markTestSkipped(
                                'The JsonSchema library cannot be found,' .
                                ' please install it through composer to run extension.json validation tests.'
@@ -75,9 +78,22 @@ class ExtensionJsonValidationTest extends PHPUnit_Framework_TestCase {
                        "$path is using a non-supported schema version"
                );
 
-               $validator = new JsonSchema\Validator;
+               $licenseError = false;
+               if ( class_exists( SpdxLicenses::class ) && isset( $data->{'license-name'} )
+                       // Check if it's a string, if not, schema validation will display an error
+                       && is_string( $data->{'license-name'} )
+               ) {
+                       $licenses = new SpdxLicenses();
+                       $valid = $licenses->validate( $data->{'license-name'} );
+                       if ( !$valid ) {
+                               $licenseError = '[license-name] Invalid SPDX license identifier, '
+                                       . 'see <https://spdx.org/licenses/>';
+                       }
+               }
+
+               $validator = new Validator;
                $validator->check( $data, (object) [ '$ref' => 'file://' . $schemaPath ] );
-               if ( $validator->isValid() ) {
+               if ( $validator->isValid() && !$licenseError ) {
                        // All good.
                        $this->assertTrue( true );
                } else {
@@ -85,6 +101,9 @@ class ExtensionJsonValidationTest extends PHPUnit_Framework_TestCase {
                        foreach ( $validator->getErrors() as $error ) {
                                $out .= "[{$error['property']}] {$error['message']}\n";
                        }
+                       if ( $licenseError ) {
+                               $out .= "$licenseError\n";
+                       }
                        $this->assertTrue( false, $out );
                }
        }
index d3129b1..dbee894 100644 (file)
@@ -18,7 +18,7 @@ class ParserTestFileSuite extends PHPUnit_Framework_TestSuite {
 
                foreach ( $this->ptFileInfo['tests'] as $test ) {
                        $this->addTest( new ParserIntegrationTest( $runner, $fileName, $test ),
-                               [ 'Database', 'Parser' ] );
+                               [ 'Database', 'Parser', 'ParserTests' ] );
                }
        }
 
index 4284a77..5a7fc48 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+use Wikimedia\ScopedCallback;
 
 /**
  * The UnitTest must be either a class that inherits from MediaWikiTestCase
index 8bc087b..815a3b4 100644 (file)
@@ -1,2 +1,6 @@
-var x = require( 'test.require.define' );
-module.exports = 'Require worked.' + x;
+module.exports = {
+       immediate: require( 'test.require.define' ),
+       later: function () {
+               return require( 'test.require.define' );
+       }
+};
index 79f37dc..b79c192 100644 (file)
         */
        QUnit.newMwEnvironment = ( function () {
                var warn, error, liveConfig, liveMessages,
+                       MwMap = mw.config.constructor, // internal use only
                        ajaxRequests = [];
 
-               liveConfig = mw.config.values;
-               liveMessages = mw.messages.values;
+               liveConfig = mw.config;
+               liveMessages = mw.messages;
 
                function suppressWarnings() {
                        warn = mw.log.warn;
                        // NOTE: It is important that we suppress warnings because extend() will also access
                        // deprecated properties and trigger deprecation warnings from mw.log#deprecate.
                        suppressWarnings();
-                       copy = $.extend( {}, liveConfig, custom );
+                       copy = $.extend( {}, liveConfig.get(), custom );
                        restoreWarnings();
 
                        return copy;
                }
 
                function freshMessagesCopy( custom ) {
-                       return $.extend( /*deep=*/true, {}, liveMessages, custom );
+                       return $.extend( /*deep=*/true, {}, liveMessages.get(), custom );
                }
 
                /**
                                setup: function () {
 
                                        // Greetings, mock environment!
-                                       mw.config.values = freshConfigCopy( localEnv.config );
-                                       mw.messages.values = freshMessagesCopy( localEnv.messages );
+                                       mw.config = new MwMap();
+                                       mw.config.set( freshConfigCopy( localEnv.config ) );
+                                       mw.messages = new MwMap();
+                                       mw.messages.set( freshMessagesCopy( localEnv.messages ) );
+                                       // Update reference to mw.messages
+                                       mw.jqueryMsg.setParserDefaults( {
+                                               messages: mw.messages
+                                       } );
+
                                        this.suppressWarnings = suppressWarnings;
                                        this.restoreWarnings = restoreWarnings;
 
                                        $( document ).off( 'ajaxSend', trackAjax );
 
                                        // Farewell, mock environment!
-                                       mw.config.values = liveConfig;
-                                       mw.messages.values = liveMessages;
+                                       mw.config = liveConfig;
+                                       mw.messages = liveMessages;
+                                       // Restore reference to mw.messages
+                                       mw.jqueryMsg.setParserDefaults( {
+                                               messages: liveMessages
+                                       } );
 
                                        // As a convenience feature, automatically restore warnings if they're
                                        // still suppressed by the end of the test.
index 7133039..caaef83 100644 (file)
                );
                assert.htmlEqual(
                        formatParse( 'external-link-replace', function () {} ),
-                       'Foo <a href="#">bar</a>',
+                       'Foo <a role="button" tabindex="0">bar</a>',
                        'External link message processed as function when format is \'parse\''
                );
 
index 41d800a..7233a2e 100644 (file)
@@ -1,5 +1,12 @@
 ( function ( mw, $ ) {
-       QUnit.module( 'mediawiki (mw.loader)' );
+       QUnit.module( 'mediawiki (mw.loader)', QUnit.newMwEnvironment( {
+               setup: function () {
+                       mw.loader.store.enabled = false;
+               },
+               teardown: function () {
+                       mw.loader.store.enabled = false;
+               }
+       } ) );
 
        mw.loader.addSource(
                'testloader',
                } );
        } );
 
+       QUnit.test( 'Stale response caching - T117587', function ( assert ) {
+               var count = 0;
+               mw.loader.store.enabled = true;
+               mw.loader.register( 'test.stale', 'v2' );
+               assert.strictEqual( mw.loader.store.get( 'test.stale' ), false, 'Not in store' );
+
+               mw.loader.implement( 'test.stale@v1', function () {
+                       count++;
+               } );
+
+               return mw.loader.using( 'test.stale' )
+                       .then( function () {
+                               assert.strictEqual( count, 1 );
+                               // After implementing, registry contains version as implemented by the response.
+                               assert.strictEqual( mw.loader.getVersion( 'test.stale' ), 'v1', 'Override version' );
+                               assert.strictEqual( mw.loader.getState( 'test.stale' ), 'ready' );
+                               assert.ok( mw.loader.store.get( 'test.stale' ), 'In store' );
+                       } )
+                       .then( function () {
+                               // Reset run time, but keep mw.loader.store
+                               mw.loader.moduleRegistry[ 'test.stale' ].script = undefined;
+                               mw.loader.moduleRegistry[ 'test.stale' ].state = 'registered';
+                               mw.loader.moduleRegistry[ 'test.stale' ].version = 'v2';
+
+                               // Module was stored correctly as v1
+                               // On future navigations, it will be ignored until evicted
+                               assert.strictEqual( mw.loader.store.get( 'test.stale' ), false, 'Not in store' );
+                       } );
+       } );
+
+       QUnit.test( 'Stale response caching - backcompat', function ( assert ) {
+               var count = 0;
+               mw.loader.store.enabled = true;
+               mw.loader.register( 'test.stalebc', 'v2' );
+               assert.strictEqual( mw.loader.store.get( 'test.stalebc' ), false, 'Not in store' );
+
+               mw.loader.implement( 'test.stalebc', function () {
+                       count++;
+               } );
+
+               return mw.loader.using( 'test.stalebc' )
+                       .then( function () {
+                               assert.strictEqual( count, 1 );
+                               assert.strictEqual( mw.loader.getState( 'test.stalebc' ), 'ready' );
+                               assert.ok( mw.loader.store.get( 'test.stalebc' ), 'In store' );
+                       } )
+                       .then( function () {
+                               // Reset run time, but keep mw.loader.store
+                               mw.loader.moduleRegistry[ 'test.stalebc' ].script = undefined;
+                               mw.loader.moduleRegistry[ 'test.stalebc' ].state = 'registered';
+                               mw.loader.moduleRegistry[ 'test.stalebc' ].version = 'v2';
+
+                               // Legacy behaviour is storing under the expected version,
+                               // which woudl lead to whitewashing and stale values (T117587).
+                               assert.ok( mw.loader.store.get( 'test.stalebc' ), 'In store' );
+                       } );
+       } );
+
        QUnit.test( 'require()', 6, function ( assert ) {
                mw.loader.register( [
                        [ 'test.require1', '0' ],
                } );
        } );
 
-       QUnit.test( 'require() in debug mode', 1, function ( assert ) {
+       QUnit.test( 'require() in debug mode', function ( assert ) {
                var path = mw.config.get( 'wgScriptPath' );
                mw.loader.register( [
                        [ 'test.require.define', '0' ],
                mw.loader.implement( 'test.require.define', [ QUnit.fixurl( path + '/tests/qunit/data/defineCallMwLoaderTestCallback.js' ) ] );
 
                return mw.loader.using( 'test.require.callback' ).then( function ( require ) {
-                       var exported = require( 'test.require.callback' );
-                       assert.strictEqual( exported, 'Require worked.Define worked.',
-                               'module.exports worked in debug mode' );
+                       var cb = require( 'test.require.callback' );
+                       assert.strictEqual( cb.immediate, 'Defined.', 'module.exports and require work in debug mode' );
+                       // Must use try-catch because cb.later() will throw if require is undefined,
+                       // which doesn't work well inside Deferred.then() when using jQuery 1.x with QUnit
+                       try {
+                               assert.strictEqual( cb.later(), 'Defined.', 'require works asynchrously in debug mode' );
+                       } catch ( e ) {
+                               assert.equal( null, String( e ), 'require works asynchrously in debug mode' );
+                       }
                }, function () {
                        assert.ok( false, 'Error callback fired while loader.using "test.require.callback" module' );
                } );
index 7a09964..df02693 100644 (file)
@@ -95,8 +95,9 @@
        if ( window.requestIdleCallback ) {
                QUnit.test( 'native', function ( assert ) {
                        var done = assert.async();
-                       // Remove polyfill
+                       // Remove polyfill and clock stub
                        mw.requestIdleCallback.restore();
+                       this.clock.restore();
                        mw.requestIdleCallback( function () {
                                assert.expect( 0 );
                                done();
index ab463a9..1518a80 100644 (file)
                );
        } );
 
-       QUnit.test( 'mw.Map', 35, function ( assert ) {
+       QUnit.test( 'mw.Map', function ( assert ) {
                var arry, conf, funky, globalConf, nummy, someValues;
 
                conf = new mw.Map();
+
                // Dummy variables
                funky = function () {};
                arry = [];
                        lorem: 'ipsum'
                }, 'Map.get returns multiple values correctly as an object' );
 
-               assert.deepEqual( conf, new mw.Map( conf.values ), 'new mw.Map maps over existing values-bearing object' );
-
                assert.deepEqual( conf.get( [ 'foo', 'notExist' ] ), {
                        foo: 'bar',
                        notExist: null
                }, 'Map.get return includes keys that were not found as null values' );
 
                // Interacting with globals and accessing the values object
+               this.suppressWarnings();
                assert.strictEqual( conf.get(), conf.values, 'Map.get returns the entire values object by reference (if called without arguments)' );
+               this.restoreWarnings();
 
                conf.set( 'globalMapChecker', 'Hi' );
 
                }
        } );
 
-       QUnit.test( 'mw.config', 1, function ( assert ) {
-               assert.ok( mw.config instanceof mw.Map, 'mw.config instance of mw.Map' );
-       } );
-
-       QUnit.test( 'mw.message & mw.messages', 100, function ( assert ) {
+       QUnit.test( 'mw.message & mw.messages', function ( assert ) {
                var goodbye, hello;
 
                // Convenience method for asserting the same result for multiple formats
                }
 
                assert.ok( mw.messages, 'messages defined' );
-               assert.ok( mw.messages instanceof mw.Map, 'mw.messages instance of mw.Map' );
                assert.ok( mw.messages.set( 'hello', 'Hello <b>awesome</b> world' ), 'mw.messages.set: Register' );
 
                hello = mw.message( 'hello' );
index 3332c08..7f6efa0 100644 (file)
                }
        } ) );
 
-       QUnit.test( 'options', 1, function ( assert ) {
+       QUnit.test( 'options', function ( assert ) {
                assert.ok( mw.user.options instanceof mw.Map, 'options instance of mw.Map' );
        } );
 
-       QUnit.test( 'user status', 7, function ( assert ) {
-
+       QUnit.test( 'getters (anonymous)', function ( assert ) {
                // Forge an anonymous user
                mw.config.set( 'wgUserName', null );
-               delete mw.config.values.wgUserId;
+               mw.config.set( 'wgUserId', null );
 
-               assert.strictEqual( mw.user.getName(), null, 'user.getName() returns null when anonymous' );
-               assert.assertTrue( mw.user.isAnon(), 'user.isAnon() returns true when anonymous' );
-               assert.strictEqual( mw.user.getId(), 0, 'user.getId() returns 0 when anonymous' );
+               assert.strictEqual( mw.user.getName(), null, 'getName()' );
+               assert.strictEqual( mw.user.isAnon(), true, 'isAnon()' );
+               assert.strictEqual( mw.user.getId(), 0, 'getId()' );
+       } );
 
-               // Not part of startUp module
+       QUnit.test( 'getters (logged-in)', function ( assert ) {
                mw.config.set( 'wgUserName', 'John' );
                mw.config.set( 'wgUserId', 123 );
 
-               assert.equal( mw.user.getName(), 'John', 'user.getName() returns username when logged-in' );
-               assert.assertFalse( mw.user.isAnon(), 'user.isAnon() returns false when logged-in' );
-               assert.strictEqual( mw.user.getId(), 123, 'user.getId() returns correct ID when logged-in' );
+               assert.equal( mw.user.getName(), 'John', 'getName()' );
+               assert.strictEqual( mw.user.isAnon(), false, 'isAnon()' );
+               assert.strictEqual( mw.user.getId(), 123, 'getId()' );
 
-               assert.equal( mw.user.id(), 'John', 'user.id Returns username when logged-in' );
+               assert.equal( mw.user.id(), 'John', 'user.id()' );
        } );
 
-       QUnit.test( 'getUserInfos', 3, function ( assert ) {
+       QUnit.test( 'getUserInfo', function ( assert ) {
                mw.config.set( 'wgUserGroups', [ '*', 'user' ] );
 
                mw.user.getGroups( function ( groups ) {
@@ -64,7 +64,7 @@
                this.server.respond();
        } );
 
-       QUnit.test( 'generateRandomSessionId', 4, function ( assert ) {
+       QUnit.test( 'generateRandomSessionId', function ( assert ) {
                var result, result2;
 
                result = mw.user.generateRandomSessionId();
@@ -77,7 +77,7 @@
 
        } );
 
-       QUnit.test( 'generateRandomSessionId (fallback)', 4, function ( assert ) {
+       QUnit.test( 'generateRandomSessionId (fallback)', function ( assert ) {
                var result, result2;
 
                // Pretend crypto API is not there to test the Math.random fallback